const kN = "modulepreload"
  , RN = function(t) {
    return "/" + t
}
  , ZC = {}
  , ef = function(e, r, n) {
    if (!r || r.length === 0)
        return e();
    const i = document.getElementsByTagName("link");
    return Promise.all(r.map(o => {
        if (o = RN(o),
        o in ZC)
            return;
        ZC[o] = !0;
        const s = o.endsWith(".css")
          , a = s ? '[rel="stylesheet"]' : "";
        if (!!n)
            for (let u = i.length - 1; u >= 0; u--) {
                const f = i[u];
                if (f.href === o && (!s || f.rel === "stylesheet"))
                    return
            }
        else if (document.querySelector(`link[href="${o}"]${a}`))
            return;
        const c = document.createElement("link");
        if (c.rel = s ? "stylesheet" : kN,
        s || (c.as = "script",
        c.crossOrigin = ""),
        c.href = o,
        document.head.appendChild(c),
        s)
            return new Promise( (u, f) => {
                c.addEventListener("load", u),
                c.addEventListener("error", () => f(new Error(`Unable to preload CSS for ${o}`)))
            }
            )
    }
    )).then( () => e()).catch(o => {
        const s = new Event("vite:preloadError",{
            cancelable: !0
        });
        if (s.payload = o,
        window.dispatchEvent(s),
        !s.defaultPrevented)
            throw o
    }
    )
};
function MN(t, e) {
    const r = Object.create(null)
      , n = t.split(",");
    for (let i = 0; i < n.length; i++)
        r[n[i]] = !0;
    return e ? i => !!r[i.toLowerCase()] : i => !!r[i]
}
const Uf = Object.assign
  , NN = Object.prototype.hasOwnProperty
  , mp = (t, e) => NN.call(t, e)
  , es = Array.isArray
  , A0 = t => _5(t) === "[object Map]"
  , f_ = t => typeof t == "function"
  , LN = t => typeof t == "string"
  , d_ = t => typeof t == "symbol"
  , Gf = t => t !== null && typeof t == "object"
  , $N = Object.prototype.toString
  , _5 = t => $N.call(t)
  , b5 = t => _5(t).slice(8, -1)
  , h_ = t => LN(t) && t !== "NaN" && t[0] !== "-" && "" + parseInt(t, 10) === t
  , UN = t => {
    const e = Object.create(null);
    return r => e[r] || (e[r] = t(r))
}
  , GN = UN(t => t.charAt(0).toUpperCase() + t.slice(1))
  , x_ = (t, e) => !Object.is(t, e)
  , HN = (t, e, r) => {
    Object.defineProperty(t, e, {
        configurable: !0,
        enumerable: !1,
        value: r
    })
}
;
function xx(t, ...e) {
    console.warn(`[Vue warn] ${t}`, ...e)
}
let Gn;
class p_ {
    constructor(e=!1) {
        this.detached = e,
        this._active = !0,
        this.effects = [],
        this.cleanups = [],
        this.parent = Gn,
        !e && Gn && (this.index = (Gn.scopes || (Gn.scopes = [])).push(this) - 1)
    }
    get active() {
        return this._active
    }
    run(e) {
        if (this._active) {
            const r = Gn;
            try {
                return Gn = this,
                e()
            } finally {
                Gn = r
            }
        } else
            xx("cannot run an inactive effect scope.")
    }
    on() {
        Gn = this
    }
    off() {
        Gn = this.parent
    }
    stop(e) {
        if (this._active) {
            let r, n;
            for (r = 0,
            n = this.effects.length; r < n; r++)
                this.effects[r].stop();
            for (r = 0,
            n = this.cleanups.length; r < n; r++)
                this.cleanups[r]();
            if (this.scopes)
                for (r = 0,
                n = this.scopes.length; r < n; r++)
                    this.scopes[r].stop(!0);
            if (!this.detached && this.parent && !e) {
                const i = this.parent.scopes.pop();
                i && i !== this && (this.parent.scopes[this.index] = i,
                i.index = this.index)
            }
            this.parent = void 0,
            this._active = !1
        }
    }
}
function Hf(t) {
    return new p_(t)
}
function C5(t, e=Gn) {
    e && e.active && e.effects.push(t)
}
function Vf() {
    return Gn
}
function g_(t) {
    Gn ? Gn.cleanups.push(t) : xx("onScopeDispose() is called when there is no active effect scope to be associated with.")
}
const m_ = t => {
    const e = new Set(t);
    return e.w = 0,
    e.n = 0,
    e
}
  , A5 = t => (t.w & sa) > 0
  , w5 = t => (t.n & sa) > 0
  , VN = ({deps: t}) => {
    if (t.length)
        for (let e = 0; e < t.length; e++)
            t[e].w |= sa
}
  , zN = t => {
    const {deps: e} = t;
    if (e.length) {
        let r = 0;
        for (let n = 0; n < e.length; n++) {
            const i = e[n];
            A5(i) && !w5(i) ? i.delete(t) : e[r++] = i,
            i.w &= ~sa,
            i.n &= ~sa
        }
        e.length = r
    }
}
  , px = new WeakMap;
let h0 = 0
  , sa = 1;
const Dv = 30;
let fn;
const ol = Symbol("iterate")
  , Fv = Symbol("Map key iterate");
class zf {
    constructor(e, r=null, n) {
        this.fn = e,
        this.scheduler = r,
        this.active = !0,
        this.deps = [],
        this.parent = void 0,
        C5(this, n)
    }
    run() {
        if (!this.active)
            return this.fn();
        let e = fn
          , r = Zs;
        for (; e; ) {
            if (e === this)
                return;
            e = e.parent
        }
        try {
            return this.parent = fn,
            fn = this,
            Zs = !0,
            sa = 1 << ++h0,
            h0 <= Dv ? VN(this) : JC(this),
            this.fn()
        } finally {
            h0 <= Dv && zN(this),
            sa = 1 << --h0,
            fn = this.parent,
            Zs = r,
            this.parent = void 0,
            this.deferStop && this.stop()
        }
    }
    stop() {
        fn === this ? this.deferStop = !0 : this.active && (JC(this),
        this.onStop && this.onStop(),
        this.active = !1)
    }
}
function JC(t) {
    const {deps: e} = t;
    if (e.length) {
        for (let r = 0; r < e.length; r++)
            e[r].delete(t);
        e.length = 0
    }
}
function jN(t, e) {
    t.effect && (t = t.effect.fn);
    const r = new zf(t);
    e && (Uf(r, e),
    e.scope && C5(r, e.scope)),
    (!e || !e.lazy) && r.run();
    const n = r.run.bind(r);
    return n.effect = r,
    n
}
function WN(t) {
    t.effect.stop()
}
let Zs = !0;
const B5 = [];
function Nl() {
    B5.push(Zs),
    Zs = !1
}
function Ll() {
    const t = B5.pop();
    Zs = t === void 0 ? !0 : t
}
function rn(t, e, r) {
    if (Zs && fn) {
        let n = px.get(t);
        n || px.set(t, n = new Map);
        let i = n.get(r);
        i || n.set(r, i = m_()),
        S5(i, {
            effect: fn,
            target: t,
            type: e,
            key: r
        })
    }
}
function S5(t, e) {
    let r = !1;
    h0 <= Dv ? w5(t) || (t.n |= sa,
    r = !A5(t)) : r = !t.has(fn),
    r && (t.add(fn),
    fn.deps.push(t),
    fn.onTrack && fn.onTrack(Uf({
        effect: fn
    }, e)))
}
function vo(t, e, r, n, i, o) {
    const s = px.get(t);
    if (!s)
        return;
    let a = [];
    if (e === "clear")
        a = [...s.values()];
    else if (r === "length" && es(t)) {
        const c = Number(n);
        s.forEach( (u, f) => {
            (f === "length" || f >= c) && a.push(u)
        }
        )
    } else
        switch (r !== void 0 && a.push(s.get(r)),
        e) {
        case "add":
            es(t) ? h_(r) && a.push(s.get("length")) : (a.push(s.get(ol)),
            A0(t) && a.push(s.get(Fv)));
            break;
        case "delete":
            es(t) || (a.push(s.get(ol)),
            A0(t) && a.push(s.get(Fv)));
            break;
        case "set":
            A0(t) && a.push(s.get(ol));
            break
        }
    const l = {
        target: t,
        type: e,
        key: r,
        newValue: n,
        oldValue: i,
        oldTarget: o
    };
    if (a.length === 1)
        a[0] && Pv(a[0], l);
    else {
        const c = [];
        for (const u of a)
            u && c.push(...u);
        Pv(m_(c), l)
    }
}
function Pv(t, e) {
    const r = es(t) ? t : [...t];
    for (const n of r)
        n.computed && QC(n, e);
    for (const n of r)
        n.computed || QC(n, e)
}
function QC(t, e) {
    (t !== fn || t.allowRecurse) && (t.onTrigger && t.onTrigger(Uf({
        effect: t
    }, e)),
    t.scheduler ? t.scheduler() : t.run())
}
function YN(t, e) {
    var r;
    return (r = px.get(t)) == null ? void 0 : r.get(e)
}
const XN = MN("__proto__,__v_isRef,__isVue")
  , T5 = new Set(Object.getOwnPropertyNames(Symbol).filter(t => t !== "arguments" && t !== "caller").map(t => Symbol[t]).filter(d_))
  , KN = vp()
  , qN = vp(!1, !0)
  , ZN = vp(!0)
  , JN = vp(!0, !0)
  , e8 = QN();
function QN() {
    const t = {};
    return ["includes", "indexOf", "lastIndexOf"].forEach(e => {
        t[e] = function(...r) {
            const n = Le(this);
            for (let o = 0, s = this.length; o < s; o++)
                rn(n, "get", o + "");
            const i = n[e](...r);
            return i === -1 || i === !1 ? n[e](...r.map(Le)) : i
        }
    }
    ),
    ["push", "pop", "shift", "unshift", "splice"].forEach(e => {
        t[e] = function(...r) {
            Nl();
            const n = Le(this)[e].apply(this, r);
            return Ll(),
            n
        }
    }
    ),
    t
}
function eL(t) {
    const e = Le(this);
    return rn(e, "has", t),
    e.hasOwnProperty(t)
}
function vp(t=!1, e=!1) {
    return function(n, i, o) {
        if (i === "__v_isReactive")
            return !t;
        if (i === "__v_isReadonly")
            return t;
        if (i === "__v_isShallow")
            return e;
        if (i === "__v_raw" && o === (t ? e ? M5 : R5 : e ? k5 : O5).get(n))
            return n;
        const s = es(n);
        if (!t) {
            if (s && mp(e8, i))
                return Reflect.get(e8, i, o);
            if (i === "hasOwnProperty")
                return eL
        }
        const a = Reflect.get(n, i, o);
        return (d_(i) ? T5.has(i) : XN(i)) || (t || rn(n, "get", i),
        e) ? a : xt(a) ? s && h_(i) ? a : a.value : Gf(a) ? t ? $l(a) : It(a) : a
    }
}
const tL = D5()
  , rL = D5(!0);
function D5(t=!1) {
    return function(r, n, i, o) {
        let s = r[n];
        if (fs(s) && xt(s) && !xt(i))
            return !1;
        if (!t && (!tf(i) && !fs(i) && (s = Le(s),
        i = Le(i)),
        !es(r) && xt(s) && !xt(i)))
            return s.value = i,
            !0;
        const a = es(r) && h_(n) ? Number(n) < r.length : mp(r, n)
          , l = Reflect.set(r, n, i, o);
        return r === Le(o) && (a ? x_(i, s) && vo(r, "set", n, i, s) : vo(r, "add", n, i)),
        l
    }
}
function nL(t, e) {
    const r = mp(t, e)
      , n = t[e]
      , i = Reflect.deleteProperty(t, e);
    return i && r && vo(t, "delete", e, void 0, n),
    i
}
function iL(t, e) {
    const r = Reflect.has(t, e);
    return (!d_(e) || !T5.has(e)) && rn(t, "has", e),
    r
}
function oL(t) {
    return rn(t, "iterate", es(t) ? "length" : ol),
    Reflect.ownKeys(t)
}
const F5 = {
    get: KN,
    set: tL,
    deleteProperty: nL,
    has: iL,
    ownKeys: oL
}
  , P5 = {
    get: ZN,
    set(t, e) {
        return xx(`Set operation on key "${String(e)}" failed: target is readonly.`, t),
        !0
    },
    deleteProperty(t, e) {
        return xx(`Delete operation on key "${String(e)}" failed: target is readonly.`, t),
        !0
    }
}
  , sL = Uf({}, F5, {
    get: qN,
    set: rL
})
  , aL = Uf({}, P5, {
    get: JN
})
  , v_ = t => t
  , yp = t => Reflect.getPrototypeOf(t);
function Fd(t, e, r=!1, n=!1) {
    t = t.__v_raw;
    const i = Le(t)
      , o = Le(e);
    r || (e !== o && rn(i, "get", e),
    rn(i, "get", o));
    const {has: s} = yp(i)
      , a = n ? v_ : r ? y_ : nf;
    if (s.call(i, e))
        return a(t.get(e));
    if (s.call(i, o))
        return a(t.get(o));
    t !== i && t.get(e)
}
function Pd(t, e=!1) {
    const r = this.__v_raw
      , n = Le(r)
      , i = Le(t);
    return e || (t !== i && rn(n, "has", t),
    rn(n, "has", i)),
    t === i ? r.has(t) : r.has(t) || r.has(i)
}
function Id(t, e=!1) {
    return t = t.__v_raw,
    !e && rn(Le(t), "iterate", ol),
    Reflect.get(t, "size", t)
}
function t8(t) {
    t = Le(t);
    const e = Le(this);
    return yp(e).has.call(e, t) || (e.add(t),
    vo(e, "add", t, t)),
    this
}
function r8(t, e) {
    e = Le(e);
    const r = Le(this)
      , {has: n, get: i} = yp(r);
    let o = n.call(r, t);
    o ? I5(r, n, t) : (t = Le(t),
    o = n.call(r, t));
    const s = i.call(r, t);
    return r.set(t, e),
    o ? x_(e, s) && vo(r, "set", t, e, s) : vo(r, "add", t, e),
    this
}
function n8(t) {
    const e = Le(this)
      , {has: r, get: n} = yp(e);
    let i = r.call(e, t);
    i ? I5(e, r, t) : (t = Le(t),
    i = r.call(e, t));
    const o = n ? n.call(e, t) : void 0
      , s = e.delete(t);
    return i && vo(e, "delete", t, void 0, o),
    s
}
function i8() {
    const t = Le(this)
      , e = t.size !== 0
      , r = A0(t) ? new Map(t) : new Set(t)
      , n = t.clear();
    return e && vo(t, "clear", void 0, void 0, r),
    n
}
function Od(t, e) {
    return function(n, i) {
        const o = this
          , s = o.__v_raw
          , a = Le(s)
          , l = e ? v_ : t ? y_ : nf;
        return !t && rn(a, "iterate", ol),
        s.forEach( (c, u) => n.call(i, l(c), l(u), o))
    }
}
function kd(t, e, r) {
    return function(...n) {
        const i = this.__v_raw
          , o = Le(i)
          , s = A0(o)
          , a = t === "entries" || t === Symbol.iterator && s
          , l = t === "keys" && s
          , c = i[t](...n)
          , u = r ? v_ : e ? y_ : nf;
        return !e && rn(o, "iterate", l ? Fv : ol),
        {
            next() {
                const {value: f, done: d} = c.next();
                return d ? {
                    value: f,
                    done: d
                } : {
                    value: a ? [u(f[0]), u(f[1])] : u(f),
                    done: d
                }
            },
            [Symbol.iterator]() {
                return this
            }
        }
    }
}
function ws(t) {
    return function(...e) {
        {
            const r = e[0] ? `on key "${e[0]}" ` : "";
            console.warn(`${GN(t)} operation ${r}failed: target is readonly.`, Le(this))
        }
        return t === "delete" ? !1 : this
    }
}
function lL() {
    const t = {
        get(o) {
            return Fd(this, o)
        },
        get size() {
            return Id(this)
        },
        has: Pd,
        add: t8,
        set: r8,
        delete: n8,
        clear: i8,
        forEach: Od(!1, !1)
    }
      , e = {
        get(o) {
            return Fd(this, o, !1, !0)
        },
        get size() {
            return Id(this)
        },
        has: Pd,
        add: t8,
        set: r8,
        delete: n8,
        clear: i8,
        forEach: Od(!1, !0)
    }
      , r = {
        get(o) {
            return Fd(this, o, !0)
        },
        get size() {
            return Id(this, !0)
        },
        has(o) {
            return Pd.call(this, o, !0)
        },
        add: ws("add"),
        set: ws("set"),
        delete: ws("delete"),
        clear: ws("clear"),
        forEach: Od(!0, !1)
    }
      , n = {
        get(o) {
            return Fd(this, o, !0, !0)
        },
        get size() {
            return Id(this, !0)
        },
        has(o) {
            return Pd.call(this, o, !0)
        },
        add: ws("add"),
        set: ws("set"),
        delete: ws("delete"),
        clear: ws("clear"),
        forEach: Od(!0, !0)
    };
    return ["keys", "values", "entries", Symbol.iterator].forEach(o => {
        t[o] = kd(o, !1, !1),
        r[o] = kd(o, !0, !1),
        e[o] = kd(o, !1, !0),
        n[o] = kd(o, !0, !0)
    }
    ),
    [t, r, e, n]
}
const [cL,uL,fL,dL] = lL();
function Ep(t, e) {
    const r = e ? t ? dL : fL : t ? uL : cL;
    return (n, i, o) => i === "__v_isReactive" ? !t : i === "__v_isReadonly" ? t : i === "__v_raw" ? n : Reflect.get(mp(r, i) && i in n ? r : n, i, o)
}
const hL = {
    get: Ep(!1, !1)
}
  , xL = {
    get: Ep(!1, !0)
}
  , pL = {
    get: Ep(!0, !1)
}
  , gL = {
    get: Ep(!0, !0)
};
function I5(t, e, r) {
    const n = Le(r);
    if (n !== r && e.call(t, n)) {
        const i = b5(t);
        console.warn(`Reactive ${i} contains both the raw and reactive versions of the same object${i === "Map" ? " as keys" : ""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)
    }
}
const O5 = new WeakMap
  , k5 = new WeakMap
  , R5 = new WeakMap
  , M5 = new WeakMap;
function mL(t) {
    switch (t) {
    case "Object":
    case "Array":
        return 1;
    case "Map":
    case "Set":
    case "WeakMap":
    case "WeakSet":
        return 2;
    default:
        return 0
    }
}
function vL(t) {
    return t.__v_skip || !Object.isExtensible(t) ? 0 : mL(b5(t))
}
function It(t) {
    return fs(t) ? t : _p(t, !1, F5, hL, O5)
}
function N5(t) {
    return _p(t, !1, sL, xL, k5)
}
function $l(t) {
    return _p(t, !0, P5, pL, R5)
}
function wc(t) {
    return _p(t, !0, aL, gL, M5)
}
function _p(t, e, r, n, i) {
    if (!Gf(t))
        return console.warn(`value cannot be made reactive: ${String(t)}`),
        t;
    if (t.__v_raw && !(e && t.__v_isReactive))
        return t;
    const o = i.get(t);
    if (o)
        return o;
    const s = vL(t);
    if (s === 0)
        return t;
    const a = new Proxy(t,s === 2 ? n : r);
    return i.set(t, a),
    a
}
function Ni(t) {
    return fs(t) ? Ni(t.__v_raw) : !!(t && t.__v_isReactive)
}
function fs(t) {
    return !!(t && t.__v_isReadonly)
}
function tf(t) {
    return !!(t && t.__v_isShallow)
}
function rf(t) {
    return Ni(t) || fs(t)
}
function Le(t) {
    const e = t && t.__v_raw;
    return e ? Le(e) : t
}
function uo(t) {
    return HN(t, "__v_skip", !0),
    t
}
const nf = t => Gf(t) ? It(t) : t
  , y_ = t => Gf(t) ? $l(t) : t;
function E_(t) {
    Zs && fn && (t = Le(t),
    S5(t.dep || (t.dep = m_()), {
        target: t,
        type: "get",
        key: "value"
    }))
}
function bp(t, e) {
    t = Le(t);
    const r = t.dep;
    r && Pv(r, {
        target: t,
        type: "set",
        key: "value",
        newValue: e
    })
}
function xt(t) {
    return !!(t && t.__v_isRef === !0)
}
function ie(t) {
    return L5(t, !1)
}
function Cp(t) {
    return L5(t, !0)
}
function L5(t, e) {
    return xt(t) ? t : new yL(t,e)
}
class yL {
    constructor(e, r) {
        this.__v_isShallow = r,
        this.dep = void 0,
        this.__v_isRef = !0,
        this._rawValue = r ? e : Le(e),
        this._value = r ? e : nf(e)
    }
    get value() {
        return E_(this),
        this._value
    }
    set value(e) {
        const r = this.__v_isShallow || tf(e) || fs(e);
        e = r ? e : Le(e),
        x_(e, this._rawValue) && (this._rawValue = e,
        this._value = r ? e : nf(e),
        bp(this, e))
    }
}
function EL(t) {
    bp(t, t.value)
}
function xn(t) {
    return xt(t) ? t.value : t
}
function _L(t) {
    return f_(t) ? t() : xn(t)
}
const bL = {
    get: (t, e, r) => xn(Reflect.get(t, e, r)),
    set: (t, e, r, n) => {
        const i = t[e];
        return xt(i) && !xt(r) ? (i.value = r,
        !0) : Reflect.set(t, e, r, n)
    }
};
function __(t) {
    return Ni(t) ? t : new Proxy(t,bL)
}
class CL {
    constructor(e) {
        this.dep = void 0,
        this.__v_isRef = !0;
        const {get: r, set: n} = e( () => E_(this), () => bp(this));
        this._get = r,
        this._set = n
    }
    get value() {
        return this._get()
    }
    set value(e) {
        this._set(e)
    }
}
function $5(t) {
    return new CL(t)
}
function Iv(t) {
    rf(t) || console.warn("toRefs() expects a reactive object but received a plain one.");
    const e = es(t) ? new Array(t.length) : {};
    for (const r in t)
        e[r] = U5(t, r);
    return e
}
class AL {
    constructor(e, r, n) {
        this._object = e,
        this._key = r,
        this._defaultValue = n,
        this.__v_isRef = !0
    }
    get value() {
        const e = this._object[this._key];
        return e === void 0 ? this._defaultValue : e
    }
    set value(e) {
        this._object[this._key] = e
    }
    get dep() {
        return YN(Le(this._object), this._key)
    }
}
class wL {
    constructor(e) {
        this._getter = e,
        this.__v_isRef = !0,
        this.__v_isReadonly = !0
    }
    get value() {
        return this._getter()
    }
}
function w0(t, e, r) {
    return xt(t) ? t : f_(t) ? new wL(t) : Gf(t) && arguments.length > 1 ? U5(t, e, r) : ie(t)
}
function U5(t, e, r) {
    const n = t[e];
    return xt(n) ? n : new AL(t,e,r)
}
class BL {
    constructor(e, r, n, i) {
        this._setter = r,
        this.dep = void 0,
        this.__v_isRef = !0,
        this.__v_isReadonly = !1,
        this._dirty = !0,
        this.effect = new zf(e, () => {
            this._dirty || (this._dirty = !0,
            bp(this))
        }
        ),
        this.effect.computed = this,
        this.effect.active = this._cacheable = !i,
        this.__v_isReadonly = n
    }
    get value() {
        const e = Le(this);
        return E_(e),
        (e._dirty || !e._cacheable) && (e._dirty = !1,
        e._value = e.effect.run()),
        e._value
    }
    set value(e) {
        this._setter(e)
    }
}
function SL(t, e, r=!1) {
    let n, i;
    const o = f_(t);
    o ? (n = t,
    i = () => {
        console.warn("Write operation failed: computed value is readonly")
    }
    ) : (n = t.get,
    i = t.set);
    const s = new BL(n,i,o || !i,r);
    return e && !r && (s.effect.onTrack = e.onTrack,
    s.effect.onTrigger = e.onTrigger),
    s
}
function jf(t, e) {
    const r = Object.create(null)
      , n = t.split(",");
    for (let i = 0; i < n.length; i++)
        r[n[i]] = !0;
    return e ? i => !!r[i.toLowerCase()] : i => !!r[i]
}
const Ct = Object.freeze({})
  , Rc = Object.freeze([])
  , Tn = () => {}
  , G5 = () => !1
  , TL = /^on[^a-z]/
  , Wf = t => TL.test(t)
  , Ov = t => t.startsWith("onUpdate:")
  , Xt = Object.assign
  , b_ = (t, e) => {
    const r = t.indexOf(e);
    r > -1 && t.splice(r, 1)
}
  , DL = Object.prototype.hasOwnProperty
  , lt = (t, e) => DL.call(t, e)
  , Ve = Array.isArray
  , H5 = t => Yf(t) === "[object Map]"
  , V5 = t => Yf(t) === "[object Set]"
  , FL = t => Yf(t) === "[object RegExp]"
  , He = t => typeof t == "function"
  , nr = t => typeof t == "string"
  , Bt = t => t !== null && typeof t == "object"
  , Ap = t => Bt(t) && He(t.then) && He(t.catch)
  , z5 = Object.prototype.toString
  , Yf = t => z5.call(t)
  , PL = t => Yf(t).slice(8, -1)
  , j5 = t => Yf(t) === "[object Object]"
  , B0 = jf(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted")
  , IL = jf("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo")
  , wp = t => {
    const e = Object.create(null);
    return r => e[r] || (e[r] = t(r))
}
  , OL = /-(\w)/g
  , Ui = wp(t => t.replace(OL, (e, r) => r ? r.toUpperCase() : ""))
  , kL = /\B([A-Z])/g
  , Wc = wp(t => t.replace(kL, "-$1").toLowerCase())
  , Yc = wp(t => t.charAt(0).toUpperCase() + t.slice(1))
  , Wo = wp(t => t ? `on${Yc(t)}` : "")
  , kv = (t, e) => !Object.is(t, e)
  , za = (t, e) => {
    for (let r = 0; r < t.length; r++)
        t[r](e)
}
  , Rv = (t, e, r) => {
    Object.defineProperty(t, e, {
        configurable: !0,
        enumerable: !1,
        value: r
    })
}
  , RL = t => {
    const e = parseFloat(t);
    return isNaN(e) ? t : e
}
  , ML = t => {
    const e = nr(t) ? Number(t) : NaN;
    return isNaN(e) ? t : e
}
;
let o8;
const gx = () => o8 || (o8 = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {})
  , NL = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console"
  , LL = jf(NL);
function Xf(t) {
    if (Ve(t)) {
        const e = {};
        for (let r = 0; r < t.length; r++) {
            const n = t[r]
              , i = nr(n) ? HL(n) : Xf(n);
            if (i)
                for (const o in i)
                    e[o] = i[o]
        }
        return e
    } else {
        if (nr(t))
            return t;
        if (Bt(t))
            return t
    }
}
const $L = /;(?![^(]*\))/g
  , UL = /:([^]+)/
  , GL = /\/\*[^]*?\*\//g;
function HL(t) {
    const e = {};
    return t.replace(GL, "").split($L).forEach(r => {
        if (r) {
            const n = r.split(UL);
            n.length > 1 && (e[n[0].trim()] = n[1].trim())
        }
    }
    ),
    e
}
function Kf(t) {
    let e = "";
    if (nr(t))
        e = t;
    else if (Ve(t))
        for (let r = 0; r < t.length; r++) {
            const n = Kf(t[r]);
            n && (e += n + " ")
        }
    else if (Bt(t))
        for (const r in t)
            t[r] && (e += r + " ");
    return e.trim()
}
function VL(t) {
    if (!t)
        return null;
    let {class: e, style: r} = t;
    return e && !nr(e) && (t.class = Kf(e)),
    r && (t.style = Xf(r)),
    t
}
const zL = t => nr(t) ? t : t == null ? "" : Ve(t) || Bt(t) && (t.toString === z5 || !He(t.toString)) ? JSON.stringify(t, W5, 2) : String(t)
  , W5 = (t, e) => e && e.__v_isRef ? W5(t, e.value) : H5(e) ? {
    [`Map(${e.size})`]: [...e.entries()].reduce( (r, [n,i]) => (r[`${n} =>`] = i,
    r), {})
} : V5(e) ? {
    [`Set(${e.size})`]: [...e.values()]
} : Bt(e) && !Ve(e) && !j5(e) ? String(e) : e
  , sl = [];
function S0(t) {
    sl.push(t)
}
function T0() {
    sl.pop()
}
function ue(t, ...e) {
    Nl();
    const r = sl.length ? sl[sl.length - 1].component : null
      , n = r && r.appContext.config.warnHandler
      , i = jL();
    if (n)
        xo(n, r, 11, [t + e.join(""), r && r.proxy, i.map( ({vnode: o}) => `at <${Np(r, o.type)}>`).join(`
`), i]);
    else {
        const o = [`[Vue warn]: ${t}`, ...e];
        i.length && o.push(`
`, ...WL(i)),
        console.warn(...o)
    }
    Ll()
}
function jL() {
    let t = sl[sl.length - 1];
    if (!t)
        return [];
    const e = [];
    for (; t; ) {
        const r = e[0];
        r && r.vnode === t ? r.recurseCount++ : e.push({
            vnode: t,
            recurseCount: 0
        });
        const n = t.component && t.component.parent;
        t = n && n.vnode
    }
    return e
}
function WL(t) {
    const e = [];
    return t.forEach( (r, n) => {
        e.push(...n === 0 ? [] : [`
`], ...YL(r))
    }
    ),
    e
}
function YL({vnode: t, recurseCount: e}) {
    const r = e > 0 ? `... (${e} recursive calls)` : ""
      , n = t.component ? t.component.parent == null : !1
      , i = ` at <${Np(t.component, t.type, n)}`
      , o = ">" + r;
    return t.props ? [i, ...XL(t.props), o] : [i + o]
}
function XL(t) {
    const e = []
      , r = Object.keys(t);
    return r.slice(0, 3).forEach(n => {
        e.push(...Y5(n, t[n]))
    }
    ),
    r.length > 3 && e.push(" ..."),
    e
}
function Y5(t, e, r) {
    return nr(e) ? (e = JSON.stringify(e),
    r ? e : [`${t}=${e}`]) : typeof e == "number" || typeof e == "boolean" || e == null ? r ? e : [`${t}=${e}`] : xt(e) ? (e = Y5(t, Le(e.value), !0),
    r ? e : [`${t}=Ref<`, e, ">"]) : He(e) ? [`${t}=fn${e.name ? `<${e.name}>` : ""}`] : (e = Le(e),
    r ? e : [`${t}=`, e])
}
function C_(t, e) {
    t !== void 0 && (typeof t != "number" ? ue(`${e} is not a valid number - got ${JSON.stringify(t)}.`) : isNaN(t) && ue(`${e} is NaN - the duration expression might be incorrect.`))
}
const A_ = {
    sp: "serverPrefetch hook",
    bc: "beforeCreate hook",
    c: "created hook",
    bm: "beforeMount hook",
    m: "mounted hook",
    bu: "beforeUpdate hook",
    u: "updated",
    bum: "beforeUnmount hook",
    um: "unmounted hook",
    a: "activated hook",
    da: "deactivated hook",
    ec: "errorCaptured hook",
    rtc: "renderTracked hook",
    rtg: "renderTriggered hook",
    0: "setup function",
    1: "render function",
    2: "watcher getter",
    3: "watcher callback",
    4: "watcher cleanup function",
    5: "native event handler",
    6: "component event handler",
    7: "vnode hook",
    8: "directive hook",
    9: "transition hook",
    10: "app errorHandler",
    11: "app warnHandler",
    12: "ref function",
    13: "async component loader",
    14: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
};
function xo(t, e, r, n) {
    let i;
    try {
        i = n ? t(...n) : t()
    } catch (o) {
        Ul(o, e, r)
    }
    return i
}
function jn(t, e, r, n) {
    if (He(t)) {
        const o = xo(t, e, r, n);
        return o && Ap(o) && o.catch(s => {
            Ul(s, e, r)
        }
        ),
        o
    }
    const i = [];
    for (let o = 0; o < t.length; o++)
        i.push(jn(t[o], e, r, n));
    return i
}
function Ul(t, e, r, n=!0) {
    const i = e ? e.vnode : null;
    if (e) {
        let o = e.parent;
        const s = e.proxy
          , a = A_[r];
        for (; o; ) {
            const c = o.ec;
            if (c) {
                for (let u = 0; u < c.length; u++)
                    if (c[u](t, s, a) === !1)
                        return
            }
            o = o.parent
        }
        const l = e.appContext.config.errorHandler;
        if (l) {
            xo(l, null, 10, [t, s, a]);
            return
        }
    }
    KL(t, r, i, n)
}
function KL(t, e, r, n=!0) {
    {
        const i = A_[e];
        if (r && S0(r),
        ue(`Unhandled error${i ? ` during execution of ${i}` : ""}`),
        r && T0(),
        n)
            throw t;
        console.error(t)
    }
}
let of = !1
  , Mv = !1;
const Jr = [];
let lo = 0;
const Mc = [];
let no = null
  , Ms = 0;
const X5 = Promise.resolve();
let w_ = null;
const qL = 100;
function Xe(t) {
    const e = w_ || X5;
    return t ? e.then(this ? t.bind(this) : t) : e
}
function ZL(t) {
    let e = lo + 1
      , r = Jr.length;
    for (; e < r; ) {
        const n = e + r >>> 1;
        sf(Jr[n]) < t ? e = n + 1 : r = n
    }
    return e
}
function qf(t) {
    (!Jr.length || !Jr.includes(t, of && t.allowRecurse ? lo + 1 : lo)) && (t.id == null ? Jr.push(t) : Jr.splice(ZL(t.id), 0, t),
    K5())
}
function K5() {
    !of && !Mv && (Mv = !0,
    w_ = X5.then(q5))
}
function JL(t) {
    const e = Jr.indexOf(t);
    e > lo && Jr.splice(e, 1)
}
function Bp(t) {
    Ve(t) ? Mc.push(...t) : (!no || !no.includes(t, t.allowRecurse ? Ms + 1 : Ms)) && Mc.push(t),
    K5()
}
function s8(t, e=of ? lo + 1 : 0) {
    for (t = t || new Map; e < Jr.length; e++) {
        const r = Jr[e];
        if (r && r.pre) {
            if (B_(t, r))
                continue;
            Jr.splice(e, 1),
            e--,
            r()
        }
    }
}
function mx(t) {
    if (Mc.length) {
        const e = [...new Set(Mc)];
        if (Mc.length = 0,
        no) {
            no.push(...e);
            return
        }
        for (no = e,
        t = t || new Map,
        no.sort( (r, n) => sf(r) - sf(n)),
        Ms = 0; Ms < no.length; Ms++)
            B_(t, no[Ms]) || no[Ms]();
        no = null,
        Ms = 0
    }
}
const sf = t => t.id == null ? 1 / 0 : t.id
  , QL = (t, e) => {
    const r = sf(t) - sf(e);
    if (r === 0) {
        if (t.pre && !e.pre)
            return -1;
        if (e.pre && !t.pre)
            return 1
    }
    return r
}
;
function q5(t) {
    Mv = !1,
    of = !0,
    t = t || new Map,
    Jr.sort(QL);
    const e = r => B_(t, r);
    try {
        for (lo = 0; lo < Jr.length; lo++) {
            const r = Jr[lo];
            if (r && r.active !== !1) {
                if (e(r))
                    continue;
                xo(r, null, 14)
            }
        }
    } finally {
        lo = 0,
        Jr.length = 0,
        mx(t),
        of = !1,
        w_ = null,
        (Jr.length || Mc.length) && q5(t)
    }
}
function B_(t, e) {
    if (!t.has(e))
        t.set(e, 1);
    else {
        const r = t.get(e);
        if (r > qL) {
            const n = e.ownerInstance
              , i = n && ff(n.type);
            return ue(`Maximum recursive updates exceeded${i ? ` in component <${i}>` : ""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`),
            !0
        } else
            t.set(e, r + 1)
    }
}
let Js = !1;
const yc = new Set;
gx().__VUE_HMR_RUNTIME__ = {
    createRecord: X1(Z5),
    rerender: X1(r$),
    reload: X1(n$)
};
const gl = new Map;
function e$(t) {
    const e = t.type.__hmrId;
    let r = gl.get(e);
    r || (Z5(e, t.type),
    r = gl.get(e)),
    r.instances.add(t)
}
function t$(t) {
    gl.get(t.type.__hmrId).instances.delete(t)
}
function Z5(t, e) {
    return gl.has(t) ? !1 : (gl.set(t, {
        initialDef: D0(e),
        instances: new Set
    }),
    !0)
}
function D0(t) {
    return GB(t) ? t.__vccOpts : t
}
function r$(t, e) {
    const r = gl.get(t);
    r && (r.initialDef.render = e,
    [...r.instances].forEach(n => {
        e && (n.render = e,
        D0(n.type).render = e),
        n.renderCache = [],
        Js = !0,
        n.update(),
        Js = !1
    }
    ))
}
function n$(t, e) {
    const r = gl.get(t);
    if (!r)
        return;
    e = D0(e),
    a8(r.initialDef, e);
    const n = [...r.instances];
    for (const i of n) {
        const o = D0(i.type);
        yc.has(o) || (o !== r.initialDef && a8(o, e),
        yc.add(o)),
        i.appContext.propsCache.delete(i.type),
        i.appContext.emitsCache.delete(i.type),
        i.appContext.optionsCache.delete(i.type),
        i.ceReload ? (yc.add(o),
        i.ceReload(e.styles),
        yc.delete(o)) : i.parent ? qf(i.parent.update) : i.appContext.reload ? i.appContext.reload() : typeof window < "u" ? window.location.reload() : console.warn("[HMR] Root or manually mounted instance modified. Full reload required.")
    }
    Bp( () => {
        for (const i of n)
            yc.delete(D0(i.type))
    }
    )
}
function a8(t, e) {
    Xt(t, e);
    for (const r in t)
        r !== "__file" && !(r in e) && delete t[r]
}
function X1(t) {
    return (e, r) => {
        try {
            return t(e, r)
        } catch (n) {
            console.error(n),
            console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")
        }
    }
}
let Ti, x0 = [], Nv = !1;
function Zf(t, ...e) {
    Ti ? Ti.emit(t, ...e) : Nv || x0.push({
        event: t,
        args: e
    })
}
function S_(t, e) {
    var r, n;
    Ti = t,
    Ti ? (Ti.enabled = !0,
    x0.forEach( ({event: i, args: o}) => Ti.emit(i, ...o)),
    x0 = []) : typeof window < "u" && window.HTMLElement && !((n = (r = window.navigator) == null ? void 0 : r.userAgent) != null && n.includes("jsdom")) ? ((e.__VUE_DEVTOOLS_HOOK_REPLAY__ = e.__VUE_DEVTOOLS_HOOK_REPLAY__ || []).push(o => {
        S_(o, e)
    }
    ),
    setTimeout( () => {
        Ti || (e.__VUE_DEVTOOLS_HOOK_REPLAY__ = null,
        Nv = !0,
        x0 = [])
    }
    , 3e3)) : (Nv = !0,
    x0 = [])
}
function i$(t, e) {
    Zf("app:init", t, e, {
        Fragment: Nt,
        Text: yo,
        Comment: tr,
        Static: Qs
    })
}
function o$(t) {
    Zf("app:unmount", t)
}
const Lv = T_("component:added")
  , J5 = T_("component:updated")
  , s$ = T_("component:removed")
  , a$ = t => {
    Ti && typeof Ti.cleanupBuffer == "function" && !Ti.cleanupBuffer(t) && s$(t)
}
;
function T_(t) {
    return e => {
        Zf(t, e.appContext.app, e.uid, e.parent ? e.parent.uid : void 0, e)
    }
}
const l$ = Q5("perf:start")
  , c$ = Q5("perf:end");
function Q5(t) {
    return (e, r, n) => {
        Zf(t, e.appContext.app, e.uid, e, r, n)
    }
}
function u$(t, e, r) {
    Zf("component:emit", t.appContext.app, t, e, r)
}
function f$(t, e, ...r) {
    if (t.isUnmounted)
        return;
    const n = t.vnode.props || Ct;
    {
        const {emitsOptions: u, propsOptions: [f]} = t;
        if (u)
            if (!(e in u))
                (!f || !(Wo(e)in f)) && ue(`Component emitted event "${e}" but it is neither declared in the emits option nor as an "${Wo(e)}" prop.`);
            else {
                const d = u[e];
                He(d) && (d(...r) || ue(`Invalid event arguments: event validation failed for event "${e}".`))
            }
    }
    let i = r;
    const o = e.startsWith("update:")
      , s = o && e.slice(7);
    if (s && s in n) {
        const u = `${s === "modelValue" ? "model" : s}Modifiers`
          , {number: f, trim: d} = n[u] || Ct;
        d && (i = r.map(h => nr(h) ? h.trim() : h)),
        f && (i = r.map(RL))
    }
    u$(t, e, i);
    {
        const u = e.toLowerCase();
        u !== e && n[Wo(u)] && ue(`Event "${u}" is emitted in component ${Np(t, t.type)} but the handler is registered for "${e}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${Wc(e)}" instead of "${e}".`)
    }
    let a, l = n[a = Wo(e)] || n[a = Wo(Ui(e))];
    !l && o && (l = n[a = Wo(Wc(e))]),
    l && jn(l, t, 6, i);
    const c = n[a + "Once"];
    if (c) {
        if (!t.emitted)
            t.emitted = {};
        else if (t.emitted[a])
            return;
        t.emitted[a] = !0,
        jn(c, t, 6, i)
    }
}
function eB(t, e, r=!1) {
    const n = e.emitsCache
      , i = n.get(t);
    if (i !== void 0)
        return i;
    const o = t.emits;
    let s = {}
      , a = !1;
    if (!He(t)) {
        const l = c => {
            const u = eB(c, e, !0);
            u && (a = !0,
            Xt(s, u))
        }
        ;
        !r && e.mixins.length && e.mixins.forEach(l),
        t.extends && l(t.extends),
        t.mixins && t.mixins.forEach(l)
    }
    return !o && !a ? (Bt(t) && n.set(t, null),
    null) : (Ve(o) ? o.forEach(l => s[l] = null) : Xt(s, o),
    Bt(t) && n.set(t, s),
    s)
}
function Sp(t, e) {
    return !t || !Wf(e) ? !1 : (e = e.slice(2).replace(/Once$/, ""),
    lt(t, e[0].toLowerCase() + e.slice(1)) || lt(t, Wc(e)) || lt(t, e))
}
let cr = null
  , Tp = null;
function af(t) {
    const e = cr;
    return cr = t,
    Tp = t && t.type.__scopeId || null,
    e
}
function d$(t) {
    Tp = t
}
function h$() {
    Tp = null
}
const x$ = t => D_;
function D_(t, e=cr, r) {
    if (!e || t._n)
        return t;
    const n = (...i) => {
        n._d && Wv(-1);
        const o = af(e);
        let s;
        try {
            s = t(...i)
        } finally {
            af(o),
            n._d && Wv(1)
        }
        return J5(e),
        s
    }
    ;
    return n._n = !0,
    n._c = !0,
    n._d = !0,
    n
}
let $v = !1;
function vx() {
    $v = !0
}
function Lh(t) {
    const {type: e, vnode: r, proxy: n, withProxy: i, props: o, propsOptions: [s], slots: a, attrs: l, emit: c, render: u, renderCache: f, data: d, setupState: h, ctx: x, inheritAttrs: y} = t;
    let m, E;
    const g = af(t);
    $v = !1;
    try {
        if (r.shapeFlag & 4) {
            const _ = i || n;
            m = wn(u.call(_, _, f, o, h, d, x)),
            E = l
        } else {
            const _ = e;
            l === o && vx(),
            m = wn(_.length > 1 ? _(o, {
                get attrs() {
                    return vx(),
                    l
                },
                slots: a,
                emit: c
            }) : _(o, null)),
            E = e.props ? l : g$(l)
        }
    } catch (_) {
        P0.length = 0,
        Ul(_, t, 1),
        m = O(tr)
    }
    let p = m, v;
    if (m.patchFlag > 0 && m.patchFlag & 2048 && ([p,v] = p$(m)),
    E && y !== !1) {
        const _ = Object.keys(E)
          , {shapeFlag: b} = p;
        if (_.length) {
            if (b & 7)
                s && _.some(Ov) && (E = m$(E, s)),
                p = Ei(p, E);
            else if (!$v && p.type !== tr) {
                const C = Object.keys(l)
                  , w = []
                  , T = [];
                for (let A = 0, B = C.length; A < B; A++) {
                    const S = C[A];
                    Wf(S) ? Ov(S) || w.push(S[2].toLowerCase() + S.slice(3)) : T.push(S)
                }
                T.length && ue(`Extraneous non-props attributes (${T.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),
                w.length && ue(`Extraneous non-emits event listeners (${w.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`)
            }
        }
    }
    return r.dirs && (l8(p) || ue("Runtime directive used on component with non-element root node. The directives will not function as intended."),
    p = Ei(p),
    p.dirs = p.dirs ? p.dirs.concat(r.dirs) : r.dirs),
    r.transition && (l8(p) || ue("Component inside <Transition> renders non-element root node that cannot be animated."),
    p.transition = r.transition),
    v ? v(p) : m = p,
    af(g),
    m
}
const p$ = t => {
    const e = t.children
      , r = t.dynamicChildren
      , n = F_(e);
    if (!n)
        return [t, void 0];
    const i = e.indexOf(n)
      , o = r ? r.indexOf(n) : -1
      , s = a => {
        e[i] = a,
        r && (o > -1 ? r[o] = a : a.patchFlag > 0 && (t.dynamicChildren = [...r, a]))
    }
    ;
    return [wn(n), s]
}
;
function F_(t) {
    let e;
    for (let r = 0; r < t.length; r++) {
        const n = t[r];
        if (Eo(n)) {
            if (n.type !== tr || n.children === "v-if") {
                if (e)
                    return;
                e = n
            }
        } else
            return
    }
    return e
}
const g$ = t => {
    let e;
    for (const r in t)
        (r === "class" || r === "style" || Wf(r)) && ((e || (e = {}))[r] = t[r]);
    return e
}
  , m$ = (t, e) => {
    const r = {};
    for (const n in t)
        (!Ov(n) || !(n.slice(9)in e)) && (r[n] = t[n]);
    return r
}
  , l8 = t => t.shapeFlag & 7 || t.type === tr;
function v$(t, e, r) {
    const {props: n, children: i, component: o} = t
      , {props: s, children: a, patchFlag: l} = e
      , c = o.emitsOptions;
    if ((i || a) && Js || e.dirs || e.transition)
        return !0;
    if (r && l >= 0) {
        if (l & 1024)
            return !0;
        if (l & 16)
            return n ? c8(n, s, c) : !!s;
        if (l & 8) {
            const u = e.dynamicProps;
            for (let f = 0; f < u.length; f++) {
                const d = u[f];
                if (s[d] !== n[d] && !Sp(c, d))
                    return !0
            }
        }
    } else
        return (i || a) && (!a || !a.$stable) ? !0 : n === s ? !1 : n ? s ? c8(n, s, c) : !0 : !!s;
    return !1
}
function c8(t, e, r) {
    const n = Object.keys(e);
    if (n.length !== Object.keys(t).length)
        return !0;
    for (let i = 0; i < n.length; i++) {
        const o = n[i];
        if (e[o] !== t[o] && !Sp(r, o))
            return !0
    }
    return !1
}
function P_({vnode: t, parent: e}, r) {
    for (; e && e.subTree === t; )
        (t = e.vnode).el = r,
        e = e.parent
}
const tB = t => t.__isSuspense
  , y$ = {
    name: "Suspense",
    __isSuspense: !0,
    process(t, e, r, n, i, o, s, a, l, c) {
        t == null ? _$(e, r, n, i, o, s, a, l, c) : b$(t, e, r, n, i, s, a, l, c)
    },
    hydrate: C$,
    create: I_,
    normalize: A$
}
  , E$ = y$;
function lf(t, e) {
    const r = t.props && t.props[e];
    He(r) && r()
}
function _$(t, e, r, n, i, o, s, a, l) {
    const {p: c, o: {createElement: u}} = l
      , f = u("div")
      , d = t.suspense = I_(t, i, n, e, f, r, o, s, a, l);
    c(null, d.pendingBranch = t.ssContent, f, null, n, d, o, s),
    d.deps > 0 ? (lf(t, "onPending"),
    lf(t, "onFallback"),
    c(null, t.ssFallback, e, r, n, null, o, s),
    Nc(d, t.ssFallback)) : d.resolve(!1, !0)
}
function b$(t, e, r, n, i, o, s, a, {p: l, um: c, o: {createElement: u}}) {
    const f = e.suspense = t.suspense;
    f.vnode = e,
    e.el = t.el;
    const d = e.ssContent
      , h = e.ssFallback
      , {activeBranch: x, pendingBranch: y, isInFallback: m, isHydrating: E} = f;
    if (y)
        f.pendingBranch = d,
        Di(d, y) ? (l(y, d, f.hiddenContainer, null, i, f, o, s, a),
        f.deps <= 0 ? f.resolve() : m && (l(x, h, r, n, i, null, o, s, a),
        Nc(f, h))) : (f.pendingId++,
        E ? (f.isHydrating = !1,
        f.activeBranch = y) : c(y, i, f),
        f.deps = 0,
        f.effects.length = 0,
        f.hiddenContainer = u("div"),
        m ? (l(null, d, f.hiddenContainer, null, i, f, o, s, a),
        f.deps <= 0 ? f.resolve() : (l(x, h, r, n, i, null, o, s, a),
        Nc(f, h))) : x && Di(d, x) ? (l(x, d, r, n, i, f, o, s, a),
        f.resolve(!0)) : (l(null, d, f.hiddenContainer, null, i, f, o, s, a),
        f.deps <= 0 && f.resolve()));
    else if (x && Di(d, x))
        l(x, d, r, n, i, f, o, s, a),
        Nc(f, d);
    else if (lf(e, "onPending"),
    f.pendingBranch = d,
    f.pendingId++,
    l(null, d, f.hiddenContainer, null, i, f, o, s, a),
    f.deps <= 0)
        f.resolve();
    else {
        const {timeout: g, pendingId: p} = f;
        g > 0 ? setTimeout( () => {
            f.pendingId === p && f.fallback(h)
        }
        , g) : g === 0 && f.fallback(h)
    }
}
let u8 = !1;
function I_(t, e, r, n, i, o, s, a, l, c, u=!1) {
    u8 || (u8 = !0,
    console[console.info ? "info" : "log"]("<Suspense> is an experimental feature and its API will likely change."));
    const {p: f, m: d, um: h, n: x, o: {parentNode: y, remove: m}} = c;
    let E;
    const g = w$(t);
    g && e != null && e.pendingBranch && (E = e.pendingId,
    e.deps++);
    const p = t.props ? ML(t.props.timeout) : void 0;
    C_(p, "Suspense timeout");
    const v = {
        vnode: t,
        parent: e,
        parentComponent: r,
        isSVG: s,
        container: n,
        hiddenContainer: i,
        anchor: o,
        deps: 0,
        pendingId: 0,
        timeout: typeof p == "number" ? p : -1,
        activeBranch: null,
        pendingBranch: null,
        isInFallback: !0,
        isHydrating: u,
        isUnmounted: !1,
        effects: [],
        resolve(_=!1, b=!1) {
            {
                if (!_ && !v.pendingBranch)
                    throw new Error("suspense.resolve() is called without a pending branch.");
                if (v.isUnmounted)
                    throw new Error("suspense.resolve() is called on an already unmounted suspense boundary.")
            }
            const {vnode: C, activeBranch: w, pendingBranch: T, pendingId: A, effects: B, parentComponent: S, container: D} = v;
            if (v.isHydrating)
                v.isHydrating = !1;
            else if (!_) {
                const P = w && T.transition && T.transition.mode === "out-in";
                P && (w.transition.afterLeave = () => {
                    A === v.pendingId && d(T, D, N, 0)
                }
                );
                let {anchor: N} = v;
                w && (N = x(w),
                h(w, S, v, !0)),
                P || d(T, D, N, 0)
            }
            Nc(v, T),
            v.pendingBranch = null,
            v.isInFallback = !1;
            let F = v.parent
              , R = !1;
            for (; F; ) {
                if (F.pendingBranch) {
                    F.effects.push(...B),
                    R = !0;
                    break
                }
                F = F.parent
            }
            R || Bp(B),
            v.effects = [],
            g && e && e.pendingBranch && E === e.pendingId && (e.deps--,
            e.deps === 0 && !b && e.resolve()),
            lf(C, "onResolve")
        },
        fallback(_) {
            if (!v.pendingBranch)
                return;
            const {vnode: b, activeBranch: C, parentComponent: w, container: T, isSVG: A} = v;
            lf(b, "onFallback");
            const B = x(C)
              , S = () => {
                v.isInFallback && (f(null, _, T, B, w, null, A, a, l),
                Nc(v, _))
            }
              , D = _.transition && _.transition.mode === "out-in";
            D && (C.transition.afterLeave = S),
            v.isInFallback = !0,
            h(C, w, null, !0),
            D || S()
        },
        move(_, b, C) {
            v.activeBranch && d(v.activeBranch, _, b, C),
            v.container = _
        },
        next() {
            return v.activeBranch && x(v.activeBranch)
        },
        registerDep(_, b) {
            const C = !!v.pendingBranch;
            C && v.deps++;
            const w = _.vnode.el;
            _.asyncDep.catch(T => {
                Ul(T, _, 0)
            }
            ).then(T => {
                if (_.isUnmounted || v.isUnmounted || v.pendingId !== _.suspenseId)
                    return;
                _.asyncResolved = !0;
                const {vnode: A} = _;
                S0(A),
                Kv(_, T, !1),
                w && (A.el = w);
                const B = !w && _.subTree.el;
                b(_, A, y(w || _.subTree.el), w ? null : x(_.subTree), v, s, l),
                B && m(B),
                P_(_, A.el),
                T0(),
                C && --v.deps === 0 && v.resolve()
            }
            )
        },
        unmount(_, b) {
            v.isUnmounted = !0,
            v.activeBranch && h(v.activeBranch, r, _, b),
            v.pendingBranch && h(v.pendingBranch, r, _, b)
        }
    };
    return v
}
function C$(t, e, r, n, i, o, s, a, l) {
    const c = e.suspense = I_(e, n, r, t.parentNode, document.createElement("div"), null, i, o, s, a, !0)
      , u = l(t, c.pendingBranch = e.ssContent, r, c, o, s);
    return c.deps === 0 && c.resolve(!1, !0),
    u
}
function A$(t) {
    const {shapeFlag: e, children: r} = t
      , n = e & 32;
    t.ssContent = f8(n ? r.default : r),
    t.ssFallback = n ? f8(r.fallback) : O(tr)
}
function f8(t) {
    let e;
    if (He(t)) {
        const r = vl && t._c;
        r && (t._d = !1,
        Op()),
        t = t(),
        r && (t._d = !0,
        e = Dn,
        PB())
    }
    if (Ve(t)) {
        const r = F_(t);
        r || ue("<Suspense> slots expect a single root node."),
        t = r
    }
    return t = wn(t),
    e && !t.dynamicChildren && (t.dynamicChildren = e.filter(r => r !== t)),
    t
}
function rB(t, e) {
    e && e.pendingBranch ? Ve(t) ? e.effects.push(...t) : e.effects.push(t) : Bp(t)
}
function Nc(t, e) {
    t.activeBranch = e;
    const {vnode: r, parentComponent: n} = t
      , i = r.el = e.el;
    n && n.subTree === r && (n.vnode.el = i,
    P_(n, i))
}
function w$(t) {
    var e;
    return ((e = t.props) == null ? void 0 : e.suspensible) != null && t.props.suspensible !== !1
}
function Au(t, e) {
    return Jf(t, null, e)
}
function nB(t, e) {
    return Jf(t, null, Xt({}, e, {
        flush: "post"
    }))
}
function B$(t, e) {
    return Jf(t, null, Xt({}, e, {
        flush: "sync"
    }))
}
const Rd = {};
function me(t, e, r) {
    return He(e) || ue("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),
    Jf(t, e, r)
}
function Jf(t, e, {immediate: r, deep: n, flush: i, onTrack: o, onTrigger: s}=Ct) {
    var a;
    e || (r !== void 0 && ue('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),
    n !== void 0 && ue('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'));
    const l = _ => {
        ue("Invalid watch source: ", _, "A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")
    }
      , c = Vf() === ((a = lr) == null ? void 0 : a.scope) ? lr : null;
    let u, f = !1, d = !1;
    if (xt(t) ? (u = () => t.value,
    f = tf(t)) : Ni(t) ? (u = () => t,
    n = !0) : Ve(t) ? (d = !0,
    f = t.some(_ => Ni(_) || tf(_)),
    u = () => t.map(_ => {
        if (xt(_))
            return _.value;
        if (Ni(_))
            return Xa(_);
        if (He(_))
            return xo(_, c, 2);
        l(_)
    }
    )) : He(t) ? e ? u = () => xo(t, c, 2) : u = () => {
        if (!(c && c.isUnmounted))
            return h && h(),
            jn(t, c, 3, [x])
    }
    : (u = Tn,
    l(t)),
    e && n) {
        const _ = u;
        u = () => Xa(_())
    }
    let h, x = _ => {
        h = p.onStop = () => {
            xo(_, c, 4)
        }
    }
    , y;
    if (Kc)
        if (x = Tn,
        e ? r && jn(e, c, 3, [u(), d ? [] : void 0, x]) : u(),
        i === "sync") {
            const _ = VB();
            y = _.__watcherHandles || (_.__watcherHandles = [])
        } else
            return Tn;
    let m = d ? new Array(t.length).fill(Rd) : Rd;
    const E = () => {
        if (p.active)
            if (e) {
                const _ = p.run();
                (n || f || (d ? _.some( (b, C) => kv(b, m[C])) : kv(_, m))) && (h && h(),
                jn(e, c, 3, [_, m === Rd ? void 0 : d && m[0] === Rd ? [] : m, x]),
                m = _)
            } else
                p.run()
    }
    ;
    E.allowRecurse = !!e;
    let g;
    i === "sync" ? g = E : i === "post" ? g = () => Ur(E, c && c.suspense) : (E.pre = !0,
    c && (E.id = c.uid),
    g = () => qf(E));
    const p = new zf(u,g);
    p.onTrack = o,
    p.onTrigger = s,
    e ? r ? E() : m = p.run() : i === "post" ? Ur(p.run.bind(p), c && c.suspense) : p.run();
    const v = () => {
        p.stop(),
        c && c.scope && b_(c.scope.effects, p)
    }
    ;
    return y && y.push(v),
    v
}
function S$(t, e, r) {
    const n = this.proxy
      , i = nr(t) ? t.includes(".") ? iB(n, t) : () => n[t] : t.bind(n, n);
    let o;
    He(e) ? o = e : (o = e.handler,
    r = e);
    const s = lr;
    aa(this);
    const a = Jf(i, o.bind(n), r);
    return s ? aa(s) : ea(),
    a
}
function iB(t, e) {
    const r = e.split(".");
    return () => {
        let n = t;
        for (let i = 0; i < r.length && n; i++)
            n = n[r[i]];
        return n
    }
}
function Xa(t, e) {
    if (!Bt(t) || t.__v_skip || (e = e || new Set,
    e.has(t)))
        return t;
    if (e.add(t),
    xt(t))
        Xa(t.value, e);
    else if (Ve(t))
        for (let r = 0; r < t.length; r++)
            Xa(t[r], e);
    else if (V5(t) || H5(t))
        t.forEach(r => {
            Xa(r, e)
        }
        );
    else if (j5(t))
        for (const r in t)
            Xa(t[r], e);
    return t
}
function oB(t) {
    IL(t) && ue("Do not use built-in directive ids as custom directive id: " + t)
}
function hi(t, e) {
    const r = cr;
    if (r === null)
        return ue("withDirectives can only be used inside render functions."),
        t;
    const n = Mp(r) || r.proxy
      , i = t.dirs || (t.dirs = []);
    for (let o = 0; o < e.length; o++) {
        let[s,a,l,c=Ct] = e[o];
        s && (He(s) && (s = {
            mounted: s,
            updated: s
        }),
        s.deep && Xa(a),
        i.push({
            dir: s,
            instance: n,
            value: a,
            oldValue: void 0,
            arg: l,
            modifiers: c
        }))
    }
    return t
}
function oo(t, e, r, n) {
    const i = t.dirs
      , o = e && e.dirs;
    for (let s = 0; s < i.length; s++) {
        const a = i[s];
        o && (a.oldValue = o[s].value);
        let l = a.dir[n];
        l && (Nl(),
        jn(l, r, 8, [t.el, a, t, e]),
        Ll())
    }
}
function O_() {
    const t = {
        isMounted: !1,
        isLeaving: !1,
        isUnmounting: !1,
        leavingVNodes: new Map
    };
    return Ht( () => {
        t.isMounted = !0
    }
    ),
    Zn( () => {
        t.isUnmounting = !0
    }
    ),
    t
}
const ti = [Function, Array]
  , k_ = {
    mode: String,
    appear: Boolean,
    persisted: Boolean,
    onBeforeEnter: ti,
    onEnter: ti,
    onAfterEnter: ti,
    onEnterCancelled: ti,
    onBeforeLeave: ti,
    onLeave: ti,
    onAfterLeave: ti,
    onLeaveCancelled: ti,
    onBeforeAppear: ti,
    onAppear: ti,
    onAfterAppear: ti,
    onAppearCancelled: ti
}
  , T$ = {
    name: "BaseTransition",
    props: k_,
    setup(t, {slots: e}) {
        const r = Ot()
          , n = O_();
        let i;
        return () => {
            const o = e.default && Dp(e.default(), !0);
            if (!o || !o.length)
                return;
            let s = o[0];
            if (o.length > 1) {
                let y = !1;
                for (const m of o)
                    if (m.type !== tr) {
                        if (y) {
                            ue("<transition> can only be used on a single element or component. Use <transition-group> for lists.");
                            break
                        }
                        s = m,
                        y = !0
                    }
            }
            const a = Le(t)
              , {mode: l} = a;
            if (l && l !== "in-out" && l !== "out-in" && l !== "default" && ue(`invalid <transition> mode: ${l}`),
            n.isLeaving)
                return K1(s);
            const c = d8(s);
            if (!c)
                return K1(s);
            const u = Xc(c, a, n, r);
            ml(c, u);
            const f = r.subTree
              , d = f && d8(f);
            let h = !1;
            const {getTransitionKey: x} = c.type;
            if (x) {
                const y = x();
                i === void 0 ? i = y : y !== i && (i = y,
                h = !0)
            }
            if (d && d.type !== tr && (!Di(c, d) || h)) {
                const y = Xc(d, a, n, r);
                if (ml(d, y),
                l === "out-in")
                    return n.isLeaving = !0,
                    y.afterLeave = () => {
                        n.isLeaving = !1,
                        r.update.active !== !1 && r.update()
                    }
                    ,
                    K1(s);
                l === "in-out" && c.type !== tr && (y.delayLeave = (m, E, g) => {
                    const p = aB(n, d);
                    p[String(d.key)] = d,
                    m._leaveCb = () => {
                        E(),
                        m._leaveCb = void 0,
                        delete u.delayedLeave
                    }
                    ,
                    u.delayedLeave = g
                }
                )
            }
            return s
        }
    }
}
  , sB = T$;
function aB(t, e) {
    const {leavingVNodes: r} = t;
    let n = r.get(e.type);
    return n || (n = Object.create(null),
    r.set(e.type, n)),
    n
}
function Xc(t, e, r, n) {
    const {appear: i, mode: o, persisted: s=!1, onBeforeEnter: a, onEnter: l, onAfterEnter: c, onEnterCancelled: u, onBeforeLeave: f, onLeave: d, onAfterLeave: h, onLeaveCancelled: x, onBeforeAppear: y, onAppear: m, onAfterAppear: E, onAppearCancelled: g} = e
      , p = String(t.key)
      , v = aB(r, t)
      , _ = (w, T) => {
        w && jn(w, n, 9, T)
    }
      , b = (w, T) => {
        const A = T[1];
        _(w, T),
        Ve(w) ? w.every(B => B.length <= 1) && A() : w.length <= 1 && A()
    }
      , C = {
        mode: o,
        persisted: s,
        beforeEnter(w) {
            let T = a;
            if (!r.isMounted)
                if (i)
                    T = y || a;
                else
                    return;
            w._leaveCb && w._leaveCb(!0);
            const A = v[p];
            A && Di(t, A) && A.el._leaveCb && A.el._leaveCb(),
            _(T, [w])
        },
        enter(w) {
            let T = l
              , A = c
              , B = u;
            if (!r.isMounted)
                if (i)
                    T = m || l,
                    A = E || c,
                    B = g || u;
                else
                    return;
            let S = !1;
            const D = w._enterCb = F => {
                S || (S = !0,
                F ? _(B, [w]) : _(A, [w]),
                C.delayedLeave && C.delayedLeave(),
                w._enterCb = void 0)
            }
            ;
            T ? b(T, [w, D]) : D()
        },
        leave(w, T) {
            const A = String(t.key);
            if (w._enterCb && w._enterCb(!0),
            r.isUnmounting)
                return T();
            _(f, [w]);
            let B = !1;
            const S = w._leaveCb = D => {
                B || (B = !0,
                T(),
                D ? _(x, [w]) : _(h, [w]),
                w._leaveCb = void 0,
                v[A] === t && delete v[A])
            }
            ;
            v[A] = t,
            d ? b(d, [w, S]) : S()
        },
        clone(w) {
            return Xc(w, e, r, n)
        }
    };
    return C
}
function K1(t) {
    if (wu(t))
        return t = Ei(t),
        t.children = null,
        t
}
function d8(t) {
    return wu(t) ? t.children ? t.children[0] : void 0 : t
}
function ml(t, e) {
    t.shapeFlag & 6 && t.component ? ml(t.component.subTree, e) : t.shapeFlag & 128 ? (t.ssContent.transition = e.clone(t.ssContent),
    t.ssFallback.transition = e.clone(t.ssFallback)) : t.transition = e
}
function Dp(t, e=!1, r) {
    let n = []
      , i = 0;
    for (let o = 0; o < t.length; o++) {
        let s = t[o];
        const a = r == null ? s.key : String(r) + String(s.key != null ? s.key : o);
        s.type === Nt ? (s.patchFlag & 128 && i++,
        n = n.concat(Dp(s.children, e, a))) : (e || s.type !== tr) && n.push(a != null ? Ei(s, {
            key: a
        }) : s)
    }
    if (i > 1)
        for (let o = 0; o < n.length; o++)
            n[o].patchFlag = -2;
    return n
}
function be(t, e) {
    return He(t) ? ( () => Xt({
        name: t.name
    }, e, {
        setup: t
    }))() : t
}
const al = t => !!t.type.__asyncLoader;
function D$(t) {
    He(t) && (t = {
        loader: t
    });
    const {loader: e, loadingComponent: r, errorComponent: n, delay: i=200, timeout: o, suspensible: s=!0, onError: a} = t;
    let l = null, c, u = 0;
    const f = () => (u++,
    l = null,
    d())
      , d = () => {
        let h;
        return l || (h = l = e().catch(x => {
            if (x = x instanceof Error ? x : new Error(String(x)),
            a)
                return new Promise( (y, m) => {
                    a(x, () => y(f()), () => m(x), u + 1)
                }
                );
            throw x
        }
        ).then(x => {
            if (h !== l && l)
                return l;
            if (x || ue("Async component loader resolved to undefined. If you are using retry(), make sure to return its return value."),
            x && (x.__esModule || x[Symbol.toStringTag] === "Module") && (x = x.default),
            x && !Bt(x) && !He(x))
                throw new Error(`Invalid async component load result: ${x}`);
            return c = x,
            x
        }
        ))
    }
    ;
    return be({
        name: "AsyncComponentWrapper",
        __asyncLoader: d,
        get __asyncResolved() {
            return c
        },
        setup() {
            const h = lr;
            if (c)
                return () => q1(c, h);
            const x = g => {
                l = null,
                Ul(g, h, 13, !n)
            }
            ;
            if (s && h.suspense || Kc)
                return d().then(g => () => q1(g, h)).catch(g => (x(g),
                () => n ? O(n, {
                    error: g
                }) : null));
            const y = ie(!1)
              , m = ie()
              , E = ie(!!i);
            return i && setTimeout( () => {
                E.value = !1
            }
            , i),
            o != null && setTimeout( () => {
                if (!y.value && !m.value) {
                    const g = new Error(`Async component timed out after ${o}ms.`);
                    x(g),
                    m.value = g
                }
            }
            , o),
            d().then( () => {
                y.value = !0,
                h.parent && wu(h.parent.vnode) && qf(h.parent.update)
            }
            ).catch(g => {
                x(g),
                m.value = g
            }
            ),
            () => {
                if (y.value && c)
                    return q1(c, h);
                if (m.value && n)
                    return O(n, {
                        error: m.value
                    });
                if (r && !E.value)
                    return O(r)
            }
        }
    })
}
function q1(t, e) {
    const {ref: r, props: n, children: i, ce: o} = e.vnode
      , s = O(t, n, i);
    return s.ref = r,
    s.ce = o,
    delete e.vnode.ce,
    s
}
const wu = t => t.type.__isKeepAlive
  , F$ = {
    name: "KeepAlive",
    __isKeepAlive: !0,
    props: {
        include: [String, RegExp, Array],
        exclude: [String, RegExp, Array],
        max: [String, Number]
    },
    setup(t, {slots: e}) {
        const r = Ot()
          , n = r.ctx;
        if (!n.renderer)
            return () => {
                const g = e.default && e.default();
                return g && g.length === 1 ? g[0] : g
            }
            ;
        const i = new Map
          , o = new Set;
        let s = null;
        r.__v_cache = i;
        const a = r.suspense
          , {renderer: {p: l, m: c, um: u, o: {createElement: f}}} = n
          , d = f("div");
        n.activate = (g, p, v, _, b) => {
            const C = g.component;
            c(g, p, v, 0, a),
            l(C.vnode, g, p, v, C, a, _, g.slotScopeIds, b),
            Ur( () => {
                C.isDeactivated = !1,
                C.a && za(C.a);
                const w = g.props && g.props.onVnodeMounted;
                w && bn(w, C.parent, g)
            }
            , a),
            Lv(C)
        }
        ,
        n.deactivate = g => {
            const p = g.component;
            c(g, d, null, 1, a),
            Ur( () => {
                p.da && za(p.da);
                const v = g.props && g.props.onVnodeUnmounted;
                v && bn(v, p.parent, g),
                p.isDeactivated = !0
            }
            , a),
            Lv(p)
        }
        ;
        function h(g) {
            Z1(g),
            u(g, r, a, !0)
        }
        function x(g) {
            i.forEach( (p, v) => {
                const _ = ff(p.type);
                _ && (!g || !g(_)) && y(v)
            }
            )
        }
        function y(g) {
            const p = i.get(g);
            !s || !Di(p, s) ? h(p) : s && Z1(s),
            i.delete(g),
            o.delete(g)
        }
        me( () => [t.include, t.exclude], ([g,p]) => {
            g && x(v => p0(g, v)),
            p && x(v => !p0(p, v))
        }
        , {
            flush: "post",
            deep: !0
        });
        let m = null;
        const E = () => {
            m != null && i.set(m, J1(r.subTree))
        }
        ;
        return Ht(E),
        Gl(E),
        Zn( () => {
            i.forEach(g => {
                const {subTree: p, suspense: v} = r
                  , _ = J1(p);
                if (g.type === _.type && g.key === _.key) {
                    Z1(_);
                    const b = _.component.da;
                    b && Ur(b, v);
                    return
                }
                h(g)
            }
            )
        }
        ),
        () => {
            if (m = null,
            !e.default)
                return null;
            const g = e.default()
              , p = g[0];
            if (g.length > 1)
                return ue("KeepAlive should contain exactly one component child."),
                s = null,
                g;
            if (!Eo(p) || !(p.shapeFlag & 4) && !(p.shapeFlag & 128))
                return s = null,
                p;
            let v = J1(p);
            const _ = v.type
              , b = ff(al(v) ? v.type.__asyncResolved || {} : _)
              , {include: C, exclude: w, max: T} = t;
            if (C && (!b || !p0(C, b)) || w && b && p0(w, b))
                return s = v,
                p;
            const A = v.key == null ? _ : v.key
              , B = i.get(A);
            return v.el && (v = Ei(v),
            p.shapeFlag & 128 && (p.ssContent = v)),
            m = A,
            B ? (v.el = B.el,
            v.component = B.component,
            v.transition && ml(v, v.transition),
            v.shapeFlag |= 512,
            o.delete(A),
            o.add(A)) : (o.add(A),
            T && o.size > parseInt(T, 10) && y(o.values().next().value)),
            v.shapeFlag |= 256,
            s = v,
            tB(p.type) ? p : v
        }
    }
}
  , P$ = F$;
function p0(t, e) {
    return Ve(t) ? t.some(r => p0(r, e)) : nr(t) ? t.split(",").includes(e) : FL(t) ? t.test(e) : !1
}
function ys(t, e) {
    lB(t, "a", e)
}
function Fo(t, e) {
    lB(t, "da", e)
}
function lB(t, e, r=lr) {
    const n = t.__wdc || (t.__wdc = () => {
        let i = r;
        for (; i; ) {
            if (i.isDeactivated)
                return;
            i = i.parent
        }
        return t()
    }
    );
    if (Fp(e, n, r),
    r) {
        let i = r.parent;
        for (; i && i.parent; )
            wu(i.parent.vnode) && I$(n, e, r, i),
            i = i.parent
    }
}
function I$(t, e, r, n) {
    const i = Fp(e, t, n, !0);
    _s( () => {
        b_(n[e], i)
    }
    , r)
}
function Z1(t) {
    t.shapeFlag &= -257,
    t.shapeFlag &= -513
}
function J1(t) {
    return t.shapeFlag & 128 ? t.ssContent : t
}
function Fp(t, e, r=lr, n=!1) {
    if (r) {
        const i = r[t] || (r[t] = [])
          , o = e.__weh || (e.__weh = (...s) => {
            if (r.isUnmounted)
                return;
            Nl(),
            aa(r);
            const a = jn(e, r, t, s);
            return ea(),
            Ll(),
            a
        }
        );
        return n ? i.unshift(o) : i.push(o),
        o
    } else {
        const i = Wo(A_[t].replace(/ hook$/, ""));
        ue(`${i} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)
    }
}
const Es = t => (e, r=lr) => (!Kc || t === "sp") && Fp(t, (...n) => e(...n), r)
  , cB = Es("bm")
  , Ht = Es("m")
  , Pp = Es("bu")
  , Gl = Es("u")
  , Zn = Es("bum")
  , _s = Es("um")
  , uB = Es("sp")
  , fB = Es("rtg")
  , dB = Es("rtc");
function hB(t, e=lr) {
    Fp("ec", t, e)
}
const yx = "components"
  , O$ = "directives";
function k$(t, e) {
    return R_(yx, t, !0, e) || t
}
const xB = Symbol.for("v-ndc");
function R$(t) {
    return nr(t) ? R_(yx, t, !1) || t : t || xB
}
function pB(t) {
    return R_(O$, t)
}
function R_(t, e, r=!0, n=!1) {
    const i = cr || lr;
    if (i) {
        const o = i.type;
        if (t === yx) {
            const a = ff(o, !1);
            if (a && (a === e || a === Ui(e) || a === Yc(Ui(e))))
                return o
        }
        const s = h8(i[t] || o[t], e) || h8(i.appContext[t], e);
        if (!s && n)
            return o;
        if (r && !s) {
            const a = t === yx ? `
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : "";
            ue(`Failed to resolve ${t.slice(0, -1)}: ${e}${a}`)
        }
        return s
    } else
        ue(`resolve${Yc(t.slice(0, -1))} can only be used in render() or setup().`)
}
function h8(t, e) {
    return t && (t[e] || t[Ui(e)] || t[Yc(Ui(e))])
}
function M$(t, e, r, n) {
    let i;
    const o = r && r[n];
    if (Ve(t) || nr(t)) {
        i = new Array(t.length);
        for (let s = 0, a = t.length; s < a; s++)
            i[s] = e(t[s], s, void 0, o && o[s])
    } else if (typeof t == "number") {
        Number.isInteger(t) || ue(`The v-for range expect an integer value but got ${t}.`),
        i = new Array(t);
        for (let s = 0; s < t; s++)
            i[s] = e(s + 1, s, void 0, o && o[s])
    } else if (Bt(t))
        if (t[Symbol.iterator])
            i = Array.from(t, (s, a) => e(s, a, void 0, o && o[a]));
        else {
            const s = Object.keys(t);
            i = new Array(s.length);
            for (let a = 0, l = s.length; a < l; a++) {
                const c = s[a];
                i[a] = e(t[c], c, a, o && o[a])
            }
        }
    else
        i = [];
    return r && (r[n] = i),
    i
}
function N$(t, e) {
    for (let r = 0; r < e.length; r++) {
        const n = e[r];
        if (Ve(n))
            for (let i = 0; i < n.length; i++)
                t[n[i].name] = n[i].fn;
        else
            n && (t[n.name] = n.key ? (...i) => {
                const o = n.fn(...i);
                return o && (o.key = n.key),
                o
            }
            : n.fn)
    }
    return t
}
function L$(t, e, r={}, n, i) {
    if (cr.isCE || cr.parent && al(cr.parent) && cr.parent.isCE)
        return e !== "default" && (r.name = e),
        O("slot", r, n && n());
    let o = t[e];
    o && o.length > 1 && (ue("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),
    o = () => []),
    o && o._c && (o._d = !1),
    Op();
    const s = o && gB(o(r))
      , a = $_(Nt, {
        key: r.key || s && s.key || `_${e}`
    }, s || (n ? n() : []), s && t._ === 1 ? 64 : -2);
    return !i && a.scopeId && (a.slotScopeIds = [a.scopeId + "-s"]),
    o && o._c && (o._d = !0),
    a
}
function gB(t) {
    return t.some(e => Eo(e) ? !(e.type === tr || e.type === Nt && !gB(e.children)) : !0) ? t : null
}
function $$(t, e) {
    const r = {};
    if (!Bt(t))
        return ue("v-on with no argument expects an object value."),
        r;
    for (const n in t)
        r[e && /[A-Z]/.test(n) ? `on:${n}` : Wo(n)] = t[n];
    return r
}
const Uv = t => t ? NB(t) ? Mp(t) || t.proxy : Uv(t.parent) : null
  , ll = Xt(Object.create(null), {
    $: t => t,
    $el: t => t.vnode.el,
    $data: t => t.data,
    $props: t => wc(t.props),
    $attrs: t => wc(t.attrs),
    $slots: t => wc(t.slots),
    $refs: t => wc(t.refs),
    $parent: t => Uv(t.parent),
    $root: t => Uv(t.root),
    $emit: t => t.emit,
    $options: t => N_(t),
    $forceUpdate: t => t.f || (t.f = () => qf(t.update)),
    $nextTick: t => t.n || (t.n = Xe.bind(t.proxy)),
    $watch: t => S$.bind(t)
})
  , M_ = t => t === "_" || t === "$"
  , Q1 = (t, e) => t !== Ct && !t.__isScriptSetup && lt(t, e)
  , F0 = {
    get({_: t}, e) {
        const {ctx: r, setupState: n, data: i, props: o, accessCache: s, type: a, appContext: l} = t;
        if (e === "__isVue")
            return !0;
        let c;
        if (e[0] !== "$") {
            const h = s[e];
            if (h !== void 0)
                switch (h) {
                case 1:
                    return n[e];
                case 2:
                    return i[e];
                case 4:
                    return r[e];
                case 3:
                    return o[e]
                }
            else {
                if (Q1(n, e))
                    return s[e] = 1,
                    n[e];
                if (i !== Ct && lt(i, e))
                    return s[e] = 2,
                    i[e];
                if ((c = t.propsOptions[0]) && lt(c, e))
                    return s[e] = 3,
                    o[e];
                if (r !== Ct && lt(r, e))
                    return s[e] = 4,
                    r[e];
                Gv && (s[e] = 0)
            }
        }
        const u = ll[e];
        let f, d;
        if (u)
            return e === "$attrs" ? (rn(t, "get", e),
            vx()) : e === "$slots" && rn(t, "get", e),
            u(t);
        if ((f = a.__cssModules) && (f = f[e]))
            return f;
        if (r !== Ct && lt(r, e))
            return s[e] = 4,
            r[e];
        if (d = l.config.globalProperties,
        lt(d, e))
            return d[e];
        cr && (!nr(e) || e.indexOf("__v") !== 0) && (i !== Ct && M_(e[0]) && lt(i, e) ? ue(`Property ${JSON.stringify(e)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`) : t === cr && ue(`Property ${JSON.stringify(e)} was accessed during render but is not defined on instance.`))
    },
    set({_: t}, e, r) {
        const {data: n, setupState: i, ctx: o} = t;
        return Q1(i, e) ? (i[e] = r,
        !0) : i.__isScriptSetup && lt(i, e) ? (ue(`Cannot mutate <script setup> binding "${e}" from Options API.`),
        !1) : n !== Ct && lt(n, e) ? (n[e] = r,
        !0) : lt(t.props, e) ? (ue(`Attempting to mutate prop "${e}". Props are readonly.`),
        !1) : e[0] === "$" && e.slice(1)in t ? (ue(`Attempting to mutate public property "${e}". Properties starting with $ are reserved and readonly.`),
        !1) : (e in t.appContext.config.globalProperties ? Object.defineProperty(o, e, {
            enumerable: !0,
            configurable: !0,
            value: r
        }) : o[e] = r,
        !0)
    },
    has({_: {data: t, setupState: e, accessCache: r, ctx: n, appContext: i, propsOptions: o}}, s) {
        let a;
        return !!r[s] || t !== Ct && lt(t, s) || Q1(e, s) || (a = o[0]) && lt(a, s) || lt(n, s) || lt(ll, s) || lt(i.config.globalProperties, s)
    },
    defineProperty(t, e, r) {
        return r.get != null ? t._.accessCache[e] = 0 : lt(r, "value") && this.set(t, e, r.value, null),
        Reflect.defineProperty(t, e, r)
    }
};
F0.ownKeys = t => (ue("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),
Reflect.ownKeys(t));
const U$ = Xt({}, F0, {
    get(t, e) {
        if (e !== Symbol.unscopables)
            return F0.get(t, e, t)
    },
    has(t, e) {
        const r = e[0] !== "_" && !LL(e);
        return !r && F0.has(t, e) && ue(`Property ${JSON.stringify(e)} should not start with _ which is a reserved prefix for Vue internals.`),
        r
    }
});
function G$(t) {
    const e = {};
    return Object.defineProperty(e, "_", {
        configurable: !0,
        enumerable: !1,
        get: () => t
    }),
    Object.keys(ll).forEach(r => {
        Object.defineProperty(e, r, {
            configurable: !0,
            enumerable: !1,
            get: () => ll[r](t),
            set: Tn
        })
    }
    ),
    e
}
function H$(t) {
    const {ctx: e, propsOptions: [r]} = t;
    r && Object.keys(r).forEach(n => {
        Object.defineProperty(e, n, {
            enumerable: !0,
            configurable: !0,
            get: () => t.props[n],
            set: Tn
        })
    }
    )
}
function V$(t) {
    const {ctx: e, setupState: r} = t;
    Object.keys(Le(r)).forEach(n => {
        if (!r.__isScriptSetup) {
            if (M_(n[0])) {
                ue(`setup() return property ${JSON.stringify(n)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);
                return
            }
            Object.defineProperty(e, n, {
                enumerable: !0,
                configurable: !0,
                get: () => r[n],
                set: Tn
            })
        }
    }
    )
}
const Hl = t => ue(`${t}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.`);
function z$() {
    return Hl("defineProps"),
    null
}
function j$() {
    return Hl("defineEmits"),
    null
}
function W$(t) {
    Hl("defineExpose")
}
function Y$(t) {
    Hl("defineOptions")
}
function X$() {
    return Hl("defineSlots"),
    null
}
function K$() {
    Hl("defineModel")
}
function q$(t, e) {
    return Hl("withDefaults"),
    null
}
function Z$() {
    return mB().slots
}
function J$() {
    return mB().attrs
}
function Q$(t, e, r) {
    const n = Ot();
    if (!n)
        return ue("useModel() called without active instance."),
        ie();
    if (!n.propsOptions[0][e])
        return ue(`useModel() called with prop "${e}" which is not declared.`),
        ie();
    if (r && r.local) {
        const i = ie(t[e]);
        return me( () => t[e], o => i.value = o),
        me(i, o => {
            o !== t[e] && n.emit(`update:${e}`, o)
        }
        ),
        i
    } else
        return {
            __v_isRef: !0,
            get value() {
                return t[e]
            },
            set value(i) {
                n.emit(`update:${e}`, i)
            }
        }
}
function mB() {
    const t = Ot();
    return t || ue("useContext() called without active instance."),
    t.setupContext || (t.setupContext = UB(t))
}
function cf(t) {
    return Ve(t) ? t.reduce( (e, r) => (e[r] = null,
    e), {}) : t
}
function eU(t, e) {
    const r = cf(t);
    for (const n in e) {
        if (n.startsWith("__skip"))
            continue;
        let i = r[n];
        i ? Ve(i) || He(i) ? i = r[n] = {
            type: i,
            default: e[n]
        } : i.default = e[n] : i === null ? i = r[n] = {
            default: e[n]
        } : ue(`props default key "${n}" has no corresponding declaration.`),
        i && e[`__skip_${n}`] && (i.skipFactory = !0)
    }
    return r
}
function tU(t, e) {
    return !t || !e ? t || e : Ve(t) && Ve(e) ? t.concat(e) : Xt({}, cf(t), cf(e))
}
function rU(t, e) {
    const r = {};
    for (const n in t)
        e.includes(n) || Object.defineProperty(r, n, {
            enumerable: !0,
            get: () => t[n]
        });
    return r
}
function nU(t) {
    const e = Ot();
    e || ue("withAsyncContext called without active current instance. This is likely a bug.");
    let r = t();
    return ea(),
    Ap(r) && (r = r.catch(n => {
        throw aa(e),
        n
    }
    )),
    [r, () => aa(e)]
}
function iU() {
    const t = Object.create(null);
    return (e, r) => {
        t[r] ? ue(`${e} property "${r}" is already defined in ${t[r]}.`) : t[r] = e
    }
}
let Gv = !0;
function oU(t) {
    const e = N_(t)
      , r = t.proxy
      , n = t.ctx;
    Gv = !1,
    e.beforeCreate && x8(e.beforeCreate, t, "bc");
    const {data: i, computed: o, methods: s, watch: a, provide: l, inject: c, created: u, beforeMount: f, mounted: d, beforeUpdate: h, updated: x, activated: y, deactivated: m, beforeDestroy: E, beforeUnmount: g, destroyed: p, unmounted: v, render: _, renderTracked: b, renderTriggered: C, errorCaptured: w, serverPrefetch: T, expose: A, inheritAttrs: B, components: S, directives: D, filters: F} = e
      , R = iU();
    {
        const [N] = t.propsOptions;
        if (N)
            for (const j in N)
                R("Props", j)
    }
    if (c && sU(c, n, R),
    s)
        for (const N in s) {
            const j = s[N];
            He(j) ? (Object.defineProperty(n, N, {
                value: j.bind(r),
                configurable: !0,
                enumerable: !0,
                writable: !0
            }),
            R("Methods", N)) : ue(`Method "${N}" has type "${typeof j}" in the component definition. Did you reference the function correctly?`)
        }
    if (i) {
        He(i) || ue("The data option must be a function. Plain object usage is no longer supported.");
        const N = i.call(r, r);
        if (Ap(N) && ue("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),
        !Bt(N))
            ue("data() should return an object.");
        else {
            t.data = It(N);
            for (const j in N)
                R("Data", j),
                M_(j[0]) || Object.defineProperty(n, j, {
                    configurable: !0,
                    enumerable: !0,
                    get: () => N[j],
                    set: Tn
                })
        }
    }
    if (Gv = !0,
    o)
        for (const N in o) {
            const j = o[N]
              , K = He(j) ? j.bind(r, r) : He(j.get) ? j.get.bind(r, r) : Tn;
            K === Tn && ue(`Computed property "${N}" has no getter.`);
            const oe = !He(j) && He(j.set) ? j.set.bind(r) : () => {
                ue(`Write operation failed: computed property "${N}" is readonly.`)
            }
              , U = ae({
                get: K,
                set: oe
            });
            Object.defineProperty(n, N, {
                enumerable: !0,
                configurable: !0,
                get: () => U.value,
                set: $ => U.value = $
            }),
            R("Computed", N)
        }
    if (a)
        for (const N in a)
            vB(a[N], n, r, N);
    if (l) {
        const N = He(l) ? l.call(r) : l;
        Reflect.ownKeys(N).forEach(j => {
            xi(j, N[j])
        }
        )
    }
    u && x8(u, t, "c");
    function P(N, j) {
        Ve(j) ? j.forEach(K => N(K.bind(r))) : j && N(j.bind(r))
    }
    if (P(cB, f),
    P(Ht, d),
    P(Pp, h),
    P(Gl, x),
    P(ys, y),
    P(Fo, m),
    P(hB, w),
    P(dB, b),
    P(fB, C),
    P(Zn, g),
    P(_s, v),
    P(uB, T),
    Ve(A))
        if (A.length) {
            const N = t.exposed || (t.exposed = {});
            A.forEach(j => {
                Object.defineProperty(N, j, {
                    get: () => r[j],
                    set: K => r[j] = K
                })
            }
            )
        } else
            t.exposed || (t.exposed = {});
    _ && t.render === Tn && (t.render = _),
    B != null && (t.inheritAttrs = B),
    S && (t.components = S),
    D && (t.directives = D)
}
function sU(t, e, r=Tn) {
    Ve(t) && (t = Hv(t));
    for (const n in t) {
        const i = t[n];
        let o;
        Bt(i) ? "default"in i ? o = dr(i.from || n, i.default, !0) : o = dr(i.from || n) : o = dr(i),
        xt(o) ? Object.defineProperty(e, n, {
            enumerable: !0,
            configurable: !0,
            get: () => o.value,
            set: s => o.value = s
        }) : e[n] = o,
        r("Inject", n)
    }
}
function x8(t, e, r) {
    jn(Ve(t) ? t.map(n => n.bind(e.proxy)) : t.bind(e.proxy), e, r)
}
function vB(t, e, r, n) {
    const i = n.includes(".") ? iB(r, n) : () => r[n];
    if (nr(t)) {
        const o = e[t];
        He(o) ? me(i, o) : ue(`Invalid watch handler specified by key "${t}"`, o)
    } else if (He(t))
        me(i, t.bind(r));
    else if (Bt(t))
        if (Ve(t))
            t.forEach(o => vB(o, e, r, n));
        else {
            const o = He(t.handler) ? t.handler.bind(r) : e[t.handler];
            He(o) ? me(i, o, t) : ue(`Invalid watch handler specified by key "${t.handler}"`, o)
        }
    else
        ue(`Invalid watch option: "${n}"`, t)
}
function N_(t) {
    const e = t.type
      , {mixins: r, extends: n} = e
      , {mixins: i, optionsCache: o, config: {optionMergeStrategies: s}} = t.appContext
      , a = o.get(e);
    let l;
    return a ? l = a : !i.length && !r && !n ? l = e : (l = {},
    i.length && i.forEach(c => Ex(l, c, s, !0)),
    Ex(l, e, s)),
    Bt(e) && o.set(e, l),
    l
}
function Ex(t, e, r, n=!1) {
    const {mixins: i, extends: o} = e;
    o && Ex(t, o, r, !0),
    i && i.forEach(s => Ex(t, s, r, !0));
    for (const s in e)
        if (n && s === "expose")
            ue('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');
        else {
            const a = aU[s] || r && r[s];
            t[s] = a ? a(t[s], e[s]) : e[s]
        }
    return t
}
const aU = {
    data: p8,
    props: g8,
    emits: g8,
    methods: g0,
    computed: g0,
    beforeCreate: ln,
    created: ln,
    beforeMount: ln,
    mounted: ln,
    beforeUpdate: ln,
    updated: ln,
    beforeDestroy: ln,
    beforeUnmount: ln,
    destroyed: ln,
    unmounted: ln,
    activated: ln,
    deactivated: ln,
    errorCaptured: ln,
    serverPrefetch: ln,
    components: g0,
    directives: g0,
    watch: cU,
    provide: p8,
    inject: lU
};
function p8(t, e) {
    return e ? t ? function() {
        return Xt(He(t) ? t.call(this, this) : t, He(e) ? e.call(this, this) : e)
    }
    : e : t
}
function lU(t, e) {
    return g0(Hv(t), Hv(e))
}
function Hv(t) {
    if (Ve(t)) {
        const e = {};
        for (let r = 0; r < t.length; r++)
            e[t[r]] = t[r];
        return e
    }
    return t
}
function ln(t, e) {
    return t ? [...new Set([].concat(t, e))] : e
}
function g0(t, e) {
    return t ? Xt(Object.create(null), t, e) : e
}
function g8(t, e) {
    return t ? Ve(t) && Ve(e) ? [...new Set([...t, ...e])] : Xt(Object.create(null), cf(t), cf(e ?? {})) : e
}
function cU(t, e) {
    if (!t)
        return e;
    if (!e)
        return t;
    const r = Xt(Object.create(null), t);
    for (const n in e)
        r[n] = ln(t[n], e[n]);
    return r
}
function yB() {
    return {
        app: null,
        config: {
            isNativeTag: G5,
            performance: !1,
            globalProperties: {},
            optionMergeStrategies: {},
            errorHandler: void 0,
            warnHandler: void 0,
            compilerOptions: {}
        },
        mixins: [],
        components: {},
        directives: {},
        provides: Object.create(null),
        optionsCache: new WeakMap,
        propsCache: new WeakMap,
        emitsCache: new WeakMap
    }
}
let uU = 0;
function fU(t, e) {
    return function(n, i=null) {
        He(n) || (n = Xt({}, n)),
        i != null && !Bt(i) && (ue("root props passed to app.mount() must be an object."),
        i = null);
        const o = yB();
        Object.defineProperty(o.config, "unwrapInjectedRef", {
            get() {
                return !0
            },
            set() {
                ue("app.config.unwrapInjectedRef has been deprecated. 3.3 now alawys unwraps injected refs in Options API.")
            }
        });
        const s = new Set;
        let a = !1;
        const l = o.app = {
            _uid: uU++,
            _component: n,
            _props: i,
            _container: null,
            _context: o,
            _instance: null,
            version: Zv,
            get config() {
                return o.config
            },
            set config(c) {
                ue("app.config cannot be replaced. Modify individual options instead.")
            },
            use(c, ...u) {
                return s.has(c) ? ue("Plugin has already been applied to target app.") : c && He(c.install) ? (s.add(c),
                c.install(l, ...u)) : He(c) ? (s.add(c),
                c(l, ...u)) : ue('A plugin must either be a function or an object with an "install" function.'),
                l
            },
            mixin(c) {
                return o.mixins.includes(c) ? ue("Mixin has already been applied to target app" + (c.name ? `: ${c.name}` : "")) : o.mixins.push(c),
                l
            },
            component(c, u) {
                return Xv(c, o.config),
                u ? (o.components[c] && ue(`Component "${c}" has already been registered in target app.`),
                o.components[c] = u,
                l) : o.components[c]
            },
            directive(c, u) {
                return oB(c),
                u ? (o.directives[c] && ue(`Directive "${c}" has already been registered in target app.`),
                o.directives[c] = u,
                l) : o.directives[c]
            },
            mount(c, u, f) {
                if (a)
                    ue("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");
                else {
                    c.__vue_app__ && ue("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");
                    const d = O(n, i);
                    return d.appContext = o,
                    o.reload = () => {
                        t(Ei(d), c, f)
                    }
                    ,
                    u && e ? e(d, c) : t(d, c, f),
                    a = !0,
                    l._container = c,
                    c.__vue_app__ = l,
                    l._instance = d.component,
                    i$(l, Zv),
                    Mp(d.component) || d.component.proxy
                }
            },
            unmount() {
                a ? (t(null, l._container),
                l._instance = null,
                o$(l),
                delete l._container.__vue_app__) : ue("Cannot unmount an app that is not mounted.")
            },
            provide(c, u) {
                return c in o.provides && ue(`App already provides property with key "${String(c)}". It will be overwritten with the new value.`),
                o.provides[c] = u,
                l
            },
            runWithContext(c) {
                uf = l;
                try {
                    return c()
                } finally {
                    uf = null
                }
            }
        };
        return l
    }
}
let uf = null;
function xi(t, e) {
    if (!lr)
        ue("provide() can only be used inside setup().");
    else {
        let r = lr.provides;
        const n = lr.parent && lr.parent.provides;
        n === r && (r = lr.provides = Object.create(n)),
        r[t] = e
    }
}
function dr(t, e, r=!1) {
    const n = lr || cr;
    if (n || uf) {
        const i = n ? n.parent == null ? n.vnode.appContext && n.vnode.appContext.provides : n.parent.provides : uf._context.provides;
        if (i && t in i)
            return i[t];
        if (arguments.length > 1)
            return r && He(e) ? e.call(n && n.proxy) : e;
        ue(`injection "${String(t)}" not found.`)
    } else
        ue("inject() can only be used inside setup() or functional components.")
}
function EB() {
    return !!(lr || cr || uf)
}
function dU(t, e, r, n=!1) {
    const i = {}
      , o = {};
    Rv(o, kp, 1),
    t.propsDefaults = Object.create(null),
    _B(t, e, i, o);
    for (const s in t.propsOptions[0])
        s in i || (i[s] = void 0);
    CB(e || {}, i, t),
    r ? t.props = n ? i : N5(i) : t.type.props ? t.props = i : t.props = o,
    t.attrs = o
}
function hU(t) {
    for (; t; ) {
        if (t.type.__hmrId)
            return !0;
        t = t.parent
    }
}
function xU(t, e, r, n) {
    const {props: i, attrs: o, vnode: {patchFlag: s}} = t
      , a = Le(i)
      , [l] = t.propsOptions;
    let c = !1;
    if (!hU(t) && (n || s > 0) && !(s & 16)) {
        if (s & 8) {
            const u = t.vnode.dynamicProps;
            for (let f = 0; f < u.length; f++) {
                let d = u[f];
                if (Sp(t.emitsOptions, d))
                    continue;
                const h = e[d];
                if (l)
                    if (lt(o, d))
                        h !== o[d] && (o[d] = h,
                        c = !0);
                    else {
                        const x = Ui(d);
                        i[x] = Vv(l, a, x, h, t, !1)
                    }
                else
                    h !== o[d] && (o[d] = h,
                    c = !0)
            }
        }
    } else {
        _B(t, e, i, o) && (c = !0);
        let u;
        for (const f in a)
            (!e || !lt(e, f) && ((u = Wc(f)) === f || !lt(e, u))) && (l ? r && (r[f] !== void 0 || r[u] !== void 0) && (i[f] = Vv(l, a, f, void 0, t, !0)) : delete i[f]);
        if (o !== a)
            for (const f in o)
                (!e || !lt(e, f)) && (delete o[f],
                c = !0)
    }
    c && vo(t, "set", "$attrs"),
    CB(e || {}, i, t)
}
function _B(t, e, r, n) {
    const [i,o] = t.propsOptions;
    let s = !1, a;
    if (e)
        for (let l in e) {
            if (B0(l))
                continue;
            const c = e[l];
            let u;
            i && lt(i, u = Ui(l)) ? !o || !o.includes(u) ? r[u] = c : (a || (a = {}))[u] = c : Sp(t.emitsOptions, l) || (!(l in n) || c !== n[l]) && (n[l] = c,
            s = !0)
        }
    if (o) {
        const l = Le(r)
          , c = a || Ct;
        for (let u = 0; u < o.length; u++) {
            const f = o[u];
            r[f] = Vv(i, l, f, c[f], t, !lt(c, f))
        }
    }
    return s
}
function Vv(t, e, r, n, i, o) {
    const s = t[r];
    if (s != null) {
        const a = lt(s, "default");
        if (a && n === void 0) {
            const l = s.default;
            if (s.type !== Function && !s.skipFactory && He(l)) {
                const {propsDefaults: c} = i;
                r in c ? n = c[r] : (aa(i),
                n = c[r] = l.call(null, e),
                ea())
            } else
                n = l
        }
        s[0] && (o && !a ? n = !1 : s[1] && (n === "" || n === Wc(r)) && (n = !0))
    }
    return n
}
function bB(t, e, r=!1) {
    const n = e.propsCache
      , i = n.get(t);
    if (i)
        return i;
    const o = t.props
      , s = {}
      , a = [];
    let l = !1;
    if (!He(t)) {
        const u = f => {
            l = !0;
            const [d,h] = bB(f, e, !0);
            Xt(s, d),
            h && a.push(...h)
        }
        ;
        !r && e.mixins.length && e.mixins.forEach(u),
        t.extends && u(t.extends),
        t.mixins && t.mixins.forEach(u)
    }
    if (!o && !l)
        return Bt(t) && n.set(t, Rc),
        Rc;
    if (Ve(o))
        for (let u = 0; u < o.length; u++) {
            nr(o[u]) || ue("props must be strings when using array syntax.", o[u]);
            const f = Ui(o[u]);
            m8(f) && (s[f] = Ct)
        }
    else if (o) {
        Bt(o) || ue("invalid props options", o);
        for (const u in o) {
            const f = Ui(u);
            if (m8(f)) {
                const d = o[u]
                  , h = s[f] = Ve(d) || He(d) ? {
                    type: d
                } : Xt({}, d);
                if (h) {
                    const x = y8(Boolean, h.type)
                      , y = y8(String, h.type);
                    h[0] = x > -1,
                    h[1] = y < 0 || x < y,
                    (x > -1 || lt(h, "default")) && a.push(f)
                }
            }
        }
    }
    const c = [s, a];
    return Bt(t) && n.set(t, c),
    c
}
function m8(t) {
    return t[0] !== "$" ? !0 : (ue(`Invalid prop name: "${t}" is a reserved property.`),
    !1)
}
function zv(t) {
    const e = t && t.toString().match(/^\s*(function|class) (\w+)/);
    return e ? e[2] : t === null ? "null" : ""
}
function v8(t, e) {
    return zv(t) === zv(e)
}
function y8(t, e) {
    return Ve(e) ? e.findIndex(r => v8(r, t)) : He(e) && v8(e, t) ? 0 : -1
}
function CB(t, e, r) {
    const n = Le(e)
      , i = r.propsOptions[0];
    for (const o in i) {
        let s = i[o];
        s != null && pU(o, n[o], s, !lt(t, o) && !lt(t, Wc(o)))
    }
}
function pU(t, e, r, n) {
    const {type: i, required: o, validator: s, skipCheck: a} = r;
    if (o && n) {
        ue('Missing required prop: "' + t + '"');
        return
    }
    if (!(e == null && !o)) {
        if (i != null && i !== !0 && !a) {
            let l = !1;
            const c = Ve(i) ? i : [i]
              , u = [];
            for (let f = 0; f < c.length && !l; f++) {
                const {valid: d, expectedType: h} = mU(e, c[f]);
                u.push(h || ""),
                l = d
            }
            if (!l) {
                ue(vU(t, e, u));
                return
            }
        }
        s && !s(e) && ue('Invalid prop: custom validator check failed for prop "' + t + '".')
    }
}
const gU = jf("String,Number,Boolean,Function,Symbol,BigInt");
function mU(t, e) {
    let r;
    const n = zv(e);
    if (gU(n)) {
        const i = typeof t;
        r = i === n.toLowerCase(),
        !r && i === "object" && (r = t instanceof e)
    } else
        n === "Object" ? r = Bt(t) : n === "Array" ? r = Ve(t) : n === "null" ? r = t === null : r = t instanceof e;
    return {
        valid: r,
        expectedType: n
    }
}
function vU(t, e, r) {
    let n = `Invalid prop: type check failed for prop "${t}". Expected ${r.map(Yc).join(" | ")}`;
    const i = r[0]
      , o = PL(e)
      , s = E8(e, i)
      , a = E8(e, o);
    return r.length === 1 && _8(i) && !yU(i, o) && (n += ` with value ${s}`),
    n += `, got ${o} `,
    _8(o) && (n += `with value ${a}.`),
    n
}
function E8(t, e) {
    return e === "String" ? `"${t}"` : e === "Number" ? `${Number(t)}` : `${t}`
}
function _8(t) {
    return ["string", "number", "boolean"].some(r => t.toLowerCase() === r)
}
function yU(...t) {
    return t.some(e => e.toLowerCase() === "boolean")
}
const AB = t => t[0] === "_" || t === "$stable"
  , L_ = t => Ve(t) ? t.map(wn) : [wn(t)]
  , EU = (t, e, r) => {
    if (e._n)
        return e;
    const n = D_( (...i) => (lr && ue(`Slot "${t}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),
    L_(e(...i))), r);
    return n._c = !1,
    n
}
  , wB = (t, e, r) => {
    const n = t._ctx;
    for (const i in t) {
        if (AB(i))
            continue;
        const o = t[i];
        if (He(o))
            e[i] = EU(i, o, n);
        else if (o != null) {
            ue(`Non-function value encountered for slot "${i}". Prefer function slots for better performance.`);
            const s = L_(o);
            e[i] = () => s
        }
    }
}
  , BB = (t, e) => {
    wu(t.vnode) || ue("Non-function value encountered for default slot. Prefer function slots for better performance.");
    const r = L_(e);
    t.slots.default = () => r
}
  , _U = (t, e) => {
    if (t.vnode.shapeFlag & 32) {
        const r = e._;
        r ? (t.slots = Le(e),
        Rv(e, "_", r)) : wB(e, t.slots = {})
    } else
        t.slots = {},
        e && BB(t, e);
    Rv(t.slots, kp, 1)
}
  , bU = (t, e, r) => {
    const {vnode: n, slots: i} = t;
    let o = !0
      , s = Ct;
    if (n.shapeFlag & 32) {
        const a = e._;
        a ? Js ? (Xt(i, e),
        vo(t, "set", "$slots")) : r && a === 1 ? o = !1 : (Xt(i, e),
        !r && a === 1 && delete i._) : (o = !e.$stable,
        wB(e, i)),
        s = e
    } else
        e && (BB(t, e),
        s = {
            default: 1
        });
    if (o)
        for (const a in i)
            !AB(a) && !(a in s) && delete i[a]
}
;
function _x(t, e, r, n, i=!1) {
    if (Ve(t)) {
        t.forEach( (d, h) => _x(d, e && (Ve(e) ? e[h] : e), r, n, i));
        return
    }
    if (al(n) && !i)
        return;
    const o = n.shapeFlag & 4 ? Mp(n.component) || n.component.proxy : n.el
      , s = i ? null : o
      , {i: a, r: l} = t;
    if (!a) {
        ue("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");
        return
    }
    const c = e && e.r
      , u = a.refs === Ct ? a.refs = {} : a.refs
      , f = a.setupState;
    if (c != null && c !== l && (nr(c) ? (u[c] = null,
    lt(f, c) && (f[c] = null)) : xt(c) && (c.value = null)),
    He(l))
        xo(l, a, 12, [s, u]);
    else {
        const d = nr(l)
          , h = xt(l);
        if (d || h) {
            const x = () => {
                if (t.f) {
                    const y = d ? lt(f, l) ? f[l] : u[l] : l.value;
                    i ? Ve(y) && b_(y, o) : Ve(y) ? y.includes(o) || y.push(o) : d ? (u[l] = [o],
                    lt(f, l) && (f[l] = u[l])) : (l.value = [o],
                    t.k && (u[t.k] = l.value))
                } else
                    d ? (u[l] = s,
                    lt(f, l) && (f[l] = s)) : h ? (l.value = s,
                    t.k && (u[t.k] = s)) : ue("Invalid template ref type:", l, `(${typeof l})`)
            }
            ;
            s ? (x.id = -1,
            Ur(x, r)) : x()
        } else
            ue("Invalid template ref type:", l, `(${typeof l})`)
    }
}
let Bs = !1;
const Md = t => /svg/.test(t.namespaceURI) && t.tagName !== "foreignObject"
  , $u = t => t.nodeType === 8;
function CU(t) {
    const {mt: e, p: r, o: {patchProp: n, createText: i, nextSibling: o, parentNode: s, remove: a, insert: l, createComment: c}} = t
      , u = (E, g) => {
        if (!g.hasChildNodes()) {
            ue("Attempting to hydrate existing markup but container is empty. Performing full mount instead."),
            r(null, E, g),
            mx(),
            g._vnode = E;
            return
        }
        Bs = !1,
        f(g.firstChild, E, null, null, null),
        mx(),
        g._vnode = E,
        Bs && console.error("Hydration completed but contains mismatches.")
    }
      , f = (E, g, p, v, _, b=!1) => {
        const C = $u(E) && E.data === "["
          , w = () => y(E, g, p, v, _, C)
          , {type: T, ref: A, shapeFlag: B, patchFlag: S} = g;
        let D = E.nodeType;
        g.el = E,
        S === -2 && (b = !1,
        g.dynamicChildren = null);
        let F = null;
        switch (T) {
        case yo:
            D !== 3 ? g.children === "" ? (l(g.el = i(""), s(E), E),
            F = E) : F = w() : (E.data !== g.children && (Bs = !0,
            ue(`Hydration text mismatch:
- Client: ${JSON.stringify(E.data)}
- Server: ${JSON.stringify(g.children)}`),
            E.data = g.children),
            F = o(E));
            break;
        case tr:
            D !== 8 || C ? F = w() : F = o(E);
            break;
        case Qs:
            if (C && (E = o(E),
            D = E.nodeType),
            D === 1 || D === 3) {
                F = E;
                const R = !g.children.length;
                for (let P = 0; P < g.staticCount; P++)
                    R && (g.children += F.nodeType === 1 ? F.outerHTML : F.data),
                    P === g.staticCount - 1 && (g.anchor = F),
                    F = o(F);
                return C ? o(F) : F
            } else
                w();
            break;
        case Nt:
            C ? F = x(E, g, p, v, _, b) : F = w();
            break;
        default:
            if (B & 1)
                D !== 1 || g.type.toLowerCase() !== E.tagName.toLowerCase() ? F = w() : F = d(E, g, p, v, _, b);
            else if (B & 6) {
                g.slotScopeIds = _;
                const R = s(E);
                if (e(g, R, null, p, v, Md(R), b),
                F = C ? m(E) : o(E),
                F && $u(F) && F.data === "teleport end" && (F = o(F)),
                al(g)) {
                    let P;
                    C ? (P = O(Nt),
                    P.anchor = F ? F.previousSibling : R.lastChild) : P = E.nodeType === 3 ? Rp("") : O("div"),
                    P.el = E,
                    g.component.subTree = P
                }
            } else
                B & 64 ? D !== 8 ? F = w() : F = g.type.hydrate(E, g, p, v, _, b, t, h) : B & 128 ? F = g.type.hydrate(E, g, p, v, Md(s(E)), _, b, t, f) : ue("Invalid HostVNode type:", T, `(${typeof T})`)
        }
        return A != null && _x(A, null, v, g),
        F
    }
      , d = (E, g, p, v, _, b) => {
        b = b || !!g.dynamicChildren;
        const {type: C, props: w, patchFlag: T, shapeFlag: A, dirs: B} = g
          , S = C === "input" && B || C === "option";
        {
            if (B && oo(g, null, p, "created"),
            w)
                if (S || !b || T & 48)
                    for (const F in w)
                        (S && F.endsWith("value") || Wf(F) && !B0(F)) && n(E, F, null, w[F], !1, void 0, p);
                else
                    w.onClick && n(E, "onClick", null, w.onClick, !1, void 0, p);
            let D;
            if ((D = w && w.onVnodeBeforeMount) && bn(D, p, g),
            B && oo(g, null, p, "beforeMount"),
            ((D = w && w.onVnodeMounted) || B) && rB( () => {
                D && bn(D, p, g),
                B && oo(g, null, p, "mounted")
            }
            , v),
            A & 16 && !(w && (w.innerHTML || w.textContent))) {
                let F = h(E.firstChild, g, E, p, v, _, b)
                  , R = !1;
                for (; F; ) {
                    Bs = !0,
                    R || (ue(`Hydration children mismatch in <${g.type}>: server rendered element contains more child nodes than client vdom.`),
                    R = !0);
                    const P = F;
                    F = F.nextSibling,
                    a(P)
                }
            } else
                A & 8 && E.textContent !== g.children && (Bs = !0,
                ue(`Hydration text content mismatch in <${g.type}>:
- Client: ${E.textContent}
- Server: ${g.children}`),
                E.textContent = g.children)
        }
        return E.nextSibling
    }
      , h = (E, g, p, v, _, b, C) => {
        C = C || !!g.dynamicChildren;
        const w = g.children
          , T = w.length;
        let A = !1;
        for (let B = 0; B < T; B++) {
            const S = C ? w[B] : w[B] = wn(w[B]);
            if (E)
                E = f(E, S, v, _, b, C);
            else {
                if (S.type === yo && !S.children)
                    continue;
                Bs = !0,
                A || (ue(`Hydration children mismatch in <${p.tagName.toLowerCase()}>: server rendered element contains fewer child nodes than client vdom.`),
                A = !0),
                r(null, S, p, null, v, _, Md(p), b)
            }
        }
        return E
    }
      , x = (E, g, p, v, _, b) => {
        const {slotScopeIds: C} = g;
        C && (_ = _ ? _.concat(C) : C);
        const w = s(E)
          , T = h(o(E), g, w, p, v, _, b);
        return T && $u(T) && T.data === "]" ? o(g.anchor = T) : (Bs = !0,
        l(g.anchor = c("]"), w, T),
        T)
    }
      , y = (E, g, p, v, _, b) => {
        if (Bs = !0,
        ue(`Hydration node mismatch:
- Client vnode:`, g.type, `
- Server rendered DOM:`, E, E.nodeType === 3 ? "(text)" : $u(E) && E.data === "[" ? "(start of fragment)" : ""),
        g.el = null,
        b) {
            const T = m(E);
            for (; ; ) {
                const A = o(E);
                if (A && A !== T)
                    a(A);
                else
                    break
            }
        }
        const C = o(E)
          , w = s(E);
        return a(E),
        r(null, g, w, C, p, v, Md(w), _),
        C
    }
      , m = E => {
        let g = 0;
        for (; E; )
            if (E = o(E),
            E && $u(E) && (E.data === "[" && g++,
            E.data === "]")) {
                if (g === 0)
                    return o(E);
                g--
            }
        return E
    }
    ;
    return [u, f]
}
let Uu, Us;
function Uo(t, e) {
    t.appContext.config.performance && bx() && Us.mark(`vue-${e}-${t.uid}`),
    l$(t, e, bx() ? Us.now() : Date.now())
}
function Go(t, e) {
    if (t.appContext.config.performance && bx()) {
        const r = `vue-${e}-${t.uid}`
          , n = r + ":end";
        Us.mark(n),
        Us.measure(`<${Np(t, t.type)}> ${e}`, r, n),
        Us.clearMarks(r),
        Us.clearMarks(n)
    }
    c$(t, e, bx() ? Us.now() : Date.now())
}
function bx() {
    return Uu !== void 0 || (typeof window < "u" && window.performance ? (Uu = !0,
    Us = window.performance) : Uu = !1),
    Uu
}
function AU() {
    const t = [];
    if (t.length) {
        const e = t.length > 1;
        console.warn(`Feature flag${e ? "s" : ""} ${t.join(", ")} ${e ? "are" : "is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.

For more details, see https://link.vuejs.org/feature-flags.`)
    }
}
const Ur = rB;
function SB(t) {
    return DB(t)
}
function TB(t) {
    return DB(t, CU)
}
function DB(t, e) {
    AU();
    const r = gx();
    r.__VUE__ = !0,
    S_(r.__VUE_DEVTOOLS_GLOBAL_HOOK__, r);
    const {insert: n, remove: i, patchProp: o, createElement: s, createText: a, createComment: l, setText: c, setElementText: u, parentNode: f, nextSibling: d, setScopeId: h=Tn, insertStaticContent: x} = t
      , y = (I, z, q, ce=null, fe=null, k=null, L=!1, Y=null, ee=Js ? !1 : !!z.dynamicChildren) => {
        if (I === z)
            return;
        I && !Di(I, z) && (ce = re(I),
        V(I, fe, k, !0),
        I = null),
        z.patchFlag === -2 && (ee = !1,
        z.dynamicChildren = null);
        const {type: de, ref: ye, shapeFlag: pe} = z;
        switch (de) {
        case yo:
            m(I, z, q, ce);
            break;
        case tr:
            E(I, z, q, ce);
            break;
        case Qs:
            I == null ? g(z, q, ce, L) : p(I, z, q, L);
            break;
        case Nt:
            D(I, z, q, ce, fe, k, L, Y, ee);
            break;
        default:
            pe & 1 ? b(I, z, q, ce, fe, k, L, Y, ee) : pe & 6 ? F(I, z, q, ce, fe, k, L, Y, ee) : pe & 64 || pe & 128 ? de.process(I, z, q, ce, fe, k, L, Y, ee, he) : ue("Invalid VNode type:", de, `(${typeof de})`)
        }
        ye != null && fe && _x(ye, I && I.ref, k, z || I, !z)
    }
      , m = (I, z, q, ce) => {
        if (I == null)
            n(z.el = a(z.children), q, ce);
        else {
            const fe = z.el = I.el;
            z.children !== I.children && c(fe, z.children)
        }
    }
      , E = (I, z, q, ce) => {
        I == null ? n(z.el = l(z.children || ""), q, ce) : z.el = I.el
    }
      , g = (I, z, q, ce) => {
        [I.el,I.anchor] = x(I.children, z, q, ce, I.el, I.anchor)
    }
      , p = (I, z, q, ce) => {
        if (z.children !== I.children) {
            const fe = d(I.anchor);
            _(I),
            [z.el,z.anchor] = x(z.children, q, fe, ce)
        } else
            z.el = I.el,
            z.anchor = I.anchor
    }
      , v = ({el: I, anchor: z}, q, ce) => {
        let fe;
        for (; I && I !== z; )
            fe = d(I),
            n(I, q, ce),
            I = fe;
        n(z, q, ce)
    }
      , _ = ({el: I, anchor: z}) => {
        let q;
        for (; I && I !== z; )
            q = d(I),
            i(I),
            I = q;
        i(z)
    }
      , b = (I, z, q, ce, fe, k, L, Y, ee) => {
        L = L || z.type === "svg",
        I == null ? C(z, q, ce, fe, k, L, Y, ee) : A(I, z, fe, k, L, Y, ee)
    }
      , C = (I, z, q, ce, fe, k, L, Y) => {
        let ee, de;
        const {type: ye, props: pe, shapeFlag: Z, transition: se, dirs: we} = I;
        if (ee = I.el = s(I.type, k, pe && pe.is, pe),
        Z & 8 ? u(ee, I.children) : Z & 16 && T(I.children, ee, null, ce, fe, k && ye !== "foreignObject", L, Y),
        we && oo(I, null, ce, "created"),
        w(ee, I, I.scopeId, L, ce),
        pe) {
            for (const et in pe)
                et !== "value" && !B0(et) && o(ee, et, null, pe[et], k, I.children, ce, fe, G);
            "value"in pe && o(ee, "value", null, pe.value),
            (de = pe.onVnodeBeforeMount) && bn(de, ce, I)
        }
        Object.defineProperty(ee, "__vnode", {
            value: I,
            enumerable: !1
        }),
        Object.defineProperty(ee, "__vueParentComponent", {
            value: ce,
            enumerable: !1
        }),
        we && oo(I, null, ce, "beforeMount");
        const Ue = (!fe || fe && !fe.pendingBranch) && se && !se.persisted;
        Ue && se.beforeEnter(ee),
        n(ee, z, q),
        ((de = pe && pe.onVnodeMounted) || Ue || we) && Ur( () => {
            de && bn(de, ce, I),
            Ue && se.enter(ee),
            we && oo(I, null, ce, "mounted")
        }
        , fe)
    }
      , w = (I, z, q, ce, fe) => {
        if (q && h(I, q),
        ce)
            for (let k = 0; k < ce.length; k++)
                h(I, ce[k]);
        if (fe) {
            let k = fe.subTree;
            if (k.patchFlag > 0 && k.patchFlag & 2048 && (k = F_(k.children) || k),
            z === k) {
                const L = fe.vnode;
                w(I, L, L.scopeId, L.slotScopeIds, fe.parent)
            }
        }
    }
      , T = (I, z, q, ce, fe, k, L, Y, ee=0) => {
        for (let de = ee; de < I.length; de++) {
            const ye = I[de] = Y ? Ns(I[de]) : wn(I[de]);
            y(null, ye, z, q, ce, fe, k, L, Y)
        }
    }
      , A = (I, z, q, ce, fe, k, L) => {
        const Y = z.el = I.el;
        let {patchFlag: ee, dynamicChildren: de, dirs: ye} = z;
        ee |= I.patchFlag & 16;
        const pe = I.props || Ct
          , Z = z.props || Ct;
        let se;
        q && Sa(q, !1),
        (se = Z.onVnodeBeforeUpdate) && bn(se, q, z, I),
        ye && oo(z, I, q, "beforeUpdate"),
        q && Sa(q, !0),
        Js && (ee = 0,
        L = !1,
        de = null);
        const we = fe && z.type !== "foreignObject";
        if (de ? (B(I.dynamicChildren, de, Y, q, ce, we, k),
        Cx(I, z)) : L || K(I, z, Y, null, q, ce, we, k, !1),
        ee > 0) {
            if (ee & 16)
                S(Y, z, pe, Z, q, ce, fe);
            else if (ee & 2 && pe.class !== Z.class && o(Y, "class", null, Z.class, fe),
            ee & 4 && o(Y, "style", pe.style, Z.style, fe),
            ee & 8) {
                const Ue = z.dynamicProps;
                for (let et = 0; et < Ue.length; et++) {
                    const kt = Ue[et]
                      , Sr = pe[kt]
                      , En = Z[kt];
                    (En !== Sr || kt === "value") && o(Y, kt, Sr, En, fe, I.children, q, ce, G)
                }
            }
            ee & 1 && I.children !== z.children && u(Y, z.children)
        } else
            !L && de == null && S(Y, z, pe, Z, q, ce, fe);
        ((se = Z.onVnodeUpdated) || ye) && Ur( () => {
            se && bn(se, q, z, I),
            ye && oo(z, I, q, "updated")
        }
        , ce)
    }
      , B = (I, z, q, ce, fe, k, L) => {
        for (let Y = 0; Y < z.length; Y++) {
            const ee = I[Y]
              , de = z[Y]
              , ye = ee.el && (ee.type === Nt || !Di(ee, de) || ee.shapeFlag & 70) ? f(ee.el) : q;
            y(ee, de, ye, null, ce, fe, k, L, !0)
        }
    }
      , S = (I, z, q, ce, fe, k, L) => {
        if (q !== ce) {
            if (q !== Ct)
                for (const Y in q)
                    !B0(Y) && !(Y in ce) && o(I, Y, q[Y], null, L, z.children, fe, k, G);
            for (const Y in ce) {
                if (B0(Y))
                    continue;
                const ee = ce[Y]
                  , de = q[Y];
                ee !== de && Y !== "value" && o(I, Y, de, ee, L, z.children, fe, k, G)
            }
            "value"in ce && o(I, "value", q.value, ce.value)
        }
    }
      , D = (I, z, q, ce, fe, k, L, Y, ee) => {
        const de = z.el = I ? I.el : a("")
          , ye = z.anchor = I ? I.anchor : a("");
        let {patchFlag: pe, dynamicChildren: Z, slotScopeIds: se} = z;
        (Js || pe & 2048) && (pe = 0,
        ee = !1,
        Z = null),
        se && (Y = Y ? Y.concat(se) : se),
        I == null ? (n(de, q, ce),
        n(ye, q, ce),
        T(z.children, q, ye, fe, k, L, Y, ee)) : pe > 0 && pe & 64 && Z && I.dynamicChildren ? (B(I.dynamicChildren, Z, q, fe, k, L, Y),
        Cx(I, z)) : K(I, z, q, ye, fe, k, L, Y, ee)
    }
      , F = (I, z, q, ce, fe, k, L, Y, ee) => {
        z.slotScopeIds = Y,
        I == null ? z.shapeFlag & 512 ? fe.ctx.activate(z, q, ce, L, ee) : R(z, q, ce, fe, k, L, ee) : P(I, z, ee)
    }
      , R = (I, z, q, ce, fe, k, L) => {
        const Y = I.component = MB(I, ce, fe);
        if (Y.type.__hmrId && e$(Y),
        S0(I),
        Uo(Y, "mount"),
        wu(I) && (Y.ctx.renderer = he),
        Uo(Y, "init"),
        LB(Y),
        Go(Y, "init"),
        Y.asyncDep) {
            if (fe && fe.registerDep(Y, N),
            !I.el) {
                const ee = Y.subTree = O(tr);
                E(null, ee, z, q)
            }
            return
        }
        N(Y, I, z, q, fe, k, L),
        T0(),
        Go(Y, "mount")
    }
      , P = (I, z, q) => {
        const ce = z.component = I.component;
        if (v$(I, z, q))
            if (ce.asyncDep && !ce.asyncResolved) {
                S0(z),
                j(ce, z, q),
                T0();
                return
            } else
                ce.next = z,
                JL(ce.update),
                ce.update();
        else
            z.el = I.el,
            ce.vnode = z
    }
      , N = (I, z, q, ce, fe, k, L) => {
        const Y = () => {
            if (I.isMounted) {
                let {next: ye, bu: pe, u: Z, parent: se, vnode: we} = I, Ue = ye, et;
                S0(ye || I.vnode),
                Sa(I, !1),
                ye ? (ye.el = we.el,
                j(I, ye, L)) : ye = we,
                pe && za(pe),
                (et = ye.props && ye.props.onVnodeBeforeUpdate) && bn(et, se, ye, we),
                Sa(I, !0),
                Uo(I, "render");
                const kt = Lh(I);
                Go(I, "render");
                const Sr = I.subTree;
                I.subTree = kt,
                Uo(I, "patch"),
                y(Sr, kt, f(Sr.el), re(Sr), I, fe, k),
                Go(I, "patch"),
                ye.el = kt.el,
                Ue === null && P_(I, kt.el),
                Z && Ur(Z, fe),
                (et = ye.props && ye.props.onVnodeUpdated) && Ur( () => bn(et, se, ye, we), fe),
                J5(I),
                T0()
            } else {
                let ye;
                const {el: pe, props: Z} = z
                  , {bm: se, m: we, parent: Ue} = I
                  , et = al(z);
                if (Sa(I, !1),
                se && za(se),
                !et && (ye = Z && Z.onVnodeBeforeMount) && bn(ye, Ue, z),
                Sa(I, !0),
                pe && ve) {
                    const kt = () => {
                        Uo(I, "render"),
                        I.subTree = Lh(I),
                        Go(I, "render"),
                        Uo(I, "hydrate"),
                        ve(pe, I.subTree, I, fe, null),
                        Go(I, "hydrate")
                    }
                    ;
                    et ? z.type.__asyncLoader().then( () => !I.isUnmounted && kt()) : kt()
                } else {
                    Uo(I, "render");
                    const kt = I.subTree = Lh(I);
                    Go(I, "render"),
                    Uo(I, "patch"),
                    y(null, kt, q, ce, I, fe, k),
                    Go(I, "patch"),
                    z.el = kt.el
                }
                if (we && Ur(we, fe),
                !et && (ye = Z && Z.onVnodeMounted)) {
                    const kt = z;
                    Ur( () => bn(ye, Ue, kt), fe)
                }
                (z.shapeFlag & 256 || Ue && al(Ue.vnode) && Ue.vnode.shapeFlag & 256) && I.a && Ur(I.a, fe),
                I.isMounted = !0,
                Lv(I),
                z = q = ce = null
            }
        }
          , ee = I.effect = new zf(Y, () => qf(de),I.scope)
          , de = I.update = () => ee.run();
        de.id = I.uid,
        Sa(I, !0),
        ee.onTrack = I.rtc ? ye => za(I.rtc, ye) : void 0,
        ee.onTrigger = I.rtg ? ye => za(I.rtg, ye) : void 0,
        de.ownerInstance = I,
        de()
    }
      , j = (I, z, q) => {
        z.component = I;
        const ce = I.vnode.props;
        I.vnode = z,
        I.next = null,
        xU(I, z.props, ce, q),
        bU(I, z.children, q),
        Nl(),
        s8(),
        Ll()
    }
      , K = (I, z, q, ce, fe, k, L, Y, ee=!1) => {
        const de = I && I.children
          , ye = I ? I.shapeFlag : 0
          , pe = z.children
          , {patchFlag: Z, shapeFlag: se} = z;
        if (Z > 0) {
            if (Z & 128) {
                U(de, pe, q, ce, fe, k, L, Y, ee);
                return
            } else if (Z & 256) {
                oe(de, pe, q, ce, fe, k, L, Y, ee);
                return
            }
        }
        se & 8 ? (ye & 16 && G(de, fe, k),
        pe !== de && u(q, pe)) : ye & 16 ? se & 16 ? U(de, pe, q, ce, fe, k, L, Y, ee) : G(de, fe, k, !0) : (ye & 8 && u(q, ""),
        se & 16 && T(pe, q, ce, fe, k, L, Y, ee))
    }
      , oe = (I, z, q, ce, fe, k, L, Y, ee) => {
        I = I || Rc,
        z = z || Rc;
        const de = I.length
          , ye = z.length
          , pe = Math.min(de, ye);
        let Z;
        for (Z = 0; Z < pe; Z++) {
            const se = z[Z] = ee ? Ns(z[Z]) : wn(z[Z]);
            y(I[Z], se, q, null, fe, k, L, Y, ee)
        }
        de > ye ? G(I, fe, k, !0, !1, pe) : T(z, q, ce, fe, k, L, Y, ee, pe)
    }
      , U = (I, z, q, ce, fe, k, L, Y, ee) => {
        let de = 0;
        const ye = z.length;
        let pe = I.length - 1
          , Z = ye - 1;
        for (; de <= pe && de <= Z; ) {
            const se = I[de]
              , we = z[de] = ee ? Ns(z[de]) : wn(z[de]);
            if (Di(se, we))
                y(se, we, q, null, fe, k, L, Y, ee);
            else
                break;
            de++
        }
        for (; de <= pe && de <= Z; ) {
            const se = I[pe]
              , we = z[Z] = ee ? Ns(z[Z]) : wn(z[Z]);
            if (Di(se, we))
                y(se, we, q, null, fe, k, L, Y, ee);
            else
                break;
            pe--,
            Z--
        }
        if (de > pe) {
            if (de <= Z) {
                const se = Z + 1
                  , we = se < ye ? z[se].el : ce;
                for (; de <= Z; )
                    y(null, z[de] = ee ? Ns(z[de]) : wn(z[de]), q, we, fe, k, L, Y, ee),
                    de++
            }
        } else if (de > Z)
            for (; de <= pe; )
                V(I[de], fe, k, !0),
                de++;
        else {
            const se = de
              , we = de
              , Ue = new Map;
            for (de = we; de <= Z; de++) {
                const on = z[de] = ee ? Ns(z[de]) : wn(z[de]);
                on.key != null && (Ue.has(on.key) && ue("Duplicate keys found during update:", JSON.stringify(on.key), "Make sure keys are unique."),
                Ue.set(on.key, de))
            }
            let et, kt = 0;
            const Sr = Z - we + 1;
            let En = !1
              , Dd = 0;
            const As = new Array(Sr);
            for (de = 0; de < Sr; de++)
                As[de] = 0;
            for (de = se; de <= pe; de++) {
                const on = I[de];
                if (kt >= Sr) {
                    V(on, fe, k, !0);
                    continue
                }
                let Ki;
                if (on.key != null)
                    Ki = Ue.get(on.key);
                else
                    for (et = we; et <= Z; et++)
                        if (As[et - we] === 0 && Di(on, z[et])) {
                            Ki = et;
                            break
                        }
                Ki === void 0 ? V(on, fe, k, !0) : (As[Ki - we] = de + 1,
                Ki >= Dd ? Dd = Ki : En = !0,
                y(on, z[Ki], q, null, fe, k, L, Y, ee),
                kt++)
            }
            const KC = En ? wU(As) : Rc;
            for (et = KC.length - 1,
            de = Sr - 1; de >= 0; de--) {
                const on = we + de
                  , Ki = z[on]
                  , qC = on + 1 < ye ? z[on + 1].el : ce;
                As[de] === 0 ? y(null, Ki, q, qC, fe, k, L, Y, ee) : En && (et < 0 || de !== KC[et] ? $(Ki, q, qC, 2) : et--)
            }
        }
    }
      , $ = (I, z, q, ce, fe=null) => {
        const {el: k, type: L, transition: Y, children: ee, shapeFlag: de} = I;
        if (de & 6) {
            $(I.component.subTree, z, q, ce);
            return
        }
        if (de & 128) {
            I.suspense.move(z, q, ce);
            return
        }
        if (de & 64) {
            L.move(I, z, q, he);
            return
        }
        if (L === Nt) {
            n(k, z, q);
            for (let pe = 0; pe < ee.length; pe++)
                $(ee[pe], z, q, ce);
            n(I.anchor, z, q);
            return
        }
        if (L === Qs) {
            v(I, z, q);
            return
        }
        if (ce !== 2 && de & 1 && Y)
            if (ce === 0)
                Y.beforeEnter(k),
                n(k, z, q),
                Ur( () => Y.enter(k), fe);
            else {
                const {leave: pe, delayLeave: Z, afterLeave: se} = Y
                  , we = () => n(k, z, q)
                  , Ue = () => {
                    pe(k, () => {
                        we(),
                        se && se()
                    }
                    )
                }
                ;
                Z ? Z(k, we, Ue) : Ue()
            }
        else
            n(k, z, q)
    }
      , V = (I, z, q, ce=!1, fe=!1) => {
        const {type: k, props: L, ref: Y, children: ee, dynamicChildren: de, shapeFlag: ye, patchFlag: pe, dirs: Z} = I;
        if (Y != null && _x(Y, null, q, I, !0),
        ye & 256) {
            z.ctx.deactivate(I);
            return
        }
        const se = ye & 1 && Z
          , we = !al(I);
        let Ue;
        if (we && (Ue = L && L.onVnodeBeforeUnmount) && bn(Ue, z, I),
        ye & 6)
            Q(I.component, q, ce);
        else {
            if (ye & 128) {
                I.suspense.unmount(q, ce);
                return
            }
            se && oo(I, null, z, "beforeUnmount"),
            ye & 64 ? I.type.remove(I, z, q, fe, he, ce) : de && (k !== Nt || pe > 0 && pe & 64) ? G(de, z, q, !1, !0) : (k === Nt && pe & 384 || !fe && ye & 16) && G(ee, z, q),
            ce && W(I)
        }
        (we && (Ue = L && L.onVnodeUnmounted) || se) && Ur( () => {
            Ue && bn(Ue, z, I),
            se && oo(I, null, z, "unmounted")
        }
        , q)
    }
      , W = I => {
        const {type: z, el: q, anchor: ce, transition: fe} = I;
        if (z === Nt) {
            I.patchFlag > 0 && I.patchFlag & 2048 && fe && !fe.persisted ? I.children.forEach(L => {
                L.type === tr ? i(L.el) : W(L)
            }
            ) : H(q, ce);
            return
        }
        if (z === Qs) {
            _(I);
            return
        }
        const k = () => {
            i(q),
            fe && !fe.persisted && fe.afterLeave && fe.afterLeave()
        }
        ;
        if (I.shapeFlag & 1 && fe && !fe.persisted) {
            const {leave: L, delayLeave: Y} = fe
              , ee = () => L(q, k);
            Y ? Y(I.el, k, ee) : ee()
        } else
            k()
    }
      , H = (I, z) => {
        let q;
        for (; I !== z; )
            q = d(I),
            i(I),
            I = q;
        i(z)
    }
      , Q = (I, z, q) => {
        I.type.__hmrId && t$(I);
        const {bum: ce, scope: fe, update: k, subTree: L, um: Y} = I;
        ce && za(ce),
        fe.stop(),
        k && (k.active = !1,
        V(L, I, z, q)),
        Y && Ur(Y, z),
        Ur( () => {
            I.isUnmounted = !0
        }
        , z),
        z && z.pendingBranch && !z.isUnmounted && I.asyncDep && !I.asyncResolved && I.suspenseId === z.pendingId && (z.deps--,
        z.deps === 0 && z.resolve()),
        a$(I)
    }
      , G = (I, z, q, ce=!1, fe=!1, k=0) => {
        for (let L = k; L < I.length; L++)
            V(I[L], z, q, ce, fe)
    }
      , re = I => I.shapeFlag & 6 ? re(I.component.subTree) : I.shapeFlag & 128 ? I.suspense.next() : d(I.anchor || I.el)
      , te = (I, z, q) => {
        I == null ? z._vnode && V(z._vnode, null, null, !0) : y(z._vnode || null, I, z, null, null, null, q),
        s8(),
        mx(),
        z._vnode = I
    }
      , he = {
        p: y,
        um: V,
        m: $,
        r: W,
        mt: R,
        mc: T,
        pc: K,
        pbc: B,
        n: re,
        o: t
    };
    let xe, ve;
    return e && ([xe,ve] = e(he)),
    {
        render: te,
        hydrate: xe,
        createApp: fU(te, xe)
    }
}
function Sa({effect: t, update: e}, r) {
    t.allowRecurse = e.allowRecurse = r
}
function Cx(t, e, r=!1) {
    const n = t.children
      , i = e.children;
    if (Ve(n) && Ve(i))
        for (let o = 0; o < n.length; o++) {
            const s = n[o];
            let a = i[o];
            a.shapeFlag & 1 && !a.dynamicChildren && ((a.patchFlag <= 0 || a.patchFlag === 32) && (a = i[o] = Ns(i[o]),
            a.el = s.el),
            r || Cx(s, a)),
            a.type === yo && (a.el = s.el),
            a.type === tr && !a.el && (a.el = s.el)
        }
}
function wU(t) {
    const e = t.slice()
      , r = [0];
    let n, i, o, s, a;
    const l = t.length;
    for (n = 0; n < l; n++) {
        const c = t[n];
        if (c !== 0) {
            if (i = r[r.length - 1],
            t[i] < c) {
                e[n] = i,
                r.push(n);
                continue
            }
            for (o = 0,
            s = r.length - 1; o < s; )
                a = o + s >> 1,
                t[r[a]] < c ? o = a + 1 : s = a;
            c < t[r[o]] && (o > 0 && (e[n] = r[o - 1]),
            r[o] = n)
        }
    }
    for (o = r.length,
    s = r[o - 1]; o-- > 0; )
        r[o] = s,
        s = e[s];
    return r
}
const BU = t => t.__isTeleport
  , Lc = t => t && (t.disabled || t.disabled === "")
  , b8 = t => typeof SVGElement < "u" && t instanceof SVGElement
  , jv = (t, e) => {
    const r = t && t.to;
    if (nr(r))
        if (e) {
            const n = e(r);
            return n || ue(`Failed to locate Teleport target with selector "${r}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`),
            n
        } else
            return ue("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),
            null;
    else
        return !r && !Lc(t) && ue(`Invalid Teleport target: ${r}`),
        r
}
  , SU = {
    __isTeleport: !0,
    process(t, e, r, n, i, o, s, a, l, c) {
        const {mc: u, pc: f, pbc: d, o: {insert: h, querySelector: x, createText: y, createComment: m}} = c
          , E = Lc(e.props);
        let {shapeFlag: g, children: p, dynamicChildren: v} = e;
        if (Js && (l = !1,
        v = null),
        t == null) {
            const _ = e.el = m("teleport start")
              , b = e.anchor = m("teleport end");
            h(_, r, n),
            h(b, r, n);
            const C = e.target = jv(e.props, x)
              , w = e.targetAnchor = y("");
            C ? (h(w, C),
            s = s || b8(C)) : E || ue("Invalid Teleport target on mount:", C, `(${typeof C})`);
            const T = (A, B) => {
                g & 16 && u(p, A, B, i, o, s, a, l)
            }
            ;
            E ? T(r, b) : C && T(C, w)
        } else {
            e.el = t.el;
            const _ = e.anchor = t.anchor
              , b = e.target = t.target
              , C = e.targetAnchor = t.targetAnchor
              , w = Lc(t.props)
              , T = w ? r : b
              , A = w ? _ : C;
            if (s = s || b8(b),
            v ? (d(t.dynamicChildren, v, T, i, o, s, a),
            Cx(t, e, !0)) : l || f(t, e, T, A, i, o, s, a, !1),
            E)
                w || Nd(e, r, _, c, 1);
            else if ((e.props && e.props.to) !== (t.props && t.props.to)) {
                const B = e.target = jv(e.props, x);
                B ? Nd(e, B, null, c, 0) : ue("Invalid Teleport target on update:", b, `(${typeof b})`)
            } else
                w && Nd(e, b, C, c, 1)
        }
        FB(e)
    },
    remove(t, e, r, n, {um: i, o: {remove: o}}, s) {
        const {shapeFlag: a, children: l, anchor: c, targetAnchor: u, target: f, props: d} = t;
        if (f && o(u),
        (s || !Lc(d)) && (o(c),
        a & 16))
            for (let h = 0; h < l.length; h++) {
                const x = l[h];
                i(x, e, r, !0, !!x.dynamicChildren)
            }
    },
    move: Nd,
    hydrate: TU
};
function Nd(t, e, r, {o: {insert: n}, m: i}, o=2) {
    o === 0 && n(t.targetAnchor, e, r);
    const {el: s, anchor: a, shapeFlag: l, children: c, props: u} = t
      , f = o === 2;
    if (f && n(s, e, r),
    (!f || Lc(u)) && l & 16)
        for (let d = 0; d < c.length; d++)
            i(c[d], e, r, 2);
    f && n(a, e, r)
}
function TU(t, e, r, n, i, o, {o: {nextSibling: s, parentNode: a, querySelector: l}}, c) {
    const u = e.target = jv(e.props, l);
    if (u) {
        const f = u._lpa || u.firstChild;
        if (e.shapeFlag & 16)
            if (Lc(e.props))
                e.anchor = c(s(t), e, a(t), r, n, i, o),
                e.targetAnchor = f;
            else {
                e.anchor = s(t);
                let d = f;
                for (; d; )
                    if (d = s(d),
                    d && d.nodeType === 8 && d.data === "teleport anchor") {
                        e.targetAnchor = d,
                        u._lpa = e.targetAnchor && s(e.targetAnchor);
                        break
                    }
                c(f, e, u, r, n, i, o)
            }
        FB(e)
    }
    return e.anchor && s(e.anchor)
}
const Ip = SU;
function FB(t) {
    const e = t.ctx;
    if (e && e.ut) {
        let r = t.children[0].el;
        for (; r !== t.targetAnchor; )
            r.nodeType === 1 && r.setAttribute("data-v-owner", e.uid),
            r = r.nextSibling;
        e.ut()
    }
}
const Nt = Symbol.for("v-fgt")
  , yo = Symbol.for("v-txt")
  , tr = Symbol.for("v-cmt")
  , Qs = Symbol.for("v-stc")
  , P0 = [];
let Dn = null;
function Op(t=!1) {
    P0.push(Dn = t ? null : [])
}
function PB() {
    P0.pop(),
    Dn = P0[P0.length - 1] || null
}
let vl = 1;
function Wv(t) {
    vl += t
}
function IB(t) {
    return t.dynamicChildren = vl > 0 ? Dn || Rc : null,
    PB(),
    vl > 0 && Dn && Dn.push(t),
    t
}
function DU(t, e, r, n, i, o) {
    return IB(U_(t, e, r, n, i, o, !0))
}
function $_(t, e, r, n, i) {
    return IB(O(t, e, r, n, i, !0))
}
function Eo(t) {
    return t ? t.__v_isVNode === !0 : !1
}
function Di(t, e) {
    return e.shapeFlag & 6 && yc.has(e.type) ? (t.shapeFlag &= -257,
    e.shapeFlag &= -513,
    !1) : t.type === e.type && t.key === e.key
}
let Yv;
function FU(t) {
    Yv = t
}
const PU = (...t) => IU(...Yv ? Yv(t, cr) : t)
  , kp = "__vInternal"
  , OB = ({key: t}) => t ?? null
  , $h = ({ref: t, ref_key: e, ref_for: r}) => (typeof t == "number" && (t = "" + t),
t != null ? nr(t) || xt(t) || He(t) ? {
    i: cr,
    r: t,
    k: e,
    f: !!r
} : t : null);
function U_(t, e=null, r=null, n=0, i=null, o=t === Nt ? 0 : 1, s=!1, a=!1) {
    const l = {
        __v_isVNode: !0,
        __v_skip: !0,
        type: t,
        props: e,
        key: e && OB(e),
        ref: e && $h(e),
        scopeId: Tp,
        slotScopeIds: null,
        children: r,
        component: null,
        suspense: null,
        ssContent: null,
        ssFallback: null,
        dirs: null,
        transition: null,
        el: null,
        anchor: null,
        target: null,
        targetAnchor: null,
        staticCount: 0,
        shapeFlag: o,
        patchFlag: n,
        dynamicProps: i,
        dynamicChildren: null,
        appContext: null,
        ctx: cr
    };
    return a ? (G_(l, r),
    o & 128 && t.normalize(l)) : r && (l.shapeFlag |= nr(r) ? 8 : 16),
    l.key !== l.key && ue("VNode created with invalid key (NaN). VNode type:", l.type),
    vl > 0 && !s && Dn && (l.patchFlag > 0 || o & 6) && l.patchFlag !== 32 && Dn.push(l),
    l
}
const O = PU;
function IU(t, e=null, r=null, n=0, i=null, o=!1) {
    if ((!t || t === xB) && (t || ue(`Invalid vnode type when creating vnode: ${t}.`),
    t = tr),
    Eo(t)) {
        const a = Ei(t, e, !0);
        return r && G_(a, r),
        vl > 0 && !o && Dn && (a.shapeFlag & 6 ? Dn[Dn.indexOf(t)] = a : Dn.push(a)),
        a.patchFlag |= -2,
        a
    }
    if (GB(t) && (t = t.__vccOpts),
    e) {
        e = kB(e);
        let {class: a, style: l} = e;
        a && !nr(a) && (e.class = Kf(a)),
        Bt(l) && (rf(l) && !Ve(l) && (l = Xt({}, l)),
        e.style = Xf(l))
    }
    const s = nr(t) ? 1 : tB(t) ? 128 : BU(t) ? 64 : Bt(t) ? 4 : He(t) ? 2 : 0;
    return s & 4 && rf(t) && (t = Le(t),
    ue("Vue received a Component which was made a reactive object. This can lead to unnecessary performance overhead, and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.", `
Component that was made reactive: `, t)),
    U_(t, e, r, n, i, s, o, !0)
}
function kB(t) {
    return t ? rf(t) || kp in t ? Xt({}, t) : t : null
}
function Ei(t, e, r=!1) {
    const {props: n, ref: i, patchFlag: o, children: s} = t
      , a = e ? st(n || {}, e) : n;
    return {
        __v_isVNode: !0,
        __v_skip: !0,
        type: t.type,
        props: a,
        key: a && OB(a),
        ref: e && e.ref ? r && i ? Ve(i) ? i.concat($h(e)) : [i, $h(e)] : $h(e) : i,
        scopeId: t.scopeId,
        slotScopeIds: t.slotScopeIds,
        children: o === -1 && Ve(s) ? s.map(RB) : s,
        target: t.target,
        targetAnchor: t.targetAnchor,
        staticCount: t.staticCount,
        shapeFlag: t.shapeFlag,
        patchFlag: e && t.type !== Nt ? o === -1 ? 16 : o | 16 : o,
        dynamicProps: t.dynamicProps,
        dynamicChildren: t.dynamicChildren,
        appContext: t.appContext,
        dirs: t.dirs,
        transition: t.transition,
        component: t.component,
        suspense: t.suspense,
        ssContent: t.ssContent && Ei(t.ssContent),
        ssFallback: t.ssFallback && Ei(t.ssFallback),
        el: t.el,
        anchor: t.anchor,
        ctx: t.ctx,
        ce: t.ce
    }
}
function RB(t) {
    const e = Ei(t);
    return Ve(t.children) && (e.children = t.children.map(RB)),
    e
}
function Rp(t=" ", e=0) {
    return O(yo, null, t, e)
}
function OU(t, e) {
    const r = O(Qs, null, t);
    return r.staticCount = e,
    r
}
function kU(t="", e=!1) {
    return e ? (Op(),
    $_(tr, null, t)) : O(tr, null, t)
}
function wn(t) {
    return t == null || typeof t == "boolean" ? O(tr) : Ve(t) ? O(Nt, null, t.slice()) : typeof t == "object" ? Ns(t) : O(yo, null, String(t))
}
function Ns(t) {
    return t.el === null && t.patchFlag !== -1 || t.memo ? t : Ei(t)
}
function G_(t, e) {
    let r = 0;
    const {shapeFlag: n} = t;
    if (e == null)
        e = null;
    else if (Ve(e))
        r = 16;
    else if (typeof e == "object")
        if (n & 65) {
            const i = e.default;
            i && (i._c && (i._d = !1),
            G_(t, i()),
            i._c && (i._d = !0));
            return
        } else {
            r = 32;
            const i = e._;
            !i && !(kp in e) ? e._ctx = cr : i === 3 && cr && (cr.slots._ === 1 ? e._ = 1 : (e._ = 2,
            t.patchFlag |= 1024))
        }
    else
        He(e) ? (e = {
            default: e,
            _ctx: cr
        },
        r = 32) : (e = String(e),
        n & 64 ? (r = 16,
        e = [Rp(e)]) : r = 8);
    t.children = e,
    t.shapeFlag |= r
}
function st(...t) {
    const e = {};
    for (let r = 0; r < t.length; r++) {
        const n = t[r];
        for (const i in n)
            if (i === "class")
                e.class !== n.class && (e.class = Kf([e.class, n.class]));
            else if (i === "style")
                e.style = Xf([e.style, n.style]);
            else if (Wf(i)) {
                const o = e[i]
                  , s = n[i];
                s && o !== s && !(Ve(o) && o.includes(s)) && (e[i] = o ? [].concat(o, s) : s)
            } else
                i !== "" && (e[i] = n[i])
    }
    return e
}
function bn(t, e, r, n=null) {
    jn(t, e, 7, [r, n])
}
const RU = yB();
let MU = 0;
function MB(t, e, r) {
    const n = t.type
      , i = (e ? e.appContext : t.appContext) || RU
      , o = {
        uid: MU++,
        vnode: t,
        type: n,
        parent: e,
        appContext: i,
        root: null,
        next: null,
        subTree: null,
        effect: null,
        update: null,
        scope: new p_(!0),
        render: null,
        proxy: null,
        exposed: null,
        exposeProxy: null,
        withProxy: null,
        provides: e ? e.provides : Object.create(i.provides),
        accessCache: null,
        renderCache: [],
        components: null,
        directives: null,
        propsOptions: bB(n, i),
        emitsOptions: eB(n, i),
        emit: null,
        emitted: null,
        propsDefaults: Ct,
        inheritAttrs: n.inheritAttrs,
        ctx: Ct,
        data: Ct,
        props: Ct,
        attrs: Ct,
        slots: Ct,
        refs: Ct,
        setupState: Ct,
        setupContext: null,
        attrsProxy: null,
        slotsProxy: null,
        suspense: r,
        suspenseId: r ? r.pendingId : 0,
        asyncDep: null,
        asyncResolved: !1,
        isMounted: !1,
        isUnmounted: !1,
        isDeactivated: !1,
        bc: null,
        c: null,
        bm: null,
        m: null,
        bu: null,
        u: null,
        um: null,
        bum: null,
        da: null,
        a: null,
        rtg: null,
        rtc: null,
        ec: null,
        sp: null
    };
    return o.ctx = G$(o),
    o.root = e ? e.root : o,
    o.emit = f$.bind(null, o),
    t.ce && t.ce(o),
    o
}
let lr = null;
const Ot = () => lr || cr;
let H_, ql, C8 = "__VUE_INSTANCE_SETTERS__";
(ql = gx()[C8]) || (ql = gx()[C8] = []),
ql.push(t => lr = t),
H_ = t => {
    ql.length > 1 ? ql.forEach(e => e(t)) : ql[0](t)
}
;
const aa = t => {
    H_(t),
    t.scope.on()
}
  , ea = () => {
    lr && lr.scope.off(),
    H_(null)
}
  , NU = jf("slot,component");
function Xv(t, e) {
    const r = e.isNativeTag || G5;
    (NU(t) || r(t)) && ue("Do not use built-in or reserved HTML elements as component id: " + t)
}
function NB(t) {
    return t.vnode.shapeFlag & 4
}
let Kc = !1;
function LB(t, e=!1) {
    Kc = e;
    const {props: r, children: n} = t.vnode
      , i = NB(t);
    dU(t, r, i, e),
    _U(t, n);
    const o = i ? LU(t, e) : void 0;
    return Kc = !1,
    o
}
function LU(t, e) {
    var r;
    const n = t.type;
    {
        if (n.name && Xv(n.name, t.appContext.config),
        n.components) {
            const o = Object.keys(n.components);
            for (let s = 0; s < o.length; s++)
                Xv(o[s], t.appContext.config)
        }
        if (n.directives) {
            const o = Object.keys(n.directives);
            for (let s = 0; s < o.length; s++)
                oB(o[s])
        }
        n.compilerOptions && V_() && ue('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')
    }
    t.accessCache = Object.create(null),
    t.proxy = uo(new Proxy(t.ctx,F0)),
    H$(t);
    const {setup: i} = n;
    if (i) {
        const o = t.setupContext = i.length > 1 ? UB(t) : null;
        aa(t),
        Nl();
        const s = xo(i, t, 0, [wc(t.props), o]);
        if (Ll(),
        ea(),
        Ap(s)) {
            if (s.then(ea, ea),
            e)
                return s.then(a => {
                    Kv(t, a, e)
                }
                ).catch(a => {
                    Ul(a, t, 0)
                }
                );
            if (t.asyncDep = s,
            !t.suspense) {
                const a = (r = n.name) != null ? r : "Anonymous";
                ue(`Component <${a}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)
            }
        } else
            Kv(t, s, e)
    } else
        $B(t, e)
}
function Kv(t, e, r) {
    He(e) ? t.type.__ssrInlineRender ? t.ssrRender = e : t.render = e : Bt(e) ? (Eo(e) && ue("setup() should not return VNodes directly - return a render function instead."),
    t.devtoolsRawSetupState = e,
    t.setupState = __(e),
    V$(t)) : e !== void 0 && ue(`setup() should return an object. Received: ${e === null ? "null" : typeof e}`),
    $B(t, r)
}
let I0, qv;
function $U(t) {
    I0 = t,
    qv = e => {
        e.render._rc && (e.withProxy = new Proxy(e.ctx,U$))
    }
}
const V_ = () => !I0;
function $B(t, e, r) {
    const n = t.type;
    if (!t.render) {
        if (!e && I0 && !n.render) {
            const i = n.template || N_(t).template;
            if (i) {
                Uo(t, "compile");
                const {isCustomElement: o, compilerOptions: s} = t.appContext.config
                  , {delimiters: a, compilerOptions: l} = n
                  , c = Xt(Xt({
                    isCustomElement: o,
                    delimiters: a
                }, s), l);
                n.render = I0(i, c),
                Go(t, "compile")
            }
        }
        t.render = n.render || Tn,
        qv && qv(t)
    }
    aa(t),
    Nl(),
    oU(t),
    Ll(),
    ea(),
    !n.render && t.render === Tn && !e && (!I0 && n.template ? ue('Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".') : ue("Component is missing template or render function."))
}
function UU(t) {
    return t.attrsProxy || (t.attrsProxy = new Proxy(t.attrs,{
        get(e, r) {
            return vx(),
            rn(t, "get", "$attrs"),
            e[r]
        },
        set() {
            return ue("setupContext.attrs is readonly."),
            !1
        },
        deleteProperty() {
            return ue("setupContext.attrs is readonly."),
            !1
        }
    }))
}
function GU(t) {
    return t.slotsProxy || (t.slotsProxy = new Proxy(t.slots,{
        get(e, r) {
            return rn(t, "get", "$slots"),
            e[r]
        }
    }))
}
function UB(t) {
    return Object.freeze({
        get attrs() {
            return UU(t)
        },
        get slots() {
            return GU(t)
        },
        get emit() {
            return (r, ...n) => t.emit(r, ...n)
        },
        expose: r => {
            if (t.exposed && ue("expose() should be called only once per setup()."),
            r != null) {
                let n = typeof r;
                n === "object" && (Ve(r) ? n = "array" : xt(r) && (n = "ref")),
                n !== "object" && ue(`expose() should be passed a plain object, received ${n}.`)
            }
            t.exposed = r || {}
        }
    })
}
function Mp(t) {
    if (t.exposed)
        return t.exposeProxy || (t.exposeProxy = new Proxy(__(uo(t.exposed)),{
            get(e, r) {
                if (r in e)
                    return e[r];
                if (r in ll)
                    return ll[r](t)
            },
            has(e, r) {
                return r in e || r in ll
            }
        }))
}
const HU = /(?:^|[-_])(\w)/g
  , VU = t => t.replace(HU, e => e.toUpperCase()).replace(/[-_]/g, "");
function ff(t, e=!0) {
    return He(t) ? t.displayName || t.name : t.name || e && t.__name
}
function Np(t, e, r=!1) {
    let n = ff(e);
    if (!n && e.__file) {
        const i = e.__file.match(/([^/\\]+)\.\w+$/);
        i && (n = i[1])
    }
    if (!n && t && t.parent) {
        const i = o => {
            for (const s in o)
                if (o[s] === e)
                    return s
        }
        ;
        n = i(t.components || t.parent.type.components) || i(t.appContext.components)
    }
    return n ? VU(n) : r ? "App" : "Anonymous"
}
function GB(t) {
    return He(t) && "__vccOpts"in t
}
const ae = (t, e) => SL(t, e, Kc);
function Or(t, e, r) {
    const n = arguments.length;
    return n === 2 ? Bt(e) && !Ve(e) ? Eo(e) ? O(t, null, [e]) : O(t, e) : O(t, null, e) : (n > 3 ? r = Array.prototype.slice.call(arguments, 2) : n === 3 && Eo(r) && (r = [r]),
    O(t, e, r))
}
const HB = Symbol.for("v-scx")
  , VB = () => {
    {
        const t = dr(HB);
        return t || ue("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),
        t
    }
}
;
function eg(t) {
    return !!(t && t.__v_isShallow)
}
function zB() {
    if (typeof window > "u")
        return;
    const t = {
        style: "color:#3ba776"
    }
      , e = {
        style: "color:#0b1bc9"
    }
      , r = {
        style: "color:#b62e24"
    }
      , n = {
        style: "color:#9d288c"
    }
      , i = {
        header(f) {
            return Bt(f) ? f.__isVue ? ["div", t, "VueInstance"] : xt(f) ? ["div", {}, ["span", t, u(f)], "<", a(f.value), ">"] : Ni(f) ? ["div", {}, ["span", t, eg(f) ? "ShallowReactive" : "Reactive"], "<", a(f), `>${fs(f) ? " (readonly)" : ""}`] : fs(f) ? ["div", {}, ["span", t, eg(f) ? "ShallowReadonly" : "Readonly"], "<", a(f), ">"] : null : null
        },
        hasBody(f) {
            return f && f.__isVue
        },
        body(f) {
            if (f && f.__isVue)
                return ["div", {}, ...o(f.$)]
        }
    };
    function o(f) {
        const d = [];
        f.type.props && f.props && d.push(s("props", Le(f.props))),
        f.setupState !== Ct && d.push(s("setup", f.setupState)),
        f.data !== Ct && d.push(s("data", Le(f.data)));
        const h = l(f, "computed");
        h && d.push(s("computed", h));
        const x = l(f, "inject");
        return x && d.push(s("injected", x)),
        d.push(["div", {}, ["span", {
            style: n.style + ";opacity:0.66"
        }, "$ (internal): "], ["object", {
            object: f
        }]]),
        d
    }
    function s(f, d) {
        return d = Xt({}, d),
        Object.keys(d).length ? ["div", {
            style: "line-height:1.25em;margin-bottom:0.6em"
        }, ["div", {
            style: "color:#476582"
        }, f], ["div", {
            style: "padding-left:1.25em"
        }, ...Object.keys(d).map(h => ["div", {}, ["span", n, h + ": "], a(d[h], !1)])]] : ["span", {}]
    }
    function a(f, d=!0) {
        return typeof f == "number" ? ["span", e, f] : typeof f == "string" ? ["span", r, JSON.stringify(f)] : typeof f == "boolean" ? ["span", n, f] : Bt(f) ? ["object", {
            object: d ? Le(f) : f
        }] : ["span", r, String(f)]
    }
    function l(f, d) {
        const h = f.type;
        if (He(h))
            return;
        const x = {};
        for (const y in f.ctx)
            c(h, y, d) && (x[y] = f.ctx[y]);
        return x
    }
    function c(f, d, h) {
        const x = f[h];
        if (Ve(x) && x.includes(d) || Bt(x) && d in x || f.extends && c(f.extends, d, h) || f.mixins && f.mixins.some(y => c(y, d, h)))
            return !0
    }
    function u(f) {
        return eg(f) ? "ShallowRef" : f.effect ? "ComputedRef" : "Ref"
    }
    window.devtoolsFormatters ? window.devtoolsFormatters.push(i) : window.devtoolsFormatters = [i]
}
function zU(t, e, r, n) {
    const i = r[n];
    if (i && jB(i, t))
        return i;
    const o = e();
    return o.memo = t.slice(),
    r[n] = o
}
function jB(t, e) {
    const r = t.memo;
    if (r.length != e.length)
        return !1;
    for (let n = 0; n < r.length; n++)
        if (kv(r[n], e[n]))
            return !1;
    return vl > 0 && Dn && Dn.push(t),
    !0
}
const Zv = "3.3.4"
  , jU = {
    createComponentInstance: MB,
    setupComponent: LB,
    renderComponentRoot: Lh,
    setCurrentRenderingInstance: af,
    isVNode: Eo,
    normalizeVNode: wn
}
  , WU = jU
  , YU = null
  , XU = null;
function z_(t, e) {
    const r = Object.create(null)
      , n = t.split(",");
    for (let i = 0; i < n.length; i++)
        r[n[i]] = !0;
    return e ? i => !!r[i.toLowerCase()] : i => !!r[i]
}
const tg = Object.freeze({})
  , KU = /^on[^a-z]/
  , qU = t => KU.test(t)
  , ZU = t => t.startsWith("onUpdate:")
  , Qf = Object.assign
  , On = Array.isArray
  , ed = t => YB(t) === "[object Set]"
  , A8 = t => YB(t) === "[object Date]"
  , WB = t => typeof t == "function"
  , df = t => typeof t == "string"
  , w8 = t => typeof t == "symbol"
  , Jv = t => t !== null && typeof t == "object"
  , JU = Object.prototype.toString
  , YB = t => JU.call(t)
  , j_ = t => {
    const e = Object.create(null);
    return r => e[r] || (e[r] = t(r))
}
  , QU = /-(\w)/g
  , rg = j_(t => t.replace(QU, (e, r) => r ? r.toUpperCase() : ""))
  , eG = /\B([A-Z])/g
  , Gs = j_(t => t.replace(eG, "-$1").toLowerCase())
  , tG = j_(t => t.charAt(0).toUpperCase() + t.slice(1))
  , rG = (t, e) => {
    for (let r = 0; r < t.length; r++)
        t[r](e)
}
  , Qv = t => {
    const e = parseFloat(t);
    return isNaN(e) ? t : e
}
  , ey = t => {
    const e = df(t) ? Number(t) : NaN;
    return isNaN(e) ? t : e
}
  , nG = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"
  , iG = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"
  , oG = z_(nG)
  , sG = z_(iG)
  , aG = "itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly"
  , lG = z_(aG);
function XB(t) {
    return !!t || t === ""
}
function cG(t, e) {
    if (t.length !== e.length)
        return !1;
    let r = !0;
    for (let n = 0; r && n < t.length; n++)
        r = la(t[n], e[n]);
    return r
}
function la(t, e) {
    if (t === e)
        return !0;
    let r = A8(t)
      , n = A8(e);
    if (r || n)
        return r && n ? t.getTime() === e.getTime() : !1;
    if (r = w8(t),
    n = w8(e),
    r || n)
        return t === e;
    if (r = On(t),
    n = On(e),
    r || n)
        return r && n ? cG(t, e) : !1;
    if (r = Jv(t),
    n = Jv(e),
    r || n) {
        if (!r || !n)
            return !1;
        const i = Object.keys(t).length
          , o = Object.keys(e).length;
        if (i !== o)
            return !1;
        for (const s in t) {
            const a = t.hasOwnProperty(s)
              , l = e.hasOwnProperty(s);
            if (a && !l || !a && l || !la(t[s], e[s]))
                return !1
        }
    }
    return String(t) === String(e)
}
function Lp(t, e) {
    return t.findIndex(r => la(r, e))
}
const uG = "http://www.w3.org/2000/svg"
  , ja = typeof document < "u" ? document : null
  , B8 = ja && ja.createElement("template")
  , fG = {
    insert: (t, e, r) => {
        e.insertBefore(t, r || null)
    }
    ,
    remove: t => {
        const e = t.parentNode;
        e && e.removeChild(t)
    }
    ,
    createElement: (t, e, r, n) => {
        const i = e ? ja.createElementNS(uG, t) : ja.createElement(t, r ? {
            is: r
        } : void 0);
        return t === "select" && n && n.multiple != null && i.setAttribute("multiple", n.multiple),
        i
    }
    ,
    createText: t => ja.createTextNode(t),
    createComment: t => ja.createComment(t),
    setText: (t, e) => {
        t.nodeValue = e
    }
    ,
    setElementText: (t, e) => {
        t.textContent = e
    }
    ,
    parentNode: t => t.parentNode,
    nextSibling: t => t.nextSibling,
    querySelector: t => ja.querySelector(t),
    setScopeId(t, e) {
        t.setAttribute(e, "")
    },
    insertStaticContent(t, e, r, n, i, o) {
        const s = r ? r.previousSibling : e.lastChild;
        if (i && (i === o || i.nextSibling))
            for (; e.insertBefore(i.cloneNode(!0), r),
            !(i === o || !(i = i.nextSibling)); )
                ;
        else {
            B8.innerHTML = n ? `<svg>${t}</svg>` : t;
            const a = B8.content;
            if (n) {
                const l = a.firstChild;
                for (; l.firstChild; )
                    a.appendChild(l.firstChild);
                a.removeChild(l)
            }
            e.insertBefore(a, r)
        }
        return [s ? s.nextSibling : e.firstChild, r ? r.previousSibling : e.lastChild]
    }
};
function dG(t, e, r) {
    const n = t._vtc;
    n && (e = (e ? [e, ...n] : [...n]).join(" ")),
    e == null ? t.removeAttribute("class") : r ? t.setAttribute("class", e) : t.className = e
}
function hG(t, e, r) {
    const n = t.style
      , i = df(r);
    if (r && !i) {
        if (e && !df(e))
            for (const o in e)
                r[o] == null && ty(n, o, "");
        for (const o in r)
            ty(n, o, r[o])
    } else {
        const o = n.display;
        i ? e !== r && (n.cssText = r) : e && t.removeAttribute("style"),
        "_vod"in t && (n.display = o)
    }
}
const xG = /[^\\];\s*$/
  , S8 = /\s*!important$/;
function ty(t, e, r) {
    if (On(r))
        r.forEach(n => ty(t, e, n));
    else if (r == null && (r = ""),
    xG.test(r) && ue(`Unexpected semicolon at the end of '${e}' style value: '${r}'`),
    e.startsWith("--"))
        t.setProperty(e, r);
    else {
        const n = pG(t, e);
        S8.test(r) ? t.setProperty(Gs(n), r.replace(S8, ""), "important") : t[n] = r
    }
}
const T8 = ["Webkit", "Moz", "ms"]
  , ng = {};
function pG(t, e) {
    const r = ng[e];
    if (r)
        return r;
    let n = Ui(e);
    if (n !== "filter" && n in t)
        return ng[e] = n;
    n = tG(n);
    for (let i = 0; i < T8.length; i++) {
        const o = T8[i] + n;
        if (o in t)
            return ng[e] = o
    }
    return e
}
const D8 = "http://www.w3.org/1999/xlink";
function gG(t, e, r, n, i) {
    if (n && e.startsWith("xlink:"))
        r == null ? t.removeAttributeNS(D8, e.slice(6, e.length)) : t.setAttributeNS(D8, e, r);
    else {
        const o = lG(e);
        r == null || o && !XB(r) ? t.removeAttribute(e) : t.setAttribute(e, o ? "" : r)
    }
}
function mG(t, e, r, n, i, o, s) {
    if (e === "innerHTML" || e === "textContent") {
        n && s(n, i, o),
        t[e] = r ?? "";
        return
    }
    const a = t.tagName;
    if (e === "value" && a !== "PROGRESS" && !a.includes("-")) {
        t._value = r;
        const c = a === "OPTION" ? t.getAttribute("value") : t.value
          , u = r ?? "";
        c !== u && (t.value = u),
        r == null && t.removeAttribute(e);
        return
    }
    let l = !1;
    if (r === "" || r == null) {
        const c = typeof t[e];
        c === "boolean" ? r = XB(r) : r == null && c === "string" ? (r = "",
        l = !0) : c === "number" && (r = 0,
        l = !0)
    }
    try {
        t[e] = r
    } catch (c) {
        l || ue(`Failed setting prop "${e}" on <${a.toLowerCase()}>: value ${r} is invalid.`, c)
    }
    l && t.removeAttribute(e)
}
function qo(t, e, r, n) {
    t.addEventListener(e, r, n)
}
function vG(t, e, r, n) {
    t.removeEventListener(e, r, n)
}
function yG(t, e, r, n, i=null) {
    const o = t._vei || (t._vei = {})
      , s = o[e];
    if (n && s)
        s.value = n;
    else {
        const [a,l] = EG(e);
        if (n) {
            const c = o[e] = CG(n, i);
            qo(t, a, c, l)
        } else
            s && (vG(t, a, s, l),
            o[e] = void 0)
    }
}
const F8 = /(?:Once|Passive|Capture)$/;
function EG(t) {
    let e;
    if (F8.test(t)) {
        e = {};
        let n;
        for (; n = t.match(F8); )
            t = t.slice(0, t.length - n[0].length),
            e[n[0].toLowerCase()] = !0
    }
    return [t[2] === ":" ? t.slice(3) : Gs(t.slice(2)), e]
}
let ig = 0;
const _G = Promise.resolve()
  , bG = () => ig || (_G.then( () => ig = 0),
ig = Date.now());
function CG(t, e) {
    const r = n => {
        if (!n._vts)
            n._vts = Date.now();
        else if (n._vts <= r.attached)
            return;
        jn(AG(n, r.value), e, 5, [n])
    }
    ;
    return r.value = t,
    r.attached = bG(),
    r
}
function AG(t, e) {
    if (On(e)) {
        const r = t.stopImmediatePropagation;
        return t.stopImmediatePropagation = () => {
            r.call(t),
            t._stopped = !0
        }
        ,
        e.map(n => i => !i._stopped && n && n(i))
    } else
        return e
}
const P8 = /^on[a-z]/
  , wG = (t, e, r, n, i=!1, o, s, a, l) => {
    e === "class" ? dG(t, n, i) : e === "style" ? hG(t, r, n) : qU(e) ? ZU(e) || yG(t, e, r, n, s) : (e[0] === "." ? (e = e.slice(1),
    !0) : e[0] === "^" ? (e = e.slice(1),
    !1) : BG(t, e, n, i)) ? mG(t, e, n, o, s, a, l) : (e === "true-value" ? t._trueValue = n : e === "false-value" && (t._falseValue = n),
    gG(t, e, n, i))
}
;
function BG(t, e, r, n) {
    return n ? !!(e === "innerHTML" || e === "textContent" || e in t && P8.test(e) && WB(r)) : e === "spellcheck" || e === "draggable" || e === "translate" || e === "form" || e === "list" && t.tagName === "INPUT" || e === "type" && t.tagName === "TEXTAREA" || P8.test(e) && df(r) ? !1 : e in t
}
function KB(t, e) {
    const r = be(t);
    class n extends $p {
        constructor(o) {
            super(r, o, e)
        }
    }
    return n.def = r,
    n
}
const SG = t => KB(t, fS)
  , TG = typeof HTMLElement < "u" ? HTMLElement : class {
}
;
class $p extends TG {
    constructor(e, r={}, n) {
        super(),
        this._def = e,
        this._props = r,
        this._instance = null,
        this._connected = !1,
        this._resolved = !1,
        this._numberProps = null,
        this.shadowRoot && n ? n(this._createVNode(), this.shadowRoot) : (this.shadowRoot && ue("Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use `defineSSRCustomElement`."),
        this.attachShadow({
            mode: "open"
        }),
        this._def.__asyncLoader || this._resolveProps(this._def))
    }
    connectedCallback() {
        this._connected = !0,
        this._instance || (this._resolved ? this._update() : this._resolveDef())
    }
    disconnectedCallback() {
        this._connected = !1,
        Xe( () => {
            this._connected || (iy(null, this.shadowRoot),
            this._instance = null)
        }
        )
    }
    _resolveDef() {
        this._resolved = !0;
        for (let n = 0; n < this.attributes.length; n++)
            this._setAttr(this.attributes[n].name);
        new MutationObserver(n => {
            for (const i of n)
                this._setAttr(i.attributeName)
        }
        ).observe(this, {
            attributes: !0
        });
        const e = (n, i=!1) => {
            const {props: o, styles: s} = n;
            let a;
            if (o && !On(o))
                for (const l in o) {
                    const c = o[l];
                    (c === Number || c && c.type === Number) && (l in this._props && (this._props[l] = ey(this._props[l])),
                    (a || (a = Object.create(null)))[rg(l)] = !0)
                }
            this._numberProps = a,
            i && this._resolveProps(n),
            this._applyStyles(s),
            this._update()
        }
          , r = this._def.__asyncLoader;
        r ? r().then(n => e(n, !0)) : e(this._def)
    }
    _resolveProps(e) {
        const {props: r} = e
          , n = On(r) ? r : Object.keys(r || {});
        for (const i of Object.keys(this))
            i[0] !== "_" && n.includes(i) && this._setProp(i, this[i], !0, !1);
        for (const i of n.map(rg))
            Object.defineProperty(this, i, {
                get() {
                    return this._getProp(i)
                },
                set(o) {
                    this._setProp(i, o)
                }
            })
    }
    _setAttr(e) {
        let r = this.getAttribute(e);
        const n = rg(e);
        this._numberProps && this._numberProps[n] && (r = ey(r)),
        this._setProp(n, r, !1)
    }
    _getProp(e) {
        return this._props[e]
    }
    _setProp(e, r, n=!0, i=!0) {
        r !== this._props[e] && (this._props[e] = r,
        i && this._instance && this._update(),
        n && (r === !0 ? this.setAttribute(Gs(e), "") : typeof r == "string" || typeof r == "number" ? this.setAttribute(Gs(e), r + "") : r || this.removeAttribute(Gs(e))))
    }
    _update() {
        iy(this._createVNode(), this.shadowRoot)
    }
    _createVNode() {
        const e = O(this._def, Qf({}, this._props));
        return this._instance || (e.ce = r => {
            this._instance = r,
            r.isCE = !0,
            r.ceReload = o => {
                this._styles && (this._styles.forEach(s => this.shadowRoot.removeChild(s)),
                this._styles.length = 0),
                this._applyStyles(o),
                this._instance = null,
                this._update()
            }
            ;
            const n = (o, s) => {
                this.dispatchEvent(new CustomEvent(o,{
                    detail: s
                }))
            }
            ;
            r.emit = (o, ...s) => {
                n(o, s),
                Gs(o) !== o && n(Gs(o), s)
            }
            ;
            let i = this;
            for (; i = i && (i.parentNode || i.host); )
                if (i instanceof $p) {
                    r.parent = i._instance,
                    r.provides = i._instance.provides;
                    break
                }
        }
        ),
        e
    }
    _applyStyles(e) {
        e && e.forEach(r => {
            const n = document.createElement("style");
            n.textContent = r,
            this.shadowRoot.appendChild(n),
            (this._styles || (this._styles = [])).push(n)
        }
        )
    }
}
function DG(t="$style") {
    {
        const e = Ot();
        if (!e)
            return ue("useCssModule must be called inside setup()"),
            tg;
        const r = e.type.__cssModules;
        if (!r)
            return ue("Current instance does not have CSS modules injected."),
            tg;
        const n = r[t];
        return n || (ue(`Current instance does not have CSS module named "${t}".`),
        tg)
    }
}
function FG(t) {
    const e = Ot();
    if (!e) {
        ue("useCssVars is called without current active component instance.");
        return
    }
    const r = e.ut = (i=t(e.proxy)) => {
        Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(o => ny(o, i))
    }
      , n = () => {
        const i = t(e.proxy);
        ry(e.subTree, i),
        r(i)
    }
    ;
    nB(n),
    Ht( () => {
        const i = new MutationObserver(n);
        i.observe(e.subTree.el.parentNode, {
            childList: !0
        }),
        _s( () => i.disconnect())
    }
    )
}
function ry(t, e) {
    if (t.shapeFlag & 128) {
        const r = t.suspense;
        t = r.activeBranch,
        r.pendingBranch && !r.isHydrating && r.effects.push( () => {
            ry(r.activeBranch, e)
        }
        )
    }
    for (; t.component; )
        t = t.component.subTree;
    if (t.shapeFlag & 1 && t.el)
        ny(t.el, e);
    else if (t.type === Nt)
        t.children.forEach(r => ry(r, e));
    else if (t.type === Qs) {
        let {el: r, anchor: n} = t;
        for (; r && (ny(r, e),
        r !== n); )
            r = r.nextSibling
    }
}
function ny(t, e) {
    if (t.nodeType === 1) {
        const r = t.style;
        for (const n in e)
            r.setProperty(`--${n}`, e[n])
    }
}
const Ss = "transition"
  , Gu = "animation"
  , td = (t, {slots: e}) => Or(sB, ZB(t), e);
td.displayName = "Transition";
const qB = {
    name: String,
    type: String,
    css: {
        type: Boolean,
        default: !0
    },
    duration: [String, Number, Object],
    enterFromClass: String,
    enterActiveClass: String,
    enterToClass: String,
    appearFromClass: String,
    appearActiveClass: String,
    appearToClass: String,
    leaveFromClass: String,
    leaveActiveClass: String,
    leaveToClass: String
}
  , PG = td.props = Qf({}, k_, qB)
  , Ta = (t, e=[]) => {
    On(t) ? t.forEach(r => r(...e)) : t && t(...e)
}
  , I8 = t => t ? On(t) ? t.some(e => e.length > 1) : t.length > 1 : !1;
function ZB(t) {
    const e = {};
    for (const S in t)
        S in qB || (e[S] = t[S]);
    if (t.css === !1)
        return e;
    const {name: r="v", type: n, duration: i, enterFromClass: o=`${r}-enter-from`, enterActiveClass: s=`${r}-enter-active`, enterToClass: a=`${r}-enter-to`, appearFromClass: l=o, appearActiveClass: c=s, appearToClass: u=a, leaveFromClass: f=`${r}-leave-from`, leaveActiveClass: d=`${r}-leave-active`, leaveToClass: h=`${r}-leave-to`} = t
      , x = IG(i)
      , y = x && x[0]
      , m = x && x[1]
      , {onBeforeEnter: E, onEnter: g, onEnterCancelled: p, onLeave: v, onLeaveCancelled: _, onBeforeAppear: b=E, onAppear: C=g, onAppearCancelled: w=p} = e
      , T = (S, D, F) => {
        Rs(S, D ? u : a),
        Rs(S, D ? c : s),
        F && F()
    }
      , A = (S, D) => {
        S._isLeaving = !1,
        Rs(S, f),
        Rs(S, h),
        Rs(S, d),
        D && D()
    }
      , B = S => (D, F) => {
        const R = S ? C : g
          , P = () => T(D, S, F);
        Ta(R, [D, P]),
        O8( () => {
            Rs(D, S ? l : o),
            Ho(D, S ? u : a),
            I8(R) || k8(D, n, y, P)
        }
        )
    }
    ;
    return Qf(e, {
        onBeforeEnter(S) {
            Ta(E, [S]),
            Ho(S, o),
            Ho(S, s)
        },
        onBeforeAppear(S) {
            Ta(b, [S]),
            Ho(S, l),
            Ho(S, c)
        },
        onEnter: B(!1),
        onAppear: B(!0),
        onLeave(S, D) {
            S._isLeaving = !0;
            const F = () => A(S, D);
            Ho(S, f),
            QB(),
            Ho(S, d),
            O8( () => {
                S._isLeaving && (Rs(S, f),
                Ho(S, h),
                I8(v) || k8(S, n, m, F))
            }
            ),
            Ta(v, [S, F])
        },
        onEnterCancelled(S) {
            T(S, !1),
            Ta(p, [S])
        },
        onAppearCancelled(S) {
            T(S, !0),
            Ta(w, [S])
        },
        onLeaveCancelled(S) {
            A(S),
            Ta(_, [S])
        }
    })
}
function IG(t) {
    if (t == null)
        return null;
    if (Jv(t))
        return [og(t.enter), og(t.leave)];
    {
        const e = og(t);
        return [e, e]
    }
}
function og(t) {
    const e = ey(t);
    return C_(e, "<transition> explicit duration"),
    e
}
function Ho(t, e) {
    e.split(/\s+/).forEach(r => r && t.classList.add(r)),
    (t._vtc || (t._vtc = new Set)).add(e)
}
function Rs(t, e) {
    e.split(/\s+/).forEach(n => n && t.classList.remove(n));
    const {_vtc: r} = t;
    r && (r.delete(e),
    r.size || (t._vtc = void 0))
}
function O8(t) {
    requestAnimationFrame( () => {
        requestAnimationFrame(t)
    }
    )
}
let OG = 0;
function k8(t, e, r, n) {
    const i = t._endId = ++OG
      , o = () => {
        i === t._endId && n()
    }
    ;
    if (r)
        return setTimeout(o, r);
    const {type: s, timeout: a, propCount: l} = JB(t, e);
    if (!s)
        return n();
    const c = s + "end";
    let u = 0;
    const f = () => {
        t.removeEventListener(c, d),
        o()
    }
      , d = h => {
        h.target === t && ++u >= l && f()
    }
    ;
    setTimeout( () => {
        u < l && f()
    }
    , a + 1),
    t.addEventListener(c, d)
}
function JB(t, e) {
    const r = window.getComputedStyle(t)
      , n = x => (r[x] || "").split(", ")
      , i = n(`${Ss}Delay`)
      , o = n(`${Ss}Duration`)
      , s = R8(i, o)
      , a = n(`${Gu}Delay`)
      , l = n(`${Gu}Duration`)
      , c = R8(a, l);
    let u = null
      , f = 0
      , d = 0;
    e === Ss ? s > 0 && (u = Ss,
    f = s,
    d = o.length) : e === Gu ? c > 0 && (u = Gu,
    f = c,
    d = l.length) : (f = Math.max(s, c),
    u = f > 0 ? s > c ? Ss : Gu : null,
    d = u ? u === Ss ? o.length : l.length : 0);
    const h = u === Ss && /\b(transform|all)(,|$)/.test(n(`${Ss}Property`).toString());
    return {
        type: u,
        timeout: f,
        propCount: d,
        hasTransform: h
    }
}
function R8(t, e) {
    for (; t.length < e.length; )
        t = t.concat(t);
    return Math.max(...e.map( (r, n) => M8(r) + M8(t[n])))
}
function M8(t) {
    return Number(t.slice(0, -1).replace(",", ".")) * 1e3
}
function QB() {
    return document.body.offsetHeight
}
const eS = new WeakMap
  , tS = new WeakMap
  , rS = {
    name: "TransitionGroup",
    props: Qf({}, PG, {
        tag: String,
        moveClass: String
    }),
    setup(t, {slots: e}) {
        const r = Ot()
          , n = O_();
        let i, o;
        return Gl( () => {
            if (!i.length)
                return;
            const s = t.moveClass || `${t.name || "v"}-move`;
            if (!$G(i[0].el, r.vnode.el, s))
                return;
            i.forEach(MG),
            i.forEach(NG);
            const a = i.filter(LG);
            QB(),
            a.forEach(l => {
                const c = l.el
                  , u = c.style;
                Ho(c, s),
                u.transform = u.webkitTransform = u.transitionDuration = "";
                const f = c._moveCb = d => {
                    d && d.target !== c || (!d || /transform$/.test(d.propertyName)) && (c.removeEventListener("transitionend", f),
                    c._moveCb = null,
                    Rs(c, s))
                }
                ;
                c.addEventListener("transitionend", f)
            }
            )
        }
        ),
        () => {
            const s = Le(t)
              , a = ZB(s);
            let l = s.tag || Nt;
            i = o,
            o = e.default ? Dp(e.default()) : [];
            for (let c = 0; c < o.length; c++) {
                const u = o[c];
                u.key != null ? ml(u, Xc(u, a, n, r)) : ue("<TransitionGroup> children must be keyed.")
            }
            if (i)
                for (let c = 0; c < i.length; c++) {
                    const u = i[c];
                    ml(u, Xc(u, a, n, r)),
                    eS.set(u, u.el.getBoundingClientRect())
                }
            return O(l, null, o)
        }
    }
}
  , kG = t => delete t.mode;
rS.props;
const RG = rS;
function MG(t) {
    const e = t.el;
    e._moveCb && e._moveCb(),
    e._enterCb && e._enterCb()
}
function NG(t) {
    tS.set(t, t.el.getBoundingClientRect())
}
function LG(t) {
    const e = eS.get(t)
      , r = tS.get(t)
      , n = e.left - r.left
      , i = e.top - r.top;
    if (n || i) {
        const o = t.el.style;
        return o.transform = o.webkitTransform = `translate(${n}px,${i}px)`,
        o.transitionDuration = "0s",
        t
    }
}
function $G(t, e, r) {
    const n = t.cloneNode();
    t._vtc && t._vtc.forEach(s => {
        s.split(/\s+/).forEach(a => a && n.classList.remove(a))
    }
    ),
    r.split(/\s+/).forEach(s => s && n.classList.add(s)),
    n.style.display = "none";
    const i = e.nodeType === 1 ? e : e.parentNode;
    i.appendChild(n);
    const {hasTransform: o} = JB(n);
    return i.removeChild(n),
    o
}
const ca = t => {
    const e = t.props["onUpdate:modelValue"] || !1;
    return On(e) ? r => rG(e, r) : e
}
;
function UG(t) {
    t.target.composing = !0
}
function N8(t) {
    const e = t.target;
    e.composing && (e.composing = !1,
    e.dispatchEvent(new Event("input")))
}
const Ax = {
    created(t, {modifiers: {lazy: e, trim: r, number: n}}, i) {
        t._assign = ca(i);
        const o = n || i.props && i.props.type === "number";
        qo(t, e ? "change" : "input", s => {
            if (s.target.composing)
                return;
            let a = t.value;
            r && (a = a.trim()),
            o && (a = Qv(a)),
            t._assign(a)
        }
        ),
        r && qo(t, "change", () => {
            t.value = t.value.trim()
        }
        ),
        e || (qo(t, "compositionstart", UG),
        qo(t, "compositionend", N8),
        qo(t, "change", N8))
    },
    mounted(t, {value: e}) {
        t.value = e ?? ""
    },
    beforeUpdate(t, {value: e, modifiers: {lazy: r, trim: n, number: i}}, o) {
        if (t._assign = ca(o),
        t.composing || document.activeElement === t && t.type !== "range" && (r || n && t.value.trim() === e || (i || t.type === "number") && Qv(t.value) === e))
            return;
        const s = e ?? "";
        t.value !== s && (t.value = s)
    }
}
  , W_ = {
    deep: !0,
    created(t, e, r) {
        t._assign = ca(r),
        qo(t, "change", () => {
            const n = t._modelValue
              , i = qc(t)
              , o = t.checked
              , s = t._assign;
            if (On(n)) {
                const a = Lp(n, i)
                  , l = a !== -1;
                if (o && !l)
                    s(n.concat(i));
                else if (!o && l) {
                    const c = [...n];
                    c.splice(a, 1),
                    s(c)
                }
            } else if (ed(n)) {
                const a = new Set(n);
                o ? a.add(i) : a.delete(i),
                s(a)
            } else
                s(iS(t, o))
        }
        )
    },
    mounted: L8,
    beforeUpdate(t, e, r) {
        t._assign = ca(r),
        L8(t, e, r)
    }
};
function L8(t, {value: e, oldValue: r}, n) {
    t._modelValue = e,
    On(e) ? t.checked = Lp(e, n.props.value) > -1 : ed(e) ? t.checked = e.has(n.props.value) : e !== r && (t.checked = la(e, iS(t, !0)))
}
const Y_ = {
    created(t, {value: e}, r) {
        t.checked = la(e, r.props.value),
        t._assign = ca(r),
        qo(t, "change", () => {
            t._assign(qc(t))
        }
        )
    },
    beforeUpdate(t, {value: e, oldValue: r}, n) {
        t._assign = ca(n),
        e !== r && (t.checked = la(e, n.props.value))
    }
}
  , nS = {
    deep: !0,
    created(t, {value: e, modifiers: {number: r}}, n) {
        const i = ed(e);
        qo(t, "change", () => {
            const o = Array.prototype.filter.call(t.options, s => s.selected).map(s => r ? Qv(qc(s)) : qc(s));
            t._assign(t.multiple ? i ? new Set(o) : o : o[0])
        }
        ),
        t._assign = ca(n)
    },
    mounted(t, {value: e}) {
        $8(t, e)
    },
    beforeUpdate(t, e, r) {
        t._assign = ca(r)
    },
    updated(t, {value: e}) {
        $8(t, e)
    }
};
function $8(t, e) {
    const r = t.multiple;
    if (r && !On(e) && !ed(e)) {
        ue(`<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(e).slice(8, -1)}.`);
        return
    }
    for (let n = 0, i = t.options.length; n < i; n++) {
        const o = t.options[n]
          , s = qc(o);
        if (r)
            On(e) ? o.selected = Lp(e, s) > -1 : o.selected = e.has(s);
        else if (la(qc(o), e)) {
            t.selectedIndex !== n && (t.selectedIndex = n);
            return
        }
    }
    !r && t.selectedIndex !== -1 && (t.selectedIndex = -1)
}
function qc(t) {
    return "_value"in t ? t._value : t.value
}
function iS(t, e) {
    const r = e ? "_trueValue" : "_falseValue";
    return r in t ? t[r] : e
}
const oS = {
    created(t, e, r) {
        Ld(t, e, r, null, "created")
    },
    mounted(t, e, r) {
        Ld(t, e, r, null, "mounted")
    },
    beforeUpdate(t, e, r, n) {
        Ld(t, e, r, n, "beforeUpdate")
    },
    updated(t, e, r, n) {
        Ld(t, e, r, n, "updated")
    }
};
function sS(t, e) {
    switch (t) {
    case "SELECT":
        return nS;
    case "TEXTAREA":
        return Ax;
    default:
        switch (e) {
        case "checkbox":
            return W_;
        case "radio":
            return Y_;
        default:
            return Ax
        }
    }
}
function Ld(t, e, r, n, i) {
    const s = sS(t.tagName, r.props && r.props.type)[i];
    s && s(t, e, r, n)
}
function GG() {
    Ax.getSSRProps = ({value: t}) => ({
        value: t
    }),
    Y_.getSSRProps = ({value: t}, e) => {
        if (e.props && la(e.props.value, t))
            return {
                checked: !0
            }
    }
    ,
    W_.getSSRProps = ({value: t}, e) => {
        if (On(t)) {
            if (e.props && Lp(t, e.props.value) > -1)
                return {
                    checked: !0
                }
        } else if (ed(t)) {
            if (e.props && t.has(e.props.value))
                return {
                    checked: !0
                }
        } else if (t)
            return {
                checked: !0
            }
    }
    ,
    oS.getSSRProps = (t, e) => {
        if (typeof e.type != "string")
            return;
        const r = sS(e.type.toUpperCase(), e.props && e.props.type);
        if (r.getSSRProps)
            return r.getSSRProps(t, e)
    }
}
const HG = ["ctrl", "shift", "alt", "meta"]
  , VG = {
    stop: t => t.stopPropagation(),
    prevent: t => t.preventDefault(),
    self: t => t.target !== t.currentTarget,
    ctrl: t => !t.ctrlKey,
    shift: t => !t.shiftKey,
    alt: t => !t.altKey,
    meta: t => !t.metaKey,
    left: t => "button"in t && t.button !== 0,
    middle: t => "button"in t && t.button !== 1,
    right: t => "button"in t && t.button !== 2,
    exact: (t, e) => HG.some(r => t[`${r}Key`] && !e.includes(r))
}
  , zG = (t, e) => (r, ...n) => {
    for (let i = 0; i < e.length; i++) {
        const o = VG[e[i]];
        if (o && o(r, e))
            return
    }
    return t(r, ...n)
}
  , jG = {
    esc: "escape",
    space: " ",
    up: "arrow-up",
    left: "arrow-left",
    right: "arrow-right",
    down: "arrow-down",
    delete: "backspace"
}
  , aS = (t, e) => r => {
    if (!("key"in r))
        return;
    const n = Gs(r.key);
    if (e.some(i => i === n || jG[i] === n))
        return t(r)
}
  , pi = {
    beforeMount(t, {value: e}, {transition: r}) {
        t._vod = t.style.display === "none" ? "" : t.style.display,
        r && e ? r.beforeEnter(t) : Hu(t, e)
    },
    mounted(t, {value: e}, {transition: r}) {
        r && e && r.enter(t)
    },
    updated(t, {value: e, oldValue: r}, {transition: n}) {
        !e != !r && (n ? e ? (n.beforeEnter(t),
        Hu(t, !0),
        n.enter(t)) : n.leave(t, () => {
            Hu(t, !1)
        }
        ) : Hu(t, e))
    },
    beforeUnmount(t, {value: e}) {
        Hu(t, e)
    }
};
function Hu(t, e) {
    t.style.display = e ? t._vod : "none"
}
function WG() {
    pi.getSSRProps = ({value: t}) => {
        if (!t)
            return {
                style: {
                    display: "none"
                }
            }
    }
}
const lS = Qf({
    patchProp: wG
}, fG);
let O0, U8 = !1;
function cS() {
    return O0 || (O0 = SB(lS))
}
function uS() {
    return O0 = U8 ? O0 : TB(lS),
    U8 = !0,
    O0
}
const iy = (...t) => {
    cS().render(...t)
}
  , fS = (...t) => {
    uS().hydrate(...t)
}
  , dS = (...t) => {
    const e = cS().createApp(...t);
    hS(e),
    xS(e);
    const {mount: r} = e;
    return e.mount = n => {
        const i = pS(n);
        if (!i)
            return;
        const o = e._component;
        !WB(o) && !o.render && !o.template && (o.template = i.innerHTML),
        i.innerHTML = "";
        const s = r(i, !1, i instanceof SVGElement);
        return i instanceof Element && (i.removeAttribute("v-cloak"),
        i.setAttribute("data-v-app", "")),
        s
    }
    ,
    e
}
  , YG = (...t) => {
    const e = uS().createApp(...t);
    hS(e),
    xS(e);
    const {mount: r} = e;
    return e.mount = n => {
        const i = pS(n);
        if (i)
            return r(i, !0, i instanceof SVGElement)
    }
    ,
    e
}
;
function hS(t) {
    Object.defineProperty(t.config, "isNativeTag", {
        value: e => oG(e) || sG(e),
        writable: !1
    })
}
function xS(t) {
    if (V_()) {
        const e = t.config.isCustomElement;
        Object.defineProperty(t.config, "isCustomElement", {
            get() {
                return e
            },
            set() {
                ue("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")
            }
        });
        const r = t.config.compilerOptions
          , n = 'The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc';
        Object.defineProperty(t.config, "compilerOptions", {
            get() {
                return ue(n),
                r
            },
            set() {
                ue(n)
            }
        })
    }
}
function pS(t) {
    if (df(t)) {
        const e = document.querySelector(t);
        return e || ue(`Failed to mount app: mount target selector "${t}" returned null.`),
        e
    }
    return window.ShadowRoot && t instanceof window.ShadowRoot && t.mode === "closed" && ue('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),
    t
}
let G8 = !1;
const XG = () => {
    G8 || (G8 = !0,
    GG(),
    WG())
}
;
function KG() {
    zB()
}
KG();
const qG = () => {
    ue('Runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".')
}
  , oy = Object.freeze(Object.defineProperty({
    __proto__: null,
    BaseTransition: sB,
    BaseTransitionPropsValidators: k_,
    Comment: tr,
    EffectScope: p_,
    Fragment: Nt,
    KeepAlive: P$,
    ReactiveEffect: zf,
    Static: Qs,
    Suspense: E$,
    Teleport: Ip,
    Text: yo,
    Transition: td,
    TransitionGroup: RG,
    VueElement: $p,
    assertNumber: C_,
    callWithAsyncErrorHandling: jn,
    callWithErrorHandling: xo,
    camelize: Ui,
    capitalize: Yc,
    cloneVNode: Ei,
    compatUtils: XU,
    compile: qG,
    computed: ae,
    createApp: dS,
    createBlock: $_,
    createCommentVNode: kU,
    createElementBlock: DU,
    createElementVNode: U_,
    createHydrationRenderer: TB,
    createPropsRestProxy: rU,
    createRenderer: SB,
    createSSRApp: YG,
    createSlots: N$,
    createStaticVNode: OU,
    createTextVNode: Rp,
    createVNode: O,
    customRef: $5,
    defineAsyncComponent: D$,
    defineComponent: be,
    defineCustomElement: KB,
    defineEmits: j$,
    defineExpose: W$,
    defineModel: K$,
    defineOptions: Y$,
    defineProps: z$,
    defineSSRCustomElement: SG,
    defineSlots: X$,
    get devtools() {
        return Ti
    },
    effect: jN,
    effectScope: Hf,
    getCurrentInstance: Ot,
    getCurrentScope: Vf,
    getTransitionRawChildren: Dp,
    guardReactiveProps: kB,
    h: Or,
    handleError: Ul,
    hasInjectionContext: EB,
    hydrate: fS,
    initCustomFormatter: zB,
    initDirectivesForSSR: XG,
    inject: dr,
    isMemoSame: jB,
    isProxy: rf,
    isReactive: Ni,
    isReadonly: fs,
    isRef: xt,
    isRuntimeOnly: V_,
    isShallow: tf,
    isVNode: Eo,
    markRaw: uo,
    mergeDefaults: eU,
    mergeModels: tU,
    mergeProps: st,
    nextTick: Xe,
    normalizeClass: Kf,
    normalizeProps: VL,
    normalizeStyle: Xf,
    onActivated: ys,
    onBeforeMount: cB,
    onBeforeUnmount: Zn,
    onBeforeUpdate: Pp,
    onDeactivated: Fo,
    onErrorCaptured: hB,
    onMounted: Ht,
    onRenderTracked: dB,
    onRenderTriggered: fB,
    onScopeDispose: g_,
    onServerPrefetch: uB,
    onUnmounted: _s,
    onUpdated: Gl,
    openBlock: Op,
    popScopeId: h$,
    provide: xi,
    proxyRefs: __,
    pushScopeId: d$,
    queuePostFlushCb: Bp,
    reactive: It,
    readonly: $l,
    ref: ie,
    registerRuntimeCompiler: $U,
    render: iy,
    renderList: M$,
    renderSlot: L$,
    resolveComponent: k$,
    resolveDirective: pB,
    resolveDynamicComponent: R$,
    resolveFilter: YU,
    resolveTransitionHooks: Xc,
    setBlockTracking: Wv,
    setDevtoolsHook: S_,
    setTransitionHooks: ml,
    shallowReactive: N5,
    shallowReadonly: wc,
    shallowRef: Cp,
    ssrContextKey: HB,
    ssrUtils: WU,
    stop: WN,
    toDisplayString: zL,
    toHandlerKey: Wo,
    toHandlers: $$,
    toRaw: Le,
    toRef: w0,
    toRefs: Iv,
    toValue: _L,
    transformVNodeArgs: FU,
    triggerRef: EL,
    unref: xn,
    useAttrs: J$,
    useCssModule: DG,
    useCssVars: FG,
    useModel: Q$,
    useSSRContext: VB,
    useSlots: Z$,
    useTransitionState: O_,
    vModelCheckbox: W_,
    vModelDynamic: oS,
    vModelRadio: Y_,
    vModelSelect: nS,
    vModelText: Ax,
    vShow: pi,
    version: Zv,
    warn: ue,
    watch: me,
    watchEffect: Au,
    watchPostEffect: nB,
    watchSyncEffect: B$,
    withAsyncContext: nU,
    withCtx: D_,
    withDefaults: q$,
    withDirectives: hi,
    withKeys: aS,
    withMemo: zU,
    withModifiers: zG,
    withScopeId: x$
}, Symbol.toStringTag, {
    value: "Module"
}));
var ZG = !1;
function $d(t, e, r) {
    return Array.isArray(t) ? (t.length = Math.max(t.length, e),
    t.splice(e, 1, r),
    r) : (t[e] = r,
    r)
}
function sg(t, e) {
    if (Array.isArray(t)) {
        t.splice(e, 1);
        return
    }
    delete t[e]
}
function JG() {
    return gS().__VUE_DEVTOOLS_GLOBAL_HOOK__
}
function gS() {
    return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {}
}
const QG = typeof Proxy == "function"
  , eH = "devtools-plugin:setup"
  , tH = "plugin:settings:set";
let Zl, sy;
function rH() {
    var t;
    return Zl !== void 0 || (typeof window < "u" && window.performance ? (Zl = !0,
    sy = window.performance) : typeof globalThis < "u" && (!((t = globalThis.perf_hooks) === null || t === void 0) && t.performance) ? (Zl = !0,
    sy = globalThis.perf_hooks.performance) : Zl = !1),
    Zl
}
function nH() {
    return rH() ? sy.now() : Date.now()
}
class iH {
    constructor(e, r) {
        this.target = null,
        this.targetQueue = [],
        this.onQueue = [],
        this.plugin = e,
        this.hook = r;
        const n = {};
        if (e.settings)
            for (const s in e.settings) {
                const a = e.settings[s];
                n[s] = a.defaultValue
            }
        const i = `__vue-devtools-plugin-settings__${e.id}`;
        let o = Object.assign({}, n);
        try {
            const s = localStorage.getItem(i)
              , a = JSON.parse(s);
            Object.assign(o, a)
        } catch {}
        this.fallbacks = {
            getSettings() {
                return o
            },
            setSettings(s) {
                try {
                    localStorage.setItem(i, JSON.stringify(s))
                } catch {}
                o = s
            },
            now() {
                return nH()
            }
        },
        r && r.on(tH, (s, a) => {
            s === this.plugin.id && this.fallbacks.setSettings(a)
        }
        ),
        this.proxiedOn = new Proxy({},{
            get: (s, a) => this.target ? this.target.on[a] : (...l) => {
                this.onQueue.push({
                    method: a,
                    args: l
                })
            }
        }),
        this.proxiedTarget = new Proxy({},{
            get: (s, a) => this.target ? this.target[a] : a === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(a) ? (...l) => (this.targetQueue.push({
                method: a,
                args: l,
                resolve: () => {}
            }),
            this.fallbacks[a](...l)) : (...l) => new Promise(c => {
                this.targetQueue.push({
                    method: a,
                    args: l,
                    resolve: c
                })
            }
            )
        })
    }
    async setRealTarget(e) {
        this.target = e;
        for (const r of this.onQueue)
            this.target.on[r.method](...r.args);
        for (const r of this.targetQueue)
            r.resolve(await this.target[r.method](...r.args))
    }
}
function Up(t, e) {
    const r = t
      , n = gS()
      , i = JG()
      , o = QG && r.enableEarlyProxy;
    if (i && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !o))
        i.emit(eH, t, e);
    else {
        const s = o ? new iH(r,i) : null;
        (n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
            pluginDescriptor: r,
            setupFn: e,
            proxy: s
        }),
        s && e(s.proxiedTarget)
    }
}
/*!
 * pinia v2.3.1
 * (c) 2025 Eduardo San Martin Morote
 * @license MIT
 */
let ay;
const hf = t => ay = t
  , mS = Symbol("pinia");
function yl(t) {
    return t && typeof t == "object" && Object.prototype.toString.call(t) === "[object Object]" && typeof t.toJSON != "function"
}
var po;
(function(t) {
    t.direct = "direct",
    t.patchObject = "patch object",
    t.patchFunction = "patch function"
}
)(po || (po = {}));
const cl = typeof window < "u"
  , H8 = ( () => typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : typeof globalThis == "object" ? globalThis : {
    HTMLElement: null
})();
function oH(t, {autoBom: e=!1}={}) {
    return e && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type) ? new Blob([String.fromCharCode(65279), t],{
        type: t.type
    }) : t
}
function X_(t, e, r) {
    const n = new XMLHttpRequest;
    n.open("GET", t),
    n.responseType = "blob",
    n.onload = function() {
        ES(n.response, e, r)
    }
    ,
    n.onerror = function() {
        console.error("could not download file")
    }
    ,
    n.send()
}
function vS(t) {
    const e = new XMLHttpRequest;
    e.open("HEAD", t, !1);
    try {
        e.send()
    } catch {}
    return e.status >= 200 && e.status <= 299
}
function Uh(t) {
    try {
        t.dispatchEvent(new MouseEvent("click"))
    } catch {
        const r = document.createEvent("MouseEvents");
        r.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null),
        t.dispatchEvent(r)
    }
}
const Gh = typeof navigator == "object" ? navigator : {
    userAgent: ""
}
  , yS = ( () => /Macintosh/.test(Gh.userAgent) && /AppleWebKit/.test(Gh.userAgent) && !/Safari/.test(Gh.userAgent))()
  , ES = cl ? typeof HTMLAnchorElement < "u" && "download"in HTMLAnchorElement.prototype && !yS ? sH : "msSaveOrOpenBlob"in Gh ? aH : lH : () => {}
;
function sH(t, e="download", r) {
    const n = document.createElement("a");
    n.download = e,
    n.rel = "noopener",
    typeof t == "string" ? (n.href = t,
    n.origin !== location.origin ? vS(n.href) ? X_(t, e, r) : (n.target = "_blank",
    Uh(n)) : Uh(n)) : (n.href = URL.createObjectURL(t),
    setTimeout(function() {
        URL.revokeObjectURL(n.href)
    }, 4e4),
    setTimeout(function() {
        Uh(n)
    }, 0))
}
function aH(t, e="download", r) {
    if (typeof t == "string")
        if (vS(t))
            X_(t, e, r);
        else {
            const n = document.createElement("a");
            n.href = t,
            n.target = "_blank",
            setTimeout(function() {
                Uh(n)
            })
        }
    else
        navigator.msSaveOrOpenBlob(oH(t, r), e)
}
function lH(t, e, r, n) {
    if (n = n || open("", "_blank"),
    n && (n.document.title = n.document.body.innerText = "downloading..."),
    typeof t == "string")
        return X_(t, e, r);
    const i = t.type === "application/octet-stream"
      , o = /constructor/i.test(String(H8.HTMLElement)) || "safari"in H8
      , s = /CriOS\/[\d]+/.test(navigator.userAgent);
    if ((s || i && o || yS) && typeof FileReader < "u") {
        const a = new FileReader;
        a.onloadend = function() {
            let l = a.result;
            if (typeof l != "string")
                throw n = null,
                new Error("Wrong reader.result type");
            l = s ? l : l.replace(/^data:[^;]*;/, "data:attachment/file;"),
            n ? n.location.href = l : location.assign(l),
            n = null
        }
        ,
        a.readAsDataURL(t)
    } else {
        const a = URL.createObjectURL(t);
        n ? n.location.assign(a) : location.href = a,
        n = null,
        setTimeout(function() {
            URL.revokeObjectURL(a)
        }, 4e4)
    }
}
function Ir(t, e) {
    const r = "🍍 " + t;
    typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(r, e) : e === "error" ? console.error(r) : e === "warn" ? console.warn(r) : console.log(r)
}
function K_(t) {
    return "_a"in t && "install"in t
}
function _S() {
    if (!("clipboard"in navigator))
        return Ir("Your browser doesn't support the Clipboard API", "error"),
        !0
}
function bS(t) {
    return t instanceof Error && t.message.toLowerCase().includes("document is not focused") ? (Ir('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"),
    !0) : !1
}
async function cH(t) {
    if (!_S())
        try {
            await navigator.clipboard.writeText(JSON.stringify(t.state.value)),
            Ir("Global state copied to clipboard.")
        } catch (e) {
            if (bS(e))
                return;
            Ir("Failed to serialize the state. Check the console for more details.", "error"),
            console.error(e)
        }
}
async function uH(t) {
    if (!_S())
        try {
            CS(t, JSON.parse(await navigator.clipboard.readText())),
            Ir("Global state pasted from clipboard.")
        } catch (e) {
            if (bS(e))
                return;
            Ir("Failed to deserialize the state from clipboard. Check the console for more details.", "error"),
            console.error(e)
        }
}
async function fH(t) {
    try {
        ES(new Blob([JSON.stringify(t.state.value)],{
            type: "text/plain;charset=utf-8"
        }), "pinia-state.json")
    } catch (e) {
        Ir("Failed to export the state as JSON. Check the console for more details.", "error"),
        console.error(e)
    }
}
let Ro;
function dH() {
    Ro || (Ro = document.createElement("input"),
    Ro.type = "file",
    Ro.accept = ".json");
    function t() {
        return new Promise( (e, r) => {
            Ro.onchange = async () => {
                const n = Ro.files;
                if (!n)
                    return e(null);
                const i = n.item(0);
                return e(i ? {
                    text: await i.text(),
                    file: i
                } : null)
            }
            ,
            Ro.oncancel = () => e(null),
            Ro.onerror = r,
            Ro.click()
        }
        )
    }
    return t
}
async function hH(t) {
    try {
        const r = await dH()();
        if (!r)
            return;
        const {text: n, file: i} = r;
        CS(t, JSON.parse(n)),
        Ir(`Global state imported from "${i.name}".`)
    } catch (e) {
        Ir("Failed to import the state from JSON. Check the console for more details.", "error"),
        console.error(e)
    }
}
function CS(t, e) {
    for (const r in e) {
        const n = t.state.value[r];
        n ? Object.assign(n, e[r]) : t.state.value[r] = e[r]
    }
}
function Si(t) {
    return {
        _custom: {
            display: t
        }
    }
}
const AS = "🍍 Pinia (root)"
  , Hh = "_root";
function xH(t) {
    return K_(t) ? {
        id: Hh,
        label: AS
    } : {
        id: t.$id,
        label: t.$id
    }
}
function pH(t) {
    if (K_(t)) {
        const r = Array.from(t._s.keys())
          , n = t._s;
        return {
            state: r.map(o => ({
                editable: !0,
                key: o,
                value: t.state.value[o]
            })),
            getters: r.filter(o => n.get(o)._getters).map(o => {
                const s = n.get(o);
                return {
                    editable: !1,
                    key: o,
                    value: s._getters.reduce( (a, l) => (a[l] = s[l],
                    a), {})
                }
            }
            )
        }
    }
    const e = {
        state: Object.keys(t.$state).map(r => ({
            editable: !0,
            key: r,
            value: t.$state[r]
        }))
    };
    return t._getters && t._getters.length && (e.getters = t._getters.map(r => ({
        editable: !1,
        key: r,
        value: t[r]
    }))),
    t._customProperties.size && (e.customProperties = Array.from(t._customProperties).map(r => ({
        editable: !0,
        key: r,
        value: t[r]
    }))),
    e
}
function gH(t) {
    return t ? Array.isArray(t) ? t.reduce( (e, r) => (e.keys.push(r.key),
    e.operations.push(r.type),
    e.oldValue[r.key] = r.oldValue,
    e.newValue[r.key] = r.newValue,
    e), {
        oldValue: {},
        keys: [],
        operations: [],
        newValue: {}
    }) : {
        operation: Si(t.type),
        key: Si(t.key),
        oldValue: t.oldValue,
        newValue: t.newValue
    } : {}
}
function mH(t) {
    switch (t) {
    case po.direct:
        return "mutation";
    case po.patchFunction:
        return "$patch";
    case po.patchObject:
        return "$patch";
    default:
        return "unknown"
    }
}
let Bc = !0;
const Vh = []
  , Na = "pinia:mutations"
  , qr = "pinia"
  , {assign: vH} = Object
  , wx = t => "🍍 " + t;
function yH(t, e) {
    Up({
        id: "dev.esm.pinia",
        label: "Pinia 🍍",
        logo: "https://pinia.vuejs.org/logo.svg",
        packageName: "pinia",
        homepage: "https://pinia.vuejs.org",
        componentStateTypes: Vh,
        app: t
    }, r => {
        typeof r.now != "function" && Ir("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),
        r.addTimelineLayer({
            id: Na,
            label: "Pinia 🍍",
            color: 15064968
        }),
        r.addInspector({
            id: qr,
            label: "Pinia 🍍",
            icon: "storage",
            treeFilterPlaceholder: "Search stores",
            actions: [{
                icon: "content_copy",
                action: () => {
                    cH(e)
                }
                ,
                tooltip: "Serialize and copy the state"
            }, {
                icon: "content_paste",
                action: async () => {
                    await uH(e),
                    r.sendInspectorTree(qr),
                    r.sendInspectorState(qr)
                }
                ,
                tooltip: "Replace the state with the content of your clipboard"
            }, {
                icon: "save",
                action: () => {
                    fH(e)
                }
                ,
                tooltip: "Save the state as a JSON file"
            }, {
                icon: "folder_open",
                action: async () => {
                    await hH(e),
                    r.sendInspectorTree(qr),
                    r.sendInspectorState(qr)
                }
                ,
                tooltip: "Import the state from a JSON file"
            }],
            nodeActions: [{
                icon: "restore",
                tooltip: 'Reset the state (with "$reset")',
                action: n => {
                    const i = e._s.get(n);
                    i ? typeof i.$reset != "function" ? Ir(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`, "warn") : (i.$reset(),
                    Ir(`Store "${n}" reset.`)) : Ir(`Cannot reset "${n}" store because it wasn't found.`, "warn")
                }
            }]
        }),
        r.on.inspectComponent( (n, i) => {
            const o = n.componentInstance && n.componentInstance.proxy;
            if (o && o._pStores) {
                const s = n.componentInstance.proxy._pStores;
                Object.values(s).forEach(a => {
                    n.instanceData.state.push({
                        type: wx(a.$id),
                        key: "state",
                        editable: !0,
                        value: a._isOptionsAPI ? {
                            _custom: {
                                value: Le(a.$state),
                                actions: [{
                                    icon: "restore",
                                    tooltip: "Reset the state of this store",
                                    action: () => a.$reset()
                                }]
                            }
                        } : Object.keys(a.$state).reduce( (l, c) => (l[c] = a.$state[c],
                        l), {})
                    }),
                    a._getters && a._getters.length && n.instanceData.state.push({
                        type: wx(a.$id),
                        key: "getters",
                        editable: !1,
                        value: a._getters.reduce( (l, c) => {
                            try {
                                l[c] = a[c]
                            } catch (u) {
                                l[c] = u
                            }
                            return l
                        }
                        , {})
                    })
                }
                )
            }
        }
        ),
        r.on.getInspectorTree(n => {
            if (n.app === t && n.inspectorId === qr) {
                let i = [e];
                i = i.concat(Array.from(e._s.values())),
                n.rootNodes = (n.filter ? i.filter(o => "$id"in o ? o.$id.toLowerCase().includes(n.filter.toLowerCase()) : AS.toLowerCase().includes(n.filter.toLowerCase())) : i).map(xH)
            }
        }
        ),
        globalThis.$pinia = e,
        r.on.getInspectorState(n => {
            if (n.app === t && n.inspectorId === qr) {
                const i = n.nodeId === Hh ? e : e._s.get(n.nodeId);
                if (!i)
                    return;
                i && (n.nodeId !== Hh && (globalThis.$store = Le(i)),
                n.state = pH(i))
            }
        }
        ),
        r.on.editInspectorState( (n, i) => {
            if (n.app === t && n.inspectorId === qr) {
                const o = n.nodeId === Hh ? e : e._s.get(n.nodeId);
                if (!o)
                    return Ir(`store "${n.nodeId}" not found`, "error");
                const {path: s} = n;
                K_(o) ? s.unshift("state") : (s.length !== 1 || !o._customProperties.has(s[0]) || s[0]in o.$state) && s.unshift("$state"),
                Bc = !1,
                n.set(o, s, n.state.value),
                Bc = !0
            }
        }
        ),
        r.on.editComponentState(n => {
            if (n.type.startsWith("🍍")) {
                const i = n.type.replace(/^🍍\s*/, "")
                  , o = e._s.get(i);
                if (!o)
                    return Ir(`store "${i}" not found`, "error");
                const {path: s} = n;
                if (s[0] !== "state")
                    return Ir(`Invalid path for store "${i}":
${s}
Only state can be modified.`);
                s[0] = "$state",
                Bc = !1,
                n.set(o, s, n.state.value),
                Bc = !0
            }
        }
        )
    }
    )
}
function EH(t, e) {
    Vh.includes(wx(e.$id)) || Vh.push(wx(e.$id)),
    Up({
        id: "dev.esm.pinia",
        label: "Pinia 🍍",
        logo: "https://pinia.vuejs.org/logo.svg",
        packageName: "pinia",
        homepage: "https://pinia.vuejs.org",
        componentStateTypes: Vh,
        app: t,
        settings: {
            logStoreChanges: {
                label: "Notify about new/deleted stores",
                type: "boolean",
                defaultValue: !0
            }
        }
    }, r => {
        const n = typeof r.now == "function" ? r.now.bind(r) : Date.now;
        e.$onAction( ({after: s, onError: a, name: l, args: c}) => {
            const u = wS++;
            r.addTimelineEvent({
                layerId: Na,
                event: {
                    time: n(),
                    title: "🛫 " + l,
                    subtitle: "start",
                    data: {
                        store: Si(e.$id),
                        action: Si(l),
                        args: c
                    },
                    groupId: u
                }
            }),
            s(f => {
                Vs = void 0,
                r.addTimelineEvent({
                    layerId: Na,
                    event: {
                        time: n(),
                        title: "🛬 " + l,
                        subtitle: "end",
                        data: {
                            store: Si(e.$id),
                            action: Si(l),
                            args: c,
                            result: f
                        },
                        groupId: u
                    }
                })
            }
            ),
            a(f => {
                Vs = void 0,
                r.addTimelineEvent({
                    layerId: Na,
                    event: {
                        time: n(),
                        logType: "error",
                        title: "💥 " + l,
                        subtitle: "end",
                        data: {
                            store: Si(e.$id),
                            action: Si(l),
                            args: c,
                            error: f
                        },
                        groupId: u
                    }
                })
            }
            )
        }
        , !0),
        e._customProperties.forEach(s => {
            me( () => xn(e[s]), (a, l) => {
                r.notifyComponentUpdate(),
                r.sendInspectorState(qr),
                Bc && r.addTimelineEvent({
                    layerId: Na,
                    event: {
                        time: n(),
                        title: "Change",
                        subtitle: s,
                        data: {
                            newValue: a,
                            oldValue: l
                        },
                        groupId: Vs
                    }
                })
            }
            , {
                deep: !0
            })
        }
        ),
        e.$subscribe( ({events: s, type: a}, l) => {
            if (r.notifyComponentUpdate(),
            r.sendInspectorState(qr),
            !Bc)
                return;
            const c = {
                time: n(),
                title: mH(a),
                data: vH({
                    store: Si(e.$id)
                }, gH(s)),
                groupId: Vs
            };
            a === po.patchFunction ? c.subtitle = "⤵️" : a === po.patchObject ? c.subtitle = "🧩" : s && !Array.isArray(s) && (c.subtitle = s.type),
            s && (c.data["rawEvent(s)"] = {
                _custom: {
                    display: "DebuggerEvent",
                    type: "object",
                    tooltip: "raw DebuggerEvent[]",
                    value: s
                }
            }),
            r.addTimelineEvent({
                layerId: Na,
                event: c
            })
        }
        , {
            detached: !0,
            flush: "sync"
        });
        const i = e._hotUpdate;
        e._hotUpdate = uo(s => {
            i(s),
            r.addTimelineEvent({
                layerId: Na,
                event: {
                    time: n(),
                    title: "🔥 " + e.$id,
                    subtitle: "HMR update",
                    data: {
                        store: Si(e.$id),
                        info: Si("HMR update")
                    }
                }
            }),
            r.notifyComponentUpdate(),
            r.sendInspectorTree(qr),
            r.sendInspectorState(qr)
        }
        );
        const {$dispose: o} = e;
        e.$dispose = () => {
            o(),
            r.notifyComponentUpdate(),
            r.sendInspectorTree(qr),
            r.sendInspectorState(qr),
            r.getSettings().logStoreChanges && Ir(`Disposed "${e.$id}" store 🗑`)
        }
        ,
        r.notifyComponentUpdate(),
        r.sendInspectorTree(qr),
        r.sendInspectorState(qr),
        r.getSettings().logStoreChanges && Ir(`"${e.$id}" store installed 🆕`)
    }
    )
}
let wS = 0, Vs;
function V8(t, e, r) {
    const n = e.reduce( (i, o) => (i[o] = Le(t)[o],
    i), {});
    for (const i in n)
        t[i] = function() {
            const o = wS
              , s = r ? new Proxy(t,{
                get(...l) {
                    return Vs = o,
                    Reflect.get(...l)
                },
                set(...l) {
                    return Vs = o,
                    Reflect.set(...l)
                }
            }) : t;
            Vs = o;
            const a = n[i].apply(s, arguments);
            return Vs = void 0,
            a
        }
}
function _H({app: t, store: e, options: r}) {
    if (!e.$id.startsWith("__hot:")) {
        if (e._isOptionsAPI = !!r.state,
        !e._p._testing) {
            V8(e, Object.keys(r.actions), e._isOptionsAPI);
            const n = e._hotUpdate;
            Le(e)._hotUpdate = function(i) {
                n.apply(this, arguments),
                V8(e, Object.keys(i._hmrPayload.actions), !!e._isOptionsAPI)
            }
        }
        EH(t, e)
    }
}
function B4e() {
    const t = Hf(!0)
      , e = t.run( () => ie({}));
    let r = []
      , n = [];
    const i = uo({
        install(o) {
            hf(i),
            i._a = o,
            o.provide(mS, i),
            o.config.globalProperties.$pinia = i,
            cl && yH(o, i),
            n.forEach(s => r.push(s)),
            n = []
        },
        use(o) {
            return !this._a && !ZG ? n.push(o) : r.push(o),
            this
        },
        _p: r,
        _a: null,
        _e: t,
        _s: new Map,
        state: e
    });
    return cl && typeof Proxy < "u" && i.use(_H),
    i
}
function BS(t, e) {
    for (const r in e) {
        const n = e[r];
        if (!(r in t))
            continue;
        const i = t[r];
        yl(i) && yl(n) && !xt(n) && !Ni(n) ? t[r] = BS(i, n) : t[r] = n
    }
    return t
}
const bH = () => {}
;
function z8(t, e, r, n=bH) {
    t.push(e);
    const i = () => {
        const o = t.indexOf(e);
        o > -1 && (t.splice(o, 1),
        n())
    }
    ;
    return !r && Vf() && g_(i),
    i
}
function Jl(t, ...e) {
    t.slice().forEach(r => {
        r(...e)
    }
    )
}
const CH = t => t()
  , j8 = Symbol()
  , ag = Symbol();
function ly(t, e) {
    t instanceof Map && e instanceof Map ? e.forEach( (r, n) => t.set(n, r)) : t instanceof Set && e instanceof Set && e.forEach(t.add, t);
    for (const r in e) {
        if (!e.hasOwnProperty(r))
            continue;
        const n = e[r]
          , i = t[r];
        yl(i) && yl(n) && t.hasOwnProperty(r) && !xt(n) && !Ni(n) ? t[r] = ly(i, n) : t[r] = n
    }
    return t
}
const AH = Symbol("pinia:skipHydration");
function wH(t) {
    return !yl(t) || !t.hasOwnProperty(AH)
}
const {assign: oi} = Object;
function W8(t) {
    return !!(xt(t) && t.effect)
}
function Y8(t, e, r, n) {
    const {state: i, actions: o, getters: s} = e
      , a = r.state.value[t];
    let l;
    function c() {
        !a && !n && (r.state.value[t] = i ? i() : {});
        const u = Iv(n ? ie(i ? i() : {}).value : r.state.value[t]);
        return oi(u, o, Object.keys(s || {}).reduce( (f, d) => (d in u && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${d}" in store "${t}".`),
        f[d] = uo(ae( () => {
            hf(r);
            const h = r._s.get(t);
            return s[d].call(h, h)
        }
        )),
        f), {}))
    }
    return l = cy(t, c, e, r, n, !0),
    l
}
function cy(t, e, r={}, n, i, o) {
    let s;
    const a = oi({
        actions: {}
    }, r);
    if (!n._e.active)
        throw new Error("Pinia destroyed");
    const l = {
        deep: !0
    };
    l.onTrigger = A => {
        c ? h = A : c == !1 && !C._hotUpdating && (Array.isArray(h) ? h.push(A) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))
    }
    ;
    let c, u, f = [], d = [], h;
    const x = n.state.value[t];
    !o && !x && !i && (n.state.value[t] = {});
    const y = ie({});
    let m;
    function E(A) {
        let B;
        c = u = !1,
        h = [],
        typeof A == "function" ? (A(n.state.value[t]),
        B = {
            type: po.patchFunction,
            storeId: t,
            events: h
        }) : (ly(n.state.value[t], A),
        B = {
            type: po.patchObject,
            payload: A,
            storeId: t,
            events: h
        });
        const S = m = Symbol();
        Xe().then( () => {
            m === S && (c = !0)
        }
        ),
        u = !0,
        Jl(f, B, n.state.value[t])
    }
    const g = o ? function() {
        const {state: B} = r
          , S = B ? B() : {};
        this.$patch(D => {
            oi(D, S)
        }
        )
    }
    : () => {
        throw new Error(`🍍: Store "${t}" is built using the setup syntax and does not implement $reset().`)
    }
    ;
    function p() {
        s.stop(),
        f = [],
        d = [],
        n._s.delete(t)
    }
    const v = (A, B="") => {
        if (j8 in A)
            return A[ag] = B,
            A;
        const S = function() {
            hf(n);
            const D = Array.from(arguments)
              , F = []
              , R = [];
            function P(K) {
                F.push(K)
            }
            function N(K) {
                R.push(K)
            }
            Jl(d, {
                args: D,
                name: S[ag],
                store: C,
                after: P,
                onError: N
            });
            let j;
            try {
                j = A.apply(this && this.$id === t ? this : C, D)
            } catch (K) {
                throw Jl(R, K),
                K
            }
            return j instanceof Promise ? j.then(K => (Jl(F, K),
            K)).catch(K => (Jl(R, K),
            Promise.reject(K))) : (Jl(F, j),
            j)
        };
        return S[j8] = !0,
        S[ag] = B,
        S
    }
      , _ = uo({
        actions: {},
        getters: {},
        state: [],
        hotState: y
    })
      , b = {
        _p: n,
        $id: t,
        $onAction: z8.bind(null, d),
        $patch: E,
        $reset: g,
        $subscribe(A, B={}) {
            const S = z8(f, A, B.detached, () => D())
              , D = s.run( () => me( () => n.state.value[t], F => {
                (B.flush === "sync" ? u : c) && A({
                    storeId: t,
                    type: po.direct,
                    events: h
                }, F)
            }
            , oi({}, l, B)));
            return S
        },
        $dispose: p
    }
      , C = It(oi({
        _hmrPayload: _,
        _customProperties: uo(new Set)
    }, b));
    n._s.set(t, C);
    const T = (n._a && n._a.runWithContext || CH)( () => n._e.run( () => (s = Hf()).run( () => e({
        action: v
    }))));
    for (const A in T) {
        const B = T[A];
        if (xt(B) && !W8(B) || Ni(B))
            i ? $d(y.value, A, w0(T, A)) : o || (x && wH(B) && (xt(B) ? B.value = x[A] : ly(B, x[A])),
            n.state.value[t][A] = B),
            _.state.push(A);
        else if (typeof B == "function") {
            const S = i ? B : v(B, A);
            T[A] = S,
            _.actions[A] = B,
            a.actions[A] = B
        } else
            W8(B) && (_.getters[A] = o ? r.getters[A] : B,
            cl && (T._getters || (T._getters = uo([]))).push(A))
    }
    if (oi(C, T),
    oi(Le(C), T),
    Object.defineProperty(C, "$state", {
        get: () => i ? y.value : n.state.value[t],
        set: A => {
            if (i)
                throw new Error("cannot set hotState");
            E(B => {
                oi(B, A)
            }
            )
        }
    }),
    C._hotUpdate = uo(A => {
        C._hotUpdating = !0,
        A._hmrPayload.state.forEach(B => {
            if (B in C.$state) {
                const S = A.$state[B]
                  , D = C.$state[B];
                typeof S == "object" && yl(S) && yl(D) ? BS(S, D) : A.$state[B] = D
            }
            $d(C, B, w0(A.$state, B))
        }
        ),
        Object.keys(C.$state).forEach(B => {
            B in A.$state || sg(C, B)
        }
        ),
        c = !1,
        u = !1,
        n.state.value[t] = w0(A._hmrPayload, "hotState"),
        u = !0,
        Xe().then( () => {
            c = !0
        }
        );
        for (const B in A._hmrPayload.actions) {
            const S = A[B];
            $d(C, B, v(S, B))
        }
        for (const B in A._hmrPayload.getters) {
            const S = A._hmrPayload.getters[B]
              , D = o ? ae( () => (hf(n),
            S.call(C, C))) : S;
            $d(C, B, D)
        }
        Object.keys(C._hmrPayload.getters).forEach(B => {
            B in A._hmrPayload.getters || sg(C, B)
        }
        ),
        Object.keys(C._hmrPayload.actions).forEach(B => {
            B in A._hmrPayload.actions || sg(C, B)
        }
        ),
        C._hmrPayload = A._hmrPayload,
        C._getters = A._getters,
        C._hotUpdating = !1
    }
    ),
    cl) {
        const A = {
            writable: !0,
            configurable: !0,
            enumerable: !1
        };
        ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach(B => {
            Object.defineProperty(C, B, oi({
                value: C[B]
            }, A))
        }
        )
    }
    return n._p.forEach(A => {
        if (cl) {
            const B = s.run( () => A({
                store: C,
                app: n._a,
                pinia: n,
                options: a
            }));
            Object.keys(B || {}).forEach(S => C._customProperties.add(S)),
            oi(C, B)
        } else
            oi(C, s.run( () => A({
                store: C,
                app: n._a,
                pinia: n,
                options: a
            })))
    }
    ),
    C.$state && typeof C.$state == "object" && typeof C.$state.constructor == "function" && !C.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
	state: () => new MyClass()
Found in store "${C.$id}".`),
    x && o && r.hydrate && r.hydrate(C.$state, x),
    c = !0,
    u = !0,
    C
}
/*! #__NO_SIDE_EFFECTS__ */
function S4e(t, e, r) {
    let n, i;
    const o = typeof e == "function";
    if (typeof t == "string")
        n = t,
        i = o ? r : e;
    else if (i = t,
    n = t.id,
    typeof n != "string")
        throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
    function s(a, l) {
        const c = EB();
        if (a = a || (c ? dr(mS, null) : null),
        a && hf(a),
        !ay)
            throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
This will fail in production.`);
        a = ay,
        a._s.has(n) || (o ? cy(n, e, i, a) : Y8(n, i, a),
        s._pinia = a);
        const u = a._s.get(n);
        if (l) {
            const f = "__hot:" + n
              , d = o ? cy(f, e, i, a, !0) : Y8(f, oi({}, i), a, !0);
            l._hotUpdate(d),
            delete a.state.value[f],
            a._s.delete(f)
        }
        if (cl) {
            const f = Ot();
            if (f && f.proxy && !l) {
                const d = f.proxy
                  , h = "_pStores"in d ? d._pStores : d._pStores = {};
                h[n] = u
            }
        }
        return u
    }
    return s.$id = n,
    s
}
(function(t, e) {
    var r = t.document, n = r.documentElement, i = r.querySelector('meta[name="viewport"]'), o = r.querySelector('meta[name="flexible"]'), s = 0, a = 0, l, c = e.flexible || (e.flexible = {});
    if (i) {
        console.warn("");
        var u = i.getAttribute("content").match(/initial\-scale=([\d\.]+)/);
        u && (a = parseFloat(u[1]),
        s = parseInt(1 / a))
    } else if (o) {
        var f = o.getAttribute("content");
        if (f) {
            var d = f.match(/initial\-dpr=([\d\.]+)/)
              , h = f.match(/maximum\-dpr=([\d\.]+)/);
            d && (s = parseFloat(d[1]),
            a = parseFloat((1 / s).toFixed(2))),
            h && (s = parseFloat(h[1]),
            a = parseFloat((1 / s).toFixed(2)))
        }
    }
    if (!s && !a) {
        t.navigator.appVersion.match(/android/gi);
        var x = t.navigator.appVersion.match(/iphone/gi)
          , y = t.devicePixelRatio;
        x ? y >= 3 && (!s || s >= 3) ? s = 3 : y >= 2 && (!s || s >= 2) ? s = 2 : s = 1 : s = 1,
        a = 1 / s
    }
    if (n.setAttribute("data-dpr", s),
    !i)
        if (i = r.createElement("meta"),
        i.setAttribute("name", "viewport"),
        i.setAttribute("content", "initial-scale=" + a + ", maximum-scale=" + a + ", minimum-scale=" + a + ", user-scalable=no"),
        n.firstElementChild)
            n.firstElementChild.appendChild(i);
        else {
            var m = r.createElement("div");
            m.appendChild(i),
            r.write(m.innerHTML)
        }
    function E() {
        var g = n.getBoundingClientRect().width;
        g / s > 540 && (g = 540 * s);
        var p = g / 10;
        n.style.fontSize = p + "px",
        c.rem = t.rem = p
    }
    t.addEventListener("resize", function() {
        clearTimeout(l),
        l = setTimeout(E, 300)
    }, !1),
    t.addEventListener("pageshow", function(g) {
        g.persisted && (clearTimeout(l),
        l = setTimeout(E, 300))
    }, !1),
    r.readyState === "complete" ? r.body.style.fontSize = 12 * s + "px" : r.addEventListener("DOMContentLoaded", function(g) {
        r.body.style.fontSize = 12 * s + "px"
    }, !1),
    E(),
    c.dpr = t.dpr = s,
    c.refreshRem = E,
    c.rem2px = function(g) {
        var p = parseFloat(g) * this.rem;
        return typeof g == "string" && g.match(/rem$/) && (p += "px"),
        p
    }
    ,
    c.px2rem = function(g) {
        var p = parseFloat(g) / this.rem;
        return typeof g == "string" && g.match(/px$/) && (p += "rem"),
        p
    }
}
)(window, window.lib || (window.lib = {}));
function BH(t) {
    return typeof t == "object" && t !== null
}
function X8(t, e) {
    return t = BH(t) ? t : Object.create(null),
    new Proxy(t,{
        get(r, n, i) {
            return n === "key" ? Reflect.get(r, n, i) : Reflect.get(r, n, i) || Reflect.get(e, n, i)
        }
    })
}
function SH(t, e) {
    return e.reduce( (r, n) => r == null ? void 0 : r[n], t)
}
function TH(t, e, r) {
    return e.slice(0, -1).reduce( (n, i) => /^(__proto__)$/.test(i) ? {} : n[i] = n[i] || {}, t)[e[e.length - 1]] = r,
    t
}
function DH(t, e) {
    return e.reduce( (r, n) => {
        const i = n.split(".");
        return TH(r, i, SH(t, i))
    }
    , {})
}
function FH(t, e) {
    return r => {
        var n;
        try {
            const {storage: i=localStorage, beforeRestore: o=void 0, afterRestore: s=void 0, serializer: a={
                serialize: JSON.stringify,
                deserialize: JSON.parse
            }, key: l=e.$id, paths: c=null, debug: u=!1} = r;
            return {
                storage: i,
                beforeRestore: o,
                afterRestore: s,
                serializer: a,
                key: ((n = t.key) != null ? n : f => f)(typeof l == "string" ? l : l(e.$id)),
                paths: c,
                debug: u
            }
        } catch (i) {
            return r.debug && console.error("[pinia-plugin-persistedstate]", i),
            null
        }
    }
}
function K8(t, {storage: e, serializer: r, key: n, debug: i}) {
    try {
        const o = e == null ? void 0 : e.getItem(n);
        o && t.$patch(r == null ? void 0 : r.deserialize(o))
    } catch (o) {
        i && console.error("[pinia-plugin-persistedstate]", o)
    }
}
function q8(t, {storage: e, serializer: r, key: n, paths: i, debug: o}) {
    try {
        const s = Array.isArray(i) ? DH(t, i) : t;
        e.setItem(n, r.serialize(s))
    } catch (s) {
        o && console.error("[pinia-plugin-persistedstate]", s)
    }
}
function PH(t={}) {
    return e => {
        const {auto: r=!1} = t
          , {options: {persist: n=r}, store: i, pinia: o} = e;
        if (!n)
            return;
        if (!(i.$id in o.state.value)) {
            const a = o._s.get(i.$id.replace("__hot:", ""));
            a && Promise.resolve().then( () => a.$persist());
            return
        }
        const s = (Array.isArray(n) ? n.map(a => X8(a, t)) : [X8(n, t)]).map(FH(t, i)).filter(Boolean);
        i.$persist = () => {
            s.forEach(a => {
                q8(i.$state, a)
            }
            )
        }
        ,
        i.$hydrate = ({runHooks: a=!0}={}) => {
            s.forEach(l => {
                const {beforeRestore: c, afterRestore: u} = l;
                a && (c == null || c(e)),
                K8(i, l),
                a && (u == null || u(e))
            }
            )
        }
        ,
        s.forEach(a => {
            const {beforeRestore: l, afterRestore: c} = a;
            l == null || l(e),
            K8(i, a),
            c == null || c(e),
            i.$subscribe( (u, f) => {
                q8(f, a)
            }
            , {
                detached: !0
            })
        }
        )
    }
}
var T4e = PH()
  , er = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Vi(t) {
    return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t
}
function q_(t) {
    if (t.__esModule)
        return t;
    var e = t.default;
    if (typeof e == "function") {
        var r = function n() {
            return this instanceof n ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments)
        };
        r.prototype = e.prototype
    } else
        r = {};
    return Object.defineProperty(r, "__esModule", {
        value: !0
    }),
    Object.keys(t).forEach(function(n) {
        var i = Object.getOwnPropertyDescriptor(t, n);
        Object.defineProperty(r, n, i.get ? i : {
            enumerable: !0,
            get: function() {
                return t[n]
            }
        })
    }),
    r
}
const Wr = q_(oy);
var SS = {
    exports: {}
}
  , Z_ = Object.defineProperty
  , IH = Object.getOwnPropertyDescriptor
  , OH = Object.getOwnPropertyNames
  , kH = Object.prototype.hasOwnProperty
  , RH = (t, e) => {
    for (var r in e)
        Z_(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , MH = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of OH(e))
            !kH.call(t, i) && i !== r && Z_(t, i, {
                get: () => e[i],
                enumerable: !(n = IH(e, i)) || n.enumerable
            });
    return t
}
  , NH = t => MH(Z_({}, "__esModule", {
    value: !0
}), t)
  , TS = {};
RH(TS, {
    extend: () => $H,
    flat: () => qH,
    get: () => WH,
    inBrowser: () => DS,
    isDate: () => HH,
    isDef: () => UH,
    isFunction: () => uy,
    isIOS: () => jH,
    isMobile: () => VH,
    isNumeric: () => zH,
    isObject: () => J_,
    isPromise: () => GH,
    isSameValue: () => XH,
    noop: () => LH,
    pick: () => YH,
    toArray: () => KH
});
var ga = NH(TS);
function LH() {}
const $H = Object.assign
  , DS = typeof window < "u"
  , J_ = t => t !== null && typeof t == "object"
  , UH = t => t != null
  , uy = t => typeof t == "function"
  , GH = t => J_(t) && uy(t.then) && uy(t.catch)
  , HH = t => Object.prototype.toString.call(t) === "[object Date]" && !Number.isNaN(t.getTime());
function VH(t) {
    return t = t.replace(/[^-|\d]/g, ""),
    /^((\+86)|(86))?(1)\d{10}$/.test(t) || /^0[0-9-]{10,13}$/.test(t)
}
const zH = t => typeof t == "number" || /^\d+(\.\d+)?$/.test(t)
  , jH = () => DS ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : !1;
function WH(t, e) {
    const r = e.split(".");
    let n = t;
    return r.forEach(i => {
        var o;
        n = J_(n) && (o = n[i]) != null ? o : ""
    }
    ),
    n
}
function YH(t, e, r) {
    return e.reduce( (n, i) => ((!r || t[i] !== void 0) && (n[i] = t[i]),
    n), {})
}
const XH = (t, e) => JSON.stringify(t) === JSON.stringify(e)
  , KH = t => Array.isArray(t) ? t : [t]
  , qH = t => t.reduce( (e, r) => e.concat(r), []);
var Q_ = Object.defineProperty
  , ZH = Object.getOwnPropertyDescriptor
  , JH = Object.getOwnPropertyNames
  , QH = Object.prototype.hasOwnProperty
  , eV = (t, e) => {
    for (var r in e)
        Q_(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , tV = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of JH(e))
            !QH.call(t, i) && i !== r && Q_(t, i, {
                get: () => e[i],
                enumerable: !(n = ZH(e, i)) || n.enumerable
            });
    return t
}
  , rV = t => tV(Q_({}, "__esModule", {
    value: !0
}), t)
  , FS = {};
eV(FS, {
    makeArrayProp: () => aV,
    makeNumberProp: () => lV,
    makeNumericProp: () => cV,
    makeRequiredProp: () => sV,
    makeStringProp: () => uV,
    numericProp: () => PS,
    truthProp: () => oV,
    unknownProp: () => iV
});
var nV = rV(FS);
const iV = null
  , PS = [Number, String]
  , oV = {
    type: Boolean,
    default: !0
}
  , sV = t => ({
    type: t,
    required: !0
})
  , aV = () => ({
    type: Array,
    default: () => []
})
  , lV = t => ({
    type: Number,
    default: t
})
  , cV = t => ({
    type: PS,
    default: t
})
  , uV = t => ({
    type: String,
    default: t
});
var Po = typeof window < "u"
  , fV = !0;
function pn(t) {
    return Po ? requestAnimationFrame(t) : -1
}
function rd(t) {
    Po && cancelAnimationFrame(t)
}
function Ka(t) {
    pn( () => pn(t))
}
var dV = t => t === window
  , Z8 = (t, e) => ({
    top: 0,
    left: 0,
    right: t,
    bottom: e,
    width: t,
    height: e
})
  , Cr = t => {
    const e = xn(t);
    if (dV(e)) {
        const r = e.innerWidth
          , n = e.innerHeight;
        return Z8(r, n)
    }
    return e != null && e.getBoundingClientRect ? e.getBoundingClientRect() : Z8(0, 0)
}
;
function IS(t=!1) {
    const e = ie(t);
    return [e, (n=!e.value) => {
        e.value = n
    }
    ]
}
function Jn(t) {
    const e = dr(t, null);
    if (e) {
        const r = Ot()
          , {link: n, unlink: i, internalChildren: o} = e;
        n(r),
        _s( () => i(r));
        const s = ae( () => o.indexOf(r));
        return {
            parent: e,
            index: s
        }
    }
    return {
        parent: null,
        index: ie(-1)
    }
}
function OS(t) {
    const e = []
      , r = n => {
        Array.isArray(n) && n.forEach(i => {
            var o;
            Eo(i) && (e.push(i),
            (o = i.component) != null && o.subTree && (e.push(i.component.subTree),
            r(i.component.subTree.children)),
            i.children && r(i.children))
        }
        )
    }
    ;
    return r(t),
    e
}
var J8 = (t, e) => {
    const r = t.indexOf(e);
    return r === -1 ? t.findIndex(n => e.key !== void 0 && e.key !== null && n.type === e.type && n.key === e.key) : r
}
;
function kS(t, e, r) {
    const n = OS(t.subTree.children);
    r.sort( (o, s) => J8(n, o.vnode) - J8(n, s.vnode));
    const i = r.map(o => o.proxy);
    e.sort( (o, s) => {
        const a = i.indexOf(o)
          , l = i.indexOf(s);
        return a - l
    }
    )
}
function zi(t) {
    const e = It([])
      , r = It([])
      , n = Ot();
    return {
        children: e,
        linkChildren: o => {
            xi(t, Object.assign({
                link: l => {
                    l.proxy && (r.push(l),
                    e.push(l.proxy),
                    kS(n, e, r))
                }
                ,
                unlink: l => {
                    const c = r.indexOf(l);
                    e.splice(c, 1),
                    r.splice(c, 1)
                }
                ,
                children: e,
                internalChildren: r
            }, o))
        }
    }
}
var fy = 1e3
  , dy = 60 * fy
  , hy = 60 * dy
  , Q8 = 24 * hy;
function hV(t) {
    const e = Math.floor(t / Q8)
      , r = Math.floor(t % Q8 / hy)
      , n = Math.floor(t % hy / dy)
      , i = Math.floor(t % dy / fy)
      , o = Math.floor(t % fy);
    return {
        total: t,
        days: e,
        hours: r,
        minutes: n,
        seconds: i,
        milliseconds: o
    }
}
function xV(t, e) {
    return Math.floor(t / 1e3) === Math.floor(e / 1e3)
}
function RS(t) {
    let e, r, n, i;
    const o = ie(t.time)
      , s = ae( () => hV(o.value))
      , a = () => {
        n = !1,
        rd(e)
    }
      , l = () => Math.max(r - Date.now(), 0)
      , c = y => {
        var m, E;
        o.value = y,
        (m = t.onChange) == null || m.call(t, s.value),
        y === 0 && (a(),
        (E = t.onFinish) == null || E.call(t))
    }
      , u = () => {
        e = pn( () => {
            n && (c(l()),
            o.value > 0 && u())
        }
        )
    }
      , f = () => {
        e = pn( () => {
            if (n) {
                const y = l();
                (!xV(y, o.value) || y === 0) && c(y),
                o.value > 0 && f()
            }
        }
        )
    }
      , d = () => {
        Po && (t.millisecond ? u() : f())
    }
      , h = () => {
        n || (r = Date.now() + o.value,
        n = !0,
        d())
    }
      , x = (y=t.time) => {
        a(),
        o.value = y
    }
    ;
    return Zn(a),
    ys( () => {
        i && (n = !0,
        i = !1,
        d())
    }
    ),
    Fo( () => {
        n && (a(),
        i = !0)
    }
    ),
    {
        start: h,
        pause: a,
        reset: x,
        current: s
    }
}
function Bu(t) {
    let e;
    Ht( () => {
        t(),
        Xe( () => {
            e = !0
        }
        )
    }
    ),
    ys( () => {
        e && t()
    }
    )
}
function yn(t, e, r={}) {
    if (!Po)
        return;
    const {target: n=window, passive: i=!1, capture: o=!1} = r;
    let s = !1, a;
    const l = f => {
        if (s)
            return;
        const d = xn(f);
        d && !a && (d.addEventListener(t, e, {
            capture: o,
            passive: i
        }),
        a = !0)
    }
      , c = f => {
        if (s)
            return;
        const d = xn(f);
        d && a && (d.removeEventListener(t, e, o),
        a = !1)
    }
    ;
    _s( () => c(n)),
    Fo( () => c(n)),
    Bu( () => l(n));
    let u;
    return xt(n) && (u = me(n, (f, d) => {
        c(d),
        l(f)
    }
    )),
    () => {
        u == null || u(),
        c(n),
        s = !0
    }
}
function MS(t, e, r={}) {
    if (!Po)
        return;
    const {eventName: n="click"} = r;
    yn(n, o => {
        (Array.isArray(t) ? t : [t]).every(l => {
            const c = xn(l);
            return c && !c.contains(o.target)
        }
        ) && e(o)
    }
    , {
        target: document
    })
}
var Ud, lg;
function NS() {
    if (!Ud && (Ud = ie(0),
    lg = ie(0),
    Po)) {
        const t = () => {
            Ud.value = window.innerWidth,
            lg.value = window.innerHeight
        }
        ;
        t(),
        window.addEventListener("resize", t, {
            passive: !0
        }),
        window.addEventListener("orientationchange", t, {
            passive: !0
        })
    }
    return {
        width: Ud,
        height: lg
    }
}
var pV = /scroll|auto|overlay/i
  , LS = Po ? window : void 0;
function gV(t) {
    return t.tagName !== "HTML" && t.tagName !== "BODY" && t.nodeType === 1
}
function e2(t, e=LS) {
    let r = t;
    for (; r && r !== e && gV(r); ) {
        const {overflowY: n} = window.getComputedStyle(r);
        if (pV.test(n))
            return r;
        r = r.parentNode
    }
    return e
}
function nd(t, e=LS) {
    const r = ie();
    return Ht( () => {
        t.value && (r.value = e2(t.value, e))
    }
    ),
    r
}
var Gd;
function $S() {
    if (!Gd && (Gd = ie("visible"),
    Po)) {
        const t = () => {
            Gd.value = document.hidden ? "hidden" : "visible"
        }
        ;
        t(),
        window.addEventListener("visibilitychange", t)
    }
    return Gd
}
var t2 = Symbol("van-field");
function Vl(t) {
    const e = dr(t2, null);
    e && !e.customValue.value && (e.customValue.value = t,
    me(t, () => {
        e.resetValidation(),
        e.validateWithTrigger("onChange")
    }
    ))
}
function mV(t, e) {
    if (Po) {
        const {interval: r=0, isLoop: n=!1} = e || {};
        let i, o = !1, s;
        const a = () => {
            o = !0,
            cancelAnimationFrame(s)
        }
          , l = c => {
            if (!o) {
                if (i === void 0)
                    i = c;
                else if (c - i > r && (t(c),
                i = c,
                !n)) {
                    a();
                    return
                }
                s = requestAnimationFrame(l)
            }
        }
        ;
        return s = requestAnimationFrame(l),
        a
    }
    return () => {}
}
const vV = Object.freeze(Object.defineProperty({
    __proto__: null,
    CUSTOM_FIELD_INJECTION_KEY: t2,
    cancelRaf: rd,
    doubleRaf: Ka,
    flattenVNodes: OS,
    getScrollParent: e2,
    inBrowser: Po,
    onMountedOrActivated: Bu,
    raf: pn,
    sortChildren: kS,
    supportsPassive: fV,
    useChildren: zi,
    useClickAway: MS,
    useCountDown: RS,
    useCustomFieldValue: Vl,
    useEventListener: yn,
    usePageVisibility: $S,
    useParent: Jn,
    useRaf: mV,
    useRect: Cr,
    useScrollParent: nd,
    useToggle: IS,
    useWindowSize: NS
}, Symbol.toStringTag, {
    value: "Module"
}))
  , Gp = q_(vV);
var r2 = Object.defineProperty
  , yV = Object.getOwnPropertyDescriptor
  , EV = Object.getOwnPropertyNames
  , _V = Object.prototype.hasOwnProperty
  , bV = (t, e) => {
    for (var r in e)
        r2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , CV = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of EV(e))
            !_V.call(t, i) && i !== r && r2(t, i, {
                get: () => e[i],
                enumerable: !(n = yV(e, i)) || n.enumerable
            });
    return t
}
  , AV = t => CV(r2({}, "__esModule", {
    value: !0
}), t)
  , US = {};
bV(US, {
    getContainingBlock: () => RV,
    getElementTop: () => SV,
    getRootScrollTop: () => n2,
    getScrollTop: () => VS,
    isHidden: () => PV,
    preventDefault: () => FV,
    resetScroll: () => DV,
    setRootScrollTop: () => zS,
    setScrollTop: () => xy,
    stopPropagation: () => jS,
    windowHeight: () => OV,
    windowWidth: () => IV
});
var GS = AV(US)
  , HS = Gp
  , wV = Wr
  , BV = ga;
function VS(t) {
    const e = "scrollTop"in t ? t.scrollTop : t.pageYOffset;
    return Math.max(e, 0)
}
function xy(t, e) {
    "scrollTop"in t ? t.scrollTop = e : t.scrollTo(t.scrollX, e)
}
function n2() {
    return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0
}
function zS(t) {
    xy(window, t),
    xy(document.body, t)
}
function SV(t, e) {
    if (t === window)
        return 0;
    const r = e ? VS(e) : n2();
    return (0,
    HS.useRect)(t).top + r
}
const TV = (0,
BV.isIOS)();
function DV() {
    TV && zS(n2())
}
const jS = t => t.stopPropagation();
function FV(t, e) {
    (typeof t.cancelable != "boolean" || t.cancelable) && t.preventDefault(),
    e && jS(t)
}
function PV(t) {
    const e = (0,
    wV.unref)(t);
    if (!e)
        return !1;
    const r = window.getComputedStyle(e)
      , n = r.display === "none"
      , i = e.offsetParent === null && r.position !== "fixed";
    return n || i
}
const {width: IV, height: OV} = (0,
HS.useWindowSize)();
function kV(t) {
    const e = window.getComputedStyle(t);
    return e.transform !== "none" || e.perspective !== "none" || ["transform", "perspective", "filter"].some(r => (e.willChange || "").includes(r))
}
function RV(t) {
    let e = t.parentElement;
    for (; e; ) {
        if (e && e.tagName !== "HTML" && e.tagName !== "BODY" && kV(e))
            return e;
        e = e.parentElement
    }
    return null
}
var i2 = Object.defineProperty
  , MV = Object.getOwnPropertyDescriptor
  , NV = Object.getOwnPropertyNames
  , LV = Object.prototype.hasOwnProperty
  , $V = (t, e) => {
    for (var r in e)
        i2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , UV = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of NV(e))
            !LV.call(t, i) && i !== r && i2(t, i, {
                get: () => e[i],
                enumerable: !(n = MV(e, i)) || n.enumerable
            });
    return t
}
  , GV = t => UV(i2({}, "__esModule", {
    value: !0
}), t)
  , WS = {};
$V(WS, {
    addNumber: () => rz,
    addUnit: () => zh,
    camelize: () => ZV,
    clamp: () => ez,
    formatNumber: () => tz,
    getSizeStyle: () => VV,
    getZIndexStyle: () => zV,
    kebabCase: () => JV,
    padZero: () => QV,
    unitToPx: () => KV
});
var o2 = GV(WS)
  , HV = ga
  , YS = GS
  , py = ga;
function zh(t) {
    if ((0,
    py.isDef)(t))
        return (0,
        py.isNumeric)(t) ? `${t}px` : String(t)
}
function VV(t) {
    if ((0,
    py.isDef)(t)) {
        if (Array.isArray(t))
            return {
                width: zh(t[0]),
                height: zh(t[1])
            };
        const e = zh(t);
        return {
            width: e,
            height: e
        }
    }
}
function zV(t) {
    const e = {};
    return t !== void 0 && (e.zIndex = +t),
    e
}
let cg;
function jV() {
    if (!cg) {
        const t = document.documentElement
          , e = t.style.fontSize || window.getComputedStyle(t).fontSize;
        cg = parseFloat(e)
    }
    return cg
}
function WV(t) {
    return t = t.replace(/rem/g, ""),
    +t * jV()
}
function YV(t) {
    return t = t.replace(/vw/g, ""),
    +t * YS.windowWidth.value / 100
}
function XV(t) {
    return t = t.replace(/vh/g, ""),
    +t * YS.windowHeight.value / 100
}
function KV(t) {
    if (typeof t == "number")
        return t;
    if (HV.inBrowser) {
        if (t.includes("rem"))
            return WV(t);
        if (t.includes("vw"))
            return YV(t);
        if (t.includes("vh"))
            return XV(t)
    }
    return parseFloat(t)
}
const qV = /-(\w)/g
  , ZV = t => t.replace(qV, (e, r) => r.toUpperCase())
  , JV = t => t.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
function QV(t, e=2) {
    let r = t + "";
    for (; r.length < e; )
        r = "0" + r;
    return r
}
const ez = (t, e, r) => Math.min(Math.max(t, e), r);
function e9(t, e, r) {
    const n = t.indexOf(e);
    return n === -1 ? t : e === "-" && n !== 0 ? t.slice(0, n) : t.slice(0, n + 1) + t.slice(n).replace(r, "")
}
function tz(t, e=!0, r=!0) {
    e ? t = e9(t, ".", /\./g) : t = t.split(".")[0],
    r ? t = e9(t, "-", /-/g) : t = t.replace(/-/, "");
    const n = e ? /[^-0-9.]/g : /[^-0-9]/g;
    return t.replace(n, "")
}
function rz(t, e) {
    return Math.round((t + e) * 1e10) / 1e10
}
var s2 = Object.defineProperty
  , nz = Object.getOwnPropertyDescriptor
  , iz = Object.getOwnPropertyNames
  , oz = Object.prototype.hasOwnProperty
  , sz = (t, e) => {
    for (var r in e)
        s2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , az = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of iz(e))
            !oz.call(t, i) && i !== r && s2(t, i, {
                get: () => e[i],
                enumerable: !(n = nz(e, i)) || n.enumerable
            });
    return t
}
  , lz = t => az(s2({}, "__esModule", {
    value: !0
}), t)
  , XS = {};
sz(XS, {
    deepAssign: () => KS
});
var cz = lz(XS)
  , t9 = ga;
const {hasOwnProperty: uz} = Object.prototype;
function fz(t, e, r) {
    const n = e[r];
    (0,
    t9.isDef)(n) && (!uz.call(t, r) || !(0,
    t9.isObject)(n) ? t[r] = n : t[r] = KS(Object(t[r]), n))
}
function KS(t, e) {
    return Object.keys(e).forEach(r => {
        fz(t, e, r)
    }
    ),
    t
}
var a2 = Object.defineProperty
  , dz = Object.getOwnPropertyDescriptor
  , hz = Object.getOwnPropertyNames
  , xz = Object.prototype.hasOwnProperty
  , pz = (t, e) => {
    for (var r in e)
        a2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , gz = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of hz(e))
            !xz.call(t, i) && i !== r && a2(t, i, {
                get: () => e[i],
                enumerable: !(n = dz(e, i)) || n.enumerable
            });
    return t
}
  , mz = t => gz(a2({}, "__esModule", {
    value: !0
}), t)
  , qS = {};
pz(qS, {
    default: () => yz
});
var vz = mz(qS)
  , yz = {
    name: "姓名",
    tel: "电话",
    save: "保存",
    clear: "清空",
    cancel: "取消",
    confirm: "确认",
    delete: "删除",
    loading: "加载中...",
    noCoupon: "暂无优惠券",
    nameEmpty: "请填写姓名",
    addContact: "添加联系人",
    telInvalid: "请填写正确的电话",
    vanCalendar: {
        end: "结束",
        start: "开始",
        title: "日期选择",
        weekdays: ["日", "一", "二", "三", "四", "五", "六"],
        monthTitle: (t, e) => `${t}年${e}月`,
        rangePrompt: t => `最多选择 ${t} 天`
    },
    vanCascader: {
        select: "请选择"
    },
    vanPagination: {
        prev: "上一页",
        next: "下一页"
    },
    vanPullRefresh: {
        pulling: "下拉即可刷新...",
        loosing: "释放即可刷新..."
    },
    vanSubmitBar: {
        label: "合计:"
    },
    vanCoupon: {
        unlimited: "无门槛",
        discount: t => `${t}折`,
        condition: t => `满${t}元可用`
    },
    vanCouponCell: {
        title: "优惠券",
        count: t => `${t}张可用`
    },
    vanCouponList: {
        exchange: "兑换",
        close: "不使用",
        enable: "可用",
        disabled: "不可用",
        placeholder: "输入优惠码"
    },
    vanAddressEdit: {
        area: "地区",
        areaEmpty: "请选择地区",
        addressEmpty: "请填写详细地址",
        addressDetail: "详细地址",
        defaultAddress: "设为默认收货地址"
    },
    vanAddressList: {
        add: "新增地址"
    }
}
  , Ez = Object.create
  , Hp = Object.defineProperty
  , _z = Object.getOwnPropertyDescriptor
  , bz = Object.getOwnPropertyNames
  , Cz = Object.getPrototypeOf
  , Az = Object.prototype.hasOwnProperty
  , wz = (t, e) => {
    for (var r in e)
        Hp(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , ZS = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of bz(e))
            !Az.call(t, i) && i !== r && Hp(t, i, {
                get: () => e[i],
                enumerable: !(n = _z(e, i)) || n.enumerable
            });
    return t
}
  , Bz = (t, e, r) => (r = t != null ? Ez(Cz(t)) : {},
ZS(e || !t || !t.__esModule ? Hp(r, "default", {
    value: t,
    enumerable: !0
}) : r, t))
  , Sz = t => ZS(Hp({}, "__esModule", {
    value: !0
}), t)
  , JS = {};
wz(JS, {
    Locale: () => eT,
    default: () => Iz,
    useCurrentLang: () => Pz
});
var Tz = Sz(JS)
  , QS = Wr
  , Dz = cz
  , Fz = Bz(vz);
const gy = (0,
QS.ref)("zh-CN")
  , r9 = (0,
QS.reactive)({
    "zh-CN": Fz.default
})
  , eT = {
    messages() {
        return r9[gy.value]
    },
    use(t, e) {
        gy.value = t,
        this.add({
            [t]: e
        })
    },
    add(t={}) {
        (0,
        Dz.deepAssign)(r9, t)
    }
}
  , Pz = () => gy;
var Iz = eT
  , Oz = Object.create
  , Vp = Object.defineProperty
  , kz = Object.getOwnPropertyDescriptor
  , Rz = Object.getOwnPropertyNames
  , Mz = Object.getPrototypeOf
  , Nz = Object.prototype.hasOwnProperty
  , Lz = (t, e) => {
    for (var r in e)
        Vp(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , tT = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of Rz(e))
            !Nz.call(t, i) && i !== r && Vp(t, i, {
                get: () => e[i],
                enumerable: !(n = kz(e, i)) || n.enumerable
            });
    return t
}
  , $z = (t, e, r) => (r = t != null ? Oz(Mz(t)) : {},
tT(e || !t || !t.__esModule ? Vp(r, "default", {
    value: t,
    enumerable: !0
}) : r, t))
  , Uz = t => tT(Vp({}, "__esModule", {
    value: !0
}), t)
  , rT = {};
Lz(rT, {
    createBEM: () => iT,
    createNamespace: () => zz,
    createTranslate: () => nT
});
var Gz = Uz(rT)
  , ug = ga
  , Hz = o2
  , Vz = $z(Tz);
function nT(t) {
    const e = (0,
    Hz.camelize)(t) + ".";
    return (r, ...n) => {
        const i = Vz.default.messages()
          , o = (0,
        ug.get)(i, e + r) || (0,
        ug.get)(i, r);
        return (0,
        ug.isFunction)(o) ? o(...n) : o
    }
}
function my(t, e) {
    return e ? typeof e == "string" ? ` ${t}--${e}` : Array.isArray(e) ? e.reduce( (r, n) => r + my(t, n), "") : Object.keys(e).reduce( (r, n) => r + (e[n] ? my(t, n) : ""), "") : ""
}
function iT(t) {
    return (e, r) => (e && typeof e != "string" && (r = e,
    e = ""),
    e = e ? `${t}__${e}` : t,
    `${e}${my(e, r)}`)
}
function zz(t) {
    const e = `van-${t}`;
    return [e, iT(e), nT(e)]
}
var l2 = Object.defineProperty
  , jz = Object.getOwnPropertyDescriptor
  , Wz = Object.getOwnPropertyNames
  , Yz = Object.prototype.hasOwnProperty
  , Xz = (t, e) => {
    for (var r in e)
        l2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , Kz = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of Wz(e))
            !Yz.call(t, i) && i !== r && l2(t, i, {
                get: () => e[i],
                enumerable: !(n = jz(e, i)) || n.enumerable
            });
    return t
}
  , qz = t => Kz(l2({}, "__esModule", {
    value: !0
}), t)
  , oT = {};
Xz(oT, {
    BORDER: () => ma,
    BORDER_BOTTOM: () => tj,
    BORDER_LEFT: () => Qz,
    BORDER_RIGHT: () => ej,
    BORDER_SURROUND: () => rj,
    BORDER_TOP: () => Jz,
    BORDER_TOP_BOTTOM: () => nj,
    BORDER_UNSET_TOP_BOTTOM: () => ij,
    FORM_KEY: () => sj,
    HAPTICS_FEEDBACK: () => oj,
    LONG_PRESS_START_TIME: () => aj,
    TAP_OFFSET: () => lj
});
var Zz = qz(oT);
const ma = "van-hairline"
  , Jz = `${ma}--top`
  , Qz = `${ma}--left`
  , ej = `${ma}--right`
  , tj = `${ma}--bottom`
  , rj = `${ma}--surround`
  , nj = `${ma}--top-bottom`
  , ij = `${ma}-unset--top-bottom`
  , oj = "van-haptics-feedback"
  , sj = Symbol("van-form")
  , aj = 500
  , lj = 5;
var c2 = Object.defineProperty
  , cj = Object.getOwnPropertyDescriptor
  , uj = Object.getOwnPropertyNames
  , fj = Object.prototype.hasOwnProperty
  , dj = (t, e) => {
    for (var r in e)
        c2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , hj = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of uj(e))
            !fj.call(t, i) && i !== r && c2(t, i, {
                get: () => e[i],
                enumerable: !(n = cj(e, i)) || n.enumerable
            });
    return t
}
  , xj = t => hj(c2({}, "__esModule", {
    value: !0
}), t)
  , sT = {};
dj(sT, {
    callInterceptor: () => gj
});
var pj = xj(sT)
  , n9 = ga;
function gj(t, {args: e=[], done: r, canceled: n, error: i}) {
    if (t) {
        const o = t.apply(null, e);
        (0,
        n9.isPromise)(o) ? o.then(s => {
            s ? r() : n && n()
        }
        ).catch(i || n9.noop) : o ? r() : n && n()
    } else
        r()
}
var u2 = Object.defineProperty
  , mj = Object.getOwnPropertyDescriptor
  , vj = Object.getOwnPropertyNames
  , yj = Object.prototype.hasOwnProperty
  , Ej = (t, e) => {
    for (var r in e)
        u2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , _j = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of vj(e))
            !yj.call(t, i) && i !== r && u2(t, i, {
                get: () => e[i],
                enumerable: !(n = mj(e, i)) || n.enumerable
            });
    return t
}
  , bj = t => _j(u2({}, "__esModule", {
    value: !0
}), t)
  , aT = {};
Ej(aT, {
    withInstall: () => wj
});
var Cj = bj(aT)
  , Aj = o2;
function wj(t) {
    return t.install = e => {
        const {name: r} = t;
        r && (e.component(r, t),
        e.component((0,
        Aj.camelize)(`-${r}`), t))
    }
    ,
    t
}
var f2 = Object.defineProperty
  , Bj = Object.getOwnPropertyDescriptor
  , Sj = Object.getOwnPropertyNames
  , Tj = Object.prototype.hasOwnProperty
  , Dj = (t, e) => {
    for (var r in e)
        f2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , Fj = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of Sj(e))
            !Tj.call(t, i) && i !== r && f2(t, i, {
                get: () => e[i],
                enumerable: !(n = Bj(e, i)) || n.enumerable
            });
    return t
}
  , Pj = t => Fj(f2({}, "__esModule", {
    value: !0
}), t)
  , lT = {};
Dj(lT, {
    closest: () => Oj
});
var Ij = Pj(lT);
function Oj(t, e) {
    return t.reduce( (r, n) => Math.abs(r - e) < Math.abs(n - e) ? r : n)
}
(function(t) {
    var e = Object.defineProperty
      , r = Object.getOwnPropertyDescriptor
      , n = Object.getOwnPropertyNames
      , i = Object.prototype.hasOwnProperty
      , o = (c, u, f, d) => {
        if (u && typeof u == "object" || typeof u == "function")
            for (let h of n(u))
                !i.call(c, h) && h !== f && e(c, h, {
                    get: () => u[h],
                    enumerable: !(d = r(u, h)) || d.enumerable
                });
        return c
    }
      , s = (c, u, f) => (o(c, u, "default"),
    f && o(f, u, "default"))
      , a = c => o(e({}, "__esModule", {
        value: !0
    }), c)
      , l = {};
    t.exports = a(l),
    s(l, ga, t.exports),
    s(l, nV, t.exports),
    s(l, GS, t.exports),
    s(l, Gz, t.exports),
    s(l, o2, t.exports),
    s(l, Zz, t.exports),
    s(l, pj, t.exports),
    s(l, Cj, t.exports),
    s(l, Ij, t.exports)
}
)(SS);
var Yr = SS.exports
  , d2 = Object.defineProperty
  , kj = Object.getOwnPropertyDescriptor
  , Rj = Object.getOwnPropertyNames
  , Mj = Object.prototype.hasOwnProperty
  , Nj = (t, e) => {
    for (var r in e)
        d2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , Lj = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of Rj(e))
            !Mj.call(t, i) && i !== r && d2(t, i, {
                get: () => e[i],
                enumerable: !(n = kj(e, i)) || n.enumerable
            });
    return t
}
  , $j = t => Lj(d2({}, "__esModule", {
    value: !0
}), t)
  , cT = {};
Nj(cT, {
    useExpose: () => Hj
});
var uT = $j(cT)
  , Uj = Wr
  , Gj = Yr;
function Hj(t) {
    const e = (0,
    Uj.getCurrentInstance)();
    e && (0,
    Gj.extend)(e.proxy, t)
}
var h2 = Object.defineProperty
  , Vj = Object.getOwnPropertyDescriptor
  , zj = Object.getOwnPropertyNames
  , jj = Object.prototype.hasOwnProperty
  , Wj = (t, e) => {
    for (var r in e)
        h2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , Yj = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of zj(e))
            !jj.call(t, i) && i !== r && h2(t, i, {
                get: () => e[i],
                enumerable: !(n = Vj(e, i)) || n.enumerable
            });
    return t
}
  , Xj = t => Yj(h2({}, "__esModule", {
    value: !0
}), t)
  , fT = {};
Wj(fT, {
    mountComponent: () => Qj,
    usePopupState: () => Jj
});
var Kj = Xj(fT)
  , dT = Wr
  , qj = ga
  , Zj = uT;
function Jj() {
    const t = (0,
    dT.reactive)({
        show: !1
    })
      , e = i => {
        t.show = i
    }
      , r = i => {
        (0,
        qj.extend)(t, i, {
            transitionAppear: !0
        }),
        e(!0)
    }
      , n = () => e(!1);
    return (0,
    Zj.useExpose)({
        open: r,
        close: n,
        toggle: e
    }),
    {
        open: r,
        close: n,
        state: t,
        toggle: e
    }
}
function Qj(t) {
    const e = (0,
    dT.createApp)(t)
      , r = document.createElement("div");
    return document.body.appendChild(r),
    {
        instance: e.mount(r),
        unmount() {
            e.unmount(),
            document.body.removeChild(r)
        }
    }
}
var x2 = Object.defineProperty
  , eW = Object.getOwnPropertyDescriptor
  , tW = Object.getOwnPropertyNames
  , rW = Object.prototype.hasOwnProperty
  , nW = (t, e) => {
    for (var r in e)
        x2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , iW = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of tW(e))
            !rW.call(t, i) && i !== r && x2(t, i, {
                get: () => e[i],
                enumerable: !(n = eW(e, i)) || n.enumerable
            });
    return t
}
  , oW = t => iW(x2({}, "__esModule", {
    value: !0
}), t)
  , hT = {};
nW(hT, {
    lockClick: () => aW
});
var sW = oW(hT);
let Vu = 0;
function aW(t) {
    t ? (Vu || document.body.classList.add("van-toast--unclickable"),
    Vu++) : Vu && (Vu--,
    Vu || document.body.classList.remove("van-toast--unclickable"))
}
var p2 = Object.defineProperty
  , lW = Object.getOwnPropertyDescriptor
  , cW = Object.getOwnPropertyNames
  , uW = Object.prototype.hasOwnProperty
  , fW = (t, e) => {
    for (var r in e)
        p2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , dW = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of cW(e))
            !uW.call(t, i) && i !== r && p2(t, i, {
                get: () => e[i],
                enumerable: !(n = lW(e, i)) || n.enumerable
            });
    return t
}
  , hW = t => dW(p2({}, "__esModule", {
    value: !0
}), t)
  , xT = {};
fW(xT, {
    badgeProps: () => gT,
    default: () => pW
});
var pT = hW(xT)
  , Hd = Wr
  , un = Yr;
const [xW,i9] = (0,
un.createNamespace)("badge")
  , gT = {
    dot: Boolean,
    max: un.numericProp,
    tag: (0,
    un.makeStringProp)("div"),
    color: String,
    offset: Array,
    content: un.numericProp,
    showZero: un.truthProp,
    position: (0,
    un.makeStringProp)("top-right")
};
var pW = (0,
Hd.defineComponent)({
    name: xW,
    props: gT,
    setup(t, {slots: e}) {
        const r = () => {
            if (e.content)
                return !0;
            const {content: a, showZero: l} = t;
            return (0,
            un.isDef)(a) && a !== "" && (l || a !== 0 && a !== "0")
        }
          , n = () => {
            const {dot: a, max: l, content: c} = t;
            if (!a && r())
                return e.content ? e.content() : (0,
                un.isDef)(l) && (0,
                un.isNumeric)(c) && +c > +l ? `${l}+` : c
        }
          , i = a => a.startsWith("-") ? a.replace("-", "") : `-${a}`
          , o = (0,
        Hd.computed)( () => {
            const a = {
                background: t.color
            };
            if (t.offset) {
                const [l,c] = t.offset
                  , {position: u} = t
                  , [f,d] = u.split("-");
                e.default ? (typeof c == "number" ? a[f] = (0,
                un.addUnit)(f === "top" ? c : -c) : a[f] = f === "top" ? (0,
                un.addUnit)(c) : i(c),
                typeof l == "number" ? a[d] = (0,
                un.addUnit)(d === "left" ? l : -l) : a[d] = d === "left" ? (0,
                un.addUnit)(l) : i(l)) : (a.marginTop = (0,
                un.addUnit)(c),
                a.marginLeft = (0,
                un.addUnit)(l))
            }
            return a
        }
        )
          , s = () => {
            if (r() || t.dot)
                return (0,
                Hd.createVNode)("div", {
                    class: i9([t.position, {
                        dot: t.dot,
                        fixed: !!e.default
                    }]),
                    style: o.value
                }, [n()])
        }
        ;
        return () => {
            if (e.default) {
                const {tag: a} = t;
                return (0,
                Hd.createVNode)(a, {
                    class: i9("wrapper")
                }, {
                    default: () => [e.default(), s()]
                })
            }
            return s()
        }
    }
})
  , gW = Object.create
  , zp = Object.defineProperty
  , mW = Object.getOwnPropertyDescriptor
  , vW = Object.getOwnPropertyNames
  , yW = Object.getPrototypeOf
  , EW = Object.prototype.hasOwnProperty
  , _W = (t, e) => {
    for (var r in e)
        zp(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , mT = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of vW(e))
            !EW.call(t, i) && i !== r && zp(t, i, {
                get: () => e[i],
                enumerable: !(n = mW(e, i)) || n.enumerable
            });
    return t
}
  , bW = (t, e, r) => (r = t != null ? gW(yW(t)) : {},
mT(e || !t || !t.__esModule ? zp(r, "default", {
    value: t,
    enumerable: !0
}) : r, t))
  , CW = t => mT(zp({}, "__esModule", {
    value: !0
}), t)
  , vT = {};
_W(vT, {
    Badge: () => yT,
    badgeProps: () => SW.badgeProps,
    default: () => TW
});
var AW = CW(vT)
  , wW = Yr
  , BW = bW(pT)
  , SW = pT;
const yT = (0,
wW.withInstall)(BW.default);
var TW = yT
  , g2 = Object.defineProperty
  , DW = Object.getOwnPropertyDescriptor
  , FW = Object.getOwnPropertyNames
  , PW = Object.prototype.hasOwnProperty
  , IW = (t, e) => {
    for (var r in e)
        g2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , OW = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of FW(e))
            !PW.call(t, i) && i !== r && g2(t, i, {
                get: () => e[i],
                enumerable: !(n = DW(e, i)) || n.enumerable
            });
    return t
}
  , kW = t => OW(g2({}, "__esModule", {
    value: !0
}), t)
  , ET = {};
IW(ET, {
    setGlobalZIndex: () => MW,
    useGlobalZIndex: () => RW
});
var _T = kW(ET);
let bT = 2e3;
const RW = () => ++bT
  , MW = t => {
    bT = t
}
;
var m2 = Object.defineProperty
  , NW = Object.getOwnPropertyDescriptor
  , LW = Object.getOwnPropertyNames
  , $W = Object.prototype.hasOwnProperty
  , UW = (t, e) => {
    for (var r in e)
        m2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , GW = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of LW(e))
            !$W.call(t, i) && i !== r && m2(t, i, {
                get: () => e[i],
                enumerable: !(n = NW(e, i)) || n.enumerable
            });
    return t
}
  , HW = t => GW(m2({}, "__esModule", {
    value: !0
}), t)
  , CT = {};
UW(CT, {
    CONFIG_PROVIDER_KEY: () => wT,
    configProviderProps: () => BT,
    default: () => XW
});
var VW = HW(CT)
  , bi = Wr
  , ul = Yr
  , zW = _T;
const [AT,jW] = (0,
ul.createNamespace)("config-provider")
  , wT = Symbol(AT)
  , BT = {
    tag: (0,
    ul.makeStringProp)("div"),
    theme: (0,
    ul.makeStringProp)("light"),
    zIndex: Number,
    themeVars: Object,
    themeVarsDark: Object,
    themeVarsLight: Object,
    themeVarsScope: (0,
    ul.makeStringProp)("local"),
    iconPrefix: String
};
function WW(t) {
    return t.replace(/([a-zA-Z])(\d)/g, "$1-$2")
}
function YW(t) {
    const e = {};
    return Object.keys(t).forEach(r => {
        const n = WW((0,
        ul.kebabCase)(r));
        e[`--van-${n}`] = t[r]
    }
    ),
    e
}
function Vd(t={}, e={}) {
    Object.keys(t).forEach(r => {
        t[r] !== e[r] && document.documentElement.style.setProperty(r, t[r])
    }
    ),
    Object.keys(e).forEach(r => {
        t[r] || document.documentElement.style.removeProperty(r)
    }
    )
}
var XW = (0,
bi.defineComponent)({
    name: AT,
    props: BT,
    setup(t, {slots: e}) {
        const r = (0,
        bi.computed)( () => YW((0,
        ul.extend)({}, t.themeVars, t.theme === "dark" ? t.themeVarsDark : t.themeVarsLight)));
        if (ul.inBrowser) {
            const n = () => {
                document.documentElement.classList.add(`van-theme-${t.theme}`)
            }
              , i = (o=t.theme) => {
                document.documentElement.classList.remove(`van-theme-${o}`)
            }
            ;
            (0,
            bi.watch)( () => t.theme, (o, s) => {
                s && i(s),
                n()
            }
            , {
                immediate: !0
            }),
            (0,
            bi.onActivated)(n),
            (0,
            bi.onDeactivated)(i),
            (0,
            bi.onBeforeUnmount)(i),
            (0,
            bi.watch)(r, (o, s) => {
                t.themeVarsScope === "global" && Vd(o, s)
            }
            ),
            (0,
            bi.watch)( () => t.themeVarsScope, (o, s) => {
                s === "global" && Vd({}, r.value),
                o === "global" && Vd(r.value, {})
            }
            ),
            t.themeVarsScope === "global" && Vd(r.value, {})
        }
        return (0,
        bi.provide)(wT, t),
        (0,
        bi.watchEffect)( () => {
            t.zIndex !== void 0 && (0,
            zW.setGlobalZIndex)(t.zIndex)
        }
        ),
        () => (0,
        bi.createVNode)(t.tag, {
            class: jW(),
            style: t.themeVarsScope === "local" ? r.value : void 0
        }, {
            default: () => {
                var n;
                return [(n = e.default) == null ? void 0 : n.call(e)]
            }
        })
    }
})
  , v2 = Object.defineProperty
  , KW = Object.getOwnPropertyDescriptor
  , qW = Object.getOwnPropertyNames
  , ZW = Object.prototype.hasOwnProperty
  , JW = (t, e) => {
    for (var r in e)
        v2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , QW = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of qW(e))
            !ZW.call(t, i) && i !== r && v2(t, i, {
                get: () => e[i],
                enumerable: !(n = KW(e, i)) || n.enumerable
            });
    return t
}
  , eY = t => QW(v2({}, "__esModule", {
    value: !0
}), t)
  , ST = {};
JW(ST, {
    default: () => oY,
    iconProps: () => DT
});
var TT = eY(ST)
  , Ql = Wr
  , k0 = Yr
  , tY = AW
  , rY = VW;
const [nY,o9] = (0,
k0.createNamespace)("icon")
  , iY = t => t == null ? void 0 : t.includes("/")
  , DT = {
    dot: Boolean,
    tag: (0,
    k0.makeStringProp)("i"),
    name: String,
    size: k0.numericProp,
    badge: k0.numericProp,
    color: String,
    badgeProps: Object,
    classPrefix: String
};
var oY = (0,
Ql.defineComponent)({
    name: nY,
    props: DT,
    setup(t, {slots: e}) {
        const r = (0,
        Ql.inject)(rY.CONFIG_PROVIDER_KEY, null)
          , n = (0,
        Ql.computed)( () => t.classPrefix || (r == null ? void 0 : r.iconPrefix) || o9());
        return () => {
            const {tag: i, dot: o, name: s, size: a, badge: l, color: c} = t
              , u = iY(s);
            return (0,
            Ql.createVNode)(tY.Badge, (0,
            Ql.mergeProps)({
                dot: o,
                tag: i,
                class: [n.value, u ? "" : `${n.value}-${s}`],
                style: {
                    color: c,
                    fontSize: (0,
                    k0.addUnit)(a)
                },
                content: l
            }, t.badgeProps), {
                default: () => {
                    var f;
                    return [(f = e.default) == null ? void 0 : f.call(e), u && (0,
                    Ql.createVNode)("img", {
                        class: o9("image"),
                        src: s
                    }, null)]
                }
            })
        }
    }
})
  , sY = Object.create
  , jp = Object.defineProperty
  , aY = Object.getOwnPropertyDescriptor
  , lY = Object.getOwnPropertyNames
  , cY = Object.getPrototypeOf
  , uY = Object.prototype.hasOwnProperty
  , fY = (t, e) => {
    for (var r in e)
        jp(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , FT = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of lY(e))
            !uY.call(t, i) && i !== r && jp(t, i, {
                get: () => e[i],
                enumerable: !(n = aY(e, i)) || n.enumerable
            });
    return t
}
  , dY = (t, e, r) => (r = t != null ? sY(cY(t)) : {},
FT(e || !t || !t.__esModule ? jp(r, "default", {
    value: t,
    enumerable: !0
}) : r, t))
  , hY = t => FT(jp({}, "__esModule", {
    value: !0
}), t)
  , PT = {};
fY(PT, {
    Icon: () => OT,
    default: () => mY,
    iconProps: () => gY.iconProps
});
var IT = hY(PT)
  , xY = Yr
  , pY = dY(TT)
  , gY = TT;
const OT = (0,
xY.withInstall)(pY.default);
var mY = OT
  , y2 = Object.defineProperty
  , vY = Object.getOwnPropertyDescriptor
  , yY = Object.getOwnPropertyNames
  , EY = Object.prototype.hasOwnProperty
  , _Y = (t, e) => {
    for (var r in e)
        y2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , bY = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of yY(e))
            !EY.call(t, i) && i !== r && y2(t, i, {
                get: () => e[i],
                enumerable: !(n = vY(e, i)) || n.enumerable
            });
    return t
}
  , CY = t => bY(y2({}, "__esModule", {
    value: !0
}), t)
  , kT = {};
_Y(kT, {
    popupSharedPropKeys: () => wY,
    popupSharedProps: () => RT
});
var AY = CY(kT)
  , Da = Yr;
const RT = {
    show: Boolean,
    zIndex: Da.numericProp,
    overlay: Da.truthProp,
    duration: Da.numericProp,
    teleport: [String, Object],
    lockScroll: Da.truthProp,
    lazyRender: Da.truthProp,
    beforeClose: Function,
    overlayProps: Object,
    overlayStyle: Object,
    overlayClass: Da.unknownProp,
    transitionAppear: Boolean,
    closeOnClickOverlay: Da.truthProp
}
  , wY = Object.keys(RT);
var E2 = Object.defineProperty
  , BY = Object.getOwnPropertyDescriptor
  , SY = Object.getOwnPropertyNames
  , TY = Object.prototype.hasOwnProperty
  , DY = (t, e) => {
    for (var r in e)
        E2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , FY = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of SY(e))
            !TY.call(t, i) && i !== r && E2(t, i, {
                get: () => e[i],
                enumerable: !(n = BY(e, i)) || n.enumerable
            });
    return t
}
  , PY = t => FY(E2({}, "__esModule", {
    value: !0
}), t)
  , MT = {};
DY(MT, {
    useTouch: () => kY
});
var IY = PY(MT)
  , Ts = Wr
  , s9 = Yr;
function OY(t, e) {
    return t > e ? "horizontal" : e > t ? "vertical" : ""
}
function kY() {
    const t = (0,
    Ts.ref)(0)
      , e = (0,
    Ts.ref)(0)
      , r = (0,
    Ts.ref)(0)
      , n = (0,
    Ts.ref)(0)
      , i = (0,
    Ts.ref)(0)
      , o = (0,
    Ts.ref)(0)
      , s = (0,
    Ts.ref)("")
      , a = (0,
    Ts.ref)(!0)
      , l = () => s.value === "vertical"
      , c = () => s.value === "horizontal"
      , u = () => {
        r.value = 0,
        n.value = 0,
        i.value = 0,
        o.value = 0,
        s.value = "",
        a.value = !0
    }
    ;
    return {
        move: h => {
            const x = h.touches[0];
            r.value = (x.clientX < 0 ? 0 : x.clientX) - t.value,
            n.value = x.clientY - e.value,
            i.value = Math.abs(r.value),
            o.value = Math.abs(n.value);
            const y = 10;
            (!s.value || i.value < y && o.value < y) && (s.value = OY(i.value, o.value)),
            a.value && (i.value > s9.TAP_OFFSET || o.value > s9.TAP_OFFSET) && (a.value = !1)
        }
        ,
        start: h => {
            u(),
            t.value = h.touches[0].clientX,
            e.value = h.touches[0].clientY
        }
        ,
        reset: u,
        startX: t,
        startY: e,
        deltaX: r,
        deltaY: n,
        offsetX: i,
        offsetY: o,
        direction: s,
        isVertical: l,
        isHorizontal: c,
        isTap: a
    }
}
var _2 = Object.defineProperty
  , RY = Object.getOwnPropertyDescriptor
  , MY = Object.getOwnPropertyNames
  , NY = Object.prototype.hasOwnProperty
  , LY = (t, e) => {
    for (var r in e)
        _2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , $Y = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of MY(e))
            !NY.call(t, i) && i !== r && _2(t, i, {
                get: () => e[i],
                enumerable: !(n = RY(e, i)) || n.enumerable
            });
    return t
}
  , UY = t => $Y(_2({}, "__esModule", {
    value: !0
}), t)
  , NT = {};
LY(NT, {
    useLockScroll: () => zY
});
var GY = UY(NT)
  , fg = Wr
  , a9 = Gp
  , HY = IY
  , VY = Yr;
let zu = 0;
const l9 = "van-overflow-hidden";
function zY(t, e) {
    const r = (0,
    HY.useTouch)()
      , n = "01"
      , i = "10"
      , o = u => {
        r.move(u);
        const f = r.deltaY.value > 0 ? i : n
          , d = (0,
        a9.getScrollParent)(u.target, t.value)
          , {scrollHeight: h, offsetHeight: x, scrollTop: y} = d;
        let m = "11";
        y === 0 ? m = x >= h ? "00" : "01" : y + x >= h && (m = "10"),
        m !== "11" && r.isVertical() && !(parseInt(m, 2) & parseInt(f, 2)) && (0,
        VY.preventDefault)(u, !0)
    }
      , s = () => {
        document.addEventListener("touchstart", r.start),
        document.addEventListener("touchmove", o, {
            passive: !1
        }),
        zu || document.body.classList.add(l9),
        zu++
    }
      , a = () => {
        zu && (document.removeEventListener("touchstart", r.start),
        document.removeEventListener("touchmove", o),
        zu--,
        zu || document.body.classList.remove(l9))
    }
      , l = () => e() && s()
      , c = () => e() && a();
    (0,
    a9.onMountedOrActivated)(l),
    (0,
    fg.onDeactivated)(c),
    (0,
    fg.onBeforeUnmount)(c),
    (0,
    fg.watch)(e, u => {
        u ? s() : a()
    }
    )
}
var b2 = Object.defineProperty
  , jY = Object.getOwnPropertyDescriptor
  , WY = Object.getOwnPropertyNames
  , YY = Object.prototype.hasOwnProperty
  , XY = (t, e) => {
    for (var r in e)
        b2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , KY = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of WY(e))
            !YY.call(t, i) && i !== r && b2(t, i, {
                get: () => e[i],
                enumerable: !(n = jY(e, i)) || n.enumerable
            });
    return t
}
  , qY = t => KY(b2({}, "__esModule", {
    value: !0
}), t)
  , LT = {};
XY(LT, {
    useLazyRender: () => ZY
});
var $T = qY(LT)
  , c9 = Wr;
function ZY(t) {
    const e = (0,
    c9.ref)(!1);
    return (0,
    c9.watch)(t, r => {
        r && (e.value = r)
    }
    , {
        immediate: !0
    }),
    r => () => e.value ? r() : null
}
var C2 = Object.defineProperty
  , JY = Object.getOwnPropertyDescriptor
  , QY = Object.getOwnPropertyNames
  , eX = Object.prototype.hasOwnProperty
  , tX = (t, e) => {
    for (var r in e)
        C2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , rX = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of QY(e))
            !eX.call(t, i) && i !== r && C2(t, i, {
                get: () => e[i],
                enumerable: !(n = JY(e, i)) || n.enumerable
            });
    return t
}
  , nX = t => rX(C2({}, "__esModule", {
    value: !0
}), t)
  , UT = {};
tX(UT, {
    POPUP_TOGGLE_KEY: () => GT,
    onPopupReopen: () => oX
});
var iX = nX(UT)
  , u9 = Wr;
const GT = Symbol();
function oX(t) {
    const e = (0,
    u9.inject)(GT, null);
    e && (0,
    u9.watch)(e, r => {
        r && t()
    }
    )
}
var A2 = Object.defineProperty
  , sX = Object.getOwnPropertyDescriptor
  , aX = Object.getOwnPropertyNames
  , lX = Object.prototype.hasOwnProperty
  , cX = (t, e) => {
    for (var r in e)
        A2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , uX = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of aX(e))
            !lX.call(t, i) && i !== r && A2(t, i, {
                get: () => e[i],
                enumerable: !(n = sX(e, i)) || n.enumerable
            });
    return t
}
  , fX = t => uX(A2({}, "__esModule", {
    value: !0
}), t)
  , HT = {};
cX(HT, {
    useScopeId: () => xX
});
var dX = fX(HT)
  , hX = Wr;
const xX = () => {
    var t;
    const {scopeId: e} = ((t = (0,
    hX.getCurrentInstance)()) == null ? void 0 : t.vnode) || {};
    return e ? {
        [e]: ""
    } : null
}
;
var w2 = Object.defineProperty
  , pX = Object.getOwnPropertyDescriptor
  , gX = Object.getOwnPropertyNames
  , mX = Object.prototype.hasOwnProperty
  , vX = (t, e) => {
    for (var r in e)
        w2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , yX = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of gX(e))
            !mX.call(t, i) && i !== r && w2(t, i, {
                get: () => e[i],
                enumerable: !(n = pX(e, i)) || n.enumerable
            });
    return t
}
  , EX = t => yX(w2({}, "__esModule", {
    value: !0
}), t)
  , VT = {};
vX(VT, {
    default: () => wX,
    overlayProps: () => jT
});
var zT = EX(VT)
  , qi = Wr
  , co = Yr
  , _X = Gp
  , bX = $T;
const [CX,AX] = (0,
co.createNamespace)("overlay")
  , jT = {
    show: Boolean,
    zIndex: co.numericProp,
    duration: co.numericProp,
    className: co.unknownProp,
    lockScroll: co.truthProp,
    lazyRender: co.truthProp,
    customStyle: Object,
    teleport: [String, Object]
};
var wX = (0,
qi.defineComponent)({
    name: CX,
    inheritAttrs: !1,
    props: jT,
    setup(t, {attrs: e, slots: r}) {
        const n = (0,
        qi.ref)()
          , i = (0,
        bX.useLazyRender)( () => t.show || !t.lazyRender)
          , o = a => {
            t.lockScroll && (0,
            co.preventDefault)(a, !0)
        }
          , s = i( () => {
            var a;
            const l = (0,
            co.extend)((0,
            co.getZIndexStyle)(t.zIndex), t.customStyle);
            return (0,
            co.isDef)(t.duration) && (l.animationDuration = `${t.duration}s`),
            (0,
            qi.withDirectives)((0,
            qi.createVNode)("div", (0,
            qi.mergeProps)({
                ref: n,
                style: l,
                class: [AX(), t.className]
            }, e), [(a = r.default) == null ? void 0 : a.call(r)]), [[qi.vShow, t.show]])
        }
        );
        return (0,
        _X.useEventListener)("touchmove", o, {
            target: n
        }),
        () => {
            const a = (0,
            qi.createVNode)(qi.Transition, {
                name: "van-fade",
                appear: !0
            }, {
                default: s
            });
            return t.teleport ? (0,
            qi.createVNode)(qi.Teleport, {
                to: t.teleport
            }, {
                default: () => [a]
            }) : a
        }
    }
})
  , BX = Object.create
  , Wp = Object.defineProperty
  , SX = Object.getOwnPropertyDescriptor
  , TX = Object.getOwnPropertyNames
  , DX = Object.getPrototypeOf
  , FX = Object.prototype.hasOwnProperty
  , PX = (t, e) => {
    for (var r in e)
        Wp(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , WT = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of TX(e))
            !FX.call(t, i) && i !== r && Wp(t, i, {
                get: () => e[i],
                enumerable: !(n = SX(e, i)) || n.enumerable
            });
    return t
}
  , IX = (t, e, r) => (r = t != null ? BX(DX(t)) : {},
WT(e || !t || !t.__esModule ? Wp(r, "default", {
    value: t,
    enumerable: !0
}) : r, t))
  , OX = t => WT(Wp({}, "__esModule", {
    value: !0
}), t)
  , YT = {};
PX(YT, {
    Overlay: () => XT,
    default: () => LX,
    overlayProps: () => NX.overlayProps
});
var kX = OX(YT)
  , RX = Yr
  , MX = IX(zT)
  , NX = zT;
const XT = (0,
RX.withInstall)(MX.default);
var LX = XT
  , B2 = Object.defineProperty
  , $X = Object.getOwnPropertyDescriptor
  , UX = Object.getOwnPropertyNames
  , GX = Object.prototype.hasOwnProperty
  , HX = (t, e) => {
    for (var r in e)
        B2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , VX = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of UX(e))
            !GX.call(t, i) && i !== r && B2(t, i, {
                get: () => e[i],
                enumerable: !(n = $X(e, i)) || n.enumerable
            });
    return t
}
  , zX = t => VX(B2({}, "__esModule", {
    value: !0
}), t)
  , KT = {};
HX(KT, {
    default: () => tK,
    popupProps: () => ZT
});
var qT = zX(KT)
  , Vt = Wr
  , jX = AY
  , Jo = Yr
  , WX = Gp
  , YX = uT
  , XX = GY
  , KX = $T
  , qX = iX
  , ZX = _T
  , f9 = dX
  , JX = IT
  , QX = kX;
const ZT = (0,
Jo.extend)({}, jX.popupSharedProps, {
    round: Boolean,
    position: (0,
    Jo.makeStringProp)("center"),
    closeIcon: (0,
    Jo.makeStringProp)("cross"),
    closeable: Boolean,
    transition: String,
    iconPrefix: String,
    closeOnPopstate: Boolean,
    closeIconPosition: (0,
    Jo.makeStringProp)("top-right"),
    destroyOnClose: Boolean,
    safeAreaInsetTop: Boolean,
    safeAreaInsetBottom: Boolean
})
  , [eK,d9] = (0,
Jo.createNamespace)("popup");
var tK = (0,
Vt.defineComponent)({
    name: eK,
    inheritAttrs: !1,
    props: ZT,
    emits: ["open", "close", "opened", "closed", "keydown", "update:show", "clickOverlay", "clickCloseIcon"],
    setup(t, {emit: e, attrs: r, slots: n}) {
        let i, o;
        const s = (0,
        Vt.ref)()
          , a = (0,
        Vt.ref)()
          , l = (0,
        KX.useLazyRender)( () => t.show || !t.lazyRender)
          , c = (0,
        Vt.computed)( () => {
            const b = {
                zIndex: s.value
            };
            if ((0,
            Jo.isDef)(t.duration)) {
                const C = t.position === "center" ? "animationDuration" : "transitionDuration";
                b[C] = `${t.duration}s`
            }
            return b
        }
        )
          , u = () => {
            i || (i = !0,
            s.value = t.zIndex !== void 0 ? +t.zIndex : (0,
            ZX.useGlobalZIndex)(),
            e("open"))
        }
          , f = () => {
            i && (0,
            Jo.callInterceptor)(t.beforeClose, {
                done() {
                    i = !1,
                    e("close"),
                    e("update:show", !1)
                }
            })
        }
          , d = b => {
            e("clickOverlay", b),
            t.closeOnClickOverlay && f()
        }
          , h = () => {
            if (t.overlay) {
                const b = (0,
                Jo.extend)({
                    show: t.show,
                    class: t.overlayClass,
                    zIndex: s.value,
                    duration: t.duration,
                    customStyle: t.overlayStyle,
                    role: t.closeOnClickOverlay ? "button" : void 0,
                    tabindex: t.closeOnClickOverlay ? 0 : void 0
                }, t.overlayProps);
                return (0,
                Vt.createVNode)(QX.Overlay, (0,
                Vt.mergeProps)(b, (0,
                f9.useScopeId)(), {
                    onClick: d
                }), {
                    default: n["overlay-content"]
                })
            }
        }
          , x = b => {
            e("clickCloseIcon", b),
            f()
        }
          , y = () => {
            if (t.closeable)
                return (0,
                Vt.createVNode)(JX.Icon, {
                    role: "button",
                    tabindex: 0,
                    name: t.closeIcon,
                    class: [d9("close-icon", t.closeIconPosition), Jo.HAPTICS_FEEDBACK],
                    classPrefix: t.iconPrefix,
                    onClick: x
                }, null)
        }
        ;
        let m;
        const E = () => {
            m && clearTimeout(m),
            m = setTimeout( () => {
                e("opened")
            }
            )
        }
          , g = () => e("closed")
          , p = b => e("keydown", b)
          , v = l( () => {
            var b;
            const {destroyOnClose: C, round: w, position: T, safeAreaInsetTop: A, safeAreaInsetBottom: B, show: S} = t;
            if (!(!S && C))
                return (0,
                Vt.withDirectives)((0,
                Vt.createVNode)("div", (0,
                Vt.mergeProps)({
                    ref: a,
                    style: c.value,
                    role: "dialog",
                    tabindex: 0,
                    class: [d9({
                        round: w,
                        [T]: T
                    }), {
                        "van-safe-area-top": A,
                        "van-safe-area-bottom": B
                    }],
                    onKeydown: p
                }, r, (0,
                f9.useScopeId)()), [(b = n.default) == null ? void 0 : b.call(n), y()]), [[Vt.vShow, S]])
        }
        )
          , _ = () => {
            const {position: b, transition: C, transitionAppear: w} = t
              , T = b === "center" ? "van-fade" : `van-popup-slide-${b}`;
            return (0,
            Vt.createVNode)(Vt.Transition, {
                name: C || T,
                appear: w,
                onAfterEnter: E,
                onAfterLeave: g
            }, {
                default: v
            })
        }
        ;
        return (0,
        Vt.watch)( () => t.show, b => {
            b && !i && (u(),
            r.tabindex === 0 && (0,
            Vt.nextTick)( () => {
                var C;
                (C = a.value) == null || C.focus()
            }
            )),
            !b && i && (i = !1,
            e("close"))
        }
        ),
        (0,
        YX.useExpose)({
            popupRef: a
        }),
        (0,
        XX.useLockScroll)(a, () => t.show && t.lockScroll),
        (0,
        WX.useEventListener)("popstate", () => {
            t.closeOnPopstate && (f(),
            o = !1)
        }
        ),
        (0,
        Vt.onMounted)( () => {
            t.show && u()
        }
        ),
        (0,
        Vt.onActivated)( () => {
            o && (e("update:show", !0),
            o = !1)
        }
        ),
        (0,
        Vt.onDeactivated)( () => {
            t.show && t.teleport && (f(),
            o = !0)
        }
        ),
        (0,
        Vt.provide)(qX.POPUP_TOGGLE_KEY, () => t.show),
        () => t.teleport ? (0,
        Vt.createVNode)(Vt.Teleport, {
            to: t.teleport
        }, {
            default: () => [h(), _()]
        }) : (0,
        Vt.createVNode)(Vt.Fragment, null, [h(), _()])
    }
})
  , rK = Object.create
  , Yp = Object.defineProperty
  , nK = Object.getOwnPropertyDescriptor
  , iK = Object.getOwnPropertyNames
  , oK = Object.getPrototypeOf
  , sK = Object.prototype.hasOwnProperty
  , aK = (t, e) => {
    for (var r in e)
        Yp(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , JT = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of iK(e))
            !sK.call(t, i) && i !== r && Yp(t, i, {
                get: () => e[i],
                enumerable: !(n = nK(e, i)) || n.enumerable
            });
    return t
}
  , lK = (t, e, r) => (r = t != null ? rK(oK(t)) : {},
JT(e || !t || !t.__esModule ? Yp(r, "default", {
    value: t,
    enumerable: !0
}) : r, t))
  , cK = t => JT(Yp({}, "__esModule", {
    value: !0
}), t)
  , QT = {};
aK(QT, {
    Popup: () => e7,
    default: () => xK,
    popupProps: () => hK.popupProps
});
var uK = cK(QT)
  , fK = Yr
  , dK = lK(qT)
  , hK = qT;
const e7 = (0,
fK.withInstall)(dK.default);
var xK = e7
  , S2 = Object.defineProperty
  , pK = Object.getOwnPropertyDescriptor
  , gK = Object.getOwnPropertyNames
  , mK = Object.prototype.hasOwnProperty
  , vK = (t, e) => {
    for (var r in e)
        S2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , yK = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of gK(e))
            !mK.call(t, i) && i !== r && S2(t, i, {
                get: () => e[i],
                enumerable: !(n = pK(e, i)) || n.enumerable
            });
    return t
}
  , EK = t => yK(S2({}, "__esModule", {
    value: !0
}), t)
  , t7 = {};
vK(t7, {
    default: () => AK,
    loadingProps: () => n7
});
var r7 = EK(t7)
  , Hs = Wr
  , fl = Yr;
const [_K,R0] = (0,
fl.createNamespace)("loading")
  , bK = Array(12).fill(null).map( (t, e) => (0,
Hs.createVNode)("i", {
    class: R0("line", String(e + 1))
}, null))
  , CK = (0,
Hs.createVNode)("svg", {
    class: R0("circular"),
    viewBox: "25 25 50 50"
}, [(0,
Hs.createVNode)("circle", {
    cx: "50",
    cy: "50",
    r: "20",
    fill: "none"
}, null)])
  , n7 = {
    size: fl.numericProp,
    type: (0,
    fl.makeStringProp)("circular"),
    color: String,
    vertical: Boolean,
    textSize: fl.numericProp,
    textColor: String
};
var AK = (0,
Hs.defineComponent)({
    name: _K,
    props: n7,
    setup(t, {slots: e}) {
        const r = (0,
        Hs.computed)( () => (0,
        fl.extend)({
            color: t.color
        }, (0,
        fl.getSizeStyle)(t.size)))
          , n = () => {
            const o = t.type === "spinner" ? bK : CK;
            return (0,
            Hs.createVNode)("span", {
                class: R0("spinner", t.type),
                style: r.value
            }, [e.icon ? e.icon() : o])
        }
          , i = () => {
            var o;
            if (e.default)
                return (0,
                Hs.createVNode)("span", {
                    class: R0("text"),
                    style: {
                        fontSize: (0,
                        fl.addUnit)(t.textSize),
                        color: (o = t.textColor) != null ? o : t.color
                    }
                }, [e.default()])
        }
        ;
        return () => {
            const {type: o, vertical: s} = t;
            return (0,
            Hs.createVNode)("div", {
                class: R0([o, {
                    vertical: s
                }]),
                "aria-live": "polite",
                "aria-busy": !0
            }, [n(), i()])
        }
    }
})
  , wK = Object.create
  , Xp = Object.defineProperty
  , BK = Object.getOwnPropertyDescriptor
  , SK = Object.getOwnPropertyNames
  , TK = Object.getPrototypeOf
  , DK = Object.prototype.hasOwnProperty
  , FK = (t, e) => {
    for (var r in e)
        Xp(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , i7 = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of SK(e))
            !DK.call(t, i) && i !== r && Xp(t, i, {
                get: () => e[i],
                enumerable: !(n = BK(e, i)) || n.enumerable
            });
    return t
}
  , PK = (t, e, r) => (r = t != null ? wK(TK(t)) : {},
i7(e || !t || !t.__esModule ? Xp(r, "default", {
    value: t,
    enumerable: !0
}) : r, t))
  , IK = t => i7(Xp({}, "__esModule", {
    value: !0
}), t)
  , o7 = {};
FK(o7, {
    Loading: () => s7,
    default: () => NK,
    loadingProps: () => MK.loadingProps
});
var OK = IK(o7)
  , kK = Yr
  , RK = PK(r7)
  , MK = r7;
const s7 = (0,
kK.withInstall)(RK.default);
var NK = s7
  , T2 = Object.defineProperty
  , LK = Object.getOwnPropertyDescriptor
  , $K = Object.getOwnPropertyNames
  , UK = Object.prototype.hasOwnProperty
  , GK = (t, e) => {
    for (var r in e)
        T2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , HK = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of $K(e))
            !UK.call(t, i) && i !== r && T2(t, i, {
                get: () => e[i],
                enumerable: !(n = LK(e, i)) || n.enumerable
            });
    return t
}
  , VK = t => HK(T2({}, "__esModule", {
    value: !0
}), t)
  , a7 = {};
GK(a7, {
    default: () => ZK,
    toastProps: () => l7
});
var zK = VK(a7)
  , ri = Wr
  , ai = Yr
  , jK = sW
  , WK = IT
  , YK = uK
  , XK = OK;
const [KK,ec] = (0,
ai.createNamespace)("toast")
  , qK = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay", "zIndex"]
  , l7 = {
    icon: String,
    show: Boolean,
    type: (0,
    ai.makeStringProp)("text"),
    overlay: Boolean,
    message: ai.numericProp,
    iconSize: ai.numericProp,
    duration: (0,
    ai.makeNumberProp)(2e3),
    position: (0,
    ai.makeStringProp)("middle"),
    teleport: [String, Object],
    wordBreak: String,
    className: ai.unknownProp,
    iconPrefix: String,
    transition: (0,
    ai.makeStringProp)("van-fade"),
    loadingType: String,
    forbidClick: Boolean,
    overlayClass: ai.unknownProp,
    overlayStyle: Object,
    closeOnClick: Boolean,
    closeOnClickOverlay: Boolean,
    zIndex: ai.numericProp
};
var ZK = (0,
ri.defineComponent)({
    name: KK,
    props: l7,
    emits: ["update:show"],
    setup(t, {emit: e, slots: r}) {
        let n, i = !1;
        const o = () => {
            const f = t.show && t.forbidClick;
            i !== f && (i = f,
            (0,
            jK.lockClick)(i))
        }
          , s = f => e("update:show", f)
          , a = () => {
            t.closeOnClick && s(!1)
        }
          , l = () => clearTimeout(n)
          , c = () => {
            const {icon: f, type: d, iconSize: h, iconPrefix: x, loadingType: y} = t;
            if (f || d === "success" || d === "fail")
                return (0,
                ri.createVNode)(WK.Icon, {
                    name: f || d,
                    size: h,
                    class: ec("icon"),
                    classPrefix: x
                }, null);
            if (d === "loading")
                return (0,
                ri.createVNode)(XK.Loading, {
                    class: ec("loading"),
                    size: h,
                    type: y
                }, null)
        }
          , u = () => {
            const {type: f, message: d} = t;
            if (r.message)
                return (0,
                ri.createVNode)("div", {
                    class: ec("text")
                }, [r.message()]);
            if ((0,
            ai.isDef)(d) && d !== "")
                return f === "html" ? (0,
                ri.createVNode)("div", {
                    key: 0,
                    class: ec("text"),
                    innerHTML: String(d)
                }, null) : (0,
                ri.createVNode)("div", {
                    class: ec("text")
                }, [d])
        }
        ;
        return (0,
        ri.watch)( () => [t.show, t.forbidClick], o),
        (0,
        ri.watch)( () => [t.show, t.type, t.message, t.duration], () => {
            l(),
            t.show && t.duration > 0 && (n = setTimeout( () => {
                s(!1)
            }
            , t.duration))
        }
        ),
        (0,
        ri.onMounted)(o),
        (0,
        ri.onUnmounted)(o),
        () => (0,
        ri.createVNode)(YK.Popup, (0,
        ri.mergeProps)({
            class: [ec([t.position, t.wordBreak === "normal" ? "break-normal" : t.wordBreak, {
                [t.type]: !t.icon
            }]), t.className],
            lockScroll: !1,
            onClick: a,
            onClosed: l,
            "onUpdate:show": s
        }, (0,
        ai.pick)(t, qK)), {
            default: () => [c(), u()]
        })
    }
})
  , JK = Object.create
  , Kp = Object.defineProperty
  , QK = Object.getOwnPropertyDescriptor
  , eq = Object.getOwnPropertyNames
  , tq = Object.getPrototypeOf
  , rq = Object.prototype.hasOwnProperty
  , nq = (t, e) => {
    for (var r in e)
        Kp(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , c7 = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of eq(e))
            !rq.call(t, i) && i !== r && Kp(t, i, {
                get: () => e[i],
                enumerable: !(n = QK(e, i)) || n.enumerable
            });
    return t
}
  , iq = (t, e, r) => (r = t != null ? JK(tq(t)) : {},
c7(e || !t || !t.__esModule ? Kp(r, "default", {
    value: t,
    enumerable: !0
}) : r, t))
  , oq = t => c7(Kp({}, "__esModule", {
    value: !0
}), t)
  , u7 = {};
nq(u7, {
    allowMultipleToast: () => pq,
    closeToast: () => dq,
    resetToastDefaultOptions: () => xq,
    setToastDefaultOptions: () => hq,
    showFailToast: () => fq,
    showLoadingToast: () => cq,
    showSuccessToast: () => uq,
    showToast: () => h7
});
var D4e = oq(u7)
  , ju = Wr
  , El = Yr
  , h9 = Kj
  , sq = iq(zK);
const f7 = {
    icon: "",
    type: "text",
    message: "",
    className: "",
    overlay: !1,
    onClose: void 0,
    onOpened: void 0,
    duration: 2e3,
    teleport: "body",
    iconSize: void 0,
    iconPrefix: void 0,
    position: "middle",
    transition: "van-fade",
    forbidClick: !1,
    loadingType: void 0,
    overlayClass: "",
    overlayStyle: void 0,
    closeOnClick: !1,
    closeOnClickOverlay: !1
};
let Fi = []
  , qp = !1
  , Bx = (0,
El.extend)({}, f7);
const Sx = new Map;
function d7(t) {
    return (0,
    El.isObject)(t) ? t : {
        message: t
    }
}
function aq() {
    const {instance: t, unmount: e} = (0,
    h9.mountComponent)({
        setup() {
            const r = (0,
            ju.ref)("")
              , {open: n, state: i, close: o, toggle: s} = (0,
            h9.usePopupState)()
              , a = () => {
                qp && (Fi = Fi.filter(c => c !== t),
                e())
            }
              , l = () => {
                const c = {
                    onClosed: a,
                    "onUpdate:show": s
                };
                return (0,
                ju.createVNode)(sq.default, (0,
                ju.mergeProps)(i, c), null)
            }
            ;
            return (0,
            ju.watch)(r, c => {
                i.message = c
            }
            ),
            (0,
            ju.getCurrentInstance)().render = l,
            {
                open: n,
                close: o,
                message: r
            }
        }
    });
    return t
}
function lq() {
    if (!Fi.length || qp) {
        const t = aq();
        Fi.push(t)
    }
    return Fi[Fi.length - 1]
}
function h7(t={}) {
    if (!El.inBrowser)
        return {};
    const e = lq()
      , r = d7(t);
    return e.open((0,
    El.extend)({}, Bx, Sx.get(r.type || Bx.type), r)),
    e
}
const D2 = t => e => h7((0,
El.extend)({
    type: t
}, d7(e)))
  , cq = D2("loading")
  , uq = D2("success")
  , fq = D2("fail")
  , dq = t => {
    var e;
    Fi.length && (t ? (Fi.forEach(r => {
        r.close()
    }
    ),
    Fi = []) : qp ? (e = Fi.shift()) == null || e.close() : Fi[0].close())
}
;
function hq(t, e) {
    typeof t == "string" ? Sx.set(t, e) : (0,
    El.extend)(Bx, t)
}
const xq = t => {
    typeof t == "string" ? Sx.delete(t) : (Bx = (0,
    El.extend)({}, f7),
    Sx.clear())
}
  , pq = (t=!0) => {
    qp = t
}
;
var x7 = {
    exports: {}
};
(function(t, e) {
    (function(r) {
        t.exports = r()
    }
    )(function(r) {
        var n = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
        function i(E, g) {
            var p = E[0]
              , v = E[1]
              , _ = E[2]
              , b = E[3];
            p += (v & _ | ~v & b) + g[0] - 680876936 | 0,
            p = (p << 7 | p >>> 25) + v | 0,
            b += (p & v | ~p & _) + g[1] - 389564586 | 0,
            b = (b << 12 | b >>> 20) + p | 0,
            _ += (b & p | ~b & v) + g[2] + 606105819 | 0,
            _ = (_ << 17 | _ >>> 15) + b | 0,
            v += (_ & b | ~_ & p) + g[3] - 1044525330 | 0,
            v = (v << 22 | v >>> 10) + _ | 0,
            p += (v & _ | ~v & b) + g[4] - 176418897 | 0,
            p = (p << 7 | p >>> 25) + v | 0,
            b += (p & v | ~p & _) + g[5] + 1200080426 | 0,
            b = (b << 12 | b >>> 20) + p | 0,
            _ += (b & p | ~b & v) + g[6] - 1473231341 | 0,
            _ = (_ << 17 | _ >>> 15) + b | 0,
            v += (_ & b | ~_ & p) + g[7] - 45705983 | 0,
            v = (v << 22 | v >>> 10) + _ | 0,
            p += (v & _ | ~v & b) + g[8] + 1770035416 | 0,
            p = (p << 7 | p >>> 25) + v | 0,
            b += (p & v | ~p & _) + g[9] - 1958414417 | 0,
            b = (b << 12 | b >>> 20) + p | 0,
            _ += (b & p | ~b & v) + g[10] - 42063 | 0,
            _ = (_ << 17 | _ >>> 15) + b | 0,
            v += (_ & b | ~_ & p) + g[11] - 1990404162 | 0,
            v = (v << 22 | v >>> 10) + _ | 0,
            p += (v & _ | ~v & b) + g[12] + 1804603682 | 0,
            p = (p << 7 | p >>> 25) + v | 0,
            b += (p & v | ~p & _) + g[13] - 40341101 | 0,
            b = (b << 12 | b >>> 20) + p | 0,
            _ += (b & p | ~b & v) + g[14] - 1502002290 | 0,
            _ = (_ << 17 | _ >>> 15) + b | 0,
            v += (_ & b | ~_ & p) + g[15] + 1236535329 | 0,
            v = (v << 22 | v >>> 10) + _ | 0,
            p += (v & b | _ & ~b) + g[1] - 165796510 | 0,
            p = (p << 5 | p >>> 27) + v | 0,
            b += (p & _ | v & ~_) + g[6] - 1069501632 | 0,
            b = (b << 9 | b >>> 23) + p | 0,
            _ += (b & v | p & ~v) + g[11] + 643717713 | 0,
            _ = (_ << 14 | _ >>> 18) + b | 0,
            v += (_ & p | b & ~p) + g[0] - 373897302 | 0,
            v = (v << 20 | v >>> 12) + _ | 0,
            p += (v & b | _ & ~b) + g[5] - 701558691 | 0,
            p = (p << 5 | p >>> 27) + v | 0,
            b += (p & _ | v & ~_) + g[10] + 38016083 | 0,
            b = (b << 9 | b >>> 23) + p | 0,
            _ += (b & v | p & ~v) + g[15] - 660478335 | 0,
            _ = (_ << 14 | _ >>> 18) + b | 0,
            v += (_ & p | b & ~p) + g[4] - 405537848 | 0,
            v = (v << 20 | v >>> 12) + _ | 0,
            p += (v & b | _ & ~b) + g[9] + 568446438 | 0,
            p = (p << 5 | p >>> 27) + v | 0,
            b += (p & _ | v & ~_) + g[14] - 1019803690 | 0,
            b = (b << 9 | b >>> 23) + p | 0,
            _ += (b & v | p & ~v) + g[3] - 187363961 | 0,
            _ = (_ << 14 | _ >>> 18) + b | 0,
            v += (_ & p | b & ~p) + g[8] + 1163531501 | 0,
            v = (v << 20 | v >>> 12) + _ | 0,
            p += (v & b | _ & ~b) + g[13] - 1444681467 | 0,
            p = (p << 5 | p >>> 27) + v | 0,
            b += (p & _ | v & ~_) + g[2] - 51403784 | 0,
            b = (b << 9 | b >>> 23) + p | 0,
            _ += (b & v | p & ~v) + g[7] + 1735328473 | 0,
            _ = (_ << 14 | _ >>> 18) + b | 0,
            v += (_ & p | b & ~p) + g[12] - 1926607734 | 0,
            v = (v << 20 | v >>> 12) + _ | 0,
            p += (v ^ _ ^ b) + g[5] - 378558 | 0,
            p = (p << 4 | p >>> 28) + v | 0,
            b += (p ^ v ^ _) + g[8] - 2022574463 | 0,
            b = (b << 11 | b >>> 21) + p | 0,
            _ += (b ^ p ^ v) + g[11] + 1839030562 | 0,
            _ = (_ << 16 | _ >>> 16) + b | 0,
            v += (_ ^ b ^ p) + g[14] - 35309556 | 0,
            v = (v << 23 | v >>> 9) + _ | 0,
            p += (v ^ _ ^ b) + g[1] - 1530992060 | 0,
            p = (p << 4 | p >>> 28) + v | 0,
            b += (p ^ v ^ _) + g[4] + 1272893353 | 0,
            b = (b << 11 | b >>> 21) + p | 0,
            _ += (b ^ p ^ v) + g[7] - 155497632 | 0,
            _ = (_ << 16 | _ >>> 16) + b | 0,
            v += (_ ^ b ^ p) + g[10] - 1094730640 | 0,
            v = (v << 23 | v >>> 9) + _ | 0,
            p += (v ^ _ ^ b) + g[13] + 681279174 | 0,
            p = (p << 4 | p >>> 28) + v | 0,
            b += (p ^ v ^ _) + g[0] - 358537222 | 0,
            b = (b << 11 | b >>> 21) + p | 0,
            _ += (b ^ p ^ v) + g[3] - 722521979 | 0,
            _ = (_ << 16 | _ >>> 16) + b | 0,
            v += (_ ^ b ^ p) + g[6] + 76029189 | 0,
            v = (v << 23 | v >>> 9) + _ | 0,
            p += (v ^ _ ^ b) + g[9] - 640364487 | 0,
            p = (p << 4 | p >>> 28) + v | 0,
            b += (p ^ v ^ _) + g[12] - 421815835 | 0,
            b = (b << 11 | b >>> 21) + p | 0,
            _ += (b ^ p ^ v) + g[15] + 530742520 | 0,
            _ = (_ << 16 | _ >>> 16) + b | 0,
            v += (_ ^ b ^ p) + g[2] - 995338651 | 0,
            v = (v << 23 | v >>> 9) + _ | 0,
            p += (_ ^ (v | ~b)) + g[0] - 198630844 | 0,
            p = (p << 6 | p >>> 26) + v | 0,
            b += (v ^ (p | ~_)) + g[7] + 1126891415 | 0,
            b = (b << 10 | b >>> 22) + p | 0,
            _ += (p ^ (b | ~v)) + g[14] - 1416354905 | 0,
            _ = (_ << 15 | _ >>> 17) + b | 0,
            v += (b ^ (_ | ~p)) + g[5] - 57434055 | 0,
            v = (v << 21 | v >>> 11) + _ | 0,
            p += (_ ^ (v | ~b)) + g[12] + 1700485571 | 0,
            p = (p << 6 | p >>> 26) + v | 0,
            b += (v ^ (p | ~_)) + g[3] - 1894986606 | 0,
            b = (b << 10 | b >>> 22) + p | 0,
            _ += (p ^ (b | ~v)) + g[10] - 1051523 | 0,
            _ = (_ << 15 | _ >>> 17) + b | 0,
            v += (b ^ (_ | ~p)) + g[1] - 2054922799 | 0,
            v = (v << 21 | v >>> 11) + _ | 0,
            p += (_ ^ (v | ~b)) + g[8] + 1873313359 | 0,
            p = (p << 6 | p >>> 26) + v | 0,
            b += (v ^ (p | ~_)) + g[15] - 30611744 | 0,
            b = (b << 10 | b >>> 22) + p | 0,
            _ += (p ^ (b | ~v)) + g[6] - 1560198380 | 0,
            _ = (_ << 15 | _ >>> 17) + b | 0,
            v += (b ^ (_ | ~p)) + g[13] + 1309151649 | 0,
            v = (v << 21 | v >>> 11) + _ | 0,
            p += (_ ^ (v | ~b)) + g[4] - 145523070 | 0,
            p = (p << 6 | p >>> 26) + v | 0,
            b += (v ^ (p | ~_)) + g[11] - 1120210379 | 0,
            b = (b << 10 | b >>> 22) + p | 0,
            _ += (p ^ (b | ~v)) + g[2] + 718787259 | 0,
            _ = (_ << 15 | _ >>> 17) + b | 0,
            v += (b ^ (_ | ~p)) + g[9] - 343485551 | 0,
            v = (v << 21 | v >>> 11) + _ | 0,
            E[0] = p + E[0] | 0,
            E[1] = v + E[1] | 0,
            E[2] = _ + E[2] | 0,
            E[3] = b + E[3] | 0
        }
        function o(E) {
            var g = [], p;
            for (p = 0; p < 64; p += 4)
                g[p >> 2] = E.charCodeAt(p) + (E.charCodeAt(p + 1) << 8) + (E.charCodeAt(p + 2) << 16) + (E.charCodeAt(p + 3) << 24);
            return g
        }
        function s(E) {
            var g = [], p;
            for (p = 0; p < 64; p += 4)
                g[p >> 2] = E[p] + (E[p + 1] << 8) + (E[p + 2] << 16) + (E[p + 3] << 24);
            return g
        }
        function a(E) {
            var g = E.length, p = [1732584193, -271733879, -1732584194, 271733878], v, _, b, C, w, T;
            for (v = 64; v <= g; v += 64)
                i(p, o(E.substring(v - 64, v)));
            for (E = E.substring(v - 64),
            _ = E.length,
            b = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
            v = 0; v < _; v += 1)
                b[v >> 2] |= E.charCodeAt(v) << (v % 4 << 3);
            if (b[v >> 2] |= 128 << (v % 4 << 3),
            v > 55)
                for (i(p, b),
                v = 0; v < 16; v += 1)
                    b[v] = 0;
            return C = g * 8,
            C = C.toString(16).match(/(.*?)(.{0,8})$/),
            w = parseInt(C[2], 16),
            T = parseInt(C[1], 16) || 0,
            b[14] = w,
            b[15] = T,
            i(p, b),
            p
        }
        function l(E) {
            var g = E.length, p = [1732584193, -271733879, -1732584194, 271733878], v, _, b, C, w, T;
            for (v = 64; v <= g; v += 64)
                i(p, s(E.subarray(v - 64, v)));
            for (E = v - 64 < g ? E.subarray(v - 64) : new Uint8Array(0),
            _ = E.length,
            b = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
            v = 0; v < _; v += 1)
                b[v >> 2] |= E[v] << (v % 4 << 3);
            if (b[v >> 2] |= 128 << (v % 4 << 3),
            v > 55)
                for (i(p, b),
                v = 0; v < 16; v += 1)
                    b[v] = 0;
            return C = g * 8,
            C = C.toString(16).match(/(.*?)(.{0,8})$/),
            w = parseInt(C[2], 16),
            T = parseInt(C[1], 16) || 0,
            b[14] = w,
            b[15] = T,
            i(p, b),
            p
        }
        function c(E) {
            var g = "", p;
            for (p = 0; p < 4; p += 1)
                g += n[E >> p * 8 + 4 & 15] + n[E >> p * 8 & 15];
            return g
        }
        function u(E) {
            var g;
            for (g = 0; g < E.length; g += 1)
                E[g] = c(E[g]);
            return E.join("")
        }
        u(a("hello")),
        typeof ArrayBuffer < "u" && !ArrayBuffer.prototype.slice && function() {
            function E(g, p) {
                return g = g | 0 || 0,
                g < 0 ? Math.max(g + p, 0) : Math.min(g, p)
            }
            ArrayBuffer.prototype.slice = function(g, p) {
                var v = this.byteLength, _ = E(g, v), b = v, C, w, T, A;
                return p !== r && (b = E(p, v)),
                _ > b ? new ArrayBuffer(0) : (C = b - _,
                w = new ArrayBuffer(C),
                T = new Uint8Array(w),
                A = new Uint8Array(this,_,C),
                T.set(A),
                w)
            }
        }();
        function f(E) {
            return /[\u0080-\uFFFF]/.test(E) && (E = unescape(encodeURIComponent(E))),
            E
        }
        function d(E, g) {
            var p = E.length, v = new ArrayBuffer(p), _ = new Uint8Array(v), b;
            for (b = 0; b < p; b += 1)
                _[b] = E.charCodeAt(b);
            return g ? _ : v
        }
        function h(E) {
            return String.fromCharCode.apply(null, new Uint8Array(E))
        }
        function x(E, g, p) {
            var v = new Uint8Array(E.byteLength + g.byteLength);
            return v.set(new Uint8Array(E)),
            v.set(new Uint8Array(g), E.byteLength),
            p ? v : v.buffer
        }
        function y(E) {
            var g = [], p = E.length, v;
            for (v = 0; v < p - 1; v += 2)
                g.push(parseInt(E.substr(v, 2), 16));
            return String.fromCharCode.apply(String, g)
        }
        function m() {
            this.reset()
        }
        return m.prototype.append = function(E) {
            return this.appendBinary(f(E)),
            this
        }
        ,
        m.prototype.appendBinary = function(E) {
            this._buff += E,
            this._length += E.length;
            var g = this._buff.length, p;
            for (p = 64; p <= g; p += 64)
                i(this._hash, o(this._buff.substring(p - 64, p)));
            return this._buff = this._buff.substring(p - 64),
            this
        }
        ,
        m.prototype.end = function(E) {
            var g = this._buff, p = g.length, v, _ = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], b;
            for (v = 0; v < p; v += 1)
                _[v >> 2] |= g.charCodeAt(v) << (v % 4 << 3);
            return this._finish(_, p),
            b = u(this._hash),
            E && (b = y(b)),
            this.reset(),
            b
        }
        ,
        m.prototype.reset = function() {
            return this._buff = "",
            this._length = 0,
            this._hash = [1732584193, -271733879, -1732584194, 271733878],
            this
        }
        ,
        m.prototype.getState = function() {
            return {
                buff: this._buff,
                length: this._length,
                hash: this._hash.slice()
            }
        }
        ,
        m.prototype.setState = function(E) {
            return this._buff = E.buff,
            this._length = E.length,
            this._hash = E.hash,
            this
        }
        ,
        m.prototype.destroy = function() {
            delete this._hash,
            delete this._buff,
            delete this._length
        }
        ,
        m.prototype._finish = function(E, g) {
            var p = g, v, _, b;
            if (E[p >> 2] |= 128 << (p % 4 << 3),
            p > 55)
                for (i(this._hash, E),
                p = 0; p < 16; p += 1)
                    E[p] = 0;
            v = this._length * 8,
            v = v.toString(16).match(/(.*?)(.{0,8})$/),
            _ = parseInt(v[2], 16),
            b = parseInt(v[1], 16) || 0,
            E[14] = _,
            E[15] = b,
            i(this._hash, E)
        }
        ,
        m.hash = function(E, g) {
            return m.hashBinary(f(E), g)
        }
        ,
        m.hashBinary = function(E, g) {
            var p = a(E)
              , v = u(p);
            return g ? y(v) : v
        }
        ,
        m.ArrayBuffer = function() {
            this.reset()
        }
        ,
        m.ArrayBuffer.prototype.append = function(E) {
            var g = x(this._buff.buffer, E, !0), p = g.length, v;
            for (this._length += E.byteLength,
            v = 64; v <= p; v += 64)
                i(this._hash, s(g.subarray(v - 64, v)));
            return this._buff = v - 64 < p ? new Uint8Array(g.buffer.slice(v - 64)) : new Uint8Array(0),
            this
        }
        ,
        m.ArrayBuffer.prototype.end = function(E) {
            var g = this._buff, p = g.length, v = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], _, b;
            for (_ = 0; _ < p; _ += 1)
                v[_ >> 2] |= g[_] << (_ % 4 << 3);
            return this._finish(v, p),
            b = u(this._hash),
            E && (b = y(b)),
            this.reset(),
            b
        }
        ,
        m.ArrayBuffer.prototype.reset = function() {
            return this._buff = new Uint8Array(0),
            this._length = 0,
            this._hash = [1732584193, -271733879, -1732584194, 271733878],
            this
        }
        ,
        m.ArrayBuffer.prototype.getState = function() {
            var E = m.prototype.getState.call(this);
            return E.buff = h(E.buff),
            E
        }
        ,
        m.ArrayBuffer.prototype.setState = function(E) {
            return E.buff = d(E.buff, !0),
            m.prototype.setState.call(this, E)
        }
        ,
        m.ArrayBuffer.prototype.destroy = m.prototype.destroy,
        m.ArrayBuffer.prototype._finish = m.prototype._finish,
        m.ArrayBuffer.hash = function(E, g) {
            var p = l(new Uint8Array(E))
              , v = u(p);
            return g ? y(v) : v
        }
        ,
        m
    })
}
)(x7);
var gq = x7.exports;
const F4e = Vi(gq);
var p7 = {
    exports: {}
};
(function(t, e) {
    (function(r, n) {
        t.exports = n()
    }
    )(er, function() {
        var r = 1e3
          , n = 6e4
          , i = 36e5
          , o = "millisecond"
          , s = "second"
          , a = "minute"
          , l = "hour"
          , c = "day"
          , u = "week"
          , f = "month"
          , d = "quarter"
          , h = "year"
          , x = "date"
          , y = "Invalid Date"
          , m = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/
          , E = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g
          , g = {
            name: "en",
            weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
            months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
            ordinal: function(F) {
                var R = ["th", "st", "nd", "rd"]
                  , P = F % 100;
                return "[" + F + (R[(P - 20) % 10] || R[P] || R[0]) + "]"
            }
        }
          , p = function(F, R, P) {
            var N = String(F);
            return !N || N.length >= R ? F : "" + Array(R + 1 - N.length).join(P) + F
        }
          , v = {
            s: p,
            z: function(F) {
                var R = -F.utcOffset()
                  , P = Math.abs(R)
                  , N = Math.floor(P / 60)
                  , j = P % 60;
                return (R <= 0 ? "+" : "-") + p(N, 2, "0") + ":" + p(j, 2, "0")
            },
            m: function F(R, P) {
                if (R.date() < P.date())
                    return -F(P, R);
                var N = 12 * (P.year() - R.year()) + (P.month() - R.month())
                  , j = R.clone().add(N, f)
                  , K = P - j < 0
                  , oe = R.clone().add(N + (K ? -1 : 1), f);
                return +(-(N + (P - j) / (K ? j - oe : oe - j)) || 0)
            },
            a: function(F) {
                return F < 0 ? Math.ceil(F) || 0 : Math.floor(F)
            },
            p: function(F) {
                return {
                    M: f,
                    y: h,
                    w: u,
                    d: c,
                    D: x,
                    h: l,
                    m: a,
                    s,
                    ms: o,
                    Q: d
                }[F] || String(F || "").toLowerCase().replace(/s$/, "")
            },
            u: function(F) {
                return F === void 0
            }
        }
          , _ = "en"
          , b = {};
        b[_] = g;
        var C = "$isDayjsObject"
          , w = function(F) {
            return F instanceof S || !(!F || !F[C])
        }
          , T = function F(R, P, N) {
            var j;
            if (!R)
                return _;
            if (typeof R == "string") {
                var K = R.toLowerCase();
                b[K] && (j = K),
                P && (b[K] = P,
                j = K);
                var oe = R.split("-");
                if (!j && oe.length > 1)
                    return F(oe[0])
            } else {
                var U = R.name;
                b[U] = R,
                j = U
            }
            return !N && j && (_ = j),
            j || !N && _
        }
          , A = function(F, R) {
            if (w(F))
                return F.clone();
            var P = typeof R == "object" ? R : {};
            return P.date = F,
            P.args = arguments,
            new S(P)
        }
          , B = v;
        B.l = T,
        B.i = w,
        B.w = function(F, R) {
            return A(F, {
                locale: R.$L,
                utc: R.$u,
                x: R.$x,
                $offset: R.$offset
            })
        }
        ;
        var S = function() {
            function F(P) {
                this.$L = T(P.locale, null, !0),
                this.parse(P),
                this.$x = this.$x || P.x || {},
                this[C] = !0
            }
            var R = F.prototype;
            return R.parse = function(P) {
                this.$d = function(N) {
                    var j = N.date
                      , K = N.utc;
                    if (j === null)
                        return new Date(NaN);
                    if (B.u(j))
                        return new Date;
                    if (j instanceof Date)
                        return new Date(j);
                    if (typeof j == "string" && !/Z$/i.test(j)) {
                        var oe = j.match(m);
                        if (oe) {
                            var U = oe[2] - 1 || 0
                              , $ = (oe[7] || "0").substring(0, 3);
                            return K ? new Date(Date.UTC(oe[1], U, oe[3] || 1, oe[4] || 0, oe[5] || 0, oe[6] || 0, $)) : new Date(oe[1],U,oe[3] || 1,oe[4] || 0,oe[5] || 0,oe[6] || 0,$)
                        }
                    }
                    return new Date(j)
                }(P),
                this.init()
            }
            ,
            R.init = function() {
                var P = this.$d;
                this.$y = P.getFullYear(),
                this.$M = P.getMonth(),
                this.$D = P.getDate(),
                this.$W = P.getDay(),
                this.$H = P.getHours(),
                this.$m = P.getMinutes(),
                this.$s = P.getSeconds(),
                this.$ms = P.getMilliseconds()
            }
            ,
            R.$utils = function() {
                return B
            }
            ,
            R.isValid = function() {
                return this.$d.toString() !== y
            }
            ,
            R.isSame = function(P, N) {
                var j = A(P);
                return this.startOf(N) <= j && j <= this.endOf(N)
            }
            ,
            R.isAfter = function(P, N) {
                return A(P) < this.startOf(N)
            }
            ,
            R.isBefore = function(P, N) {
                return this.endOf(N) < A(P)
            }
            ,
            R.$g = function(P, N, j) {
                return B.u(P) ? this[N] : this.set(j, P)
            }
            ,
            R.unix = function() {
                return Math.floor(this.valueOf() / 1e3)
            }
            ,
            R.valueOf = function() {
                return this.$d.getTime()
            }
            ,
            R.startOf = function(P, N) {
                var j = this
                  , K = !!B.u(N) || N
                  , oe = B.p(P)
                  , U = function(te, he) {
                    var xe = B.w(j.$u ? Date.UTC(j.$y, he, te) : new Date(j.$y,he,te), j);
                    return K ? xe : xe.endOf(c)
                }
                  , $ = function(te, he) {
                    return B.w(j.toDate()[te].apply(j.toDate("s"), (K ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(he)), j)
                }
                  , V = this.$W
                  , W = this.$M
                  , H = this.$D
                  , Q = "set" + (this.$u ? "UTC" : "");
                switch (oe) {
                case h:
                    return K ? U(1, 0) : U(31, 11);
                case f:
                    return K ? U(1, W) : U(0, W + 1);
                case u:
                    var G = this.$locale().weekStart || 0
                      , re = (V < G ? V + 7 : V) - G;
                    return U(K ? H - re : H + (6 - re), W);
                case c:
                case x:
                    return $(Q + "Hours", 0);
                case l:
                    return $(Q + "Minutes", 1);
                case a:
                    return $(Q + "Seconds", 2);
                case s:
                    return $(Q + "Milliseconds", 3);
                default:
                    return this.clone()
                }
            }
            ,
            R.endOf = function(P) {
                return this.startOf(P, !1)
            }
            ,
            R.$set = function(P, N) {
                var j, K = B.p(P), oe = "set" + (this.$u ? "UTC" : ""), U = (j = {},
                j[c] = oe + "Date",
                j[x] = oe + "Date",
                j[f] = oe + "Month",
                j[h] = oe + "FullYear",
                j[l] = oe + "Hours",
                j[a] = oe + "Minutes",
                j[s] = oe + "Seconds",
                j[o] = oe + "Milliseconds",
                j)[K], $ = K === c ? this.$D + (N - this.$W) : N;
                if (K === f || K === h) {
                    var V = this.clone().set(x, 1);
                    V.$d[U]($),
                    V.init(),
                    this.$d = V.set(x, Math.min(this.$D, V.daysInMonth())).$d
                } else
                    U && this.$d[U]($);
                return this.init(),
                this
            }
            ,
            R.set = function(P, N) {
                return this.clone().$set(P, N)
            }
            ,
            R.get = function(P) {
                return this[B.p(P)]()
            }
            ,
            R.add = function(P, N) {
                var j, K = this;
                P = Number(P);
                var oe = B.p(N)
                  , U = function(W) {
                    var H = A(K);
                    return B.w(H.date(H.date() + Math.round(W * P)), K)
                };
                if (oe === f)
                    return this.set(f, this.$M + P);
                if (oe === h)
                    return this.set(h, this.$y + P);
                if (oe === c)
                    return U(1);
                if (oe === u)
                    return U(7);
                var $ = (j = {},
                j[a] = n,
                j[l] = i,
                j[s] = r,
                j)[oe] || 1
                  , V = this.$d.getTime() + P * $;
                return B.w(V, this)
            }
            ,
            R.subtract = function(P, N) {
                return this.add(-1 * P, N)
            }
            ,
            R.format = function(P) {
                var N = this
                  , j = this.$locale();
                if (!this.isValid())
                    return j.invalidDate || y;
                var K = P || "YYYY-MM-DDTHH:mm:ssZ"
                  , oe = B.z(this)
                  , U = this.$H
                  , $ = this.$m
                  , V = this.$M
                  , W = j.weekdays
                  , H = j.months
                  , Q = j.meridiem
                  , G = function(he, xe, ve, I) {
                    return he && (he[xe] || he(N, K)) || ve[xe].slice(0, I)
                }
                  , re = function(he) {
                    return B.s(U % 12 || 12, he, "0")
                }
                  , te = Q || function(he, xe, ve) {
                    var I = he < 12 ? "AM" : "PM";
                    return ve ? I.toLowerCase() : I
                }
                ;
                return K.replace(E, function(he, xe) {
                    return xe || function(ve) {
                        switch (ve) {
                        case "YY":
                            return String(N.$y).slice(-2);
                        case "YYYY":
                            return B.s(N.$y, 4, "0");
                        case "M":
                            return V + 1;
                        case "MM":
                            return B.s(V + 1, 2, "0");
                        case "MMM":
                            return G(j.monthsShort, V, H, 3);
                        case "MMMM":
                            return G(H, V);
                        case "D":
                            return N.$D;
                        case "DD":
                            return B.s(N.$D, 2, "0");
                        case "d":
                            return String(N.$W);
                        case "dd":
                            return G(j.weekdaysMin, N.$W, W, 2);
                        case "ddd":
                            return G(j.weekdaysShort, N.$W, W, 3);
                        case "dddd":
                            return W[N.$W];
                        case "H":
                            return String(U);
                        case "HH":
                            return B.s(U, 2, "0");
                        case "h":
                            return re(1);
                        case "hh":
                            return re(2);
                        case "a":
                            return te(U, $, !0);
                        case "A":
                            return te(U, $, !1);
                        case "m":
                            return String($);
                        case "mm":
                            return B.s($, 2, "0");
                        case "s":
                            return String(N.$s);
                        case "ss":
                            return B.s(N.$s, 2, "0");
                        case "SSS":
                            return B.s(N.$ms, 3, "0");
                        case "Z":
                            return oe
                        }
                        return null
                    }(he) || oe.replace(":", "")
                })
            }
            ,
            R.utcOffset = function() {
                return 15 * -Math.round(this.$d.getTimezoneOffset() / 15)
            }
            ,
            R.diff = function(P, N, j) {
                var K, oe = this, U = B.p(N), $ = A(P), V = ($.utcOffset() - this.utcOffset()) * n, W = this - $, H = function() {
                    return B.m(oe, $)
                };
                switch (U) {
                case h:
                    K = H() / 12;
                    break;
                case f:
                    K = H();
                    break;
                case d:
                    K = H() / 3;
                    break;
                case u:
                    K = (W - V) / 6048e5;
                    break;
                case c:
                    K = (W - V) / 864e5;
                    break;
                case l:
                    K = W / i;
                    break;
                case a:
                    K = W / n;
                    break;
                case s:
                    K = W / r;
                    break;
                default:
                    K = W
                }
                return j ? K : B.a(K)
            }
            ,
            R.daysInMonth = function() {
                return this.endOf(f).$D
            }
            ,
            R.$locale = function() {
                return b[this.$L]
            }
            ,
            R.locale = function(P, N) {
                if (!P)
                    return this.$L;
                var j = this.clone()
                  , K = T(P, N, !0);
                return K && (j.$L = K),
                j
            }
            ,
            R.clone = function() {
                return B.w(this.$d, this)
            }
            ,
            R.toDate = function() {
                return new Date(this.valueOf())
            }
            ,
            R.toJSON = function() {
                return this.isValid() ? this.toISOString() : null
            }
            ,
            R.toISOString = function() {
                return this.$d.toISOString()
            }
            ,
            R.toString = function() {
                return this.$d.toUTCString()
            }
            ,
            F
        }()
          , D = S.prototype;
        return A.prototype = D,
        [["$ms", o], ["$s", s], ["$m", a], ["$H", l], ["$W", c], ["$M", f], ["$y", h], ["$D", x]].forEach(function(F) {
            D[F[1]] = function(R) {
                return this.$g(R, F[0], F[1])
            }
        }),
        A.extend = function(F, R) {
            return F.$i || (F(R, S, A),
            F.$i = !0),
            A
        }
        ,
        A.locale = T,
        A.isDayjs = w,
        A.unix = function(F) {
            return A(1e3 * F)
        }
        ,
        A.en = b[_],
        A.Ls = b,
        A.p = {},
        A
    })
}
)(p7);
var F2 = p7.exports;
const P4e = Vi(F2);
function vy() {}
const We = Object.assign
  , _o = typeof window < "u"
  , bo = t => t !== null && typeof t == "object"
  , Lt = t => t != null
  , Zc = t => typeof t == "function"
  , P2 = t => bo(t) && Zc(t.then) && Zc(t.catch)
  , xf = t => Object.prototype.toString.call(t) === "[object Date]" && !Number.isNaN(t.getTime())
  , g7 = t => typeof t == "number" || /^\d+(\.\d+)?$/.test(t)
  , mq = () => _o ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : !1;
function x9(t, e) {
    const r = e.split(".");
    let n = t;
    return r.forEach(i => {
        var o;
        n = bo(n) && (o = n[i]) != null ? o : ""
    }
    ),
    n
}
function $t(t, e, r) {
    return e.reduce( (n, i) => ((!r || t[i] !== void 0) && (n[i] = t[i]),
    n), {})
}
const ta = (t, e) => JSON.stringify(t) === JSON.stringify(e)
  , Tx = t => Array.isArray(t) ? t : [t]
  , hr = null
  , Ae = [Number, String]
  , Ee = {
    type: Boolean,
    default: !0
}
  , dn = t => ({
    type: t,
    required: !0
})
  , ds = () => ({
    type: Array,
    default: () => []
})
  , Zp = t => ({
    type: Number,
    default: t
})
  , ze = t => ({
    type: Ae,
    default: t
})
  , Ie = t => ({
    type: String,
    default: t
});
function id(t) {
    const e = "scrollTop"in t ? t.scrollTop : t.pageYOffset;
    return Math.max(e, 0)
}
function Dx(t, e) {
    "scrollTop"in t ? t.scrollTop = e : t.scrollTo(t.scrollX, e)
}
function I2() {
    return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0
}
function O2(t) {
    Dx(window, t),
    Dx(document.body, t)
}
function p9(t, e) {
    if (t === window)
        return 0;
    const r = e ? id(e) : I2();
    return Cr(t).top + r
}
const vq = mq();
function m7() {
    vq && O2(I2())
}
const v7 = t => t.stopPropagation();
function Rr(t, e) {
    (typeof t.cancelable != "boolean" || t.cancelable) && t.preventDefault(),
    e && v7(t)
}
function Jc(t) {
    const e = xn(t);
    if (!e)
        return !1;
    const r = window.getComputedStyle(e)
      , n = r.display === "none"
      , i = e.offsetParent === null && r.position !== "fixed";
    return n || i
}
const {width: ts, height: ra} = NS();
function rt(t) {
    if (Lt(t))
        return g7(t) ? `${t}px` : String(t)
}
function zl(t) {
    if (Lt(t)) {
        if (Array.isArray(t))
            return {
                width: rt(t[0]),
                height: rt(t[1])
            };
        const e = rt(t);
        return {
            width: e,
            height: e
        }
    }
}
function y7(t) {
    const e = {};
    return t !== void 0 && (e.zIndex = +t),
    e
}
let dg;
function yq() {
    if (!dg) {
        const t = document.documentElement
          , e = t.style.fontSize || window.getComputedStyle(t).fontSize;
        dg = parseFloat(e)
    }
    return dg
}
function Eq(t) {
    return t = t.replace(/rem/g, ""),
    +t * yq()
}
function _q(t) {
    return t = t.replace(/vw/g, ""),
    +t * ts.value / 100
}
function bq(t) {
    return t = t.replace(/vh/g, ""),
    +t * ra.value / 100
}
function k2(t) {
    if (typeof t == "number")
        return t;
    if (_o) {
        if (t.includes("rem"))
            return Eq(t);
        if (t.includes("vw"))
            return _q(t);
        if (t.includes("vh"))
            return bq(t)
    }
    return parseFloat(t)
}
const Cq = /-(\w)/g
  , E7 = t => t.replace(Cq, (e, r) => r.toUpperCase());
function Wa(t, e=2) {
    let r = t + "";
    for (; r.length < e; )
        r = "0" + r;
    return r
}
const Gr = (t, e, r) => Math.min(Math.max(t, e), r);
function g9(t, e, r) {
    const n = t.indexOf(e);
    return n === -1 ? t : e === "-" && n !== 0 ? t.slice(0, n) : t.slice(0, n + 1) + t.slice(n).replace(r, "")
}
function yy(t, e=!0, r=!0) {
    e ? t = g9(t, ".", /\./g) : t = t.split(".")[0],
    r ? t = g9(t, "-", /-/g) : t = t.replace(/-/, "");
    const n = e ? /[^-0-9.]/g : /[^-0-9]/g;
    return t.replace(n, "")
}
function _7(t, e) {
    return Math.round((t + e) * 1e10) / 1e10
}
const {hasOwnProperty: Aq} = Object.prototype;
function wq(t, e, r) {
    const n = e[r];
    Lt(n) && (!Aq.call(t, r) || !bo(n) ? t[r] = n : t[r] = b7(Object(t[r]), n))
}
function b7(t, e) {
    return Object.keys(e).forEach(r => {
        wq(t, e, r)
    }
    ),
    t
}
var Bq = {
    name: "姓名",
    tel: "电话",
    save: "保存",
    clear: "清空",
    cancel: "取消",
    confirm: "确认",
    delete: "删除",
    loading: "加载中...",
    noCoupon: "暂无优惠券",
    nameEmpty: "请填写姓名",
    addContact: "添加联系人",
    telInvalid: "请填写正确的电话",
    vanCalendar: {
        end: "结束",
        start: "开始",
        title: "日期选择",
        weekdays: ["日", "一", "二", "三", "四", "五", "六"],
        monthTitle: (t, e) => `${t}年${e}月`,
        rangePrompt: t => `最多选择 ${t} 天`
    },
    vanCascader: {
        select: "请选择"
    },
    vanPagination: {
        prev: "上一页",
        next: "下一页"
    },
    vanPullRefresh: {
        pulling: "下拉即可刷新...",
        loosing: "释放即可刷新..."
    },
    vanSubmitBar: {
        label: "合计:"
    },
    vanCoupon: {
        unlimited: "无门槛",
        discount: t => `${t}折`,
        condition: t => `满${t}元可用`
    },
    vanCouponCell: {
        title: "优惠券",
        count: t => `${t}张可用`
    },
    vanCouponList: {
        exchange: "兑换",
        close: "不使用",
        enable: "可用",
        disabled: "不可用",
        placeholder: "输入优惠码"
    },
    vanAddressEdit: {
        area: "地区",
        areaEmpty: "请选择地区",
        addressEmpty: "请填写详细地址",
        addressDetail: "详细地址",
        defaultAddress: "设为默认收货地址"
    },
    vanAddressList: {
        add: "新增地址"
    }
};
const m9 = ie("zh-CN")
  , v9 = It({
    "zh-CN": Bq
})
  , Sq = {
    messages() {
        return v9[m9.value]
    },
    use(t, e) {
        m9.value = t,
        this.add({
            [t]: e
        })
    },
    add(t={}) {
        b7(v9, t)
    }
};
var Tq = Sq;
function Dq(t) {
    const e = E7(t) + ".";
    return (r, ...n) => {
        const i = Tq.messages()
          , o = x9(i, e + r) || x9(i, r);
        return Zc(o) ? o(...n) : o
    }
}
function Ey(t, e) {
    return e ? typeof e == "string" ? ` ${t}--${e}` : Array.isArray(e) ? e.reduce( (r, n) => r + Ey(t, n), "") : Object.keys(e).reduce( (r, n) => r + (e[n] ? Ey(t, n) : ""), "") : ""
}
function Fq(t) {
    return (e, r) => (e && typeof e != "string" && (r = e,
    e = ""),
    e = e ? `${t}__${e}` : t,
    `${e}${Ey(e, r)}`)
}
function Se(t) {
    const e = `van-${t}`;
    return [e, Fq(e), Dq(e)]
}
const va = "van-hairline"
  , C7 = `${va}--top`
  , Pq = `${va}--left`
  , Iq = `${va}--right`
  , Oq = `${va}--bottom`
  , jh = `${va}--surround`
  , A7 = `${va}--top-bottom`
  , kq = `${va}-unset--top-bottom`
  , hs = "van-haptics-feedback"
  , w7 = Symbol("van-form")
  , B7 = 500
  , y9 = 5;
function Su(t, {args: e=[], done: r, canceled: n, error: i}) {
    if (t) {
        const o = t.apply(null, e);
        P2(o) ? o.then(s => {
            s ? r() : n && n()
        }
        ).catch(i || vy) : o ? r() : n && n()
    } else
        r()
}
function Oe(t) {
    return t.install = e => {
        const {name: r} = t;
        r && (e.component(r, t),
        e.component(E7(`-${r}`), t))
    }
    ,
    t
}
function E9(t, e) {
    return t.reduce( (r, n) => Math.abs(r - e) < Math.abs(n - e) ? r : n)
}
const S7 = Symbol();
function R2(t) {
    const e = dr(S7, null);
    e && me(e, r => {
        r && t()
    }
    )
}
const T7 = (t, e) => {
    const r = ie()
      , n = () => {
        r.value = Cr(t).height
    }
    ;
    return Ht( () => {
        if (Xe(n),
        e)
            for (let i = 1; i <= 3; i++)
                setTimeout(n, 100 * i)
    }
    ),
    R2( () => Xe(n)),
    me([ts, ra], n),
    r
}
;
function Rq(t, e) {
    const r = T7(t, !0);
    return n => O("div", {
        class: e("placeholder"),
        style: {
            height: r.value ? `${r.value}px` : void 0
        }
    }, [n()])
}
const [D7,_9] = Se("action-bar")
  , F7 = Symbol(D7)
  , Mq = {
    placeholder: Boolean,
    safeAreaInsetBottom: Ee
};
var Nq = be({
    name: D7,
    props: Mq,
    setup(t, {slots: e}) {
        const r = ie()
          , n = Rq(r, _9)
          , {linkChildren: i} = zi(F7);
        i();
        const o = () => {
            var s;
            return O("div", {
                ref: r,
                class: [_9(), {
                    "van-safe-area-bottom": t.safeAreaInsetBottom
                }]
            }, [(s = e.default) == null ? void 0 : s.call(e)])
        }
        ;
        return () => t.placeholder ? n(o) : o()
    }
});
const Lq = Oe(Nq);
function Kt(t) {
    const e = Ot();
    e && We(e.proxy, t)
}
const Tu = {
    to: [String, Object],
    url: String,
    replace: Boolean
};
function P7({to: t, url: e, replace: r, $router: n}) {
    t && n ? n[r ? "replace" : "push"](t) : e && (r ? location.replace(e) : location.href = e)
}
function od() {
    const t = Ot().proxy;
    return () => P7(t)
}
const [$q,b9] = Se("badge")
  , Uq = {
    dot: Boolean,
    max: Ae,
    tag: Ie("div"),
    color: String,
    offset: Array,
    content: Ae,
    showZero: Ee,
    position: Ie("top-right")
};
var Gq = be({
    name: $q,
    props: Uq,
    setup(t, {slots: e}) {
        const r = () => {
            if (e.content)
                return !0;
            const {content: a, showZero: l} = t;
            return Lt(a) && a !== "" && (l || a !== 0 && a !== "0")
        }
          , n = () => {
            const {dot: a, max: l, content: c} = t;
            if (!a && r())
                return e.content ? e.content() : Lt(l) && g7(c) && +c > +l ? `${l}+` : c
        }
          , i = a => a.startsWith("-") ? a.replace("-", "") : `-${a}`
          , o = ae( () => {
            const a = {
                background: t.color
            };
            if (t.offset) {
                const [l,c] = t.offset
                  , {position: u} = t
                  , [f,d] = u.split("-");
                e.default ? (typeof c == "number" ? a[f] = rt(f === "top" ? c : -c) : a[f] = f === "top" ? rt(c) : i(c),
                typeof l == "number" ? a[d] = rt(d === "left" ? l : -l) : a[d] = d === "left" ? rt(l) : i(l)) : (a.marginTop = rt(c),
                a.marginLeft = rt(l))
            }
            return a
        }
        )
          , s = () => {
            if (r() || t.dot)
                return O("div", {
                    class: b9([t.position, {
                        dot: t.dot,
                        fixed: !!e.default
                    }]),
                    style: o.value
                }, [n()])
        }
        ;
        return () => {
            if (e.default) {
                const {tag: a} = t;
                return O(a, {
                    class: b9("wrapper")
                }, {
                    default: () => [e.default(), s()]
                })
            }
            return s()
        }
    }
});
const Jp = Oe(Gq);
let Hq = 2e3;
const Vq = () => ++Hq
  , [zq,I4e] = Se("config-provider")
  , jq = Symbol(zq)
  , [Wq,C9] = Se("icon")
  , Yq = t => t == null ? void 0 : t.includes("/")
  , Xq = {
    dot: Boolean,
    tag: Ie("i"),
    name: String,
    size: Ae,
    badge: Ae,
    color: String,
    badgeProps: Object,
    classPrefix: String
};
var Kq = be({
    name: Wq,
    props: Xq,
    setup(t, {slots: e}) {
        const r = dr(jq, null)
          , n = ae( () => t.classPrefix || (r == null ? void 0 : r.iconPrefix) || C9());
        return () => {
            const {tag: i, dot: o, name: s, size: a, badge: l, color: c} = t
              , u = Yq(s);
            return O(Jp, st({
                dot: o,
                tag: i,
                class: [n.value, u ? "" : `${n.value}-${s}`],
                style: {
                    color: c,
                    fontSize: rt(a)
                },
                content: l
            }, t.badgeProps), {
                default: () => {
                    var f;
                    return [(f = e.default) == null ? void 0 : f.call(e), u && O("img", {
                        class: C9("image"),
                        src: s
                    }, null)]
                }
            })
        }
    }
});
const rr = Oe(Kq);
var qq = rr;
const [Zq,M0] = Se("loading")
  , Jq = Array(12).fill(null).map( (t, e) => O("i", {
    class: M0("line", String(e + 1))
}, null))
  , Qq = O("svg", {
    class: M0("circular"),
    viewBox: "25 25 50 50"
}, [O("circle", {
    cx: "50",
    cy: "50",
    r: "20",
    fill: "none"
}, null)])
  , eZ = {
    size: Ae,
    type: Ie("circular"),
    color: String,
    vertical: Boolean,
    textSize: Ae,
    textColor: String
};
var tZ = be({
    name: Zq,
    props: eZ,
    setup(t, {slots: e}) {
        const r = ae( () => We({
            color: t.color
        }, zl(t.size)))
          , n = () => {
            const o = t.type === "spinner" ? Jq : Qq;
            return O("span", {
                class: M0("spinner", t.type),
                style: r.value
            }, [e.icon ? e.icon() : o])
        }
          , i = () => {
            var o;
            if (e.default)
                return O("span", {
                    class: M0("text"),
                    style: {
                        fontSize: rt(t.textSize),
                        color: (o = t.textColor) != null ? o : t.color
                    }
                }, [e.default()])
        }
        ;
        return () => {
            const {type: o, vertical: s} = t;
            return O("div", {
                class: M0([o, {
                    vertical: s
                }]),
                "aria-live": "polite",
                "aria-busy": !0
            }, [n(), i()])
        }
    }
});
const bs = Oe(tZ)
  , [rZ,tc] = Se("button")
  , nZ = We({}, Tu, {
    tag: Ie("button"),
    text: String,
    icon: String,
    type: Ie("default"),
    size: Ie("normal"),
    color: String,
    block: Boolean,
    plain: Boolean,
    round: Boolean,
    square: Boolean,
    loading: Boolean,
    hairline: Boolean,
    disabled: Boolean,
    iconPrefix: String,
    nativeType: Ie("button"),
    loadingSize: Ae,
    loadingText: String,
    loadingType: String,
    iconPosition: Ie("left")
});
var iZ = be({
    name: rZ,
    props: nZ,
    emits: ["click"],
    setup(t, {emit: e, slots: r}) {
        const n = od()
          , i = () => r.loading ? r.loading() : O(bs, {
            size: t.loadingSize,
            type: t.loadingType,
            class: tc("loading")
        }, null)
          , o = () => {
            if (t.loading)
                return i();
            if (r.icon)
                return O("div", {
                    class: tc("icon")
                }, [r.icon()]);
            if (t.icon)
                return O(rr, {
                    name: t.icon,
                    class: tc("icon"),
                    classPrefix: t.iconPrefix
                }, null)
        }
          , s = () => {
            let c;
            if (t.loading ? c = t.loadingText : c = r.default ? r.default() : t.text,
            c)
                return O("span", {
                    class: tc("text")
                }, [c])
        }
          , a = () => {
            const {color: c, plain: u} = t;
            if (c) {
                const f = {
                    color: u ? c : "white"
                };
                return u || (f.background = c),
                c.includes("gradient") ? f.border = 0 : f.borderColor = c,
                f
            }
        }
          , l = c => {
            t.loading ? Rr(c) : t.disabled || (e("click", c),
            n())
        }
        ;
        return () => {
            const {tag: c, type: u, size: f, block: d, round: h, plain: x, square: y, loading: m, disabled: E, hairline: g, nativeType: p, iconPosition: v} = t
              , _ = [tc([u, f, {
                plain: x,
                block: d,
                round: h,
                square: y,
                loading: m,
                disabled: E,
                hairline: g
            }]), {
                [jh]: g
            }];
            return O(c, {
                type: p,
                class: _,
                style: a(),
                disabled: E,
                onClick: l
            }, {
                default: () => [O("div", {
                    class: tc("content")
                }, [v === "left" && o(), s(), v === "right" && o()])]
            })
        }
    }
});
const Fx = Oe(iZ)
  , [oZ,sZ] = Se("action-bar-button")
  , aZ = We({}, Tu, {
    type: String,
    text: String,
    icon: String,
    color: String,
    loading: Boolean,
    disabled: Boolean
});
var lZ = be({
    name: oZ,
    props: aZ,
    setup(t, {slots: e}) {
        const r = od()
          , {parent: n, index: i} = Jn(F7)
          , o = ae( () => {
            if (n) {
                const a = n.children[i.value - 1];
                return !(a && "isButton"in a)
            }
        }
        )
          , s = ae( () => {
            if (n) {
                const a = n.children[i.value + 1];
                return !(a && "isButton"in a)
            }
        }
        );
        return Kt({
            isButton: !0
        }),
        () => {
            const {type: a, icon: l, text: c, color: u, loading: f, disabled: d} = t;
            return O(Fx, {
                class: sZ([a, {
                    last: s.value,
                    first: o.value
                }]),
                size: "large",
                type: a,
                icon: l,
                color: u,
                loading: f,
                disabled: d,
                onClick: r
            }, {
                default: () => [e.default ? e.default() : c]
            })
        }
    }
});
const A9 = Oe(lZ)
  , sd = {
    show: Boolean,
    zIndex: Ae,
    overlay: Ee,
    duration: Ae,
    teleport: [String, Object],
    lockScroll: Ee,
    lazyRender: Ee,
    beforeClose: Function,
    overlayProps: Object,
    overlayStyle: Object,
    overlayClass: hr,
    transitionAppear: Boolean,
    closeOnClickOverlay: Ee
}
  , I7 = Object.keys(sd);
function cZ(t, e) {
    return t > e ? "horizontal" : e > t ? "vertical" : ""
}
function jl() {
    const t = ie(0)
      , e = ie(0)
      , r = ie(0)
      , n = ie(0)
      , i = ie(0)
      , o = ie(0)
      , s = ie("")
      , a = ie(!0)
      , l = () => s.value === "vertical"
      , c = () => s.value === "horizontal"
      , u = () => {
        r.value = 0,
        n.value = 0,
        i.value = 0,
        o.value = 0,
        s.value = "",
        a.value = !0
    }
    ;
    return {
        move: h => {
            const x = h.touches[0];
            r.value = (x.clientX < 0 ? 0 : x.clientX) - t.value,
            n.value = x.clientY - e.value,
            i.value = Math.abs(r.value),
            o.value = Math.abs(n.value);
            const y = 10;
            (!s.value || i.value < y && o.value < y) && (s.value = cZ(i.value, o.value)),
            a.value && (i.value > y9 || o.value > y9) && (a.value = !1)
        }
        ,
        start: h => {
            u(),
            t.value = h.touches[0].clientX,
            e.value = h.touches[0].clientY
        }
        ,
        reset: u,
        startX: t,
        startY: e,
        deltaX: r,
        deltaY: n,
        offsetX: i,
        offsetY: o,
        direction: s,
        isVertical: l,
        isHorizontal: c,
        isTap: a
    }
}
let Wu = 0;
const w9 = "van-overflow-hidden";
function uZ(t, e) {
    const r = jl()
      , n = "01"
      , i = "10"
      , o = u => {
        r.move(u);
        const f = r.deltaY.value > 0 ? i : n
          , d = e2(u.target, t.value)
          , {scrollHeight: h, offsetHeight: x, scrollTop: y} = d;
        let m = "11";
        y === 0 ? m = x >= h ? "00" : "01" : y + x >= h && (m = "10"),
        m !== "11" && r.isVertical() && !(parseInt(m, 2) & parseInt(f, 2)) && Rr(u, !0)
    }
      , s = () => {
        document.addEventListener("touchstart", r.start),
        document.addEventListener("touchmove", o, {
            passive: !1
        }),
        Wu || document.body.classList.add(w9),
        Wu++
    }
      , a = () => {
        Wu && (document.removeEventListener("touchstart", r.start),
        document.removeEventListener("touchmove", o),
        Wu--,
        Wu || document.body.classList.remove(w9))
    }
      , l = () => e() && s()
      , c = () => e() && a();
    Bu(l),
    Fo(c),
    Zn(c),
    me(e, u => {
        u ? s() : a()
    }
    )
}
function M2(t) {
    const e = ie(!1);
    return me(t, r => {
        r && (e.value = r)
    }
    , {
        immediate: !0
    }),
    r => () => e.value ? r() : null
}
const _y = () => {
    var t;
    const {scopeId: e} = ((t = Ot()) == null ? void 0 : t.vnode) || {};
    return e ? {
        [e]: ""
    } : null
}
  , [fZ,dZ] = Se("overlay")
  , hZ = {
    show: Boolean,
    zIndex: Ae,
    duration: Ae,
    className: hr,
    lockScroll: Ee,
    lazyRender: Ee,
    customStyle: Object,
    teleport: [String, Object]
};
var xZ = be({
    name: fZ,
    inheritAttrs: !1,
    props: hZ,
    setup(t, {attrs: e, slots: r}) {
        const n = ie()
          , i = M2( () => t.show || !t.lazyRender)
          , o = a => {
            t.lockScroll && Rr(a, !0)
        }
          , s = i( () => {
            var a;
            const l = We(y7(t.zIndex), t.customStyle);
            return Lt(t.duration) && (l.animationDuration = `${t.duration}s`),
            hi(O("div", st({
                ref: n,
                style: l,
                class: [dZ(), t.className]
            }, e), [(a = r.default) == null ? void 0 : a.call(r)]), [[pi, t.show]])
        }
        );
        return yn("touchmove", o, {
            target: n
        }),
        () => {
            const a = O(td, {
                name: "van-fade",
                appear: !0
            }, {
                default: s
            });
            return t.teleport ? O(Ip, {
                to: t.teleport
            }, {
                default: () => [a]
            }) : a
        }
    }
});
const pZ = Oe(xZ)
  , gZ = We({}, sd, {
    round: Boolean,
    position: Ie("center"),
    closeIcon: Ie("cross"),
    closeable: Boolean,
    transition: String,
    iconPrefix: String,
    closeOnPopstate: Boolean,
    closeIconPosition: Ie("top-right"),
    destroyOnClose: Boolean,
    safeAreaInsetTop: Boolean,
    safeAreaInsetBottom: Boolean
})
  , [mZ,B9] = Se("popup");
var vZ = be({
    name: mZ,
    inheritAttrs: !1,
    props: gZ,
    emits: ["open", "close", "opened", "closed", "keydown", "update:show", "clickOverlay", "clickCloseIcon"],
    setup(t, {emit: e, attrs: r, slots: n}) {
        let i, o;
        const s = ie()
          , a = ie()
          , l = M2( () => t.show || !t.lazyRender)
          , c = ae( () => {
            const b = {
                zIndex: s.value
            };
            if (Lt(t.duration)) {
                const C = t.position === "center" ? "animationDuration" : "transitionDuration";
                b[C] = `${t.duration}s`
            }
            return b
        }
        )
          , u = () => {
            i || (i = !0,
            s.value = t.zIndex !== void 0 ? +t.zIndex : Vq(),
            e("open"))
        }
          , f = () => {
            i && Su(t.beforeClose, {
                done() {
                    i = !1,
                    e("close"),
                    e("update:show", !1)
                }
            })
        }
          , d = b => {
            e("clickOverlay", b),
            t.closeOnClickOverlay && f()
        }
          , h = () => {
            if (t.overlay) {
                const b = We({
                    show: t.show,
                    class: t.overlayClass,
                    zIndex: s.value,
                    duration: t.duration,
                    customStyle: t.overlayStyle,
                    role: t.closeOnClickOverlay ? "button" : void 0,
                    tabindex: t.closeOnClickOverlay ? 0 : void 0
                }, t.overlayProps);
                return O(pZ, st(b, _y(), {
                    onClick: d
                }), {
                    default: n["overlay-content"]
                })
            }
        }
          , x = b => {
            e("clickCloseIcon", b),
            f()
        }
          , y = () => {
            if (t.closeable)
                return O(rr, {
                    role: "button",
                    tabindex: 0,
                    name: t.closeIcon,
                    class: [B9("close-icon", t.closeIconPosition), hs],
                    classPrefix: t.iconPrefix,
                    onClick: x
                }, null)
        }
        ;
        let m;
        const E = () => {
            m && clearTimeout(m),
            m = setTimeout( () => {
                e("opened")
            }
            )
        }
          , g = () => e("closed")
          , p = b => e("keydown", b)
          , v = l( () => {
            var b;
            const {destroyOnClose: C, round: w, position: T, safeAreaInsetTop: A, safeAreaInsetBottom: B, show: S} = t;
            if (!(!S && C))
                return hi(O("div", st({
                    ref: a,
                    style: c.value,
                    role: "dialog",
                    tabindex: 0,
                    class: [B9({
                        round: w,
                        [T]: T
                    }), {
                        "van-safe-area-top": A,
                        "van-safe-area-bottom": B
                    }],
                    onKeydown: p
                }, r, _y()), [(b = n.default) == null ? void 0 : b.call(n), y()]), [[pi, S]])
        }
        )
          , _ = () => {
            const {position: b, transition: C, transitionAppear: w} = t
              , T = b === "center" ? "van-fade" : `van-popup-slide-${b}`;
            return O(td, {
                name: C || T,
                appear: w,
                onAfterEnter: E,
                onAfterLeave: g
            }, {
                default: v
            })
        }
        ;
        return me( () => t.show, b => {
            b && !i && (u(),
            r.tabindex === 0 && Xe( () => {
                var C;
                (C = a.value) == null || C.focus()
            }
            )),
            !b && i && (i = !1,
            e("close"))
        }
        ),
        Kt({
            popupRef: a
        }),
        uZ(a, () => t.show && t.lockScroll),
        yn("popstate", () => {
            t.closeOnPopstate && (f(),
            o = !1)
        }
        ),
        Ht( () => {
            t.show && u()
        }
        ),
        ys( () => {
            o && (e("update:show", !0),
            o = !1)
        }
        ),
        Fo( () => {
            t.show && t.teleport && (f(),
            o = !0)
        }
        ),
        xi(S7, () => t.show),
        () => t.teleport ? O(Ip, {
            to: t.teleport
        }, {
            default: () => [h(), _()]
        }) : O(Nt, null, [h(), _()])
    }
});
const Wl = Oe(vZ)
  , [yZ,ni] = Se("action-sheet")
  , EZ = We({}, sd, {
    title: String,
    round: Ee,
    actions: ds(),
    closeIcon: Ie("cross"),
    closeable: Ee,
    cancelText: String,
    description: String,
    closeOnPopstate: Ee,
    closeOnClickAction: Boolean,
    safeAreaInsetBottom: Ee
})
  , _Z = [...I7, "round", "closeOnPopstate", "safeAreaInsetBottom"];
var bZ = be({
    name: yZ,
    props: EZ,
    emits: ["select", "cancel", "update:show"],
    setup(t, {slots: e, emit: r}) {
        const n = f => r("update:show", f)
          , i = () => {
            n(!1),
            r("cancel")
        }
          , o = () => {
            if (t.title)
                return O("div", {
                    class: ni("header")
                }, [t.title, t.closeable && O(rr, {
                    name: t.closeIcon,
                    class: [ni("close"), hs],
                    onClick: i
                }, null)])
        }
          , s = () => {
            if (e.cancel || t.cancelText)
                return [O("div", {
                    class: ni("gap")
                }, null), O("button", {
                    type: "button",
                    class: ni("cancel"),
                    onClick: i
                }, [e.cancel ? e.cancel() : t.cancelText])]
        }
          , a = f => {
            if (f.icon)
                return O(rr, {
                    class: ni("item-icon"),
                    name: f.icon
                }, null)
        }
          , l = (f, d) => f.loading ? O(bs, {
            class: ni("loading-icon")
        }, null) : e.action ? e.action({
            action: f,
            index: d
        }) : [O("span", {
            class: ni("name")
        }, [f.name]), f.subname && O("div", {
            class: ni("subname")
        }, [f.subname])]
          , c = (f, d) => {
            const {color: h, loading: x, callback: y, disabled: m, className: E} = f
              , g = () => {
                m || x || (y && y(f),
                t.closeOnClickAction && n(!1),
                Xe( () => r("select", f, d)))
            }
            ;
            return O("button", {
                type: "button",
                style: {
                    color: h
                },
                class: [ni("item", {
                    loading: x,
                    disabled: m
                }), E],
                onClick: g
            }, [a(f), l(f, d)])
        }
          , u = () => {
            if (t.description || e.description) {
                const f = e.description ? e.description() : t.description;
                return O("div", {
                    class: ni("description")
                }, [f])
            }
        }
        ;
        return () => O(Wl, st({
            class: ni(),
            position: "bottom",
            "onUpdate:show": n
        }, $t(t, _Z)), {
            default: () => {
                var f;
                return [o(), u(), O("div", {
                    class: ni("content")
                }, [t.actions.map(c), (f = e.default) == null ? void 0 : f.call(e)]), s()]
            }
        })
    }
});
const O4e = Oe(bZ)
  , [CZ,Zo,S9] = Se("picker")
  , O7 = t => t.find(e => !e.disabled) || t[0];
function AZ(t, e) {
    const r = t[0];
    if (r) {
        if (Array.isArray(r))
            return "multiple";
        if (e.children in r)
            return "cascade"
    }
    return "default"
}
function Wh(t, e) {
    e = Gr(e, 0, t.length);
    for (let r = e; r < t.length; r++)
        if (!t[r].disabled)
            return r;
    for (let r = e - 1; r >= 0; r--)
        if (!t[r].disabled)
            return r;
    return 0
}
const T9 = (t, e, r) => e !== void 0 && t.some(n => n[r.value] === e);
function by(t, e, r) {
    const n = t.findIndex(o => o[r.value] === e)
      , i = Wh(t, n);
    return t[i]
}
function wZ(t, e, r) {
    const n = [];
    let i = {
        [e.children]: t
    }
      , o = 0;
    for (; i && i[e.children]; ) {
        const s = i[e.children]
          , a = r.value[o];
        if (i = Lt(a) ? by(s, a, e) : void 0,
        !i && s.length) {
            const l = O7(s)[e.value];
            i = by(s, l, e)
        }
        o++,
        n.push(s)
    }
    return n
}
function BZ(t) {
    const {transform: e} = window.getComputedStyle(t)
      , r = e.slice(7, e.length - 1).split(", ")[5];
    return Number(r)
}
function SZ(t) {
    return We({
        text: "text",
        value: "value",
        children: "children"
    }, t)
}
const D9 = 200
  , F9 = 300
  , TZ = 15
  , [k7,hg] = Se("picker-column")
  , R7 = Symbol(k7);
var DZ = be({
    name: k7,
    props: {
        value: Ae,
        fields: dn(Object),
        options: ds(),
        readonly: Boolean,
        allowHtml: Boolean,
        optionHeight: dn(Number),
        swipeDuration: dn(Ae),
        visibleOptionNum: dn(Ae)
    },
    emits: ["change", "clickOption", "scrollInto"],
    setup(t, {emit: e, slots: r}) {
        let n, i, o, s, a;
        const l = ie()
          , c = ie()
          , u = ie(0)
          , f = ie(0)
          , d = jl()
          , h = () => t.options.length
          , x = () => t.optionHeight * (+t.visibleOptionNum - 1) / 2
          , y = A => {
            let B = Wh(t.options, A);
            const S = -B * t.optionHeight
              , D = () => {
                B > h() - 1 && (B = Wh(t.options, A));
                const F = t.options[B][t.fields.value];
                F !== t.value && e("change", F)
            }
            ;
            n && S !== u.value ? a = D : D(),
            u.value = S
        }
          , m = () => t.readonly || !t.options.length
          , E = A => {
            n || m() || (a = null,
            f.value = D9,
            y(A),
            e("clickOption", t.options[A]))
        }
          , g = A => Gr(Math.round(-A / t.optionHeight), 0, h() - 1)
          , p = ae( () => g(u.value))
          , v = (A, B) => {
            const S = Math.abs(A / B);
            A = u.value + S / .003 * (A < 0 ? -1 : 1);
            const D = g(A);
            f.value = +t.swipeDuration,
            y(D)
        }
          , _ = () => {
            n = !1,
            f.value = 0,
            a && (a(),
            a = null)
        }
          , b = A => {
            if (!m()) {
                if (d.start(A),
                n) {
                    const B = BZ(c.value);
                    u.value = Math.min(0, B - x())
                }
                f.value = 0,
                i = u.value,
                o = Date.now(),
                s = i,
                a = null
            }
        }
          , C = A => {
            if (m())
                return;
            d.move(A),
            d.isVertical() && (n = !0,
            Rr(A, !0));
            const B = Gr(i + d.deltaY.value, -(h() * t.optionHeight), t.optionHeight)
              , S = g(B);
            S !== p.value && e("scrollInto", t.options[S]),
            u.value = B;
            const D = Date.now();
            D - o > F9 && (o = D,
            s = B)
        }
          , w = () => {
            if (m())
                return;
            const A = u.value - s
              , B = Date.now() - o;
            if (B < F9 && Math.abs(A) > TZ) {
                v(A, B);
                return
            }
            const D = g(u.value);
            f.value = D9,
            y(D),
            setTimeout( () => {
                n = !1
            }
            , 0)
        }
          , T = () => {
            const A = {
                height: `${t.optionHeight}px`
            };
            return t.options.map( (B, S) => {
                const D = B[t.fields.text]
                  , {disabled: F} = B
                  , R = B[t.fields.value]
                  , P = {
                    role: "button",
                    style: A,
                    tabindex: F ? -1 : 0,
                    class: [hg("item", {
                        disabled: F,
                        selected: R === t.value
                    }), B.className],
                    onClick: () => E(S)
                }
                  , N = {
                    class: "van-ellipsis",
                    [t.allowHtml ? "innerHTML" : "textContent"]: D
                };
                return O("li", P, [r.option ? r.option(B, S) : O("div", N, null)])
            }
            )
        }
        ;
        return Jn(R7),
        Kt({
            stopMomentum: _
        }),
        Au( () => {
            const A = n ? Math.floor(-u.value / t.optionHeight) : t.options.findIndex(D => D[t.fields.value] === t.value)
              , B = Wh(t.options, A)
              , S = -B * t.optionHeight;
            n && B < A && _(),
            u.value = S
        }
        ),
        yn("touchmove", C, {
            target: l
        }),
        () => O("div", {
            ref: l,
            class: hg(),
            onTouchstartPassive: b,
            onTouchend: w,
            onTouchcancel: w
        }, [O("ul", {
            ref: c,
            style: {
                transform: `translate3d(0, ${u.value + x()}px, 0)`,
                transitionDuration: `${f.value}ms`,
                transitionProperty: f.value ? "all" : "none"
            },
            class: hg("wrapper"),
            onTransitionend: _
        }, [T()])])
    }
});
const [FZ] = Se("picker-toolbar")
  , Qp = {
    title: String,
    cancelButtonText: String,
    confirmButtonText: String
}
  , PZ = ["cancel", "confirm", "title", "toolbar"]
  , IZ = Object.keys(Qp);
var OZ = be({
    name: FZ,
    props: Qp,
    emits: ["confirm", "cancel"],
    setup(t, {emit: e, slots: r}) {
        const n = () => {
            if (r.title)
                return r.title();
            if (t.title)
                return O("div", {
                    class: [Zo("title"), "van-ellipsis"]
                }, [t.title])
        }
          , i = () => e("cancel")
          , o = () => e("confirm")
          , s = () => {
            var l;
            const c = (l = t.cancelButtonText) != null ? l : S9("cancel");
            if (!(!r.cancel && !c))
                return O("button", {
                    type: "button",
                    class: [Zo("cancel"), hs],
                    onClick: i
                }, [r.cancel ? r.cancel() : c])
        }
          , a = () => {
            var l;
            const c = (l = t.confirmButtonText) != null ? l : S9("confirm");
            if (!(!r.confirm && !c))
                return O("button", {
                    type: "button",
                    class: [Zo("confirm"), hs],
                    onClick: o
                }, [r.confirm ? r.confirm() : c])
        }
        ;
        return () => O("div", {
            class: Zo("toolbar")
        }, [r.toolbar ? r.toolbar() : [s(), n(), a()]])
    }
});
const kZ = (t, e) => {
    const r = ie(t());
    return me(t, n => {
        n !== r.value && (r.value = n)
    }
    ),
    me(r, n => {
        n !== t() && e(n)
    }
    ),
    r
}
;
/**
* @vue/shared v3.5.26
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
const M7 = Array.isArray
  , pf = t => typeof t == "string"
  , N7 = t => t !== null && typeof t == "object"
  , RZ = t => {
    const e = Object.create(null);
    return r => e[r] || (e[r] = t(r))
}
  , MZ = /\B([A-Z])/g
  , NZ = RZ(t => t.replace(MZ, "-$1").toLowerCase());
function L7(t) {
    if (M7(t)) {
        const e = {};
        for (let r = 0; r < t.length; r++) {
            const n = t[r]
              , i = pf(n) ? GZ(n) : L7(n);
            if (i)
                for (const o in i)
                    e[o] = i[o]
        }
        return e
    } else if (pf(t) || N7(t))
        return t
}
const LZ = /;(?![^(]*\))/g
  , $Z = /:([^]+)/
  , UZ = /\/\*[^]*?\*\//g;
function GZ(t) {
    const e = {};
    return t.replace(UZ, "").split(LZ).forEach(r => {
        if (r) {
            const n = r.split($Z);
            n.length > 1 && (e[n[0].trim()] = n[1].trim())
        }
    }
    ),
    e
}
function HZ(t) {
    if (!t)
        return "";
    if (pf(t))
        return t;
    let e = "";
    for (const r in t) {
        const n = t[r];
        if (pf(n) || typeof n == "number") {
            const i = r.startsWith("--") ? r : NZ(r);
            e += `${i}:${n};`
        }
    }
    return e
}
function $7(t) {
    let e = "";
    if (pf(t))
        e = t;
    else if (M7(t))
        for (let r = 0; r < t.length; r++) {
            const n = $7(t[r]);
            n && (e += n + " ")
        }
    else if (N7(t))
        for (const r in t)
            t[r] && (e += r + " ");
    return e.trim()
}
function VZ(t, e, r) {
    let n, i = 0;
    const o = t.scrollLeft
      , s = r === 0 ? 1 : Math.round(r * 1e3 / 16);
    let a = o;
    function l() {
        rd(n)
    }
    function c() {
        a += (e - o) / s,
        t.scrollLeft = a,
        ++i < s && (n = pn(c))
    }
    return c(),
    l
}
function zZ(t, e, r, n) {
    let i, o = id(t);
    const s = o < e
      , a = r === 0 ? 1 : Math.round(r * 1e3 / 16)
      , l = (e - o) / a;
    function c() {
        rd(i)
    }
    function u() {
        o += l,
        (s && o > e || !s && o < e) && (o = e),
        Dx(t, o),
        s && o < e || !s && o > e ? i = pn(u) : n && (i = pn(n))
    }
    return u(),
    c
}
let jZ = 0;
function N2() {
    const t = Ot()
      , {name: e="unknown"} = (t == null ? void 0 : t.type) || {};
    return `${e}-${++jZ}`
}
function U7() {
    const t = ie([])
      , e = [];
    return Pp( () => {
        t.value = []
    }
    ),
    [t, n => (e[n] || (e[n] = i => {
        t.value[n] = i
    }
    ),
    e[n])]
}
function G7(t, e) {
    if (!_o || !window.IntersectionObserver)
        return;
    const r = new IntersectionObserver(o => {
        e(o[0].intersectionRatio > 0)
    }
    ,{
        root: document.body
    })
      , n = () => {
        t.value && r.observe(t.value)
    }
      , i = () => {
        t.value && r.unobserve(t.value)
    }
    ;
    Fo(i),
    Zn(i),
    Bu(n)
}
const [WZ,YZ] = Se("sticky")
  , XZ = {
    zIndex: Ae,
    position: Ie("top"),
    container: Object,
    offsetTop: ze(0),
    offsetBottom: ze(0)
};
var KZ = be({
    name: WZ,
    props: XZ,
    emits: ["scroll", "change"],
    setup(t, {emit: e, slots: r}) {
        const n = ie()
          , i = nd(n)
          , o = It({
            fixed: !1,
            width: 0,
            height: 0,
            transform: 0
        })
          , s = ie(!1)
          , a = ae( () => k2(t.position === "top" ? t.offsetTop : t.offsetBottom))
          , l = ae( () => {
            if (s.value)
                return;
            const {fixed: d, height: h, width: x} = o;
            if (d)
                return {
                    width: `${x}px`,
                    height: `${h}px`
                }
        }
        )
          , c = ae( () => {
            if (!o.fixed || s.value)
                return;
            const d = We(y7(t.zIndex), {
                width: `${o.width}px`,
                height: `${o.height}px`,
                [t.position]: `${a.value}px`
            });
            return o.transform && (d.transform = `translate3d(0, ${o.transform}px, 0)`),
            d
        }
        )
          , u = d => e("scroll", {
            scrollTop: d,
            isFixed: o.fixed
        })
          , f = () => {
            if (!n.value || Jc(n))
                return;
            const {container: d, position: h} = t
              , x = Cr(n)
              , y = id(window);
            if (o.width = x.width,
            o.height = x.height,
            h === "top")
                if (d) {
                    const m = Cr(d)
                      , E = m.bottom - a.value - o.height;
                    o.fixed = a.value > x.top && m.bottom > 0,
                    o.transform = E < 0 ? E : 0
                } else
                    o.fixed = a.value > x.top;
            else {
                const {clientHeight: m} = document.documentElement;
                if (d) {
                    const E = Cr(d)
                      , g = m - E.top - a.value - o.height;
                    o.fixed = m - a.value < x.bottom && m > E.top,
                    o.transform = g < 0 ? -g : 0
                } else
                    o.fixed = m - a.value < x.bottom
            }
            u(y)
        }
        ;
        return me( () => o.fixed, d => e("change", d)),
        yn("scroll", f, {
            target: i,
            passive: !0
        }),
        G7(n, f),
        me([ts, ra], () => {
            !n.value || Jc(n) || !o.fixed || (s.value = !0,
            Xe( () => {
                const d = Cr(n);
                o.width = d.width,
                o.height = d.height,
                s.value = !1
            }
            ))
        }
        ),
        () => {
            var d;
            return O("div", {
                ref: n,
                style: l.value
            }, [O("div", {
                class: YZ({
                    fixed: o.fixed && !s.value
                }),
                style: c.value
            }, [(d = r.default) == null ? void 0 : d.call(r)])])
        }
    }
});
const qZ = Oe(KZ)
  , [H7,zd] = Se("swipe")
  , ZZ = {
    loop: Ee,
    width: Ae,
    height: Ae,
    vertical: Boolean,
    autoplay: ze(0),
    duration: ze(500),
    touchable: Ee,
    lazyRender: Boolean,
    initialSwipe: ze(0),
    indicatorColor: String,
    showIndicators: Ee,
    stopPropagation: Ee
}
  , V7 = Symbol(H7);
var JZ = be({
    name: H7,
    props: ZZ,
    emits: ["change", "dragStart", "dragEnd"],
    setup(t, {emit: e, slots: r}) {
        const n = ie()
          , i = ie()
          , o = It({
            rect: null,
            width: 0,
            height: 0,
            offset: 0,
            active: 0,
            swiping: !1
        });
        let s = !1;
        const a = jl()
          , {children: l, linkChildren: c} = zi(V7)
          , u = ae( () => l.length)
          , f = ae( () => o[t.vertical ? "height" : "width"])
          , d = ae( () => t.vertical ? a.deltaY.value : a.deltaX.value)
          , h = ae( () => o.rect ? (t.vertical ? o.rect.height : o.rect.width) - f.value * u.value : 0)
          , x = ae( () => f.value ? Math.ceil(Math.abs(h.value) / f.value) : u.value)
          , y = ae( () => u.value * f.value)
          , m = ae( () => (o.active + u.value) % u.value)
          , E = ae( () => {
            const U = t.vertical ? "vertical" : "horizontal";
            return a.direction.value === U
        }
        )
          , g = ae( () => {
            const U = {
                transitionDuration: `${o.swiping ? 0 : t.duration}ms`,
                transform: `translate${t.vertical ? "Y" : "X"}(${+o.offset.toFixed(2)}px)`
            };
            if (f.value) {
                const $ = t.vertical ? "height" : "width"
                  , V = t.vertical ? "width" : "height";
                U[$] = `${y.value}px`,
                U[V] = t[V] ? `${t[V]}px` : ""
            }
            return U
        }
        )
          , p = U => {
            const {active: $} = o;
            return U ? t.loop ? Gr($ + U, -1, u.value) : Gr($ + U, 0, x.value) : $
        }
          , v = (U, $=0) => {
            let V = U * f.value;
            t.loop || (V = Math.min(V, -h.value));
            let W = $ - V;
            return t.loop || (W = Gr(W, h.value, 0)),
            W
        }
          , _ = ({pace: U=0, offset: $=0, emitChange: V}) => {
            if (u.value <= 1)
                return;
            const {active: W} = o
              , H = p(U)
              , Q = v(H, $);
            if (t.loop) {
                if (l[0] && Q !== h.value) {
                    const G = Q < h.value;
                    l[0].setOffset(G ? y.value : 0)
                }
                if (l[u.value - 1] && Q !== 0) {
                    const G = Q > 0;
                    l[u.value - 1].setOffset(G ? -y.value : 0)
                }
            }
            o.active = H,
            o.offset = Q,
            V && H !== W && e("change", m.value)
        }
          , b = () => {
            o.swiping = !0,
            o.active <= -1 ? _({
                pace: u.value
            }) : o.active >= u.value && _({
                pace: -u.value
            })
        }
          , C = () => {
            b(),
            a.reset(),
            Ka( () => {
                o.swiping = !1,
                _({
                    pace: -1,
                    emitChange: !0
                })
            }
            )
        }
          , w = () => {
            b(),
            a.reset(),
            Ka( () => {
                o.swiping = !1,
                _({
                    pace: 1,
                    emitChange: !0
                })
            }
            )
        }
        ;
        let T;
        const A = () => clearTimeout(T)
          , B = () => {
            A(),
            +t.autoplay > 0 && u.value > 1 && (T = setTimeout( () => {
                w(),
                B()
            }
            , +t.autoplay))
        }
          , S = (U=+t.initialSwipe) => {
            if (!n.value)
                return;
            const $ = () => {
                var V, W;
                if (!Jc(n)) {
                    const H = {
                        width: n.value.offsetWidth,
                        height: n.value.offsetHeight
                    };
                    o.rect = H,
                    o.width = +((V = t.width) != null ? V : H.width),
                    o.height = +((W = t.height) != null ? W : H.height)
                }
                u.value && (U = Math.min(u.value - 1, U),
                U === -1 && (U = u.value - 1)),
                o.active = U,
                o.swiping = !0,
                o.offset = v(U),
                l.forEach(H => {
                    H.setOffset(0)
                }
                ),
                B()
            }
            ;
            Jc(n) ? Xe().then($) : $()
        }
          , D = () => S(o.active);
        let F;
        const R = U => {
            !t.touchable || U.touches.length > 1 || (a.start(U),
            s = !1,
            F = Date.now(),
            A(),
            b())
        }
          , P = U => {
            t.touchable && o.swiping && (a.move(U),
            E.value && (!t.loop && (o.active === 0 && d.value > 0 || o.active === u.value - 1 && d.value < 0) || (Rr(U, t.stopPropagation),
            _({
                offset: d.value
            }),
            s || (e("dragStart", {
                index: m.value
            }),
            s = !0))))
        }
          , N = () => {
            if (!t.touchable || !o.swiping)
                return;
            const U = Date.now() - F
              , $ = d.value / U;
            if ((Math.abs($) > .25 || Math.abs(d.value) > f.value / 2) && E.value) {
                const W = t.vertical ? a.offsetY.value : a.offsetX.value;
                let H = 0;
                t.loop ? H = W > 0 ? d.value > 0 ? -1 : 1 : 0 : H = -Math[d.value > 0 ? "ceil" : "floor"](d.value / f.value),
                _({
                    pace: H,
                    emitChange: !0
                })
            } else
                d.value && _({
                    pace: 0
                });
            s = !1,
            o.swiping = !1,
            e("dragEnd", {
                index: m.value
            }),
            B()
        }
          , j = (U, $={}) => {
            b(),
            a.reset(),
            Ka( () => {
                let V;
                t.loop && U === u.value ? V = o.active === 0 ? 0 : U : V = U % u.value,
                $.immediate ? Ka( () => {
                    o.swiping = !1
                }
                ) : o.swiping = !1,
                _({
                    pace: V - o.active,
                    emitChange: !0
                })
            }
            )
        }
          , K = (U, $) => {
            const V = $ === m.value
              , W = V ? {
                backgroundColor: t.indicatorColor
            } : void 0;
            return O("i", {
                style: W,
                class: zd("indicator", {
                    active: V
                })
            }, null)
        }
          , oe = () => {
            if (r.indicator)
                return r.indicator({
                    active: m.value,
                    total: u.value
                });
            if (t.showIndicators && u.value > 1)
                return O("div", {
                    class: zd("indicators", {
                        vertical: t.vertical
                    })
                }, [Array(u.value).fill("").map(K)])
        }
        ;
        return Kt({
            prev: C,
            next: w,
            state: o,
            resize: D,
            swipeTo: j
        }),
        c({
            size: f,
            props: t,
            count: u,
            activeIndicator: m
        }),
        me( () => t.initialSwipe, U => S(+U)),
        me(u, () => S(o.active)),
        me( () => t.autoplay, B),
        me([ts, ra, () => t.width, () => t.height], D),
        me($S(), U => {
            U === "visible" ? B() : A()
        }
        ),
        Ht(S),
        ys( () => S(o.active)),
        R2( () => S(o.active)),
        Fo(A),
        Zn(A),
        yn("touchmove", P, {
            target: i
        }),
        () => {
            var U;
            return O("div", {
                ref: n,
                class: zd()
            }, [O("div", {
                ref: i,
                style: g.value,
                class: zd("track", {
                    vertical: t.vertical
                }),
                onTouchstartPassive: R,
                onTouchend: N,
                onTouchcancel: N
            }, [(U = r.default) == null ? void 0 : U.call(r)]), oe()])
        }
    }
});
const z7 = Oe(JZ)
  , [QZ,P9] = Se("tabs");
var eJ = be({
    name: QZ,
    props: {
        count: dn(Number),
        inited: Boolean,
        animated: Boolean,
        duration: dn(Ae),
        swipeable: Boolean,
        lazyRender: Boolean,
        currentIndex: dn(Number)
    },
    emits: ["change"],
    setup(t, {emit: e, slots: r}) {
        const n = ie()
          , i = a => e("change", a)
          , o = () => {
            var a;
            const l = (a = r.default) == null ? void 0 : a.call(r);
            return t.animated || t.swipeable ? O(z7, {
                ref: n,
                loop: !1,
                class: P9("track"),
                duration: +t.duration * 1e3,
                touchable: t.swipeable,
                lazyRender: t.lazyRender,
                showIndicators: !1,
                onChange: i
            }, {
                default: () => [l]
            }) : l
        }
          , s = a => {
            const l = n.value;
            l && l.state.active !== a && l.swipeTo(a, {
                immediate: !t.inited
            })
        }
        ;
        return me( () => t.currentIndex, s),
        Ht( () => {
            s(t.currentIndex)
        }
        ),
        Kt({
            swipeRef: n
        }),
        () => O("div", {
            class: P9("content", {
                animated: t.animated || t.swipeable
            })
        }, [o()])
    }
});
const [j7,jd] = Se("tabs")
  , tJ = {
    type: Ie("line"),
    color: String,
    border: Boolean,
    sticky: Boolean,
    shrink: Boolean,
    active: ze(0),
    duration: ze(.3),
    animated: Boolean,
    ellipsis: Ee,
    swipeable: Boolean,
    scrollspy: Boolean,
    offsetTop: ze(0),
    background: String,
    lazyRender: Ee,
    showHeader: Ee,
    lineWidth: Ae,
    lineHeight: Ae,
    beforeChange: Function,
    swipeThreshold: ze(5),
    titleActiveColor: String,
    titleInactiveColor: String
}
  , W7 = Symbol(j7);
var rJ = be({
    name: j7,
    props: tJ,
    emits: ["change", "scroll", "rendered", "clickTab", "update:active"],
    setup(t, {emit: e, slots: r}) {
        let n, i, o, s, a;
        const l = ie()
          , c = ie()
          , u = ie()
          , f = ie()
          , d = N2()
          , h = nd(l)
          , [x,y] = U7()
          , {children: m, linkChildren: E} = zi(W7)
          , g = It({
            inited: !1,
            position: "",
            lineStyle: {},
            currentIndex: -1
        })
          , p = ae( () => m.length > +t.swipeThreshold || !t.ellipsis || t.shrink)
          , v = ae( () => ({
            borderColor: t.color,
            background: t.background
        }))
          , _ = (H, Q) => {
            var G;
            return (G = H.name) != null ? G : Q
        }
          , b = ae( () => {
            const H = m[g.currentIndex];
            if (H)
                return _(H, g.currentIndex)
        }
        )
          , C = ae( () => k2(t.offsetTop))
          , w = ae( () => t.sticky ? C.value + n : 0)
          , T = H => {
            const Q = c.value
              , G = x.value;
            if (!p.value || !Q || !G || !G[g.currentIndex])
                return;
            const re = G[g.currentIndex].$el
              , te = re.offsetLeft - (Q.offsetWidth - re.offsetWidth) / 2;
            s && s(),
            s = VZ(Q, te, H ? 0 : +t.duration)
        }
          , A = () => {
            const H = g.inited;
            Xe( () => {
                const Q = x.value;
                if (!Q || !Q[g.currentIndex] || t.type !== "line" || Jc(l.value))
                    return;
                const G = Q[g.currentIndex].$el
                  , {lineWidth: re, lineHeight: te} = t
                  , he = G.offsetLeft + G.offsetWidth / 2
                  , xe = {
                    width: rt(re),
                    backgroundColor: t.color,
                    transform: `translateX(${he}px) translateX(-50%)`
                };
                if (H && (xe.transitionDuration = `${t.duration}s`),
                Lt(te)) {
                    const ve = rt(te);
                    xe.height = ve,
                    xe.borderRadius = ve
                }
                g.lineStyle = xe
            }
            )
        }
          , B = H => {
            const Q = H < g.currentIndex ? -1 : 1;
            for (; H >= 0 && H < m.length; ) {
                if (!m[H].disabled)
                    return H;
                H += Q
            }
        }
          , S = (H, Q) => {
            const G = B(H);
            if (!Lt(G))
                return;
            const re = m[G]
              , te = _(re, G)
              , he = g.currentIndex !== null;
            g.currentIndex !== G && (g.currentIndex = G,
            Q || T(),
            A()),
            te !== t.active && (e("update:active", te),
            he && e("change", te, re.title)),
            o && !t.scrollspy && O2(Math.ceil(p9(l.value) - C.value))
        }
          , D = (H, Q) => {
            const G = m.findIndex( (re, te) => _(re, te) === H);
            S(G === -1 ? 0 : G, Q)
        }
          , F = (H=!1) => {
            if (t.scrollspy) {
                const Q = m[g.currentIndex].$el;
                if (Q && h.value) {
                    const G = p9(Q, h.value) - w.value;
                    i = !0,
                    a && a(),
                    a = zZ(h.value, G, H ? 0 : +t.duration, () => {
                        i = !1
                    }
                    )
                }
            }
        }
          , R = (H, Q, G) => {
            const {title: re, disabled: te} = m[Q]
              , he = _(m[Q], Q);
            te || (Su(t.beforeChange, {
                args: [he],
                done: () => {
                    S(Q),
                    F()
                }
            }),
            P7(H)),
            e("clickTab", {
                name: he,
                title: re,
                event: G,
                disabled: te
            })
        }
          , P = H => {
            o = H.isFixed,
            e("scroll", H)
        }
          , N = H => {
            Xe( () => {
                D(H),
                F(!0)
            }
            )
        }
          , j = () => {
            for (let H = 0; H < m.length; H++) {
                const {top: Q} = Cr(m[H].$el);
                if (Q > w.value)
                    return H === 0 ? 0 : H - 1
            }
            return m.length - 1
        }
          , K = () => {
            if (t.scrollspy && !i) {
                const H = j();
                S(H)
            }
        }
          , oe = () => {
            if (t.type === "line" && m.length)
                return O("div", {
                    class: jd("line"),
                    style: g.lineStyle
                }, null)
        }
          , U = () => {
            var H, Q, G;
            const {type: re, border: te, sticky: he} = t
              , xe = [O("div", {
                ref: he ? void 0 : u,
                class: [jd("wrap"), {
                    [A7]: re === "line" && te
                }]
            }, [O("div", {
                ref: c,
                role: "tablist",
                class: jd("nav", [re, {
                    shrink: t.shrink,
                    complete: p.value
                }]),
                style: v.value,
                "aria-orientation": "horizontal"
            }, [(H = r["nav-left"]) == null ? void 0 : H.call(r), m.map(ve => ve.renderTitle(R)), oe(), (Q = r["nav-right"]) == null ? void 0 : Q.call(r)])]), (G = r["nav-bottom"]) == null ? void 0 : G.call(r)];
            return he ? O("div", {
                ref: u
            }, [xe]) : xe
        }
          , $ = () => {
            A(),
            Xe( () => {
                var H, Q;
                T(!0),
                (Q = (H = f.value) == null ? void 0 : H.swipeRef.value) == null || Q.resize()
            }
            )
        }
        ;
        me( () => [t.color, t.duration, t.lineWidth, t.lineHeight], A),
        me(ts, $),
        me( () => t.active, H => {
            H !== b.value && D(H)
        }
        ),
        me( () => m.length, () => {
            g.inited && (D(t.active),
            A(),
            Xe( () => {
                T(!0)
            }
            ))
        }
        );
        const V = () => {
            D(t.active, !0),
            Xe( () => {
                g.inited = !0,
                u.value && (n = Cr(u.value).height),
                T(!0)
            }
            )
        }
          , W = (H, Q) => e("rendered", H, Q);
        return Kt({
            resize: $,
            scrollTo: N
        }),
        ys(A),
        R2(A),
        Bu(V),
        G7(l, A),
        yn("scroll", K, {
            target: h,
            passive: !0
        }),
        E({
            id: d,
            props: t,
            setLine: A,
            scrollable: p,
            onRendered: W,
            currentName: b,
            setTitleRefs: y,
            scrollIntoView: T
        }),
        () => O("div", {
            ref: l,
            class: jd([t.type])
        }, [t.showHeader ? t.sticky ? O(qZ, {
            container: l.value,
            offsetTop: C.value,
            onScroll: P
        }, {
            default: () => [U()]
        }) : U() : null, O(eJ, {
            ref: f,
            count: m.length,
            inited: g.inited,
            animated: t.animated,
            duration: t.duration,
            swipeable: t.swipeable,
            lazyRender: t.lazyRender,
            currentIndex: g.currentIndex,
            onChange: S
        }, {
            default: () => {
                var H;
                return [(H = r.default) == null ? void 0 : H.call(r)]
            }
        })])
    }
});
const nJ = Symbol()
  , Y7 = Symbol()
  , X7 = () => dr(Y7, null)
  , iJ = t => {
    const e = X7();
    xi(nJ, t),
    xi(Y7, ae( () => (e == null || e.value) && t.value))
}
  , [oJ,I9] = Se("tab")
  , sJ = be({
    name: oJ,
    props: {
        id: String,
        dot: Boolean,
        type: String,
        color: String,
        title: String,
        badge: Ae,
        shrink: Boolean,
        isActive: Boolean,
        disabled: Boolean,
        controls: String,
        scrollable: Boolean,
        activeColor: String,
        inactiveColor: String,
        showZeroBadge: Ee
    },
    setup(t, {slots: e}) {
        const r = ae( () => {
            const i = {}
              , {type: o, color: s, disabled: a, isActive: l, activeColor: c, inactiveColor: u} = t;
            s && o === "card" && (i.borderColor = s,
            a || (l ? i.backgroundColor = s : i.color = s));
            const d = l ? c : u;
            return d && (i.color = d),
            i
        }
        )
          , n = () => {
            const i = O("span", {
                class: I9("text", {
                    ellipsis: !t.scrollable
                })
            }, [e.title ? e.title() : t.title]);
            return t.dot || Lt(t.badge) && t.badge !== "" ? O(Jp, {
                dot: t.dot,
                content: t.badge,
                showZero: t.showZeroBadge
            }, {
                default: () => [i]
            }) : i
        }
        ;
        return () => O("div", {
            id: t.id,
            role: "tab",
            class: [I9([t.type, {
                grow: t.scrollable && !t.shrink,
                shrink: t.shrink,
                active: t.isActive,
                disabled: t.disabled
            }])],
            style: r.value,
            tabindex: t.disabled ? void 0 : t.isActive ? 0 : -1,
            "aria-selected": t.isActive,
            "aria-disabled": t.disabled || void 0,
            "aria-controls": t.controls,
            "data-allow-mismatch": "attribute"
        }, [n()])
    }
})
  , [aJ,lJ] = Se("swipe-item");
var cJ = be({
    name: aJ,
    setup(t, {slots: e}) {
        let r;
        const n = It({
            offset: 0,
            inited: !1,
            mounted: !1
        })
          , {parent: i, index: o} = Jn(V7);
        if (!i) {
            console.error("[Vant] <SwipeItem> must be a child component of <Swipe>.");
            return
        }
        const s = ae( () => {
            const c = {}
              , {vertical: u} = i.props;
            return i.size.value && (c[u ? "height" : "width"] = `${i.size.value}px`),
            n.offset && (c.transform = `translate${u ? "Y" : "X"}(${n.offset}px)`),
            c
        }
        )
          , a = ae( () => {
            const {loop: c, lazyRender: u} = i.props;
            if (!u || r)
                return !0;
            if (!n.mounted)
                return !1;
            const f = i.activeIndicator.value
              , d = i.count.value - 1
              , h = f === 0 && c ? d : f - 1
              , x = f === d && c ? 0 : f + 1;
            return r = o.value === f || o.value === h || o.value === x,
            r
        }
        )
          , l = c => {
            n.offset = c
        }
        ;
        return Ht( () => {
            Xe( () => {
                n.mounted = !0
            }
            )
        }
        ),
        Kt({
            setOffset: l
        }),
        () => {
            var c;
            return O("div", {
                class: lJ(),
                style: s.value
            }, [a.value ? (c = e.default) == null ? void 0 : c.call(e) : null])
        }
    }
});
const K7 = Oe(cJ)
  , [uJ,xg] = Se("tab")
  , fJ = We({}, Tu, {
    dot: Boolean,
    name: Ae,
    badge: Ae,
    title: String,
    disabled: Boolean,
    titleClass: hr,
    titleStyle: [String, Object],
    showZeroBadge: Ee
});
var dJ = be({
    name: uJ,
    props: fJ,
    setup(t, {slots: e}) {
        const r = N2()
          , n = ie(!1)
          , i = Ot()
          , {parent: o, index: s} = Jn(W7);
        if (!o) {
            console.error("[Vant] <Tab> must be a child component of <Tabs>.");
            return
        }
        const a = () => {
            var x;
            return (x = t.name) != null ? x : s.value
        }
          , l = () => {
            n.value = !0,
            o.props.lazyRender && Xe( () => {
                o.onRendered(a(), t.title)
            }
            )
        }
          , c = ae( () => {
            const x = a() === o.currentName.value;
            return x && !n.value && l(),
            x
        }
        )
          , u = ie("")
          , f = ie("");
        Au( () => {
            const {titleClass: x, titleStyle: y} = t;
            u.value = x ? $7(x) : "",
            f.value = y && typeof y != "string" ? HZ(L7(y)) : y
        }
        );
        const d = x => O(sJ, st({
            key: r,
            id: `${o.id}-${s.value}`,
            ref: o.setTitleRefs(s.value),
            style: f.value,
            class: u.value,
            isActive: c.value,
            controls: r,
            scrollable: o.scrollable.value,
            activeColor: o.props.titleActiveColor,
            inactiveColor: o.props.titleInactiveColor,
            onClick: y => x(i.proxy, s.value, y)
        }, $t(o.props, ["type", "color", "shrink"]), $t(t, ["dot", "badge", "title", "disabled", "showZeroBadge"])), {
            title: e.title
        })
          , h = ie(!c.value);
        return me(c, x => {
            x ? h.value = !1 : Ka( () => {
                h.value = !0
            }
            )
        }
        ),
        me( () => t.title, () => {
            o.setLine(),
            o.scrollIntoView()
        }
        ),
        iJ(c),
        Kt({
            id: r,
            renderTitle: d
        }),
        () => {
            var x;
            const y = `${o.id}-${s.value}`
              , {animated: m, swipeable: E, scrollspy: g, lazyRender: p} = o.props;
            if (!e.default && !m)
                return;
            const v = g || c.value;
            if (m || E)
                return O(K7, {
                    id: r,
                    role: "tabpanel",
                    class: xg("panel-wrapper", {
                        inactive: h.value
                    }),
                    tabindex: c.value ? 0 : -1,
                    "aria-hidden": !c.value,
                    "aria-labelledby": y,
                    "data-allow-mismatch": "attribute"
                }, {
                    default: () => {
                        var C;
                        return [O("div", {
                            class: xg("panel")
                        }, [(C = e.default) == null ? void 0 : C.call(e)])]
                    }
                });
            const b = n.value || g || !p ? (x = e.default) == null ? void 0 : x.call(e) : null;
            return hi(O("div", {
                id: r,
                role: "tabpanel",
                class: xg("panel"),
                tabindex: v ? 0 : -1,
                "aria-labelledby": y,
                "data-allow-mismatch": "attribute"
            }, [b]), [[pi, v]])
        }
    }
});
const k4e = Oe(dJ)
  , R4e = Oe(rJ)
  , [hJ,M4e] = Se("picker-group")
  , xJ = Symbol(hJ);
We({
    tabs: ds(),
    activeTab: ze(0),
    nextStepText: String,
    showToolbar: Ee
}, Qp);
const L2 = We({
    loading: Boolean,
    readonly: Boolean,
    allowHtml: Boolean,
    optionHeight: ze(44),
    showToolbar: Ee,
    swipeDuration: ze(1e3),
    visibleOptionNum: ze(6)
}, Qp)
  , pJ = We({}, L2, {
    columns: ds(),
    modelValue: ds(),
    toolbarPosition: Ie("top"),
    columnsFieldNames: Object
});
var gJ = be({
    name: CZ,
    props: pJ,
    emits: ["confirm", "cancel", "change", "scrollInto", "clickOption", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const n = ie()
          , i = ie(t.modelValue.slice(0))
          , {parent: o} = Jn(xJ)
          , {children: s, linkChildren: a} = zi(R7);
        a();
        const l = ae( () => SZ(t.columnsFieldNames))
          , c = ae( () => k2(t.optionHeight))
          , u = ae( () => AZ(t.columns, l.value))
          , f = ae( () => {
            const {columns: S} = t;
            switch (u.value) {
            case "multiple":
                return S;
            case "cascade":
                return wZ(S, l.value, i);
            default:
                return [S]
            }
        }
        )
          , d = ae( () => f.value.some(S => S.length))
          , h = ae( () => f.value.map( (S, D) => by(S, i.value[D], l.value)))
          , x = ae( () => f.value.map( (S, D) => S.findIndex(F => F[l.value.value] === i.value[D])))
          , y = (S, D) => {
            if (i.value[S] !== D) {
                const F = i.value.slice(0);
                F[S] = D,
                i.value = F
            }
        }
          , m = () => ({
            selectedValues: i.value.slice(0),
            selectedOptions: h.value,
            selectedIndexes: x.value
        })
          , E = (S, D) => {
            y(D, S),
            u.value === "cascade" && i.value.forEach( (F, R) => {
                const P = f.value[R];
                T9(P, F, l.value) || y(R, P.length ? P[0][l.value.value] : void 0)
            }
            ),
            Xe( () => {
                e("change", We({
                    columnIndex: D
                }, m()))
            }
            )
        }
          , g = (S, D) => {
            const F = {
                columnIndex: D,
                currentOption: S
            };
            e("clickOption", We(m(), F)),
            e("scrollInto", F)
        }
          , p = () => {
            s.forEach(D => D.stopMomentum());
            const S = m();
            return Xe( () => {
                const D = m();
                e("confirm", D)
            }
            ),
            S
        }
          , v = () => e("cancel", m())
          , _ = () => f.value.map( (S, D) => O(DZ, {
            value: i.value[D],
            fields: l.value,
            options: S,
            readonly: t.readonly,
            allowHtml: t.allowHtml,
            optionHeight: c.value,
            swipeDuration: t.swipeDuration,
            visibleOptionNum: t.visibleOptionNum,
            onChange: F => E(F, D),
            onClickOption: F => g(F, D),
            onScrollInto: F => {
                e("scrollInto", {
                    currentOption: F,
                    columnIndex: D
                })
            }
        }, {
            option: r.option
        }))
          , b = S => {
            if (d.value) {
                const D = {
                    height: `${c.value}px`
                }
                  , F = {
                    backgroundSize: `100% ${(S - c.value) / 2}px`
                };
                return [O("div", {
                    class: Zo("mask"),
                    style: F
                }, null), O("div", {
                    class: [kq, Zo("frame")],
                    style: D
                }, null)]
            }
        }
          , C = () => {
            const S = c.value * +t.visibleOptionNum
              , D = {
                height: `${S}px`
            };
            return !t.loading && !d.value && r.empty ? r.empty() : O("div", {
                ref: n,
                class: Zo("columns"),
                style: D
            }, [_(), b(S)])
        }
          , w = () => {
            if (t.showToolbar && !o)
                return O(OZ, st($t(t, IZ), {
                    onConfirm: p,
                    onCancel: v
                }), $t(r, PZ))
        }
          , T = S => {
            S.forEach( (D, F) => {
                D.length && !T9(D, i.value[F], l.value) && y(F, O7(D)[l.value.value])
            }
            )
        }
        ;
        me(f, S => T(S), {
            immediate: !0
        });
        let A;
        return me( () => t.modelValue, S => {
            !ta(S, i.value) && !ta(S, A) && (i.value = S.slice(0),
            A = S.slice(0)),
            t.modelValue.length === 0 && T(f.value)
        }
        , {
            deep: !0
        }),
        me(i, S => {
            ta(S, t.modelValue) || (A = S.slice(0),
            e("update:modelValue", A))
        }
        , {
            immediate: !0
        }),
        yn("touchmove", Rr, {
            target: n
        }),
        Kt({
            confirm: p,
            getSelectedOptions: () => h.value
        }),
        () => {
            var S, D;
            return O("div", {
                class: Zo()
            }, [t.toolbarPosition === "top" ? w() : null, t.loading ? O(bs, {
                class: Zo("loading")
            }, null) : null, (S = r["columns-top"]) == null ? void 0 : S.call(r), C(), (D = r["columns-bottom"]) == null ? void 0 : D.call(r), t.toolbarPosition === "bottom" ? w() : null])
        }
    }
});
const mJ = Oe(gJ)
  , [vJ,rc] = Se("cell")
  , e1 = {
    tag: Ie("div"),
    icon: String,
    size: String,
    title: Ae,
    value: Ae,
    label: Ae,
    center: Boolean,
    isLink: Boolean,
    border: Ee,
    iconPrefix: String,
    valueClass: hr,
    labelClass: hr,
    titleClass: hr,
    titleStyle: null,
    arrowDirection: String,
    required: {
        type: [Boolean, String],
        default: null
    },
    clickable: {
        type: Boolean,
        default: null
    }
}
  , yJ = We({}, e1, Tu);
var EJ = be({
    name: vJ,
    props: yJ,
    setup(t, {slots: e}) {
        const r = od()
          , n = () => {
            if (e.label || Lt(t.label))
                return O("div", {
                    class: [rc("label"), t.labelClass]
                }, [e.label ? e.label() : t.label])
        }
          , i = () => {
            var l;
            if (e.title || Lt(t.title)) {
                const c = (l = e.title) == null ? void 0 : l.call(e);
                return Array.isArray(c) && c.length === 0 ? void 0 : O("div", {
                    class: [rc("title"), t.titleClass],
                    style: t.titleStyle
                }, [c || O("span", null, [t.title]), n()])
            }
        }
          , o = () => {
            const l = e.value || e.default;
            if (l || Lt(t.value))
                return O("div", {
                    class: [rc("value"), t.valueClass]
                }, [l ? l() : O("span", null, [t.value])])
        }
          , s = () => {
            if (e.icon)
                return e.icon();
            if (t.icon)
                return O(rr, {
                    name: t.icon,
                    class: rc("left-icon"),
                    classPrefix: t.iconPrefix
                }, null)
        }
          , a = () => {
            if (e["right-icon"])
                return e["right-icon"]();
            if (t.isLink) {
                const l = t.arrowDirection && t.arrowDirection !== "right" ? `arrow-${t.arrowDirection}` : "arrow";
                return O(rr, {
                    name: l,
                    class: rc("right-icon")
                }, null)
            }
        }
        ;
        return () => {
            var l;
            const {tag: c, size: u, center: f, border: d, isLink: h, required: x} = t
              , y = (l = t.clickable) != null ? l : h
              , m = {
                center: f,
                required: !!x,
                clickable: y,
                borderless: !d
            };
            return u && (m[u] = !!u),
            O(c, {
                class: rc(m),
                role: y ? "button" : void 0,
                tabindex: y ? 0 : void 0,
                onClick: r
            }, {
                default: () => {
                    var E;
                    return [s(), i(), o(), a(), (E = e.extra) == null ? void 0 : E.call(e)]
                }
            })
        }
    }
});
const q7 = Oe(EJ)
  , [_J,bJ] = Se("form")
  , CJ = {
    colon: Boolean,
    disabled: Boolean,
    readonly: Boolean,
    required: [Boolean, String],
    showError: Boolean,
    labelWidth: Ae,
    labelAlign: String,
    inputAlign: String,
    scrollToError: Boolean,
    scrollToErrorPosition: String,
    validateFirst: Boolean,
    submitOnEnter: Ee,
    showErrorMessage: Ee,
    errorMessageAlign: String,
    validateTrigger: {
        type: [String, Array],
        default: "onBlur"
    }
};
var AJ = be({
    name: _J,
    props: CJ,
    emits: ["submit", "failed"],
    setup(t, {emit: e, slots: r}) {
        const {children: n, linkChildren: i} = zi(w7)
          , o = m => m ? n.filter(E => m.includes(E.name)) : n
          , s = m => new Promise( (E, g) => {
            const p = [];
            o(m).reduce( (_, b) => _.then( () => {
                if (!p.length)
                    return b.validate().then(C => {
                        C && p.push(C)
                    }
                    )
            }
            ), Promise.resolve()).then( () => {
                p.length ? g(p) : E()
            }
            )
        }
        )
          , a = m => new Promise( (E, g) => {
            const p = o(m);
            Promise.all(p.map(v => v.validate())).then(v => {
                v = v.filter(Boolean),
                v.length ? g(v) : E()
            }
            )
        }
        )
          , l = m => {
            const E = n.find(g => g.name === m);
            return E ? new Promise( (g, p) => {
                E.validate().then(v => {
                    v ? p(v) : g()
                }
                )
            }
            ) : Promise.reject()
        }
          , c = m => typeof m == "string" ? l(m) : t.validateFirst ? s(m) : a(m)
          , u = m => {
            typeof m == "string" && (m = [m]),
            o(m).forEach(g => {
                g.resetValidation()
            }
            )
        }
          , f = () => n.reduce( (m, E) => (m[E.name] = E.getValidationStatus(),
        m), {})
          , d = (m, E) => {
            n.some(g => g.name === m ? (g.$el.scrollIntoView(E),
            !0) : !1)
        }
          , h = () => n.reduce( (m, E) => (E.name !== void 0 && (m[E.name] = E.formValue.value),
        m), {})
          , x = () => {
            const m = h();
            c().then( () => e("submit", m)).catch(E => {
                e("failed", {
                    values: m,
                    errors: E
                });
                const {scrollToError: g, scrollToErrorPosition: p} = t;
                g && E[0].name && d(E[0].name, p ? {
                    block: p
                } : void 0)
            }
            )
        }
          , y = m => {
            Rr(m),
            x()
        }
        ;
        return i({
            props: t
        }),
        Kt({
            submit: x,
            validate: c,
            getValues: h,
            scrollToField: d,
            resetValidation: u,
            getValidationStatus: f
        }),
        () => {
            var m;
            return O("form", {
                class: bJ(),
                onSubmit: y
            }, [(m = r.default) == null ? void 0 : m.call(r)])
        }
    }
});
const N4e = Oe(AJ);
function Z7(t) {
    return Array.isArray(t) ? !t.length : t === 0 ? !1 : !t
}
function wJ(t, e) {
    if (Z7(t)) {
        if (e.required)
            return !1;
        if (e.validateEmpty === !1)
            return !0
    }
    return !(e.pattern && !e.pattern.test(String(t)))
}
function BJ(t, e) {
    return new Promise(r => {
        const n = e.validator(t, e);
        if (P2(n)) {
            n.then(r);
            return
        }
        r(n)
    }
    )
}
function O9(t, e) {
    const {message: r} = e;
    return Zc(r) ? r(t, e) : r || ""
}
function SJ({target: t}) {
    t.composing = !0
}
function k9({target: t}) {
    t.composing && (t.composing = !1,
    t.dispatchEvent(new Event("input")))
}
function TJ(t, e) {
    const r = I2();
    t.style.height = "auto";
    let n = t.scrollHeight;
    if (bo(e)) {
        const {maxHeight: i, minHeight: o} = e;
        i !== void 0 && (n = Math.min(n, i)),
        o !== void 0 && (n = Math.max(n, o))
    }
    n && (t.style.height = `${n}px`,
    O2(r))
}
function DJ(t, e) {
    return t === "number" && (t = "text",
    e ?? (e = "decimal")),
    t === "digit" && (t = "tel",
    e ?? (e = "numeric")),
    {
        type: t,
        inputmode: e
    }
}
function Wd(t) {
    return [...t].length
}
function pg(t, e) {
    return [...t].slice(0, e).join("")
}
const [FJ,ii] = Se("field")
  , PJ = {
    id: String,
    name: String,
    leftIcon: String,
    rightIcon: String,
    autofocus: Boolean,
    clearable: Boolean,
    maxlength: Ae,
    max: Number,
    min: Number,
    formatter: Function,
    clearIcon: Ie("clear"),
    modelValue: ze(""),
    inputAlign: String,
    placeholder: String,
    autocomplete: String,
    autocapitalize: String,
    autocorrect: String,
    errorMessage: String,
    enterkeyhint: String,
    clearTrigger: Ie("focus"),
    formatTrigger: Ie("onChange"),
    spellcheck: {
        type: Boolean,
        default: null
    },
    error: {
        type: Boolean,
        default: null
    },
    disabled: {
        type: Boolean,
        default: null
    },
    readonly: {
        type: Boolean,
        default: null
    },
    inputmode: String
}
  , IJ = We({}, e1, PJ, {
    rows: Ae,
    type: Ie("text"),
    rules: Array,
    autosize: [Boolean, Object],
    labelWidth: Ae,
    labelClass: hr,
    labelAlign: String,
    showWordLimit: Boolean,
    errorMessageAlign: String,
    colon: {
        type: Boolean,
        default: null
    }
});
var OJ = be({
    name: FJ,
    props: IJ,
    emits: ["blur", "focus", "clear", "keypress", "clickInput", "endValidate", "startValidate", "clickLeftIcon", "clickRightIcon", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const n = N2()
          , i = It({
            status: "unvalidated",
            focused: !1,
            validateMessage: ""
        })
          , o = ie()
          , s = ie()
          , a = ie()
          , {parent: l} = Jn(w7)
          , c = () => {
            var G;
            return String((G = t.modelValue) != null ? G : "")
        }
          , u = G => {
            if (Lt(t[G]))
                return t[G];
            if (l && Lt(l.props[G]))
                return l.props[G]
        }
          , f = ae( () => {
            const G = u("readonly");
            if (t.clearable && !G) {
                const re = c() !== ""
                  , te = t.clearTrigger === "always" || t.clearTrigger === "focus" && i.focused;
                return re && te
            }
            return !1
        }
        )
          , d = ae( () => a.value && r.input ? a.value() : t.modelValue)
          , h = ae( () => {
            var G;
            const re = u("required");
            return re === "auto" ? (G = t.rules) == null ? void 0 : G.some(te => te.required) : re
        }
        )
          , x = G => G.reduce( (re, te) => re.then( () => {
            if (i.status === "failed")
                return;
            let {value: he} = d;
            if (te.formatter && (he = te.formatter(he, te)),
            !wJ(he, te)) {
                i.status = "failed",
                i.validateMessage = O9(he, te);
                return
            }
            if (te.validator)
                return Z7(he) && te.validateEmpty === !1 ? void 0 : BJ(he, te).then(xe => {
                    xe && typeof xe == "string" ? (i.status = "failed",
                    i.validateMessage = xe) : xe === !1 && (i.status = "failed",
                    i.validateMessage = O9(he, te))
                }
                )
        }
        ), Promise.resolve())
          , y = () => {
            i.status = "unvalidated",
            i.validateMessage = ""
        }
          , m = () => e("endValidate", {
            status: i.status,
            message: i.validateMessage
        })
          , E = (G=t.rules) => new Promise(re => {
            y(),
            G ? (e("startValidate"),
            x(G).then( () => {
                i.status === "failed" ? (re({
                    name: t.name,
                    message: i.validateMessage
                }),
                m()) : (i.status = "passed",
                re(),
                m())
            }
            )) : re()
        }
        )
          , g = G => {
            if (l && t.rules) {
                const {validateTrigger: re} = l.props
                  , te = Tx(re).includes(G)
                  , he = t.rules.filter(xe => xe.trigger ? Tx(xe.trigger).includes(G) : te);
                he.length && E(he)
            }
        }
          , p = G => {
            var re;
            const {maxlength: te} = t;
            if (Lt(te) && Wd(G) > +te) {
                const he = c();
                if (he && Wd(he) === +te)
                    return he;
                const xe = (re = o.value) == null ? void 0 : re.selectionEnd;
                if (i.focused && xe) {
                    const ve = [...G]
                      , I = ve.length - +te;
                    return ve.splice(xe - I, I),
                    ve.join("")
                }
                return pg(G, +te)
            }
            return G
        }
          , v = (G, re="onChange") => {
            var te, he;
            const xe = G;
            G = p(G);
            const ve = xe.length - G.length;
            if (t.type === "number" || t.type === "digit") {
                const z = t.type === "number";
                if (G = yy(G, z, z),
                re === "onBlur" && G !== "" && (t.min !== void 0 || t.max !== void 0)) {
                    const q = Gr(+G, (te = t.min) != null ? te : -1 / 0, (he = t.max) != null ? he : 1 / 0);
                    +G !== q && (G = q.toString())
                }
            }
            let I = 0;
            if (t.formatter && re === t.formatTrigger) {
                const {formatter: z, maxlength: q} = t;
                if (G = z(G),
                Lt(q) && Wd(G) > +q && (G = pg(G, +q)),
                o.value && i.focused) {
                    const {selectionEnd: ce} = o.value
                      , fe = pg(xe, ce);
                    I = z(fe).length - fe.length
                }
            }
            if (o.value && o.value.value !== G)
                if (i.focused) {
                    let {selectionStart: z, selectionEnd: q} = o.value;
                    if (o.value.value = G,
                    Lt(z) && Lt(q)) {
                        const ce = G.length;
                        ve ? (z -= ve,
                        q -= ve) : I && (z += I,
                        q += I),
                        o.value.setSelectionRange(Math.min(z, ce), Math.min(q, ce))
                    }
                } else
                    o.value.value = G;
            G !== t.modelValue && e("update:modelValue", G)
        }
          , _ = G => {
            G.target.composing || v(G.target.value)
        }
          , b = () => {
            var G;
            return (G = o.value) == null ? void 0 : G.blur()
        }
          , C = () => {
            var G;
            return (G = o.value) == null ? void 0 : G.focus()
        }
          , w = () => {
            const G = o.value;
            t.type === "textarea" && t.autosize && G && TJ(G, t.autosize)
        }
          , T = G => {
            i.focused = !0,
            e("focus", G),
            Xe(w),
            u("readonly") && b()
        }
          , A = G => {
            i.focused = !1,
            v(c(), "onBlur"),
            e("blur", G),
            !u("readonly") && (g("onBlur"),
            Xe(w),
            m7())
        }
          , B = G => e("clickInput", G)
          , S = G => e("clickLeftIcon", G)
          , D = G => e("clickRightIcon", G)
          , F = G => {
            Rr(G),
            e("update:modelValue", ""),
            e("clear", G)
        }
          , R = ae( () => {
            if (typeof t.error == "boolean")
                return t.error;
            if (l && l.props.showError && i.status === "failed")
                return !0
        }
        )
          , P = ae( () => {
            const G = u("labelWidth")
              , re = u("labelAlign");
            if (G && re !== "top")
                return {
                    width: rt(G)
                }
        }
        )
          , N = G => {
            G.keyCode === 13 && (!(l && l.props.submitOnEnter) && t.type !== "textarea" && Rr(G),
            t.type === "search" && b()),
            e("keypress", G)
        }
          , j = () => t.id || `${n}-input`
          , K = () => i.status
          , oe = () => {
            const G = ii("control", [u("inputAlign"), {
                error: R.value,
                custom: !!r.input,
                "min-height": t.type === "textarea" && !t.autosize
            }]);
            if (r.input)
                return O("div", {
                    class: G,
                    onClick: B
                }, [r.input()]);
            const re = {
                id: j(),
                ref: o,
                name: t.name,
                rows: t.rows !== void 0 ? +t.rows : void 0,
                class: G,
                disabled: u("disabled"),
                readonly: u("readonly"),
                autofocus: t.autofocus,
                placeholder: t.placeholder,
                autocomplete: t.autocomplete,
                autocapitalize: t.autocapitalize,
                autocorrect: t.autocorrect,
                enterkeyhint: t.enterkeyhint,
                spellcheck: t.spellcheck,
                "aria-labelledby": t.label ? `${n}-label` : void 0,
                "data-allow-mismatch": "attribute",
                onBlur: A,
                onFocus: T,
                onInput: _,
                onClick: B,
                onChange: k9,
                onKeypress: N,
                onCompositionend: k9,
                onCompositionstart: SJ
            };
            return t.type === "textarea" ? O("textarea", st(re, {
                inputmode: t.inputmode
            }), null) : O("input", st(DJ(t.type, t.inputmode), re), null)
        }
          , U = () => {
            const G = r["left-icon"];
            if (t.leftIcon || G)
                return O("div", {
                    class: ii("left-icon"),
                    onClick: S
                }, [G ? G() : O(rr, {
                    name: t.leftIcon,
                    classPrefix: t.iconPrefix
                }, null)])
        }
          , $ = () => {
            const G = r["right-icon"];
            if (t.rightIcon || G)
                return O("div", {
                    class: ii("right-icon"),
                    onClick: D
                }, [G ? G() : O(rr, {
                    name: t.rightIcon,
                    classPrefix: t.iconPrefix
                }, null)])
        }
          , V = () => {
            if (t.showWordLimit && t.maxlength) {
                const G = Wd(c());
                return O("div", {
                    class: ii("word-limit")
                }, [O("span", {
                    class: ii("word-num")
                }, [G]), Rp("/"), t.maxlength])
            }
        }
          , W = () => {
            if (l && l.props.showErrorMessage === !1)
                return;
            const G = t.errorMessage || i.validateMessage;
            if (G) {
                const re = r["error-message"]
                  , te = u("errorMessageAlign");
                return O("div", {
                    class: ii("error-message", te)
                }, [re ? re({
                    message: G
                }) : G])
            }
        }
          , H = () => {
            const G = u("labelWidth")
              , re = u("labelAlign")
              , te = u("colon") ? ":" : "";
            if (r.label)
                return [r.label(), te];
            if (t.label)
                return O("label", {
                    id: `${n}-label`,
                    for: r.input ? void 0 : j(),
                    "data-allow-mismatch": "attribute",
                    onClick: he => {
                        Rr(he),
                        C()
                    }
                    ,
                    style: re === "top" && G ? {
                        width: rt(G)
                    } : void 0
                }, [t.label + te])
        }
          , Q = () => [O("div", {
            class: ii("body")
        }, [oe(), f.value && O(rr, {
            ref: s,
            name: t.clearIcon,
            class: ii("clear")
        }, null), $(), r.button && O("div", {
            class: ii("button")
        }, [r.button()])]), V(), W()];
        return Kt({
            blur: b,
            focus: C,
            validate: E,
            formValue: d,
            resetValidation: y,
            getValidationStatus: K
        }),
        xi(t2, {
            customValue: a,
            resetValidation: y,
            validateWithTrigger: g
        }),
        me( () => t.modelValue, () => {
            v(c()),
            y(),
            g("onChange"),
            Xe(w)
        }
        ),
        Ht( () => {
            v(c(), t.formatTrigger),
            Xe(w)
        }
        ),
        yn("touchstart", F, {
            target: ae( () => {
                var G;
                return (G = s.value) == null ? void 0 : G.$el
            }
            )
        }),
        () => {
            const G = u("disabled")
              , re = u("labelAlign")
              , te = U()
              , he = () => {
                const xe = H();
                return re === "top" ? [te, xe].filter(Boolean) : xe || []
            }
            ;
            return O(q7, {
                size: t.size,
                class: ii({
                    error: R.value,
                    disabled: G,
                    [`label-${re}`]: re
                }),
                center: t.center,
                border: t.border,
                isLink: t.isLink,
                clickable: t.clickable,
                titleStyle: P.value,
                valueClass: ii("value"),
                titleClass: [ii("label", [re, {
                    required: h.value
                }]), t.labelClass],
                arrowDirection: t.arrowDirection
            }, {
                icon: te && re !== "top" ? () => te : null,
                title: he,
                value: Q,
                extra: r.extra
            })
        }
    }
});
const L4e = Oe(OJ);
let Yu = 0;
function kJ(t) {
    t ? (Yu || document.body.classList.add("van-toast--unclickable"),
    Yu++) : Yu && (Yu--,
    Yu || document.body.classList.remove("van-toast--unclickable"))
}
const [RJ,nc] = Se("toast")
  , MJ = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay", "zIndex"]
  , NJ = {
    icon: String,
    show: Boolean,
    type: Ie("text"),
    overlay: Boolean,
    message: Ae,
    iconSize: Ae,
    duration: Zp(2e3),
    position: Ie("middle"),
    teleport: [String, Object],
    wordBreak: String,
    className: hr,
    iconPrefix: String,
    transition: Ie("van-fade"),
    loadingType: String,
    forbidClick: Boolean,
    overlayClass: hr,
    overlayStyle: Object,
    closeOnClick: Boolean,
    closeOnClickOverlay: Boolean,
    zIndex: Ae
};
var J7 = be({
    name: RJ,
    props: NJ,
    emits: ["update:show"],
    setup(t, {emit: e, slots: r}) {
        let n, i = !1;
        const o = () => {
            const f = t.show && t.forbidClick;
            i !== f && (i = f,
            kJ(i))
        }
          , s = f => e("update:show", f)
          , a = () => {
            t.closeOnClick && s(!1)
        }
          , l = () => clearTimeout(n)
          , c = () => {
            const {icon: f, type: d, iconSize: h, iconPrefix: x, loadingType: y} = t;
            if (f || d === "success" || d === "fail")
                return O(rr, {
                    name: f || d,
                    size: h,
                    class: nc("icon"),
                    classPrefix: x
                }, null);
            if (d === "loading")
                return O(bs, {
                    class: nc("loading"),
                    size: h,
                    type: y
                }, null)
        }
          , u = () => {
            const {type: f, message: d} = t;
            if (r.message)
                return O("div", {
                    class: nc("text")
                }, [r.message()]);
            if (Lt(d) && d !== "")
                return f === "html" ? O("div", {
                    key: 0,
                    class: nc("text"),
                    innerHTML: String(d)
                }, null) : O("div", {
                    class: nc("text")
                }, [d])
        }
        ;
        return me( () => [t.show, t.forbidClick], o),
        me( () => [t.show, t.type, t.message, t.duration], () => {
            l(),
            t.show && t.duration > 0 && (n = setTimeout( () => {
                s(!1)
            }
            , t.duration))
        }
        ),
        Ht(o),
        _s(o),
        () => O(Wl, st({
            class: [nc([t.position, t.wordBreak === "normal" ? "break-normal" : t.wordBreak, {
                [t.type]: !t.icon
            }]), t.className],
            lockScroll: !1,
            onClick: a,
            onClosed: l,
            "onUpdate:show": s
        }, $t(t, MJ)), {
            default: () => [c(), u()]
        })
    }
});
function t1() {
    const t = It({
        show: !1
    })
      , e = i => {
        t.show = i
    }
      , r = i => {
        We(t, i, {
            transitionAppear: !0
        }),
        e(!0)
    }
      , n = () => e(!1);
    return Kt({
        open: r,
        close: n,
        toggle: e
    }),
    {
        open: r,
        close: n,
        state: t,
        toggle: e
    }
}
function r1(t) {
    const e = dS(t)
      , r = document.createElement("div");
    return document.body.appendChild(r),
    {
        instance: e.mount(r),
        unmount() {
            e.unmount(),
            document.body.removeChild(r)
        }
    }
}
const LJ = {
    icon: "",
    type: "text",
    message: "",
    className: "",
    overlay: !1,
    onClose: void 0,
    onOpened: void 0,
    duration: 2e3,
    teleport: "body",
    iconSize: void 0,
    iconPrefix: void 0,
    position: "middle",
    transition: "van-fade",
    forbidClick: !1,
    loadingType: void 0,
    overlayClass: "",
    overlayStyle: void 0,
    closeOnClick: !1,
    closeOnClickOverlay: !1
};
let zs = []
  , $J = !1
  , Cy = We({}, LJ);
const Q7 = new Map;
function eD(t) {
    return bo(t) ? t : {
        message: t
    }
}
function UJ() {
    const {instance: t, unmount: e} = r1({
        setup() {
            const r = ie("")
              , {open: n, state: i, close: o, toggle: s} = t1()
              , a = () => {}
              , l = () => O(J7, st(i, {
                onClosed: a,
                "onUpdate:show": s
            }), null);
            return me(r, c => {
                i.message = c
            }
            ),
            Ot().render = l,
            {
                open: n,
                close: o,
                message: r
            }
        }
    });
    return t
}
function GJ() {
    if (!zs.length || $J) {
        const t = UJ();
        zs.push(t)
    }
    return zs[zs.length - 1]
}
function Ay(t={}) {
    if (!_o)
        return {};
    const e = GJ()
      , r = eD(t);
    return e.open(We({}, Cy, Q7.get(r.type || Cy.type), r)),
    e
}
const $2 = t => e => Ay(We({
    type: t
}, eD(e)))
  , $4e = $2("loading")
  , U4e = $2("success")
  , G4e = $2("fail")
  , H4e = t => {
    zs.length && (t ? (zs.forEach(e => {
        e.close()
    }
    ),
    zs = []) : zs[0].close())
}
;
function V4e(t, e) {
    typeof t == "string" ? Q7.set(t, e) : We(Cy, t)
}
const z4e = Oe(J7)
  , [HJ,gg] = Se("switch")
  , VJ = {
    size: Ae,
    loading: Boolean,
    disabled: Boolean,
    modelValue: hr,
    activeColor: String,
    inactiveColor: String,
    activeValue: {
        type: hr,
        default: !0
    },
    inactiveValue: {
        type: hr,
        default: !1
    }
};
var zJ = be({
    name: HJ,
    props: VJ,
    emits: ["change", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const n = () => t.modelValue === t.activeValue
          , i = () => {
            if (!t.disabled && !t.loading) {
                const s = n() ? t.inactiveValue : t.activeValue;
                e("update:modelValue", s),
                e("change", s)
            }
        }
          , o = () => {
            if (t.loading) {
                const s = n() ? t.activeColor : t.inactiveColor;
                return O(bs, {
                    class: gg("loading"),
                    color: s
                }, null)
            }
            if (r.node)
                return r.node()
        }
        ;
        return Vl( () => t.modelValue),
        () => {
            var s;
            const {size: a, loading: l, disabled: c, activeColor: u, inactiveColor: f} = t
              , d = n()
              , h = {
                fontSize: rt(a),
                backgroundColor: d ? u : f
            };
            return O("div", {
                role: "switch",
                class: gg({
                    on: d,
                    loading: l,
                    disabled: c
                }),
                style: h,
                tabindex: c ? void 0 : 0,
                "aria-checked": d,
                onClick: i
            }, [O("div", {
                class: gg("node")
            }, [o()]), (s = r.background) == null ? void 0 : s.call(r)])
        }
    }
});
const j4e = Oe(zJ)
  , [tD,jJ] = Se("radio-group")
  , WJ = {
    shape: String,
    disabled: Boolean,
    iconSize: Ae,
    direction: String,
    modelValue: hr,
    checkedColor: String
}
  , rD = Symbol(tD);
var YJ = be({
    name: tD,
    props: WJ,
    emits: ["change", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const {linkChildren: n} = zi(rD)
          , i = o => e("update:modelValue", o);
        return me( () => t.modelValue, o => e("change", o)),
        n({
            props: t,
            updateValue: i
        }),
        Vl( () => t.modelValue),
        () => {
            var o;
            return O("div", {
                class: jJ([t.direction]),
                role: "radiogroup"
            }, [(o = r.default) == null ? void 0 : o.call(r)])
        }
    }
});
const W4e = Oe(YJ)
  , [XJ,Y4e] = Se("checkbox-group")
  , KJ = Symbol(XJ)
  , U2 = {
    name: hr,
    disabled: Boolean,
    iconSize: Ae,
    modelValue: hr,
    checkedColor: String,
    labelPosition: String,
    labelDisabled: Boolean
};
var nD = be({
    props: We({}, U2, {
        bem: dn(Function),
        role: String,
        shape: String,
        parent: Object,
        checked: Boolean,
        bindGroup: Ee,
        indeterminate: {
            type: Boolean,
            default: null
        }
    }),
    emits: ["click", "toggle"],
    setup(t, {emit: e, slots: r}) {
        const n = ie()
          , i = d => {
            if (t.parent && t.bindGroup)
                return t.parent.props[d]
        }
          , o = ae( () => {
            if (t.parent && t.bindGroup) {
                const d = i("disabled") || t.disabled;
                if (t.role === "checkbox") {
                    const h = i("modelValue").length
                      , x = i("max")
                      , y = x && h >= +x;
                    return d || y && !t.checked
                }
                return d
            }
            return t.disabled
        }
        )
          , s = ae( () => i("direction"))
          , a = ae( () => {
            const d = t.checkedColor || i("checkedColor");
            if (d && (t.checked || t.indeterminate) && !o.value)
                return {
                    borderColor: d,
                    backgroundColor: d
                }
        }
        )
          , l = ae( () => t.shape || i("shape") || "round")
          , c = d => {
            const {target: h} = d
              , x = n.value
              , y = x === h || (x == null ? void 0 : x.contains(h));
            !o.value && (y || !t.labelDisabled) && e("toggle"),
            e("click", d)
        }
          , u = () => {
            var d, h;
            const {bem: x, checked: y, indeterminate: m} = t
              , E = t.iconSize || i("iconSize");
            return O("div", {
                ref: n,
                class: x("icon", [l.value, {
                    disabled: o.value,
                    checked: y,
                    indeterminate: m
                }]),
                style: l.value !== "dot" ? {
                    fontSize: rt(E)
                } : {
                    width: rt(E),
                    height: rt(E),
                    borderColor: (d = a.value) == null ? void 0 : d.borderColor
                }
            }, [r.icon ? r.icon({
                checked: y,
                disabled: o.value
            }) : l.value !== "dot" ? O(rr, {
                name: m ? "minus" : "success",
                style: a.value
            }, null) : O("div", {
                class: x("icon--dot__icon"),
                style: {
                    backgroundColor: (h = a.value) == null ? void 0 : h.backgroundColor
                }
            }, null)])
        }
          , f = () => {
            const {checked: d} = t;
            if (r.default)
                return O("span", {
                    class: t.bem("label", [t.labelPosition, {
                        disabled: o.value
                    }])
                }, [r.default({
                    checked: d,
                    disabled: o.value
                })])
        }
        ;
        return () => {
            const d = t.labelPosition === "left" ? [f(), u()] : [u(), f()];
            return O("div", {
                role: t.role,
                class: t.bem([{
                    disabled: o.value,
                    "label-disabled": t.labelDisabled
                }, s.value]),
                tabindex: o.value ? void 0 : 0,
                "aria-checked": t.checked,
                onClick: c
            }, [d])
        }
    }
});
const qJ = We({}, U2, {
    shape: String
})
  , [ZJ,JJ] = Se("radio");
var QJ = be({
    name: ZJ,
    props: qJ,
    emits: ["update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const {parent: n} = Jn(rD)
          , i = () => (n ? n.props.modelValue : t.modelValue) === t.name
          , o = () => {
            n ? n.updateValue(t.name) : e("update:modelValue", t.name)
        }
        ;
        return () => O(nD, st({
            bem: JJ,
            role: "radio",
            parent: n,
            checked: i(),
            onToggle: o
        }, t), $t(r, ["default", "icon"]))
    }
});
const X4e = Oe(QJ)
  , [eQ,tQ] = Se("checkbox")
  , rQ = We({}, U2, {
    shape: String,
    bindGroup: Ee,
    indeterminate: {
        type: Boolean,
        default: null
    }
});
var nQ = be({
    name: eQ,
    props: rQ,
    emits: ["change", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const {parent: n} = Jn(KJ)
          , i = a => {
            const {name: l} = t
              , {max: c, modelValue: u} = n.props
              , f = u.slice();
            if (a)
                !(c && f.length >= +c) && !f.includes(l) && (f.push(l),
                t.bindGroup && n.updateValue(f));
            else {
                const d = f.indexOf(l);
                d !== -1 && (f.splice(d, 1),
                t.bindGroup && n.updateValue(f))
            }
        }
          , o = ae( () => n && t.bindGroup ? n.props.modelValue.indexOf(t.name) !== -1 : !!t.modelValue)
          , s = (a=!o.value) => {
            n && t.bindGroup ? i(a) : e("update:modelValue", a),
            t.indeterminate !== null && e("change", a)
        }
        ;
        return me( () => t.modelValue, a => {
            t.indeterminate === null && e("change", a)
        }
        ),
        Kt({
            toggle: s,
            props: t,
            checked: o
        }),
        Vl( () => t.modelValue),
        () => O(nD, st({
            bem: tQ,
            role: "checkbox",
            parent: n,
            checked: o.value,
            onToggle: s
        }, t), $t(r, ["default", "icon"]))
    }
});
const K4e = Oe(nQ)
  , [iQ,Qt,rs] = Se("calendar")
  , oQ = t => rs("monthTitle", t.getFullYear(), t.getMonth() + 1);
function qa(t, e) {
    const r = t.getFullYear()
      , n = e.getFullYear();
    if (r === n) {
        const i = t.getMonth()
          , o = e.getMonth();
        return i === o ? 0 : i > o ? 1 : -1
    }
    return r > n ? 1 : -1
}
function Cn(t, e) {
    const r = qa(t, e);
    if (r === 0) {
        const n = t.getDate()
          , i = e.getDate();
        return n === i ? 0 : n > i ? 1 : -1
    }
    return r
}
const Qc = t => new Date(t)
  , R9 = t => Array.isArray(t) ? t.map(Qc) : Qc(t);
function G2(t, e) {
    const r = Qc(t);
    return r.setDate(r.getDate() + e),
    r
}
function H2(t, e) {
    const r = Qc(t);
    return r.setMonth(r.getMonth() + e),
    r.getDate() !== t.getDate() && r.setDate(0),
    r
}
function iD(t, e) {
    const r = Qc(t);
    return r.setFullYear(r.getFullYear() + e),
    r.getDate() !== t.getDate() && r.setDate(0),
    r
}
const wy = t => G2(t, -1)
  , By = t => G2(t, 1)
  , M9 = t => H2(t, -1)
  , N9 = t => H2(t, 1)
  , L9 = t => iD(t, -1)
  , $9 = t => iD(t, 1)
  , Yd = () => {
    const t = new Date;
    return t.setHours(0, 0, 0, 0),
    t
}
;
function sQ(t) {
    const e = t[0].getTime();
    return (t[1].getTime() - e) / (1e3 * 60 * 60 * 24) + 1
}
function aQ(t, e=0) {
    const r = new Date(t.getFullYear(),t.getMonth() + 1,0)
      , n = e + t.getDate() - 1
      , i = e + r.getDate() - 1;
    return Math.floor(n / 7) === Math.floor(i / 7)
}
const lQ = We({}, L2, {
    modelValue: ds(),
    filter: Function,
    formatter: {
        type: Function,
        default: (t, e) => e
    }
})
  , cQ = Object.keys(L2);
function uQ(t, e) {
    if (t < 0)
        return [];
    const r = Array(t);
    let n = -1;
    for (; ++n < t; )
        r[n] = e(n);
    return r
}
const oD = (t, e) => 32 - new Date(t,e - 1,32).getDate()
  , mg = (t, e, r, n, i, o) => {
    const s = uQ(e - t + 1, a => {
        const l = Wa(t + a);
        return n(r, {
            text: l,
            value: l
        })
    }
    );
    return i ? i(r, s, o) : s
}
  , fQ = (t, e) => t.map( (r, n) => {
    const i = e[n];
    if (i.length) {
        const o = +i[0].value
          , s = +i[i.length - 1].value;
        return Wa(Gr(+r, o, s))
    }
    return r
}
)
  , [dQ] = Se("calendar-day");
var hQ = be({
    name: dQ,
    props: {
        item: dn(Object),
        color: String,
        index: Number,
        offset: Zp(0),
        rowHeight: String
    },
    emits: ["click", "clickDisabledDate"],
    setup(t, {emit: e, slots: r}) {
        const n = ae( () => {
            const {item: c, index: u, color: f, offset: d, rowHeight: h} = t
              , x = {
                height: h
            };
            if (c.type === "placeholder")
                return x.width = "100%",
                x;
            if (u === 0 && (x.marginLeft = `${100 * d / 7}%`),
            f)
                switch (c.type) {
                case "end":
                case "start":
                case "start-end":
                case "multiple-middle":
                case "multiple-selected":
                    x.background = f;
                    break;
                case "middle":
                    x.color = f;
                    break
                }
            return c.date && aQ(c.date, d) && (x.marginBottom = 0),
            x
        }
        )
          , i = () => {
            t.item.type !== "disabled" ? e("click", t.item) : e("clickDisabledDate", t.item)
        }
          , o = () => {
            const {topInfo: c} = t.item;
            if (c || r["top-info"])
                return O("div", {
                    class: Qt("top-info")
                }, [r["top-info"] ? r["top-info"](t.item) : c])
        }
          , s = () => {
            const {bottomInfo: c} = t.item;
            if (c || r["bottom-info"])
                return O("div", {
                    class: Qt("bottom-info")
                }, [r["bottom-info"] ? r["bottom-info"](t.item) : c])
        }
          , a = () => r.text ? r.text(t.item) : t.item.text
          , l = () => {
            const {item: c, color: u, rowHeight: f} = t
              , {type: d} = c
              , h = [o(), a(), s()];
            return d === "selected" ? O("div", {
                class: Qt("selected-day"),
                style: {
                    width: f,
                    height: f,
                    background: u
                }
            }, [h]) : h
        }
        ;
        return () => {
            const {type: c, className: u} = t.item;
            return c === "placeholder" ? O("div", {
                class: Qt("day"),
                style: n.value
            }, null) : O("div", {
                role: "gridcell",
                style: n.value,
                class: [Qt("day", c), u],
                tabindex: c === "disabled" ? void 0 : -1,
                onClick: i
            }, [l()])
        }
    }
});
const [xQ] = Se("calendar-month")
  , pQ = {
    date: dn(Date),
    type: String,
    color: String,
    minDate: Date,
    maxDate: Date,
    showMark: Boolean,
    rowHeight: Ae,
    formatter: Function,
    lazyRender: Boolean,
    currentDate: [Date, Array],
    allowSameDay: Boolean,
    showSubtitle: Boolean,
    showMonthTitle: Boolean,
    firstDayOfWeek: Number
};
var gQ = be({
    name: xQ,
    props: pQ,
    emits: ["click", "clickDisabledDate"],
    setup(t, {emit: e, slots: r}) {
        const [n,i] = IS()
          , o = ie()
          , s = ie()
          , a = T7(s)
          , l = ae( () => oQ(t.date))
          , c = ae( () => rt(t.rowHeight))
          , u = ae( () => {
            const A = t.date.getDate()
              , S = (t.date.getDay() - A % 7 + 8) % 7;
            return t.firstDayOfWeek ? (S + 7 - t.firstDayOfWeek) % 7 : S
        }
        )
          , f = ae( () => oD(t.date.getFullYear(), t.date.getMonth() + 1))
          , d = ae( () => n.value || !t.lazyRender)
          , h = () => l.value
          , x = A => {
            const B = S => t.currentDate.some(D => Cn(D, S) === 0);
            if (B(A)) {
                const S = wy(A)
                  , D = By(A)
                  , F = B(S)
                  , R = B(D);
                return F && R ? "multiple-middle" : F ? "end" : R ? "start" : "multiple-selected"
            }
            return ""
        }
          , y = A => {
            const [B,S] = t.currentDate;
            if (!B)
                return "";
            const D = Cn(A, B);
            if (!S)
                return D === 0 ? "start" : "";
            const F = Cn(A, S);
            return t.allowSameDay && D === 0 && F === 0 ? "start-end" : D === 0 ? "start" : F === 0 ? "end" : D > 0 && F < 0 ? "middle" : ""
        }
          , m = A => {
            const {type: B, minDate: S, maxDate: D, currentDate: F} = t;
            if (S && Cn(A, S) < 0 || D && Cn(A, D) > 0)
                return "disabled";
            if (F === null)
                return "";
            if (Array.isArray(F)) {
                if (B === "multiple")
                    return x(A);
                if (B === "range")
                    return y(A)
            } else if (B === "single")
                return Cn(A, F) === 0 ? "selected" : "";
            return ""
        }
          , E = A => {
            if (t.type === "range") {
                if (A === "start" || A === "end")
                    return rs(A);
                if (A === "start-end")
                    return `${rs("start")}/${rs("end")}`
            }
        }
          , g = () => {
            if (t.showMonthTitle)
                return O("div", {
                    class: Qt("month-title")
                }, [r["month-title"] ? r["month-title"]({
                    date: t.date,
                    text: l.value
                }) : l.value])
        }
          , p = () => {
            if (t.showMark && d.value)
                return O("div", {
                    class: Qt("month-mark")
                }, [t.date.getMonth() + 1])
        }
          , v = ae( () => {
            const A = Math.ceil((f.value + u.value) / 7);
            return Array(A).fill({
                type: "placeholder"
            })
        }
        )
          , _ = ae( () => {
            const A = []
              , B = t.date.getFullYear()
              , S = t.date.getMonth();
            for (let D = 1; D <= f.value; D++) {
                const F = new Date(B,S,D)
                  , R = m(F);
                let P = {
                    date: F,
                    type: R,
                    text: D,
                    bottomInfo: E(R)
                };
                t.formatter && (P = t.formatter(P)),
                A.push(P)
            }
            return A
        }
        )
          , b = ae( () => _.value.filter(A => A.type === "disabled"))
          , C = (A, B) => {
            if (o.value) {
                const S = Cr(o.value)
                  , D = v.value.length
                  , R = (Math.ceil((B.getDate() + u.value) / 7) - 1) * S.height / D;
                Dx(A, S.top + R + A.scrollTop - Cr(A).top)
            }
        }
          , w = (A, B) => O(hQ, {
            item: A,
            index: B,
            color: t.color,
            offset: u.value,
            rowHeight: c.value,
            onClick: S => e("click", S),
            onClickDisabledDate: S => e("clickDisabledDate", S)
        }, $t(r, ["top-info", "bottom-info", "text"]))
          , T = () => O("div", {
            ref: o,
            role: "grid",
            class: Qt("days")
        }, [p(), (d.value ? _ : v).value.map(w)]);
        return Kt({
            getTitle: h,
            getHeight: () => a.value,
            setVisible: i,
            scrollToDate: C,
            disabledDays: b
        }),
        () => O("div", {
            class: Qt("month"),
            ref: s
        }, [g(), T()])
    }
});
const [mQ] = Se("calendar-header");
var vQ = be({
    name: mQ,
    props: {
        date: Date,
        minDate: Date,
        maxDate: Date,
        title: String,
        subtitle: String,
        showTitle: Boolean,
        showSubtitle: Boolean,
        firstDayOfWeek: Number,
        switchMode: Ie("none")
    },
    emits: ["clickSubtitle", "panelChange"],
    setup(t, {slots: e, emit: r}) {
        const n = ae( () => t.date && t.minDate && qa(M9(t.date), t.minDate) < 0)
          , i = ae( () => t.date && t.minDate && qa(L9(t.date), t.minDate) < 0)
          , o = ae( () => t.date && t.maxDate && qa(N9(t.date), t.maxDate) > 0)
          , s = ae( () => t.date && t.maxDate && qa($9(t.date), t.maxDate) > 0)
          , a = () => {
            if (t.showTitle) {
                const h = t.title || rs("title")
                  , x = e.title ? e.title() : h;
                return O("div", {
                    class: Qt("header-title")
                }, [x])
            }
        }
          , l = h => r("clickSubtitle", h)
          , c = h => r("panelChange", h)
          , u = h => {
            const x = t.switchMode === "year-month"
              , y = e[h ? "next-month" : "prev-month"]
              , m = e[h ? "next-year" : "prev-year"]
              , E = h ? o.value : n.value
              , g = h ? s.value : i.value
              , p = h ? "arrow" : "arrow-left"
              , v = h ? "arrow-double-right" : "arrow-double-left"
              , _ = () => c((h ? N9 : M9)(t.date))
              , b = () => c((h ? $9 : L9)(t.date))
              , C = O("view", {
                class: Qt("header-action", {
                    disabled: E
                }),
                onClick: E ? void 0 : _
            }, [y ? y({
                disabled: E
            }) : O(rr, {
                class: {
                    [hs]: !E
                },
                name: p
            }, null)])
              , w = x && O("view", {
                class: Qt("header-action", {
                    disabled: g
                }),
                onClick: g ? void 0 : b
            }, [m ? m({
                disabled: g
            }) : O(rr, {
                class: {
                    [hs]: !g
                },
                name: v
            }, null)]);
            return h ? [C, w] : [w, C]
        }
          , f = () => {
            if (t.showSubtitle) {
                const h = e.subtitle ? e.subtitle({
                    date: t.date,
                    text: t.subtitle
                }) : t.subtitle
                  , x = t.switchMode !== "none";
                return O("div", {
                    class: Qt("header-subtitle", {
                        "with-switch": x
                    }),
                    onClick: l
                }, [x ? [u(), O("div", {
                    class: Qt("header-subtitle-text")
                }, [h]), u(!0)] : h])
            }
        }
          , d = () => {
            const {firstDayOfWeek: h} = t
              , x = rs("weekdays")
              , y = [...x.slice(h, 7), ...x.slice(0, h)];
            return O("div", {
                class: Qt("weekdays")
            }, [y.map(m => O("span", {
                class: Qt("weekday")
            }, [m]))])
        }
        ;
        return () => O("div", {
            class: Qt("header")
        }, [a(), f(), d()])
    }
});
const yQ = {
    show: Boolean,
    type: Ie("single"),
    switchMode: Ie("none"),
    title: String,
    color: String,
    round: Ee,
    readonly: Boolean,
    poppable: Ee,
    maxRange: ze(null),
    position: Ie("bottom"),
    teleport: [String, Object],
    showMark: Ee,
    showTitle: Ee,
    formatter: Function,
    rowHeight: Ae,
    confirmText: String,
    rangePrompt: String,
    lazyRender: Ee,
    showConfirm: Ee,
    defaultDate: [Date, Array],
    allowSameDay: Boolean,
    showSubtitle: Ee,
    closeOnPopstate: Ee,
    showRangePrompt: Ee,
    confirmDisabledText: String,
    closeOnClickOverlay: Ee,
    safeAreaInsetTop: Boolean,
    safeAreaInsetBottom: Ee,
    minDate: {
        type: Date,
        validator: xf
    },
    maxDate: {
        type: Date,
        validator: xf
    },
    firstDayOfWeek: {
        type: Ae,
        default: 0,
        validator: t => t >= 0 && t <= 6
    }
};
var EQ = be({
    name: iQ,
    props: yQ,
    emits: ["select", "confirm", "unselect", "monthShow", "overRange", "update:show", "clickSubtitle", "clickDisabledDate", "clickOverlay", "panelChange"],
    setup(t, {emit: e, slots: r}) {
        const n = ae( () => t.switchMode !== "none")
          , i = ae( () => !t.minDate && !n.value ? Yd() : t.minDate)
          , o = ae( () => !t.maxDate && !n.value ? H2(Yd(), 6) : t.maxDate)
          , s = ($, V=i.value, W=o.value) => V && Cn($, V) === -1 ? V : W && Cn($, W) === 1 ? W : $
          , a = ($=t.defaultDate) => {
            const {type: V, allowSameDay: W} = t;
            if ($ === null)
                return $;
            const H = Yd();
            if (V === "range") {
                Array.isArray($) || ($ = []),
                $.length === 1 && Cn($[0], H) === 1 && ($ = []);
                const Q = i.value
                  , G = o.value
                  , re = s($[0] || H, Q, G ? W ? G : wy(G) : void 0)
                  , te = s($[1] || (W ? H : By(H)), Q ? W ? Q : By(Q) : void 0);
                return [re, te]
            }
            return V === "multiple" ? Array.isArray($) ? $.map(Q => s(Q)) : [s(H)] : ((!$ || Array.isArray($)) && ($ = H),
            s($))
        }
          , l = () => {
            const $ = Array.isArray(f.value) ? f.value[0] : f.value;
            return $ || s(Yd())
        }
        ;
        let c;
        const u = ie()
          , f = ie(a())
          , d = ie(l())
          , h = ie()
          , [x,y] = U7()
          , m = ae( () => t.firstDayOfWeek ? +t.firstDayOfWeek % 7 : 0)
          , E = ae( () => {
            const $ = [];
            if (!i.value || !o.value)
                return $;
            const V = new Date(i.value);
            V.setDate(1);
            do
                $.push(new Date(V)),
                V.setMonth(V.getMonth() + 1);
            while (qa(V, o.value) !== 1);
            return $
        }
        )
          , g = ae( () => {
            if (f.value) {
                if (t.type === "range")
                    return !f.value[0] || !f.value[1];
                if (t.type === "multiple")
                    return !f.value.length
            }
            return !f.value
        }
        )
          , p = () => f.value
          , v = () => {
            const $ = id(u.value)
              , V = $ + c
              , W = E.value.map( (te, he) => x.value[he].getHeight())
              , H = W.reduce( (te, he) => te + he, 0);
            if (V > H && $ > 0)
                return;
            let Q = 0, G;
            const re = [-1, -1];
            for (let te = 0; te < E.value.length; te++) {
                const he = x.value[te];
                Q <= V && Q + W[te] >= $ && (re[1] = te,
                G || (G = he,
                re[0] = te),
                x.value[te].showed || (x.value[te].showed = !0,
                e("monthShow", {
                    date: he.date,
                    title: he.getTitle()
                }))),
                Q += W[te]
            }
            E.value.forEach( (te, he) => {
                const xe = he >= re[0] - 1 && he <= re[1] + 1;
                x.value[he].setVisible(xe)
            }
            ),
            G && (h.value = G)
        }
          , _ = $ => {
            n.value ? d.value = $ : pn( () => {
                E.value.some( (V, W) => qa(V, $) === 0 ? (u.value && x.value[W].scrollToDate(u.value, $),
                !0) : !1),
                v()
            }
            )
        }
          , b = () => {
            if (!(t.poppable && !t.show))
                if (f.value) {
                    const $ = t.type === "single" ? f.value : f.value[0];
                    xf($) && _($)
                } else
                    n.value || pn(v)
        }
          , C = () => {
            t.poppable && !t.show || (n.value || pn( () => {
                c = Math.floor(Cr(u).height)
            }
            ),
            b())
        }
          , w = ($=a()) => {
            f.value = $,
            b()
        }
          , T = $ => {
            const {maxRange: V, rangePrompt: W, showRangePrompt: H} = t;
            return V && sQ($) > +V ? (H && Ay(W || rs("rangePrompt", V)),
            e("overRange"),
            !1) : !0
        }
          , A = $ => {
            d.value = $,
            e("panelChange", {
                date: $
            })
        }
          , B = () => {
            var $;
            return e("confirm", ($ = f.value) != null ? $ : R9(f.value))
        }
          , S = ($, V) => {
            const W = H => {
                f.value = H,
                e("select", R9(H))
            }
            ;
            if (V && t.type === "range" && !T($)) {
                W([$[0], G2($[0], +t.maxRange - 1)]);
                return
            }
            W($),
            V && !t.showConfirm && B()
        }
          , D = ($, V, W) => {
            var H;
            return (H = $.find(Q => Cn(V, Q.date) === -1 && Cn(Q.date, W) === -1)) == null ? void 0 : H.date
        }
          , F = ae( () => x.value.reduce( ($, V) => {
            var W, H;
            return $.push(...(H = (W = V.disabledDays) == null ? void 0 : W.value) != null ? H : []),
            $
        }
        , []))
          , R = $ => {
            if (t.readonly || !$.date)
                return;
            const {date: V} = $
              , {type: W} = t;
            if (W === "range") {
                if (!f.value) {
                    S([V]);
                    return
                }
                const [H,Q] = f.value;
                if (H && !Q) {
                    const G = Cn(V, H);
                    if (G === 1) {
                        const re = D(F.value, H, V);
                        if (re) {
                            const te = wy(re);
                            Cn(H, te) === -1 ? S([H, te]) : S([V])
                        } else
                            S([H, V], !0)
                    } else
                        G === -1 ? S([V]) : t.allowSameDay && S([V, V], !0)
                } else
                    S([V])
            } else if (W === "multiple") {
                if (!f.value) {
                    S([V]);
                    return
                }
                const H = f.value
                  , Q = H.findIndex(G => Cn(G, V) === 0);
                if (Q !== -1) {
                    const [G] = H.splice(Q, 1);
                    e("unselect", Qc(G))
                } else
                    t.maxRange && H.length >= +t.maxRange ? Ay(t.rangePrompt || rs("rangePrompt", t.maxRange)) : S([...H, V])
            } else
                S(V, !0)
        }
          , P = $ => e("clickOverlay", $)
          , N = $ => e("update:show", $)
          , j = ($, V) => {
            const W = V !== 0 || !t.showSubtitle;
            return O(gQ, st({
                ref: n.value ? h : y(V),
                date: $,
                currentDate: f.value,
                showMonthTitle: W,
                firstDayOfWeek: m.value,
                lazyRender: n.value ? !1 : t.lazyRender,
                maxDate: o.value,
                minDate: i.value
            }, $t(t, ["type", "color", "showMark", "formatter", "rowHeight", "showSubtitle", "allowSameDay"]), {
                onClick: R,
                onClickDisabledDate: H => e("clickDisabledDate", H)
            }), $t(r, ["top-info", "bottom-info", "month-title", "text"]))
        }
          , K = () => {
            if (r.footer)
                return r.footer();
            if (t.showConfirm) {
                const $ = r["confirm-text"]
                  , V = g.value
                  , W = V ? t.confirmDisabledText : t.confirmText;
                return O(Fx, {
                    round: !0,
                    block: !0,
                    type: "primary",
                    color: t.color,
                    class: Qt("confirm"),
                    disabled: V,
                    nativeType: "button",
                    onClick: B
                }, {
                    default: () => [$ ? $({
                        disabled: V
                    }) : W || rs("confirm")]
                })
            }
        }
          , oe = () => O("div", {
            class: [Qt("footer"), {
                "van-safe-area-bottom": t.safeAreaInsetBottom
            }]
        }, [K()])
          , U = () => {
            var $, V;
            return O("div", {
                class: Qt()
            }, [O(vQ, {
                date: ($ = h.value) == null ? void 0 : $.date,
                maxDate: o.value,
                minDate: i.value,
                title: t.title,
                subtitle: (V = h.value) == null ? void 0 : V.getTitle(),
                showTitle: t.showTitle,
                showSubtitle: t.showSubtitle,
                switchMode: t.switchMode,
                firstDayOfWeek: m.value,
                onClickSubtitle: W => e("clickSubtitle", W),
                onPanelChange: A
            }, $t(r, ["title", "subtitle", "prev-month", "prev-year", "next-month", "next-year"])), O("div", {
                ref: u,
                class: Qt("body"),
                onScroll: n.value ? void 0 : v
            }, [n.value ? j(d.value, 0) : E.value.map(j)]), oe()])
        }
        ;
        return me( () => t.show, C),
        me( () => [t.type, t.minDate, t.maxDate, t.switchMode], () => w(a(f.value))),
        me( () => t.defaultDate, $ => {
            w($)
        }
        ),
        Kt({
            reset: w,
            scrollToDate: _,
            getSelectedDate: p
        }),
        Bu(C),
        () => t.poppable ? O(Wl, {
            show: t.show,
            class: Qt("popup"),
            round: t.round,
            position: t.position,
            closeable: t.showTitle || t.showSubtitle,
            teleport: t.teleport,
            closeOnPopstate: t.closeOnPopstate,
            safeAreaInsetTop: t.safeAreaInsetTop,
            closeOnClickOverlay: t.closeOnClickOverlay,
            onClickOverlay: P,
            "onUpdate:show": N
        }, {
            default: U
        }) : U()
    }
});
const q4e = Oe(EQ)
  , [_Q,ic] = Se("image")
  , bQ = {
    src: String,
    alt: String,
    fit: String,
    position: String,
    round: Boolean,
    block: Boolean,
    width: Ae,
    height: Ae,
    radius: Ae,
    lazyLoad: Boolean,
    iconSize: Ae,
    showError: Ee,
    errorIcon: Ie("photo-fail"),
    iconPrefix: String,
    showLoading: Ee,
    loadingIcon: Ie("photo"),
    crossorigin: String,
    referrerpolicy: String,
    decoding: String
};
var CQ = be({
    name: _Q,
    props: bQ,
    emits: ["load", "error"],
    setup(t, {emit: e, slots: r}) {
        const n = ie(!1)
          , i = ie(!0)
          , o = ie()
          , {$Lazyload: s} = Ot().proxy
          , a = ae( () => {
            const m = {
                width: rt(t.width),
                height: rt(t.height)
            };
            return Lt(t.radius) && (m.overflow = "hidden",
            m.borderRadius = rt(t.radius)),
            m
        }
        );
        me( () => t.src, () => {
            n.value = !1,
            i.value = !0
        }
        );
        const l = m => {
            i.value && (i.value = !1,
            e("load", m))
        }
          , c = () => {
            const m = new Event("load");
            Object.defineProperty(m, "target", {
                value: o.value,
                enumerable: !0
            }),
            l(m)
        }
          , u = m => {
            n.value = !0,
            i.value = !1,
            e("error", m)
        }
          , f = (m, E, g) => g ? g() : O(rr, {
            name: m,
            size: t.iconSize,
            class: E,
            classPrefix: t.iconPrefix
        }, null)
          , d = () => {
            if (i.value && t.showLoading)
                return O("div", {
                    class: ic("loading")
                }, [f(t.loadingIcon, ic("loading-icon"), r.loading)]);
            if (n.value && t.showError)
                return O("div", {
                    class: ic("error")
                }, [f(t.errorIcon, ic("error-icon"), r.error)])
        }
          , h = () => {
            if (n.value || !t.src)
                return;
            const m = {
                alt: t.alt,
                class: ic("img"),
                decoding: t.decoding,
                style: {
                    objectFit: t.fit,
                    objectPosition: t.position
                },
                crossorigin: t.crossorigin,
                referrerpolicy: t.referrerpolicy
            };
            return t.lazyLoad ? hi(O("img", st({
                ref: o
            }, m), null), [[pB("lazy"), t.src]]) : O("img", st({
                ref: o,
                src: t.src,
                onLoad: l,
                onError: u
            }, m), null)
        }
          , x = ({el: m}) => {
            const E = () => {
                m === o.value && i.value && c()
            }
            ;
            o.value ? E() : Xe(E)
        }
          , y = ({el: m}) => {
            m === o.value && !n.value && u()
        }
        ;
        return s && _o && (s.$on("loaded", x),
        s.$on("error", y),
        Zn( () => {
            s.$off("loaded", x),
            s.$off("error", y)
        }
        )),
        Ht( () => {
            Xe( () => {
                var m;
                (m = o.value) != null && m.complete && !t.lazyLoad && c()
            }
            )
        }
        ),
        () => {
            var m;
            return O("div", {
                class: ic({
                    round: t.round,
                    block: t.block
                }),
                style: a.value
            }, [h(), d(), (m = r.default) == null ? void 0 : m.call(r)])
        }
    }
});
const sD = Oe(CQ)
  , [AQ,Xd] = Se("circle");
let wQ = 0;
const U9 = t => Math.min(Math.max(+t, 0), 100);
function BQ(t, e) {
    const r = t ? 1 : 0;
    return `M ${e / 2} ${e / 2} m 0, -500 a 500, 500 0 1, ${r} 0, 1000 a 500, 500 0 1, ${r} 0, -1000`
}
const SQ = {
    text: String,
    size: Ae,
    fill: Ie("none"),
    rate: ze(100),
    speed: ze(0),
    color: [String, Object],
    clockwise: Ee,
    layerColor: String,
    currentRate: Zp(0),
    strokeWidth: ze(40),
    strokeLinecap: String,
    startPosition: Ie("top")
};
var TQ = be({
    name: AQ,
    props: SQ,
    emits: ["update:currentRate"],
    setup(t, {emit: e, slots: r}) {
        const n = `van-circle-${wQ++}`
          , i = ae( () => +t.strokeWidth + 1e3)
          , o = ae( () => BQ(t.clockwise, i.value))
          , s = ae( () => {
            const d = {
                top: 0,
                right: 90,
                bottom: 180,
                left: 270
            }[t.startPosition];
            if (d)
                return {
                    transform: `rotate(${d}deg)`
                }
        }
        );
        me( () => t.rate, f => {
            let d;
            const h = Date.now()
              , x = t.currentRate
              , y = U9(f)
              , m = Math.abs((x - y) * 1e3 / +t.speed)
              , E = () => {
                const g = Date.now()
                  , v = Math.min((g - h) / m, 1) * (y - x) + x;
                e("update:currentRate", U9(parseFloat(v.toFixed(1)))),
                (y > x ? v < y : v > y) && (d = pn(E))
            }
            ;
            t.speed ? (d && rd(d),
            d = pn(E)) : e("update:currentRate", y)
        }
        , {
            immediate: !0
        });
        const a = () => {
            const {strokeWidth: d, currentRate: h, strokeLinecap: x} = t
              , y = 3140 * h / 100
              , m = bo(t.color) ? `url(#${n})` : t.color
              , E = {
                stroke: m,
                strokeWidth: `${+d + 1}px`,
                strokeLinecap: x,
                strokeDasharray: `${y}px 3140px`
            };
            return O("path", {
                d: o.value,
                style: E,
                class: Xd("hover"),
                stroke: m
            }, null)
        }
          , l = () => {
            const f = {
                fill: t.fill,
                stroke: t.layerColor,
                strokeWidth: `${t.strokeWidth}px`
            };
            return O("path", {
                class: Xd("layer"),
                style: f,
                d: o.value
            }, null)
        }
          , c = () => {
            const {color: f} = t;
            if (!bo(f))
                return;
            const d = Object.keys(f).sort( (h, x) => parseFloat(h) - parseFloat(x)).map( (h, x) => O("stop", {
                key: x,
                offset: h,
                "stop-color": f[h]
            }, null));
            return O("defs", null, [O("linearGradient", {
                id: n,
                x1: "100%",
                y1: "0%",
                x2: "0%",
                y2: "0%"
            }, [d])])
        }
          , u = () => {
            if (r.default)
                return r.default();
            if (t.text)
                return O("div", {
                    class: Xd("text")
                }, [t.text])
        }
        ;
        return () => O("div", {
            class: Xd(),
            style: zl(t.size)
        }, [O("svg", {
            viewBox: `0 0 ${i.value} ${i.value}`,
            style: s.value
        }, [c(), l(), a()]), u()])
    }
});
const Z4e = Oe(TQ)
  , [aD,DQ] = Se("row")
  , lD = Symbol(aD)
  , FQ = {
    tag: Ie("div"),
    wrap: Ee,
    align: String,
    gutter: {
        type: [String, Number, Array],
        default: 0
    },
    justify: String
};
var PQ = be({
    name: aD,
    props: FQ,
    setup(t, {slots: e}) {
        const {children: r, linkChildren: n} = zi(lD)
          , i = ae( () => {
            const a = [[]];
            let l = 0;
            return r.forEach( (c, u) => {
                l += Number(c.span),
                l > 24 ? (a.push([u]),
                l -= 24) : a[a.length - 1].push(u)
            }
            ),
            a
        }
        )
          , o = ae( () => {
            let a = 0;
            Array.isArray(t.gutter) ? a = Number(t.gutter[0]) || 0 : a = Number(t.gutter);
            const l = [];
            return a && i.value.forEach(c => {
                const u = a * (c.length - 1) / c.length;
                c.forEach( (f, d) => {
                    if (d === 0)
                        l.push({
                            right: u
                        });
                    else {
                        const h = a - l[f - 1].right
                          , x = u - h;
                        l.push({
                            left: h,
                            right: x
                        })
                    }
                }
                )
            }
            ),
            l
        }
        )
          , s = ae( () => {
            const {gutter: a} = t
              , l = [];
            if (Array.isArray(a) && a.length > 1) {
                const c = Number(a[1]) || 0;
                if (c <= 0)
                    return l;
                i.value.forEach( (u, f) => {
                    f !== i.value.length - 1 && u.forEach( () => {
                        l.push({
                            bottom: c
                        })
                    }
                    )
                }
                )
            }
            return l
        }
        );
        return n({
            spaces: o,
            verticalSpaces: s
        }),
        () => {
            const {tag: a, wrap: l, align: c, justify: u} = t;
            return O(a, {
                class: DQ({
                    [`align-${c}`]: c,
                    [`justify-${u}`]: u,
                    nowrap: !l
                })
            }, {
                default: () => {
                    var f;
                    return [(f = e.default) == null ? void 0 : f.call(e)]
                }
            })
        }
    }
});
const [IQ,OQ] = Se("col")
  , kQ = {
    tag: Ie("div"),
    span: ze(0),
    offset: Ae
};
var RQ = be({
    name: IQ,
    props: kQ,
    setup(t, {slots: e}) {
        const {parent: r, index: n} = Jn(lD)
          , i = ae( () => {
            if (!r)
                return;
            const {spaces: o, verticalSpaces: s} = r;
            let a = {};
            if (o && o.value && o.value[n.value]) {
                const {left: c, right: u} = o.value[n.value];
                a = {
                    paddingLeft: c ? `${c}px` : null,
                    paddingRight: u ? `${u}px` : null
                }
            }
            const {bottom: l} = s.value[n.value] || {};
            return We(a, {
                marginBottom: l ? `${l}px` : null
            })
        }
        );
        return () => {
            const {tag: o, span: s, offset: a} = t;
            return O(o, {
                style: i.value,
                class: OQ({
                    [s]: s,
                    [`offset-${a}`]: a
                })
            }, {
                default: () => {
                    var l;
                    return [(l = e.default) == null ? void 0 : l.call(e)]
                }
            })
        }
    }
});
const J4e = Oe(RQ)
  , [cD,MQ] = Se("collapse")
  , uD = Symbol(cD)
  , NQ = {
    border: Ee,
    accordion: Boolean,
    modelValue: {
        type: [String, Number, Array],
        default: ""
    }
};
function LQ(t, e) {
    return e && Array.isArray(t) ? (console.error('[Vant] Collapse: "v-model" should not be Array in accordion mode'),
    !1) : !e && !Array.isArray(t) ? (console.error('[Vant] Collapse: "v-model" should be Array in non-accordion mode'),
    !1) : !0
}
var $Q = be({
    name: cD,
    props: NQ,
    emits: ["change", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const {linkChildren: n, children: i} = zi(uD)
          , o = c => {
            e("change", c),
            e("update:modelValue", c)
        }
          , s = (c, u) => {
            const {accordion: f, modelValue: d} = t;
            o(f ? c === d ? "" : c : u ? d.concat(c) : d.filter(h => h !== c))
        }
          , a = (c={}) => {
            if (t.accordion)
                return;
            typeof c == "boolean" && (c = {
                expanded: c
            });
            const {expanded: u, skipDisabled: f} = c
              , h = i.filter(x => x.disabled && f ? x.expanded.value : u ?? !x.expanded.value).map(x => x.itemName.value);
            o(h)
        }
          , l = c => {
            const {accordion: u, modelValue: f} = t;
            return LQ(f, u) ? u ? f === c : f.includes(c) : !1
        }
        ;
        return Kt({
            toggleAll: a
        }),
        n({
            toggle: s,
            isExpanded: l
        }),
        () => {
            var c;
            return O("div", {
                class: [MQ(), {
                    [A7]: t.border
                }]
            }, [(c = r.default) == null ? void 0 : c.call(r)])
        }
    }
});
const Q4e = Oe($Q)
  , [UQ,Kd] = Se("collapse-item")
  , GQ = ["icon", "title", "value", "label", "right-icon"]
  , HQ = We({}, e1, {
    name: Ae,
    isLink: Ee,
    disabled: Boolean,
    readonly: Boolean,
    lazyRender: Ee
});
var VQ = be({
    name: UQ,
    props: HQ,
    setup(t, {slots: e}) {
        const r = ie()
          , n = ie()
          , {parent: i, index: o} = Jn(uD);
        if (!i) {
            console.error("[Vant] <CollapseItem> must be a child component of <Collapse>.");
            return
        }
        const s = ae( () => {
            var y;
            return (y = t.name) != null ? y : o.value
        }
        )
          , a = ae( () => i.isExpanded(s.value))
          , l = ie(a.value)
          , c = M2( () => l.value || !t.lazyRender)
          , u = () => {
            a.value ? r.value && (r.value.style.height = "") : l.value = !1
        }
        ;
        me(a, (y, m) => {
            if (m === null)
                return;
            y && (l.value = !0),
            (y ? Xe : pn)( () => {
                if (!n.value || !r.value)
                    return;
                const {offsetHeight: g} = n.value;
                if (g) {
                    const p = `${g}px`;
                    r.value.style.height = y ? "0" : p,
                    Ka( () => {
                        r.value && (r.value.style.height = y ? p : "0")
                    }
                    )
                } else
                    u()
            }
            )
        }
        );
        const f = (y=!a.value) => {
            i.toggle(s.value, y)
        }
          , d = () => {
            !t.disabled && !t.readonly && f()
        }
          , h = () => {
            const {border: y, disabled: m, readonly: E} = t
              , g = $t(t, Object.keys(e1));
            return E && (g.isLink = !1),
            (m || E) && (g.clickable = !1),
            O(q7, st({
                role: "button",
                class: Kd("title", {
                    disabled: m,
                    expanded: a.value,
                    borderless: !y
                }),
                "aria-expanded": String(a.value),
                onClick: d
            }, g), $t(e, GQ))
        }
          , x = c( () => {
            var y;
            return hi(O("div", {
                ref: r,
                class: Kd("wrapper"),
                onTransitionend: u
            }, [O("div", {
                ref: n,
                class: Kd("content")
            }, [(y = e.default) == null ? void 0 : y.call(e)])]), [[pi, l.value]])
        }
        );
        return Kt({
            toggle: f,
            expanded: a,
            itemName: s
        }),
        () => O("div", {
            class: [Kd({
                border: o.value && t.border
            })]
        }, [h(), x()])
    }
});
const e6e = Oe(VQ);
function zQ(t, e) {
    const {days: r} = e;
    let {hours: n, minutes: i, seconds: o, milliseconds: s} = e;
    if (t.includes("DD") ? t = t.replace("DD", Wa(r)) : n += r * 24,
    t.includes("HH") ? t = t.replace("HH", Wa(n)) : i += n * 60,
    t.includes("mm") ? t = t.replace("mm", Wa(i)) : o += i * 60,
    t.includes("ss") ? t = t.replace("ss", Wa(o)) : s += o * 1e3,
    t.includes("S")) {
        const a = Wa(s, 3);
        t.includes("SSS") ? t = t.replace("SSS", a) : t.includes("SS") ? t = t.replace("SS", a.slice(0, 2)) : t = t.replace("S", a.charAt(0))
    }
    return t
}
const [jQ,WQ] = Se("count-down")
  , YQ = {
    time: ze(0),
    format: Ie("HH:mm:ss"),
    autoStart: Ee,
    millisecond: Boolean
};
var XQ = be({
    name: jQ,
    props: YQ,
    emits: ["change", "finish"],
    setup(t, {emit: e, slots: r}) {
        const {start: n, pause: i, reset: o, current: s} = RS({
            time: +t.time,
            millisecond: t.millisecond,
            onChange: c => e("change", c),
            onFinish: () => e("finish")
        })
          , a = ae( () => zQ(t.format, s.value))
          , l = () => {
            o(+t.time),
            t.autoStart && n()
        }
        ;
        return me( () => t.time, l, {
            immediate: !0
        }),
        Kt({
            start: n,
            pause: i,
            reset: l
        }),
        () => O("div", {
            role: "timer",
            class: WQ()
        }, [r.default ? r.default(s.value) : a.value])
    }
});
const t6e = Oe(XQ)
  , G9 = new Date().getFullYear()
  , [KQ] = Se("date-picker")
  , qQ = We({}, lQ, {
    columnsType: {
        type: Array,
        default: () => ["year", "month", "day"]
    },
    minDate: {
        type: Date,
        default: () => new Date(G9 - 10,0,1),
        validator: xf
    },
    maxDate: {
        type: Date,
        default: () => new Date(G9 + 10,11,31),
        validator: xf
    }
});
var ZQ = be({
    name: KQ,
    props: qQ,
    emits: ["confirm", "cancel", "change", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const n = ie(t.modelValue)
          , i = ie(!1)
          , o = ie()
          , s = ae( () => i.value ? t.modelValue : n.value)
          , a = _ => _ === t.minDate.getFullYear()
          , l = _ => _ === t.maxDate.getFullYear()
          , c = _ => _ === t.minDate.getMonth() + 1
          , u = _ => _ === t.maxDate.getMonth() + 1
          , f = _ => {
            const {minDate: b, columnsType: C} = t
              , w = C.indexOf(_)
              , T = s.value[w];
            if (T)
                return +T;
            switch (_) {
            case "year":
                return b.getFullYear();
            case "month":
                return b.getMonth() + 1;
            case "day":
                return b.getDate()
            }
        }
          , d = () => {
            const _ = t.minDate.getFullYear()
              , b = t.maxDate.getFullYear();
            return mg(_, b, "year", t.formatter, t.filter, s.value)
        }
          , h = () => {
            const _ = f("year")
              , b = a(_) ? t.minDate.getMonth() + 1 : 1
              , C = l(_) ? t.maxDate.getMonth() + 1 : 12;
            return mg(b, C, "month", t.formatter, t.filter, s.value)
        }
          , x = () => {
            const _ = f("year")
              , b = f("month")
              , C = a(_) && c(b) ? t.minDate.getDate() : 1
              , w = l(_) && u(b) ? t.maxDate.getDate() : oD(_, b);
            return mg(C, w, "day", t.formatter, t.filter, s.value)
        }
          , y = () => {
            var _;
            return (_ = o.value) == null ? void 0 : _.confirm()
        }
          , m = () => n.value
          , E = ae( () => t.columnsType.map(_ => {
            switch (_) {
            case "year":
                return d();
            case "month":
                return h();
            case "day":
                return x();
            default:
                throw new Error(`[Vant] DatePicker: unsupported columns type: ${_}`)
            }
        }
        ));
        me(n, _ => {
            ta(_, t.modelValue) || e("update:modelValue", _)
        }
        ),
        me( () => t.modelValue, (_, b) => {
            i.value = ta(b, n.value),
            _ = fQ(_, E.value),
            ta(_, n.value) || (n.value = _),
            i.value = !1
        }
        , {
            immediate: !0
        });
        const g = (..._) => e("change", ..._)
          , p = (..._) => e("cancel", ..._)
          , v = (..._) => e("confirm", ..._);
        return Kt({
            confirm: y,
            getSelectedDate: m
        }),
        () => O(mJ, st({
            ref: o,
            modelValue: n.value,
            "onUpdate:modelValue": _ => n.value = _,
            columns: E.value,
            onChange: g,
            onCancel: p,
            onConfirm: v
        }, $t(t, cQ)), r)
    }
});
const r6e = Oe(ZQ)
  , [JQ,Ci,qd] = Se("dialog")
  , QQ = We({}, sd, {
    title: String,
    theme: String,
    width: Ae,
    message: [String, Function],
    callback: Function,
    allowHtml: Boolean,
    className: hr,
    transition: Ie("van-dialog-bounce"),
    messageAlign: String,
    closeOnPopstate: Ee,
    showCancelButton: Boolean,
    cancelButtonText: String,
    cancelButtonColor: String,
    cancelButtonDisabled: Boolean,
    confirmButtonText: String,
    confirmButtonColor: String,
    confirmButtonDisabled: Boolean,
    showConfirmButton: Ee,
    closeOnClickOverlay: Boolean,
    keyboardEnabled: Ee,
    destroyOnClose: Boolean
})
  , eee = [...I7, "transition", "closeOnPopstate", "destroyOnClose"];
var fD = be({
    name: JQ,
    props: QQ,
    emits: ["confirm", "cancel", "keydown", "update:show"],
    setup(t, {emit: e, slots: r}) {
        const n = ie()
          , i = It({
            confirm: !1,
            cancel: !1
        })
          , o = E => e("update:show", E)
          , s = E => {
            var g;
            o(!1),
            (g = t.callback) == null || g.call(t, E)
        }
          , a = E => () => {
            t.show && (e(E),
            t.beforeClose ? (i[E] = !0,
            Su(t.beforeClose, {
                args: [E],
                done() {
                    s(E),
                    i[E] = !1
                },
                canceled() {
                    i[E] = !1
                }
            })) : s(E))
        }
          , l = a("cancel")
          , c = a("confirm")
          , u = aS(E => {
            var g, p;
            if (!t.keyboardEnabled || E.target !== ((p = (g = n.value) == null ? void 0 : g.popupRef) == null ? void 0 : p.value))
                return;
            ({
                Enter: t.showConfirmButton ? c : vy,
                Escape: t.showCancelButton ? l : vy
            })[E.key](),
            e("keydown", E)
        }
        , ["enter", "esc"])
          , f = () => {
            const E = r.title ? r.title() : t.title;
            if (E)
                return O("div", {
                    class: Ci("header", {
                        isolated: !t.message && !r.default
                    })
                }, [E])
        }
          , d = E => {
            const {message: g, allowHtml: p, messageAlign: v} = t
              , _ = Ci("message", {
                "has-title": E,
                [v]: v
            })
              , b = Zc(g) ? g() : g;
            return p && typeof b == "string" ? O("div", {
                class: _,
                innerHTML: b
            }, null) : O("div", {
                class: _
            }, [b])
        }
          , h = () => {
            if (r.default)
                return O("div", {
                    class: Ci("content")
                }, [r.default()]);
            const {title: E, message: g, allowHtml: p} = t;
            if (g) {
                const v = !!(E || r.title);
                return O("div", {
                    key: p ? 1 : 0,
                    class: Ci("content", {
                        isolated: !v
                    })
                }, [d(v)])
            }
        }
          , x = () => O("div", {
            class: [C7, Ci("footer")]
        }, [t.showCancelButton && O(Fx, {
            size: "large",
            text: t.cancelButtonText || qd("cancel"),
            class: Ci("cancel"),
            style: {
                color: t.cancelButtonColor
            },
            loading: i.cancel,
            disabled: t.cancelButtonDisabled,
            onClick: l
        }, null), t.showConfirmButton && O(Fx, {
            size: "large",
            text: t.confirmButtonText || qd("confirm"),
            class: [Ci("confirm"), {
                [Pq]: t.showCancelButton
            }],
            style: {
                color: t.confirmButtonColor
            },
            loading: i.confirm,
            disabled: t.confirmButtonDisabled,
            onClick: c
        }, null)])
          , y = () => O(Lq, {
            class: Ci("footer")
        }, {
            default: () => [t.showCancelButton && O(A9, {
                type: "warning",
                text: t.cancelButtonText || qd("cancel"),
                class: Ci("cancel"),
                color: t.cancelButtonColor,
                loading: i.cancel,
                disabled: t.cancelButtonDisabled,
                onClick: l
            }, null), t.showConfirmButton && O(A9, {
                type: "danger",
                text: t.confirmButtonText || qd("confirm"),
                class: Ci("confirm"),
                color: t.confirmButtonColor,
                loading: i.confirm,
                disabled: t.confirmButtonDisabled,
                onClick: c
            }, null)]
        })
          , m = () => r.footer ? r.footer() : t.theme === "round-button" ? y() : x();
        return () => {
            const {width: E, title: g, theme: p, message: v, className: _} = t;
            return O(Wl, st({
                ref: n,
                role: "dialog",
                class: [Ci([p]), _],
                style: {
                    width: rt(E)
                },
                tabindex: 0,
                "aria-labelledby": g || v,
                onKeydown: u,
                "onUpdate:show": o
            }, $t(t, eee)), {
                default: () => [f(), h(), m()]
            })
        }
    }
});
let Sy;
const tee = {
    title: "",
    width: "",
    theme: null,
    message: "",
    overlay: !0,
    callback: null,
    teleport: "body",
    className: "",
    allowHtml: !1,
    lockScroll: !0,
    transition: void 0,
    beforeClose: null,
    overlayClass: "",
    overlayStyle: void 0,
    messageAlign: "",
    cancelButtonText: "",
    cancelButtonColor: null,
    cancelButtonDisabled: !1,
    confirmButtonText: "",
    confirmButtonColor: null,
    confirmButtonDisabled: !1,
    showConfirmButton: !0,
    showCancelButton: !1,
    closeOnPopstate: !0,
    closeOnClickOverlay: !1,
    destroyOnClose: !1
};
let ree = We({}, tee);
function nee() {
    ({instance: Sy} = r1({
        setup() {
            const {state: e, toggle: r} = t1();
            return () => O(fD, st(e, {
                "onUpdate:show": r
            }), null)
        }
    }))
}
function iee(t) {
    return _o ? new Promise( (e, r) => {
        Sy || nee(),
        Sy.open(We({}, ree, t, {
            callback: n => {
                (n === "confirm" ? e : r)(n)
            }
        }))
    }
    ) : Promise.resolve(void 0)
}
const n6e = t => iee(We({
    showCancelButton: !0
}, t))
  , i6e = Oe(fD)
  , [oee,see] = Se("divider")
  , aee = {
    dashed: Boolean,
    hairline: Ee,
    vertical: Boolean,
    contentPosition: Ie("center")
};
var lee = be({
    name: oee,
    props: aee,
    setup(t, {slots: e}) {
        return () => {
            var r;
            return O("div", {
                role: "separator",
                class: see({
                    dashed: t.dashed,
                    hairline: t.hairline,
                    vertical: t.vertical,
                    [`content-${t.contentPosition}`]: !!e.default && !t.vertical
                })
            }, [!t.vertical && ((r = e.default) == null ? void 0 : r.call(e))])
        }
    }
});
const o6e = Oe(lee)
  , cee = {
    gap: {
        type: [Number, Object],
        default: 24
    },
    icon: String,
    axis: Ie("y"),
    magnetic: String,
    offset: Object,
    teleport: {
        type: [String, Object],
        default: "body"
    }
}
  , [uee,H9] = Se("floating-bubble");
var fee = be({
    name: uee,
    inheritAttrs: !1,
    props: cee,
    emits: ["click", "update:offset", "offsetChange"],
    setup(t, {slots: e, emit: r, attrs: n}) {
        const i = ie()
          , o = ie({
            x: 0,
            y: 0,
            width: 0,
            height: 0
        })
          , s = ae( () => bo(t.gap) ? t.gap.x : t.gap)
          , a = ae( () => bo(t.gap) ? t.gap.y : t.gap)
          , l = ae( () => ({
            top: a.value,
            right: ts.value - o.value.width - s.value,
            bottom: ra.value - o.value.height - a.value,
            left: s.value
        }))
          , c = ie(!1);
        let u = !1;
        const f = ae( () => {
            const _ = {}
              , b = rt(o.value.x)
              , C = rt(o.value.y);
            return _.transform = `translate3d(${b}, ${C}, 0)`,
            (c.value || !u) && (_.transition = "none"),
            _
        }
        )
          , d = () => {
            if (!v.value)
                return;
            const {width: _, height: b} = Cr(i.value)
              , {offset: C} = t;
            o.value = {
                x: C ? C.x : ts.value - _ - s.value,
                y: C ? C.y : ra.value - b - a.value,
                width: _,
                height: b
            }
        }
          , h = jl();
        let x = 0
          , y = 0;
        const m = _ => {
            h.start(_),
            c.value = !0,
            x = o.value.x,
            y = o.value.y
        }
        ;
        yn("touchmove", _ => {
            if (_.preventDefault(),
            h.move(_),
            t.axis !== "lock" && !h.isTap.value) {
                if (t.axis === "x" || t.axis === "xy") {
                    let C = x + h.deltaX.value;
                    C < l.value.left && (C = l.value.left),
                    C > l.value.right && (C = l.value.right),
                    o.value.x = C
                }
                if (t.axis === "y" || t.axis === "xy") {
                    let C = y + h.deltaY.value;
                    C < l.value.top && (C = l.value.top),
                    C > l.value.bottom && (C = l.value.bottom),
                    o.value.y = C
                }
                const b = $t(o.value, ["x", "y"]);
                r("update:offset", b)
            }
        }
        , {
            target: i
        });
        const g = () => {
            c.value = !1,
            Xe( () => {
                if (t.magnetic === "x") {
                    const _ = E9([l.value.left, l.value.right], o.value.x);
                    o.value.x = _
                }
                if (t.magnetic === "y") {
                    const _ = E9([l.value.top, l.value.bottom], o.value.y);
                    o.value.y = _
                }
                if (!h.isTap.value) {
                    const _ = $t(o.value, ["x", "y"]);
                    r("update:offset", _),
                    (x !== _.x || y !== _.y) && r("offsetChange", _)
                }
            }
            )
        }
          , p = _ => {
            h.isTap.value ? r("click", _) : _.stopPropagation()
        }
        ;
        Ht( () => {
            d(),
            Xe( () => {
                u = !0
            }
            )
        }
        ),
        me([ts, ra, s, a, () => t.offset], d, {
            deep: !0
        });
        const v = ie(!0);
        return ys( () => {
            v.value = !0
        }
        ),
        Fo( () => {
            t.teleport && (v.value = !1)
        }
        ),
        () => {
            const _ = hi(O("div", st({
                class: H9(),
                ref: i,
                onTouchstartPassive: m,
                onTouchend: g,
                onTouchcancel: g,
                onClickCapture: p,
                style: f.value
            }, n), [e.default ? e.default() : O(qq, {
                name: t.icon,
                class: H9("icon")
            }, null)]), [[pi, v.value]]);
            return t.teleport ? O(Ip, {
                to: t.teleport
            }, {
                default: () => [_]
            }) : _
        }
    }
});
const s6e = Oe(fee)
  , [dD,dee] = Se("grid")
  , hee = {
    square: Boolean,
    center: Ee,
    border: Ee,
    gutter: Ae,
    reverse: Boolean,
    iconSize: Ae,
    direction: String,
    clickable: Boolean,
    columnNum: ze(4)
}
  , hD = Symbol(dD);
var xee = be({
    name: dD,
    props: hee,
    setup(t, {slots: e}) {
        const {linkChildren: r} = zi(hD);
        return r({
            props: t
        }),
        () => {
            var n;
            return O("div", {
                style: {
                    paddingLeft: rt(t.gutter)
                },
                class: [dee(), {
                    [C7]: t.border && !t.gutter
                }]
            }, [(n = e.default) == null ? void 0 : n.call(e)])
        }
    }
});
const a6e = Oe(xee)
  , [pee,Zd] = Se("grid-item")
  , gee = We({}, Tu, {
    dot: Boolean,
    text: String,
    icon: String,
    badge: Ae,
    iconColor: String,
    iconPrefix: String,
    badgeProps: Object
});
var mee = be({
    name: pee,
    props: gee,
    setup(t, {slots: e}) {
        const {parent: r, index: n} = Jn(hD)
          , i = od();
        if (!r) {
            console.error("[Vant] <GridItem> must be a child component of <Grid>.");
            return
        }
        const o = ae( () => {
            const {square: u, gutter: f, columnNum: d} = r.props
              , h = `${100 / +d}%`
              , x = {
                flexBasis: h
            };
            if (u)
                x.paddingTop = h;
            else if (f) {
                const y = rt(f);
                x.paddingRight = y,
                n.value >= +d && (x.marginTop = y)
            }
            return x
        }
        )
          , s = ae( () => {
            const {square: u, gutter: f} = r.props;
            if (u && f) {
                const d = rt(f);
                return {
                    right: d,
                    bottom: d,
                    height: "auto"
                }
            }
        }
        )
          , a = () => {
            if (e.icon)
                return O(Jp, st({
                    dot: t.dot,
                    content: t.badge
                }, t.badgeProps), {
                    default: e.icon
                });
            if (t.icon)
                return O(rr, {
                    dot: t.dot,
                    name: t.icon,
                    size: r.props.iconSize,
                    badge: t.badge,
                    class: Zd("icon"),
                    color: t.iconColor,
                    badgeProps: t.badgeProps,
                    classPrefix: t.iconPrefix
                }, null)
        }
          , l = () => {
            if (e.text)
                return e.text();
            if (t.text)
                return O("span", {
                    class: Zd("text")
                }, [t.text])
        }
          , c = () => e.default ? e.default() : [a(), l()];
        return () => {
            const {center: u, border: f, square: d, gutter: h, reverse: x, direction: y, clickable: m} = r.props
              , E = [Zd("content", [y, {
                center: u,
                square: d,
                reverse: x,
                clickable: m,
                surround: f && h
            }]), {
                [va]: f
            }];
            return O("div", {
                class: [Zd({
                    square: d
                })],
                style: o.value
            }, [O("div", {
                role: m ? "button" : void 0,
                class: E,
                style: s.value,
                tabindex: m ? 0 : void 0,
                onClick: i
            }, [c()])])
        }
    }
});
const l6e = Oe(mee)
  , V9 = t => Math.sqrt((t[0].clientX - t[1].clientX) ** 2 + (t[0].clientY - t[1].clientY) ** 2)
  , vee = t => ({
    x: (t[0].clientX + t[1].clientX) / 2,
    y: (t[0].clientY + t[1].clientY) / 2
})
  , vg = Se("image-preview")[1]
  , z9 = 2.6
  , yee = {
    src: String,
    show: Boolean,
    active: Number,
    minZoom: dn(Ae),
    maxZoom: dn(Ae),
    rootWidth: dn(Number),
    rootHeight: dn(Number),
    disableZoom: Boolean,
    doubleScale: Boolean,
    closeOnClickImage: Boolean,
    closeOnClickOverlay: Boolean,
    vertical: Boolean
};
var Eee = be({
    props: yee,
    emits: ["scale", "close", "longPress"],
    setup(t, {emit: e, slots: r}) {
        const n = It({
            scale: 1,
            moveX: 0,
            moveY: 0,
            moving: !1,
            zooming: !1,
            initializing: !1,
            imageRatio: 0
        })
          , i = jl()
          , o = ie()
          , s = ie()
          , a = ie(!1)
          , l = ie(!1);
        let c = 0;
        const u = ae( () => {
            const {scale: P, moveX: N, moveY: j, moving: K, zooming: oe, initializing: U} = n
              , $ = {
                transitionDuration: oe || K || U ? "0s" : ".3s"
            };
            return (P !== 1 || l.value) && ($.transform = `matrix(${P}, 0, 0, ${P}, ${N}, ${j})`),
            $
        }
        )
          , f = ae( () => {
            if (n.imageRatio) {
                const {rootWidth: P, rootHeight: N} = t
                  , j = a.value ? N / n.imageRatio : P;
                return Math.max(0, (n.scale * j - P) / 2)
            }
            return 0
        }
        )
          , d = ae( () => {
            if (n.imageRatio) {
                const {rootWidth: P, rootHeight: N} = t
                  , j = a.value ? N : P * n.imageRatio;
                return Math.max(0, (n.scale * j - N) / 2)
            }
            return 0
        }
        )
          , h = (P, N) => {
            var j;
            if (P = Gr(P, +t.minZoom, +t.maxZoom + 1),
            P !== n.scale) {
                const K = P / n.scale;
                if (n.scale = P,
                N) {
                    const oe = Cr((j = o.value) == null ? void 0 : j.$el)
                      , U = {
                        x: oe.width * .5,
                        y: oe.height * .5
                    }
                      , $ = n.moveX - (N.x - oe.left - U.x) * (K - 1)
                      , V = n.moveY - (N.y - oe.top - U.y) * (K - 1);
                    n.moveX = Gr($, -f.value, f.value),
                    n.moveY = Gr(V, -d.value, d.value)
                } else
                    n.moveX = 0,
                    n.moveY = l.value ? c : 0;
                e("scale", {
                    scale: P,
                    index: t.active
                })
            }
        }
          , x = () => {
            h(1)
        }
          , y = () => {
            const P = n.scale > 1 ? 1 : 2;
            h(P, P === 2 || l.value ? {
                x: i.startX.value,
                y: i.startY.value
            } : void 0)
        }
        ;
        let m, E, g, p, v, _, b, C, w = !1;
        const T = P => {
            const {touches: N} = P;
            if (m = N.length,
            m === 2 && t.disableZoom)
                return;
            const {offsetX: j} = i;
            i.start(P),
            E = n.moveX,
            g = n.moveY,
            C = Date.now(),
            w = !1,
            n.moving = m === 1 && (n.scale !== 1 || l.value),
            n.zooming = m === 2 && !j.value,
            n.zooming && (p = n.scale,
            v = V9(N))
        }
          , A = P => {
            const {touches: N} = P;
            if (i.move(P),
            n.moving) {
                const {deltaX: j, deltaY: K} = i
                  , oe = j.value + E
                  , U = K.value + g;
                if ((t.vertical ? i.isVertical() && Math.abs(U) > d.value : i.isHorizontal() && Math.abs(oe) > f.value) && !w) {
                    n.moving = !1;
                    return
                }
                w = !0,
                Rr(P, !0),
                n.moveX = Gr(oe, -f.value, f.value),
                n.moveY = Gr(U, -d.value, d.value)
            }
            if (n.zooming && (Rr(P, !0),
            N.length === 2)) {
                const j = V9(N)
                  , K = p * j / v;
                _ = vee(N),
                h(K, _)
            }
        }
          , B = P => {
            var N;
            const j = (N = s.value) == null ? void 0 : N.$el;
            if (!j)
                return;
            const K = j.firstElementChild
              , oe = P.target === j
              , U = K == null ? void 0 : K.contains(P.target);
            !t.closeOnClickImage && U || !t.closeOnClickOverlay && oe || e("close")
        }
          , S = P => {
            if (m > 1)
                return;
            const N = Date.now() - C
              , j = 250;
            i.isTap.value && (N < j ? t.doubleScale ? b ? (clearTimeout(b),
            b = null,
            y()) : b = setTimeout( () => {
                B(P),
                b = null
            }
            , j) : B(P) : N > B7 && e("longPress"))
        }
          , D = P => {
            let N = !1;
            if ((n.moving || n.zooming) && (N = !0,
            n.moving && E === n.moveX && g === n.moveY && (N = !1),
            !P.touches.length)) {
                n.zooming && (n.moveX = Gr(n.moveX, -f.value, f.value),
                n.moveY = Gr(n.moveY, -d.value, d.value),
                n.zooming = !1),
                n.moving = !1,
                E = 0,
                g = 0,
                p = 1,
                n.scale < 1 && x();
                const j = +t.maxZoom;
                n.scale > j && h(j, _)
            }
            Rr(P, N),
            S(P),
            i.reset()
        }
          , F = () => {
            const {rootWidth: P, rootHeight: N} = t
              , j = N / P
              , {imageRatio: K} = n;
            a.value = n.imageRatio > j && K < z9,
            l.value = n.imageRatio > j && K >= z9,
            l.value && (c = (K * P - N) / 2,
            n.moveY = c,
            n.initializing = !0,
            pn( () => {
                n.initializing = !1
            }
            )),
            x()
        }
          , R = P => {
            const {naturalWidth: N, naturalHeight: j} = P.target;
            n.imageRatio = j / N,
            F()
        }
        ;
        return me( () => t.active, x),
        me( () => t.show, P => {
            P || x()
        }
        ),
        me( () => [t.rootWidth, t.rootHeight], F),
        yn("touchmove", A, {
            target: ae( () => {
                var P;
                return (P = s.value) == null ? void 0 : P.$el
            }
            )
        }),
        Kt({
            resetScale: x
        }),
        () => {
            const P = {
                loading: () => O(bs, {
                    type: "spinner"
                }, null)
            };
            return O(K7, {
                ref: s,
                class: vg("swipe-item"),
                onTouchstartPassive: T,
                onTouchend: D,
                onTouchcancel: D
            }, {
                default: () => [r.image ? O("div", {
                    class: vg("image-wrap")
                }, [r.image({
                    src: t.src,
                    onLoad: R,
                    style: u.value
                })]) : O(sD, {
                    ref: o,
                    src: t.src,
                    fit: "contain",
                    class: vg("image", {
                        vertical: a.value
                    }),
                    style: u.value,
                    onLoad: R
                }, P)]
            })
        }
    }
});
const [_ee,oc] = Se("image-preview")
  , bee = ["show", "teleport", "transition", "overlayStyle", "closeOnPopstate"]
  , Cee = {
    show: Boolean,
    loop: Ee,
    images: ds(),
    minZoom: ze(1 / 3),
    maxZoom: ze(3),
    overlay: Ee,
    vertical: Boolean,
    closeable: Boolean,
    showIndex: Ee,
    className: hr,
    closeIcon: Ie("clear"),
    transition: String,
    beforeClose: Function,
    doubleScale: Ee,
    overlayClass: hr,
    overlayStyle: Object,
    swipeDuration: ze(300),
    startPosition: ze(0),
    showIndicators: Boolean,
    closeOnPopstate: Ee,
    closeOnClickImage: Ee,
    closeOnClickOverlay: Ee,
    closeIconPosition: Ie("top-right"),
    teleport: [String, Object]
};
var xD = be({
    name: _ee,
    props: Cee,
    emits: ["scale", "close", "closed", "change", "longPress", "update:show"],
    setup(t, {emit: e, slots: r}) {
        const n = ie()
          , i = ie()
          , o = It({
            active: 0,
            rootWidth: 0,
            rootHeight: 0,
            disableZoom: !1
        })
          , s = () => {
            if (n.value) {
                const p = Cr(n.value.$el);
                o.rootWidth = p.width,
                o.rootHeight = p.height,
                n.value.resize()
            }
        }
          , a = p => e("scale", p)
          , l = p => e("update:show", p)
          , c = () => {
            Su(t.beforeClose, {
                args: [o.active],
                done: () => l(!1)
            })
        }
          , u = p => {
            p !== o.active && (o.active = p,
            e("change", p))
        }
          , f = () => {
            if (t.showIndex)
                return O("div", {
                    class: oc("index")
                }, [r.index ? r.index({
                    index: o.active
                }) : `${o.active + 1} / ${t.images.length}`])
        }
          , d = () => {
            if (r.cover)
                return O("div", {
                    class: oc("cover")
                }, [r.cover()])
        }
          , h = () => {
            o.disableZoom = !0
        }
          , x = () => {
            o.disableZoom = !1
        }
          , y = () => O(z7, {
            ref: n,
            lazyRender: !0,
            loop: t.loop,
            class: oc("swipe"),
            vertical: t.vertical,
            duration: t.swipeDuration,
            initialSwipe: t.startPosition,
            showIndicators: t.showIndicators,
            indicatorColor: "white",
            onChange: u,
            onDragEnd: x,
            onDragStart: h
        }, {
            default: () => [t.images.map( (p, v) => O(Eee, {
                ref: _ => {
                    v === o.active && (i.value = _)
                }
                ,
                src: p,
                show: t.show,
                active: o.active,
                maxZoom: t.maxZoom,
                minZoom: t.minZoom,
                rootWidth: o.rootWidth,
                rootHeight: o.rootHeight,
                disableZoom: o.disableZoom,
                doubleScale: t.doubleScale,
                closeOnClickImage: t.closeOnClickImage,
                closeOnClickOverlay: t.closeOnClickOverlay,
                vertical: t.vertical,
                onScale: a,
                onClose: c,
                onLongPress: () => e("longPress", {
                    index: v
                })
            }, {
                image: r.image
            }))]
        })
          , m = () => {
            if (t.closeable)
                return O(rr, {
                    role: "button",
                    name: t.closeIcon,
                    class: [oc("close-icon", t.closeIconPosition), hs],
                    onClick: c
                }, null)
        }
          , E = () => e("closed")
          , g = (p, v) => {
            var _;
            return (_ = n.value) == null ? void 0 : _.swipeTo(p, v)
        }
        ;
        return Kt({
            resetScale: () => {
                var p;
                (p = i.value) == null || p.resetScale()
            }
            ,
            swipeTo: g
        }),
        Ht(s),
        me([ts, ra], s),
        me( () => t.startPosition, p => u(+p)),
        me( () => t.show, p => {
            const {images: v, startPosition: _} = t;
            p ? (u(+_),
            Xe( () => {
                s(),
                g(+_, {
                    immediate: !0
                })
            }
            )) : e("close", {
                index: o.active,
                url: v[o.active]
            })
        }
        ),
        () => O(Wl, st({
            class: [oc(), t.className],
            overlayClass: [oc("overlay"), t.overlayClass],
            onClosed: E,
            "onUpdate:show": l
        }, $t(t, bee)), {
            default: () => [m(), y(), f(), d()]
        })
    }
});
let Yh;
const Aee = {
    loop: !0,
    images: [],
    maxZoom: 3,
    minZoom: 1 / 3,
    onScale: void 0,
    onClose: void 0,
    onChange: void 0,
    vertical: !1,
    teleport: "body",
    className: "",
    showIndex: !0,
    closeable: !1,
    closeIcon: "clear",
    transition: void 0,
    beforeClose: void 0,
    doubleScale: !0,
    overlayStyle: void 0,
    overlayClass: void 0,
    startPosition: 0,
    swipeDuration: 300,
    showIndicators: !1,
    closeOnPopstate: !0,
    closeOnClickOverlay: !0,
    closeIconPosition: "top-right"
};
function wee() {
    ({instance: Yh} = r1({
        setup() {
            const {state: t, toggle: e} = t1()
              , r = () => {
                t.images = []
            }
            ;
            return () => O(xD, st(t, {
                onClosed: r,
                "onUpdate:show": e
            }), null)
        }
    }))
}
const Bee = (t, e=0) => {
    if (_o)
        return Yh || wee(),
        t = Array.isArray(t) ? {
            images: t,
            startPosition: e
        } : t,
        Yh.open(We({}, Aee, t)),
        Yh
}
;
Oe(xD);
const [See,sc,Tee] = Se("list")
  , Dee = {
    error: Boolean,
    offset: ze(300),
    loading: Boolean,
    disabled: Boolean,
    finished: Boolean,
    scroller: Object,
    errorText: String,
    direction: Ie("down"),
    loadingText: {
        type: String,
        default: ""
    },
    finishedText: String,
    immediateCheck: Ee
};
var Fee = be({
    name: See,
    props: Dee,
    emits: ["load", "update:error", "update:loading"],
    setup(t, {emit: e, slots: r}) {
        const n = ie(t.loading)
          , i = ie()
          , o = ie()
          , s = X7()
          , a = nd(i)
          , l = ae( () => t.scroller || a.value)
          , c = () => {
            Xe( () => {
                if (n.value || t.finished || t.disabled || t.error || (s == null ? void 0 : s.value) === !1)
                    return;
                const {direction: x} = t
                  , y = +t.offset
                  , m = Cr(l);
                if (!m.height || Jc(i))
                    return;
                let E = !1;
                const g = Cr(o);
                x === "up" ? E = m.top - g.top <= y : E = g.bottom - m.bottom <= y,
                E && (n.value = !0,
                e("update:loading", !0),
                e("load"))
            }
            )
        }
          , u = () => {
            if (t.finished) {
                const x = r.finished ? r.finished() : t.finishedText;
                if (x)
                    return O("div", {
                        class: sc("finished-text")
                    }, [x])
            }
        }
          , f = () => {
            e("update:error", !1),
            c()
        }
          , d = () => {
            if (t.error) {
                const x = r.error ? r.error() : t.errorText;
                if (x)
                    return O("div", {
                        role: "button",
                        class: sc("error-text"),
                        tabindex: 0,
                        onClick: f
                    }, [x])
            }
        }
          , h = () => {
            if (n.value && !t.finished && !t.disabled)
                return O("div", {
                    class: sc("loading")
                }, [r.loading ? r.loading() : t.loadingText != null && O(bs, {
                    class: sc("loading-icon")
                }, {
                    default: () => [t.loadingText || Tee("loading")]
                })])
        }
        ;
        return me( () => [t.loading, t.finished, t.error], c),
        s && me(s, x => {
            x && c()
        }
        ),
        Gl( () => {
            n.value = t.loading
        }
        ),
        Ht( () => {
            t.immediateCheck && c()
        }
        ),
        Kt({
            check: c
        }),
        yn("scroll", c, {
            target: l,
            passive: !0
        }),
        () => {
            var x;
            const y = (x = r.default) == null ? void 0 : x.call(r)
              , m = O("div", {
                ref: o,
                class: sc("placeholder")
            }, null);
            return O("div", {
                ref: i,
                role: "feed",
                class: sc(),
                "aria-busy": n.value
            }, [t.direction === "down" ? y : m, h(), u(), d(), t.direction === "up" ? y : m])
        }
    }
});
const c6e = Oe(Fee)
  , [Pee,Iee] = Se("notify")
  , Oee = ["lockScroll", "position", "show", "teleport", "zIndex"]
  , kee = We({}, sd, {
    type: Ie("danger"),
    color: String,
    message: Ae,
    position: Ie("top"),
    className: hr,
    background: String,
    lockScroll: Boolean
});
var pD = be({
    name: Pee,
    props: kee,
    emits: ["update:show"],
    setup(t, {emit: e, slots: r}) {
        const n = i => e("update:show", i);
        return () => O(Wl, st({
            class: [Iee([t.type]), t.className],
            style: {
                color: t.color,
                background: t.background
            },
            overlay: !1,
            duration: .2,
            "onUpdate:show": n
        }, $t(t, Oee)), {
            default: () => [r.default ? r.default() : t.message]
        })
    }
});
let j9, $c;
const Ree = t => bo(t) ? t : {
    message: t
};
function Mee() {
    ({instance: $c} = r1({
        setup() {
            const {state: t, toggle: e} = t1();
            return () => O(pD, st(t, {
                "onUpdate:show": e
            }), null)
        }
    }))
}
const Nee = () => ({
    type: "danger",
    color: void 0,
    message: "",
    onClose: void 0,
    onClick: void 0,
    onOpened: void 0,
    duration: 3e3,
    position: void 0,
    className: "",
    lockScroll: !1,
    background: void 0
});
let Lee = Nee();
const $ee = () => {
    $c && $c.toggle(!1)
}
;
function u6e(t) {
    if (_o)
        return $c || Mee(),
        t = We({}, Lee, Ree(t)),
        $c.open(t),
        clearTimeout(j9),
        t.duration > 0 && (j9 = setTimeout($ee, t.duration)),
        $c
}
Oe(pD);
const [Uee,ac,W9] = Se("pagination")
  , yg = (t, e, r) => ({
    number: t,
    text: e,
    active: r
})
  , Gee = {
    mode: Ie("multi"),
    prevText: String,
    nextText: String,
    pageCount: ze(0),
    modelValue: Zp(0),
    totalItems: ze(0),
    showPageSize: ze(5),
    itemsPerPage: ze(10),
    forceEllipses: Boolean,
    showPrevButton: Ee,
    showNextButton: Ee
};
var Hee = be({
    name: Uee,
    props: Gee,
    emits: ["change", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const n = ae( () => {
            const {pageCount: u, totalItems: f, itemsPerPage: d} = t
              , h = +u || Math.ceil(+f / +d);
            return Math.max(1, h)
        }
        )
          , i = ae( () => {
            const u = []
              , f = n.value
              , d = +t.showPageSize
              , {modelValue: h, forceEllipses: x} = t;
            let y = 1
              , m = f;
            const E = d < f;
            E && (y = Math.max(h - Math.floor(d / 2), 1),
            m = y + d - 1,
            m > f && (m = f,
            y = m - d + 1));
            for (let g = y; g <= m; g++) {
                const p = yg(g, g, g === h);
                u.push(p)
            }
            if (E && d > 0 && x) {
                if (y > 1) {
                    const g = yg(y - 1, "...");
                    u.unshift(g)
                }
                if (m < f) {
                    const g = yg(m + 1, "...");
                    u.push(g)
                }
            }
            return u
        }
        )
          , o = (u, f) => {
            u = Gr(u, 1, n.value),
            t.modelValue !== u && (e("update:modelValue", u),
            f && e("change", u))
        }
        ;
        Au( () => o(t.modelValue));
        const s = () => O("li", {
            class: ac("page-desc")
        }, [r.pageDesc ? r.pageDesc() : `${t.modelValue}/${n.value}`])
          , a = () => {
            const {mode: u, modelValue: f, showPrevButton: d} = t;
            if (!d)
                return;
            const h = r["prev-text"]
              , x = f === 1;
            return O("li", {
                class: [ac("item", {
                    disabled: x,
                    border: u === "simple",
                    prev: !0
                }), jh]
            }, [O("button", {
                type: "button",
                disabled: x,
                onClick: () => o(f - 1, !0)
            }, [h ? h() : t.prevText || W9("prev")])])
        }
          , l = () => {
            const {mode: u, modelValue: f, showNextButton: d} = t;
            if (!d)
                return;
            const h = r["next-text"]
              , x = f === n.value;
            return O("li", {
                class: [ac("item", {
                    disabled: x,
                    border: u === "simple",
                    next: !0
                }), jh]
            }, [O("button", {
                type: "button",
                disabled: x,
                onClick: () => o(f + 1, !0)
            }, [h ? h() : t.nextText || W9("next")])])
        }
          , c = () => i.value.map(u => O("li", {
            class: [ac("item", {
                active: u.active,
                page: !0
            }), jh]
        }, [O("button", {
            type: "button",
            "aria-current": u.active || void 0,
            onClick: () => o(u.number, !0)
        }, [r.page ? r.page(u) : u.text])]));
        return () => O("nav", {
            role: "navigation",
            class: ac()
        }, [O("ul", {
            class: ac("items")
        }, [a(), t.mode === "simple" ? s() : c(), l()])])
    }
});
const f6e = Oe(Hee);
function ji(t) {
    if (t == null)
        return window;
    if (t.toString() !== "[object Window]") {
        var e = t.ownerDocument;
        return e && e.defaultView || window
    }
    return t
}
function V2(t) {
    var e = ji(t).Element;
    return t instanceof e || t instanceof Element
}
function Li(t) {
    var e = ji(t).HTMLElement;
    return t instanceof e || t instanceof HTMLElement
}
function gD(t) {
    if (typeof ShadowRoot > "u")
        return !1;
    var e = ji(t).ShadowRoot;
    return t instanceof e || t instanceof ShadowRoot
}
var eu = Math.round;
function Ty() {
    var t = navigator.userAgentData;
    return t != null && t.brands ? t.brands.map(function(e) {
        return e.brand + "/" + e.version
    }).join(" ") : navigator.userAgent
}
function Vee() {
    return !/^((?!chrome|android).)*safari/i.test(Ty())
}
function Px(t, e, r) {
    e === void 0 && (e = !1),
    r === void 0 && (r = !1);
    var n = t.getBoundingClientRect()
      , i = 1
      , o = 1;
    e && Li(t) && (i = t.offsetWidth > 0 && eu(n.width) / t.offsetWidth || 1,
    o = t.offsetHeight > 0 && eu(n.height) / t.offsetHeight || 1);
    var s = V2(t) ? ji(t) : window
      , a = s.visualViewport
      , l = !Vee() && r
      , c = (n.left + (l && a ? a.offsetLeft : 0)) / i
      , u = (n.top + (l && a ? a.offsetTop : 0)) / o
      , f = n.width / i
      , d = n.height / o;
    return {
        width: f,
        height: d,
        top: u,
        right: c + f,
        bottom: u + d,
        left: c,
        x: c,
        y: u
    }
}
function mD(t) {
    var e = ji(t)
      , r = e.pageXOffset
      , n = e.pageYOffset;
    return {
        scrollLeft: r,
        scrollTop: n
    }
}
function zee(t) {
    return {
        scrollLeft: t.scrollLeft,
        scrollTop: t.scrollTop
    }
}
function jee(t) {
    return t === ji(t) || !Li(t) ? mD(t) : zee(t)
}
function xs(t) {
    return t ? (t.nodeName || "").toLowerCase() : null
}
function n1(t) {
    return ((V2(t) ? t.ownerDocument : t.document) || window.document).documentElement
}
function Wee(t) {
    return Px(n1(t)).left + mD(t).scrollLeft
}
function ps(t) {
    return ji(t).getComputedStyle(t)
}
function z2(t) {
    var e = ps(t)
      , r = e.overflow
      , n = e.overflowX
      , i = e.overflowY;
    return /auto|scroll|overlay|hidden/.test(r + i + n)
}
function Yee(t) {
    var e = t.getBoundingClientRect()
      , r = eu(e.width) / t.offsetWidth || 1
      , n = eu(e.height) / t.offsetHeight || 1;
    return r !== 1 || n !== 1
}
function Xee(t, e, r) {
    r === void 0 && (r = !1);
    var n = Li(e)
      , i = Li(e) && Yee(e)
      , o = n1(e)
      , s = Px(t, i, r)
      , a = {
        scrollLeft: 0,
        scrollTop: 0
    }
      , l = {
        x: 0,
        y: 0
    };
    return (n || !n && !r) && ((xs(e) !== "body" || z2(o)) && (a = jee(e)),
    Li(e) ? (l = Px(e, !0),
    l.x += e.clientLeft,
    l.y += e.clientTop) : o && (l.x = Wee(o))),
    {
        x: s.left + a.scrollLeft - l.x,
        y: s.top + a.scrollTop - l.y,
        width: s.width,
        height: s.height
    }
}
function Kee(t) {
    var e = Px(t)
      , r = t.offsetWidth
      , n = t.offsetHeight;
    return Math.abs(e.width - r) <= 1 && (r = e.width),
    Math.abs(e.height - n) <= 1 && (n = e.height),
    {
        x: t.offsetLeft,
        y: t.offsetTop,
        width: r,
        height: n
    }
}
function j2(t) {
    return xs(t) === "html" ? t : t.assignedSlot || t.parentNode || (gD(t) ? t.host : null) || n1(t)
}
function vD(t) {
    return ["html", "body", "#document"].indexOf(xs(t)) >= 0 ? t.ownerDocument.body : Li(t) && z2(t) ? t : vD(j2(t))
}
function Xh(t, e) {
    var r;
    e === void 0 && (e = []);
    var n = vD(t)
      , i = n === ((r = t.ownerDocument) == null ? void 0 : r.body)
      , o = ji(n)
      , s = i ? [o].concat(o.visualViewport || [], z2(n) ? n : []) : n
      , a = e.concat(s);
    return i ? a : a.concat(Xh(j2(s)))
}
function qee(t) {
    return ["table", "td", "th"].indexOf(xs(t)) >= 0
}
function Y9(t) {
    return !Li(t) || ps(t).position === "fixed" ? null : t.offsetParent
}
function Zee(t) {
    var e = /firefox/i.test(Ty())
      , r = /Trident/i.test(Ty());
    if (r && Li(t)) {
        var n = ps(t);
        if (n.position === "fixed")
            return null
    }
    var i = j2(t);
    for (gD(i) && (i = i.host); Li(i) && ["html", "body"].indexOf(xs(i)) < 0; ) {
        var o = ps(i);
        if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || e && o.willChange === "filter" || e && o.filter && o.filter !== "none")
            return i;
        i = i.parentNode
    }
    return null
}
function yD(t) {
    for (var e = ji(t), r = Y9(t); r && qee(r) && ps(r).position === "static"; )
        r = Y9(r);
    return r && (xs(r) === "html" || xs(r) === "body" && ps(r).position === "static") ? e : r || Zee(t) || e
}
var Uc = "top"
  , Ix = "bottom"
  , gf = "right"
  , dl = "left"
  , ED = "auto"
  , Jee = [Uc, Ix, gf, dl]
  , _D = "start"
  , Ox = "end"
  , Qee = [].concat(Jee, [ED]).reduce(function(t, e) {
    return t.concat([e, e + "-" + _D, e + "-" + Ox])
}, [])
  , ete = "beforeRead"
  , tte = "read"
  , rte = "afterRead"
  , nte = "beforeMain"
  , ite = "main"
  , ote = "afterMain"
  , ste = "beforeWrite"
  , ate = "write"
  , lte = "afterWrite"
  , Dy = [ete, tte, rte, nte, ite, ote, ste, ate, lte];
function cte(t) {
    var e = new Map
      , r = new Set
      , n = [];
    t.forEach(function(o) {
        e.set(o.name, o)
    });
    function i(o) {
        r.add(o.name);
        var s = [].concat(o.requires || [], o.requiresIfExists || []);
        s.forEach(function(a) {
            if (!r.has(a)) {
                var l = e.get(a);
                l && i(l)
            }
        }),
        n.push(o)
    }
    return t.forEach(function(o) {
        r.has(o.name) || i(o)
    }),
    n
}
function ute(t) {
    var e = cte(t);
    return Dy.reduce(function(r, n) {
        return r.concat(e.filter(function(i) {
            return i.phase === n
        }))
    }, [])
}
function fte(t) {
    var e;
    return function() {
        return e || (e = new Promise(function(r) {
            Promise.resolve().then(function() {
                e = void 0,
                r(t())
            })
        }
        )),
        e
    }
}
function Ds(t) {
    for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
        r[n - 1] = arguments[n];
    return [].concat(r).reduce(function(i, o) {
        return i.replace(/%s/, o)
    }, t)
}
var Fa = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s'
  , dte = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available'
  , X9 = ["name", "enabled", "phase", "fn", "effect", "requires", "options"];
function hte(t) {
    t.forEach(function(e) {
        [].concat(Object.keys(e), X9).filter(function(r, n, i) {
            return i.indexOf(r) === n
        }).forEach(function(r) {
            switch (r) {
            case "name":
                typeof e.name != "string" && console.error(Ds(Fa, String(e.name), '"name"', '"string"', '"' + String(e.name) + '"'));
                break;
            case "enabled":
                typeof e.enabled != "boolean" && console.error(Ds(Fa, e.name, '"enabled"', '"boolean"', '"' + String(e.enabled) + '"'));
                break;
            case "phase":
                Dy.indexOf(e.phase) < 0 && console.error(Ds(Fa, e.name, '"phase"', "either " + Dy.join(", "), '"' + String(e.phase) + '"'));
                break;
            case "fn":
                typeof e.fn != "function" && console.error(Ds(Fa, e.name, '"fn"', '"function"', '"' + String(e.fn) + '"'));
                break;
            case "effect":
                e.effect != null && typeof e.effect != "function" && console.error(Ds(Fa, e.name, '"effect"', '"function"', '"' + String(e.fn) + '"'));
                break;
            case "requires":
                e.requires != null && !Array.isArray(e.requires) && console.error(Ds(Fa, e.name, '"requires"', '"array"', '"' + String(e.requires) + '"'));
                break;
            case "requiresIfExists":
                Array.isArray(e.requiresIfExists) || console.error(Ds(Fa, e.name, '"requiresIfExists"', '"array"', '"' + String(e.requiresIfExists) + '"'));
                break;
            case "options":
            case "data":
                break;
            default:
                console.error('PopperJS: an invalid property has been provided to the "' + e.name + '" modifier, valid properties are ' + X9.map(function(n) {
                    return '"' + n + '"'
                }).join(", ") + '; but "' + r + '" was provided.')
            }
            e.requires && e.requires.forEach(function(n) {
                t.find(function(i) {
                    return i.name === n
                }) == null && console.error(Ds(dte, String(e.name), n, n))
            })
        })
    })
}
function xte(t, e) {
    var r = new Set;
    return t.filter(function(n) {
        var i = e(n);
        if (!r.has(i))
            return r.add(i),
            !0
    })
}
function i1(t) {
    return t.split("-")[0]
}
function pte(t) {
    var e = t.reduce(function(r, n) {
        var i = r[n.name];
        return r[n.name] = i ? Object.assign({}, i, n, {
            options: Object.assign({}, i.options, n.options),
            data: Object.assign({}, i.data, n.data)
        }) : n,
        r
    }, {});
    return Object.keys(e).map(function(r) {
        return e[r]
    })
}
function bD(t) {
    return t.split("-")[1]
}
function gte(t) {
    return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y"
}
function mte(t) {
    var e = t.reference, r = t.element, n = t.placement, i = n ? i1(n) : null, o = n ? bD(n) : null, s = e.x + e.width / 2 - r.width / 2, a = e.y + e.height / 2 - r.height / 2, l;
    switch (i) {
    case Uc:
        l = {
            x: s,
            y: e.y - r.height
        };
        break;
    case Ix:
        l = {
            x: s,
            y: e.y + e.height
        };
        break;
    case gf:
        l = {
            x: e.x + e.width,
            y: a
        };
        break;
    case dl:
        l = {
            x: e.x - r.width,
            y: a
        };
        break;
    default:
        l = {
            x: e.x,
            y: e.y
        }
    }
    var c = i ? gte(i) : null;
    if (c != null) {
        var u = c === "y" ? "height" : "width";
        switch (o) {
        case _D:
            l[c] = l[c] - (e[u] / 2 - r[u] / 2);
            break;
        case Ox:
            l[c] = l[c] + (e[u] / 2 - r[u] / 2);
            break
        }
    }
    return l
}
var K9 = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element."
  , vte = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash."
  , q9 = {
    placement: "bottom",
    modifiers: [],
    strategy: "absolute"
};
function Z9() {
    for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++)
        e[r] = arguments[r];
    return !e.some(function(n) {
        return !(n && typeof n.getBoundingClientRect == "function")
    })
}
function yte(t) {
    t === void 0 && (t = {});
    var e = t
      , r = e.defaultModifiers
      , n = r === void 0 ? [] : r
      , i = e.defaultOptions
      , o = i === void 0 ? q9 : i;
    return function(a, l, c) {
        c === void 0 && (c = o);
        var u = {
            placement: "bottom",
            orderedModifiers: [],
            options: Object.assign({}, q9, o),
            modifiersData: {},
            elements: {
                reference: a,
                popper: l
            },
            attributes: {},
            styles: {}
        }
          , f = []
          , d = !1
          , h = {
            state: u,
            setOptions: function(E) {
                var g = typeof E == "function" ? E(u.options) : E;
                y(),
                u.options = Object.assign({}, o, u.options, g),
                u.scrollParents = {
                    reference: V2(a) ? Xh(a) : a.contextElement ? Xh(a.contextElement) : [],
                    popper: Xh(l)
                };
                var p = ute(pte([].concat(n, u.options.modifiers)));
                u.orderedModifiers = p.filter(function(B) {
                    return B.enabled
                });
                {
                    var v = xte([].concat(p, u.options.modifiers), function(B) {
                        var S = B.name;
                        return S
                    });
                    if (hte(v),
                    i1(u.options.placement) === ED) {
                        var _ = u.orderedModifiers.find(function(B) {
                            var S = B.name;
                            return S === "flip"
                        });
                        _ || console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" "))
                    }
                    var b = ps(l)
                      , C = b.marginTop
                      , w = b.marginRight
                      , T = b.marginBottom
                      , A = b.marginLeft;
                    [C, w, T, A].some(function(B) {
                        return parseFloat(B)
                    }) && console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" "))
                }
                return x(),
                h.update()
            },
            forceUpdate: function() {
                if (!d) {
                    var E = u.elements
                      , g = E.reference
                      , p = E.popper;
                    if (!Z9(g, p)) {
                        console.error(K9);
                        return
                    }
                    u.rects = {
                        reference: Xee(g, yD(p), u.options.strategy === "fixed"),
                        popper: Kee(p)
                    },
                    u.reset = !1,
                    u.placement = u.options.placement,
                    u.orderedModifiers.forEach(function(B) {
                        return u.modifiersData[B.name] = Object.assign({}, B.data)
                    });
                    for (var v = 0, _ = 0; _ < u.orderedModifiers.length; _++) {
                        if (v += 1,
                        v > 100) {
                            console.error(vte);
                            break
                        }
                        if (u.reset === !0) {
                            u.reset = !1,
                            _ = -1;
                            continue
                        }
                        var b = u.orderedModifiers[_]
                          , C = b.fn
                          , w = b.options
                          , T = w === void 0 ? {} : w
                          , A = b.name;
                        typeof C == "function" && (u = C({
                            state: u,
                            options: T,
                            name: A,
                            instance: h
                        }) || u)
                    }
                }
            },
            update: fte(function() {
                return new Promise(function(m) {
                    h.forceUpdate(),
                    m(u)
                }
                )
            }),
            destroy: function() {
                y(),
                d = !0
            }
        };
        if (!Z9(a, l))
            return console.error(K9),
            h;
        h.setOptions(c).then(function(m) {
            !d && c.onFirstUpdate && c.onFirstUpdate(m)
        });
        function x() {
            u.orderedModifiers.forEach(function(m) {
                var E = m.name
                  , g = m.options
                  , p = g === void 0 ? {} : g
                  , v = m.effect;
                if (typeof v == "function") {
                    var _ = v({
                        state: u,
                        name: E,
                        instance: h,
                        options: p
                    })
                      , b = function() {};
                    f.push(_ || b)
                }
            })
        }
        function y() {
            f.forEach(function(m) {
                return m()
            }),
            f = []
        }
        return h
    }
}
var Jd = {
    passive: !0
};
function Ete(t) {
    var e = t.state
      , r = t.instance
      , n = t.options
      , i = n.scroll
      , o = i === void 0 ? !0 : i
      , s = n.resize
      , a = s === void 0 ? !0 : s
      , l = ji(e.elements.popper)
      , c = [].concat(e.scrollParents.reference, e.scrollParents.popper);
    return o && c.forEach(function(u) {
        u.addEventListener("scroll", r.update, Jd)
    }),
    a && l.addEventListener("resize", r.update, Jd),
    function() {
        o && c.forEach(function(u) {
            u.removeEventListener("scroll", r.update, Jd)
        }),
        a && l.removeEventListener("resize", r.update, Jd)
    }
}
var _te = {
    name: "eventListeners",
    enabled: !0,
    phase: "write",
    fn: function() {},
    effect: Ete,
    data: {}
};
function bte(t) {
    var e = t.state
      , r = t.name;
    e.modifiersData[r] = mte({
        reference: e.rects.reference,
        element: e.rects.popper,
        strategy: "absolute",
        placement: e.placement
    })
}
var Cte = {
    name: "popperOffsets",
    enabled: !0,
    phase: "read",
    fn: bte,
    data: {}
}
  , Ate = {
    top: "auto",
    right: "auto",
    bottom: "auto",
    left: "auto"
};
function wte(t) {
    var e = t.x
      , r = t.y
      , n = window
      , i = n.devicePixelRatio || 1;
    return {
        x: eu(e * i) / i || 0,
        y: eu(r * i) / i || 0
    }
}
function J9(t) {
    var e, r = t.popper, n = t.popperRect, i = t.placement, o = t.variation, s = t.offsets, a = t.position, l = t.gpuAcceleration, c = t.adaptive, u = t.roundOffsets, f = t.isFixed, d = s.x, h = d === void 0 ? 0 : d, x = s.y, y = x === void 0 ? 0 : x, m = typeof u == "function" ? u({
        x: h,
        y
    }) : {
        x: h,
        y
    };
    h = m.x,
    y = m.y;
    var E = s.hasOwnProperty("x")
      , g = s.hasOwnProperty("y")
      , p = dl
      , v = Uc
      , _ = window;
    if (c) {
        var b = yD(r)
          , C = "clientHeight"
          , w = "clientWidth";
        if (b === ji(r) && (b = n1(r),
        ps(b).position !== "static" && a === "absolute" && (C = "scrollHeight",
        w = "scrollWidth")),
        b = b,
        i === Uc || (i === dl || i === gf) && o === Ox) {
            v = Ix;
            var T = f && b === _ && _.visualViewport ? _.visualViewport.height : b[C];
            y -= T - n.height,
            y *= l ? 1 : -1
        }
        if (i === dl || (i === Uc || i === Ix) && o === Ox) {
            p = gf;
            var A = f && b === _ && _.visualViewport ? _.visualViewport.width : b[w];
            h -= A - n.width,
            h *= l ? 1 : -1
        }
    }
    var B = Object.assign({
        position: a
    }, c && Ate)
      , S = u === !0 ? wte({
        x: h,
        y
    }) : {
        x: h,
        y
    };
    if (h = S.x,
    y = S.y,
    l) {
        var D;
        return Object.assign({}, B, (D = {},
        D[v] = g ? "0" : "",
        D[p] = E ? "0" : "",
        D.transform = (_.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + y + "px)" : "translate3d(" + h + "px, " + y + "px, 0)",
        D))
    }
    return Object.assign({}, B, (e = {},
    e[v] = g ? y + "px" : "",
    e[p] = E ? h + "px" : "",
    e.transform = "",
    e))
}
function Bte(t) {
    var e = t.state
      , r = t.options
      , n = r.gpuAcceleration
      , i = n === void 0 ? !0 : n
      , o = r.adaptive
      , s = o === void 0 ? !0 : o
      , a = r.roundOffsets
      , l = a === void 0 ? !0 : a;
    {
        var c = ps(e.elements.popper).transitionProperty || "";
        s && ["transform", "top", "right", "bottom", "left"].some(function(f) {
            return c.indexOf(f) >= 0
        }) && console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', `

`, 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", `

`, "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" "))
    }
    var u = {
        placement: i1(e.placement),
        variation: bD(e.placement),
        popper: e.elements.popper,
        popperRect: e.rects.popper,
        gpuAcceleration: i,
        isFixed: e.options.strategy === "fixed"
    };
    e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, J9(Object.assign({}, u, {
        offsets: e.modifiersData.popperOffsets,
        position: e.options.strategy,
        adaptive: s,
        roundOffsets: l
    })))),
    e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, J9(Object.assign({}, u, {
        offsets: e.modifiersData.arrow,
        position: "absolute",
        adaptive: !1,
        roundOffsets: l
    })))),
    e.attributes.popper = Object.assign({}, e.attributes.popper, {
        "data-popper-placement": e.placement
    })
}
var Ste = {
    name: "computeStyles",
    enabled: !0,
    phase: "beforeWrite",
    fn: Bte,
    data: {}
};
function Tte(t) {
    var e = t.state;
    Object.keys(e.elements).forEach(function(r) {
        var n = e.styles[r] || {}
          , i = e.attributes[r] || {}
          , o = e.elements[r];
        !Li(o) || !xs(o) || (Object.assign(o.style, n),
        Object.keys(i).forEach(function(s) {
            var a = i[s];
            a === !1 ? o.removeAttribute(s) : o.setAttribute(s, a === !0 ? "" : a)
        }))
    })
}
function Dte(t) {
    var e = t.state
      , r = {
        popper: {
            position: e.options.strategy,
            left: "0",
            top: "0",
            margin: "0"
        },
        arrow: {
            position: "absolute"
        },
        reference: {}
    };
    return Object.assign(e.elements.popper.style, r.popper),
    e.styles = r,
    e.elements.arrow && Object.assign(e.elements.arrow.style, r.arrow),
    function() {
        Object.keys(e.elements).forEach(function(n) {
            var i = e.elements[n]
              , o = e.attributes[n] || {}
              , s = Object.keys(e.styles.hasOwnProperty(n) ? e.styles[n] : r[n])
              , a = s.reduce(function(l, c) {
                return l[c] = "",
                l
            }, {});
            !Li(i) || !xs(i) || (Object.assign(i.style, a),
            Object.keys(o).forEach(function(l) {
                i.removeAttribute(l)
            }))
        })
    }
}
var Fte = {
    name: "applyStyles",
    enabled: !0,
    phase: "write",
    fn: Tte,
    effect: Dte,
    requires: ["computeStyles"]
}
  , Pte = [_te, Cte, Ste, Fte]
  , Ite = yte({
    defaultModifiers: Pte
});
function Ote(t, e, r) {
    var n = i1(t)
      , i = [dl, Uc].indexOf(n) >= 0 ? -1 : 1
      , o = typeof r == "function" ? r(Object.assign({}, e, {
        placement: t
    })) : r
      , s = o[0]
      , a = o[1];
    return s = s || 0,
    a = (a || 0) * i,
    [dl, gf].indexOf(n) >= 0 ? {
        x: a,
        y: s
    } : {
        x: s,
        y: a
    }
}
function kte(t) {
    var e = t.state
      , r = t.options
      , n = t.name
      , i = r.offset
      , o = i === void 0 ? [0, 0] : i
      , s = Qee.reduce(function(u, f) {
        return u[f] = Ote(f, e.rects, o),
        u
    }, {})
      , a = s[e.placement]
      , l = a.x
      , c = a.y;
    e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += l,
    e.modifiersData.popperOffsets.y += c),
    e.modifiersData[n] = s
}
var Rte = {
    name: "offset",
    enabled: !0,
    phase: "main",
    requires: ["popperOffsets"],
    fn: kte
};
const [Mte,Pa] = Se("popover")
  , Nte = ["overlay", "duration", "teleport", "overlayStyle", "overlayClass", "closeOnClickOverlay"]
  , Lte = {
    show: Boolean,
    theme: Ie("light"),
    overlay: Boolean,
    actions: ds(),
    actionsDirection: Ie("vertical"),
    trigger: Ie("click"),
    duration: Ae,
    showArrow: Ee,
    placement: Ie("bottom"),
    iconPrefix: String,
    overlayClass: hr,
    overlayStyle: Object,
    closeOnClickAction: Ee,
    closeOnClickOverlay: Ee,
    closeOnClickOutside: Ee,
    offset: {
        type: Array,
        default: () => [0, 8]
    },
    teleport: {
        type: [String, Object],
        default: "body"
    }
};
var $te = be({
    name: Mte,
    props: Lte,
    emits: ["select", "touchstart", "update:show"],
    setup(t, {emit: e, slots: r, attrs: n}) {
        let i;
        const o = ie()
          , s = ie()
          , a = ie()
          , l = kZ( () => t.show, g => e("update:show", g))
          , c = () => ({
            placement: t.placement,
            modifiers: [{
                name: "computeStyles",
                options: {
                    adaptive: !1,
                    gpuAcceleration: !1
                }
            }, We({}, Rte, {
                options: {
                    offset: t.offset
                }
            })]
        })
          , u = () => s.value && a.value ? Ite(s.value, a.value.popupRef.value, c()) : null
          , f = () => {
            Xe( () => {
                l.value && (i ? i.setOptions(c()) : (i = u(),
                _o && (window.addEventListener("animationend", f),
                window.addEventListener("transitionend", f))))
            }
            )
        }
          , d = g => {
            l.value = g
        }
          , h = () => {
            t.trigger === "click" && (l.value = !l.value)
        }
          , x = (g, p) => {
            g.disabled || (e("select", g, p),
            t.closeOnClickAction && (l.value = !1))
        }
          , y = () => {
            l.value && t.closeOnClickOutside && (!t.overlay || t.closeOnClickOverlay) && (l.value = !1)
        }
          , m = (g, p) => r.action ? r.action({
            action: g,
            index: p
        }) : [g.icon && O(rr, {
            name: g.icon,
            classPrefix: t.iconPrefix,
            class: Pa("action-icon")
        }, null), O("div", {
            class: [Pa("action-text"), {
                [Oq]: t.actionsDirection === "vertical"
            }]
        }, [g.text])]
          , E = (g, p) => {
            const {icon: v, color: _, disabled: b, className: C} = g;
            return O("div", {
                role: "menuitem",
                class: [Pa("action", {
                    disabled: b,
                    "with-icon": v
                }), {
                    [Iq]: t.actionsDirection === "horizontal"
                }, C],
                style: {
                    color: _
                },
                tabindex: b ? void 0 : 0,
                "aria-disabled": b || void 0,
                onClick: () => x(g, p)
            }, [m(g, p)])
        }
        ;
        return Ht( () => {
            f(),
            Au( () => {
                var g;
                o.value = (g = a.value) == null ? void 0 : g.popupRef.value
            }
            )
        }
        ),
        Zn( () => {
            i && (_o && (window.removeEventListener("animationend", f),
            window.removeEventListener("transitionend", f)),
            i.destroy(),
            i = null)
        }
        ),
        me( () => [l.value, t.offset, t.placement], f),
        MS([s, o], y, {
            eventName: "touchstart"
        }),
        () => {
            var g;
            return O(Nt, null, [O("span", {
                ref: s,
                class: Pa("wrapper"),
                onClick: h
            }, [(g = r.reference) == null ? void 0 : g.call(r)]), O(Wl, st({
                ref: a,
                show: l.value,
                class: Pa([t.theme]),
                position: "",
                transition: "van-popover-zoom",
                lockScroll: !1,
                "onUpdate:show": d
            }, n, _y(), $t(t, Nte)), {
                default: () => [t.showArrow && O("div", {
                    class: Pa("arrow")
                }, null), O("div", {
                    role: "menu",
                    class: Pa("content", t.actionsDirection)
                }, [r.default ? r.default() : t.actions.map(E)])]
            })])
        }
    }
});
const d6e = Oe($te)
  , [Ute,Eg] = Se("progress")
  , Gte = {
    color: String,
    inactive: Boolean,
    pivotText: String,
    textColor: String,
    showPivot: Ee,
    pivotColor: String,
    trackColor: String,
    strokeWidth: Ae,
    percentage: {
        type: Ae,
        default: 0,
        validator: t => +t >= 0 && +t <= 100
    }
};
var Hte = be({
    name: Ute,
    props: Gte,
    setup(t) {
        const e = ae( () => t.inactive ? void 0 : t.color)
          , r = i => Math.min(Math.max(+i, 0), 100)
          , n = () => {
            const {textColor: i, pivotText: o, pivotColor: s, percentage: a} = t
              , l = r(a)
              , c = o ?? `${a}%`;
            if (t.showPivot && c) {
                const u = {
                    color: i,
                    left: `${l}%`,
                    transform: `translate(-${l}%,-50%)`,
                    background: s || e.value
                };
                return O("span", {
                    style: u,
                    class: Eg("pivot", {
                        inactive: t.inactive
                    })
                }, [c])
            }
        }
        ;
        return () => {
            const {trackColor: i, percentage: o, strokeWidth: s} = t
              , a = r(o)
              , l = {
                background: i,
                height: rt(s)
            }
              , c = {
                width: `${a}%`,
                background: e.value
            };
            return O("div", {
                class: Eg(),
                style: l
            }, [O("span", {
                class: Eg("portion", {
                    inactive: t.inactive
                }),
                style: c
            }, null), n()])
        }
    }
});
const h6e = Oe(Hte)
  , [Vte,Xu,zte] = Se("pull-refresh")
  , CD = 50
  , jte = ["pulling", "loosing", "success"]
  , Wte = {
    disabled: Boolean,
    modelValue: Boolean,
    headHeight: ze(CD),
    successText: String,
    pullingText: String,
    loosingText: String,
    loadingText: String,
    pullDistance: Ae,
    successDuration: ze(500),
    animationDuration: ze(300)
};
var Yte = be({
    name: Vte,
    props: Wte,
    emits: ["change", "refresh", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        let n;
        const i = ie()
          , o = ie()
          , s = nd(i)
          , a = It({
            status: "normal",
            distance: 0,
            duration: 0
        })
          , l = jl()
          , c = () => {
            if (t.headHeight !== CD)
                return {
                    height: `${t.headHeight}px`
                }
        }
          , u = () => a.status !== "loading" && a.status !== "success" && !t.disabled
          , f = v => {
            const _ = +(t.pullDistance || t.headHeight);
            return v > _ && (v < _ * 2 ? v = _ + (v - _) / 2 : v = _ * 1.5 + (v - _ * 2) / 4),
            Math.round(v)
        }
          , d = (v, _) => {
            const b = +(t.pullDistance || t.headHeight);
            a.distance = v,
            _ ? a.status = "loading" : v === 0 ? a.status = "normal" : v < b ? a.status = "pulling" : a.status = "loosing",
            e("change", {
                status: a.status,
                distance: v
            })
        }
          , h = () => {
            const {status: v} = a;
            return v === "normal" ? "" : t[`${v}Text`] || zte(v)
        }
          , x = () => {
            const {status: v, distance: _} = a;
            if (r[v])
                return r[v]({
                    distance: _
                });
            const b = [];
            return jte.includes(v) && b.push(O("div", {
                class: Xu("text")
            }, [h()])),
            v === "loading" && b.push(O(bs, {
                class: Xu("loading")
            }, {
                default: h
            })),
            b
        }
          , y = () => {
            a.status = "success",
            setTimeout( () => {
                d(0)
            }
            , +t.successDuration)
        }
          , m = v => {
            n = id(s.value) === 0,
            n && (a.duration = 0,
            l.start(v))
        }
          , E = v => {
            u() && m(v)
        }
          , g = v => {
            if (u()) {
                n || m(v);
                const {deltaY: _} = l;
                l.move(v),
                n && _.value >= 0 && l.isVertical() && (Rr(v),
                d(f(_.value)))
            }
        }
          , p = () => {
            n && l.deltaY.value && u() && (a.duration = +t.animationDuration,
            a.status === "loosing" ? (d(+t.headHeight, !0),
            e("update:modelValue", !0),
            Xe( () => e("refresh"))) : d(0))
        }
        ;
        return me( () => t.modelValue, v => {
            a.duration = +t.animationDuration,
            v ? d(+t.headHeight, !0) : r.success || t.successText ? y() : d(0, !1)
        }
        ),
        yn("touchmove", g, {
            target: o
        }),
        () => {
            var v;
            const _ = {
                transitionDuration: `${a.duration}ms`,
                transform: a.distance ? `translate3d(0,${a.distance}px, 0)` : ""
            };
            return O("div", {
                ref: i,
                class: Xu()
            }, [O("div", {
                ref: o,
                class: Xu("track"),
                style: _,
                onTouchstartPassive: E,
                onTouchend: p,
                onTouchcancel: p
            }, [O("div", {
                class: Xu("head"),
                style: c()
            }, [x()]), (v = r.default) == null ? void 0 : v.call(r)])])
        }
    }
});
const x6e = Oe(Yte)
  , p6e = Oe(PQ)
  , [AD,Xte] = Se("sidebar")
  , wD = Symbol(AD)
  , Kte = {
    modelValue: ze(0)
};
var qte = be({
    name: AD,
    props: Kte,
    emits: ["change", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const {linkChildren: n} = zi(wD)
          , i = () => +t.modelValue;
        return n({
            getActive: i,
            setActive: s => {
                s !== i() && (e("update:modelValue", s),
                e("change", s))
            }
        }),
        () => {
            var s;
            return O("div", {
                role: "tablist",
                class: Xte()
            }, [(s = r.default) == null ? void 0 : s.call(r)])
        }
    }
});
const g6e = Oe(qte)
  , [Zte,Q9] = Se("sidebar-item")
  , Jte = We({}, Tu, {
    dot: Boolean,
    title: String,
    badge: Ae,
    disabled: Boolean,
    badgeProps: Object
});
var Qte = be({
    name: Zte,
    props: Jte,
    emits: ["click"],
    setup(t, {emit: e, slots: r}) {
        const n = od()
          , {parent: i, index: o} = Jn(wD);
        if (!i) {
            console.error("[Vant] <SidebarItem> must be a child component of <Sidebar>.");
            return
        }
        const s = () => {
            t.disabled || (e("click", o.value),
            i.setActive(o.value),
            n())
        }
        ;
        return () => {
            const {dot: a, badge: l, title: c, disabled: u} = t
              , f = o.value === i.getActive();
            return O("div", {
                role: "tab",
                class: Q9({
                    select: f,
                    disabled: u
                }),
                tabindex: u ? void 0 : 0,
                "aria-selected": f,
                onClick: s
            }, [O(Jp, st({
                dot: a,
                class: Q9("text"),
                content: l
            }, t.badgeProps), {
                default: () => [r.title ? r.title() : c]
            })])
        }
    }
});
const m6e = Oe(Qte)
  , [ere,tre] = Se("skeleton-title")
  , rre = {
    round: Boolean,
    titleWidth: Ae
};
var nre = be({
    name: ere,
    props: rre,
    setup(t) {
        return () => O("h3", {
            class: tre([{
                round: t.round
            }]),
            style: {
                width: rt(t.titleWidth)
            }
        }, null)
    }
});
const ire = Oe(nre);
var ore = ire;
const [sre,are] = Se("skeleton-avatar")
  , lre = {
    avatarSize: Ae,
    avatarShape: Ie("round")
};
var cre = be({
    name: sre,
    props: lre,
    setup(t) {
        return () => O("div", {
            class: are([t.avatarShape]),
            style: zl(t.avatarSize)
        }, null)
    }
});
const ure = Oe(cre);
var fre = ure;
const W2 = "100%"
  , dre = {
    round: Boolean,
    rowWidth: {
        type: Ae,
        default: W2
    }
}
  , [hre,xre] = Se("skeleton-paragraph");
var pre = be({
    name: hre,
    props: dre,
    setup(t) {
        return () => O("div", {
            class: xre([{
                round: t.round
            }]),
            style: {
                width: t.rowWidth
            }
        }, null)
    }
});
const gre = Oe(pre);
var mre = gre;
const [vre,eA] = Se("skeleton")
  , yre = "60%"
  , Ere = {
    row: ze(0),
    round: Boolean,
    title: Boolean,
    titleWidth: Ae,
    avatar: Boolean,
    avatarSize: Ae,
    avatarShape: Ie("round"),
    loading: Ee,
    animate: Ee,
    rowWidth: {
        type: [Number, String, Array],
        default: W2
    }
};
var _re = be({
    name: vre,
    inheritAttrs: !1,
    props: Ere,
    setup(t, {slots: e, attrs: r}) {
        const n = () => {
            if (t.avatar)
                return O(fre, {
                    avatarShape: t.avatarShape,
                    avatarSize: t.avatarSize
                }, null)
        }
          , i = () => {
            if (t.title)
                return O(ore, {
                    round: t.round,
                    titleWidth: t.titleWidth
                }, null)
        }
          , o = l => {
            const {rowWidth: c} = t;
            return c === W2 && l === +t.row - 1 ? yre : Array.isArray(c) ? c[l] : c
        }
          , s = () => Array(+t.row).fill("").map( (l, c) => O(mre, {
            key: c,
            round: t.round,
            rowWidth: rt(o(c))
        }, null))
          , a = () => e.template ? e.template() : O(Nt, null, [n(), O("div", {
            class: eA("content")
        }, [i(), s()])]);
        return () => {
            var l;
            return t.loading ? O("div", st({
                class: eA({
                    animate: t.animate,
                    round: t.round
                })
            }, r), [a()]) : (l = e.default) == null ? void 0 : l.call(e)
        }
    }
});
const v6e = Oe(_re)
  , [bre,Ku] = Se("slider")
  , Cre = {
    min: ze(0),
    max: ze(100),
    step: ze(1),
    range: Boolean,
    reverse: Boolean,
    disabled: Boolean,
    readonly: Boolean,
    vertical: Boolean,
    barHeight: Ae,
    buttonSize: Ae,
    activeColor: String,
    inactiveColor: String,
    modelValue: {
        type: [Number, Array],
        default: 0
    }
};
var Are = be({
    name: bre,
    props: Cre,
    emits: ["change", "dragEnd", "dragStart", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        let n, i, o;
        const s = ie()
          , a = [ie(), ie()]
          , l = ie()
          , c = jl()
          , u = ae( () => Number(t.max) - Number(t.min))
          , f = ae( () => {
            const B = t.vertical ? "width" : "height";
            return {
                background: t.inactiveColor,
                [B]: rt(t.barHeight)
            }
        }
        )
          , d = B => t.range && Array.isArray(B)
          , h = () => {
            const {modelValue: B, min: S} = t;
            return d(B) ? `${(B[1] - B[0]) * 100 / u.value}%` : `${(B - Number(S)) * 100 / u.value}%`
        }
          , x = () => {
            const {modelValue: B, min: S} = t;
            return d(B) ? `${(B[0] - Number(S)) * 100 / u.value}%` : "0%"
        }
          , y = ae( () => {
            const S = {
                [t.vertical ? "height" : "width"]: h(),
                background: t.activeColor
            };
            l.value && (S.transition = "none");
            const D = () => t.vertical ? t.reverse ? "bottom" : "top" : t.reverse ? "right" : "left";
            return S[D()] = x(),
            S
        }
        )
          , m = B => {
            const S = +t.min
              , D = +t.max
              , F = +t.step;
            B = Gr(B, S, D);
            const R = Math.round((B - S) / F) * F;
            return _7(S, R)
        }
          , E = () => {
            const B = t.modelValue;
            d(B) ? o = B.map(m) : o = m(B)
        }
          , g = B => {
            var S, D;
            const F = (S = B[0]) != null ? S : Number(t.min)
              , R = (D = B[1]) != null ? D : Number(t.max);
            return F > R ? [R, F] : [F, R]
        }
          , p = (B, S) => {
            d(B) ? B = g(B).map(m) : B = m(B),
            ta(B, t.modelValue) || e("update:modelValue", B),
            S && !ta(B, o) && e("change", B)
        }
          , v = B => {
            if (B.stopPropagation(),
            t.disabled || t.readonly)
                return;
            E();
            const {min: S, reverse: D, vertical: F, modelValue: R} = t
              , P = Cr(s)
              , N = () => F ? D ? P.bottom - B.clientY : B.clientY - P.top : D ? P.right - B.clientX : B.clientX - P.left
              , j = F ? P.height : P.width
              , K = Number(S) + N() / j * u.value;
            if (d(R)) {
                const [oe,U] = R
                  , $ = (oe + U) / 2;
                K <= $ ? p([K, U], !0) : p([oe, K], !0)
            } else
                p(K, !0)
        }
          , _ = B => {
            t.disabled || t.readonly || (c.start(B),
            i = t.modelValue,
            E(),
            l.value = "start")
        }
          , b = B => {
            if (t.disabled || t.readonly)
                return;
            l.value === "start" && e("dragStart", B),
            Rr(B, !0),
            c.move(B),
            l.value = "dragging";
            const S = Cr(s)
              , D = t.vertical ? c.deltaY.value : c.deltaX.value
              , F = t.vertical ? S.height : S.width;
            let R = D / F * u.value;
            if (t.reverse && (R = -R),
            d(o)) {
                const P = t.reverse ? 1 - n : n;
                i[P] = o[P] + R
            } else
                i = o + R;
            p(i)
        }
          , C = B => {
            t.disabled || t.readonly || (l.value === "dragging" && (p(i, !0),
            e("dragEnd", B)),
            l.value = "")
        }
          , w = B => typeof B == "number" ? Ku("button-wrapper", ["left", "right"][B]) : Ku("button-wrapper", t.reverse ? "left" : "right")
          , T = (B, S) => {
            const D = l.value === "dragging";
            if (typeof S == "number") {
                const F = r[S === 0 ? "left-button" : "right-button"];
                let R;
                if (D && Array.isArray(i) && (R = i[0] > i[1] ? n ^ 1 : n),
                F)
                    return F({
                        value: B,
                        dragging: D,
                        dragIndex: R
                    })
            }
            return r.button ? r.button({
                value: B,
                dragging: D
            }) : O("div", {
                class: Ku("button"),
                style: zl(t.buttonSize)
            }, null)
        }
          , A = B => {
            const S = typeof B == "number" ? t.modelValue[B] : t.modelValue;
            return O("div", {
                ref: a[B ?? 0],
                role: "slider",
                class: w(B),
                tabindex: t.disabled ? void 0 : 0,
                "aria-valuemin": t.min,
                "aria-valuenow": S,
                "aria-valuemax": t.max,
                "aria-disabled": t.disabled || void 0,
                "aria-readonly": t.readonly || void 0,
                "aria-orientation": t.vertical ? "vertical" : "horizontal",
                onTouchstartPassive: D => {
                    typeof B == "number" && (n = B),
                    _(D)
                }
                ,
                onTouchend: C,
                onTouchcancel: C,
                onClick: v7
            }, [T(S, B)])
        }
        ;
        return p(t.modelValue),
        Vl( () => t.modelValue),
        a.forEach(B => {
            yn("touchmove", b, {
                target: B
            })
        }
        ),
        () => O("div", {
            ref: s,
            style: f.value,
            class: Ku({
                vertical: t.vertical,
                disabled: t.disabled
            }),
            onClick: v
        }, [O("div", {
            class: Ku("bar"),
            style: y.value
        }, [t.range ? [A(0), A(1)] : A()])])
    }
});
const y6e = Oe(Are)
  , [tA,wre] = Se("space")
  , Bre = {
    align: String,
    direction: {
        type: String,
        default: "horizontal"
    },
    size: {
        type: [Number, String, Array],
        default: 8
    },
    wrap: Boolean,
    fill: Boolean
};
function BD(t=[]) {
    const e = [];
    return t.forEach(r => {
        Array.isArray(r) ? e.push(...r) : r.type === Nt ? e.push(...BD(r.children)) : e.push(r)
    }
    ),
    e.filter(r => {
        var n;
        return !(r && (r.type === tr || r.type === Nt && ((n = r.children) == null ? void 0 : n.length) === 0 || r.type === yo && r.children.trim() === ""))
    }
    )
}
var Sre = be({
    name: tA,
    props: Bre,
    setup(t, {slots: e}) {
        const r = ae( () => {
            var o;
            return (o = t.align) != null ? o : t.direction === "horizontal" ? "center" : ""
        }
        )
          , n = o => typeof o == "number" ? o + "px" : o
          , i = o => {
            const s = {}
              , a = `${n(Array.isArray(t.size) ? t.size[0] : t.size)}`
              , l = `${n(Array.isArray(t.size) ? t.size[1] : t.size)}`;
            return o ? t.wrap ? {
                marginBottom: l
            } : {} : (t.direction === "horizontal" && (s.marginRight = a),
            (t.direction === "vertical" || t.wrap) && (s.marginBottom = l),
            s)
        }
        ;
        return () => {
            var o;
            const s = BD((o = e.default) == null ? void 0 : o.call(e));
            return O("div", {
                class: [wre({
                    [t.direction]: t.direction,
                    [`align-${r.value}`]: r.value,
                    wrap: t.wrap,
                    fill: t.fill
                })]
            }, [s.map( (a, l) => O("div", {
                key: `item-${l}`,
                class: `${tA}-item`,
                style: i(l === s.length - 1)
            }, [a]))])
        }
    }
});
const E6e = Oe(Sre)
  , [Tre,Qd] = Se("stepper")
  , Dre = 200
  , eh = (t, e) => String(t) === String(e)
  , Fre = {
    min: ze(1),
    max: ze(1 / 0),
    name: ze(""),
    step: ze(1),
    theme: String,
    integer: Boolean,
    disabled: Boolean,
    showPlus: Ee,
    showMinus: Ee,
    showInput: Ee,
    longPress: Ee,
    autoFixed: Ee,
    allowEmpty: Boolean,
    modelValue: Ae,
    inputWidth: Ae,
    buttonSize: Ae,
    placeholder: String,
    disablePlus: Boolean,
    disableMinus: Boolean,
    disableInput: Boolean,
    beforeChange: Function,
    defaultValue: ze(1),
    decimalLength: Ae
};
var Pre = be({
    name: Tre,
    props: Fre,
    emits: ["plus", "blur", "minus", "focus", "change", "overlimit", "update:modelValue"],
    setup(t, {emit: e}) {
        const r = (w, T=!0) => {
            const {min: A, max: B, allowEmpty: S, decimalLength: D} = t;
            return S && w === "" || (typeof w == "number" && String(w).includes("e") && (w = w.toFixed(D ? +D : 17)),
            w = yy(String(w), !t.integer),
            w = w === "" ? 0 : +w,
            w = Number.isNaN(w) ? +A : w,
            w = T ? Math.max(Math.min(+B, w), +A) : w,
            Lt(D) && (w = w.toFixed(+D))),
            w
        }
          , n = () => {
            var w;
            const T = (w = t.modelValue) != null ? w : t.defaultValue
              , A = r(T);
            return eh(A, t.modelValue) || e("update:modelValue", A),
            A
        }
        ;
        let i;
        const o = ie()
          , s = ie(n())
          , a = ae( () => t.disabled || t.disableMinus || +s.value <= +t.min)
          , l = ae( () => t.disabled || t.disablePlus || +s.value >= +t.max)
          , c = ae( () => ({
            width: rt(t.inputWidth),
            height: rt(t.buttonSize)
        }))
          , u = ae( () => zl(t.buttonSize))
          , f = () => {
            const w = r(s.value);
            eh(w, s.value) || (s.value = w)
        }
          , d = w => {
            t.beforeChange ? Su(t.beforeChange, {
                args: [w],
                done() {
                    s.value = w
                }
            }) : s.value = w
        }
          , h = () => {
            if (i === "plus" && l.value || i === "minus" && a.value) {
                e("overlimit", i);
                return
            }
            const w = i === "minus" ? -t.step : +t.step
              , T = r(_7(+s.value, w));
            d(T),
            e(i)
        }
          , x = w => {
            const T = w.target
              , {value: A} = T
              , {decimalLength: B} = t;
            let S = yy(String(A), !t.integer);
            if (Lt(B) && S.includes(".")) {
                const F = S.split(".");
                S = `${F[0]}.${F[1].slice(0, +B)}`
            }
            t.beforeChange ? T.value = String(s.value) : eh(A, S) || (T.value = S);
            const D = S === String(+S);
            d(D ? +S : S)
        }
          , y = w => {
            var T;
            t.disableInput ? (T = o.value) == null || T.blur() : e("focus", w)
        }
          , m = w => {
            const T = w.target
              , A = r(T.value, t.autoFixed);
            T.value = String(A),
            s.value = A,
            Xe( () => {
                e("blur", w),
                m7()
            }
            )
        }
        ;
        let E, g;
        const p = () => {
            g = setTimeout( () => {
                h(),
                p()
            }
            , Dre)
        }
          , v = () => {
            t.longPress && (E = !1,
            clearTimeout(g),
            g = setTimeout( () => {
                E = !0,
                h(),
                p()
            }
            , B7))
        }
          , _ = w => {
            t.longPress && (clearTimeout(g),
            E && Rr(w))
        }
          , b = w => {
            t.disableInput && Rr(w)
        }
          , C = w => ({
            onClick: T => {
                Rr(T),
                i = w,
                h()
            }
            ,
            onTouchstartPassive: () => {
                i = w,
                v()
            }
            ,
            onTouchend: _,
            onTouchcancel: _
        });
        return me( () => [t.max, t.min, t.integer, t.decimalLength], f),
        me( () => t.modelValue, w => {
            eh(w, s.value) || (s.value = r(w))
        }
        ),
        me(s, w => {
            e("update:modelValue", w),
            e("change", w, {
                name: t.name
            })
        }
        ),
        Vl( () => t.modelValue),
        () => O("div", {
            role: "group",
            class: Qd([t.theme])
        }, [hi(O("button", st({
            type: "button",
            style: u.value,
            class: [Qd("minus", {
                disabled: a.value
            }), {
                [hs]: !a.value
            }],
            "aria-disabled": a.value || void 0
        }, C("minus")), null), [[pi, t.showMinus]]), hi(O("input", {
            ref: o,
            type: t.integer ? "tel" : "text",
            role: "spinbutton",
            class: Qd("input"),
            value: s.value,
            style: c.value,
            disabled: t.disabled,
            readonly: t.disableInput,
            inputmode: t.integer ? "numeric" : "decimal",
            placeholder: t.placeholder,
            autocomplete: "off",
            "aria-valuemax": t.max,
            "aria-valuemin": t.min,
            "aria-valuenow": s.value,
            onBlur: m,
            onInput: x,
            onFocus: y,
            onMousedown: b
        }, null), [[pi, t.showInput]]), hi(O("button", st({
            type: "button",
            style: u.value,
            class: [Qd("plus", {
                disabled: l.value
            }), {
                [hs]: !l.value
            }],
            "aria-disabled": l.value || void 0
        }, C("plus")), null), [[pi, t.showPlus]])])
    }
});
const _6e = Oe(Pre)
  , [Ire,yr,Ore] = Se("uploader");
function rA(t, e) {
    return new Promise(r => {
        if (e === "file") {
            r();
            return
        }
        const n = new FileReader;
        n.onload = i => {
            r(i.target.result)
        }
        ,
        e === "dataUrl" ? n.readAsDataURL(t) : e === "text" && n.readAsText(t)
    }
    )
}
function SD(t, e) {
    return Tx(t).some(r => r.file ? Zc(e) ? e(r.file) : r.file.size > +e : !1)
}
function kre(t, e) {
    const r = []
      , n = [];
    return t.forEach(i => {
        SD(i, e) ? n.push(i) : r.push(i)
    }
    ),
    {
        valid: r,
        invalid: n
    }
}
const Rre = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg|avif)/i
  , Mre = t => Rre.test(t);
function TD(t) {
    return t.isImage ? !0 : t.file && t.file.type ? t.file.type.indexOf("image") === 0 : t.url ? Mre(t.url) : typeof t.content == "string" ? t.content.indexOf("data:image") === 0 : !1
}
var Nre = be({
    props: {
        name: Ae,
        item: dn(Object),
        index: Number,
        imageFit: String,
        lazyLoad: Boolean,
        deletable: Boolean,
        reupload: Boolean,
        previewSize: [Number, String, Array],
        beforeDelete: Function
    },
    emits: ["delete", "preview", "reupload"],
    setup(t, {emit: e, slots: r}) {
        const n = () => {
            const {status: u, message: f} = t.item;
            if (u === "uploading" || u === "failed") {
                const d = u === "failed" ? O(rr, {
                    name: "close",
                    class: yr("mask-icon")
                }, null) : O(bs, {
                    class: yr("loading")
                }, null)
                  , h = Lt(f) && f !== "";
                return O("div", {
                    class: yr("mask")
                }, [d, h && O("div", {
                    class: yr("mask-message")
                }, [f])])
            }
        }
          , i = u => {
            const {name: f, item: d, index: h, beforeDelete: x} = t;
            u.stopPropagation(),
            Su(x, {
                args: [d, {
                    name: f,
                    index: h
                }],
                done: () => e("delete")
            })
        }
          , o = () => e("preview")
          , s = () => e("reupload")
          , a = () => {
            if (t.deletable && t.item.status !== "uploading") {
                const u = r["preview-delete"];
                return O("div", {
                    role: "button",
                    class: yr("preview-delete", {
                        shadow: !u
                    }),
                    tabindex: 0,
                    "aria-label": Ore("delete"),
                    onClick: i
                }, [u ? u() : O(rr, {
                    name: "cross",
                    class: yr("preview-delete-icon")
                }, null)])
            }
        }
          , l = () => {
            if (r["preview-cover"]) {
                const {index: u, item: f} = t;
                return O("div", {
                    class: yr("preview-cover")
                }, [r["preview-cover"](We({
                    index: u
                }, f))])
            }
        }
          , c = () => {
            const {item: u, lazyLoad: f, imageFit: d, previewSize: h, reupload: x} = t;
            return TD(u) ? O(sD, {
                fit: d,
                src: u.objectUrl || u.content || u.url,
                class: yr("preview-image"),
                width: Array.isArray(h) ? h[0] : h,
                height: Array.isArray(h) ? h[1] : h,
                lazyLoad: f,
                onClick: x ? s : o
            }, {
                default: l
            }) : O("div", {
                class: yr("file"),
                style: zl(t.previewSize)
            }, [O(rr, {
                class: yr("file-icon"),
                name: "description"
            }, null), O("div", {
                class: [yr("file-name"), "van-ellipsis"]
            }, [u.file ? u.file.name : u.url]), l()])
        }
        ;
        return () => O("div", {
            class: yr("preview")
        }, [c(), n(), a()])
    }
});
const Lre = {
    name: ze(""),
    accept: Ie("image/*"),
    capture: String,
    multiple: Boolean,
    disabled: Boolean,
    readonly: Boolean,
    lazyLoad: Boolean,
    maxCount: ze(1 / 0),
    imageFit: Ie("cover"),
    resultType: Ie("dataUrl"),
    uploadIcon: Ie("photograph"),
    uploadText: String,
    deletable: Ee,
    reupload: Boolean,
    afterRead: Function,
    showUpload: Ee,
    modelValue: ds(),
    beforeRead: Function,
    beforeDelete: Function,
    previewSize: [Number, String, Array],
    previewImage: Ee,
    previewOptions: Object,
    previewFullImage: Ee,
    maxSize: {
        type: [Number, String, Function],
        default: 1 / 0
    }
};
var $re = be({
    name: Ire,
    props: Lre,
    emits: ["delete", "oversize", "clickUpload", "closePreview", "clickPreview", "clickReupload", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const n = ie()
          , i = []
          , o = ie(-1)
          , s = ie(!1)
          , a = (w=t.modelValue.length) => ({
            name: t.name,
            index: w
        })
          , l = () => {
            n.value && (n.value.value = "")
        }
          , c = w => {
            if (l(),
            SD(w, t.maxSize))
                if (Array.isArray(w)) {
                    const T = kre(w, t.maxSize);
                    if (w = T.valid,
                    e("oversize", T.invalid, a()),
                    !w.length)
                        return
                } else {
                    e("oversize", w, a());
                    return
                }
            if (w = It(w),
            o.value > -1) {
                const T = [...t.modelValue];
                T.splice(o.value, 1, w),
                e("update:modelValue", T),
                o.value = -1
            } else
                e("update:modelValue", [...t.modelValue, ...Tx(w)]);
            t.afterRead && t.afterRead(w, a())
        }
          , u = w => {
            const {maxCount: T, modelValue: A, resultType: B} = t;
            if (Array.isArray(w)) {
                const S = +T - A.length;
                w.length > S && (w = w.slice(0, S)),
                Promise.all(w.map(D => rA(D, B))).then(D => {
                    const F = w.map( (R, P) => {
                        const N = {
                            file: R,
                            status: "",
                            message: "",
                            objectUrl: URL.createObjectURL(R)
                        };
                        return D[P] && (N.content = D[P]),
                        N
                    }
                    );
                    c(F)
                }
                )
            } else
                rA(w, B).then(S => {
                    const D = {
                        file: w,
                        status: "",
                        message: "",
                        objectUrl: URL.createObjectURL(w)
                    };
                    S && (D.content = S),
                    c(D)
                }
                )
        }
          , f = w => {
            const {files: T} = w.target;
            if (t.disabled || !T || !T.length)
                return;
            const A = T.length === 1 ? T[0] : [].slice.call(T);
            if (t.beforeRead) {
                const B = t.beforeRead(A, a());
                if (!B) {
                    l();
                    return
                }
                if (P2(B)) {
                    B.then(S => {
                        u(S || A)
                    }
                    ).catch(l);
                    return
                }
            }
            u(A)
        }
        ;
        let d;
        const h = () => e("closePreview")
          , x = w => {
            if (t.previewFullImage) {
                const T = t.modelValue.filter(TD)
                  , A = T.map(B => (B.objectUrl && !B.url && B.status !== "failed" && (B.url = B.objectUrl,
                i.push(B.url)),
                B.url)).filter(Boolean);
                d = Bee(We({
                    images: A,
                    startPosition: T.indexOf(w),
                    onClose: h
                }, t.previewOptions))
            }
        }
          , y = () => {
            d && d.close()
        }
          , m = (w, T) => {
            const A = t.modelValue.slice(0);
            A.splice(T, 1),
            e("update:modelValue", A),
            e("delete", w, a(T))
        }
          , E = w => {
            s.value = !0,
            o.value = w,
            Xe( () => C())
        }
          , g = () => {
            s.value || (o.value = -1),
            s.value = !1
        }
          , p = (w, T) => {
            const A = ["imageFit", "deletable", "reupload", "previewSize", "beforeDelete"]
              , B = We($t(t, A), $t(w, A, !0));
            return O(Nre, st({
                item: w,
                index: T,
                onClick: () => e(t.reupload ? "clickReupload" : "clickPreview", w, a(T)),
                onDelete: () => m(w, T),
                onPreview: () => x(w),
                onReupload: () => E(T)
            }, $t(t, ["name", "lazyLoad"]), B), $t(r, ["preview-cover", "preview-delete"]))
        }
          , v = () => {
            if (t.previewImage)
                return t.modelValue.map(p)
        }
          , _ = w => e("clickUpload", w)
          , b = () => {
            const w = t.modelValue.length < +t.maxCount
              , T = t.readonly ? null : O("input", {
                ref: n,
                type: "file",
                class: yr("input"),
                accept: t.accept,
                capture: t.capture,
                multiple: t.multiple && o.value === -1,
                disabled: t.disabled,
                onChange: f,
                onClick: g
            }, null);
            return r.default ? hi(O("div", {
                class: yr("input-wrapper"),
                onClick: _
            }, [r.default(), T]), [[pi, w]]) : hi(O("div", {
                class: yr("upload", {
                    readonly: t.readonly
                }),
                style: zl(t.previewSize),
                onClick: _
            }, [O(rr, {
                name: t.uploadIcon,
                class: yr("upload-icon")
            }, null), t.uploadText && O("span", {
                class: yr("upload-text")
            }, [t.uploadText]), T]), [[pi, t.showUpload && w]])
        }
          , C = () => {
            n.value && !t.disabled && n.value.click()
        }
        ;
        return Zn( () => {
            i.forEach(w => URL.revokeObjectURL(w))
        }
        ),
        Kt({
            chooseFile: C,
            reuploadFile: E,
            closeImagePreview: y
        }),
        Vl( () => t.modelValue),
        () => O("div", {
            class: yr()
        }, [O("div", {
            class: yr("wrapper", {
                disabled: t.disabled
            })
        }, [v(), b()])])
    }
});
const b6e = Oe($re);
/*!
  * shared v11.2.7
  * (c) 2025 kazuya kawaguchi
  * Released under the MIT License.
  */
function Co(t, e) {
    typeof console < "u" && (console.warn("[intlify] " + t),
    e && console.warn(e.stack))
}
const nA = {};
function Y2(t) {
    nA[t] || (nA[t] = !0,
    Co(t))
}
const Gi = typeof window < "u";
let zn, _l;
{
    const t = Gi && window.performance;
    t && t.mark && t.measure && t.clearMarks && t.clearMeasures && (zn = e => {
        t.mark(e)
    }
    ,
    _l = (e, r, n) => {
        t.measure(e, r, n),
        t.clearMarks(r),
        t.clearMarks(n)
    }
    )
}
const Ure = /\{([0-9a-zA-Z]+)\}/g;
function o1(t, ...e) {
    return e.length === 1 && ot(e[0]) && (e = e[0]),
    (!e || !e.hasOwnProperty) && (e = {}),
    t.replace(Ure, (r, n) => e.hasOwnProperty(n) ? e[n] : "")
}
const Io = (t, e=!1) => e ? Symbol.for(t) : Symbol(t)
  , Gre = (t, e, r) => Hre({
    l: t,
    k: e,
    s: r
})
  , Hre = t => JSON.stringify(t).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027")
  , ur = t => typeof t == "number" && isFinite(t)
  , Vre = t => X2(t) === "[object Date]"
  , tu = t => X2(t) === "[object RegExp]"
  , s1 = t => Ze(t) && Object.keys(t).length === 0
  , wr = Object.assign
  , zre = Object.create
  , At = (t=null) => zre(t);
let iA;
const Za = () => iA || (iA = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : At());
function oA(t) {
    return t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/\//g, "&#x2F;").replace(/=/g, "&#x3D;")
}
function sA(t) {
    return t.replace(/&(?![a-zA-Z0-9#]{2,6};)/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/</g, "&lt;").replace(/>/g, "&gt;")
}
function jre(t) {
    return t = t.replace(/(\w+)\s*=\s*"([^"]*)"/g, (n, i, o) => `${i}="${sA(o)}"`),
    t = t.replace(/(\w+)\s*=\s*'([^']*)'/g, (n, i, o) => `${i}='${sA(o)}'`),
    /\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(t) && (Co("Potentially dangerous event handlers detected in translation. Consider removing onclick, onerror, etc. from your translation messages."),
    t = t.replace(/(\s+)(on)(\w+\s*=)/gi, "$1&#111;n$3")),
    [/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi, /(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(n => {
        t = t.replace(n, "$1javascript&#58;")
    }
    ),
    t
}
const Wre = Object.prototype.hasOwnProperty;
function Ri(t, e) {
    return Wre.call(t, e)
}
const Wt = Array.isArray
  , wt = t => typeof t == "function"
  , Ce = t => typeof t == "string"
  , ct = t => typeof t == "boolean"
  , ot = t => t !== null && typeof t == "object"
  , Yre = t => ot(t) && wt(t.then) && wt(t.catch)
  , DD = Object.prototype.toString
  , X2 = t => DD.call(t)
  , Ze = t => X2(t) === "[object Object]"
  , Xre = t => t == null ? "" : Wt(t) || Ze(t) && t.toString === DD ? JSON.stringify(t, null, 2) : String(t);
function K2(t, e="") {
    return t.reduce( (r, n, i) => i === 0 ? r + n : r + e + n, "")
}
const aA = 2;
function Kre(t, e=0, r=t.length) {
    const n = t.split(/\r?\n/);
    let i = 0;
    const o = [];
    for (let s = 0; s < n.length; s++)
        if (i += n[s].length + 1,
        i >= e) {
            for (let a = s - aA; a <= s + aA || r > i; a++) {
                if (a < 0 || a >= n.length)
                    continue;
                const l = a + 1;
                o.push(`${l}${" ".repeat(3 - String(l).length)}|  ${n[a]}`);
                const c = n[a].length;
                if (a === s) {
                    const u = e - (i - c) + 1
                      , f = Math.max(1, r > i ? c - u : r - e);
                    o.push("   |  " + " ".repeat(u) + "^".repeat(f))
                } else if (a > s) {
                    if (r > i) {
                        const u = Math.max(Math.min(r - i, c), 1);
                        o.push("   |  " + "^".repeat(u))
                    }
                    i += c + 1
                }
            }
            break
        }
    return o.join(`
`)
}
function q2() {
    const t = new Map;
    return {
        events: t,
        on(r, n) {
            const i = t.get(r);
            i && i.push(n) || t.set(r, [n])
        },
        off(r, n) {
            const i = t.get(r);
            i && i.splice(i.indexOf(n) >>> 0, 1)
        },
        emit(r, n) {
            (t.get(r) || []).slice().map(i => i(n)),
            (t.get("*") || []).slice().map(i => i(r, n))
        }
    }
}
const th = t => !ot(t) || Wt(t);
function Kh(t, e) {
    if (th(t) || th(e))
        throw new Error("Invalid value");
    const r = [{
        src: t,
        des: e
    }];
    for (; r.length; ) {
        const {src: n, des: i} = r.pop();
        Object.keys(n).forEach(o => {
            o !== "__proto__" && (ot(n[o]) && !ot(i[o]) && (i[o] = Array.isArray(n[o]) ? [] : At()),
            th(i[o]) || th(n[o]) ? i[o] = n[o] : r.push({
                src: n[o],
                des: i[o]
            }))
        }
        )
    }
}
/*!
  * message-compiler v11.2.7
  * (c) 2025 kazuya kawaguchi
  * Released under the MIT License.
  */
function qre(t, e, r) {
    return {
        line: t,
        column: e,
        offset: r
    }
}
function Fy(t, e, r) {
    const n = {
        start: t,
        end: e
    };
    return r != null && (n.source = r),
    n
}
const Ge = {
    EXPECTED_TOKEN: 1,
    INVALID_TOKEN_IN_PLACEHOLDER: 2,
    UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
    UNKNOWN_ESCAPE_SEQUENCE: 4,
    INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
    UNBALANCED_CLOSING_BRACE: 6,
    UNTERMINATED_CLOSING_BRACE: 7,
    EMPTY_PLACEHOLDER: 8,
    NOT_ALLOW_NEST_PLACEHOLDER: 9,
    INVALID_LINKED_FORMAT: 10,
    MUST_HAVE_MESSAGES_IN_PLURAL: 11,
    UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
    UNEXPECTED_EMPTY_LINKED_KEY: 13,
    UNEXPECTED_LEXICAL_ANALYSIS: 14,
    UNHANDLED_CODEGEN_NODE_TYPE: 15,
    UNHANDLED_MINIFIER_NODE_TYPE: 16
}
  , Zre = 17
  , Jre = {
    [Ge.EXPECTED_TOKEN]: "Expected token: '{0}'",
    [Ge.INVALID_TOKEN_IN_PLACEHOLDER]: "Invalid token in placeholder: '{0}'",
    [Ge.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: "Unterminated single quote in placeholder",
    [Ge.UNKNOWN_ESCAPE_SEQUENCE]: "Unknown escape sequence: \\{0}",
    [Ge.INVALID_UNICODE_ESCAPE_SEQUENCE]: "Invalid unicode escape sequence: {0}",
    [Ge.UNBALANCED_CLOSING_BRACE]: "Unbalanced closing brace",
    [Ge.UNTERMINATED_CLOSING_BRACE]: "Unterminated closing brace",
    [Ge.EMPTY_PLACEHOLDER]: "Empty placeholder",
    [Ge.NOT_ALLOW_NEST_PLACEHOLDER]: "Not allowed nest placeholder",
    [Ge.INVALID_LINKED_FORMAT]: "Invalid linked format",
    [Ge.MUST_HAVE_MESSAGES_IN_PLURAL]: "Plural must have messages",
    [Ge.UNEXPECTED_EMPTY_LINKED_MODIFIER]: "Unexpected empty linked modifier",
    [Ge.UNEXPECTED_EMPTY_LINKED_KEY]: "Unexpected empty linked key",
    [Ge.UNEXPECTED_LEXICAL_ANALYSIS]: "Unexpected lexical analysis in token: '{0}'",
    [Ge.UNHANDLED_CODEGEN_NODE_TYPE]: "unhandled codegen node type: '{0}'",
    [Ge.UNHANDLED_MINIFIER_NODE_TYPE]: "unhandled mimifier node type: '{0}'"
};
function Du(t, e, r={}) {
    const {domain: n, messages: i, args: o} = r
      , s = o1((i || Jre)[t] || "", ...o || [])
      , a = new SyntaxError(String(s));
    return a.code = t,
    e && (a.location = e),
    a.domain = n,
    a
}
function Qre(t) {
    throw t
}
const ene = /<\/?[\w\s="/.':;#-\/]+>/
  , tne = t => ene.test(t)
  , Zi = " "
  , rne = "\r"
  , Xr = `
`
  , nne = String.fromCharCode(8232)
  , ine = String.fromCharCode(8233);
function one(t) {
    const e = t;
    let r = 0
      , n = 1
      , i = 1
      , o = 0;
    const s = C => e[C] === rne && e[C + 1] === Xr
      , a = C => e[C] === Xr
      , l = C => e[C] === ine
      , c = C => e[C] === nne
      , u = C => s(C) || a(C) || l(C) || c(C)
      , f = () => r
      , d = () => n
      , h = () => i
      , x = () => o
      , y = C => s(C) || l(C) || c(C) ? Xr : e[C]
      , m = () => y(r)
      , E = () => y(r + o);
    function g() {
        return o = 0,
        u(r) && (n++,
        i = 0),
        s(r) && r++,
        r++,
        i++,
        e[r]
    }
    function p() {
        return s(r + o) && o++,
        o++,
        e[r + o]
    }
    function v() {
        r = 0,
        n = 1,
        i = 1,
        o = 0
    }
    function _(C=0) {
        o = C
    }
    function b() {
        const C = r + o;
        for (; C !== r; )
            g();
        o = 0
    }
    return {
        index: f,
        line: d,
        column: h,
        peekOffset: x,
        charAt: y,
        currentChar: m,
        currentPeek: E,
        next: g,
        peek: p,
        reset: v,
        resetPeek: _,
        skipToPeek: b
    }
}
const Mo = void 0
  , sne = "."
  , lA = "'"
  , ane = "tokenizer";
function lne(t, e={}) {
    const r = e.location !== !1
      , n = one(t)
      , i = () => n.index()
      , o = () => qre(n.line(), n.column(), n.index())
      , s = o()
      , a = i()
      , l = {
        currentType: 13,
        offset: a,
        startLoc: s,
        endLoc: s,
        lastType: 13,
        lastOffset: a,
        lastStartLoc: s,
        lastEndLoc: s,
        braceNest: 0,
        inLinked: !1,
        text: ""
    }
      , c = () => l
      , {onError: u} = e;
    function f(k, L, Y, ...ee) {
        const de = c();
        if (L.column += Y,
        L.offset += Y,
        u) {
            const ye = r ? Fy(de.startLoc, L) : null
              , pe = Du(k, ye, {
                domain: ane,
                args: ee
            });
            u(pe)
        }
    }
    function d(k, L, Y) {
        k.endLoc = o(),
        k.currentType = L;
        const ee = {
            type: L
        };
        return r && (ee.loc = Fy(k.startLoc, k.endLoc)),
        Y != null && (ee.value = Y),
        ee
    }
    const h = k => d(k, 13);
    function x(k, L) {
        return k.currentChar() === L ? (k.next(),
        L) : (f(Ge.EXPECTED_TOKEN, o(), 0, L),
        "")
    }
    function y(k) {
        let L = "";
        for (; k.currentPeek() === Zi || k.currentPeek() === Xr; )
            L += k.currentPeek(),
            k.peek();
        return L
    }
    function m(k) {
        const L = y(k);
        return k.skipToPeek(),
        L
    }
    function E(k) {
        if (k === Mo)
            return !1;
        const L = k.charCodeAt(0);
        return L >= 97 && L <= 122 || L >= 65 && L <= 90 || L === 95
    }
    function g(k) {
        if (k === Mo)
            return !1;
        const L = k.charCodeAt(0);
        return L >= 48 && L <= 57
    }
    function p(k, L) {
        const {currentType: Y} = L;
        if (Y !== 2)
            return !1;
        y(k);
        const ee = E(k.currentPeek());
        return k.resetPeek(),
        ee
    }
    function v(k, L) {
        const {currentType: Y} = L;
        if (Y !== 2)
            return !1;
        y(k);
        const ee = k.currentPeek() === "-" ? k.peek() : k.currentPeek()
          , de = g(ee);
        return k.resetPeek(),
        de
    }
    function _(k, L) {
        const {currentType: Y} = L;
        if (Y !== 2)
            return !1;
        y(k);
        const ee = k.currentPeek() === lA;
        return k.resetPeek(),
        ee
    }
    function b(k, L) {
        const {currentType: Y} = L;
        if (Y !== 7)
            return !1;
        y(k);
        const ee = k.currentPeek() === ".";
        return k.resetPeek(),
        ee
    }
    function C(k, L) {
        const {currentType: Y} = L;
        if (Y !== 8)
            return !1;
        y(k);
        const ee = E(k.currentPeek());
        return k.resetPeek(),
        ee
    }
    function w(k, L) {
        const {currentType: Y} = L;
        if (!(Y === 7 || Y === 11))
            return !1;
        y(k);
        const ee = k.currentPeek() === ":";
        return k.resetPeek(),
        ee
    }
    function T(k, L) {
        const {currentType: Y} = L;
        if (Y !== 9)
            return !1;
        const ee = () => {
            const ye = k.currentPeek();
            return ye === "{" ? E(k.peek()) : ye === "@" || ye === "|" || ye === ":" || ye === "." || ye === Zi || !ye ? !1 : ye === Xr ? (k.peek(),
            ee()) : B(k, !1)
        }
          , de = ee();
        return k.resetPeek(),
        de
    }
    function A(k) {
        y(k);
        const L = k.currentPeek() === "|";
        return k.resetPeek(),
        L
    }
    function B(k, L=!0) {
        const Y = (de=!1, ye="") => {
            const pe = k.currentPeek();
            return pe === "{" || pe === "@" || !pe ? de : pe === "|" ? !(ye === Zi || ye === Xr) : pe === Zi ? (k.peek(),
            Y(!0, Zi)) : pe === Xr ? (k.peek(),
            Y(!0, Xr)) : !0
        }
          , ee = Y();
        return L && k.resetPeek(),
        ee
    }
    function S(k, L) {
        const Y = k.currentChar();
        return Y === Mo ? Mo : L(Y) ? (k.next(),
        Y) : null
    }
    function D(k) {
        const L = k.charCodeAt(0);
        return L >= 97 && L <= 122 || L >= 65 && L <= 90 || L >= 48 && L <= 57 || L === 95 || L === 36
    }
    function F(k) {
        return S(k, D)
    }
    function R(k) {
        const L = k.charCodeAt(0);
        return L >= 97 && L <= 122 || L >= 65 && L <= 90 || L >= 48 && L <= 57 || L === 95 || L === 36 || L === 45
    }
    function P(k) {
        return S(k, R)
    }
    function N(k) {
        const L = k.charCodeAt(0);
        return L >= 48 && L <= 57
    }
    function j(k) {
        return S(k, N)
    }
    function K(k) {
        const L = k.charCodeAt(0);
        return L >= 48 && L <= 57 || L >= 65 && L <= 70 || L >= 97 && L <= 102
    }
    function oe(k) {
        return S(k, K)
    }
    function U(k) {
        let L = ""
          , Y = "";
        for (; L = j(k); )
            Y += L;
        return Y
    }
    function $(k) {
        let L = "";
        for (; ; ) {
            const Y = k.currentChar();
            if (Y === "{" || Y === "}" || Y === "@" || Y === "|" || !Y)
                break;
            if (Y === Zi || Y === Xr)
                if (B(k))
                    L += Y,
                    k.next();
                else {
                    if (A(k))
                        break;
                    L += Y,
                    k.next()
                }
            else
                L += Y,
                k.next()
        }
        return L
    }
    function V(k) {
        m(k);
        let L = ""
          , Y = "";
        for (; L = P(k); )
            Y += L;
        const ee = k.currentChar();
        if (ee && ee !== "}" && ee !== Mo && ee !== Zi && ee !== Xr && ee !== "　") {
            const de = he(k);
            return f(Ge.INVALID_TOKEN_IN_PLACEHOLDER, o(), 0, Y + de),
            Y + de
        }
        return k.currentChar() === Mo && f(Ge.UNTERMINATED_CLOSING_BRACE, o(), 0),
        Y
    }
    function W(k) {
        m(k);
        let L = "";
        return k.currentChar() === "-" ? (k.next(),
        L += `-${U(k)}`) : L += U(k),
        k.currentChar() === Mo && f(Ge.UNTERMINATED_CLOSING_BRACE, o(), 0),
        L
    }
    function H(k) {
        return k !== lA && k !== Xr
    }
    function Q(k) {
        m(k),
        x(k, "'");
        let L = ""
          , Y = "";
        for (; L = S(k, H); )
            L === "\\" ? Y += G(k) : Y += L;
        const ee = k.currentChar();
        return ee === Xr || ee === Mo ? (f(Ge.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, o(), 0),
        ee === Xr && (k.next(),
        x(k, "'")),
        Y) : (x(k, "'"),
        Y)
    }
    function G(k) {
        const L = k.currentChar();
        switch (L) {
        case "\\":
        case "'":
            return k.next(),
            `\\${L}`;
        case "u":
            return re(k, L, 4);
        case "U":
            return re(k, L, 6);
        default:
            return f(Ge.UNKNOWN_ESCAPE_SEQUENCE, o(), 0, L),
            ""
        }
    }
    function re(k, L, Y) {
        x(k, L);
        let ee = "";
        for (let de = 0; de < Y; de++) {
            const ye = oe(k);
            if (!ye) {
                f(Ge.INVALID_UNICODE_ESCAPE_SEQUENCE, o(), 0, `\\${L}${ee}${k.currentChar()}`);
                break
            }
            ee += ye
        }
        return `\\${L}${ee}`
    }
    function te(k) {
        return k !== "{" && k !== "}" && k !== Zi && k !== Xr
    }
    function he(k) {
        m(k);
        let L = ""
          , Y = "";
        for (; L = S(k, te); )
            Y += L;
        return Y
    }
    function xe(k) {
        let L = ""
          , Y = "";
        for (; L = F(k); )
            Y += L;
        return Y
    }
    function ve(k) {
        const L = Y => {
            const ee = k.currentChar();
            return ee === "{" || ee === "@" || ee === "|" || ee === "(" || ee === ")" || !ee || ee === Zi ? Y : (Y += ee,
            k.next(),
            L(Y))
        }
        ;
        return L("")
    }
    function I(k) {
        m(k);
        const L = x(k, "|");
        return m(k),
        L
    }
    function z(k, L) {
        let Y = null;
        switch (k.currentChar()) {
        case "{":
            return L.braceNest >= 1 && f(Ge.NOT_ALLOW_NEST_PLACEHOLDER, o(), 0),
            k.next(),
            Y = d(L, 2, "{"),
            m(k),
            L.braceNest++,
            Y;
        case "}":
            return L.braceNest > 0 && L.currentType === 2 && f(Ge.EMPTY_PLACEHOLDER, o(), 0),
            k.next(),
            Y = d(L, 3, "}"),
            L.braceNest--,
            L.braceNest > 0 && m(k),
            L.inLinked && L.braceNest === 0 && (L.inLinked = !1),
            Y;
        case "@":
            return L.braceNest > 0 && f(Ge.UNTERMINATED_CLOSING_BRACE, o(), 0),
            Y = q(k, L) || h(L),
            L.braceNest = 0,
            Y;
        default:
            {
                let de = !0
                  , ye = !0
                  , pe = !0;
                if (A(k))
                    return L.braceNest > 0 && f(Ge.UNTERMINATED_CLOSING_BRACE, o(), 0),
                    Y = d(L, 1, I(k)),
                    L.braceNest = 0,
                    L.inLinked = !1,
                    Y;
                if (L.braceNest > 0 && (L.currentType === 4 || L.currentType === 5 || L.currentType === 6))
                    return f(Ge.UNTERMINATED_CLOSING_BRACE, o(), 0),
                    L.braceNest = 0,
                    ce(k, L);
                if (de = p(k, L))
                    return Y = d(L, 4, V(k)),
                    m(k),
                    Y;
                if (ye = v(k, L))
                    return Y = d(L, 5, W(k)),
                    m(k),
                    Y;
                if (pe = _(k, L))
                    return Y = d(L, 6, Q(k)),
                    m(k),
                    Y;
                if (!de && !ye && !pe)
                    return Y = d(L, 12, he(k)),
                    f(Ge.INVALID_TOKEN_IN_PLACEHOLDER, o(), 0, Y.value),
                    m(k),
                    Y;
                break
            }
        }
        return Y
    }
    function q(k, L) {
        const {currentType: Y} = L;
        let ee = null;
        const de = k.currentChar();
        switch ((Y === 7 || Y === 8 || Y === 11 || Y === 9) && (de === Xr || de === Zi) && f(Ge.INVALID_LINKED_FORMAT, o(), 0),
        de) {
        case "@":
            return k.next(),
            ee = d(L, 7, "@"),
            L.inLinked = !0,
            ee;
        case ".":
            return m(k),
            k.next(),
            d(L, 8, ".");
        case ":":
            return m(k),
            k.next(),
            d(L, 9, ":");
        default:
            return A(k) ? (ee = d(L, 1, I(k)),
            L.braceNest = 0,
            L.inLinked = !1,
            ee) : b(k, L) || w(k, L) ? (m(k),
            q(k, L)) : C(k, L) ? (m(k),
            d(L, 11, xe(k))) : T(k, L) ? (m(k),
            de === "{" ? z(k, L) || ee : d(L, 10, ve(k))) : (Y === 7 && f(Ge.INVALID_LINKED_FORMAT, o(), 0),
            L.braceNest = 0,
            L.inLinked = !1,
            ce(k, L))
        }
    }
    function ce(k, L) {
        let Y = {
            type: 13
        };
        if (L.braceNest > 0)
            return z(k, L) || h(L);
        if (L.inLinked)
            return q(k, L) || h(L);
        switch (k.currentChar()) {
        case "{":
            return z(k, L) || h(L);
        case "}":
            return f(Ge.UNBALANCED_CLOSING_BRACE, o(), 0),
            k.next(),
            d(L, 3, "}");
        case "@":
            return q(k, L) || h(L);
        default:
            {
                if (A(k))
                    return Y = d(L, 1, I(k)),
                    L.braceNest = 0,
                    L.inLinked = !1,
                    Y;
                if (B(k))
                    return d(L, 0, $(k));
                break
            }
        }
        return Y
    }
    function fe() {
        const {currentType: k, offset: L, startLoc: Y, endLoc: ee} = l;
        return l.lastType = k,
        l.lastOffset = L,
        l.lastStartLoc = Y,
        l.lastEndLoc = ee,
        l.offset = i(),
        l.startLoc = o(),
        n.currentChar() === Mo ? d(l, 13) : ce(n, l)
    }
    return {
        nextToken: fe,
        currentOffset: i,
        currentPosition: o,
        context: c
    }
}
const cne = "parser"
  , une = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
function fne(t, e, r) {
    switch (t) {
    case "\\\\":
        return "\\";
    case "\\'":
        return "'";
    default:
        {
            const n = parseInt(e || r, 16);
            return n <= 55295 || n >= 57344 ? String.fromCodePoint(n) : "�"
        }
    }
}
function dne(t={}) {
    const e = t.location !== !1
      , {onError: r} = t;
    function n(E, g, p, v, ..._) {
        const b = E.currentPosition();
        if (b.offset += v,
        b.column += v,
        r) {
            const C = e ? Fy(p, b) : null
              , w = Du(g, C, {
                domain: cne,
                args: _
            });
            r(w)
        }
    }
    function i(E, g, p) {
        const v = {
            type: E
        };
        return e && (v.start = g,
        v.end = g,
        v.loc = {
            start: p,
            end: p
        }),
        v
    }
    function o(E, g, p, v) {
        e && (E.end = g,
        E.loc && (E.loc.end = p))
    }
    function s(E, g) {
        const p = E.context()
          , v = i(3, p.offset, p.startLoc);
        return v.value = g,
        o(v, E.currentOffset(), E.currentPosition()),
        v
    }
    function a(E, g) {
        const p = E.context()
          , {lastOffset: v, lastStartLoc: _} = p
          , b = i(5, v, _);
        return b.index = parseInt(g, 10),
        E.nextToken(),
        o(b, E.currentOffset(), E.currentPosition()),
        b
    }
    function l(E, g) {
        const p = E.context()
          , {lastOffset: v, lastStartLoc: _} = p
          , b = i(4, v, _);
        return b.key = g,
        E.nextToken(),
        o(b, E.currentOffset(), E.currentPosition()),
        b
    }
    function c(E, g) {
        const p = E.context()
          , {lastOffset: v, lastStartLoc: _} = p
          , b = i(9, v, _);
        return b.value = g.replace(une, fne),
        E.nextToken(),
        o(b, E.currentOffset(), E.currentPosition()),
        b
    }
    function u(E) {
        const g = E.nextToken()
          , p = E.context()
          , {lastOffset: v, lastStartLoc: _} = p
          , b = i(8, v, _);
        return g.type !== 11 ? (n(E, Ge.UNEXPECTED_EMPTY_LINKED_MODIFIER, p.lastStartLoc, 0),
        b.value = "",
        o(b, v, _),
        {
            nextConsumeToken: g,
            node: b
        }) : (g.value == null && n(E, Ge.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, Ji(g)),
        b.value = g.value || "",
        o(b, E.currentOffset(), E.currentPosition()),
        {
            node: b
        })
    }
    function f(E, g) {
        const p = E.context()
          , v = i(7, p.offset, p.startLoc);
        return v.value = g,
        o(v, E.currentOffset(), E.currentPosition()),
        v
    }
    function d(E) {
        const g = E.context()
          , p = i(6, g.offset, g.startLoc);
        let v = E.nextToken();
        if (v.type === 8) {
            const _ = u(E);
            p.modifier = _.node,
            v = _.nextConsumeToken || E.nextToken()
        }
        switch (v.type !== 9 && n(E, Ge.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Ji(v)),
        v = E.nextToken(),
        v.type === 2 && (v = E.nextToken()),
        v.type) {
        case 10:
            v.value == null && n(E, Ge.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Ji(v)),
            p.key = f(E, v.value || "");
            break;
        case 4:
            v.value == null && n(E, Ge.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Ji(v)),
            p.key = l(E, v.value || "");
            break;
        case 5:
            v.value == null && n(E, Ge.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Ji(v)),
            p.key = a(E, v.value || "");
            break;
        case 6:
            v.value == null && n(E, Ge.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Ji(v)),
            p.key = c(E, v.value || "");
            break;
        default:
            {
                n(E, Ge.UNEXPECTED_EMPTY_LINKED_KEY, g.lastStartLoc, 0);
                const _ = E.context()
                  , b = i(7, _.offset, _.startLoc);
                return b.value = "",
                o(b, _.offset, _.startLoc),
                p.key = b,
                o(p, _.offset, _.startLoc),
                {
                    nextConsumeToken: v,
                    node: p
                }
            }
        }
        return o(p, E.currentOffset(), E.currentPosition()),
        {
            node: p
        }
    }
    function h(E) {
        const g = E.context()
          , p = g.currentType === 1 ? E.currentOffset() : g.offset
          , v = g.currentType === 1 ? g.endLoc : g.startLoc
          , _ = i(2, p, v);
        _.items = [];
        let b = null;
        do {
            const T = b || E.nextToken();
            switch (b = null,
            T.type) {
            case 0:
                T.value == null && n(E, Ge.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Ji(T)),
                _.items.push(s(E, T.value || ""));
                break;
            case 5:
                T.value == null && n(E, Ge.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Ji(T)),
                _.items.push(a(E, T.value || ""));
                break;
            case 4:
                T.value == null && n(E, Ge.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Ji(T)),
                _.items.push(l(E, T.value || ""));
                break;
            case 6:
                T.value == null && n(E, Ge.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Ji(T)),
                _.items.push(c(E, T.value || ""));
                break;
            case 7:
                {
                    const A = d(E);
                    _.items.push(A.node),
                    b = A.nextConsumeToken || null;
                    break
                }
            }
        } while (g.currentType !== 13 && g.currentType !== 1);
        const C = g.currentType === 1 ? g.lastOffset : E.currentOffset()
          , w = g.currentType === 1 ? g.lastEndLoc : E.currentPosition();
        return o(_, C, w),
        _
    }
    function x(E, g, p, v) {
        const _ = E.context();
        let b = v.items.length === 0;
        const C = i(1, g, p);
        C.cases = [],
        C.cases.push(v);
        do {
            const w = h(E);
            b || (b = w.items.length === 0),
            C.cases.push(w)
        } while (_.currentType !== 13);
        return b && n(E, Ge.MUST_HAVE_MESSAGES_IN_PLURAL, p, 0),
        o(C, E.currentOffset(), E.currentPosition()),
        C
    }
    function y(E) {
        const g = E.context()
          , {offset: p, startLoc: v} = g
          , _ = h(E);
        return g.currentType === 13 ? _ : x(E, p, v, _)
    }
    function m(E) {
        const g = lne(E, wr({}, t))
          , p = g.context()
          , v = i(0, p.offset, p.startLoc);
        return e && v.loc && (v.loc.source = E),
        v.body = y(g),
        t.onCacheKey && (v.cacheKey = t.onCacheKey(E)),
        p.currentType !== 13 && n(g, Ge.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, E[p.offset] || ""),
        o(v, g.currentOffset(), g.currentPosition()),
        v
    }
    return {
        parse: m
    }
}
function Ji(t) {
    if (t.type === 13)
        return "EOF";
    const e = (t.value || "").replace(/\r?\n/gu, "\\n");
    return e.length > 10 ? e.slice(0, 9) + "…" : e
}
function hne(t, e={}) {
    const r = {
        ast: t,
        helpers: new Set
    };
    return {
        context: () => r,
        helper: o => (r.helpers.add(o),
        o)
    }
}
function cA(t, e) {
    for (let r = 0; r < t.length; r++)
        Z2(t[r], e)
}
function Z2(t, e) {
    switch (t.type) {
    case 1:
        cA(t.cases, e),
        e.helper("plural");
        break;
    case 2:
        cA(t.items, e);
        break;
    case 6:
        {
            Z2(t.key, e),
            e.helper("linked"),
            e.helper("type");
            break
        }
    case 5:
        e.helper("interpolate"),
        e.helper("list");
        break;
    case 4:
        e.helper("interpolate"),
        e.helper("named");
        break
    }
}
function xne(t, e={}) {
    const r = hne(t);
    r.helper("normalize"),
    t.body && Z2(t.body, r);
    const n = r.context();
    t.helpers = Array.from(n.helpers)
}
function pne(t) {
    const e = t.body;
    return e.type === 2 ? uA(e) : e.cases.forEach(r => uA(r)),
    t
}
function uA(t) {
    if (t.items.length === 1) {
        const e = t.items[0];
        (e.type === 3 || e.type === 9) && (t.static = e.value,
        delete e.value)
    } else {
        const e = [];
        for (let r = 0; r < t.items.length; r++) {
            const n = t.items[r];
            if (!(n.type === 3 || n.type === 9) || n.value == null)
                break;
            e.push(n.value)
        }
        if (e.length === t.items.length) {
            t.static = K2(e);
            for (let r = 0; r < t.items.length; r++) {
                const n = t.items[r];
                (n.type === 3 || n.type === 9) && delete n.value
            }
        }
    }
}
const gne = "minifier";
function Ec(t) {
    switch (t.t = t.type,
    t.type) {
    case 0:
        {
            const e = t;
            Ec(e.body),
            e.b = e.body,
            delete e.body;
            break
        }
    case 1:
        {
            const e = t
              , r = e.cases;
            for (let n = 0; n < r.length; n++)
                Ec(r[n]);
            e.c = r,
            delete e.cases;
            break
        }
    case 2:
        {
            const e = t
              , r = e.items;
            for (let n = 0; n < r.length; n++)
                Ec(r[n]);
            e.i = r,
            delete e.items,
            e.static && (e.s = e.static,
            delete e.static);
            break
        }
    case 3:
    case 9:
    case 8:
    case 7:
        {
            const e = t;
            e.value && (e.v = e.value,
            delete e.value);
            break
        }
    case 6:
        {
            const e = t;
            Ec(e.key),
            e.k = e.key,
            delete e.key,
            e.modifier && (Ec(e.modifier),
            e.m = e.modifier,
            delete e.modifier);
            break
        }
    case 5:
        {
            const e = t;
            e.i = e.index,
            delete e.index;
            break
        }
    case 4:
        {
            const e = t;
            e.k = e.key,
            delete e.key;
            break
        }
    default:
        throw Du(Ge.UNHANDLED_MINIFIER_NODE_TYPE, null, {
            domain: gne,
            args: [t.type]
        })
    }
    delete t.type
}
const mne = "parser";
function vne(t, e) {
    const {sourceMap: r, filename: n, breakLineCode: i, needIndent: o} = e
      , s = e.location !== !1
      , a = {
        filename: n,
        code: "",
        column: 1,
        line: 1,
        offset: 0,
        map: void 0,
        breakLineCode: i,
        needIndent: o,
        indentLevel: 0
    };
    s && t.loc && (a.source = t.loc.source);
    const l = () => a;
    function c(m, E) {
        a.code += m
    }
    function u(m, E=!0) {
        const g = E ? i : "";
        c(o ? g + "  ".repeat(m) : g)
    }
    function f(m=!0) {
        const E = ++a.indentLevel;
        m && u(E)
    }
    function d(m=!0) {
        const E = --a.indentLevel;
        m && u(E)
    }
    function h() {
        u(a.indentLevel)
    }
    return {
        context: l,
        push: c,
        indent: f,
        deindent: d,
        newline: h,
        helper: m => `_${m}`,
        needIndent: () => a.needIndent
    }
}
function yne(t, e) {
    const {helper: r} = t;
    t.push(`${r("linked")}(`),
    ru(t, e.key),
    e.modifier ? (t.push(", "),
    ru(t, e.modifier),
    t.push(", _type")) : t.push(", undefined, _type"),
    t.push(")")
}
function Ene(t, e) {
    const {helper: r, needIndent: n} = t;
    t.push(`${r("normalize")}([`),
    t.indent(n());
    const i = e.items.length;
    for (let o = 0; o < i && (ru(t, e.items[o]),
    o !== i - 1); o++)
        t.push(", ");
    t.deindent(n()),
    t.push("])")
}
function _ne(t, e) {
    const {helper: r, needIndent: n} = t;
    if (e.cases.length > 1) {
        t.push(`${r("plural")}([`),
        t.indent(n());
        const i = e.cases.length;
        for (let o = 0; o < i && (ru(t, e.cases[o]),
        o !== i - 1); o++)
            t.push(", ");
        t.deindent(n()),
        t.push("])")
    }
}
function bne(t, e) {
    e.body ? ru(t, e.body) : t.push("null")
}
function ru(t, e) {
    const {helper: r} = t;
    switch (e.type) {
    case 0:
        bne(t, e);
        break;
    case 1:
        _ne(t, e);
        break;
    case 2:
        Ene(t, e);
        break;
    case 6:
        yne(t, e);
        break;
    case 8:
        t.push(JSON.stringify(e.value), e);
        break;
    case 7:
        t.push(JSON.stringify(e.value), e);
        break;
    case 5:
        t.push(`${r("interpolate")}(${r("list")}(${e.index}))`, e);
        break;
    case 4:
        t.push(`${r("interpolate")}(${r("named")}(${JSON.stringify(e.key)}))`, e);
        break;
    case 9:
        t.push(JSON.stringify(e.value), e);
        break;
    case 3:
        t.push(JSON.stringify(e.value), e);
        break;
    default:
        throw Du(Ge.UNHANDLED_CODEGEN_NODE_TYPE, null, {
            domain: mne,
            args: [e.type]
        })
    }
}
const Cne = (t, e={}) => {
    const r = Ce(e.mode) ? e.mode : "normal"
      , n = Ce(e.filename) ? e.filename : "message.intl"
      , i = !!e.sourceMap
      , o = e.breakLineCode != null ? e.breakLineCode : r === "arrow" ? ";" : `
`
      , s = e.needIndent ? e.needIndent : r !== "arrow"
      , a = t.helpers || []
      , l = vne(t, {
        mode: r,
        filename: n,
        sourceMap: i,
        breakLineCode: o,
        needIndent: s
    });
    l.push(r === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"),
    l.indent(s),
    a.length > 0 && (l.push(`const { ${K2(a.map(f => `${f}: _${f}`), ", ")} } = ctx`),
    l.newline()),
    l.push("return "),
    ru(l, t),
    l.deindent(s),
    l.push("}"),
    delete t.helpers;
    const {code: c, map: u} = l.context();
    return {
        ast: t,
        code: c,
        map: u ? u.toJSON() : void 0
    }
}
;
function Ane(t, e={}) {
    const r = wr({}, e)
      , n = !!r.jit
      , i = !!r.minify
      , o = r.optimize == null ? !0 : r.optimize
      , a = dne(r).parse(t);
    return n ? (o && pne(a),
    i && Ec(a),
    {
        ast: a,
        code: ""
    }) : (xne(a, r),
    Cne(a, r))
}
/*!
  * core-base v11.2.7
  * (c) 2025 kazuya kawaguchi
  * Released under the MIT License.
  */
function wne() {
    typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Za().__INTLIFY_PROD_DEVTOOLS__ = !1),
    typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Za().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1)
}
function gi(t) {
    return ot(t) && J2(t) === 0 && (Ri(t, "b") || Ri(t, "body"))
}
const FD = ["b", "body"];
function Bne(t) {
    return ya(t, FD)
}
const PD = ["c", "cases"];
function Sne(t) {
    return ya(t, PD, [])
}
const ID = ["s", "static"];
function Tne(t) {
    return ya(t, ID)
}
const OD = ["i", "items"];
function Dne(t) {
    return ya(t, OD, [])
}
const kD = ["t", "type"];
function J2(t) {
    return ya(t, kD)
}
const RD = ["v", "value"];
function rh(t, e) {
    const r = ya(t, RD);
    if (r != null)
        return r;
    throw mf(e)
}
const MD = ["m", "modifier"];
function Fne(t) {
    return ya(t, MD)
}
const ND = ["k", "key"];
function Pne(t) {
    const e = ya(t, ND);
    if (e)
        return e;
    throw mf(6)
}
function ya(t, e, r) {
    for (let n = 0; n < e.length; n++) {
        const i = e[n];
        if (Ri(t, i) && t[i] != null)
            return t[i]
    }
    return r
}
const LD = [...FD, ...PD, ...ID, ...OD, ...ND, ...MD, ...RD, ...kD];
function mf(t) {
    return new Error(`unhandled node type: ${t}`)
}
function _g(t) {
    return r => Ine(r, t)
}
function Ine(t, e) {
    const r = Bne(e);
    if (r == null)
        throw mf(0);
    if (J2(r) === 1) {
        const o = Sne(r);
        return t.plural(o.reduce( (s, a) => [...s, fA(t, a)], []))
    } else
        return fA(t, r)
}
function fA(t, e) {
    const r = Tne(e);
    if (r != null)
        return t.type === "text" ? r : t.normalize([r]);
    {
        const n = Dne(e).reduce( (i, o) => [...i, Py(t, o)], []);
        return t.normalize(n)
    }
}
function Py(t, e) {
    const r = J2(e);
    switch (r) {
    case 3:
        return rh(e, r);
    case 9:
        return rh(e, r);
    case 4:
        {
            const n = e;
            if (Ri(n, "k") && n.k)
                return t.interpolate(t.named(n.k));
            if (Ri(n, "key") && n.key)
                return t.interpolate(t.named(n.key));
            throw mf(r)
        }
    case 5:
        {
            const n = e;
            if (Ri(n, "i") && ur(n.i))
                return t.interpolate(t.list(n.i));
            if (Ri(n, "index") && ur(n.index))
                return t.interpolate(t.list(n.index));
            throw mf(r)
        }
    case 6:
        {
            const n = e
              , i = Fne(n)
              , o = Pne(n);
            return t.linked(Py(t, o), i ? Py(t, i) : void 0, t.type)
        }
    case 7:
        return rh(e, r);
    case 8:
        return rh(e, r);
    default:
        throw new Error(`unhandled node on format message part: ${r}`)
    }
}
const One = "Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";
function kne(t, e) {
    e && tne(t) && Co(o1(One, {
        source: t
    }))
}
const Rne = t => t;
let nh = At();
function Mne(t, e={}) {
    let r = !1;
    const n = e.onError || Qre;
    return e.onError = i => {
        r = !0,
        n(i)
    }
    ,
    {
        ...Ane(t, e),
        detectError: r
    }
}
function Nne(t, e) {
    if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && Ce(t)) {
        const r = ct(e.warnHtmlMessage) ? e.warnHtmlMessage : !0;
        kne(t, r);
        const i = (e.onCacheKey || Rne)(t)
          , o = nh[i];
        if (o)
            return o;
        const {ast: s, detectError: a} = Mne(t, {
            ...e,
            location: !0,
            jit: !0
        })
          , l = _g(s);
        return a ? l : nh[i] = l
    } else {
        if (!gi(t))
            return Co(`the message that is resolve with key '${e.key}' is not supported for jit compilation`),
            () => t;
        const r = t.cacheKey;
        if (r) {
            const n = nh[r];
            return n || (nh[r] = _g(t))
        } else
            return _g(t)
    }
}
let vf = null;
function Lne(t) {
    vf = t
}
function $ne(t, e, r) {
    vf && vf.emit("i18n:init", {
        timestamp: Date.now(),
        i18n: t,
        version: e,
        meta: r
    })
}
const Une = Gne("function:translate");
function Gne(t) {
    return e => vf && vf.emit(t, e)
}
const Zr = {
    INVALID_ARGUMENT: Zre,
    INVALID_DATE_ARGUMENT: 18,
    INVALID_ISO_DATE_ARGUMENT: 19,
    NOT_SUPPORT_NON_STRING_MESSAGE: 20,
    NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,
    NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,
    NOT_SUPPORT_LOCALE_TYPE: 23
}
  , Hne = 24;
function Qo(t) {
    return Du(t, null, {
        messages: Vne
    })
}
const Vne = {
    [Zr.INVALID_ARGUMENT]: "Invalid arguments",
    [Zr.INVALID_DATE_ARGUMENT]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.",
    [Zr.INVALID_ISO_DATE_ARGUMENT]: "The argument provided is not a valid ISO date string",
    [Zr.NOT_SUPPORT_NON_STRING_MESSAGE]: "Not support non-string message",
    [Zr.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: "cannot support promise value",
    [Zr.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: "cannot support async function",
    [Zr.NOT_SUPPORT_LOCALE_TYPE]: "cannot support locale type"
};
function Q2(t, e) {
    return e.locale != null ? dA(e.locale) : dA(t.locale)
}
let bg;
function dA(t) {
    if (Ce(t))
        return t;
    if (wt(t)) {
        if (t.resolvedOnce && bg != null)
            return bg;
        if (t.constructor.name === "Function") {
            const e = t();
            if (Yre(e))
                throw Qo(Zr.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
            return bg = e
        } else
            throw Qo(Zr.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)
    } else
        throw Qo(Zr.NOT_SUPPORT_LOCALE_TYPE)
}
function zne(t, e, r) {
    return [...new Set([r, ...Wt(e) ? e : ot(e) ? Object.keys(e) : Ce(e) ? [e] : [r]])]
}
function $D(t, e, r) {
    const n = Ce(r) ? r : yf
      , i = t;
    i.__localeChainCache || (i.__localeChainCache = new Map);
    let o = i.__localeChainCache.get(n);
    if (!o) {
        o = [];
        let s = [r];
        for (; Wt(s); )
            s = hA(o, s, e);
        const a = Wt(e) || !Ze(e) ? e : e.default ? e.default : null;
        s = Ce(a) ? [a] : a,
        Wt(s) && hA(o, s, !1),
        i.__localeChainCache.set(n, o)
    }
    return o
}
function hA(t, e, r) {
    let n = !0;
    for (let i = 0; i < e.length && ct(n); i++) {
        const o = e[i];
        Ce(o) && (n = jne(t, e[i], r))
    }
    return n
}
function jne(t, e, r) {
    let n;
    const i = e.split("-");
    do {
        const o = i.join("-");
        n = Wne(t, o, r),
        i.splice(-1, 1)
    } while (i.length && n === !0);
    return n
}
function Wne(t, e, r) {
    let n = !1;
    if (!t.includes(e) && (n = !0,
    e)) {
        n = e[e.length - 1] !== "!";
        const i = e.replace(/!/g, "");
        t.push(i),
        (Wt(r) || Ze(r)) && r[i] && (n = r[i])
    }
    return n
}
const Ea = [];
Ea[0] = {
    w: [0],
    i: [3, 0],
    "[": [4],
    o: [7]
};
Ea[1] = {
    w: [1],
    ".": [2],
    "[": [4],
    o: [7]
};
Ea[2] = {
    w: [2],
    i: [3, 0],
    0: [3, 0]
};
Ea[3] = {
    i: [3, 0],
    0: [3, 0],
    w: [1, 1],
    ".": [2, 1],
    "[": [4, 1],
    o: [7, 1]
};
Ea[4] = {
    "'": [5, 0],
    '"': [6, 0],
    "[": [4, 2],
    "]": [1, 3],
    o: 8,
    l: [4, 0]
};
Ea[5] = {
    "'": [4, 0],
    o: 8,
    l: [5, 0]
};
Ea[6] = {
    '"': [4, 0],
    o: 8,
    l: [6, 0]
};
const Yne = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
function Xne(t) {
    return Yne.test(t)
}
function Kne(t) {
    const e = t.charCodeAt(0)
      , r = t.charCodeAt(t.length - 1);
    return e === r && (e === 34 || e === 39) ? t.slice(1, -1) : t
}
function qne(t) {
    if (t == null)
        return "o";
    switch (t.charCodeAt(0)) {
    case 91:
    case 93:
    case 46:
    case 34:
    case 39:
        return t;
    case 95:
    case 36:
    case 45:
        return "i";
    case 9:
    case 10:
    case 13:
    case 160:
    case 65279:
    case 8232:
    case 8233:
        return "w"
    }
    return "i"
}
function Zne(t) {
    const e = t.trim();
    return t.charAt(0) === "0" && isNaN(parseInt(t)) ? !1 : Xne(e) ? Kne(e) : "*" + e
}
function Jne(t) {
    const e = [];
    let r = -1, n = 0, i = 0, o, s, a, l, c, u, f;
    const d = [];
    d[0] = () => {
        s === void 0 ? s = a : s += a
    }
    ,
    d[1] = () => {
        s !== void 0 && (e.push(s),
        s = void 0)
    }
    ,
    d[2] = () => {
        d[0](),
        i++
    }
    ,
    d[3] = () => {
        if (i > 0)
            i--,
            n = 4,
            d[0]();
        else {
            if (i = 0,
            s === void 0 || (s = Zne(s),
            s === !1))
                return !1;
            d[1]()
        }
    }
    ;
    function h() {
        const x = t[r + 1];
        if (n === 5 && x === "'" || n === 6 && x === '"')
            return r++,
            a = "\\" + x,
            d[0](),
            !0
    }
    for (; n !== null; )
        if (r++,
        o = t[r],
        !(o === "\\" && h())) {
            if (l = qne(o),
            f = Ea[n],
            c = f[l] || f.l || 8,
            c === 8 || (n = c[0],
            c[1] !== void 0 && (u = d[c[1]],
            u && (a = o,
            u() === !1))))
                return;
            if (n === 7)
                return e
        }
}
const xA = new Map;
function Qne(t, e) {
    return ot(t) ? t[e] : null
}
function eie(t, e) {
    if (!ot(t))
        return null;
    let r = xA.get(e);
    if (r || (r = Jne(e),
    r && xA.set(e, r)),
    !r)
        return null;
    const n = r.length;
    let i = t
      , o = 0;
    for (; o < n; ) {
        const s = r[o];
        if (LD.includes(s) && gi(i))
            return null;
        const a = i[s];
        if (a === void 0 || wt(i))
            return null;
        i = a,
        o++
    }
    return i
}
const An = {
    NOT_FOUND_KEY: 1,
    FALLBACK_TO_TRANSLATE: 2,
    CANNOT_FORMAT_NUMBER: 3,
    FALLBACK_TO_NUMBER_FORMAT: 4,
    CANNOT_FORMAT_DATE: 5,
    FALLBACK_TO_DATE_FORMAT: 6,
    EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: 7
}
  , tie = 8
  , rie = {
    [An.NOT_FOUND_KEY]: "Not found '{key}' key in '{locale}' locale messages.",
    [An.FALLBACK_TO_TRANSLATE]: "Fall back to translate '{key}' key with '{target}' locale.",
    [An.CANNOT_FORMAT_NUMBER]: "Cannot format a number value due to not supported Intl.NumberFormat.",
    [An.FALLBACK_TO_NUMBER_FORMAT]: "Fall back to number format '{key}' key with '{target}' locale.",
    [An.CANNOT_FORMAT_DATE]: "Cannot format a date value due to not supported Intl.DateTimeFormat.",
    [An.FALLBACK_TO_DATE_FORMAT]: "Fall back to datetime format '{key}' key with '{target}' locale.",
    [An.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: "This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."
};
function bl(t, ...e) {
    return o1(rie[t], ...e)
}
const nie = "11.2.7"
  , a1 = -1
  , yf = "en-US"
  , kx = ""
  , pA = t => `${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`;
function iie() {
    return {
        upper: (t, e) => e === "text" && Ce(t) ? t.toUpperCase() : e === "vnode" && ot(t) && "__v_isVNode"in t ? t.children.toUpperCase() : t,
        lower: (t, e) => e === "text" && Ce(t) ? t.toLowerCase() : e === "vnode" && ot(t) && "__v_isVNode"in t ? t.children.toLowerCase() : t,
        capitalize: (t, e) => e === "text" && Ce(t) ? pA(t) : e === "vnode" && ot(t) && "__v_isVNode"in t ? pA(t.children) : t
    }
}
let UD;
function oie(t) {
    UD = t
}
let GD;
function sie(t) {
    GD = t
}
let HD;
function aie(t) {
    HD = t
}
let VD = null;
const lie = t => {
    VD = t
}
  , cie = () => VD;
let zD = null;
const gA = t => {
    zD = t
}
  , uie = () => zD;
let mA = 0;
function fie(t={}) {
    const e = wt(t.onWarn) ? t.onWarn : Co
      , r = Ce(t.version) ? t.version : nie
      , n = Ce(t.locale) || wt(t.locale) ? t.locale : yf
      , i = wt(n) ? yf : n
      , o = Wt(t.fallbackLocale) || Ze(t.fallbackLocale) || Ce(t.fallbackLocale) || t.fallbackLocale === !1 ? t.fallbackLocale : i
      , s = Ze(t.messages) ? t.messages : Cg(i)
      , a = Ze(t.datetimeFormats) ? t.datetimeFormats : Cg(i)
      , l = Ze(t.numberFormats) ? t.numberFormats : Cg(i)
      , c = wr(At(), t.modifiers, iie())
      , u = t.pluralRules || At()
      , f = wt(t.missing) ? t.missing : null
      , d = ct(t.missingWarn) || tu(t.missingWarn) ? t.missingWarn : !0
      , h = ct(t.fallbackWarn) || tu(t.fallbackWarn) ? t.fallbackWarn : !0
      , x = !!t.fallbackFormat
      , y = !!t.unresolving
      , m = wt(t.postTranslation) ? t.postTranslation : null
      , E = Ze(t.processor) ? t.processor : null
      , g = ct(t.warnHtmlMessage) ? t.warnHtmlMessage : !0
      , p = !!t.escapeParameter
      , v = wt(t.messageCompiler) ? t.messageCompiler : UD;
    wt(t.messageCompiler) && Y2(bl(An.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
    const _ = wt(t.messageResolver) ? t.messageResolver : GD || Qne
      , b = wt(t.localeFallbacker) ? t.localeFallbacker : HD || zne
      , C = ot(t.fallbackContext) ? t.fallbackContext : void 0
      , w = t
      , T = ot(w.__datetimeFormatters) ? w.__datetimeFormatters : new Map
      , A = ot(w.__numberFormatters) ? w.__numberFormatters : new Map
      , B = ot(w.__meta) ? w.__meta : {};
    mA++;
    const S = {
        version: r,
        cid: mA,
        locale: n,
        fallbackLocale: o,
        messages: s,
        modifiers: c,
        pluralRules: u,
        missing: f,
        missingWarn: d,
        fallbackWarn: h,
        fallbackFormat: x,
        unresolving: y,
        postTranslation: m,
        processor: E,
        warnHtmlMessage: g,
        escapeParameter: p,
        messageCompiler: v,
        messageResolver: _,
        localeFallbacker: b,
        fallbackContext: C,
        onWarn: e,
        __meta: B
    };
    return S.datetimeFormats = a,
    S.numberFormats = l,
    S.__datetimeFormatters = T,
    S.__numberFormatters = A,
    S.__v_emitter = w.__v_emitter != null ? w.__v_emitter : void 0,
    $ne(S, r, B),
    S
}
const Cg = t => ({
    [t]: At()
});
function l1(t, e) {
    return t instanceof RegExp ? t.test(e) : t
}
function jD(t, e) {
    return t instanceof RegExp ? t.test(e) : t
}
function eb(t, e, r, n, i) {
    const {missing: o, onWarn: s} = t;
    {
        const a = t.__v_emitter;
        a && a.emit("missing", {
            locale: r,
            key: e,
            type: i,
            groupId: `${i}:${e}`
        })
    }
    if (o !== null) {
        const a = o(t, r, e, i);
        return Ce(a) ? a : e
    } else
        return jD(n, e) && s(bl(An.NOT_FOUND_KEY, {
            key: e,
            locale: r
        })),
        e
}
function qu(t, e, r) {
    const n = t;
    n.__localeChainCache = new Map,
    t.localeFallbacker(t, r, e)
}
function WD(t, e) {
    return t === e ? !1 : t.split("-")[0] === e.split("-")[0]
}
function die(t, e) {
    const r = e.indexOf(t);
    if (r === -1)
        return !1;
    for (let n = r + 1; n < e.length; n++)
        if (WD(t, e[n]))
            return !0;
    return !1
}
const vA = typeof Intl < "u"
  , YD = {
    dateTimeFormat: vA && typeof Intl.DateTimeFormat < "u",
    numberFormat: vA && typeof Intl.NumberFormat < "u"
};
function yA(t, ...e) {
    const {datetimeFormats: r, unresolving: n, fallbackLocale: i, onWarn: o, localeFallbacker: s} = t
      , {__datetimeFormatters: a} = t;
    if (!YD.dateTimeFormat)
        return o(bl(An.CANNOT_FORMAT_DATE)),
        kx;
    const [l,c,u,f] = Iy(...e)
      , d = ct(u.missingWarn) ? u.missingWarn : t.missingWarn
      , h = ct(u.fallbackWarn) ? u.fallbackWarn : t.fallbackWarn
      , x = !!u.part
      , y = Q2(t, u)
      , m = s(t, i, y);
    if (!Ce(l) || l === "")
        return new Intl.DateTimeFormat(y,f).format(c);
    let E = {}, g, p = null, v = y, _ = null;
    const b = "datetime format";
    for (let T = 0; T < m.length; T++) {
        if (g = _ = m[T],
        y !== g && l1(h, l) && o(bl(An.FALLBACK_TO_DATE_FORMAT, {
            key: l,
            target: g
        })),
        y !== g) {
            const A = t.__v_emitter;
            A && A.emit("fallback", {
                type: b,
                key: l,
                from: v,
                to: _,
                groupId: `${b}:${l}`
            })
        }
        if (E = r[g] || {},
        p = E[l],
        Ze(p))
            break;
        eb(t, l, g, d, b),
        v = _
    }
    if (!Ze(p) || !Ce(g))
        return n ? a1 : l;
    let C = `${g}__${l}`;
    s1(f) || (C = `${C}__${JSON.stringify(f)}`);
    let w = a.get(C);
    return w || (w = new Intl.DateTimeFormat(g,wr({}, p, f)),
    a.set(C, w)),
    x ? w.formatToParts(c) : w.format(c)
}
const XD = ["localeMatcher", "weekday", "era", "year", "month", "day", "hour", "minute", "second", "timeZoneName", "formatMatcher", "hour12", "timeZone", "dateStyle", "timeStyle", "calendar", "dayPeriod", "numberingSystem", "hourCycle", "fractionalSecondDigits"];
function Iy(...t) {
    const [e,r,n,i] = t
      , o = At();
    let s = At(), a;
    if (Ce(e)) {
        const l = e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
        if (!l)
            throw Qo(Zr.INVALID_ISO_DATE_ARGUMENT);
        const c = l[3] ? l[3].trim().startsWith("T") ? `${l[1].trim()}${l[3].trim()}` : `${l[1].trim()}T${l[3].trim()}` : l[1].trim();
        a = new Date(c);
        try {
            a.toISOString()
        } catch {
            throw Qo(Zr.INVALID_ISO_DATE_ARGUMENT)
        }
    } else if (Vre(e)) {
        if (isNaN(e.getTime()))
            throw Qo(Zr.INVALID_DATE_ARGUMENT);
        a = e
    } else if (ur(e))
        a = e;
    else
        throw Qo(Zr.INVALID_ARGUMENT);
    return Ce(r) ? o.key = r : Ze(r) && Object.keys(r).forEach(l => {
        XD.includes(l) ? s[l] = r[l] : o[l] = r[l]
    }
    ),
    Ce(n) ? o.locale = n : Ze(n) && (s = n),
    Ze(i) && (s = i),
    [o.key || "", a, o, s]
}
function EA(t, e, r) {
    const n = t;
    for (const i in r) {
        const o = `${e}__${i}`;
        n.__datetimeFormatters.has(o) && n.__datetimeFormatters.delete(o)
    }
}
function _A(t, ...e) {
    const {numberFormats: r, unresolving: n, fallbackLocale: i, onWarn: o, localeFallbacker: s} = t
      , {__numberFormatters: a} = t;
    if (!YD.numberFormat)
        return o(bl(An.CANNOT_FORMAT_NUMBER)),
        kx;
    const [l,c,u,f] = Oy(...e)
      , d = ct(u.missingWarn) ? u.missingWarn : t.missingWarn
      , h = ct(u.fallbackWarn) ? u.fallbackWarn : t.fallbackWarn
      , x = !!u.part
      , y = Q2(t, u)
      , m = s(t, i, y);
    if (!Ce(l) || l === "")
        return new Intl.NumberFormat(y,f).format(c);
    let E = {}, g, p = null, v = y, _ = null;
    const b = "number format";
    for (let T = 0; T < m.length; T++) {
        if (g = _ = m[T],
        y !== g && l1(h, l) && o(bl(An.FALLBACK_TO_NUMBER_FORMAT, {
            key: l,
            target: g
        })),
        y !== g) {
            const A = t.__v_emitter;
            A && A.emit("fallback", {
                type: b,
                key: l,
                from: v,
                to: _,
                groupId: `${b}:${l}`
            })
        }
        if (E = r[g] || {},
        p = E[l],
        Ze(p))
            break;
        eb(t, l, g, d, b),
        v = _
    }
    if (!Ze(p) || !Ce(g))
        return n ? a1 : l;
    let C = `${g}__${l}`;
    s1(f) || (C = `${C}__${JSON.stringify(f)}`);
    let w = a.get(C);
    return w || (w = new Intl.NumberFormat(g,wr({}, p, f)),
    a.set(C, w)),
    x ? w.formatToParts(c) : w.format(c)
}
const KD = ["localeMatcher", "style", "currency", "currencyDisplay", "currencySign", "useGrouping", "minimumIntegerDigits", "minimumFractionDigits", "maximumFractionDigits", "minimumSignificantDigits", "maximumSignificantDigits", "compactDisplay", "notation", "signDisplay", "unit", "unitDisplay", "roundingMode", "roundingPriority", "roundingIncrement", "trailingZeroDisplay"];
function Oy(...t) {
    const [e,r,n,i] = t
      , o = At();
    let s = At();
    if (!ur(e))
        throw Qo(Zr.INVALID_ARGUMENT);
    const a = e;
    return Ce(r) ? o.key = r : Ze(r) && Object.keys(r).forEach(l => {
        KD.includes(l) ? s[l] = r[l] : o[l] = r[l]
    }
    ),
    Ce(n) ? o.locale = n : Ze(n) && (s = n),
    Ze(i) && (s = i),
    [o.key || "", a, o, s]
}
function bA(t, e, r) {
    const n = t;
    for (const i in r) {
        const o = `${e}__${i}`;
        n.__numberFormatters.has(o) && n.__numberFormatters.delete(o)
    }
}
const hie = t => t
  , xie = t => ""
  , pie = "text"
  , gie = t => t.length === 0 ? "" : K2(t)
  , mie = Xre;
function CA(t, e) {
    return t = Math.abs(t),
    e === 2 ? t ? t > 1 ? 1 : 0 : 1 : t ? Math.min(t, 2) : 0
}
function vie(t) {
    const e = ur(t.pluralIndex) ? t.pluralIndex : -1;
    return t.named && (ur(t.named.count) || ur(t.named.n)) ? ur(t.named.count) ? t.named.count : ur(t.named.n) ? t.named.n : e : e
}
function yie(t, e) {
    e.count || (e.count = t),
    e.n || (e.n = t)
}
function Eie(t={}) {
    const e = t.locale
      , r = vie(t)
      , n = ot(t.pluralRules) && Ce(e) && wt(t.pluralRules[e]) ? t.pluralRules[e] : CA
      , i = ot(t.pluralRules) && Ce(e) && wt(t.pluralRules[e]) ? CA : void 0
      , o = E => E[n(r, E.length, i)]
      , s = t.list || []
      , a = E => s[E]
      , l = t.named || At();
    ur(t.pluralIndex) && yie(r, l);
    const c = E => l[E];
    function u(E, g) {
        const p = wt(t.messages) ? t.messages(E, !!g) : ot(t.messages) ? t.messages[E] : !1;
        return p || (t.parent ? t.parent.message(E) : xie)
    }
    const f = E => t.modifiers ? t.modifiers[E] : hie
      , d = Ze(t.processor) && wt(t.processor.normalize) ? t.processor.normalize : gie
      , h = Ze(t.processor) && wt(t.processor.interpolate) ? t.processor.interpolate : mie
      , x = Ze(t.processor) && Ce(t.processor.type) ? t.processor.type : pie
      , m = {
        list: a,
        named: c,
        plural: o,
        linked: (E, ...g) => {
            const [p,v] = g;
            let _ = "text"
              , b = "";
            g.length === 1 ? ot(p) ? (b = p.modifier || b,
            _ = p.type || _) : Ce(p) && (b = p || b) : g.length === 2 && (Ce(p) && (b = p || b),
            Ce(v) && (_ = v || _));
            const C = u(E, !0)(m)
              , w = _ === "vnode" && Wt(C) && b ? C[0] : C;
            return b ? f(b)(w, _) : w
        }
        ,
        message: u,
        type: x,
        interpolate: h,
        normalize: d,
        values: wr(At(), s, l)
    };
    return m
}
const AA = () => ""
  , li = t => wt(t);
function wA(t, ...e) {
    const {fallbackFormat: r, postTranslation: n, unresolving: i, messageCompiler: o, fallbackLocale: s, messages: a} = t
      , [l,c] = ky(...e)
      , u = ct(c.missingWarn) ? c.missingWarn : t.missingWarn
      , f = ct(c.fallbackWarn) ? c.fallbackWarn : t.fallbackWarn
      , d = ct(c.escapeParameter) ? c.escapeParameter : t.escapeParameter
      , h = !!c.resolvedMessage
      , x = Ce(c.default) || ct(c.default) ? ct(c.default) ? o ? l : () => l : c.default : r ? o ? l : () => l : null
      , y = r || x != null && (Ce(x) || wt(x))
      , m = Q2(t, c);
    d && _ie(c);
    let[E,g,p] = h ? [l, m, a[m] || At()] : qD(t, l, m, s, f, u)
      , v = E
      , _ = l;
    if (!h && !(Ce(v) || gi(v) || li(v)) && y && (v = x,
    _ = v),
    !h && (!(Ce(v) || gi(v) || li(v)) || !Ce(g)))
        return i ? a1 : l;
    if (Ce(v) && t.messageCompiler == null)
        return Co(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${l}'.`),
        l;
    let b = !1;
    const C = () => {
        b = !0
    }
      , w = li(v) ? v : ZD(t, l, g, v, _, C);
    if (b)
        return v;
    const T = wie(t, g, p, c)
      , A = Eie(T)
      , B = bie(t, w, A);
    let S = n ? n(B, l) : B;
    d && Ce(S) && (S = jre(S));
    {
        const D = {
            timestamp: Date.now(),
            key: Ce(l) ? l : li(v) ? v.key : "",
            locale: g || (li(v) ? v.locale : ""),
            format: Ce(v) ? v : li(v) ? v.source : "",
            message: S
        };
        D.meta = wr({}, t.__meta, cie() || {}),
        Une(D)
    }
    return S
}
function _ie(t) {
    Wt(t.list) ? t.list = t.list.map(e => Ce(e) ? oA(e) : e) : ot(t.named) && Object.keys(t.named).forEach(e => {
        Ce(t.named[e]) && (t.named[e] = oA(t.named[e]))
    }
    )
}
function qD(t, e, r, n, i, o) {
    const {messages: s, onWarn: a, messageResolver: l, localeFallbacker: c} = t
      , u = c(t, n, r);
    let f = At(), d, h = null, x = r, y = null;
    const m = "translate";
    for (let E = 0; E < u.length; E++) {
        if (d = y = u[E],
        r !== d && !WD(r, d) && l1(i, e) && a(bl(An.FALLBACK_TO_TRANSLATE, {
            key: e,
            target: d
        })),
        r !== d) {
            const _ = t.__v_emitter;
            _ && _.emit("fallback", {
                type: m,
                key: e,
                from: x,
                to: y,
                groupId: `${m}:${e}`
            })
        }
        f = s[d] || At();
        let g = null, p, v;
        if (Gi && (g = window.performance.now(),
        p = "intlify-message-resolve-start",
        v = "intlify-message-resolve-end",
        zn && zn(p)),
        (h = l(f, e)) === null && (h = f[e]),
        Gi) {
            const _ = window.performance.now()
              , b = t.__v_emitter;
            b && g && h && b.emit("message-resolve", {
                type: "message-resolve",
                key: e,
                message: h,
                time: _ - g,
                groupId: `${m}:${e}`
            }),
            p && v && zn && _l && (zn(v),
            _l("intlify message resolve", p, v))
        }
        if (Ce(h) || gi(h) || li(h))
            break;
        if (!die(d, u)) {
            const _ = eb(t, e, d, o, m);
            _ !== e && (h = _)
        }
        x = y
    }
    return [h, d, f]
}
function ZD(t, e, r, n, i, o) {
    const {messageCompiler: s, warnHtmlMessage: a} = t;
    if (li(n)) {
        const d = n;
        return d.locale = d.locale || r,
        d.key = d.key || e,
        d
    }
    if (s == null) {
        const d = () => n;
        return d.locale = r,
        d.key = e,
        d
    }
    let l = null, c, u;
    Gi && (l = window.performance.now(),
    c = "intlify-message-compilation-start",
    u = "intlify-message-compilation-end",
    zn && zn(c));
    const f = s(n, Cie(t, r, i, n, a, o));
    if (Gi) {
        const d = window.performance.now()
          , h = t.__v_emitter;
        h && l && h.emit("message-compilation", {
            type: "message-compilation",
            message: n,
            time: d - l,
            groupId: `translate:${e}`
        }),
        c && u && zn && _l && (zn(u),
        _l("intlify message compilation", c, u))
    }
    return f.locale = r,
    f.key = e,
    f.source = n,
    f
}
function bie(t, e, r) {
    let n = null, i, o;
    Gi && (n = window.performance.now(),
    i = "intlify-message-evaluation-start",
    o = "intlify-message-evaluation-end",
    zn && zn(i));
    const s = e(r);
    if (Gi) {
        const a = window.performance.now()
          , l = t.__v_emitter;
        l && n && l.emit("message-evaluation", {
            type: "message-evaluation",
            value: s,
            time: a - n,
            groupId: `translate:${e.key}`
        }),
        i && o && zn && _l && (zn(o),
        _l("intlify message evaluation", i, o))
    }
    return s
}
function ky(...t) {
    const [e,r,n] = t
      , i = At();
    if (!Ce(e) && !ur(e) && !li(e) && !gi(e))
        throw Qo(Zr.INVALID_ARGUMENT);
    const o = ur(e) ? String(e) : (li(e),
    e);
    return ur(r) ? i.plural = r : Ce(r) ? i.default = r : Ze(r) && !s1(r) ? i.named = r : Wt(r) && (i.list = r),
    ur(n) ? i.plural = n : Ce(n) ? i.default = n : Ze(n) && wr(i, n),
    [o, i]
}
function Cie(t, e, r, n, i, o) {
    return {
        locale: e,
        key: r,
        warnHtmlMessage: i,
        onError: s => {
            o && o(s);
            {
                const a = Aie(n)
                  , l = `Message compilation error: ${s.message}`
                  , c = s.location && a && Kre(a, s.location.start.offset, s.location.end.offset)
                  , u = t.__v_emitter;
                u && a && u.emit("compile-error", {
                    message: a,
                    error: s.message,
                    start: s.location && s.location.start.offset,
                    end: s.location && s.location.end.offset,
                    groupId: `translate:${r}`
                }),
                console.error(c ? `${l}
${c}` : l)
            }
        }
        ,
        onCacheKey: s => Gre(e, r, s)
    }
}
function Aie(t) {
    if (Ce(t))
        return t;
    if (t.loc && t.loc.source)
        return t.loc.source
}
function wie(t, e, r, n) {
    const {modifiers: i, pluralRules: o, messageResolver: s, fallbackLocale: a, fallbackWarn: l, missingWarn: c, fallbackContext: u} = t
      , d = {
        locale: e,
        modifiers: i,
        pluralRules: o,
        messages: (h, x) => {
            let y = s(r, h);
            if (y == null && (u || x)) {
                const [,,m] = qD(u || t, h, e, a, l, c);
                y = s(m, h)
            }
            if (Ce(y) || gi(y)) {
                let m = !1;
                const g = ZD(t, h, e, y, h, () => {
                    m = !0
                }
                );
                return m ? AA : g
            } else
                return li(y) ? y : AA
        }
    };
    return t.processor && (d.processor = t.processor),
    n.list && (d.list = n.list),
    n.named && (d.named = n.named),
    ur(n.plural) && (d.pluralIndex = n.plural),
    d
}
wne();
/*!
  * vue-i18n v11.2.7
  * (c) 2025 kazuya kawaguchi
  * Released under the MIT License.
  */
const Bie = "11.2.7";
function Sie() {
    typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (Za().__VUE_I18N_FULL_INSTALL__ = !0),
    typeof __VUE_I18N_LEGACY_API__ != "boolean" && (Za().__VUE_I18N_LEGACY_API__ = !0),
    typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Za().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1),
    typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Za().__INTLIFY_PROD_DEVTOOLS__ = !1)
}
const St = {
    UNEXPECTED_RETURN_TYPE: Hne,
    INVALID_ARGUMENT: 25,
    MUST_BE_CALL_SETUP_TOP: 26,
    NOT_INSTALLED: 27,
    REQUIRED_VALUE: 28,
    INVALID_VALUE: 29,
    CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN: 30,
    NOT_INSTALLED_WITH_PROVIDE: 31,
    UNEXPECTED_ERROR: 32,
    NOT_COMPATIBLE_LEGACY_VUE_I18N: 33,
    NOT_AVAILABLE_COMPOSITION_IN_LEGACY: 34
};
function kn(t, ...e) {
    return Du(t, null, {
        messages: Tie,
        args: e
    })
}
const Tie = {
    [St.UNEXPECTED_RETURN_TYPE]: "Unexpected return type in composer",
    [St.INVALID_ARGUMENT]: "Invalid argument",
    [St.MUST_BE_CALL_SETUP_TOP]: "Must be called at the top of a `setup` function",
    [St.NOT_INSTALLED]: "Need to install with `app.use` function",
    [St.UNEXPECTED_ERROR]: "Unexpected error",
    [St.REQUIRED_VALUE]: "Required in value: {0}",
    [St.INVALID_VALUE]: "Invalid value",
    [St.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]: "Cannot setup vue-devtools plugin",
    [St.NOT_INSTALLED_WITH_PROVIDE]: "Need to install with `provide` function",
    [St.NOT_COMPATIBLE_LEGACY_VUE_I18N]: "Not compatible legacy VueI18n.",
    [St.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]: "Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"
}
  , Ry = Io("__translateVNode")
  , My = Io("__datetimeParts")
  , Ny = Io("__numberParts")
  , Cl = Io("__enableEmitter")
  , Ef = Io("__disableEmitter")
  , JD = Io("__setPluralRules")
  , QD = Io("__injectWithOption")
  , Ly = Io("__dispose")
  , ci = {
    FALLBACK_TO_ROOT: tie,
    NOT_FOUND_PARENT_SCOPE: 9,
    IGNORE_OBJ_FLATTEN: 10,
    DEPRECATE_LEGACY_MODE: 11,
    DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE: 12,
    DUPLICATE_USE_I18N_CALLING: 13
}
  , Die = {
    [ci.FALLBACK_TO_ROOT]: "Fall back to {type} '{key}' with root locale.",
    [ci.NOT_FOUND_PARENT_SCOPE]: "Not found parent scope. use the global scope.",
    [ci.IGNORE_OBJ_FLATTEN]: "Ignore object flatten: '{key}' key has an string value",
    [ci.DEPRECATE_LEGACY_MODE]: `Legacy API mode has been deprecated in v11. Use Composition API mode instead.
About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,
    [ci.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]: "'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",
    [ci.DUPLICATE_USE_I18N_CALLING]: "Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component."
};
function nu(t, ...e) {
    return o1(Die[t], ...e)
}
function _f(t) {
    if (!ot(t) || gi(t))
        return t;
    for (const e in t)
        if (Ri(t, e))
            if (!e.includes("."))
                ot(t[e]) && _f(t[e]);
            else {
                const r = e.split(".")
                  , n = r.length - 1;
                let i = t
                  , o = !1;
                for (let s = 0; s < n; s++) {
                    if (r[s] === "__proto__")
                        throw new Error(`unsafe key: ${r[s]}`);
                    if (r[s]in i || (i[r[s]] = At()),
                    !ot(i[r[s]])) {
                        Co(nu(ci.IGNORE_OBJ_FLATTEN, {
                            key: r[s]
                        })),
                        o = !0;
                        break
                    }
                    i = i[r[s]]
                }
                if (o || (gi(i) ? LD.includes(r[n]) || delete t[e] : (i[r[n]] = t[e],
                delete t[e])),
                !gi(i)) {
                    const s = i[r[n]];
                    ot(s) && _f(s)
                }
            }
    return t
}
function tb(t, e) {
    const {messages: r, __i18n: n, messageResolver: i, flatJson: o} = e
      , s = Ze(r) ? r : Wt(n) ? At() : {
        [t]: At()
    };
    if (Wt(n) && n.forEach(a => {
        if ("locale"in a && "resource"in a) {
            const {locale: l, resource: c} = a;
            l ? (s[l] = s[l] || At(),
            Kh(c, s[l])) : Kh(c, s)
        } else
            Ce(a) && Kh(JSON.parse(a), s)
    }
    ),
    i == null && o)
        for (const a in s)
            Ri(s, a) && _f(s[a]);
    return s
}
function eF(t) {
    return t.type
}
function tF(t, e, r) {
    let n = ot(e.messages) ? e.messages : At();
    "__i18nGlobal"in r && (n = tb(t.locale.value, {
        messages: n,
        __i18n: r.__i18nGlobal
    }));
    const i = Object.keys(n);
    i.length && i.forEach(o => {
        t.mergeLocaleMessage(o, n[o])
    }
    );
    {
        if (ot(e.datetimeFormats)) {
            const o = Object.keys(e.datetimeFormats);
            o.length && o.forEach(s => {
                t.mergeDateTimeFormat(s, e.datetimeFormats[s])
            }
            )
        }
        if (ot(e.numberFormats)) {
            const o = Object.keys(e.numberFormats);
            o.length && o.forEach(s => {
                t.mergeNumberFormat(s, e.numberFormats[s])
            }
            )
        }
    }
}
function BA(t) {
    return O(yo, null, t, 0)
}
function Gc() {
    const t = "currentInstance";
    return t in oy ? oy[t] : Ot()
}
const SA = "__INTLIFY_META__"
  , TA = () => []
  , Fie = () => !1;
let DA = 0;
function FA(t) {
    return (e, r, n, i) => t(r, n, Gc() || void 0, i)
}
const Pie = () => {
    const t = Gc();
    let e = null;
    return t && (e = eF(t)[SA]) ? {
        [SA]: e
    } : null
}
;
function rb(t={}) {
    const {__root: e, __injectWithOption: r} = t
      , n = e === void 0
      , i = t.flatJson
      , o = Gi ? ie : Cp;
    let s = ct(t.inheritLocale) ? t.inheritLocale : !0;
    const a = o(e && s ? e.locale.value : Ce(t.locale) ? t.locale : yf)
      , l = o(e && s ? e.fallbackLocale.value : Ce(t.fallbackLocale) || Wt(t.fallbackLocale) || Ze(t.fallbackLocale) || t.fallbackLocale === !1 ? t.fallbackLocale : a.value)
      , c = o(tb(a.value, t))
      , u = o(Ze(t.datetimeFormats) ? t.datetimeFormats : {
        [a.value]: {}
    })
      , f = o(Ze(t.numberFormats) ? t.numberFormats : {
        [a.value]: {}
    });
    let d = e ? e.missingWarn : ct(t.missingWarn) || tu(t.missingWarn) ? t.missingWarn : !0
      , h = e ? e.fallbackWarn : ct(t.fallbackWarn) || tu(t.fallbackWarn) ? t.fallbackWarn : !0
      , x = e ? e.fallbackRoot : ct(t.fallbackRoot) ? t.fallbackRoot : !0
      , y = !!t.fallbackFormat
      , m = wt(t.missing) ? t.missing : null
      , E = wt(t.missing) ? FA(t.missing) : null
      , g = wt(t.postTranslation) ? t.postTranslation : null
      , p = e ? e.warnHtmlMessage : ct(t.warnHtmlMessage) ? t.warnHtmlMessage : !0
      , v = !!t.escapeParameter;
    const _ = e ? e.modifiers : Ze(t.modifiers) ? t.modifiers : {};
    let b = t.pluralRules || e && e.pluralRules, C;
    C = ( () => {
        n && gA(null);
        const Z = {
            version: Bie,
            locale: a.value,
            fallbackLocale: l.value,
            messages: c.value,
            modifiers: _,
            pluralRules: b,
            missing: E === null ? void 0 : E,
            missingWarn: d,
            fallbackWarn: h,
            fallbackFormat: y,
            unresolving: !0,
            postTranslation: g === null ? void 0 : g,
            warnHtmlMessage: p,
            escapeParameter: v,
            messageResolver: t.messageResolver,
            messageCompiler: t.messageCompiler,
            __meta: {
                framework: "vue"
            }
        };
        Z.datetimeFormats = u.value,
        Z.numberFormats = f.value,
        Z.__datetimeFormatters = Ze(C) ? C.__datetimeFormatters : void 0,
        Z.__numberFormatters = Ze(C) ? C.__numberFormatters : void 0,
        Z.__v_emitter = Ze(C) ? C.__v_emitter : void 0;
        const se = fie(Z);
        return n && gA(se),
        se
    }
    )(),
    qu(C, a.value, l.value);
    function T() {
        return [a.value, l.value, c.value, u.value, f.value]
    }
    const A = ae({
        get: () => a.value,
        set: Z => {
            C.locale = Z,
            a.value = Z
        }
    })
      , B = ae({
        get: () => l.value,
        set: Z => {
            C.fallbackLocale = Z,
            l.value = Z,
            qu(C, a.value, Z)
        }
    })
      , S = ae( () => c.value)
      , D = ae( () => u.value)
      , F = ae( () => f.value);
    function R() {
        return wt(g) ? g : null
    }
    function P(Z) {
        g = Z,
        C.postTranslation = Z
    }
    function N() {
        return m
    }
    function j(Z) {
        Z !== null && (E = FA(Z)),
        m = Z,
        C.missing = E
    }
    function K(Z, se) {
        return Z !== "translate" || !se.resolvedMessage
    }
    const oe = (Z, se, we, Ue, et, kt) => {
        T();
        let Sr;
        try {
            n || (C.fallbackContext = e ? uie() : void 0),
            Sr = Z(C)
        } finally {
            n || (C.fallbackContext = void 0)
        }
        if (we !== "translate exists" && ur(Sr) && Sr === a1 || we === "translate exists" && !Sr) {
            const [En,Dd] = se();
            if (e && Ce(En) && K(we, Dd)) {
                x && (l1(h, En) || jD(d, En)) && Co(nu(ci.FALLBACK_TO_ROOT, {
                    key: En,
                    type: we
                }));
                {
                    const {__v_emitter: As} = C;
                    As && x && As.emit("fallback", {
                        type: we,
                        key: En,
                        to: "global",
                        groupId: `${we}:${En}`
                    })
                }
            }
            return e && x ? Ue(e) : et(En)
        } else {
            if (kt(Sr))
                return Sr;
            throw kn(St.UNEXPECTED_RETURN_TYPE)
        }
    }
    ;
    function U(...Z) {
        return oe(se => Reflect.apply(wA, null, [se, ...Z]), () => ky(...Z), "translate", se => Reflect.apply(se.t, se, [...Z]), se => se, se => Ce(se))
    }
    function $(...Z) {
        const [se,we,Ue] = Z;
        if (Ue && !ot(Ue))
            throw kn(St.INVALID_ARGUMENT);
        return U(se, we, wr({
            resolvedMessage: !0
        }, Ue || {}))
    }
    function V(...Z) {
        return oe(se => Reflect.apply(yA, null, [se, ...Z]), () => Iy(...Z), "datetime format", se => Reflect.apply(se.d, se, [...Z]), () => kx, se => Ce(se) || Wt(se))
    }
    function W(...Z) {
        return oe(se => Reflect.apply(_A, null, [se, ...Z]), () => Oy(...Z), "number format", se => Reflect.apply(se.n, se, [...Z]), () => kx, se => Ce(se) || Wt(se))
    }
    function H(Z) {
        return Z.map(se => Ce(se) || ur(se) || ct(se) ? BA(String(se)) : se)
    }
    const G = {
        normalize: H,
        interpolate: Z => Z,
        type: "vnode"
    };
    function re(...Z) {
        return oe(se => {
            let we;
            const Ue = se;
            try {
                Ue.processor = G,
                we = Reflect.apply(wA, null, [Ue, ...Z])
            } finally {
                Ue.processor = null
            }
            return we
        }
        , () => ky(...Z), "translate", se => se[Ry](...Z), se => [BA(se)], se => Wt(se))
    }
    function te(...Z) {
        return oe(se => Reflect.apply(_A, null, [se, ...Z]), () => Oy(...Z), "number format", se => se[Ny](...Z), TA, se => Ce(se) || Wt(se))
    }
    function he(...Z) {
        return oe(se => Reflect.apply(yA, null, [se, ...Z]), () => Iy(...Z), "datetime format", se => se[My](...Z), TA, se => Ce(se) || Wt(se))
    }
    function xe(Z) {
        b = Z,
        C.pluralRules = b
    }
    function ve(Z, se) {
        return oe( () => {
            if (!Z)
                return !1;
            const we = Ce(se) ? se : a.value
              , Ue = q(we)
              , et = C.messageResolver(Ue, Z);
            return gi(et) || li(et) || Ce(et)
        }
        , () => [Z], "translate exists", we => Reflect.apply(we.te, we, [Z, se]), Fie, we => ct(we))
    }
    function I(Z) {
        let se = null;
        const we = $D(C, l.value, a.value);
        for (let Ue = 0; Ue < we.length; Ue++) {
            const et = c.value[we[Ue]] || {}
              , kt = C.messageResolver(et, Z);
            if (kt != null) {
                se = kt;
                break
            }
        }
        return se
    }
    function z(Z) {
        const se = I(Z);
        return se ?? (e ? e.tm(Z) || {} : {})
    }
    function q(Z) {
        return c.value[Z] || {}
    }
    function ce(Z, se) {
        if (i) {
            const we = {
                [Z]: se
            };
            for (const Ue in we)
                Ri(we, Ue) && _f(we[Ue]);
            se = we[Z]
        }
        c.value[Z] = se,
        C.messages = c.value
    }
    function fe(Z, se) {
        c.value[Z] = c.value[Z] || {};
        const we = {
            [Z]: se
        };
        if (i)
            for (const Ue in we)
                Ri(we, Ue) && _f(we[Ue]);
        se = we[Z],
        Kh(se, c.value[Z]),
        C.messages = c.value
    }
    function k(Z) {
        return u.value[Z] || {}
    }
    function L(Z, se) {
        u.value[Z] = se,
        C.datetimeFormats = u.value,
        EA(C, Z, se)
    }
    function Y(Z, se) {
        u.value[Z] = wr(u.value[Z] || {}, se),
        C.datetimeFormats = u.value,
        EA(C, Z, se)
    }
    function ee(Z) {
        return f.value[Z] || {}
    }
    function de(Z, se) {
        f.value[Z] = se,
        C.numberFormats = f.value,
        bA(C, Z, se)
    }
    function ye(Z, se) {
        f.value[Z] = wr(f.value[Z] || {}, se),
        C.numberFormats = f.value,
        bA(C, Z, se)
    }
    DA++,
    e && Gi && (me(e.locale, Z => {
        s && (a.value = Z,
        C.locale = Z,
        qu(C, a.value, l.value))
    }
    ),
    me(e.fallbackLocale, Z => {
        s && (l.value = Z,
        C.fallbackLocale = Z,
        qu(C, a.value, l.value))
    }
    ));
    const pe = {
        id: DA,
        locale: A,
        fallbackLocale: B,
        get inheritLocale() {
            return s
        },
        set inheritLocale(Z) {
            s = Z,
            Z && e && (a.value = e.locale.value,
            l.value = e.fallbackLocale.value,
            qu(C, a.value, l.value))
        },
        get availableLocales() {
            return Object.keys(c.value).sort()
        },
        messages: S,
        get modifiers() {
            return _
        },
        get pluralRules() {
            return b || {}
        },
        get isGlobal() {
            return n
        },
        get missingWarn() {
            return d
        },
        set missingWarn(Z) {
            d = Z,
            C.missingWarn = d
        },
        get fallbackWarn() {
            return h
        },
        set fallbackWarn(Z) {
            h = Z,
            C.fallbackWarn = h
        },
        get fallbackRoot() {
            return x
        },
        set fallbackRoot(Z) {
            x = Z
        },
        get fallbackFormat() {
            return y
        },
        set fallbackFormat(Z) {
            y = Z,
            C.fallbackFormat = y
        },
        get warnHtmlMessage() {
            return p
        },
        set warnHtmlMessage(Z) {
            p = Z,
            C.warnHtmlMessage = Z
        },
        get escapeParameter() {
            return v
        },
        set escapeParameter(Z) {
            v = Z,
            C.escapeParameter = Z
        },
        t: U,
        getLocaleMessage: q,
        setLocaleMessage: ce,
        mergeLocaleMessage: fe,
        getPostTranslationHandler: R,
        setPostTranslationHandler: P,
        getMissingHandler: N,
        setMissingHandler: j,
        [JD]: xe
    };
    return pe.datetimeFormats = D,
    pe.numberFormats = F,
    pe.rt = $,
    pe.te = ve,
    pe.tm = z,
    pe.d = V,
    pe.n = W,
    pe.getDateTimeFormat = k,
    pe.setDateTimeFormat = L,
    pe.mergeDateTimeFormat = Y,
    pe.getNumberFormat = ee,
    pe.setNumberFormat = de,
    pe.mergeNumberFormat = ye,
    pe[QD] = r,
    pe[Ry] = re,
    pe[My] = he,
    pe[Ny] = te,
    pe[Cl] = Z => {
        C.__v_emitter = Z
    }
    ,
    pe[Ef] = () => {
        C.__v_emitter = void 0
    }
    ,
    pe
}
const rF = "vue-i18n: composer properties"
  , Ag = {
    "vue-devtools-plugin-vue-i18n": "Vue I18n DevTools",
    "vue-i18n-resource-inspector": "Vue I18n DevTools",
    "vue-i18n-timeline": "Vue I18n"
}
  , Iie = {
    "vue-i18n-resource-inspector": "Search for scopes ..."
}
  , Oie = {
    "vue-i18n-timeline": 16764185
};
let $y;
async function kie(t, e) {
    return new Promise( (r, n) => {
        try {
            Up({
                id: "vue-devtools-plugin-vue-i18n",
                label: Ag["vue-devtools-plugin-vue-i18n"],
                packageName: "vue-i18n",
                homepage: "https://vue-i18n.intlify.dev",
                logo: "https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",
                componentStateTypes: [rF],
                app: t
            }, i => {
                $y = i,
                i.on.visitComponentTree( ({componentInstance: s, treeNode: a}) => {
                    Rie(s, a, e)
                }
                ),
                i.on.inspectComponent( ({componentInstance: s, instanceData: a}) => {
                    s.__VUE_I18N__ && a && (e.mode === "legacy" ? s.__VUE_I18N__ !== e.global.__composer && PA(a, s.__VUE_I18N__) : PA(a, s.__VUE_I18N__))
                }
                ),
                i.addInspector({
                    id: "vue-i18n-resource-inspector",
                    label: Ag["vue-i18n-resource-inspector"],
                    icon: "language",
                    treeFilterPlaceholder: Iie["vue-i18n-resource-inspector"]
                }),
                i.on.getInspectorTree(s => {
                    s.app === t && s.inspectorId === "vue-i18n-resource-inspector" && Uie(s, e)
                }
                );
                const o = new Map;
                i.on.getInspectorState(async s => {
                    if (s.app === t && s.inspectorId === "vue-i18n-resource-inspector")
                        if (i.unhighlightElement(),
                        Hie(s, e),
                        s.nodeId === "global") {
                            if (!o.has(s.app)) {
                                const [a] = await i.getComponentInstances(s.app);
                                o.set(s.app, a)
                            }
                            i.highlightElement(o.get(s.app))
                        } else {
                            const a = Gie(s.nodeId, e);
                            a && i.highlightElement(a)
                        }
                }
                ),
                i.on.editInspectorState(s => {
                    s.app === t && s.inspectorId === "vue-i18n-resource-inspector" && zie(s, e)
                }
                ),
                i.addTimelineLayer({
                    id: "vue-i18n-timeline",
                    label: Ag["vue-i18n-timeline"],
                    color: Oie["vue-i18n-timeline"]
                }),
                r(!0)
            }
            )
        } catch (i) {
            console.error(i),
            n(!1)
        }
    }
    )
}
function nF(t) {
    return t.type.name || t.type.displayName || t.type.__file || "Anonymous"
}
function Rie(t, e, r) {
    const n = r.mode === "composition" ? r.global : r.global.__composer;
    if (t && t.__VUE_I18N__ && t.__VUE_I18N__ !== n) {
        const i = {
            label: `i18n (${nF(t)} Scope)`,
            textColor: 0,
            backgroundColor: 16764185
        };
        e.tags.push(i)
    }
}
function PA(t, e) {
    const r = rF;
    t.state.push({
        type: r,
        key: "locale",
        editable: !0,
        value: e.locale.value
    }),
    t.state.push({
        type: r,
        key: "availableLocales",
        editable: !1,
        value: e.availableLocales
    }),
    t.state.push({
        type: r,
        key: "fallbackLocale",
        editable: !0,
        value: e.fallbackLocale.value
    }),
    t.state.push({
        type: r,
        key: "inheritLocale",
        editable: !0,
        value: e.inheritLocale
    }),
    t.state.push({
        type: r,
        key: "messages",
        editable: !1,
        value: nb(e.messages.value)
    }),
    t.state.push({
        type: r,
        key: "datetimeFormats",
        editable: !1,
        value: e.datetimeFormats.value
    }),
    t.state.push({
        type: r,
        key: "numberFormats",
        editable: !1,
        value: e.numberFormats.value
    })
}
function nb(t) {
    const e = {};
    return Object.keys(t).forEach(r => {
        const n = t[r];
        wt(n) && "source"in n ? e[r] = $ie(n) : gi(n) && n.loc && n.loc.source ? e[r] = n.loc.source : ot(n) ? e[r] = nb(n) : e[r] = n
    }
    ),
    e
}
const Mie = {
    "<": "&lt;",
    ">": "&gt;",
    '"': "&quot;",
    "&": "&amp;"
};
function Nie(t) {
    return t.replace(/[<>"&]/g, Lie)
}
function Lie(t) {
    return Mie[t] || t
}
function $ie(t) {
    return {
        _custom: {
            type: "function",
            display: `<span>ƒ</span> ${t.source ? `("${Nie(t.source)}")` : "(?)"}`
        }
    }
}
function Uie(t, e) {
    t.rootNodes.push({
        id: "global",
        label: "Global Scope"
    });
    const r = e.mode === "composition" ? e.global : e.global.__composer;
    for (const [n,i] of e.__instances) {
        const o = e.mode === "composition" ? i : i.__composer;
        r !== o && t.rootNodes.push({
            id: o.id.toString(),
            label: `${nF(n)} Scope`
        })
    }
}
function Gie(t, e) {
    let r = null;
    if (t !== "global") {
        for (const [n,i] of e.__instances.entries())
            if (i.id.toString() === t) {
                r = n;
                break
            }
    }
    return r
}
function iF(t, e) {
    if (t === "global")
        return e.mode === "composition" ? e.global : e.global.__composer;
    {
        const r = Array.from(e.__instances.values()).find(n => n.id.toString() === t);
        return r ? e.mode === "composition" ? r : r.__composer : null
    }
}
function Hie(t, e) {
    const r = iF(t.nodeId, e);
    return r && (t.state = Vie(r)),
    null
}
function Vie(t) {
    const e = {}
      , r = "Locale related info"
      , n = [{
        type: r,
        key: "locale",
        editable: !0,
        value: t.locale.value
    }, {
        type: r,
        key: "fallbackLocale",
        editable: !0,
        value: t.fallbackLocale.value
    }, {
        type: r,
        key: "availableLocales",
        editable: !1,
        value: t.availableLocales
    }, {
        type: r,
        key: "inheritLocale",
        editable: !0,
        value: t.inheritLocale
    }];
    e[r] = n;
    const i = "Locale messages info"
      , o = [{
        type: i,
        key: "messages",
        editable: !1,
        value: nb(t.messages.value)
    }];
    e[i] = o;
    {
        const s = "Datetime formats info"
          , a = [{
            type: s,
            key: "datetimeFormats",
            editable: !1,
            value: t.datetimeFormats.value
        }];
        e[s] = a;
        const l = "Datetime formats info"
          , c = [{
            type: l,
            key: "numberFormats",
            editable: !1,
            value: t.numberFormats.value
        }];
        e[l] = c
    }
    return e
}
function bf(t, e) {
    if ($y) {
        let r;
        e && "groupId"in e && (r = e.groupId,
        delete e.groupId),
        $y.addTimelineEvent({
            layerId: "vue-i18n-timeline",
            event: {
                title: t,
                groupId: r,
                time: Date.now(),
                meta: {},
                data: e || {},
                logType: t === "compile-error" ? "error" : t === "fallback" || t === "missing" ? "warning" : "default"
            }
        })
    }
}
function zie(t, e) {
    const r = iF(t.nodeId, e);
    if (r) {
        const [n] = t.path;
        n === "locale" && Ce(t.state.value) ? r.locale.value = t.state.value : n === "fallbackLocale" && (Ce(t.state.value) || Wt(t.state.value) || ot(t.state.value)) ? r.fallbackLocale.value = t.state.value : n === "inheritLocale" && ct(t.state.value) && (r.inheritLocale = t.state.value)
    }
}
function jie(t) {
    const e = Ce(t.locale) ? t.locale : yf
      , r = Ce(t.fallbackLocale) || Wt(t.fallbackLocale) || Ze(t.fallbackLocale) || t.fallbackLocale === !1 ? t.fallbackLocale : e
      , n = wt(t.missing) ? t.missing : void 0
      , i = ct(t.silentTranslationWarn) || tu(t.silentTranslationWarn) ? !t.silentTranslationWarn : !0
      , o = ct(t.silentFallbackWarn) || tu(t.silentFallbackWarn) ? !t.silentFallbackWarn : !0
      , s = ct(t.fallbackRoot) ? t.fallbackRoot : !0
      , a = !!t.formatFallbackMessages
      , l = Ze(t.modifiers) ? t.modifiers : {}
      , c = t.pluralizationRules
      , u = wt(t.postTranslation) ? t.postTranslation : void 0
      , f = Ce(t.warnHtmlInMessage) ? t.warnHtmlInMessage !== "off" : !0
      , d = !!t.escapeParameterHtml
      , h = ct(t.sync) ? t.sync : !0;
    let x = t.messages;
    if (Ze(t.sharedMessages)) {
        const _ = t.sharedMessages;
        x = Object.keys(_).reduce( (C, w) => {
            const T = C[w] || (C[w] = {});
            return wr(T, _[w]),
            C
        }
        , x || {})
    }
    const {__i18n: y, __root: m, __injectWithOption: E} = t
      , g = t.datetimeFormats
      , p = t.numberFormats
      , v = t.flatJson;
    return {
        locale: e,
        fallbackLocale: r,
        messages: x,
        flatJson: v,
        datetimeFormats: g,
        numberFormats: p,
        missing: n,
        missingWarn: i,
        fallbackWarn: o,
        fallbackRoot: s,
        fallbackFormat: a,
        modifiers: l,
        pluralRules: c,
        postTranslation: u,
        warnHtmlMessage: f,
        escapeParameter: d,
        messageResolver: t.messageResolver,
        inheritLocale: h,
        __i18n: y,
        __root: m,
        __injectWithOption: E
    }
}
function Uy(t={}) {
    const e = rb(jie(t))
      , {__extender: r} = t
      , n = {
        id: e.id,
        get locale() {
            return e.locale.value
        },
        set locale(i) {
            e.locale.value = i
        },
        get fallbackLocale() {
            return e.fallbackLocale.value
        },
        set fallbackLocale(i) {
            e.fallbackLocale.value = i
        },
        get messages() {
            return e.messages.value
        },
        get datetimeFormats() {
            return e.datetimeFormats.value
        },
        get numberFormats() {
            return e.numberFormats.value
        },
        get availableLocales() {
            return e.availableLocales
        },
        get missing() {
            return e.getMissingHandler()
        },
        set missing(i) {
            e.setMissingHandler(i)
        },
        get silentTranslationWarn() {
            return ct(e.missingWarn) ? !e.missingWarn : e.missingWarn
        },
        set silentTranslationWarn(i) {
            e.missingWarn = ct(i) ? !i : i
        },
        get silentFallbackWarn() {
            return ct(e.fallbackWarn) ? !e.fallbackWarn : e.fallbackWarn
        },
        set silentFallbackWarn(i) {
            e.fallbackWarn = ct(i) ? !i : i
        },
        get modifiers() {
            return e.modifiers
        },
        get formatFallbackMessages() {
            return e.fallbackFormat
        },
        set formatFallbackMessages(i) {
            e.fallbackFormat = i
        },
        get postTranslation() {
            return e.getPostTranslationHandler()
        },
        set postTranslation(i) {
            e.setPostTranslationHandler(i)
        },
        get sync() {
            return e.inheritLocale
        },
        set sync(i) {
            e.inheritLocale = i
        },
        get warnHtmlInMessage() {
            return e.warnHtmlMessage ? "warn" : "off"
        },
        set warnHtmlInMessage(i) {
            e.warnHtmlMessage = i !== "off"
        },
        get escapeParameterHtml() {
            return e.escapeParameter
        },
        set escapeParameterHtml(i) {
            e.escapeParameter = i
        },
        get pluralizationRules() {
            return e.pluralRules || {}
        },
        __composer: e,
        t(...i) {
            return Reflect.apply(e.t, e, [...i])
        },
        rt(...i) {
            return Reflect.apply(e.rt, e, [...i])
        },
        te(i, o) {
            return e.te(i, o)
        },
        tm(i) {
            return e.tm(i)
        },
        getLocaleMessage(i) {
            return e.getLocaleMessage(i)
        },
        setLocaleMessage(i, o) {
            e.setLocaleMessage(i, o)
        },
        mergeLocaleMessage(i, o) {
            e.mergeLocaleMessage(i, o)
        },
        d(...i) {
            return Reflect.apply(e.d, e, [...i])
        },
        getDateTimeFormat(i) {
            return e.getDateTimeFormat(i)
        },
        setDateTimeFormat(i, o) {
            e.setDateTimeFormat(i, o)
        },
        mergeDateTimeFormat(i, o) {
            e.mergeDateTimeFormat(i, o)
        },
        n(...i) {
            return Reflect.apply(e.n, e, [...i])
        },
        getNumberFormat(i) {
            return e.getNumberFormat(i)
        },
        setNumberFormat(i, o) {
            e.setNumberFormat(i, o)
        },
        mergeNumberFormat(i, o) {
            e.mergeNumberFormat(i, o)
        }
    };
    return n.__extender = r,
    n.__enableEmitter = i => {
        const o = e;
        o[Cl] && o[Cl](i)
    }
    ,
    n.__disableEmitter = () => {
        const i = e;
        i[Ef] && i[Ef]()
    }
    ,
    n
}
function Wie(t, e, r) {
    return {
        beforeCreate() {
            const n = Gc();
            if (!n)
                throw kn(St.UNEXPECTED_ERROR);
            const i = this.$options;
            if (i.i18n) {
                const o = i.i18n;
                if (i.__i18n && (o.__i18n = i.__i18n),
                o.__root = e,
                this === this.$root)
                    this.$i18n = IA(t, o);
                else {
                    o.__injectWithOption = !0,
                    o.__extender = r.__vueI18nExtend,
                    this.$i18n = Uy(o);
                    const s = this.$i18n;
                    s.__extender && (s.__disposer = s.__extender(this.$i18n))
                }
            } else if (i.__i18n)
                if (this === this.$root)
                    this.$i18n = IA(t, i);
                else {
                    this.$i18n = Uy({
                        __i18n: i.__i18n,
                        __injectWithOption: !0,
                        __extender: r.__vueI18nExtend,
                        __root: e
                    });
                    const o = this.$i18n;
                    o.__extender && (o.__disposer = o.__extender(this.$i18n))
                }
            else
                this.$i18n = t;
            i.__i18nGlobal && tF(e, i, i),
            this.$t = (...o) => this.$i18n.t(...o),
            this.$rt = (...o) => this.$i18n.rt(...o),
            this.$te = (o, s) => this.$i18n.te(o, s),
            this.$d = (...o) => this.$i18n.d(...o),
            this.$n = (...o) => this.$i18n.n(...o),
            this.$tm = o => this.$i18n.tm(o),
            r.__setInstance(n, this.$i18n)
        },
        mounted() {
            if (this.$i18n) {
                const n = Gc();
                if (!n)
                    return;
                const i = this.$i18n;
                n.__VUE_I18N__ = i.__composer;
                const o = this.__v_emitter = q2();
                i.__enableEmitter && i.__enableEmitter(o),
                o.on("*", bf)
            }
        },
        unmounted() {
            const n = Gc();
            if (!n)
                throw kn(St.UNEXPECTED_ERROR);
            const i = this.$i18n;
            n.__VUE_I18N__ && (this.__v_emitter && (this.__v_emitter.off("*", bf),
            delete this.__v_emitter),
            this.$i18n && (i.__disableEmitter && i.__disableEmitter(),
            delete n.__VUE_I18N__)),
            delete this.$t,
            delete this.$rt,
            delete this.$te,
            delete this.$d,
            delete this.$n,
            delete this.$tm,
            i.__disposer && (i.__disposer(),
            delete i.__disposer,
            delete i.__extender),
            r.__deleteInstance(n),
            delete this.$i18n
        }
    }
}
function IA(t, e) {
    t.locale = e.locale || t.locale,
    t.fallbackLocale = e.fallbackLocale || t.fallbackLocale,
    t.missing = e.missing || t.missing,
    t.silentTranslationWarn = e.silentTranslationWarn || t.silentFallbackWarn,
    t.silentFallbackWarn = e.silentFallbackWarn || t.silentFallbackWarn,
    t.formatFallbackMessages = e.formatFallbackMessages || t.formatFallbackMessages,
    t.postTranslation = e.postTranslation || t.postTranslation,
    t.warnHtmlInMessage = e.warnHtmlInMessage || t.warnHtmlInMessage,
    t.escapeParameterHtml = e.escapeParameterHtml || t.escapeParameterHtml,
    t.sync = e.sync || t.sync,
    t.__composer[JD](e.pluralizationRules || t.pluralizationRules);
    const r = tb(t.locale, {
        messages: e.messages,
        __i18n: e.__i18n
    });
    return Object.keys(r).forEach(n => t.mergeLocaleMessage(n, r[n])),
    e.datetimeFormats && Object.keys(e.datetimeFormats).forEach(n => t.mergeDateTimeFormat(n, e.datetimeFormats[n])),
    e.numberFormats && Object.keys(e.numberFormats).forEach(n => t.mergeNumberFormat(n, e.numberFormats[n])),
    t
}
const ib = {
    tag: {
        type: [String, Object]
    },
    locale: {
        type: String
    },
    scope: {
        type: String,
        validator: t => t === "parent" || t === "global",
        default: "parent"
    },
    i18n: {
        type: Object
    }
};
function Yie({slots: t}, e) {
    return e.length === 1 && e[0] === "default" ? (t.default ? t.default() : []).reduce( (n, i) => [...n, ...i.type === Nt ? i.children : [i]], []) : e.reduce( (r, n) => {
        const i = t[n];
        return i && (r[n] = i()),
        r
    }
    , At())
}
function oF() {
    return Nt
}
const Xie = be({
    name: "i18n-t",
    props: wr({
        keypath: {
            type: String,
            required: !0
        },
        plural: {
            type: [Number, String],
            validator: t => ur(t) || !isNaN(t)
        }
    }, ib),
    setup(t, e) {
        const {slots: r, attrs: n} = e
          , i = t.i18n || ob({
            useScope: t.scope,
            __useComponent: !0
        });
        return () => {
            const o = Object.keys(r).filter(f => f[0] !== "_")
              , s = At();
            t.locale && (s.locale = t.locale),
            t.plural !== void 0 && (s.plural = Ce(t.plural) ? +t.plural : t.plural);
            const a = Yie(e, o)
              , l = i[Ry](t.keypath, a, s)
              , c = wr(At(), n)
              , u = Ce(t.tag) || ot(t.tag) ? t.tag : oF();
            return Or(u, c, l)
        }
    }
})
  , OA = Xie;
function Kie(t) {
    return Wt(t) && !Ce(t[0])
}
function sF(t, e, r, n) {
    const {slots: i, attrs: o} = e;
    return () => {
        const s = {
            part: !0
        };
        let a = At();
        t.locale && (s.locale = t.locale),
        Ce(t.format) ? s.key = t.format : ot(t.format) && (Ce(t.format.key) && (s.key = t.format.key),
        a = Object.keys(t.format).reduce( (d, h) => r.includes(h) ? wr(At(), d, {
            [h]: t.format[h]
        }) : d, At()));
        const l = n(t.value, s, a);
        let c = [s.key];
        Wt(l) ? c = l.map( (d, h) => {
            const x = i[d.type]
              , y = x ? x({
                [d.type]: d.value,
                index: h,
                parts: l
            }) : [d.value];
            return Kie(y) && (y[0].key = `${d.type}-${h}`),
            y
        }
        ) : Ce(l) && (c = [l]);
        const u = wr(At(), o)
          , f = Ce(t.tag) || ot(t.tag) ? t.tag : oF();
        return Or(f, u, c)
    }
}
const qie = be({
    name: "i18n-n",
    props: wr({
        value: {
            type: Number,
            required: !0
        },
        format: {
            type: [String, Object]
        }
    }, ib),
    setup(t, e) {
        const r = t.i18n || ob({
            useScope: t.scope,
            __useComponent: !0
        });
        return sF(t, e, KD, (...n) => r[Ny](...n))
    }
})
  , kA = qie;
function Zie(t, e) {
    const r = t;
    if (t.mode === "composition")
        return r.__getInstance(e) || t.global;
    {
        const n = r.__getInstance(e);
        return n != null ? n.__composer : t.global.__composer
    }
}
function Jie(t) {
    const e = s => {
        Y2(nu(ci.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));
        const {instance: a, value: l} = s;
        if (!a || !a.$)
            throw kn(St.UNEXPECTED_ERROR);
        const c = Zie(t, a.$)
          , u = RA(l);
        return [Reflect.apply(c.t, c, [...MA(u)]), c]
    }
    ;
    return {
        created: (s, a) => {
            const [l,c] = e(a);
            Gi && t.global === c && (s.__i18nWatcher = me(c.locale, () => {
                a.instance && a.instance.$forceUpdate()
            }
            )),
            s.__composer = c,
            s.textContent = l
        }
        ,
        unmounted: s => {
            Gi && s.__i18nWatcher && (s.__i18nWatcher(),
            s.__i18nWatcher = void 0,
            delete s.__i18nWatcher),
            s.__composer && (s.__composer = void 0,
            delete s.__composer)
        }
        ,
        beforeUpdate: (s, {value: a}) => {
            if (s.__composer) {
                const l = s.__composer
                  , c = RA(a);
                s.textContent = Reflect.apply(l.t, l, [...MA(c)])
            }
        }
        ,
        getSSRProps: s => {
            const [a] = e(s);
            return {
                textContent: a
            }
        }
    }
}
function RA(t) {
    if (Ce(t))
        return {
            path: t
        };
    if (Ze(t)) {
        if (!("path"in t))
            throw kn(St.REQUIRED_VALUE, "path");
        return t
    } else
        throw kn(St.INVALID_VALUE)
}
function MA(t) {
    const {path: e, locale: r, args: n, choice: i, plural: o} = t
      , s = {}
      , a = n || {};
    return Ce(r) && (s.locale = r),
    ur(i) && (s.plural = i),
    ur(o) && (s.plural = o),
    [e, a, s]
}
function Qie(t, e, ...r) {
    const n = Ze(r[0]) ? r[0] : {};
    (ct(n.globalInstall) ? n.globalInstall : !0) && ([OA.name, "I18nT"].forEach(o => t.component(o, OA)),
    [kA.name, "I18nN"].forEach(o => t.component(o, kA)),
    [LA.name, "I18nD"].forEach(o => t.component(o, LA))),
    t.directive("t", Jie(e))
}
const eoe = Io("global-vue-i18n");
function C6e(t={}) {
    const e = __VUE_I18N_LEGACY_API__ && ct(t.legacy) ? t.legacy : __VUE_I18N_LEGACY_API__;
    e && Y2(nu(ci.DEPRECATE_LEGACY_MODE));
    const r = ct(t.globalInjection) ? t.globalInjection : !0
      , n = new Map
      , [i,o] = toe(t, e)
      , s = Io("vue-i18n");
    function a(f) {
        return n.get(f) || null
    }
    function l(f, d) {
        n.set(f, d)
    }
    function c(f) {
        n.delete(f)
    }
    const u = {
        get mode() {
            return __VUE_I18N_LEGACY_API__ && e ? "legacy" : "composition"
        },
        async install(f, ...d) {
            if (f.__VUE_I18N__ = u,
            f.__VUE_I18N_SYMBOL__ = s,
            f.provide(f.__VUE_I18N_SYMBOL__, u),
            Ze(d[0])) {
                const y = d[0];
                u.__composerExtend = y.__composerExtend,
                u.__vueI18nExtend = y.__vueI18nExtend
            }
            let h = null;
            !e && r && (h = coe(f, u.global)),
            __VUE_I18N_FULL_INSTALL__ && Qie(f, u, ...d),
            __VUE_I18N_LEGACY_API__ && e && f.mixin(Wie(o, o.__composer, u));
            const x = f.unmount;
            f.unmount = () => {
                h && h(),
                u.dispose(),
                x()
            }
            ;
            {
                if (!await kie(f, u))
                    throw kn(St.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);
                const m = q2();
                if (e) {
                    const E = o;
                    E.__enableEmitter && E.__enableEmitter(m)
                } else {
                    const E = o;
                    E[Cl] && E[Cl](m)
                }
                m.on("*", bf)
            }
        },
        get global() {
            return o
        },
        dispose() {
            i.stop()
        },
        __instances: n,
        __getInstance: a,
        __setInstance: l,
        __deleteInstance: c
    };
    return u
}
function ob(t={}) {
    const e = Gc();
    if (e == null)
        throw kn(St.MUST_BE_CALL_SETUP_TOP);
    if (!e.isCE && e.appContext.app != null && !e.appContext.app.__VUE_I18N_SYMBOL__)
        throw kn(St.NOT_INSTALLED);
    const r = roe(e)
      , n = ioe(r)
      , i = eF(e)
      , o = noe(t, i);
    if (o === "global")
        return tF(n, t, i),
        n;
    if (o === "parent") {
        let l = ooe(r, e, t.__useComponent);
        return l == null && (Co(nu(ci.NOT_FOUND_PARENT_SCOPE)),
        l = n),
        l
    }
    const s = r;
    let a = s.__getInstance(e);
    if (a == null) {
        const l = wr({}, t);
        "__i18n"in i && (l.__i18n = i.__i18n),
        n && (l.__root = n),
        a = rb(l),
        s.__composerExtend && (a[Ly] = s.__composerExtend(a)),
        aoe(s, e, a),
        s.__setInstance(e, a)
    } else
        o === "local" && Co(nu(ci.DUPLICATE_USE_I18N_CALLING));
    return a
}
function toe(t, e) {
    const r = Hf()
      , n = __VUE_I18N_LEGACY_API__ && e ? r.run( () => Uy(t)) : r.run( () => rb(t));
    if (n == null)
        throw kn(St.UNEXPECTED_ERROR);
    return [r, n]
}
function roe(t) {
    const e = dr(t.isCE ? eoe : t.appContext.app.__VUE_I18N_SYMBOL__);
    if (!e)
        throw kn(t.isCE ? St.NOT_INSTALLED_WITH_PROVIDE : St.UNEXPECTED_ERROR);
    return e
}
function noe(t, e) {
    return s1(t) ? "__i18n"in e ? "local" : "global" : t.useScope ? t.useScope : "local"
}
function ioe(t) {
    return t.mode === "composition" ? t.global : t.global.__composer
}
function ooe(t, e, r=!1) {
    let n = null;
    const i = e.root;
    let o = soe(e, r);
    for (; o != null; ) {
        const s = t;
        if (t.mode === "composition")
            n = s.__getInstance(o);
        else if (__VUE_I18N_LEGACY_API__) {
            const a = s.__getInstance(o);
            a != null && (n = a.__composer,
            r && n && !n[QD] && (n = null))
        }
        if (n != null || i === o)
            break;
        o = o.parent
    }
    return n
}
function soe(t, e=!1) {
    return t == null ? null : e && t.vnode.ctx || t.parent
}
function aoe(t, e, r) {
    let n = null;
    Ht( () => {
        {
            e.__VUE_I18N__ = r,
            n = q2();
            const i = r;
            i[Cl] && i[Cl](n),
            n.on("*", bf)
        }
    }
    , e),
    _s( () => {
        const i = r;
        n && n.off("*", bf),
        i[Ef] && i[Ef](),
        delete e.__VUE_I18N__,
        t.__deleteInstance(e);
        const o = i[Ly];
        o && (o(),
        delete i[Ly])
    }
    , e)
}
const loe = ["locale", "fallbackLocale", "availableLocales"]
  , NA = ["t", "rt", "d", "n", "tm", "te"];
function coe(t, e) {
    const r = Object.create(null);
    return loe.forEach(i => {
        const o = Object.getOwnPropertyDescriptor(e, i);
        if (!o)
            throw kn(St.UNEXPECTED_ERROR);
        const s = xt(o.value) ? {
            get() {
                return o.value.value
            },
            set(a) {
                o.value.value = a
            }
        } : {
            get() {
                return o.get && o.get()
            }
        };
        Object.defineProperty(r, i, s)
    }
    ),
    t.config.globalProperties.$i18n = r,
    NA.forEach(i => {
        const o = Object.getOwnPropertyDescriptor(e, i);
        if (!o || !o.value)
            throw kn(St.UNEXPECTED_ERROR);
        Object.defineProperty(t.config.globalProperties, `$${i}`, o)
    }
    ),
    () => {
        delete t.config.globalProperties.$i18n,
        NA.forEach(i => {
            delete t.config.globalProperties[`$${i}`]
        }
        )
    }
}
const uoe = be({
    name: "i18n-d",
    props: wr({
        value: {
            type: [Number, Date],
            required: !0
        },
        format: {
            type: [String, Object]
        }
    }, ib),
    setup(t, e) {
        const r = t.i18n || ob({
            useScope: t.scope,
            __useComponent: !0
        });
        return sF(t, e, XD, (...n) => r[My](...n))
    }
})
  , LA = uoe;
Sie();
oie(Nne);
sie(eie);
aie($D);
{
    const t = Za();
    t.__INTLIFY__ = !0,
    Lne(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)
}
var A6e = {
    name: "Name",
    tel: "Phone",
    save: "Save",
    clear: "Clear",
    cancel: "Cancel",
    confirm: "Confirm",
    delete: "Delete",
    loading: "Loading...",
    noCoupon: "No coupons",
    nameEmpty: "Please fill in the name",
    addContact: "Add contact",
    telInvalid: "Malformed phone number",
    vanCalendar: {
        end: "End",
        start: "Start",
        title: "Calendar",
        weekdays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
        monthTitle: (t, e) => `${t}/${e}`,
        rangePrompt: t => `Choose no more than ${t} days`
    },
    vanCascader: {
        select: "Select"
    },
    vanPagination: {
        prev: "Previous",
        next: "Next"
    },
    vanPullRefresh: {
        pulling: "Pull to refresh...",
        loosing: "Loose to refresh..."
    },
    vanSubmitBar: {
        label: "Total:"
    },
    vanCoupon: {
        unlimited: "Unlimited",
        discount: t => `${t * 10}% off`,
        condition: t => `At least ${t}`
    },
    vanCouponCell: {
        title: "Coupon",
        count: t => `You have ${t} coupons`
    },
    vanCouponList: {
        exchange: "Exchange",
        close: "Close",
        enable: "Available",
        disabled: "Unavailable",
        placeholder: "Coupon code"
    },
    vanAddressEdit: {
        area: "Area",
        areaEmpty: "Please select a receiving area",
        addressEmpty: "Address can not be empty",
        addressDetail: "Address",
        defaultAddress: "Set as the default address"
    },
    vanAddressList: {
        add: "Add new address"
    }
}
  , w6e = {
    name: "Имя",
    tel: "Телефон",
    save: "Сохранить",
    clear: "Прозрачный",
    cancel: "Отмена",
    confirm: "Подтвердить",
    delete: "Удалить",
    loading: "Загрузка...",
    noCoupon: "Нет купонов",
    nameEmpty: "Пожалуйста укажите имя",
    addContact: "Создать контакт",
    telInvalid: "Некорректный номер телефона",
    vanCalendar: {
        end: "Конец",
        start: "Начало",
        title: "Календарь",
        weekdays: ["ВС", "ПН", "ВТ", "СР", "ЧТ", "ПТ", "СБ"],
        monthTitle: (t, e) => `${t}/${e}`,
        rangePrompt: t => `Укажите более ${t} дней`
    },
    vanCascader: {
        select: "Выбрать"
    },
    vanPagination: {
        prev: "Назад",
        next: "Вперед"
    },
    vanPullRefresh: {
        pulling: "Потяните для обновления...",
        loosing: "Отпустите для обновления..."
    },
    vanSubmitBar: {
        label: "Всего:"
    },
    vanCoupon: {
        unlimited: "Безлимитный",
        discount: t => `${t * 10}% скидка`,
        condition: t => `Как минимум ${t}`
    },
    vanCouponCell: {
        title: "Купон",
        count: t => `У вас есть ${t} купонов`
    },
    vanCouponList: {
        exchange: "Обмен",
        close: "Закрыть",
        enable: "Доступно",
        disabled: "Недоступно",
        placeholder: "Код купона"
    },
    vanAddressEdit: {
        area: "Область",
        areaEmpty: "Укажите зону доставки",
        addressEmpty: "Адрес не может быть пустым",
        addressDetail: "Адрес",
        defaultAddress: "Сделать адресом по умолчанию"
    },
    vanAddressList: {
        add: "Новый адрес"
    }
}
  , B6e = {
    name: "tên",
    tel: "Điện thoại",
    save: "Cứu",
    clear: "Thông thoáng",
    cancel: "Hủy bỏ",
    confirm: "Xác nhận",
    delete: "Xóa",
    loading: "Đang tải ...",
    noCoupon: "Không có phiếu giảm giá",
    nameEmpty: "Vui lòng điền vào tên",
    addContact: "Thêm liên hệ",
    telInvalid: "Số điện thoại không đúng định dạng",
    vanCalendar: {
        end: "Kết thúc",
        start: "Bắt ​​đầu",
        title: "Lịch",
        weekdays: ["chủ nhật", "thứ hai", "thứ ba", "Thứ Tư", "Thứ năm", "Thứ sáu", "thứ bảy"],
        monthTitle: (t, e) => `${t}/${e}`,
        rangePrompt: t => `Chọn không quá ${t} ngày`
    },
    vanCascader: {
        select: "Chọn"
    },
    vanPagination: {
        prev: "Trước đó",
        next: "Tiếp theo"
    },
    vanPullRefresh: {
        pulling: "Kéo để làm mới ...",
        loosing: "Loose để làm mới ..."
    },
    vanSubmitBar: {
        label: "Tổng:"
    },
    vanCoupon: {
        unlimited: "Không giới hạn",
        discount: t => `Chiết khấu ${t * 10}%`,
        condition: t => `Ít nhất ${t}`
    },
    vanCouponCell: {
        title: "Phiếu giảm giá",
        count: t => `Bạn có ${t} phiếu giảm giá`
    },
    vanCouponList: {
        exchange: "Trao đổi",
        close: "Đóng",
        enable: "Có sẵn",
        disabled: "Không khả dụng",
        placeholder: "Mã phiếu thưởng"
    },
    vanAddressEdit: {
        area: "Khu vực",
        areaEmpty: "Vui lòng chọn khu vực nhận hàng",
        addressEmpty: "Địa chỉ không được để trống",
        addressDetail: "Địa chỉ",
        defaultAddress: "Đặt làm địa chỉ mặc định"
    },
    vanAddressList: {
        add: "Thêm địa chỉ mới"
    }
}
  , S6e = {
    name: "Nama",
    tel: "Telepon",
    save: "Simpan",
    clear: "Jernih",
    cancel: "Batal",
    confirm: "Konfirmasi",
    delete: "Hapus",
    loading: "Memuat...",
    noCoupon: "Tidak ada kupon",
    nameEmpty: "Silakan isi nama",
    addContact: "Tambahkan kontak",
    telInvalid: "Nomor telepon salah format",
    vanCalendar: {
        end: "Akhir",
        start: "Mulai",
        title: "Kalender",
        weekdays: ["minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"],
        monthTitle: (t, e) => `${t}/${e}`,
        rangePrompt: t => `Pilih tidak lebih dari ${t} hari`
    },
    vanCascader: {
        select: "Pilih"
    },
    vanPagination: {
        prev: "Sebelumnya",
        next: "Selanjutnya"
    },
    vanPullRefresh: {
        pulling: "Tarik untuk menyegarkan...",
        loosing: "Loose untuk menyegarkan..."
    },
    vanSubmitBar: {
        label: "Jumlah:"
    },
    vanCoupon: {
        unlimited: "Tidak terbatas",
        discount: t => `${t * 10}% off`,
        condition: t => `Setidaknya ${t}`
    },
    vanCouponCell: {
        title: "Kupon",
        count: t => `Anda memiliki kupon ${t}`
    },
    vanCouponList: {
        exchange: "Pertukaran",
        close: "Tutup",
        enable: "Tersedia",
        disabled: "Tidak tersedia",
        placeholder: "Kode kupon"
    },
    vanAddressEdit: {
        area: "Daerah",
        areaEmpty: "Silakan pilih area penerima",
        addressEmpty: "Alamat tidak boleh kosong",
        addressDetail: "Alamat",
        defaultAddress: "Tetapkan sebagai alamat default"
    },
    vanAddressList: {
        add: "Tambahkan alamat baru"
    }
}
  , T6e = {
    name: "नाम",
    tel: "फ़ोन",
    save: "सहेजें",
    clear: "साफ़",
    cancel: "रद्द करें",
    confirm: "पुष्टि करना",
    delete: "हटाएं",
    loading: "लोड हो रहा है...",
    noCoupon: "कोई कूपन नहीं",
    nameEmpty: "कृपया नाम भरें",
    addContact: "संपर्क जोड़ें",
    telInvalid: "विकृत फ़ोन नंबर",
    vanCalendar: {
        end: "समाप्त",
        start: "शुरू",
        title: "पंचांग",
        weekdays: ["रविवार", "सोमवार", "मंगलवार", "बुधवार", "गुरूवार", "शुक्रवार", "शनिवार"],
        monthTitle: (t, e) => `${t}/${e}`,
        rangePrompt: t => `${t} दिन से अधिक नहीं चुनें`
    },
    vanCascader: {
        select: "चुनते हैं"
    },
    vanPagination: {
        prev: "पहले का",
        next: "अगला"
    },
    vanPullRefresh: {
        pulling: "रीफ़्रेश करने के लिए खींचें...",
        loosing: "ताज़ा करने के लिए ढीला..."
    },
    vanSubmitBar: {
        label: "कुल:"
    },
    vanCoupon: {
        unlimited: "असीमित",
        discount: t => `${t * 10}% छूट`,
        condition: t => `कम से कम ${t}`
    },
    vanCouponCell: {
        title: "कूपन",
        count: t => `आपके पास ${t} कूपन हैं`
    },
    vanCouponList: {
        exchange: "अदला बदली",
        close: "बंद करे",
        enable: "उपलब्ध",
        disabled: "अनुपलब्ध",
        placeholder: "कूपन कोड"
    },
    vanAddressEdit: {
        area: "क्षेत्र",
        areaEmpty: "कृपया एक क्षेत्र चुनें",
        addressEmpty: "पता खाली नहीं हो सकता",
        addressDetail: "पता",
        defaultAddress: "डिफ़ॉल्ट पते के रूप में सेट करें"
    },
    vanAddressList: {
        add: "नया पता जोड़ें"
    }
}
  , D6e = {
    name: "ชื่อ",
    tel: "โทรศัพท์",
    save: "บันทึก",
    clear: "ชัดเจน",
    cancel: "ยกเลิก",
    confirm: "ยืนยัน",
    delete: "ลบ",
    loading: "กำลังโหลด...",
    noCoupon: "ไม่มีคูปอง",
    nameEmpty: "กรุณากรอกชื่อของคุณ",
    addContact: "เพิ่มผู้ติดต่อ",
    telInvalid: "กรุณากรอกหมายเลขโทรศัพท์ที่ถูกต้อง",
    vanCalendar: {
        end: "จบ",
        start: "เริ่ม",
        title: "การเลือกวันที่",
        weekdays: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส"],
        monthTitle: (t, e) => `${t}ปี${e}เดือน`,
        rangePrompt: t => `จำนวนวันที่เลือกต้องไม่เกิน ${t} วัน`
    },
    vanCascader: {
        select: "โปรดเลือก"
    },
    vanPagination: {
        prev: "หน้าที่แล้ว",
        next: "หน้าต่อไป"
    },
    vanPullRefresh: {
        pulling: "ดึงลงเพื่อรีเฟรช...",
        loosing: "ปล่อยเพื่อรีเฟรช..."
    },
    vanSubmitBar: {
        label: "รวม:"
    },
    vanCoupon: {
        unlimited: "ไม่ จำกัด",
        discount: t => `ลด${t}`,
        condition: t => `มีจำหน่ายในราคา ${t} กว่าหยวน`
    },
    vanCouponCell: {
        title: "คูปอง",
        count: t => `มีรูปภาพ ${t} รูป`
    },
    vanCouponList: {
        exchange: "แลกเปลี่ยน",
        close: "ไม่ได้ใช้",
        enable: "พร้อมใช้งาน",
        disabled: "ไม่พร้อมใช้งาน",
        placeholder: "กรุณากรอกรหัสคูปอง"
    },
    vanAddressEdit: {
        area: "พื้นที่",
        areaEmpty: "โปรดเลือกภูมิภาค",
        addressEmpty: "กรุณากรอกที่อยู่โดยละเอียด",
        addressDetail: "ที่อยู่",
        defaultAddress: "ตั้งเป็นที่อยู่จัดส่งเริ่มต้น"
    },
    vanAddressList: {
        add: "เพิ่มที่อยู่"
    }
}
  , F6e = {
    name: "Nome",
    tel: "Fone",
    save: "Salvar",
    clear: "Claro",
    cancel: "Cancelar",
    confirm: "Confirmar",
    delete: "Excluir",
    loading: "Carregando...",
    noCoupon: "Nenhum cupom",
    nameEmpty: "Por favor, preencha o nome",
    addContact: "Adicionar novo contato",
    telInvalid: "Telefone em formato inválido",
    vanCalendar: {
        end: "Fim",
        start: "Início",
        title: "Calendário",
        weekdays: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"],
        monthTitle: (t, e) => `${e}/${t}`,
        rangePrompt: t => `Escolha no máximo ${t} dias`
    },
    vanCascader: {
        select: "Selecione"
    },
    vanPagination: {
        prev: "Anterior",
        next: "Próximo"
    },
    vanPullRefresh: {
        pulling: "Puxe para atualizar...",
        loosing: "Solte para atualizar..."
    },
    vanSubmitBar: {
        label: "Total:"
    },
    vanCoupon: {
        unlimited: "Ilimitado",
        discount: t => `${t * 10}% de desconto`,
        condition: t => `Pelo menos ${t}`
    },
    vanCouponCell: {
        title: "Cupom",
        count: t => `Você possui ${t} cupom(ns)`
    },
    vanCouponList: {
        exchange: "Usar",
        close: "Fechar",
        enable: "Disponível",
        disabled: "Indisponível",
        placeholder: "Código do cupom"
    },
    vanAddressEdit: {
        area: "Área",
        areaEmpty: "Por favor, selecione uma área de recebimento",
        addressEmpty: "Endereço não pode ser vazio",
        addressDetail: "Endereço",
        defaultAddress: "Usar como endereço padrão"
    },
    vanAddressList: {
        add: "Adicionar novo endereço"
    }
}
  , P6e = {
    name: "নাম",
    tel: "ফোন",
    save: "সংরক্ষণ করুন",
    clear: "পরিষ্কার",
    cancel: "বাতিল",
    confirm: "নিশ্চিত করুন",
    delete: "মুছুন",
    loading: "লোড হচ্ছে...",
    noCoupon: "কোন কুপন নেই",
    nameEmpty: "অনুগ্রহ করে নামটি পূরণ করুন",
    addContact: "যোগাযোগ যোগ করুন",
    telInvalid: "বিকৃত ফোন নম্বর",
    vanCalendar: {
        end: "শেষ",
        start: "শুরু",
        title: "ক্যালেন্ডার",
        weekdays: ["রবিবার", "সোমবার", "মঙ্গলবার", "বুধবার", "বৃহস্পতিবার", "শুক্রবার", "শনিবার"],
        monthTitle: (t, e) => `${t}/${e}`,
        rangePrompt: t => `${t} দিনের বেশি নির্বাচন করবেন না`
    },
    vanCascader: {
        select: "নির্বাচন"
    },
    vanPagination: {
        prev: "পূর্ববর্তী",
        next: "পরবর্তী"
    },
    vanPullRefresh: {
        pulling: "রিফ্রেশ করতে টানুন...",
        loosing: "রিফ্রেশ করতে আলগা..."
    },
    vanSubmitBar: {
        label: "মোট:"
    },
    vanCoupon: {
        unlimited: "আনলিমিটেড",
        discount: t => `${t * 10}% ছাড়`,
        condition: t => `অন্তত ${t}`
    },
    vanCouponCell: {
        title: "কুপন",
        count: t => `আপনার ${t} কুপন আছে`
    },
    vanCouponList: {
        exchange: "বিনিময়",
        close: "বন্ধ",
        enable: "উপলভ্য",
        disabled: "অনুপলব্ধ",
        placeholder: "কুপন কোড"
    },
    vanAddressEdit: {
        area: "এরিয়া",
        areaEmpty: "অনুগ্রহ করে একটি রিসিভিং এলাকা নির্বাচন করুন",
        addressEmpty: "ঠিকানা খালি হতে পারে না",
        addressDetail: "ঠিকানা",
        defaultAddress: "ডিফল্ট ঠিকানা হিসাবে সেট করুন"
    },
    vanAddressList: {
        add: "নতুন ঠিকানা যোগ করুন"
    }
}
  , I6e = {
    name: "الاسم",
    tel: "الهاتف",
    save: "حفظ",
    clear: "مسح",
    cancel: "إلغاء",
    confirm: "تأكيد",
    delete: "حذف",
    loading: "جار التحميل...",
    noCoupon: "لا يوجد كوبونات",
    nameEmpty: "يرجى ملء الاسم",
    addContact: "إضافة جهة اتصال",
    telInvalid: "رقم الهاتف غير صحيح",
    vanCalendar: {
        end: "نهاية",
        start: "بداية",
        title: "التقويم",
        weekdays: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"],
        monthTitle: (t, e) => `${t}/${e}`,
        rangePrompt: t => `اختر لا يزيد عن ${t} أيام`
    },
    vanCascader: {
        select: "اختر"
    },
    vanPagination: {
        prev: "السابق",
        next: "التالي"
    },
    vanPullRefresh: {
        pulling: "اسحب للتحديث...",
        loosing: "أفلت للتحديث..."
    },
    vanSubmitBar: {
        label: "المجموع:"
    },
    vanCoupon: {
        unlimited: "غير محدود",
        discount: t => `${t * 10}% خصم`,
        condition: t => `على الأقل ${t}`
    },
    vanCouponCell: {
        title: "كوبون",
        count: t => `لديك ${t} كوبونات`
    },
    vanCouponList: {
        exchange: "استبدال",
        close: "إغلاق",
        enable: "متاح",
        disabled: "غير متاح",
        placeholder: "كود الكوبون"
    },
    vanAddressEdit: {
        area: "المنطقة",
        areaEmpty: "يرجى اختيار منطقة استقبال",
        addressEmpty: "العنوان لا يمكن أن يكون فارغًا",
        addressDetail: "العنوان",
        defaultAddress: "تعيين كعنوان افتراضي"
    },
    vanAddressList: {
        add: "إضافة عنوان جديد"
    }
};
function ua(t) {
    return Vf() ? (g_(t),
    !0) : !1
}
function O6e(t) {
    let e = !1, r;
    const n = Hf(!0);
    return (...i) => (e || (r = n.run( () => t(...i)),
    e = !0),
    r)
}
function gn(t) {
    return typeof t == "function" ? t() : xn(t)
}
const fa = typeof window < "u" && typeof document < "u"
  , k6e = typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope
  , foe = t => typeof t < "u"
  , doe = t => t != null
  , hoe = Object.prototype.toString
  , xoe = t => hoe.call(t) === "[object Object]"
  , Wn = () => {}
  , Gy = poe();
function poe() {
    var t, e;
    return fa && ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent))
}
function sb(t, e) {
    function r(...n) {
        return new Promise( (i, o) => {
            Promise.resolve(t( () => e.apply(this, n), {
                fn: e,
                thisArg: this,
                args: n
            })).then(i).catch(o)
        }
        )
    }
    return r
}
const aF = t => t();
function lF(t, e={}) {
    let r, n, i = Wn;
    const o = a => {
        clearTimeout(a),
        i(),
        i = Wn
    }
    ;
    return a => {
        const l = gn(t)
          , c = gn(e.maxWait);
        return r && o(r),
        l <= 0 || c !== void 0 && c <= 0 ? (n && (o(n),
        n = null),
        Promise.resolve(a())) : new Promise( (u, f) => {
            i = e.rejectOnCancel ? f : u,
            c && !n && (n = setTimeout( () => {
                r && o(r),
                n = null,
                u(a())
            }
            , c)),
            r = setTimeout( () => {
                n && o(n),
                n = null,
                u(a())
            }
            , l)
        }
        )
    }
}
function goe(...t) {
    let e = 0, r, n = !0, i = Wn, o, s, a, l, c;
    !xt(t[0]) && typeof t[0] == "object" ? {delay: s, trailing: a=!0, leading: l=!0, rejectOnCancel: c=!1} = t[0] : [s,a=!0,l=!0,c=!1] = t;
    const u = () => {
        r && (clearTimeout(r),
        r = void 0,
        i(),
        i = Wn)
    }
    ;
    return d => {
        const h = gn(s)
          , x = Date.now() - e
          , y = () => o = d();
        return u(),
        h <= 0 ? (e = Date.now(),
        y()) : (x > h && (l || !n) ? (e = Date.now(),
        y()) : a && (o = new Promise( (m, E) => {
            i = c ? E : m,
            r = setTimeout( () => {
                e = Date.now(),
                n = !0,
                m(y()),
                u()
            }
            , Math.max(0, h - x))
        }
        )),
        !l && !r && (r = setTimeout( () => n = !0, h)),
        n = !1,
        o)
    }
}
function moe(t=aF) {
    const e = ie(!0);
    function r() {
        e.value = !1
    }
    function n() {
        e.value = !0
    }
    const i = (...o) => {
        e.value && t(...o)
    }
    ;
    return {
        isActive: $l(e),
        pause: r,
        resume: n,
        eventFilter: i
    }
}
function voe(t) {
    let e;
    function r() {
        return e || (e = t()),
        e
    }
    return r.reset = async () => {
        const n = e;
        e = void 0,
        n && await n
    }
    ,
    r
}
function yoe(t) {
    return t || Ot()
}
function cF(...t) {
    if (t.length !== 1)
        return w0(...t);
    const e = t[0];
    return typeof e == "function" ? $l($5( () => ({
        get: e,
        set: Wn
    }))) : ie(e)
}
function R6e(t, e=200, r={}) {
    return sb(lF(e, r), t)
}
function M6e(t, e=200, r=!1, n=!0, i=!1) {
    return sb(goe(e, r, n, i), t)
}
function uF(t, e, r={}) {
    const {eventFilter: n=aF, ...i} = r;
    return me(t, sb(n, e), i)
}
function fF(t, e, r={}) {
    const {eventFilter: n, ...i} = r
      , {eventFilter: o, pause: s, resume: a, isActive: l} = moe(n);
    return {
        stop: uF(t, e, {
            ...i,
            eventFilter: o
        }),
        pause: s,
        resume: a,
        isActive: l
    }
}
function ab(t, e=!0, r) {
    yoe() ? Ht(t, r) : e ? t() : Xe(t)
}
function N6e(t, e) {
    return ae( () => gn(t).map(r => gn(r)).filter(e))
}
function L6e(t, e=1e3, r={}) {
    const {immediate: n=!0, immediateCallback: i=!1} = r;
    let o = null;
    const s = ie(!1);
    function a() {
        o && (clearInterval(o),
        o = null)
    }
    function l() {
        s.value = !1,
        a()
    }
    function c() {
        const u = gn(e);
        u <= 0 || (s.value = !0,
        i && t(),
        a(),
        o = setInterval(t, u))
    }
    if (n && fa && c(),
    xt(e) || typeof e == "function") {
        const u = me(e, () => {
            s.value && fa && c()
        }
        );
        ua(u)
    }
    return ua(l),
    {
        isActive: s,
        pause: l,
        resume: c
    }
}
function Eoe(t, e, r={}) {
    const {immediate: n=!0} = r
      , i = ie(!1);
    let o = null;
    function s() {
        o && (clearTimeout(o),
        o = null)
    }
    function a() {
        i.value = !1,
        s()
    }
    function l(...c) {
        s(),
        i.value = !0,
        o = setTimeout( () => {
            i.value = !1,
            o = null,
            t(...c)
        }
        , gn(e))
    }
    return n && (i.value = !0,
    fa && l()),
    ua(a),
    {
        isPending: $l(i),
        start: l,
        stop: a
    }
}
function $6e(t, e, r={}) {
    const {debounce: n=0, maxWait: i=void 0, ...o} = r;
    return uF(t, e, {
        ...o,
        eventFilter: lF(n, {
            maxWait: i
        })
    })
}
function fo(t) {
    var e;
    const r = gn(t);
    return (e = r == null ? void 0 : r.$el) != null ? e : r
}
const Ao = fa ? window : void 0
  , dF = fa ? window.document : void 0
  , hF = fa ? window.navigator : void 0;
function en(...t) {
    let e, r, n, i;
    if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([r,n,i] = t,
    e = Ao) : [e,r,n,i] = t,
    !e)
        return Wn;
    Array.isArray(r) || (r = [r]),
    Array.isArray(n) || (n = [n]);
    const o = []
      , s = () => {
        o.forEach(u => u()),
        o.length = 0
    }
      , a = (u, f, d, h) => (u.addEventListener(f, d, h),
    () => u.removeEventListener(f, d, h))
      , l = me( () => [fo(e), gn(i)], ([u,f]) => {
        if (s(),
        !u)
            return;
        const d = xoe(f) ? {
            ...f
        } : f;
        o.push(...r.flatMap(h => n.map(x => a(u, h, x, d))))
    }
    , {
        immediate: !0,
        flush: "post"
    })
      , c = () => {
        l(),
        s()
    }
    ;
    return ua(c),
    c
}
let $A = !1;
function U6e(t, e, r={}) {
    const {window: n=Ao, ignore: i=[], capture: o=!0, detectIframe: s=!1} = r;
    if (!n)
        return Wn;
    Gy && !$A && ($A = !0,
    Array.from(n.document.body.children).forEach(d => d.addEventListener("click", Wn)),
    n.document.documentElement.addEventListener("click", Wn));
    let a = !0;
    const l = d => i.some(h => {
        if (typeof h == "string")
            return Array.from(n.document.querySelectorAll(h)).some(x => x === d.target || d.composedPath().includes(x));
        {
            const x = fo(h);
            return x && (d.target === x || d.composedPath().includes(x))
        }
    }
    )
      , u = [en(n, "click", d => {
        const h = fo(t);
        if (!(!h || h === d.target || d.composedPath().includes(h))) {
            if (d.detail === 0 && (a = !l(d)),
            !a) {
                a = !0;
                return
            }
            e(d)
        }
    }
    , {
        passive: !0,
        capture: o
    }), en(n, "pointerdown", d => {
        const h = fo(t);
        a = !l(d) && !!(h && !d.composedPath().includes(h))
    }
    , {
        passive: !0
    }), s && en(n, "blur", d => {
        setTimeout( () => {
            var h;
            const x = fo(t);
            ((h = n.document.activeElement) == null ? void 0 : h.tagName) === "IFRAME" && !(x != null && x.contains(n.document.activeElement)) && e(d)
        }
        , 0)
    }
    )].filter(Boolean);
    return () => u.forEach(d => d())
}
function _oe() {
    const t = ie(!1)
      , e = Ot();
    return e && Ht( () => {
        t.value = !0
    }
    , e),
    t
}
function c1(t) {
    const e = _oe();
    return ae( () => (e.value,
    !!t()))
}
function boe(t, e, r={}) {
    const {window: n=Ao, ...i} = r;
    let o;
    const s = c1( () => n && "MutationObserver"in n)
      , a = () => {
        o && (o.disconnect(),
        o = void 0)
    }
      , l = ae( () => {
        const d = gn(t)
          , h = (Array.isArray(d) ? d : [d]).map(fo).filter(doe);
        return new Set(h)
    }
    )
      , c = me( () => l.value, d => {
        a(),
        s.value && d.size && (o = new MutationObserver(e),
        d.forEach(h => o.observe(h, i)))
    }
    , {
        immediate: !0,
        flush: "post"
    })
      , u = () => o == null ? void 0 : o.takeRecords()
      , f = () => {
        a(),
        c()
    }
    ;
    return ua(f),
    {
        isSupported: s,
        stop: f,
        takeRecords: u
    }
}
function G6e(t, e) {
    const {interrupt: r=!0, onError: n=Wn, onFinished: i=Wn, signal: o} = e || {}
      , s = {
        aborted: "aborted",
        fulfilled: "fulfilled",
        pending: "pending",
        rejected: "rejected"
    }
      , a = Array.from(Array.from({
        length: t.length
    }), () => ({
        state: s.pending,
        data: null
    }))
      , l = It(a)
      , c = ie(-1);
    if (!t || t.length === 0)
        return i(),
        {
            activeIndex: c,
            result: l
        };
    function u(f, d) {
        c.value++,
        l[c.value].data = d,
        l[c.value].state = f
    }
    return t.reduce( (f, d) => f.then(h => {
        var x;
        if (o != null && o.aborted) {
            u(s.aborted, new Error("aborted"));
            return
        }
        if (((x = l[c.value]) == null ? void 0 : x.state) === s.rejected && r) {
            i();
            return
        }
        const y = d(h).then(m => (u(s.fulfilled, m),
        c.value === t.length - 1 && i(),
        m));
        return o ? Promise.race([y, Coe(o)]) : y
    }
    ).catch(h => o != null && o.aborted ? (u(s.aborted, h),
    h) : (u(s.rejected, h),
    n(),
    h)), Promise.resolve()),
    {
        activeIndex: c,
        result: l
    }
}
function Coe(t) {
    return new Promise( (e, r) => {
        const n = new Error("aborted");
        t.aborted ? r(n) : t.addEventListener("abort", () => r(n), {
            once: !0
        })
    }
    )
}
function UA(t, e={}) {
    const {controls: r=!1, navigator: n=hF} = e
      , i = c1( () => n && "permissions"in n);
    let o;
    const s = typeof t == "string" ? {
        name: t
    } : t
      , a = ie()
      , l = () => {
        o && (a.value = o.state)
    }
      , c = voe(async () => {
        if (i.value) {
            if (!o)
                try {
                    o = await n.permissions.query(s),
                    en(o, "change", l),
                    l()
                } catch {
                    a.value = "prompt"
                }
            return o
        }
    }
    );
    return c(),
    r ? {
        state: a,
        isSupported: i,
        query: c
    } : a
}
function H6e(t={}) {
    const {navigator: e=hF, read: r=!1, source: n, copiedDuring: i=1500, legacy: o=!1} = t
      , s = c1( () => e && "clipboard"in e)
      , a = UA("clipboard-read")
      , l = UA("clipboard-write")
      , c = ae( () => s.value || o)
      , u = ie("")
      , f = ie(!1)
      , d = Eoe( () => f.value = !1, i);
    function h() {
        s.value && E(a.value) ? e.clipboard.readText().then(g => {
            u.value = g
        }
        ) : u.value = m()
    }
    c.value && r && en(["copy", "cut"], h);
    async function x(g=gn(n)) {
        c.value && g != null && (s.value && E(l.value) ? await e.clipboard.writeText(g) : y(g),
        u.value = g,
        f.value = !0,
        d.start())
    }
    function y(g) {
        const p = document.createElement("textarea");
        p.value = g ?? "",
        p.style.position = "absolute",
        p.style.opacity = "0",
        document.body.appendChild(p),
        p.select(),
        document.execCommand("copy"),
        p.remove()
    }
    function m() {
        var g, p, v;
        return (v = (p = (g = document == null ? void 0 : document.getSelection) == null ? void 0 : g.call(document)) == null ? void 0 : p.toString()) != null ? v : ""
    }
    function E(g) {
        return g === "granted" || g === "prompt"
    }
    return {
        isSupported: c,
        text: u,
        copied: f,
        copy: x
    }
}
function Aoe(t) {
    return JSON.parse(JSON.stringify(t))
}
const ih = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}
  , oh = "__vueuse_ssr_handlers__"
  , woe = Boe();
function Boe() {
    return oh in ih || (ih[oh] = ih[oh] || {}),
    ih[oh]
}
function Soe(t, e) {
    return woe[t] || e
}
function Toe(t) {
    return t == null ? "any" : t instanceof Set ? "set" : t instanceof Map ? "map" : t instanceof Date ? "date" : typeof t == "boolean" ? "boolean" : typeof t == "string" ? "string" : typeof t == "object" ? "object" : Number.isNaN(t) ? "any" : "number"
}
const Doe = {
    boolean: {
        read: t => t === "true",
        write: t => String(t)
    },
    object: {
        read: t => JSON.parse(t),
        write: t => JSON.stringify(t)
    },
    number: {
        read: t => Number.parseFloat(t),
        write: t => String(t)
    },
    any: {
        read: t => t,
        write: t => String(t)
    },
    string: {
        read: t => t,
        write: t => String(t)
    },
    map: {
        read: t => new Map(JSON.parse(t)),
        write: t => JSON.stringify(Array.from(t.entries()))
    },
    set: {
        read: t => new Set(JSON.parse(t)),
        write: t => JSON.stringify(Array.from(t))
    },
    date: {
        read: t => new Date(t),
        write: t => t.toISOString()
    }
}
  , GA = "vueuse-storage";
function xF(t, e, r, n={}) {
    var i;
    const {flush: o="pre", deep: s=!0, listenToStorageChanges: a=!0, writeDefaults: l=!0, mergeDefaults: c=!1, shallow: u, window: f=Ao, eventFilter: d, onError: h=A => {
        console.error(A)
    }
    , initOnMounted: x} = n
      , y = (u ? Cp : ie)(typeof e == "function" ? e() : e);
    if (!r)
        try {
            r = Soe("getDefaultStorage", () => {
                var A;
                return (A = Ao) == null ? void 0 : A.localStorage
            }
            )()
        } catch (A) {
            h(A)
        }
    if (!r)
        return y;
    const m = gn(e)
      , E = Toe(m)
      , g = (i = n.serializer) != null ? i : Doe[E]
      , {pause: p, resume: v} = fF(y, () => b(y.value), {
        flush: o,
        deep: s,
        eventFilter: d
    });
    f && a && ab( () => {
        en(f, "storage", w),
        en(f, GA, T),
        x && w()
    }
    ),
    x || w();
    function _(A, B) {
        f && f.dispatchEvent(new CustomEvent(GA,{
            detail: {
                key: t,
                oldValue: A,
                newValue: B,
                storageArea: r
            }
        }))
    }
    function b(A) {
        try {
            const B = r.getItem(t);
            if (A == null)
                _(B, null),
                r.removeItem(t);
            else {
                const S = g.write(A);
                B !== S && (r.setItem(t, S),
                _(B, S))
            }
        } catch (B) {
            h(B)
        }
    }
    function C(A) {
        const B = A ? A.newValue : r.getItem(t);
        if (B == null)
            return l && m != null && r.setItem(t, g.write(m)),
            m;
        if (!A && c) {
            const S = g.read(B);
            return typeof c == "function" ? c(S, m) : E === "object" && !Array.isArray(S) ? {
                ...m,
                ...S
            } : S
        } else
            return typeof B != "string" ? B : g.read(B)
    }
    function w(A) {
        if (!(A && A.storageArea !== r)) {
            if (A && A.key == null) {
                y.value = m;
                return
            }
            if (!(A && A.key !== t)) {
                p();
                try {
                    (A == null ? void 0 : A.newValue) !== g.write(y.value) && (y.value = C(A))
                } catch (B) {
                    h(B)
                } finally {
                    A ? Xe(v) : v()
                }
            }
        }
    }
    function T(A) {
        w(A.detail)
    }
    return y
}
function V6e(t={}) {
    const {document: e=dF} = t;
    if (!e)
        return ie("visible");
    const r = ie(e.visibilityState);
    return en(e, "visibilitychange", () => {
        r.value = e.visibilityState
    }
    ),
    r
}
function Foe(t, e, r={}) {
    const {window: n=Ao, ...i} = r;
    let o;
    const s = c1( () => n && "ResizeObserver"in n)
      , a = () => {
        o && (o.disconnect(),
        o = void 0)
    }
      , l = ae( () => Array.isArray(t) ? t.map(f => fo(f)) : [fo(t)])
      , c = me(l, f => {
        if (a(),
        s.value && n) {
            o = new ResizeObserver(e);
            for (const d of f)
                d && o.observe(d, i)
        }
    }
    , {
        immediate: !0,
        flush: "post"
    })
      , u = () => {
        a(),
        c()
    }
    ;
    return ua(u),
    {
        isSupported: s,
        stop: u
    }
}
function z6e(t, e={}) {
    const {reset: r=!0, windowResize: n=!0, windowScroll: i=!0, immediate: o=!0} = e
      , s = ie(0)
      , a = ie(0)
      , l = ie(0)
      , c = ie(0)
      , u = ie(0)
      , f = ie(0)
      , d = ie(0)
      , h = ie(0);
    function x() {
        const y = fo(t);
        if (!y) {
            r && (s.value = 0,
            a.value = 0,
            l.value = 0,
            c.value = 0,
            u.value = 0,
            f.value = 0,
            d.value = 0,
            h.value = 0);
            return
        }
        const m = y.getBoundingClientRect();
        s.value = m.height,
        a.value = m.bottom,
        l.value = m.left,
        c.value = m.right,
        u.value = m.top,
        f.value = m.width,
        d.value = m.x,
        h.value = m.y
    }
    return Foe(t, x),
    me( () => fo(t), y => !y && x()),
    boe(t, x, {
        attributeFilter: ["style", "class"]
    }),
    i && en("scroll", x, {
        capture: !0,
        passive: !0
    }),
    n && en("resize", x, {
        passive: !0
    }),
    ab( () => {
        o && x()
    }
    ),
    {
        height: s,
        bottom: a,
        left: l,
        right: c,
        top: u,
        width: f,
        x: d,
        y: h,
        update: x
    }
}
const Zu = new Map;
function j6e(t) {
    const e = Vf();
    function r(a) {
        var l;
        const c = Zu.get(t) || new Set;
        c.add(a),
        Zu.set(t, c);
        const u = () => i(a);
        return (l = e == null ? void 0 : e.cleanups) == null || l.push(u),
        u
    }
    function n(a) {
        function l(...c) {
            i(l),
            a(...c)
        }
        return r(l)
    }
    function i(a) {
        const l = Zu.get(t);
        l && (l.delete(a),
        l.size || o())
    }
    function o() {
        Zu.delete(t)
    }
    function s(a, l) {
        var c;
        (c = Zu.get(t)) == null || c.forEach(u => u(a, l))
    }
    return {
        on: r,
        once: n,
        off: i,
        emit: s,
        reset: o
    }
}
function wg(t) {
    return typeof Window < "u" && t instanceof Window ? t.document.documentElement : typeof Document < "u" && t instanceof Document ? t.documentElement : t
}
function W6e(t, e, r={}) {
    const {window: n=Ao} = r;
    return xF(t, e, n == null ? void 0 : n.localStorage, r)
}
function pF(t) {
    const e = window.getComputedStyle(t);
    if (e.overflowX === "scroll" || e.overflowY === "scroll" || e.overflowX === "auto" && t.clientWidth < t.scrollWidth || e.overflowY === "auto" && t.clientHeight < t.scrollHeight)
        return !0;
    {
        const r = t.parentNode;
        return !r || r.tagName === "BODY" ? !1 : pF(r)
    }
}
function Poe(t) {
    const e = t || window.event
      , r = e.target;
    return pF(r) ? !1 : e.touches.length > 1 ? !0 : (e.preventDefault && e.preventDefault(),
    !1)
}
const Bg = new WeakMap;
function Y6e(t, e=!1) {
    const r = ie(e);
    let n = null
      , i = "";
    me(cF(t), a => {
        const l = wg(gn(a));
        if (l) {
            const c = l;
            if (Bg.get(c) || Bg.set(c, c.style.overflow),
            c.style.overflow !== "hidden" && (i = c.style.overflow),
            c.style.overflow === "hidden")
                return r.value = !0;
            if (r.value)
                return c.style.overflow = "hidden"
        }
    }
    , {
        immediate: !0
    });
    const o = () => {
        const a = wg(gn(t));
        !a || r.value || (Gy && (n = en(a, "touchmove", l => {
            Poe(l)
        }
        , {
            passive: !1
        })),
        a.style.overflow = "hidden",
        r.value = !0)
    }
      , s = () => {
        const a = wg(gn(t));
        !a || !r.value || (Gy && (n == null || n()),
        a.style.overflow = i,
        Bg.delete(a),
        r.value = !1)
    }
    ;
    return ua(s),
    ae({
        get() {
            return r.value
        },
        set(a) {
            a ? o() : s()
        }
    })
}
function X6e(t, e, r={}) {
    const {window: n=Ao} = r;
    return xF(t, e, n == null ? void 0 : n.sessionStorage, r)
}
let Ioe = 0;
function K6e(t, e={}) {
    const r = ie(!1)
      , {document: n=dF, immediate: i=!0, manual: o=!1, id: s=`vueuse_styletag_${++Ioe}`} = e
      , a = ie(t);
    let l = () => {}
    ;
    const c = () => {
        if (!n)
            return;
        const f = n.getElementById(s) || n.createElement("style");
        f.isConnected || (f.id = s,
        e.media && (f.media = e.media),
        n.head.appendChild(f)),
        !r.value && (l = me(a, d => {
            f.textContent = d
        }
        , {
            immediate: !0
        }),
        r.value = !0)
    }
      , u = () => {
        !n || !r.value || (l(),
        n.head.removeChild(n.getElementById(s)),
        r.value = !1)
    }
    ;
    return i && !o && ab(c),
    o || ua(u),
    {
        id: s,
        css: a,
        unload: u,
        load: c,
        isLoaded: $l(r)
    }
}
function q6e(t, e={}) {
    const {threshold: r=50, onSwipe: n, onSwipeEnd: i, onSwipeStart: o, passive: s=!0, window: a=Ao} = e
      , l = It({
        x: 0,
        y: 0
    })
      , c = It({
        x: 0,
        y: 0
    })
      , u = ae( () => l.x - c.x)
      , f = ae( () => l.y - c.y)
      , {max: d, abs: h} = Math
      , x = ae( () => d(h(u.value), h(f.value)) >= r)
      , y = ie(!1)
      , m = ae( () => x.value ? h(u.value) > h(f.value) ? u.value > 0 ? "left" : "right" : f.value > 0 ? "up" : "down" : "none")
      , E = T => [T.touches[0].clientX, T.touches[0].clientY]
      , g = (T, A) => {
        l.x = T,
        l.y = A
    }
      , p = (T, A) => {
        c.x = T,
        c.y = A
    }
    ;
    let v;
    const _ = Ooe(a == null ? void 0 : a.document);
    s ? v = _ ? {
        passive: !0
    } : {
        capture: !1
    } : v = _ ? {
        passive: !1,
        capture: !0
    } : {
        capture: !0
    };
    const b = T => {
        y.value && (i == null || i(T, m.value)),
        y.value = !1
    }
      , C = [en(t, "touchstart", T => {
        if (T.touches.length !== 1)
            return;
        v.capture && !v.passive && T.preventDefault();
        const [A,B] = E(T);
        g(A, B),
        p(A, B),
        o == null || o(T)
    }
    , v), en(t, "touchmove", T => {
        if (T.touches.length !== 1)
            return;
        const [A,B] = E(T);
        p(A, B),
        !y.value && x.value && (y.value = !0),
        y.value && (n == null || n(T))
    }
    , v), en(t, ["touchend", "touchcancel"], b, v)];
    return {
        isPassiveEventSupported: _,
        isSwiping: y,
        direction: m,
        coordsStart: l,
        coordsEnd: c,
        lengthX: u,
        lengthY: f,
        stop: () => C.forEach(T => T())
    }
}
function Ooe(t) {
    if (!t)
        return !1;
    let e = !1;
    const r = {
        get passive() {
            return e = !0,
            !1
        }
    };
    return t.addEventListener("x", Wn, r),
    t.removeEventListener("x", Wn),
    e
}
function Z6e(t="history", e={}) {
    const {initialValue: r={}, removeNullishValues: n=!0, removeFalsyValues: i=!1, write: o=!0, window: s=Ao} = e;
    if (!s)
        return It(r);
    const a = It({});
    function l() {
        if (t === "history")
            return s.location.search || "";
        if (t === "hash") {
            const E = s.location.hash || ""
              , g = E.indexOf("?");
            return g > 0 ? E.slice(g) : ""
        } else
            return (s.location.hash || "").replace(/^#/, "")
    }
    function c(E) {
        const g = E.toString();
        if (t === "history")
            return `${g ? `?${g}` : ""}${s.location.hash || ""}`;
        if (t === "hash-params")
            return `${s.location.search || ""}${g ? `#${g}` : ""}`;
        const p = s.location.hash || "#"
          , v = p.indexOf("?");
        return v > 0 ? `${p.slice(0, v)}${g ? `?${g}` : ""}` : `${p}${g ? `?${g}` : ""}`
    }
    function u() {
        return new URLSearchParams(l())
    }
    function f(E) {
        const g = new Set(Object.keys(a));
        for (const p of E.keys()) {
            const v = E.getAll(p);
            a[p] = v.length > 1 ? v : E.get(p) || "",
            g.delete(p)
        }
        Array.from(g).forEach(p => delete a[p])
    }
    const {pause: d, resume: h} = fF(a, () => {
        const E = new URLSearchParams("");
        Object.keys(a).forEach(g => {
            const p = a[g];
            Array.isArray(p) ? p.forEach(v => E.append(g, v)) : n && p == null || i && !p ? E.delete(g) : E.set(g, p)
        }
        ),
        x(E)
    }
    , {
        deep: !0
    });
    function x(E, g) {
        d(),
        g && f(E),
        s.history.replaceState(s.history.state, s.document.title, s.location.pathname + c(E)),
        h()
    }
    function y() {
        o && x(u(), !0)
    }
    en(s, "popstate", y, !1),
    t !== "history" && en(s, "hashchange", y, !1);
    const m = u();
    return m.keys().next().value ? f(m) : Object.assign(a, r),
    a
}
function koe(t, e, r, n={}) {
    var i, o, s;
    const {clone: a=!1, passive: l=!1, eventName: c, deep: u=!1, defaultValue: f, shouldEmit: d} = n
      , h = Ot()
      , x = r || (h == null ? void 0 : h.emit) || ((i = h == null ? void 0 : h.$emit) == null ? void 0 : i.bind(h)) || ((s = (o = h == null ? void 0 : h.proxy) == null ? void 0 : o.$emit) == null ? void 0 : s.bind(h == null ? void 0 : h.proxy));
    let y = c;
    e || (e = "modelValue"),
    y = y || `update:${e.toString()}`;
    const m = p => a ? typeof a == "function" ? a(p) : Aoe(p) : p
      , E = () => foe(t[e]) ? m(t[e]) : f
      , g = p => {
        d ? d(p) && x(y, p) : x(y, p)
    }
    ;
    if (l) {
        const p = E()
          , v = ie(p);
        let _ = !1;
        return me( () => t[e], b => {
            _ || (_ = !0,
            v.value = m(b),
            Xe( () => _ = !1))
        }
        ),
        me(v, b => {
            !_ && (b !== t[e] || u) && g(b)
        }
        , {
            deep: u
        }),
        v
    } else
        return ae({
            get() {
                return E()
            },
            set(p) {
                g(p)
            }
        })
}
function J6e(t, e, r={}) {
    const n = {};
    for (const i in t)
        n[i] = koe(t, i, e, r);
    return n
}
/*!
  * vue-router v4.1.6
  * (c) 2022 Eduardo San Martin Morote
  * @license MIT
  */
const Yo = typeof window < "u";
function Roe(t) {
    return t.__esModule || t[Symbol.toStringTag] === "Module"
}
const gt = Object.assign;
function Sg(t, e) {
    const r = {};
    for (const n in e) {
        const i = e[n];
        r[n] = Kn(i) ? i.map(t) : t(i)
    }
    return r
}
const N0 = () => {}
  , Kn = Array.isArray;
function Qe(t) {
    const e = Array.from(arguments).slice(1);
    console.warn.apply(console, ["[Vue Router warn]: " + t].concat(e))
}
const Moe = /\/$/
  , Noe = t => t.replace(Moe, "");
function Tg(t, e, r="/") {
    let n, i = {}, o = "", s = "";
    const a = e.indexOf("#");
    let l = e.indexOf("?");
    return a < l && a >= 0 && (l = -1),
    l > -1 && (n = e.slice(0, l),
    o = e.slice(l + 1, a > -1 ? a : e.length),
    i = t(o)),
    a > -1 && (n = n || e.slice(0, a),
    s = e.slice(a, e.length)),
    n = Uoe(n ?? e, r),
    {
        fullPath: n + (o && "?") + o + s,
        path: n,
        query: i,
        hash: s
    }
}
function Loe(t, e) {
    const r = e.query ? t(e.query) : "";
    return e.path + (r && "?") + r + (e.hash || "")
}
function HA(t, e) {
    return !e || !t.toLowerCase().startsWith(e.toLowerCase()) ? t : t.slice(e.length) || "/"
}
function VA(t, e, r) {
    const n = e.matched.length - 1
      , i = r.matched.length - 1;
    return n > -1 && n === i && da(e.matched[n], r.matched[i]) && gF(e.params, r.params) && t(e.query) === t(r.query) && e.hash === r.hash
}
function da(t, e) {
    return (t.aliasOf || t) === (e.aliasOf || e)
}
function gF(t, e) {
    if (Object.keys(t).length !== Object.keys(e).length)
        return !1;
    for (const r in t)
        if (!$oe(t[r], e[r]))
            return !1;
    return !0
}
function $oe(t, e) {
    return Kn(t) ? zA(t, e) : Kn(e) ? zA(e, t) : t === e
}
function zA(t, e) {
    return Kn(e) ? t.length === e.length && t.every( (r, n) => r === e[n]) : t.length === 1 && t[0] === e
}
function Uoe(t, e) {
    if (t.startsWith("/"))
        return t;
    if (!e.startsWith("/"))
        return Qe(`Cannot resolve a relative location without an absolute path. Trying to resolve "${t}" from "${e}". It should look like "/${e}".`),
        t;
    if (!t)
        return e;
    const r = e.split("/")
      , n = t.split("/");
    let i = r.length - 1, o, s;
    for (o = 0; o < n.length; o++)
        if (s = n[o],
        s !== ".")
            if (s === "..")
                i > 1 && i--;
            else
                break;
    return r.slice(0, i).join("/") + "/" + n.slice(o - (o === n.length ? 1 : 0)).join("/")
}
var Cf;
(function(t) {
    t.pop = "pop",
    t.push = "push"
}
)(Cf || (Cf = {}));
var L0;
(function(t) {
    t.back = "back",
    t.forward = "forward",
    t.unknown = ""
}
)(L0 || (L0 = {}));
function Goe(t) {
    if (!t)
        if (Yo) {
            const e = document.querySelector("base");
            t = e && e.getAttribute("href") || "/",
            t = t.replace(/^\w+:\/\/[^\/]+/, "")
        } else
            t = "/";
    return t[0] !== "/" && t[0] !== "#" && (t = "/" + t),
    Noe(t)
}
const Hoe = /^[^#]+#/;
function Voe(t, e) {
    return t.replace(Hoe, "#") + e
}
function zoe(t, e) {
    const r = document.documentElement.getBoundingClientRect()
      , n = t.getBoundingClientRect();
    return {
        behavior: e.behavior,
        left: n.left - r.left - (e.left || 0),
        top: n.top - r.top - (e.top || 0)
    }
}
const u1 = () => ({
    left: window.pageXOffset,
    top: window.pageYOffset
});
function joe(t) {
    let e;
    if ("el"in t) {
        const r = t.el
          , n = typeof r == "string" && r.startsWith("#");
        if (typeof t.el == "string" && (!n || !document.getElementById(t.el.slice(1))))
            try {
                const o = document.querySelector(t.el);
                if (n && o) {
                    Qe(`The selector "${t.el}" should be passed as "el: document.querySelector('${t.el}')" because it starts with "#".`);
                    return
                }
            } catch {
                Qe(`The selector "${t.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);
                return
            }
        const i = typeof r == "string" ? n ? document.getElementById(r.slice(1)) : document.querySelector(r) : r;
        if (!i) {
            Qe(`Couldn't find element using selector "${t.el}" returned by scrollBehavior.`);
            return
        }
        e = zoe(i, t)
    } else
        e = t;
    "scrollBehavior"in document.documentElement.style ? window.scrollTo(e) : window.scrollTo(e.left != null ? e.left : window.pageXOffset, e.top != null ? e.top : window.pageYOffset)
}
function jA(t, e) {
    return (history.state ? history.state.position - e : -1) + t
}
const Hy = new Map;
function Woe(t, e) {
    Hy.set(t, e)
}
function Yoe(t) {
    const e = Hy.get(t);
    return Hy.delete(t),
    e
}
let Xoe = () => location.protocol + "//" + location.host;
function mF(t, e) {
    const {pathname: r, search: n, hash: i} = e
      , o = t.indexOf("#");
    if (o > -1) {
        let a = i.includes(t.slice(o)) ? t.slice(o).length : 1
          , l = i.slice(a);
        return l[0] !== "/" && (l = "/" + l),
        HA(l, "")
    }
    return HA(r, t) + n + i
}
function Koe(t, e, r, n) {
    let i = []
      , o = []
      , s = null;
    const a = ({state: d}) => {
        const h = mF(t, location)
          , x = r.value
          , y = e.value;
        let m = 0;
        if (d) {
            if (r.value = h,
            e.value = d,
            s && s === x) {
                s = null;
                return
            }
            m = y ? d.position - y.position : 0
        } else
            n(h);
        i.forEach(E => {
            E(r.value, x, {
                delta: m,
                type: Cf.pop,
                direction: m ? m > 0 ? L0.forward : L0.back : L0.unknown
            })
        }
        )
    }
    ;
    function l() {
        s = r.value
    }
    function c(d) {
        i.push(d);
        const h = () => {
            const x = i.indexOf(d);
            x > -1 && i.splice(x, 1)
        }
        ;
        return o.push(h),
        h
    }
    function u() {
        const {history: d} = window;
        d.state && d.replaceState(gt({}, d.state, {
            scroll: u1()
        }), "")
    }
    function f() {
        for (const d of o)
            d();
        o = [],
        window.removeEventListener("popstate", a),
        window.removeEventListener("beforeunload", u)
    }
    return window.addEventListener("popstate", a),
    window.addEventListener("beforeunload", u),
    {
        pauseListeners: l,
        listen: c,
        destroy: f
    }
}
function WA(t, e, r, n=!1, i=!1) {
    return {
        back: t,
        current: e,
        forward: r,
        replaced: n,
        position: window.history.length,
        scroll: i ? u1() : null
    }
}
function qoe(t) {
    const {history: e, location: r} = window
      , n = {
        value: mF(t, r)
    }
      , i = {
        value: e.state
    };
    i.value || o(n.value, {
        back: null,
        current: n.value,
        forward: null,
        position: e.length - 1,
        replaced: !0,
        scroll: null
    }, !0);
    function o(l, c, u) {
        const f = t.indexOf("#")
          , d = f > -1 ? (r.host && document.querySelector("base") ? t : t.slice(f)) + l : Xoe() + t + l;
        try {
            e[u ? "replaceState" : "pushState"](c, "", d),
            i.value = c
        } catch (h) {
            Qe("Error with push/replace State", h),
            r[u ? "replace" : "assign"](d)
        }
    }
    function s(l, c) {
        const u = gt({}, e.state, WA(i.value.back, l, i.value.forward, !0), c, {
            position: i.value.position
        });
        o(l, u, !0),
        n.value = l
    }
    function a(l, c) {
        const u = gt({}, i.value, e.state, {
            forward: l,
            scroll: u1()
        });
        e.state || Qe(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:

history.replaceState(history.state, '', url)

You can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`),
        o(u.current, u, !0);
        const f = gt({}, WA(n.value, l, null), {
            position: u.position + 1
        }, c);
        o(l, f, !1),
        n.value = l
    }
    return {
        location: n,
        state: i,
        push: a,
        replace: s
    }
}
function Zoe(t) {
    t = Goe(t);
    const e = qoe(t)
      , r = Koe(t, e.state, e.location, e.replace);
    function n(o, s=!0) {
        s || r.pauseListeners(),
        history.go(o)
    }
    const i = gt({
        location: "",
        base: t,
        go: n,
        createHref: Voe.bind(null, t)
    }, e, r);
    return Object.defineProperty(i, "location", {
        enumerable: !0,
        get: () => e.location.value
    }),
    Object.defineProperty(i, "state", {
        enumerable: !0,
        get: () => e.state.value
    }),
    i
}
function Q6e(t) {
    return t = location.host ? t || location.pathname + location.search : "",
    t.includes("#") || (t += "#"),
    !t.endsWith("#/") && !t.endsWith("#") && Qe(`A hash base must end with a "#":
"${t}" should be "${t.replace(/#.*$/, "#")}".`),
    Zoe(t)
}
function Joe(t) {
    return typeof t == "string" || t && typeof t == "object"
}
function vF(t) {
    return typeof t == "string" || typeof t == "symbol"
}
const Fs = {
    path: "/",
    name: void 0,
    params: {},
    query: {},
    hash: "",
    fullPath: "/",
    matched: [],
    meta: {},
    redirectedFrom: void 0
}
  , yF = Symbol("navigation failure");
var YA;
(function(t) {
    t[t.aborted = 4] = "aborted",
    t[t.cancelled = 8] = "cancelled",
    t[t.duplicated = 16] = "duplicated"
}
)(YA || (YA = {}));
const Qoe = {
    1({location: t, currentLocation: e}) {
        return `No match for
 ${JSON.stringify(t)}${e ? `
while being at
` + JSON.stringify(e) : ""}`
    },
    2({from: t, to: e}) {
        return `Redirected from "${t.fullPath}" to "${tse(e)}" via a navigation guard.`
    },
    4({from: t, to: e}) {
        return `Navigation aborted from "${t.fullPath}" to "${e.fullPath}" via a navigation guard.`
    },
    8({from: t, to: e}) {
        return `Navigation cancelled from "${t.fullPath}" to "${e.fullPath}" with a new navigation.`
    },
    16({from: t, to: e}) {
        return `Avoided redundant navigation to current location: "${t.fullPath}".`
    }
};
function iu(t, e) {
    return gt(new Error(Qoe[t](e)), {
        type: t,
        [yF]: !0
    }, e)
}
function No(t, e) {
    return t instanceof Error && yF in t && (e == null || !!(t.type & e))
}
const ese = ["params", "query", "hash"];
function tse(t) {
    if (typeof t == "string")
        return t;
    if ("path"in t)
        return t.path;
    const e = {};
    for (const r of ese)
        r in t && (e[r] = t[r]);
    return JSON.stringify(e, null, 2)
}
const XA = "[^/]+?"
  , rse = {
    sensitive: !1,
    strict: !1,
    start: !0,
    end: !0
}
  , nse = /[.+*?^${}()[\]/\\]/g;
function ise(t, e) {
    const r = gt({}, rse, e)
      , n = [];
    let i = r.start ? "^" : "";
    const o = [];
    for (const c of t) {
        const u = c.length ? [] : [90];
        r.strict && !c.length && (i += "/");
        for (let f = 0; f < c.length; f++) {
            const d = c[f];
            let h = 40 + (r.sensitive ? .25 : 0);
            if (d.type === 0)
                f || (i += "/"),
                i += d.value.replace(nse, "\\$&"),
                h += 40;
            else if (d.type === 1) {
                const {value: x, repeatable: y, optional: m, regexp: E} = d;
                o.push({
                    name: x,
                    repeatable: y,
                    optional: m
                });
                const g = E || XA;
                if (g !== XA) {
                    h += 10;
                    try {
                        new RegExp(`(${g})`)
                    } catch (v) {
                        throw new Error(`Invalid custom RegExp for param "${x}" (${g}): ` + v.message)
                    }
                }
                let p = y ? `((?:${g})(?:/(?:${g}))*)` : `(${g})`;
                f || (p = m && c.length < 2 ? `(?:/${p})` : "/" + p),
                m && (p += "?"),
                i += p,
                h += 20,
                m && (h += -8),
                y && (h += -20),
                g === ".*" && (h += -50)
            }
            u.push(h)
        }
        n.push(u)
    }
    if (r.strict && r.end) {
        const c = n.length - 1;
        n[c][n[c].length - 1] += .7000000000000001
    }
    r.strict || (i += "/?"),
    r.end ? i += "$" : r.strict && (i += "(?:/|$)");
    const s = new RegExp(i,r.sensitive ? "" : "i");
    function a(c) {
        const u = c.match(s)
          , f = {};
        if (!u)
            return null;
        for (let d = 1; d < u.length; d++) {
            const h = u[d] || ""
              , x = o[d - 1];
            f[x.name] = h && x.repeatable ? h.split("/") : h
        }
        return f
    }
    function l(c) {
        let u = ""
          , f = !1;
        for (const d of t) {
            (!f || !u.endsWith("/")) && (u += "/"),
            f = !1;
            for (const h of d)
                if (h.type === 0)
                    u += h.value;
                else if (h.type === 1) {
                    const {value: x, repeatable: y, optional: m} = h
                      , E = x in c ? c[x] : "";
                    if (Kn(E) && !y)
                        throw new Error(`Provided param "${x}" is an array but it is not repeatable (* or + modifiers)`);
                    const g = Kn(E) ? E.join("/") : E;
                    if (!g)
                        if (m)
                            d.length < 2 && (u.endsWith("/") ? u = u.slice(0, -1) : f = !0);
                        else
                            throw new Error(`Missing required param "${x}"`);
                    u += g
                }
        }
        return u || "/"
    }
    return {
        re: s,
        score: n,
        keys: o,
        parse: a,
        stringify: l
    }
}
function ose(t, e) {
    let r = 0;
    for (; r < t.length && r < e.length; ) {
        const n = e[r] - t[r];
        if (n)
            return n;
        r++
    }
    return t.length < e.length ? t.length === 1 && t[0] === 40 + 40 ? -1 : 1 : t.length > e.length ? e.length === 1 && e[0] === 40 + 40 ? 1 : -1 : 0
}
function sse(t, e) {
    let r = 0;
    const n = t.score
      , i = e.score;
    for (; r < n.length && r < i.length; ) {
        const o = ose(n[r], i[r]);
        if (o)
            return o;
        r++
    }
    if (Math.abs(i.length - n.length) === 1) {
        if (KA(n))
            return 1;
        if (KA(i))
            return -1
    }
    return i.length - n.length
}
function KA(t) {
    const e = t[t.length - 1];
    return t.length > 0 && e[e.length - 1] < 0
}
const ase = {
    type: 0,
    value: ""
}
  , lse = /[a-zA-Z0-9_]/;
function cse(t) {
    if (!t)
        return [[]];
    if (t === "/")
        return [[ase]];
    if (!t.startsWith("/"))
        throw new Error(`Route paths should start with a "/": "${t}" should be "/${t}".`);
    function e(h) {
        throw new Error(`ERR (${r})/"${c}": ${h}`)
    }
    let r = 0
      , n = r;
    const i = [];
    let o;
    function s() {
        o && i.push(o),
        o = []
    }
    let a = 0, l, c = "", u = "";
    function f() {
        c && (r === 0 ? o.push({
            type: 0,
            value: c
        }) : r === 1 || r === 2 || r === 3 ? (o.length > 1 && (l === "*" || l === "+") && e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),
        o.push({
            type: 1,
            value: c,
            regexp: u,
            repeatable: l === "*" || l === "+",
            optional: l === "*" || l === "?"
        })) : e("Invalid state to consume buffer"),
        c = "")
    }
    function d() {
        c += l
    }
    for (; a < t.length; ) {
        if (l = t[a++],
        l === "\\" && r !== 2) {
            n = r,
            r = 4;
            continue
        }
        switch (r) {
        case 0:
            l === "/" ? (c && f(),
            s()) : l === ":" ? (f(),
            r = 1) : d();
            break;
        case 4:
            d(),
            r = n;
            break;
        case 1:
            l === "(" ? r = 2 : lse.test(l) ? d() : (f(),
            r = 0,
            l !== "*" && l !== "?" && l !== "+" && a--);
            break;
        case 2:
            l === ")" ? u[u.length - 1] == "\\" ? u = u.slice(0, -1) + l : r = 3 : u += l;
            break;
        case 3:
            f(),
            r = 0,
            l !== "*" && l !== "?" && l !== "+" && a--,
            u = "";
            break;
        default:
            e("Unknown state");
            break
        }
    }
    return r === 2 && e(`Unfinished custom RegExp for param "${c}"`),
    f(),
    s(),
    i
}
function use(t, e, r) {
    const n = ise(cse(t.path), r);
    {
        const o = new Set;
        for (const s of n.keys)
            o.has(s.name) && Qe(`Found duplicated params with name "${s.name}" for path "${t.path}". Only the last one will be available on "$route.params".`),
            o.add(s.name)
    }
    const i = gt(n, {
        record: t,
        parent: e,
        children: [],
        alias: []
    });
    return e && !i.record.aliasOf == !e.record.aliasOf && e.children.push(i),
    i
}
function fse(t, e) {
    const r = []
      , n = new Map;
    e = JA({
        strict: !1,
        end: !0,
        sensitive: !1
    }, e);
    function i(u) {
        return n.get(u)
    }
    function o(u, f, d) {
        const h = !d
          , x = dse(u);
        gse(x, f),
        x.aliasOf = d && d.record;
        const y = JA(e, u)
          , m = [x];
        if ("alias"in u) {
            const p = typeof u.alias == "string" ? [u.alias] : u.alias;
            for (const v of p)
                m.push(gt({}, x, {
                    components: d ? d.record.components : x.components,
                    path: v,
                    aliasOf: d ? d.record : x
                }))
        }
        let E, g;
        for (const p of m) {
            const {path: v} = p;
            if (f && v[0] !== "/") {
                const _ = f.record.path
                  , b = _[_.length - 1] === "/" ? "" : "/";
                p.path = f.record.path + (v && b + v)
            }
            if (p.path === "*")
                throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
See more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.`);
            if (E = use(p, f, y),
            f && v[0] === "/" && mse(E, f),
            d ? (d.alias.push(E),
            pse(d, E)) : (g = g || E,
            g !== E && g.alias.push(E),
            h && u.name && !ZA(E) && s(u.name)),
            x.children) {
                const _ = x.children;
                for (let b = 0; b < _.length; b++)
                    o(_[b], E, d && d.children[b])
            }
            d = d || E,
            (E.record.components && Object.keys(E.record.components).length || E.record.name || E.record.redirect) && l(E)
        }
        return g ? () => {
            s(g)
        }
        : N0
    }
    function s(u) {
        if (vF(u)) {
            const f = n.get(u);
            f && (n.delete(u),
            r.splice(r.indexOf(f), 1),
            f.children.forEach(s),
            f.alias.forEach(s))
        } else {
            const f = r.indexOf(u);
            f > -1 && (r.splice(f, 1),
            u.record.name && n.delete(u.record.name),
            u.children.forEach(s),
            u.alias.forEach(s))
        }
    }
    function a() {
        return r
    }
    function l(u) {
        let f = 0;
        for (; f < r.length && sse(u, r[f]) >= 0 && (u.record.path !== r[f].record.path || !EF(u, r[f])); )
            f++;
        r.splice(f, 0, u),
        u.record.name && !ZA(u) && n.set(u.record.name, u)
    }
    function c(u, f) {
        let d, h = {}, x, y;
        if ("name"in u && u.name) {
            if (d = n.get(u.name),
            !d)
                throw iu(1, {
                    location: u
                });
            {
                const g = Object.keys(u.params || {}).filter(p => !d.keys.find(v => v.name === p));
                g.length && Qe(`Discarded invalid param(s) "${g.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`)
            }
            y = d.record.name,
            h = gt(qA(f.params, d.keys.filter(g => !g.optional).map(g => g.name)), u.params && qA(u.params, d.keys.map(g => g.name))),
            x = d.stringify(h)
        } else if ("path"in u)
            x = u.path,
            x.startsWith("/") || Qe(`The Matcher cannot resolve relative paths but received "${x}". Unless you directly called \`matcher.resolve("${x}")\`, this is probably a bug in vue-router. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/router.`),
            d = r.find(g => g.re.test(x)),
            d && (h = d.parse(x),
            y = d.record.name);
        else {
            if (d = f.name ? n.get(f.name) : r.find(g => g.re.test(f.path)),
            !d)
                throw iu(1, {
                    location: u,
                    currentLocation: f
                });
            y = d.record.name,
            h = gt({}, f.params, u.params),
            x = d.stringify(h)
        }
        const m = [];
        let E = d;
        for (; E; )
            m.unshift(E.record),
            E = E.parent;
        return {
            name: y,
            path: x,
            params: h,
            matched: m,
            meta: xse(m)
        }
    }
    return t.forEach(u => o(u)),
    {
        addRoute: o,
        resolve: c,
        removeRoute: s,
        getRoutes: a,
        getRecordMatcher: i
    }
}
function qA(t, e) {
    const r = {};
    for (const n of e)
        n in t && (r[n] = t[n]);
    return r
}
function dse(t) {
    return {
        path: t.path,
        redirect: t.redirect,
        name: t.name,
        meta: t.meta || {},
        aliasOf: void 0,
        beforeEnter: t.beforeEnter,
        props: hse(t),
        children: t.children || [],
        instances: {},
        leaveGuards: new Set,
        updateGuards: new Set,
        enterCallbacks: {},
        components: "components"in t ? t.components || null : t.component && {
            default: t.component
        }
    }
}
function hse(t) {
    const e = {}
      , r = t.props || !1;
    if ("component"in t)
        e.default = r;
    else
        for (const n in t.components)
            e[n] = typeof r == "boolean" ? r : r[n];
    return e
}
function ZA(t) {
    for (; t; ) {
        if (t.record.aliasOf)
            return !0;
        t = t.parent
    }
    return !1
}
function xse(t) {
    return t.reduce( (e, r) => gt(e, r.meta), {})
}
function JA(t, e) {
    const r = {};
    for (const n in t)
        r[n] = n in e ? e[n] : t[n];
    return r
}
function Vy(t, e) {
    return t.name === e.name && t.optional === e.optional && t.repeatable === e.repeatable
}
function pse(t, e) {
    for (const r of t.keys)
        if (!r.optional && !e.keys.find(Vy.bind(null, r)))
            return Qe(`Alias "${e.record.path}" and the original record: "${t.record.path}" must have the exact same param named "${r.name}"`);
    for (const r of e.keys)
        if (!r.optional && !t.keys.find(Vy.bind(null, r)))
            return Qe(`Alias "${e.record.path}" and the original record: "${t.record.path}" must have the exact same param named "${r.name}"`)
}
function gse(t, e) {
    e && e.record.name && !t.name && !t.path && Qe(`The route named "${String(e.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`)
}
function mse(t, e) {
    for (const r of e.keys)
        if (!t.keys.find(Vy.bind(null, r)))
            return Qe(`Absolute path "${t.record.path}" must have the exact same param named "${r.name}" as its parent "${e.record.path}".`)
}
function EF(t, e) {
    return e.children.some(r => r === t || EF(t, r))
}
const _F = /#/g
  , vse = /&/g
  , yse = /\//g
  , Ese = /=/g
  , _se = /\?/g
  , bF = /\+/g
  , bse = /%5B/g
  , Cse = /%5D/g
  , CF = /%5E/g
  , Ase = /%60/g
  , AF = /%7B/g
  , wse = /%7C/g
  , wF = /%7D/g
  , Bse = /%20/g;
function lb(t) {
    return encodeURI("" + t).replace(wse, "|").replace(bse, "[").replace(Cse, "]")
}
function Sse(t) {
    return lb(t).replace(AF, "{").replace(wF, "}").replace(CF, "^")
}
function zy(t) {
    return lb(t).replace(bF, "%2B").replace(Bse, "+").replace(_F, "%23").replace(vse, "%26").replace(Ase, "`").replace(AF, "{").replace(wF, "}").replace(CF, "^")
}
function Tse(t) {
    return zy(t).replace(Ese, "%3D")
}
function Dse(t) {
    return lb(t).replace(_F, "%23").replace(_se, "%3F")
}
function Fse(t) {
    return t == null ? "" : Dse(t).replace(yse, "%2F")
}
function Af(t) {
    try {
        return decodeURIComponent("" + t)
    } catch {
        Qe(`Error decoding "${t}". Using original value`)
    }
    return "" + t
}
function Pse(t) {
    const e = {};
    if (t === "" || t === "?")
        return e;
    const n = (t[0] === "?" ? t.slice(1) : t).split("&");
    for (let i = 0; i < n.length; ++i) {
        const o = n[i].replace(bF, " ")
          , s = o.indexOf("=")
          , a = Af(s < 0 ? o : o.slice(0, s))
          , l = s < 0 ? null : Af(o.slice(s + 1));
        if (a in e) {
            let c = e[a];
            Kn(c) || (c = e[a] = [c]),
            c.push(l)
        } else
            e[a] = l
    }
    return e
}
function QA(t) {
    let e = "";
    for (let r in t) {
        const n = t[r];
        if (r = Tse(r),
        n == null) {
            n !== void 0 && (e += (e.length ? "&" : "") + r);
            continue
        }
        (Kn(n) ? n.map(o => o && zy(o)) : [n && zy(n)]).forEach(o => {
            o !== void 0 && (e += (e.length ? "&" : "") + r,
            o != null && (e += "=" + o))
        }
        )
    }
    return e
}
function Ise(t) {
    const e = {};
    for (const r in t) {
        const n = t[r];
        n !== void 0 && (e[r] = Kn(n) ? n.map(i => i == null ? null : "" + i) : n == null ? n : "" + n)
    }
    return e
}
const BF = Symbol("router view location matched")
  , ew = Symbol("router view depth")
  , f1 = Symbol("router")
  , cb = Symbol("route location")
  , jy = Symbol("router view location");
function Ju() {
    let t = [];
    function e(n) {
        return t.push(n),
        () => {
            const i = t.indexOf(n);
            i > -1 && t.splice(i, 1)
        }
    }
    function r() {
        t = []
    }
    return {
        add: e,
        list: () => t,
        reset: r
    }
}
function Ose(t, e, r) {
    const n = () => {
        t[e].delete(r)
    }
    ;
    _s(n),
    Fo(n),
    ys( () => {
        t[e].add(r)
    }
    ),
    t[e].add(r)
}
function e5e(t) {
    if (!Ot()) {
        Qe("getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function");
        return
    }
    const e = dr(BF, {}).value;
    if (!e) {
        Qe("No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?");
        return
    }
    Ose(e, "leaveGuards", t)
}
function Ls(t, e, r, n, i) {
    const o = n && (n.enterCallbacks[i] = n.enterCallbacks[i] || []);
    return () => new Promise( (s, a) => {
        const l = f => {
            f === !1 ? a(iu(4, {
                from: r,
                to: e
            })) : f instanceof Error ? a(f) : Joe(f) ? a(iu(2, {
                from: e,
                to: f
            })) : (o && n.enterCallbacks[i] === o && typeof f == "function" && o.push(f),
            s())
        }
          , c = t.call(n && n.instances[i], e, r, kse(l, e, r));
        let u = Promise.resolve(c);
        if (t.length < 3 && (u = u.then(l)),
        t.length > 2) {
            const f = `The "next" callback was never called inside of ${t.name ? '"' + t.name + '"' : ""}:
${t.toString()}
. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;
            if (typeof c == "object" && "then"in c)
                u = u.then(d => l._called ? d : (Qe(f),
                Promise.reject(new Error("Invalid navigation guard"))));
            else if (c !== void 0 && !l._called) {
                Qe(f),
                a(new Error("Invalid navigation guard"));
                return
            }
        }
        u.catch(f => a(f))
    }
    )
}
function kse(t, e, r) {
    let n = 0;
    return function() {
        n++ === 1 && Qe(`The "next" callback was called more than once in one navigation guard when going from "${r.fullPath}" to "${e.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`),
        t._called = !0,
        n === 1 && t.apply(null, arguments)
    }
}
function Dg(t, e, r, n) {
    const i = [];
    for (const o of t) {
        !o.components && !o.children.length && Qe(`Record with path "${o.path}" is either missing a "component(s)" or "children" property.`);
        for (const s in o.components) {
            let a = o.components[s];
            {
                if (!a || typeof a != "object" && typeof a != "function")
                    throw Qe(`Component "${s}" in record with path "${o.path}" is not a valid component. Received "${String(a)}".`),
                    new Error("Invalid route component");
                if ("then"in a) {
                    Qe(`Component "${s}" in record with path "${o.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);
                    const l = a;
                    a = () => l
                } else
                    a.__asyncLoader && !a.__warnedDefineAsync && (a.__warnedDefineAsync = !0,
                    Qe(`Component "${s}" in record with path "${o.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`))
            }
            if (!(e !== "beforeRouteEnter" && !o.instances[s]))
                if (Rse(a)) {
                    const c = (a.__vccOpts || a)[e];
                    c && i.push(Ls(c, r, n, o, s))
                } else {
                    let l = a();
                    "catch"in l || (Qe(`Component "${s}" in record with path "${o.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`),
                    l = Promise.resolve(l)),
                    i.push( () => l.then(c => {
                        if (!c)
                            return Promise.reject(new Error(`Couldn't resolve component "${s}" at "${o.path}"`));
                        const u = Roe(c) ? c.default : c;
                        o.components[s] = u;
                        const d = (u.__vccOpts || u)[e];
                        return d && Ls(d, r, n, o, s)()
                    }
                    ))
                }
        }
    }
    return i
}
function Rse(t) {
    return typeof t == "object" || "displayName"in t || "props"in t || "__vccOpts"in t
}
function tw(t) {
    const e = dr(f1)
      , r = dr(cb)
      , n = ae( () => e.resolve(xn(t.to)))
      , i = ae( () => {
        const {matched: l} = n.value
          , {length: c} = l
          , u = l[c - 1]
          , f = r.matched;
        if (!u || !f.length)
            return -1;
        const d = f.findIndex(da.bind(null, u));
        if (d > -1)
            return d;
        const h = rw(l[c - 2]);
        return c > 1 && rw(u) === h && f[f.length - 1].path !== h ? f.findIndex(da.bind(null, l[c - 2])) : d
    }
    )
      , o = ae( () => i.value > -1 && $se(r.params, n.value.params))
      , s = ae( () => i.value > -1 && i.value === r.matched.length - 1 && gF(r.params, n.value.params));
    function a(l={}) {
        return Lse(l) ? e[xn(t.replace) ? "replace" : "push"](xn(t.to)).catch(N0) : Promise.resolve()
    }
    if (Yo) {
        const l = Ot();
        if (l) {
            const c = {
                route: n.value,
                isActive: o.value,
                isExactActive: s.value
            };
            l.__vrl_devtools = l.__vrl_devtools || [],
            l.__vrl_devtools.push(c),
            Au( () => {
                c.route = n.value,
                c.isActive = o.value,
                c.isExactActive = s.value
            }
            , {
                flush: "post"
            })
        }
    }
    return {
        route: n,
        href: ae( () => n.value.href),
        isActive: o,
        isExactActive: s,
        navigate: a
    }
}
const Mse = be({
    name: "RouterLink",
    compatConfig: {
        MODE: 3
    },
    props: {
        to: {
            type: [String, Object],
            required: !0
        },
        replace: Boolean,
        activeClass: String,
        exactActiveClass: String,
        custom: Boolean,
        ariaCurrentValue: {
            type: String,
            default: "page"
        }
    },
    useLink: tw,
    setup(t, {slots: e}) {
        const r = It(tw(t))
          , {options: n} = dr(f1)
          , i = ae( () => ({
            [nw(t.activeClass, n.linkActiveClass, "router-link-active")]: r.isActive,
            [nw(t.exactActiveClass, n.linkExactActiveClass, "router-link-exact-active")]: r.isExactActive
        }));
        return () => {
            const o = e.default && e.default(r);
            return t.custom ? o : Or("a", {
                "aria-current": r.isExactActive ? t.ariaCurrentValue : null,
                href: r.href,
                onClick: r.navigate,
                class: i.value
            }, o)
        }
    }
})
  , Nse = Mse;
function Lse(t) {
    if (!(t.metaKey || t.altKey || t.ctrlKey || t.shiftKey) && !t.defaultPrevented && !(t.button !== void 0 && t.button !== 0)) {
        if (t.currentTarget && t.currentTarget.getAttribute) {
            const e = t.currentTarget.getAttribute("target");
            if (/\b_blank\b/i.test(e))
                return
        }
        return t.preventDefault && t.preventDefault(),
        !0
    }
}
function $se(t, e) {
    for (const r in e) {
        const n = e[r]
          , i = t[r];
        if (typeof n == "string") {
            if (n !== i)
                return !1
        } else if (!Kn(i) || i.length !== n.length || n.some( (o, s) => o !== i[s]))
            return !1
    }
    return !0
}
function rw(t) {
    return t ? t.aliasOf ? t.aliasOf.path : t.path : ""
}
const nw = (t, e, r) => t ?? e ?? r
  , Use = be({
    name: "RouterView",
    inheritAttrs: !1,
    props: {
        name: {
            type: String,
            default: "default"
        },
        route: Object
    },
    compatConfig: {
        MODE: 3
    },
    setup(t, {attrs: e, slots: r}) {
        Hse();
        const n = dr(jy)
          , i = ae( () => t.route || n.value)
          , o = dr(ew, 0)
          , s = ae( () => {
            let c = xn(o);
            const {matched: u} = i.value;
            let f;
            for (; (f = u[c]) && !f.components; )
                c++;
            return c
        }
        )
          , a = ae( () => i.value.matched[s.value]);
        xi(ew, ae( () => s.value + 1)),
        xi(BF, a),
        xi(jy, i);
        const l = ie();
        return me( () => [l.value, a.value, t.name], ([c,u,f], [d,h,x]) => {
            u && (u.instances[f] = c,
            h && h !== u && c && c === d && (u.leaveGuards.size || (u.leaveGuards = h.leaveGuards),
            u.updateGuards.size || (u.updateGuards = h.updateGuards))),
            c && u && (!h || !da(u, h) || !d) && (u.enterCallbacks[f] || []).forEach(y => y(c))
        }
        , {
            flush: "post"
        }),
        () => {
            const c = i.value
              , u = t.name
              , f = a.value
              , d = f && f.components[u];
            if (!d)
                return iw(r.default, {
                    Component: d,
                    route: c
                });
            const h = f.props[u]
              , x = h ? h === !0 ? c.params : typeof h == "function" ? h(c) : h : null
              , m = Or(d, gt({}, x, e, {
                onVnodeUnmounted: E => {
                    E.component.isUnmounted && (f.instances[u] = null)
                }
                ,
                ref: l
            }));
            if (Yo && m.ref) {
                const E = {
                    depth: s.value,
                    name: f.name,
                    path: f.path,
                    meta: f.meta
                };
                (Kn(m.ref) ? m.ref.map(p => p.i) : [m.ref.i]).forEach(p => {
                    p.__vrv_devtools = E
                }
                )
            }
            return iw(r.default, {
                Component: m,
                route: c
            }) || m
        }
    }
});
function iw(t, e) {
    if (!t)
        return null;
    const r = t(e);
    return r.length === 1 ? r[0] : r
}
const Gse = Use;
function Hse() {
    const t = Ot()
      , e = t.parent && t.parent.type.name;
    if (e && (e === "KeepAlive" || e.includes("Transition"))) {
        const r = e === "KeepAlive" ? "keep-alive" : "transition";
        Qe(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.
Use slot props instead:

<router-view v-slot="{ Component }">
  <${r}>
    <component :is="Component" />
  </${r}>
</router-view>`)
    }
}
function Qu(t, e) {
    const r = gt({}, t, {
        matched: t.matched.map(n => Zse(n, ["instances", "children", "aliasOf"]))
    });
    return {
        _custom: {
            type: null,
            readOnly: !0,
            display: t.fullPath,
            tooltip: e,
            value: r
        }
    }
}
function sh(t) {
    return {
        _custom: {
            display: t
        }
    }
}
let Vse = 0;
function zse(t, e, r) {
    if (e.__hasDevtools)
        return;
    e.__hasDevtools = !0;
    const n = Vse++;
    Up({
        id: "org.vuejs.router" + (n ? "." + n : ""),
        label: "Vue Router",
        packageName: "vue-router",
        homepage: "https://router.vuejs.org",
        logo: "https://router.vuejs.org/logo.png",
        componentStateTypes: ["Routing"],
        app: t
    }, i => {
        typeof i.now != "function" && console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),
        i.on.inspectComponent( (u, f) => {
            u.instanceData && u.instanceData.state.push({
                type: "Routing",
                key: "$route",
                editable: !1,
                value: Qu(e.currentRoute.value, "Current Route")
            })
        }
        ),
        i.on.visitComponentTree( ({treeNode: u, componentInstance: f}) => {
            if (f.__vrv_devtools) {
                const d = f.__vrv_devtools;
                u.tags.push({
                    label: (d.name ? `${d.name.toString()}: ` : "") + d.path,
                    textColor: 0,
                    tooltip: "This component is rendered by &lt;router-view&gt;",
                    backgroundColor: SF
                })
            }
            Kn(f.__vrl_devtools) && (f.__devtoolsApi = i,
            f.__vrl_devtools.forEach(d => {
                let h = FF
                  , x = "";
                d.isExactActive ? (h = DF,
                x = "This is exactly active") : d.isActive && (h = TF,
                x = "This link is active"),
                u.tags.push({
                    label: d.route.path,
                    textColor: 0,
                    tooltip: x,
                    backgroundColor: h
                })
            }
            ))
        }
        ),
        me(e.currentRoute, () => {
            l(),
            i.notifyComponentUpdate(),
            i.sendInspectorTree(a),
            i.sendInspectorState(a)
        }
        );
        const o = "router:navigations:" + n;
        i.addTimelineLayer({
            id: o,
            label: `Router${n ? " " + n : ""} Navigations`,
            color: 4237508
        }),
        e.onError( (u, f) => {
            i.addTimelineEvent({
                layerId: o,
                event: {
                    title: "Error during Navigation",
                    subtitle: f.fullPath,
                    logType: "error",
                    time: i.now(),
                    data: {
                        error: u
                    },
                    groupId: f.meta.__navigationId
                }
            })
        }
        );
        let s = 0;
        e.beforeEach( (u, f) => {
            const d = {
                guard: sh("beforeEach"),
                from: Qu(f, "Current Location during this navigation"),
                to: Qu(u, "Target location")
            };
            Object.defineProperty(u.meta, "__navigationId", {
                value: s++
            }),
            i.addTimelineEvent({
                layerId: o,
                event: {
                    time: i.now(),
                    title: "Start of navigation",
                    subtitle: u.fullPath,
                    data: d,
                    groupId: u.meta.__navigationId
                }
            })
        }
        ),
        e.afterEach( (u, f, d) => {
            const h = {
                guard: sh("afterEach")
            };
            d ? (h.failure = {
                _custom: {
                    type: Error,
                    readOnly: !0,
                    display: d ? d.message : "",
                    tooltip: "Navigation Failure",
                    value: d
                }
            },
            h.status = sh("❌")) : h.status = sh("✅"),
            h.from = Qu(f, "Current Location during this navigation"),
            h.to = Qu(u, "Target location"),
            i.addTimelineEvent({
                layerId: o,
                event: {
                    title: "End of navigation",
                    subtitle: u.fullPath,
                    time: i.now(),
                    data: h,
                    logType: d ? "warning" : "default",
                    groupId: u.meta.__navigationId
                }
            })
        }
        );
        const a = "router-inspector:" + n;
        i.addInspector({
            id: a,
            label: "Routes" + (n ? " " + n : ""),
            icon: "book",
            treeFilterPlaceholder: "Search routes"
        });
        function l() {
            if (!c)
                return;
            const u = c;
            let f = r.getRoutes().filter(d => !d.parent);
            f.forEach(OF),
            u.filter && (f = f.filter(d => Wy(d, u.filter.toLowerCase()))),
            f.forEach(d => IF(d, e.currentRoute.value)),
            u.rootNodes = f.map(PF)
        }
        let c;
        i.on.getInspectorTree(u => {
            c = u,
            u.app === t && u.inspectorId === a && l()
        }
        ),
        i.on.getInspectorState(u => {
            if (u.app === t && u.inspectorId === a) {
                const d = r.getRoutes().find(h => h.record.__vd_id === u.nodeId);
                d && (u.state = {
                    options: Wse(d)
                })
            }
        }
        ),
        i.sendInspectorTree(a),
        i.sendInspectorState(a)
    }
    )
}
function jse(t) {
    return t.optional ? t.repeatable ? "*" : "?" : t.repeatable ? "+" : ""
}
function Wse(t) {
    const {record: e} = t
      , r = [{
        editable: !1,
        key: "path",
        value: e.path
    }];
    return e.name != null && r.push({
        editable: !1,
        key: "name",
        value: e.name
    }),
    r.push({
        editable: !1,
        key: "regexp",
        value: t.re
    }),
    t.keys.length && r.push({
        editable: !1,
        key: "keys",
        value: {
            _custom: {
                type: null,
                readOnly: !0,
                display: t.keys.map(n => `${n.name}${jse(n)}`).join(" "),
                tooltip: "Param keys",
                value: t.keys
            }
        }
    }),
    e.redirect != null && r.push({
        editable: !1,
        key: "redirect",
        value: e.redirect
    }),
    t.alias.length && r.push({
        editable: !1,
        key: "aliases",
        value: t.alias.map(n => n.record.path)
    }),
    Object.keys(t.record.meta).length && r.push({
        editable: !1,
        key: "meta",
        value: t.record.meta
    }),
    r.push({
        key: "score",
        editable: !1,
        value: {
            _custom: {
                type: null,
                readOnly: !0,
                display: t.score.map(n => n.join(", ")).join(" | "),
                tooltip: "Score used to sort routes",
                value: t.score
            }
        }
    }),
    r
}
const SF = 15485081
  , TF = 2450411
  , DF = 8702998
  , Yse = 2282478
  , FF = 16486972
  , Xse = 6710886;
function PF(t) {
    const e = []
      , {record: r} = t;
    r.name != null && e.push({
        label: String(r.name),
        textColor: 0,
        backgroundColor: Yse
    }),
    r.aliasOf && e.push({
        label: "alias",
        textColor: 0,
        backgroundColor: FF
    }),
    t.__vd_match && e.push({
        label: "matches",
        textColor: 0,
        backgroundColor: SF
    }),
    t.__vd_exactActive && e.push({
        label: "exact",
        textColor: 0,
        backgroundColor: DF
    }),
    t.__vd_active && e.push({
        label: "active",
        textColor: 0,
        backgroundColor: TF
    }),
    r.redirect && e.push({
        label: typeof r.redirect == "string" ? `redirect: ${r.redirect}` : "redirects",
        textColor: 16777215,
        backgroundColor: Xse
    });
    let n = r.__vd_id;
    return n == null && (n = String(Kse++),
    r.__vd_id = n),
    {
        id: n,
        label: r.path,
        tags: e,
        children: t.children.map(PF)
    }
}
let Kse = 0;
const qse = /^\/(.*)\/([a-z]*)$/;
function IF(t, e) {
    const r = e.matched.length && da(e.matched[e.matched.length - 1], t.record);
    t.__vd_exactActive = t.__vd_active = r,
    r || (t.__vd_active = e.matched.some(n => da(n, t.record))),
    t.children.forEach(n => IF(n, e))
}
function OF(t) {
    t.__vd_match = !1,
    t.children.forEach(OF)
}
function Wy(t, e) {
    const r = String(t.re).match(qse);
    if (t.__vd_match = !1,
    !r || r.length < 3)
        return !1;
    if (new RegExp(r[1].replace(/\$$/, ""),r[2]).test(e))
        return t.children.forEach(s => Wy(s, e)),
        t.record.path !== "/" || e === "/" ? (t.__vd_match = t.re.test(e),
        !0) : !1;
    const i = t.record.path.toLowerCase()
      , o = Af(i);
    return !e.startsWith("/") && (o.includes(e) || i.includes(e)) || o.startsWith(e) || i.startsWith(e) || t.record.name && String(t.record.name).includes(e) ? !0 : t.children.some(s => Wy(s, e))
}
function Zse(t, e) {
    const r = {};
    for (const n in t)
        e.includes(n) || (r[n] = t[n]);
    return r
}
function t5e(t) {
    const e = fse(t.routes, t)
      , r = t.parseQuery || Pse
      , n = t.stringifyQuery || QA
      , i = t.history;
    if (!i)
        throw new Error('Provide the "history" option when calling "createRouter()": https://next.router.vuejs.org/api/#history.');
    const o = Ju()
      , s = Ju()
      , a = Ju()
      , l = Cp(Fs);
    let c = Fs;
    Yo && t.scrollBehavior && "scrollRestoration"in history && (history.scrollRestoration = "manual");
    const u = Sg.bind(null, H => "" + H)
      , f = Sg.bind(null, Fse)
      , d = Sg.bind(null, Af);
    function h(H, Q) {
        let G, re;
        return vF(H) ? (G = e.getRecordMatcher(H),
        re = Q) : re = H,
        e.addRoute(re, G)
    }
    function x(H) {
        const Q = e.getRecordMatcher(H);
        Q ? e.removeRoute(Q) : Qe(`Cannot remove non-existent route "${String(H)}"`)
    }
    function y() {
        return e.getRoutes().map(H => H.record)
    }
    function m(H) {
        return !!e.getRecordMatcher(H)
    }
    function E(H, Q) {
        if (Q = gt({}, Q || l.value),
        typeof H == "string") {
            const ve = Tg(r, H, Q.path)
              , I = e.resolve({
                path: ve.path
            }, Q)
              , z = i.createHref(ve.fullPath);
            return z.startsWith("//") ? Qe(`Location "${H}" resolved to "${z}". A resolved location cannot start with multiple slashes.`) : I.matched.length || Qe(`No match found for location with path "${H}"`),
            gt(ve, I, {
                params: d(I.params),
                hash: Af(ve.hash),
                redirectedFrom: void 0,
                href: z
            })
        }
        let G;
        if ("path"in H)
            "params"in H && !("name"in H) && Object.keys(H.params).length && Qe(`Path "${H.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),
            G = gt({}, H, {
                path: Tg(r, H.path, Q.path).path
            });
        else {
            const ve = gt({}, H.params);
            for (const I in ve)
                ve[I] == null && delete ve[I];
            G = gt({}, H, {
                params: f(H.params)
            }),
            Q.params = f(Q.params)
        }
        const re = e.resolve(G, Q)
          , te = H.hash || "";
        te && !te.startsWith("#") && Qe(`A \`hash\` should always start with the character "#". Replace "${te}" with "#${te}".`),
        re.params = u(d(re.params));
        const he = Loe(n, gt({}, H, {
            hash: Sse(te),
            path: re.path
        }))
          , xe = i.createHref(he);
        return xe.startsWith("//") ? Qe(`Location "${H}" resolved to "${xe}". A resolved location cannot start with multiple slashes.`) : re.matched.length || Qe(`No match found for location with path "${"path"in H ? H.path : H}"`),
        gt({
            fullPath: he,
            hash: te,
            query: n === QA ? Ise(H.query) : H.query || {}
        }, re, {
            redirectedFrom: void 0,
            href: xe
        })
    }
    function g(H) {
        return typeof H == "string" ? Tg(r, H, l.value.path) : gt({}, H)
    }
    function p(H, Q) {
        if (c !== H)
            return iu(8, {
                from: Q,
                to: H
            })
    }
    function v(H) {
        return C(H)
    }
    function _(H) {
        return v(gt(g(H), {
            replace: !0
        }))
    }
    function b(H) {
        const Q = H.matched[H.matched.length - 1];
        if (Q && Q.redirect) {
            const {redirect: G} = Q;
            let re = typeof G == "function" ? G(H) : G;
            if (typeof re == "string" && (re = re.includes("?") || re.includes("#") ? re = g(re) : {
                path: re
            },
            re.params = {}),
            !("path"in re) && !("name"in re))
                throw Qe(`Invalid redirect found:
${JSON.stringify(re, null, 2)}
 when navigating to "${H.fullPath}". A redirect must contain a name or path. This will break in production.`),
                new Error("Invalid redirect");
            return gt({
                query: H.query,
                hash: H.hash,
                params: "path"in re ? {} : H.params
            }, re)
        }
    }
    function C(H, Q) {
        const G = c = E(H)
          , re = l.value
          , te = H.state
          , he = H.force
          , xe = H.replace === !0
          , ve = b(G);
        if (ve)
            return C(gt(g(ve), {
                state: typeof ve == "object" ? gt({}, te, ve.state) : te,
                force: he,
                replace: xe
            }), Q || G);
        const I = G;
        I.redirectedFrom = Q;
        let z;
        return !he && VA(n, re, G) && (z = iu(16, {
            to: I,
            from: re
        }),
        oe(re, re, !0, !1)),
        (z ? Promise.resolve(z) : T(I, re)).catch(q => No(q) ? No(q, 2) ? q : K(q) : N(q, I, re)).then(q => {
            if (q) {
                if (No(q, 2))
                    return VA(n, E(q.to), I) && Q && (Q._count = Q._count ? Q._count + 1 : 1) > 10 ? (Qe(`Detected an infinite redirection in a navigation guard when going from "${re.fullPath}" to "${I.fullPath}". Aborting to avoid a Stack Overflow. This will break in production if not fixed.`),
                    Promise.reject(new Error("Infinite redirect in navigation guard"))) : C(gt({
                        replace: xe
                    }, g(q.to), {
                        state: typeof q.to == "object" ? gt({}, te, q.to.state) : te,
                        force: he
                    }), Q || I)
            } else
                q = B(I, re, !0, xe, te);
            return A(I, re, q),
            q
        }
        )
    }
    function w(H, Q) {
        const G = p(H, Q);
        return G ? Promise.reject(G) : Promise.resolve()
    }
    function T(H, Q) {
        let G;
        const [re,te,he] = Jse(H, Q);
        G = Dg(re.reverse(), "beforeRouteLeave", H, Q);
        for (const ve of re)
            ve.leaveGuards.forEach(I => {
                G.push(Ls(I, H, Q))
            }
            );
        const xe = w.bind(null, H, Q);
        return G.push(xe),
        lc(G).then( () => {
            G = [];
            for (const ve of o.list())
                G.push(Ls(ve, H, Q));
            return G.push(xe),
            lc(G)
        }
        ).then( () => {
            G = Dg(te, "beforeRouteUpdate", H, Q);
            for (const ve of te)
                ve.updateGuards.forEach(I => {
                    G.push(Ls(I, H, Q))
                }
                );
            return G.push(xe),
            lc(G)
        }
        ).then( () => {
            G = [];
            for (const ve of H.matched)
                if (ve.beforeEnter && !Q.matched.includes(ve))
                    if (Kn(ve.beforeEnter))
                        for (const I of ve.beforeEnter)
                            G.push(Ls(I, H, Q));
                    else
                        G.push(Ls(ve.beforeEnter, H, Q));
            return G.push(xe),
            lc(G)
        }
        ).then( () => (H.matched.forEach(ve => ve.enterCallbacks = {}),
        G = Dg(he, "beforeRouteEnter", H, Q),
        G.push(xe),
        lc(G))).then( () => {
            G = [];
            for (const ve of s.list())
                G.push(Ls(ve, H, Q));
            return G.push(xe),
            lc(G)
        }
        ).catch(ve => No(ve, 8) ? ve : Promise.reject(ve))
    }
    function A(H, Q, G) {
        for (const re of a.list())
            re(H, Q, G)
    }
    function B(H, Q, G, re, te) {
        const he = p(H, Q);
        if (he)
            return he;
        const xe = Q === Fs
          , ve = Yo ? history.state : {};
        G && (re || xe ? i.replace(H.fullPath, gt({
            scroll: xe && ve && ve.scroll
        }, te)) : i.push(H.fullPath, te)),
        l.value = H,
        oe(H, Q, G, xe),
        K()
    }
    let S;
    function D() {
        S || (S = i.listen( (H, Q, G) => {
            if (!W.listening)
                return;
            const re = E(H)
              , te = b(re);
            if (te) {
                C(gt(te, {
                    replace: !0
                }), re).catch(N0);
                return
            }
            c = re;
            const he = l.value;
            Yo && Woe(jA(he.fullPath, G.delta), u1()),
            T(re, he).catch(xe => No(xe, 12) ? xe : No(xe, 2) ? (C(xe.to, re).then(ve => {
                No(ve, 20) && !G.delta && G.type === Cf.pop && i.go(-1, !1)
            }
            ).catch(N0),
            Promise.reject()) : (G.delta && i.go(-G.delta, !1),
            N(xe, re, he))).then(xe => {
                xe = xe || B(re, he, !1),
                xe && (G.delta && !No(xe, 8) ? i.go(-G.delta, !1) : G.type === Cf.pop && No(xe, 20) && i.go(-1, !1)),
                A(re, he, xe)
            }
            ).catch(N0)
        }
        ))
    }
    let F = Ju(), R = Ju(), P;
    function N(H, Q, G) {
        K(H);
        const re = R.list();
        return re.length ? re.forEach(te => te(H, Q, G)) : (Qe("uncaught error during route navigation:"),
        console.error(H)),
        Promise.reject(H)
    }
    function j() {
        return P && l.value !== Fs ? Promise.resolve() : new Promise( (H, Q) => {
            F.add([H, Q])
        }
        )
    }
    function K(H) {
        return P || (P = !H,
        D(),
        F.list().forEach( ([Q,G]) => H ? G(H) : Q()),
        F.reset()),
        H
    }
    function oe(H, Q, G, re) {
        const {scrollBehavior: te} = t;
        if (!Yo || !te)
            return Promise.resolve();
        const he = !G && Yoe(jA(H.fullPath, 0)) || (re || !G) && history.state && history.state.scroll || null;
        return Xe().then( () => te(H, Q, he)).then(xe => xe && joe(xe)).catch(xe => N(xe, H, Q))
    }
    const U = H => i.go(H);
    let $;
    const V = new Set
      , W = {
        currentRoute: l,
        listening: !0,
        addRoute: h,
        removeRoute: x,
        hasRoute: m,
        getRoutes: y,
        resolve: E,
        options: t,
        push: v,
        replace: _,
        go: U,
        back: () => U(-1),
        forward: () => U(1),
        beforeEach: o.add,
        beforeResolve: s.add,
        afterEach: a.add,
        onError: R.add,
        isReady: j,
        install(H) {
            const Q = this;
            H.component("RouterLink", Nse),
            H.component("RouterView", Gse),
            H.config.globalProperties.$router = Q,
            Object.defineProperty(H.config.globalProperties, "$route", {
                enumerable: !0,
                get: () => xn(l)
            }),
            Yo && !$ && l.value === Fs && ($ = !0,
            v(i.location).catch(te => {
                Qe("Unexpected error when starting the router:", te)
            }
            ));
            const G = {};
            for (const te in Fs)
                G[te] = ae( () => l.value[te]);
            H.provide(f1, Q),
            H.provide(cb, It(G)),
            H.provide(jy, l);
            const re = H.unmount;
            V.add(H),
            H.unmount = function() {
                V.delete(H),
                V.size < 1 && (c = Fs,
                S && S(),
                S = null,
                l.value = Fs,
                $ = !1,
                P = !1),
                re()
            }
            ,
            Yo && zse(H, Q, e)
        }
    };
    return W
}
function lc(t) {
    return t.reduce( (e, r) => e.then( () => r()), Promise.resolve())
}
function Jse(t, e) {
    const r = []
      , n = []
      , i = []
      , o = Math.max(e.matched.length, t.matched.length);
    for (let s = 0; s < o; s++) {
        const a = e.matched[s];
        a && (t.matched.find(c => da(c, a)) ? n.push(a) : r.push(a));
        const l = t.matched[s];
        l && (e.matched.find(c => da(c, l)) || i.push(l))
    }
    return [r, n, i]
}
function r5e() {
    return dr(f1)
}
function n5e() {
    return dr(cb)
}
var X = (t => (t.Application = "application",
t.WebGLPipes = "webgl-pipes",
t.WebGLPipesAdaptor = "webgl-pipes-adaptor",
t.WebGLSystem = "webgl-system",
t.WebGPUPipes = "webgpu-pipes",
t.WebGPUPipesAdaptor = "webgpu-pipes-adaptor",
t.WebGPUSystem = "webgpu-system",
t.CanvasSystem = "canvas-system",
t.CanvasPipesAdaptor = "canvas-pipes-adaptor",
t.CanvasPipes = "canvas-pipes",
t.Asset = "asset",
t.LoadParser = "load-parser",
t.ResolveParser = "resolve-parser",
t.CacheParser = "cache-parser",
t.DetectionParser = "detection-parser",
t.MaskEffect = "mask-effect",
t.BlendMode = "blend-mode",
t.TextureSource = "texture-source",
t.Environment = "environment",
t.ShapeBuilder = "shape-builder",
t.Batcher = "batcher",
t))(X || {});
const Yy = t => {
    if (typeof t == "function" || typeof t == "object" && t.extension) {
        if (!t.extension)
            throw new Error("Extension class must have an extension object");
        t = {
            ...typeof t.extension != "object" ? {
                type: t.extension
            } : t.extension,
            ref: t
        }
    }
    if (typeof t == "object")
        t = {
            ...t
        };
    else
        throw new Error("Invalid extension type");
    return typeof t.type == "string" && (t.type = [t.type]),
    t
}
  , ah = (t, e) => Yy(t).priority ?? e
  , $e = {
    _addHandlers: {},
    _removeHandlers: {},
    _queue: {},
    remove(...t) {
        return t.map(Yy).forEach(e => {
            e.type.forEach(r => {
                var n, i;
                return (i = (n = this._removeHandlers)[r]) == null ? void 0 : i.call(n, e)
            }
            )
        }
        ),
        this
    },
    add(...t) {
        return t.map(Yy).forEach(e => {
            e.type.forEach(r => {
                var o, s;
                const n = this._addHandlers
                  , i = this._queue;
                n[r] ? (s = n[r]) == null || s.call(n, e) : (i[r] = i[r] || [],
                (o = i[r]) == null || o.push(e))
            }
            )
        }
        ),
        this
    },
    handle(t, e, r) {
        var s;
        const n = this._addHandlers
          , i = this._removeHandlers;
        if (n[t] || i[t])
            throw new Error(`Extension type ${t} already has a handler`);
        n[t] = e,
        i[t] = r;
        const o = this._queue;
        return o[t] && ((s = o[t]) == null || s.forEach(a => e(a)),
        delete o[t]),
        this
    },
    handleByMap(t, e) {
        return this.handle(t, r => {
            r.name && (e[r.name] = r.ref)
        }
        , r => {
            r.name && delete e[r.name]
        }
        )
    },
    handleByNamedList(t, e, r=-1) {
        return this.handle(t, n => {
            e.findIndex(o => o.name === n.name) >= 0 || (e.push({
                name: n.name,
                value: n.ref
            }),
            e.sort( (o, s) => ah(s.value, r) - ah(o.value, r)))
        }
        , n => {
            const i = e.findIndex(o => o.name === n.name);
            i !== -1 && e.splice(i, 1)
        }
        )
    },
    handleByList(t, e, r=-1) {
        return this.handle(t, n => {
            e.includes(n.ref) || (e.push(n.ref),
            e.sort( (i, o) => ah(o, r) - ah(i, r)))
        }
        , n => {
            const i = e.indexOf(n.ref);
            i !== -1 && e.splice(i, 1)
        }
        )
    },
    mixin(t, ...e) {
        for (const r of e)
            Object.defineProperties(t.prototype, Object.getOwnPropertyDescriptors(r))
    }
}
  , Qse = {
    extension: {
        type: X.Environment,
        name: "browser",
        priority: -1
    },
    test: () => !0,
    load: async () => {
        await ef( () => Promise.resolve().then( () => l1e), void 0)
    }
}
  , eae = {
    extension: {
        type: X.Environment,
        name: "webworker",
        priority: 0
    },
    test: () => typeof self < "u" && self.WorkerGlobalScope !== void 0,
    load: async () => {
        await ef( () => Promise.resolve().then( () => c1e), void 0)
    }
};
class Jt {
    constructor(e, r, n) {
        this._x = r || 0,
        this._y = n || 0,
        this._observer = e
    }
    clone(e) {
        return new Jt(e ?? this._observer,this._x,this._y)
    }
    set(e=0, r=e) {
        return (this._x !== e || this._y !== r) && (this._x = e,
        this._y = r,
        this._observer._onUpdate(this)),
        this
    }
    copyFrom(e) {
        return (this._x !== e.x || this._y !== e.y) && (this._x = e.x,
        this._y = e.y,
        this._observer._onUpdate(this)),
        this
    }
    copyTo(e) {
        return e.set(this._x, this._y),
        e
    }
    equals(e) {
        return e.x === this._x && e.y === this._y
    }
    toString() {
        return `[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`
    }
    get x() {
        return this._x
    }
    set x(e) {
        this._x !== e && (this._x = e,
        this._observer._onUpdate(this))
    }
    get y() {
        return this._y
    }
    set y(e) {
        this._y !== e && (this._y = e,
        this._observer._onUpdate(this))
    }
}
var kF = {
    exports: {}
};
(function(t) {
    var e = Object.prototype.hasOwnProperty
      , r = "~";
    function n() {}
    Object.create && (n.prototype = Object.create(null),
    new n().__proto__ || (r = !1));
    function i(l, c, u) {
        this.fn = l,
        this.context = c,
        this.once = u || !1
    }
    function o(l, c, u, f, d) {
        if (typeof u != "function")
            throw new TypeError("The listener must be a function");
        var h = new i(u,f || l,d)
          , x = r ? r + c : c;
        return l._events[x] ? l._events[x].fn ? l._events[x] = [l._events[x], h] : l._events[x].push(h) : (l._events[x] = h,
        l._eventsCount++),
        l
    }
    function s(l, c) {
        --l._eventsCount === 0 ? l._events = new n : delete l._events[c]
    }
    function a() {
        this._events = new n,
        this._eventsCount = 0
    }
    a.prototype.eventNames = function() {
        var c = [], u, f;
        if (this._eventsCount === 0)
            return c;
        for (f in u = this._events)
            e.call(u, f) && c.push(r ? f.slice(1) : f);
        return Object.getOwnPropertySymbols ? c.concat(Object.getOwnPropertySymbols(u)) : c
    }
    ,
    a.prototype.listeners = function(c) {
        var u = r ? r + c : c
          , f = this._events[u];
        if (!f)
            return [];
        if (f.fn)
            return [f.fn];
        for (var d = 0, h = f.length, x = new Array(h); d < h; d++)
            x[d] = f[d].fn;
        return x
    }
    ,
    a.prototype.listenerCount = function(c) {
        var u = r ? r + c : c
          , f = this._events[u];
        return f ? f.fn ? 1 : f.length : 0
    }
    ,
    a.prototype.emit = function(c, u, f, d, h, x) {
        var y = r ? r + c : c;
        if (!this._events[y])
            return !1;
        var m = this._events[y], E = arguments.length, g, p;
        if (m.fn) {
            switch (m.once && this.removeListener(c, m.fn, void 0, !0),
            E) {
            case 1:
                return m.fn.call(m.context),
                !0;
            case 2:
                return m.fn.call(m.context, u),
                !0;
            case 3:
                return m.fn.call(m.context, u, f),
                !0;
            case 4:
                return m.fn.call(m.context, u, f, d),
                !0;
            case 5:
                return m.fn.call(m.context, u, f, d, h),
                !0;
            case 6:
                return m.fn.call(m.context, u, f, d, h, x),
                !0
            }
            for (p = 1,
            g = new Array(E - 1); p < E; p++)
                g[p - 1] = arguments[p];
            m.fn.apply(m.context, g)
        } else {
            var v = m.length, _;
            for (p = 0; p < v; p++)
                switch (m[p].once && this.removeListener(c, m[p].fn, void 0, !0),
                E) {
                case 1:
                    m[p].fn.call(m[p].context);
                    break;
                case 2:
                    m[p].fn.call(m[p].context, u);
                    break;
                case 3:
                    m[p].fn.call(m[p].context, u, f);
                    break;
                case 4:
                    m[p].fn.call(m[p].context, u, f, d);
                    break;
                default:
                    if (!g)
                        for (_ = 1,
                        g = new Array(E - 1); _ < E; _++)
                            g[_ - 1] = arguments[_];
                    m[p].fn.apply(m[p].context, g)
                }
        }
        return !0
    }
    ,
    a.prototype.on = function(c, u, f) {
        return o(this, c, u, f, !1)
    }
    ,
    a.prototype.once = function(c, u, f) {
        return o(this, c, u, f, !0)
    }
    ,
    a.prototype.removeListener = function(c, u, f, d) {
        var h = r ? r + c : c;
        if (!this._events[h])
            return this;
        if (!u)
            return s(this, h),
            this;
        var x = this._events[h];
        if (x.fn)
            x.fn === u && (!d || x.once) && (!f || x.context === f) && s(this, h);
        else {
            for (var y = 0, m = [], E = x.length; y < E; y++)
                (x[y].fn !== u || d && !x[y].once || f && x[y].context !== f) && m.push(x[y]);
            m.length ? this._events[h] = m.length === 1 ? m[0] : m : s(this, h)
        }
        return this
    }
    ,
    a.prototype.removeAllListeners = function(c) {
        var u;
        return c ? (u = r ? r + c : c,
        this._events[u] && s(this, u)) : (this._events = new n,
        this._eventsCount = 0),
        this
    }
    ,
    a.prototype.off = a.prototype.removeListener,
    a.prototype.addListener = a.prototype.on,
    a.prefixed = r,
    a.EventEmitter = a,
    t.exports = a
}
)(kF);
var tae = kF.exports;
const Qn = Vi(tae)
  , rae = Math.PI * 2
  , nae = 180 / Math.PI
  , iae = Math.PI / 180;
let Gt = class RF {
    constructor(e=0, r=0) {
        this.x = 0,
        this.y = 0,
        this.x = e,
        this.y = r
    }
    clone() {
        return new RF(this.x,this.y)
    }
    copyFrom(e) {
        return this.set(e.x, e.y),
        this
    }
    copyTo(e) {
        return e.set(this.x, this.y),
        e
    }
    equals(e) {
        return e.x === this.x && e.y === this.y
    }
    set(e=0, r=e) {
        return this.x = e,
        this.y = r,
        this
    }
    toString() {
        return `[pixi.js/math:Point x=${this.x} y=${this.y}]`
    }
    static get shared() {
        return Fg.x = 0,
        Fg.y = 0,
        Fg
    }
}
;
const Fg = new Gt;
class Pe {
    constructor(e=1, r=0, n=0, i=1, o=0, s=0) {
        this.array = null,
        this.a = e,
        this.b = r,
        this.c = n,
        this.d = i,
        this.tx = o,
        this.ty = s
    }
    fromArray(e) {
        this.a = e[0],
        this.b = e[1],
        this.c = e[3],
        this.d = e[4],
        this.tx = e[2],
        this.ty = e[5]
    }
    set(e, r, n, i, o, s) {
        return this.a = e,
        this.b = r,
        this.c = n,
        this.d = i,
        this.tx = o,
        this.ty = s,
        this
    }
    toArray(e, r) {
        this.array || (this.array = new Float32Array(9));
        const n = r || this.array;
        return e ? (n[0] = this.a,
        n[1] = this.b,
        n[2] = 0,
        n[3] = this.c,
        n[4] = this.d,
        n[5] = 0,
        n[6] = this.tx,
        n[7] = this.ty,
        n[8] = 1) : (n[0] = this.a,
        n[1] = this.c,
        n[2] = this.tx,
        n[3] = this.b,
        n[4] = this.d,
        n[5] = this.ty,
        n[6] = 0,
        n[7] = 0,
        n[8] = 1),
        n
    }
    apply(e, r) {
        r = r || new Gt;
        const n = e.x
          , i = e.y;
        return r.x = this.a * n + this.c * i + this.tx,
        r.y = this.b * n + this.d * i + this.ty,
        r
    }
    applyInverse(e, r) {
        r = r || new Gt;
        const n = this.a
          , i = this.b
          , o = this.c
          , s = this.d
          , a = this.tx
          , l = this.ty
          , c = 1 / (n * s + o * -i)
          , u = e.x
          , f = e.y;
        return r.x = s * c * u + -o * c * f + (l * o - a * s) * c,
        r.y = n * c * f + -i * c * u + (-l * n + a * i) * c,
        r
    }
    translate(e, r) {
        return this.tx += e,
        this.ty += r,
        this
    }
    scale(e, r) {
        return this.a *= e,
        this.d *= r,
        this.c *= e,
        this.b *= r,
        this.tx *= e,
        this.ty *= r,
        this
    }
    rotate(e) {
        const r = Math.cos(e)
          , n = Math.sin(e)
          , i = this.a
          , o = this.c
          , s = this.tx;
        return this.a = i * r - this.b * n,
        this.b = i * n + this.b * r,
        this.c = o * r - this.d * n,
        this.d = o * n + this.d * r,
        this.tx = s * r - this.ty * n,
        this.ty = s * n + this.ty * r,
        this
    }
    append(e) {
        const r = this.a
          , n = this.b
          , i = this.c
          , o = this.d;
        return this.a = e.a * r + e.b * i,
        this.b = e.a * n + e.b * o,
        this.c = e.c * r + e.d * i,
        this.d = e.c * n + e.d * o,
        this.tx = e.tx * r + e.ty * i + this.tx,
        this.ty = e.tx * n + e.ty * o + this.ty,
        this
    }
    appendFrom(e, r) {
        const n = e.a
          , i = e.b
          , o = e.c
          , s = e.d
          , a = e.tx
          , l = e.ty
          , c = r.a
          , u = r.b
          , f = r.c
          , d = r.d;
        return this.a = n * c + i * f,
        this.b = n * u + i * d,
        this.c = o * c + s * f,
        this.d = o * u + s * d,
        this.tx = a * c + l * f + r.tx,
        this.ty = a * u + l * d + r.ty,
        this
    }
    setTransform(e, r, n, i, o, s, a, l, c) {
        return this.a = Math.cos(a + c) * o,
        this.b = Math.sin(a + c) * o,
        this.c = -Math.sin(a - l) * s,
        this.d = Math.cos(a - l) * s,
        this.tx = e - (n * this.a + i * this.c),
        this.ty = r - (n * this.b + i * this.d),
        this
    }
    prepend(e) {
        const r = this.tx;
        if (e.a !== 1 || e.b !== 0 || e.c !== 0 || e.d !== 1) {
            const n = this.a
              , i = this.c;
            this.a = n * e.a + this.b * e.c,
            this.b = n * e.b + this.b * e.d,
            this.c = i * e.a + this.d * e.c,
            this.d = i * e.b + this.d * e.d
        }
        return this.tx = r * e.a + this.ty * e.c + e.tx,
        this.ty = r * e.b + this.ty * e.d + e.ty,
        this
    }
    decompose(e) {
        const r = this.a
          , n = this.b
          , i = this.c
          , o = this.d
          , s = e.pivot
          , a = -Math.atan2(-i, o)
          , l = Math.atan2(n, r)
          , c = Math.abs(a + l);
        return c < 1e-5 || Math.abs(rae - c) < 1e-5 ? (e.rotation = l,
        e.skew.x = e.skew.y = 0) : (e.rotation = 0,
        e.skew.x = a,
        e.skew.y = l),
        e.scale.x = Math.sqrt(r * r + n * n),
        e.scale.y = Math.sqrt(i * i + o * o),
        e.position.x = this.tx + (s.x * r + s.y * i),
        e.position.y = this.ty + (s.x * n + s.y * o),
        e
    }
    invert() {
        const e = this.a
          , r = this.b
          , n = this.c
          , i = this.d
          , o = this.tx
          , s = e * i - r * n;
        return this.a = i / s,
        this.b = -r / s,
        this.c = -n / s,
        this.d = e / s,
        this.tx = (n * this.ty - i * o) / s,
        this.ty = -(e * this.ty - r * o) / s,
        this
    }
    isIdentity() {
        return this.a === 1 && this.b === 0 && this.c === 0 && this.d === 1 && this.tx === 0 && this.ty === 0
    }
    identity() {
        return this.a = 1,
        this.b = 0,
        this.c = 0,
        this.d = 1,
        this.tx = 0,
        this.ty = 0,
        this
    }
    clone() {
        const e = new Pe;
        return e.a = this.a,
        e.b = this.b,
        e.c = this.c,
        e.d = this.d,
        e.tx = this.tx,
        e.ty = this.ty,
        e
    }
    copyTo(e) {
        return e.a = this.a,
        e.b = this.b,
        e.c = this.c,
        e.d = this.d,
        e.tx = this.tx,
        e.ty = this.ty,
        e
    }
    copyFrom(e) {
        return this.a = e.a,
        this.b = e.b,
        this.c = e.c,
        this.d = e.d,
        this.tx = e.tx,
        this.ty = e.ty,
        this
    }
    equals(e) {
        return e.a === this.a && e.b === this.b && e.c === this.c && e.d === this.d && e.tx === this.tx && e.ty === this.ty
    }
    toString() {
        return `[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`
    }
    static get IDENTITY() {
        return sae.identity()
    }
    static get shared() {
        return oae.identity()
    }
}
const oae = new Pe
  , sae = new Pe
  , La = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1]
  , $a = [0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1]
  , Ua = [0, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1]
  , Ga = [1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1]
  , Xy = []
  , MF = []
  , lh = Math.sign;
function aae() {
    for (let t = 0; t < 16; t++) {
        const e = [];
        Xy.push(e);
        for (let r = 0; r < 16; r++) {
            const n = lh(La[t] * La[r] + Ua[t] * $a[r])
              , i = lh($a[t] * La[r] + Ga[t] * $a[r])
              , o = lh(La[t] * Ua[r] + Ua[t] * Ga[r])
              , s = lh($a[t] * Ua[r] + Ga[t] * Ga[r]);
            for (let a = 0; a < 16; a++)
                if (La[a] === n && $a[a] === i && Ua[a] === o && Ga[a] === s) {
                    e.push(a);
                    break
                }
        }
    }
    for (let t = 0; t < 16; t++) {
        const e = new Pe;
        e.set(La[t], $a[t], Ua[t], Ga[t], 0, 0),
        MF.push(e)
    }
}
aae();
const bt = {
    E: 0,
    SE: 1,
    S: 2,
    SW: 3,
    W: 4,
    NW: 5,
    N: 6,
    NE: 7,
    MIRROR_VERTICAL: 8,
    MAIN_DIAGONAL: 10,
    MIRROR_HORIZONTAL: 12,
    REVERSE_DIAGONAL: 14,
    uX: t => La[t],
    uY: t => $a[t],
    vX: t => Ua[t],
    vY: t => Ga[t],
    inv: t => t & 8 ? t & 15 : -t & 7,
    add: (t, e) => Xy[t][e],
    sub: (t, e) => Xy[t][bt.inv(e)],
    rotate180: t => t ^ 4,
    isVertical: t => (t & 3) === 2,
    byDirection: (t, e) => Math.abs(t) * 2 <= Math.abs(e) ? e >= 0 ? bt.S : bt.N : Math.abs(e) * 2 <= Math.abs(t) ? t > 0 ? bt.E : bt.W : e > 0 ? t > 0 ? bt.SE : bt.SW : t > 0 ? bt.NE : bt.NW,
    matrixAppendRotationInv: (t, e, r=0, n=0) => {
        const i = MF[bt.inv(e)];
        i.tx = r,
        i.ty = n,
        t.append(i)
    }
    ,
    transformRectCoords: (t, e, r, n) => {
        const {x: i, y: o, width: s, height: a} = t
          , {x: l, y: c, width: u, height: f} = e;
        return r === bt.E ? (n.set(i + l, o + c, s, a),
        n) : r === bt.S ? n.set(u - o - a + l, i + c, a, s) : r === bt.W ? n.set(u - i - s + l, f - o - a + c, s, a) : r === bt.N ? n.set(o + l, f - i - s + c, a, s) : n.set(i + l, o + c, s, a)
    }
}
  , ch = [new Gt, new Gt, new Gt, new Gt];
class mt {
    constructor(e=0, r=0, n=0, i=0) {
        this.type = "rectangle",
        this.x = Number(e),
        this.y = Number(r),
        this.width = Number(n),
        this.height = Number(i)
    }
    get left() {
        return this.x
    }
    get right() {
        return this.x + this.width
    }
    get top() {
        return this.y
    }
    get bottom() {
        return this.y + this.height
    }
    isEmpty() {
        return this.left === this.right || this.top === this.bottom
    }
    static get EMPTY() {
        return new mt(0,0,0,0)
    }
    clone() {
        return new mt(this.x,this.y,this.width,this.height)
    }
    copyFromBounds(e) {
        return this.x = e.minX,
        this.y = e.minY,
        this.width = e.maxX - e.minX,
        this.height = e.maxY - e.minY,
        this
    }
    copyFrom(e) {
        return this.x = e.x,
        this.y = e.y,
        this.width = e.width,
        this.height = e.height,
        this
    }
    copyTo(e) {
        return e.copyFrom(this),
        e
    }
    contains(e, r) {
        return this.width <= 0 || this.height <= 0 ? !1 : e >= this.x && e < this.x + this.width && r >= this.y && r < this.y + this.height
    }
    strokeContains(e, r, n, i=.5) {
        const {width: o, height: s} = this;
        if (o <= 0 || s <= 0)
            return !1;
        const a = this.x
          , l = this.y
          , c = n * (1 - i)
          , u = n - c
          , f = a - c
          , d = a + o + c
          , h = l - c
          , x = l + s + c
          , y = a + u
          , m = a + o - u
          , E = l + u
          , g = l + s - u;
        return e >= f && e <= d && r >= h && r <= x && !(e > y && e < m && r > E && r < g)
    }
    intersects(e, r) {
        if (!r) {
            const w = this.x < e.x ? e.x : this.x;
            if ((this.right > e.right ? e.right : this.right) <= w)
                return !1;
            const A = this.y < e.y ? e.y : this.y;
            return (this.bottom > e.bottom ? e.bottom : this.bottom) > A
        }
        const n = this.left
          , i = this.right
          , o = this.top
          , s = this.bottom;
        if (i <= n || s <= o)
            return !1;
        const a = ch[0].set(e.left, e.top)
          , l = ch[1].set(e.left, e.bottom)
          , c = ch[2].set(e.right, e.top)
          , u = ch[3].set(e.right, e.bottom);
        if (c.x <= a.x || l.y <= a.y)
            return !1;
        const f = Math.sign(r.a * r.d - r.b * r.c);
        if (f === 0 || (r.apply(a, a),
        r.apply(l, l),
        r.apply(c, c),
        r.apply(u, u),
        Math.max(a.x, l.x, c.x, u.x) <= n || Math.min(a.x, l.x, c.x, u.x) >= i || Math.max(a.y, l.y, c.y, u.y) <= o || Math.min(a.y, l.y, c.y, u.y) >= s))
            return !1;
        const d = f * (l.y - a.y)
          , h = f * (a.x - l.x)
          , x = d * n + h * o
          , y = d * i + h * o
          , m = d * n + h * s
          , E = d * i + h * s;
        if (Math.max(x, y, m, E) <= d * a.x + h * a.y || Math.min(x, y, m, E) >= d * u.x + h * u.y)
            return !1;
        const g = f * (a.y - c.y)
          , p = f * (c.x - a.x)
          , v = g * n + p * o
          , _ = g * i + p * o
          , b = g * n + p * s
          , C = g * i + p * s;
        return !(Math.max(v, _, b, C) <= g * a.x + p * a.y || Math.min(v, _, b, C) >= g * u.x + p * u.y)
    }
    pad(e=0, r=e) {
        return this.x -= e,
        this.y -= r,
        this.width += e * 2,
        this.height += r * 2,
        this
    }
    fit(e) {
        const r = Math.max(this.x, e.x)
          , n = Math.min(this.x + this.width, e.x + e.width)
          , i = Math.max(this.y, e.y)
          , o = Math.min(this.y + this.height, e.y + e.height);
        return this.x = r,
        this.width = Math.max(n - r, 0),
        this.y = i,
        this.height = Math.max(o - i, 0),
        this
    }
    ceil(e=1, r=.001) {
        const n = Math.ceil((this.x + this.width - r) * e) / e
          , i = Math.ceil((this.y + this.height - r) * e) / e;
        return this.x = Math.floor((this.x + r) * e) / e,
        this.y = Math.floor((this.y + r) * e) / e,
        this.width = n - this.x,
        this.height = i - this.y,
        this
    }
    scale(e, r=e) {
        return this.x *= e,
        this.y *= r,
        this.width *= e,
        this.height *= r,
        this
    }
    enlarge(e) {
        const r = Math.min(this.x, e.x)
          , n = Math.max(this.x + this.width, e.x + e.width)
          , i = Math.min(this.y, e.y)
          , o = Math.max(this.y + this.height, e.y + e.height);
        return this.x = r,
        this.width = n - r,
        this.y = i,
        this.height = o - i,
        this
    }
    getBounds(e) {
        return e || (e = new mt),
        e.copyFrom(this),
        e
    }
    containsRect(e) {
        if (this.width <= 0 || this.height <= 0)
            return !1;
        const r = e.x
          , n = e.y
          , i = e.x + e.width
          , o = e.y + e.height;
        return r >= this.x && r < this.x + this.width && n >= this.y && n < this.y + this.height && i >= this.x && i < this.x + this.width && o >= this.y && o < this.y + this.height
    }
    set(e, r, n, i) {
        return this.x = e,
        this.y = r,
        this.width = n,
        this.height = i,
        this
    }
    toString() {
        return `[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`
    }
}
const Pg = {
    default: -1
};
function Dt(t="default") {
    return Pg[t] === void 0 && (Pg[t] = -1),
    ++Pg[t]
}
const ow = new Set
  , tt = "8.0.0"
  , lae = "8.3.4"
  , Sc = {
    quiet: !1,
    noColor: !1
}
  , Re = (t, e, r=3) => {
    if (Sc.quiet || ow.has(e))
        return;
    let n = new Error().stack;
    const i = `${e}
Deprecated since v${t}`
      , o = typeof console.groupCollapsed == "function" && !Sc.noColor;
    typeof n > "u" ? console.warn("PixiJS Deprecation Warning: ", i) : (n = n.split(`
`).splice(r).join(`
`),
    o ? (console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s", "color:#614108;background:#fffbe6", "font-weight:normal;color:#614108;background:#fffbe6", i),
    console.warn(n),
    console.groupEnd()) : (console.warn("PixiJS Deprecation Warning: ", i),
    console.warn(n))),
    ow.add(e)
}
;
Object.defineProperties(Re, {
    quiet: {
        get: () => Sc.quiet,
        set: t => {
            Sc.quiet = t
        }
        ,
        enumerable: !0,
        configurable: !1
    },
    noColor: {
        get: () => Sc.noColor,
        set: t => {
            Sc.noColor = t
        }
        ,
        enumerable: !0,
        configurable: !1
    }
});
const NF = () => {}
;
function ou(t) {
    return t += t === 0 ? 1 : 0,
    --t,
    t |= t >>> 1,
    t |= t >>> 2,
    t |= t >>> 4,
    t |= t >>> 8,
    t |= t >>> 16,
    t + 1
}
function sw(t) {
    return !(t & t - 1) && !!t
}
function LF(t) {
    const e = {};
    for (const r in t)
        t[r] !== void 0 && (e[r] = t[r]);
    return e
}
const aw = Object.create(null);
function cae(t) {
    const e = aw[t];
    return e === void 0 && (aw[t] = Dt("resource")),
    e
}
const $F = class UF extends Qn {
    constructor(e={}) {
        super(),
        this._resourceType = "textureSampler",
        this._touched = 0,
        this._maxAnisotropy = 1,
        this.destroyed = !1,
        e = {
            ...UF.defaultOptions,
            ...e
        },
        this.addressMode = e.addressMode,
        this.addressModeU = e.addressModeU ?? this.addressModeU,
        this.addressModeV = e.addressModeV ?? this.addressModeV,
        this.addressModeW = e.addressModeW ?? this.addressModeW,
        this.scaleMode = e.scaleMode,
        this.magFilter = e.magFilter ?? this.magFilter,
        this.minFilter = e.minFilter ?? this.minFilter,
        this.mipmapFilter = e.mipmapFilter ?? this.mipmapFilter,
        this.lodMinClamp = e.lodMinClamp,
        this.lodMaxClamp = e.lodMaxClamp,
        this.compare = e.compare,
        this.maxAnisotropy = e.maxAnisotropy ?? 1
    }
    set addressMode(e) {
        this.addressModeU = e,
        this.addressModeV = e,
        this.addressModeW = e
    }
    get addressMode() {
        return this.addressModeU
    }
    set wrapMode(e) {
        Re(tt, "TextureStyle.wrapMode is now TextureStyle.addressMode"),
        this.addressMode = e
    }
    get wrapMode() {
        return this.addressMode
    }
    set scaleMode(e) {
        this.magFilter = e,
        this.minFilter = e,
        this.mipmapFilter = e
    }
    get scaleMode() {
        return this.magFilter
    }
    set maxAnisotropy(e) {
        this._maxAnisotropy = Math.min(e, 16),
        this._maxAnisotropy > 1 && (this.scaleMode = "linear")
    }
    get maxAnisotropy() {
        return this._maxAnisotropy
    }
    get _resourceId() {
        return this._sharedResourceId || this._generateResourceId()
    }
    update() {
        this.emit("change", this),
        this._sharedResourceId = null
    }
    _generateResourceId() {
        const e = `${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;
        return this._sharedResourceId = cae(e),
        this._resourceId
    }
    destroy() {
        this.destroyed = !0,
        this.emit("destroy", this),
        this.emit("change", this),
        this.removeAllListeners()
    }
}
;
$F.defaultOptions = {
    addressMode: "clamp-to-edge",
    scaleMode: "linear"
};
let wo = $F;
const GF = class HF extends Qn {
    constructor(e={}) {
        super(),
        this.options = e,
        this.uid = Dt("textureSource"),
        this._resourceType = "textureSource",
        this._resourceId = Dt("resource"),
        this.uploadMethodId = "unknown",
        this._resolution = 1,
        this.pixelWidth = 1,
        this.pixelHeight = 1,
        this.width = 1,
        this.height = 1,
        this.sampleCount = 1,
        this.mipLevelCount = 1,
        this.autoGenerateMipmaps = !1,
        this.format = "rgba8unorm",
        this.dimension = "2d",
        this.antialias = !1,
        this._touched = 0,
        this._batchTick = -1,
        this._textureBindLocation = -1,
        e = {
            ...HF.defaultOptions,
            ...e
        },
        this.label = e.label ?? "",
        this.resource = e.resource,
        this.autoGarbageCollect = e.autoGarbageCollect,
        this._resolution = e.resolution,
        e.width ? this.pixelWidth = e.width * this._resolution : this.pixelWidth = this.resource ? this.resourceWidth ?? 1 : 1,
        e.height ? this.pixelHeight = e.height * this._resolution : this.pixelHeight = this.resource ? this.resourceHeight ?? 1 : 1,
        this.width = this.pixelWidth / this._resolution,
        this.height = this.pixelHeight / this._resolution,
        this.format = e.format,
        this.dimension = e.dimensions,
        this.mipLevelCount = e.mipLevelCount,
        this.autoGenerateMipmaps = e.autoGenerateMipmaps,
        this.sampleCount = e.sampleCount,
        this.antialias = e.antialias,
        this.alphaMode = e.alphaMode,
        this.style = new wo(LF(e)),
        this.destroyed = !1,
        this._refreshPOT()
    }
    get source() {
        return this
    }
    get style() {
        return this._style
    }
    set style(e) {
        var r, n;
        this.style !== e && ((r = this._style) == null || r.off("change", this._onStyleChange, this),
        this._style = e,
        (n = this._style) == null || n.on("change", this._onStyleChange, this),
        this._onStyleChange())
    }
    set maxAnisotropy(e) {
        this._style.maxAnisotropy = e
    }
    get maxAnisotropy() {
        return this._style.maxAnisotropy
    }
    get addressMode() {
        return this._style.addressMode
    }
    set addressMode(e) {
        this._style.addressMode = e
    }
    get repeatMode() {
        return this._style.addressMode
    }
    set repeatMode(e) {
        this._style.addressMode = e
    }
    get magFilter() {
        return this._style.magFilter
    }
    set magFilter(e) {
        this._style.magFilter = e
    }
    get minFilter() {
        return this._style.minFilter
    }
    set minFilter(e) {
        this._style.minFilter = e
    }
    get mipmapFilter() {
        return this._style.mipmapFilter
    }
    set mipmapFilter(e) {
        this._style.mipmapFilter = e
    }
    get lodMinClamp() {
        return this._style.lodMinClamp
    }
    set lodMinClamp(e) {
        this._style.lodMinClamp = e
    }
    get lodMaxClamp() {
        return this._style.lodMaxClamp
    }
    set lodMaxClamp(e) {
        this._style.lodMaxClamp = e
    }
    _onStyleChange() {
        this.emit("styleChange", this)
    }
    update() {
        if (this.resource) {
            const e = this._resolution;
            if (this.resize(this.resourceWidth / e, this.resourceHeight / e))
                return
        }
        this.emit("update", this)
    }
    destroy() {
        this.destroyed = !0,
        this.emit("destroy", this),
        this.emit("change", this),
        this._style && (this._style.destroy(),
        this._style = null),
        this.uploadMethodId = null,
        this.resource = null,
        this.removeAllListeners()
    }
    unload() {
        this._resourceId = Dt("resource"),
        this.emit("change", this),
        this.emit("unload", this)
    }
    get resourceWidth() {
        const {resource: e} = this;
        return e.naturalWidth || e.videoWidth || e.displayWidth || e.width
    }
    get resourceHeight() {
        const {resource: e} = this;
        return e.naturalHeight || e.videoHeight || e.displayHeight || e.height
    }
    get resolution() {
        return this._resolution
    }
    set resolution(e) {
        this._resolution !== e && (this._resolution = e,
        this.width = this.pixelWidth / e,
        this.height = this.pixelHeight / e)
    }
    resize(e, r, n) {
        n || (n = this._resolution),
        e || (e = this.width),
        r || (r = this.height);
        const i = Math.round(e * n)
          , o = Math.round(r * n);
        return this.width = i / n,
        this.height = o / n,
        this._resolution = n,
        this.pixelWidth === i && this.pixelHeight === o ? !1 : (this._refreshPOT(),
        this.pixelWidth = i,
        this.pixelHeight = o,
        this.emit("resize", this),
        this._resourceId = Dt("resource"),
        this.emit("change", this),
        !0)
    }
    updateMipmaps() {
        this.autoGenerateMipmaps && this.mipLevelCount > 1 && this.emit("updateMipmaps", this)
    }
    set wrapMode(e) {
        this._style.wrapMode = e
    }
    get wrapMode() {
        return this._style.wrapMode
    }
    set scaleMode(e) {
        this._style.scaleMode = e
    }
    get scaleMode() {
        return this._style.scaleMode
    }
    _refreshPOT() {
        this.isPowerOfTwo = sw(this.pixelWidth) && sw(this.pixelHeight)
    }
    static test(e) {
        throw new Error("Unimplemented")
    }
}
;
GF.defaultOptions = {
    resolution: 1,
    format: "bgra8unorm",
    alphaMode: "premultiply-alpha-on-upload",
    dimensions: "2d",
    mipLevelCount: 1,
    autoGenerateMipmaps: !1,
    sampleCount: 1,
    antialias: !1,
    autoGarbageCollect: !1
};
let Br = GF;
class ub extends Br {
    constructor(e) {
        const r = e.resource || new Float32Array(e.width * e.height * 4);
        let n = e.format;
        n || (r instanceof Float32Array ? n = "rgba32float" : r instanceof Int32Array || r instanceof Uint32Array ? n = "rgba32uint" : r instanceof Int16Array || r instanceof Uint16Array ? n = "rgba16uint" : (r instanceof Int8Array,
        n = "bgra8unorm")),
        super({
            ...e,
            resource: r,
            format: n
        }),
        this.uploadMethodId = "buffer"
    }
    static test(e) {
        return e instanceof Int8Array || e instanceof Uint8Array || e instanceof Uint8ClampedArray || e instanceof Int16Array || e instanceof Uint16Array || e instanceof Int32Array || e instanceof Uint32Array || e instanceof Float32Array
    }
}
ub.extension = X.TextureSource;
const lw = new Pe;
class VF {
    constructor(e, r) {
        this.mapCoord = new Pe,
        this.uClampFrame = new Float32Array(4),
        this.uClampOffset = new Float32Array(2),
        this._textureID = -1,
        this._updateID = 0,
        this.clampOffset = 0,
        typeof r > "u" ? this.clampMargin = e.width < 10 ? 0 : .5 : this.clampMargin = r,
        this.isSimple = !1,
        this.texture = e
    }
    get texture() {
        return this._texture
    }
    set texture(e) {
        var r;
        this.texture !== e && ((r = this._texture) == null || r.removeListener("update", this.update, this),
        this._texture = e,
        this._texture.addListener("update", this.update, this),
        this.update())
    }
    multiplyUvs(e, r) {
        r === void 0 && (r = e);
        const n = this.mapCoord;
        for (let i = 0; i < e.length; i += 2) {
            const o = e[i]
              , s = e[i + 1];
            r[i] = o * n.a + s * n.c + n.tx,
            r[i + 1] = o * n.b + s * n.d + n.ty
        }
        return r
    }
    update() {
        const e = this._texture;
        this._updateID++;
        const r = e.uvs;
        this.mapCoord.set(r.x1 - r.x0, r.y1 - r.y0, r.x3 - r.x0, r.y3 - r.y0, r.x0, r.y0);
        const n = e.orig
          , i = e.trim;
        i && (lw.set(n.width / i.width, 0, 0, n.height / i.height, -i.x / i.width, -i.y / i.height),
        this.mapCoord.append(lw));
        const o = e.source
          , s = this.uClampFrame
          , a = this.clampMargin / o._resolution
          , l = this.clampOffset / o._resolution;
        return s[0] = (e.frame.x + a + l) / o.width,
        s[1] = (e.frame.y + a + l) / o.height,
        s[2] = (e.frame.x + e.frame.width - a + l) / o.width,
        s[3] = (e.frame.y + e.frame.height - a + l) / o.height,
        this.uClampOffset[0] = this.clampOffset / o.pixelWidth,
        this.uClampOffset[1] = this.clampOffset / o.pixelHeight,
        this.isSimple = e.frame.width === o.width && e.frame.height === o.height && e.rotate === 0,
        !0
    }
}
class Be extends Qn {
    constructor({source: e, label: r, frame: n, orig: i, trim: o, defaultAnchor: s, defaultBorders: a, rotate: l, dynamic: c}={}) {
        if (super(),
        this.uid = Dt("texture"),
        this.uvs = {
            x0: 0,
            y0: 0,
            x1: 0,
            y1: 0,
            x2: 0,
            y2: 0,
            x3: 0,
            y3: 0
        },
        this.frame = new mt,
        this.noFrame = !1,
        this.dynamic = !1,
        this.isTexture = !0,
        this.label = r,
        this.source = (e == null ? void 0 : e.source) ?? new Br,
        this.noFrame = !n,
        n)
            this.frame.copyFrom(n);
        else {
            const {width: u, height: f} = this._source;
            this.frame.width = u,
            this.frame.height = f
        }
        this.orig = i || this.frame,
        this.trim = o,
        this.rotate = l ?? 0,
        this.defaultAnchor = s,
        this.defaultBorders = a,
        this.destroyed = !1,
        this.dynamic = c || !1,
        this.updateUvs()
    }
    set source(e) {
        this._source && this._source.off("resize", this.update, this),
        this._source = e,
        e.on("resize", this.update, this),
        this.emit("update", this)
    }
    get source() {
        return this._source
    }
    get textureMatrix() {
        return this._textureMatrix || (this._textureMatrix = new VF(this)),
        this._textureMatrix
    }
    get width() {
        return this.orig.width
    }
    get height() {
        return this.orig.height
    }
    updateUvs() {
        const {uvs: e, frame: r} = this
          , {width: n, height: i} = this._source
          , o = r.x / n
          , s = r.y / i
          , a = r.width / n
          , l = r.height / i;
        let c = this.rotate;
        if (c) {
            const u = a / 2
              , f = l / 2
              , d = o + u
              , h = s + f;
            c = bt.add(c, bt.NW),
            e.x0 = d + u * bt.uX(c),
            e.y0 = h + f * bt.uY(c),
            c = bt.add(c, 2),
            e.x1 = d + u * bt.uX(c),
            e.y1 = h + f * bt.uY(c),
            c = bt.add(c, 2),
            e.x2 = d + u * bt.uX(c),
            e.y2 = h + f * bt.uY(c),
            c = bt.add(c, 2),
            e.x3 = d + u * bt.uX(c),
            e.y3 = h + f * bt.uY(c)
        } else
            e.x0 = o,
            e.y0 = s,
            e.x1 = o + a,
            e.y1 = s,
            e.x2 = o + a,
            e.y2 = s + l,
            e.x3 = o,
            e.y3 = s + l
    }
    destroy(e=!1) {
        this._source && (this._source.off("resize", this.update, this),
        e && (this._source.destroy(),
        this._source = null)),
        this._textureMatrix = null,
        this.destroyed = !0,
        this.emit("destroy", this),
        this.removeAllListeners()
    }
    update() {
        this.noFrame && (this.frame.width = this._source.width,
        this.frame.height = this._source.height),
        this.updateUvs(),
        this.emit("update", this)
    }
    get baseTexture() {
        return Re(tt, "Texture.baseTexture is now Texture.source"),
        this._source
    }
}
Be.EMPTY = new Be({
    label: "EMPTY",
    source: new Br({
        label: "EMPTY"
    })
});
Be.EMPTY.destroy = NF;
Be.WHITE = new Be({
    source: new ub({
        resource: new Uint8Array([255, 255, 255, 255]),
        width: 1,
        height: 1,
        alphaMode: "premultiply-alpha-on-upload",
        label: "WHITE"
    }),
    label: "WHITE"
});
Be.WHITE.destroy = NF;
function zF(t, e, r) {
    const {width: n, height: i} = r.orig
      , o = r.trim;
    if (o) {
        const s = o.width
          , a = o.height;
        t.minX = o.x - e._x * n,
        t.maxX = t.minX + s,
        t.minY = o.y - e._y * i,
        t.maxY = t.minY + a
    } else
        t.minX = -e._x * n,
        t.maxX = t.minX + n,
        t.minY = -e._y * i,
        t.maxY = t.minY + i
}
const cw = new Pe;
class jr {
    constructor(e=1 / 0, r=1 / 0, n=-1 / 0, i=-1 / 0) {
        this.minX = 1 / 0,
        this.minY = 1 / 0,
        this.maxX = -1 / 0,
        this.maxY = -1 / 0,
        this.matrix = cw,
        this.minX = e,
        this.minY = r,
        this.maxX = n,
        this.maxY = i
    }
    isEmpty() {
        return this.minX > this.maxX || this.minY > this.maxY
    }
    get rectangle() {
        this._rectangle || (this._rectangle = new mt);
        const e = this._rectangle;
        return this.minX > this.maxX || this.minY > this.maxY ? (e.x = 0,
        e.y = 0,
        e.width = 0,
        e.height = 0) : e.copyFromBounds(this),
        e
    }
    clear() {
        return this.minX = 1 / 0,
        this.minY = 1 / 0,
        this.maxX = -1 / 0,
        this.maxY = -1 / 0,
        this.matrix = cw,
        this
    }
    set(e, r, n, i) {
        this.minX = e,
        this.minY = r,
        this.maxX = n,
        this.maxY = i
    }
    addFrame(e, r, n, i, o) {
        o || (o = this.matrix);
        const s = o.a
          , a = o.b
          , l = o.c
          , c = o.d
          , u = o.tx
          , f = o.ty;
        let d = this.minX
          , h = this.minY
          , x = this.maxX
          , y = this.maxY
          , m = s * e + l * r + u
          , E = a * e + c * r + f;
        m < d && (d = m),
        E < h && (h = E),
        m > x && (x = m),
        E > y && (y = E),
        m = s * n + l * r + u,
        E = a * n + c * r + f,
        m < d && (d = m),
        E < h && (h = E),
        m > x && (x = m),
        E > y && (y = E),
        m = s * e + l * i + u,
        E = a * e + c * i + f,
        m < d && (d = m),
        E < h && (h = E),
        m > x && (x = m),
        E > y && (y = E),
        m = s * n + l * i + u,
        E = a * n + c * i + f,
        m < d && (d = m),
        E < h && (h = E),
        m > x && (x = m),
        E > y && (y = E),
        this.minX = d,
        this.minY = h,
        this.maxX = x,
        this.maxY = y
    }
    addRect(e, r) {
        this.addFrame(e.x, e.y, e.x + e.width, e.y + e.height, r)
    }
    addBounds(e, r) {
        this.addFrame(e.minX, e.minY, e.maxX, e.maxY, r)
    }
    addBoundsMask(e) {
        this.minX = this.minX > e.minX ? this.minX : e.minX,
        this.minY = this.minY > e.minY ? this.minY : e.minY,
        this.maxX = this.maxX < e.maxX ? this.maxX : e.maxX,
        this.maxY = this.maxY < e.maxY ? this.maxY : e.maxY
    }
    applyMatrix(e) {
        const r = this.minX
          , n = this.minY
          , i = this.maxX
          , o = this.maxY
          , {a: s, b: a, c: l, d: c, tx: u, ty: f} = e;
        let d = s * r + l * n + u
          , h = a * r + c * n + f;
        this.minX = d,
        this.minY = h,
        this.maxX = d,
        this.maxY = h,
        d = s * i + l * n + u,
        h = a * i + c * n + f,
        this.minX = d < this.minX ? d : this.minX,
        this.minY = h < this.minY ? h : this.minY,
        this.maxX = d > this.maxX ? d : this.maxX,
        this.maxY = h > this.maxY ? h : this.maxY,
        d = s * r + l * o + u,
        h = a * r + c * o + f,
        this.minX = d < this.minX ? d : this.minX,
        this.minY = h < this.minY ? h : this.minY,
        this.maxX = d > this.maxX ? d : this.maxX,
        this.maxY = h > this.maxY ? h : this.maxY,
        d = s * i + l * o + u,
        h = a * i + c * o + f,
        this.minX = d < this.minX ? d : this.minX,
        this.minY = h < this.minY ? h : this.minY,
        this.maxX = d > this.maxX ? d : this.maxX,
        this.maxY = h > this.maxY ? h : this.maxY
    }
    fit(e) {
        return this.minX < e.left && (this.minX = e.left),
        this.maxX > e.right && (this.maxX = e.right),
        this.minY < e.top && (this.minY = e.top),
        this.maxY > e.bottom && (this.maxY = e.bottom),
        this
    }
    fitBounds(e, r, n, i) {
        return this.minX < e && (this.minX = e),
        this.maxX > r && (this.maxX = r),
        this.minY < n && (this.minY = n),
        this.maxY > i && (this.maxY = i),
        this
    }
    pad(e, r=e) {
        return this.minX -= e,
        this.maxX += e,
        this.minY -= r,
        this.maxY += r,
        this
    }
    ceil() {
        return this.minX = Math.floor(this.minX),
        this.minY = Math.floor(this.minY),
        this.maxX = Math.ceil(this.maxX),
        this.maxY = Math.ceil(this.maxY),
        this
    }
    clone() {
        return new jr(this.minX,this.minY,this.maxX,this.maxY)
    }
    scale(e, r=e) {
        return this.minX *= e,
        this.minY *= r,
        this.maxX *= e,
        this.maxY *= r,
        this
    }
    get x() {
        return this.minX
    }
    set x(e) {
        const r = this.maxX - this.minX;
        this.minX = e,
        this.maxX = e + r
    }
    get y() {
        return this.minY
    }
    set y(e) {
        const r = this.maxY - this.minY;
        this.minY = e,
        this.maxY = e + r
    }
    get width() {
        return this.maxX - this.minX
    }
    set width(e) {
        this.maxX = this.minX + e
    }
    get height() {
        return this.maxY - this.minY
    }
    set height(e) {
        this.maxY = this.minY + e
    }
    get left() {
        return this.minX
    }
    get right() {
        return this.maxX
    }
    get top() {
        return this.minY
    }
    get bottom() {
        return this.maxY
    }
    get isPositive() {
        return this.maxX - this.minX > 0 && this.maxY - this.minY > 0
    }
    get isValid() {
        return this.minX + this.minY !== 1 / 0
    }
    addVertexData(e, r, n, i) {
        let o = this.minX
          , s = this.minY
          , a = this.maxX
          , l = this.maxY;
        i || (i = this.matrix);
        const c = i.a
          , u = i.b
          , f = i.c
          , d = i.d
          , h = i.tx
          , x = i.ty;
        for (let y = r; y < n; y += 2) {
            const m = e[y]
              , E = e[y + 1]
              , g = c * m + f * E + h
              , p = u * m + d * E + x;
            o = g < o ? g : o,
            s = p < s ? p : s,
            a = g > a ? g : a,
            l = p > l ? p : l
        }
        this.minX = o,
        this.minY = s,
        this.maxX = a,
        this.maxY = l
    }
    containsPoint(e, r) {
        return this.minX <= e && this.minY <= r && this.maxX >= e && this.maxY >= r
    }
    toString() {
        return `[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`
    }
    copyFrom(e) {
        return this.minX = e.minX,
        this.minY = e.minY,
        this.maxX = e.maxX,
        this.maxY = e.maxY,
        this
    }
}
var uae = {
    grad: .9,
    turn: 360,
    rad: 360 / (2 * Math.PI)
}
  , Lo = function(t) {
    return typeof t == "string" ? t.length > 0 : typeof t == "number"
}
  , Pr = function(t, e, r) {
    return e === void 0 && (e = 0),
    r === void 0 && (r = Math.pow(10, e)),
    Math.round(r * t) / r + 0
}
  , fi = function(t, e, r) {
    return e === void 0 && (e = 0),
    r === void 0 && (r = 1),
    t > r ? r : t > e ? t : e
}
  , jF = function(t) {
    return (t = isFinite(t) ? t % 360 : 0) > 0 ? t : t + 360
}
  , uw = function(t) {
    return {
        r: fi(t.r, 0, 255),
        g: fi(t.g, 0, 255),
        b: fi(t.b, 0, 255),
        a: fi(t.a)
    }
}
  , Ig = function(t) {
    return {
        r: Pr(t.r),
        g: Pr(t.g),
        b: Pr(t.b),
        a: Pr(t.a, 3)
    }
}
  , fae = /^#([0-9a-f]{3,8})$/i
  , uh = function(t) {
    var e = t.toString(16);
    return e.length < 2 ? "0" + e : e
}
  , WF = function(t) {
    var e = t.r
      , r = t.g
      , n = t.b
      , i = t.a
      , o = Math.max(e, r, n)
      , s = o - Math.min(e, r, n)
      , a = s ? o === e ? (r - n) / s : o === r ? 2 + (n - e) / s : 4 + (e - r) / s : 0;
    return {
        h: 60 * (a < 0 ? a + 6 : a),
        s: o ? s / o * 100 : 0,
        v: o / 255 * 100,
        a: i
    }
}
  , YF = function(t) {
    var e = t.h
      , r = t.s
      , n = t.v
      , i = t.a;
    e = e / 360 * 6,
    r /= 100,
    n /= 100;
    var o = Math.floor(e)
      , s = n * (1 - r)
      , a = n * (1 - (e - o) * r)
      , l = n * (1 - (1 - e + o) * r)
      , c = o % 6;
    return {
        r: 255 * [n, a, s, s, l, n][c],
        g: 255 * [l, n, n, a, s, s][c],
        b: 255 * [s, s, l, n, n, a][c],
        a: i
    }
}
  , fw = function(t) {
    return {
        h: jF(t.h),
        s: fi(t.s, 0, 100),
        l: fi(t.l, 0, 100),
        a: fi(t.a)
    }
}
  , dw = function(t) {
    return {
        h: Pr(t.h),
        s: Pr(t.s),
        l: Pr(t.l),
        a: Pr(t.a, 3)
    }
}
  , hw = function(t) {
    return YF((r = (e = t).s,
    {
        h: e.h,
        s: (r *= ((n = e.l) < 50 ? n : 100 - n) / 100) > 0 ? 2 * r / (n + r) * 100 : 0,
        v: n + r,
        a: e.a
    }));
    var e, r, n
}
  , $0 = function(t) {
    return {
        h: (e = WF(t)).h,
        s: (i = (200 - (r = e.s)) * (n = e.v) / 100) > 0 && i < 200 ? r * n / 100 / (i <= 100 ? i : 200 - i) * 100 : 0,
        l: i / 2,
        a: e.a
    };
    var e, r, n, i
}
  , dae = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i
  , hae = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i
  , xae = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i
  , pae = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i
  , Ky = {
    string: [[function(t) {
        var e = fae.exec(t);
        return e ? (t = e[1]).length <= 4 ? {
            r: parseInt(t[0] + t[0], 16),
            g: parseInt(t[1] + t[1], 16),
            b: parseInt(t[2] + t[2], 16),
            a: t.length === 4 ? Pr(parseInt(t[3] + t[3], 16) / 255, 2) : 1
        } : t.length === 6 || t.length === 8 ? {
            r: parseInt(t.substr(0, 2), 16),
            g: parseInt(t.substr(2, 2), 16),
            b: parseInt(t.substr(4, 2), 16),
            a: t.length === 8 ? Pr(parseInt(t.substr(6, 2), 16) / 255, 2) : 1
        } : null : null
    }
    , "hex"], [function(t) {
        var e = xae.exec(t) || pae.exec(t);
        return e ? e[2] !== e[4] || e[4] !== e[6] ? null : uw({
            r: Number(e[1]) / (e[2] ? 100 / 255 : 1),
            g: Number(e[3]) / (e[4] ? 100 / 255 : 1),
            b: Number(e[5]) / (e[6] ? 100 / 255 : 1),
            a: e[7] === void 0 ? 1 : Number(e[7]) / (e[8] ? 100 : 1)
        }) : null
    }
    , "rgb"], [function(t) {
        var e = dae.exec(t) || hae.exec(t);
        if (!e)
            return null;
        var r, n, i = fw({
            h: (r = e[1],
            n = e[2],
            n === void 0 && (n = "deg"),
            Number(r) * (uae[n] || 1)),
            s: Number(e[3]),
            l: Number(e[4]),
            a: e[5] === void 0 ? 1 : Number(e[5]) / (e[6] ? 100 : 1)
        });
        return hw(i)
    }
    , "hsl"]],
    object: [[function(t) {
        var e = t.r
          , r = t.g
          , n = t.b
          , i = t.a
          , o = i === void 0 ? 1 : i;
        return Lo(e) && Lo(r) && Lo(n) ? uw({
            r: Number(e),
            g: Number(r),
            b: Number(n),
            a: Number(o)
        }) : null
    }
    , "rgb"], [function(t) {
        var e = t.h
          , r = t.s
          , n = t.l
          , i = t.a
          , o = i === void 0 ? 1 : i;
        if (!Lo(e) || !Lo(r) || !Lo(n))
            return null;
        var s = fw({
            h: Number(e),
            s: Number(r),
            l: Number(n),
            a: Number(o)
        });
        return hw(s)
    }
    , "hsl"], [function(t) {
        var e = t.h
          , r = t.s
          , n = t.v
          , i = t.a
          , o = i === void 0 ? 1 : i;
        if (!Lo(e) || !Lo(r) || !Lo(n))
            return null;
        var s = function(a) {
            return {
                h: jF(a.h),
                s: fi(a.s, 0, 100),
                v: fi(a.v, 0, 100),
                a: fi(a.a)
            }
        }({
            h: Number(e),
            s: Number(r),
            v: Number(n),
            a: Number(o)
        });
        return YF(s)
    }
    , "hsv"]]
}
  , xw = function(t, e) {
    for (var r = 0; r < e.length; r++) {
        var n = e[r][0](t);
        if (n)
            return [n, e[r][1]]
    }
    return [null, void 0]
}
  , gae = function(t) {
    return typeof t == "string" ? xw(t.trim(), Ky.string) : typeof t == "object" && t !== null ? xw(t, Ky.object) : [null, void 0]
}
  , Og = function(t, e) {
    var r = $0(t);
    return {
        h: r.h,
        s: fi(r.s + 100 * e, 0, 100),
        l: r.l,
        a: r.a
    }
}
  , kg = function(t) {
    return (299 * t.r + 587 * t.g + 114 * t.b) / 1e3 / 255
}
  , pw = function(t, e) {
    var r = $0(t);
    return {
        h: r.h,
        s: r.s,
        l: fi(r.l + 100 * e, 0, 100),
        a: r.a
    }
}
  , qy = function() {
    function t(e) {
        this.parsed = gae(e)[0],
        this.rgba = this.parsed || {
            r: 0,
            g: 0,
            b: 0,
            a: 1
        }
    }
    return t.prototype.isValid = function() {
        return this.parsed !== null
    }
    ,
    t.prototype.brightness = function() {
        return Pr(kg(this.rgba), 2)
    }
    ,
    t.prototype.isDark = function() {
        return kg(this.rgba) < .5
    }
    ,
    t.prototype.isLight = function() {
        return kg(this.rgba) >= .5
    }
    ,
    t.prototype.toHex = function() {
        return e = Ig(this.rgba),
        r = e.r,
        n = e.g,
        i = e.b,
        s = (o = e.a) < 1 ? uh(Pr(255 * o)) : "",
        "#" + uh(r) + uh(n) + uh(i) + s;
        var e, r, n, i, o, s
    }
    ,
    t.prototype.toRgb = function() {
        return Ig(this.rgba)
    }
    ,
    t.prototype.toRgbString = function() {
        return e = Ig(this.rgba),
        r = e.r,
        n = e.g,
        i = e.b,
        (o = e.a) < 1 ? "rgba(" + r + ", " + n + ", " + i + ", " + o + ")" : "rgb(" + r + ", " + n + ", " + i + ")";
        var e, r, n, i, o
    }
    ,
    t.prototype.toHsl = function() {
        return dw($0(this.rgba))
    }
    ,
    t.prototype.toHslString = function() {
        return e = dw($0(this.rgba)),
        r = e.h,
        n = e.s,
        i = e.l,
        (o = e.a) < 1 ? "hsla(" + r + ", " + n + "%, " + i + "%, " + o + ")" : "hsl(" + r + ", " + n + "%, " + i + "%)";
        var e, r, n, i, o
    }
    ,
    t.prototype.toHsv = function() {
        return e = WF(this.rgba),
        {
            h: Pr(e.h),
            s: Pr(e.s),
            v: Pr(e.v),
            a: Pr(e.a, 3)
        };
        var e
    }
    ,
    t.prototype.invert = function() {
        return to({
            r: 255 - (e = this.rgba).r,
            g: 255 - e.g,
            b: 255 - e.b,
            a: e.a
        });
        var e
    }
    ,
    t.prototype.saturate = function(e) {
        return e === void 0 && (e = .1),
        to(Og(this.rgba, e))
    }
    ,
    t.prototype.desaturate = function(e) {
        return e === void 0 && (e = .1),
        to(Og(this.rgba, -e))
    }
    ,
    t.prototype.grayscale = function() {
        return to(Og(this.rgba, -1))
    }
    ,
    t.prototype.lighten = function(e) {
        return e === void 0 && (e = .1),
        to(pw(this.rgba, e))
    }
    ,
    t.prototype.darken = function(e) {
        return e === void 0 && (e = .1),
        to(pw(this.rgba, -e))
    }
    ,
    t.prototype.rotate = function(e) {
        return e === void 0 && (e = 15),
        this.hue(this.hue() + e)
    }
    ,
    t.prototype.alpha = function(e) {
        return typeof e == "number" ? to({
            r: (r = this.rgba).r,
            g: r.g,
            b: r.b,
            a: e
        }) : Pr(this.rgba.a, 3);
        var r
    }
    ,
    t.prototype.hue = function(e) {
        var r = $0(this.rgba);
        return typeof e == "number" ? to({
            h: e,
            s: r.s,
            l: r.l,
            a: r.a
        }) : Pr(r.h)
    }
    ,
    t.prototype.isEqual = function(e) {
        return this.toHex() === to(e).toHex()
    }
    ,
    t
}()
  , to = function(t) {
    return t instanceof qy ? t : new qy(t)
}
  , gw = []
  , mae = function(t) {
    t.forEach(function(e) {
        gw.indexOf(e) < 0 && (e(qy, Ky),
        gw.push(e))
    })
};
function vae(t, e) {
    var r = {
        white: "#ffffff",
        bisque: "#ffe4c4",
        blue: "#0000ff",
        cadetblue: "#5f9ea0",
        chartreuse: "#7fff00",
        chocolate: "#d2691e",
        coral: "#ff7f50",
        antiquewhite: "#faebd7",
        aqua: "#00ffff",
        azure: "#f0ffff",
        whitesmoke: "#f5f5f5",
        papayawhip: "#ffefd5",
        plum: "#dda0dd",
        blanchedalmond: "#ffebcd",
        black: "#000000",
        gold: "#ffd700",
        goldenrod: "#daa520",
        gainsboro: "#dcdcdc",
        cornsilk: "#fff8dc",
        cornflowerblue: "#6495ed",
        burlywood: "#deb887",
        aquamarine: "#7fffd4",
        beige: "#f5f5dc",
        crimson: "#dc143c",
        cyan: "#00ffff",
        darkblue: "#00008b",
        darkcyan: "#008b8b",
        darkgoldenrod: "#b8860b",
        darkkhaki: "#bdb76b",
        darkgray: "#a9a9a9",
        darkgreen: "#006400",
        darkgrey: "#a9a9a9",
        peachpuff: "#ffdab9",
        darkmagenta: "#8b008b",
        darkred: "#8b0000",
        darkorchid: "#9932cc",
        darkorange: "#ff8c00",
        darkslateblue: "#483d8b",
        gray: "#808080",
        darkslategray: "#2f4f4f",
        darkslategrey: "#2f4f4f",
        deeppink: "#ff1493",
        deepskyblue: "#00bfff",
        wheat: "#f5deb3",
        firebrick: "#b22222",
        floralwhite: "#fffaf0",
        ghostwhite: "#f8f8ff",
        darkviolet: "#9400d3",
        magenta: "#ff00ff",
        green: "#008000",
        dodgerblue: "#1e90ff",
        grey: "#808080",
        honeydew: "#f0fff0",
        hotpink: "#ff69b4",
        blueviolet: "#8a2be2",
        forestgreen: "#228b22",
        lawngreen: "#7cfc00",
        indianred: "#cd5c5c",
        indigo: "#4b0082",
        fuchsia: "#ff00ff",
        brown: "#a52a2a",
        maroon: "#800000",
        mediumblue: "#0000cd",
        lightcoral: "#f08080",
        darkturquoise: "#00ced1",
        lightcyan: "#e0ffff",
        ivory: "#fffff0",
        lightyellow: "#ffffe0",
        lightsalmon: "#ffa07a",
        lightseagreen: "#20b2aa",
        linen: "#faf0e6",
        mediumaquamarine: "#66cdaa",
        lemonchiffon: "#fffacd",
        lime: "#00ff00",
        khaki: "#f0e68c",
        mediumseagreen: "#3cb371",
        limegreen: "#32cd32",
        mediumspringgreen: "#00fa9a",
        lightskyblue: "#87cefa",
        lightblue: "#add8e6",
        midnightblue: "#191970",
        lightpink: "#ffb6c1",
        mistyrose: "#ffe4e1",
        moccasin: "#ffe4b5",
        mintcream: "#f5fffa",
        lightslategray: "#778899",
        lightslategrey: "#778899",
        navajowhite: "#ffdead",
        navy: "#000080",
        mediumvioletred: "#c71585",
        powderblue: "#b0e0e6",
        palegoldenrod: "#eee8aa",
        oldlace: "#fdf5e6",
        paleturquoise: "#afeeee",
        mediumturquoise: "#48d1cc",
        mediumorchid: "#ba55d3",
        rebeccapurple: "#663399",
        lightsteelblue: "#b0c4de",
        mediumslateblue: "#7b68ee",
        thistle: "#d8bfd8",
        tan: "#d2b48c",
        orchid: "#da70d6",
        mediumpurple: "#9370db",
        purple: "#800080",
        pink: "#ffc0cb",
        skyblue: "#87ceeb",
        springgreen: "#00ff7f",
        palegreen: "#98fb98",
        red: "#ff0000",
        yellow: "#ffff00",
        slateblue: "#6a5acd",
        lavenderblush: "#fff0f5",
        peru: "#cd853f",
        palevioletred: "#db7093",
        violet: "#ee82ee",
        teal: "#008080",
        slategray: "#708090",
        slategrey: "#708090",
        aliceblue: "#f0f8ff",
        darkseagreen: "#8fbc8f",
        darkolivegreen: "#556b2f",
        greenyellow: "#adff2f",
        seagreen: "#2e8b57",
        seashell: "#fff5ee",
        tomato: "#ff6347",
        silver: "#c0c0c0",
        sienna: "#a0522d",
        lavender: "#e6e6fa",
        lightgreen: "#90ee90",
        orange: "#ffa500",
        orangered: "#ff4500",
        steelblue: "#4682b4",
        royalblue: "#4169e1",
        turquoise: "#40e0d0",
        yellowgreen: "#9acd32",
        salmon: "#fa8072",
        saddlebrown: "#8b4513",
        sandybrown: "#f4a460",
        rosybrown: "#bc8f8f",
        darksalmon: "#e9967a",
        lightgoldenrodyellow: "#fafad2",
        snow: "#fffafa",
        lightgrey: "#d3d3d3",
        lightgray: "#d3d3d3",
        dimgray: "#696969",
        dimgrey: "#696969",
        olivedrab: "#6b8e23",
        olive: "#808000"
    }
      , n = {};
    for (var i in r)
        n[r[i]] = i;
    var o = {};
    t.prototype.toName = function(s) {
        if (!(this.rgba.a || this.rgba.r || this.rgba.g || this.rgba.b))
            return "transparent";
        var a, l, c = n[this.toHex()];
        if (c)
            return c;
        if (s != null && s.closest) {
            var u = this.toRgb()
              , f = 1 / 0
              , d = "black";
            if (!o.length)
                for (var h in r)
                    o[h] = new t(r[h]).toRgb();
            for (var x in r) {
                var y = (a = u,
                l = o[x],
                Math.pow(a.r - l.r, 2) + Math.pow(a.g - l.g, 2) + Math.pow(a.b - l.b, 2));
                y < f && (f = y,
                d = x)
            }
            return d
        }
    }
    ,
    e.string.push([function(s) {
        var a = s.toLowerCase()
          , l = a === "transparent" ? "#0000" : r[a];
        return l ? new t(l).toRgb() : null
    }
    , "name"])
}
mae([vae]);
const su = class m0 {
    constructor(e=16777215) {
        this._value = null,
        this._components = new Float32Array(4),
        this._components.fill(1),
        this._int = 16777215,
        this.value = e
    }
    get red() {
        return this._components[0]
    }
    get green() {
        return this._components[1]
    }
    get blue() {
        return this._components[2]
    }
    get alpha() {
        return this._components[3]
    }
    setValue(e) {
        return this.value = e,
        this
    }
    set value(e) {
        if (e instanceof m0)
            this._value = this._cloneSource(e._value),
            this._int = e._int,
            this._components.set(e._components);
        else {
            if (e === null)
                throw new Error("Cannot set Color#value to null");
            (this._value === null || !this._isSourceEqual(this._value, e)) && (this._value = this._cloneSource(e),
            this._normalize(this._value))
        }
    }
    get value() {
        return this._value
    }
    _cloneSource(e) {
        return typeof e == "string" || typeof e == "number" || e instanceof Number || e === null ? e : Array.isArray(e) || ArrayBuffer.isView(e) ? e.slice(0) : typeof e == "object" && e !== null ? {
            ...e
        } : e
    }
    _isSourceEqual(e, r) {
        const n = typeof e;
        if (n !== typeof r)
            return !1;
        if (n === "number" || n === "string" || e instanceof Number)
            return e === r;
        if (Array.isArray(e) && Array.isArray(r) || ArrayBuffer.isView(e) && ArrayBuffer.isView(r))
            return e.length !== r.length ? !1 : e.every( (o, s) => o === r[s]);
        if (e !== null && r !== null) {
            const o = Object.keys(e)
              , s = Object.keys(r);
            return o.length !== s.length ? !1 : o.every(a => e[a] === r[a])
        }
        return e === r
    }
    toRgba() {
        const [e,r,n,i] = this._components;
        return {
            r: e,
            g: r,
            b: n,
            a: i
        }
    }
    toRgb() {
        const [e,r,n] = this._components;
        return {
            r: e,
            g: r,
            b: n
        }
    }
    toRgbaString() {
        const [e,r,n] = this.toUint8RgbArray();
        return `rgba(${e},${r},${n},${this.alpha})`
    }
    toUint8RgbArray(e) {
        const [r,n,i] = this._components;
        return this._arrayRgb || (this._arrayRgb = []),
        e || (e = this._arrayRgb),
        e[0] = Math.round(r * 255),
        e[1] = Math.round(n * 255),
        e[2] = Math.round(i * 255),
        e
    }
    toArray(e) {
        this._arrayRgba || (this._arrayRgba = []),
        e || (e = this._arrayRgba);
        const [r,n,i,o] = this._components;
        return e[0] = r,
        e[1] = n,
        e[2] = i,
        e[3] = o,
        e
    }
    toRgbArray(e) {
        this._arrayRgb || (this._arrayRgb = []),
        e || (e = this._arrayRgb);
        const [r,n,i] = this._components;
        return e[0] = r,
        e[1] = n,
        e[2] = i,
        e
    }
    toNumber() {
        return this._int
    }
    toBgrNumber() {
        const [e,r,n] = this.toUint8RgbArray();
        return (n << 16) + (r << 8) + e
    }
    toLittleEndianNumber() {
        const e = this._int;
        return (e >> 16) + (e & 65280) + ((e & 255) << 16)
    }
    multiply(e) {
        const [r,n,i,o] = m0._temp.setValue(e)._components;
        return this._components[0] *= r,
        this._components[1] *= n,
        this._components[2] *= i,
        this._components[3] *= o,
        this._refreshInt(),
        this._value = null,
        this
    }
    premultiply(e, r=!0) {
        return r && (this._components[0] *= e,
        this._components[1] *= e,
        this._components[2] *= e),
        this._components[3] = e,
        this._refreshInt(),
        this._value = null,
        this
    }
    toPremultiplied(e, r=!0) {
        if (e === 1)
            return (255 << 24) + this._int;
        if (e === 0)
            return r ? 0 : this._int;
        let n = this._int >> 16 & 255
          , i = this._int >> 8 & 255
          , o = this._int & 255;
        return r && (n = n * e + .5 | 0,
        i = i * e + .5 | 0,
        o = o * e + .5 | 0),
        (e * 255 << 24) + (n << 16) + (i << 8) + o
    }
    toHex() {
        const e = this._int.toString(16);
        return `#${"000000".substring(0, 6 - e.length) + e}`
    }
    toHexa() {
        const r = Math.round(this._components[3] * 255).toString(16);
        return this.toHex() + "00".substring(0, 2 - r.length) + r
    }
    setAlpha(e) {
        return this._components[3] = this._clamp(e),
        this
    }
    _normalize(e) {
        let r, n, i, o;
        if ((typeof e == "number" || e instanceof Number) && e >= 0 && e <= 16777215) {
            const s = e;
            r = (s >> 16 & 255) / 255,
            n = (s >> 8 & 255) / 255,
            i = (s & 255) / 255,
            o = 1
        } else if ((Array.isArray(e) || e instanceof Float32Array) && e.length >= 3 && e.length <= 4)
            e = this._clamp(e),
            [r,n,i,o=1] = e;
        else if ((e instanceof Uint8Array || e instanceof Uint8ClampedArray) && e.length >= 3 && e.length <= 4)
            e = this._clamp(e, 0, 255),
            [r,n,i,o=255] = e,
            r /= 255,
            n /= 255,
            i /= 255,
            o /= 255;
        else if (typeof e == "string" || typeof e == "object") {
            if (typeof e == "string") {
                const a = m0.HEX_PATTERN.exec(e);
                a && (e = `#${a[2]}`)
            }
            const s = to(e);
            s.isValid() && ({r, g: n, b: i, a: o} = s.rgba,
            r /= 255,
            n /= 255,
            i /= 255)
        }
        if (r !== void 0)
            this._components[0] = r,
            this._components[1] = n,
            this._components[2] = i,
            this._components[3] = o,
            this._refreshInt();
        else
            throw new Error(`Unable to convert color ${e}`)
    }
    _refreshInt() {
        this._clamp(this._components);
        const [e,r,n] = this._components;
        this._int = (e * 255 << 16) + (r * 255 << 8) + (n * 255 | 0)
    }
    _clamp(e, r=0, n=1) {
        return typeof e == "number" ? Math.min(Math.max(e, r), n) : (e.forEach( (i, o) => {
            e[o] = Math.min(Math.max(i, r), n)
        }
        ),
        e)
    }
    static isColorLike(e) {
        return typeof e == "number" || typeof e == "string" || e instanceof Number || e instanceof m0 || Array.isArray(e) || e instanceof Uint8Array || e instanceof Uint8ClampedArray || e instanceof Float32Array || e.r !== void 0 && e.g !== void 0 && e.b !== void 0 || e.r !== void 0 && e.g !== void 0 && e.b !== void 0 && e.a !== void 0 || e.h !== void 0 && e.s !== void 0 && e.l !== void 0 || e.h !== void 0 && e.s !== void 0 && e.l !== void 0 && e.a !== void 0 || e.h !== void 0 && e.s !== void 0 && e.v !== void 0 || e.h !== void 0 && e.s !== void 0 && e.v !== void 0 && e.a !== void 0
    }
}
;
su.shared = new su;
su._temp = new su;
su.HEX_PATTERN = /^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;
let Ut = su;
const yae = {
    cullArea: null,
    cullable: !1,
    cullableChildren: !0
};
let Rg = 0;
const mw = 500;
function Ne(...t) {
    Rg !== mw && (Rg++,
    Rg === mw ? console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS.") : console.warn("PixiJS Warning: ", ...t))
}
const Fu = {
    _registeredResources: new Set,
    register(t) {
        this._registeredResources.add(t)
    },
    unregister(t) {
        this._registeredResources.delete(t)
    },
    release() {
        this._registeredResources.forEach(t => t.clear())
    },
    get registeredCount() {
        return this._registeredResources.size
    },
    isRegistered(t) {
        return this._registeredResources.has(t)
    },
    reset() {
        this._registeredResources.clear()
    }
};
class Eae {
    constructor(e, r) {
        this._pool = [],
        this._count = 0,
        this._index = 0,
        this._classType = e,
        r && this.prepopulate(r)
    }
    prepopulate(e) {
        for (let r = 0; r < e; r++)
            this._pool[this._index++] = new this._classType;
        this._count += e
    }
    get(e) {
        var n;
        let r;
        return this._index > 0 ? r = this._pool[--this._index] : (r = new this._classType,
        this._count++),
        (n = r.init) == null || n.call(r, e),
        r
    }
    return(e) {
        var r;
        (r = e.reset) == null || r.call(e),
        this._pool[this._index++] = e
    }
    get totalSize() {
        return this._count
    }
    get totalFree() {
        return this._index
    }
    get totalUsed() {
        return this._count - this._index
    }
    clear() {
        if (this._pool.length > 0 && this._pool[0].destroy)
            for (let e = 0; e < this._index; e++)
                this._pool[e].destroy();
        this._pool.length = 0,
        this._count = 0,
        this._index = 0
    }
}
class _ae {
    constructor() {
        this._poolsByClass = new Map
    }
    prepopulate(e, r) {
        this.getPool(e).prepopulate(r)
    }
    get(e, r) {
        return this.getPool(e).get(r)
    }
    return(e) {
        this.getPool(e.constructor).return(e)
    }
    getPool(e) {
        return this._poolsByClass.has(e) || this._poolsByClass.set(e, new Eae(e)),
        this._poolsByClass.get(e)
    }
    stats() {
        const e = {};
        return this._poolsByClass.forEach(r => {
            const n = e[r._classType.name] ? r._classType.name + r._classType.ID : r._classType.name;
            e[n] = {
                free: r.totalFree,
                used: r.totalUsed,
                size: r.totalSize
            }
        }
        ),
        e
    }
    clear() {
        this._poolsByClass.forEach(e => e.clear()),
        this._poolsByClass.clear()
    }
}
const xr = new _ae;
Fu.register(xr);
const bae = {
    get isCachedAsTexture() {
        var t;
        return !!((t = this.renderGroup) != null && t.isCachedAsTexture)
    },
    cacheAsTexture(t) {
        typeof t == "boolean" && t === !1 ? this.disableRenderGroup() : (this.enableRenderGroup(),
        this.renderGroup.enableCacheAsTexture(t === !0 ? {} : t))
    },
    updateCacheTexture() {
        var t;
        (t = this.renderGroup) == null || t.updateCacheTexture()
    },
    get cacheAsBitmap() {
        return this.isCachedAsTexture
    },
    set cacheAsBitmap(t) {
        Re("v8.6.0", "cacheAsBitmap is deprecated, use cacheAsTexture instead."),
        this.cacheAsTexture(t)
    }
};
function XF(t, e, r) {
    const n = t.length;
    let i;
    if (e >= n || r === 0)
        return;
    r = e + r > n ? n - e : r;
    const o = n - r;
    for (i = e; i < o; ++i)
        t[i] = t[i + r];
    t.length = o
}
const Cae = {
    allowChildren: !0,
    removeChildren(t=0, e) {
        var o;
        const r = e ?? this.children.length
          , n = r - t
          , i = [];
        if (n > 0 && n <= r) {
            for (let a = r - 1; a >= t; a--) {
                const l = this.children[a];
                l && (i.push(l),
                l.parent = null)
            }
            XF(this.children, t, r);
            const s = this.renderGroup || this.parentRenderGroup;
            s && s.removeChildren(i);
            for (let a = 0; a < i.length; ++a) {
                const l = i[a];
                (o = l.parentRenderLayer) == null || o.detach(l),
                this.emit("childRemoved", l, this, a),
                i[a].emit("removed", this)
            }
            return i.length > 0 && this._didViewChangeTick++,
            i
        } else if (n === 0 && this.children.length === 0)
            return i;
        throw new RangeError("removeChildren: numeric values are outside the acceptable range.")
    },
    removeChildAt(t) {
        const e = this.getChildAt(t);
        return this.removeChild(e)
    },
    getChildAt(t) {
        if (t < 0 || t >= this.children.length)
            throw new Error(`getChildAt: Index (${t}) does not exist.`);
        return this.children[t]
    },
    setChildIndex(t, e) {
        if (e < 0 || e >= this.children.length)
            throw new Error(`The index ${e} supplied is out of bounds ${this.children.length}`);
        this.getChildIndex(t),
        this.addChildAt(t, e)
    },
    getChildIndex(t) {
        const e = this.children.indexOf(t);
        if (e === -1)
            throw new Error("The supplied Container must be a child of the caller");
        return e
    },
    addChildAt(t, e) {
        this.allowChildren || Re(tt, "addChildAt: Only Containers will be allowed to add children in v8.0.0");
        const {children: r} = this;
        if (e < 0 || e > r.length)
            throw new Error(`${t}addChildAt: The index ${e} supplied is out of bounds ${r.length}`);
        if (t.parent) {
            const i = t.parent.children.indexOf(t);
            if (t.parent === this && i === e)
                return t;
            i !== -1 && t.parent.children.splice(i, 1)
        }
        e === r.length ? r.push(t) : r.splice(e, 0, t),
        t.parent = this,
        t.didChange = !0,
        t._updateFlags = 15;
        const n = this.renderGroup || this.parentRenderGroup;
        return n && n.addChild(t),
        this.sortableChildren && (this.sortDirty = !0),
        this.emit("childAdded", t, this, e),
        t.emit("added", this),
        t
    },
    swapChildren(t, e) {
        if (t === e)
            return;
        const r = this.getChildIndex(t)
          , n = this.getChildIndex(e);
        this.children[r] = e,
        this.children[n] = t;
        const i = this.renderGroup || this.parentRenderGroup;
        i && (i.structureDidChange = !0),
        this._didContainerChangeTick++
    },
    removeFromParent() {
        var t;
        (t = this.parent) == null || t.removeChild(this)
    },
    reparentChild(...t) {
        return t.length === 1 ? this.reparentChildAt(t[0], this.children.length) : (t.forEach(e => this.reparentChildAt(e, this.children.length)),
        t[0])
    },
    reparentChildAt(t, e) {
        if (t.parent === this)
            return this.setChildIndex(t, e),
            t;
        const r = t.worldTransform.clone();
        t.removeFromParent(),
        this.addChildAt(t, e);
        const n = this.worldTransform.clone();
        return n.invert(),
        r.prepend(n),
        t.setFromMatrix(r),
        t
    },
    replaceChild(t, e) {
        t.updateLocalTransform(),
        this.addChildAt(e, this.getChildIndex(t)),
        e.setFromMatrix(t.localTransform),
        e.updateLocalTransform(),
        this.removeChild(t)
    }
}
  , Aae = {
    collectRenderables(t, e, r) {
        this.parentRenderLayer && this.parentRenderLayer !== r || this.globalDisplayStatus < 7 || !this.includeInBuild || (this.sortableChildren && this.sortChildren(),
        this.isSimple ? this.collectRenderablesSimple(t, e, r) : this.renderGroup ? e.renderPipes.renderGroup.addRenderGroup(this.renderGroup, t) : this.collectRenderablesWithEffects(t, e, r))
    },
    collectRenderablesSimple(t, e, r) {
        const n = this.children
          , i = n.length;
        for (let o = 0; o < i; o++)
            n[o].collectRenderables(t, e, r)
    },
    collectRenderablesWithEffects(t, e, r) {
        const {renderPipes: n} = e;
        for (let i = 0; i < this.effects.length; i++) {
            const o = this.effects[i];
            n[o.pipe].push(o, this, t)
        }
        this.collectRenderablesSimple(t, e, r);
        for (let i = this.effects.length - 1; i >= 0; i--) {
            const o = this.effects[i];
            n[o.pipe].pop(o, this, t)
        }
    }
};
class Rx {
    constructor() {
        this.pipe = "filter",
        this.priority = 1
    }
    destroy() {
        for (let e = 0; e < this.filters.length; e++)
            this.filters[e].destroy();
        this.filters = null,
        this.filterArea = null
    }
}
class wae {
    constructor() {
        this._effectClasses = [],
        this._tests = [],
        this._initialized = !1
    }
    init() {
        this._initialized || (this._initialized = !0,
        this._effectClasses.forEach(e => {
            this.add({
                test: e.test,
                maskClass: e
            })
        }
        ))
    }
    add(e) {
        this._tests.push(e)
    }
    getMaskEffect(e) {
        this._initialized || this.init();
        for (let r = 0; r < this._tests.length; r++) {
            const n = this._tests[r];
            if (n.test(e))
                return xr.get(n.maskClass, e)
        }
        return e
    }
    returnMaskEffect(e) {
        xr.return(e)
    }
}
const Zy = new wae;
$e.handleByList(X.MaskEffect, Zy._effectClasses);
const Bae = {
    _maskEffect: null,
    _maskOptions: {
        inverse: !1
    },
    _filterEffect: null,
    effects: [],
    _markStructureAsChanged() {
        const t = this.renderGroup || this.parentRenderGroup;
        t && (t.structureDidChange = !0)
    },
    addEffect(t) {
        this.effects.indexOf(t) === -1 && (this.effects.push(t),
        this.effects.sort( (r, n) => r.priority - n.priority),
        this._markStructureAsChanged(),
        this._updateIsSimple())
    },
    removeEffect(t) {
        const e = this.effects.indexOf(t);
        e !== -1 && (this.effects.splice(e, 1),
        this._markStructureAsChanged(),
        this._updateIsSimple())
    },
    set mask(t) {
        const e = this._maskEffect;
        (e == null ? void 0 : e.mask) !== t && (e && (this.removeEffect(e),
        Zy.returnMaskEffect(e),
        this._maskEffect = null),
        t != null && (this._maskEffect = Zy.getMaskEffect(t),
        this.addEffect(this._maskEffect)))
    },
    get mask() {
        var t;
        return (t = this._maskEffect) == null ? void 0 : t.mask
    },
    setMask(t) {
        this._maskOptions = {
            ...this._maskOptions,
            ...t
        },
        t.mask && (this.mask = t.mask),
        this._markStructureAsChanged()
    },
    set filters(t) {
        var o;
        !Array.isArray(t) && t && (t = [t]);
        const e = this._filterEffect || (this._filterEffect = new Rx);
        t = t;
        const r = (t == null ? void 0 : t.length) > 0
          , n = ((o = e.filters) == null ? void 0 : o.length) > 0
          , i = r !== n;
        t = Array.isArray(t) ? t.slice(0) : t,
        e.filters = Object.freeze(t),
        i && (r ? this.addEffect(e) : (this.removeEffect(e),
        e.filters = t ?? null))
    },
    get filters() {
        var t;
        return (t = this._filterEffect) == null ? void 0 : t.filters
    },
    set filterArea(t) {
        this._filterEffect || (this._filterEffect = new Rx),
        this._filterEffect.filterArea = t
    },
    get filterArea() {
        var t;
        return (t = this._filterEffect) == null ? void 0 : t.filterArea
    }
}
  , Sae = {
    label: null,
    get name() {
        return Re(tt, "Container.name property has been removed, use Container.label instead"),
        this.label
    },
    set name(t) {
        Re(tt, "Container.name property has been removed, use Container.label instead"),
        this.label = t
    },
    getChildByName(t, e=!1) {
        return this.getChildByLabel(t, e)
    },
    getChildByLabel(t, e=!1) {
        const r = this.children;
        for (let n = 0; n < r.length; n++) {
            const i = r[n];
            if (i.label === t || t instanceof RegExp && t.test(i.label))
                return i
        }
        if (e)
            for (let n = 0; n < r.length; n++) {
                const o = r[n].getChildByLabel(t, !0);
                if (o)
                    return o
            }
        return null
    },
    getChildrenByLabel(t, e=!1, r=[]) {
        const n = this.children;
        for (let i = 0; i < n.length; i++) {
            const o = n[i];
            (o.label === t || t instanceof RegExp && t.test(o.label)) && r.push(o)
        }
        if (e)
            for (let i = 0; i < n.length; i++)
                n[i].getChildrenByLabel(t, !0, r);
        return r
    }
}
  , hn = xr.getPool(Pe)
  , ns = xr.getPool(jr)
  , Tae = new Pe
  , Dae = {
    getFastGlobalBounds(t, e) {
        e || (e = new jr),
        e.clear(),
        this._getGlobalBoundsRecursive(!!t, e, this.parentRenderLayer),
        e.isValid || e.set(0, 0, 0, 0);
        const r = this.renderGroup || this.parentRenderGroup;
        return e.applyMatrix(r.worldTransform),
        e
    },
    _getGlobalBoundsRecursive(t, e, r) {
        let n = e;
        if (t && this.parentRenderLayer && this.parentRenderLayer !== r || this.localDisplayStatus !== 7 || !this.measurable)
            return;
        const i = !!this.effects.length;
        if ((this.renderGroup || i) && (n = ns.get().clear()),
        this.boundsArea)
            e.addRect(this.boundsArea, this.worldTransform);
        else {
            if (this.renderPipeId) {
                const s = this.bounds;
                n.addFrame(s.minX, s.minY, s.maxX, s.maxY, this.groupTransform)
            }
            const o = this.children;
            for (let s = 0; s < o.length; s++)
                o[s]._getGlobalBoundsRecursive(t, n, r)
        }
        if (i) {
            let o = !1;
            const s = this.renderGroup || this.parentRenderGroup;
            for (let a = 0; a < this.effects.length; a++)
                this.effects[a].addBounds && (o || (o = !0,
                n.applyMatrix(s.worldTransform)),
                this.effects[a].addBounds(n, !0));
            o && n.applyMatrix(s.worldTransform.copyTo(Tae).invert()),
            e.addBounds(n),
            ns.return(n)
        } else
            this.renderGroup && (e.addBounds(n, this.relativeGroupTransform),
            ns.return(n))
    }
};
function fb(t, e, r) {
    r.clear();
    let n, i;
    return t.parent ? e ? n = t.parent.worldTransform : (i = hn.get().identity(),
    n = db(t, i)) : n = Pe.IDENTITY,
    KF(t, r, n, e),
    i && hn.return(i),
    r.isValid || r.set(0, 0, 0, 0),
    r
}
function KF(t, e, r, n) {
    var a, l;
    if (!t.visible || !t.measurable)
        return;
    let i;
    n ? i = t.worldTransform : (t.updateLocalTransform(),
    i = hn.get(),
    i.appendFrom(t.localTransform, r));
    const o = e
      , s = !!t.effects.length;
    if (s && (e = ns.get().clear()),
    t.boundsArea)
        e.addRect(t.boundsArea, i);
    else {
        const c = t.bounds;
        c && !c.isEmpty() && (e.matrix = i,
        e.addBounds(c));
        for (let u = 0; u < t.children.length; u++)
            KF(t.children[u], e, i, n)
    }
    if (s) {
        for (let c = 0; c < t.effects.length; c++)
            (l = (a = t.effects[c]).addBounds) == null || l.call(a, e);
        o.addBounds(e, Pe.IDENTITY),
        ns.return(e)
    }
    n || hn.return(i)
}
function db(t, e) {
    const r = t.parent;
    return r && (db(r, e),
    r.updateLocalTransform(),
    e.append(r.localTransform)),
    e
}
function qF(t, e) {
    if (t === 16777215 || !e)
        return e;
    if (e === 16777215 || !t)
        return t;
    const r = t >> 16 & 255
      , n = t >> 8 & 255
      , i = t & 255
      , o = e >> 16 & 255
      , s = e >> 8 & 255
      , a = e & 255
      , l = r * o / 255 | 0
      , c = n * s / 255 | 0
      , u = i * a / 255 | 0;
    return (l << 16) + (c << 8) + u
}
const vw = 16777215;
function Mx(t, e) {
    return t === vw ? e : e === vw ? t : qF(t, e)
}
function U0(t) {
    return ((t & 255) << 16) + (t & 65280) + (t >> 16 & 255)
}
const Fae = {
    getGlobalAlpha(t) {
        if (t)
            return this.renderGroup ? this.renderGroup.worldAlpha : this.parentRenderGroup ? this.parentRenderGroup.worldAlpha * this.alpha : this.alpha;
        let e = this.alpha
          , r = this.parent;
        for (; r; )
            e *= r.alpha,
            r = r.parent;
        return e
    },
    getGlobalTransform(t=new Pe, e) {
        if (e)
            return t.copyFrom(this.worldTransform);
        this.updateLocalTransform();
        const r = db(this, hn.get().identity());
        return t.appendFrom(this.localTransform, r),
        hn.return(r),
        t
    },
    getGlobalTint(t) {
        if (t)
            return this.renderGroup ? U0(this.renderGroup.worldColor) : this.parentRenderGroup ? U0(Mx(this.localColor, this.parentRenderGroup.worldColor)) : this.tint;
        let e = this.localColor
          , r = this.parent;
        for (; r; )
            e = Mx(e, r.localColor),
            r = r.parent;
        return U0(e)
    }
};
function hb(t, e, r) {
    return e.clear(),
    r || (r = Pe.IDENTITY),
    ZF(t, e, r, t, !0),
    e.isValid || e.set(0, 0, 0, 0),
    e
}
function ZF(t, e, r, n, i) {
    var l, c;
    let o;
    if (i)
        o = hn.get(),
        o = r.copyTo(o);
    else {
        if (!t.visible || !t.measurable)
            return;
        t.updateLocalTransform();
        const u = t.localTransform;
        o = hn.get(),
        o.appendFrom(u, r)
    }
    const s = e
      , a = !!t.effects.length;
    if (a && (e = ns.get().clear()),
    t.boundsArea)
        e.addRect(t.boundsArea, o);
    else {
        t.renderPipeId && (e.matrix = o,
        e.addBounds(t.bounds));
        const u = t.children;
        for (let f = 0; f < u.length; f++)
            ZF(u[f], e, o, n, !1)
    }
    if (a) {
        for (let u = 0; u < t.effects.length; u++)
            (c = (l = t.effects[u]).addLocalBounds) == null || c.call(l, e, n);
        s.addBounds(e, Pe.IDENTITY),
        ns.return(e)
    }
    hn.return(o)
}
function JF(t, e) {
    const r = t.children;
    for (let n = 0; n < r.length; n++) {
        const i = r[n]
          , o = i.uid
          , s = (i._didViewChangeTick & 65535) << 16 | i._didContainerChangeTick & 65535
          , a = e.index;
        (e.data[a] !== o || e.data[a + 1] !== s) && (e.data[e.index] = o,
        e.data[e.index + 1] = s,
        e.didChange = !0),
        e.index = a + 2,
        i.children.length && JF(i, e)
    }
    return e.didChange
}
const Pae = new Pe
  , Iae = {
    _localBoundsCacheId: -1,
    _localBoundsCacheData: null,
    _setWidth(t, e) {
        const r = Math.sign(this.scale.x) || 1;
        e !== 0 ? this.scale.x = t / e * r : this.scale.x = r
    },
    _setHeight(t, e) {
        const r = Math.sign(this.scale.y) || 1;
        e !== 0 ? this.scale.y = t / e * r : this.scale.y = r
    },
    getLocalBounds() {
        this._localBoundsCacheData || (this._localBoundsCacheData = {
            data: [],
            index: 1,
            didChange: !1,
            localBounds: new jr
        });
        const t = this._localBoundsCacheData;
        return t.index = 1,
        t.didChange = !1,
        t.data[0] !== this._didViewChangeTick && (t.didChange = !0,
        t.data[0] = this._didViewChangeTick),
        JF(this, t),
        t.didChange && hb(this, t.localBounds, Pae),
        t.localBounds
    },
    getBounds(t, e) {
        return fb(this, t, e || new jr)
    }
}
  , Oae = {
    _onRender: null,
    set onRender(t) {
        const e = this.renderGroup || this.parentRenderGroup;
        if (!t) {
            this._onRender && (e == null || e.removeOnRender(this)),
            this._onRender = null;
            return
        }
        this._onRender || e == null || e.addOnRender(this),
        this._onRender = t
    },
    get onRender() {
        return this._onRender
    }
}
  , kae = {
    _zIndex: 0,
    sortDirty: !1,
    sortableChildren: !1,
    get zIndex() {
        return this._zIndex
    },
    set zIndex(t) {
        this._zIndex !== t && (this._zIndex = t,
        this.depthOfChildModified())
    },
    depthOfChildModified() {
        this.parent && (this.parent.sortableChildren = !0,
        this.parent.sortDirty = !0),
        this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0)
    },
    sortChildren() {
        this.sortDirty && (this.sortDirty = !1,
        this.children.sort(Rae))
    }
};
function Rae(t, e) {
    return t._zIndex - e._zIndex
}
const Mae = {
    getGlobalPosition(t=new Gt, e=!1) {
        return this.parent ? this.parent.toGlobal(this._position, t, e) : (t.x = this._position.x,
        t.y = this._position.y),
        t
    },
    toGlobal(t, e, r=!1) {
        const n = this.getGlobalTransform(hn.get(), r);
        return e = n.apply(t, e),
        hn.return(n),
        e
    },
    toLocal(t, e, r, n) {
        e && (t = e.toGlobal(t, r, n));
        const i = this.getGlobalTransform(hn.get(), n);
        return r = i.applyInverse(t, r),
        hn.return(i),
        r
    }
};
class QF {
    constructor() {
        this.uid = Dt("instructionSet"),
        this.instructions = [],
        this.instructionSize = 0,
        this.renderables = [],
        this.gcTick = 0
    }
    reset() {
        this.instructionSize = 0
    }
    destroy() {
        this.instructions.length = 0,
        this.renderables.length = 0,
        this.renderPipes = null,
        this.gcTick = 0
    }
    add(e) {
        this.instructions[this.instructionSize++] = e
    }
    log() {
        this.instructions.length = this.instructionSize,
        console.table(this.instructions, ["type", "action"])
    }
}
let Nae = 0;
class Lae {
    constructor(e) {
        this._poolKeyHash = Object.create(null),
        this._texturePool = {},
        this.textureOptions = e || {},
        this.enableFullScreen = !1,
        this.textureStyle = new wo(this.textureOptions)
    }
    createTexture(e, r, n) {
        const i = new Br({
            ...this.textureOptions,
            width: e,
            height: r,
            resolution: 1,
            antialias: n,
            autoGarbageCollect: !1
        });
        return new Be({
            source: i,
            label: `texturePool_${Nae++}`
        })
    }
    getOptimalTexture(e, r, n=1, i) {
        let o = Math.ceil(e * n - 1e-6)
          , s = Math.ceil(r * n - 1e-6);
        o = ou(o),
        s = ou(s);
        const a = (o << 17) + (s << 1) + (i ? 1 : 0);
        this._texturePool[a] || (this._texturePool[a] = []);
        let l = this._texturePool[a].pop();
        return l || (l = this.createTexture(o, s, i)),
        l.source._resolution = n,
        l.source.width = o / n,
        l.source.height = s / n,
        l.source.pixelWidth = o,
        l.source.pixelHeight = s,
        l.frame.x = 0,
        l.frame.y = 0,
        l.frame.width = e,
        l.frame.height = r,
        l.updateUvs(),
        this._poolKeyHash[l.uid] = a,
        l
    }
    getSameSizeTexture(e, r=!1) {
        const n = e.source;
        return this.getOptimalTexture(e.width, e.height, n._resolution, r)
    }
    returnTexture(e, r=!1) {
        const n = this._poolKeyHash[e.uid];
        r && (e.source.style = this.textureStyle),
        this._texturePool[n].push(e)
    }
    clear(e) {
        if (e = e !== !1,
        e)
            for (const r in this._texturePool) {
                const n = this._texturePool[r];
                if (n)
                    for (let i = 0; i < n.length; i++)
                        n[i].destroy(!0)
            }
        this._texturePool = {}
    }
}
const sr = new Lae;
Fu.register(sr);
class Jy {
    constructor() {
        this.renderPipeId = "renderGroup",
        this.root = null,
        this.canBundle = !1,
        this.renderGroupParent = null,
        this.renderGroupChildren = [],
        this.worldTransform = new Pe,
        this.worldColorAlpha = 4294967295,
        this.worldColor = 16777215,
        this.worldAlpha = 1,
        this.childrenToUpdate = Object.create(null),
        this.updateTick = 0,
        this.gcTick = 0,
        this.childrenRenderablesToUpdate = {
            list: [],
            index: 0
        },
        this.structureDidChange = !0,
        this.instructionSet = new QF,
        this._onRenderContainers = [],
        this.textureNeedsUpdate = !0,
        this.isCachedAsTexture = !1,
        this._matrixDirty = 7
    }
    init(e) {
        this.root = e,
        e._onRender && this.addOnRender(e),
        e.didChange = !0;
        const r = e.children;
        for (let n = 0; n < r.length; n++) {
            const i = r[n];
            i._updateFlags = 15,
            this.addChild(i)
        }
    }
    enableCacheAsTexture(e={}) {
        this.textureOptions = e,
        this.isCachedAsTexture = !0,
        this.textureNeedsUpdate = !0
    }
    disableCacheAsTexture() {
        this.isCachedAsTexture = !1,
        this.texture && (sr.returnTexture(this.texture, !0),
        this.texture = null)
    }
    updateCacheTexture() {
        this.textureNeedsUpdate = !0;
        const e = this._parentCacheAsTextureRenderGroup;
        e && !e.textureNeedsUpdate && e.updateCacheTexture()
    }
    reset() {
        this.renderGroupChildren.length = 0;
        for (const e in this.childrenToUpdate) {
            const r = this.childrenToUpdate[e];
            r.list.fill(null),
            r.index = 0
        }
        this.childrenRenderablesToUpdate.index = 0,
        this.childrenRenderablesToUpdate.list.fill(null),
        this.root = null,
        this.updateTick = 0,
        this.structureDidChange = !0,
        this._onRenderContainers.length = 0,
        this.renderGroupParent = null,
        this.disableCacheAsTexture()
    }
    get localTransform() {
        return this.root.localTransform
    }
    addRenderGroupChild(e) {
        e.renderGroupParent && e.renderGroupParent._removeRenderGroupChild(e),
        e.renderGroupParent = this,
        this.renderGroupChildren.push(e)
    }
    _removeRenderGroupChild(e) {
        const r = this.renderGroupChildren.indexOf(e);
        r > -1 && this.renderGroupChildren.splice(r, 1),
        e.renderGroupParent = null
    }
    addChild(e) {
        if (this.structureDidChange = !0,
        e.parentRenderGroup = this,
        e.updateTick = -1,
        e.parent === this.root ? e.relativeRenderGroupDepth = 1 : e.relativeRenderGroupDepth = e.parent.relativeRenderGroupDepth + 1,
        e.didChange = !0,
        this.onChildUpdate(e),
        e.renderGroup) {
            this.addRenderGroupChild(e.renderGroup);
            return
        }
        e._onRender && this.addOnRender(e);
        const r = e.children;
        for (let n = 0; n < r.length; n++)
            this.addChild(r[n])
    }
    removeChild(e) {
        if (this.structureDidChange = !0,
        e._onRender && (e.renderGroup || this.removeOnRender(e)),
        e.parentRenderGroup = null,
        e.renderGroup) {
            this._removeRenderGroupChild(e.renderGroup);
            return
        }
        const r = e.children;
        for (let n = 0; n < r.length; n++)
            this.removeChild(r[n])
    }
    removeChildren(e) {
        for (let r = 0; r < e.length; r++)
            this.removeChild(e[r])
    }
    onChildUpdate(e) {
        let r = this.childrenToUpdate[e.relativeRenderGroupDepth];
        r || (r = this.childrenToUpdate[e.relativeRenderGroupDepth] = {
            index: 0,
            list: []
        }),
        r.list[r.index++] = e
    }
    updateRenderable(e) {
        e.globalDisplayStatus < 7 || (this.instructionSet.renderPipes[e.renderPipeId].updateRenderable(e),
        e.didViewUpdate = !1)
    }
    onChildViewUpdate(e) {
        this.childrenRenderablesToUpdate.list[this.childrenRenderablesToUpdate.index++] = e
    }
    get isRenderable() {
        return this.root.localDisplayStatus === 7 && this.worldAlpha > 0
    }
    addOnRender(e) {
        this._onRenderContainers.push(e)
    }
    removeOnRender(e) {
        this._onRenderContainers.splice(this._onRenderContainers.indexOf(e), 1)
    }
    runOnRender(e) {
        for (let r = 0; r < this._onRenderContainers.length; r++)
            this._onRenderContainers[r]._onRender(e)
    }
    destroy() {
        this.disableCacheAsTexture(),
        this.renderGroupParent = null,
        this.root = null,
        this.childrenRenderablesToUpdate = null,
        this.childrenToUpdate = null,
        this.renderGroupChildren = null,
        this._onRenderContainers = null,
        this.instructionSet = null
    }
    getChildren(e=[]) {
        const r = this.root.children;
        for (let n = 0; n < r.length; n++)
            this._getChildren(r[n], e);
        return e
    }
    _getChildren(e, r=[]) {
        if (r.push(e),
        e.renderGroup)
            return r;
        const n = e.children;
        for (let i = 0; i < n.length; i++)
            this._getChildren(n[i], r);
        return r
    }
    invalidateMatrices() {
        this._matrixDirty = 7
    }
    get inverseWorldTransform() {
        return this._matrixDirty & 1 ? (this._matrixDirty &= -2,
        this._inverseWorldTransform || (this._inverseWorldTransform = new Pe),
        this._inverseWorldTransform.copyFrom(this.worldTransform).invert()) : this._inverseWorldTransform
    }
    get textureOffsetInverseTransform() {
        return this._matrixDirty & 2 ? (this._matrixDirty &= -3,
        this._textureOffsetInverseTransform || (this._textureOffsetInverseTransform = new Pe),
        this._textureOffsetInverseTransform.copyFrom(this.inverseWorldTransform).translate(-this._textureBounds.x, -this._textureBounds.y)) : this._textureOffsetInverseTransform
    }
    get inverseParentTextureTransform() {
        if (!(this._matrixDirty & 4))
            return this._inverseParentTextureTransform;
        this._matrixDirty &= -5;
        const e = this._parentCacheAsTextureRenderGroup;
        return e ? (this._inverseParentTextureTransform || (this._inverseParentTextureTransform = new Pe),
        this._inverseParentTextureTransform.copyFrom(this.worldTransform).prepend(e.inverseWorldTransform).translate(-e._textureBounds.x, -e._textureBounds.y)) : this.worldTransform
    }
    get cacheToLocalTransform() {
        return this.isCachedAsTexture ? this.textureOffsetInverseTransform : this._parentCacheAsTextureRenderGroup ? this._parentCacheAsTextureRenderGroup.textureOffsetInverseTransform : null
    }
}
function Qy(t, e, r={}) {
    for (const n in e)
        !r[n] && e[n] !== void 0 && (t[n] = e[n])
}
const Mg = new Jt(null)
  , fh = new Jt(null)
  , Ng = new Jt(null,1,1)
  , dh = new Jt(null)
  , Nx = 1
  , xb = 2
  , G0 = 4;
class Rn extends Qn {
    constructor(e={}) {
        var r, n;
        super(),
        this.uid = Dt("renderable"),
        this._updateFlags = 15,
        this.renderGroup = null,
        this.parentRenderGroup = null,
        this.parentRenderGroupIndex = 0,
        this.didChange = !1,
        this.didViewUpdate = !1,
        this.relativeRenderGroupDepth = 0,
        this.children = [],
        this.parent = null,
        this.includeInBuild = !0,
        this.measurable = !0,
        this.isSimple = !0,
        this.parentRenderLayer = null,
        this.updateTick = -1,
        this.localTransform = new Pe,
        this.relativeGroupTransform = new Pe,
        this.groupTransform = this.relativeGroupTransform,
        this.destroyed = !1,
        this._position = new Jt(this,0,0),
        this._scale = Ng,
        this._pivot = fh,
        this._origin = dh,
        this._skew = Mg,
        this._cx = 1,
        this._sx = 0,
        this._cy = 0,
        this._sy = 1,
        this._rotation = 0,
        this.localColor = 16777215,
        this.localAlpha = 1,
        this.groupAlpha = 1,
        this.groupColor = 16777215,
        this.groupColorAlpha = 4294967295,
        this.localBlendMode = "inherit",
        this.groupBlendMode = "normal",
        this.localDisplayStatus = 7,
        this.globalDisplayStatus = 7,
        this._didContainerChangeTick = 0,
        this._didViewChangeTick = 0,
        this._didLocalTransformChangeId = -1,
        this.effects = [],
        Qy(this, e, {
            children: !0,
            parent: !0,
            effects: !0
        }),
        (r = e.children) == null || r.forEach(i => this.addChild(i)),
        (n = e.parent) == null || n.addChild(this)
    }
    static mixin(e) {
        Re("8.8.0", "Container.mixin is deprecated, please use extensions.mixin instead."),
        $e.mixin(Rn, e)
    }
    set _didChangeId(e) {
        this._didViewChangeTick = e >> 12 & 4095,
        this._didContainerChangeTick = e & 4095
    }
    get _didChangeId() {
        return this._didContainerChangeTick & 4095 | (this._didViewChangeTick & 4095) << 12
    }
    addChild(...e) {
        if (this.allowChildren || Re(tt, "addChild: Only Containers will be allowed to add children in v8.0.0"),
        e.length > 1) {
            for (let i = 0; i < e.length; i++)
                this.addChild(e[i]);
            return e[0]
        }
        const r = e[0]
          , n = this.renderGroup || this.parentRenderGroup;
        return r.parent === this ? (this.children.splice(this.children.indexOf(r), 1),
        this.children.push(r),
        n && (n.structureDidChange = !0),
        r) : (r.parent && r.parent.removeChild(r),
        this.children.push(r),
        this.sortableChildren && (this.sortDirty = !0),
        r.parent = this,
        r.didChange = !0,
        r._updateFlags = 15,
        n && n.addChild(r),
        this.emit("childAdded", r, this, this.children.length - 1),
        r.emit("added", this),
        this._didViewChangeTick++,
        r._zIndex !== 0 && r.depthOfChildModified(),
        r)
    }
    removeChild(...e) {
        if (e.length > 1) {
            for (let i = 0; i < e.length; i++)
                this.removeChild(e[i]);
            return e[0]
        }
        const r = e[0]
          , n = this.children.indexOf(r);
        return n > -1 && (this._didViewChangeTick++,
        this.children.splice(n, 1),
        this.renderGroup ? this.renderGroup.removeChild(r) : this.parentRenderGroup && this.parentRenderGroup.removeChild(r),
        r.parentRenderLayer && r.parentRenderLayer.detach(r),
        r.parent = null,
        this.emit("childRemoved", r, this, n),
        r.emit("removed", this)),
        r
    }
    _onUpdate(e) {
        e && e === this._skew && this._updateSkew(),
        this._didContainerChangeTick++,
        !this.didChange && (this.didChange = !0,
        this.parentRenderGroup && this.parentRenderGroup.onChildUpdate(this))
    }
    set isRenderGroup(e) {
        !!this.renderGroup !== e && (e ? this.enableRenderGroup() : this.disableRenderGroup())
    }
    get isRenderGroup() {
        return !!this.renderGroup
    }
    enableRenderGroup() {
        if (this.renderGroup)
            return;
        const e = this.parentRenderGroup;
        e == null || e.removeChild(this),
        this.renderGroup = xr.get(Jy, this),
        this.groupTransform = Pe.IDENTITY,
        e == null || e.addChild(this),
        this._updateIsSimple()
    }
    disableRenderGroup() {
        if (!this.renderGroup)
            return;
        const e = this.parentRenderGroup;
        e == null || e.removeChild(this),
        xr.return(this.renderGroup),
        this.renderGroup = null,
        this.groupTransform = this.relativeGroupTransform,
        e == null || e.addChild(this),
        this._updateIsSimple()
    }
    _updateIsSimple() {
        this.isSimple = !this.renderGroup && this.effects.length === 0
    }
    get worldTransform() {
        return this._worldTransform || (this._worldTransform = new Pe),
        this.renderGroup ? this._worldTransform.copyFrom(this.renderGroup.worldTransform) : this.parentRenderGroup && this._worldTransform.appendFrom(this.relativeGroupTransform, this.parentRenderGroup.worldTransform),
        this._worldTransform
    }
    get x() {
        return this._position.x
    }
    set x(e) {
        this._position.x = e
    }
    get y() {
        return this._position.y
    }
    set y(e) {
        this._position.y = e
    }
    get position() {
        return this._position
    }
    set position(e) {
        this._position.copyFrom(e)
    }
    get rotation() {
        return this._rotation
    }
    set rotation(e) {
        this._rotation !== e && (this._rotation = e,
        this._onUpdate(this._skew))
    }
    get angle() {
        return this.rotation * nae
    }
    set angle(e) {
        this.rotation = e * iae
    }
    get pivot() {
        return this._pivot === fh && (this._pivot = new Jt(this,0,0)),
        this._pivot
    }
    set pivot(e) {
        this._pivot === fh && (this._pivot = new Jt(this,0,0),
        this._origin !== dh && Ne("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),
        typeof e == "number" ? this._pivot.set(e) : this._pivot.copyFrom(e)
    }
    get skew() {
        return this._skew === Mg && (this._skew = new Jt(this,0,0)),
        this._skew
    }
    set skew(e) {
        this._skew === Mg && (this._skew = new Jt(this,0,0)),
        this._skew.copyFrom(e)
    }
    get scale() {
        return this._scale === Ng && (this._scale = new Jt(this,1,1)),
        this._scale
    }
    set scale(e) {
        this._scale === Ng && (this._scale = new Jt(this,0,0)),
        typeof e == "string" && (e = parseFloat(e)),
        typeof e == "number" ? this._scale.set(e) : this._scale.copyFrom(e)
    }
    get origin() {
        return this._origin === dh && (this._origin = new Jt(this,0,0)),
        this._origin
    }
    set origin(e) {
        this._origin === dh && (this._origin = new Jt(this,0,0),
        this._pivot !== fh && Ne("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),
        typeof e == "number" ? this._origin.set(e) : this._origin.copyFrom(e)
    }
    get width() {
        return Math.abs(this.scale.x * this.getLocalBounds().width)
    }
    set width(e) {
        const r = this.getLocalBounds().width;
        this._setWidth(e, r)
    }
    get height() {
        return Math.abs(this.scale.y * this.getLocalBounds().height)
    }
    set height(e) {
        const r = this.getLocalBounds().height;
        this._setHeight(e, r)
    }
    getSize(e) {
        e || (e = {});
        const r = this.getLocalBounds();
        return e.width = Math.abs(this.scale.x * r.width),
        e.height = Math.abs(this.scale.y * r.height),
        e
    }
    setSize(e, r) {
        const n = this.getLocalBounds();
        typeof e == "object" ? (r = e.height ?? e.width,
        e = e.width) : r ?? (r = e),
        e !== void 0 && this._setWidth(e, n.width),
        r !== void 0 && this._setHeight(r, n.height)
    }
    _updateSkew() {
        const e = this._rotation
          , r = this._skew;
        this._cx = Math.cos(e + r._y),
        this._sx = Math.sin(e + r._y),
        this._cy = -Math.sin(e - r._x),
        this._sy = Math.cos(e - r._x)
    }
    updateTransform(e) {
        return this.position.set(typeof e.x == "number" ? e.x : this.position.x, typeof e.y == "number" ? e.y : this.position.y),
        this.scale.set(typeof e.scaleX == "number" ? e.scaleX || 1 : this.scale.x, typeof e.scaleY == "number" ? e.scaleY || 1 : this.scale.y),
        this.rotation = typeof e.rotation == "number" ? e.rotation : this.rotation,
        this.skew.set(typeof e.skewX == "number" ? e.skewX : this.skew.x, typeof e.skewY == "number" ? e.skewY : this.skew.y),
        this.pivot.set(typeof e.pivotX == "number" ? e.pivotX : this.pivot.x, typeof e.pivotY == "number" ? e.pivotY : this.pivot.y),
        this.origin.set(typeof e.originX == "number" ? e.originX : this.origin.x, typeof e.originY == "number" ? e.originY : this.origin.y),
        this
    }
    setFromMatrix(e) {
        e.decompose(this)
    }
    updateLocalTransform() {
        const e = this._didContainerChangeTick;
        if (this._didLocalTransformChangeId === e)
            return;
        this._didLocalTransformChangeId = e;
        const r = this.localTransform
          , n = this._scale
          , i = this._pivot
          , o = this._origin
          , s = this._position
          , a = n._x
          , l = n._y
          , c = i._x
          , u = i._y
          , f = -o._x
          , d = -o._y;
        r.a = this._cx * a,
        r.b = this._sx * a,
        r.c = this._cy * l,
        r.d = this._sy * l,
        r.tx = s._x - (c * r.a + u * r.c) + (f * r.a + d * r.c) - f,
        r.ty = s._y - (c * r.b + u * r.d) + (f * r.b + d * r.d) - d
    }
    set alpha(e) {
        e !== this.localAlpha && (this.localAlpha = e,
        this._updateFlags |= Nx,
        this._onUpdate())
    }
    get alpha() {
        return this.localAlpha
    }
    set tint(e) {
        const n = Ut.shared.setValue(e ?? 16777215).toBgrNumber();
        n !== this.localColor && (this.localColor = n,
        this._updateFlags |= Nx,
        this._onUpdate())
    }
    get tint() {
        return U0(this.localColor)
    }
    set blendMode(e) {
        this.localBlendMode !== e && (this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0),
        this._updateFlags |= xb,
        this.localBlendMode = e,
        this._onUpdate())
    }
    get blendMode() {
        return this.localBlendMode
    }
    get visible() {
        return !!(this.localDisplayStatus & 2)
    }
    set visible(e) {
        const r = e ? 2 : 0;
        (this.localDisplayStatus & 2) !== r && (this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0),
        this._updateFlags |= G0,
        this.localDisplayStatus ^= 2,
        this._onUpdate())
    }
    get culled() {
        return !(this.localDisplayStatus & 4)
    }
    set culled(e) {
        const r = e ? 0 : 4;
        (this.localDisplayStatus & 4) !== r && (this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0),
        this._updateFlags |= G0,
        this.localDisplayStatus ^= 4,
        this._onUpdate())
    }
    get renderable() {
        return !!(this.localDisplayStatus & 1)
    }
    set renderable(e) {
        const r = e ? 1 : 0;
        (this.localDisplayStatus & 1) !== r && (this._updateFlags |= G0,
        this.localDisplayStatus ^= 1,
        this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0),
        this._onUpdate())
    }
    get isRenderable() {
        return this.localDisplayStatus === 7 && this.groupAlpha > 0
    }
    destroy(e=!1) {
        var i;
        if (this.destroyed)
            return;
        this.destroyed = !0;
        let r;
        if (this.children.length && (r = this.removeChildren(0, this.children.length)),
        this.removeFromParent(),
        this.parent = null,
        this._maskEffect = null,
        this._filterEffect = null,
        this.effects = null,
        this._position = null,
        this._scale = null,
        this._pivot = null,
        this._origin = null,
        this._skew = null,
        this.emit("destroyed", this),
        this.removeAllListeners(),
        (typeof e == "boolean" ? e : e == null ? void 0 : e.children) && r)
            for (let o = 0; o < r.length; ++o)
                r[o].destroy(e);
        (i = this.renderGroup) == null || i.destroy(),
        this.renderGroup = null
    }
}
$e.mixin(Rn, Cae, Dae, Mae, Oae, Iae, Bae, Sae, kae, yae, bae, Fae, Aae);
class ad extends Rn {
    constructor(e) {
        super(e),
        this.canBundle = !0,
        this.allowChildren = !1,
        this._roundPixels = 0,
        this._lastUsed = -1,
        this._gpuData = Object.create(null),
        this._bounds = new jr(0,1,0,0),
        this._boundsDirty = !0
    }
    get bounds() {
        return this._boundsDirty ? (this.updateBounds(),
        this._boundsDirty = !1,
        this._bounds) : this._bounds
    }
    get roundPixels() {
        return !!this._roundPixels
    }
    set roundPixels(e) {
        this._roundPixels = e ? 1 : 0
    }
    containsPoint(e) {
        const r = this.bounds
          , {x: n, y: i} = e;
        return n >= r.minX && n <= r.maxX && i >= r.minY && i <= r.maxY
    }
    onViewUpdate() {
        if (this._didViewChangeTick++,
        this._boundsDirty = !0,
        this.didViewUpdate)
            return;
        this.didViewUpdate = !0;
        const e = this.renderGroup || this.parentRenderGroup;
        e && e.onChildViewUpdate(this)
    }
    destroy(e) {
        var r, n;
        super.destroy(e),
        this._bounds = null;
        for (const i in this._gpuData)
            (n = (r = this._gpuData[i]).destroy) == null || n.call(r);
        this._gpuData = null
    }
    collectRenderablesSimple(e, r, n) {
        const {renderPipes: i} = r;
        i.blendMode.pushBlendMode(this, this.groupBlendMode, e),
        i[this.renderPipeId].addRenderable(this, e),
        this.didViewUpdate = !1;
        const s = this.children
          , a = s.length;
        for (let l = 0; l < a; l++)
            s[l].collectRenderables(e, r, n);
        i.blendMode.popBlendMode(e)
    }
}
class Al extends ad {
    constructor(e=Be.EMPTY) {
        e instanceof Be && (e = {
            texture: e
        });
        const {texture: r=Be.EMPTY, anchor: n, roundPixels: i, width: o, height: s, ...a} = e;
        super({
            label: "Sprite",
            ...a
        }),
        this.renderPipeId = "sprite",
        this.batched = !0,
        this._visualBounds = {
            minX: 0,
            maxX: 1,
            minY: 0,
            maxY: 0
        },
        this._anchor = new Jt({
            _onUpdate: () => {
                this.onViewUpdate()
            }
        }),
        n ? this.anchor = n : r.defaultAnchor && (this.anchor = r.defaultAnchor),
        this.texture = r,
        this.allowChildren = !1,
        this.roundPixels = i ?? !1,
        o !== void 0 && (this.width = o),
        s !== void 0 && (this.height = s)
    }
    static from(e, r=!1) {
        return e instanceof Be ? new Al(e) : new Al(Be.from(e, r))
    }
    set texture(e) {
        e || (e = Be.EMPTY);
        const r = this._texture;
        r !== e && (r && r.dynamic && r.off("update", this.onViewUpdate, this),
        e.dynamic && e.on("update", this.onViewUpdate, this),
        this._texture = e,
        this._width && this._setWidth(this._width, this._texture.orig.width),
        this._height && this._setHeight(this._height, this._texture.orig.height),
        this.onViewUpdate())
    }
    get texture() {
        return this._texture
    }
    get visualBounds() {
        return zF(this._visualBounds, this._anchor, this._texture),
        this._visualBounds
    }
    get sourceBounds() {
        return Re("8.6.1", "Sprite.sourceBounds is deprecated, use visualBounds instead."),
        this.visualBounds
    }
    updateBounds() {
        const e = this._anchor
          , r = this._texture
          , n = this._bounds
          , {width: i, height: o} = r.orig;
        n.minX = -e._x * i,
        n.maxX = n.minX + i,
        n.minY = -e._y * o,
        n.maxY = n.minY + o
    }
    destroy(e=!1) {
        if (super.destroy(e),
        typeof e == "boolean" ? e : e == null ? void 0 : e.texture) {
            const n = typeof e == "boolean" ? e : e == null ? void 0 : e.textureSource;
            this._texture.destroy(n)
        }
        this._texture = null,
        this._visualBounds = null,
        this._bounds = null,
        this._anchor = null,
        this._gpuData = null
    }
    get anchor() {
        return this._anchor
    }
    set anchor(e) {
        typeof e == "number" ? this._anchor.set(e) : this._anchor.copyFrom(e)
    }
    get width() {
        return Math.abs(this.scale.x) * this._texture.orig.width
    }
    set width(e) {
        this._setWidth(e, this._texture.orig.width),
        this._width = e
    }
    get height() {
        return Math.abs(this.scale.y) * this._texture.orig.height
    }
    set height(e) {
        this._setHeight(e, this._texture.orig.height),
        this._height = e
    }
    getSize(e) {
        return e || (e = {}),
        e.width = Math.abs(this.scale.x) * this._texture.orig.width,
        e.height = Math.abs(this.scale.y) * this._texture.orig.height,
        e
    }
    setSize(e, r) {
        typeof e == "object" ? (r = e.height ?? e.width,
        e = e.width) : r ?? (r = e),
        e !== void 0 && this._setWidth(e, this._texture.orig.width),
        r !== void 0 && this._setHeight(r, this._texture.orig.height)
    }
}
const $ae = new jr;
function eP(t, e, r) {
    const n = $ae;
    t.measurable = !0,
    fb(t, r, n),
    e.addBoundsMask(n),
    t.measurable = !1
}
function tP(t, e, r) {
    const n = ns.get();
    t.measurable = !0;
    const i = hn.get().identity()
      , o = rP(t, r, i);
    hb(t, n, o),
    t.measurable = !1,
    e.addBoundsMask(n),
    hn.return(i),
    ns.return(n)
}
function rP(t, e, r) {
    return t ? (t !== e && (rP(t.parent, e, r),
    t.updateLocalTransform(),
    r.append(t.localTransform)),
    r) : (Ne("Mask bounds, renderable is not inside the root container"),
    r)
}
class nP {
    constructor(e) {
        this.priority = 0,
        this.inverse = !1,
        this.pipe = "alphaMask",
        e != null && e.mask && this.init(e.mask)
    }
    init(e) {
        this.mask = e,
        this.renderMaskToTexture = !(e instanceof Al),
        this.mask.renderable = this.renderMaskToTexture,
        this.mask.includeInBuild = !this.renderMaskToTexture,
        this.mask.measurable = !1
    }
    reset() {
        this.mask !== null && (this.mask.measurable = !0,
        this.mask = null)
    }
    addBounds(e, r) {
        this.inverse || eP(this.mask, e, r)
    }
    addLocalBounds(e, r) {
        tP(this.mask, e, r)
    }
    containsPoint(e, r) {
        const n = this.mask;
        return r(n, e)
    }
    destroy() {
        this.reset()
    }
    static test(e) {
        return e instanceof Al
    }
}
nP.extension = X.MaskEffect;
class iP {
    constructor(e) {
        this.priority = 0,
        this.pipe = "colorMask",
        e != null && e.mask && this.init(e.mask)
    }
    init(e) {
        this.mask = e
    }
    destroy() {}
    static test(e) {
        return typeof e == "number"
    }
}
iP.extension = X.MaskEffect;
class oP {
    constructor(e) {
        this.priority = 0,
        this.pipe = "stencilMask",
        e != null && e.mask && this.init(e.mask)
    }
    init(e) {
        this.mask = e,
        this.mask.includeInBuild = !1,
        this.mask.measurable = !1
    }
    reset() {
        this.mask !== null && (this.mask.measurable = !0,
        this.mask.includeInBuild = !0,
        this.mask = null)
    }
    addBounds(e, r) {
        eP(this.mask, e, r)
    }
    addLocalBounds(e, r) {
        tP(this.mask, e, r)
    }
    containsPoint(e, r) {
        const n = this.mask;
        return r(n, e)
    }
    destroy() {
        this.reset()
    }
    static test(e) {
        return e instanceof Rn
    }
}
oP.extension = X.MaskEffect;
const Uae = {
    createCanvas: (t, e) => {
        const r = document.createElement("canvas");
        return r.width = t,
        r.height = e,
        r
    }
    ,
    createImage: () => new Image,
    getCanvasRenderingContext2D: () => CanvasRenderingContext2D,
    getWebGLRenderingContext: () => WebGLRenderingContext,
    getNavigator: () => navigator,
    getBaseUrl: () => document.baseURI ?? window.location.href,
    getFontFaceSet: () => document.fonts,
    fetch: (t, e) => fetch(t, e),
    parseXML: t => new DOMParser().parseFromString(t, "text/xml")
};
let yw = Uae;
const je = {
    get() {
        return yw
    },
    set(t) {
        yw = t
    }
};
class go extends Br {
    constructor(e) {
        e.resource || (e.resource = je.get().createCanvas()),
        e.width || (e.width = e.resource.width,
        e.autoDensity || (e.width /= e.resolution)),
        e.height || (e.height = e.resource.height,
        e.autoDensity || (e.height /= e.resolution)),
        super(e),
        this.uploadMethodId = "image",
        this.autoDensity = e.autoDensity,
        this.resizeCanvas(),
        this.transparent = !!e.transparent
    }
    resizeCanvas() {
        this.autoDensity && "style"in this.resource && (this.resource.style.width = `${this.width}px`,
        this.resource.style.height = `${this.height}px`),
        (this.resource.width !== this.pixelWidth || this.resource.height !== this.pixelHeight) && (this.resource.width = this.pixelWidth,
        this.resource.height = this.pixelHeight)
    }
    resize(e=this.width, r=this.height, n=this._resolution) {
        const i = super.resize(e, r, n);
        return i && this.resizeCanvas(),
        i
    }
    static test(e) {
        return globalThis.HTMLCanvasElement && e instanceof HTMLCanvasElement || globalThis.OffscreenCanvas && e instanceof OffscreenCanvas
    }
    get context2D() {
        return this._context2D || (this._context2D = this.resource.getContext("2d"))
    }
}
go.extension = X.TextureSource;
class wl extends Br {
    constructor(e) {
        super(e),
        this.uploadMethodId = "image",
        this.autoGarbageCollect = !0
    }
    static test(e) {
        return globalThis.HTMLImageElement && e instanceof HTMLImageElement || typeof ImageBitmap < "u" && e instanceof ImageBitmap || globalThis.VideoFrame && e instanceof VideoFrame
    }
}
wl.extension = X.TextureSource;
var Bl = (t => (t[t.INTERACTION = 50] = "INTERACTION",
t[t.HIGH = 25] = "HIGH",
t[t.NORMAL = 0] = "NORMAL",
t[t.LOW = -25] = "LOW",
t[t.UTILITY = -50] = "UTILITY",
t))(Bl || {});
class Lg {
    constructor(e, r=null, n=0, i=!1) {
        this.next = null,
        this.previous = null,
        this._destroyed = !1,
        this._fn = e,
        this._context = r,
        this.priority = n,
        this._once = i
    }
    match(e, r=null) {
        return this._fn === e && this._context === r
    }
    emit(e) {
        this._fn && (this._context ? this._fn.call(this._context, e) : this._fn(e));
        const r = this.next;
        return this._once && this.destroy(!0),
        this._destroyed && (this.next = null),
        r
    }
    connect(e) {
        this.previous = e,
        e.next && (e.next.previous = this),
        this.next = e.next,
        e.next = this
    }
    destroy(e=!1) {
        this._destroyed = !0,
        this._fn = null,
        this._context = null,
        this.previous && (this.previous.next = this.next),
        this.next && (this.next.previous = this.previous);
        const r = this.next;
        return this.next = e ? null : r,
        this.previous = null,
        r
    }
}
const sP = class $n {
    constructor() {
        this.autoStart = !1,
        this.deltaTime = 1,
        this.lastTime = -1,
        this.speed = 1,
        this.started = !1,
        this._requestId = null,
        this._maxElapsedMS = 100,
        this._minElapsedMS = 0,
        this._protected = !1,
        this._lastFrame = -1,
        this._head = new Lg(null,null,1 / 0),
        this.deltaMS = 1 / $n.targetFPMS,
        this.elapsedMS = 1 / $n.targetFPMS,
        this._tick = e => {
            this._requestId = null,
            this.started && (this.update(e),
            this.started && this._requestId === null && this._head.next && (this._requestId = requestAnimationFrame(this._tick)))
        }
    }
    _requestIfNeeded() {
        this._requestId === null && this._head.next && (this.lastTime = performance.now(),
        this._lastFrame = this.lastTime,
        this._requestId = requestAnimationFrame(this._tick))
    }
    _cancelIfNeeded() {
        this._requestId !== null && (cancelAnimationFrame(this._requestId),
        this._requestId = null)
    }
    _startIfPossible() {
        this.started ? this._requestIfNeeded() : this.autoStart && this.start()
    }
    add(e, r, n=Bl.NORMAL) {
        return this._addListener(new Lg(e,r,n))
    }
    addOnce(e, r, n=Bl.NORMAL) {
        return this._addListener(new Lg(e,r,n,!0))
    }
    _addListener(e) {
        let r = this._head.next
          , n = this._head;
        if (!r)
            e.connect(n);
        else {
            for (; r; ) {
                if (e.priority > r.priority) {
                    e.connect(n);
                    break
                }
                n = r,
                r = r.next
            }
            e.previous || e.connect(n)
        }
        return this._startIfPossible(),
        this
    }
    remove(e, r) {
        let n = this._head.next;
        for (; n; )
            n.match(e, r) ? n = n.destroy() : n = n.next;
        return this._head.next || this._cancelIfNeeded(),
        this
    }
    get count() {
        if (!this._head)
            return 0;
        let e = 0
          , r = this._head;
        for (; r = r.next; )
            e++;
        return e
    }
    start() {
        this.started || (this.started = !0,
        this._requestIfNeeded())
    }
    stop() {
        this.started && (this.started = !1,
        this._cancelIfNeeded())
    }
    destroy() {
        if (!this._protected) {
            this.stop();
            let e = this._head.next;
            for (; e; )
                e = e.destroy(!0);
            this._head.destroy(),
            this._head = null
        }
    }
    update(e=performance.now()) {
        let r;
        if (e > this.lastTime) {
            if (r = this.elapsedMS = e - this.lastTime,
            r > this._maxElapsedMS && (r = this._maxElapsedMS),
            r *= this.speed,
            this._minElapsedMS) {
                const o = e - this._lastFrame | 0;
                if (o < this._minElapsedMS)
                    return;
                this._lastFrame = e - o % this._minElapsedMS
            }
            this.deltaMS = r,
            this.deltaTime = this.deltaMS * $n.targetFPMS;
            const n = this._head;
            let i = n.next;
            for (; i; )
                i = i.emit(this);
            n.next || this._cancelIfNeeded()
        } else
            this.deltaTime = this.deltaMS = this.elapsedMS = 0;
        this.lastTime = e
    }
    get FPS() {
        return 1e3 / this.elapsedMS
    }
    get minFPS() {
        return 1e3 / this._maxElapsedMS
    }
    set minFPS(e) {
        const r = Math.min(this.maxFPS, e)
          , n = Math.min(Math.max(0, r) / 1e3, $n.targetFPMS);
        this._maxElapsedMS = 1 / n
    }
    get maxFPS() {
        return this._minElapsedMS ? Math.round(1e3 / this._minElapsedMS) : 0
    }
    set maxFPS(e) {
        if (e === 0)
            this._minElapsedMS = 0;
        else {
            const r = Math.max(this.minFPS, e);
            this._minElapsedMS = 1 / (r / 1e3)
        }
    }
    static get shared() {
        if (!$n._shared) {
            const e = $n._shared = new $n;
            e.autoStart = !0,
            e._protected = !0
        }
        return $n._shared
    }
    static get system() {
        if (!$n._system) {
            const e = $n._system = new $n;
            e.autoStart = !0,
            e._protected = !0
        }
        return $n._system
    }
}
;
sP.targetFPMS = .06;
let Hr = sP, $g;
async function aP() {
    return $g ?? ($g = (async () => {
        var s;
        const e = je.get().createCanvas(1, 1).getContext("webgl");
        if (!e)
            return "premultiply-alpha-on-upload";
        const r = await new Promise(a => {
            const l = document.createElement("video");
            l.onloadeddata = () => a(l),
            l.onerror = () => a(null),
            l.autoplay = !1,
            l.crossOrigin = "anonymous",
            l.preload = "auto",
            l.src = "data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",
            l.load()
        }
        );
        if (!r)
            return "premultiply-alpha-on-upload";
        const n = e.createTexture();
        e.bindTexture(e.TEXTURE_2D, n);
        const i = e.createFramebuffer();
        e.bindFramebuffer(e.FRAMEBUFFER, i),
        e.framebufferTexture2D(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0, e.TEXTURE_2D, n, 0),
        e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !1),
        e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL, e.NONE),
        e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, e.RGBA, e.UNSIGNED_BYTE, r);
        const o = new Uint8Array(4);
        return e.readPixels(0, 0, 1, 1, e.RGBA, e.UNSIGNED_BYTE, o),
        e.deleteFramebuffer(i),
        e.deleteTexture(n),
        (s = e.getExtension("WEBGL_lose_context")) == null || s.loseContext(),
        o[0] <= o[3] ? "premultiplied-alpha" : "premultiply-alpha-on-upload"
    }
    )()),
    $g
}
const d1 = class lP extends Br {
    constructor(e) {
        super(e),
        this.isReady = !1,
        this.uploadMethodId = "video",
        e = {
            ...lP.defaultOptions,
            ...e
        },
        this._autoUpdate = !0,
        this._isConnectedToTicker = !1,
        this._updateFPS = e.updateFPS || 0,
        this._msToNextUpdate = 0,
        this.autoPlay = e.autoPlay !== !1,
        this.alphaMode = e.alphaMode ?? "premultiply-alpha-on-upload",
        this._videoFrameRequestCallback = this._videoFrameRequestCallback.bind(this),
        this._videoFrameRequestCallbackHandle = null,
        this._load = null,
        this._resolve = null,
        this._reject = null,
        this._onCanPlay = this._onCanPlay.bind(this),
        this._onCanPlayThrough = this._onCanPlayThrough.bind(this),
        this._onError = this._onError.bind(this),
        this._onPlayStart = this._onPlayStart.bind(this),
        this._onPlayStop = this._onPlayStop.bind(this),
        this._onSeeked = this._onSeeked.bind(this),
        e.autoLoad !== !1 && this.load()
    }
    updateFrame() {
        if (!this.destroyed) {
            if (this._updateFPS) {
                const e = Hr.shared.elapsedMS * this.resource.playbackRate;
                this._msToNextUpdate = Math.floor(this._msToNextUpdate - e)
            }
            (!this._updateFPS || this._msToNextUpdate <= 0) && (this._msToNextUpdate = this._updateFPS ? Math.floor(1e3 / this._updateFPS) : 0),
            this.isValid && this.update()
        }
    }
    _videoFrameRequestCallback() {
        this.updateFrame(),
        this.destroyed ? this._videoFrameRequestCallbackHandle = null : this._videoFrameRequestCallbackHandle = this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback)
    }
    get isValid() {
        return !!this.resource.videoWidth && !!this.resource.videoHeight
    }
    async load() {
        if (this._load)
            return this._load;
        const e = this.resource
          , r = this.options;
        return (e.readyState === e.HAVE_ENOUGH_DATA || e.readyState === e.HAVE_FUTURE_DATA) && e.width && e.height && (e.complete = !0),
        e.addEventListener("play", this._onPlayStart),
        e.addEventListener("pause", this._onPlayStop),
        e.addEventListener("seeked", this._onSeeked),
        this._isSourceReady() ? this._mediaReady() : (r.preload || e.addEventListener("canplay", this._onCanPlay),
        e.addEventListener("canplaythrough", this._onCanPlayThrough),
        e.addEventListener("error", this._onError, !0)),
        this.alphaMode = await aP(),
        this._load = new Promise( (n, i) => {
            this.isValid ? n(this) : (this._resolve = n,
            this._reject = i,
            r.preloadTimeoutMs !== void 0 && (this._preloadTimeout = setTimeout( () => {
                this._onError(new ErrorEvent(`Preload exceeded timeout of ${r.preloadTimeoutMs}ms`))
            }
            )),
            e.load())
        }
        ),
        this._load
    }
    _onError(e) {
        this.resource.removeEventListener("error", this._onError, !0),
        this.emit("error", e),
        this._reject && (this._reject(e),
        this._reject = null,
        this._resolve = null)
    }
    _isSourcePlaying() {
        const e = this.resource;
        return !e.paused && !e.ended
    }
    _isSourceReady() {
        return this.resource.readyState > 2
    }
    _onPlayStart() {
        this.isValid || this._mediaReady(),
        this._configureAutoUpdate()
    }
    _onPlayStop() {
        this._configureAutoUpdate()
    }
    _onSeeked() {
        this._autoUpdate && !this._isSourcePlaying() && (this._msToNextUpdate = 0,
        this.updateFrame(),
        this._msToNextUpdate = 0)
    }
    _onCanPlay() {
        this.resource.removeEventListener("canplay", this._onCanPlay),
        this._mediaReady()
    }
    _onCanPlayThrough() {
        this.resource.removeEventListener("canplaythrough", this._onCanPlay),
        this._preloadTimeout && (clearTimeout(this._preloadTimeout),
        this._preloadTimeout = void 0),
        this._mediaReady()
    }
    _mediaReady() {
        const e = this.resource;
        this.isValid && (this.isReady = !0,
        this.resize(e.videoWidth, e.videoHeight)),
        this._msToNextUpdate = 0,
        this.updateFrame(),
        this._msToNextUpdate = 0,
        this._resolve && (this._resolve(this),
        this._resolve = null,
        this._reject = null),
        this._isSourcePlaying() ? this._onPlayStart() : this.autoPlay && this.resource.play()
    }
    destroy() {
        this._configureAutoUpdate();
        const e = this.resource;
        e && (e.removeEventListener("play", this._onPlayStart),
        e.removeEventListener("pause", this._onPlayStop),
        e.removeEventListener("seeked", this._onSeeked),
        e.removeEventListener("canplay", this._onCanPlay),
        e.removeEventListener("canplaythrough", this._onCanPlayThrough),
        e.removeEventListener("error", this._onError, !0),
        e.pause(),
        e.src = "",
        e.load()),
        super.destroy()
    }
    get autoUpdate() {
        return this._autoUpdate
    }
    set autoUpdate(e) {
        e !== this._autoUpdate && (this._autoUpdate = e,
        this._configureAutoUpdate())
    }
    get updateFPS() {
        return this._updateFPS
    }
    set updateFPS(e) {
        e !== this._updateFPS && (this._updateFPS = e,
        this._configureAutoUpdate())
    }
    _configureAutoUpdate() {
        this._autoUpdate && this._isSourcePlaying() ? !this._updateFPS && this.resource.requestVideoFrameCallback ? (this._isConnectedToTicker && (Hr.shared.remove(this.updateFrame, this),
        this._isConnectedToTicker = !1,
        this._msToNextUpdate = 0),
        this._videoFrameRequestCallbackHandle === null && (this._videoFrameRequestCallbackHandle = this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback))) : (this._videoFrameRequestCallbackHandle !== null && (this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),
        this._videoFrameRequestCallbackHandle = null),
        this._isConnectedToTicker || (Hr.shared.add(this.updateFrame, this),
        this._isConnectedToTicker = !0,
        this._msToNextUpdate = 0)) : (this._videoFrameRequestCallbackHandle !== null && (this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),
        this._videoFrameRequestCallbackHandle = null),
        this._isConnectedToTicker && (Hr.shared.remove(this.updateFrame, this),
        this._isConnectedToTicker = !1,
        this._msToNextUpdate = 0))
    }
    static test(e) {
        return globalThis.HTMLVideoElement && e instanceof HTMLVideoElement
    }
}
;
d1.extension = X.TextureSource;
d1.defaultOptions = {
    ...Br.defaultOptions,
    autoLoad: !0,
    autoPlay: !0,
    updateFPS: 0,
    crossorigin: !0,
    loop: !1,
    muted: !0,
    playsinline: !0,
    preload: !1
};
d1.MIME_TYPES = {
    ogv: "video/ogg",
    mov: "video/quicktime",
    m4v: "video/mp4"
};
let H0 = d1;
const Pi = (t, e, r=!1) => (Array.isArray(t) || (t = [t]),
e ? t.map(n => typeof n == "string" || r ? e(n) : n) : t);
class Gae {
    constructor() {
        this._parsers = [],
        this._cache = new Map,
        this._cacheMap = new Map
    }
    reset() {
        this._cacheMap.clear(),
        this._cache.clear()
    }
    has(e) {
        return this._cache.has(e)
    }
    get(e) {
        const r = this._cache.get(e);
        return r || Ne(`[Assets] Asset id ${e} was not found in the Cache`),
        r
    }
    set(e, r) {
        const n = Pi(e);
        let i;
        for (let l = 0; l < this.parsers.length; l++) {
            const c = this.parsers[l];
            if (c.test(r)) {
                i = c.getCacheableAssets(n, r);
                break
            }
        }
        const o = new Map(Object.entries(i || {}));
        i || n.forEach(l => {
            o.set(l, r)
        }
        );
        const s = [...o.keys()]
          , a = {
            cacheKeys: s,
            keys: n
        };
        n.forEach(l => {
            this._cacheMap.set(l, a)
        }
        ),
        s.forEach(l => {
            const c = i ? i[l] : r;
            this._cache.has(l) && this._cache.get(l) !== c && Ne("[Cache] already has key:", l),
            this._cache.set(l, o.get(l))
        }
        )
    }
    remove(e) {
        if (!this._cacheMap.has(e)) {
            Ne(`[Assets] Asset id ${e} was not found in the Cache`);
            return
        }
        const r = this._cacheMap.get(e);
        r.cacheKeys.forEach(i => {
            this._cache.delete(i)
        }
        ),
        r.keys.forEach(i => {
            this._cacheMap.delete(i)
        }
        )
    }
    get parsers() {
        return this._parsers
    }
}
const Et = new Gae
  , eE = [];
$e.handleByList(X.TextureSource, eE);
function cP(t={}) {
    const e = t && t.resource
      , r = e ? t.resource : t
      , n = e ? t : {
        resource: t
    };
    for (let i = 0; i < eE.length; i++) {
        const o = eE[i];
        if (o.test(r))
            return new o(n)
    }
    throw new Error(`Could not find a source type for resource: ${n.resource}`)
}
function Hae(t={}, e=!1) {
    const r = t && t.resource
      , n = r ? t.resource : t
      , i = r ? t : {
        resource: t
    };
    if (!e && Et.has(n))
        return Et.get(n);
    const o = new Be({
        source: cP(i)
    });
    return o.on("destroy", () => {
        Et.has(n) && Et.remove(n)
    }
    ),
    e || Et.set(n, o),
    o
}
function Vae(t, e=!1) {
    return typeof t == "string" ? Et.get(t) : t instanceof Br ? new Be({
        source: t
    }) : Hae(t, e)
}
Be.from = Vae;
Br.from = cP;
$e.add(nP, iP, oP, H0, wl, go, ub);
var _a = (t => (t[t.Low = 0] = "Low",
t[t.Normal = 1] = "Normal",
t[t.High = 2] = "High",
t))(_a || {});
function Ai(t) {
    if (typeof t != "string")
        throw new TypeError(`Path must be a string. Received ${JSON.stringify(t)}`)
}
function e0(t) {
    return t.split("?")[0].split("#")[0]
}
function zae(t) {
    return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
}
function jae(t, e, r) {
    return t.replace(new RegExp(zae(e),"g"), r)
}
function Wae(t, e) {
    let r = ""
      , n = 0
      , i = -1
      , o = 0
      , s = -1;
    for (let a = 0; a <= t.length; ++a) {
        if (a < t.length)
            s = t.charCodeAt(a);
        else {
            if (s === 47)
                break;
            s = 47
        }
        if (s === 47) {
            if (!(i === a - 1 || o === 1))
                if (i !== a - 1 && o === 2) {
                    if (r.length < 2 || n !== 2 || r.charCodeAt(r.length - 1) !== 46 || r.charCodeAt(r.length - 2) !== 46) {
                        if (r.length > 2) {
                            const l = r.lastIndexOf("/");
                            if (l !== r.length - 1) {
                                l === -1 ? (r = "",
                                n = 0) : (r = r.slice(0, l),
                                n = r.length - 1 - r.lastIndexOf("/")),
                                i = a,
                                o = 0;
                                continue
                            }
                        } else if (r.length === 2 || r.length === 1) {
                            r = "",
                            n = 0,
                            i = a,
                            o = 0;
                            continue
                        }
                    }
                    e && (r.length > 0 ? r += "/.." : r = "..",
                    n = 2)
                } else
                    r.length > 0 ? r += `/${t.slice(i + 1, a)}` : r = t.slice(i + 1, a),
                    n = a - i - 1;
            i = a,
            o = 0
        } else
            s === 46 && o !== -1 ? ++o : o = -1
    }
    return r
}
const Fn = {
    toPosix(t) {
        return jae(t, "\\", "/")
    },
    isUrl(t) {
        return /^https?:/.test(this.toPosix(t))
    },
    isDataUrl(t) {
        return /^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(t)
    },
    isBlobUrl(t) {
        return t.startsWith("blob:")
    },
    hasProtocol(t) {
        return /^[^/:]+:/.test(this.toPosix(t))
    },
    getProtocol(t) {
        Ai(t),
        t = this.toPosix(t);
        const e = /^file:\/\/\//.exec(t);
        if (e)
            return e[0];
        const r = /^[^/:]+:\/{0,2}/.exec(t);
        return r ? r[0] : ""
    },
    toAbsolute(t, e, r) {
        if (Ai(t),
        this.isDataUrl(t) || this.isBlobUrl(t))
            return t;
        const n = e0(this.toPosix(e ?? je.get().getBaseUrl()))
          , i = e0(this.toPosix(r ?? this.rootname(n)));
        return t = this.toPosix(t),
        t.startsWith("/") ? Fn.join(i, t.slice(1)) : this.isAbsolute(t) ? t : this.join(n, t)
    },
    normalize(t) {
        if (Ai(t),
        t.length === 0)
            return ".";
        if (this.isDataUrl(t) || this.isBlobUrl(t))
            return t;
        t = this.toPosix(t);
        let e = "";
        const r = t.startsWith("/");
        this.hasProtocol(t) && (e = this.rootname(t),
        t = t.slice(e.length));
        const n = t.endsWith("/");
        return t = Wae(t, !1),
        t.length > 0 && n && (t += "/"),
        r ? `/${t}` : e + t
    },
    isAbsolute(t) {
        return Ai(t),
        t = this.toPosix(t),
        this.hasProtocol(t) ? !0 : t.startsWith("/")
    },
    join(...t) {
        if (t.length === 0)
            return ".";
        let e;
        for (let r = 0; r < t.length; ++r) {
            const n = t[r];
            if (Ai(n),
            n.length > 0)
                if (e === void 0)
                    e = n;
                else {
                    const i = t[r - 1] ?? "";
                    this.joinExtensions.includes(this.extname(i).toLowerCase()) ? e += `/../${n}` : e += `/${n}`
                }
        }
        return e === void 0 ? "." : this.normalize(e)
    },
    dirname(t) {
        if (Ai(t),
        t.length === 0)
            return ".";
        t = this.toPosix(t);
        let e = t.charCodeAt(0);
        const r = e === 47;
        let n = -1
          , i = !0;
        const o = this.getProtocol(t)
          , s = t;
        t = t.slice(o.length);
        for (let a = t.length - 1; a >= 1; --a)
            if (e = t.charCodeAt(a),
            e === 47) {
                if (!i) {
                    n = a;
                    break
                }
            } else
                i = !1;
        return n === -1 ? r ? "/" : this.isUrl(s) ? o + t : o : r && n === 1 ? "//" : o + t.slice(0, n)
    },
    rootname(t) {
        Ai(t),
        t = this.toPosix(t);
        let e = "";
        if (t.startsWith("/") ? e = "/" : e = this.getProtocol(t),
        this.isUrl(t)) {
            const r = t.indexOf("/", e.length);
            r !== -1 ? e = t.slice(0, r) : e = t,
            e.endsWith("/") || (e += "/")
        }
        return e
    },
    basename(t, e) {
        Ai(t),
        e && Ai(e),
        t = e0(this.toPosix(t));
        let r = 0, n = -1, i = !0, o;
        if (e !== void 0 && e.length > 0 && e.length <= t.length) {
            if (e.length === t.length && e === t)
                return "";
            let s = e.length - 1
              , a = -1;
            for (o = t.length - 1; o >= 0; --o) {
                const l = t.charCodeAt(o);
                if (l === 47) {
                    if (!i) {
                        r = o + 1;
                        break
                    }
                } else
                    a === -1 && (i = !1,
                    a = o + 1),
                    s >= 0 && (l === e.charCodeAt(s) ? --s === -1 && (n = o) : (s = -1,
                    n = a))
            }
            return r === n ? n = a : n === -1 && (n = t.length),
            t.slice(r, n)
        }
        for (o = t.length - 1; o >= 0; --o)
            if (t.charCodeAt(o) === 47) {
                if (!i) {
                    r = o + 1;
                    break
                }
            } else
                n === -1 && (i = !1,
                n = o + 1);
        return n === -1 ? "" : t.slice(r, n)
    },
    extname(t) {
        Ai(t),
        t = e0(this.toPosix(t));
        let e = -1
          , r = 0
          , n = -1
          , i = !0
          , o = 0;
        for (let s = t.length - 1; s >= 0; --s) {
            const a = t.charCodeAt(s);
            if (a === 47) {
                if (!i) {
                    r = s + 1;
                    break
                }
                continue
            }
            n === -1 && (i = !1,
            n = s + 1),
            a === 46 ? e === -1 ? e = s : o !== 1 && (o = 1) : e !== -1 && (o = -1)
        }
        return e === -1 || n === -1 || o === 0 || o === 1 && e === n - 1 && e === r + 1 ? "" : t.slice(e, n)
    },
    parse(t) {
        Ai(t);
        const e = {
            root: "",
            dir: "",
            base: "",
            ext: "",
            name: ""
        };
        if (t.length === 0)
            return e;
        t = e0(this.toPosix(t));
        let r = t.charCodeAt(0);
        const n = this.isAbsolute(t);
        let i;
        e.root = this.rootname(t),
        n || this.hasProtocol(t) ? i = 1 : i = 0;
        let o = -1
          , s = 0
          , a = -1
          , l = !0
          , c = t.length - 1
          , u = 0;
        for (; c >= i; --c) {
            if (r = t.charCodeAt(c),
            r === 47) {
                if (!l) {
                    s = c + 1;
                    break
                }
                continue
            }
            a === -1 && (l = !1,
            a = c + 1),
            r === 46 ? o === -1 ? o = c : u !== 1 && (u = 1) : o !== -1 && (u = -1)
        }
        return o === -1 || a === -1 || u === 0 || u === 1 && o === a - 1 && o === s + 1 ? a !== -1 && (s === 0 && n ? e.base = e.name = t.slice(1, a) : e.base = e.name = t.slice(s, a)) : (s === 0 && n ? (e.name = t.slice(1, o),
        e.base = t.slice(1, a)) : (e.name = t.slice(s, o),
        e.base = t.slice(s, a)),
        e.ext = t.slice(o, a)),
        e.dir = this.dirname(t),
        e
    },
    sep: "/",
    delimiter: ":",
    joinExtensions: [".html"]
};
function uP(t, e, r, n, i) {
    const o = e[r];
    for (let s = 0; s < o.length; s++) {
        const a = o[s];
        r < e.length - 1 ? uP(t.replace(n[r], a), e, r + 1, n, i) : i.push(t.replace(n[r], a))
    }
}
function Yae(t) {
    const e = /\{(.*?)\}/g
      , r = t.match(e)
      , n = [];
    if (r) {
        const i = [];
        r.forEach(o => {
            const s = o.substring(1, o.length - 1).split(",");
            i.push(s)
        }
        ),
        uP(t, i, 0, r, n)
    } else
        n.push(t);
    return n
}
const Lx = t => !Array.isArray(t);
class Pu {
    constructor() {
        this._defaultBundleIdentifierOptions = {
            connector: "-",
            createBundleAssetId: (e, r) => `${e}${this._bundleIdConnector}${r}`,
            extractAssetIdFromBundle: (e, r) => r.replace(`${e}${this._bundleIdConnector}`, "")
        },
        this._bundleIdConnector = this._defaultBundleIdentifierOptions.connector,
        this._createBundleAssetId = this._defaultBundleIdentifierOptions.createBundleAssetId,
        this._extractAssetIdFromBundle = this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,
        this._assetMap = {},
        this._preferredOrder = [],
        this._parsers = [],
        this._resolverHash = {},
        this._bundles = {}
    }
    setBundleIdentifier(e) {
        if (this._bundleIdConnector = e.connector ?? this._bundleIdConnector,
        this._createBundleAssetId = e.createBundleAssetId ?? this._createBundleAssetId,
        this._extractAssetIdFromBundle = e.extractAssetIdFromBundle ?? this._extractAssetIdFromBundle,
        this._extractAssetIdFromBundle("foo", this._createBundleAssetId("foo", "bar")) !== "bar")
            throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")
    }
    prefer(...e) {
        e.forEach(r => {
            this._preferredOrder.push(r),
            r.priority || (r.priority = Object.keys(r.params))
        }
        ),
        this._resolverHash = {}
    }
    set basePath(e) {
        this._basePath = e
    }
    get basePath() {
        return this._basePath
    }
    set rootPath(e) {
        this._rootPath = e
    }
    get rootPath() {
        return this._rootPath
    }
    get parsers() {
        return this._parsers
    }
    reset() {
        this.setBundleIdentifier(this._defaultBundleIdentifierOptions),
        this._assetMap = {},
        this._preferredOrder = [],
        this._resolverHash = {},
        this._rootPath = null,
        this._basePath = null,
        this._manifest = null,
        this._bundles = {},
        this._defaultSearchParams = null
    }
    setDefaultSearchParams(e) {
        if (typeof e == "string")
            this._defaultSearchParams = e;
        else {
            const r = e;
            this._defaultSearchParams = Object.keys(r).map(n => `${encodeURIComponent(n)}=${encodeURIComponent(r[n])}`).join("&")
        }
    }
    getAlias(e) {
        const {alias: r, src: n} = e;
        return Pi(r || n, o => typeof o == "string" ? o : Array.isArray(o) ? o.map(s => (s == null ? void 0 : s.src) ?? s) : o != null && o.src ? o.src : o, !0)
    }
    addManifest(e) {
        this._manifest && Ne("[Resolver] Manifest already exists, this will be overwritten"),
        this._manifest = e,
        e.bundles.forEach(r => {
            this.addBundle(r.name, r.assets)
        }
        )
    }
    addBundle(e, r) {
        const n = [];
        let i = r;
        Array.isArray(r) || (i = Object.entries(r).map( ([o,s]) => typeof s == "string" || Array.isArray(s) ? {
            alias: o,
            src: s
        } : {
            alias: o,
            ...s
        })),
        i.forEach(o => {
            const s = o.src
              , a = o.alias;
            let l;
            if (typeof a == "string") {
                const c = this._createBundleAssetId(e, a);
                n.push(c),
                l = [a, c]
            } else {
                const c = a.map(u => this._createBundleAssetId(e, u));
                n.push(...c),
                l = [...a, ...c]
            }
            this.add({
                ...o,
                alias: l,
                src: s
            })
        }
        ),
        this._bundles[e] = n
    }
    add(e) {
        const r = [];
        Array.isArray(e) ? r.push(...e) : r.push(e);
        let n;
        n = o => {
            this.hasKey(o) && Ne(`[Resolver] already has key: ${o} overwriting`)
        }
        ,
        Pi(r).forEach(o => {
            const {src: s} = o;
            let {data: a, format: l, loadParser: c, parser: u} = o;
            const f = Pi(s).map(y => typeof y == "string" ? Yae(y) : Array.isArray(y) ? y : [y])
              , d = this.getAlias(o);
            Array.isArray(d) ? d.forEach(n) : n(d);
            const h = []
              , x = y => {
                const m = this._parsers.find(E => E.test(y));
                return {
                    ...m == null ? void 0 : m.parse(y),
                    src: y
                }
            }
            ;
            f.forEach(y => {
                y.forEach(m => {
                    let E = {};
                    if (typeof m != "object" ? E = x(m) : (a = m.data ?? a,
                    l = m.format ?? l,
                    (m.loadParser || m.parser) && (c = m.loadParser ?? c,
                    u = m.parser ?? u),
                    E = {
                        ...x(m.src),
                        ...m
                    }),
                    !d)
                        throw new Error(`[Resolver] alias is undefined for this asset: ${E.src}`);
                    E = this._buildResolvedAsset(E, {
                        aliases: d,
                        data: a,
                        format: l,
                        loadParser: c,
                        parser: u,
                        progressSize: o.progressSize
                    }),
                    h.push(E)
                }
                )
            }
            ),
            d.forEach(y => {
                this._assetMap[y] = h
            }
            )
        }
        )
    }
    resolveBundle(e) {
        const r = Lx(e);
        e = Pi(e);
        const n = {};
        return e.forEach(i => {
            const o = this._bundles[i];
            if (o) {
                const s = this.resolve(o)
                  , a = {};
                for (const l in s) {
                    const c = s[l];
                    a[this._extractAssetIdFromBundle(i, l)] = c
                }
                n[i] = a
            }
        }
        ),
        r ? n[e[0]] : n
    }
    resolveUrl(e) {
        const r = this.resolve(e);
        if (typeof e != "string") {
            const n = {};
            for (const i in r)
                n[i] = r[i].src;
            return n
        }
        return r.src
    }
    resolve(e) {
        const r = Lx(e);
        e = Pi(e);
        const n = {};
        return e.forEach(i => {
            if (!this._resolverHash[i])
                if (this._assetMap[i]) {
                    let o = this._assetMap[i];
                    const s = this._getPreferredOrder(o);
                    s == null || s.priority.forEach(a => {
                        s.params[a].forEach(l => {
                            const c = o.filter(u => u[a] ? u[a] === l : !1);
                            c.length && (o = c)
                        }
                        )
                    }
                    ),
                    this._resolverHash[i] = o[0]
                } else
                    this._resolverHash[i] = this._buildResolvedAsset({
                        alias: [i],
                        src: i
                    }, {});
            n[i] = this._resolverHash[i]
        }
        ),
        r ? n[e[0]] : n
    }
    hasKey(e) {
        return !!this._assetMap[e]
    }
    hasBundle(e) {
        return !!this._bundles[e]
    }
    _getPreferredOrder(e) {
        for (let r = 0; r < e.length; r++) {
            const n = e[r]
              , i = this._preferredOrder.find(o => o.params.format.includes(n.format));
            if (i)
                return i
        }
        return this._preferredOrder[0]
    }
    _appendDefaultSearchParams(e) {
        if (!this._defaultSearchParams)
            return e;
        const r = /\?/.test(e) ? "&" : "?";
        return `${e}${r}${this._defaultSearchParams}`
    }
    _buildResolvedAsset(e, r) {
        const {aliases: n, data: i, loadParser: o, parser: s, format: a, progressSize: l} = r;
        return (this._basePath || this._rootPath) && (e.src = Fn.toAbsolute(e.src, this._basePath, this._rootPath)),
        e.alias = n ?? e.alias ?? [e.src],
        e.src = this._appendDefaultSearchParams(e.src),
        e.data = {
            ...i || {},
            ...e.data
        },
        e.loadParser = o ?? e.loadParser,
        e.parser = s ?? e.parser,
        e.format = a ?? e.format ?? Xae(e.src),
        l !== void 0 && (e.progressSize = l),
        e
    }
}
Pu.RETINA_PREFIX = /@([0-9\.]+)x/;
function Xae(t) {
    return t.split(".").pop().split("?").shift().split("#").shift()
}
const tE = (t, e) => {
    const r = e.split("?")[1];
    return r && (t += `?${r}`),
    t
}
  , fP = class v0 {
    constructor(e, r) {
        this.linkedSheets = [];
        let n = e;
        (e == null ? void 0 : e.source)instanceof Br && (n = {
            texture: e,
            data: r
        });
        const {texture: i, data: o, cachePrefix: s=""} = n;
        this.cachePrefix = s,
        this._texture = i instanceof Be ? i : null,
        this.textureSource = i.source,
        this.textures = {},
        this.animations = {},
        this.data = o;
        const a = parseFloat(o.meta.scale);
        a ? (this.resolution = a,
        i.source.resolution = this.resolution) : this.resolution = i.source._resolution,
        this._frames = this.data.frames,
        this._frameKeys = Object.keys(this._frames),
        this._batchIndex = 0,
        this._callback = null
    }
    parse() {
        return new Promise(e => {
            this._callback = e,
            this._batchIndex = 0,
            this._frameKeys.length <= v0.BATCH_SIZE ? (this._processFrames(0),
            this._processAnimations(),
            this._parseComplete()) : this._nextBatch()
        }
        )
    }
    _processFrames(e) {
        let r = e;
        const n = v0.BATCH_SIZE;
        for (; r - e < n && r < this._frameKeys.length; ) {
            const i = this._frameKeys[r]
              , o = this._frames[i]
              , s = o.frame;
            if (s) {
                let a = null
                  , l = null;
                const c = o.trimmed !== !1 && o.sourceSize ? o.sourceSize : o.frame
                  , u = new mt(0,0,Math.floor(c.w) / this.resolution,Math.floor(c.h) / this.resolution);
                o.rotated ? a = new mt(Math.floor(s.x) / this.resolution,Math.floor(s.y) / this.resolution,Math.floor(s.h) / this.resolution,Math.floor(s.w) / this.resolution) : a = new mt(Math.floor(s.x) / this.resolution,Math.floor(s.y) / this.resolution,Math.floor(s.w) / this.resolution,Math.floor(s.h) / this.resolution),
                o.trimmed !== !1 && o.spriteSourceSize && (l = new mt(Math.floor(o.spriteSourceSize.x) / this.resolution,Math.floor(o.spriteSourceSize.y) / this.resolution,Math.floor(s.w) / this.resolution,Math.floor(s.h) / this.resolution)),
                this.textures[i] = new Be({
                    source: this.textureSource,
                    frame: a,
                    orig: u,
                    trim: l,
                    rotate: o.rotated ? 2 : 0,
                    defaultAnchor: o.anchor,
                    defaultBorders: o.borders,
                    label: i.toString()
                })
            }
            r++
        }
    }
    _processAnimations() {
        const e = this.data.animations || {};
        for (const r in e) {
            this.animations[r] = [];
            for (let n = 0; n < e[r].length; n++) {
                const i = e[r][n];
                this.animations[r].push(this.textures[i])
            }
        }
    }
    _parseComplete() {
        const e = this._callback;
        this._callback = null,
        this._batchIndex = 0,
        e.call(this, this.textures)
    }
    _nextBatch() {
        this._processFrames(this._batchIndex * v0.BATCH_SIZE),
        this._batchIndex++,
        setTimeout( () => {
            this._batchIndex * v0.BATCH_SIZE < this._frameKeys.length ? this._nextBatch() : (this._processAnimations(),
            this._parseComplete())
        }
        , 0)
    }
    destroy(e=!1) {
        var r;
        for (const n in this.textures)
            this.textures[n].destroy();
        this._frames = null,
        this._frameKeys = null,
        this.data = null,
        this.textures = null,
        e && ((r = this._texture) == null || r.destroy(),
        this.textureSource.destroy()),
        this._texture = null,
        this.textureSource = null,
        this.linkedSheets = []
    }
}
;
fP.BATCH_SIZE = 1e3;
let Ew = fP;
const Kae = ["jpg", "png", "jpeg", "avif", "webp", "basis", "etc2", "bc7", "bc6h", "bc5", "bc4", "bc3", "bc2", "bc1", "eac", "astc"];
function dP(t, e, r) {
    const n = {};
    if (t.forEach(i => {
        n[i] = e
    }
    ),
    Object.keys(e.textures).forEach(i => {
        n[`${e.cachePrefix}${i}`] = e.textures[i]
    }
    ),
    !r) {
        const i = Fn.dirname(t[0]);
        e.linkedSheets.forEach( (o, s) => {
            const a = dP([`${i}/${e.data.meta.related_multi_packs[s]}`], o, !0);
            Object.assign(n, a)
        }
        )
    }
    return n
}
const qae = {
    extension: X.Asset,
    cache: {
        test: t => t instanceof Ew,
        getCacheableAssets: (t, e) => dP(t, e, !1)
    },
    resolver: {
        extension: {
            type: X.ResolveParser,
            name: "resolveSpritesheet"
        },
        test: t => {
            const r = t.split("?")[0].split(".")
              , n = r.pop()
              , i = r.pop();
            return n === "json" && Kae.includes(i)
        }
        ,
        parse: t => {
            var r;
            const e = t.split(".");
            return {
                resolution: parseFloat(((r = Pu.RETINA_PREFIX.exec(t)) == null ? void 0 : r[1]) ?? "1"),
                format: e[e.length - 2],
                src: t
            }
        }
    },
    loader: {
        name: "spritesheetLoader",
        id: "spritesheet",
        extension: {
            type: X.LoadParser,
            priority: _a.Normal,
            name: "spritesheetLoader"
        },
        async testParse(t, e) {
            return Fn.extname(e.src).toLowerCase() === ".json" && !!t.frames
        },
        async parse(t, e, r) {
            var f, d;
            const {texture: n, imageFilename: i, textureOptions: o, cachePrefix: s} = (e == null ? void 0 : e.data) ?? {};
            let a = Fn.dirname(e.src);
            a && a.lastIndexOf("/") !== a.length - 1 && (a += "/");
            let l;
            if (n instanceof Be)
                l = n;
            else {
                const h = tE(a + (i ?? t.meta.image), e.src);
                l = (await r.load([{
                    src: h,
                    data: o
                }]))[h]
            }
            const c = new Ew({
                texture: l.source,
                data: t,
                cachePrefix: s
            });
            await c.parse();
            const u = (f = t == null ? void 0 : t.meta) == null ? void 0 : f.related_multi_packs;
            if (Array.isArray(u)) {
                const h = [];
                for (const y of u) {
                    if (typeof y != "string")
                        continue;
                    let m = a + y;
                    (d = e.data) != null && d.ignoreMultiPack || (m = tE(m, e.src),
                    h.push(r.load({
                        src: m,
                        data: {
                            textureOptions: o,
                            ignoreMultiPack: !0
                        }
                    })))
                }
                const x = await Promise.all(h);
                c.linkedSheets = x,
                x.forEach(y => {
                    y.linkedSheets = [c].concat(c.linkedSheets.filter(m => m !== y))
                }
                )
            }
            return c
        },
        async unload(t, e, r) {
            await r.unload(t.textureSource._sourceOrigin),
            t.destroy(!1)
        }
    }
};
$e.add(qae);
class hP {
    constructor(e) {
        this._lastTransform = "",
        this._observer = null,
        this._tickerAttached = !1,
        this.updateTranslation = () => {
            if (!this._canvas)
                return;
            const r = this._canvas.getBoundingClientRect()
              , n = this._canvas.width
              , i = this._canvas.height
              , o = r.width / n * this._renderer.resolution
              , s = r.height / i * this._renderer.resolution
              , a = r.left
              , l = r.top
              , c = `translate(${a}px, ${l}px) scale(${o}, ${s})`;
            c !== this._lastTransform && (this._domElement.style.transform = c,
            this._lastTransform = c)
        }
        ,
        this._domElement = e.domElement,
        this._renderer = e.renderer,
        !(globalThis.OffscreenCanvas && this._renderer.canvas instanceof OffscreenCanvas) && (this._canvas = this._renderer.canvas,
        this._attachObserver())
    }
    get canvas() {
        return this._canvas
    }
    ensureAttached() {
        !this._domElement.parentNode && this._canvas.parentNode && (this._canvas.parentNode.appendChild(this._domElement),
        this.updateTranslation())
    }
    _attachObserver() {
        "ResizeObserver"in globalThis ? (this._observer && (this._observer.disconnect(),
        this._observer = null),
        this._observer = new ResizeObserver(e => {
            for (const r of e) {
                if (r.target !== this._canvas)
                    continue;
                const n = this.canvas.width
                  , i = this.canvas.height
                  , o = r.contentRect.width / n * this._renderer.resolution
                  , s = r.contentRect.height / i * this._renderer.resolution;
                (this._lastScaleX !== o || this._lastScaleY !== s) && (this.updateTranslation(),
                this._lastScaleX = o,
                this._lastScaleY = s)
            }
        }
        ),
        this._observer.observe(this._canvas)) : this._tickerAttached || Hr.shared.add(this.updateTranslation, this, Bl.HIGH)
    }
    destroy() {
        this._observer ? (this._observer.disconnect(),
        this._observer = null) : this._tickerAttached && Hr.shared.remove(this.updateTranslation),
        this._domElement = null,
        this._renderer = null,
        this._canvas = null,
        this._tickerAttached = !1,
        this._lastTransform = "",
        this._lastScaleX = null,
        this._lastScaleY = null
    }
}
class ld {
    constructor(e) {
        this.bubbles = !0,
        this.cancelBubble = !0,
        this.cancelable = !1,
        this.composed = !1,
        this.defaultPrevented = !1,
        this.eventPhase = ld.prototype.NONE,
        this.propagationStopped = !1,
        this.propagationImmediatelyStopped = !1,
        this.layer = new Gt,
        this.page = new Gt,
        this.NONE = 0,
        this.CAPTURING_PHASE = 1,
        this.AT_TARGET = 2,
        this.BUBBLING_PHASE = 3,
        this.manager = e
    }
    get layerX() {
        return this.layer.x
    }
    get layerY() {
        return this.layer.y
    }
    get pageX() {
        return this.page.x
    }
    get pageY() {
        return this.page.y
    }
    get data() {
        return this
    }
    composedPath() {
        return this.manager && (!this.path || this.path[this.path.length - 1] !== this.target) && (this.path = this.target ? this.manager.propagationPath(this.target) : []),
        this.path
    }
    initEvent(e, r, n) {
        throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")
    }
    initUIEvent(e, r, n, i, o) {
        throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")
    }
    preventDefault() {
        this.nativeEvent instanceof Event && this.nativeEvent.cancelable && this.nativeEvent.preventDefault(),
        this.defaultPrevented = !0
    }
    stopImmediatePropagation() {
        this.propagationImmediatelyStopped = !0
    }
    stopPropagation() {
        this.propagationStopped = !0
    }
}
var Ug = /iPhone/i
  , _w = /iPod/i
  , bw = /iPad/i
  , Cw = /\biOS-universal(?:.+)Mac\b/i
  , Gg = /\bAndroid(?:.+)Mobile\b/i
  , Aw = /Android/i
  , cc = /(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i
  , hh = /Silk/i
  , $o = /Windows Phone/i
  , ww = /\bWindows(?:.+)ARM\b/i
  , Bw = /BlackBerry/i
  , Sw = /BB10/i
  , Tw = /Opera Mini/i
  , Dw = /\b(CriOS|Chrome)(?:.+)Mobile/i
  , Fw = /Mobile(?:.+)Firefox\b/i
  , Pw = function(t) {
    return typeof t < "u" && t.platform === "MacIntel" && typeof t.maxTouchPoints == "number" && t.maxTouchPoints > 1 && typeof MSStream > "u"
};
function Zae(t) {
    return function(e) {
        return e.test(t)
    }
}
function Iw(t) {
    var e = {
        userAgent: "",
        platform: "",
        maxTouchPoints: 0
    };
    !t && typeof navigator < "u" ? e = {
        userAgent: navigator.userAgent,
        platform: navigator.platform,
        maxTouchPoints: navigator.maxTouchPoints || 0
    } : typeof t == "string" ? e.userAgent = t : t && t.userAgent && (e = {
        userAgent: t.userAgent,
        platform: t.platform,
        maxTouchPoints: t.maxTouchPoints || 0
    });
    var r = e.userAgent
      , n = r.split("[FBAN");
    typeof n[1] < "u" && (r = n[0]),
    n = r.split("Twitter"),
    typeof n[1] < "u" && (r = n[0]);
    var i = Zae(r)
      , o = {
        apple: {
            phone: i(Ug) && !i($o),
            ipod: i(_w),
            tablet: !i(Ug) && (i(bw) || Pw(e)) && !i($o),
            universal: i(Cw),
            device: (i(Ug) || i(_w) || i(bw) || i(Cw) || Pw(e)) && !i($o)
        },
        amazon: {
            phone: i(cc),
            tablet: !i(cc) && i(hh),
            device: i(cc) || i(hh)
        },
        android: {
            phone: !i($o) && i(cc) || !i($o) && i(Gg),
            tablet: !i($o) && !i(cc) && !i(Gg) && (i(hh) || i(Aw)),
            device: !i($o) && (i(cc) || i(hh) || i(Gg) || i(Aw)) || i(/\bokhttp\b/i)
        },
        windows: {
            phone: i($o),
            tablet: i(ww),
            device: i($o) || i(ww)
        },
        other: {
            blackberry: i(Bw),
            blackberry10: i(Sw),
            opera: i(Tw),
            firefox: i(Fw),
            chrome: i(Dw),
            device: i(Bw) || i(Sw) || i(Tw) || i(Fw) || i(Dw)
        },
        any: !1,
        phone: !1,
        tablet: !1
    };
    return o.any = o.apple.device || o.android.device || o.windows.device || o.other.device,
    o.phone = o.apple.phone || o.android.phone || o.windows.phone,
    o.tablet = o.apple.tablet || o.android.tablet || o.windows.tablet,
    o
}
const Jae = Iw.default ?? Iw
  , Qae = Jae(globalThis.navigator)
  , ele = 9
  , Ow = 100
  , tle = 0
  , rle = 0
  , kw = 2
  , Rw = 1
  , nle = -1e3
  , ile = -1e3
  , ole = 2
  , pb = class xP {
    constructor(e, r=Qae) {
        this._mobileInfo = r,
        this.debug = !1,
        this._activateOnTab = !0,
        this._deactivateOnMouseMove = !0,
        this._isActive = !1,
        this._isMobileAccessibility = !1,
        this._div = null,
        this._pools = {},
        this._renderId = 0,
        this._children = [],
        this._androidUpdateCount = 0,
        this._androidUpdateFrequency = 500,
        this._isRunningTests = !1,
        this._boundOnKeyDown = this._onKeyDown.bind(this),
        this._boundOnMouseMove = this._onMouseMove.bind(this),
        this._hookDiv = null,
        (r.tablet || r.phone) && this._createTouchHook(),
        this._renderer = e
    }
    get isActive() {
        return this._isActive
    }
    get isMobileAccessibility() {
        return this._isMobileAccessibility
    }
    get hookDiv() {
        return this._hookDiv
    }
    get div() {
        return this._div
    }
    _createTouchHook() {
        const e = document.createElement("button");
        e.style.width = `${Rw}px`,
        e.style.height = `${Rw}px`,
        e.style.position = "absolute",
        e.style.top = `${nle}px`,
        e.style.left = `${ile}px`,
        e.style.zIndex = ole.toString(),
        e.style.backgroundColor = "#FF0000",
        e.title = "select to enable accessibility for this content",
        e.addEventListener("focus", () => {
            this._isMobileAccessibility = !0,
            this._activate(),
            this._destroyTouchHook()
        }
        ),
        document.body.appendChild(e),
        this._hookDiv = e
    }
    _destroyTouchHook() {
        this._hookDiv && (document.body.removeChild(this._hookDiv),
        this._hookDiv = null)
    }
    _activate() {
        if (this._isActive)
            return;
        this._isActive = !0,
        this._div || (this._div = document.createElement("div"),
        this._div.style.position = "absolute",
        this._div.style.top = `${tle}px`,
        this._div.style.left = `${rle}px`,
        this._div.style.pointerEvents = "none",
        this._div.style.zIndex = kw.toString(),
        this._canvasObserver = new hP({
            domElement: this._div,
            renderer: this._renderer
        })),
        this._activateOnTab && globalThis.addEventListener("keydown", this._boundOnKeyDown, !1),
        this._deactivateOnMouseMove && globalThis.document.addEventListener("mousemove", this._boundOnMouseMove, !0);
        const e = this._renderer.view.canvas;
        if (e.parentNode)
            this._canvasObserver.ensureAttached(),
            this._initAccessibilitySetup();
        else {
            const r = new MutationObserver( () => {
                e.parentNode && (r.disconnect(),
                this._canvasObserver.ensureAttached(),
                this._initAccessibilitySetup())
            }
            );
            r.observe(document.body, {
                childList: !0,
                subtree: !0
            })
        }
    }
    _initAccessibilitySetup() {
        this._renderer.runners.postrender.add(this),
        this._renderer.lastObjectRendered && this._updateAccessibleObjects(this._renderer.lastObjectRendered)
    }
    _deactivate() {
        var e, r;
        if (!(!this._isActive || this._isMobileAccessibility)) {
            this._isActive = !1,
            globalThis.document.removeEventListener("mousemove", this._boundOnMouseMove, !0),
            this._activateOnTab && globalThis.addEventListener("keydown", this._boundOnKeyDown, !1),
            this._renderer.runners.postrender.remove(this);
            for (const n of this._children)
                (e = n._accessibleDiv) != null && e.parentNode && (n._accessibleDiv.parentNode.removeChild(n._accessibleDiv),
                n._accessibleDiv = null),
                n._accessibleActive = !1;
            for (const n in this._pools)
                this._pools[n].forEach(o => {
                    o.parentNode && o.parentNode.removeChild(o)
                }
                ),
                delete this._pools[n];
            (r = this._div) != null && r.parentNode && this._div.parentNode.removeChild(this._div),
            this._pools = {},
            this._children = []
        }
    }
    _updateAccessibleObjects(e) {
        if (!e.visible || !e.accessibleChildren)
            return;
        e.accessible && (e._accessibleActive || this._addChild(e),
        e._renderId = this._renderId);
        const r = e.children;
        if (r)
            for (let n = 0; n < r.length; n++)
                this._updateAccessibleObjects(r[n])
    }
    init(e) {
        const n = {
            accessibilityOptions: {
                ...xP.defaultOptions,
                ...(e == null ? void 0 : e.accessibilityOptions) || {}
            }
        };
        this.debug = n.accessibilityOptions.debug,
        this._activateOnTab = n.accessibilityOptions.activateOnTab,
        this._deactivateOnMouseMove = n.accessibilityOptions.deactivateOnMouseMove,
        n.accessibilityOptions.enabledByDefault && this._activate(),
        this._renderer.runners.postrender.remove(this)
    }
    postrender() {
        const e = performance.now();
        if (this._mobileInfo.android.device && e < this._androidUpdateCount || (this._androidUpdateCount = e + this._androidUpdateFrequency,
        (!this._renderer.renderingToScreen || !this._renderer.view.canvas) && !this._isRunningTests))
            return;
        const r = new Set;
        if (this._renderer.lastObjectRendered) {
            this._updateAccessibleObjects(this._renderer.lastObjectRendered);
            for (const n of this._children)
                n._renderId === this._renderId && r.add(this._children.indexOf(n))
        }
        for (let n = this._children.length - 1; n >= 0; n--) {
            const i = this._children[n];
            r.has(n) || (i._accessibleDiv && i._accessibleDiv.parentNode && (i._accessibleDiv.parentNode.removeChild(i._accessibleDiv),
            this._getPool(i.accessibleType).push(i._accessibleDiv),
            i._accessibleDiv = null),
            i._accessibleActive = !1,
            XF(this._children, n, 1))
        }
        this._renderer.renderingToScreen && this._canvasObserver.ensureAttached();
        for (let n = 0; n < this._children.length; n++) {
            const i = this._children[n];
            if (!i._accessibleActive || !i._accessibleDiv)
                continue;
            const o = i._accessibleDiv
              , s = i.hitArea || i.getBounds().rectangle;
            if (i.hitArea) {
                const a = i.worldTransform;
                o.style.left = `${a.tx + s.x * a.a}px`,
                o.style.top = `${a.ty + s.y * a.d}px`,
                o.style.width = `${s.width * a.a}px`,
                o.style.height = `${s.height * a.d}px`
            } else
                this._capHitArea(s),
                o.style.left = `${s.x}px`,
                o.style.top = `${s.y}px`,
                o.style.width = `${s.width}px`,
                o.style.height = `${s.height}px`
        }
        this._renderId++
    }
    _updateDebugHTML(e) {
        e.innerHTML = `type: ${e.type}</br> title : ${e.title}</br> tabIndex: ${e.tabIndex}`
    }
    _capHitArea(e) {
        e.x < 0 && (e.width += e.x,
        e.x = 0),
        e.y < 0 && (e.height += e.y,
        e.y = 0);
        const {width: r, height: n} = this._renderer;
        e.x + e.width > r && (e.width = r - e.x),
        e.y + e.height > n && (e.height = n - e.y)
    }
    _addChild(e) {
        let n = this._getPool(e.accessibleType).pop();
        n ? (n.innerHTML = "",
        n.removeAttribute("title"),
        n.removeAttribute("aria-label"),
        n.tabIndex = 0) : (e.accessibleType === "button" ? n = document.createElement("button") : (n = document.createElement(e.accessibleType),
        n.style.cssText = `
                        color: transparent;
                        pointer-events: none;
                        padding: 0;
                        margin: 0;
                        border: 0;
                        outline: 0;
                        background: transparent;
                        box-sizing: border-box;
                        user-select: none;
                        -webkit-user-select: none;
                        -moz-user-select: none;
                        -ms-user-select: none;
                    `,
        e.accessibleText && (n.innerText = e.accessibleText)),
        n.style.width = `${Ow}px`,
        n.style.height = `${Ow}px`,
        n.style.backgroundColor = this.debug ? "rgba(255,255,255,0.5)" : "transparent",
        n.style.position = "absolute",
        n.style.zIndex = kw.toString(),
        n.style.borderStyle = "none",
        navigator.userAgent.toLowerCase().includes("chrome") ? n.setAttribute("aria-live", "off") : n.setAttribute("aria-live", "polite"),
        navigator.userAgent.match(/rv:.*Gecko\//) ? n.setAttribute("aria-relevant", "additions") : n.setAttribute("aria-relevant", "text"),
        n.addEventListener("click", this._onClick.bind(this)),
        n.addEventListener("focus", this._onFocus.bind(this)),
        n.addEventListener("focusout", this._onFocusOut.bind(this))),
        n.style.pointerEvents = e.accessiblePointerEvents,
        n.type = e.accessibleType,
        e.accessibleTitle && e.accessibleTitle !== null ? n.title = e.accessibleTitle : (!e.accessibleHint || e.accessibleHint === null) && (n.title = `container ${e.tabIndex}`),
        e.accessibleHint && e.accessibleHint !== null && n.setAttribute("aria-label", e.accessibleHint),
        e.interactive ? n.tabIndex = e.tabIndex : n.tabIndex = 0,
        this.debug && this._updateDebugHTML(n),
        e._accessibleActive = !0,
        e._accessibleDiv = n,
        n.container = e,
        this._children.push(e),
        this._div.appendChild(e._accessibleDiv)
    }
    _dispatchEvent(e, r) {
        const {container: n} = e.target
          , i = this._renderer.events.rootBoundary
          , o = Object.assign(new ld(i), {
            target: n
        });
        i.rootTarget = this._renderer.lastObjectRendered,
        r.forEach(s => i.dispatchEvent(o, s))
    }
    _onClick(e) {
        this._dispatchEvent(e, ["click", "pointertap", "tap"])
    }
    _onFocus(e) {
        e.target.getAttribute("aria-live") || e.target.setAttribute("aria-live", "assertive"),
        this._dispatchEvent(e, ["mouseover"])
    }
    _onFocusOut(e) {
        e.target.getAttribute("aria-live") || e.target.setAttribute("aria-live", "polite"),
        this._dispatchEvent(e, ["mouseout"])
    }
    _onKeyDown(e) {
        e.keyCode !== ele || !this._activateOnTab || this._activate()
    }
    _onMouseMove(e) {
        e.movementX === 0 && e.movementY === 0 || this._deactivate()
    }
    destroy() {
        var e;
        this._deactivate(),
        this._destroyTouchHook(),
        (e = this._canvasObserver) == null || e.destroy(),
        this._canvasObserver = null,
        this._div = null,
        this._pools = null,
        this._children = null,
        this._renderer = null,
        this._hookDiv = null,
        globalThis.removeEventListener("keydown", this._boundOnKeyDown),
        this._boundOnKeyDown = null,
        globalThis.document.removeEventListener("mousemove", this._boundOnMouseMove, !0),
        this._boundOnMouseMove = null
    }
    setAccessibilityEnabled(e) {
        e ? this._activate() : this._deactivate()
    }
    _getPool(e) {
        return this._pools[e] || (this._pools[e] = []),
        this._pools[e]
    }
}
;
pb.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem],
    name: "accessibility"
};
pb.defaultOptions = {
    enabledByDefault: !1,
    debug: !1,
    activateOnTab: !0,
    deactivateOnMouseMove: !0
};
let sle = pb;
const ale = {
    accessible: !1,
    accessibleTitle: null,
    accessibleHint: null,
    tabIndex: 0,
    accessibleType: "button",
    accessibleText: null,
    accessiblePointerEvents: "auto",
    accessibleChildren: !0,
    _accessibleActive: !1,
    _accessibleDiv: null,
    _renderId: -1
}
  , Hg = Object.create(null)
  , Mw = Object.create(null);
function wf(t, e) {
    let r = Mw[t];
    return r === void 0 && (Hg[e] === void 0 && (Hg[e] = 1),
    Mw[t] = r = Hg[e]++),
    r
}
let uc;
function pP() {
    return (!uc || uc != null && uc.isContextLost()) && (uc = je.get().createCanvas().getContext("webgl", {})),
    uc
}
let xh;
function lle() {
    if (!xh) {
        xh = "mediump";
        const t = pP();
        t && t.getShaderPrecisionFormat && (xh = t.getShaderPrecisionFormat(t.FRAGMENT_SHADER, t.HIGH_FLOAT).precision ? "highp" : "mediump")
    }
    return xh
}
function cle(t, e, r) {
    return e ? t : r ? (t = t.replace("out vec4 finalColor;", ""),
    `

        #ifdef GL_ES // This checks if it is WebGL1
        #define in varying
        #define finalColor gl_FragColor
        #define texture texture2D
        #endif
        ${t}
        `) : `

        #ifdef GL_ES // This checks if it is WebGL1
        #define in attribute
        #define out varying
        #endif
        ${t}
        `
}
function ule(t, e, r) {
    const n = r ? e.maxSupportedFragmentPrecision : e.maxSupportedVertexPrecision;
    if (t.substring(0, 9) !== "precision") {
        let i = r ? e.requestedFragmentPrecision : e.requestedVertexPrecision;
        return i === "highp" && n !== "highp" && (i = "mediump"),
        `precision ${i} float;
${t}`
    } else if (n !== "highp" && t.substring(0, 15) === "precision highp")
        return t.replace("precision highp", "precision mediump");
    return t
}
function fle(t, e) {
    return e ? `#version 300 es
${t}` : t
}
const dle = {}
  , hle = {};
function xle(t, {name: e="pixi-program"}, r=!0) {
    e = e.replace(/\s+/g, "-"),
    e += r ? "-fragment" : "-vertex";
    const n = r ? dle : hle;
    return n[e] ? (n[e]++,
    e += `-${n[e]}`) : n[e] = 1,
    t.indexOf("#define SHADER_NAME") !== -1 ? t : `${`#define SHADER_NAME ${e}`}
${t}`
}
function ple(t, e) {
    return e ? t.replace("#version 300 es", "") : t
}
const Vg = {
    stripVersion: ple,
    ensurePrecision: ule,
    addProgramDefines: cle,
    setProgramName: xle,
    insertVersion: fle
}
  , t0 = Object.create(null)
  , gP = class rE {
    constructor(e) {
        e = {
            ...rE.defaultOptions,
            ...e
        };
        const r = e.fragment.indexOf("#version 300 es") !== -1
          , n = {
            stripVersion: r,
            ensurePrecision: {
                requestedFragmentPrecision: e.preferredFragmentPrecision,
                requestedVertexPrecision: e.preferredVertexPrecision,
                maxSupportedVertexPrecision: "highp",
                maxSupportedFragmentPrecision: lle()
            },
            setProgramName: {
                name: e.name
            },
            addProgramDefines: r,
            insertVersion: r
        };
        let i = e.fragment
          , o = e.vertex;
        Object.keys(Vg).forEach(s => {
            const a = n[s];
            i = Vg[s](i, a, !0),
            o = Vg[s](o, a, !1)
        }
        ),
        this.fragment = i,
        this.vertex = o,
        this.transformFeedbackVaryings = e.transformFeedbackVaryings,
        this._key = wf(`${this.vertex}:${this.fragment}`, "gl-program")
    }
    destroy() {
        this.fragment = null,
        this.vertex = null,
        this._attributeData = null,
        this._uniformData = null,
        this._uniformBlockData = null,
        this.transformFeedbackVaryings = null,
        t0[this._cacheKey] = null
    }
    static from(e) {
        const r = `${e.vertex}:${e.fragment}`;
        return t0[r] || (t0[r] = new rE(e),
        t0[r]._cacheKey = r),
        t0[r]
    }
}
;
gP.defaultOptions = {
    preferredVertexPrecision: "highp",
    preferredFragmentPrecision: "mediump"
};
let ba = gP;
const Nw = {
    uint8x2: {
        size: 2,
        stride: 2,
        normalised: !1
    },
    uint8x4: {
        size: 4,
        stride: 4,
        normalised: !1
    },
    sint8x2: {
        size: 2,
        stride: 2,
        normalised: !1
    },
    sint8x4: {
        size: 4,
        stride: 4,
        normalised: !1
    },
    unorm8x2: {
        size: 2,
        stride: 2,
        normalised: !0
    },
    unorm8x4: {
        size: 4,
        stride: 4,
        normalised: !0
    },
    snorm8x2: {
        size: 2,
        stride: 2,
        normalised: !0
    },
    snorm8x4: {
        size: 4,
        stride: 4,
        normalised: !0
    },
    uint16x2: {
        size: 2,
        stride: 4,
        normalised: !1
    },
    uint16x4: {
        size: 4,
        stride: 8,
        normalised: !1
    },
    sint16x2: {
        size: 2,
        stride: 4,
        normalised: !1
    },
    sint16x4: {
        size: 4,
        stride: 8,
        normalised: !1
    },
    unorm16x2: {
        size: 2,
        stride: 4,
        normalised: !0
    },
    unorm16x4: {
        size: 4,
        stride: 8,
        normalised: !0
    },
    snorm16x2: {
        size: 2,
        stride: 4,
        normalised: !0
    },
    snorm16x4: {
        size: 4,
        stride: 8,
        normalised: !0
    },
    float16x2: {
        size: 2,
        stride: 4,
        normalised: !1
    },
    float16x4: {
        size: 4,
        stride: 8,
        normalised: !1
    },
    float32: {
        size: 1,
        stride: 4,
        normalised: !1
    },
    float32x2: {
        size: 2,
        stride: 8,
        normalised: !1
    },
    float32x3: {
        size: 3,
        stride: 12,
        normalised: !1
    },
    float32x4: {
        size: 4,
        stride: 16,
        normalised: !1
    },
    uint32: {
        size: 1,
        stride: 4,
        normalised: !1
    },
    uint32x2: {
        size: 2,
        stride: 8,
        normalised: !1
    },
    uint32x3: {
        size: 3,
        stride: 12,
        normalised: !1
    },
    uint32x4: {
        size: 4,
        stride: 16,
        normalised: !1
    },
    sint32: {
        size: 1,
        stride: 4,
        normalised: !1
    },
    sint32x2: {
        size: 2,
        stride: 8,
        normalised: !1
    },
    sint32x3: {
        size: 3,
        stride: 12,
        normalised: !1
    },
    sint32x4: {
        size: 4,
        stride: 16,
        normalised: !1
    }
};
function ha(t) {
    return Nw[t] ?? Nw.float32
}
const gle = {
    f32: "float32",
    "vec2<f32>": "float32x2",
    "vec3<f32>": "float32x3",
    "vec4<f32>": "float32x4",
    vec2f: "float32x2",
    vec3f: "float32x3",
    vec4f: "float32x4",
    i32: "sint32",
    "vec2<i32>": "sint32x2",
    "vec3<i32>": "sint32x3",
    "vec4<i32>": "sint32x4",
    u32: "uint32",
    "vec2<u32>": "uint32x2",
    "vec3<u32>": "uint32x3",
    "vec4<u32>": "uint32x4",
    bool: "uint32",
    "vec2<bool>": "uint32x2",
    "vec3<bool>": "uint32x3",
    "vec4<bool>": "uint32x4"
};
function mle({source: t, entryPoint: e}) {
    const r = {}
      , n = t.indexOf(`fn ${e}`);
    if (n !== -1) {
        const i = t.indexOf("->", n);
        if (i !== -1) {
            const o = t.substring(n, i)
              , s = /@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|$)/g;
            let a;
            for (; (a = s.exec(o)) !== null; ) {
                const l = gle[a[3]] ?? "float32";
                r[a[2]] = {
                    location: parseInt(a[1], 10),
                    format: l,
                    stride: ha(l).stride,
                    offset: 0,
                    instance: !1,
                    start: 0
                }
            }
        }
    }
    return r
}
function zg(t) {
    var f, d;
    const e = /(^|[^/])@(group|binding)\(\d+\)[^;]+;/g
      , r = /@group\((\d+)\)/
      , n = /@binding\((\d+)\)/
      , i = /var(<[^>]+>)? (\w+)/
      , o = /:\s*(\w+)/
      , s = /struct\s+(\w+)\s*{([^}]+)}/g
      , a = /(\w+)\s*:\s*([\w\<\>]+)/g
      , l = /struct\s+(\w+)/
      , c = (f = t.match(e)) == null ? void 0 : f.map(h => ({
        group: parseInt(h.match(r)[1], 10),
        binding: parseInt(h.match(n)[1], 10),
        name: h.match(i)[2],
        isUniform: h.match(i)[1] === "<uniform>",
        type: h.match(o)[1]
    }));
    if (!c)
        return {
            groups: [],
            structs: []
        };
    const u = ((d = t.match(s)) == null ? void 0 : d.map(h => {
        const x = h.match(l)[1]
          , y = h.match(a).reduce( (m, E) => {
            const [g,p] = E.split(":");
            return m[g.trim()] = p.trim(),
            m
        }
        , {});
        return y ? {
            name: x,
            members: y
        } : null
    }
    ).filter( ({name: h}) => c.some(x => x.type === h))) ?? [];
    return {
        groups: c,
        structs: u
    }
}
var y0 = (t => (t[t.VERTEX = 1] = "VERTEX",
t[t.FRAGMENT = 2] = "FRAGMENT",
t[t.COMPUTE = 4] = "COMPUTE",
t))(y0 || {});
function vle({groups: t}) {
    const e = [];
    for (let r = 0; r < t.length; r++) {
        const n = t[r];
        e[n.group] || (e[n.group] = []),
        n.isUniform ? e[n.group].push({
            binding: n.binding,
            visibility: y0.VERTEX | y0.FRAGMENT,
            buffer: {
                type: "uniform"
            }
        }) : n.type === "sampler" ? e[n.group].push({
            binding: n.binding,
            visibility: y0.FRAGMENT,
            sampler: {
                type: "filtering"
            }
        }) : n.type === "texture_2d" && e[n.group].push({
            binding: n.binding,
            visibility: y0.FRAGMENT,
            texture: {
                sampleType: "float",
                viewDimension: "2d",
                multisampled: !1
            }
        })
    }
    return e
}
function yle({groups: t}) {
    const e = [];
    for (let r = 0; r < t.length; r++) {
        const n = t[r];
        e[n.group] || (e[n.group] = {}),
        e[n.group][n.name] = n.binding
    }
    return e
}
function Ele(t, e) {
    const r = new Set
      , n = new Set
      , i = [...t.structs, ...e.structs].filter(s => r.has(s.name) ? !1 : (r.add(s.name),
    !0))
      , o = [...t.groups, ...e.groups].filter(s => {
        const a = `${s.name}-${s.binding}`;
        return n.has(a) ? !1 : (n.add(a),
        !0)
    }
    );
    return {
        structs: i,
        groups: o
    }
}
const r0 = Object.create(null);
class Cs {
    constructor(e) {
        var a, l;
        this._layoutKey = 0,
        this._attributeLocationsKey = 0;
        const {fragment: r, vertex: n, layout: i, gpuLayout: o, name: s} = e;
        if (this.name = s,
        this.fragment = r,
        this.vertex = n,
        r.source === n.source) {
            const c = zg(r.source);
            this.structsAndGroups = c
        } else {
            const c = zg(n.source)
              , u = zg(r.source);
            this.structsAndGroups = Ele(c, u)
        }
        this.layout = i ?? yle(this.structsAndGroups),
        this.gpuLayout = o ?? vle(this.structsAndGroups),
        this.autoAssignGlobalUniforms = ((a = this.layout[0]) == null ? void 0 : a.globalUniforms) !== void 0,
        this.autoAssignLocalUniforms = ((l = this.layout[1]) == null ? void 0 : l.localUniforms) !== void 0,
        this._generateProgramKey()
    }
    _generateProgramKey() {
        const {vertex: e, fragment: r} = this
          , n = e.source + r.source + e.entryPoint + r.entryPoint;
        this._layoutKey = wf(n, "program")
    }
    get attributeData() {
        return this._attributeData ?? (this._attributeData = mle(this.vertex)),
        this._attributeData
    }
    destroy() {
        this.gpuLayout = null,
        this.layout = null,
        this.structsAndGroups = null,
        this.fragment = null,
        this.vertex = null,
        r0[this._cacheKey] = null
    }
    static from(e) {
        const r = `${e.vertex.source}:${e.fragment.source}:${e.fragment.entryPoint}:${e.vertex.entryPoint}`;
        return r0[r] || (r0[r] = new Cs(e),
        r0[r]._cacheKey = r),
        r0[r]
    }
}
const mP = ["f32", "i32", "vec2<f32>", "vec3<f32>", "vec4<f32>", "mat2x2<f32>", "mat3x3<f32>", "mat4x4<f32>", "mat3x2<f32>", "mat4x2<f32>", "mat2x3<f32>", "mat4x3<f32>", "mat2x4<f32>", "mat3x4<f32>", "vec2<i32>", "vec3<i32>", "vec4<i32>"]
  , _le = mP.reduce( (t, e) => (t[e] = !0,
t), {});
function ble(t, e) {
    switch (t) {
    case "f32":
        return 0;
    case "vec2<f32>":
        return new Float32Array(2 * e);
    case "vec3<f32>":
        return new Float32Array(3 * e);
    case "vec4<f32>":
        return new Float32Array(4 * e);
    case "mat2x2<f32>":
        return new Float32Array([1, 0, 0, 1]);
    case "mat3x3<f32>":
        return new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1]);
    case "mat4x4<f32>":
        return new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1])
    }
    return null
}
const vP = class yP {
    constructor(e, r) {
        this._touched = 0,
        this.uid = Dt("uniform"),
        this._resourceType = "uniformGroup",
        this._resourceId = Dt("resource"),
        this.isUniformGroup = !0,
        this._dirtyId = 0,
        this.destroyed = !1,
        r = {
            ...yP.defaultOptions,
            ...r
        },
        this.uniformStructures = e;
        const n = {};
        for (const i in e) {
            const o = e[i];
            if (o.name = i,
            o.size = o.size ?? 1,
            !_le[o.type]) {
                const s = o.type.match(/^array<(\w+(?:<\w+>)?),\s*(\d+)>$/);
                if (s) {
                    const [,a,l] = s;
                    throw new Error(`Uniform type ${o.type} is not supported. Use type: '${a}', size: ${l} instead.`)
                }
                throw new Error(`Uniform type ${o.type} is not supported. Supported uniform types are: ${mP.join(", ")}`)
            }
            o.value ?? (o.value = ble(o.type, o.size)),
            n[i] = o.value
        }
        this.uniforms = n,
        this._dirtyId = 1,
        this.ubo = r.ubo,
        this.isStatic = r.isStatic,
        this._signature = wf(Object.keys(n).map(i => `${i}-${e[i].type}`).join("-"), "uniform-group")
    }
    update() {
        this._dirtyId++
    }
}
;
vP.defaultOptions = {
    ubo: !1,
    isStatic: !1
};
let vn = vP;
class is {
    constructor(e) {
        this.resources = Object.create(null),
        this._dirty = !0;
        let r = 0;
        for (const n in e) {
            const i = e[n];
            this.setResource(i, r++)
        }
        this._updateKey()
    }
    _updateKey() {
        if (!this._dirty)
            return;
        this._dirty = !1;
        const e = [];
        let r = 0;
        for (const n in this.resources)
            e[r++] = this.resources[n]._resourceId;
        this._key = e.join("|")
    }
    setResource(e, r) {
        var i, o;
        const n = this.resources[r];
        e !== n && (n && ((i = e.off) == null || i.call(e, "change", this.onResourceChange, this)),
        (o = e.on) == null || o.call(e, "change", this.onResourceChange, this),
        this.resources[r] = e,
        this._dirty = !0)
    }
    getResource(e) {
        return this.resources[e]
    }
    _touch(e) {
        const r = this.resources;
        for (const n in r)
            r[n]._touched = e
    }
    destroy() {
        var r;
        const e = this.resources;
        for (const n in e) {
            const i = e[n];
            (r = i == null ? void 0 : i.off) == null || r.call(i, "change", this.onResourceChange, this)
        }
        this.resources = null
    }
    onResourceChange(e) {
        if (this._dirty = !0,
        e.destroyed) {
            const r = this.resources;
            for (const n in r)
                r[n] === e && (r[n] = null)
        } else
            this._updateKey()
    }
}
var qn = (t => (t[t.WEBGL = 1] = "WEBGL",
t[t.WEBGPU = 2] = "WEBGPU",
t[t.BOTH = 3] = "BOTH",
t))(qn || {});
class _i extends Qn {
    constructor(e) {
        super(),
        this.uid = Dt("shader"),
        this._uniformBindMap = Object.create(null),
        this._ownedBindGroups = [],
        this._destroyed = !1;
        let {gpuProgram: r, glProgram: n, groups: i, resources: o, compatibleRenderers: s, groupMap: a} = e;
        this.gpuProgram = r,
        this.glProgram = n,
        s === void 0 && (s = 0,
        r && (s |= qn.WEBGPU),
        n && (s |= qn.WEBGL)),
        this.compatibleRenderers = s;
        const l = {};
        if (!o && !i && (o = {}),
        o && i)
            throw new Error("[Shader] Cannot have both resources and groups");
        if (!r && i && !a)
            throw new Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");
        if (!r && i && a)
            for (const c in a)
                for (const u in a[c]) {
                    const f = a[c][u];
                    l[f] = {
                        group: c,
                        binding: u,
                        name: f
                    }
                }
        else if (r && i && !a) {
            const c = r.structsAndGroups.groups;
            a = {},
            c.forEach(u => {
                a[u.group] = a[u.group] || {},
                a[u.group][u.binding] = u.name,
                l[u.name] = u
            }
            )
        } else if (o) {
            i = {},
            a = {},
            r && r.structsAndGroups.groups.forEach(f => {
                a[f.group] = a[f.group] || {},
                a[f.group][f.binding] = f.name,
                l[f.name] = f
            }
            );
            let c = 0;
            for (const u in o)
                l[u] || (i[99] || (i[99] = new is,
                this._ownedBindGroups.push(i[99])),
                l[u] = {
                    group: 99,
                    binding: c,
                    name: u
                },
                a[99] = a[99] || {},
                a[99][c] = u,
                c++);
            for (const u in o) {
                const f = u;
                let d = o[u];
                !d.source && !d._resourceType && (d = new vn(d));
                const h = l[f];
                h && (i[h.group] || (i[h.group] = new is,
                this._ownedBindGroups.push(i[h.group])),
                i[h.group].setResource(d, h.binding))
            }
        }
        this.groups = i,
        this._uniformBindMap = a,
        this.resources = this._buildResourceAccessor(i, l)
    }
    addResource(e, r, n) {
        var i, o;
        (i = this._uniformBindMap)[r] || (i[r] = {}),
        (o = this._uniformBindMap[r])[n] || (o[n] = e),
        this.groups[r] || (this.groups[r] = new is,
        this._ownedBindGroups.push(this.groups[r]))
    }
    _buildResourceAccessor(e, r) {
        const n = {};
        for (const i in r) {
            const o = r[i];
            Object.defineProperty(n, o.name, {
                get() {
                    return e[o.group].getResource(o.binding)
                },
                set(s) {
                    e[o.group].setResource(s, o.binding)
                }
            })
        }
        return n
    }
    destroy(e=!1) {
        var r, n;
        this._destroyed || (this._destroyed = !0,
        this.emit("destroy", this),
        e && ((r = this.gpuProgram) == null || r.destroy(),
        (n = this.glProgram) == null || n.destroy()),
        this.gpuProgram = null,
        this.glProgram = null,
        this.removeAllListeners(),
        this._uniformBindMap = null,
        this._ownedBindGroups.forEach(i => {
            i.destroy()
        }
        ),
        this._ownedBindGroups = null,
        this.resources = null,
        this.groups = null)
    }
    static from(e) {
        const {gpu: r, gl: n, ...i} = e;
        let o, s;
        return r && (o = Cs.from(r)),
        n && (s = ba.from(n)),
        new _i({
            gpuProgram: o,
            glProgram: s,
            ...i
        })
    }
}
const Cle = {
    normal: 0,
    add: 1,
    multiply: 2,
    screen: 3,
    overlay: 4,
    erase: 5,
    "normal-npm": 6,
    "add-npm": 7,
    "screen-npm": 8,
    min: 9,
    max: 10
}
  , jg = 0
  , Wg = 1
  , Yg = 2
  , Xg = 3
  , Kg = 4
  , qg = 5
  , nE = class EP {
    constructor() {
        this.data = 0,
        this.blendMode = "normal",
        this.polygonOffset = 0,
        this.blend = !0,
        this.depthMask = !0
    }
    get blend() {
        return !!(this.data & 1 << jg)
    }
    set blend(e) {
        !!(this.data & 1 << jg) !== e && (this.data ^= 1 << jg)
    }
    get offsets() {
        return !!(this.data & 1 << Wg)
    }
    set offsets(e) {
        !!(this.data & 1 << Wg) !== e && (this.data ^= 1 << Wg)
    }
    set cullMode(e) {
        if (e === "none") {
            this.culling = !1;
            return
        }
        this.culling = !0,
        this.clockwiseFrontFace = e === "front"
    }
    get cullMode() {
        return this.culling ? this.clockwiseFrontFace ? "front" : "back" : "none"
    }
    get culling() {
        return !!(this.data & 1 << Yg)
    }
    set culling(e) {
        !!(this.data & 1 << Yg) !== e && (this.data ^= 1 << Yg)
    }
    get depthTest() {
        return !!(this.data & 1 << Xg)
    }
    set depthTest(e) {
        !!(this.data & 1 << Xg) !== e && (this.data ^= 1 << Xg)
    }
    get depthMask() {
        return !!(this.data & 1 << qg)
    }
    set depthMask(e) {
        !!(this.data & 1 << qg) !== e && (this.data ^= 1 << qg)
    }
    get clockwiseFrontFace() {
        return !!(this.data & 1 << Kg)
    }
    set clockwiseFrontFace(e) {
        !!(this.data & 1 << Kg) !== e && (this.data ^= 1 << Kg)
    }
    get blendMode() {
        return this._blendMode
    }
    set blendMode(e) {
        this.blend = e !== "none",
        this._blendMode = e,
        this._blendModeId = Cle[e] || 0
    }
    get polygonOffset() {
        return this._polygonOffset
    }
    set polygonOffset(e) {
        this.offsets = !!e,
        this._polygonOffset = e
    }
    toString() {
        return `[pixi.js/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`
    }
    static for2d() {
        const e = new EP;
        return e.depthTest = !1,
        e.blend = !0,
        e
    }
}
;
nE.default2d = nE.for2d();
let Hi = nE;
const _P = class iE extends _i {
    constructor(e) {
        e = {
            ...iE.defaultOptions,
            ...e
        },
        super(e),
        this.enabled = !0,
        this._state = Hi.for2d(),
        this.blendMode = e.blendMode,
        this.padding = e.padding,
        typeof e.antialias == "boolean" ? this.antialias = e.antialias ? "on" : "off" : this.antialias = e.antialias,
        this.resolution = e.resolution,
        this.blendRequired = e.blendRequired,
        this.clipToViewport = e.clipToViewport,
        this.addResource("uTexture", 0, 1),
        e.blendRequired && this.addResource("uBackTexture", 0, 3)
    }
    apply(e, r, n, i) {
        e.applyFilter(this, r, n, i)
    }
    get blendMode() {
        return this._state.blendMode
    }
    set blendMode(e) {
        this._state.blendMode = e
    }
    static from(e) {
        const {gpu: r, gl: n, ...i} = e;
        let o, s;
        return r && (o = Cs.from(r)),
        n && (s = ba.from(n)),
        new iE({
            gpuProgram: o,
            glProgram: s,
            ...i
        })
    }
}
;
_P.defaultOptions = {
    blendMode: "normal",
    resolution: 1,
    padding: 0,
    antialias: "off",
    blendRequired: !1,
    clipToViewport: !0
};
let h1 = _P;
const oE = [];
$e.handleByNamedList(X.Environment, oE);
async function Ale(t) {
    if (!t)
        for (let e = 0; e < oE.length; e++) {
            const r = oE[e];
            if (r.value.test()) {
                await r.value.load();
                return
            }
        }
}
let n0;
function bP() {
    if (typeof n0 == "boolean")
        return n0;
    try {
        n0 = new Function("param1","param2","param3","return param1[param2] === param3;")({
            a: "b"
        }, "a", "b") === !0
    } catch {
        n0 = !1
    }
    return n0
}
function Lw(t, e, r=2) {
    const n = e && e.length
      , i = n ? e[0] * r : t.length;
    let o = CP(t, 0, i, r, !0);
    const s = [];
    if (!o || o.next === o.prev)
        return s;
    let a, l, c;
    if (n && (o = Dle(t, e, o, r)),
    t.length > 80 * r) {
        a = t[0],
        l = t[1];
        let u = a
          , f = l;
        for (let d = r; d < i; d += r) {
            const h = t[d]
              , x = t[d + 1];
            h < a && (a = h),
            x < l && (l = x),
            h > u && (u = h),
            x > f && (f = x)
        }
        c = Math.max(u - a, f - l),
        c = c !== 0 ? 32767 / c : 0
    }
    return Bf(o, s, r, a, l, c, 0),
    s
}
function CP(t, e, r, n, i) {
    let o;
    if (i === Ule(t, e, r, n) > 0)
        for (let s = e; s < r; s += n)
            o = $w(s / n | 0, t[s], t[s + 1], o);
    else
        for (let s = r - n; s >= e; s -= n)
            o = $w(s / n | 0, t[s], t[s + 1], o);
    return o && au(o, o.next) && (Tf(o),
    o = o.next),
    o
}
function Sl(t, e) {
    if (!t)
        return t;
    e || (e = t);
    let r = t, n;
    do
        if (n = !1,
        !r.steiner && (au(r, r.next) || Yt(r.prev, r, r.next) === 0)) {
            if (Tf(r),
            r = e = r.prev,
            r === r.next)
                break;
            n = !0
        } else
            r = r.next;
    while (n || r !== e);
    return e
}
function Bf(t, e, r, n, i, o, s) {
    if (!t)
        return;
    !s && o && kle(t, n, i, o);
    let a = t;
    for (; t.prev !== t.next; ) {
        const l = t.prev
          , c = t.next;
        if (o ? Ble(t, n, i, o) : wle(t)) {
            e.push(l.i, t.i, c.i),
            Tf(t),
            t = c.next,
            a = c.next;
            continue
        }
        if (t = c,
        t === a) {
            s ? s === 1 ? (t = Sle(Sl(t), e),
            Bf(t, e, r, n, i, o, 2)) : s === 2 && Tle(t, e, r, n, i, o) : Bf(Sl(t), e, r, n, i, o, 1);
            break
        }
    }
}
function wle(t) {
    const e = t.prev
      , r = t
      , n = t.next;
    if (Yt(e, r, n) >= 0)
        return !1;
    const i = e.x
      , o = r.x
      , s = n.x
      , a = e.y
      , l = r.y
      , c = n.y
      , u = Math.min(i, o, s)
      , f = Math.min(a, l, c)
      , d = Math.max(i, o, s)
      , h = Math.max(a, l, c);
    let x = n.next;
    for (; x !== e; ) {
        if (x.x >= u && x.x <= d && x.y >= f && x.y <= h && E0(i, a, o, l, s, c, x.x, x.y) && Yt(x.prev, x, x.next) >= 0)
            return !1;
        x = x.next
    }
    return !0
}
function Ble(t, e, r, n) {
    const i = t.prev
      , o = t
      , s = t.next;
    if (Yt(i, o, s) >= 0)
        return !1;
    const a = i.x
      , l = o.x
      , c = s.x
      , u = i.y
      , f = o.y
      , d = s.y
      , h = Math.min(a, l, c)
      , x = Math.min(u, f, d)
      , y = Math.max(a, l, c)
      , m = Math.max(u, f, d)
      , E = sE(h, x, e, r, n)
      , g = sE(y, m, e, r, n);
    let p = t.prevZ
      , v = t.nextZ;
    for (; p && p.z >= E && v && v.z <= g; ) {
        if (p.x >= h && p.x <= y && p.y >= x && p.y <= m && p !== i && p !== s && E0(a, u, l, f, c, d, p.x, p.y) && Yt(p.prev, p, p.next) >= 0 || (p = p.prevZ,
        v.x >= h && v.x <= y && v.y >= x && v.y <= m && v !== i && v !== s && E0(a, u, l, f, c, d, v.x, v.y) && Yt(v.prev, v, v.next) >= 0))
            return !1;
        v = v.nextZ
    }
    for (; p && p.z >= E; ) {
        if (p.x >= h && p.x <= y && p.y >= x && p.y <= m && p !== i && p !== s && E0(a, u, l, f, c, d, p.x, p.y) && Yt(p.prev, p, p.next) >= 0)
            return !1;
        p = p.prevZ
    }
    for (; v && v.z <= g; ) {
        if (v.x >= h && v.x <= y && v.y >= x && v.y <= m && v !== i && v !== s && E0(a, u, l, f, c, d, v.x, v.y) && Yt(v.prev, v, v.next) >= 0)
            return !1;
        v = v.nextZ
    }
    return !0
}
function Sle(t, e) {
    let r = t;
    do {
        const n = r.prev
          , i = r.next.next;
        !au(n, i) && wP(n, r, r.next, i) && Sf(n, i) && Sf(i, n) && (e.push(n.i, r.i, i.i),
        Tf(r),
        Tf(r.next),
        r = t = i),
        r = r.next
    } while (r !== t);
    return Sl(r)
}
function Tle(t, e, r, n, i, o) {
    let s = t;
    do {
        let a = s.next.next;
        for (; a !== s.prev; ) {
            if (s.i !== a.i && Nle(s, a)) {
                let l = BP(s, a);
                s = Sl(s, s.next),
                l = Sl(l, l.next),
                Bf(s, e, r, n, i, o, 0),
                Bf(l, e, r, n, i, o, 0);
                return
            }
            a = a.next
        }
        s = s.next
    } while (s !== t)
}
function Dle(t, e, r, n) {
    const i = [];
    for (let o = 0, s = e.length; o < s; o++) {
        const a = e[o] * n
          , l = o < s - 1 ? e[o + 1] * n : t.length
          , c = CP(t, a, l, n, !1);
        c === c.next && (c.steiner = !0),
        i.push(Mle(c))
    }
    i.sort(Fle);
    for (let o = 0; o < i.length; o++)
        r = Ple(i[o], r);
    return r
}
function Fle(t, e) {
    let r = t.x - e.x;
    if (r === 0 && (r = t.y - e.y,
    r === 0)) {
        const n = (t.next.y - t.y) / (t.next.x - t.x)
          , i = (e.next.y - e.y) / (e.next.x - e.x);
        r = n - i
    }
    return r
}
function Ple(t, e) {
    const r = Ile(t, e);
    if (!r)
        return e;
    const n = BP(r, t);
    return Sl(n, n.next),
    Sl(r, r.next)
}
function Ile(t, e) {
    let r = e;
    const n = t.x
      , i = t.y;
    let o = -1 / 0, s;
    if (au(t, r))
        return r;
    do {
        if (au(t, r.next))
            return r.next;
        if (i <= r.y && i >= r.next.y && r.next.y !== r.y) {
            const f = r.x + (i - r.y) * (r.next.x - r.x) / (r.next.y - r.y);
            if (f <= n && f > o && (o = f,
            s = r.x < r.next.x ? r : r.next,
            f === n))
                return s
        }
        r = r.next
    } while (r !== e);
    if (!s)
        return null;
    const a = s
      , l = s.x
      , c = s.y;
    let u = 1 / 0;
    r = s;
    do {
        if (n >= r.x && r.x >= l && n !== r.x && AP(i < c ? n : o, i, l, c, i < c ? o : n, i, r.x, r.y)) {
            const f = Math.abs(i - r.y) / (n - r.x);
            Sf(r, t) && (f < u || f === u && (r.x > s.x || r.x === s.x && Ole(s, r))) && (s = r,
            u = f)
        }
        r = r.next
    } while (r !== a);
    return s
}
function Ole(t, e) {
    return Yt(t.prev, t, e.prev) < 0 && Yt(e.next, t, t.next) < 0
}
function kle(t, e, r, n) {
    let i = t;
    do
        i.z === 0 && (i.z = sE(i.x, i.y, e, r, n)),
        i.prevZ = i.prev,
        i.nextZ = i.next,
        i = i.next;
    while (i !== t);
    i.prevZ.nextZ = null,
    i.prevZ = null,
    Rle(i)
}
function Rle(t) {
    let e, r = 1;
    do {
        let n = t, i;
        t = null;
        let o = null;
        for (e = 0; n; ) {
            e++;
            let s = n
              , a = 0;
            for (let c = 0; c < r && (a++,
            s = s.nextZ,
            !!s); c++)
                ;
            let l = r;
            for (; a > 0 || l > 0 && s; )
                a !== 0 && (l === 0 || !s || n.z <= s.z) ? (i = n,
                n = n.nextZ,
                a--) : (i = s,
                s = s.nextZ,
                l--),
                o ? o.nextZ = i : t = i,
                i.prevZ = o,
                o = i;
            n = s
        }
        o.nextZ = null,
        r *= 2
    } while (e > 1);
    return t
}
function sE(t, e, r, n, i) {
    return t = (t - r) * i | 0,
    e = (e - n) * i | 0,
    t = (t | t << 8) & 16711935,
    t = (t | t << 4) & 252645135,
    t = (t | t << 2) & 858993459,
    t = (t | t << 1) & 1431655765,
    e = (e | e << 8) & 16711935,
    e = (e | e << 4) & 252645135,
    e = (e | e << 2) & 858993459,
    e = (e | e << 1) & 1431655765,
    t | e << 1
}
function Mle(t) {
    let e = t
      , r = t;
    do
        (e.x < r.x || e.x === r.x && e.y < r.y) && (r = e),
        e = e.next;
    while (e !== t);
    return r
}
function AP(t, e, r, n, i, o, s, a) {
    return (i - s) * (e - a) >= (t - s) * (o - a) && (t - s) * (n - a) >= (r - s) * (e - a) && (r - s) * (o - a) >= (i - s) * (n - a)
}
function E0(t, e, r, n, i, o, s, a) {
    return !(t === s && e === a) && AP(t, e, r, n, i, o, s, a)
}
function Nle(t, e) {
    return t.next.i !== e.i && t.prev.i !== e.i && !Lle(t, e) && (Sf(t, e) && Sf(e, t) && $le(t, e) && (Yt(t.prev, t, e.prev) || Yt(t, e.prev, e)) || au(t, e) && Yt(t.prev, t, t.next) > 0 && Yt(e.prev, e, e.next) > 0)
}
function Yt(t, e, r) {
    return (e.y - t.y) * (r.x - e.x) - (e.x - t.x) * (r.y - e.y)
}
function au(t, e) {
    return t.x === e.x && t.y === e.y
}
function wP(t, e, r, n) {
    const i = gh(Yt(t, e, r))
      , o = gh(Yt(t, e, n))
      , s = gh(Yt(r, n, t))
      , a = gh(Yt(r, n, e));
    return !!(i !== o && s !== a || i === 0 && ph(t, r, e) || o === 0 && ph(t, n, e) || s === 0 && ph(r, t, n) || a === 0 && ph(r, e, n))
}
function ph(t, e, r) {
    return e.x <= Math.max(t.x, r.x) && e.x >= Math.min(t.x, r.x) && e.y <= Math.max(t.y, r.y) && e.y >= Math.min(t.y, r.y)
}
function gh(t) {
    return t > 0 ? 1 : t < 0 ? -1 : 0
}
function Lle(t, e) {
    let r = t;
    do {
        if (r.i !== t.i && r.next.i !== t.i && r.i !== e.i && r.next.i !== e.i && wP(r, r.next, t, e))
            return !0;
        r = r.next
    } while (r !== t);
    return !1
}
function Sf(t, e) {
    return Yt(t.prev, t, t.next) < 0 ? Yt(t, e, t.next) >= 0 && Yt(t, t.prev, e) >= 0 : Yt(t, e, t.prev) < 0 || Yt(t, t.next, e) < 0
}
function $le(t, e) {
    let r = t
      , n = !1;
    const i = (t.x + e.x) / 2
      , o = (t.y + e.y) / 2;
    do
        r.y > o != r.next.y > o && r.next.y !== r.y && i < (r.next.x - r.x) * (o - r.y) / (r.next.y - r.y) + r.x && (n = !n),
        r = r.next;
    while (r !== t);
    return n
}
function BP(t, e) {
    const r = aE(t.i, t.x, t.y)
      , n = aE(e.i, e.x, e.y)
      , i = t.next
      , o = e.prev;
    return t.next = e,
    e.prev = t,
    r.next = i,
    i.prev = r,
    n.next = r,
    r.prev = n,
    o.next = n,
    n.prev = o,
    n
}
function $w(t, e, r, n) {
    const i = aE(t, e, r);
    return n ? (i.next = n.next,
    i.prev = n,
    n.next.prev = i,
    n.next = i) : (i.prev = i,
    i.next = i),
    i
}
function Tf(t) {
    t.next.prev = t.prev,
    t.prev.next = t.next,
    t.prevZ && (t.prevZ.nextZ = t.nextZ),
    t.nextZ && (t.nextZ.prevZ = t.prevZ)
}
function aE(t, e, r) {
    return {
        i: t,
        x: e,
        y: r,
        prev: null,
        next: null,
        z: 0,
        prevZ: null,
        nextZ: null,
        steiner: !1
    }
}
function Ule(t, e, r, n) {
    let i = 0;
    for (let o = e, s = r - n; o < r; o += n)
        i += (t[s] - t[o]) * (t[o + 1] + t[s + 1]),
        s = o;
    return i
}
const Gle = Lw.default || Lw;
var Vn = (t => (t[t.NONE = 0] = "NONE",
t[t.COLOR = 16384] = "COLOR",
t[t.STENCIL = 1024] = "STENCIL",
t[t.DEPTH = 256] = "DEPTH",
t[t.COLOR_DEPTH = 16640] = "COLOR_DEPTH",
t[t.COLOR_STENCIL = 17408] = "COLOR_STENCIL",
t[t.DEPTH_STENCIL = 1280] = "DEPTH_STENCIL",
t[t.ALL = 17664] = "ALL",
t))(Vn || {});
class SP {
    constructor(e) {
        this.items = [],
        this._name = e
    }
    emit(e, r, n, i, o, s, a, l) {
        const {name: c, items: u} = this;
        for (let f = 0, d = u.length; f < d; f++)
            u[f][c](e, r, n, i, o, s, a, l);
        return this
    }
    add(e) {
        return e[this._name] && (this.remove(e),
        this.items.push(e)),
        this
    }
    remove(e) {
        const r = this.items.indexOf(e);
        return r !== -1 && this.items.splice(r, 1),
        this
    }
    contains(e) {
        return this.items.indexOf(e) !== -1
    }
    removeAll() {
        return this.items.length = 0,
        this
    }
    destroy() {
        this.removeAll(),
        this.items = null,
        this._name = null
    }
    get empty() {
        return this.items.length === 0
    }
    get name() {
        return this._name
    }
}
const Hle = ["init", "destroy", "contextChange", "resolutionChange", "resetState", "renderEnd", "renderStart", "render", "update", "postrender", "prerender"]
  , TP = class DP extends Qn {
    constructor(e) {
        super(),
        this.uid = Dt("renderer"),
        this.runners = Object.create(null),
        this.renderPipes = Object.create(null),
        this._initOptions = {},
        this._systemsHash = Object.create(null),
        this.type = e.type,
        this.name = e.name,
        this.config = e;
        const r = [...Hle, ...this.config.runners ?? []];
        this._addRunners(...r),
        this._unsafeEvalCheck()
    }
    async init(e={}) {
        const r = e.skipExtensionImports === !0 ? !0 : e.manageImports === !1;
        await Ale(r),
        this._addSystems(this.config.systems),
        this._addPipes(this.config.renderPipes, this.config.renderPipeAdaptors);
        for (const n in this._systemsHash)
            e = {
                ...this._systemsHash[n].constructor.defaultOptions,
                ...e
            };
        e = {
            ...DP.defaultOptions,
            ...e
        },
        this._roundPixels = e.roundPixels ? 1 : 0;
        for (let n = 0; n < this.runners.init.items.length; n++)
            await this.runners.init.items[n].init(e);
        this._initOptions = e
    }
    render(e, r) {
        let n = e;
        if (n instanceof Rn && (n = {
            container: n
        },
        r && (Re(tt, "passing a second argument is deprecated, please use render options instead"),
        n.target = r.renderTexture)),
        n.target || (n.target = this.view.renderTarget),
        n.target === this.view.renderTarget && (this._lastObjectRendered = n.container,
        n.clearColor ?? (n.clearColor = this.background.colorRgba),
        n.clear ?? (n.clear = this.background.clearBeforeRender)),
        n.clearColor) {
            const i = Array.isArray(n.clearColor) && n.clearColor.length === 4;
            n.clearColor = i ? n.clearColor : Ut.shared.setValue(n.clearColor).toArray()
        }
        n.transform || (n.container.updateLocalTransform(),
        n.transform = n.container.localTransform),
        n.container.visible && (n.container.enableRenderGroup(),
        this.runners.prerender.emit(n),
        this.runners.renderStart.emit(n),
        this.runners.render.emit(n),
        this.runners.renderEnd.emit(n),
        this.runners.postrender.emit(n))
    }
    resize(e, r, n) {
        const i = this.view.resolution;
        this.view.resize(e, r, n),
        this.emit("resize", this.view.screen.width, this.view.screen.height, this.view.resolution),
        n !== void 0 && n !== i && this.runners.resolutionChange.emit(n)
    }
    clear(e={}) {
        const r = this;
        e.target || (e.target = r.renderTarget.renderTarget),
        e.clearColor || (e.clearColor = this.background.colorRgba),
        e.clear ?? (e.clear = Vn.ALL);
        const {clear: n, clearColor: i, target: o} = e;
        Ut.shared.setValue(i ?? this.background.colorRgba),
        r.renderTarget.clear(o, n, Ut.shared.toArray())
    }
    get resolution() {
        return this.view.resolution
    }
    set resolution(e) {
        this.view.resolution = e,
        this.runners.resolutionChange.emit(e)
    }
    get width() {
        return this.view.texture.frame.width
    }
    get height() {
        return this.view.texture.frame.height
    }
    get canvas() {
        return this.view.canvas
    }
    get lastObjectRendered() {
        return this._lastObjectRendered
    }
    get renderingToScreen() {
        return this.renderTarget.renderingToScreen
    }
    get screen() {
        return this.view.screen
    }
    _addRunners(...e) {
        e.forEach(r => {
            this.runners[r] = new SP(r)
        }
        )
    }
    _addSystems(e) {
        let r;
        for (r in e) {
            const n = e[r];
            this._addSystem(n.value, n.name)
        }
    }
    _addSystem(e, r) {
        const n = new e(this);
        if (this[r])
            throw new Error(`Whoops! The name "${r}" is already in use`);
        this[r] = n,
        this._systemsHash[r] = n;
        for (const i in this.runners)
            this.runners[i].add(n);
        return this
    }
    _addPipes(e, r) {
        const n = r.reduce( (i, o) => (i[o.name] = o.value,
        i), {});
        e.forEach(i => {
            const o = i.value
              , s = i.name
              , a = n[s];
            this.renderPipes[s] = new o(this,a ? new a : null),
            this.runners.destroy.add(this.renderPipes[s])
        }
        )
    }
    destroy(e=!1) {
        this.runners.destroy.items.reverse(),
        this.runners.destroy.emit(e),
        (e === !0 || typeof e == "object" && e.releaseGlobalResources) && Fu.release(),
        Object.values(this.runners).forEach(r => {
            r.destroy()
        }
        ),
        this._systemsHash = null,
        this.renderPipes = null
    }
    generateTexture(e) {
        return this.textureGenerator.generateTexture(e)
    }
    get roundPixels() {
        return !!this._roundPixels
    }
    _unsafeEvalCheck() {
        if (!bP())
            throw new Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.")
    }
    resetState() {
        this.runners.resetState.emit()
    }
}
;
TP.defaultOptions = {
    resolution: 1,
    failIfMajorPerformanceCaveat: !1,
    roundPixels: !1
};
let x1 = TP, mh;
function Vle(t) {
    return mh !== void 0 || (mh = ( () => {
        var r;
        const e = {
            stencil: !0,
            failIfMajorPerformanceCaveat: t ?? x1.defaultOptions.failIfMajorPerformanceCaveat
        };
        try {
            if (!je.get().getWebGLRenderingContext())
                return !1;
            let i = je.get().createCanvas().getContext("webgl", e);
            const o = !!((r = i == null ? void 0 : i.getContextAttributes()) != null && r.stencil);
            if (i) {
                const s = i.getExtension("WEBGL_lose_context");
                s && s.loseContext()
            }
            return i = null,
            o
        } catch {
            return !1
        }
    }
    )()),
    mh
}
let vh;
async function zle(t={}) {
    return vh !== void 0 || (vh = await (async () => {
        const e = je.get().getNavigator().gpu;
        if (!e)
            return !1;
        try {
            return await (await e.requestAdapter(t)).requestDevice(),
            !0
        } catch {
            return !1
        }
    }
    )()),
    vh
}
const Uw = ["webgl", "webgpu", "canvas"];
async function jle(t) {
    let e = [];
    t.preference ? (e.push(t.preference),
    Uw.forEach(o => {
        o !== t.preference && e.push(o)
    }
    )) : e = Uw.slice();
    let r, n = {};
    for (let o = 0; o < e.length; o++) {
        const s = e[o];
        if (s === "webgpu" && await zle()) {
            const {WebGPURenderer: a} = await ef( () => Promise.resolve().then( () => Yde), void 0);
            r = a,
            n = {
                ...t,
                ...t.webgpu
            };
            break
        } else if (s === "webgl" && Vle(t.failIfMajorPerformanceCaveat ?? x1.defaultOptions.failIfMajorPerformanceCaveat)) {
            const {WebGLRenderer: a} = await ef( () => Promise.resolve().then( () => Tde), void 0);
            r = a,
            n = {
                ...t,
                ...t.webgl
            };
            break
        } else if (s === "canvas")
            throw n = {
                ...t
            },
            new Error("CanvasRenderer is not yet implemented")
    }
    if (delete n.webgpu,
    delete n.webgl,
    !r)
        throw new Error("No available renderer for the current environment");
    const i = new r;
    return await i.init(n),
    i
}
const $x = "8.14.3";
class FP {
    static init() {
        var e;
        (e = globalThis.__PIXI_APP_INIT__) == null || e.call(globalThis, this, $x)
    }
    static destroy() {}
}
FP.extension = X.Application;
class PP {
    constructor(e) {
        this._renderer = e
    }
    init() {
        var e;
        (e = globalThis.__PIXI_RENDERER_INIT__) == null || e.call(globalThis, this._renderer, $x)
    }
    destroy() {
        this._renderer = null
    }
}
PP.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem],
    name: "initHook",
    priority: -10
};
const IP = class lE {
    constructor(...e) {
        this.stage = new Rn,
        e[0] !== void 0 && Re(tt, "Application constructor options are deprecated, please use Application.init() instead.")
    }
    async init(e) {
        e = {
            ...e
        },
        this.stage || (this.stage = new Rn),
        this.renderer = await jle(e),
        lE._plugins.forEach(r => {
            r.init.call(this, e)
        }
        )
    }
    render() {
        this.renderer.render({
            container: this.stage
        })
    }
    get canvas() {
        return this.renderer.canvas
    }
    get view() {
        return Re(tt, "Application.view is deprecated, please use Application.canvas instead."),
        this.renderer.canvas
    }
    get screen() {
        return this.renderer.screen
    }
    destroy(e=!1, r=!1) {
        const n = lE._plugins.slice(0);
        n.reverse(),
        n.forEach(i => {
            i.destroy.call(this)
        }
        ),
        this.stage.destroy(r),
        this.stage = null,
        this.renderer.destroy(e),
        this.renderer = null
    }
}
;
IP._plugins = [];
let Wle = IP;
$e.handleByList(X.Application, Wle._plugins);
$e.add(FP);
class OP {
    static init(e) {
        Object.defineProperty(this, "resizeTo", {
            configurable: !0,
            set(r) {
                globalThis.removeEventListener("resize", this.queueResize),
                this._resizeTo = r,
                r && (globalThis.addEventListener("resize", this.queueResize),
                this.resize())
            },
            get() {
                return this._resizeTo
            }
        }),
        this.queueResize = () => {
            this._resizeTo && (this._cancelResize(),
            this._resizeId = requestAnimationFrame( () => this.resize()))
        }
        ,
        this._cancelResize = () => {
            this._resizeId && (cancelAnimationFrame(this._resizeId),
            this._resizeId = null)
        }
        ,
        this.resize = () => {
            if (!this._resizeTo)
                return;
            this._cancelResize();
            let r, n;
            if (this._resizeTo === globalThis.window)
                r = globalThis.innerWidth,
                n = globalThis.innerHeight;
            else {
                const {clientWidth: i, clientHeight: o} = this._resizeTo;
                r = i,
                n = o
            }
            this.renderer.resize(r, n),
            this.render()
        }
        ,
        this._resizeId = null,
        this._resizeTo = null,
        this.resizeTo = e.resizeTo || null
    }
    static destroy() {
        globalThis.removeEventListener("resize", this.queueResize),
        this._cancelResize(),
        this._cancelResize = null,
        this.queueResize = null,
        this.resizeTo = null,
        this.resize = null
    }
}
OP.extension = X.Application;
class kP {
    static init(e) {
        e = Object.assign({
            autoStart: !0,
            sharedTicker: !1
        }, e),
        Object.defineProperty(this, "ticker", {
            configurable: !0,
            set(r) {
                this._ticker && this._ticker.remove(this.render, this),
                this._ticker = r,
                r && r.add(this.render, this, Bl.LOW)
            },
            get() {
                return this._ticker
            }
        }),
        this.stop = () => {
            this._ticker.stop()
        }
        ,
        this.start = () => {
            this._ticker.start()
        }
        ,
        this._ticker = null,
        this.ticker = e.sharedTicker ? Hr.shared : new Hr,
        e.autoStart && this.start()
    }
    static destroy() {
        if (this._ticker) {
            const e = this._ticker;
            this.ticker = null,
            e.destroy()
        }
    }
}
kP.extension = X.Application;
class RP extends Qn {
    constructor() {
        super(...arguments),
        this.chars = Object.create(null),
        this.lineHeight = 0,
        this.fontFamily = "",
        this.fontMetrics = {
            fontSize: 0,
            ascent: 0,
            descent: 0
        },
        this.baseLineOffset = 0,
        this.distanceField = {
            type: "none",
            range: 0
        },
        this.pages = [],
        this.applyFillAsTint = !0,
        this.baseMeasurementFontSize = 100,
        this.baseRenderedFontSize = 100
    }
    get font() {
        return Re(tt, "BitmapFont.font is deprecated, please use BitmapFont.fontFamily instead."),
        this.fontFamily
    }
    get pageTextures() {
        return Re(tt, "BitmapFont.pageTextures is deprecated, please use BitmapFont.pages instead."),
        this.pages
    }
    get size() {
        return Re(tt, "BitmapFont.size is deprecated, please use BitmapFont.fontMetrics.fontSize instead."),
        this.fontMetrics.fontSize
    }
    get distanceFieldRange() {
        return Re(tt, "BitmapFont.distanceFieldRange is deprecated, please use BitmapFont.distanceField.range instead."),
        this.distanceField.range
    }
    get distanceFieldType() {
        return Re(tt, "BitmapFont.distanceFieldType is deprecated, please use BitmapFont.distanceField.type instead."),
        this.distanceField.type
    }
    destroy(e=!1) {
        var r;
        this.emit("destroy", this),
        this.removeAllListeners();
        for (const n in this.chars)
            (r = this.chars[n].texture) == null || r.destroy();
        this.chars = null,
        e && (this.pages.forEach(n => n.texture.destroy(!0)),
        this.pages = null)
    }
}
/**
 * tiny-lru
 *
 * @copyright 2025 Jason Mulligan <jason.mulligan@avoidwork.com>
 * @license BSD-3-Clause
 * @version 11.4.5
 */
class Yle {
    constructor(e=0, r=0, n=!1) {
        this.first = null,
        this.items = Object.create(null),
        this.last = null,
        this.max = e,
        this.resetTtl = n,
        this.size = 0,
        this.ttl = r
    }
    clear() {
        return this.first = null,
        this.items = Object.create(null),
        this.last = null,
        this.size = 0,
        this
    }
    delete(e) {
        if (this.has(e)) {
            const r = this.items[e];
            delete this.items[e],
            this.size--,
            r.prev !== null && (r.prev.next = r.next),
            r.next !== null && (r.next.prev = r.prev),
            this.first === r && (this.first = r.next),
            this.last === r && (this.last = r.prev)
        }
        return this
    }
    entries(e=this.keys()) {
        return e.map(r => [r, this.get(r)])
    }
    evict(e=!1) {
        if (e || this.size > 0) {
            const r = this.first;
            delete this.items[r.key],
            --this.size === 0 ? (this.first = null,
            this.last = null) : (this.first = r.next,
            this.first.prev = null)
        }
        return this
    }
    expiresAt(e) {
        let r;
        return this.has(e) && (r = this.items[e].expiry),
        r
    }
    get(e) {
        const r = this.items[e];
        if (r !== void 0) {
            if (this.ttl > 0 && r.expiry <= Date.now()) {
                this.delete(e);
                return
            }
            return this.moveToEnd(r),
            r.value
        }
    }
    has(e) {
        return e in this.items
    }
    moveToEnd(e) {
        this.last !== e && (e.prev !== null && (e.prev.next = e.next),
        e.next !== null && (e.next.prev = e.prev),
        this.first === e && (this.first = e.next),
        e.prev = this.last,
        e.next = null,
        this.last !== null && (this.last.next = e),
        this.last = e,
        this.first === null && (this.first = e))
    }
    keys() {
        const e = [];
        let r = this.first;
        for (; r !== null; )
            e.push(r.key),
            r = r.next;
        return e
    }
    setWithEvicted(e, r, n=this.resetTtl) {
        let i = null;
        if (this.has(e))
            this.set(e, r, !0, n);
        else {
            this.max > 0 && this.size === this.max && (i = {
                ...this.first
            },
            this.evict(!0));
            let o = this.items[e] = {
                expiry: this.ttl > 0 ? Date.now() + this.ttl : this.ttl,
                key: e,
                prev: this.last,
                next: null,
                value: r
            };
            ++this.size === 1 ? this.first = o : this.last.next = o,
            this.last = o
        }
        return i
    }
    set(e, r, n=!1, i=this.resetTtl) {
        let o = this.items[e];
        return n || o !== void 0 ? (o.value = r,
        n === !1 && i && (o.expiry = this.ttl > 0 ? Date.now() + this.ttl : this.ttl),
        this.moveToEnd(o)) : (this.max > 0 && this.size === this.max && this.evict(!0),
        o = this.items[e] = {
            expiry: this.ttl > 0 ? Date.now() + this.ttl : this.ttl,
            key: e,
            prev: this.last,
            next: null,
            value: r
        },
        ++this.size === 1 ? this.first = o : this.last.next = o,
        this.last = o),
        this
    }
    values(e=this.keys()) {
        return e.map(r => this.get(r))
    }
}
function MP(t=1e3, e=0, r=!1) {
    if (isNaN(t) || t < 0)
        throw new TypeError("Invalid max value");
    if (isNaN(e) || e < 0)
        throw new TypeError("Invalid ttl value");
    if (typeof r != "boolean")
        throw new TypeError("Invalid resetTtl value");
    return new Yle(t,e,r)
}
const Xle = ["serif", "sans-serif", "monospace", "cursive", "fantasy", "system-ui"];
function Ux(t) {
    const e = typeof t.fontSize == "number" ? `${t.fontSize}px` : t.fontSize;
    let r = t.fontFamily;
    Array.isArray(t.fontFamily) || (r = t.fontFamily.split(","));
    for (let n = r.length - 1; n >= 0; n--) {
        let i = r[n].trim();
        !/([\"\'])[^\'\"]+\1/.test(i) && !Xle.includes(i) && (i = `"${i}"`),
        r[n] = i
    }
    return `${t.fontStyle} ${t.fontVariant} ${t.fontWeight} ${e} ${r.join(",")}`
}
const Zg = {
    willReadFrequently: !0
}
  , Wi = class Fe {
    static get experimentalLetterSpacingSupported() {
        let e = Fe._experimentalLetterSpacingSupported;
        if (e === void 0) {
            const r = je.get().getCanvasRenderingContext2D().prototype;
            e = Fe._experimentalLetterSpacingSupported = "letterSpacing"in r || "textLetterSpacing"in r
        }
        return e
    }
    constructor(e, r, n, i, o, s, a, l, c) {
        this.text = e,
        this.style = r,
        this.width = n,
        this.height = i,
        this.lines = o,
        this.lineWidths = s,
        this.lineHeight = a,
        this.maxLineWidth = l,
        this.fontProperties = c
    }
    static measureText(e=" ", r, n=Fe._canvas, i=r.wordWrap) {
        var g;
        const o = `${e}-${r.styleKey}-wordWrap-${i}`;
        if (Fe._measurementCache.has(o))
            return Fe._measurementCache.get(o);
        const s = Ux(r)
          , a = Fe.measureFont(s);
        a.fontSize === 0 && (a.fontSize = r.fontSize,
        a.ascent = r.fontSize);
        const l = Fe.__context;
        l.font = s;
        const u = (i ? Fe._wordWrap(e, r, n) : e).split(/(?:\r\n|\r|\n)/)
          , f = new Array(u.length);
        let d = 0;
        for (let p = 0; p < u.length; p++) {
            const v = Fe._measureText(u[p], r.letterSpacing, l);
            f[p] = v,
            d = Math.max(d, v)
        }
        const h = ((g = r._stroke) == null ? void 0 : g.width) || 0;
        let x = d + h;
        r.dropShadow && (x += r.dropShadow.distance);
        const y = r.lineHeight || a.fontSize;
        let m = Math.max(y, a.fontSize + h) + (u.length - 1) * (y + r.leading);
        r.dropShadow && (m += r.dropShadow.distance);
        const E = new Fe(e,r,x,m,u,f,y + r.leading,d,a);
        return Fe._measurementCache.set(o, E),
        E
    }
    static _measureText(e, r, n) {
        let i = !1;
        Fe.experimentalLetterSpacingSupported && (Fe.experimentalLetterSpacing ? (n.letterSpacing = `${r}px`,
        n.textLetterSpacing = `${r}px`,
        i = !0) : (n.letterSpacing = "0px",
        n.textLetterSpacing = "0px"));
        const o = n.measureText(e);
        let s = o.width;
        const a = -o.actualBoundingBoxLeft;
        let c = o.actualBoundingBoxRight - a;
        if (s > 0)
            if (i)
                s -= r,
                c -= r;
            else {
                const u = (Fe.graphemeSegmenter(e).length - 1) * r;
                s += u,
                c += u
            }
        return Math.max(s, c)
    }
    static _wordWrap(e, r, n=Fe._canvas) {
        const i = n.getContext("2d", Zg);
        let o = 0
          , s = ""
          , a = "";
        const l = Object.create(null)
          , {letterSpacing: c, whiteSpace: u} = r
          , f = Fe._collapseSpaces(u)
          , d = Fe._collapseNewlines(u);
        let h = !f;
        const x = r.wordWrapWidth + c
          , y = Fe._tokenize(e);
        for (let m = 0; m < y.length; m++) {
            let E = y[m];
            if (Fe._isNewline(E)) {
                if (!d) {
                    a += Fe._addLine(s),
                    h = !f,
                    s = "",
                    o = 0;
                    continue
                }
                E = " "
            }
            if (f) {
                const p = Fe.isBreakingSpace(E)
                  , v = Fe.isBreakingSpace(s[s.length - 1]);
                if (p && v)
                    continue
            }
            const g = Fe._getFromCache(E, c, l, i);
            if (g > x)
                if (s !== "" && (a += Fe._addLine(s),
                s = "",
                o = 0),
                Fe.canBreakWords(E, r.breakWords)) {
                    const p = Fe.wordWrapSplit(E);
                    for (let v = 0; v < p.length; v++) {
                        let _ = p[v]
                          , b = _
                          , C = 1;
                        for (; p[v + C]; ) {
                            const T = p[v + C];
                            if (!Fe.canBreakChars(b, T, E, v, r.breakWords))
                                _ += T;
                            else
                                break;
                            b = T,
                            C++
                        }
                        v += C - 1;
                        const w = Fe._getFromCache(_, c, l, i);
                        w + o > x && (a += Fe._addLine(s),
                        h = !1,
                        s = "",
                        o = 0),
                        s += _,
                        o += w
                    }
                } else {
                    s.length > 0 && (a += Fe._addLine(s),
                    s = "",
                    o = 0);
                    const p = m === y.length - 1;
                    a += Fe._addLine(E, !p),
                    h = !1,
                    s = "",
                    o = 0
                }
            else
                g + o > x && (h = !1,
                a += Fe._addLine(s),
                s = "",
                o = 0),
                (s.length > 0 || !Fe.isBreakingSpace(E) || h) && (s += E,
                o += g)
        }
        return a += Fe._addLine(s, !1),
        a
    }
    static _addLine(e, r=!0) {
        return e = Fe._trimRight(e),
        e = r ? `${e}
` : e,
        e
    }
    static _getFromCache(e, r, n, i) {
        let o = n[e];
        return typeof o != "number" && (o = Fe._measureText(e, r, i) + r,
        n[e] = o),
        o
    }
    static _collapseSpaces(e) {
        return e === "normal" || e === "pre-line"
    }
    static _collapseNewlines(e) {
        return e === "normal"
    }
    static _trimRight(e) {
        if (typeof e != "string")
            return "";
        for (let r = e.length - 1; r >= 0; r--) {
            const n = e[r];
            if (!Fe.isBreakingSpace(n))
                break;
            e = e.slice(0, -1)
        }
        return e
    }
    static _isNewline(e) {
        return typeof e != "string" ? !1 : Fe._newlines.includes(e.charCodeAt(0))
    }
    static isBreakingSpace(e, r) {
        return typeof e != "string" ? !1 : Fe._breakingSpaces.includes(e.charCodeAt(0))
    }
    static _tokenize(e) {
        const r = [];
        let n = "";
        if (typeof e != "string")
            return r;
        for (let i = 0; i < e.length; i++) {
            const o = e[i]
              , s = e[i + 1];
            if (Fe.isBreakingSpace(o, s) || Fe._isNewline(o)) {
                n !== "" && (r.push(n),
                n = ""),
                o === "\r" && s === `
` ? (r.push(`\r
`),
                i++) : r.push(o);
                continue
            }
            n += o
        }
        return n !== "" && r.push(n),
        r
    }
    static canBreakWords(e, r) {
        return r
    }
    static canBreakChars(e, r, n, i, o) {
        return !0
    }
    static wordWrapSplit(e) {
        return Fe.graphemeSegmenter(e)
    }
    static measureFont(e) {
        if (Fe._fonts[e])
            return Fe._fonts[e];
        const r = Fe._context;
        r.font = e;
        const n = r.measureText(Fe.METRICS_STRING + Fe.BASELINE_SYMBOL)
          , i = {
            ascent: n.actualBoundingBoxAscent,
            descent: n.actualBoundingBoxDescent,
            fontSize: n.actualBoundingBoxAscent + n.actualBoundingBoxDescent
        };
        return Fe._fonts[e] = i,
        i
    }
    static clearMetrics(e="") {
        e ? delete Fe._fonts[e] : Fe._fonts = {}
    }
    static get _canvas() {
        if (!Fe.__canvas) {
            let e;
            try {
                const r = new OffscreenCanvas(0,0)
                  , n = r.getContext("2d", Zg);
                if (n != null && n.measureText)
                    return Fe.__canvas = r,
                    r;
                e = je.get().createCanvas()
            } catch {
                e = je.get().createCanvas()
            }
            e.width = e.height = 10,
            Fe.__canvas = e
        }
        return Fe.__canvas
    }
    static get _context() {
        return Fe.__context || (Fe.__context = Fe._canvas.getContext("2d", Zg)),
        Fe.__context
    }
}
;
Wi.METRICS_STRING = "|ÉqÅ";
Wi.BASELINE_SYMBOL = "M";
Wi.BASELINE_MULTIPLIER = 1.4;
Wi.HEIGHT_MULTIPLIER = 2;
Wi.graphemeSegmenter = ( () => {
    if (typeof (Intl == null ? void 0 : Intl.Segmenter) == "function") {
        const t = new Intl.Segmenter;
        return e => {
            const r = t.segment(e)
              , n = [];
            let i = 0;
            for (const o of r)
                n[i++] = o.segment;
            return n
        }
    }
    return t => [...t]
}
)();
Wi.experimentalLetterSpacing = !1;
Wi._fonts = {};
Wi._newlines = [10, 13];
Wi._breakingSpaces = [9, 32, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8200, 8201, 8202, 8287, 12288];
Wi._measurementCache = MP(1e3);
let Ii = Wi;
const Gw = [{
    offset: 0,
    color: "white"
}, {
    offset: 1,
    color: "black"
}]
  , gb = class cE {
    constructor(...e) {
        this.uid = Dt("fillGradient"),
        this._tick = 0,
        this.type = "linear",
        this.colorStops = [];
        let r = Kle(e);
        r = {
            ...r.type === "radial" ? cE.defaultRadialOptions : cE.defaultLinearOptions,
            ...LF(r)
        },
        this._textureSize = r.textureSize,
        this._wrapMode = r.wrapMode,
        r.type === "radial" ? (this.center = r.center,
        this.outerCenter = r.outerCenter ?? this.center,
        this.innerRadius = r.innerRadius,
        this.outerRadius = r.outerRadius,
        this.scale = r.scale,
        this.rotation = r.rotation) : (this.start = r.start,
        this.end = r.end),
        this.textureSpace = r.textureSpace,
        this.type = r.type,
        r.colorStops.forEach(i => {
            this.addColorStop(i.offset, i.color)
        }
        )
    }
    addColorStop(e, r) {
        return this.colorStops.push({
            offset: e,
            color: Ut.shared.setValue(r).toHexa()
        }),
        this
    }
    buildLinearGradient() {
        if (this.texture)
            return;
        let {x: e, y: r} = this.start
          , {x: n, y: i} = this.end
          , o = n - e
          , s = i - r;
        const a = o < 0 || s < 0;
        if (this._wrapMode === "clamp-to-edge") {
            if (o < 0) {
                const m = e;
                e = n,
                n = m,
                o *= -1
            }
            if (s < 0) {
                const m = r;
                r = i,
                i = m,
                s *= -1
            }
        }
        const l = this.colorStops.length ? this.colorStops : Gw
          , c = this._textureSize
          , {canvas: u, context: f} = Vw(c, 1)
          , d = a ? f.createLinearGradient(this._textureSize, 0, 0, 0) : f.createLinearGradient(0, 0, this._textureSize, 0);
        Hw(d, l),
        f.fillStyle = d,
        f.fillRect(0, 0, c, 1),
        this.texture = new Be({
            source: new wl({
                resource: u,
                addressMode: this._wrapMode
            })
        });
        const h = Math.sqrt(o * o + s * s)
          , x = Math.atan2(s, o)
          , y = new Pe;
        y.scale(h / c, 1),
        y.rotate(x),
        y.translate(e, r),
        this.textureSpace === "local" && y.scale(c, c),
        this.transform = y
    }
    buildGradient() {
        this.texture || this._tick++,
        this.type === "linear" ? this.buildLinearGradient() : this.buildRadialGradient()
    }
    buildRadialGradient() {
        if (this.texture)
            return;
        const e = this.colorStops.length ? this.colorStops : Gw
          , r = this._textureSize
          , {canvas: n, context: i} = Vw(r, r)
          , {x: o, y: s} = this.center
          , {x: a, y: l} = this.outerCenter
          , c = this.innerRadius
          , u = this.outerRadius
          , f = a - u
          , d = l - u
          , h = r / (u * 2)
          , x = (o - f) * h
          , y = (s - d) * h
          , m = i.createRadialGradient(x, y, c * h, (a - f) * h, (l - d) * h, u * h);
        Hw(m, e),
        i.fillStyle = e[e.length - 1].color,
        i.fillRect(0, 0, r, r),
        i.fillStyle = m,
        i.translate(x, y),
        i.rotate(this.rotation),
        i.scale(1, this.scale),
        i.translate(-x, -y),
        i.fillRect(0, 0, r, r),
        this.texture = new Be({
            source: new wl({
                resource: n,
                addressMode: this._wrapMode
            })
        });
        const E = new Pe;
        E.scale(1 / h, 1 / h),
        E.translate(f, d),
        this.textureSpace === "local" && E.scale(r, r),
        this.transform = E
    }
    destroy() {
        var e;
        (e = this.texture) == null || e.destroy(!0),
        this.texture = null,
        this.transform = null,
        this.colorStops = [],
        this.start = null,
        this.end = null,
        this.center = null,
        this.outerCenter = null
    }
    get styleKey() {
        return `fill-gradient-${this.uid}-${this._tick}`
    }
}
;
gb.defaultLinearOptions = {
    start: {
        x: 0,
        y: 0
    },
    end: {
        x: 0,
        y: 1
    },
    colorStops: [],
    textureSpace: "local",
    type: "linear",
    textureSize: 256,
    wrapMode: "clamp-to-edge"
};
gb.defaultRadialOptions = {
    center: {
        x: .5,
        y: .5
    },
    innerRadius: 0,
    outerRadius: .5,
    colorStops: [],
    scale: 1,
    textureSpace: "local",
    type: "radial",
    textureSize: 256,
    wrapMode: "clamp-to-edge"
};
let gs = gb;
function Hw(t, e) {
    for (let r = 0; r < e.length; r++) {
        const n = e[r];
        t.addColorStop(n.offset, n.color)
    }
}
function Vw(t, e) {
    const r = je.get().createCanvas(t, e)
      , n = r.getContext("2d");
    return {
        canvas: r,
        context: n
    }
}
function Kle(t) {
    let e = t[0] ?? {};
    return (typeof e == "number" || t[1]) && (Re("8.5.2", "use options object instead"),
    e = {
        type: "linear",
        start: {
            x: t[0],
            y: t[1]
        },
        end: {
            x: t[2],
            y: t[3]
        },
        textureSpace: t[4],
        textureSize: t[5] ?? gs.defaultLinearOptions.textureSize
    }),
    e
}
const zw = {
    repeat: {
        addressModeU: "repeat",
        addressModeV: "repeat"
    },
    "repeat-x": {
        addressModeU: "repeat",
        addressModeV: "clamp-to-edge"
    },
    "repeat-y": {
        addressModeU: "clamp-to-edge",
        addressModeV: "repeat"
    },
    "no-repeat": {
        addressModeU: "clamp-to-edge",
        addressModeV: "clamp-to-edge"
    }
};
class p1 {
    constructor(e, r) {
        this.uid = Dt("fillPattern"),
        this._tick = 0,
        this.transform = new Pe,
        this.texture = e,
        this.transform.scale(1 / e.frame.width, 1 / e.frame.height),
        r && (e.source.style.addressModeU = zw[r].addressModeU,
        e.source.style.addressModeV = zw[r].addressModeV)
    }
    setTransform(e) {
        const r = this.texture;
        this.transform.copyFrom(e),
        this.transform.invert(),
        this.transform.scale(1 / r.frame.width, 1 / r.frame.height),
        this._tick++
    }
    get texture() {
        return this._texture
    }
    set texture(e) {
        this._texture !== e && (this._texture = e,
        this._tick++)
    }
    get styleKey() {
        return `fill-pattern-${this.uid}-${this._tick}`
    }
    destroy() {
        this.texture.destroy(!0),
        this.texture = null
    }
}
var qle = Jle
  , Jg = {
    a: 7,
    c: 6,
    h: 1,
    l: 2,
    m: 2,
    q: 4,
    s: 4,
    t: 2,
    v: 1,
    z: 0
}
  , Zle = /([astvzqmhlc])([^astvzqmhlc]*)/ig;
function Jle(t) {
    var e = [];
    return t.replace(Zle, function(r, n, i) {
        var o = n.toLowerCase();
        for (i = ece(i),
        o == "m" && i.length > 2 && (e.push([n].concat(i.splice(0, 2))),
        o = "l",
        n = n == "m" ? "l" : "L"); ; ) {
            if (i.length == Jg[o])
                return i.unshift(n),
                e.push(i);
            if (i.length < Jg[o])
                throw new Error("malformed path data");
            e.push([n].concat(i.splice(0, Jg[o])))
        }
    }),
    e
}
var Qle = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;
function ece(t) {
    var e = t.match(Qle);
    return e ? e.map(Number) : []
}
const tce = Vi(qle);
function rce(t, e) {
    const r = tce(t)
      , n = [];
    let i = null
      , o = 0
      , s = 0;
    for (let a = 0; a < r.length; a++) {
        const l = r[a]
          , c = l[0]
          , u = l;
        switch (c) {
        case "M":
            o = u[1],
            s = u[2],
            e.moveTo(o, s);
            break;
        case "m":
            o += u[1],
            s += u[2],
            e.moveTo(o, s);
            break;
        case "H":
            o = u[1],
            e.lineTo(o, s);
            break;
        case "h":
            o += u[1],
            e.lineTo(o, s);
            break;
        case "V":
            s = u[1],
            e.lineTo(o, s);
            break;
        case "v":
            s += u[1],
            e.lineTo(o, s);
            break;
        case "L":
            o = u[1],
            s = u[2],
            e.lineTo(o, s);
            break;
        case "l":
            o += u[1],
            s += u[2],
            e.lineTo(o, s);
            break;
        case "C":
            o = u[5],
            s = u[6],
            e.bezierCurveTo(u[1], u[2], u[3], u[4], o, s);
            break;
        case "c":
            e.bezierCurveTo(o + u[1], s + u[2], o + u[3], s + u[4], o + u[5], s + u[6]),
            o += u[5],
            s += u[6];
            break;
        case "S":
            o = u[3],
            s = u[4],
            e.bezierCurveToShort(u[1], u[2], o, s);
            break;
        case "s":
            e.bezierCurveToShort(o + u[1], s + u[2], o + u[3], s + u[4]),
            o += u[3],
            s += u[4];
            break;
        case "Q":
            o = u[3],
            s = u[4],
            e.quadraticCurveTo(u[1], u[2], o, s);
            break;
        case "q":
            e.quadraticCurveTo(o + u[1], s + u[2], o + u[3], s + u[4]),
            o += u[3],
            s += u[4];
            break;
        case "T":
            o = u[1],
            s = u[2],
            e.quadraticCurveToShort(o, s);
            break;
        case "t":
            o += u[1],
            s += u[2],
            e.quadraticCurveToShort(o, s);
            break;
        case "A":
            o = u[6],
            s = u[7],
            e.arcToSvg(u[1], u[2], u[3], u[4], u[5], o, s);
            break;
        case "a":
            o += u[6],
            s += u[7],
            e.arcToSvg(u[1], u[2], u[3], u[4], u[5], o, s);
            break;
        case "Z":
        case "z":
            e.closePath(),
            n.length > 0 && (i = n.pop(),
            i ? (o = i.startX,
            s = i.startY) : (o = 0,
            s = 0)),
            i = null;
            break;
        default:
            Ne(`Unknown SVG path command: ${c}`)
        }
        c !== "Z" && c !== "z" && i === null && (i = {
            startX: o,
            startY: s
        },
        n.push(i))
    }
    return e
}
class mb {
    constructor(e=0, r=0, n=0) {
        this.type = "circle",
        this.x = e,
        this.y = r,
        this.radius = n
    }
    clone() {
        return new mb(this.x,this.y,this.radius)
    }
    contains(e, r) {
        if (this.radius <= 0)
            return !1;
        const n = this.radius * this.radius;
        let i = this.x - e
          , o = this.y - r;
        return i *= i,
        o *= o,
        i + o <= n
    }
    strokeContains(e, r, n, i=.5) {
        if (this.radius === 0)
            return !1;
        const o = this.x - e
          , s = this.y - r
          , a = this.radius
          , l = (1 - i) * n
          , c = Math.sqrt(o * o + s * s);
        return c <= a + l && c > a - (n - l)
    }
    getBounds(e) {
        return e || (e = new mt),
        e.x = this.x - this.radius,
        e.y = this.y - this.radius,
        e.width = this.radius * 2,
        e.height = this.radius * 2,
        e
    }
    copyFrom(e) {
        return this.x = e.x,
        this.y = e.y,
        this.radius = e.radius,
        this
    }
    copyTo(e) {
        return e.copyFrom(this),
        e
    }
    toString() {
        return `[pixi.js/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`
    }
}
class vb {
    constructor(e=0, r=0, n=0, i=0) {
        this.type = "ellipse",
        this.x = e,
        this.y = r,
        this.halfWidth = n,
        this.halfHeight = i
    }
    clone() {
        return new vb(this.x,this.y,this.halfWidth,this.halfHeight)
    }
    contains(e, r) {
        if (this.halfWidth <= 0 || this.halfHeight <= 0)
            return !1;
        let n = (e - this.x) / this.halfWidth
          , i = (r - this.y) / this.halfHeight;
        return n *= n,
        i *= i,
        n + i <= 1
    }
    strokeContains(e, r, n, i=.5) {
        const {halfWidth: o, halfHeight: s} = this;
        if (o <= 0 || s <= 0)
            return !1;
        const a = n * (1 - i)
          , l = n - a
          , c = o - l
          , u = s - l
          , f = o + a
          , d = s + a
          , h = e - this.x
          , x = r - this.y
          , y = h * h / (c * c) + x * x / (u * u)
          , m = h * h / (f * f) + x * x / (d * d);
        return y > 1 && m <= 1
    }
    getBounds(e) {
        return e || (e = new mt),
        e.x = this.x - this.halfWidth,
        e.y = this.y - this.halfHeight,
        e.width = this.halfWidth * 2,
        e.height = this.halfHeight * 2,
        e
    }
    copyFrom(e) {
        return this.x = e.x,
        this.y = e.y,
        this.halfWidth = e.halfWidth,
        this.halfHeight = e.halfHeight,
        this
    }
    copyTo(e) {
        return e.copyFrom(this),
        e
    }
    toString() {
        return `[pixi.js/math:Ellipse x=${this.x} y=${this.y} halfWidth=${this.halfWidth} halfHeight=${this.halfHeight}]`
    }
}
function nce(t, e, r, n, i, o) {
    const s = t - r
      , a = e - n
      , l = i - r
      , c = o - n
      , u = s * l + a * c
      , f = l * l + c * c;
    let d = -1;
    f !== 0 && (d = u / f);
    let h, x;
    d < 0 ? (h = r,
    x = n) : d > 1 ? (h = i,
    x = o) : (h = r + d * l,
    x = n + d * c);
    const y = t - h
      , m = e - x;
    return y * y + m * m
}
let ice, oce;
class V0 {
    constructor(...e) {
        this.type = "polygon";
        let r = Array.isArray(e[0]) ? e[0] : e;
        if (typeof r[0] != "number") {
            const n = [];
            for (let i = 0, o = r.length; i < o; i++)
                n.push(r[i].x, r[i].y);
            r = n
        }
        this.points = r,
        this.closePath = !0
    }
    isClockwise() {
        let e = 0;
        const r = this.points
          , n = r.length;
        for (let i = 0; i < n; i += 2) {
            const o = r[i]
              , s = r[i + 1]
              , a = r[(i + 2) % n]
              , l = r[(i + 3) % n];
            e += (a - o) * (l + s)
        }
        return e < 0
    }
    containsPolygon(e) {
        const r = this.getBounds(ice)
          , n = e.getBounds(oce);
        if (!r.containsRect(n))
            return !1;
        const i = e.points;
        for (let o = 0; o < i.length; o += 2) {
            const s = i[o]
              , a = i[o + 1];
            if (!this.contains(s, a))
                return !1
        }
        return !0
    }
    clone() {
        const e = this.points.slice()
          , r = new V0(e);
        return r.closePath = this.closePath,
        r
    }
    contains(e, r) {
        let n = !1;
        const i = this.points.length / 2;
        for (let o = 0, s = i - 1; o < i; s = o++) {
            const a = this.points[o * 2]
              , l = this.points[o * 2 + 1]
              , c = this.points[s * 2]
              , u = this.points[s * 2 + 1];
            l > r != u > r && e < (c - a) * ((r - l) / (u - l)) + a && (n = !n)
        }
        return n
    }
    strokeContains(e, r, n, i=.5) {
        const o = n * n
          , s = o * (1 - i)
          , a = o - s
          , {points: l} = this
          , c = l.length - (this.closePath ? 0 : 2);
        for (let u = 0; u < c; u += 2) {
            const f = l[u]
              , d = l[u + 1]
              , h = l[(u + 2) % l.length]
              , x = l[(u + 3) % l.length]
              , y = nce(e, r, f, d, h, x)
              , m = Math.sign((h - f) * (r - d) - (x - d) * (e - f));
            if (y <= (m < 0 ? a : s))
                return !0
        }
        return !1
    }
    getBounds(e) {
        e || (e = new mt);
        const r = this.points;
        let n = 1 / 0
          , i = -1 / 0
          , o = 1 / 0
          , s = -1 / 0;
        for (let a = 0, l = r.length; a < l; a += 2) {
            const c = r[a]
              , u = r[a + 1];
            n = c < n ? c : n,
            i = c > i ? c : i,
            o = u < o ? u : o,
            s = u > s ? u : s
        }
        return e.x = n,
        e.width = i - n,
        e.y = o,
        e.height = s - o,
        e
    }
    copyFrom(e) {
        return this.points = e.points.slice(),
        this.closePath = e.closePath,
        this
    }
    copyTo(e) {
        return e.copyFrom(this),
        e
    }
    toString() {
        return `[pixi.js/math:PolygoncloseStroke=${this.closePath}points=${this.points.reduce( (e, r) => `${e}, ${r}`, "")}]`
    }
    get lastX() {
        return this.points[this.points.length - 2]
    }
    get lastY() {
        return this.points[this.points.length - 1]
    }
    get x() {
        return Re("8.11.0", "Polygon.lastX is deprecated, please use Polygon.lastX instead."),
        this.points[this.points.length - 2]
    }
    get y() {
        return Re("8.11.0", "Polygon.y is deprecated, please use Polygon.lastY instead."),
        this.points[this.points.length - 1]
    }
    get startX() {
        return this.points[0]
    }
    get startY() {
        return this.points[1]
    }
}
const yh = (t, e, r, n, i, o, s) => {
    const a = t - r
      , l = e - n
      , c = Math.sqrt(a * a + l * l);
    return c >= i - o && c <= i + s
}
;
class yb {
    constructor(e=0, r=0, n=0, i=0, o=20) {
        this.type = "roundedRectangle",
        this.x = e,
        this.y = r,
        this.width = n,
        this.height = i,
        this.radius = o
    }
    getBounds(e) {
        return e || (e = new mt),
        e.x = this.x,
        e.y = this.y,
        e.width = this.width,
        e.height = this.height,
        e
    }
    clone() {
        return new yb(this.x,this.y,this.width,this.height,this.radius)
    }
    copyFrom(e) {
        return this.x = e.x,
        this.y = e.y,
        this.width = e.width,
        this.height = e.height,
        this
    }
    copyTo(e) {
        return e.copyFrom(this),
        e
    }
    contains(e, r) {
        if (this.width <= 0 || this.height <= 0)
            return !1;
        if (e >= this.x && e <= this.x + this.width && r >= this.y && r <= this.y + this.height) {
            const n = Math.max(0, Math.min(this.radius, Math.min(this.width, this.height) / 2));
            if (r >= this.y + n && r <= this.y + this.height - n || e >= this.x + n && e <= this.x + this.width - n)
                return !0;
            let i = e - (this.x + n)
              , o = r - (this.y + n);
            const s = n * n;
            if (i * i + o * o <= s || (i = e - (this.x + this.width - n),
            i * i + o * o <= s) || (o = r - (this.y + this.height - n),
            i * i + o * o <= s) || (i = e - (this.x + n),
            i * i + o * o <= s))
                return !0
        }
        return !1
    }
    strokeContains(e, r, n, i=.5) {
        const {x: o, y: s, width: a, height: l, radius: c} = this
          , u = n * (1 - i)
          , f = n - u
          , d = o + c
          , h = s + c
          , x = a - c * 2
          , y = l - c * 2
          , m = o + a
          , E = s + l;
        return (e >= o - u && e <= o + f || e >= m - f && e <= m + u) && r >= h && r <= h + y || (r >= s - u && r <= s + f || r >= E - f && r <= E + u) && e >= d && e <= d + x ? !0 : e < d && r < h && yh(e, r, d, h, c, f, u) || e > m - c && r < h && yh(e, r, m - c, h, c, f, u) || e > m - c && r > E - c && yh(e, r, m - c, E - c, c, f, u) || e < d && r > E - c && yh(e, r, d, E - c, c, f, u)
    }
    toString() {
        return `[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`
    }
}
const NP = {};
function Eb(t, e, r) {
    let n = 2166136261;
    for (let i = 0; i < e; i++)
        n ^= t[i].uid,
        n = Math.imul(n, 16777619),
        n >>>= 0;
    return NP[n] || sce(t, e, n, r)
}
function sce(t, e, r, n) {
    const i = {};
    let o = 0;
    for (let a = 0; a < n; a++) {
        const l = a < e ? t[a] : Be.EMPTY.source;
        i[o++] = l.source,
        i[o++] = l.style
    }
    const s = new is(i);
    return NP[r] = s,
    s
}
class Tc {
    constructor(e) {
        typeof e == "number" ? this.rawBinaryData = new ArrayBuffer(e) : e instanceof Uint8Array ? this.rawBinaryData = e.buffer : this.rawBinaryData = e,
        this.uint32View = new Uint32Array(this.rawBinaryData),
        this.float32View = new Float32Array(this.rawBinaryData),
        this.size = this.rawBinaryData.byteLength
    }
    get int8View() {
        return this._int8View || (this._int8View = new Int8Array(this.rawBinaryData)),
        this._int8View
    }
    get uint8View() {
        return this._uint8View || (this._uint8View = new Uint8Array(this.rawBinaryData)),
        this._uint8View
    }
    get int16View() {
        return this._int16View || (this._int16View = new Int16Array(this.rawBinaryData)),
        this._int16View
    }
    get int32View() {
        return this._int32View || (this._int32View = new Int32Array(this.rawBinaryData)),
        this._int32View
    }
    get float64View() {
        return this._float64Array || (this._float64Array = new Float64Array(this.rawBinaryData)),
        this._float64Array
    }
    get bigUint64View() {
        return this._bigUint64Array || (this._bigUint64Array = new BigUint64Array(this.rawBinaryData)),
        this._bigUint64Array
    }
    view(e) {
        return this[`${e}View`]
    }
    destroy() {
        this.rawBinaryData = null,
        this.uint32View = null,
        this.float32View = null,
        this.uint16View = null,
        this._int8View = null,
        this._uint8View = null,
        this._int16View = null,
        this._int32View = null,
        this._float64Array = null,
        this._bigUint64Array = null
    }
    static sizeOf(e) {
        switch (e) {
        case "int8":
        case "uint8":
            return 1;
        case "int16":
        case "uint16":
            return 2;
        case "int32":
        case "uint32":
        case "float32":
            return 4;
        default:
            throw new Error(`${e} isn't a valid view type`)
        }
    }
}
function uE(t, e) {
    const r = t.byteLength / 8 | 0
      , n = new Float64Array(t,0,r);
    new Float64Array(e,0,r).set(n);
    const o = t.byteLength - r * 8;
    if (o > 0) {
        const s = new Uint8Array(t,r * 8,o);
        new Uint8Array(e,r * 8,o).set(s)
    }
}
const ace = {
    normal: "normal-npm",
    add: "add-npm",
    screen: "screen-npm"
};
var ar = (t => (t[t.DISABLED = 0] = "DISABLED",
t[t.RENDERING_MASK_ADD = 1] = "RENDERING_MASK_ADD",
t[t.MASK_ACTIVE = 2] = "MASK_ACTIVE",
t[t.INVERSE_MASK_ACTIVE = 3] = "INVERSE_MASK_ACTIVE",
t[t.RENDERING_MASK_REMOVE = 4] = "RENDERING_MASK_REMOVE",
t[t.NONE = 5] = "NONE",
t))(ar || {});
function Df(t, e) {
    return e.alphaMode === "no-premultiply-alpha" && ace[t] || t
}
const lce = ["precision mediump float;", "void main(void){", "float test = 0.1;", "%forloop%", "gl_FragColor = vec4(0.0);", "}"].join(`
`);
function cce(t) {
    let e = "";
    for (let r = 0; r < t; ++r)
        r > 0 && (e += `
else `),
        r < t - 1 && (e += `if(test == ${r}.0){}`);
    return e
}
function LP(t, e) {
    if (t === 0)
        throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");
    const r = e.createShader(e.FRAGMENT_SHADER);
    try {
        for (; ; ) {
            const n = lce.replace(/%forloop%/gi, cce(t));
            if (e.shaderSource(r, n),
            e.compileShader(r),
            !e.getShaderParameter(r, e.COMPILE_STATUS))
                t = t / 2 | 0;
            else
                break
        }
    } finally {
        e.deleteShader(r)
    }
    return t
}
let fc = null;
function uce() {
    var e;
    if (fc)
        return fc;
    const t = pP();
    return fc = t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),
    fc = LP(fc, t),
    (e = t.getExtension("WEBGL_lose_context")) == null || e.loseContext(),
    fc
}
class fce {
    constructor() {
        this.ids = Object.create(null),
        this.textures = [],
        this.count = 0
    }
    clear() {
        for (let e = 0; e < this.count; e++) {
            const r = this.textures[e];
            this.textures[e] = null,
            this.ids[r.uid] = null
        }
        this.count = 0
    }
}
class dce {
    constructor() {
        this.renderPipeId = "batch",
        this.action = "startBatch",
        this.start = 0,
        this.size = 0,
        this.textures = new fce,
        this.blendMode = "normal",
        this.topology = "triangle-strip",
        this.canBundle = !0
    }
    destroy() {
        this.textures = null,
        this.gpuBindGroup = null,
        this.bindGroup = null,
        this.batcher = null
    }
}
const z0 = [];
let Gx = 0;
Fu.register({
    clear: () => {
        if (z0.length > 0)
            for (const t of z0)
                t && t.destroy();
        z0.length = 0,
        Gx = 0
    }
});
function jw() {
    return Gx > 0 ? z0[--Gx] : new dce
}
function Ww(t) {
    z0[Gx++] = t
}
let i0 = 0;
const $P = class UP {
    constructor(e) {
        this.uid = Dt("batcher"),
        this.dirty = !0,
        this.batchIndex = 0,
        this.batches = [],
        this._elements = [],
        e = {
            ...UP.defaultOptions,
            ...e
        },
        e.maxTextures || (Re("v8.8.0", "maxTextures is a required option for Batcher now, please pass it in the options"),
        e.maxTextures = uce());
        const {maxTextures: r, attributesInitialSize: n, indicesInitialSize: i} = e;
        this.attributeBuffer = new Tc(n * 4),
        this.indexBuffer = new Uint16Array(i),
        this.maxTextures = r
    }
    begin() {
        this.elementSize = 0,
        this.elementStart = 0,
        this.indexSize = 0,
        this.attributeSize = 0;
        for (let e = 0; e < this.batchIndex; e++)
            Ww(this.batches[e]);
        this.batchIndex = 0,
        this._batchIndexStart = 0,
        this._batchIndexSize = 0,
        this.dirty = !0
    }
    add(e) {
        this._elements[this.elementSize++] = e,
        e._indexStart = this.indexSize,
        e._attributeStart = this.attributeSize,
        e._batcher = this,
        this.indexSize += e.indexSize,
        this.attributeSize += e.attributeSize * this.vertexSize
    }
    checkAndUpdateTexture(e, r) {
        const n = e._batch.textures.ids[r._source.uid];
        return !n && n !== 0 ? !1 : (e._textureId = n,
        e.texture = r,
        !0)
    }
    updateElement(e) {
        this.dirty = !0;
        const r = this.attributeBuffer;
        e.packAsQuad ? this.packQuadAttributes(e, r.float32View, r.uint32View, e._attributeStart, e._textureId) : this.packAttributes(e, r.float32View, r.uint32View, e._attributeStart, e._textureId)
    }
    break(e) {
        const r = this._elements;
        if (!r[this.elementStart])
            return;
        let n = jw()
          , i = n.textures;
        i.clear();
        const o = r[this.elementStart];
        let s = Df(o.blendMode, o.texture._source)
          , a = o.topology;
        this.attributeSize * 4 > this.attributeBuffer.size && this._resizeAttributeBuffer(this.attributeSize * 4),
        this.indexSize > this.indexBuffer.length && this._resizeIndexBuffer(this.indexSize);
        const l = this.attributeBuffer.float32View
          , c = this.attributeBuffer.uint32View
          , u = this.indexBuffer;
        let f = this._batchIndexSize
          , d = this._batchIndexStart
          , h = "startBatch";
        const x = this.maxTextures;
        for (let y = this.elementStart; y < this.elementSize; ++y) {
            const m = r[y];
            r[y] = null;
            const g = m.texture._source
              , p = Df(m.blendMode, g)
              , v = s !== p || a !== m.topology;
            if (g._batchTick === i0 && !v) {
                m._textureId = g._textureBindLocation,
                f += m.indexSize,
                m.packAsQuad ? (this.packQuadAttributes(m, l, c, m._attributeStart, m._textureId),
                this.packQuadIndex(u, m._indexStart, m._attributeStart / this.vertexSize)) : (this.packAttributes(m, l, c, m._attributeStart, m._textureId),
                this.packIndex(m, u, m._indexStart, m._attributeStart / this.vertexSize)),
                m._batch = n;
                continue
            }
            g._batchTick = i0,
            (i.count >= x || v) && (this._finishBatch(n, d, f - d, i, s, a, e, h),
            h = "renderBatch",
            d = f,
            s = p,
            a = m.topology,
            n = jw(),
            i = n.textures,
            i.clear(),
            ++i0),
            m._textureId = g._textureBindLocation = i.count,
            i.ids[g.uid] = i.count,
            i.textures[i.count++] = g,
            m._batch = n,
            f += m.indexSize,
            m.packAsQuad ? (this.packQuadAttributes(m, l, c, m._attributeStart, m._textureId),
            this.packQuadIndex(u, m._indexStart, m._attributeStart / this.vertexSize)) : (this.packAttributes(m, l, c, m._attributeStart, m._textureId),
            this.packIndex(m, u, m._indexStart, m._attributeStart / this.vertexSize))
        }
        i.count > 0 && (this._finishBatch(n, d, f - d, i, s, a, e, h),
        d = f,
        ++i0),
        this.elementStart = this.elementSize,
        this._batchIndexStart = d,
        this._batchIndexSize = f
    }
    _finishBatch(e, r, n, i, o, s, a, l) {
        e.gpuBindGroup = null,
        e.bindGroup = null,
        e.action = l,
        e.batcher = this,
        e.textures = i,
        e.blendMode = o,
        e.topology = s,
        e.start = r,
        e.size = n,
        ++i0,
        this.batches[this.batchIndex++] = e,
        a.add(e)
    }
    finish(e) {
        this.break(e)
    }
    ensureAttributeBuffer(e) {
        e * 4 <= this.attributeBuffer.size || this._resizeAttributeBuffer(e * 4)
    }
    ensureIndexBuffer(e) {
        e <= this.indexBuffer.length || this._resizeIndexBuffer(e)
    }
    _resizeAttributeBuffer(e) {
        const r = Math.max(e, this.attributeBuffer.size * 2)
          , n = new Tc(r);
        uE(this.attributeBuffer.rawBinaryData, n.rawBinaryData),
        this.attributeBuffer = n
    }
    _resizeIndexBuffer(e) {
        const r = this.indexBuffer;
        let n = Math.max(e, r.length * 1.5);
        n += n % 2;
        const i = n > 65535 ? new Uint32Array(n) : new Uint16Array(n);
        if (i.BYTES_PER_ELEMENT !== r.BYTES_PER_ELEMENT)
            for (let o = 0; o < r.length; o++)
                i[o] = r[o];
        else
            uE(r.buffer, i.buffer);
        this.indexBuffer = i
    }
    packQuadIndex(e, r, n) {
        e[r] = n + 0,
        e[r + 1] = n + 1,
        e[r + 2] = n + 2,
        e[r + 3] = n + 0,
        e[r + 4] = n + 2,
        e[r + 5] = n + 3
    }
    packIndex(e, r, n, i) {
        const o = e.indices
          , s = e.indexSize
          , a = e.indexOffset
          , l = e.attributeOffset;
        for (let c = 0; c < s; c++)
            r[n++] = i + o[c + a] - l
    }
    destroy(e={}) {
        var r;
        if (this.batches !== null) {
            for (let n = 0; n < this.batches.length; n++)
                Ww(this.batches[n]);
            this.batches = null,
            this.geometry.destroy(!0),
            this.geometry = null,
            e.shader && ((r = this.shader) == null || r.destroy(),
            this.shader = null);
            for (let n = 0; n < this._elements.length; n++)
                this._elements[n] && (this._elements[n]._batch = null);
            this._elements = null,
            this.indexBuffer = null,
            this.attributeBuffer.destroy(),
            this.attributeBuffer = null
        }
    }
}
;
$P.defaultOptions = {
    maxTextures: null,
    attributesInitialSize: 4,
    indicesInitialSize: 6
};
let hce = $P;
var it = (t => (t[t.MAP_READ = 1] = "MAP_READ",
t[t.MAP_WRITE = 2] = "MAP_WRITE",
t[t.COPY_SRC = 4] = "COPY_SRC",
t[t.COPY_DST = 8] = "COPY_DST",
t[t.INDEX = 16] = "INDEX",
t[t.VERTEX = 32] = "VERTEX",
t[t.UNIFORM = 64] = "UNIFORM",
t[t.STORAGE = 128] = "STORAGE",
t[t.INDIRECT = 256] = "INDIRECT",
t[t.QUERY_RESOLVE = 512] = "QUERY_RESOLVE",
t[t.STATIC = 1024] = "STATIC",
t))(it || {});
let Yn = class extends Qn {
    constructor(e) {
        let {data: r, size: n} = e;
        const {usage: i, label: o, shrinkToFit: s} = e;
        super(),
        this.uid = Dt("buffer"),
        this._resourceType = "buffer",
        this._resourceId = Dt("resource"),
        this._touched = 0,
        this._updateID = 1,
        this._dataInt32 = null,
        this.shrinkToFit = !0,
        this.destroyed = !1,
        r instanceof Array && (r = new Float32Array(r)),
        this._data = r,
        n ?? (n = r == null ? void 0 : r.byteLength);
        const a = !!r;
        this.descriptor = {
            size: n,
            usage: i,
            mappedAtCreation: a,
            label: o
        },
        this.shrinkToFit = s ?? !0
    }
    get data() {
        return this._data
    }
    set data(e) {
        this.setDataWithSize(e, e.length, !0)
    }
    get dataInt32() {
        return this._dataInt32 || (this._dataInt32 = new Int32Array(this.data.buffer)),
        this._dataInt32
    }
    get static() {
        return !!(this.descriptor.usage & it.STATIC)
    }
    set static(e) {
        e ? this.descriptor.usage |= it.STATIC : this.descriptor.usage &= ~it.STATIC
    }
    setDataWithSize(e, r, n) {
        if (this._updateID++,
        this._updateSize = r * e.BYTES_PER_ELEMENT,
        this._data === e) {
            n && this.emit("update", this);
            return
        }
        const i = this._data;
        if (this._data = e,
        this._dataInt32 = null,
        !i || i.length !== e.length) {
            !this.shrinkToFit && i && e.byteLength < i.byteLength ? n && this.emit("update", this) : (this.descriptor.size = e.byteLength,
            this._resourceId = Dt("resource"),
            this.emit("change", this));
            return
        }
        n && this.emit("update", this)
    }
    update(e) {
        this._updateSize = e ?? this._updateSize,
        this._updateID++,
        this.emit("update", this)
    }
    destroy() {
        this.destroyed = !0,
        this.emit("destroy", this),
        this.emit("change", this),
        this._data = null,
        this.descriptor = null,
        this.removeAllListeners()
    }
}
;
function GP(t, e) {
    if (!(t instanceof Yn)) {
        let r = e ? it.INDEX : it.VERTEX;
        t instanceof Array && (e ? (t = new Uint32Array(t),
        r = it.INDEX | it.COPY_DST) : (t = new Float32Array(t),
        r = it.VERTEX | it.COPY_DST)),
        t = new Yn({
            data: t,
            label: e ? "index-mesh-buffer" : "vertex-mesh-buffer",
            usage: r
        })
    }
    return t
}
function xce(t, e, r) {
    const n = t.getAttribute(e);
    if (!n)
        return r.minX = 0,
        r.minY = 0,
        r.maxX = 0,
        r.maxY = 0,
        r;
    const i = n.buffer.data;
    let o = 1 / 0
      , s = 1 / 0
      , a = -1 / 0
      , l = -1 / 0;
    const c = i.BYTES_PER_ELEMENT
      , u = (n.offset || 0) / c
      , f = (n.stride || 2 * 4) / c;
    for (let d = u; d < i.length; d += f) {
        const h = i[d]
          , x = i[d + 1];
        h > a && (a = h),
        x > l && (l = x),
        h < o && (o = h),
        x < s && (s = x)
    }
    return r.minX = o,
    r.minY = s,
    r.maxX = a,
    r.maxY = l,
    r
}
function pce(t) {
    return (t instanceof Yn || Array.isArray(t) || t.BYTES_PER_ELEMENT) && (t = {
        buffer: t
    }),
    t.buffer = GP(t.buffer, !1),
    t
}
class cd extends Qn {
    constructor(e={}) {
        super(),
        this.uid = Dt("geometry"),
        this._layoutKey = 0,
        this.instanceCount = 1,
        this._bounds = new jr,
        this._boundsDirty = !0;
        const {attributes: r, indexBuffer: n, topology: i} = e;
        if (this.buffers = [],
        this.attributes = {},
        r)
            for (const o in r)
                this.addAttribute(o, r[o]);
        this.instanceCount = e.instanceCount ?? 1,
        n && this.addIndex(n),
        this.topology = i || "triangle-list"
    }
    onBufferUpdate() {
        this._boundsDirty = !0,
        this.emit("update", this)
    }
    getAttribute(e) {
        return this.attributes[e]
    }
    getIndex() {
        return this.indexBuffer
    }
    getBuffer(e) {
        return this.getAttribute(e).buffer
    }
    getSize() {
        for (const e in this.attributes) {
            const r = this.attributes[e];
            return r.buffer.data.length / (r.stride / 4 || r.size)
        }
        return 0
    }
    addAttribute(e, r) {
        const n = pce(r);
        this.buffers.indexOf(n.buffer) === -1 && (this.buffers.push(n.buffer),
        n.buffer.on("update", this.onBufferUpdate, this),
        n.buffer.on("change", this.onBufferUpdate, this)),
        this.attributes[e] = n
    }
    addIndex(e) {
        this.indexBuffer = GP(e, !0),
        this.buffers.push(this.indexBuffer)
    }
    get bounds() {
        return this._boundsDirty ? (this._boundsDirty = !1,
        xce(this, "aPosition", this._bounds)) : this._bounds
    }
    destroy(e=!1) {
        var r;
        this.emit("destroy", this),
        this.removeAllListeners(),
        e && this.buffers.forEach(n => n.destroy()),
        (r = this.indexBuffer) == null || r.destroy(),
        this.attributes = null,
        this.buffers = null,
        this.indexBuffer = null,
        this._bounds = null
    }
}
const gce = new Float32Array(1)
  , mce = new Uint32Array(1);
class vce extends cd {
    constructor() {
        const r = new Yn({
            data: gce,
            label: "attribute-batch-buffer",
            usage: it.VERTEX | it.COPY_DST,
            shrinkToFit: !1
        })
          , n = new Yn({
            data: mce,
            label: "index-batch-buffer",
            usage: it.INDEX | it.COPY_DST,
            shrinkToFit: !1
        })
          , i = 6 * 4;
        super({
            attributes: {
                aPosition: {
                    buffer: r,
                    format: "float32x2",
                    stride: i,
                    offset: 0
                },
                aUV: {
                    buffer: r,
                    format: "float32x2",
                    stride: i,
                    offset: 2 * 4
                },
                aColor: {
                    buffer: r,
                    format: "unorm8x4",
                    stride: i,
                    offset: 4 * 4
                },
                aTextureIdAndRound: {
                    buffer: r,
                    format: "uint16x2",
                    stride: i,
                    offset: 5 * 4
                }
            },
            indexBuffer: n
        })
    }
}
function Yw(t, e, r) {
    if (t)
        for (const n in t) {
            const i = n.toLocaleLowerCase()
              , o = e[i];
            if (o) {
                let s = t[n];
                n === "header" && (s = s.replace(/@in\s+[^;]+;\s*/g, "").replace(/@out\s+[^;]+;\s*/g, "")),
                r && o.push(`//----${r}----//`),
                o.push(s)
            } else
                Ne(`${n} placement hook does not exist in shader`)
        }
}
const yce = /\{\{(.*?)\}\}/g;
function Xw(t) {
    var n;
    const e = {};
    return (((n = t.match(yce)) == null ? void 0 : n.map(i => i.replace(/[{()}]/g, ""))) ?? []).forEach(i => {
        e[i] = []
    }
    ),
    e
}
function Kw(t, e) {
    let r;
    const n = /@in\s+([^;]+);/g;
    for (; (r = n.exec(t)) !== null; )
        e.push(r[1])
}
function qw(t, e, r=!1) {
    const n = [];
    Kw(e, n),
    t.forEach(a => {
        a.header && Kw(a.header, n)
    }
    );
    const i = n;
    r && i.sort();
    const o = i.map( (a, l) => `       @location(${l}) ${a},`).join(`
`);
    let s = e.replace(/@in\s+[^;]+;\s*/g, "");
    return s = s.replace("{{in}}", `
${o}
`),
    s
}
function Zw(t, e) {
    let r;
    const n = /@out\s+([^;]+);/g;
    for (; (r = n.exec(t)) !== null; )
        e.push(r[1])
}
function Ece(t) {
    const r = /\b(\w+)\s*:/g.exec(t);
    return r ? r[1] : ""
}
function _ce(t) {
    const e = /@.*?\s+/g;
    return t.replace(e, "")
}
function bce(t, e) {
    const r = [];
    Zw(e, r),
    t.forEach(l => {
        l.header && Zw(l.header, r)
    }
    );
    let n = 0;
    const i = r.sort().map(l => l.indexOf("builtin") > -1 ? l : `@location(${n++}) ${l}`).join(`,
`)
      , o = r.sort().map(l => `       var ${_ce(l)};`).join(`
`)
      , s = `return VSOutput(
            ${r.sort().map(l => ` ${Ece(l)}`).join(`,
`)});`;
    let a = e.replace(/@out\s+[^;]+;\s*/g, "");
    return a = a.replace("{{struct}}", `
${i}
`),
    a = a.replace("{{start}}", `
${o}
`),
    a = a.replace("{{return}}", `
${s}
`),
    a
}
function Jw(t, e) {
    let r = t;
    for (const n in e) {
        const i = e[n];
        i.join(`
`).length ? r = r.replace(`{{${n}}}`, `//-----${n} START-----//
${i.join(`
`)}
//----${n} FINISH----//`) : r = r.replace(`{{${n}}}`, "")
    }
    return r
}
const js = Object.create(null)
  , Qg = new Map;
let Cce = 0;
function Ace({template: t, bits: e}) {
    const r = HP(t, e);
    if (js[r])
        return js[r];
    const {vertex: n, fragment: i} = Bce(t, e);
    return js[r] = VP(n, i, e),
    js[r]
}
function wce({template: t, bits: e}) {
    const r = HP(t, e);
    return js[r] || (js[r] = VP(t.vertex, t.fragment, e)),
    js[r]
}
function Bce(t, e) {
    const r = e.map(s => s.vertex).filter(s => !!s)
      , n = e.map(s => s.fragment).filter(s => !!s);
    let i = qw(r, t.vertex, !0);
    i = bce(r, i);
    const o = qw(n, t.fragment, !0);
    return {
        vertex: i,
        fragment: o
    }
}
function HP(t, e) {
    return e.map(r => (Qg.has(r) || Qg.set(r, Cce++),
    Qg.get(r))).sort( (r, n) => r - n).join("-") + t.vertex + t.fragment
}
function VP(t, e, r) {
    const n = Xw(t)
      , i = Xw(e);
    return r.forEach(o => {
        Yw(o.vertex, n, o.name),
        Yw(o.fragment, i, o.name)
    }
    ),
    {
        vertex: Jw(t, n),
        fragment: Jw(e, i)
    }
}
const Sce = `
    @in aPosition: vec2<f32>;
    @in aUV: vec2<f32>;

    @out @builtin(position) vPosition: vec4<f32>;
    @out vUV : vec2<f32>;
    @out vColor : vec4<f32>;

    {{header}}

    struct VSOutput {
        {{struct}}
    };

    @vertex
    fn main( {{in}} ) -> VSOutput {

        var worldTransformMatrix = globalUniforms.uWorldTransformMatrix;
        var modelMatrix = mat3x3<f32>(
            1.0, 0.0, 0.0,
            0.0, 1.0, 0.0,
            0.0, 0.0, 1.0
          );
        var position = aPosition;
        var uv = aUV;

        {{start}}

        vColor = vec4<f32>(1., 1., 1., 1.);

        {{main}}

        vUV = uv;

        var modelViewProjectionMatrix = globalUniforms.uProjectionMatrix * worldTransformMatrix * modelMatrix;

        vPosition =  vec4<f32>((modelViewProjectionMatrix *  vec3<f32>(position, 1.0)).xy, 0.0, 1.0);

        vColor *= globalUniforms.uWorldColorAlpha;

        {{end}}

        {{return}}
    };
`
  , Tce = `
    @in vUV : vec2<f32>;
    @in vColor : vec4<f32>;

    {{header}}

    @fragment
    fn main(
        {{in}}
      ) -> @location(0) vec4<f32> {

        {{start}}

        var outColor:vec4<f32>;

        {{main}}

        var finalColor:vec4<f32> = outColor * vColor;

        {{end}}

        return finalColor;
      };
`
  , Dce = `
    in vec2 aPosition;
    in vec2 aUV;

    out vec4 vColor;
    out vec2 vUV;

    {{header}}

    void main(void){

        mat3 worldTransformMatrix = uWorldTransformMatrix;
        mat3 modelMatrix = mat3(
            1.0, 0.0, 0.0,
            0.0, 1.0, 0.0,
            0.0, 0.0, 1.0
          );
        vec2 position = aPosition;
        vec2 uv = aUV;

        {{start}}

        vColor = vec4(1.);

        {{main}}

        vUV = uv;

        mat3 modelViewProjectionMatrix = uProjectionMatrix * worldTransformMatrix * modelMatrix;

        gl_Position = vec4((modelViewProjectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);

        vColor *= uWorldColorAlpha;

        {{end}}
    }
`
  , Fce = `

    in vec4 vColor;
    in vec2 vUV;

    out vec4 finalColor;

    {{header}}

    void main(void) {

        {{start}}

        vec4 outColor;

        {{main}}

        finalColor = outColor * vColor;

        {{end}}
    }
`
  , Pce = {
    name: "global-uniforms-bit",
    vertex: {
        header: `
        struct GlobalUniforms {
            uProjectionMatrix:mat3x3<f32>,
            uWorldTransformMatrix:mat3x3<f32>,
            uWorldColorAlpha: vec4<f32>,
            uResolution: vec2<f32>,
        }

        @group(0) @binding(0) var<uniform> globalUniforms : GlobalUniforms;
        `
    }
}
  , Ice = {
    name: "global-uniforms-bit",
    vertex: {
        header: `
          uniform mat3 uProjectionMatrix;
          uniform mat3 uWorldTransformMatrix;
          uniform vec4 uWorldColorAlpha;
          uniform vec2 uResolution;
        `
    }
};
function ud({bits: t, name: e}) {
    const r = Ace({
        template: {
            fragment: Tce,
            vertex: Sce
        },
        bits: [Pce, ...t]
    });
    return Cs.from({
        name: e,
        vertex: {
            source: r.vertex,
            entryPoint: "main"
        },
        fragment: {
            source: r.fragment,
            entryPoint: "main"
        }
    })
}
function fd({bits: t, name: e}) {
    return new ba({
        name: e,
        ...wce({
            template: {
                vertex: Dce,
                fragment: Fce
            },
            bits: [Ice, ...t]
        })
    })
}
const _b = {
    name: "color-bit",
    vertex: {
        header: `
            @in aColor: vec4<f32>;
        `,
        main: `
            vColor *= vec4<f32>(aColor.rgb * aColor.a, aColor.a);
        `
    }
}
  , bb = {
    name: "color-bit",
    vertex: {
        header: `
            in vec4 aColor;
        `,
        main: `
            vColor *= vec4(aColor.rgb * aColor.a, aColor.a);
        `
    }
}
  , em = {};
function Oce(t) {
    const e = [];
    if (t === 1)
        e.push("@group(1) @binding(0) var textureSource1: texture_2d<f32>;"),
        e.push("@group(1) @binding(1) var textureSampler1: sampler;");
    else {
        let r = 0;
        for (let n = 0; n < t; n++)
            e.push(`@group(1) @binding(${r++}) var textureSource${n + 1}: texture_2d<f32>;`),
            e.push(`@group(1) @binding(${r++}) var textureSampler${n + 1}: sampler;`)
    }
    return e.join(`
`)
}
function kce(t) {
    const e = [];
    if (t === 1)
        e.push("outColor = textureSampleGrad(textureSource1, textureSampler1, vUV, uvDx, uvDy);");
    else {
        e.push("switch vTextureId {");
        for (let r = 0; r < t; r++)
            r === t - 1 ? e.push("  default:{") : e.push(`  case ${r}:{`),
            e.push(`      outColor = textureSampleGrad(textureSource${r + 1}, textureSampler${r + 1}, vUV, uvDx, uvDy);`),
            e.push("      break;}");
        e.push("}")
    }
    return e.join(`
`)
}
function Cb(t) {
    return em[t] || (em[t] = {
        name: "texture-batch-bit",
        vertex: {
            header: `
                @in aTextureIdAndRound: vec2<u32>;
                @out @interpolate(flat) vTextureId : u32;
            `,
            main: `
                vTextureId = aTextureIdAndRound.y;
            `,
            end: `
                if(aTextureIdAndRound.x == 1)
                {
                    vPosition = vec4<f32>(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
                }
            `
        },
        fragment: {
            header: `
                @in @interpolate(flat) vTextureId: u32;

                ${Oce(t)}
            `,
            main: `
                var uvDx = dpdx(vUV);
                var uvDy = dpdy(vUV);

                ${kce(t)}
            `
        }
    }),
    em[t]
}
const tm = {};
function Rce(t) {
    const e = [];
    for (let r = 0; r < t; r++)
        r > 0 && e.push("else"),
        r < t - 1 && e.push(`if(vTextureId < ${r}.5)`),
        e.push("{"),
        e.push(`	outColor = texture(uTextures[${r}], vUV);`),
        e.push("}");
    return e.join(`
`)
}
function Ab(t) {
    return tm[t] || (tm[t] = {
        name: "texture-batch-bit",
        vertex: {
            header: `
                in vec2 aTextureIdAndRound;
                out float vTextureId;

            `,
            main: `
                vTextureId = aTextureIdAndRound.y;
            `,
            end: `
                if(aTextureIdAndRound.x == 1.)
                {
                    gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
                }
            `
        },
        fragment: {
            header: `
                in float vTextureId;

                uniform sampler2D uTextures[${t}];

            `,
            main: `

                ${Rce(t)}
            `
        }
    }),
    tm[t]
}
const dd = {
    name: "round-pixels-bit",
    vertex: {
        header: `
            fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32>
            {
                return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
            }
        `
    }
}
  , hd = {
    name: "round-pixels-bit",
    vertex: {
        header: `
            vec2 roundPixels(vec2 position, vec2 targetSize)
            {
                return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
            }
        `
    }
}
  , Qw = {};
function wb(t) {
    let e = Qw[t];
    if (e)
        return e;
    const r = new Int32Array(t);
    for (let n = 0; n < t; n++)
        r[n] = n;
    return e = Qw[t] = new vn({
        uTextures: {
            value: r,
            type: "i32",
            size: t
        }
    },{
        isStatic: !0
    }),
    e
}
class e3 extends _i {
    constructor(e) {
        const r = fd({
            name: "batch",
            bits: [bb, Ab(e), hd]
        })
          , n = ud({
            name: "batch",
            bits: [_b, Cb(e), dd]
        });
        super({
            glProgram: r,
            gpuProgram: n,
            resources: {
                batchSamplers: wb(e)
            }
        }),
        this.maxTextures = e
    }
}
let o0 = null;
const zP = class jP extends hce {
    constructor(e) {
        super(e),
        this.geometry = new vce,
        this.name = jP.extension.name,
        this.vertexSize = 6,
        o0 ?? (o0 = new e3(e.maxTextures)),
        this.shader = o0
    }
    packAttributes(e, r, n, i, o) {
        const s = o << 16 | e.roundPixels & 65535
          , a = e.transform
          , l = a.a
          , c = a.b
          , u = a.c
          , f = a.d
          , d = a.tx
          , h = a.ty
          , {positions: x, uvs: y} = e
          , m = e.color
          , E = e.attributeOffset
          , g = E + e.attributeSize;
        for (let p = E; p < g; p++) {
            const v = p * 2
              , _ = x[v]
              , b = x[v + 1];
            r[i++] = l * _ + u * b + d,
            r[i++] = f * b + c * _ + h,
            r[i++] = y[v],
            r[i++] = y[v + 1],
            n[i++] = m,
            n[i++] = s
        }
    }
    packQuadAttributes(e, r, n, i, o) {
        const s = e.texture
          , a = e.transform
          , l = a.a
          , c = a.b
          , u = a.c
          , f = a.d
          , d = a.tx
          , h = a.ty
          , x = e.bounds
          , y = x.maxX
          , m = x.minX
          , E = x.maxY
          , g = x.minY
          , p = s.uvs
          , v = e.color
          , _ = o << 16 | e.roundPixels & 65535;
        r[i + 0] = l * m + u * g + d,
        r[i + 1] = f * g + c * m + h,
        r[i + 2] = p.x0,
        r[i + 3] = p.y0,
        n[i + 4] = v,
        n[i + 5] = _,
        r[i + 6] = l * y + u * g + d,
        r[i + 7] = f * g + c * y + h,
        r[i + 8] = p.x1,
        r[i + 9] = p.y1,
        n[i + 10] = v,
        n[i + 11] = _,
        r[i + 12] = l * y + u * E + d,
        r[i + 13] = f * E + c * y + h,
        r[i + 14] = p.x2,
        r[i + 15] = p.y2,
        n[i + 16] = v,
        n[i + 17] = _,
        r[i + 18] = l * m + u * E + d,
        r[i + 19] = f * E + c * m + h,
        r[i + 20] = p.x3,
        r[i + 21] = p.y3,
        n[i + 22] = v,
        n[i + 23] = _
    }
    _updateMaxTextures(e) {
        this.shader.maxTextures !== e && (o0 = new e3(e),
        this.shader = o0)
    }
    destroy() {
        this.shader = null,
        super.destroy()
    }
}
;
zP.extension = {
    type: [X.Batcher],
    name: "default"
};
let Bb = zP;
function Mce(t, e, r, n, i, o, s, a=null) {
    let l = 0;
    r *= e,
    i *= o;
    const c = a.a
      , u = a.b
      , f = a.c
      , d = a.d
      , h = a.tx
      , x = a.ty;
    for (; l < s; ) {
        const y = t[r]
          , m = t[r + 1];
        n[i] = c * y + f * m + h,
        n[i + 1] = u * y + d * m + x,
        i += o,
        r += e,
        l++
    }
}
function Nce(t, e, r, n) {
    let i = 0;
    for (e *= r; i < n; )
        t[e] = 0,
        t[e + 1] = 0,
        e += r,
        i++
}
function WP(t, e, r, n, i) {
    const o = e.a
      , s = e.b
      , a = e.c
      , l = e.d
      , c = e.tx
      , u = e.ty;
    r || (r = 0),
    n || (n = 2),
    i || (i = t.length / n - r);
    let f = r * n;
    for (let d = 0; d < i; d++) {
        const h = t[f]
          , x = t[f + 1];
        t[f] = o * h + a * x + c,
        t[f + 1] = s * h + l * x + u,
        f += n
    }
}
const Lce = new Pe;
class Sb {
    constructor() {
        this.packAsQuad = !1,
        this.batcherName = "default",
        this.topology = "triangle-list",
        this.applyTransform = !0,
        this.roundPixels = 0,
        this._batcher = null,
        this._batch = null
    }
    get uvs() {
        return this.geometryData.uvs
    }
    get positions() {
        return this.geometryData.vertices
    }
    get indices() {
        return this.geometryData.indices
    }
    get blendMode() {
        return this.renderable && this.applyTransform ? this.renderable.groupBlendMode : "normal"
    }
    get color() {
        const e = this.baseColor
          , r = e >> 16 | e & 65280 | (e & 255) << 16
          , n = this.renderable;
        return n ? qF(r, n.groupColor) + (this.alpha * n.groupAlpha * 255 << 24) : r + (this.alpha * 255 << 24)
    }
    get transform() {
        var e;
        return ((e = this.renderable) == null ? void 0 : e.groupTransform) || Lce
    }
    copyTo(e) {
        e.indexOffset = this.indexOffset,
        e.indexSize = this.indexSize,
        e.attributeOffset = this.attributeOffset,
        e.attributeSize = this.attributeSize,
        e.baseColor = this.baseColor,
        e.alpha = this.alpha,
        e.texture = this.texture,
        e.geometryData = this.geometryData,
        e.topology = this.topology
    }
    reset() {
        this.applyTransform = !0,
        this.renderable = null,
        this.topology = "triangle-list"
    }
    destroy() {
        this.renderable = null,
        this.texture = null,
        this.geometryData = null,
        this._batcher = null,
        this._batch = null
    }
}
const Ff = {
    extension: {
        type: X.ShapeBuilder,
        name: "circle"
    },
    build(t, e) {
        let r, n, i, o, s, a;
        if (t.type === "circle") {
            const v = t;
            if (s = a = v.radius,
            s <= 0)
                return !1;
            r = v.x,
            n = v.y,
            i = o = 0
        } else if (t.type === "ellipse") {
            const v = t;
            if (s = v.halfWidth,
            a = v.halfHeight,
            s <= 0 || a <= 0)
                return !1;
            r = v.x,
            n = v.y,
            i = o = 0
        } else {
            const v = t
              , _ = v.width / 2
              , b = v.height / 2;
            r = v.x + _,
            n = v.y + b,
            s = a = Math.max(0, Math.min(v.radius, Math.min(_, b))),
            i = _ - s,
            o = b - a
        }
        if (i < 0 || o < 0)
            return !1;
        const l = Math.ceil(2.3 * Math.sqrt(s + a))
          , c = l * 8 + (i ? 4 : 0) + (o ? 4 : 0);
        if (c === 0)
            return !1;
        if (l === 0)
            return e[0] = e[6] = r + i,
            e[1] = e[3] = n + o,
            e[2] = e[4] = r - i,
            e[5] = e[7] = n - o,
            !0;
        let u = 0
          , f = l * 4 + (i ? 2 : 0) + 2
          , d = f
          , h = c
          , x = i + s
          , y = o
          , m = r + x
          , E = r - x
          , g = n + y;
        if (e[u++] = m,
        e[u++] = g,
        e[--f] = g,
        e[--f] = E,
        o) {
            const v = n - y;
            e[d++] = E,
            e[d++] = v,
            e[--h] = v,
            e[--h] = m
        }
        for (let v = 1; v < l; v++) {
            const _ = Math.PI / 2 * (v / l)
              , b = i + Math.cos(_) * s
              , C = o + Math.sin(_) * a
              , w = r + b
              , T = r - b
              , A = n + C
              , B = n - C;
            e[u++] = w,
            e[u++] = A,
            e[--f] = A,
            e[--f] = T,
            e[d++] = T,
            e[d++] = B,
            e[--h] = B,
            e[--h] = w
        }
        x = i,
        y = o + a,
        m = r + x,
        E = r - x,
        g = n + y;
        const p = n - y;
        return e[u++] = m,
        e[u++] = g,
        e[--h] = p,
        e[--h] = m,
        i && (e[u++] = E,
        e[u++] = g,
        e[--h] = p,
        e[--h] = E),
        !0
    },
    triangulate(t, e, r, n, i, o) {
        if (t.length === 0)
            return;
        let s = 0
          , a = 0;
        for (let u = 0; u < t.length; u += 2)
            s += t[u],
            a += t[u + 1];
        s /= t.length / 2,
        a /= t.length / 2;
        let l = n;
        e[l * r] = s,
        e[l * r + 1] = a;
        const c = l++;
        for (let u = 0; u < t.length; u += 2)
            e[l * r] = t[u],
            e[l * r + 1] = t[u + 1],
            u > 0 && (i[o++] = l,
            i[o++] = c,
            i[o++] = l - 1),
            l++;
        i[o++] = c + 1,
        i[o++] = c,
        i[o++] = l - 1
    }
}
  , $ce = {
    ...Ff,
    extension: {
        ...Ff.extension,
        name: "ellipse"
    }
}
  , Uce = {
    ...Ff,
    extension: {
        ...Ff.extension,
        name: "roundedRectangle"
    }
}
  , YP = 1e-4
  , t3 = 1e-4;
function Gce(t) {
    const e = t.length;
    if (e < 6)
        return 1;
    let r = 0;
    for (let n = 0, i = t[e - 2], o = t[e - 1]; n < e; n += 2) {
        const s = t[n]
          , a = t[n + 1];
        r += (s - i) * (a + o),
        i = s,
        o = a
    }
    return r < 0 ? -1 : 1
}
function r3(t, e, r, n, i, o, s, a) {
    const l = t - r * i
      , c = e - n * i
      , u = t + r * o
      , f = e + n * o;
    let d, h;
    s ? (d = n,
    h = -r) : (d = -n,
    h = r);
    const x = l + d
      , y = c + h
      , m = u + d
      , E = f + h;
    return a.push(x, y),
    a.push(m, E),
    2
}
function Ia(t, e, r, n, i, o, s, a) {
    const l = r - t
      , c = n - e;
    let u = Math.atan2(l, c)
      , f = Math.atan2(i - t, o - e);
    a && u < f ? u += Math.PI * 2 : !a && u > f && (f += Math.PI * 2);
    let d = u;
    const h = f - u
      , x = Math.abs(h)
      , y = Math.sqrt(l * l + c * c)
      , m = (15 * x * Math.sqrt(y) / Math.PI >> 0) + 1
      , E = h / m;
    if (d += E,
    a) {
        s.push(t, e),
        s.push(r, n);
        for (let g = 1, p = d; g < m; g++,
        p += E)
            s.push(t, e),
            s.push(t + Math.sin(p) * y, e + Math.cos(p) * y);
        s.push(t, e),
        s.push(i, o)
    } else {
        s.push(r, n),
        s.push(t, e);
        for (let g = 1, p = d; g < m; g++,
        p += E)
            s.push(t + Math.sin(p) * y, e + Math.cos(p) * y),
            s.push(t, e);
        s.push(i, o),
        s.push(t, e)
    }
    return m * 2
}
function Hce(t, e, r, n, i, o) {
    const s = YP;
    if (t.length === 0)
        return;
    const a = e;
    let l = a.alignment;
    if (e.alignment !== .5) {
        let K = Gce(t);
        r && (K *= -1),
        l = (l - .5) * K + .5
    }
    const c = new Gt(t[0],t[1])
      , u = new Gt(t[t.length - 2],t[t.length - 1])
      , f = n
      , d = Math.abs(c.x - u.x) < s && Math.abs(c.y - u.y) < s;
    if (f) {
        t = t.slice(),
        d && (t.pop(),
        t.pop(),
        u.set(t[t.length - 2], t[t.length - 1]));
        const K = (c.x + u.x) * .5
          , oe = (u.y + c.y) * .5;
        t.unshift(K, oe),
        t.push(K, oe)
    }
    const h = i
      , x = t.length / 2;
    let y = t.length;
    const m = h.length / 2
      , E = a.width / 2
      , g = E * E
      , p = a.miterLimit * a.miterLimit;
    let v = t[0]
      , _ = t[1]
      , b = t[2]
      , C = t[3]
      , w = 0
      , T = 0
      , A = -(_ - C)
      , B = v - b
      , S = 0
      , D = 0
      , F = Math.sqrt(A * A + B * B);
    A /= F,
    B /= F,
    A *= E,
    B *= E;
    const R = l
      , P = (1 - R) * 2
      , N = R * 2;
    f || (a.cap === "round" ? y += Ia(v - A * (P - N) * .5, _ - B * (P - N) * .5, v - A * P, _ - B * P, v + A * N, _ + B * N, h, !0) + 2 : a.cap === "square" && (y += r3(v, _, A, B, P, N, !0, h))),
    h.push(v - A * P, _ - B * P),
    h.push(v + A * N, _ + B * N);
    for (let K = 1; K < x - 1; ++K) {
        v = t[(K - 1) * 2],
        _ = t[(K - 1) * 2 + 1],
        b = t[K * 2],
        C = t[K * 2 + 1],
        w = t[(K + 1) * 2],
        T = t[(K + 1) * 2 + 1],
        A = -(_ - C),
        B = v - b,
        F = Math.sqrt(A * A + B * B),
        A /= F,
        B /= F,
        A *= E,
        B *= E,
        S = -(C - T),
        D = b - w,
        F = Math.sqrt(S * S + D * D),
        S /= F,
        D /= F,
        S *= E,
        D *= E;
        const oe = b - v
          , U = _ - C
          , $ = b - w
          , V = T - C
          , W = oe * $ + U * V
          , H = U * $ - V * oe
          , Q = H < 0;
        if (Math.abs(H) < .001 * Math.abs(W)) {
            h.push(b - A * P, C - B * P),
            h.push(b + A * N, C + B * N),
            W >= 0 && (a.join === "round" ? y += Ia(b, C, b - A * P, C - B * P, b - S * P, C - D * P, h, !1) + 4 : y += 2,
            h.push(b - S * N, C - D * N),
            h.push(b + S * P, C + D * P));
            continue
        }
        const G = (-A + v) * (-B + C) - (-A + b) * (-B + _)
          , re = (-S + w) * (-D + C) - (-S + b) * (-D + T)
          , te = (oe * re - $ * G) / H
          , he = (V * G - U * re) / H
          , xe = (te - b) * (te - b) + (he - C) * (he - C)
          , ve = b + (te - b) * P
          , I = C + (he - C) * P
          , z = b - (te - b) * N
          , q = C - (he - C) * N
          , ce = Math.min(oe * oe + U * U, $ * $ + V * V)
          , fe = Q ? P : N
          , k = ce + fe * fe * g;
        xe <= k ? a.join === "bevel" || xe / g > p ? (Q ? (h.push(ve, I),
        h.push(b + A * N, C + B * N),
        h.push(ve, I),
        h.push(b + S * N, C + D * N)) : (h.push(b - A * P, C - B * P),
        h.push(z, q),
        h.push(b - S * P, C - D * P),
        h.push(z, q)),
        y += 2) : a.join === "round" ? Q ? (h.push(ve, I),
        h.push(b + A * N, C + B * N),
        y += Ia(b, C, b + A * N, C + B * N, b + S * N, C + D * N, h, !0) + 4,
        h.push(ve, I),
        h.push(b + S * N, C + D * N)) : (h.push(b - A * P, C - B * P),
        h.push(z, q),
        y += Ia(b, C, b - A * P, C - B * P, b - S * P, C - D * P, h, !1) + 4,
        h.push(b - S * P, C - D * P),
        h.push(z, q)) : (h.push(ve, I),
        h.push(z, q)) : (h.push(b - A * P, C - B * P),
        h.push(b + A * N, C + B * N),
        a.join === "round" ? Q ? y += Ia(b, C, b + A * N, C + B * N, b + S * N, C + D * N, h, !0) + 2 : y += Ia(b, C, b - A * P, C - B * P, b - S * P, C - D * P, h, !1) + 2 : a.join === "miter" && xe / g <= p && (Q ? (h.push(z, q),
        h.push(z, q)) : (h.push(ve, I),
        h.push(ve, I)),
        y += 2),
        h.push(b - S * P, C - D * P),
        h.push(b + S * N, C + D * N),
        y += 2)
    }
    v = t[(x - 2) * 2],
    _ = t[(x - 2) * 2 + 1],
    b = t[(x - 1) * 2],
    C = t[(x - 1) * 2 + 1],
    A = -(_ - C),
    B = v - b,
    F = Math.sqrt(A * A + B * B),
    A /= F,
    B /= F,
    A *= E,
    B *= E,
    h.push(b - A * P, C - B * P),
    h.push(b + A * N, C + B * N),
    f || (a.cap === "round" ? y += Ia(b - A * (P - N) * .5, C - B * (P - N) * .5, b - A * P, C - B * P, b + A * N, C + B * N, h, !1) + 2 : a.cap === "square" && (y += r3(b, C, A, B, P, N, !1, h)));
    const j = t3 * t3;
    for (let K = m; K < y + m - 2; ++K)
        v = h[K * 2],
        _ = h[K * 2 + 1],
        b = h[(K + 1) * 2],
        C = h[(K + 1) * 2 + 1],
        w = h[(K + 2) * 2],
        T = h[(K + 2) * 2 + 1],
        !(Math.abs(v * (C - T) + b * (T - _) + w * (_ - C)) < j) && o.push(K, K + 1, K + 2)
}
function Vce(t, e, r, n) {
    const i = YP;
    if (t.length === 0)
        return;
    const o = t[0]
      , s = t[1]
      , a = t[t.length - 2]
      , l = t[t.length - 1]
      , c = e || Math.abs(o - a) < i && Math.abs(s - l) < i
      , u = r
      , f = t.length / 2
      , d = u.length / 2;
    for (let h = 0; h < f; h++)
        u.push(t[h * 2]),
        u.push(t[h * 2 + 1]);
    for (let h = 0; h < f - 1; h++)
        n.push(d + h, d + h + 1);
    c && n.push(d + f - 1, d)
}
function XP(t, e, r, n, i, o, s) {
    const a = Gle(t, e, 2);
    if (!a)
        return;
    for (let c = 0; c < a.length; c += 3)
        o[s++] = a[c] + i,
        o[s++] = a[c + 1] + i,
        o[s++] = a[c + 2] + i;
    let l = i * n;
    for (let c = 0; c < t.length; c += 2)
        r[l] = t[c],
        r[l + 1] = t[c + 1],
        l += n
}
const zce = []
  , jce = {
    extension: {
        type: X.ShapeBuilder,
        name: "polygon"
    },
    build(t, e) {
        for (let r = 0; r < t.points.length; r++)
            e[r] = t.points[r];
        return !0
    },
    triangulate(t, e, r, n, i, o) {
        XP(t, zce, e, r, n, i, o)
    }
}
  , Wce = {
    extension: {
        type: X.ShapeBuilder,
        name: "rectangle"
    },
    build(t, e) {
        const r = t
          , n = r.x
          , i = r.y
          , o = r.width
          , s = r.height;
        return o > 0 && s > 0 ? (e[0] = n,
        e[1] = i,
        e[2] = n + o,
        e[3] = i,
        e[4] = n + o,
        e[5] = i + s,
        e[6] = n,
        e[7] = i + s,
        !0) : !1
    },
    triangulate(t, e, r, n, i, o) {
        let s = 0;
        n *= r,
        e[n + s] = t[0],
        e[n + s + 1] = t[1],
        s += r,
        e[n + s] = t[2],
        e[n + s + 1] = t[3],
        s += r,
        e[n + s] = t[6],
        e[n + s + 1] = t[7],
        s += r,
        e[n + s] = t[4],
        e[n + s + 1] = t[5],
        s += r;
        const a = n / r;
        i[o++] = a,
        i[o++] = a + 1,
        i[o++] = a + 2,
        i[o++] = a + 1,
        i[o++] = a + 3,
        i[o++] = a + 2
    }
}
  , Yce = {
    extension: {
        type: X.ShapeBuilder,
        name: "triangle"
    },
    build(t, e) {
        return e[0] = t.x,
        e[1] = t.y,
        e[2] = t.x2,
        e[3] = t.y2,
        e[4] = t.x3,
        e[5] = t.y3,
        !0
    },
    triangulate(t, e, r, n, i, o) {
        let s = 0;
        n *= r,
        e[n + s] = t[0],
        e[n + s + 1] = t[1],
        s += r,
        e[n + s] = t[2],
        e[n + s + 1] = t[3],
        s += r,
        e[n + s] = t[4],
        e[n + s + 1] = t[5];
        const a = n / r;
        i[o++] = a,
        i[o++] = a + 1,
        i[o++] = a + 2
    }
}
  , Xce = new Pe
  , Kce = new mt;
function qce(t, e, r, n) {
    const i = e.matrix ? t.copyFrom(e.matrix).invert() : t.identity();
    if (e.textureSpace === "local") {
        const s = r.getBounds(Kce);
        e.width && s.pad(e.width);
        const {x: a, y: l} = s
          , c = 1 / s.width
          , u = 1 / s.height
          , f = -a * c
          , d = -l * u
          , h = i.a
          , x = i.b
          , y = i.c
          , m = i.d;
        i.a *= c,
        i.b *= c,
        i.c *= u,
        i.d *= u,
        i.tx = f * h + d * y + i.tx,
        i.ty = f * x + d * m + i.ty
    } else
        i.translate(e.texture.frame.x, e.texture.frame.y),
        i.scale(1 / e.texture.source.width, 1 / e.texture.source.height);
    const o = e.texture.source.style;
    return !(e.fill instanceof gs) && o.addressMode === "clamp-to-edge" && (o.addressMode = "repeat",
    o.update()),
    n && i.append(Xce.copyFrom(n).invert()),
    i
}
const g1 = {};
$e.handleByMap(X.ShapeBuilder, g1);
$e.add(Wce, jce, Yce, Ff, $ce, Uce);
const Zce = new mt
  , Jce = new Pe;
function Qce(t, e) {
    const {geometryData: r, batches: n} = e;
    n.length = 0,
    r.indices.length = 0,
    r.vertices.length = 0,
    r.uvs.length = 0;
    for (let i = 0; i < t.instructions.length; i++) {
        const o = t.instructions[i];
        if (o.action === "texture")
            eue(o.data, n, r);
        else if (o.action === "fill" || o.action === "stroke") {
            const s = o.action === "stroke"
              , a = o.data.path.shapePath
              , l = o.data.style
              , c = o.data.hole;
            s && c && n3(c.shapePath, l, !0, n, r),
            c && (a.shapePrimitives[a.shapePrimitives.length - 1].holes = c.shapePath.shapePrimitives),
            n3(a, l, s, n, r)
        }
    }
}
function eue(t, e, r) {
    const n = []
      , i = g1.rectangle
      , o = Zce;
    o.x = t.dx,
    o.y = t.dy,
    o.width = t.dw,
    o.height = t.dh;
    const s = t.transform;
    if (!i.build(o, n))
        return;
    const {vertices: a, uvs: l, indices: c} = r
      , u = c.length
      , f = a.length / 2;
    s && WP(n, s),
    i.triangulate(n, a, 2, f, c, u);
    const d = t.image
      , h = d.uvs;
    l.push(h.x0, h.y0, h.x1, h.y1, h.x3, h.y3, h.x2, h.y2);
    const x = xr.get(Sb);
    x.indexOffset = u,
    x.indexSize = c.length - u,
    x.attributeOffset = f,
    x.attributeSize = a.length / 2 - f,
    x.baseColor = t.style,
    x.alpha = t.alpha,
    x.texture = d,
    x.geometryData = r,
    e.push(x)
}
function n3(t, e, r, n, i) {
    const {vertices: o, uvs: s, indices: a} = i;
    t.shapePrimitives.forEach( ({shape: l, transform: c, holes: u}) => {
        const f = []
          , d = g1[l.type];
        if (!d.build(l, f))
            return;
        const h = a.length
          , x = o.length / 2;
        let y = "triangle-list";
        if (c && WP(f, c),
        r) {
            const p = l.closePath ?? !0
              , v = e;
            v.pixelLine ? (Vce(f, p, o, a),
            y = "line-list") : Hce(f, v, !1, p, o, a)
        } else if (u) {
            const p = []
              , v = f.slice();
            tue(u).forEach(b => {
                p.push(v.length / 2),
                v.push(...b)
            }
            ),
            XP(v, p, o, 2, x, a, h)
        } else
            d.triangulate(f, o, 2, x, a, h);
        const m = s.length / 2
          , E = e.texture;
        if (E !== Be.WHITE) {
            const p = qce(Jce, e, l, c);
            Mce(o, 2, x, s, m, 2, o.length / 2 - x, p)
        } else
            Nce(s, m, 2, o.length / 2 - x);
        const g = xr.get(Sb);
        g.indexOffset = h,
        g.indexSize = a.length - h,
        g.attributeOffset = x,
        g.attributeSize = o.length / 2 - x,
        g.baseColor = e.color,
        g.alpha = e.alpha,
        g.texture = E,
        g.geometryData = i,
        g.topology = y,
        n.push(g)
    }
    )
}
function tue(t) {
    const e = [];
    for (let r = 0; r < t.length; r++) {
        const n = t[r].shape
          , i = [];
        g1[n.type].build(n, i) && e.push(i)
    }
    return e
}
class rue {
    constructor() {
        this.batches = [],
        this.geometryData = {
            vertices: [],
            uvs: [],
            indices: []
        }
    }
}
class nue {
    constructor() {
        this.instructions = new QF
    }
    init(e) {
        const r = e.maxTextures;
        this.batcher ? this.batcher._updateMaxTextures(r) : this.batcher = new Bb({
            maxTextures: r
        }),
        this.instructions.reset()
    }
    get geometry() {
        return Re(lae, "GraphicsContextRenderData#geometry is deprecated, please use batcher.geometry instead."),
        this.batcher.geometry
    }
    destroy() {
        this.batcher.destroy(),
        this.instructions.destroy(),
        this.batcher = null,
        this.instructions = null
    }
}
const Tb = class fE {
    constructor(e) {
        this._gpuContextHash = {},
        this._graphicsDataContextHash = Object.create(null),
        this._renderer = e,
        e.renderableGC.addManagedHash(this, "_gpuContextHash"),
        e.renderableGC.addManagedHash(this, "_graphicsDataContextHash")
    }
    init(e) {
        fE.defaultOptions.bezierSmoothness = (e == null ? void 0 : e.bezierSmoothness) ?? fE.defaultOptions.bezierSmoothness
    }
    getContextRenderData(e) {
        return this._graphicsDataContextHash[e.uid] || this._initContextRenderData(e)
    }
    updateGpuContext(e) {
        let r = this._gpuContextHash[e.uid] || this._initContext(e);
        if (e.dirty) {
            r ? this._cleanGraphicsContextData(e) : r = this._initContext(e),
            Qce(e, r);
            const n = e.batchMode;
            e.customShader || n === "no-batch" ? r.isBatchable = !1 : n === "auto" ? r.isBatchable = r.geometryData.vertices.length < 400 : r.isBatchable = !0,
            e.dirty = !1
        }
        return r
    }
    getGpuContext(e) {
        return this._gpuContextHash[e.uid] || this._initContext(e)
    }
    _initContextRenderData(e) {
        const r = xr.get(nue, {
            maxTextures: this._renderer.limits.maxBatchableTextures
        })
          , {batches: n, geometryData: i} = this._gpuContextHash[e.uid]
          , o = i.vertices.length
          , s = i.indices.length;
        for (let u = 0; u < n.length; u++)
            n[u].applyTransform = !1;
        const a = r.batcher;
        a.ensureAttributeBuffer(o),
        a.ensureIndexBuffer(s),
        a.begin();
        for (let u = 0; u < n.length; u++) {
            const f = n[u];
            a.add(f)
        }
        a.finish(r.instructions);
        const l = a.geometry;
        l.indexBuffer.setDataWithSize(a.indexBuffer, a.indexSize, !0),
        l.buffers[0].setDataWithSize(a.attributeBuffer.float32View, a.attributeSize, !0);
        const c = a.batches;
        for (let u = 0; u < c.length; u++) {
            const f = c[u];
            f.bindGroup = Eb(f.textures.textures, f.textures.count, this._renderer.limits.maxBatchableTextures)
        }
        return this._graphicsDataContextHash[e.uid] = r,
        r
    }
    _initContext(e) {
        const r = new rue;
        return r.context = e,
        this._gpuContextHash[e.uid] = r,
        e.on("destroy", this.onGraphicsContextDestroy, this),
        this._gpuContextHash[e.uid]
    }
    onGraphicsContextDestroy(e) {
        this._cleanGraphicsContextData(e),
        e.off("destroy", this.onGraphicsContextDestroy, this),
        this._gpuContextHash[e.uid] = null
    }
    _cleanGraphicsContextData(e) {
        const r = this._gpuContextHash[e.uid];
        r.isBatchable || this._graphicsDataContextHash[e.uid] && (xr.return(this.getContextRenderData(e)),
        this._graphicsDataContextHash[e.uid] = null),
        r.batches && r.batches.forEach(n => {
            xr.return(n)
        }
        )
    }
    destroy() {
        for (const e in this._gpuContextHash)
            this._gpuContextHash[e] && this.onGraphicsContextDestroy(this._gpuContextHash[e].context);
        this._gpuContextHash = {},
        this._graphicsDataContextHash = {},
        this._renderer = null
    }
}
;
Tb.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem, X.CanvasSystem],
    name: "graphicsContext"
};
Tb.defaultOptions = {
    bezierSmoothness: .5
};
let Db = Tb;
const iue = 8
  , Eh = 11920929e-14
  , oue = 1;
function KP(t, e, r, n, i, o, s, a, l, c) {
    const f = Math.min(.99, Math.max(0, c ?? Db.defaultOptions.bezierSmoothness));
    let d = (oue - f) / 1;
    return d *= d,
    sue(e, r, n, i, o, s, a, l, t, d),
    t
}
function sue(t, e, r, n, i, o, s, a, l, c) {
    dE(t, e, r, n, i, o, s, a, l, c, 0),
    l.push(s, a)
}
function dE(t, e, r, n, i, o, s, a, l, c, u) {
    if (u > iue)
        return;
    const f = (t + r) / 2
      , d = (e + n) / 2
      , h = (r + i) / 2
      , x = (n + o) / 2
      , y = (i + s) / 2
      , m = (o + a) / 2
      , E = (f + h) / 2
      , g = (d + x) / 2
      , p = (h + y) / 2
      , v = (x + m) / 2
      , _ = (E + p) / 2
      , b = (g + v) / 2;
    if (u > 0) {
        let C = s - t
          , w = a - e;
        const T = Math.abs((r - s) * w - (n - a) * C)
          , A = Math.abs((i - s) * w - (o - a) * C);
        if (T > Eh && A > Eh) {
            if ((T + A) * (T + A) <= c * (C * C + w * w)) {
                l.push(_, b);
                return
            }
        } else if (T > Eh) {
            if (T * T <= c * (C * C + w * w)) {
                l.push(_, b);
                return
            }
        } else if (A > Eh) {
            if (A * A <= c * (C * C + w * w)) {
                l.push(_, b);
                return
            }
        } else if (C = _ - (t + s) / 2,
        w = b - (e + a) / 2,
        C * C + w * w <= c) {
            l.push(_, b);
            return
        }
    }
    dE(t, e, f, d, E, g, _, b, l, c, u + 1),
    dE(_, b, p, v, y, m, s, a, l, c, u + 1)
}
const aue = 8
  , lue = 11920929e-14
  , cue = 1;
function uue(t, e, r, n, i, o, s, a) {
    const c = Math.min(.99, Math.max(0, a ?? Db.defaultOptions.bezierSmoothness));
    let u = (cue - c) / 1;
    return u *= u,
    fue(e, r, n, i, o, s, t, u),
    t
}
function fue(t, e, r, n, i, o, s, a) {
    hE(s, t, e, r, n, i, o, a, 0),
    s.push(i, o)
}
function hE(t, e, r, n, i, o, s, a, l) {
    if (l > aue)
        return;
    const c = (e + n) / 2
      , u = (r + i) / 2
      , f = (n + o) / 2
      , d = (i + s) / 2
      , h = (c + f) / 2
      , x = (u + d) / 2;
    let y = o - e
      , m = s - r;
    const E = Math.abs((n - o) * m - (i - s) * y);
    if (E > lue) {
        if (E * E <= a * (y * y + m * m)) {
            t.push(h, x);
            return
        }
    } else if (y = h - (e + o) / 2,
    m = x - (r + s) / 2,
    y * y + m * m <= a) {
        t.push(h, x);
        return
    }
    hE(t, e, r, c, u, h, x, a, l + 1),
    hE(t, h, x, f, d, o, s, a, l + 1)
}
function qP(t, e, r, n, i, o, s, a) {
    let l = Math.abs(i - o);
    (!s && i > o || s && o > i) && (l = 2 * Math.PI - l),
    a || (a = Math.max(6, Math.floor(6 * Math.pow(n, 1 / 3) * (l / Math.PI)))),
    a = Math.max(a, 3);
    let c = l / a
      , u = i;
    c *= s ? -1 : 1;
    for (let f = 0; f < a + 1; f++) {
        const d = Math.cos(u)
          , h = Math.sin(u)
          , x = e + d * n
          , y = r + h * n;
        t.push(x, y),
        u += c
    }
}
function due(t, e, r, n, i, o) {
    const s = t[t.length - 2]
      , l = t[t.length - 1] - r
      , c = s - e
      , u = i - r
      , f = n - e
      , d = Math.abs(l * f - c * u);
    if (d < 1e-8 || o === 0) {
        (t[t.length - 2] !== e || t[t.length - 1] !== r) && t.push(e, r);
        return
    }
    const h = l * l + c * c
      , x = u * u + f * f
      , y = l * u + c * f
      , m = o * Math.sqrt(h) / d
      , E = o * Math.sqrt(x) / d
      , g = m * y / h
      , p = E * y / x
      , v = m * f + E * c
      , _ = m * u + E * l
      , b = c * (E + g)
      , C = l * (E + g)
      , w = f * (m + p)
      , T = u * (m + p)
      , A = Math.atan2(C - _, b - v)
      , B = Math.atan2(T - _, w - v);
    qP(t, v + e, _ + r, o, A, B, c * u > f * l)
}
const j0 = Math.PI * 2
  , rm = {
    centerX: 0,
    centerY: 0,
    ang1: 0,
    ang2: 0
}
  , nm = ({x: t, y: e}, r, n, i, o, s, a, l) => {
    t *= r,
    e *= n;
    const c = i * t - o * e
      , u = o * t + i * e;
    return l.x = c + s,
    l.y = u + a,
    l
}
;
function hue(t, e) {
    const r = e === -1.5707963267948966 ? -.551915024494 : 1.3333333333333333 * Math.tan(e / 4)
      , n = e === 1.5707963267948966 ? .551915024494 : r
      , i = Math.cos(t)
      , o = Math.sin(t)
      , s = Math.cos(t + e)
      , a = Math.sin(t + e);
    return [{
        x: i - o * n,
        y: o + i * n
    }, {
        x: s + a * n,
        y: a - s * n
    }, {
        x: s,
        y: a
    }]
}
const i3 = (t, e, r, n) => {
    const i = t * n - e * r < 0 ? -1 : 1;
    let o = t * r + e * n;
    return o > 1 && (o = 1),
    o < -1 && (o = -1),
    i * Math.acos(o)
}
  , xue = (t, e, r, n, i, o, s, a, l, c, u, f, d) => {
    const h = Math.pow(i, 2)
      , x = Math.pow(o, 2)
      , y = Math.pow(u, 2)
      , m = Math.pow(f, 2);
    let E = h * x - h * m - x * y;
    E < 0 && (E = 0),
    E /= h * m + x * y,
    E = Math.sqrt(E) * (s === a ? -1 : 1);
    const g = E * i / o * f
      , p = E * -o / i * u
      , v = c * g - l * p + (t + r) / 2
      , _ = l * g + c * p + (e + n) / 2
      , b = (u - g) / i
      , C = (f - p) / o
      , w = (-u - g) / i
      , T = (-f - p) / o
      , A = i3(1, 0, b, C);
    let B = i3(b, C, w, T);
    a === 0 && B > 0 && (B -= j0),
    a === 1 && B < 0 && (B += j0),
    d.centerX = v,
    d.centerY = _,
    d.ang1 = A,
    d.ang2 = B
}
;
function pue(t, e, r, n, i, o, s, a=0, l=0, c=0) {
    if (o === 0 || s === 0)
        return;
    const u = Math.sin(a * j0 / 360)
      , f = Math.cos(a * j0 / 360)
      , d = f * (e - n) / 2 + u * (r - i) / 2
      , h = -u * (e - n) / 2 + f * (r - i) / 2;
    if (d === 0 && h === 0)
        return;
    o = Math.abs(o),
    s = Math.abs(s);
    const x = Math.pow(d, 2) / Math.pow(o, 2) + Math.pow(h, 2) / Math.pow(s, 2);
    x > 1 && (o *= Math.sqrt(x),
    s *= Math.sqrt(x)),
    xue(e, r, n, i, o, s, l, c, u, f, d, h, rm);
    let {ang1: y, ang2: m} = rm;
    const {centerX: E, centerY: g} = rm;
    let p = Math.abs(m) / (j0 / 4);
    Math.abs(1 - p) < 1e-7 && (p = 1);
    const v = Math.max(Math.ceil(p), 1);
    m /= v;
    let _ = t[t.length - 2]
      , b = t[t.length - 1];
    const C = {
        x: 0,
        y: 0
    };
    for (let w = 0; w < v; w++) {
        const T = hue(y, m)
          , {x: A, y: B} = nm(T[0], o, s, f, u, E, g, C)
          , {x: S, y: D} = nm(T[1], o, s, f, u, E, g, C)
          , {x: F, y: R} = nm(T[2], o, s, f, u, E, g, C);
        KP(t, _, b, A, B, S, D, F, R),
        _ = F,
        b = R,
        y += m
    }
}
function gue(t, e, r) {
    const n = (s, a) => {
        const l = a.x - s.x
          , c = a.y - s.y
          , u = Math.sqrt(l * l + c * c)
          , f = l / u
          , d = c / u;
        return {
            len: u,
            nx: f,
            ny: d
        }
    }
      , i = (s, a) => {
        s === 0 ? t.moveTo(a.x, a.y) : t.lineTo(a.x, a.y)
    }
    ;
    let o = e[e.length - 1];
    for (let s = 0; s < e.length; s++) {
        const a = e[s % e.length]
          , l = a.radius ?? r;
        if (l <= 0) {
            i(s, a),
            o = a;
            continue
        }
        const c = e[(s + 1) % e.length]
          , u = n(a, o)
          , f = n(a, c);
        if (u.len < 1e-4 || f.len < 1e-4) {
            i(s, a),
            o = a;
            continue
        }
        let d = Math.asin(u.nx * f.ny - u.ny * f.nx)
          , h = 1
          , x = !1;
        u.nx * f.nx - u.ny * -f.ny < 0 ? d < 0 ? d = Math.PI + d : (d = Math.PI - d,
        h = -1,
        x = !0) : d > 0 && (h = -1,
        x = !0);
        const y = d / 2;
        let m, E = Math.abs(Math.cos(y) * l / Math.sin(y));
        E > Math.min(u.len / 2, f.len / 2) ? (E = Math.min(u.len / 2, f.len / 2),
        m = Math.abs(E * Math.sin(y) / Math.cos(y))) : m = l;
        const g = a.x + f.nx * E + -f.ny * m * h
          , p = a.y + f.ny * E + f.nx * m * h
          , v = Math.atan2(u.ny, u.nx) + Math.PI / 2 * h
          , _ = Math.atan2(f.ny, f.nx) - Math.PI / 2 * h;
        s === 0 && t.moveTo(g + Math.cos(v) * m, p + Math.sin(v) * m),
        t.arc(g, p, m, v, _, x),
        o = a
    }
}
function mue(t, e, r, n) {
    const i = (a, l) => Math.sqrt((a.x - l.x) ** 2 + (a.y - l.y) ** 2)
      , o = (a, l, c) => ({
        x: a.x + (l.x - a.x) * c,
        y: a.y + (l.y - a.y) * c
    })
      , s = e.length;
    for (let a = 0; a < s; a++) {
        const l = e[(a + 1) % s]
          , c = l.radius ?? r;
        if (c <= 0) {
            a === 0 ? t.moveTo(l.x, l.y) : t.lineTo(l.x, l.y);
            continue
        }
        const u = e[a]
          , f = e[(a + 2) % s]
          , d = i(u, l);
        let h;
        if (d < 1e-4)
            h = l;
        else {
            const m = Math.min(d / 2, c);
            h = o(l, u, m / d)
        }
        const x = i(f, l);
        let y;
        if (x < 1e-4)
            y = l;
        else {
            const m = Math.min(x / 2, c);
            y = o(l, f, m / x)
        }
        a === 0 ? t.moveTo(h.x, h.y) : t.lineTo(h.x, h.y),
        t.quadraticCurveTo(l.x, l.y, y.x, y.y, n)
    }
}
const vue = new mt;
class yue {
    constructor(e) {
        this.shapePrimitives = [],
        this._currentPoly = null,
        this._bounds = new jr,
        this._graphicsPath2D = e,
        this.signed = e.checkForHoles
    }
    moveTo(e, r) {
        return this.startPoly(e, r),
        this
    }
    lineTo(e, r) {
        this._ensurePoly();
        const n = this._currentPoly.points
          , i = n[n.length - 2]
          , o = n[n.length - 1];
        return (i !== e || o !== r) && n.push(e, r),
        this
    }
    arc(e, r, n, i, o, s) {
        this._ensurePoly(!1);
        const a = this._currentPoly.points;
        return qP(a, e, r, n, i, o, s),
        this
    }
    arcTo(e, r, n, i, o) {
        this._ensurePoly();
        const s = this._currentPoly.points;
        return due(s, e, r, n, i, o),
        this
    }
    arcToSvg(e, r, n, i, o, s, a) {
        const l = this._currentPoly.points;
        return pue(l, this._currentPoly.lastX, this._currentPoly.lastY, s, a, e, r, n, i, o),
        this
    }
    bezierCurveTo(e, r, n, i, o, s, a) {
        this._ensurePoly();
        const l = this._currentPoly;
        return KP(this._currentPoly.points, l.lastX, l.lastY, e, r, n, i, o, s, a),
        this
    }
    quadraticCurveTo(e, r, n, i, o) {
        this._ensurePoly();
        const s = this._currentPoly;
        return uue(this._currentPoly.points, s.lastX, s.lastY, e, r, n, i, o),
        this
    }
    closePath() {
        return this.endPoly(!0),
        this
    }
    addPath(e, r) {
        this.endPoly(),
        r && !r.isIdentity() && (e = e.clone(!0),
        e.transform(r));
        const n = this.shapePrimitives
          , i = n.length;
        for (let o = 0; o < e.instructions.length; o++) {
            const s = e.instructions[o];
            this[s.action](...s.data)
        }
        if (e.checkForHoles && n.length - i > 1) {
            let o = null;
            for (let s = i; s < n.length; s++) {
                const a = n[s];
                if (a.shape.type === "polygon") {
                    const l = a.shape
                      , c = o == null ? void 0 : o.shape;
                    c && c.containsPolygon(l) ? (o.holes || (o.holes = []),
                    o.holes.push(a),
                    n.copyWithin(s, s + 1),
                    n.length--,
                    s--) : o = a
                }
            }
        }
        return this
    }
    finish(e=!1) {
        this.endPoly(e)
    }
    rect(e, r, n, i, o) {
        return this.drawShape(new mt(e,r,n,i), o),
        this
    }
    circle(e, r, n, i) {
        return this.drawShape(new mb(e,r,n), i),
        this
    }
    poly(e, r, n) {
        const i = new V0(e);
        return i.closePath = r,
        this.drawShape(i, n),
        this
    }
    regularPoly(e, r, n, i, o=0, s) {
        i = Math.max(i | 0, 3);
        const a = -1 * Math.PI / 2 + o
          , l = Math.PI * 2 / i
          , c = [];
        for (let u = 0; u < i; u++) {
            const f = a - u * l;
            c.push(e + n * Math.cos(f), r + n * Math.sin(f))
        }
        return this.poly(c, !0, s),
        this
    }
    roundPoly(e, r, n, i, o, s=0, a) {
        if (i = Math.max(i | 0, 3),
        o <= 0)
            return this.regularPoly(e, r, n, i, s);
        const l = n * Math.sin(Math.PI / i) - .001;
        o = Math.min(o, l);
        const c = -1 * Math.PI / 2 + s
          , u = Math.PI * 2 / i
          , f = (i - 2) * Math.PI / i / 2;
        for (let d = 0; d < i; d++) {
            const h = d * u + c
              , x = e + n * Math.cos(h)
              , y = r + n * Math.sin(h)
              , m = h + Math.PI + f
              , E = h - Math.PI - f
              , g = x + o * Math.cos(m)
              , p = y + o * Math.sin(m)
              , v = x + o * Math.cos(E)
              , _ = y + o * Math.sin(E);
            d === 0 ? this.moveTo(g, p) : this.lineTo(g, p),
            this.quadraticCurveTo(x, y, v, _, a)
        }
        return this.closePath()
    }
    roundShape(e, r, n=!1, i) {
        return e.length < 3 ? this : (n ? mue(this, e, r, i) : gue(this, e, r),
        this.closePath())
    }
    filletRect(e, r, n, i, o) {
        if (o === 0)
            return this.rect(e, r, n, i);
        const s = Math.min(n, i) / 2
          , a = Math.min(s, Math.max(-s, o))
          , l = e + n
          , c = r + i
          , u = a < 0 ? -a : 0
          , f = Math.abs(a);
        return this.moveTo(e, r + f).arcTo(e + u, r + u, e + f, r, f).lineTo(l - f, r).arcTo(l - u, r + u, l, r + f, f).lineTo(l, c - f).arcTo(l - u, c - u, e + n - f, c, f).lineTo(e + f, c).arcTo(e + u, c - u, e, c - f, f).closePath()
    }
    chamferRect(e, r, n, i, o, s) {
        if (o <= 0)
            return this.rect(e, r, n, i);
        const a = Math.min(o, Math.min(n, i) / 2)
          , l = e + n
          , c = r + i
          , u = [e + a, r, l - a, r, l, r + a, l, c - a, l - a, c, e + a, c, e, c - a, e, r + a];
        for (let f = u.length - 1; f >= 2; f -= 2)
            u[f] === u[f - 2] && u[f - 1] === u[f - 3] && u.splice(f - 1, 2);
        return this.poly(u, !0, s)
    }
    ellipse(e, r, n, i, o) {
        return this.drawShape(new vb(e,r,n,i), o),
        this
    }
    roundRect(e, r, n, i, o, s) {
        return this.drawShape(new yb(e,r,n,i,o), s),
        this
    }
    drawShape(e, r) {
        return this.endPoly(),
        this.shapePrimitives.push({
            shape: e,
            transform: r
        }),
        this
    }
    startPoly(e, r) {
        let n = this._currentPoly;
        return n && this.endPoly(),
        n = new V0,
        n.points.push(e, r),
        this._currentPoly = n,
        this
    }
    endPoly(e=!1) {
        const r = this._currentPoly;
        return r && r.points.length > 2 && (r.closePath = e,
        this.shapePrimitives.push({
            shape: r
        })),
        this._currentPoly = null,
        this
    }
    _ensurePoly(e=!0) {
        if (!this._currentPoly && (this._currentPoly = new V0,
        e)) {
            const r = this.shapePrimitives[this.shapePrimitives.length - 1];
            if (r) {
                let n = r.shape.x
                  , i = r.shape.y;
                if (r.transform && !r.transform.isIdentity()) {
                    const o = r.transform
                      , s = n;
                    n = o.a * n + o.c * i + o.tx,
                    i = o.b * s + o.d * i + o.ty
                }
                this._currentPoly.points.push(n, i)
            } else
                this._currentPoly.points.push(0, 0)
        }
    }
    buildPath() {
        const e = this._graphicsPath2D;
        this.shapePrimitives.length = 0,
        this._currentPoly = null;
        for (let r = 0; r < e.instructions.length; r++) {
            const n = e.instructions[r];
            this[n.action](...n.data)
        }
        this.finish()
    }
    get bounds() {
        const e = this._bounds;
        e.clear();
        const r = this.shapePrimitives;
        for (let n = 0; n < r.length; n++) {
            const i = r[n]
              , o = i.shape.getBounds(vue);
            i.transform ? e.addRect(o, i.transform) : e.addRect(o)
        }
        return e
    }
}
class os {
    constructor(e, r=!1) {
        this.instructions = [],
        this.uid = Dt("graphicsPath"),
        this._dirty = !0,
        this.checkForHoles = r,
        typeof e == "string" ? rce(e, this) : this.instructions = (e == null ? void 0 : e.slice()) ?? []
    }
    get shapePath() {
        return this._shapePath || (this._shapePath = new yue(this)),
        this._dirty && (this._dirty = !1,
        this._shapePath.buildPath()),
        this._shapePath
    }
    addPath(e, r) {
        return e = e.clone(),
        this.instructions.push({
            action: "addPath",
            data: [e, r]
        }),
        this._dirty = !0,
        this
    }
    arc(...e) {
        return this.instructions.push({
            action: "arc",
            data: e
        }),
        this._dirty = !0,
        this
    }
    arcTo(...e) {
        return this.instructions.push({
            action: "arcTo",
            data: e
        }),
        this._dirty = !0,
        this
    }
    arcToSvg(...e) {
        return this.instructions.push({
            action: "arcToSvg",
            data: e
        }),
        this._dirty = !0,
        this
    }
    bezierCurveTo(...e) {
        return this.instructions.push({
            action: "bezierCurveTo",
            data: e
        }),
        this._dirty = !0,
        this
    }
    bezierCurveToShort(e, r, n, i, o) {
        const s = this.instructions[this.instructions.length - 1]
          , a = this.getLastPoint(Gt.shared);
        let l = 0
          , c = 0;
        if (!s || s.action !== "bezierCurveTo")
            l = a.x,
            c = a.y;
        else {
            l = s.data[2],
            c = s.data[3];
            const u = a.x
              , f = a.y;
            l = u + (u - l),
            c = f + (f - c)
        }
        return this.instructions.push({
            action: "bezierCurveTo",
            data: [l, c, e, r, n, i, o]
        }),
        this._dirty = !0,
        this
    }
    closePath() {
        return this.instructions.push({
            action: "closePath",
            data: []
        }),
        this._dirty = !0,
        this
    }
    ellipse(...e) {
        return this.instructions.push({
            action: "ellipse",
            data: e
        }),
        this._dirty = !0,
        this
    }
    lineTo(...e) {
        return this.instructions.push({
            action: "lineTo",
            data: e
        }),
        this._dirty = !0,
        this
    }
    moveTo(...e) {
        return this.instructions.push({
            action: "moveTo",
            data: e
        }),
        this
    }
    quadraticCurveTo(...e) {
        return this.instructions.push({
            action: "quadraticCurveTo",
            data: e
        }),
        this._dirty = !0,
        this
    }
    quadraticCurveToShort(e, r, n) {
        const i = this.instructions[this.instructions.length - 1]
          , o = this.getLastPoint(Gt.shared);
        let s = 0
          , a = 0;
        if (!i || i.action !== "quadraticCurveTo")
            s = o.x,
            a = o.y;
        else {
            s = i.data[0],
            a = i.data[1];
            const l = o.x
              , c = o.y;
            s = l + (l - s),
            a = c + (c - a)
        }
        return this.instructions.push({
            action: "quadraticCurveTo",
            data: [s, a, e, r, n]
        }),
        this._dirty = !0,
        this
    }
    rect(e, r, n, i, o) {
        return this.instructions.push({
            action: "rect",
            data: [e, r, n, i, o]
        }),
        this._dirty = !0,
        this
    }
    circle(e, r, n, i) {
        return this.instructions.push({
            action: "circle",
            data: [e, r, n, i]
        }),
        this._dirty = !0,
        this
    }
    roundRect(...e) {
        return this.instructions.push({
            action: "roundRect",
            data: e
        }),
        this._dirty = !0,
        this
    }
    poly(...e) {
        return this.instructions.push({
            action: "poly",
            data: e
        }),
        this._dirty = !0,
        this
    }
    regularPoly(...e) {
        return this.instructions.push({
            action: "regularPoly",
            data: e
        }),
        this._dirty = !0,
        this
    }
    roundPoly(...e) {
        return this.instructions.push({
            action: "roundPoly",
            data: e
        }),
        this._dirty = !0,
        this
    }
    roundShape(...e) {
        return this.instructions.push({
            action: "roundShape",
            data: e
        }),
        this._dirty = !0,
        this
    }
    filletRect(...e) {
        return this.instructions.push({
            action: "filletRect",
            data: e
        }),
        this._dirty = !0,
        this
    }
    chamferRect(...e) {
        return this.instructions.push({
            action: "chamferRect",
            data: e
        }),
        this._dirty = !0,
        this
    }
    star(e, r, n, i, o, s, a) {
        o || (o = i / 2);
        const l = -1 * Math.PI / 2 + s
          , c = n * 2
          , u = Math.PI * 2 / c
          , f = [];
        for (let d = 0; d < c; d++) {
            const h = d % 2 ? o : i
              , x = d * u + l;
            f.push(e + h * Math.cos(x), r + h * Math.sin(x))
        }
        return this.poly(f, !0, a),
        this
    }
    clone(e=!1) {
        const r = new os;
        if (r.checkForHoles = this.checkForHoles,
        !e)
            r.instructions = this.instructions.slice();
        else
            for (let n = 0; n < this.instructions.length; n++) {
                const i = this.instructions[n];
                r.instructions.push({
                    action: i.action,
                    data: i.data.slice()
                })
            }
        return r
    }
    clear() {
        return this.instructions.length = 0,
        this._dirty = !0,
        this
    }
    transform(e) {
        if (e.isIdentity())
            return this;
        const r = e.a
          , n = e.b
          , i = e.c
          , o = e.d
          , s = e.tx
          , a = e.ty;
        let l = 0
          , c = 0
          , u = 0
          , f = 0
          , d = 0
          , h = 0
          , x = 0
          , y = 0;
        for (let m = 0; m < this.instructions.length; m++) {
            const E = this.instructions[m]
              , g = E.data;
            switch (E.action) {
            case "moveTo":
            case "lineTo":
                l = g[0],
                c = g[1],
                g[0] = r * l + i * c + s,
                g[1] = n * l + o * c + a;
                break;
            case "bezierCurveTo":
                u = g[0],
                f = g[1],
                d = g[2],
                h = g[3],
                l = g[4],
                c = g[5],
                g[0] = r * u + i * f + s,
                g[1] = n * u + o * f + a,
                g[2] = r * d + i * h + s,
                g[3] = n * d + o * h + a,
                g[4] = r * l + i * c + s,
                g[5] = n * l + o * c + a;
                break;
            case "quadraticCurveTo":
                u = g[0],
                f = g[1],
                l = g[2],
                c = g[3],
                g[0] = r * u + i * f + s,
                g[1] = n * u + o * f + a,
                g[2] = r * l + i * c + s,
                g[3] = n * l + o * c + a;
                break;
            case "arcToSvg":
                l = g[5],
                c = g[6],
                x = g[0],
                y = g[1],
                g[0] = r * x + i * y,
                g[1] = n * x + o * y,
                g[5] = r * l + i * c + s,
                g[6] = n * l + o * c + a;
                break;
            case "circle":
                g[4] = s0(g[3], e);
                break;
            case "rect":
                g[4] = s0(g[4], e);
                break;
            case "ellipse":
                g[8] = s0(g[8], e);
                break;
            case "roundRect":
                g[5] = s0(g[5], e);
                break;
            case "addPath":
                g[0].transform(e);
                break;
            case "poly":
                g[2] = s0(g[2], e);
                break;
            default:
                Ne("unknown transform action", E.action);
                break
            }
        }
        return this._dirty = !0,
        this
    }
    get bounds() {
        return this.shapePath.bounds
    }
    getLastPoint(e) {
        let r = this.instructions.length - 1
          , n = this.instructions[r];
        if (!n)
            return e.x = 0,
            e.y = 0,
            e;
        for (; n.action === "closePath"; ) {
            if (r--,
            r < 0)
                return e.x = 0,
                e.y = 0,
                e;
            n = this.instructions[r]
        }
        switch (n.action) {
        case "moveTo":
        case "lineTo":
            e.x = n.data[0],
            e.y = n.data[1];
            break;
        case "quadraticCurveTo":
            e.x = n.data[2],
            e.y = n.data[3];
            break;
        case "bezierCurveTo":
            e.x = n.data[4],
            e.y = n.data[5];
            break;
        case "arc":
        case "arcToSvg":
            e.x = n.data[5],
            e.y = n.data[6];
            break;
        case "addPath":
            n.data[0].getLastPoint(e);
            break
        }
        return e
    }
}
function s0(t, e) {
    return t ? t.prepend(e) : e.clone()
}
function Zt(t, e, r) {
    const n = t.getAttribute(e);
    return n ? Number(n) : r
}
function Eue(t, e) {
    const r = t.querySelectorAll("defs");
    for (let n = 0; n < r.length; n++) {
        const i = r[n];
        for (let o = 0; o < i.children.length; o++) {
            const s = i.children[o];
            switch (s.nodeName.toLowerCase()) {
            case "lineargradient":
                e.defs[s.id] = _ue(s);
                break;
            case "radialgradient":
                e.defs[s.id] = bue();
                break
            }
        }
    }
}
function _ue(t) {
    const e = Zt(t, "x1", 0)
      , r = Zt(t, "y1", 0)
      , n = Zt(t, "x2", 1)
      , i = Zt(t, "y2", 0)
      , o = t.getAttribute("gradientUnits") || "objectBoundingBox"
      , s = new gs(e,r,n,i,o === "objectBoundingBox" ? "local" : "global");
    for (let a = 0; a < t.children.length; a++) {
        const l = t.children[a]
          , c = Zt(l, "offset", 0)
          , u = Ut.shared.setValue(l.getAttribute("stop-color")).toNumber();
        s.addColorStop(c, u)
    }
    return s
}
function bue(t) {
    return Ne("[SVG Parser] Radial gradients are not yet supported"),
    new gs(0,0,1,0)
}
function o3(t) {
    const e = t.match(/url\s*\(\s*['"]?\s*#([^'"\s)]+)\s*['"]?\s*\)/i);
    return e ? e[1] : ""
}
const s3 = {
    fill: {
        type: "paint",
        default: 0
    },
    "fill-opacity": {
        type: "number",
        default: 1
    },
    stroke: {
        type: "paint",
        default: 0
    },
    "stroke-width": {
        type: "number",
        default: 1
    },
    "stroke-opacity": {
        type: "number",
        default: 1
    },
    "stroke-linecap": {
        type: "string",
        default: "butt"
    },
    "stroke-linejoin": {
        type: "string",
        default: "miter"
    },
    "stroke-miterlimit": {
        type: "number",
        default: 10
    },
    "stroke-dasharray": {
        type: "string",
        default: "none"
    },
    "stroke-dashoffset": {
        type: "number",
        default: 0
    },
    opacity: {
        type: "number",
        default: 1
    }
};
function ZP(t, e) {
    const r = t.getAttribute("style")
      , n = {}
      , i = {}
      , o = {
        strokeStyle: n,
        fillStyle: i,
        useFill: !1,
        useStroke: !1
    };
    for (const s in s3) {
        const a = t.getAttribute(s);
        a && a3(e, o, s, a.trim())
    }
    if (r) {
        const s = r.split(";");
        for (let a = 0; a < s.length; a++) {
            const l = s[a].trim()
              , [c,u] = l.split(":");
            s3[c] && a3(e, o, c, u.trim())
        }
    }
    return {
        strokeStyle: o.useStroke ? n : null,
        fillStyle: o.useFill ? i : null,
        useFill: o.useFill,
        useStroke: o.useStroke
    }
}
function a3(t, e, r, n) {
    switch (r) {
    case "stroke":
        if (n !== "none") {
            if (n.startsWith("url(")) {
                const i = o3(n);
                e.strokeStyle.fill = t.defs[i]
            } else
                e.strokeStyle.color = Ut.shared.setValue(n).toNumber();
            e.useStroke = !0
        }
        break;
    case "stroke-width":
        e.strokeStyle.width = Number(n);
        break;
    case "fill":
        if (n !== "none") {
            if (n.startsWith("url(")) {
                const i = o3(n);
                e.fillStyle.fill = t.defs[i]
            } else
                e.fillStyle.color = Ut.shared.setValue(n).toNumber();
            e.useFill = !0
        }
        break;
    case "fill-opacity":
        e.fillStyle.alpha = Number(n);
        break;
    case "stroke-opacity":
        e.strokeStyle.alpha = Number(n);
        break;
    case "opacity":
        e.fillStyle.alpha = Number(n),
        e.strokeStyle.alpha = Number(n);
        break
    }
}
function Cue(t) {
    if (t.length <= 2)
        return !0;
    const e = t.map(a => a.area).sort( (a, l) => l - a)
      , [r,n] = e
      , i = e[e.length - 1]
      , o = r / n
      , s = n / i;
    return !(o > 3 && s < 2)
}
function Aue(t) {
    return t.split(/(?=[Mm])/).filter(n => n.trim().length > 0)
}
function wue(t) {
    const e = t.match(/[-+]?[0-9]*\.?[0-9]+/g);
    if (!e || e.length < 4)
        return 0;
    const r = e.map(Number)
      , n = []
      , i = [];
    for (let u = 0; u < r.length; u += 2)
        u + 1 < r.length && (n.push(r[u]),
        i.push(r[u + 1]));
    if (n.length === 0 || i.length === 0)
        return 0;
    const o = Math.min(...n)
      , s = Math.max(...n)
      , a = Math.min(...i)
      , l = Math.max(...i);
    return (s - o) * (l - a)
}
function l3(t, e) {
    const r = new os(t,!1);
    for (const n of r.instructions)
        e.instructions.push(n)
}
function Bue(t, e) {
    if (typeof t == "string") {
        const s = document.createElement("div");
        s.innerHTML = t.trim(),
        t = s.querySelector("svg")
    }
    const r = {
        context: e,
        defs: {},
        path: new os
    };
    Eue(t, r);
    const n = t.children
      , {fillStyle: i, strokeStyle: o} = ZP(t, r);
    for (let s = 0; s < n.length; s++) {
        const a = n[s];
        a.nodeName.toLowerCase() !== "defs" && JP(a, r, i, o)
    }
    return e
}
function JP(t, e, r, n) {
    const i = t.children
      , {fillStyle: o, strokeStyle: s} = ZP(t, e);
    o && r ? r = {
        ...r,
        ...o
    } : o && (r = o),
    s && n ? n = {
        ...n,
        ...s
    } : s && (n = s);
    const a = !r && !n;
    a && (r = {
        color: 0
    });
    let l, c, u, f, d, h, x, y, m, E, g, p, v, _, b, C, w;
    switch (t.nodeName.toLowerCase()) {
    case "path":
        {
            _ = t.getAttribute("d");
            const T = t.getAttribute("fill-rule")
              , A = Aue(_)
              , B = T === "evenodd"
              , S = A.length > 1;
            if (B && S) {
                const F = A.map(P => ({
                    path: P,
                    area: wue(P)
                }));
                if (F.sort( (P, N) => N.area - P.area),
                A.length > 3 || !Cue(F))
                    for (let P = 0; P < F.length; P++) {
                        const N = F[P]
                          , j = P === 0;
                        e.context.beginPath();
                        const K = new os(void 0,!0);
                        l3(N.path, K),
                        e.context.path(K),
                        j ? (r && e.context.fill(r),
                        n && e.context.stroke(n)) : e.context.cut()
                    }
                else
                    for (let P = 0; P < F.length; P++) {
                        const N = F[P]
                          , j = P % 2 === 1;
                        e.context.beginPath();
                        const K = new os(void 0,!0);
                        l3(N.path, K),
                        e.context.path(K),
                        j ? e.context.cut() : (r && e.context.fill(r),
                        n && e.context.stroke(n))
                    }
            } else {
                const F = T ? T === "evenodd" : !0;
                b = new os(_,F),
                e.context.path(b),
                r && e.context.fill(r),
                n && e.context.stroke(n)
            }
            break
        }
    case "circle":
        x = Zt(t, "cx", 0),
        y = Zt(t, "cy", 0),
        m = Zt(t, "r", 0),
        e.context.ellipse(x, y, m, m),
        r && e.context.fill(r),
        n && e.context.stroke(n);
        break;
    case "rect":
        l = Zt(t, "x", 0),
        c = Zt(t, "y", 0),
        C = Zt(t, "width", 0),
        w = Zt(t, "height", 0),
        E = Zt(t, "rx", 0),
        g = Zt(t, "ry", 0),
        E || g ? e.context.roundRect(l, c, C, w, E || g) : e.context.rect(l, c, C, w),
        r && e.context.fill(r),
        n && e.context.stroke(n);
        break;
    case "ellipse":
        x = Zt(t, "cx", 0),
        y = Zt(t, "cy", 0),
        E = Zt(t, "rx", 0),
        g = Zt(t, "ry", 0),
        e.context.beginPath(),
        e.context.ellipse(x, y, E, g),
        r && e.context.fill(r),
        n && e.context.stroke(n);
        break;
    case "line":
        u = Zt(t, "x1", 0),
        f = Zt(t, "y1", 0),
        d = Zt(t, "x2", 0),
        h = Zt(t, "y2", 0),
        e.context.beginPath(),
        e.context.moveTo(u, f),
        e.context.lineTo(d, h),
        n && e.context.stroke(n);
        break;
    case "polygon":
        v = t.getAttribute("points"),
        p = v.match(/\d+/g).map(T => parseInt(T, 10)),
        e.context.poly(p, !0),
        r && e.context.fill(r),
        n && e.context.stroke(n);
        break;
    case "polyline":
        v = t.getAttribute("points"),
        p = v.match(/\d+/g).map(T => parseInt(T, 10)),
        e.context.poly(p, !1),
        n && e.context.stroke(n);
        break;
    case "g":
    case "svg":
        break;
    default:
        {
            Ne(`[SVG parser] <${t.nodeName}> elements unsupported`);
            break
        }
    }
    a && (r = null);
    for (let T = 0; T < i.length; T++)
        JP(i[T], e, r, n)
}
function Sue(t) {
    return Ut.isColorLike(t)
}
function c3(t) {
    return t instanceof p1
}
function u3(t) {
    return t instanceof gs
}
function Tue(t) {
    return t instanceof Be
}
function Due(t, e, r) {
    const n = Ut.shared.setValue(e ?? 0);
    return t.color = n.toNumber(),
    t.alpha = n.alpha === 1 ? r.alpha : n.alpha,
    t.texture = Be.WHITE,
    {
        ...r,
        ...t
    }
}
function Fue(t, e, r) {
    return t.texture = e,
    {
        ...r,
        ...t
    }
}
function f3(t, e, r) {
    return t.fill = e,
    t.color = 16777215,
    t.texture = e.texture,
    t.matrix = e.transform,
    {
        ...r,
        ...t
    }
}
function d3(t, e, r) {
    return e.buildGradient(),
    t.fill = e,
    t.color = 16777215,
    t.texture = e.texture,
    t.matrix = e.transform,
    t.textureSpace = e.textureSpace,
    {
        ...r,
        ...t
    }
}
function Pue(t, e) {
    const r = {
        ...e,
        ...t
    }
      , n = Ut.shared.setValue(r.color);
    return r.alpha *= n.alpha,
    r.color = n.toNumber(),
    r
}
function Ja(t, e) {
    if (t == null)
        return null;
    const r = {}
      , n = t;
    return Sue(t) ? Due(r, t, e) : Tue(t) ? Fue(r, t, e) : c3(t) ? f3(r, t, e) : u3(t) ? d3(r, t, e) : n.fill && c3(n.fill) ? f3(n, n.fill, e) : n.fill && u3(n.fill) ? d3(n, n.fill, e) : Pue(n, e)
}
function Hx(t, e) {
    const {width: r, alignment: n, miterLimit: i, cap: o, join: s, pixelLine: a, ...l} = e
      , c = Ja(t, l);
    return c ? {
        width: r,
        alignment: n,
        miterLimit: i,
        cap: o,
        join: s,
        pixelLine: a,
        ...c
    } : null
}
const Iue = new Gt
  , h3 = new Pe
  , Fb = class ro extends Qn {
    constructor() {
        super(...arguments),
        this.uid = Dt("graphicsContext"),
        this.dirty = !0,
        this.batchMode = "auto",
        this.instructions = [],
        this._activePath = new os,
        this._transform = new Pe,
        this._fillStyle = {
            ...ro.defaultFillStyle
        },
        this._strokeStyle = {
            ...ro.defaultStrokeStyle
        },
        this._stateStack = [],
        this._tick = 0,
        this._bounds = new jr,
        this._boundsDirty = !0
    }
    clone() {
        const e = new ro;
        return e.batchMode = this.batchMode,
        e.instructions = this.instructions.slice(),
        e._activePath = this._activePath.clone(),
        e._transform = this._transform.clone(),
        e._fillStyle = {
            ...this._fillStyle
        },
        e._strokeStyle = {
            ...this._strokeStyle
        },
        e._stateStack = this._stateStack.slice(),
        e._bounds = this._bounds.clone(),
        e._boundsDirty = !0,
        e
    }
    get fillStyle() {
        return this._fillStyle
    }
    set fillStyle(e) {
        this._fillStyle = Ja(e, ro.defaultFillStyle)
    }
    get strokeStyle() {
        return this._strokeStyle
    }
    set strokeStyle(e) {
        this._strokeStyle = Hx(e, ro.defaultStrokeStyle)
    }
    setFillStyle(e) {
        return this._fillStyle = Ja(e, ro.defaultFillStyle),
        this
    }
    setStrokeStyle(e) {
        return this._strokeStyle = Ja(e, ro.defaultStrokeStyle),
        this
    }
    texture(e, r, n, i, o, s) {
        return this.instructions.push({
            action: "texture",
            data: {
                image: e,
                dx: n || 0,
                dy: i || 0,
                dw: o || e.frame.width,
                dh: s || e.frame.height,
                transform: this._transform.clone(),
                alpha: this._fillStyle.alpha,
                style: r ? Ut.shared.setValue(r).toNumber() : 16777215
            }
        }),
        this.onUpdate(),
        this
    }
    beginPath() {
        return this._activePath = new os,
        this
    }
    fill(e, r) {
        let n;
        const i = this.instructions[this.instructions.length - 1];
        return this._tick === 0 && (i == null ? void 0 : i.action) === "stroke" ? n = i.data.path : n = this._activePath.clone(),
        n ? (e != null && (r !== void 0 && typeof e == "number" && (Re(tt, "GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead"),
        e = {
            color: e,
            alpha: r
        }),
        this._fillStyle = Ja(e, ro.defaultFillStyle)),
        this.instructions.push({
            action: "fill",
            data: {
                style: this.fillStyle,
                path: n
            }
        }),
        this.onUpdate(),
        this._initNextPathLocation(),
        this._tick = 0,
        this) : this
    }
    _initNextPathLocation() {
        const {x: e, y: r} = this._activePath.getLastPoint(Gt.shared);
        this._activePath.clear(),
        this._activePath.moveTo(e, r)
    }
    stroke(e) {
        let r;
        const n = this.instructions[this.instructions.length - 1];
        return this._tick === 0 && (n == null ? void 0 : n.action) === "fill" ? r = n.data.path : r = this._activePath.clone(),
        r ? (e != null && (this._strokeStyle = Hx(e, ro.defaultStrokeStyle)),
        this.instructions.push({
            action: "stroke",
            data: {
                style: this.strokeStyle,
                path: r
            }
        }),
        this.onUpdate(),
        this._initNextPathLocation(),
        this._tick = 0,
        this) : this
    }
    cut() {
        for (let e = 0; e < 2; e++) {
            const r = this.instructions[this.instructions.length - 1 - e]
              , n = this._activePath.clone();
            if (r && (r.action === "stroke" || r.action === "fill"))
                if (r.data.hole)
                    r.data.hole.addPath(n);
                else {
                    r.data.hole = n;
                    break
                }
        }
        return this._initNextPathLocation(),
        this
    }
    arc(e, r, n, i, o, s) {
        this._tick++;
        const a = this._transform;
        return this._activePath.arc(a.a * e + a.c * r + a.tx, a.b * e + a.d * r + a.ty, n, i, o, s),
        this
    }
    arcTo(e, r, n, i, o) {
        this._tick++;
        const s = this._transform;
        return this._activePath.arcTo(s.a * e + s.c * r + s.tx, s.b * e + s.d * r + s.ty, s.a * n + s.c * i + s.tx, s.b * n + s.d * i + s.ty, o),
        this
    }
    arcToSvg(e, r, n, i, o, s, a) {
        this._tick++;
        const l = this._transform;
        return this._activePath.arcToSvg(e, r, n, i, o, l.a * s + l.c * a + l.tx, l.b * s + l.d * a + l.ty),
        this
    }
    bezierCurveTo(e, r, n, i, o, s, a) {
        this._tick++;
        const l = this._transform;
        return this._activePath.bezierCurveTo(l.a * e + l.c * r + l.tx, l.b * e + l.d * r + l.ty, l.a * n + l.c * i + l.tx, l.b * n + l.d * i + l.ty, l.a * o + l.c * s + l.tx, l.b * o + l.d * s + l.ty, a),
        this
    }
    closePath() {
        var e;
        return this._tick++,
        (e = this._activePath) == null || e.closePath(),
        this
    }
    ellipse(e, r, n, i) {
        return this._tick++,
        this._activePath.ellipse(e, r, n, i, this._transform.clone()),
        this
    }
    circle(e, r, n) {
        return this._tick++,
        this._activePath.circle(e, r, n, this._transform.clone()),
        this
    }
    path(e) {
        return this._tick++,
        this._activePath.addPath(e, this._transform.clone()),
        this
    }
    lineTo(e, r) {
        this._tick++;
        const n = this._transform;
        return this._activePath.lineTo(n.a * e + n.c * r + n.tx, n.b * e + n.d * r + n.ty),
        this
    }
    moveTo(e, r) {
        this._tick++;
        const n = this._transform
          , i = this._activePath.instructions
          , o = n.a * e + n.c * r + n.tx
          , s = n.b * e + n.d * r + n.ty;
        return i.length === 1 && i[0].action === "moveTo" ? (i[0].data[0] = o,
        i[0].data[1] = s,
        this) : (this._activePath.moveTo(o, s),
        this)
    }
    quadraticCurveTo(e, r, n, i, o) {
        this._tick++;
        const s = this._transform;
        return this._activePath.quadraticCurveTo(s.a * e + s.c * r + s.tx, s.b * e + s.d * r + s.ty, s.a * n + s.c * i + s.tx, s.b * n + s.d * i + s.ty, o),
        this
    }
    rect(e, r, n, i) {
        return this._tick++,
        this._activePath.rect(e, r, n, i, this._transform.clone()),
        this
    }
    roundRect(e, r, n, i, o) {
        return this._tick++,
        this._activePath.roundRect(e, r, n, i, o, this._transform.clone()),
        this
    }
    poly(e, r) {
        return this._tick++,
        this._activePath.poly(e, r, this._transform.clone()),
        this
    }
    regularPoly(e, r, n, i, o=0, s) {
        return this._tick++,
        this._activePath.regularPoly(e, r, n, i, o, s),
        this
    }
    roundPoly(e, r, n, i, o, s) {
        return this._tick++,
        this._activePath.roundPoly(e, r, n, i, o, s),
        this
    }
    roundShape(e, r, n, i) {
        return this._tick++,
        this._activePath.roundShape(e, r, n, i),
        this
    }
    filletRect(e, r, n, i, o) {
        return this._tick++,
        this._activePath.filletRect(e, r, n, i, o),
        this
    }
    chamferRect(e, r, n, i, o, s) {
        return this._tick++,
        this._activePath.chamferRect(e, r, n, i, o, s),
        this
    }
    star(e, r, n, i, o=0, s=0) {
        return this._tick++,
        this._activePath.star(e, r, n, i, o, s, this._transform.clone()),
        this
    }
    svg(e) {
        return this._tick++,
        Bue(e, this),
        this
    }
    restore() {
        const e = this._stateStack.pop();
        return e && (this._transform = e.transform,
        this._fillStyle = e.fillStyle,
        this._strokeStyle = e.strokeStyle),
        this
    }
    save() {
        return this._stateStack.push({
            transform: this._transform.clone(),
            fillStyle: {
                ...this._fillStyle
            },
            strokeStyle: {
                ...this._strokeStyle
            }
        }),
        this
    }
    getTransform() {
        return this._transform
    }
    resetTransform() {
        return this._transform.identity(),
        this
    }
    rotate(e) {
        return this._transform.rotate(e),
        this
    }
    scale(e, r=e) {
        return this._transform.scale(e, r),
        this
    }
    setTransform(e, r, n, i, o, s) {
        return e instanceof Pe ? (this._transform.set(e.a, e.b, e.c, e.d, e.tx, e.ty),
        this) : (this._transform.set(e, r, n, i, o, s),
        this)
    }
    transform(e, r, n, i, o, s) {
        return e instanceof Pe ? (this._transform.append(e),
        this) : (h3.set(e, r, n, i, o, s),
        this._transform.append(h3),
        this)
    }
    translate(e, r=e) {
        return this._transform.translate(e, r),
        this
    }
    clear() {
        return this._activePath.clear(),
        this.instructions.length = 0,
        this.resetTransform(),
        this.onUpdate(),
        this
    }
    onUpdate() {
        this._boundsDirty = !0,
        !this.dirty && (this.emit("update", this, 16),
        this.dirty = !0)
    }
    get bounds() {
        if (!this._boundsDirty)
            return this._bounds;
        this._boundsDirty = !1;
        const e = this._bounds;
        e.clear();
        for (let r = 0; r < this.instructions.length; r++) {
            const n = this.instructions[r]
              , i = n.action;
            if (i === "fill") {
                const o = n.data;
                e.addBounds(o.path.bounds)
            } else if (i === "texture") {
                const o = n.data;
                e.addFrame(o.dx, o.dy, o.dx + o.dw, o.dy + o.dh, o.transform)
            }
            if (i === "stroke") {
                const o = n.data
                  , s = o.style.alignment
                  , a = o.style.width * (1 - s)
                  , l = o.path.bounds;
                e.addFrame(l.minX - a, l.minY - a, l.maxX + a, l.maxY + a)
            }
        }
        return e
    }
    containsPoint(e) {
        var i;
        if (!this.bounds.containsPoint(e.x, e.y))
            return !1;
        const r = this.instructions;
        let n = !1;
        for (let o = 0; o < r.length; o++) {
            const s = r[o]
              , a = s.data
              , l = a.path;
            if (!s.action || !l)
                continue;
            const c = a.style
              , u = l.shapePath.shapePrimitives;
            for (let f = 0; f < u.length; f++) {
                const d = u[f].shape;
                if (!c || !d)
                    continue;
                const h = u[f].transform
                  , x = h ? h.applyInverse(e, Iue) : e;
                if (s.action === "fill")
                    n = d.contains(x.x, x.y);
                else {
                    const m = c;
                    n = d.strokeContains(x.x, x.y, m.width, m.alignment)
                }
                const y = a.hole;
                if (y) {
                    const m = (i = y.shapePath) == null ? void 0 : i.shapePrimitives;
                    if (m)
                        for (let E = 0; E < m.length; E++)
                            m[E].shape.contains(x.x, x.y) && (n = !1)
                }
                if (n)
                    return !0
            }
        }
        return n
    }
    destroy(e=!1) {
        if (this._stateStack.length = 0,
        this._transform = null,
        this.emit("destroy", this),
        this.removeAllListeners(),
        typeof e == "boolean" ? e : e == null ? void 0 : e.texture) {
            const n = typeof e == "boolean" ? e : e == null ? void 0 : e.textureSource;
            this._fillStyle.texture && (this._fillStyle.fill && "uid"in this._fillStyle.fill ? this._fillStyle.fill.destroy() : this._fillStyle.texture.destroy(n)),
            this._strokeStyle.texture && (this._strokeStyle.fill && "uid"in this._strokeStyle.fill ? this._strokeStyle.fill.destroy() : this._strokeStyle.texture.destroy(n))
        }
        this._fillStyle = null,
        this._strokeStyle = null,
        this.instructions = null,
        this._activePath = null,
        this._bounds = null,
        this._stateStack = null,
        this.customShader = null,
        this._transform = null
    }
}
;
Fb.defaultFillStyle = {
    color: 16777215,
    alpha: 1,
    texture: Be.WHITE,
    matrix: null,
    fill: null,
    textureSpace: "local"
};
Fb.defaultStrokeStyle = {
    width: 1,
    color: 16777215,
    alpha: 1,
    alignment: .5,
    miterLimit: 10,
    cap: "butt",
    join: "miter",
    texture: Be.WHITE,
    matrix: null,
    fill: null,
    textureSpace: "local",
    pixelLine: !1
};
let ui = Fb;
const Pb = class _c extends Qn {
    constructor(e={}) {
        super(),
        this.uid = Dt("textStyle"),
        this._tick = 0,
        Oue(e);
        const r = {
            ..._c.defaultTextStyle,
            ...e
        };
        for (const n in r) {
            const i = n;
            this[i] = r[n]
        }
        this.update(),
        this._tick = 0
    }
    get align() {
        return this._align
    }
    set align(e) {
        this._align !== e && (this._align = e,
        this.update())
    }
    get breakWords() {
        return this._breakWords
    }
    set breakWords(e) {
        this._breakWords !== e && (this._breakWords = e,
        this.update())
    }
    get dropShadow() {
        return this._dropShadow
    }
    set dropShadow(e) {
        this._dropShadow !== e && (e !== null && typeof e == "object" ? this._dropShadow = this._createProxy({
            ..._c.defaultDropShadow,
            ...e
        }) : this._dropShadow = e ? this._createProxy({
            ..._c.defaultDropShadow
        }) : null,
        this.update())
    }
    get fontFamily() {
        return this._fontFamily
    }
    set fontFamily(e) {
        this._fontFamily !== e && (this._fontFamily = e,
        this.update())
    }
    get fontSize() {
        return this._fontSize
    }
    set fontSize(e) {
        this._fontSize !== e && (typeof e == "string" ? this._fontSize = parseInt(e, 10) : this._fontSize = e,
        this.update())
    }
    get fontStyle() {
        return this._fontStyle
    }
    set fontStyle(e) {
        this._fontStyle !== e && (this._fontStyle = e.toLowerCase(),
        this.update())
    }
    get fontVariant() {
        return this._fontVariant
    }
    set fontVariant(e) {
        this._fontVariant !== e && (this._fontVariant = e,
        this.update())
    }
    get fontWeight() {
        return this._fontWeight
    }
    set fontWeight(e) {
        this._fontWeight !== e && (this._fontWeight = e,
        this.update())
    }
    get leading() {
        return this._leading
    }
    set leading(e) {
        this._leading !== e && (this._leading = e,
        this.update())
    }
    get letterSpacing() {
        return this._letterSpacing
    }
    set letterSpacing(e) {
        this._letterSpacing !== e && (this._letterSpacing = e,
        this.update())
    }
    get lineHeight() {
        return this._lineHeight
    }
    set lineHeight(e) {
        this._lineHeight !== e && (this._lineHeight = e,
        this.update())
    }
    get padding() {
        return this._padding
    }
    set padding(e) {
        this._padding !== e && (this._padding = e,
        this.update())
    }
    get filters() {
        return this._filters
    }
    set filters(e) {
        this._filters !== e && (this._filters = Object.freeze(e),
        this.update())
    }
    get trim() {
        return this._trim
    }
    set trim(e) {
        this._trim !== e && (this._trim = e,
        this.update())
    }
    get textBaseline() {
        return this._textBaseline
    }
    set textBaseline(e) {
        this._textBaseline !== e && (this._textBaseline = e,
        this.update())
    }
    get whiteSpace() {
        return this._whiteSpace
    }
    set whiteSpace(e) {
        this._whiteSpace !== e && (this._whiteSpace = e,
        this.update())
    }
    get wordWrap() {
        return this._wordWrap
    }
    set wordWrap(e) {
        this._wordWrap !== e && (this._wordWrap = e,
        this.update())
    }
    get wordWrapWidth() {
        return this._wordWrapWidth
    }
    set wordWrapWidth(e) {
        this._wordWrapWidth !== e && (this._wordWrapWidth = e,
        this.update())
    }
    get fill() {
        return this._originalFill
    }
    set fill(e) {
        e !== this._originalFill && (this._originalFill = e,
        this._isFillStyle(e) && (this._originalFill = this._createProxy({
            ...ui.defaultFillStyle,
            ...e
        }, () => {
            this._fill = Ja({
                ...this._originalFill
            }, ui.defaultFillStyle)
        }
        )),
        this._fill = Ja(e === 0 ? "black" : e, ui.defaultFillStyle),
        this.update())
    }
    get stroke() {
        return this._originalStroke
    }
    set stroke(e) {
        e !== this._originalStroke && (this._originalStroke = e,
        this._isFillStyle(e) && (this._originalStroke = this._createProxy({
            ...ui.defaultStrokeStyle,
            ...e
        }, () => {
            this._stroke = Hx({
                ...this._originalStroke
            }, ui.defaultStrokeStyle)
        }
        )),
        this._stroke = Hx(e, ui.defaultStrokeStyle),
        this.update())
    }
    update() {
        this._tick++,
        this.emit("update", this)
    }
    reset() {
        const e = _c.defaultTextStyle;
        for (const r in e)
            this[r] = e[r]
    }
    get styleKey() {
        return `${this.uid}-${this._tick}`
    }
    clone() {
        return new _c({
            align: this.align,
            breakWords: this.breakWords,
            dropShadow: this._dropShadow ? {
                ...this._dropShadow
            } : null,
            fill: this._fill,
            fontFamily: this.fontFamily,
            fontSize: this.fontSize,
            fontStyle: this.fontStyle,
            fontVariant: this.fontVariant,
            fontWeight: this.fontWeight,
            leading: this.leading,
            letterSpacing: this.letterSpacing,
            lineHeight: this.lineHeight,
            padding: this.padding,
            stroke: this._stroke,
            textBaseline: this.textBaseline,
            whiteSpace: this.whiteSpace,
            wordWrap: this.wordWrap,
            wordWrapWidth: this.wordWrapWidth,
            filters: this._filters ? [...this._filters] : void 0
        })
    }
    _getFinalPadding() {
        let e = 0;
        if (this._filters)
            for (let r = 0; r < this._filters.length; r++)
                e += this._filters[r].padding;
        return Math.max(this._padding, e)
    }
    destroy(e=!1) {
        var n, i, o, s;
        if (this.removeAllListeners(),
        typeof e == "boolean" ? e : e == null ? void 0 : e.texture) {
            const a = typeof e == "boolean" ? e : e == null ? void 0 : e.textureSource;
            (n = this._fill) != null && n.texture && this._fill.texture.destroy(a),
            (i = this._originalFill) != null && i.texture && this._originalFill.texture.destroy(a),
            (o = this._stroke) != null && o.texture && this._stroke.texture.destroy(a),
            (s = this._originalStroke) != null && s.texture && this._originalStroke.texture.destroy(a)
        }
        this._fill = null,
        this._stroke = null,
        this.dropShadow = null,
        this._originalStroke = null,
        this._originalFill = null
    }
    _createProxy(e, r) {
        return new Proxy(e,{
            set: (n, i, o) => (n[i] === o || (n[i] = o,
            r == null || r(i, o),
            this.update()),
            !0)
        })
    }
    _isFillStyle(e) {
        return (e ?? null) !== null && !(Ut.isColorLike(e) || e instanceof gs || e instanceof p1)
    }
}
;
Pb.defaultDropShadow = {
    alpha: 1,
    angle: Math.PI / 6,
    blur: 0,
    color: "black",
    distance: 5
};
Pb.defaultTextStyle = {
    align: "left",
    breakWords: !1,
    dropShadow: null,
    fill: "black",
    fontFamily: "Arial",
    fontSize: 26,
    fontStyle: "normal",
    fontVariant: "normal",
    fontWeight: "normal",
    leading: 0,
    letterSpacing: 0,
    lineHeight: 0,
    padding: 0,
    stroke: null,
    textBaseline: "alphabetic",
    trim: !1,
    whiteSpace: "pre",
    wordWrap: !1,
    wordWrapWidth: 100
};
let Tl = Pb;
function Oue(t) {
    const e = t;
    if (typeof e.dropShadow == "boolean" && e.dropShadow) {
        const r = Tl.defaultDropShadow;
        t.dropShadow = {
            alpha: e.dropShadowAlpha ?? r.alpha,
            angle: e.dropShadowAngle ?? r.angle,
            blur: e.dropShadowBlur ?? r.blur,
            color: e.dropShadowColor ?? r.color,
            distance: e.dropShadowDistance ?? r.distance
        }
    }
    if (e.strokeThickness !== void 0) {
        Re(tt, "strokeThickness is now a part of stroke");
        const r = e.stroke;
        let n = {};
        if (Ut.isColorLike(r))
            n.color = r;
        else if (r instanceof gs || r instanceof p1)
            n.fill = r;
        else if (Object.hasOwnProperty.call(r, "color") || Object.hasOwnProperty.call(r, "fill"))
            n = r;
        else
            throw new Error("Invalid stroke value.");
        t.stroke = {
            ...n,
            width: e.strokeThickness
        }
    }
    if (Array.isArray(e.fillGradientStops)) {
        if (Re(tt, "gradient fill is now a fill pattern: `new FillGradient(...)`"),
        !Array.isArray(e.fill) || e.fill.length === 0)
            throw new Error("Invalid fill value. Expected an array of colors for gradient fill.");
        e.fill.length !== e.fillGradientStops.length && Ne("The number of fill colors must match the number of fill gradient stops.");
        const r = new gs({
            start: {
                x: 0,
                y: 0
            },
            end: {
                x: 0,
                y: 1
            },
            textureSpace: "local"
        })
          , n = e.fillGradientStops.slice()
          , i = e.fill.map(o => Ut.shared.setValue(o).toNumber());
        n.forEach( (o, s) => {
            r.addColorStop(o, i[s])
        }
        ),
        t.fill = {
            fill: r
        }
    }
}
class kue {
    constructor(e) {
        this._canvasPool = Object.create(null),
        this.canvasOptions = e || {},
        this.enableFullScreen = !1
    }
    _createCanvasAndContext(e, r) {
        const n = je.get().createCanvas();
        n.width = e,
        n.height = r;
        const i = n.getContext("2d");
        return {
            canvas: n,
            context: i
        }
    }
    getOptimalCanvasAndContext(e, r, n=1) {
        e = Math.ceil(e * n - 1e-6),
        r = Math.ceil(r * n - 1e-6),
        e = ou(e),
        r = ou(r);
        const i = (e << 17) + (r << 1);
        this._canvasPool[i] || (this._canvasPool[i] = []);
        let o = this._canvasPool[i].pop();
        return o || (o = this._createCanvasAndContext(e, r)),
        o
    }
    returnCanvasAndContext(e) {
        const r = e.canvas
          , {width: n, height: i} = r
          , o = (n << 17) + (i << 1);
        e.context.resetTransform(),
        e.context.clearRect(0, 0, n, i),
        this._canvasPool[o].push(e)
    }
    clear() {
        this._canvasPool = {}
    }
}
const ms = new kue;
Fu.register(ms);
const x3 = 1e5;
function Vx(t, e, r, n=0) {
    if (t.texture === Be.WHITE && !t.fill)
        return Ut.shared.setValue(t.color).setAlpha(t.alpha ?? 1).toHexa();
    if (t.fill) {
        if (t.fill instanceof p1) {
            const i = t.fill
              , o = e.createPattern(i.texture.source.resource, "repeat")
              , s = i.transform.copyTo(Pe.shared);
            return s.scale(i.texture.frame.width, i.texture.frame.height),
            o.setTransform(s),
            o
        } else if (t.fill instanceof gs) {
            const i = t.fill
              , o = i.type === "linear"
              , s = i.textureSpace === "local";
            let a = 1
              , l = 1;
            s && r && (a = r.width + n,
            l = r.height + n);
            let c, u = !1;
            if (o) {
                const {start: f, end: d} = i;
                c = e.createLinearGradient(f.x * a, f.y * l, d.x * a, d.y * l),
                u = Math.abs(d.x - f.x) < Math.abs((d.y - f.y) * .1)
            } else {
                const {center: f, innerRadius: d, outerCenter: h, outerRadius: x} = i;
                c = e.createRadialGradient(f.x * a, f.y * l, d * a, h.x * a, h.y * l, x * a)
            }
            if (u && s && r) {
                const f = r.lineHeight / l;
                for (let d = 0; d < r.lines.length; d++) {
                    const h = (d * r.lineHeight + n / 2) / l;
                    i.colorStops.forEach(x => {
                        const y = h + x.offset * f;
                        c.addColorStop(Math.floor(y * x3) / x3, Ut.shared.setValue(x.color).toHex())
                    }
                    )
                }
            } else
                i.colorStops.forEach(f => {
                    c.addColorStop(f.offset, Ut.shared.setValue(f.color).toHex())
                }
                );
            return c
        }
    } else {
        const i = e.createPattern(t.texture.source.resource, "repeat")
          , o = t.matrix.copyTo(Pe.shared);
        return o.scale(t.texture.frame.width, t.texture.frame.height),
        i.setTransform(o),
        i
    }
    return Ne("FillStyle not recognised", t),
    "red"
}
const QP = class eI extends RP {
    constructor(e) {
        super(),
        this.resolution = 1,
        this.pages = [],
        this._padding = 0,
        this._measureCache = Object.create(null),
        this._currentChars = [],
        this._currentX = 0,
        this._currentY = 0,
        this._currentMaxCharHeight = 0,
        this._currentPageIndex = -1,
        this._skipKerning = !1;
        const r = {
            ...eI.defaultOptions,
            ...e
        };
        this._textureSize = r.textureSize,
        this._mipmap = r.mipmap;
        const n = r.style.clone();
        r.overrideFill && (n._fill.color = 16777215,
        n._fill.alpha = 1,
        n._fill.texture = Be.WHITE,
        n._fill.fill = null),
        this.applyFillAsTint = r.overrideFill;
        const i = n.fontSize;
        n.fontSize = this.baseMeasurementFontSize;
        const o = Ux(n);
        r.overrideSize ? n._stroke && (n._stroke.width *= this.baseRenderedFontSize / i) : n.fontSize = this.baseRenderedFontSize = i,
        this._style = n,
        this._skipKerning = r.skipKerning ?? !1,
        this.resolution = r.resolution ?? 1,
        this._padding = r.padding ?? 4,
        r.textureStyle && (this._textureStyle = r.textureStyle instanceof wo ? r.textureStyle : new wo(r.textureStyle)),
        this.fontMetrics = Ii.measureFont(o),
        this.lineHeight = n.lineHeight || this.fontMetrics.fontSize || n.fontSize
    }
    ensureCharacters(e) {
        var m, E;
        const r = Ii.graphemeSegmenter(e).filter(g => !this._currentChars.includes(g)).filter( (g, p, v) => v.indexOf(g) === p);
        if (!r.length)
            return;
        this._currentChars = [...this._currentChars, ...r];
        let n;
        this._currentPageIndex === -1 ? n = this._nextPage() : n = this.pages[this._currentPageIndex];
        let {canvas: i, context: o} = n.canvasAndContext
          , s = n.texture.source;
        const a = this._style;
        let l = this._currentX
          , c = this._currentY
          , u = this._currentMaxCharHeight;
        const f = this.baseRenderedFontSize / this.baseMeasurementFontSize
          , d = this._padding * f;
        let h = !1;
        const x = i.width / this.resolution
          , y = i.height / this.resolution;
        for (let g = 0; g < r.length; g++) {
            const p = r[g]
              , v = Ii.measureText(p, a, i, !1);
            v.lineHeight = v.height;
            const _ = v.width * f
              , b = Math.ceil((a.fontStyle === "italic" ? 2 : 1) * _)
              , C = v.height * f
              , w = b + d * 2
              , T = C + d * 2;
            if (h = !1,
            p !== `
` && p !== "\r" && p !== "	" && p !== " " && (h = !0,
            u = Math.ceil(Math.max(T, u))),
            l + w > x && (c += u,
            u = T,
            l = 0,
            c + u > y)) {
                s.update();
                const B = this._nextPage();
                i = B.canvasAndContext.canvas,
                o = B.canvasAndContext.context,
                s = B.texture.source,
                l = 0,
                c = 0,
                u = 0
            }
            const A = _ / f - (((m = a.dropShadow) == null ? void 0 : m.distance) ?? 0) - (((E = a._stroke) == null ? void 0 : E.width) ?? 0);
            if (this.chars[p] = {
                id: p.codePointAt(0),
                xOffset: -this._padding,
                yOffset: -this._padding,
                xAdvance: A,
                kerning: {}
            },
            h) {
                this._drawGlyph(o, v, l + d, c + d, f, a);
                const B = s.width * f
                  , S = s.height * f
                  , D = new mt(l / B * s.width,c / S * s.height,w / B * s.width,T / S * s.height);
                this.chars[p].texture = new Be({
                    source: s,
                    frame: D
                }),
                l += Math.ceil(w)
            }
        }
        s.update(),
        this._currentX = l,
        this._currentY = c,
        this._currentMaxCharHeight = u,
        this._skipKerning && this._applyKerning(r, o)
    }
    get pageTextures() {
        return Re(tt, "BitmapFont.pageTextures is deprecated, please use BitmapFont.pages instead."),
        this.pages
    }
    _applyKerning(e, r) {
        const n = this._measureCache;
        for (let i = 0; i < e.length; i++) {
            const o = e[i];
            for (let s = 0; s < this._currentChars.length; s++) {
                const a = this._currentChars[s];
                let l = n[o];
                l || (l = n[o] = r.measureText(o).width);
                let c = n[a];
                c || (c = n[a] = r.measureText(a).width);
                let u = r.measureText(o + a).width
                  , f = u - (l + c);
                f && (this.chars[o].kerning[a] = f),
                u = r.measureText(o + a).width,
                f = u - (l + c),
                f && (this.chars[a].kerning[o] = f)
            }
        }
    }
    _nextPage() {
        this._currentPageIndex++;
        const e = this.resolution
          , r = ms.getOptimalCanvasAndContext(this._textureSize, this._textureSize, e);
        this._setupContext(r.context, this._style, e);
        const n = e * (this.baseRenderedFontSize / this.baseMeasurementFontSize)
          , i = new Be({
            source: new wl({
                resource: r.canvas,
                resolution: n,
                alphaMode: "premultiply-alpha-on-upload",
                autoGenerateMipmaps: this._mipmap
            })
        });
        this._textureStyle && (i.source.style = this._textureStyle);
        const o = {
            canvasAndContext: r,
            texture: i
        };
        return this.pages[this._currentPageIndex] = o,
        o
    }
    _setupContext(e, r, n) {
        r.fontSize = this.baseRenderedFontSize,
        e.scale(n, n),
        e.font = Ux(r),
        r.fontSize = this.baseMeasurementFontSize,
        e.textBaseline = r.textBaseline;
        const i = r._stroke
          , o = (i == null ? void 0 : i.width) ?? 0;
        if (i && (e.lineWidth = o,
        e.lineJoin = i.join,
        e.miterLimit = i.miterLimit,
        e.strokeStyle = Vx(i, e)),
        r._fill && (e.fillStyle = Vx(r._fill, e)),
        r.dropShadow) {
            const s = r.dropShadow
              , a = Ut.shared.setValue(s.color).toArray()
              , l = s.blur * n
              , c = s.distance * n;
            e.shadowColor = `rgba(${a[0] * 255},${a[1] * 255},${a[2] * 255},${s.alpha})`,
            e.shadowBlur = l,
            e.shadowOffsetX = Math.cos(s.angle) * c,
            e.shadowOffsetY = Math.sin(s.angle) * c
        } else
            e.shadowColor = "black",
            e.shadowBlur = 0,
            e.shadowOffsetX = 0,
            e.shadowOffsetY = 0
    }
    _drawGlyph(e, r, n, i, o, s) {
        const a = r.text
          , l = r.fontProperties
          , c = s._stroke
          , u = ((c == null ? void 0 : c.width) ?? 0) * o
          , f = n + u / 2
          , d = i - u / 2
          , h = l.descent * o
          , x = r.lineHeight * o;
        let y = !1;
        s.stroke && u && (y = !0,
        e.strokeText(a, f, d + x - h));
        const {shadowBlur: m, shadowOffsetX: E, shadowOffsetY: g} = e;
        s._fill && (y && (e.shadowBlur = 0,
        e.shadowOffsetX = 0,
        e.shadowOffsetY = 0),
        e.fillText(a, f, d + x - h)),
        y && (e.shadowBlur = m,
        e.shadowOffsetX = E,
        e.shadowOffsetY = g)
    }
    destroy() {
        super.destroy();
        for (let e = 0; e < this.pages.length; e++) {
            const {canvasAndContext: r, texture: n} = this.pages[e];
            ms.returnCanvasAndContext(r),
            n.destroy(!0)
        }
        this.pages = null
    }
}
;
QP.defaultOptions = {
    textureSize: 512,
    style: new Tl,
    mipmap: !0
};
let p3 = QP;
function tI(t, e, r, n) {
    const i = {
        width: 0,
        height: 0,
        offsetY: 0,
        scale: e.fontSize / r.baseMeasurementFontSize,
        lines: [{
            width: 0,
            charPositions: [],
            spaceWidth: 0,
            spacesIndex: [],
            chars: []
        }]
    };
    i.offsetY = r.baseLineOffset;
    let o = i.lines[0]
      , s = null
      , a = !0;
    const l = {
        spaceWord: !1,
        width: 0,
        start: 0,
        index: 0,
        positions: [],
        chars: []
    }
      , c = r.baseMeasurementFontSize / e.fontSize
      , u = e.letterSpacing * c
      , f = e.wordWrapWidth * c
      , d = e.lineHeight ? e.lineHeight * c : r.lineHeight
      , h = e.wordWrap && e.breakWords
      , x = E => {
        const g = o.width;
        for (let p = 0; p < l.index; p++) {
            const v = E.positions[p];
            o.chars.push(E.chars[p]),
            o.charPositions.push(v + g)
        }
        o.width += E.width,
        a = !1,
        l.width = 0,
        l.index = 0,
        l.chars.length = 0
    }
      , y = () => {
        let E = o.chars.length - 1;
        if (n) {
            let g = o.chars[E];
            for (; g === " "; )
                o.width -= r.chars[g].xAdvance,
                g = o.chars[--E]
        }
        i.width = Math.max(i.width, o.width),
        o = {
            width: 0,
            charPositions: [],
            chars: [],
            spaceWidth: 0,
            spacesIndex: []
        },
        a = !0,
        i.lines.push(o),
        i.height += d
    }
      , m = E => E - u > f;
    for (let E = 0; E < t.length + 1; E++) {
        let g;
        const p = E === t.length;
        p || (g = t[E]);
        const v = r.chars[g] || r.chars[" "];
        if (/(?:\s)/.test(g) || g === "\r" || g === `
` || p) {
            if (!a && e.wordWrap && m(o.width + l.width) ? (y(),
            x(l),
            p || o.charPositions.push(0)) : (l.start = o.width,
            x(l),
            p || o.charPositions.push(0)),
            g === "\r" || g === `
`)
                y();
            else if (!p) {
                const w = v.xAdvance + (v.kerning[s] || 0) + u;
                o.width += w,
                o.spaceWidth = w,
                o.spacesIndex.push(o.charPositions.length),
                o.chars.push(g)
            }
        } else {
            const C = v.kerning[s] || 0
              , w = v.xAdvance + C + u;
            h && m(o.width + l.width + w) && (x(l),
            y()),
            l.positions[l.index++] = l.width + C,
            l.chars.push(g),
            l.width += w
        }
        s = g
    }
    return y(),
    e.align === "center" ? Rue(i) : e.align === "right" ? Mue(i) : e.align === "justify" && Nue(i),
    i
}
function Rue(t) {
    for (let e = 0; e < t.lines.length; e++) {
        const r = t.lines[e]
          , n = t.width / 2 - r.width / 2;
        for (let i = 0; i < r.charPositions.length; i++)
            r.charPositions[i] += n
    }
}
function Mue(t) {
    for (let e = 0; e < t.lines.length; e++) {
        const r = t.lines[e]
          , n = t.width - r.width;
        for (let i = 0; i < r.charPositions.length; i++)
            r.charPositions[i] += n
    }
}
function Nue(t) {
    const e = t.width;
    for (let r = 0; r < t.lines.length; r++) {
        const n = t.lines[r];
        let i = 0
          , o = n.spacesIndex[i++]
          , s = 0;
        const a = n.spacesIndex.length
          , c = (e - n.width) / a;
        for (let u = 0; u < n.charPositions.length; u++)
            u === o && (o = n.spacesIndex[i++],
            s += c),
            n.charPositions[u] += s
    }
}
function Lue(t) {
    if (t === "")
        return [];
    typeof t == "string" && (t = [t]);
    const e = [];
    for (let r = 0, n = t.length; r < n; r++) {
        const i = t[r];
        if (Array.isArray(i)) {
            if (i.length !== 2)
                throw new Error(`[BitmapFont]: Invalid character range length, expecting 2 got ${i.length}.`);
            if (i[0].length === 0 || i[1].length === 0)
                throw new Error("[BitmapFont]: Invalid character delimiter.");
            const o = i[0].charCodeAt(0)
              , s = i[1].charCodeAt(0);
            if (s < o)
                throw new Error("[BitmapFont]: Invalid character range.");
            for (let a = o, l = s; a <= l; a++)
                e.push(String.fromCharCode(a))
        } else
            e.push(...Array.from(i))
    }
    if (e.length === 0)
        throw new Error("[BitmapFont]: Empty set when resolving characters.");
    return e
}
let _h = 0;
class $ue {
    constructor() {
        this.ALPHA = [["a", "z"], ["A", "Z"], " "],
        this.NUMERIC = [["0", "9"]],
        this.ALPHANUMERIC = [["a", "z"], ["A", "Z"], ["0", "9"], " "],
        this.ASCII = [[" ", "~"]],
        this.defaultOptions = {
            chars: this.ALPHANUMERIC,
            resolution: 1,
            padding: 4,
            skipKerning: !1,
            textureStyle: null
        },
        this.measureCache = MP(1e3)
    }
    getFont(e, r) {
        var s;
        let n = `${r.fontFamily}-bitmap`
          , i = !0;
        if (r._fill.fill && !r._stroke ? (n += r._fill.fill.styleKey,
        i = !1) : (r._stroke || r.dropShadow) && (n = `${r.styleKey}-bitmap`,
        i = !1),
        !Et.has(n)) {
            const a = Object.create(r);
            a.lineHeight = 0;
            const l = new p3({
                style: a,
                overrideFill: i,
                overrideSize: !0,
                ...this.defaultOptions
            });
            _h++,
            _h > 50 && Ne("BitmapText", `You have dynamically created ${_h} bitmap fonts, this can be inefficient. Try pre installing your font styles using \`BitmapFont.install({name:"style1", style})\``),
            l.once("destroy", () => {
                _h--,
                Et.remove(n)
            }
            ),
            Et.set(n, l)
        }
        const o = Et.get(n);
        return (s = o.ensureCharacters) == null || s.call(o, e),
        o
    }
    getLayout(e, r, n=!0) {
        const i = this.getFont(e, r)
          , o = `${e}-${r.styleKey}-${n}`;
        if (this.measureCache.has(o))
            return this.measureCache.get(o);
        const s = Ii.graphemeSegmenter(e)
          , a = tI(s, r, i, n);
        return this.measureCache.set(o, a),
        a
    }
    measureText(e, r, n=!0) {
        return this.getLayout(e, r, n)
    }
    install(...e) {
        var c, u, f, d;
        let r = e[0];
        typeof r == "string" && (r = {
            name: r,
            style: e[1],
            chars: (c = e[2]) == null ? void 0 : c.chars,
            resolution: (u = e[2]) == null ? void 0 : u.resolution,
            padding: (f = e[2]) == null ? void 0 : f.padding,
            skipKerning: (d = e[2]) == null ? void 0 : d.skipKerning
        },
        Re(tt, "BitmapFontManager.install(name, style, options) is deprecated, use BitmapFontManager.install({name, style, ...options})"));
        const n = r == null ? void 0 : r.name;
        if (!n)
            throw new Error("[BitmapFontManager] Property `name` is required.");
        r = {
            ...this.defaultOptions,
            ...r
        };
        const i = r.style
          , o = i instanceof Tl ? i : new Tl(i)
          , s = r.dynamicFill ?? this._canUseTintForStyle(o)
          , a = new p3({
            style: o,
            overrideFill: s,
            skipKerning: r.skipKerning,
            padding: r.padding,
            resolution: r.resolution,
            overrideSize: !1,
            textureStyle: r.textureStyle
        })
          , l = Lue(r.chars);
        return a.ensureCharacters(l.join("")),
        Et.set(`${n}-bitmap`, a),
        a.once("destroy", () => Et.remove(`${n}-bitmap`)),
        a
    }
    uninstall(e) {
        const r = `${e}-bitmap`
          , n = Et.get(r);
        n && n.destroy()
    }
    _canUseTintForStyle(e) {
        return !e._stroke && (!e.dropShadow || e.dropShadow.color === 0) && !e._fill.fill && e._fill.color === 16777215
    }
}
const xE = new $ue;
class rI extends RP {
    constructor(e, r) {
        super();
        const {textures: n, data: i} = e;
        Object.keys(i.pages).forEach(o => {
            const s = i.pages[parseInt(o, 10)]
              , a = n[s.id];
            this.pages.push({
                texture: a
            })
        }
        ),
        Object.keys(i.chars).forEach(o => {
            const s = i.chars[o]
              , {frame: a, source: l, rotate: c} = n[s.page]
              , u = bt.transformRectCoords(s, a, c, new mt)
              , f = new Be({
                frame: u,
                orig: new mt(0,0,s.width,s.height),
                source: l,
                rotate: c
            });
            this.chars[o] = {
                id: o.codePointAt(0),
                xOffset: s.xOffset,
                yOffset: s.yOffset,
                xAdvance: s.xAdvance,
                kerning: s.kerning ?? {},
                texture: f
            }
        }
        ),
        this.baseRenderedFontSize = i.fontSize,
        this.baseMeasurementFontSize = i.fontSize,
        this.fontMetrics = {
            ascent: 0,
            descent: 0,
            fontSize: i.fontSize
        },
        this.baseLineOffset = i.baseLineOffset,
        this.lineHeight = i.lineHeight,
        this.fontFamily = i.fontFamily,
        this.distanceField = i.distanceField ?? {
            type: "none",
            range: 0
        },
        this.url = r
    }
    destroy() {
        super.destroy();
        for (let e = 0; e < this.pages.length; e++) {
            const {texture: r} = this.pages[e];
            r.destroy(!0)
        }
        this.pages = null
    }
    static install(e) {
        xE.install(e)
    }
    static uninstall(e) {
        xE.uninstall(e)
    }
}
const im = {
    test(t) {
        return typeof t == "string" && t.startsWith("info face=")
    },
    parse(t) {
        const e = t.match(/^[a-z]+\s+.+$/gm)
          , r = {
            info: [],
            common: [],
            page: [],
            char: [],
            chars: [],
            kerning: [],
            kernings: [],
            distanceField: []
        };
        for (const f in e) {
            const d = e[f].match(/^[a-z]+/gm)[0]
              , h = e[f].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm)
              , x = {};
            for (const y in h) {
                const m = h[y].split("=")
                  , E = m[0]
                  , g = m[1].replace(/"/gm, "")
                  , p = parseFloat(g)
                  , v = isNaN(p) ? g : p;
                x[E] = v
            }
            r[d].push(x)
        }
        const n = {
            chars: {},
            pages: [],
            lineHeight: 0,
            fontSize: 0,
            fontFamily: "",
            distanceField: null,
            baseLineOffset: 0
        }
          , [i] = r.info
          , [o] = r.common
          , [s] = r.distanceField ?? [];
        s && (n.distanceField = {
            range: parseInt(s.distanceRange, 10),
            type: s.fieldType
        }),
        n.fontSize = parseInt(i.size, 10),
        n.fontFamily = i.face,
        n.lineHeight = parseInt(o.lineHeight, 10);
        const a = r.page;
        for (let f = 0; f < a.length; f++)
            n.pages.push({
                id: parseInt(a[f].id, 10) || 0,
                file: a[f].file
            });
        const l = {};
        n.baseLineOffset = n.lineHeight - parseInt(o.base, 10);
        const c = r.char;
        for (let f = 0; f < c.length; f++) {
            const d = c[f]
              , h = parseInt(d.id, 10);
            let x = d.letter ?? d.char ?? String.fromCharCode(h);
            x === "space" && (x = " "),
            l[h] = x,
            n.chars[x] = {
                id: h,
                page: parseInt(d.page, 10) || 0,
                x: parseInt(d.x, 10),
                y: parseInt(d.y, 10),
                width: parseInt(d.width, 10),
                height: parseInt(d.height, 10),
                xOffset: parseInt(d.xoffset, 10),
                yOffset: parseInt(d.yoffset, 10),
                xAdvance: parseInt(d.xadvance, 10),
                kerning: {}
            }
        }
        const u = r.kerning || [];
        for (let f = 0; f < u.length; f++) {
            const d = parseInt(u[f].first, 10)
              , h = parseInt(u[f].second, 10)
              , x = parseInt(u[f].amount, 10);
            n.chars[l[h]].kerning[l[d]] = x
        }
        return n
    }
}
  , g3 = {
    test(t) {
        const e = t;
        return typeof e != "string" && "getElementsByTagName"in e && e.getElementsByTagName("page").length && e.getElementsByTagName("info")[0].getAttribute("face") !== null
    },
    parse(t) {
        const e = {
            chars: {},
            pages: [],
            lineHeight: 0,
            fontSize: 0,
            fontFamily: "",
            distanceField: null,
            baseLineOffset: 0
        }
          , r = t.getElementsByTagName("info")[0]
          , n = t.getElementsByTagName("common")[0]
          , i = t.getElementsByTagName("distanceField")[0];
        i && (e.distanceField = {
            type: i.getAttribute("fieldType"),
            range: parseInt(i.getAttribute("distanceRange"), 10)
        });
        const o = t.getElementsByTagName("page")
          , s = t.getElementsByTagName("char")
          , a = t.getElementsByTagName("kerning");
        e.fontSize = parseInt(r.getAttribute("size"), 10),
        e.fontFamily = r.getAttribute("face"),
        e.lineHeight = parseInt(n.getAttribute("lineHeight"), 10);
        for (let c = 0; c < o.length; c++)
            e.pages.push({
                id: parseInt(o[c].getAttribute("id"), 10) || 0,
                file: o[c].getAttribute("file")
            });
        const l = {};
        e.baseLineOffset = e.lineHeight - parseInt(n.getAttribute("base"), 10);
        for (let c = 0; c < s.length; c++) {
            const u = s[c]
              , f = parseInt(u.getAttribute("id"), 10);
            let d = u.getAttribute("letter") ?? u.getAttribute("char") ?? String.fromCharCode(f);
            d === "space" && (d = " "),
            l[f] = d,
            e.chars[d] = {
                id: f,
                page: parseInt(u.getAttribute("page"), 10) || 0,
                x: parseInt(u.getAttribute("x"), 10),
                y: parseInt(u.getAttribute("y"), 10),
                width: parseInt(u.getAttribute("width"), 10),
                height: parseInt(u.getAttribute("height"), 10),
                xOffset: parseInt(u.getAttribute("xoffset"), 10),
                yOffset: parseInt(u.getAttribute("yoffset"), 10),
                xAdvance: parseInt(u.getAttribute("xadvance"), 10),
                kerning: {}
            }
        }
        for (let c = 0; c < a.length; c++) {
            const u = parseInt(a[c].getAttribute("first"), 10)
              , f = parseInt(a[c].getAttribute("second"), 10)
              , d = parseInt(a[c].getAttribute("amount"), 10);
            e.chars[l[f]].kerning[l[u]] = d
        }
        return e
    }
}
  , m3 = {
    test(t) {
        return typeof t == "string" && t.match(/<font(\s|>)/) ? g3.test(je.get().parseXML(t)) : !1
    },
    parse(t) {
        return g3.parse(je.get().parseXML(t))
    }
}
  , Uue = [".xml", ".fnt"]
  , Gue = {
    extension: {
        type: X.CacheParser,
        name: "cacheBitmapFont"
    },
    test: t => t instanceof rI,
    getCacheableAssets(t, e) {
        const r = {};
        return t.forEach(n => {
            r[n] = e,
            r[`${n}-bitmap`] = e
        }
        ),
        r[`${e.fontFamily}-bitmap`] = e,
        r
    }
}
  , Hue = {
    extension: {
        type: X.LoadParser,
        priority: _a.Normal
    },
    name: "loadBitmapFont",
    id: "bitmap-font",
    test(t) {
        return Uue.includes(Fn.extname(t).toLowerCase())
    },
    async testParse(t) {
        return im.test(t) || m3.test(t)
    },
    async parse(t, e, r) {
        const n = im.test(t) ? im.parse(t) : m3.parse(t)
          , {src: i} = e
          , {pages: o} = n
          , s = []
          , a = n.distanceField ? {
            scaleMode: "linear",
            alphaMode: "premultiply-alpha-on-upload",
            autoGenerateMipmaps: !1,
            resolution: 1
        } : {};
        for (let f = 0; f < o.length; ++f) {
            const d = o[f].file;
            let h = Fn.join(Fn.dirname(i), d);
            h = tE(h, i),
            s.push({
                src: h,
                data: a
            })
        }
        const l = await r.load(s)
          , c = s.map(f => l[f.src]);
        return new rI({
            data: n,
            textures: c
        },i)
    },
    async load(t, e) {
        return await (await je.get().fetch(t)).text()
    },
    async unload(t, e, r) {
        await Promise.all(t.pages.map(n => r.unload(n.texture.source._sourceOrigin))),
        t.destroy()
    }
};
class Vue {
    constructor(e, r=!1) {
        this._loader = e,
        this._assetList = [],
        this._isLoading = !1,
        this._maxConcurrent = 1,
        this.verbose = r
    }
    add(e) {
        e.forEach(r => {
            this._assetList.push(r)
        }
        ),
        this.verbose && console.log("[BackgroundLoader] assets: ", this._assetList),
        this._isActive && !this._isLoading && this._next()
    }
    async _next() {
        if (this._assetList.length && this._isActive) {
            this._isLoading = !0;
            const e = []
              , r = Math.min(this._assetList.length, this._maxConcurrent);
            for (let n = 0; n < r; n++)
                e.push(this._assetList.pop());
            await this._loader.load(e),
            this._isLoading = !1,
            this._next()
        }
    }
    get active() {
        return this._isActive
    }
    set active(e) {
        this._isActive !== e && (this._isActive = e,
        e && !this._isLoading && this._next())
    }
}
const zue = {
    extension: {
        type: X.CacheParser,
        name: "cacheTextureArray"
    },
    test: t => Array.isArray(t) && t.every(e => e instanceof Be),
    getCacheableAssets: (t, e) => {
        const r = {};
        return t.forEach(n => {
            e.forEach( (i, o) => {
                r[n + (o === 0 ? "" : o + 1)] = i
            }
            )
        }
        ),
        r
    }
};
async function nI(t) {
    if ("Image"in globalThis)
        return new Promise(e => {
            const r = new Image;
            r.onload = () => {
                e(!0)
            }
            ,
            r.onerror = () => {
                e(!1)
            }
            ,
            r.src = t
        }
        );
    if ("createImageBitmap"in globalThis && "fetch"in globalThis) {
        try {
            const e = await (await fetch(t)).blob();
            await createImageBitmap(e)
        } catch {
            return !1
        }
        return !0
    }
    return !1
}
const jue = {
    extension: {
        type: X.DetectionParser,
        priority: 1
    },
    test: async () => nI("data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="),
    add: async t => [...t, "avif"],
    remove: async t => t.filter(e => e !== "avif")
}
  , v3 = ["png", "jpg", "jpeg"]
  , Wue = {
    extension: {
        type: X.DetectionParser,
        priority: -1
    },
    test: () => Promise.resolve(!0),
    add: async t => [...t, ...v3],
    remove: async t => t.filter(e => !v3.includes(e))
}
  , Yue = "WorkerGlobalScope"in globalThis && globalThis instanceof globalThis.WorkerGlobalScope;
function m1(t) {
    return Yue ? !1 : document.createElement("video").canPlayType(t) !== ""
}
const Xue = {
    extension: {
        type: X.DetectionParser,
        priority: 0
    },
    test: async () => m1("video/mp4"),
    add: async t => [...t, "mp4", "m4v"],
    remove: async t => t.filter(e => e !== "mp4" && e !== "m4v")
}
  , Kue = {
    extension: {
        type: X.DetectionParser,
        priority: 0
    },
    test: async () => m1("video/ogg"),
    add: async t => [...t, "ogv"],
    remove: async t => t.filter(e => e !== "ogv")
}
  , que = {
    extension: {
        type: X.DetectionParser,
        priority: 0
    },
    test: async () => m1("video/webm"),
    add: async t => [...t, "webm"],
    remove: async t => t.filter(e => e !== "webm")
}
  , Zue = {
    extension: {
        type: X.DetectionParser,
        priority: 0
    },
    test: async () => nI("data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="),
    add: async t => [...t, "webp"],
    remove: async t => t.filter(e => e !== "webp")
}
  , iI = class qh {
    constructor() {
        this.loadOptions = {
            ...qh.defaultOptions
        },
        this._parsers = [],
        this._parsersValidated = !1,
        this.parsers = new Proxy(this._parsers,{
            set: (e, r, n) => (this._parsersValidated = !1,
            e[r] = n,
            !0)
        }),
        this.promiseCache = {}
    }
    reset() {
        this._parsersValidated = !1,
        this.promiseCache = {}
    }
    _getLoadPromiseAndParser(e, r) {
        const n = {
            promise: null,
            parser: null
        };
        return n.promise = (async () => {
            var s, a;
            let i = null
              , o = null;
            if ((r.parser || r.loadParser) && (o = this._parserHash[r.parser || r.loadParser],
            r.loadParser && Ne(`[Assets] "loadParser" is deprecated, use "parser" instead for ${e}`),
            o || Ne(`[Assets] specified load parser "${r.parser || r.loadParser}" not found while loading ${e}`)),
            !o) {
                for (let l = 0; l < this.parsers.length; l++) {
                    const c = this.parsers[l];
                    if (c.load && ((s = c.test) != null && s.call(c, e, r, this))) {
                        o = c;
                        break
                    }
                }
                if (!o)
                    return Ne(`[Assets] ${e} could not be loaded as we don't know how to parse it, ensure the correct parser has been added`),
                    null
            }
            i = await o.load(e, r, this),
            n.parser = o;
            for (let l = 0; l < this.parsers.length; l++) {
                const c = this.parsers[l];
                c.parse && c.parse && await ((a = c.testParse) == null ? void 0 : a.call(c, i, r, this)) && (i = await c.parse(i, r, this) || i,
                n.parser = c)
            }
            return i
        }
        )(),
        n
    }
    async load(e, r) {
        this._parsersValidated || this._validateParsers();
        const n = typeof r == "function" ? {
            ...qh.defaultOptions,
            ...this.loadOptions,
            onProgress: r
        } : {
            ...qh.defaultOptions,
            ...this.loadOptions,
            ...r || {}
        }
          , {onProgress: i, onError: o, strategy: s, retryCount: a, retryDelay: l} = n;
        let c = 0;
        const u = {}
          , f = Lx(e)
          , d = Pi(e, y => ({
            alias: [y],
            src: y,
            data: {}
        }))
          , h = d.reduce( (y, m) => y + (m.progressSize || 1), 0)
          , x = d.map(async y => {
            const m = Fn.toAbsolute(y.src);
            u[y.src] || (await this._loadAssetWithRetry(m, y, {
                onProgress: i,
                onError: o,
                strategy: s,
                retryCount: a,
                retryDelay: l
            }, u),
            c += y.progressSize || 1,
            i && i(c / h))
        }
        );
        return await Promise.all(x),
        f ? u[d[0].src] : u
    }
    async unload(e) {
        const n = Pi(e, i => ({
            alias: [i],
            src: i
        })).map(async i => {
            var a, l;
            const o = Fn.toAbsolute(i.src)
              , s = this.promiseCache[o];
            if (s) {
                const c = await s.promise;
                delete this.promiseCache[o],
                await ((l = (a = s.parser) == null ? void 0 : a.unload) == null ? void 0 : l.call(a, c, i, this))
            }
        }
        );
        await Promise.all(n)
    }
    _validateParsers() {
        this._parsersValidated = !0,
        this._parserHash = this._parsers.filter(e => e.name || e.id).reduce( (e, r) => (!r.name && !r.id ? Ne("[Assets] parser should have an id") : (e[r.name] || e[r.id]) && Ne(`[Assets] parser id conflict "${r.id}"`),
        e[r.name] = r,
        r.id && (e[r.id] = r),
        e), {})
    }
    async _loadAssetWithRetry(e, r, n, i) {
        let o = 0;
        const {onError: s, strategy: a, retryCount: l, retryDelay: c} = n
          , u = f => new Promise(d => setTimeout(d, f));
        for (; ; )
            try {
                this.promiseCache[e] || (this.promiseCache[e] = this._getLoadPromiseAndParser(e, r)),
                i[r.src] = await this.promiseCache[e].promise;
                return
            } catch (f) {
                delete this.promiseCache[e],
                delete i[r.src],
                o++;
                const d = a !== "retry" || o > l;
                if (a === "retry" && !d) {
                    s && s(f, r),
                    await u(c);
                    continue
                }
                if (a === "skip") {
                    s && s(f, r);
                    return
                }
                throw s && s(f, r),
                new Error(`[Loader.load] Failed to load ${e}.
${f}`)
            }
    }
}
;
iI.defaultOptions = {
    onProgress: void 0,
    onError: void 0,
    strategy: "throw",
    retryCount: 3,
    retryDelay: 250
};
let Jue = iI;
function Iu(t, e) {
    if (Array.isArray(e)) {
        for (const r of e)
            if (t.startsWith(`data:${r}`))
                return !0;
        return !1
    }
    return t.startsWith(`data:${e}`)
}
function Ou(t, e) {
    const r = t.split("?")[0]
      , n = Fn.extname(r).toLowerCase();
    return Array.isArray(e) ? e.includes(n) : n === e
}
const Que = ".json"
  , e0e = "application/json"
  , t0e = {
    extension: {
        type: X.LoadParser,
        priority: _a.Low
    },
    name: "loadJson",
    id: "json",
    test(t) {
        return Iu(t, e0e) || Ou(t, Que)
    },
    async load(t) {
        return await (await je.get().fetch(t)).json()
    }
}
  , r0e = ".txt"
  , n0e = "text/plain"
  , i0e = {
    name: "loadTxt",
    id: "text",
    extension: {
        type: X.LoadParser,
        priority: _a.Low,
        name: "loadTxt"
    },
    test(t) {
        return Iu(t, n0e) || Ou(t, r0e)
    },
    async load(t) {
        return await (await je.get().fetch(t)).text()
    }
}
  , o0e = ["normal", "bold", "100", "200", "300", "400", "500", "600", "700", "800", "900"]
  , s0e = [".ttf", ".otf", ".woff", ".woff2"]
  , a0e = ["font/ttf", "font/otf", "font/woff", "font/woff2"]
  , l0e = /^(--|-?[A-Z_])[0-9A-Z_-]*$/i;
function c0e(t) {
    const e = Fn.extname(t)
      , i = Fn.basename(t, e).replace(/(-|_)/g, " ").toLowerCase().split(" ").map(a => a.charAt(0).toUpperCase() + a.slice(1));
    let o = i.length > 0;
    for (const a of i)
        if (!a.match(l0e)) {
            o = !1;
            break
        }
    let s = i.join(" ");
    return o || (s = `"${s.replace(/[\\"]/g, "\\$&")}"`),
    s
}
const u0e = /^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;
function f0e(t) {
    return u0e.test(t) ? t : encodeURI(t)
}
const d0e = {
    extension: {
        type: X.LoadParser,
        priority: _a.Low
    },
    name: "loadWebFont",
    id: "web-font",
    test(t) {
        return Iu(t, a0e) || Ou(t, s0e)
    },
    async load(t, e) {
        var n, i, o;
        const r = je.get().getFontFaceSet();
        if (r) {
            const s = []
              , a = ((n = e.data) == null ? void 0 : n.family) ?? c0e(t)
              , l = ((o = (i = e.data) == null ? void 0 : i.weights) == null ? void 0 : o.filter(u => o0e.includes(u))) ?? ["normal"]
              , c = e.data ?? {};
            for (let u = 0; u < l.length; u++) {
                const f = l[u]
                  , d = new FontFace(a,`url(${f0e(t)})`,{
                    ...c,
                    weight: f
                });
                await d.load(),
                r.add(d),
                s.push(d)
            }
            return Et.has(`${a}-and-url`) ? Et.get(`${a}-and-url`).entries.push({
                url: t,
                faces: s
            }) : Et.set(`${a}-and-url`, {
                entries: [{
                    url: t,
                    faces: s
                }]
            }),
            s.length === 1 ? s[0] : s
        }
        return Ne("[loadWebFont] FontFace API is not supported. Skipping loading font"),
        null
    },
    unload(t) {
        const e = Array.isArray(t) ? t : [t]
          , r = e[0].family
          , n = Et.get(`${r}-and-url`)
          , i = n.entries.find(o => o.faces.some(s => e.indexOf(s) !== -1));
        i.faces = i.faces.filter(o => e.indexOf(o) === -1),
        i.faces.length === 0 && (n.entries = n.entries.filter(o => o !== i)),
        e.forEach(o => {
            je.get().getFontFaceSet().delete(o)
        }
        ),
        n.entries.length === 0 && Et.remove(`${r}-and-url`)
    }
};
function Ib(t, e=1) {
    var n;
    const r = (n = Pu.RETINA_PREFIX) == null ? void 0 : n.exec(t);
    return r ? parseFloat(r[1]) : e
}
function Ob(t, e, r) {
    t.label = r,
    t._sourceOrigin = r;
    const n = new Be({
        source: t,
        label: r
    })
      , i = () => {
        delete e.promiseCache[r],
        Et.has(r) && Et.remove(r)
    }
    ;
    return n.source.once("destroy", () => {
        e.promiseCache[r] && (Ne("[Assets] A TextureSource managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the TextureSource."),
        i())
    }
    ),
    n.once("destroy", () => {
        t.destroyed || (Ne("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),
        i())
    }
    ),
    n
}
const h0e = ".svg"
  , x0e = "image/svg+xml"
  , p0e = {
    extension: {
        type: X.LoadParser,
        priority: _a.Low,
        name: "loadSVG"
    },
    name: "loadSVG",
    id: "svg",
    config: {
        crossOrigin: "anonymous",
        parseAsGraphicsContext: !1
    },
    test(t) {
        return Iu(t, x0e) || Ou(t, h0e)
    },
    async load(t, e, r) {
        var n;
        return ((n = e.data) == null ? void 0 : n.parseAsGraphicsContext) ?? this.config.parseAsGraphicsContext ? m0e(t) : g0e(t, e, r, this.config.crossOrigin)
    },
    unload(t) {
        t.destroy(!0)
    }
};
async function g0e(t, e, r, n) {
    var m, E, g;
    const i = await je.get().fetch(t)
      , o = je.get().createImage();
    o.src = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(await i.text())}`,
    o.crossOrigin = n,
    await o.decode();
    const s = ((m = e.data) == null ? void 0 : m.width) ?? o.width
      , a = ((E = e.data) == null ? void 0 : E.height) ?? o.height
      , l = ((g = e.data) == null ? void 0 : g.resolution) || Ib(t)
      , c = Math.ceil(s * l)
      , u = Math.ceil(a * l)
      , f = je.get().createCanvas(c, u)
      , d = f.getContext("2d");
    d.imageSmoothingEnabled = !0,
    d.imageSmoothingQuality = "high",
    d.drawImage(o, 0, 0, s * l, a * l);
    const {parseAsGraphicsContext: h, ...x} = e.data ?? {}
      , y = new wl({
        resource: f,
        alphaMode: "premultiply-alpha-on-upload",
        resolution: l,
        ...x
    });
    return Ob(y, r, t)
}
async function m0e(t) {
    const r = await (await je.get().fetch(t)).text()
      , n = new ui;
    return n.svg(r),
    n
}
const v0e = `(function () {
    'use strict';

    const WHITE_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=";
    async function checkImageBitmap() {
      try {
        if (typeof createImageBitmap !== "function")
          return false;
        const response = await fetch(WHITE_PNG);
        const imageBlob = await response.blob();
        const imageBitmap = await createImageBitmap(imageBlob);
        return imageBitmap.width === 1 && imageBitmap.height === 1;
      } catch (_e) {
        return false;
      }
    }
    void checkImageBitmap().then((result) => {
      self.postMessage(result);
    });

})();
`;
let Hc = null
  , pE = class {
    constructor() {
        Hc || (Hc = URL.createObjectURL(new Blob([v0e],{
            type: "application/javascript"
        }))),
        this.worker = new Worker(Hc)
    }
}
;
pE.revokeObjectURL = function() {
    Hc && (URL.revokeObjectURL(Hc),
    Hc = null)
}
;
const y0e = `(function () {
    'use strict';

    async function loadImageBitmap(url, alphaMode) {
      const response = await fetch(url);
      if (!response.ok) {
        throw new Error(\`[WorkerManager.loadImageBitmap] Failed to fetch \${url}: \${response.status} \${response.statusText}\`);
      }
      const imageBlob = await response.blob();
      return alphaMode === "premultiplied-alpha" ? createImageBitmap(imageBlob, { premultiplyAlpha: "none" }) : createImageBitmap(imageBlob);
    }
    self.onmessage = async (event) => {
      try {
        const imageBitmap = await loadImageBitmap(event.data.data[0], event.data.data[1]);
        self.postMessage({
          data: imageBitmap,
          uuid: event.data.uuid,
          id: event.data.id
        }, [imageBitmap]);
      } catch (e) {
        self.postMessage({
          error: e,
          uuid: event.data.uuid,
          id: event.data.id
        });
      }
    };

})();
`;
let Vc = null;
class oI {
    constructor() {
        Vc || (Vc = URL.createObjectURL(new Blob([y0e],{
            type: "application/javascript"
        }))),
        this.worker = new Worker(Vc)
    }
}
oI.revokeObjectURL = function() {
    Vc && (URL.revokeObjectURL(Vc),
    Vc = null)
}
;
let y3 = 0, om;
class E0e {
    constructor() {
        this._initialized = !1,
        this._createdWorkers = 0,
        this._workerPool = [],
        this._queue = [],
        this._resolveHash = {}
    }
    isImageBitmapSupported() {
        return this._isImageBitmapSupported !== void 0 ? this._isImageBitmapSupported : (this._isImageBitmapSupported = new Promise(e => {
            const {worker: r} = new pE;
            r.addEventListener("message", n => {
                r.terminate(),
                pE.revokeObjectURL(),
                e(n.data)
            }
            )
        }
        ),
        this._isImageBitmapSupported)
    }
    loadImageBitmap(e, r) {
        var n;
        return this._run("loadImageBitmap", [e, (n = r == null ? void 0 : r.data) == null ? void 0 : n.alphaMode])
    }
    async _initWorkers() {
        this._initialized || (this._initialized = !0)
    }
    _getWorker() {
        om === void 0 && (om = navigator.hardwareConcurrency || 4);
        let e = this._workerPool.pop();
        return !e && this._createdWorkers < om && (this._createdWorkers++,
        e = new oI().worker,
        e.addEventListener("message", r => {
            this._complete(r.data),
            this._returnWorker(r.target),
            this._next()
        }
        )),
        e
    }
    _returnWorker(e) {
        this._workerPool.push(e)
    }
    _complete(e) {
        this._resolveHash[e.uuid] && (e.error !== void 0 ? this._resolveHash[e.uuid].reject(e.error) : this._resolveHash[e.uuid].resolve(e.data),
        delete this._resolveHash[e.uuid])
    }
    async _run(e, r) {
        await this._initWorkers();
        const n = new Promise( (i, o) => {
            this._queue.push({
                id: e,
                arguments: r,
                resolve: i,
                reject: o
            })
        }
        );
        return this._next(),
        n
    }
    _next() {
        if (!this._queue.length)
            return;
        const e = this._getWorker();
        if (!e)
            return;
        const r = this._queue.pop()
          , n = r.id;
        this._resolveHash[y3] = {
            resolve: r.resolve,
            reject: r.reject
        },
        e.postMessage({
            data: r.arguments,
            uuid: y3++,
            id: n
        })
    }
    reset() {
        this._workerPool.forEach(e => e.terminate()),
        this._workerPool.length = 0,
        Object.values(this._resolveHash).forEach( ({reject: e}) => {
            e == null || e(new Error("WorkerManager has been reset before completion"))
        }
        ),
        this._resolveHash = {},
        this._queue.length = 0,
        this._initialized = !1,
        this._createdWorkers = 0
    }
}
const E3 = new E0e
  , _0e = [".jpeg", ".jpg", ".png", ".webp", ".avif"]
  , b0e = ["image/jpeg", "image/png", "image/webp", "image/avif"];
async function C0e(t, e) {
    var i;
    const r = await je.get().fetch(t);
    if (!r.ok)
        throw new Error(`[loadImageBitmap] Failed to fetch ${t}: ${r.status} ${r.statusText}`);
    const n = await r.blob();
    return ((i = e == null ? void 0 : e.data) == null ? void 0 : i.alphaMode) === "premultiplied-alpha" ? createImageBitmap(n, {
        premultiplyAlpha: "none"
    }) : createImageBitmap(n)
}
const sI = {
    name: "loadTextures",
    id: "texture",
    extension: {
        type: X.LoadParser,
        priority: _a.High,
        name: "loadTextures"
    },
    config: {
        preferWorkers: !0,
        preferCreateImageBitmap: !0,
        crossOrigin: "anonymous"
    },
    test(t) {
        return Iu(t, b0e) || Ou(t, _0e)
    },
    async load(t, e, r) {
        var o;
        let n = null;
        globalThis.createImageBitmap && this.config.preferCreateImageBitmap ? this.config.preferWorkers && await E3.isImageBitmapSupported() ? n = await E3.loadImageBitmap(t, e) : n = await C0e(t, e) : n = await new Promise( (s, a) => {
            n = je.get().createImage(),
            n.crossOrigin = this.config.crossOrigin,
            n.src = t,
            n.complete ? s(n) : (n.onload = () => {
                s(n)
            }
            ,
            n.onerror = a)
        }
        );
        const i = new wl({
            resource: n,
            alphaMode: "premultiply-alpha-on-upload",
            resolution: ((o = e.data) == null ? void 0 : o.resolution) || Ib(t),
            ...e.data
        });
        return Ob(i, r, t)
    },
    unload(t) {
        t.destroy(!0)
    }
}
  , A0e = [".mp4", ".m4v", ".webm", ".ogg", ".ogv", ".h264", ".avi", ".mov"];
let sm, am;
function w0e(t, e, r) {
    r === void 0 && !e.startsWith("data:") ? t.crossOrigin = S0e(e) : r !== !1 && (t.crossOrigin = typeof r == "string" ? r : "anonymous")
}
function B0e(t) {
    return new Promise( (e, r) => {
        t.addEventListener("canplaythrough", n),
        t.addEventListener("error", i),
        t.load();
        function n() {
            o(),
            e()
        }
        function i(s) {
            o(),
            r(s)
        }
        function o() {
            t.removeEventListener("canplaythrough", n),
            t.removeEventListener("error", i)
        }
    }
    )
}
function S0e(t, e=globalThis.location) {
    if (t.startsWith("data:"))
        return "";
    e || (e = globalThis.location);
    const r = new URL(t,document.baseURI);
    return r.hostname !== e.hostname || r.port !== e.port || r.protocol !== e.protocol ? "anonymous" : ""
}
function T0e() {
    const t = []
      , e = [];
    for (const r of A0e) {
        const n = H0.MIME_TYPES[r.substring(1)] || `video/${r.substring(1)}`;
        m1(n) && (t.push(r),
        e.includes(n) || e.push(n))
    }
    return {
        validVideoExtensions: t,
        validVideoMime: e
    }
}
const D0e = {
    name: "loadVideo",
    id: "video",
    extension: {
        type: X.LoadParser,
        name: "loadVideo"
    },
    test(t) {
        if (!sm || !am) {
            const {validVideoExtensions: n, validVideoMime: i} = T0e();
            sm = n,
            am = i
        }
        const e = Iu(t, am)
          , r = Ou(t, sm);
        return e || r
    },
    async load(t, e, r) {
        var l, c;
        const n = {
            ...H0.defaultOptions,
            resolution: ((l = e.data) == null ? void 0 : l.resolution) || Ib(t),
            alphaMode: ((c = e.data) == null ? void 0 : c.alphaMode) || await aP(),
            ...e.data
        }
          , i = document.createElement("video")
          , o = {
            preload: n.autoLoad !== !1 ? "auto" : void 0,
            "webkit-playsinline": n.playsinline !== !1 ? "" : void 0,
            playsinline: n.playsinline !== !1 ? "" : void 0,
            muted: n.muted === !0 ? "" : void 0,
            loop: n.loop === !0 ? "" : void 0,
            autoplay: n.autoPlay !== !1 ? "" : void 0
        };
        Object.keys(o).forEach(u => {
            const f = o[u];
            f !== void 0 && i.setAttribute(u, f)
        }
        ),
        n.muted === !0 && (i.muted = !0),
        w0e(i, t, n.crossorigin);
        const s = document.createElement("source");
        let a;
        if (n.mime)
            a = n.mime;
        else if (t.startsWith("data:"))
            a = t.slice(5, t.indexOf(";"));
        else if (!t.startsWith("blob:")) {
            const u = t.split("?")[0].slice(t.lastIndexOf(".") + 1).toLowerCase();
            a = H0.MIME_TYPES[u] || `video/${u}`
        }
        return s.src = t,
        a && (s.type = a),
        new Promise(u => {
            const f = async () => {
                const d = new H0({
                    ...n,
                    resource: i
                });
                i.removeEventListener("canplay", f),
                e.data.preload && await B0e(i),
                u(Ob(d, r, t))
            }
            ;
            n.preload && !n.autoPlay && i.load(),
            i.addEventListener("canplay", f),
            i.appendChild(s)
        }
        )
    },
    unload(t) {
        t.destroy(!0)
    }
}
  , aI = {
    extension: {
        type: X.ResolveParser,
        name: "resolveTexture"
    },
    test: sI.test,
    parse: t => {
        var e;
        return {
            resolution: parseFloat(((e = Pu.RETINA_PREFIX.exec(t)) == null ? void 0 : e[1]) ?? "1"),
            format: t.split(".").pop(),
            src: t
        }
    }
}
  , F0e = {
    extension: {
        type: X.ResolveParser,
        priority: -2,
        name: "resolveJson"
    },
    test: t => Pu.RETINA_PREFIX.test(t) && t.endsWith(".json"),
    parse: aI.parse
};
class P0e {
    constructor() {
        this._detections = [],
        this._initialized = !1,
        this.resolver = new Pu,
        this.loader = new Jue,
        this.cache = Et,
        this._backgroundLoader = new Vue(this.loader),
        this._backgroundLoader.active = !0,
        this.reset()
    }
    async init(e={}) {
        var o, s;
        if (this._initialized) {
            Ne("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");
            return
        }
        if (this._initialized = !0,
        e.defaultSearchParams && this.resolver.setDefaultSearchParams(e.defaultSearchParams),
        e.basePath && (this.resolver.basePath = e.basePath),
        e.bundleIdentifier && this.resolver.setBundleIdentifier(e.bundleIdentifier),
        e.manifest) {
            let a = e.manifest;
            typeof a == "string" && (a = await this.load(a)),
            this.resolver.addManifest(a)
        }
        const r = ((o = e.texturePreference) == null ? void 0 : o.resolution) ?? 1
          , n = typeof r == "number" ? [r] : r
          , i = await this._detectFormats({
            preferredFormats: (s = e.texturePreference) == null ? void 0 : s.format,
            skipDetections: e.skipDetections,
            detections: this._detections
        });
        this.resolver.prefer({
            params: {
                format: i,
                resolution: n
            }
        }),
        e.preferences && this.setPreferences(e.preferences),
        e.loadOptions && (this.loader.loadOptions = {
            ...this.loader.loadOptions,
            ...e.loadOptions
        })
    }
    add(e) {
        this.resolver.add(e)
    }
    async load(e, r) {
        this._initialized || await this.init();
        const n = Lx(e)
          , i = Pi(e).map(a => {
            if (typeof a != "string") {
                const l = this.resolver.getAlias(a);
                return l.some(c => !this.resolver.hasKey(c)) && this.add(a),
                Array.isArray(l) ? l[0] : l
            }
            return this.resolver.hasKey(a) || this.add({
                alias: a,
                src: a
            }),
            a
        }
        )
          , o = this.resolver.resolve(i)
          , s = await this._mapLoadToResolve(o, r);
        return n ? s[i[0]] : s
    }
    addBundle(e, r) {
        this.resolver.addBundle(e, r)
    }
    async loadBundle(e, r) {
        this._initialized || await this.init();
        let n = !1;
        typeof e == "string" && (n = !0,
        e = [e]);
        const i = this.resolver.resolveBundle(e)
          , o = {}
          , s = Object.keys(i);
        let a = 0;
        const l = []
          , c = () => {
            r == null || r(l.reduce( (f, d) => f + d, 0) / a)
        }
          , u = s.map( (f, d) => {
            const h = i[f]
              , x = Object.values(h)
              , m = [...new Set(x.flat())].reduce( (E, g) => E + (g.progressSize || 1), 0);
            return l.push(0),
            a += m,
            this._mapLoadToResolve(h, E => {
                l[d] = E * m,
                c()
            }
            ).then(E => {
                o[f] = E
            }
            )
        }
        );
        return await Promise.all(u),
        n ? o[e[0]] : o
    }
    async backgroundLoad(e) {
        this._initialized || await this.init(),
        typeof e == "string" && (e = [e]);
        const r = this.resolver.resolve(e);
        this._backgroundLoader.add(Object.values(r))
    }
    async backgroundLoadBundle(e) {
        this._initialized || await this.init(),
        typeof e == "string" && (e = [e]);
        const r = this.resolver.resolveBundle(e);
        Object.values(r).forEach(n => {
            this._backgroundLoader.add(Object.values(n))
        }
        )
    }
    reset() {
        this.resolver.reset(),
        this.loader.reset(),
        this.cache.reset(),
        this._initialized = !1
    }
    get(e) {
        if (typeof e == "string")
            return Et.get(e);
        const r = {};
        for (let n = 0; n < e.length; n++)
            r[n] = Et.get(e[n]);
        return r
    }
    async _mapLoadToResolve(e, r) {
        const n = [...new Set(Object.values(e))];
        this._backgroundLoader.active = !1;
        const i = await this.loader.load(n, r);
        this._backgroundLoader.active = !0;
        const o = {};
        return n.forEach(s => {
            const a = i[s.src]
              , l = [s.src];
            s.alias && l.push(...s.alias),
            l.forEach(c => {
                o[c] = a
            }
            ),
            Et.set(l, a)
        }
        ),
        o
    }
    async unload(e) {
        this._initialized || await this.init();
        const r = Pi(e).map(i => typeof i != "string" ? i.src : i)
          , n = this.resolver.resolve(r);
        await this._unloadFromResolved(n)
    }
    async unloadBundle(e) {
        this._initialized || await this.init(),
        e = Pi(e);
        const r = this.resolver.resolveBundle(e)
          , n = Object.keys(r).map(i => this._unloadFromResolved(r[i]));
        await Promise.all(n)
    }
    async _unloadFromResolved(e) {
        const r = Object.values(e);
        r.forEach(n => {
            Et.remove(n.src)
        }
        ),
        await this.loader.unload(r)
    }
    async _detectFormats(e) {
        let r = [];
        e.preferredFormats && (r = Array.isArray(e.preferredFormats) ? e.preferredFormats : [e.preferredFormats]);
        for (const n of e.detections)
            e.skipDetections || await n.test() ? r = await n.add(r) : e.skipDetections || (r = await n.remove(r));
        return r = r.filter( (n, i) => r.indexOf(n) === i),
        r
    }
    get detections() {
        return this._detections
    }
    setPreferences(e) {
        this.loader.parsers.forEach(r => {
            r.config && Object.keys(r.config).filter(n => n in e).forEach(n => {
                r.config[n] = e[n]
            }
            )
        }
        )
    }
}
const bh = new P0e;
$e.handleByList(X.LoadParser, bh.loader.parsers).handleByList(X.ResolveParser, bh.resolver.parsers).handleByList(X.CacheParser, bh.cache.parsers).handleByList(X.DetectionParser, bh.detections);
$e.add(zue, Wue, jue, Zue, Xue, Kue, que, t0e, i0e, d0e, p0e, sI, D0e, Hue, Gue, aI, F0e);
const _3 = {
    loader: X.LoadParser,
    resolver: X.ResolveParser,
    cache: X.CacheParser,
    detection: X.DetectionParser
};
$e.handle(X.Asset, t => {
    const e = t.ref;
    Object.entries(_3).filter( ([r]) => !!e[r]).forEach( ([r,n]) => $e.add(Object.assign(e[r], {
        extension: e[r].extension ?? n
    })))
}
, t => {
    const e = t.ref;
    Object.keys(_3).filter(r => !!e[r]).forEach(r => $e.remove(e[r]))
}
);
class lI {
    constructor(e) {
        this._attachedDomElements = [],
        this._renderer = e,
        this._renderer.runners.postrender.add(this),
        this._renderer.runners.init.add(this),
        this._domElement = document.createElement("div"),
        this._domElement.style.position = "absolute",
        this._domElement.style.top = "0",
        this._domElement.style.left = "0",
        this._domElement.style.pointerEvents = "none",
        this._domElement.style.zIndex = "1000"
    }
    init() {
        this._canvasObserver = new hP({
            domElement: this._domElement,
            renderer: this._renderer
        })
    }
    addRenderable(e, r) {
        this._attachedDomElements.includes(e) || this._attachedDomElements.push(e)
    }
    updateRenderable(e) {}
    validateRenderable(e) {
        return !0
    }
    postrender() {
        const e = this._attachedDomElements;
        if (e.length === 0) {
            this._domElement.remove();
            return
        }
        this._canvasObserver.ensureAttached();
        for (let r = 0; r < e.length; r++) {
            const n = e[r]
              , i = n.element;
            if (!n.parent || n.globalDisplayStatus < 7)
                i == null || i.remove(),
                e.splice(r, 1),
                r--;
            else {
                this._domElement.contains(i) || (i.style.position = "absolute",
                i.style.pointerEvents = "auto",
                this._domElement.appendChild(i));
                const o = n.worldTransform
                  , s = n._anchor
                  , a = n.width * s.x
                  , l = n.height * s.y;
                i.style.transformOrigin = `${a}px ${l}px`,
                i.style.transform = `matrix(${o.a}, ${o.b}, ${o.c}, ${o.d}, ${o.tx - a}, ${o.ty - l})`,
                i.style.opacity = n.groupAlpha.toString()
            }
        }
    }
    destroy() {
        var e;
        this._renderer.runners.postrender.remove(this);
        for (let r = 0; r < this._attachedDomElements.length; r++)
            (e = this._attachedDomElements[r].element) == null || e.remove();
        this._attachedDomElements.length = 0,
        this._domElement.remove(),
        this._canvasObserver.destroy(),
        this._renderer = null
    }
}
lI.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "dom"
};
class I0e {
    constructor() {
        this.interactionFrequency = 10,
        this._deltaTime = 0,
        this._didMove = !1,
        this._tickerAdded = !1,
        this._pauseUpdate = !0
    }
    init(e) {
        this.removeTickerListener(),
        this.events = e,
        this.interactionFrequency = 10,
        this._deltaTime = 0,
        this._didMove = !1,
        this._tickerAdded = !1,
        this._pauseUpdate = !0
    }
    get pauseUpdate() {
        return this._pauseUpdate
    }
    set pauseUpdate(e) {
        this._pauseUpdate = e
    }
    addTickerListener() {
        this._tickerAdded || !this.domElement || (Hr.system.add(this._tickerUpdate, this, Bl.INTERACTION),
        this._tickerAdded = !0)
    }
    removeTickerListener() {
        this._tickerAdded && (Hr.system.remove(this._tickerUpdate, this),
        this._tickerAdded = !1)
    }
    pointerMoved() {
        this._didMove = !0
    }
    _update() {
        if (!this.domElement || this._pauseUpdate)
            return;
        if (this._didMove) {
            this._didMove = !1;
            return
        }
        const e = this.events._rootPointerEvent;
        this.events.supportsTouchEvents && e.pointerType === "touch" || globalThis.document.dispatchEvent(this.events.supportsPointerEvents ? new PointerEvent("pointermove",{
            clientX: e.clientX,
            clientY: e.clientY,
            pointerType: e.pointerType,
            pointerId: e.pointerId
        }) : new MouseEvent("mousemove",{
            clientX: e.clientX,
            clientY: e.clientY
        }))
    }
    _tickerUpdate(e) {
        this._deltaTime += e.deltaTime,
        !(this._deltaTime < this.interactionFrequency) && (this._deltaTime = 0,
        this._update())
    }
    destroy() {
        this.removeTickerListener(),
        this.events = null,
        this.domElement = null,
        this._deltaTime = 0,
        this._didMove = !1,
        this._tickerAdded = !1,
        this._pauseUpdate = !0
    }
}
const Xo = new I0e;
class zx extends ld {
    constructor() {
        super(...arguments),
        this.client = new Gt,
        this.movement = new Gt,
        this.offset = new Gt,
        this.global = new Gt,
        this.screen = new Gt
    }
    get clientX() {
        return this.client.x
    }
    get clientY() {
        return this.client.y
    }
    get x() {
        return this.clientX
    }
    get y() {
        return this.clientY
    }
    get movementX() {
        return this.movement.x
    }
    get movementY() {
        return this.movement.y
    }
    get offsetX() {
        return this.offset.x
    }
    get offsetY() {
        return this.offset.y
    }
    get globalX() {
        return this.global.x
    }
    get globalY() {
        return this.global.y
    }
    get screenX() {
        return this.screen.x
    }
    get screenY() {
        return this.screen.y
    }
    getLocalPosition(e, r, n) {
        return e.worldTransform.applyInverse(n || this.global, r)
    }
    getModifierState(e) {
        return "getModifierState"in this.nativeEvent && this.nativeEvent.getModifierState(e)
    }
    initMouseEvent(e, r, n, i, o, s, a, l, c, u, f, d, h, x, y) {
        throw new Error("Method not implemented.")
    }
}
class Bi extends zx {
    constructor() {
        super(...arguments),
        this.width = 0,
        this.height = 0,
        this.isPrimary = !1
    }
    getCoalescedEvents() {
        return this.type === "pointermove" || this.type === "mousemove" || this.type === "touchmove" ? [this] : []
    }
    getPredictedEvents() {
        throw new Error("getPredictedEvents is not supported!")
    }
}
class lu extends zx {
    constructor() {
        super(...arguments),
        this.DOM_DELTA_PIXEL = 0,
        this.DOM_DELTA_LINE = 1,
        this.DOM_DELTA_PAGE = 2
    }
}
lu.DOM_DELTA_PIXEL = 0;
lu.DOM_DELTA_LINE = 1;
lu.DOM_DELTA_PAGE = 2;
const O0e = 2048
  , k0e = new Gt
  , a0 = new Gt;
class R0e {
    constructor(e) {
        this.dispatch = new Qn,
        this.moveOnAll = !1,
        this.enableGlobalMoveEvents = !0,
        this.mappingState = {
            trackingData: {}
        },
        this.eventPool = new Map,
        this._allInteractiveElements = [],
        this._hitElements = [],
        this._isPointerMoveEvent = !1,
        this.rootTarget = e,
        this.hitPruneFn = this.hitPruneFn.bind(this),
        this.hitTestFn = this.hitTestFn.bind(this),
        this.mapPointerDown = this.mapPointerDown.bind(this),
        this.mapPointerMove = this.mapPointerMove.bind(this),
        this.mapPointerOut = this.mapPointerOut.bind(this),
        this.mapPointerOver = this.mapPointerOver.bind(this),
        this.mapPointerUp = this.mapPointerUp.bind(this),
        this.mapPointerUpOutside = this.mapPointerUpOutside.bind(this),
        this.mapWheel = this.mapWheel.bind(this),
        this.mappingTable = {},
        this.addEventMapping("pointerdown", this.mapPointerDown),
        this.addEventMapping("pointermove", this.mapPointerMove),
        this.addEventMapping("pointerout", this.mapPointerOut),
        this.addEventMapping("pointerleave", this.mapPointerOut),
        this.addEventMapping("pointerover", this.mapPointerOver),
        this.addEventMapping("pointerup", this.mapPointerUp),
        this.addEventMapping("pointerupoutside", this.mapPointerUpOutside),
        this.addEventMapping("wheel", this.mapWheel)
    }
    addEventMapping(e, r) {
        this.mappingTable[e] || (this.mappingTable[e] = []),
        this.mappingTable[e].push({
            fn: r,
            priority: 0
        }),
        this.mappingTable[e].sort( (n, i) => n.priority - i.priority)
    }
    dispatchEvent(e, r) {
        e.propagationStopped = !1,
        e.propagationImmediatelyStopped = !1,
        this.propagate(e, r),
        this.dispatch.emit(r || e.type, e)
    }
    mapEvent(e) {
        if (!this.rootTarget)
            return;
        const r = this.mappingTable[e.type];
        if (r)
            for (let n = 0, i = r.length; n < i; n++)
                r[n].fn(e);
        else
            Ne(`[EventBoundary]: Event mapping not defined for ${e.type}`)
    }
    hitTest(e, r) {
        Xo.pauseUpdate = !0;
        const i = this._isPointerMoveEvent && this.enableGlobalMoveEvents ? "hitTestMoveRecursive" : "hitTestRecursive"
          , o = this[i](this.rootTarget, this.rootTarget.eventMode, k0e.set(e, r), this.hitTestFn, this.hitPruneFn);
        return o && o[0]
    }
    propagate(e, r) {
        if (!e.target)
            return;
        const n = e.composedPath();
        e.eventPhase = e.CAPTURING_PHASE;
        for (let i = 0, o = n.length - 1; i < o; i++)
            if (e.currentTarget = n[i],
            this.notifyTarget(e, r),
            e.propagationStopped || e.propagationImmediatelyStopped)
                return;
        if (e.eventPhase = e.AT_TARGET,
        e.currentTarget = e.target,
        this.notifyTarget(e, r),
        !(e.propagationStopped || e.propagationImmediatelyStopped)) {
            e.eventPhase = e.BUBBLING_PHASE;
            for (let i = n.length - 2; i >= 0; i--)
                if (e.currentTarget = n[i],
                this.notifyTarget(e, r),
                e.propagationStopped || e.propagationImmediatelyStopped)
                    return
        }
    }
    all(e, r, n=this._allInteractiveElements) {
        if (n.length === 0)
            return;
        e.eventPhase = e.BUBBLING_PHASE;
        const i = Array.isArray(r) ? r : [r];
        for (let o = n.length - 1; o >= 0; o--)
            i.forEach(s => {
                e.currentTarget = n[o],
                this.notifyTarget(e, s)
            }
            )
    }
    propagationPath(e) {
        const r = [e];
        for (let n = 0; n < O0e && e !== this.rootTarget && e.parent; n++) {
            if (!e.parent)
                throw new Error("Cannot find propagation path to disconnected target");
            r.push(e.parent),
            e = e.parent
        }
        return r.reverse(),
        r
    }
    hitTestMoveRecursive(e, r, n, i, o, s=!1) {
        let a = !1;
        if (this._interactivePrune(e))
            return null;
        if ((e.eventMode === "dynamic" || r === "dynamic") && (Xo.pauseUpdate = !1),
        e.interactiveChildren && e.children) {
            const u = e.children;
            for (let f = u.length - 1; f >= 0; f--) {
                const d = u[f]
                  , h = this.hitTestMoveRecursive(d, this._isInteractive(r) ? r : d.eventMode, n, i, o, s || o(e, n));
                if (h) {
                    if (h.length > 0 && !h[h.length - 1].parent)
                        continue;
                    const x = e.isInteractive();
                    (h.length > 0 || x) && (x && this._allInteractiveElements.push(e),
                    h.push(e)),
                    this._hitElements.length === 0 && (this._hitElements = h),
                    a = !0
                }
            }
        }
        const l = this._isInteractive(r)
          , c = e.isInteractive();
        return c && c && this._allInteractiveElements.push(e),
        s || this._hitElements.length > 0 ? null : a ? this._hitElements : l && !o(e, n) && i(e, n) ? c ? [e] : [] : null
    }
    hitTestRecursive(e, r, n, i, o) {
        if (this._interactivePrune(e) || o(e, n))
            return null;
        if ((e.eventMode === "dynamic" || r === "dynamic") && (Xo.pauseUpdate = !1),
        e.interactiveChildren && e.children) {
            const l = e.children
              , c = n;
            for (let u = l.length - 1; u >= 0; u--) {
                const f = l[u]
                  , d = this.hitTestRecursive(f, this._isInteractive(r) ? r : f.eventMode, c, i, o);
                if (d) {
                    if (d.length > 0 && !d[d.length - 1].parent)
                        continue;
                    const h = e.isInteractive();
                    return (d.length > 0 || h) && d.push(e),
                    d
                }
            }
        }
        const s = this._isInteractive(r)
          , a = e.isInteractive();
        return s && i(e, n) ? a ? [e] : [] : null
    }
    _isInteractive(e) {
        return e === "static" || e === "dynamic"
    }
    _interactivePrune(e) {
        return !e || !e.visible || !e.renderable || !e.measurable || e.eventMode === "none" || e.eventMode === "passive" && !e.interactiveChildren
    }
    hitPruneFn(e, r) {
        if (e.hitArea && (e.worldTransform.applyInverse(r, a0),
        !e.hitArea.contains(a0.x, a0.y)))
            return !0;
        if (e.effects && e.effects.length)
            for (let n = 0; n < e.effects.length; n++) {
                const i = e.effects[n];
                if (i.containsPoint && !i.containsPoint(r, this.hitTestFn))
                    return !0
            }
        return !1
    }
    hitTestFn(e, r) {
        return e.hitArea ? !0 : e != null && e.containsPoint ? (e.worldTransform.applyInverse(r, a0),
        e.containsPoint(a0)) : !1
    }
    notifyTarget(e, r) {
        var o, s;
        if (!e.currentTarget.isInteractive())
            return;
        r ?? (r = e.type);
        const n = `on${r}`;
        (s = (o = e.currentTarget)[n]) == null || s.call(o, e);
        const i = e.eventPhase === e.CAPTURING_PHASE || e.eventPhase === e.AT_TARGET ? `${r}capture` : r;
        this._notifyListeners(e, i),
        e.eventPhase === e.AT_TARGET && this._notifyListeners(e, r)
    }
    mapPointerDown(e) {
        if (!(e instanceof Bi)) {
            Ne("EventBoundary cannot map a non-pointer event as a pointer event");
            return
        }
        const r = this.createPointerEvent(e);
        if (this.dispatchEvent(r, "pointerdown"),
        r.pointerType === "touch")
            this.dispatchEvent(r, "touchstart");
        else if (r.pointerType === "mouse" || r.pointerType === "pen") {
            const i = r.button === 2;
            this.dispatchEvent(r, i ? "rightdown" : "mousedown")
        }
        const n = this.trackingData(e.pointerId);
        n.pressTargetsByButton[e.button] = r.composedPath(),
        this.freeEvent(r)
    }
    mapPointerMove(e) {
        var l, c;
        if (!(e instanceof Bi)) {
            Ne("EventBoundary cannot map a non-pointer event as a pointer event");
            return
        }
        this._allInteractiveElements.length = 0,
        this._hitElements.length = 0,
        this._isPointerMoveEvent = !0;
        const r = this.createPointerEvent(e);
        this._isPointerMoveEvent = !1;
        const n = r.pointerType === "mouse" || r.pointerType === "pen"
          , i = this.trackingData(e.pointerId)
          , o = this.findMountedTarget(i.overTargets);
        if (((l = i.overTargets) == null ? void 0 : l.length) > 0 && o !== r.target) {
            const u = e.type === "mousemove" ? "mouseout" : "pointerout"
              , f = this.createPointerEvent(e, u, o);
            if (this.dispatchEvent(f, "pointerout"),
            n && this.dispatchEvent(f, "mouseout"),
            !r.composedPath().includes(o)) {
                const d = this.createPointerEvent(e, "pointerleave", o);
                for (d.eventPhase = d.AT_TARGET; d.target && !r.composedPath().includes(d.target); )
                    d.currentTarget = d.target,
                    this.notifyTarget(d),
                    n && this.notifyTarget(d, "mouseleave"),
                    d.target = d.target.parent;
                this.freeEvent(d)
            }
            this.freeEvent(f)
        }
        if (o !== r.target) {
            const u = e.type === "mousemove" ? "mouseover" : "pointerover"
              , f = this.clonePointerEvent(r, u);
            this.dispatchEvent(f, "pointerover"),
            n && this.dispatchEvent(f, "mouseover");
            let d = o == null ? void 0 : o.parent;
            for (; d && d !== this.rootTarget.parent && d !== r.target; )
                d = d.parent;
            if (!d || d === this.rootTarget.parent) {
                const x = this.clonePointerEvent(r, "pointerenter");
                for (x.eventPhase = x.AT_TARGET; x.target && x.target !== o && x.target !== this.rootTarget.parent; )
                    x.currentTarget = x.target,
                    this.notifyTarget(x),
                    n && this.notifyTarget(x, "mouseenter"),
                    x.target = x.target.parent;
                this.freeEvent(x)
            }
            this.freeEvent(f)
        }
        const s = []
          , a = this.enableGlobalMoveEvents ?? !0;
        this.moveOnAll ? s.push("pointermove") : this.dispatchEvent(r, "pointermove"),
        a && s.push("globalpointermove"),
        r.pointerType === "touch" && (this.moveOnAll ? s.splice(1, 0, "touchmove") : this.dispatchEvent(r, "touchmove"),
        a && s.push("globaltouchmove")),
        n && (this.moveOnAll ? s.splice(1, 0, "mousemove") : this.dispatchEvent(r, "mousemove"),
        a && s.push("globalmousemove"),
        this.cursor = (c = r.target) == null ? void 0 : c.cursor),
        s.length > 0 && this.all(r, s),
        this._allInteractiveElements.length = 0,
        this._hitElements.length = 0,
        i.overTargets = r.composedPath(),
        this.freeEvent(r)
    }
    mapPointerOver(e) {
        var s;
        if (!(e instanceof Bi)) {
            Ne("EventBoundary cannot map a non-pointer event as a pointer event");
            return
        }
        const r = this.trackingData(e.pointerId)
          , n = this.createPointerEvent(e)
          , i = n.pointerType === "mouse" || n.pointerType === "pen";
        this.dispatchEvent(n, "pointerover"),
        i && this.dispatchEvent(n, "mouseover"),
        n.pointerType === "mouse" && (this.cursor = (s = n.target) == null ? void 0 : s.cursor);
        const o = this.clonePointerEvent(n, "pointerenter");
        for (o.eventPhase = o.AT_TARGET; o.target && o.target !== this.rootTarget.parent; )
            o.currentTarget = o.target,
            this.notifyTarget(o),
            i && this.notifyTarget(o, "mouseenter"),
            o.target = o.target.parent;
        r.overTargets = n.composedPath(),
        this.freeEvent(n),
        this.freeEvent(o)
    }
    mapPointerOut(e) {
        if (!(e instanceof Bi)) {
            Ne("EventBoundary cannot map a non-pointer event as a pointer event");
            return
        }
        const r = this.trackingData(e.pointerId);
        if (r.overTargets) {
            const n = e.pointerType === "mouse" || e.pointerType === "pen"
              , i = this.findMountedTarget(r.overTargets)
              , o = this.createPointerEvent(e, "pointerout", i);
            this.dispatchEvent(o),
            n && this.dispatchEvent(o, "mouseout");
            const s = this.createPointerEvent(e, "pointerleave", i);
            for (s.eventPhase = s.AT_TARGET; s.target && s.target !== this.rootTarget.parent; )
                s.currentTarget = s.target,
                this.notifyTarget(s),
                n && this.notifyTarget(s, "mouseleave"),
                s.target = s.target.parent;
            r.overTargets = null,
            this.freeEvent(o),
            this.freeEvent(s)
        }
        this.cursor = null
    }
    mapPointerUp(e) {
        if (!(e instanceof Bi)) {
            Ne("EventBoundary cannot map a non-pointer event as a pointer event");
            return
        }
        const r = performance.now()
          , n = this.createPointerEvent(e);
        if (this.dispatchEvent(n, "pointerup"),
        n.pointerType === "touch")
            this.dispatchEvent(n, "touchend");
        else if (n.pointerType === "mouse" || n.pointerType === "pen") {
            const a = n.button === 2;
            this.dispatchEvent(n, a ? "rightup" : "mouseup")
        }
        const i = this.trackingData(e.pointerId)
          , o = this.findMountedTarget(i.pressTargetsByButton[e.button]);
        let s = o;
        if (o && !n.composedPath().includes(o)) {
            let a = o;
            for (; a && !n.composedPath().includes(a); ) {
                if (n.currentTarget = a,
                this.notifyTarget(n, "pointerupoutside"),
                n.pointerType === "touch")
                    this.notifyTarget(n, "touchendoutside");
                else if (n.pointerType === "mouse" || n.pointerType === "pen") {
                    const l = n.button === 2;
                    this.notifyTarget(n, l ? "rightupoutside" : "mouseupoutside")
                }
                a = a.parent
            }
            delete i.pressTargetsByButton[e.button],
            s = a
        }
        if (s) {
            const a = this.clonePointerEvent(n, "click");
            a.target = s,
            a.path = null,
            i.clicksByButton[e.button] || (i.clicksByButton[e.button] = {
                clickCount: 0,
                target: a.target,
                timeStamp: r
            });
            const l = i.clicksByButton[e.button];
            if (l.target === a.target && r - l.timeStamp < 200 ? ++l.clickCount : l.clickCount = 1,
            l.target = a.target,
            l.timeStamp = r,
            a.detail = l.clickCount,
            a.pointerType === "mouse") {
                const c = a.button === 2;
                this.dispatchEvent(a, c ? "rightclick" : "click")
            } else
                a.pointerType === "touch" && this.dispatchEvent(a, "tap");
            this.dispatchEvent(a, "pointertap"),
            this.freeEvent(a)
        }
        this.freeEvent(n)
    }
    mapPointerUpOutside(e) {
        if (!(e instanceof Bi)) {
            Ne("EventBoundary cannot map a non-pointer event as a pointer event");
            return
        }
        const r = this.trackingData(e.pointerId)
          , n = this.findMountedTarget(r.pressTargetsByButton[e.button])
          , i = this.createPointerEvent(e);
        if (n) {
            let o = n;
            for (; o; )
                i.currentTarget = o,
                this.notifyTarget(i, "pointerupoutside"),
                i.pointerType === "touch" ? this.notifyTarget(i, "touchendoutside") : (i.pointerType === "mouse" || i.pointerType === "pen") && this.notifyTarget(i, i.button === 2 ? "rightupoutside" : "mouseupoutside"),
                o = o.parent;
            delete r.pressTargetsByButton[e.button]
        }
        this.freeEvent(i)
    }
    mapWheel(e) {
        if (!(e instanceof lu)) {
            Ne("EventBoundary cannot map a non-wheel event as a wheel event");
            return
        }
        const r = this.createWheelEvent(e);
        this.dispatchEvent(r),
        this.freeEvent(r)
    }
    findMountedTarget(e) {
        if (!e)
            return null;
        let r = e[0];
        for (let n = 1; n < e.length && e[n].parent === r; n++)
            r = e[n];
        return r
    }
    createPointerEvent(e, r, n) {
        const i = this.allocateEvent(Bi);
        return this.copyPointerData(e, i),
        this.copyMouseData(e, i),
        this.copyData(e, i),
        i.nativeEvent = e.nativeEvent,
        i.originalEvent = e,
        i.target = n ?? this.hitTest(i.global.x, i.global.y) ?? this._hitElements[0],
        typeof r == "string" && (i.type = r),
        i
    }
    createWheelEvent(e) {
        const r = this.allocateEvent(lu);
        return this.copyWheelData(e, r),
        this.copyMouseData(e, r),
        this.copyData(e, r),
        r.nativeEvent = e.nativeEvent,
        r.originalEvent = e,
        r.target = this.hitTest(r.global.x, r.global.y),
        r
    }
    clonePointerEvent(e, r) {
        const n = this.allocateEvent(Bi);
        return n.nativeEvent = e.nativeEvent,
        n.originalEvent = e.originalEvent,
        this.copyPointerData(e, n),
        this.copyMouseData(e, n),
        this.copyData(e, n),
        n.target = e.target,
        n.path = e.composedPath().slice(),
        n.type = r ?? n.type,
        n
    }
    copyWheelData(e, r) {
        r.deltaMode = e.deltaMode,
        r.deltaX = e.deltaX,
        r.deltaY = e.deltaY,
        r.deltaZ = e.deltaZ
    }
    copyPointerData(e, r) {
        e instanceof Bi && r instanceof Bi && (r.pointerId = e.pointerId,
        r.width = e.width,
        r.height = e.height,
        r.isPrimary = e.isPrimary,
        r.pointerType = e.pointerType,
        r.pressure = e.pressure,
        r.tangentialPressure = e.tangentialPressure,
        r.tiltX = e.tiltX,
        r.tiltY = e.tiltY,
        r.twist = e.twist)
    }
    copyMouseData(e, r) {
        e instanceof zx && r instanceof zx && (r.altKey = e.altKey,
        r.button = e.button,
        r.buttons = e.buttons,
        r.client.copyFrom(e.client),
        r.ctrlKey = e.ctrlKey,
        r.metaKey = e.metaKey,
        r.movement.copyFrom(e.movement),
        r.screen.copyFrom(e.screen),
        r.shiftKey = e.shiftKey,
        r.global.copyFrom(e.global))
    }
    copyData(e, r) {
        r.isTrusted = e.isTrusted,
        r.srcElement = e.srcElement,
        r.timeStamp = performance.now(),
        r.type = e.type,
        r.detail = e.detail,
        r.view = e.view,
        r.which = e.which,
        r.layer.copyFrom(e.layer),
        r.page.copyFrom(e.page)
    }
    trackingData(e) {
        return this.mappingState.trackingData[e] || (this.mappingState.trackingData[e] = {
            pressTargetsByButton: {},
            clicksByButton: {},
            overTarget: null
        }),
        this.mappingState.trackingData[e]
    }
    allocateEvent(e) {
        this.eventPool.has(e) || this.eventPool.set(e, []);
        const r = this.eventPool.get(e).pop() || new e(this);
        return r.eventPhase = r.NONE,
        r.currentTarget = null,
        r.defaultPrevented = !1,
        r.path = null,
        r.target = null,
        r
    }
    freeEvent(e) {
        if (e.manager !== this)
            throw new Error("It is illegal to free an event not managed by this EventBoundary!");
        const r = e.constructor;
        this.eventPool.has(r) || this.eventPool.set(r, []),
        this.eventPool.get(r).push(e)
    }
    _notifyListeners(e, r) {
        const n = e.currentTarget._events[r];
        if (n)
            if ("fn"in n)
                n.once && e.currentTarget.removeListener(r, n.fn, void 0, !0),
                n.fn.call(n.context, e);
            else
                for (let i = 0, o = n.length; i < o && !e.propagationImmediatelyStopped; i++)
                    n[i].once && e.currentTarget.removeListener(r, n[i].fn, void 0, !0),
                    n[i].fn.call(n[i].context, e)
    }
}
const M0e = 1
  , N0e = {
    touchstart: "pointerdown",
    touchend: "pointerup",
    touchendoutside: "pointerupoutside",
    touchmove: "pointermove",
    touchcancel: "pointercancel"
}
  , kb = class gE {
    constructor(e) {
        this.supportsTouchEvents = "ontouchstart"in globalThis,
        this.supportsPointerEvents = !!globalThis.PointerEvent,
        this.domElement = null,
        this.resolution = 1,
        this.renderer = e,
        this.rootBoundary = new R0e(null),
        Xo.init(this),
        this.autoPreventDefault = !0,
        this._eventsAdded = !1,
        this._rootPointerEvent = new Bi(null),
        this._rootWheelEvent = new lu(null),
        this.cursorStyles = {
            default: "inherit",
            pointer: "pointer"
        },
        this.features = new Proxy({
            ...gE.defaultEventFeatures
        },{
            set: (r, n, i) => (n === "globalMove" && (this.rootBoundary.enableGlobalMoveEvents = i),
            r[n] = i,
            !0)
        }),
        this._onPointerDown = this._onPointerDown.bind(this),
        this._onPointerMove = this._onPointerMove.bind(this),
        this._onPointerUp = this._onPointerUp.bind(this),
        this._onPointerOverOut = this._onPointerOverOut.bind(this),
        this.onWheel = this.onWheel.bind(this)
    }
    static get defaultEventMode() {
        return this._defaultEventMode
    }
    init(e) {
        const {canvas: r, resolution: n} = this.renderer;
        this.setTargetElement(r),
        this.resolution = n,
        gE._defaultEventMode = e.eventMode ?? "passive",
        Object.assign(this.features, e.eventFeatures ?? {}),
        this.rootBoundary.enableGlobalMoveEvents = this.features.globalMove
    }
    resolutionChange(e) {
        this.resolution = e
    }
    destroy() {
        Xo.destroy(),
        this.setTargetElement(null),
        this.renderer = null,
        this._currentCursor = null
    }
    setCursor(e) {
        e || (e = "default");
        let r = !0;
        if (globalThis.OffscreenCanvas && this.domElement instanceof OffscreenCanvas && (r = !1),
        this._currentCursor === e)
            return;
        this._currentCursor = e;
        const n = this.cursorStyles[e];
        if (n)
            switch (typeof n) {
            case "string":
                r && (this.domElement.style.cursor = n);
                break;
            case "function":
                n(e);
                break;
            case "object":
                r && Object.assign(this.domElement.style, n);
                break
            }
        else
            r && typeof e == "string" && !Object.prototype.hasOwnProperty.call(this.cursorStyles, e) && (this.domElement.style.cursor = e)
    }
    get pointer() {
        return this._rootPointerEvent
    }
    _onPointerDown(e) {
        if (!this.features.click)
            return;
        this.rootBoundary.rootTarget = this.renderer.lastObjectRendered;
        const r = this._normalizeToPointerData(e);
        this.autoPreventDefault && r[0].isNormalized && (e.cancelable || !("cancelable"in e)) && e.preventDefault();
        for (let n = 0, i = r.length; n < i; n++) {
            const o = r[n]
              , s = this._bootstrapEvent(this._rootPointerEvent, o);
            this.rootBoundary.mapEvent(s)
        }
        this.setCursor(this.rootBoundary.cursor)
    }
    _onPointerMove(e) {
        if (!this.features.move)
            return;
        this.rootBoundary.rootTarget = this.renderer.lastObjectRendered,
        Xo.pointerMoved();
        const r = this._normalizeToPointerData(e);
        for (let n = 0, i = r.length; n < i; n++) {
            const o = this._bootstrapEvent(this._rootPointerEvent, r[n]);
            this.rootBoundary.mapEvent(o)
        }
        this.setCursor(this.rootBoundary.cursor)
    }
    _onPointerUp(e) {
        if (!this.features.click)
            return;
        this.rootBoundary.rootTarget = this.renderer.lastObjectRendered;
        let r = e.target;
        e.composedPath && e.composedPath().length > 0 && (r = e.composedPath()[0]);
        const n = r !== this.domElement ? "outside" : ""
          , i = this._normalizeToPointerData(e);
        for (let o = 0, s = i.length; o < s; o++) {
            const a = this._bootstrapEvent(this._rootPointerEvent, i[o]);
            a.type += n,
            this.rootBoundary.mapEvent(a)
        }
        this.setCursor(this.rootBoundary.cursor)
    }
    _onPointerOverOut(e) {
        if (!this.features.click)
            return;
        this.rootBoundary.rootTarget = this.renderer.lastObjectRendered;
        const r = this._normalizeToPointerData(e);
        for (let n = 0, i = r.length; n < i; n++) {
            const o = this._bootstrapEvent(this._rootPointerEvent, r[n]);
            this.rootBoundary.mapEvent(o)
        }
        this.setCursor(this.rootBoundary.cursor)
    }
    onWheel(e) {
        if (!this.features.wheel)
            return;
        const r = this.normalizeWheelEvent(e);
        this.rootBoundary.rootTarget = this.renderer.lastObjectRendered,
        this.rootBoundary.mapEvent(r)
    }
    setTargetElement(e) {
        this._removeEvents(),
        this.domElement = e,
        Xo.domElement = e,
        this._addEvents()
    }
    _addEvents() {
        if (this._eventsAdded || !this.domElement)
            return;
        Xo.addTickerListener();
        const e = this.domElement.style;
        e && (globalThis.navigator.msPointerEnabled ? (e.msContentZooming = "none",
        e.msTouchAction = "none") : this.supportsPointerEvents && (e.touchAction = "none")),
        this.supportsPointerEvents ? (globalThis.document.addEventListener("pointermove", this._onPointerMove, !0),
        this.domElement.addEventListener("pointerdown", this._onPointerDown, !0),
        this.domElement.addEventListener("pointerleave", this._onPointerOverOut, !0),
        this.domElement.addEventListener("pointerover", this._onPointerOverOut, !0),
        globalThis.addEventListener("pointerup", this._onPointerUp, !0)) : (globalThis.document.addEventListener("mousemove", this._onPointerMove, !0),
        this.domElement.addEventListener("mousedown", this._onPointerDown, !0),
        this.domElement.addEventListener("mouseout", this._onPointerOverOut, !0),
        this.domElement.addEventListener("mouseover", this._onPointerOverOut, !0),
        globalThis.addEventListener("mouseup", this._onPointerUp, !0),
        this.supportsTouchEvents && (this.domElement.addEventListener("touchstart", this._onPointerDown, !0),
        this.domElement.addEventListener("touchend", this._onPointerUp, !0),
        this.domElement.addEventListener("touchmove", this._onPointerMove, !0))),
        this.domElement.addEventListener("wheel", this.onWheel, {
            passive: !0,
            capture: !0
        }),
        this._eventsAdded = !0
    }
    _removeEvents() {
        if (!this._eventsAdded || !this.domElement)
            return;
        Xo.removeTickerListener();
        const e = this.domElement.style;
        e && (globalThis.navigator.msPointerEnabled ? (e.msContentZooming = "",
        e.msTouchAction = "") : this.supportsPointerEvents && (e.touchAction = "")),
        this.supportsPointerEvents ? (globalThis.document.removeEventListener("pointermove", this._onPointerMove, !0),
        this.domElement.removeEventListener("pointerdown", this._onPointerDown, !0),
        this.domElement.removeEventListener("pointerleave", this._onPointerOverOut, !0),
        this.domElement.removeEventListener("pointerover", this._onPointerOverOut, !0),
        globalThis.removeEventListener("pointerup", this._onPointerUp, !0)) : (globalThis.document.removeEventListener("mousemove", this._onPointerMove, !0),
        this.domElement.removeEventListener("mousedown", this._onPointerDown, !0),
        this.domElement.removeEventListener("mouseout", this._onPointerOverOut, !0),
        this.domElement.removeEventListener("mouseover", this._onPointerOverOut, !0),
        globalThis.removeEventListener("mouseup", this._onPointerUp, !0),
        this.supportsTouchEvents && (this.domElement.removeEventListener("touchstart", this._onPointerDown, !0),
        this.domElement.removeEventListener("touchend", this._onPointerUp, !0),
        this.domElement.removeEventListener("touchmove", this._onPointerMove, !0))),
        this.domElement.removeEventListener("wheel", this.onWheel, !0),
        this.domElement = null,
        this._eventsAdded = !1
    }
    mapPositionToPoint(e, r, n) {
        const i = this.domElement.isConnected ? this.domElement.getBoundingClientRect() : {
            x: 0,
            y: 0,
            width: this.domElement.width,
            height: this.domElement.height,
            left: 0,
            top: 0
        }
          , o = 1 / this.resolution;
        e.x = (r - i.left) * (this.domElement.width / i.width) * o,
        e.y = (n - i.top) * (this.domElement.height / i.height) * o
    }
    _normalizeToPointerData(e) {
        const r = [];
        if (this.supportsTouchEvents && e instanceof TouchEvent)
            for (let n = 0, i = e.changedTouches.length; n < i; n++) {
                const o = e.changedTouches[n];
                typeof o.button > "u" && (o.button = 0),
                typeof o.buttons > "u" && (o.buttons = 1),
                typeof o.isPrimary > "u" && (o.isPrimary = e.touches.length === 1 && e.type === "touchstart"),
                typeof o.width > "u" && (o.width = o.radiusX || 1),
                typeof o.height > "u" && (o.height = o.radiusY || 1),
                typeof o.tiltX > "u" && (o.tiltX = 0),
                typeof o.tiltY > "u" && (o.tiltY = 0),
                typeof o.pointerType > "u" && (o.pointerType = "touch"),
                typeof o.pointerId > "u" && (o.pointerId = o.identifier || 0),
                typeof o.pressure > "u" && (o.pressure = o.force || .5),
                typeof o.twist > "u" && (o.twist = 0),
                typeof o.tangentialPressure > "u" && (o.tangentialPressure = 0),
                typeof o.layerX > "u" && (o.layerX = o.offsetX = o.clientX),
                typeof o.layerY > "u" && (o.layerY = o.offsetY = o.clientY),
                o.isNormalized = !0,
                o.type = e.type,
                r.push(o)
            }
        else if (!globalThis.MouseEvent || e instanceof MouseEvent && (!this.supportsPointerEvents || !(e instanceof globalThis.PointerEvent))) {
            const n = e;
            typeof n.isPrimary > "u" && (n.isPrimary = !0),
            typeof n.width > "u" && (n.width = 1),
            typeof n.height > "u" && (n.height = 1),
            typeof n.tiltX > "u" && (n.tiltX = 0),
            typeof n.tiltY > "u" && (n.tiltY = 0),
            typeof n.pointerType > "u" && (n.pointerType = "mouse"),
            typeof n.pointerId > "u" && (n.pointerId = M0e),
            typeof n.pressure > "u" && (n.pressure = .5),
            typeof n.twist > "u" && (n.twist = 0),
            typeof n.tangentialPressure > "u" && (n.tangentialPressure = 0),
            n.isNormalized = !0,
            r.push(n)
        } else
            r.push(e);
        return r
    }
    normalizeWheelEvent(e) {
        const r = this._rootWheelEvent;
        return this._transferMouseData(r, e),
        r.deltaX = e.deltaX,
        r.deltaY = e.deltaY,
        r.deltaZ = e.deltaZ,
        r.deltaMode = e.deltaMode,
        this.mapPositionToPoint(r.screen, e.clientX, e.clientY),
        r.global.copyFrom(r.screen),
        r.offset.copyFrom(r.screen),
        r.nativeEvent = e,
        r.type = e.type,
        r
    }
    _bootstrapEvent(e, r) {
        return e.originalEvent = null,
        e.nativeEvent = r,
        e.pointerId = r.pointerId,
        e.width = r.width,
        e.height = r.height,
        e.isPrimary = r.isPrimary,
        e.pointerType = r.pointerType,
        e.pressure = r.pressure,
        e.tangentialPressure = r.tangentialPressure,
        e.tiltX = r.tiltX,
        e.tiltY = r.tiltY,
        e.twist = r.twist,
        this._transferMouseData(e, r),
        this.mapPositionToPoint(e.screen, r.clientX, r.clientY),
        e.global.copyFrom(e.screen),
        e.offset.copyFrom(e.screen),
        e.isTrusted = r.isTrusted,
        e.type === "pointerleave" && (e.type = "pointerout"),
        e.type.startsWith("mouse") && (e.type = e.type.replace("mouse", "pointer")),
        e.type.startsWith("touch") && (e.type = N0e[e.type] || e.type),
        e
    }
    _transferMouseData(e, r) {
        e.isTrusted = r.isTrusted,
        e.srcElement = r.srcElement,
        e.timeStamp = performance.now(),
        e.type = r.type,
        e.altKey = r.altKey,
        e.button = r.button,
        e.buttons = r.buttons,
        e.client.x = r.clientX,
        e.client.y = r.clientY,
        e.ctrlKey = r.ctrlKey,
        e.metaKey = r.metaKey,
        e.movement.x = r.movementX,
        e.movement.y = r.movementY,
        e.page.x = r.pageX,
        e.page.y = r.pageY,
        e.relatedTarget = null,
        e.shiftKey = r.shiftKey
    }
}
;
kb.extension = {
    name: "events",
    type: [X.WebGLSystem, X.CanvasSystem, X.WebGPUSystem],
    priority: -1
};
kb.defaultEventFeatures = {
    move: !0,
    globalMove: !0,
    click: !0,
    wheel: !0
};
let cI = kb;
const L0e = {
    onclick: null,
    onmousedown: null,
    onmouseenter: null,
    onmouseleave: null,
    onmousemove: null,
    onglobalmousemove: null,
    onmouseout: null,
    onmouseover: null,
    onmouseup: null,
    onmouseupoutside: null,
    onpointercancel: null,
    onpointerdown: null,
    onpointerenter: null,
    onpointerleave: null,
    onpointermove: null,
    onglobalpointermove: null,
    onpointerout: null,
    onpointerover: null,
    onpointertap: null,
    onpointerup: null,
    onpointerupoutside: null,
    onrightclick: null,
    onrightdown: null,
    onrightup: null,
    onrightupoutside: null,
    ontap: null,
    ontouchcancel: null,
    ontouchend: null,
    ontouchendoutside: null,
    ontouchmove: null,
    onglobaltouchmove: null,
    ontouchstart: null,
    onwheel: null,
    get interactive() {
        return this.eventMode === "dynamic" || this.eventMode === "static"
    },
    set interactive(t) {
        this.eventMode = t ? "static" : "passive"
    },
    _internalEventMode: void 0,
    get eventMode() {
        return this._internalEventMode ?? cI.defaultEventMode
    },
    set eventMode(t) {
        this._internalEventMode = t
    },
    isInteractive() {
        return this.eventMode === "static" || this.eventMode === "dynamic"
    },
    interactiveChildren: !0,
    hitArea: null,
    addEventListener(t, e, r) {
        const n = typeof r == "boolean" && r || typeof r == "object" && r.capture
          , i = typeof r == "object" ? r.signal : void 0
          , o = typeof r == "object" ? r.once === !0 : !1
          , s = typeof e == "function" ? void 0 : e;
        t = n ? `${t}capture` : t;
        const a = typeof e == "function" ? e : e.handleEvent
          , l = this;
        i && i.addEventListener("abort", () => {
            l.off(t, a, s)
        }
        ),
        o ? l.once(t, a, s) : l.on(t, a, s)
    },
    removeEventListener(t, e, r) {
        const n = typeof r == "boolean" && r || typeof r == "object" && r.capture
          , i = typeof e == "function" ? void 0 : e;
        t = n ? `${t}capture` : t,
        e = typeof e == "function" ? e : e.handleEvent,
        this.off(t, e, i)
    },
    dispatchEvent(t) {
        if (!(t instanceof ld))
            throw new Error("Container cannot propagate events outside of the Federated Events API");
        return t.defaultPrevented = !1,
        t.path = null,
        t.target = this,
        t.manager.dispatchEvent(t),
        !t.defaultPrevented
    }
};
var $0e = `in vec2 aPosition;
out vec2 vTextureCoord;

uniform vec4 uInputSize;
uniform vec4 uOutputFrame;
uniform vec4 uOutputTexture;

vec4 filterVertexPosition( void )
{
    vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;
    
    position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;
    position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;

    return vec4(position, 0.0, 1.0);
}

vec2 filterTextureCoord( void )
{
    return aPosition * (uOutputFrame.zw * uInputSize.zw);
}

void main(void)
{
    gl_Position = filterVertexPosition();
    vTextureCoord = filterTextureCoord();
}
`;
const uI = {
    5: [.153388, .221461, .250301],
    7: [.071303, .131514, .189879, .214607],
    9: [.028532, .067234, .124009, .179044, .20236],
    11: [.0093, .028002, .065984, .121703, .175713, .198596],
    13: [.002406, .009255, .027867, .065666, .121117, .174868, .197641],
    15: [489e-6, .002403, .009246, .02784, .065602, .120999, .174697, .197448]
}
  , U0e = ["in vec2 vBlurTexCoords[%size%];", "uniform sampler2D uTexture;", "out vec4 finalColor;", "void main(void)", "{", "    finalColor = vec4(0.0);", "    %blur%", "}"].join(`
`);
function G0e(t) {
    const e = uI[t]
      , r = e.length;
    let n = U0e
      , i = "";
    const o = "finalColor += texture(uTexture, vBlurTexCoords[%index%]) * %value%;";
    let s;
    for (let a = 0; a < t; a++) {
        let l = o.replace("%index%", a.toString());
        s = a,
        a >= r && (s = t - a - 1),
        l = l.replace("%value%", e[s].toString()),
        i += l,
        i += `
`
    }
    return n = n.replace("%blur%", i),
    n = n.replace("%size%", t.toString()),
    n
}
const H0e = `
    in vec2 aPosition;

    uniform float uStrength;

    out vec2 vBlurTexCoords[%size%];

    uniform vec4 uInputSize;
    uniform vec4 uOutputFrame;
    uniform vec4 uOutputTexture;

    vec4 filterVertexPosition( void )
{
    vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;

    position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;
    position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;

    return vec4(position, 0.0, 1.0);
}

    vec2 filterTextureCoord( void )
    {
        return aPosition * (uOutputFrame.zw * uInputSize.zw);
    }

    void main(void)
    {
        gl_Position = filterVertexPosition();

        float pixelStrength = uInputSize.%dimension% * uStrength;

        vec2 textureCoord = filterTextureCoord();
        %blur%
    }`;
function V0e(t, e) {
    const r = Math.ceil(t / 2);
    let n = H0e, i = "", o;
    e ? o = "vBlurTexCoords[%index%] =  textureCoord + vec2(%sampleIndex% * pixelStrength, 0.0);" : o = "vBlurTexCoords[%index%] =  textureCoord + vec2(0.0, %sampleIndex% * pixelStrength);";
    for (let s = 0; s < t; s++) {
        let a = o.replace("%index%", s.toString());
        a = a.replace("%sampleIndex%", `${s - (r - 1)}.0`),
        i += a,
        i += `
`
    }
    return n = n.replace("%blur%", i),
    n = n.replace("%size%", t.toString()),
    n = n.replace("%dimension%", e ? "z" : "w"),
    n
}
function z0e(t, e) {
    const r = V0e(e, t)
      , n = G0e(e);
    return ba.from({
        vertex: r,
        fragment: n,
        name: `blur-${t ? "horizontal" : "vertical"}-pass-filter`
    })
}
var j0e = `

struct GlobalFilterUniforms {
  uInputSize:vec4<f32>,
  uInputPixel:vec4<f32>,
  uInputClamp:vec4<f32>,
  uOutputFrame:vec4<f32>,
  uGlobalFrame:vec4<f32>,
  uOutputTexture:vec4<f32>,
};

struct BlurUniforms {
  uStrength:f32,
};

@group(0) @binding(0) var<uniform> gfu: GlobalFilterUniforms;
@group(0) @binding(1) var uTexture: texture_2d<f32>;
@group(0) @binding(2) var uSampler : sampler;

@group(1) @binding(0) var<uniform> blurUniforms : BlurUniforms;


struct VSOutput {
    @builtin(position) position: vec4<f32>,
    %blur-struct%
  };

fn filterVertexPosition(aPosition:vec2<f32>) -> vec4<f32>
{
    var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;

    position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;
    position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;

    return vec4(position, 0.0, 1.0);
}

fn filterTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>
{
    return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);
}

fn globalTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>
{
  return  (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw);  
}

fn getSize() -> vec2<f32>
{
  return gfu.uGlobalFrame.zw;
}


@vertex
fn mainVertex(
  @location(0) aPosition : vec2<f32>, 
) -> VSOutput {

  let filteredCord = filterTextureCoord(aPosition);

  let pixelStrength = gfu.uInputSize.%dimension% * blurUniforms.uStrength;

  return VSOutput(
   filterVertexPosition(aPosition),
    %blur-vertex-out%
  );
}

@fragment
fn mainFragment(
  @builtin(position) position: vec4<f32>,
  %blur-fragment-in%
) -> @location(0) vec4<f32> {

    var   finalColor = vec4(0.0);

    %blur-sampling%

    return finalColor;
}`;
function W0e(t, e) {
    const r = uI[e]
      , n = r.length
      , i = []
      , o = []
      , s = [];
    for (let f = 0; f < e; f++) {
        i[f] = `@location(${f}) offset${f}: vec2<f32>,`,
        t ? o[f] = `filteredCord + vec2(${f - n + 1} * pixelStrength, 0.0),` : o[f] = `filteredCord + vec2(0.0, ${f - n + 1} * pixelStrength),`;
        const d = f < n ? f : e - f - 1
          , h = r[d].toString();
        s[f] = `finalColor += textureSample(uTexture, uSampler, offset${f}) * ${h};`
    }
    const a = i.join(`
`)
      , l = o.join(`
`)
      , c = s.join(`
`)
      , u = j0e.replace("%blur-struct%", a).replace("%blur-vertex-out%", l).replace("%blur-fragment-in%", a).replace("%blur-sampling%", c).replace("%dimension%", t ? "z" : "w");
    return Cs.from({
        vertex: {
            source: u,
            entryPoint: "mainVertex"
        },
        fragment: {
            source: u,
            entryPoint: "mainFragment"
        }
    })
}
const fI = class dI extends h1 {
    constructor(e) {
        e = {
            ...dI.defaultOptions,
            ...e
        };
        const r = z0e(e.horizontal, e.kernelSize)
          , n = W0e(e.horizontal, e.kernelSize);
        super({
            glProgram: r,
            gpuProgram: n,
            resources: {
                blurUniforms: {
                    uStrength: {
                        value: 0,
                        type: "f32"
                    }
                }
            },
            ...e
        }),
        this.horizontal = e.horizontal,
        this._quality = 0,
        this.quality = e.quality,
        this.blur = e.strength,
        this._uniforms = this.resources.blurUniforms.uniforms
    }
    apply(e, r, n, i) {
        if (this._uniforms.uStrength = this.strength / this.passes,
        this.passes === 1)
            e.applyFilter(this, r, n, i);
        else {
            const o = sr.getSameSizeTexture(r);
            let s = r
              , a = o;
            this._state.blend = !1;
            const l = e.renderer.type === qn.WEBGPU;
            for (let c = 0; c < this.passes - 1; c++) {
                e.applyFilter(this, s, a, c === 0 ? !0 : l);
                const u = a;
                a = s,
                s = u
            }
            this._state.blend = !0,
            e.applyFilter(this, s, n, i),
            sr.returnTexture(o)
        }
    }
    get blur() {
        return this.strength
    }
    set blur(e) {
        this.padding = 1 + Math.abs(e) * 2,
        this.strength = e
    }
    get quality() {
        return this._quality
    }
    set quality(e) {
        this._quality = e,
        this.passes = e
    }
}
;
fI.defaultOptions = {
    strength: 8,
    quality: 4,
    kernelSize: 5
};
let lm = fI;
class Y0e extends h1 {
    constructor(...e) {
        let r = e[0] ?? {};
        typeof r == "number" && (Re(tt, "BlurFilter constructor params are now options object. See params: { strength, quality, resolution, kernelSize }"),
        r = {
            strength: r
        },
        e[1] !== void 0 && (r.quality = e[1]),
        e[2] !== void 0 && (r.resolution = e[2] || "inherit"),
        e[3] !== void 0 && (r.kernelSize = e[3])),
        r = {
            ...lm.defaultOptions,
            ...r
        };
        const {strength: n, strengthX: i, strengthY: o, quality: s, ...a} = r;
        super({
            ...a,
            compatibleRenderers: qn.BOTH,
            resources: {}
        }),
        this._repeatEdgePixels = !1,
        this.blurXFilter = new lm({
            horizontal: !0,
            ...r
        }),
        this.blurYFilter = new lm({
            horizontal: !1,
            ...r
        }),
        this.quality = s,
        this.strengthX = i ?? n,
        this.strengthY = o ?? n,
        this.repeatEdgePixels = !1
    }
    apply(e, r, n, i) {
        const o = Math.abs(this.blurXFilter.strength)
          , s = Math.abs(this.blurYFilter.strength);
        if (o && s) {
            const a = sr.getSameSizeTexture(r);
            this.blurXFilter.blendMode = "normal",
            this.blurXFilter.apply(e, r, a, !0),
            this.blurYFilter.blendMode = this.blendMode,
            this.blurYFilter.apply(e, a, n, i),
            sr.returnTexture(a)
        } else
            s ? (this.blurYFilter.blendMode = this.blendMode,
            this.blurYFilter.apply(e, r, n, i)) : (this.blurXFilter.blendMode = this.blendMode,
            this.blurXFilter.apply(e, r, n, i))
    }
    updatePadding() {
        this._repeatEdgePixels ? this.padding = 0 : this.padding = Math.max(Math.abs(this.blurXFilter.blur), Math.abs(this.blurYFilter.blur)) * 2
    }
    get strength() {
        if (this.strengthX !== this.strengthY)
            throw new Error("BlurFilter's strengthX and strengthY are different");
        return this.strengthX
    }
    set strength(e) {
        this.blurXFilter.blur = this.blurYFilter.blur = e,
        this.updatePadding()
    }
    get quality() {
        return this.blurXFilter.quality
    }
    set quality(e) {
        this.blurXFilter.quality = this.blurYFilter.quality = e
    }
    get strengthX() {
        return this.blurXFilter.blur
    }
    set strengthX(e) {
        this.blurXFilter.blur = e,
        this.updatePadding()
    }
    get strengthY() {
        return this.blurYFilter.blur
    }
    set strengthY(e) {
        this.blurYFilter.blur = e,
        this.updatePadding()
    }
    get blur() {
        return Re("8.3.0", "BlurFilter.blur is deprecated, please use BlurFilter.strength instead."),
        this.strength
    }
    set blur(e) {
        Re("8.3.0", "BlurFilter.blur is deprecated, please use BlurFilter.strength instead."),
        this.strength = e
    }
    get blurX() {
        return Re("8.3.0", "BlurFilter.blurX is deprecated, please use BlurFilter.strengthX instead."),
        this.strengthX
    }
    set blurX(e) {
        Re("8.3.0", "BlurFilter.blurX is deprecated, please use BlurFilter.strengthX instead."),
        this.strengthX = e
    }
    get blurY() {
        return Re("8.3.0", "BlurFilter.blurY is deprecated, please use BlurFilter.strengthY instead."),
        this.strengthY
    }
    set blurY(e) {
        Re("8.3.0", "BlurFilter.blurY is deprecated, please use BlurFilter.strengthY instead."),
        this.strengthY = e
    }
    get repeatEdgePixels() {
        return this._repeatEdgePixels
    }
    set repeatEdgePixels(e) {
        this._repeatEdgePixels = e,
        this.updatePadding()
    }
}
Y0e.defaultOptions = {
    strength: 8,
    quality: 4,
    kernelSize: 5
};
var X0e = `in vec2 vTextureCoord;
out vec4 finalColor;
uniform sampler2D uTexture;
void main() {
    finalColor = texture(uTexture, vTextureCoord);
}
`
  , b3 = `struct GlobalFilterUniforms {
  uInputSize: vec4<f32>,
  uInputPixel: vec4<f32>,
  uInputClamp: vec4<f32>,
  uOutputFrame: vec4<f32>,
  uGlobalFrame: vec4<f32>,
  uOutputTexture: vec4<f32>,
};

@group(0) @binding(0) var <uniform> gfu: GlobalFilterUniforms;
@group(0) @binding(1) var uTexture: texture_2d<f32>;
@group(0) @binding(2) var uSampler: sampler;

struct VSOutput {
  @builtin(position) position: vec4<f32>,
  @location(0) uv: vec2<f32>
};

fn filterVertexPosition(aPosition: vec2<f32>) -> vec4<f32>
{
    var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;

    position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;
    position.y = position.y * (2.0 * gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;

    return vec4(position, 0.0, 1.0);
}

fn filterTextureCoord(aPosition: vec2<f32>) -> vec2<f32>
{
    return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);
}

@vertex
fn mainVertex(
  @location(0) aPosition: vec2<f32>,
) -> VSOutput {
  return VSOutput(
   filterVertexPosition(aPosition),
   filterTextureCoord(aPosition)
  );
}

@fragment
fn mainFragment(
  @location(0) uv: vec2<f32>,
) -> @location(0) vec4<f32> {
    return textureSample(uTexture, uSampler, uv);
}
`;
class K0e extends h1 {
    constructor() {
        const e = Cs.from({
            vertex: {
                source: b3,
                entryPoint: "mainVertex"
            },
            fragment: {
                source: b3,
                entryPoint: "mainFragment"
            },
            name: "passthrough-filter"
        })
          , r = ba.from({
            vertex: $0e,
            fragment: X0e,
            name: "passthrough-filter"
        });
        super({
            gpuProgram: e,
            glProgram: r
        })
    }
}
class hI {
    constructor(e) {
        this._renderer = e
    }
    push(e, r, n) {
        this._renderer.renderPipes.batch.break(n),
        n.add({
            renderPipeId: "filter",
            canBundle: !1,
            action: "pushFilter",
            container: r,
            filterEffect: e
        })
    }
    pop(e, r, n) {
        this._renderer.renderPipes.batch.break(n),
        n.add({
            renderPipeId: "filter",
            action: "popFilter",
            canBundle: !1
        })
    }
    execute(e) {
        e.action === "pushFilter" ? this._renderer.filter.push(e) : e.action === "popFilter" && this._renderer.filter.pop()
    }
    destroy() {
        this._renderer = null
    }
}
hI.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "filter"
};
const C3 = new Pe;
function q0e(t, e) {
    e.clear();
    const r = e.matrix;
    for (let n = 0; n < t.length; n++) {
        const i = t[n];
        if (i.globalDisplayStatus < 7)
            continue;
        const o = i.renderGroup ?? i.parentRenderGroup;
        o != null && o.isCachedAsTexture ? e.matrix = C3.copyFrom(o.textureOffsetInverseTransform).append(i.worldTransform) : o != null && o._parentCacheAsTextureRenderGroup ? e.matrix = C3.copyFrom(o._parentCacheAsTextureRenderGroup.inverseWorldTransform).append(i.groupTransform) : e.matrix = i.worldTransform,
        e.addBounds(i.bounds)
    }
    return e.matrix = r,
    e
}
const Z0e = new cd({
    attributes: {
        aPosition: {
            buffer: new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]),
            format: "float32x2",
            stride: 2 * 4,
            offset: 0
        }
    },
    indexBuffer: new Uint32Array([0, 1, 2, 0, 2, 3])
});
class J0e {
    constructor() {
        this.skip = !1,
        this.inputTexture = null,
        this.backTexture = null,
        this.filters = null,
        this.bounds = new jr,
        this.container = null,
        this.blendRequired = !1,
        this.outputRenderSurface = null,
        this.globalFrame = {
            x: 0,
            y: 0,
            width: 0,
            height: 0
        },
        this.firstEnabledIndex = -1,
        this.lastEnabledIndex = -1
    }
}
class xI {
    constructor(e) {
        this._filterStackIndex = 0,
        this._filterStack = [],
        this._filterGlobalUniforms = new vn({
            uInputSize: {
                value: new Float32Array(4),
                type: "vec4<f32>"
            },
            uInputPixel: {
                value: new Float32Array(4),
                type: "vec4<f32>"
            },
            uInputClamp: {
                value: new Float32Array(4),
                type: "vec4<f32>"
            },
            uOutputFrame: {
                value: new Float32Array(4),
                type: "vec4<f32>"
            },
            uGlobalFrame: {
                value: new Float32Array(4),
                type: "vec4<f32>"
            },
            uOutputTexture: {
                value: new Float32Array(4),
                type: "vec4<f32>"
            }
        }),
        this._globalFilterBindGroup = new is({}),
        this.renderer = e
    }
    get activeBackTexture() {
        var e;
        return (e = this._activeFilterData) == null ? void 0 : e.backTexture
    }
    push(e) {
        const r = this.renderer
          , n = e.filterEffect.filters
          , i = this._pushFilterData();
        i.skip = !1,
        i.filters = n,
        i.container = e.container,
        i.outputRenderSurface = r.renderTarget.renderSurface;
        const o = r.renderTarget.renderTarget.colorTexture.source
          , s = o.resolution
          , a = o.antialias;
        if (n.every(h => !h.enabled)) {
            i.skip = !0;
            return
        }
        const l = i.bounds;
        if (this._calculateFilterArea(e, l),
        this._calculateFilterBounds(i, r.renderTarget.rootViewPort, a, s, 1),
        i.skip)
            return;
        const c = this._getPreviousFilterData()
          , u = this._findFilterResolution(s);
        let f = 0
          , d = 0;
        c && (f = c.bounds.minX,
        d = c.bounds.minY),
        this._calculateGlobalFrame(i, f, d, u, o.width, o.height),
        this._setupFilterTextures(i, l, r, c)
    }
    generateFilteredTexture({texture: e, filters: r}) {
        const n = this._pushFilterData();
        this._activeFilterData = n,
        n.skip = !1,
        n.filters = r;
        const i = e.source
          , o = i.resolution
          , s = i.antialias;
        if (r.every(h => !h.enabled))
            return n.skip = !0,
            e;
        const a = n.bounds;
        if (a.addRect(e.frame),
        this._calculateFilterBounds(n, a.rectangle, s, o, 0),
        n.skip)
            return e;
        const l = o
          , c = 0
          , u = 0;
        this._calculateGlobalFrame(n, c, u, l, i.width, i.height),
        n.outputRenderSurface = sr.getOptimalTexture(a.width, a.height, n.resolution, n.antialias),
        n.backTexture = Be.EMPTY,
        n.inputTexture = e,
        this.renderer.renderTarget.finishRenderPass(),
        this._applyFiltersToTexture(n, !0);
        const d = n.outputRenderSurface;
        return d.source.alphaMode = "premultiplied-alpha",
        d
    }
    pop() {
        const e = this.renderer
          , r = this._popFilterData();
        r.skip || (e.globalUniforms.pop(),
        e.renderTarget.finishRenderPass(),
        this._activeFilterData = r,
        this._applyFiltersToTexture(r, !1),
        r.blendRequired && sr.returnTexture(r.backTexture),
        sr.returnTexture(r.inputTexture))
    }
    getBackTexture(e, r, n) {
        const i = e.colorTexture.source._resolution
          , o = sr.getOptimalTexture(r.width, r.height, i, !1);
        let s = r.minX
          , a = r.minY;
        n && (s -= n.minX,
        a -= n.minY),
        s = Math.floor(s * i),
        a = Math.floor(a * i);
        const l = Math.ceil(r.width * i)
          , c = Math.ceil(r.height * i);
        return this.renderer.renderTarget.copyToTexture(e, o, {
            x: s,
            y: a
        }, {
            width: l,
            height: c
        }, {
            x: 0,
            y: 0
        }),
        o
    }
    applyFilter(e, r, n, i) {
        const o = this.renderer
          , s = this._activeFilterData
          , l = s.outputRenderSurface === n
          , c = o.renderTarget.rootRenderTarget.colorTexture.source._resolution
          , u = this._findFilterResolution(c);
        let f = 0
          , d = 0;
        if (l) {
            const x = this._findPreviousFilterOffset();
            f = x.x,
            d = x.y
        }
        this._updateFilterUniforms(r, n, s, f, d, u, l, i);
        const h = e.enabled ? e : this._getPassthroughFilter();
        this._setupBindGroupsAndRender(h, r, o)
    }
    calculateSpriteMatrix(e, r) {
        const n = this._activeFilterData
          , i = e.set(n.inputTexture._source.width, 0, 0, n.inputTexture._source.height, n.bounds.minX, n.bounds.minY)
          , o = r.worldTransform.copyTo(Pe.shared)
          , s = r.renderGroup || r.parentRenderGroup;
        return s && s.cacheToLocalTransform && o.prepend(s.cacheToLocalTransform),
        o.invert(),
        i.prepend(o),
        i.scale(1 / r.texture.orig.width, 1 / r.texture.orig.height),
        i.translate(r.anchor.x, r.anchor.y),
        i
    }
    destroy() {
        var e;
        (e = this._passthroughFilter) == null || e.destroy(!0),
        this._passthroughFilter = null
    }
    _getPassthroughFilter() {
        return this._passthroughFilter ?? (this._passthroughFilter = new K0e),
        this._passthroughFilter
    }
    _setupBindGroupsAndRender(e, r, n) {
        if (n.renderPipes.uniformBatch) {
            const i = n.renderPipes.uniformBatch.getUboResource(this._filterGlobalUniforms);
            this._globalFilterBindGroup.setResource(i, 0)
        } else
            this._globalFilterBindGroup.setResource(this._filterGlobalUniforms, 0);
        this._globalFilterBindGroup.setResource(r.source, 1),
        this._globalFilterBindGroup.setResource(r.source.style, 2),
        e.groups[0] = this._globalFilterBindGroup,
        n.encoder.draw({
            geometry: Z0e,
            shader: e,
            state: e._state,
            topology: "triangle-list"
        }),
        n.type === qn.WEBGL && n.renderTarget.finishRenderPass()
    }
    _setupFilterTextures(e, r, n, i) {
        if (e.backTexture = Be.EMPTY,
        e.inputTexture = sr.getOptimalTexture(r.width, r.height, e.resolution, e.antialias),
        e.blendRequired) {
            n.renderTarget.finishRenderPass();
            const o = n.renderTarget.getRenderTarget(e.outputRenderSurface);
            e.backTexture = this.getBackTexture(o, r, i == null ? void 0 : i.bounds)
        }
        n.renderTarget.bind(e.inputTexture, !0),
        n.globalUniforms.push({
            offset: r
        })
    }
    _calculateGlobalFrame(e, r, n, i, o, s) {
        const a = e.globalFrame;
        a.x = r * i,
        a.y = n * i,
        a.width = o * i,
        a.height = s * i
    }
    _updateFilterUniforms(e, r, n, i, o, s, a, l) {
        const c = this._filterGlobalUniforms.uniforms
          , u = c.uOutputFrame
          , f = c.uInputSize
          , d = c.uInputPixel
          , h = c.uInputClamp
          , x = c.uGlobalFrame
          , y = c.uOutputTexture;
        a ? (u[0] = n.bounds.minX - i,
        u[1] = n.bounds.minY - o) : (u[0] = 0,
        u[1] = 0),
        u[2] = e.frame.width,
        u[3] = e.frame.height,
        f[0] = e.source.width,
        f[1] = e.source.height,
        f[2] = 1 / f[0],
        f[3] = 1 / f[1],
        d[0] = e.source.pixelWidth,
        d[1] = e.source.pixelHeight,
        d[2] = 1 / d[0],
        d[3] = 1 / d[1],
        h[0] = .5 * d[2],
        h[1] = .5 * d[3],
        h[2] = e.frame.width * f[2] - .5 * d[2],
        h[3] = e.frame.height * f[3] - .5 * d[3];
        const m = this.renderer.renderTarget.rootRenderTarget.colorTexture;
        x[0] = i * s,
        x[1] = o * s,
        x[2] = m.source.width * s,
        x[3] = m.source.height * s,
        r instanceof Be && (r.source.resource = null);
        const E = this.renderer.renderTarget.getRenderTarget(r);
        this.renderer.renderTarget.bind(r, !!l),
        r instanceof Be ? (y[0] = r.frame.width,
        y[1] = r.frame.height) : (y[0] = E.width,
        y[1] = E.height),
        y[2] = E.isRoot ? -1 : 1,
        this._filterGlobalUniforms.update()
    }
    _findFilterResolution(e) {
        let r = this._filterStackIndex - 1;
        for (; r > 0 && this._filterStack[r].skip; )
            --r;
        return r > 0 && this._filterStack[r].inputTexture ? this._filterStack[r].inputTexture.source._resolution : e
    }
    _findPreviousFilterOffset() {
        let e = 0
          , r = 0
          , n = this._filterStackIndex;
        for (; n > 0; ) {
            n--;
            const i = this._filterStack[n];
            if (!i.skip) {
                e = i.bounds.minX,
                r = i.bounds.minY;
                break
            }
        }
        return {
            x: e,
            y: r
        }
    }
    _calculateFilterArea(e, r) {
        if (e.renderables ? q0e(e.renderables, r) : e.filterEffect.filterArea ? (r.clear(),
        r.addRect(e.filterEffect.filterArea),
        r.applyMatrix(e.container.worldTransform)) : e.container.getFastGlobalBounds(!0, r),
        e.container) {
            const i = (e.container.renderGroup || e.container.parentRenderGroup).cacheToLocalTransform;
            i && r.applyMatrix(i)
        }
    }
    _applyFiltersToTexture(e, r) {
        const n = e.inputTexture
          , i = e.bounds
          , o = e.filters
          , s = e.firstEnabledIndex
          , a = e.lastEnabledIndex;
        if (this._globalFilterBindGroup.setResource(n.source.style, 2),
        this._globalFilterBindGroup.setResource(e.backTexture.source, 3),
        s === a)
            o[s].apply(this, n, e.outputRenderSurface, r);
        else {
            let l = e.inputTexture;
            const c = sr.getOptimalTexture(i.width, i.height, l.source._resolution, !1);
            let u = c;
            for (let f = s; f < a; f++) {
                const d = o[f];
                if (!d.enabled)
                    continue;
                d.apply(this, l, u, !0);
                const h = l;
                l = u,
                u = h
            }
            o[a].apply(this, l, e.outputRenderSurface, r),
            sr.returnTexture(c)
        }
    }
    _calculateFilterBounds(e, r, n, i, o) {
        var E;
        const s = this.renderer
          , a = e.bounds
          , l = e.filters;
        let c = 1 / 0
          , u = 0
          , f = !0
          , d = !1
          , h = !1
          , x = !0
          , y = -1
          , m = -1;
        for (let g = 0; g < l.length; g++) {
            const p = l[g];
            if (!p.enabled)
                continue;
            if (y === -1 && (y = g),
            m = g,
            c = Math.min(c, p.resolution === "inherit" ? i : p.resolution),
            u += p.padding,
            p.antialias === "off" ? f = !1 : p.antialias === "inherit" && f && (f = n),
            p.clipToViewport || (x = !1),
            !!!(p.compatibleRenderers & s.type)) {
                h = !1;
                break
            }
            if (p.blendRequired && !(((E = s.backBuffer) == null ? void 0 : E.useBackBuffer) ?? !0)) {
                Ne("Blend filter requires backBuffer on WebGL renderer to be enabled. Set `useBackBuffer: true` in the renderer options."),
                h = !1;
                break
            }
            h = !0,
            d || (d = p.blendRequired)
        }
        if (!h) {
            e.skip = !0;
            return
        }
        if (x && a.fitBounds(0, r.width / i, 0, r.height / i),
        a.scale(c).ceil().scale(1 / c).pad((u | 0) * o),
        !a.isPositive) {
            e.skip = !0;
            return
        }
        e.antialias = f,
        e.resolution = c,
        e.blendRequired = d,
        e.firstEnabledIndex = y,
        e.lastEnabledIndex = m
    }
    _popFilterData() {
        return this._filterStackIndex--,
        this._filterStack[this._filterStackIndex]
    }
    _getPreviousFilterData() {
        let e, r = this._filterStackIndex - 1;
        for (; r > 0 && (r--,
        e = this._filterStack[r],
        !!e.skip); )
            ;
        return e
    }
    _pushFilterData() {
        let e = this._filterStack[this._filterStackIndex];
        return e || (e = this._filterStack[this._filterStackIndex] = new J0e),
        this._filterStackIndex++,
        e
    }
}
xI.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem],
    name: "filter"
};
var Q0e = `in vec2 vMaskCoord;
in vec2 vTextureCoord;

uniform sampler2D uTexture;
uniform sampler2D uMaskTexture;

uniform float uAlpha;
uniform vec4 uMaskClamp;
uniform float uInverse;

out vec4 finalColor;

void main(void)
{
    float clip = step(3.5,
        step(uMaskClamp.x, vMaskCoord.x) +
        step(uMaskClamp.y, vMaskCoord.y) +
        step(vMaskCoord.x, uMaskClamp.z) +
        step(vMaskCoord.y, uMaskClamp.w));

    // TODO look into why this is needed
    float npmAlpha = uAlpha;
    vec4 original = texture(uTexture, vTextureCoord);
    vec4 masky = texture(uMaskTexture, vMaskCoord);
    float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);

    float a = alphaMul * masky.r * npmAlpha * clip;

    if (uInverse == 1.0) {
        a = 1.0 - a;
    }

    finalColor = original * a;
}
`
  , efe = `in vec2 aPosition;

out vec2 vTextureCoord;
out vec2 vMaskCoord;


uniform vec4 uInputSize;
uniform vec4 uOutputFrame;
uniform vec4 uOutputTexture;
uniform mat3 uFilterMatrix;

vec4 filterVertexPosition(  vec2 aPosition )
{
    vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;
       
    position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;
    position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;

    return vec4(position, 0.0, 1.0);
}

vec2 filterTextureCoord(  vec2 aPosition )
{
    return aPosition * (uOutputFrame.zw * uInputSize.zw);
}

vec2 getFilterCoord( vec2 aPosition )
{
    return  ( uFilterMatrix * vec3( filterTextureCoord(aPosition), 1.0)  ).xy;
}   

void main(void)
{
    gl_Position = filterVertexPosition(aPosition);
    vTextureCoord = filterTextureCoord(aPosition);
    vMaskCoord = getFilterCoord(aPosition);
}
`
  , A3 = `struct GlobalFilterUniforms {
  uInputSize:vec4<f32>,
  uInputPixel:vec4<f32>,
  uInputClamp:vec4<f32>,
  uOutputFrame:vec4<f32>,
  uGlobalFrame:vec4<f32>,
  uOutputTexture:vec4<f32>,
};

struct MaskUniforms {
  uFilterMatrix:mat3x3<f32>,
  uMaskClamp:vec4<f32>,
  uAlpha:f32,
  uInverse:f32,
};

@group(0) @binding(0) var<uniform> gfu: GlobalFilterUniforms;
@group(0) @binding(1) var uTexture: texture_2d<f32>;
@group(0) @binding(2) var uSampler : sampler;

@group(1) @binding(0) var<uniform> filterUniforms : MaskUniforms;
@group(1) @binding(1) var uMaskTexture: texture_2d<f32>;

struct VSOutput {
    @builtin(position) position: vec4<f32>,
    @location(0) uv : vec2<f32>,
    @location(1) filterUv : vec2<f32>,
};

fn filterVertexPosition(aPosition:vec2<f32>) -> vec4<f32>
{
    var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;

    position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;
    position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;

    return vec4(position, 0.0, 1.0);
}

fn filterTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>
{
    return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);
}

fn globalTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>
{
  return  (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw);
}

fn getFilterCoord(aPosition:vec2<f32> ) -> vec2<f32>
{
  return ( filterUniforms.uFilterMatrix * vec3( filterTextureCoord(aPosition), 1.0)  ).xy;
}

fn getSize() -> vec2<f32>
{
  return gfu.uGlobalFrame.zw;
}

@vertex
fn mainVertex(
  @location(0) aPosition : vec2<f32>,
) -> VSOutput {
  return VSOutput(
   filterVertexPosition(aPosition),
   filterTextureCoord(aPosition),
   getFilterCoord(aPosition)
  );
}

@fragment
fn mainFragment(
  @location(0) uv: vec2<f32>,
  @location(1) filterUv: vec2<f32>,
  @builtin(position) position: vec4<f32>
) -> @location(0) vec4<f32> {

    var maskClamp = filterUniforms.uMaskClamp;
    var uAlpha = filterUniforms.uAlpha;

    var clip = step(3.5,
      step(maskClamp.x, filterUv.x) +
      step(maskClamp.y, filterUv.y) +
      step(filterUv.x, maskClamp.z) +
      step(filterUv.y, maskClamp.w));

    var mask = textureSample(uMaskTexture, uSampler, filterUv);
    var source = textureSample(uTexture, uSampler, uv);
    var alphaMul = 1.0 - uAlpha * (1.0 - mask.a);

    var a: f32 = alphaMul * mask.r * uAlpha * clip;

    if (filterUniforms.uInverse == 1.0) {
        a = 1.0 - a;
    }

    return source * a;
}
`;
class tfe extends h1 {
    constructor(e) {
        const {sprite: r, ...n} = e
          , i = new VF(r.texture)
          , o = new vn({
            uFilterMatrix: {
                value: new Pe,
                type: "mat3x3<f32>"
            },
            uMaskClamp: {
                value: i.uClampFrame,
                type: "vec4<f32>"
            },
            uAlpha: {
                value: 1,
                type: "f32"
            },
            uInverse: {
                value: e.inverse ? 1 : 0,
                type: "f32"
            }
        })
          , s = Cs.from({
            vertex: {
                source: A3,
                entryPoint: "mainVertex"
            },
            fragment: {
                source: A3,
                entryPoint: "mainFragment"
            }
        })
          , a = ba.from({
            vertex: efe,
            fragment: Q0e,
            name: "mask-filter"
        });
        super({
            ...n,
            gpuProgram: s,
            glProgram: a,
            clipToViewport: !1,
            resources: {
                filterUniforms: o,
                uMaskTexture: r.texture.source
            }
        }),
        this.sprite = r,
        this._textureMatrix = i
    }
    set inverse(e) {
        this.resources.filterUniforms.uniforms.uInverse = e ? 1 : 0
    }
    get inverse() {
        return this.resources.filterUniforms.uniforms.uInverse === 1
    }
    apply(e, r, n, i) {
        this._textureMatrix.texture = this.sprite.texture,
        e.calculateSpriteMatrix(this.resources.filterUniforms.uniforms.uFilterMatrix, this.sprite).prepend(this._textureMatrix.mapCoord),
        this.resources.uMaskTexture = this.sprite.texture.source,
        e.applyFilter(this, r, n, i)
    }
}
class jx extends ad {
    constructor(e) {
        e instanceof ui && (e = {
            context: e
        });
        const {context: r, roundPixels: n, ...i} = e || {};
        super({
            label: "Graphics",
            ...i
        }),
        this.renderPipeId = "graphics",
        r ? this._context = r : this._context = this._ownedContext = new ui,
        this._context.on("update", this.onViewUpdate, this),
        this.didViewUpdate = !0,
        this.allowChildren = !1,
        this.roundPixels = n ?? !1
    }
    set context(e) {
        e !== this._context && (this._context.off("update", this.onViewUpdate, this),
        this._context = e,
        this._context.on("update", this.onViewUpdate, this),
        this.onViewUpdate())
    }
    get context() {
        return this._context
    }
    get bounds() {
        return this._context.bounds
    }
    updateBounds() {}
    containsPoint(e) {
        return this._context.containsPoint(e)
    }
    destroy(e) {
        this._ownedContext && !e ? this._ownedContext.destroy(e) : (e === !0 || (e == null ? void 0 : e.context) === !0) && this._context.destroy(e),
        this._ownedContext = null,
        this._context = null,
        super.destroy(e)
    }
    _callContextMethod(e, r) {
        return this.context[e](...r),
        this
    }
    setFillStyle(...e) {
        return this._callContextMethod("setFillStyle", e)
    }
    setStrokeStyle(...e) {
        return this._callContextMethod("setStrokeStyle", e)
    }
    fill(...e) {
        return this._callContextMethod("fill", e)
    }
    stroke(...e) {
        return this._callContextMethod("stroke", e)
    }
    texture(...e) {
        return this._callContextMethod("texture", e)
    }
    beginPath() {
        return this._callContextMethod("beginPath", [])
    }
    cut() {
        return this._callContextMethod("cut", [])
    }
    arc(...e) {
        return this._callContextMethod("arc", e)
    }
    arcTo(...e) {
        return this._callContextMethod("arcTo", e)
    }
    arcToSvg(...e) {
        return this._callContextMethod("arcToSvg", e)
    }
    bezierCurveTo(...e) {
        return this._callContextMethod("bezierCurveTo", e)
    }
    closePath() {
        return this._callContextMethod("closePath", [])
    }
    ellipse(...e) {
        return this._callContextMethod("ellipse", e)
    }
    circle(...e) {
        return this._callContextMethod("circle", e)
    }
    path(...e) {
        return this._callContextMethod("path", e)
    }
    lineTo(...e) {
        return this._callContextMethod("lineTo", e)
    }
    moveTo(...e) {
        return this._callContextMethod("moveTo", e)
    }
    quadraticCurveTo(...e) {
        return this._callContextMethod("quadraticCurveTo", e)
    }
    rect(...e) {
        return this._callContextMethod("rect", e)
    }
    roundRect(...e) {
        return this._callContextMethod("roundRect", e)
    }
    poly(...e) {
        return this._callContextMethod("poly", e)
    }
    regularPoly(...e) {
        return this._callContextMethod("regularPoly", e)
    }
    roundPoly(...e) {
        return this._callContextMethod("roundPoly", e)
    }
    roundShape(...e) {
        return this._callContextMethod("roundShape", e)
    }
    filletRect(...e) {
        return this._callContextMethod("filletRect", e)
    }
    chamferRect(...e) {
        return this._callContextMethod("chamferRect", e)
    }
    star(...e) {
        return this._callContextMethod("star", e)
    }
    svg(...e) {
        return this._callContextMethod("svg", e)
    }
    restore(...e) {
        return this._callContextMethod("restore", e)
    }
    save() {
        return this._callContextMethod("save", [])
    }
    getTransform() {
        return this.context.getTransform()
    }
    resetTransform() {
        return this._callContextMethod("resetTransform", [])
    }
    rotateTransform(...e) {
        return this._callContextMethod("rotate", e)
    }
    scaleTransform(...e) {
        return this._callContextMethod("scale", e)
    }
    setTransform(...e) {
        return this._callContextMethod("setTransform", e)
    }
    transform(...e) {
        return this._callContextMethod("transform", e)
    }
    translateTransform(...e) {
        return this._callContextMethod("translate", e)
    }
    clear() {
        return this._callContextMethod("clear", [])
    }
    get fillStyle() {
        return this._context.fillStyle
    }
    set fillStyle(e) {
        this._context.fillStyle = e
    }
    get strokeStyle() {
        return this._context.strokeStyle
    }
    set strokeStyle(e) {
        this._context.strokeStyle = e
    }
    clone(e=!1) {
        return e ? new jx(this._context.clone()) : (this._ownedContext = null,
        new jx(this._context))
    }
    lineStyle(e, r, n) {
        Re(tt, "Graphics#lineStyle is no longer needed. Use Graphics#setStrokeStyle to set the stroke style.");
        const i = {};
        return e && (i.width = e),
        r && (i.color = r),
        n && (i.alpha = n),
        this.context.strokeStyle = i,
        this
    }
    beginFill(e, r) {
        Re(tt, "Graphics#beginFill is no longer needed. Use Graphics#fill to fill the shape with the desired style.");
        const n = {};
        return e !== void 0 && (n.color = e),
        r !== void 0 && (n.alpha = r),
        this.context.fillStyle = n,
        this
    }
    endFill() {
        Re(tt, "Graphics#endFill is no longer needed. Use Graphics#fill to fill the shape with the desired style."),
        this.context.fill();
        const e = this.context.strokeStyle;
        return (e.width !== ui.defaultStrokeStyle.width || e.color !== ui.defaultStrokeStyle.color || e.alpha !== ui.defaultStrokeStyle.alpha) && this.context.stroke(),
        this
    }
    drawCircle(...e) {
        return Re(tt, "Graphics#drawCircle has been renamed to Graphics#circle"),
        this._callContextMethod("circle", e)
    }
    drawEllipse(...e) {
        return Re(tt, "Graphics#drawEllipse has been renamed to Graphics#ellipse"),
        this._callContextMethod("ellipse", e)
    }
    drawPolygon(...e) {
        return Re(tt, "Graphics#drawPolygon has been renamed to Graphics#poly"),
        this._callContextMethod("poly", e)
    }
    drawRect(...e) {
        return Re(tt, "Graphics#drawRect has been renamed to Graphics#rect"),
        this._callContextMethod("rect", e)
    }
    drawRoundedRect(...e) {
        return Re(tt, "Graphics#drawRoundedRect has been renamed to Graphics#roundRect"),
        this._callContextMethod("roundRect", e)
    }
    drawStar(...e) {
        return Re(tt, "Graphics#drawStar has been renamed to Graphics#star"),
        this._callContextMethod("star", e)
    }
}
const pI = class gI extends cd {
    constructor(...e) {
        let r = e[0] ?? {};
        r instanceof Float32Array && (Re(tt, "use new MeshGeometry({ positions, uvs, indices }) instead"),
        r = {
            positions: r,
            uvs: e[1],
            indices: e[2]
        }),
        r = {
            ...gI.defaultOptions,
            ...r
        };
        const n = r.positions || new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]);
        let i = r.uvs;
        i || (r.positions ? i = new Float32Array(n.length) : i = new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]));
        const o = r.indices || new Uint32Array([0, 1, 2, 0, 2, 3])
          , s = r.shrinkBuffersToFit
          , a = new Yn({
            data: n,
            label: "attribute-mesh-positions",
            shrinkToFit: s,
            usage: it.VERTEX | it.COPY_DST
        })
          , l = new Yn({
            data: i,
            label: "attribute-mesh-uvs",
            shrinkToFit: s,
            usage: it.VERTEX | it.COPY_DST
        })
          , c = new Yn({
            data: o,
            label: "index-mesh-buffer",
            shrinkToFit: s,
            usage: it.INDEX | it.COPY_DST
        });
        super({
            attributes: {
                aPosition: {
                    buffer: a,
                    format: "float32x2",
                    stride: 2 * 4,
                    offset: 0
                },
                aUV: {
                    buffer: l,
                    format: "float32x2",
                    stride: 2 * 4,
                    offset: 0
                }
            },
            indexBuffer: c,
            topology: r.topology
        }),
        this.batchMode = "auto"
    }
    get positions() {
        return this.attributes.aPosition.buffer.data
    }
    set positions(e) {
        this.attributes.aPosition.buffer.data = e
    }
    get uvs() {
        return this.attributes.aUV.buffer.data
    }
    set uvs(e) {
        this.attributes.aUV.buffer.data = e
    }
    get indices() {
        return this.indexBuffer.data
    }
    set indices(e) {
        this.indexBuffer.data = e
    }
}
;
pI.defaultOptions = {
    topology: "triangle-list",
    shrinkBuffersToFit: !1
};
let Rb = pI;
class rfe {
    constructor({matrix: e, observer: r}={}) {
        this.dirty = !0,
        this._matrix = e ?? new Pe,
        this.observer = r,
        this.position = new Jt(this,0,0),
        this.scale = new Jt(this,1,1),
        this.pivot = new Jt(this,0,0),
        this.skew = new Jt(this,0,0),
        this._rotation = 0,
        this._cx = 1,
        this._sx = 0,
        this._cy = 0,
        this._sy = 1
    }
    get matrix() {
        const e = this._matrix;
        return this.dirty && (e.a = this._cx * this.scale.x,
        e.b = this._sx * this.scale.x,
        e.c = this._cy * this.scale.y,
        e.d = this._sy * this.scale.y,
        e.tx = this.position.x - (this.pivot.x * e.a + this.pivot.y * e.c),
        e.ty = this.position.y - (this.pivot.x * e.b + this.pivot.y * e.d),
        this.dirty = !1),
        e
    }
    _onUpdate(e) {
        var r;
        this.dirty = !0,
        e === this.skew && this.updateSkew(),
        (r = this.observer) == null || r._onUpdate(this)
    }
    updateSkew() {
        this._cx = Math.cos(this._rotation + this.skew.y),
        this._sx = Math.sin(this._rotation + this.skew.y),
        this._cy = -Math.sin(this._rotation - this.skew.x),
        this._sy = Math.cos(this._rotation - this.skew.x),
        this.dirty = !0
    }
    toString() {
        return `[pixi.js/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`
    }
    setFromMatrix(e) {
        e.decompose(this),
        this.dirty = !0
    }
    get rotation() {
        return this._rotation
    }
    set rotation(e) {
        this._rotation !== e && (this._rotation = e,
        this._onUpdate(this.skew))
    }
}
const mI = class Zh extends ad {
    constructor(...e) {
        let r = e[0] || {};
        r instanceof Be && (r = {
            texture: r
        }),
        e.length > 1 && (Re(tt, "use new TilingSprite({ texture, width:100, height:100 }) instead"),
        r.width = e[1],
        r.height = e[2]),
        r = {
            ...Zh.defaultOptions,
            ...r
        };
        const {texture: n, anchor: i, tilePosition: o, tileScale: s, tileRotation: a, width: l, height: c, applyAnchorToTexture: u, roundPixels: f, ...d} = r ?? {};
        super({
            label: "TilingSprite",
            ...d
        }),
        this.renderPipeId = "tilingSprite",
        this.batched = !0,
        this.allowChildren = !1,
        this._anchor = new Jt({
            _onUpdate: () => {
                this.onViewUpdate()
            }
        }),
        this.applyAnchorToTexture = u,
        this.texture = n,
        this._width = l ?? n.width,
        this._height = c ?? n.height,
        this._tileTransform = new rfe({
            observer: {
                _onUpdate: () => this.onViewUpdate()
            }
        }),
        i && (this.anchor = i),
        this.tilePosition = o,
        this.tileScale = s,
        this.tileRotation = a,
        this.roundPixels = f ?? !1
    }
    static from(e, r={}) {
        return typeof e == "string" ? new Zh({
            texture: Et.get(e),
            ...r
        }) : new Zh({
            texture: e,
            ...r
        })
    }
    get uvRespectAnchor() {
        return Re(tt, "uvRespectAnchor is deprecated, please use applyAnchorToTexture instead"),
        this.applyAnchorToTexture
    }
    set uvRespectAnchor(e) {
        Re(tt, "uvRespectAnchor is deprecated, please use applyAnchorToTexture instead"),
        this.applyAnchorToTexture = e
    }
    get clampMargin() {
        return this._texture.textureMatrix.clampMargin
    }
    set clampMargin(e) {
        this._texture.textureMatrix.clampMargin = e
    }
    get anchor() {
        return this._anchor
    }
    set anchor(e) {
        typeof e == "number" ? this._anchor.set(e) : this._anchor.copyFrom(e)
    }
    get tilePosition() {
        return this._tileTransform.position
    }
    set tilePosition(e) {
        this._tileTransform.position.copyFrom(e)
    }
    get tileScale() {
        return this._tileTransform.scale
    }
    set tileScale(e) {
        typeof e == "number" ? this._tileTransform.scale.set(e) : this._tileTransform.scale.copyFrom(e)
    }
    set tileRotation(e) {
        this._tileTransform.rotation = e
    }
    get tileRotation() {
        return this._tileTransform.rotation
    }
    get tileTransform() {
        return this._tileTransform
    }
    set texture(e) {
        e || (e = Be.EMPTY);
        const r = this._texture;
        r !== e && (r && r.dynamic && r.off("update", this.onViewUpdate, this),
        e.dynamic && e.on("update", this.onViewUpdate, this),
        this._texture = e,
        this.onViewUpdate())
    }
    get texture() {
        return this._texture
    }
    set width(e) {
        this._width = e,
        this.onViewUpdate()
    }
    get width() {
        return this._width
    }
    set height(e) {
        this._height = e,
        this.onViewUpdate()
    }
    get height() {
        return this._height
    }
    setSize(e, r) {
        typeof e == "object" && (r = e.height ?? e.width,
        e = e.width),
        this._width = e,
        this._height = r ?? e,
        this.onViewUpdate()
    }
    getSize(e) {
        return e || (e = {}),
        e.width = this._width,
        e.height = this._height,
        e
    }
    updateBounds() {
        const e = this._bounds
          , r = this._anchor
          , n = this._width
          , i = this._height;
        e.minX = -r._x * n,
        e.maxX = e.minX + n,
        e.minY = -r._y * i,
        e.maxY = e.minY + i
    }
    containsPoint(e) {
        const r = this._width
          , n = this._height
          , i = -r * this._anchor._x;
        let o = 0;
        return e.x >= i && e.x <= i + r && (o = -n * this._anchor._y,
        e.y >= o && e.y <= o + n)
    }
    destroy(e=!1) {
        if (super.destroy(e),
        this._anchor = null,
        this._tileTransform = null,
        this._bounds = null,
        typeof e == "boolean" ? e : e == null ? void 0 : e.texture) {
            const n = typeof e == "boolean" ? e : e == null ? void 0 : e.textureSource;
            this._texture.destroy(n)
        }
        this._texture = null
    }
}
;
mI.defaultOptions = {
    texture: Be.EMPTY,
    anchor: {
        x: 0,
        y: 0
    },
    tilePosition: {
        x: 0,
        y: 0
    },
    tileScale: {
        x: 1,
        y: 1
    },
    tileRotation: 0,
    applyAnchorToTexture: !1
};
let s5e = mI;
class nfe extends ad {
    constructor(e, r) {
        const {text: n, resolution: i, style: o, anchor: s, width: a, height: l, roundPixels: c, ...u} = e;
        super({
            ...u
        }),
        this.batched = !0,
        this._resolution = null,
        this._autoResolution = !0,
        this._didTextUpdate = !0,
        this._styleClass = r,
        this.text = n ?? "",
        this.style = o,
        this.resolution = i ?? null,
        this.allowChildren = !1,
        this._anchor = new Jt({
            _onUpdate: () => {
                this.onViewUpdate()
            }
        }),
        s && (this.anchor = s),
        this.roundPixels = c ?? !1,
        a !== void 0 && (this.width = a),
        l !== void 0 && (this.height = l)
    }
    get anchor() {
        return this._anchor
    }
    set anchor(e) {
        typeof e == "number" ? this._anchor.set(e) : this._anchor.copyFrom(e)
    }
    set text(e) {
        e = e.toString(),
        this._text !== e && (this._text = e,
        this.onViewUpdate())
    }
    get text() {
        return this._text
    }
    set resolution(e) {
        this._autoResolution = e === null,
        this._resolution = e,
        this.onViewUpdate()
    }
    get resolution() {
        return this._resolution
    }
    get style() {
        return this._style
    }
    set style(e) {
        var r;
        e || (e = {}),
        (r = this._style) == null || r.off("update", this.onViewUpdate, this),
        e instanceof this._styleClass ? this._style = e : this._style = new this._styleClass(e),
        this._style.on("update", this.onViewUpdate, this),
        this.onViewUpdate()
    }
    get width() {
        return Math.abs(this.scale.x) * this.bounds.width
    }
    set width(e) {
        this._setWidth(e, this.bounds.width)
    }
    get height() {
        return Math.abs(this.scale.y) * this.bounds.height
    }
    set height(e) {
        this._setHeight(e, this.bounds.height)
    }
    getSize(e) {
        return e || (e = {}),
        e.width = Math.abs(this.scale.x) * this.bounds.width,
        e.height = Math.abs(this.scale.y) * this.bounds.height,
        e
    }
    setSize(e, r) {
        typeof e == "object" ? (r = e.height ?? e.width,
        e = e.width) : r ?? (r = e),
        e !== void 0 && this._setWidth(e, this.bounds.width),
        r !== void 0 && this._setHeight(r, this.bounds.height)
    }
    containsPoint(e) {
        const r = this.bounds.width
          , n = this.bounds.height
          , i = -r * this.anchor.x;
        let o = 0;
        return e.x >= i && e.x <= i + r && (o = -n * this.anchor.y,
        e.y >= o && e.y <= o + n)
    }
    onViewUpdate() {
        this.didViewUpdate || (this._didTextUpdate = !0),
        super.onViewUpdate()
    }
    destroy(e=!1) {
        super.destroy(e),
        this.owner = null,
        this._bounds = null,
        this._anchor = null,
        (typeof e == "boolean" ? e : e != null && e.style) && this._style.destroy(e),
        this._style = null,
        this._text = null
    }
    get styleKey() {
        return `${this._text}:${this._style.styleKey}:${this._resolution}`
    }
}
function ife(t, e) {
    let r = t[0] ?? {};
    return (typeof r == "string" || t[1]) && (Re(tt, `use new ${e}({ text: "hi!", style }) instead`),
    r = {
        text: r,
        style: t[1]
    }),
    r
}
let Oa = null
  , Ko = null;
function ofe(t, e) {
    Oa || (Oa = je.get().createCanvas(256, 128),
    Ko = Oa.getContext("2d", {
        willReadFrequently: !0
    }),
    Ko.globalCompositeOperation = "copy",
    Ko.globalAlpha = 1),
    (Oa.width < t || Oa.height < e) && (Oa.width = ou(t),
    Oa.height = ou(e))
}
function w3(t, e, r) {
    for (let n = 0, i = 4 * r * e; n < e; ++n,
    i += 4)
        if (t[i + 3] !== 0)
            return !1;
    return !0
}
function B3(t, e, r, n, i) {
    const o = 4 * e;
    for (let s = n, a = n * o + 4 * r; s <= i; ++s,
    a += o)
        if (t[a + 3] !== 0)
            return !1;
    return !0
}
function sfe(...t) {
    let e = t[0];
    e.canvas || (e = {
        canvas: t[0],
        resolution: t[1]
    });
    const {canvas: r} = e
      , n = Math.min(e.resolution ?? 1, 1)
      , i = e.width ?? r.width
      , o = e.height ?? r.height;
    let s = e.output;
    if (ofe(i, o),
    !Ko)
        throw new TypeError("Failed to get canvas 2D context");
    Ko.drawImage(r, 0, 0, i, o, 0, 0, i * n, o * n);
    const l = Ko.getImageData(0, 0, i, o).data;
    let c = 0
      , u = 0
      , f = i - 1
      , d = o - 1;
    for (; u < o && w3(l, i, u); )
        ++u;
    if (u === o)
        return mt.EMPTY;
    for (; w3(l, i, d); )
        --d;
    for (; B3(l, i, c, u, d); )
        ++c;
    for (; B3(l, i, f, u, d); )
        --f;
    return ++f,
    ++d,
    Ko.globalCompositeOperation = "source-over",
    Ko.strokeRect(c, u, f - c, d - u),
    Ko.globalCompositeOperation = "copy",
    s ?? (s = new mt),
    s.set(c / n, u / n, (f - c) / n, (d - u) / n),
    s
}
const S3 = new mt;
class afe {
    getCanvasAndContext(e) {
        const {text: r, style: n, resolution: i=1} = e
          , o = n._getFinalPadding()
          , s = Ii.measureText(r || " ", n)
          , a = Math.ceil(Math.ceil(Math.max(1, s.width) + o * 2) * i)
          , l = Math.ceil(Math.ceil(Math.max(1, s.height) + o * 2) * i)
          , c = ms.getOptimalCanvasAndContext(a, l);
        this._renderTextToCanvas(r, n, o, i, c);
        const u = n.trim ? sfe({
            canvas: c.canvas,
            width: a,
            height: l,
            resolution: 1,
            output: S3
        }) : S3.set(0, 0, a, l);
        return {
            canvasAndContext: c,
            frame: u
        }
    }
    returnCanvasAndContext(e) {
        ms.returnCanvasAndContext(e)
    }
    _renderTextToCanvas(e, r, n, i, o) {
        var p, v, _, b;
        const {canvas: s, context: a} = o
          , l = Ux(r)
          , c = Ii.measureText(e || " ", r)
          , u = c.lines
          , f = c.lineHeight
          , d = c.lineWidths
          , h = c.maxLineWidth
          , x = c.fontProperties
          , y = s.height;
        if (a.resetTransform(),
        a.scale(i, i),
        a.textBaseline = r.textBaseline,
        (p = r._stroke) != null && p.width) {
            const C = r._stroke;
            a.lineWidth = C.width,
            a.miterLimit = C.miterLimit,
            a.lineJoin = C.join,
            a.lineCap = C.cap
        }
        a.font = l;
        let m, E;
        const g = r.dropShadow ? 2 : 1;
        for (let C = 0; C < g; ++C) {
            const w = r.dropShadow && C === 0
              , T = w ? Math.ceil(Math.max(1, y) + n * 2) : 0
              , A = T * i;
            if (w) {
                a.fillStyle = "black",
                a.strokeStyle = "black";
                const D = r.dropShadow
                  , F = D.color
                  , R = D.alpha;
                a.shadowColor = Ut.shared.setValue(F).setAlpha(R).toRgbaString();
                const P = D.blur * i
                  , N = D.distance * i;
                a.shadowBlur = P,
                a.shadowOffsetX = Math.cos(D.angle) * N,
                a.shadowOffsetY = Math.sin(D.angle) * N + A
            } else {
                if (a.fillStyle = r._fill ? Vx(r._fill, a, c, n * 2) : null,
                (v = r._stroke) != null && v.width) {
                    const D = r._stroke.width * .5 + n * 2;
                    a.strokeStyle = Vx(r._stroke, a, c, D)
                }
                a.shadowColor = "black"
            }
            let B = (f - x.fontSize) / 2;
            f - x.fontSize < 0 && (B = 0);
            const S = ((_ = r._stroke) == null ? void 0 : _.width) ?? 0;
            for (let D = 0; D < u.length; D++)
                m = S / 2,
                E = S / 2 + D * f + x.ascent + B,
                r.align === "right" ? m += h - d[D] : r.align === "center" && (m += (h - d[D]) / 2),
                (b = r._stroke) != null && b.width && this._drawLetterSpacing(u[D], r, o, m + n, E + n - T, !0),
                r._fill !== void 0 && this._drawLetterSpacing(u[D], r, o, m + n, E + n - T)
        }
    }
    _drawLetterSpacing(e, r, n, i, o, s=!1) {
        const {context: a} = n
          , l = r.letterSpacing;
        let c = !1;
        if (Ii.experimentalLetterSpacingSupported && (Ii.experimentalLetterSpacing ? (a.letterSpacing = `${l}px`,
        a.textLetterSpacing = `${l}px`,
        c = !0) : (a.letterSpacing = "0px",
        a.textLetterSpacing = "0px")),
        l === 0 || c) {
            s ? a.strokeText(e, i, o) : a.fillText(e, i, o);
            return
        }
        let u = i;
        const f = Ii.graphemeSegmenter(e);
        let d = a.measureText(e).width
          , h = 0;
        for (let x = 0; x < f.length; ++x) {
            const y = f[x];
            s ? a.strokeText(y, u, o) : a.fillText(y, u, o);
            let m = "";
            for (let E = x + 1; E < f.length; ++E)
                m += f[E];
            h = a.measureText(m).width,
            u += d - h + l,
            d = h
        }
    }
}
const W0 = new afe;
class a5e extends nfe {
    constructor(...e) {
        const r = ife(e, "Text");
        super(r, Tl),
        this.renderPipeId = "text",
        r.textureStyle && (this.textureStyle = r.textureStyle instanceof wo ? r.textureStyle : new wo(r.textureStyle))
    }
    updateBounds() {
        const e = this._bounds
          , r = this._anchor;
        let n = 0
          , i = 0;
        if (this._style.trim) {
            const {frame: o, canvasAndContext: s} = W0.getCanvasAndContext({
                text: this.text,
                style: this._style,
                resolution: 1
            });
            W0.returnCanvasAndContext(s),
            n = o.width,
            i = o.height
        } else {
            const o = Ii.measureText(this._text, this._style);
            n = o.width,
            i = o.height
        }
        e.minX = -r._x * n,
        e.maxX = e.minX + n,
        e.minY = -r._y * i,
        e.maxY = e.minY + i
    }
}
const T3 = "http://www.w3.org/2000/svg"
  , D3 = "http://www.w3.org/1999/xhtml";
class vI {
    constructor() {
        this.svgRoot = document.createElementNS(T3, "svg"),
        this.foreignObject = document.createElementNS(T3, "foreignObject"),
        this.domElement = document.createElementNS(D3, "div"),
        this.styleElement = document.createElementNS(D3, "style");
        const {foreignObject: e, svgRoot: r, styleElement: n, domElement: i} = this;
        e.setAttribute("width", "10000"),
        e.setAttribute("height", "10000"),
        e.style.overflow = "hidden",
        r.appendChild(e),
        e.appendChild(n),
        e.appendChild(i),
        this.image = je.get().createImage()
    }
    destroy() {
        this.svgRoot.remove(),
        this.foreignObject.remove(),
        this.styleElement.remove(),
        this.domElement.remove(),
        this.image.src = "",
        this.image.remove(),
        this.svgRoot = null,
        this.foreignObject = null,
        this.styleElement = null,
        this.domElement = null,
        this.image = null,
        this.canvasAndContext = null
    }
}
let F3;
function lfe(t, e, r, n) {
    n || (n = F3 || (F3 = new vI));
    const {domElement: i, styleElement: o, svgRoot: s} = n;
    i.innerHTML = `<style>${e.cssStyle};</style><div style='padding:0'>${t}</div>`,
    i.setAttribute("style", "transform-origin: top left; display: inline-block"),
    r && (o.textContent = r),
    document.body.appendChild(s);
    const a = i.getBoundingClientRect();
    s.remove();
    const l = e.padding * 2;
    return {
        width: a.width - l,
        height: a.height - l
    }
}
class yI {
    constructor() {
        this._tempState = Hi.for2d(),
        this._didUploadHash = {}
    }
    init(e) {
        e.renderer.runners.contextChange.add(this)
    }
    contextChange() {
        this._didUploadHash = {}
    }
    start(e, r, n) {
        const i = e.renderer
          , o = this._didUploadHash[n.uid];
        i.shader.bind(n, o),
        o || (this._didUploadHash[n.uid] = !0),
        i.shader.updateUniformGroup(i.globalUniforms.uniformGroup),
        i.geometry.bind(r, n.glProgram)
    }
    execute(e, r) {
        const n = e.renderer;
        this._tempState.blendMode = r.blendMode,
        n.state.set(this._tempState);
        const i = r.textures.textures;
        for (let o = 0; o < r.textures.count; o++)
            n.texture.bind(i[o], o);
        n.geometry.draw(r.topology, r.size, r.start)
    }
}
yI.extension = {
    type: [X.WebGLPipesAdaptor],
    name: "batch"
};
const Ch = Hi.for2d();
class EI {
    start(e, r, n) {
        const i = e.renderer
          , o = i.encoder
          , s = n.gpuProgram;
        this._shader = n,
        this._geometry = r,
        o.setGeometry(r, s),
        Ch.blendMode = "normal",
        i.pipeline.getPipeline(r, s, Ch);
        const a = i.globalUniforms.bindGroup;
        o.resetBindGroup(1),
        o.setBindGroup(0, a, s)
    }
    execute(e, r) {
        const n = this._shader.gpuProgram
          , i = e.renderer
          , o = i.encoder;
        if (!r.bindGroup) {
            const l = r.textures;
            r.bindGroup = Eb(l.textures, l.count, i.limits.maxBatchableTextures)
        }
        Ch.blendMode = r.blendMode;
        const s = i.bindGroup.getBindGroup(r.bindGroup, n, 1)
          , a = i.pipeline.getPipeline(this._geometry, n, Ch, r.topology);
        r.bindGroup._touch(i.textureGC.count),
        o.setPipeline(a),
        o.renderPassEncoder.setBindGroup(1, s),
        o.renderPassEncoder.drawIndexed(r.size, 1, r.start)
    }
}
EI.extension = {
    type: [X.WebGPUPipesAdaptor],
    name: "batch"
};
const Mb = class _I {
    constructor(e, r) {
        var n, i;
        this.state = Hi.for2d(),
        this._batchersByInstructionSet = Object.create(null),
        this._activeBatches = Object.create(null),
        this.renderer = e,
        this._adaptor = r,
        (i = (n = this._adaptor).init) == null || i.call(n, this)
    }
    static getBatcher(e) {
        return new this._availableBatchers[e]
    }
    buildStart(e) {
        let r = this._batchersByInstructionSet[e.uid];
        r || (r = this._batchersByInstructionSet[e.uid] = Object.create(null),
        r.default || (r.default = new Bb({
            maxTextures: this.renderer.limits.maxBatchableTextures
        }))),
        this._activeBatches = r,
        this._activeBatch = this._activeBatches.default;
        for (const n in this._activeBatches)
            this._activeBatches[n].begin()
    }
    addToBatch(e, r) {
        if (this._activeBatch.name !== e.batcherName) {
            this._activeBatch.break(r);
            let n = this._activeBatches[e.batcherName];
            n || (n = this._activeBatches[e.batcherName] = _I.getBatcher(e.batcherName),
            n.begin()),
            this._activeBatch = n
        }
        this._activeBatch.add(e)
    }
    break(e) {
        this._activeBatch.break(e)
    }
    buildEnd(e) {
        this._activeBatch.break(e);
        const r = this._activeBatches;
        for (const n in r) {
            const i = r[n]
              , o = i.geometry;
            o.indexBuffer.setDataWithSize(i.indexBuffer, i.indexSize, !0),
            o.buffers[0].setDataWithSize(i.attributeBuffer.float32View, i.attributeSize, !1)
        }
    }
    upload(e) {
        const r = this._batchersByInstructionSet[e.uid];
        for (const n in r) {
            const i = r[n]
              , o = i.geometry;
            i.dirty && (i.dirty = !1,
            o.buffers[0].update(i.attributeSize * 4))
        }
    }
    execute(e) {
        if (e.action === "startBatch") {
            const r = e.batcher
              , n = r.geometry
              , i = r.shader;
            this._adaptor.start(this, n, i)
        }
        this._adaptor.execute(this, e)
    }
    destroy() {
        this.state = null,
        this.renderer = null,
        this._adaptor = null;
        for (const e in this._activeBatches)
            this._activeBatches[e].destroy();
        this._activeBatches = null
    }
}
;
Mb.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "batch"
};
Mb._availableBatchers = Object.create(null);
let bI = Mb;
$e.handleByMap(X.Batcher, bI._availableBatchers);
$e.add(Bb);
const Y0 = {
    name: "local-uniform-bit",
    vertex: {
        header: `

            struct LocalUniforms {
                uTransformMatrix:mat3x3<f32>,
                uColor:vec4<f32>,
                uRound:f32,
            }

            @group(1) @binding(0) var<uniform> localUniforms : LocalUniforms;
        `,
        main: `
            vColor *= localUniforms.uColor;
            modelMatrix *= localUniforms.uTransformMatrix;
        `,
        end: `
            if(localUniforms.uRound == 1)
            {
                vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
            }
        `
    }
}
  , cfe = {
    ...Y0,
    vertex: {
        ...Y0.vertex,
        header: Y0.vertex.header.replace("group(1)", "group(2)")
    }
}
  , Nb = {
    name: "local-uniform-bit",
    vertex: {
        header: `

            uniform mat3 uTransformMatrix;
            uniform vec4 uColor;
            uniform float uRound;
        `,
        main: `
            vColor *= uColor;
            modelMatrix = uTransformMatrix;
        `,
        end: `
            if(uRound == 1.)
            {
                gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
            }
        `
    }
}
  , ufe = {
    name: "texture-bit",
    vertex: {
        header: `

        struct TextureUniforms {
            uTextureMatrix:mat3x3<f32>,
        }

        @group(2) @binding(2) var<uniform> textureUniforms : TextureUniforms;
        `,
        main: `
            uv = (textureUniforms.uTextureMatrix * vec3(uv, 1.0)).xy;
        `
    },
    fragment: {
        header: `
            @group(2) @binding(0) var uTexture: texture_2d<f32>;
            @group(2) @binding(1) var uSampler: sampler;


        `,
        main: `
            outColor = textureSample(uTexture, uSampler, vUV);
        `
    }
}
  , ffe = {
    name: "texture-bit",
    vertex: {
        header: `
            uniform mat3 uTextureMatrix;
        `,
        main: `
            uv = (uTextureMatrix * vec3(uv, 1.0)).xy;
        `
    },
    fragment: {
        header: `
        uniform sampler2D uTexture;


        `,
        main: `
            outColor = texture(uTexture, vUV);
        `
    }
}
  , dfe = new jr;
class hfe extends Rx {
    constructor() {
        super(),
        this.filters = [new tfe({
            sprite: new Al(Be.EMPTY),
            inverse: !1,
            resolution: "inherit",
            antialias: "inherit"
        })]
    }
    get sprite() {
        return this.filters[0].sprite
    }
    set sprite(e) {
        this.filters[0].sprite = e
    }
    get inverse() {
        return this.filters[0].inverse
    }
    set inverse(e) {
        this.filters[0].inverse = e
    }
}
class CI {
    constructor(e) {
        this._activeMaskStage = [],
        this._renderer = e
    }
    push(e, r, n) {
        const i = this._renderer;
        if (i.renderPipes.batch.break(n),
        n.add({
            renderPipeId: "alphaMask",
            action: "pushMaskBegin",
            mask: e,
            inverse: r._maskOptions.inverse,
            canBundle: !1,
            maskedContainer: r
        }),
        e.inverse = r._maskOptions.inverse,
        e.renderMaskToTexture) {
            const o = e.mask;
            o.includeInBuild = !0,
            o.collectRenderables(n, i, null),
            o.includeInBuild = !1
        }
        i.renderPipes.batch.break(n),
        n.add({
            renderPipeId: "alphaMask",
            action: "pushMaskEnd",
            mask: e,
            maskedContainer: r,
            inverse: r._maskOptions.inverse,
            canBundle: !1
        })
    }
    pop(e, r, n) {
        this._renderer.renderPipes.batch.break(n),
        n.add({
            renderPipeId: "alphaMask",
            action: "popMaskEnd",
            mask: e,
            inverse: r._maskOptions.inverse,
            canBundle: !1
        })
    }
    execute(e) {
        const r = this._renderer
          , n = e.mask.renderMaskToTexture;
        if (e.action === "pushMaskBegin") {
            const i = xr.get(hfe);
            if (i.inverse = e.inverse,
            n) {
                e.mask.mask.measurable = !0;
                const o = fb(e.mask.mask, !0, dfe);
                e.mask.mask.measurable = !1,
                o.ceil();
                const s = r.renderTarget.renderTarget.colorTexture.source
                  , a = sr.getOptimalTexture(o.width, o.height, s._resolution, s.antialias);
                r.renderTarget.push(a, !0),
                r.globalUniforms.push({
                    offset: o,
                    worldColor: 4294967295
                });
                const l = i.sprite;
                l.texture = a,
                l.worldTransform.tx = o.minX,
                l.worldTransform.ty = o.minY,
                this._activeMaskStage.push({
                    filterEffect: i,
                    maskedContainer: e.maskedContainer,
                    filterTexture: a
                })
            } else
                i.sprite = e.mask.mask,
                this._activeMaskStage.push({
                    filterEffect: i,
                    maskedContainer: e.maskedContainer
                })
        } else if (e.action === "pushMaskEnd") {
            const i = this._activeMaskStage[this._activeMaskStage.length - 1];
            n && (r.type === qn.WEBGL && r.renderTarget.finishRenderPass(),
            r.renderTarget.pop(),
            r.globalUniforms.pop()),
            r.filter.push({
                renderPipeId: "filter",
                action: "pushFilter",
                container: i.maskedContainer,
                filterEffect: i.filterEffect,
                canBundle: !1
            })
        } else if (e.action === "popMaskEnd") {
            r.filter.pop();
            const i = this._activeMaskStage.pop();
            n && sr.returnTexture(i.filterTexture),
            xr.return(i.filterEffect)
        }
    }
    destroy() {
        this._renderer = null,
        this._activeMaskStage = null
    }
}
CI.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "alphaMask"
};
class AI {
    constructor(e) {
        this._colorStack = [],
        this._colorStackIndex = 0,
        this._currentColor = 0,
        this._renderer = e
    }
    buildStart() {
        this._colorStack[0] = 15,
        this._colorStackIndex = 1,
        this._currentColor = 15
    }
    push(e, r, n) {
        this._renderer.renderPipes.batch.break(n);
        const o = this._colorStack;
        o[this._colorStackIndex] = o[this._colorStackIndex - 1] & e.mask;
        const s = this._colorStack[this._colorStackIndex];
        s !== this._currentColor && (this._currentColor = s,
        n.add({
            renderPipeId: "colorMask",
            colorMask: s,
            canBundle: !1
        })),
        this._colorStackIndex++
    }
    pop(e, r, n) {
        this._renderer.renderPipes.batch.break(n);
        const o = this._colorStack;
        this._colorStackIndex--;
        const s = o[this._colorStackIndex - 1];
        s !== this._currentColor && (this._currentColor = s,
        n.add({
            renderPipeId: "colorMask",
            colorMask: s,
            canBundle: !1
        }))
    }
    execute(e) {
        this._renderer.colorMask.setMask(e.colorMask)
    }
    destroy() {
        this._renderer = null,
        this._colorStack = null
    }
}
AI.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "colorMask"
};
class wI {
    constructor(e) {
        this._maskStackHash = {},
        this._maskHash = new WeakMap,
        this._renderer = e
    }
    push(e, r, n) {
        var i;
        const o = e
          , s = this._renderer;
        s.renderPipes.batch.break(n),
        s.renderPipes.blendMode.setBlendMode(o.mask, "none", n),
        n.add({
            renderPipeId: "stencilMask",
            action: "pushMaskBegin",
            mask: e,
            inverse: r._maskOptions.inverse,
            canBundle: !1
        });
        const a = o.mask;
        a.includeInBuild = !0,
        this._maskHash.has(o) || this._maskHash.set(o, {
            instructionsStart: 0,
            instructionsLength: 0
        });
        const l = this._maskHash.get(o);
        l.instructionsStart = n.instructionSize,
        a.collectRenderables(n, s, null),
        a.includeInBuild = !1,
        s.renderPipes.batch.break(n),
        n.add({
            renderPipeId: "stencilMask",
            action: "pushMaskEnd",
            mask: e,
            inverse: r._maskOptions.inverse,
            canBundle: !1
        });
        const c = n.instructionSize - l.instructionsStart - 1;
        l.instructionsLength = c;
        const u = s.renderTarget.renderTarget.uid;
        (i = this._maskStackHash)[u] ?? (i[u] = 0)
    }
    pop(e, r, n) {
        const i = e
          , o = this._renderer;
        o.renderPipes.batch.break(n),
        o.renderPipes.blendMode.setBlendMode(i.mask, "none", n),
        n.add({
            renderPipeId: "stencilMask",
            action: "popMaskBegin",
            inverse: r._maskOptions.inverse,
            canBundle: !1
        });
        const s = this._maskHash.get(e);
        for (let a = 0; a < s.instructionsLength; a++)
            n.instructions[n.instructionSize++] = n.instructions[s.instructionsStart++];
        n.add({
            renderPipeId: "stencilMask",
            action: "popMaskEnd",
            canBundle: !1
        })
    }
    execute(e) {
        var r;
        const n = this._renderer
          , i = n.renderTarget.renderTarget.uid;
        let o = (r = this._maskStackHash)[i] ?? (r[i] = 0);
        e.action === "pushMaskBegin" ? (n.renderTarget.ensureDepthStencil(),
        n.stencil.setStencilMode(ar.RENDERING_MASK_ADD, o),
        o++,
        n.colorMask.setMask(0)) : e.action === "pushMaskEnd" ? (e.inverse ? n.stencil.setStencilMode(ar.INVERSE_MASK_ACTIVE, o) : n.stencil.setStencilMode(ar.MASK_ACTIVE, o),
        n.colorMask.setMask(15)) : e.action === "popMaskBegin" ? (n.colorMask.setMask(0),
        o !== 0 ? n.stencil.setStencilMode(ar.RENDERING_MASK_REMOVE, o) : (n.renderTarget.clear(null, Vn.STENCIL),
        n.stencil.setStencilMode(ar.DISABLED, o)),
        o--) : e.action === "popMaskEnd" && (e.inverse ? n.stencil.setStencilMode(ar.INVERSE_MASK_ACTIVE, o) : n.stencil.setStencilMode(ar.MASK_ACTIVE, o),
        n.colorMask.setMask(15)),
        this._maskStackHash[i] = o
    }
    destroy() {
        this._renderer = null,
        this._maskStackHash = null,
        this._maskHash = null
    }
}
wI.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "stencilMask"
};
var Jh = (t => (t[t.ELEMENT_ARRAY_BUFFER = 34963] = "ELEMENT_ARRAY_BUFFER",
t[t.ARRAY_BUFFER = 34962] = "ARRAY_BUFFER",
t[t.UNIFORM_BUFFER = 35345] = "UNIFORM_BUFFER",
t))(Jh || {});
class xfe {
    constructor(e, r) {
        this._lastBindBaseLocation = -1,
        this._lastBindCallId = -1,
        this.buffer = e || null,
        this.updateID = -1,
        this.byteLength = -1,
        this.type = r
    }
}
class BI {
    constructor(e) {
        this._gpuBuffers = Object.create(null),
        this._boundBufferBases = Object.create(null),
        this._minBaseLocation = 0,
        this._nextBindBaseIndex = this._minBaseLocation,
        this._bindCallId = 0,
        this._renderer = e,
        this._renderer.renderableGC.addManagedHash(this, "_gpuBuffers")
    }
    destroy() {
        this.destroyAll(),
        this._renderer = null,
        this._gl = null,
        this._gpuBuffers = {},
        this._boundBufferBases = {}
    }
    contextChange() {
        this._gl = this._renderer.gl,
        this._gpuBuffers = Object.create(null),
        this._maxBindings = this._renderer.limits.maxUniformBindings
    }
    getGlBuffer(e) {
        return this._gpuBuffers[e.uid] || this.createGLBuffer(e)
    }
    bind(e) {
        const {_gl: r} = this
          , n = this.getGlBuffer(e);
        r.bindBuffer(n.type, n.buffer)
    }
    bindBufferBase(e, r) {
        const {_gl: n} = this;
        this._boundBufferBases[r] !== e && (this._boundBufferBases[r] = e,
        e._lastBindBaseLocation = r,
        n.bindBufferBase(n.UNIFORM_BUFFER, r, e.buffer))
    }
    nextBindBase(e) {
        this._bindCallId++,
        this._minBaseLocation = 0,
        e && (this._boundBufferBases[0] = null,
        this._minBaseLocation = 1,
        this._nextBindBaseIndex < 1 && (this._nextBindBaseIndex = 1))
    }
    freeLocationForBufferBase(e) {
        let r = this.getLastBindBaseLocation(e);
        if (r >= this._minBaseLocation)
            return e._lastBindCallId = this._bindCallId,
            r;
        let n = 0
          , i = this._nextBindBaseIndex;
        for (; n < 2; ) {
            i >= this._maxBindings && (i = this._minBaseLocation,
            n++);
            const o = this._boundBufferBases[i];
            if (o && o._lastBindCallId === this._bindCallId) {
                i++;
                continue
            }
            break
        }
        return r = i,
        this._nextBindBaseIndex = i + 1,
        n >= 2 ? -1 : (e._lastBindCallId = this._bindCallId,
        this._boundBufferBases[r] = null,
        r)
    }
    getLastBindBaseLocation(e) {
        const r = e._lastBindBaseLocation;
        return this._boundBufferBases[r] === e ? r : -1
    }
    bindBufferRange(e, r, n, i) {
        const {_gl: o} = this;
        n || (n = 0),
        r || (r = 0),
        this._boundBufferBases[r] = null,
        o.bindBufferRange(o.UNIFORM_BUFFER, r || 0, e.buffer, n * 256, i || 256)
    }
    updateBuffer(e) {
        const {_gl: r} = this
          , n = this.getGlBuffer(e);
        if (e._updateID === n.updateID)
            return n;
        n.updateID = e._updateID,
        r.bindBuffer(n.type, n.buffer);
        const i = e.data
          , o = e.descriptor.usage & it.STATIC ? r.STATIC_DRAW : r.DYNAMIC_DRAW;
        return i ? n.byteLength >= i.byteLength ? r.bufferSubData(n.type, 0, i, 0, e._updateSize / i.BYTES_PER_ELEMENT) : (n.byteLength = i.byteLength,
        r.bufferData(n.type, i, o)) : (n.byteLength = e.descriptor.size,
        r.bufferData(n.type, n.byteLength, o)),
        n
    }
    destroyAll() {
        const e = this._gl;
        for (const r in this._gpuBuffers)
            this._gpuBuffers[r] && e.deleteBuffer(this._gpuBuffers[r].buffer);
        this._gpuBuffers = Object.create(null)
    }
    onBufferDestroy(e, r) {
        if (!this._gpuBuffers[e.uid])
            return;
        const n = this._gpuBuffers[e.uid]
          , i = this._gl;
        r || i.deleteBuffer(n.buffer),
        e.off("destroy", this.onBufferDestroy, this),
        this._gpuBuffers[e.uid] = null
    }
    createGLBuffer(e) {
        const {_gl: r} = this;
        let n = Jh.ARRAY_BUFFER;
        e.descriptor.usage & it.INDEX ? n = Jh.ELEMENT_ARRAY_BUFFER : e.descriptor.usage & it.UNIFORM && (n = Jh.UNIFORM_BUFFER);
        const i = new xfe(r.createBuffer(),n);
        return this._gpuBuffers[e.uid] = i,
        e.on("destroy", this.onBufferDestroy, this),
        i
    }
    resetState() {
        this._boundBufferBases = Object.create(null)
    }
}
BI.extension = {
    type: [X.WebGLSystem],
    name: "buffer"
};
const Lb = class SI {
    constructor(e) {
        this.supports = {
            uint32Indices: !0,
            uniformBufferObject: !0,
            vertexArrayObject: !0,
            srgbTextures: !0,
            nonPowOf2wrapping: !0,
            msaa: !0,
            nonPowOf2mipmaps: !0
        },
        this._renderer = e,
        this.extensions = Object.create(null),
        this.handleContextLost = this.handleContextLost.bind(this),
        this.handleContextRestored = this.handleContextRestored.bind(this)
    }
    get isLost() {
        return !this.gl || this.gl.isContextLost()
    }
    contextChange(e) {
        this.gl = e,
        this._renderer.gl = e
    }
    init(e) {
        e = {
            ...SI.defaultOptions,
            ...e
        };
        let r = this.multiView = e.multiView;
        if (e.context && r && (Ne("Renderer created with both a context and multiview enabled. Disabling multiView as both cannot work together."),
        r = !1),
        r ? this.canvas = je.get().createCanvas(this._renderer.canvas.width, this._renderer.canvas.height) : this.canvas = this._renderer.view.canvas,
        e.context)
            this.initFromContext(e.context);
        else {
            const n = this._renderer.background.alpha < 1
              , i = e.premultipliedAlpha ?? !0
              , o = e.antialias && !this._renderer.backBuffer.useBackBuffer;
            this.createContext(e.preferWebGLVersion, {
                alpha: n,
                premultipliedAlpha: i,
                antialias: o,
                stencil: !0,
                preserveDrawingBuffer: e.preserveDrawingBuffer,
                powerPreference: e.powerPreference ?? "default"
            })
        }
    }
    ensureCanvasSize(e) {
        if (!this.multiView) {
            e !== this.canvas && Ne("multiView is disabled, but targetCanvas is not the main canvas");
            return
        }
        const {canvas: r} = this;
        (r.width < e.width || r.height < e.height) && (r.width = Math.max(e.width, e.width),
        r.height = Math.max(e.height, e.height))
    }
    initFromContext(e) {
        this.gl = e,
        this.webGLVersion = e instanceof je.get().getWebGLRenderingContext() ? 1 : 2,
        this.getExtensions(),
        this.validateContext(e),
        this._renderer.runners.contextChange.emit(e);
        const r = this._renderer.view.canvas;
        r.addEventListener("webglcontextlost", this.handleContextLost, !1),
        r.addEventListener("webglcontextrestored", this.handleContextRestored, !1)
    }
    createContext(e, r) {
        let n;
        const i = this.canvas;
        if (e === 2 && (n = i.getContext("webgl2", r)),
        !n && (n = i.getContext("webgl", r),
        !n))
            throw new Error("This browser does not support WebGL. Try using the canvas renderer");
        this.gl = n,
        this.initFromContext(this.gl)
    }
    getExtensions() {
        const {gl: e} = this
          , r = {
            anisotropicFiltering: e.getExtension("EXT_texture_filter_anisotropic"),
            floatTextureLinear: e.getExtension("OES_texture_float_linear"),
            s3tc: e.getExtension("WEBGL_compressed_texture_s3tc"),
            s3tc_sRGB: e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),
            etc: e.getExtension("WEBGL_compressed_texture_etc"),
            etc1: e.getExtension("WEBGL_compressed_texture_etc1"),
            pvrtc: e.getExtension("WEBGL_compressed_texture_pvrtc") || e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),
            atc: e.getExtension("WEBGL_compressed_texture_atc"),
            astc: e.getExtension("WEBGL_compressed_texture_astc"),
            bptc: e.getExtension("EXT_texture_compression_bptc"),
            rgtc: e.getExtension("EXT_texture_compression_rgtc"),
            loseContext: e.getExtension("WEBGL_lose_context")
        };
        if (this.webGLVersion === 1)
            this.extensions = {
                ...r,
                drawBuffers: e.getExtension("WEBGL_draw_buffers"),
                depthTexture: e.getExtension("WEBGL_depth_texture"),
                vertexArrayObject: e.getExtension("OES_vertex_array_object") || e.getExtension("MOZ_OES_vertex_array_object") || e.getExtension("WEBKIT_OES_vertex_array_object"),
                uint32ElementIndex: e.getExtension("OES_element_index_uint"),
                floatTexture: e.getExtension("OES_texture_float"),
                floatTextureLinear: e.getExtension("OES_texture_float_linear"),
                textureHalfFloat: e.getExtension("OES_texture_half_float"),
                textureHalfFloatLinear: e.getExtension("OES_texture_half_float_linear"),
                vertexAttribDivisorANGLE: e.getExtension("ANGLE_instanced_arrays"),
                srgb: e.getExtension("EXT_sRGB")
            };
        else {
            this.extensions = {
                ...r,
                colorBufferFloat: e.getExtension("EXT_color_buffer_float")
            };
            const n = e.getExtension("WEBGL_provoking_vertex");
            n && n.provokingVertexWEBGL(n.FIRST_VERTEX_CONVENTION_WEBGL)
        }
    }
    handleContextLost(e) {
        e.preventDefault(),
        this._contextLossForced && (this._contextLossForced = !1,
        setTimeout( () => {
            var r;
            this.gl.isContextLost() && ((r = this.extensions.loseContext) == null || r.restoreContext())
        }
        , 0))
    }
    handleContextRestored() {
        this.getExtensions(),
        this._renderer.runners.contextChange.emit(this.gl)
    }
    destroy() {
        var r;
        const e = this._renderer.view.canvas;
        this._renderer = null,
        e.removeEventListener("webglcontextlost", this.handleContextLost),
        e.removeEventListener("webglcontextrestored", this.handleContextRestored),
        this.gl.useProgram(null),
        (r = this.extensions.loseContext) == null || r.loseContext()
    }
    forceContextLoss() {
        var e;
        (e = this.extensions.loseContext) == null || e.loseContext(),
        this._contextLossForced = !0
    }
    validateContext(e) {
        const r = e.getContextAttributes();
        r && !r.stencil && Ne("Provided WebGL context does not have a stencil buffer, masks may not render correctly");
        const n = this.supports
          , i = this.webGLVersion === 2
          , o = this.extensions;
        n.uint32Indices = i || !!o.uint32ElementIndex,
        n.uniformBufferObject = i,
        n.vertexArrayObject = i || !!o.vertexArrayObject,
        n.srgbTextures = i || !!o.srgb,
        n.nonPowOf2wrapping = i,
        n.nonPowOf2mipmaps = i,
        n.msaa = i,
        n.uint32Indices || Ne("Provided WebGL context does not support 32 index buffer, large scenes may not render correctly")
    }
}
;
Lb.extension = {
    type: [X.WebGLSystem],
    name: "context"
};
Lb.defaultOptions = {
    context: null,
    premultipliedAlpha: !0,
    preserveDrawingBuffer: !1,
    powerPreference: void 0,
    preferWebGLVersion: 2,
    multiView: !1
};
let pfe = Lb;
function TI(t, e) {
    for (const r in t.attributes) {
        const n = t.attributes[r]
          , i = e[r];
        i ? (n.format ?? (n.format = i.format),
        n.offset ?? (n.offset = i.offset),
        n.instance ?? (n.instance = i.instance)) : Ne(`Attribute ${r} is not present in the shader, but is present in the geometry. Unable to infer attribute details.`)
    }
    gfe(t)
}
function gfe(t) {
    const {buffers: e, attributes: r} = t
      , n = {}
      , i = {};
    for (const o in e) {
        const s = e[o];
        n[s.uid] = 0,
        i[s.uid] = 0
    }
    for (const o in r) {
        const s = r[o];
        n[s.buffer.uid] += ha(s.format).stride
    }
    for (const o in r) {
        const s = r[o];
        s.stride ?? (s.stride = n[s.buffer.uid]),
        s.start ?? (s.start = i[s.buffer.uid]),
        i[s.buffer.uid] += ha(s.format).stride
    }
}
var mE = (t => (t[t.RGBA = 6408] = "RGBA",
t[t.RGB = 6407] = "RGB",
t[t.RG = 33319] = "RG",
t[t.RED = 6403] = "RED",
t[t.RGBA_INTEGER = 36249] = "RGBA_INTEGER",
t[t.RGB_INTEGER = 36248] = "RGB_INTEGER",
t[t.RG_INTEGER = 33320] = "RG_INTEGER",
t[t.RED_INTEGER = 36244] = "RED_INTEGER",
t[t.ALPHA = 6406] = "ALPHA",
t[t.LUMINANCE = 6409] = "LUMINANCE",
t[t.LUMINANCE_ALPHA = 6410] = "LUMINANCE_ALPHA",
t[t.DEPTH_COMPONENT = 6402] = "DEPTH_COMPONENT",
t[t.DEPTH_STENCIL = 34041] = "DEPTH_STENCIL",
t))(mE || {})
  , DI = (t => (t[t.TEXTURE_2D = 3553] = "TEXTURE_2D",
t[t.TEXTURE_CUBE_MAP = 34067] = "TEXTURE_CUBE_MAP",
t[t.TEXTURE_2D_ARRAY = 35866] = "TEXTURE_2D_ARRAY",
t[t.TEXTURE_CUBE_MAP_POSITIVE_X = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X",
t[t.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X",
t[t.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y",
t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y",
t[t.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z",
t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z",
t))(DI || {})
  , ut = (t => (t[t.UNSIGNED_BYTE = 5121] = "UNSIGNED_BYTE",
t[t.UNSIGNED_SHORT = 5123] = "UNSIGNED_SHORT",
t[t.UNSIGNED_SHORT_5_6_5 = 33635] = "UNSIGNED_SHORT_5_6_5",
t[t.UNSIGNED_SHORT_4_4_4_4 = 32819] = "UNSIGNED_SHORT_4_4_4_4",
t[t.UNSIGNED_SHORT_5_5_5_1 = 32820] = "UNSIGNED_SHORT_5_5_5_1",
t[t.UNSIGNED_INT = 5125] = "UNSIGNED_INT",
t[t.UNSIGNED_INT_10F_11F_11F_REV = 35899] = "UNSIGNED_INT_10F_11F_11F_REV",
t[t.UNSIGNED_INT_2_10_10_10_REV = 33640] = "UNSIGNED_INT_2_10_10_10_REV",
t[t.UNSIGNED_INT_24_8 = 34042] = "UNSIGNED_INT_24_8",
t[t.UNSIGNED_INT_5_9_9_9_REV = 35902] = "UNSIGNED_INT_5_9_9_9_REV",
t[t.BYTE = 5120] = "BYTE",
t[t.SHORT = 5122] = "SHORT",
t[t.INT = 5124] = "INT",
t[t.FLOAT = 5126] = "FLOAT",
t[t.FLOAT_32_UNSIGNED_INT_24_8_REV = 36269] = "FLOAT_32_UNSIGNED_INT_24_8_REV",
t[t.HALF_FLOAT = 36193] = "HALF_FLOAT",
t))(ut || {});
const P3 = {
    uint8x2: ut.UNSIGNED_BYTE,
    uint8x4: ut.UNSIGNED_BYTE,
    sint8x2: ut.BYTE,
    sint8x4: ut.BYTE,
    unorm8x2: ut.UNSIGNED_BYTE,
    unorm8x4: ut.UNSIGNED_BYTE,
    snorm8x2: ut.BYTE,
    snorm8x4: ut.BYTE,
    uint16x2: ut.UNSIGNED_SHORT,
    uint16x4: ut.UNSIGNED_SHORT,
    sint16x2: ut.SHORT,
    sint16x4: ut.SHORT,
    unorm16x2: ut.UNSIGNED_SHORT,
    unorm16x4: ut.UNSIGNED_SHORT,
    snorm16x2: ut.SHORT,
    snorm16x4: ut.SHORT,
    float16x2: ut.HALF_FLOAT,
    float16x4: ut.HALF_FLOAT,
    float32: ut.FLOAT,
    float32x2: ut.FLOAT,
    float32x3: ut.FLOAT,
    float32x4: ut.FLOAT,
    uint32: ut.UNSIGNED_INT,
    uint32x2: ut.UNSIGNED_INT,
    uint32x3: ut.UNSIGNED_INT,
    uint32x4: ut.UNSIGNED_INT,
    sint32: ut.INT,
    sint32x2: ut.INT,
    sint32x3: ut.INT,
    sint32x4: ut.INT
};
function mfe(t) {
    return P3[t] ?? P3.float32
}
const vfe = {
    "point-list": 0,
    "line-list": 1,
    "line-strip": 3,
    "triangle-list": 4,
    "triangle-strip": 5
};
class FI {
    constructor(e) {
        this._geometryVaoHash = Object.create(null),
        this._renderer = e,
        this._activeGeometry = null,
        this._activeVao = null,
        this.hasVao = !0,
        this.hasInstance = !0,
        this._renderer.renderableGC.addManagedHash(this, "_geometryVaoHash")
    }
    contextChange() {
        const e = this.gl = this._renderer.gl;
        if (!this._renderer.context.supports.vertexArrayObject)
            throw new Error("[PixiJS] Vertex Array Objects are not supported on this device");
        const r = this._renderer.context.extensions.vertexArrayObject;
        r && (e.createVertexArray = () => r.createVertexArrayOES(),
        e.bindVertexArray = i => r.bindVertexArrayOES(i),
        e.deleteVertexArray = i => r.deleteVertexArrayOES(i));
        const n = this._renderer.context.extensions.vertexAttribDivisorANGLE;
        n && (e.drawArraysInstanced = (i, o, s, a) => {
            n.drawArraysInstancedANGLE(i, o, s, a)
        }
        ,
        e.drawElementsInstanced = (i, o, s, a, l) => {
            n.drawElementsInstancedANGLE(i, o, s, a, l)
        }
        ,
        e.vertexAttribDivisor = (i, o) => n.vertexAttribDivisorANGLE(i, o)),
        this._activeGeometry = null,
        this._activeVao = null,
        this._geometryVaoHash = Object.create(null)
    }
    bind(e, r) {
        const n = this.gl;
        this._activeGeometry = e;
        const i = this.getVao(e, r);
        this._activeVao !== i && (this._activeVao = i,
        n.bindVertexArray(i)),
        this.updateBuffers()
    }
    resetState() {
        this.unbind()
    }
    updateBuffers() {
        const e = this._activeGeometry
          , r = this._renderer.buffer;
        for (let n = 0; n < e.buffers.length; n++) {
            const i = e.buffers[n];
            r.updateBuffer(i)
        }
    }
    checkCompatibility(e, r) {
        const n = e.attributes
          , i = r._attributeData;
        for (const o in i)
            if (!n[o])
                throw new Error(`shader and geometry incompatible, geometry missing the "${o}" attribute`)
    }
    getSignature(e, r) {
        const n = e.attributes
          , i = r._attributeData
          , o = ["g", e.uid];
        for (const s in n)
            i[s] && o.push(s, i[s].location);
        return o.join("-")
    }
    getVao(e, r) {
        var n;
        return ((n = this._geometryVaoHash[e.uid]) == null ? void 0 : n[r._key]) || this.initGeometryVao(e, r)
    }
    initGeometryVao(e, r, n=!0) {
        const i = this._renderer.gl
          , o = this._renderer.buffer;
        this._renderer.shader._getProgramData(r),
        this.checkCompatibility(e, r);
        const s = this.getSignature(e, r);
        this._geometryVaoHash[e.uid] || (this._geometryVaoHash[e.uid] = Object.create(null),
        e.on("destroy", this.onGeometryDestroy, this));
        const a = this._geometryVaoHash[e.uid];
        let l = a[s];
        if (l)
            return a[r._key] = l,
            l;
        TI(e, r._attributeData);
        const c = e.buffers;
        l = i.createVertexArray(),
        i.bindVertexArray(l);
        for (let u = 0; u < c.length; u++) {
            const f = c[u];
            o.bind(f)
        }
        return this.activateVao(e, r),
        a[r._key] = l,
        a[s] = l,
        i.bindVertexArray(null),
        l
    }
    onGeometryDestroy(e, r) {
        const n = this._geometryVaoHash[e.uid]
          , i = this.gl;
        if (n) {
            if (r)
                for (const o in n)
                    this._activeVao !== n[o] && this.unbind(),
                    i.deleteVertexArray(n[o]);
            this._geometryVaoHash[e.uid] = null
        }
    }
    destroyAll(e=!1) {
        const r = this.gl;
        for (const n in this._geometryVaoHash) {
            if (e)
                for (const i in this._geometryVaoHash[n]) {
                    const o = this._geometryVaoHash[n];
                    this._activeVao !== o && this.unbind(),
                    r.deleteVertexArray(o[i])
                }
            this._geometryVaoHash[n] = null
        }
    }
    activateVao(e, r) {
        var a;
        const n = this._renderer.gl
          , i = this._renderer.buffer
          , o = e.attributes;
        e.indexBuffer && i.bind(e.indexBuffer);
        let s = null;
        for (const l in o) {
            const c = o[l]
              , u = c.buffer
              , f = i.getGlBuffer(u)
              , d = r._attributeData[l];
            if (d) {
                s !== f && (i.bind(u),
                s = f);
                const h = d.location;
                n.enableVertexAttribArray(h);
                const x = ha(c.format)
                  , y = mfe(c.format);
                if (((a = d.format) == null ? void 0 : a.substring(1, 4)) === "int" ? n.vertexAttribIPointer(h, x.size, y, c.stride, c.offset) : n.vertexAttribPointer(h, x.size, y, x.normalised, c.stride, c.offset),
                c.instance)
                    if (this.hasInstance) {
                        const m = c.divisor ?? 1;
                        n.vertexAttribDivisor(h, m)
                    } else
                        throw new Error("geometry error, GPU Instancing is not supported on this device")
            }
        }
    }
    draw(e, r, n, i) {
        const {gl: o} = this._renderer
          , s = this._activeGeometry
          , a = vfe[e || s.topology];
        if (i ?? (i = s.instanceCount),
        s.indexBuffer) {
            const l = s.indexBuffer.data.BYTES_PER_ELEMENT
              , c = l === 2 ? o.UNSIGNED_SHORT : o.UNSIGNED_INT;
            i !== 1 ? o.drawElementsInstanced(a, r || s.indexBuffer.data.length, c, (n || 0) * l, i) : o.drawElements(a, r || s.indexBuffer.data.length, c, (n || 0) * l)
        } else
            i !== 1 ? o.drawArraysInstanced(a, n || 0, r || s.getSize(), i) : o.drawArrays(a, n || 0, r || s.getSize());
        return this
    }
    unbind() {
        this.gl.bindVertexArray(null),
        this._activeVao = null,
        this._activeGeometry = null
    }
    destroy() {
        this._renderer = null,
        this.gl = null,
        this._activeVao = null,
        this._activeGeometry = null,
        this._geometryVaoHash = {}
    }
}
FI.extension = {
    type: [X.WebGLSystem],
    name: "geometry"
};
const yfe = new cd({
    attributes: {
        aPosition: [-1, -1, 3, -1, -1, 3]
    }
})
  , $b = class PI {
    constructor(e) {
        this.useBackBuffer = !1,
        this._useBackBufferThisRender = !1,
        this._renderer = e
    }
    init(e={}) {
        const {useBackBuffer: r, antialias: n} = {
            ...PI.defaultOptions,
            ...e
        };
        this.useBackBuffer = r,
        this._antialias = n,
        this._renderer.context.supports.msaa || (Ne("antialiasing, is not supported on when using the back buffer"),
        this._antialias = !1),
        this._state = Hi.for2d();
        const i = new ba({
            vertex: `
                attribute vec2 aPosition;
                out vec2 vUv;

                void main() {
                    gl_Position = vec4(aPosition, 0.0, 1.0);

                    vUv = (aPosition + 1.0) / 2.0;

                    // flip dem UVs
                    vUv.y = 1.0 - vUv.y;
                }`,
            fragment: `
                in vec2 vUv;
                out vec4 finalColor;

                uniform sampler2D uTexture;

                void main() {
                    finalColor = texture(uTexture, vUv);
                }`,
            name: "big-triangle"
        });
        this._bigTriangleShader = new _i({
            glProgram: i,
            resources: {
                uTexture: Be.WHITE.source
            }
        })
    }
    renderStart(e) {
        const r = this._renderer.renderTarget.getRenderTarget(e.target);
        if (this._useBackBufferThisRender = this.useBackBuffer && !!r.isRoot,
        this._useBackBufferThisRender) {
            const n = this._renderer.renderTarget.getRenderTarget(e.target);
            this._targetTexture = n.colorTexture,
            e.target = this._getBackBufferTexture(n.colorTexture)
        }
    }
    renderEnd() {
        this._presentBackBuffer()
    }
    _presentBackBuffer() {
        const e = this._renderer;
        e.renderTarget.finishRenderPass(),
        this._useBackBufferThisRender && (e.renderTarget.bind(this._targetTexture, !1),
        this._bigTriangleShader.resources.uTexture = this._backBufferTexture.source,
        e.encoder.draw({
            geometry: yfe,
            shader: this._bigTriangleShader,
            state: this._state
        }))
    }
    _getBackBufferTexture(e) {
        return this._backBufferTexture = this._backBufferTexture || new Be({
            source: new Br({
                width: e.width,
                height: e.height,
                resolution: e._resolution,
                antialias: this._antialias
            })
        }),
        this._backBufferTexture.source.resize(e.width, e.height, e._resolution),
        this._backBufferTexture
    }
    destroy() {
        this._backBufferTexture && (this._backBufferTexture.destroy(),
        this._backBufferTexture = null)
    }
}
;
$b.extension = {
    type: [X.WebGLSystem],
    name: "backBuffer",
    priority: 1
};
$b.defaultOptions = {
    useBackBuffer: !1
};
let Efe = $b;
class II {
    constructor(e) {
        this._colorMaskCache = 15,
        this._renderer = e
    }
    setMask(e) {
        this._colorMaskCache !== e && (this._colorMaskCache = e,
        this._renderer.gl.colorMask(!!(e & 8), !!(e & 4), !!(e & 2), !!(e & 1)))
    }
}
II.extension = {
    type: [X.WebGLSystem],
    name: "colorMask"
};
class OI {
    constructor(e) {
        this.commandFinished = Promise.resolve(),
        this._renderer = e
    }
    setGeometry(e, r) {
        this._renderer.geometry.bind(e, r.glProgram)
    }
    finishRenderPass() {}
    draw(e) {
        const r = this._renderer
          , {geometry: n, shader: i, state: o, skipSync: s, topology: a, size: l, start: c, instanceCount: u} = e;
        r.shader.bind(i, s),
        r.geometry.bind(n, r.shader._activeProgram),
        o && r.state.set(o),
        r.geometry.draw(a, l, c, u ?? n.instanceCount)
    }
    destroy() {
        this._renderer = null
    }
}
OI.extension = {
    type: [X.WebGLSystem],
    name: "encoder"
};
class kI {
    constructor(e) {
        this._renderer = e
    }
    contextChange() {
        const e = this._renderer.gl;
        this.maxTextures = e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),
        this.maxBatchableTextures = LP(this.maxTextures, e);
        const r = this._renderer.context.webGLVersion === 2;
        this.maxUniformBindings = r ? e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS) : 0
    }
    destroy() {}
}
kI.extension = {
    type: [X.WebGLSystem],
    name: "limits"
};
class _fe {
    constructor() {
        this.width = -1,
        this.height = -1,
        this.msaa = !1,
        this.msaaRenderBuffer = []
    }
}
const Ca = [];
Ca[ar.NONE] = void 0;
Ca[ar.DISABLED] = {
    stencilWriteMask: 0,
    stencilReadMask: 0
};
Ca[ar.RENDERING_MASK_ADD] = {
    stencilFront: {
        compare: "equal",
        passOp: "increment-clamp"
    },
    stencilBack: {
        compare: "equal",
        passOp: "increment-clamp"
    }
};
Ca[ar.RENDERING_MASK_REMOVE] = {
    stencilFront: {
        compare: "equal",
        passOp: "decrement-clamp"
    },
    stencilBack: {
        compare: "equal",
        passOp: "decrement-clamp"
    }
};
Ca[ar.MASK_ACTIVE] = {
    stencilWriteMask: 0,
    stencilFront: {
        compare: "equal",
        passOp: "keep"
    },
    stencilBack: {
        compare: "equal",
        passOp: "keep"
    }
};
Ca[ar.INVERSE_MASK_ACTIVE] = {
    stencilWriteMask: 0,
    stencilFront: {
        compare: "not-equal",
        passOp: "keep"
    },
    stencilBack: {
        compare: "not-equal",
        passOp: "keep"
    }
};
class RI {
    constructor(e) {
        this._stencilCache = {
            enabled: !1,
            stencilReference: 0,
            stencilMode: ar.NONE
        },
        this._renderTargetStencilState = Object.create(null),
        e.renderTarget.onRenderTargetChange.add(this)
    }
    contextChange(e) {
        this._gl = e,
        this._comparisonFuncMapping = {
            always: e.ALWAYS,
            never: e.NEVER,
            equal: e.EQUAL,
            "not-equal": e.NOTEQUAL,
            less: e.LESS,
            "less-equal": e.LEQUAL,
            greater: e.GREATER,
            "greater-equal": e.GEQUAL
        },
        this._stencilOpsMapping = {
            keep: e.KEEP,
            zero: e.ZERO,
            replace: e.REPLACE,
            invert: e.INVERT,
            "increment-clamp": e.INCR,
            "decrement-clamp": e.DECR,
            "increment-wrap": e.INCR_WRAP,
            "decrement-wrap": e.DECR_WRAP
        },
        this.resetState()
    }
    onRenderTargetChange(e) {
        if (this._activeRenderTarget === e)
            return;
        this._activeRenderTarget = e;
        let r = this._renderTargetStencilState[e.uid];
        r || (r = this._renderTargetStencilState[e.uid] = {
            stencilMode: ar.DISABLED,
            stencilReference: 0
        }),
        this.setStencilMode(r.stencilMode, r.stencilReference)
    }
    resetState() {
        this._stencilCache.enabled = !1,
        this._stencilCache.stencilMode = ar.NONE,
        this._stencilCache.stencilReference = 0
    }
    setStencilMode(e, r) {
        const n = this._renderTargetStencilState[this._activeRenderTarget.uid]
          , i = this._gl
          , o = Ca[e]
          , s = this._stencilCache;
        if (n.stencilMode = e,
        n.stencilReference = r,
        e === ar.DISABLED) {
            this._stencilCache.enabled && (this._stencilCache.enabled = !1,
            i.disable(i.STENCIL_TEST));
            return
        }
        this._stencilCache.enabled || (this._stencilCache.enabled = !0,
        i.enable(i.STENCIL_TEST)),
        (e !== s.stencilMode || s.stencilReference !== r) && (s.stencilMode = e,
        s.stencilReference = r,
        i.stencilFunc(this._comparisonFuncMapping[o.stencilBack.compare], r, 255),
        i.stencilOp(i.KEEP, i.KEEP, this._stencilOpsMapping[o.stencilBack.passOp]))
    }
}
RI.extension = {
    type: [X.WebGLSystem],
    name: "stencil"
};
class MI {
    constructor(e) {
        this._syncFunctionHash = Object.create(null),
        this._adaptor = e,
        this._systemCheck()
    }
    _systemCheck() {
        if (!bP())
            throw new Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.")
    }
    ensureUniformGroup(e) {
        const r = this.getUniformGroupData(e);
        e.buffer || (e.buffer = new Yn({
            data: new Float32Array(r.layout.size / 4),
            usage: it.UNIFORM | it.COPY_DST
        }))
    }
    getUniformGroupData(e) {
        return this._syncFunctionHash[e._signature] || this._initUniformGroup(e)
    }
    _initUniformGroup(e) {
        const r = e._signature;
        let n = this._syncFunctionHash[r];
        if (!n) {
            const i = Object.keys(e.uniformStructures).map(a => e.uniformStructures[a])
              , o = this._adaptor.createUboElements(i)
              , s = this._generateUboSync(o.uboElements);
            n = this._syncFunctionHash[r] = {
                layout: o,
                syncFunction: s
            }
        }
        return this._syncFunctionHash[r]
    }
    _generateUboSync(e) {
        return this._adaptor.generateUboSync(e)
    }
    syncUniformGroup(e, r, n) {
        const i = this.getUniformGroupData(e);
        e.buffer || (e.buffer = new Yn({
            data: new Float32Array(i.layout.size / 4),
            usage: it.UNIFORM | it.COPY_DST
        }));
        let o = null;
        return r || (r = e.buffer.data,
        o = e.buffer.dataInt32),
        n || (n = 0),
        i.syncFunction(e.uniforms, r, o, n),
        !0
    }
    updateUniformGroup(e) {
        if (e.isStatic && !e._dirtyId)
            return !1;
        e._dirtyId = 0;
        const r = this.syncUniformGroup(e);
        return e.buffer.update(),
        r
    }
    destroy() {
        this._syncFunctionHash = null
    }
}
const NI = {
    f32: 4,
    i32: 4,
    "vec2<f32>": 8,
    "vec3<f32>": 12,
    "vec4<f32>": 16,
    "vec2<i32>": 8,
    "vec3<i32>": 12,
    "vec4<i32>": 16,
    "mat2x2<f32>": 16 * 2,
    "mat3x3<f32>": 16 * 3,
    "mat4x4<f32>": 16 * 4
};
function bfe(t) {
    const e = t.map(o => ({
        data: o,
        offset: 0,
        size: 0
    }))
      , r = 16;
    let n = 0
      , i = 0;
    for (let o = 0; o < e.length; o++) {
        const s = e[o];
        if (n = NI[s.data.type],
        !n)
            throw new Error(`Unknown type ${s.data.type}`);
        s.data.size > 1 && (n = Math.max(n, r) * s.data.size);
        const a = n === 12 ? 16 : n;
        s.size = n;
        const l = i % r;
        l > 0 && r - l < a ? i += (r - l) % 16 : i += (n - l % n) % n,
        s.offset = i,
        i += n
    }
    return i = Math.ceil(i / 16) * 16,
    {
        uboElements: e,
        size: i
    }
}
const Qa = [{
    type: "mat3x3<f32>",
    test: t => t.value.a !== void 0,
    ubo: `
            var matrix = uv[name].toArray(true);
            data[offset] = matrix[0];
            data[offset + 1] = matrix[1];
            data[offset + 2] = matrix[2];
            data[offset + 4] = matrix[3];
            data[offset + 5] = matrix[4];
            data[offset + 6] = matrix[5];
            data[offset + 8] = matrix[6];
            data[offset + 9] = matrix[7];
            data[offset + 10] = matrix[8];
        `,
    uniform: `
            gl.uniformMatrix3fv(ud[name].location, false, uv[name].toArray(true));
        `
}, {
    type: "vec4<f32>",
    test: t => t.type === "vec4<f32>" && t.size === 1 && t.value.width !== void 0,
    ubo: `
            v = uv[name];
            data[offset] = v.x;
            data[offset + 1] = v.y;
            data[offset + 2] = v.width;
            data[offset + 3] = v.height;
        `,
    uniform: `
            cv = ud[name].value;
            v = uv[name];
            if (cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height) {
                cv[0] = v.x;
                cv[1] = v.y;
                cv[2] = v.width;
                cv[3] = v.height;
                gl.uniform4f(ud[name].location, v.x, v.y, v.width, v.height);
            }
        `
}, {
    type: "vec2<f32>",
    test: t => t.type === "vec2<f32>" && t.size === 1 && t.value.x !== void 0,
    ubo: `
            v = uv[name];
            data[offset] = v.x;
            data[offset + 1] = v.y;
        `,
    uniform: `
            cv = ud[name].value;
            v = uv[name];
            if (cv[0] !== v.x || cv[1] !== v.y) {
                cv[0] = v.x;
                cv[1] = v.y;
                gl.uniform2f(ud[name].location, v.x, v.y);
            }
        `
}, {
    type: "vec4<f32>",
    test: t => t.type === "vec4<f32>" && t.size === 1 && t.value.red !== void 0,
    ubo: `
            v = uv[name];
            data[offset] = v.red;
            data[offset + 1] = v.green;
            data[offset + 2] = v.blue;
            data[offset + 3] = v.alpha;
        `,
    uniform: `
            cv = ud[name].value;
            v = uv[name];
            if (cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha) {
                cv[0] = v.red;
                cv[1] = v.green;
                cv[2] = v.blue;
                cv[3] = v.alpha;
                gl.uniform4f(ud[name].location, v.red, v.green, v.blue, v.alpha);
            }
        `
}, {
    type: "vec3<f32>",
    test: t => t.type === "vec3<f32>" && t.size === 1 && t.value.red !== void 0,
    ubo: `
            v = uv[name];
            data[offset] = v.red;
            data[offset + 1] = v.green;
            data[offset + 2] = v.blue;
        `,
    uniform: `
            cv = ud[name].value;
            v = uv[name];
            if (cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue) {
                cv[0] = v.red;
                cv[1] = v.green;
                cv[2] = v.blue;
                gl.uniform3f(ud[name].location, v.red, v.green, v.blue);
            }
        `
}];
function LI(t, e, r, n) {
    const i = [`
        var v = null;
        var v2 = null;
        var t = 0;
        var index = 0;
        var name = null;
        var arrayOffset = null;
    `];
    let o = 0;
    for (let a = 0; a < t.length; a++) {
        const l = t[a]
          , c = l.data.name;
        let u = !1
          , f = 0;
        for (let d = 0; d < Qa.length; d++)
            if (Qa[d].test(l.data)) {
                f = l.offset / 4,
                i.push(`name = "${c}";`, `offset += ${f - o};`, Qa[d][e] || Qa[d].ubo),
                u = !0;
                break
            }
        if (!u)
            if (l.data.size > 1)
                f = l.offset / 4,
                i.push(r(l, f - o));
            else {
                const d = n[l.data.type];
                f = l.offset / 4,
                i.push(`
                    v = uv.${c};
                    offset += ${f - o};
                    ${d};
                `)
            }
        o = f
    }
    const s = i.join(`
`);
    return new Function("uv","data","dataInt32","offset",s)
}
function dc(t, e) {
    return `
        for (let i = 0; i < ${t * e}; i++) {
            data[offset + (((i / ${t})|0) * 4) + (i % ${t})] = v[i];
        }
    `
}
const $I = {
    f32: `
        data[offset] = v;`,
    i32: `
        dataInt32[offset] = v;`,
    "vec2<f32>": `
        data[offset] = v[0];
        data[offset + 1] = v[1];`,
    "vec3<f32>": `
        data[offset] = v[0];
        data[offset + 1] = v[1];
        data[offset + 2] = v[2];`,
    "vec4<f32>": `
        data[offset] = v[0];
        data[offset + 1] = v[1];
        data[offset + 2] = v[2];
        data[offset + 3] = v[3];`,
    "vec2<i32>": `
        dataInt32[offset] = v[0];
        dataInt32[offset + 1] = v[1];`,
    "vec3<i32>": `
        dataInt32[offset] = v[0];
        dataInt32[offset + 1] = v[1];
        dataInt32[offset + 2] = v[2];`,
    "vec4<i32>": `
        dataInt32[offset] = v[0];
        dataInt32[offset + 1] = v[1];
        dataInt32[offset + 2] = v[2];
        dataInt32[offset + 3] = v[3];`,
    "mat2x2<f32>": `
        data[offset] = v[0];
        data[offset + 1] = v[1];
        data[offset + 4] = v[2];
        data[offset + 5] = v[3];`,
    "mat3x3<f32>": `
        data[offset] = v[0];
        data[offset + 1] = v[1];
        data[offset + 2] = v[2];
        data[offset + 4] = v[3];
        data[offset + 5] = v[4];
        data[offset + 6] = v[5];
        data[offset + 8] = v[6];
        data[offset + 9] = v[7];
        data[offset + 10] = v[8];`,
    "mat4x4<f32>": `
        for (let i = 0; i < 16; i++) {
            data[offset + i] = v[i];
        }`,
    "mat3x2<f32>": dc(3, 2),
    "mat4x2<f32>": dc(4, 2),
    "mat2x3<f32>": dc(2, 3),
    "mat4x3<f32>": dc(4, 3),
    "mat2x4<f32>": dc(2, 4),
    "mat3x4<f32>": dc(3, 4)
}
  , Cfe = {
    ...$I,
    "mat2x2<f32>": `
        data[offset] = v[0];
        data[offset + 1] = v[1];
        data[offset + 2] = v[2];
        data[offset + 3] = v[3];
    `
};
function Afe(t, e) {
    const r = Math.max(NI[t.data.type] / 16, 1)
      , n = t.data.value.length / t.data.size
      , i = (4 - n % 4) % 4
      , o = t.data.type.indexOf("i32") >= 0 ? "dataInt32" : "data";
    return `
        v = uv.${t.data.name};
        offset += ${e};

        arrayOffset = offset;

        t = 0;

        for(var i=0; i < ${t.data.size * r}; i++)
        {
            for(var j = 0; j < ${n}; j++)
            {
                ${o}[arrayOffset++] = v[t++];
            }
            ${i !== 0 ? `arrayOffset += ${i};` : ""}
        }
    `
}
function wfe(t) {
    return LI(t, "uboStd40", Afe, $I)
}
class UI extends MI {
    constructor() {
        super({
            createUboElements: bfe,
            generateUboSync: wfe
        })
    }
}
UI.extension = {
    type: [X.WebGLSystem],
    name: "ubo"
};
class Bfe {
    constructor() {
        this._clearColorCache = [0, 0, 0, 0],
        this._viewPortCache = new mt
    }
    init(e, r) {
        this._renderer = e,
        this._renderTargetSystem = r,
        e.runners.contextChange.add(this)
    }
    contextChange() {
        this._clearColorCache = [0, 0, 0, 0],
        this._viewPortCache = new mt
    }
    copyToTexture(e, r, n, i, o) {
        const s = this._renderTargetSystem
          , a = this._renderer
          , l = s.getGpuRenderTarget(e)
          , c = a.gl;
        return this.finishRenderPass(e),
        c.bindFramebuffer(c.FRAMEBUFFER, l.resolveTargetFramebuffer),
        a.texture.bind(r, 0),
        c.copyTexSubImage2D(c.TEXTURE_2D, 0, o.x, o.y, n.x, n.y, i.width, i.height),
        r
    }
    startRenderPass(e, r=!0, n, i) {
        const o = this._renderTargetSystem
          , s = e.colorTexture
          , a = o.getGpuRenderTarget(e);
        let l = i.y;
        e.isRoot && (l = s.pixelHeight - i.height),
        e.colorTextures.forEach(f => {
            this._renderer.texture.unbind(f)
        }
        );
        const c = this._renderer.gl;
        c.bindFramebuffer(c.FRAMEBUFFER, a.framebuffer);
        const u = this._viewPortCache;
        (u.x !== i.x || u.y !== l || u.width !== i.width || u.height !== i.height) && (u.x = i.x,
        u.y = l,
        u.width = i.width,
        u.height = i.height,
        c.viewport(i.x, l, i.width, i.height)),
        !a.depthStencilRenderBuffer && (e.stencil || e.depth) && this._initStencil(a),
        this.clear(e, r, n)
    }
    finishRenderPass(e) {
        const n = this._renderTargetSystem.getGpuRenderTarget(e);
        if (!n.msaa)
            return;
        const i = this._renderer.gl;
        i.bindFramebuffer(i.FRAMEBUFFER, n.resolveTargetFramebuffer),
        i.bindFramebuffer(i.READ_FRAMEBUFFER, n.framebuffer),
        i.blitFramebuffer(0, 0, n.width, n.height, 0, 0, n.width, n.height, i.COLOR_BUFFER_BIT, i.NEAREST),
        i.bindFramebuffer(i.FRAMEBUFFER, n.framebuffer)
    }
    initGpuRenderTarget(e) {
        const n = this._renderer.gl
          , i = new _fe;
        return e.colorTexture instanceof go ? (this._renderer.context.ensureCanvasSize(e.colorTexture.resource),
        i.framebuffer = null,
        i) : (this._initColor(e, i),
        n.bindFramebuffer(n.FRAMEBUFFER, null),
        i)
    }
    destroyGpuRenderTarget(e) {
        const r = this._renderer.gl;
        e.framebuffer && (r.deleteFramebuffer(e.framebuffer),
        e.framebuffer = null),
        e.resolveTargetFramebuffer && (r.deleteFramebuffer(e.resolveTargetFramebuffer),
        e.resolveTargetFramebuffer = null),
        e.depthStencilRenderBuffer && (r.deleteRenderbuffer(e.depthStencilRenderBuffer),
        e.depthStencilRenderBuffer = null),
        e.msaaRenderBuffer.forEach(n => {
            r.deleteRenderbuffer(n)
        }
        ),
        e.msaaRenderBuffer = null
    }
    clear(e, r, n) {
        if (!r)
            return;
        const i = this._renderTargetSystem;
        typeof r == "boolean" && (r = r ? Vn.ALL : Vn.NONE);
        const o = this._renderer.gl;
        if (r & Vn.COLOR) {
            n ?? (n = i.defaultClearColor);
            const s = this._clearColorCache
              , a = n;
            (s[0] !== a[0] || s[1] !== a[1] || s[2] !== a[2] || s[3] !== a[3]) && (s[0] = a[0],
            s[1] = a[1],
            s[2] = a[2],
            s[3] = a[3],
            o.clearColor(a[0], a[1], a[2], a[3]))
        }
        o.clear(r)
    }
    resizeGpuRenderTarget(e) {
        if (e.isRoot)
            return;
        const n = this._renderTargetSystem.getGpuRenderTarget(e);
        this._resizeColor(e, n),
        (e.stencil || e.depth) && this._resizeStencil(n)
    }
    _initColor(e, r) {
        const n = this._renderer
          , i = n.gl
          , o = i.createFramebuffer();
        if (r.resolveTargetFramebuffer = o,
        i.bindFramebuffer(i.FRAMEBUFFER, o),
        r.width = e.colorTexture.source.pixelWidth,
        r.height = e.colorTexture.source.pixelHeight,
        e.colorTextures.forEach( (s, a) => {
            const l = s.source;
            l.antialias && (n.context.supports.msaa ? r.msaa = !0 : Ne("[RenderTexture] Antialiasing on textures is not supported in WebGL1")),
            n.texture.bindSource(l, 0);
            const u = n.texture.getGlSource(l).texture;
            i.framebufferTexture2D(i.FRAMEBUFFER, i.COLOR_ATTACHMENT0 + a, 3553, u, 0)
        }
        ),
        r.msaa) {
            const s = i.createFramebuffer();
            r.framebuffer = s,
            i.bindFramebuffer(i.FRAMEBUFFER, s),
            e.colorTextures.forEach( (a, l) => {
                const c = i.createRenderbuffer();
                r.msaaRenderBuffer[l] = c
            }
            )
        } else
            r.framebuffer = o;
        this._resizeColor(e, r)
    }
    _resizeColor(e, r) {
        const n = e.colorTexture.source;
        if (r.width = n.pixelWidth,
        r.height = n.pixelHeight,
        e.colorTextures.forEach( (i, o) => {
            o !== 0 && i.source.resize(n.width, n.height, n._resolution)
        }
        ),
        r.msaa) {
            const i = this._renderer
              , o = i.gl
              , s = r.framebuffer;
            o.bindFramebuffer(o.FRAMEBUFFER, s),
            e.colorTextures.forEach( (a, l) => {
                const c = a.source;
                i.texture.bindSource(c, 0);
                const f = i.texture.getGlSource(c).internalFormat
                  , d = r.msaaRenderBuffer[l];
                o.bindRenderbuffer(o.RENDERBUFFER, d),
                o.renderbufferStorageMultisample(o.RENDERBUFFER, 4, f, c.pixelWidth, c.pixelHeight),
                o.framebufferRenderbuffer(o.FRAMEBUFFER, o.COLOR_ATTACHMENT0 + l, o.RENDERBUFFER, d)
            }
            )
        }
    }
    _initStencil(e) {
        if (e.framebuffer === null)
            return;
        const r = this._renderer.gl
          , n = r.createRenderbuffer();
        e.depthStencilRenderBuffer = n,
        r.bindRenderbuffer(r.RENDERBUFFER, n),
        r.framebufferRenderbuffer(r.FRAMEBUFFER, r.DEPTH_STENCIL_ATTACHMENT, r.RENDERBUFFER, n),
        this._resizeStencil(e)
    }
    _resizeStencil(e) {
        const r = this._renderer.gl;
        r.bindRenderbuffer(r.RENDERBUFFER, e.depthStencilRenderBuffer),
        e.msaa ? r.renderbufferStorageMultisample(r.RENDERBUFFER, 4, r.DEPTH24_STENCIL8, e.width, e.height) : r.renderbufferStorage(r.RENDERBUFFER, this._renderer.context.webGLVersion === 2 ? r.DEPTH24_STENCIL8 : r.DEPTH_STENCIL, e.width, e.height)
    }
    prerender(e) {
        const r = e.colorTexture.resource;
        this._renderer.context.multiView && go.test(r) && this._renderer.context.ensureCanvasSize(r)
    }
    postrender(e) {
        if (this._renderer.context.multiView && go.test(e.colorTexture.resource)) {
            const r = this._renderer.context.canvas
              , n = e.colorTexture;
            n.context2D.drawImage(r, 0, n.pixelHeight - r.height)
        }
    }
}
function Sfe(t, e, r, n, i, o) {
    const s = o ? 1 : -1;
    return t.identity(),
    t.a = 1 / n * 2,
    t.d = s * (1 / i * 2),
    t.tx = -1 - e * t.a,
    t.ty = -s - r * t.d,
    t
}
const bc = new Map;
Fu.register(bc);
function GI(t, e) {
    if (!bc.has(t)) {
        const r = new Be({
            source: new go({
                resource: t,
                ...e
            })
        })
          , n = () => {
            bc.get(t) === r && bc.delete(t)
        }
        ;
        r.once("destroy", n),
        r.source.once("destroy", n),
        bc.set(t, r)
    }
    return bc.get(t)
}
function Tfe(t) {
    const e = t.colorTexture.source.resource;
    return globalThis.HTMLCanvasElement && e instanceof HTMLCanvasElement && document.body.contains(e)
}
const HI = class VI {
    constructor(e={}) {
        if (this.uid = Dt("renderTarget"),
        this.colorTextures = [],
        this.dirtyId = 0,
        this.isRoot = !1,
        this._size = new Float32Array(2),
        this._managedColorTextures = !1,
        e = {
            ...VI.defaultOptions,
            ...e
        },
        this.stencil = e.stencil,
        this.depth = e.depth,
        this.isRoot = e.isRoot,
        typeof e.colorTextures == "number") {
            this._managedColorTextures = !0;
            for (let r = 0; r < e.colorTextures; r++)
                this.colorTextures.push(new Br({
                    width: e.width,
                    height: e.height,
                    resolution: e.resolution,
                    antialias: e.antialias
                }))
        } else {
            this.colorTextures = [...e.colorTextures.map(n => n.source)];
            const r = this.colorTexture.source;
            this.resize(r.width, r.height, r._resolution)
        }
        this.colorTexture.source.on("resize", this.onSourceResize, this),
        (e.depthStencilTexture || this.stencil) && (e.depthStencilTexture instanceof Be || e.depthStencilTexture instanceof Br ? this.depthStencilTexture = e.depthStencilTexture.source : this.ensureDepthStencilTexture())
    }
    get size() {
        const e = this._size;
        return e[0] = this.pixelWidth,
        e[1] = this.pixelHeight,
        e
    }
    get width() {
        return this.colorTexture.source.width
    }
    get height() {
        return this.colorTexture.source.height
    }
    get pixelWidth() {
        return this.colorTexture.source.pixelWidth
    }
    get pixelHeight() {
        return this.colorTexture.source.pixelHeight
    }
    get resolution() {
        return this.colorTexture.source._resolution
    }
    get colorTexture() {
        return this.colorTextures[0]
    }
    onSourceResize(e) {
        this.resize(e.width, e.height, e._resolution, !0)
    }
    ensureDepthStencilTexture() {
        this.depthStencilTexture || (this.depthStencilTexture = new Br({
            width: this.width,
            height: this.height,
            resolution: this.resolution,
            format: "depth24plus-stencil8",
            autoGenerateMipmaps: !1,
            antialias: !1,
            mipLevelCount: 1
        }))
    }
    resize(e, r, n=this.resolution, i=!1) {
        this.dirtyId++,
        this.colorTextures.forEach( (o, s) => {
            i && s === 0 || o.source.resize(e, r, n)
        }
        ),
        this.depthStencilTexture && this.depthStencilTexture.source.resize(e, r, n)
    }
    destroy() {
        this.colorTexture.source.off("resize", this.onSourceResize, this),
        this._managedColorTextures && this.colorTextures.forEach(e => {
            e.destroy()
        }
        ),
        this.depthStencilTexture && (this.depthStencilTexture.destroy(),
        delete this.depthStencilTexture)
    }
}
;
HI.defaultOptions = {
    width: 0,
    height: 0,
    resolution: 1,
    colorTextures: 1,
    stencil: !1,
    depth: !1,
    antialias: !1,
    isRoot: !1
};
let vE = HI;
class zI {
    constructor(e) {
        this.rootViewPort = new mt,
        this.viewport = new mt,
        this.onRenderTargetChange = new SP("onRenderTargetChange"),
        this.projectionMatrix = new Pe,
        this.defaultClearColor = [0, 0, 0, 0],
        this._renderSurfaceToRenderTargetHash = new Map,
        this._gpuRenderTargetHash = Object.create(null),
        this._renderTargetStack = [],
        this._renderer = e,
        e.renderableGC.addManagedHash(this, "_gpuRenderTargetHash")
    }
    finishRenderPass() {
        this.adaptor.finishRenderPass(this.renderTarget)
    }
    renderStart({target: e, clear: r, clearColor: n, frame: i}) {
        var o, s;
        this._renderTargetStack.length = 0,
        this.push(e, r, n, i),
        this.rootViewPort.copyFrom(this.viewport),
        this.rootRenderTarget = this.renderTarget,
        this.renderingToScreen = Tfe(this.rootRenderTarget),
        (s = (o = this.adaptor).prerender) == null || s.call(o, this.rootRenderTarget)
    }
    postrender() {
        var e, r;
        (r = (e = this.adaptor).postrender) == null || r.call(e, this.rootRenderTarget)
    }
    bind(e, r=!0, n, i) {
        const o = this.getRenderTarget(e)
          , s = this.renderTarget !== o;
        this.renderTarget = o,
        this.renderSurface = e;
        const a = this.getGpuRenderTarget(o);
        (o.pixelWidth !== a.width || o.pixelHeight !== a.height) && (this.adaptor.resizeGpuRenderTarget(o),
        a.width = o.pixelWidth,
        a.height = o.pixelHeight);
        const l = o.colorTexture
          , c = this.viewport
          , u = l.pixelWidth
          , f = l.pixelHeight;
        if (!i && e instanceof Be && (i = e.frame),
        i) {
            const d = l._resolution;
            c.x = i.x * d + .5 | 0,
            c.y = i.y * d + .5 | 0,
            c.width = i.width * d + .5 | 0,
            c.height = i.height * d + .5 | 0
        } else
            c.x = 0,
            c.y = 0,
            c.width = u,
            c.height = f;
        return Sfe(this.projectionMatrix, 0, 0, c.width / l.resolution, c.height / l.resolution, !o.isRoot),
        this.adaptor.startRenderPass(o, r, n, c),
        s && this.onRenderTargetChange.emit(o),
        o
    }
    clear(e, r=Vn.ALL, n) {
        r && (e && (e = this.getRenderTarget(e)),
        this.adaptor.clear(e || this.renderTarget, r, n, this.viewport))
    }
    contextChange() {
        this._gpuRenderTargetHash = Object.create(null)
    }
    push(e, r=Vn.ALL, n, i) {
        const o = this.bind(e, r, n, i);
        return this._renderTargetStack.push({
            renderTarget: o,
            frame: i
        }),
        o
    }
    pop() {
        this._renderTargetStack.pop();
        const e = this._renderTargetStack[this._renderTargetStack.length - 1];
        this.bind(e.renderTarget, !1, null, e.frame)
    }
    getRenderTarget(e) {
        return e.isTexture && (e = e.source),
        this._renderSurfaceToRenderTargetHash.get(e) ?? this._initRenderTarget(e)
    }
    copyToTexture(e, r, n, i, o) {
        n.x < 0 && (i.width += n.x,
        o.x -= n.x,
        n.x = 0),
        n.y < 0 && (i.height += n.y,
        o.y -= n.y,
        n.y = 0);
        const {pixelWidth: s, pixelHeight: a} = e;
        return i.width = Math.min(i.width, s - n.x),
        i.height = Math.min(i.height, a - n.y),
        this.adaptor.copyToTexture(e, r, n, i, o)
    }
    ensureDepthStencil() {
        this.renderTarget.stencil || (this.renderTarget.stencil = !0,
        this.adaptor.startRenderPass(this.renderTarget, !1, null, this.viewport))
    }
    destroy() {
        this._renderer = null,
        this._renderSurfaceToRenderTargetHash.forEach( (e, r) => {
            e !== r && e.destroy()
        }
        ),
        this._renderSurfaceToRenderTargetHash.clear(),
        this._gpuRenderTargetHash = Object.create(null)
    }
    _initRenderTarget(e) {
        let r = null;
        return go.test(e) && (e = GI(e).source),
        e instanceof vE ? r = e : e instanceof Br && (r = new vE({
            colorTextures: [e]
        }),
        e.source instanceof go && (r.isRoot = !0),
        e.once("destroy", () => {
            r.destroy(),
            this._renderSurfaceToRenderTargetHash.delete(e);
            const n = this._gpuRenderTargetHash[r.uid];
            n && (this._gpuRenderTargetHash[r.uid] = null,
            this.adaptor.destroyGpuRenderTarget(n))
        }
        )),
        this._renderSurfaceToRenderTargetHash.set(e, r),
        r
    }
    getGpuRenderTarget(e) {
        return this._gpuRenderTargetHash[e.uid] || (this._gpuRenderTargetHash[e.uid] = this.adaptor.initGpuRenderTarget(e))
    }
    resetState() {
        this.renderTarget = null,
        this.renderSurface = null
    }
}
class jI extends zI {
    constructor(e) {
        super(e),
        this.adaptor = new Bfe,
        this.adaptor.init(e, this)
    }
}
jI.extension = {
    type: [X.WebGLSystem],
    name: "renderTarget"
};
class Ub extends Qn {
    constructor({buffer: e, offset: r, size: n}) {
        super(),
        this.uid = Dt("buffer"),
        this._resourceType = "bufferResource",
        this._touched = 0,
        this._resourceId = Dt("resource"),
        this._bufferResource = !0,
        this.destroyed = !1,
        this.buffer = e,
        this.offset = r | 0,
        this.size = n,
        this.buffer.on("change", this.onBufferChange, this)
    }
    onBufferChange() {
        this._resourceId = Dt("resource"),
        this.emit("change", this)
    }
    destroy(e=!1) {
        this.destroyed = !0,
        e && this.buffer.destroy(),
        this.emit("change", this),
        this.buffer = null,
        this.removeAllListeners()
    }
}
function Dfe(t, e) {
    const r = []
      , n = [`
        var g = s.groups;
        var sS = r.shader;
        var p = s.glProgram;
        var ugS = r.uniformGroup;
        var resources;
    `];
    let i = !1
      , o = 0;
    const s = e._getProgramData(t.glProgram);
    for (const l in t.groups) {
        const c = t.groups[l];
        r.push(`
            resources = g[${l}].resources;
        `);
        for (const u in c.resources) {
            const f = c.resources[u];
            if (f instanceof vn)
                if (f.ubo) {
                    const d = t._uniformBindMap[l][Number(u)];
                    r.push(`
                        sS.bindUniformBlock(
                            resources[${u}],
                            '${d}',
                            ${t.glProgram._uniformBlockData[d].index}
                        );
                    `)
                } else
                    r.push(`
                        ugS.updateUniformGroup(resources[${u}], p, sD);
                    `);
            else if (f instanceof Ub) {
                const d = t._uniformBindMap[l][Number(u)];
                r.push(`
                    sS.bindUniformBlock(
                        resources[${u}],
                        '${d}',
                        ${t.glProgram._uniformBlockData[d].index}
                    );
                `)
            } else if (f instanceof Br) {
                const d = t._uniformBindMap[l][u]
                  , h = s.uniformData[d];
                h && (i || (i = !0,
                n.push(`
                        var tS = r.texture;
                        `)),
                e._gl.uniform1i(h.location, o),
                r.push(`
                        tS.bind(resources[${u}], ${o});
                    `),
                o++)
            }
        }
    }
    const a = [...n, ...r].join(`
`);
    return new Function("r","s","sD",a)
}
class Ffe {
    constructor(e, r) {
        this.program = e,
        this.uniformData = r,
        this.uniformGroups = {},
        this.uniformDirtyGroups = {},
        this.uniformBlockBindings = {}
    }
    destroy() {
        this.uniformData = null,
        this.uniformGroups = null,
        this.uniformDirtyGroups = null,
        this.uniformBlockBindings = null,
        this.program = null
    }
}
function I3(t, e, r) {
    const n = t.createShader(e);
    return t.shaderSource(n, r),
    t.compileShader(n),
    n
}
function cm(t) {
    const e = new Array(t);
    for (let r = 0; r < e.length; r++)
        e[r] = !1;
    return e
}
function WI(t, e) {
    switch (t) {
    case "float":
        return 0;
    case "vec2":
        return new Float32Array(2 * e);
    case "vec3":
        return new Float32Array(3 * e);
    case "vec4":
        return new Float32Array(4 * e);
    case "int":
    case "uint":
    case "sampler2D":
    case "sampler2DArray":
        return 0;
    case "ivec2":
        return new Int32Array(2 * e);
    case "ivec3":
        return new Int32Array(3 * e);
    case "ivec4":
        return new Int32Array(4 * e);
    case "uvec2":
        return new Uint32Array(2 * e);
    case "uvec3":
        return new Uint32Array(3 * e);
    case "uvec4":
        return new Uint32Array(4 * e);
    case "bool":
        return !1;
    case "bvec2":
        return cm(2 * e);
    case "bvec3":
        return cm(3 * e);
    case "bvec4":
        return cm(4 * e);
    case "mat2":
        return new Float32Array([1, 0, 0, 1]);
    case "mat3":
        return new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1]);
    case "mat4":
        return new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1])
    }
    return null
}
let Ah = null;
const O3 = {
    FLOAT: "float",
    FLOAT_VEC2: "vec2",
    FLOAT_VEC3: "vec3",
    FLOAT_VEC4: "vec4",
    INT: "int",
    INT_VEC2: "ivec2",
    INT_VEC3: "ivec3",
    INT_VEC4: "ivec4",
    UNSIGNED_INT: "uint",
    UNSIGNED_INT_VEC2: "uvec2",
    UNSIGNED_INT_VEC3: "uvec3",
    UNSIGNED_INT_VEC4: "uvec4",
    BOOL: "bool",
    BOOL_VEC2: "bvec2",
    BOOL_VEC3: "bvec3",
    BOOL_VEC4: "bvec4",
    FLOAT_MAT2: "mat2",
    FLOAT_MAT3: "mat3",
    FLOAT_MAT4: "mat4",
    SAMPLER_2D: "sampler2D",
    INT_SAMPLER_2D: "sampler2D",
    UNSIGNED_INT_SAMPLER_2D: "sampler2D",
    SAMPLER_CUBE: "samplerCube",
    INT_SAMPLER_CUBE: "samplerCube",
    UNSIGNED_INT_SAMPLER_CUBE: "samplerCube",
    SAMPLER_2D_ARRAY: "sampler2DArray",
    INT_SAMPLER_2D_ARRAY: "sampler2DArray",
    UNSIGNED_INT_SAMPLER_2D_ARRAY: "sampler2DArray"
}
  , Pfe = {
    float: "float32",
    vec2: "float32x2",
    vec3: "float32x3",
    vec4: "float32x4",
    int: "sint32",
    ivec2: "sint32x2",
    ivec3: "sint32x3",
    ivec4: "sint32x4",
    uint: "uint32",
    uvec2: "uint32x2",
    uvec3: "uint32x3",
    uvec4: "uint32x4",
    bool: "uint32",
    bvec2: "uint32x2",
    bvec3: "uint32x3",
    bvec4: "uint32x4"
};
function YI(t, e) {
    if (!Ah) {
        const r = Object.keys(O3);
        Ah = {};
        for (let n = 0; n < r.length; ++n) {
            const i = r[n];
            Ah[t[i]] = O3[i]
        }
    }
    return Ah[e]
}
function Ife(t, e) {
    const r = YI(t, e);
    return Pfe[r] || "float32"
}
function Ofe(t, e, r=!1) {
    const n = {}
      , i = e.getProgramParameter(t, e.ACTIVE_ATTRIBUTES);
    for (let s = 0; s < i; s++) {
        const a = e.getActiveAttrib(t, s);
        if (a.name.startsWith("gl_"))
            continue;
        const l = Ife(e, a.type);
        n[a.name] = {
            location: 0,
            format: l,
            stride: ha(l).stride,
            offset: 0,
            instance: !1,
            start: 0
        }
    }
    const o = Object.keys(n);
    if (r) {
        o.sort( (s, a) => s > a ? 1 : -1);
        for (let s = 0; s < o.length; s++)
            n[o[s]].location = s,
            e.bindAttribLocation(t, s, o[s]);
        e.linkProgram(t)
    } else
        for (let s = 0; s < o.length; s++)
            n[o[s]].location = e.getAttribLocation(t, o[s]);
    return n
}
function kfe(t, e) {
    if (!e.ACTIVE_UNIFORM_BLOCKS)
        return {};
    const r = {}
      , n = e.getProgramParameter(t, e.ACTIVE_UNIFORM_BLOCKS);
    for (let i = 0; i < n; i++) {
        const o = e.getActiveUniformBlockName(t, i)
          , s = e.getUniformBlockIndex(t, o)
          , a = e.getActiveUniformBlockParameter(t, i, e.UNIFORM_BLOCK_DATA_SIZE);
        r[o] = {
            name: o,
            index: s,
            size: a
        }
    }
    return r
}
function Rfe(t, e) {
    const r = {}
      , n = e.getProgramParameter(t, e.ACTIVE_UNIFORMS);
    for (let i = 0; i < n; i++) {
        const o = e.getActiveUniform(t, i)
          , s = o.name.replace(/\[.*?\]$/, "")
          , a = !!o.name.match(/\[.*?\]$/)
          , l = YI(e, o.type);
        r[s] = {
            name: s,
            index: i,
            type: l,
            size: o.size,
            isArray: a,
            value: WI(l, o.size)
        }
    }
    return r
}
function k3(t, e) {
    const r = t.getShaderSource(e).split(`
`).map( (c, u) => `${u}: ${c}`)
      , n = t.getShaderInfoLog(e)
      , i = n.split(`
`)
      , o = {}
      , s = i.map(c => parseFloat(c.replace(/^ERROR\: 0\:([\d]+)\:.*$/, "$1"))).filter(c => c && !o[c] ? (o[c] = !0,
    !0) : !1)
      , a = [""];
    s.forEach(c => {
        r[c - 1] = `%c${r[c - 1]}%c`,
        a.push("background: #FF0000; color:#FFFFFF; font-size: 10px", "font-size: 10px")
    }
    );
    const l = r.join(`
`);
    a[0] = l,
    console.error(n),
    console.groupCollapsed("click to view full shader code"),
    console.warn(...a),
    console.groupEnd()
}
function Mfe(t, e, r, n) {
    t.getProgramParameter(e, t.LINK_STATUS) || (t.getShaderParameter(r, t.COMPILE_STATUS) || k3(t, r),
    t.getShaderParameter(n, t.COMPILE_STATUS) || k3(t, n),
    console.error("PixiJS Error: Could not initialize shader."),
    t.getProgramInfoLog(e) !== "" && console.warn("PixiJS Warning: gl.getProgramInfoLog()", t.getProgramInfoLog(e)))
}
function Nfe(t, e) {
    const r = I3(t, t.VERTEX_SHADER, e.vertex)
      , n = I3(t, t.FRAGMENT_SHADER, e.fragment)
      , i = t.createProgram();
    t.attachShader(i, r),
    t.attachShader(i, n);
    const o = e.transformFeedbackVaryings;
    o && (typeof t.transformFeedbackVaryings != "function" ? Ne("TransformFeedback is not supported but TransformFeedbackVaryings are given.") : t.transformFeedbackVaryings(i, o.names, o.bufferMode === "separate" ? t.SEPARATE_ATTRIBS : t.INTERLEAVED_ATTRIBS)),
    t.linkProgram(i),
    t.getProgramParameter(i, t.LINK_STATUS) || Mfe(t, i, r, n),
    e._attributeData = Ofe(i, t, !/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(e.vertex)),
    e._uniformData = Rfe(i, t),
    e._uniformBlockData = kfe(i, t),
    t.deleteShader(r),
    t.deleteShader(n);
    const s = {};
    for (const l in e._uniformData) {
        const c = e._uniformData[l];
        s[l] = {
            location: t.getUniformLocation(i, l),
            value: WI(c.type, c.size)
        }
    }
    return new Ffe(i,s)
}
const wh = {
    textureCount: 0,
    blockIndex: 0
};
class XI {
    constructor(e) {
        this._activeProgram = null,
        this._programDataHash = Object.create(null),
        this._shaderSyncFunctions = Object.create(null),
        this._renderer = e,
        this._renderer.renderableGC.addManagedHash(this, "_programDataHash")
    }
    contextChange(e) {
        this._gl = e,
        this._programDataHash = Object.create(null),
        this._shaderSyncFunctions = Object.create(null),
        this._activeProgram = null
    }
    bind(e, r) {
        if (this._setProgram(e.glProgram),
        r)
            return;
        wh.textureCount = 0,
        wh.blockIndex = 0;
        let n = this._shaderSyncFunctions[e.glProgram._key];
        n || (n = this._shaderSyncFunctions[e.glProgram._key] = this._generateShaderSync(e, this)),
        this._renderer.buffer.nextBindBase(!!e.glProgram.transformFeedbackVaryings),
        n(this._renderer, e, wh)
    }
    updateUniformGroup(e) {
        this._renderer.uniformGroup.updateUniformGroup(e, this._activeProgram, wh)
    }
    bindUniformBlock(e, r, n=0) {
        const i = this._renderer.buffer
          , o = this._getProgramData(this._activeProgram)
          , s = e._bufferResource;
        s || this._renderer.ubo.updateUniformGroup(e);
        const a = e.buffer
          , l = i.updateBuffer(a)
          , c = i.freeLocationForBufferBase(l);
        if (s) {
            const {offset: f, size: d} = e;
            f === 0 && d === a.data.byteLength ? i.bindBufferBase(l, c) : i.bindBufferRange(l, c, f)
        } else
            i.getLastBindBaseLocation(l) !== c && i.bindBufferBase(l, c);
        const u = this._activeProgram._uniformBlockData[r].index;
        o.uniformBlockBindings[n] !== c && (o.uniformBlockBindings[n] = c,
        this._renderer.gl.uniformBlockBinding(o.program, u, c))
    }
    _setProgram(e) {
        if (this._activeProgram === e)
            return;
        this._activeProgram = e;
        const r = this._getProgramData(e);
        this._gl.useProgram(r.program)
    }
    _getProgramData(e) {
        return this._programDataHash[e._key] || this._createProgramData(e)
    }
    _createProgramData(e) {
        const r = e._key;
        return this._programDataHash[r] = Nfe(this._gl, e),
        this._programDataHash[r]
    }
    destroy() {
        for (const e of Object.keys(this._programDataHash))
            this._programDataHash[e].destroy(),
            this._programDataHash[e] = null;
        this._programDataHash = null,
        this._shaderSyncFunctions = null,
        this._activeProgram = null,
        this._renderer = null,
        this._gl = null
    }
    _generateShaderSync(e, r) {
        return Dfe(e, r)
    }
    resetState() {
        this._activeProgram = null
    }
}
XI.extension = {
    type: [X.WebGLSystem],
    name: "shader"
};
const Lfe = {
    f32: `if (cv !== v) {
            cu.value = v;
            gl.uniform1f(location, v);
        }`,
    "vec2<f32>": `if (cv[0] !== v[0] || cv[1] !== v[1]) {
            cv[0] = v[0];
            cv[1] = v[1];
            gl.uniform2f(location, v[0], v[1]);
        }`,
    "vec3<f32>": `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
            cv[0] = v[0];
            cv[1] = v[1];
            cv[2] = v[2];
            gl.uniform3f(location, v[0], v[1], v[2]);
        }`,
    "vec4<f32>": `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
            cv[0] = v[0];
            cv[1] = v[1];
            cv[2] = v[2];
            cv[3] = v[3];
            gl.uniform4f(location, v[0], v[1], v[2], v[3]);
        }`,
    i32: `if (cv !== v) {
            cu.value = v;
            gl.uniform1i(location, v);
        }`,
    "vec2<i32>": `if (cv[0] !== v[0] || cv[1] !== v[1]) {
            cv[0] = v[0];
            cv[1] = v[1];
            gl.uniform2i(location, v[0], v[1]);
        }`,
    "vec3<i32>": `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
            cv[0] = v[0];
            cv[1] = v[1];
            cv[2] = v[2];
            gl.uniform3i(location, v[0], v[1], v[2]);
        }`,
    "vec4<i32>": `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
            cv[0] = v[0];
            cv[1] = v[1];
            cv[2] = v[2];
            cv[3] = v[3];
            gl.uniform4i(location, v[0], v[1], v[2], v[3]);
        }`,
    u32: `if (cv !== v) {
            cu.value = v;
            gl.uniform1ui(location, v);
        }`,
    "vec2<u32>": `if (cv[0] !== v[0] || cv[1] !== v[1]) {
            cv[0] = v[0];
            cv[1] = v[1];
            gl.uniform2ui(location, v[0], v[1]);
        }`,
    "vec3<u32>": `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
            cv[0] = v[0];
            cv[1] = v[1];
            cv[2] = v[2];
            gl.uniform3ui(location, v[0], v[1], v[2]);
        }`,
    "vec4<u32>": `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
            cv[0] = v[0];
            cv[1] = v[1];
            cv[2] = v[2];
            cv[3] = v[3];
            gl.uniform4ui(location, v[0], v[1], v[2], v[3]);
        }`,
    bool: `if (cv !== v) {
            cu.value = v;
            gl.uniform1i(location, v);
        }`,
    "vec2<bool>": `if (cv[0] !== v[0] || cv[1] !== v[1]) {
            cv[0] = v[0];
            cv[1] = v[1];
            gl.uniform2i(location, v[0], v[1]);
        }`,
    "vec3<bool>": `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
            cv[0] = v[0];
            cv[1] = v[1];
            cv[2] = v[2];
            gl.uniform3i(location, v[0], v[1], v[2]);
        }`,
    "vec4<bool>": `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
            cv[0] = v[0];
            cv[1] = v[1];
            cv[2] = v[2];
            cv[3] = v[3];
            gl.uniform4i(location, v[0], v[1], v[2], v[3]);
        }`,
    "mat2x2<f32>": "gl.uniformMatrix2fv(location, false, v);",
    "mat3x3<f32>": "gl.uniformMatrix3fv(location, false, v);",
    "mat4x4<f32>": "gl.uniformMatrix4fv(location, false, v);"
}
  , $fe = {
    f32: "gl.uniform1fv(location, v);",
    "vec2<f32>": "gl.uniform2fv(location, v);",
    "vec3<f32>": "gl.uniform3fv(location, v);",
    "vec4<f32>": "gl.uniform4fv(location, v);",
    "mat2x2<f32>": "gl.uniformMatrix2fv(location, false, v);",
    "mat3x3<f32>": "gl.uniformMatrix3fv(location, false, v);",
    "mat4x4<f32>": "gl.uniformMatrix4fv(location, false, v);",
    i32: "gl.uniform1iv(location, v);",
    "vec2<i32>": "gl.uniform2iv(location, v);",
    "vec3<i32>": "gl.uniform3iv(location, v);",
    "vec4<i32>": "gl.uniform4iv(location, v);",
    u32: "gl.uniform1iv(location, v);",
    "vec2<u32>": "gl.uniform2iv(location, v);",
    "vec3<u32>": "gl.uniform3iv(location, v);",
    "vec4<u32>": "gl.uniform4iv(location, v);",
    bool: "gl.uniform1iv(location, v);",
    "vec2<bool>": "gl.uniform2iv(location, v);",
    "vec3<bool>": "gl.uniform3iv(location, v);",
    "vec4<bool>": "gl.uniform4iv(location, v);"
};
function Ufe(t, e) {
    const r = [`
        var v = null;
        var cv = null;
        var cu = null;
        var t = 0;
        var gl = renderer.gl;
        var name = null;
    `];
    for (const n in t.uniforms) {
        if (!e[n]) {
            t.uniforms[n]instanceof vn ? t.uniforms[n].ubo ? r.push(`
                        renderer.shader.bindUniformBlock(uv.${n}, "${n}");
                    `) : r.push(`
                        renderer.shader.updateUniformGroup(uv.${n});
                    `) : t.uniforms[n]instanceof Ub && r.push(`
                        renderer.shader.bindBufferResource(uv.${n}, "${n}");
                    `);
            continue
        }
        const i = t.uniformStructures[n];
        let o = !1;
        for (let s = 0; s < Qa.length; s++) {
            const a = Qa[s];
            if (i.type === a.type && a.test(i)) {
                r.push(`name = "${n}";`, Qa[s].uniform),
                o = !0;
                break
            }
        }
        if (!o) {
            const a = (i.size === 1 ? Lfe : $fe)[i.type].replace("location", `ud["${n}"].location`);
            r.push(`
            cu = ud["${n}"];
            cv = cu.value;
            v = uv["${n}"];
            ${a};`)
        }
    }
    return new Function("ud","uv","renderer","syncData",r.join(`
`))
}
class KI {
    constructor(e) {
        this._cache = {},
        this._uniformGroupSyncHash = {},
        this._renderer = e,
        this.gl = null,
        this._cache = {}
    }
    contextChange(e) {
        this.gl = e
    }
    updateUniformGroup(e, r, n) {
        const i = this._renderer.shader._getProgramData(r);
        (!e.isStatic || e._dirtyId !== i.uniformDirtyGroups[e.uid]) && (i.uniformDirtyGroups[e.uid] = e._dirtyId,
        this._getUniformSyncFunction(e, r)(i.uniformData, e.uniforms, this._renderer, n))
    }
    _getUniformSyncFunction(e, r) {
        var n;
        return ((n = this._uniformGroupSyncHash[e._signature]) == null ? void 0 : n[r._key]) || this._createUniformSyncFunction(e, r)
    }
    _createUniformSyncFunction(e, r) {
        const n = this._uniformGroupSyncHash[e._signature] || (this._uniformGroupSyncHash[e._signature] = {})
          , i = this._getSignature(e, r._uniformData, "u");
        return this._cache[i] || (this._cache[i] = this._generateUniformsSync(e, r._uniformData)),
        n[r._key] = this._cache[i],
        n[r._key]
    }
    _generateUniformsSync(e, r) {
        return Ufe(e, r)
    }
    _getSignature(e, r, n) {
        const i = e.uniforms
          , o = [`${n}-`];
        for (const s in i)
            o.push(s),
            r[s] && o.push(r[s].type);
        return o.join("-")
    }
    destroy() {
        this._renderer = null,
        this._cache = null
    }
}
KI.extension = {
    type: [X.WebGLSystem],
    name: "uniformGroup"
};
function Gfe(t) {
    const e = {};
    if (e.normal = [t.ONE, t.ONE_MINUS_SRC_ALPHA],
    e.add = [t.ONE, t.ONE],
    e.multiply = [t.DST_COLOR, t.ONE_MINUS_SRC_ALPHA, t.ONE, t.ONE_MINUS_SRC_ALPHA],
    e.screen = [t.ONE, t.ONE_MINUS_SRC_COLOR, t.ONE, t.ONE_MINUS_SRC_ALPHA],
    e.none = [0, 0],
    e["normal-npm"] = [t.SRC_ALPHA, t.ONE_MINUS_SRC_ALPHA, t.ONE, t.ONE_MINUS_SRC_ALPHA],
    e["add-npm"] = [t.SRC_ALPHA, t.ONE, t.ONE, t.ONE],
    e["screen-npm"] = [t.SRC_ALPHA, t.ONE_MINUS_SRC_COLOR, t.ONE, t.ONE_MINUS_SRC_ALPHA],
    e.erase = [t.ZERO, t.ONE_MINUS_SRC_ALPHA],
    !(t instanceof je.get().getWebGLRenderingContext()))
        e.min = [t.ONE, t.ONE, t.ONE, t.ONE, t.MIN, t.MIN],
        e.max = [t.ONE, t.ONE, t.ONE, t.ONE, t.MAX, t.MAX];
    else {
        const n = t.getExtension("EXT_blend_minmax");
        n && (e.min = [t.ONE, t.ONE, t.ONE, t.ONE, n.MIN_EXT, n.MIN_EXT],
        e.max = [t.ONE, t.ONE, t.ONE, t.ONE, n.MAX_EXT, n.MAX_EXT])
    }
    return e
}
const Hfe = 0
  , Vfe = 1
  , zfe = 2
  , jfe = 3
  , Wfe = 4
  , Yfe = 5
  , qI = class yE {
    constructor(e) {
        this._invertFrontFace = !1,
        this.gl = null,
        this.stateId = 0,
        this.polygonOffset = 0,
        this.blendMode = "none",
        this._blendEq = !1,
        this.map = [],
        this.map[Hfe] = this.setBlend,
        this.map[Vfe] = this.setOffset,
        this.map[zfe] = this.setCullFace,
        this.map[jfe] = this.setDepthTest,
        this.map[Wfe] = this.setFrontFace,
        this.map[Yfe] = this.setDepthMask,
        this.checks = [],
        this.defaultState = Hi.for2d(),
        e.renderTarget.onRenderTargetChange.add(this)
    }
    onRenderTargetChange(e) {
        this._invertFrontFace = !e.isRoot,
        this._cullFace ? this.setFrontFace(this._frontFace) : this._frontFaceDirty = !0
    }
    contextChange(e) {
        this.gl = e,
        this.blendModesMap = Gfe(e),
        this.resetState()
    }
    set(e) {
        if (e || (e = this.defaultState),
        this.stateId !== e.data) {
            let r = this.stateId ^ e.data
              , n = 0;
            for (; r; )
                r & 1 && this.map[n].call(this, !!(e.data & 1 << n)),
                r >>= 1,
                n++;
            this.stateId = e.data
        }
        for (let r = 0; r < this.checks.length; r++)
            this.checks[r](this, e)
    }
    forceState(e) {
        e || (e = this.defaultState);
        for (let r = 0; r < this.map.length; r++)
            this.map[r].call(this, !!(e.data & 1 << r));
        for (let r = 0; r < this.checks.length; r++)
            this.checks[r](this, e);
        this.stateId = e.data
    }
    setBlend(e) {
        this._updateCheck(yE._checkBlendMode, e),
        this.gl[e ? "enable" : "disable"](this.gl.BLEND)
    }
    setOffset(e) {
        this._updateCheck(yE._checkPolygonOffset, e),
        this.gl[e ? "enable" : "disable"](this.gl.POLYGON_OFFSET_FILL)
    }
    setDepthTest(e) {
        this.gl[e ? "enable" : "disable"](this.gl.DEPTH_TEST)
    }
    setDepthMask(e) {
        this.gl.depthMask(e)
    }
    setCullFace(e) {
        this._cullFace = e,
        this.gl[e ? "enable" : "disable"](this.gl.CULL_FACE),
        this._cullFace && this._frontFaceDirty && this.setFrontFace(this._frontFace)
    }
    setFrontFace(e) {
        this._frontFace = e,
        this._frontFaceDirty = !1;
        const r = this._invertFrontFace ? !e : e;
        this._glFrontFace !== r && (this._glFrontFace = r,
        this.gl.frontFace(this.gl[r ? "CW" : "CCW"]))
    }
    setBlendMode(e) {
        if (this.blendModesMap[e] || (e = "normal"),
        e === this.blendMode)
            return;
        this.blendMode = e;
        const r = this.blendModesMap[e]
          , n = this.gl;
        r.length === 2 ? n.blendFunc(r[0], r[1]) : n.blendFuncSeparate(r[0], r[1], r[2], r[3]),
        r.length === 6 ? (this._blendEq = !0,
        n.blendEquationSeparate(r[4], r[5])) : this._blendEq && (this._blendEq = !1,
        n.blendEquationSeparate(n.FUNC_ADD, n.FUNC_ADD))
    }
    setPolygonOffset(e, r) {
        this.gl.polygonOffset(e, r)
    }
    resetState() {
        this._glFrontFace = !1,
        this._frontFace = !1,
        this._cullFace = !1,
        this._frontFaceDirty = !1,
        this._invertFrontFace = !1,
        this.gl.frontFace(this.gl.CCW),
        this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL, !1),
        this.forceState(this.defaultState),
        this._blendEq = !0,
        this.blendMode = "",
        this.setBlendMode("normal")
    }
    _updateCheck(e, r) {
        const n = this.checks.indexOf(e);
        r && n === -1 ? this.checks.push(e) : !r && n !== -1 && this.checks.splice(n, 1)
    }
    static _checkBlendMode(e, r) {
        e.setBlendMode(r.blendMode)
    }
    static _checkPolygonOffset(e, r) {
        e.setPolygonOffset(1, r.polygonOffset)
    }
    destroy() {
        this.gl = null,
        this.checks.length = 0
    }
}
;
qI.extension = {
    type: [X.WebGLSystem],
    name: "state"
};
let Xfe = qI;
class Kfe {
    constructor(e) {
        this.target = DI.TEXTURE_2D,
        this.texture = e,
        this.width = -1,
        this.height = -1,
        this.type = ut.UNSIGNED_BYTE,
        this.internalFormat = mE.RGBA,
        this.format = mE.RGBA,
        this.samplerType = 0
    }
}
const qfe = {
    id: "buffer",
    upload(t, e, r) {
        e.width === t.width || e.height === t.height ? r.texSubImage2D(r.TEXTURE_2D, 0, 0, 0, t.width, t.height, e.format, e.type, t.resource) : r.texImage2D(e.target, 0, e.internalFormat, t.width, t.height, 0, e.format, e.type, t.resource),
        e.width = t.width,
        e.height = t.height
    }
}
  , Zfe = {
    "bc1-rgba-unorm": !0,
    "bc1-rgba-unorm-srgb": !0,
    "bc2-rgba-unorm": !0,
    "bc2-rgba-unorm-srgb": !0,
    "bc3-rgba-unorm": !0,
    "bc3-rgba-unorm-srgb": !0,
    "bc4-r-unorm": !0,
    "bc4-r-snorm": !0,
    "bc5-rg-unorm": !0,
    "bc5-rg-snorm": !0,
    "bc6h-rgb-ufloat": !0,
    "bc6h-rgb-float": !0,
    "bc7-rgba-unorm": !0,
    "bc7-rgba-unorm-srgb": !0,
    "etc2-rgb8unorm": !0,
    "etc2-rgb8unorm-srgb": !0,
    "etc2-rgb8a1unorm": !0,
    "etc2-rgb8a1unorm-srgb": !0,
    "etc2-rgba8unorm": !0,
    "etc2-rgba8unorm-srgb": !0,
    "eac-r11unorm": !0,
    "eac-r11snorm": !0,
    "eac-rg11unorm": !0,
    "eac-rg11snorm": !0,
    "astc-4x4-unorm": !0,
    "astc-4x4-unorm-srgb": !0,
    "astc-5x4-unorm": !0,
    "astc-5x4-unorm-srgb": !0,
    "astc-5x5-unorm": !0,
    "astc-5x5-unorm-srgb": !0,
    "astc-6x5-unorm": !0,
    "astc-6x5-unorm-srgb": !0,
    "astc-6x6-unorm": !0,
    "astc-6x6-unorm-srgb": !0,
    "astc-8x5-unorm": !0,
    "astc-8x5-unorm-srgb": !0,
    "astc-8x6-unorm": !0,
    "astc-8x6-unorm-srgb": !0,
    "astc-8x8-unorm": !0,
    "astc-8x8-unorm-srgb": !0,
    "astc-10x5-unorm": !0,
    "astc-10x5-unorm-srgb": !0,
    "astc-10x6-unorm": !0,
    "astc-10x6-unorm-srgb": !0,
    "astc-10x8-unorm": !0,
    "astc-10x8-unorm-srgb": !0,
    "astc-10x10-unorm": !0,
    "astc-10x10-unorm-srgb": !0,
    "astc-12x10-unorm": !0,
    "astc-12x10-unorm-srgb": !0,
    "astc-12x12-unorm": !0,
    "astc-12x12-unorm-srgb": !0
}
  , Jfe = {
    id: "compressed",
    upload(t, e, r) {
        r.pixelStorei(r.UNPACK_ALIGNMENT, 4);
        let n = t.pixelWidth
          , i = t.pixelHeight;
        const o = !!Zfe[t.format];
        for (let s = 0; s < t.resource.length; s++) {
            const a = t.resource[s];
            o ? r.compressedTexImage2D(r.TEXTURE_2D, s, e.internalFormat, n, i, 0, a) : r.texImage2D(r.TEXTURE_2D, s, e.internalFormat, n, i, 0, e.format, e.type, a),
            n = Math.max(n >> 1, 1),
            i = Math.max(i >> 1, 1)
        }
    }
}
  , ZI = {
    id: "image",
    upload(t, e, r, n) {
        const i = e.width
          , o = e.height
          , s = t.pixelWidth
          , a = t.pixelHeight
          , l = t.resourceWidth
          , c = t.resourceHeight;
        l < s || c < a ? ((i !== s || o !== a) && r.texImage2D(e.target, 0, e.internalFormat, s, a, 0, e.format, e.type, null),
        n === 2 ? r.texSubImage2D(r.TEXTURE_2D, 0, 0, 0, l, c, e.format, e.type, t.resource) : r.texSubImage2D(r.TEXTURE_2D, 0, 0, 0, e.format, e.type, t.resource)) : i === s && o === a ? r.texSubImage2D(r.TEXTURE_2D, 0, 0, 0, e.format, e.type, t.resource) : n === 2 ? r.texImage2D(e.target, 0, e.internalFormat, s, a, 0, e.format, e.type, t.resource) : r.texImage2D(e.target, 0, e.internalFormat, e.format, e.type, t.resource),
        e.width = s,
        e.height = a
    }
}
  , Qfe = {
    id: "video",
    upload(t, e, r, n) {
        if (!t.isValid) {
            r.texImage2D(e.target, 0, e.internalFormat, 1, 1, 0, e.format, e.type, null);
            return
        }
        ZI.upload(t, e, r, n)
    }
}
  , R3 = {
    linear: 9729,
    nearest: 9728
}
  , ede = {
    linear: {
        linear: 9987,
        nearest: 9985
    },
    nearest: {
        linear: 9986,
        nearest: 9984
    }
}
  , um = {
    "clamp-to-edge": 33071,
    repeat: 10497,
    "mirror-repeat": 33648
}
  , tde = {
    never: 512,
    less: 513,
    equal: 514,
    "less-equal": 515,
    greater: 516,
    "not-equal": 517,
    "greater-equal": 518,
    always: 519
};
function M3(t, e, r, n, i, o, s, a) {
    const l = o;
    if (!a || t.addressModeU !== "repeat" || t.addressModeV !== "repeat" || t.addressModeW !== "repeat") {
        const c = um[s ? "clamp-to-edge" : t.addressModeU]
          , u = um[s ? "clamp-to-edge" : t.addressModeV]
          , f = um[s ? "clamp-to-edge" : t.addressModeW];
        e[i](l, e.TEXTURE_WRAP_S, c),
        e[i](l, e.TEXTURE_WRAP_T, u),
        e.TEXTURE_WRAP_R && e[i](l, e.TEXTURE_WRAP_R, f)
    }
    if ((!a || t.magFilter !== "linear") && e[i](l, e.TEXTURE_MAG_FILTER, R3[t.magFilter]),
    r) {
        if (!a || t.mipmapFilter !== "linear") {
            const c = ede[t.minFilter][t.mipmapFilter];
            e[i](l, e.TEXTURE_MIN_FILTER, c)
        }
    } else
        e[i](l, e.TEXTURE_MIN_FILTER, R3[t.minFilter]);
    if (n && t.maxAnisotropy > 1) {
        const c = Math.min(t.maxAnisotropy, e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT));
        e[i](l, n.TEXTURE_MAX_ANISOTROPY_EXT, c)
    }
    t.compare && e[i](l, e.TEXTURE_COMPARE_FUNC, tde[t.compare])
}
function rde(t) {
    return {
        r8unorm: t.RED,
        r8snorm: t.RED,
        r8uint: t.RED,
        r8sint: t.RED,
        r16uint: t.RED,
        r16sint: t.RED,
        r16float: t.RED,
        rg8unorm: t.RG,
        rg8snorm: t.RG,
        rg8uint: t.RG,
        rg8sint: t.RG,
        r32uint: t.RED,
        r32sint: t.RED,
        r32float: t.RED,
        rg16uint: t.RG,
        rg16sint: t.RG,
        rg16float: t.RG,
        rgba8unorm: t.RGBA,
        "rgba8unorm-srgb": t.RGBA,
        rgba8snorm: t.RGBA,
        rgba8uint: t.RGBA,
        rgba8sint: t.RGBA,
        bgra8unorm: t.RGBA,
        "bgra8unorm-srgb": t.RGBA,
        rgb9e5ufloat: t.RGB,
        rgb10a2unorm: t.RGBA,
        rg11b10ufloat: t.RGB,
        rg32uint: t.RG,
        rg32sint: t.RG,
        rg32float: t.RG,
        rgba16uint: t.RGBA,
        rgba16sint: t.RGBA,
        rgba16float: t.RGBA,
        rgba32uint: t.RGBA,
        rgba32sint: t.RGBA,
        rgba32float: t.RGBA,
        stencil8: t.STENCIL_INDEX8,
        depth16unorm: t.DEPTH_COMPONENT,
        depth24plus: t.DEPTH_COMPONENT,
        "depth24plus-stencil8": t.DEPTH_STENCIL,
        depth32float: t.DEPTH_COMPONENT,
        "depth32float-stencil8": t.DEPTH_STENCIL
    }
}
function nde(t, e) {
    let r = {}
      , n = t.RGBA;
    return t instanceof je.get().getWebGLRenderingContext() ? e.srgb && (r = {
        "rgba8unorm-srgb": e.srgb.SRGB8_ALPHA8_EXT,
        "bgra8unorm-srgb": e.srgb.SRGB8_ALPHA8_EXT
    }) : (r = {
        "rgba8unorm-srgb": t.SRGB8_ALPHA8,
        "bgra8unorm-srgb": t.SRGB8_ALPHA8
    },
    n = t.RGBA8),
    {
        r8unorm: t.R8,
        r8snorm: t.R8_SNORM,
        r8uint: t.R8UI,
        r8sint: t.R8I,
        r16uint: t.R16UI,
        r16sint: t.R16I,
        r16float: t.R16F,
        rg8unorm: t.RG8,
        rg8snorm: t.RG8_SNORM,
        rg8uint: t.RG8UI,
        rg8sint: t.RG8I,
        r32uint: t.R32UI,
        r32sint: t.R32I,
        r32float: t.R32F,
        rg16uint: t.RG16UI,
        rg16sint: t.RG16I,
        rg16float: t.RG16F,
        rgba8unorm: t.RGBA,
        ...r,
        rgba8snorm: t.RGBA8_SNORM,
        rgba8uint: t.RGBA8UI,
        rgba8sint: t.RGBA8I,
        bgra8unorm: n,
        rgb9e5ufloat: t.RGB9_E5,
        rgb10a2unorm: t.RGB10_A2,
        rg11b10ufloat: t.R11F_G11F_B10F,
        rg32uint: t.RG32UI,
        rg32sint: t.RG32I,
        rg32float: t.RG32F,
        rgba16uint: t.RGBA16UI,
        rgba16sint: t.RGBA16I,
        rgba16float: t.RGBA16F,
        rgba32uint: t.RGBA32UI,
        rgba32sint: t.RGBA32I,
        rgba32float: t.RGBA32F,
        stencil8: t.STENCIL_INDEX8,
        depth16unorm: t.DEPTH_COMPONENT16,
        depth24plus: t.DEPTH_COMPONENT24,
        "depth24plus-stencil8": t.DEPTH24_STENCIL8,
        depth32float: t.DEPTH_COMPONENT32F,
        "depth32float-stencil8": t.DEPTH32F_STENCIL8,
        ...e.s3tc ? {
            "bc1-rgba-unorm": e.s3tc.COMPRESSED_RGBA_S3TC_DXT1_EXT,
            "bc2-rgba-unorm": e.s3tc.COMPRESSED_RGBA_S3TC_DXT3_EXT,
            "bc3-rgba-unorm": e.s3tc.COMPRESSED_RGBA_S3TC_DXT5_EXT
        } : {},
        ...e.s3tc_sRGB ? {
            "bc1-rgba-unorm-srgb": e.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,
            "bc2-rgba-unorm-srgb": e.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,
            "bc3-rgba-unorm-srgb": e.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT
        } : {},
        ...e.rgtc ? {
            "bc4-r-unorm": e.rgtc.COMPRESSED_RED_RGTC1_EXT,
            "bc4-r-snorm": e.rgtc.COMPRESSED_SIGNED_RED_RGTC1_EXT,
            "bc5-rg-unorm": e.rgtc.COMPRESSED_RED_GREEN_RGTC2_EXT,
            "bc5-rg-snorm": e.rgtc.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT
        } : {},
        ...e.bptc ? {
            "bc6h-rgb-float": e.bptc.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT,
            "bc6h-rgb-ufloat": e.bptc.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT,
            "bc7-rgba-unorm": e.bptc.COMPRESSED_RGBA_BPTC_UNORM_EXT,
            "bc7-rgba-unorm-srgb": e.bptc.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT
        } : {},
        ...e.etc ? {
            "etc2-rgb8unorm": e.etc.COMPRESSED_RGB8_ETC2,
            "etc2-rgb8unorm-srgb": e.etc.COMPRESSED_SRGB8_ETC2,
            "etc2-rgb8a1unorm": e.etc.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,
            "etc2-rgb8a1unorm-srgb": e.etc.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,
            "etc2-rgba8unorm": e.etc.COMPRESSED_RGBA8_ETC2_EAC,
            "etc2-rgba8unorm-srgb": e.etc.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,
            "eac-r11unorm": e.etc.COMPRESSED_R11_EAC,
            "eac-rg11unorm": e.etc.COMPRESSED_SIGNED_RG11_EAC
        } : {},
        ...e.astc ? {
            "astc-4x4-unorm": e.astc.COMPRESSED_RGBA_ASTC_4x4_KHR,
            "astc-4x4-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,
            "astc-5x4-unorm": e.astc.COMPRESSED_RGBA_ASTC_5x4_KHR,
            "astc-5x4-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR,
            "astc-5x5-unorm": e.astc.COMPRESSED_RGBA_ASTC_5x5_KHR,
            "astc-5x5-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,
            "astc-6x5-unorm": e.astc.COMPRESSED_RGBA_ASTC_6x5_KHR,
            "astc-6x5-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,
            "astc-6x6-unorm": e.astc.COMPRESSED_RGBA_ASTC_6x6_KHR,
            "astc-6x6-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,
            "astc-8x5-unorm": e.astc.COMPRESSED_RGBA_ASTC_8x5_KHR,
            "astc-8x5-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,
            "astc-8x6-unorm": e.astc.COMPRESSED_RGBA_ASTC_8x6_KHR,
            "astc-8x6-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,
            "astc-8x8-unorm": e.astc.COMPRESSED_RGBA_ASTC_8x8_KHR,
            "astc-8x8-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,
            "astc-10x5-unorm": e.astc.COMPRESSED_RGBA_ASTC_10x5_KHR,
            "astc-10x5-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,
            "astc-10x6-unorm": e.astc.COMPRESSED_RGBA_ASTC_10x6_KHR,
            "astc-10x6-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,
            "astc-10x8-unorm": e.astc.COMPRESSED_RGBA_ASTC_10x8_KHR,
            "astc-10x8-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,
            "astc-10x10-unorm": e.astc.COMPRESSED_RGBA_ASTC_10x10_KHR,
            "astc-10x10-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,
            "astc-12x10-unorm": e.astc.COMPRESSED_RGBA_ASTC_12x10_KHR,
            "astc-12x10-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,
            "astc-12x12-unorm": e.astc.COMPRESSED_RGBA_ASTC_12x12_KHR,
            "astc-12x12-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR
        } : {}
    }
}
function ide(t) {
    return {
        r8unorm: t.UNSIGNED_BYTE,
        r8snorm: t.BYTE,
        r8uint: t.UNSIGNED_BYTE,
        r8sint: t.BYTE,
        r16uint: t.UNSIGNED_SHORT,
        r16sint: t.SHORT,
        r16float: t.HALF_FLOAT,
        rg8unorm: t.UNSIGNED_BYTE,
        rg8snorm: t.BYTE,
        rg8uint: t.UNSIGNED_BYTE,
        rg8sint: t.BYTE,
        r32uint: t.UNSIGNED_INT,
        r32sint: t.INT,
        r32float: t.FLOAT,
        rg16uint: t.UNSIGNED_SHORT,
        rg16sint: t.SHORT,
        rg16float: t.HALF_FLOAT,
        rgba8unorm: t.UNSIGNED_BYTE,
        "rgba8unorm-srgb": t.UNSIGNED_BYTE,
        rgba8snorm: t.BYTE,
        rgba8uint: t.UNSIGNED_BYTE,
        rgba8sint: t.BYTE,
        bgra8unorm: t.UNSIGNED_BYTE,
        "bgra8unorm-srgb": t.UNSIGNED_BYTE,
        rgb9e5ufloat: t.UNSIGNED_INT_5_9_9_9_REV,
        rgb10a2unorm: t.UNSIGNED_INT_2_10_10_10_REV,
        rg11b10ufloat: t.UNSIGNED_INT_10F_11F_11F_REV,
        rg32uint: t.UNSIGNED_INT,
        rg32sint: t.INT,
        rg32float: t.FLOAT,
        rgba16uint: t.UNSIGNED_SHORT,
        rgba16sint: t.SHORT,
        rgba16float: t.HALF_FLOAT,
        rgba32uint: t.UNSIGNED_INT,
        rgba32sint: t.INT,
        rgba32float: t.FLOAT,
        stencil8: t.UNSIGNED_BYTE,
        depth16unorm: t.UNSIGNED_SHORT,
        depth24plus: t.UNSIGNED_INT,
        "depth24plus-stencil8": t.UNSIGNED_INT_24_8,
        depth32float: t.FLOAT,
        "depth32float-stencil8": t.FLOAT_32_UNSIGNED_INT_24_8_REV
    }
}
const ode = 4;
class JI {
    constructor(e) {
        this.managedTextures = [],
        this._glTextures = Object.create(null),
        this._glSamplers = Object.create(null),
        this._boundTextures = [],
        this._activeTextureLocation = -1,
        this._boundSamplers = Object.create(null),
        this._uploads = {
            image: ZI,
            buffer: qfe,
            video: Qfe,
            compressed: Jfe
        },
        this._premultiplyAlpha = !1,
        this._useSeparateSamplers = !1,
        this._renderer = e,
        this._renderer.renderableGC.addManagedHash(this, "_glTextures"),
        this._renderer.renderableGC.addManagedHash(this, "_glSamplers")
    }
    contextChange(e) {
        this._gl = e,
        this._mapFormatToInternalFormat || (this._mapFormatToInternalFormat = nde(e, this._renderer.context.extensions),
        this._mapFormatToType = ide(e),
        this._mapFormatToFormat = rde(e)),
        this._glTextures = Object.create(null),
        this._glSamplers = Object.create(null),
        this._boundSamplers = Object.create(null),
        this._premultiplyAlpha = !1;
        for (let r = 0; r < 16; r++)
            this.bind(Be.EMPTY, r)
    }
    initSource(e) {
        this.bind(e)
    }
    bind(e, r=0) {
        const n = e.source;
        e ? (this.bindSource(n, r),
        this._useSeparateSamplers && this._bindSampler(n.style, r)) : (this.bindSource(null, r),
        this._useSeparateSamplers && this._bindSampler(null, r))
    }
    bindSource(e, r=0) {
        const n = this._gl;
        if (e._touched = this._renderer.textureGC.count,
        this._boundTextures[r] !== e) {
            this._boundTextures[r] = e,
            this._activateLocation(r),
            e || (e = Be.EMPTY.source);
            const i = this.getGlSource(e);
            n.bindTexture(i.target, i.texture)
        }
    }
    _bindSampler(e, r=0) {
        const n = this._gl;
        if (!e) {
            this._boundSamplers[r] = null,
            n.bindSampler(r, null);
            return
        }
        const i = this._getGlSampler(e);
        this._boundSamplers[r] !== i && (this._boundSamplers[r] = i,
        n.bindSampler(r, i))
    }
    unbind(e) {
        const r = e.source
          , n = this._boundTextures
          , i = this._gl;
        for (let o = 0; o < n.length; o++)
            if (n[o] === r) {
                this._activateLocation(o);
                const s = this.getGlSource(r);
                i.bindTexture(s.target, null),
                n[o] = null
            }
    }
    _activateLocation(e) {
        this._activeTextureLocation !== e && (this._activeTextureLocation = e,
        this._gl.activeTexture(this._gl.TEXTURE0 + e))
    }
    _initSource(e) {
        const r = this._gl
          , n = new Kfe(r.createTexture());
        if (n.type = this._mapFormatToType[e.format],
        n.internalFormat = this._mapFormatToInternalFormat[e.format],
        n.format = this._mapFormatToFormat[e.format],
        e.autoGenerateMipmaps && (this._renderer.context.supports.nonPowOf2mipmaps || e.isPowerOfTwo)) {
            const i = Math.max(e.width, e.height);
            e.mipLevelCount = Math.floor(Math.log2(i)) + 1
        }
        return this._glTextures[e.uid] = n,
        this.managedTextures.includes(e) || (e.on("update", this.onSourceUpdate, this),
        e.on("resize", this.onSourceUpdate, this),
        e.on("styleChange", this.onStyleChange, this),
        e.on("destroy", this.onSourceDestroy, this),
        e.on("unload", this.onSourceUnload, this),
        e.on("updateMipmaps", this.onUpdateMipmaps, this),
        this.managedTextures.push(e)),
        this.onSourceUpdate(e),
        this.updateStyle(e, !1),
        n
    }
    onStyleChange(e) {
        this.updateStyle(e, !1)
    }
    updateStyle(e, r) {
        const n = this._gl
          , i = this.getGlSource(e);
        n.bindTexture(n.TEXTURE_2D, i.texture),
        this._boundTextures[this._activeTextureLocation] = e,
        M3(e.style, n, e.mipLevelCount > 1, this._renderer.context.extensions.anisotropicFiltering, "texParameteri", n.TEXTURE_2D, !this._renderer.context.supports.nonPowOf2wrapping && !e.isPowerOfTwo, r)
    }
    onSourceUnload(e) {
        const r = this._glTextures[e.uid];
        r && (this.unbind(e),
        this._glTextures[e.uid] = null,
        this._gl.deleteTexture(r.texture))
    }
    onSourceUpdate(e) {
        const r = this._gl
          , n = this.getGlSource(e);
        r.bindTexture(r.TEXTURE_2D, n.texture),
        this._boundTextures[this._activeTextureLocation] = e;
        const i = e.alphaMode === "premultiply-alpha-on-upload";
        this._premultiplyAlpha !== i && (this._premultiplyAlpha = i,
        r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL, i)),
        this._uploads[e.uploadMethodId] ? this._uploads[e.uploadMethodId].upload(e, n, r, this._renderer.context.webGLVersion) : r.texImage2D(r.TEXTURE_2D, 0, r.RGBA, e.pixelWidth, e.pixelHeight, 0, r.RGBA, r.UNSIGNED_BYTE, null),
        e.autoGenerateMipmaps && e.mipLevelCount > 1 && this.onUpdateMipmaps(e, !1)
    }
    onUpdateMipmaps(e, r=!0) {
        r && this.bindSource(e, 0);
        const n = this.getGlSource(e);
        this._gl.generateMipmap(n.target)
    }
    onSourceDestroy(e) {
        e.off("destroy", this.onSourceDestroy, this),
        e.off("update", this.onSourceUpdate, this),
        e.off("resize", this.onSourceUpdate, this),
        e.off("unload", this.onSourceUnload, this),
        e.off("styleChange", this.onStyleChange, this),
        e.off("updateMipmaps", this.onUpdateMipmaps, this),
        this.managedTextures.splice(this.managedTextures.indexOf(e), 1),
        this.onSourceUnload(e)
    }
    _initSampler(e) {
        const r = this._gl
          , n = this._gl.createSampler();
        return this._glSamplers[e._resourceId] = n,
        M3(e, r, this._boundTextures[this._activeTextureLocation].mipLevelCount > 1, this._renderer.context.extensions.anisotropicFiltering, "samplerParameteri", n, !1, !0),
        this._glSamplers[e._resourceId]
    }
    _getGlSampler(e) {
        return this._glSamplers[e._resourceId] || this._initSampler(e)
    }
    getGlSource(e) {
        return this._glTextures[e.uid] || this._initSource(e)
    }
    generateCanvas(e) {
        const {pixels: r, width: n, height: i} = this.getPixels(e)
          , o = je.get().createCanvas();
        o.width = n,
        o.height = i;
        const s = o.getContext("2d");
        if (s) {
            const a = s.createImageData(n, i);
            a.data.set(r),
            s.putImageData(a, 0, 0)
        }
        return o
    }
    getPixels(e) {
        const r = e.source.resolution
          , n = e.frame
          , i = Math.max(Math.round(n.width * r), 1)
          , o = Math.max(Math.round(n.height * r), 1)
          , s = new Uint8Array(ode * i * o)
          , a = this._renderer
          , l = a.renderTarget.getRenderTarget(e)
          , c = a.renderTarget.getGpuRenderTarget(l)
          , u = a.gl;
        return u.bindFramebuffer(u.FRAMEBUFFER, c.resolveTargetFramebuffer),
        u.readPixels(Math.round(n.x * r), Math.round(n.y * r), i, o, u.RGBA, u.UNSIGNED_BYTE, s),
        {
            pixels: new Uint8ClampedArray(s.buffer),
            width: i,
            height: o
        }
    }
    destroy() {
        this.managedTextures.slice().forEach(e => this.onSourceDestroy(e)),
        this.managedTextures = null,
        this._glTextures = null,
        this._glSamplers = null,
        this._boundTextures = null,
        this._boundSamplers = null,
        this._mapFormatToInternalFormat = null,
        this._mapFormatToType = null,
        this._mapFormatToFormat = null,
        this._uploads = null,
        this._renderer = null
    }
    resetState() {
        this._activeTextureLocation = -1,
        this._boundTextures.fill(Be.EMPTY.source),
        this._boundSamplers = Object.create(null);
        const e = this._gl;
        this._premultiplyAlpha = !1,
        e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, this._premultiplyAlpha)
    }
}
JI.extension = {
    type: [X.WebGLSystem],
    name: "texture"
};
class QI {
    contextChange(e) {
        const r = new vn({
            uColor: {
                value: new Float32Array([1, 1, 1, 1]),
                type: "vec4<f32>"
            },
            uTransformMatrix: {
                value: new Pe,
                type: "mat3x3<f32>"
            },
            uRound: {
                value: 0,
                type: "f32"
            }
        })
          , n = e.limits.maxBatchableTextures
          , i = fd({
            name: "graphics",
            bits: [bb, Ab(n), Nb, hd]
        });
        this.shader = new _i({
            glProgram: i,
            resources: {
                localUniforms: r,
                batchSamplers: wb(n)
            }
        })
    }
    execute(e, r) {
        const n = r.context
          , i = n.customShader || this.shader
          , o = e.renderer
          , s = o.graphicsContext
          , {batcher: a, instructions: l} = s.getContextRenderData(n);
        i.groups[0] = o.globalUniforms.bindGroup,
        o.state.set(e.state),
        o.shader.bind(i),
        o.geometry.bind(a.geometry, i.glProgram);
        const c = l.instructions;
        for (let u = 0; u < l.instructionSize; u++) {
            const f = c[u];
            if (f.size) {
                for (let d = 0; d < f.textures.count; d++)
                    o.texture.bind(f.textures.textures[d], d);
                o.geometry.draw(f.topology, f.size, f.start)
            }
        }
    }
    destroy() {
        this.shader.destroy(!0),
        this.shader = null
    }
}
QI.extension = {
    type: [X.WebGLPipesAdaptor],
    name: "graphics"
};
class eO {
    init() {
        const e = fd({
            name: "mesh",
            bits: [Nb, ffe, hd]
        });
        this._shader = new _i({
            glProgram: e,
            resources: {
                uTexture: Be.EMPTY.source,
                textureUniforms: {
                    uTextureMatrix: {
                        type: "mat3x3<f32>",
                        value: new Pe
                    }
                }
            }
        })
    }
    execute(e, r) {
        const n = e.renderer;
        let i = r._shader;
        if (i) {
            if (!i.glProgram) {
                Ne("Mesh shader has no glProgram", r.shader);
                return
            }
        } else {
            i = this._shader;
            const o = r.texture
              , s = o.source;
            i.resources.uTexture = s,
            i.resources.uSampler = s.style,
            i.resources.textureUniforms.uniforms.uTextureMatrix = o.textureMatrix.mapCoord
        }
        i.groups[100] = n.globalUniforms.bindGroup,
        i.groups[101] = e.localUniformsBindGroup,
        n.encoder.draw({
            geometry: r._geometry,
            shader: i,
            state: r.state
        })
    }
    destroy() {
        this._shader.destroy(!0),
        this._shader = null
    }
}
eO.extension = {
    type: [X.WebGLPipesAdaptor],
    name: "mesh"
};
class tO {
    constructor(e) {
        this._renderer = e
    }
    updateRenderable() {}
    destroyRenderable() {}
    validateRenderable() {
        return !1
    }
    addRenderable(e, r) {
        this._renderer.renderPipes.batch.break(r),
        r.add(e)
    }
    execute(e) {
        e.isRenderable && e.render(this._renderer)
    }
    destroy() {
        this._renderer = null
    }
}
tO.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "customRender"
};
class v1 {
    constructor() {
        this.batcherName = "default",
        this.topology = "triangle-list",
        this.attributeSize = 4,
        this.indexSize = 6,
        this.packAsQuad = !0,
        this.roundPixels = 0,
        this._attributeStart = 0,
        this._batcher = null,
        this._batch = null
    }
    get blendMode() {
        return this.renderable.groupBlendMode
    }
    get color() {
        return this.renderable.groupColorAlpha
    }
    reset() {
        this.renderable = null,
        this.texture = null,
        this._batcher = null,
        this._batch = null,
        this.bounds = null
    }
    destroy() {}
}
function EE(t, e) {
    const r = t.instructionSet
      , n = r.instructions;
    for (let i = 0; i < r.instructionSize; i++) {
        const o = n[i];
        e[o.renderPipeId].execute(o)
    }
}
const sde = new Pe;
class rO {
    constructor(e) {
        this._renderer = e
    }
    addRenderGroup(e, r) {
        e.isCachedAsTexture ? this._addRenderableCacheAsTexture(e, r) : this._addRenderableDirect(e, r)
    }
    execute(e) {
        e.isRenderable && (e.isCachedAsTexture ? this._executeCacheAsTexture(e) : this._executeDirect(e))
    }
    destroy() {
        this._renderer = null
    }
    _addRenderableDirect(e, r) {
        this._renderer.renderPipes.batch.break(r),
        e._batchableRenderGroup && (xr.return(e._batchableRenderGroup),
        e._batchableRenderGroup = null),
        r.add(e)
    }
    _addRenderableCacheAsTexture(e, r) {
        const n = e._batchableRenderGroup ?? (e._batchableRenderGroup = xr.get(v1));
        n.renderable = e.root,
        n.transform = e.root.relativeGroupTransform,
        n.texture = e.texture,
        n.bounds = e._textureBounds,
        r.add(e),
        this._renderer.renderPipes.blendMode.pushBlendMode(e, e.root.groupBlendMode, r),
        this._renderer.renderPipes.batch.addToBatch(n, r),
        this._renderer.renderPipes.blendMode.popBlendMode(r)
    }
    _executeCacheAsTexture(e) {
        if (e.textureNeedsUpdate) {
            e.textureNeedsUpdate = !1;
            const r = sde.identity().translate(-e._textureBounds.x, -e._textureBounds.y);
            this._renderer.renderTarget.push(e.texture, !0, null, e.texture.frame),
            this._renderer.globalUniforms.push({
                worldTransformMatrix: r,
                worldColor: 4294967295,
                offset: {
                    x: 0,
                    y: 0
                }
            }),
            EE(e, this._renderer.renderPipes),
            this._renderer.renderTarget.finishRenderPass(),
            this._renderer.renderTarget.pop(),
            this._renderer.globalUniforms.pop()
        }
        e._batchableRenderGroup._batcher.updateElement(e._batchableRenderGroup),
        e._batchableRenderGroup._batcher.geometry.buffers[0].update()
    }
    _executeDirect(e) {
        this._renderer.globalUniforms.push({
            worldTransformMatrix: e.inverseParentTextureTransform,
            worldColor: e.worldColorAlpha
        }),
        EE(e, this._renderer.renderPipes),
        this._renderer.globalUniforms.pop()
    }
}
rO.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "renderGroup"
};
function _E(t, e) {
    e || (e = 0);
    for (let r = e; r < t.length && t[r]; r++)
        t[r] = null
}
const ade = new Rn
  , N3 = G0 | Nx | xb;
function nO(t, e=!1) {
    lde(t);
    const r = t.childrenToUpdate
      , n = t.updateTick++;
    for (const i in r) {
        const o = Number(i)
          , s = r[i]
          , a = s.list
          , l = s.index;
        for (let c = 0; c < l; c++) {
            const u = a[c];
            u.parentRenderGroup === t && u.relativeRenderGroupDepth === o && iO(u, n, 0)
        }
        _E(a, l),
        s.index = 0
    }
    if (e)
        for (let i = 0; i < t.renderGroupChildren.length; i++)
            nO(t.renderGroupChildren[i], e)
}
function lde(t) {
    const e = t.root;
    let r;
    if (t.renderGroupParent) {
        const n = t.renderGroupParent;
        t.worldTransform.appendFrom(e.relativeGroupTransform, n.worldTransform),
        t.worldColor = Mx(e.groupColor, n.worldColor),
        r = e.groupAlpha * n.worldAlpha
    } else
        t.worldTransform.copyFrom(e.localTransform),
        t.worldColor = e.localColor,
        r = e.localAlpha;
    r = r < 0 ? 0 : r > 1 ? 1 : r,
    t.worldAlpha = r,
    t.worldColorAlpha = t.worldColor + ((r * 255 | 0) << 24)
}
function iO(t, e, r) {
    if (e === t.updateTick)
        return;
    t.updateTick = e,
    t.didChange = !1;
    const n = t.localTransform;
    t.updateLocalTransform();
    const i = t.parent;
    if (i && !i.renderGroup ? (r |= t._updateFlags,
    t.relativeGroupTransform.appendFrom(n, i.relativeGroupTransform),
    r & N3 && L3(t, i, r)) : (r = t._updateFlags,
    t.relativeGroupTransform.copyFrom(n),
    r & N3 && L3(t, ade, r)),
    !t.renderGroup) {
        const o = t.children
          , s = o.length;
        for (let c = 0; c < s; c++)
            iO(o[c], e, r);
        const a = t.parentRenderGroup
          , l = t;
        l.renderPipeId && !a.structureDidChange && a.updateRenderable(l)
    }
}
function L3(t, e, r) {
    if (r & Nx) {
        t.groupColor = Mx(t.localColor, e.groupColor);
        let n = t.localAlpha * e.groupAlpha;
        n = n < 0 ? 0 : n > 1 ? 1 : n,
        t.groupAlpha = n,
        t.groupColorAlpha = t.groupColor + ((n * 255 | 0) << 24)
    }
    r & xb && (t.groupBlendMode = t.localBlendMode === "inherit" ? e.groupBlendMode : t.localBlendMode),
    r & G0 && (t.globalDisplayStatus = t.localDisplayStatus & e.globalDisplayStatus),
    t._updateFlags = 0
}
function cde(t, e) {
    const {list: r} = t.childrenRenderablesToUpdate;
    let n = !1;
    for (let i = 0; i < t.childrenRenderablesToUpdate.index; i++) {
        const o = r[i];
        if (n = e[o.renderPipeId].validateRenderable(o),
        n)
            break
    }
    return t.structureDidChange = n,
    n
}
const ude = new Pe;
class oO {
    constructor(e) {
        this._renderer = e
    }
    render({container: e, transform: r}) {
        const n = e.parent
          , i = e.renderGroup.renderGroupParent;
        e.parent = null,
        e.renderGroup.renderGroupParent = null;
        const o = this._renderer
          , s = ude;
        r && (s.copyFrom(e.renderGroup.localTransform),
        e.renderGroup.localTransform.copyFrom(r));
        const a = o.renderPipes;
        this._updateCachedRenderGroups(e.renderGroup, null),
        this._updateRenderGroups(e.renderGroup),
        o.globalUniforms.start({
            worldTransformMatrix: r ? e.renderGroup.localTransform : e.renderGroup.worldTransform,
            worldColor: e.renderGroup.worldColorAlpha
        }),
        EE(e.renderGroup, a),
        a.uniformBatch && a.uniformBatch.renderEnd(),
        r && e.renderGroup.localTransform.copyFrom(s),
        e.parent = n,
        e.renderGroup.renderGroupParent = i
    }
    destroy() {
        this._renderer = null
    }
    _updateCachedRenderGroups(e, r) {
        if (e._parentCacheAsTextureRenderGroup = r,
        e.isCachedAsTexture) {
            if (!e.textureNeedsUpdate)
                return;
            r = e
        }
        for (let n = e.renderGroupChildren.length - 1; n >= 0; n--)
            this._updateCachedRenderGroups(e.renderGroupChildren[n], r);
        if (e.invalidateMatrices(),
        e.isCachedAsTexture) {
            if (e.textureNeedsUpdate) {
                const n = e.root.getLocalBounds();
                n.ceil();
                const i = e.texture;
                e.texture && sr.returnTexture(e.texture, !0);
                const o = this._renderer
                  , s = e.textureOptions.resolution || o.view.resolution
                  , a = e.textureOptions.antialias ?? o.view.antialias
                  , l = e.textureOptions.scaleMode ?? "linear"
                  , c = sr.getOptimalTexture(n.width, n.height, s, a);
                c._source.style = new wo({
                    scaleMode: l
                }),
                e.texture = c,
                e._textureBounds || (e._textureBounds = new jr),
                e._textureBounds.copyFrom(n),
                i !== e.texture && e.renderGroupParent && (e.renderGroupParent.structureDidChange = !0)
            }
        } else
            e.texture && (sr.returnTexture(e.texture, !0),
            e.texture = null)
    }
    _updateRenderGroups(e) {
        const r = this._renderer
          , n = r.renderPipes;
        if (e.runOnRender(r),
        e.instructionSet.renderPipes = n,
        e.structureDidChange ? _E(e.childrenRenderablesToUpdate.list, 0) : cde(e, n),
        nO(e),
        e.structureDidChange ? (e.structureDidChange = !1,
        this._buildInstructions(e, r)) : this._updateRenderables(e),
        e.childrenRenderablesToUpdate.index = 0,
        r.renderPipes.batch.upload(e.instructionSet),
        !(e.isCachedAsTexture && !e.textureNeedsUpdate))
            for (let i = 0; i < e.renderGroupChildren.length; i++)
                this._updateRenderGroups(e.renderGroupChildren[i])
    }
    _updateRenderables(e) {
        const {list: r, index: n} = e.childrenRenderablesToUpdate;
        for (let i = 0; i < n; i++) {
            const o = r[i];
            o.didViewUpdate && e.updateRenderable(o)
        }
        _E(r, n)
    }
    _buildInstructions(e, r) {
        const n = e.root
          , i = e.instructionSet;
        i.reset();
        const o = r.renderPipes ? r : r.batch.renderer
          , s = o.renderPipes;
        s.batch.buildStart(i),
        s.blendMode.buildStart(),
        s.colorMask.buildStart(),
        n.sortableChildren && n.sortChildren(),
        n.collectRenderablesWithEffects(i, o, null),
        s.batch.buildEnd(i),
        s.blendMode.buildEnd(i)
    }
}
oO.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem, X.CanvasSystem],
    name: "renderGroup"
};
class sO {
    constructor(e) {
        this._renderer = e
    }
    addRenderable(e, r) {
        const n = this._getGpuSprite(e);
        e.didViewUpdate && this._updateBatchableSprite(e, n),
        this._renderer.renderPipes.batch.addToBatch(n, r)
    }
    updateRenderable(e) {
        const r = this._getGpuSprite(e);
        e.didViewUpdate && this._updateBatchableSprite(e, r),
        r._batcher.updateElement(r)
    }
    validateRenderable(e) {
        const r = this._getGpuSprite(e);
        return !r._batcher.checkAndUpdateTexture(r, e._texture)
    }
    _updateBatchableSprite(e, r) {
        r.bounds = e.visualBounds,
        r.texture = e._texture
    }
    _getGpuSprite(e) {
        return e._gpuData[this._renderer.uid] || this._initGPUSprite(e)
    }
    _initGPUSprite(e) {
        const r = new v1;
        return r.renderable = e,
        r.transform = e.groupTransform,
        r.texture = e._texture,
        r.bounds = e.visualBounds,
        r.roundPixels = this._renderer._roundPixels | e._roundPixels,
        e._gpuData[this._renderer.uid] = r,
        r
    }
    destroy() {
        this._renderer = null
    }
}
sO.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "sprite"
};
const Gb = class aO {
    constructor() {
        this.clearBeforeRender = !0,
        this._backgroundColor = new Ut(0),
        this.color = this._backgroundColor,
        this.alpha = 1
    }
    init(e) {
        e = {
            ...aO.defaultOptions,
            ...e
        },
        this.clearBeforeRender = e.clearBeforeRender,
        this.color = e.background || e.backgroundColor || this._backgroundColor,
        this.alpha = e.backgroundAlpha,
        this._backgroundColor.setAlpha(e.backgroundAlpha)
    }
    get color() {
        return this._backgroundColor
    }
    set color(e) {
        Ut.shared.setValue(e).alpha < 1 && this._backgroundColor.alpha === 1 && Ne("Cannot set a transparent background on an opaque canvas. To enable transparency, set backgroundAlpha < 1 when initializing your Application."),
        this._backgroundColor.setValue(e)
    }
    get alpha() {
        return this._backgroundColor.alpha
    }
    set alpha(e) {
        this._backgroundColor.setAlpha(e)
    }
    get colorRgba() {
        return this._backgroundColor.toArray()
    }
    destroy() {}
}
;
Gb.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem, X.CanvasSystem],
    name: "background",
    priority: 0
};
Gb.defaultOptions = {
    backgroundAlpha: 1,
    backgroundColor: 0,
    clearBeforeRender: !0
};
let fde = Gb;
const X0 = {};
$e.handle(X.BlendMode, t => {
    if (!t.name)
        throw new Error("BlendMode extension must have a name property");
    X0[t.name] = t.ref
}
, t => {
    delete X0[t.name]
}
);
class lO {
    constructor(e) {
        this._blendModeStack = [],
        this._isAdvanced = !1,
        this._filterHash = Object.create(null),
        this._renderer = e,
        this._renderer.runners.prerender.add(this)
    }
    prerender() {
        this._activeBlendMode = "normal",
        this._isAdvanced = !1
    }
    pushBlendMode(e, r, n) {
        this._blendModeStack.push(r),
        this.setBlendMode(e, r, n)
    }
    popBlendMode(e) {
        this._blendModeStack.pop();
        const r = this._blendModeStack[this._activeBlendMode.length - 1] ?? "normal";
        this.setBlendMode(null, r, e)
    }
    setBlendMode(e, r, n) {
        var o;
        const i = e instanceof Jy;
        if (this._activeBlendMode === r) {
            this._isAdvanced && e && !i && ((o = this._renderableList) == null || o.push(e));
            return
        }
        this._isAdvanced && this._endAdvancedBlendMode(n),
        this._activeBlendMode = r,
        e && (this._isAdvanced = !!X0[r],
        this._isAdvanced && this._beginAdvancedBlendMode(e, n))
    }
    _beginAdvancedBlendMode(e, r) {
        this._renderer.renderPipes.batch.break(r);
        const n = this._activeBlendMode;
        if (!X0[n]) {
            Ne(`Unable to assign BlendMode: '${n}'. You may want to include: import 'pixi.js/advanced-blend-modes'`);
            return
        }
        const i = this._ensureFilterEffect(n)
          , o = e instanceof Jy
          , s = {
            renderPipeId: "filter",
            action: "pushFilter",
            filterEffect: i,
            renderables: o ? null : [e],
            container: o ? e.root : null,
            canBundle: !1
        };
        this._renderableList = s.renderables,
        r.add(s)
    }
    _ensureFilterEffect(e) {
        let r = this._filterHash[e];
        return r || (r = this._filterHash[e] = new Rx,
        r.filters = [new X0[e]]),
        r
    }
    _endAdvancedBlendMode(e) {
        this._isAdvanced = !1,
        this._renderableList = null,
        this._renderer.renderPipes.batch.break(e),
        e.add({
            renderPipeId: "filter",
            action: "popFilter",
            canBundle: !1
        })
    }
    buildStart() {
        this._isAdvanced = !1
    }
    buildEnd(e) {
        this._isAdvanced && this._endAdvancedBlendMode(e)
    }
    destroy() {
        this._renderer = null,
        this._renderableList = null;
        for (const e in this._filterHash)
            this._filterHash[e].destroy();
        this._filterHash = null
    }
}
lO.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "blendMode"
};
const fm = {
    png: "image/png",
    jpg: "image/jpeg",
    webp: "image/webp"
}
  , Hb = class cO {
    constructor(e) {
        this._renderer = e
    }
    _normalizeOptions(e, r={}) {
        return e instanceof Rn || e instanceof Be ? {
            target: e,
            ...r
        } : {
            ...r,
            ...e
        }
    }
    async image(e) {
        const r = je.get().createImage();
        return r.src = await this.base64(e),
        r
    }
    async base64(e) {
        e = this._normalizeOptions(e, cO.defaultImageOptions);
        const {format: r, quality: n} = e
          , i = this.canvas(e);
        if (i.toBlob !== void 0)
            return new Promise( (o, s) => {
                i.toBlob(a => {
                    if (!a) {
                        s(new Error("ICanvas.toBlob failed!"));
                        return
                    }
                    const l = new FileReader;
                    l.onload = () => o(l.result),
                    l.onerror = s,
                    l.readAsDataURL(a)
                }
                , fm[r], n)
            }
            );
        if (i.toDataURL !== void 0)
            return i.toDataURL(fm[r], n);
        if (i.convertToBlob !== void 0) {
            const o = await i.convertToBlob({
                type: fm[r],
                quality: n
            });
            return new Promise( (s, a) => {
                const l = new FileReader;
                l.onload = () => s(l.result),
                l.onerror = a,
                l.readAsDataURL(o)
            }
            )
        }
        throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")
    }
    canvas(e) {
        e = this._normalizeOptions(e);
        const r = e.target
          , n = this._renderer;
        if (r instanceof Be)
            return n.texture.generateCanvas(r);
        const i = n.textureGenerator.generateTexture(e)
          , o = n.texture.generateCanvas(i);
        return i.destroy(!0),
        o
    }
    pixels(e) {
        e = this._normalizeOptions(e);
        const r = e.target
          , n = this._renderer
          , i = r instanceof Be ? r : n.textureGenerator.generateTexture(e)
          , o = n.texture.getPixels(i);
        return r instanceof Rn && i.destroy(!0),
        o
    }
    texture(e) {
        return e = this._normalizeOptions(e),
        e.target instanceof Be ? e.target : this._renderer.textureGenerator.generateTexture(e)
    }
    download(e) {
        e = this._normalizeOptions(e);
        const r = this.canvas(e)
          , n = document.createElement("a");
        n.download = e.filename ?? "image.png",
        n.href = r.toDataURL("image/png"),
        document.body.appendChild(n),
        n.click(),
        document.body.removeChild(n)
    }
    log(e) {
        const r = e.width ?? 200;
        e = this._normalizeOptions(e);
        const n = this.canvas(e)
          , i = n.toDataURL();
        console.log(`[Pixi Texture] ${n.width}px ${n.height}px`);
        const o = ["font-size: 1px;", `padding: ${r}px 300px;`, `background: url(${i}) no-repeat;`, "background-size: contain;"].join(" ");
        console.log("%c ", o)
    }
    destroy() {
        this._renderer = null
    }
}
;
Hb.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem],
    name: "extract"
};
Hb.defaultImageOptions = {
    format: "png",
    quality: 1
};
let dde = Hb;
class Vb extends Be {
    static create(e) {
        return new Vb({
            source: new Br(e)
        })
    }
    resize(e, r, n) {
        return this.source.resize(e, r, n),
        this
    }
}
const hde = new mt
  , xde = new jr
  , pde = [0, 0, 0, 0];
class uO {
    constructor(e) {
        this._renderer = e
    }
    generateTexture(e) {
        var c;
        e instanceof Rn && (e = {
            target: e,
            frame: void 0,
            textureSourceOptions: {},
            resolution: void 0
        });
        const r = e.resolution || this._renderer.resolution
          , n = e.antialias || this._renderer.view.antialias
          , i = e.target;
        let o = e.clearColor;
        o ? o = Array.isArray(o) && o.length === 4 ? o : Ut.shared.setValue(o).toArray() : o = pde;
        const s = ((c = e.frame) == null ? void 0 : c.copyTo(hde)) || hb(i, xde).rectangle;
        s.width = Math.max(s.width, 1 / r) | 0,
        s.height = Math.max(s.height, 1 / r) | 0;
        const a = Vb.create({
            ...e.textureSourceOptions,
            width: s.width,
            height: s.height,
            resolution: r,
            antialias: n
        })
          , l = Pe.shared.translate(-s.x, -s.y);
        return this._renderer.render({
            container: i,
            transform: l,
            target: a,
            clearColor: o
        }),
        a.source.updateMipmaps(),
        a
    }
    destroy() {
        this._renderer = null
    }
}
uO.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem],
    name: "textureGenerator"
};
function xd(t, e, r) {
    const n = (t >> 24 & 255) / 255;
    e[r++] = (t & 255) / 255 * n,
    e[r++] = (t >> 8 & 255) / 255 * n,
    e[r++] = (t >> 16 & 255) / 255 * n,
    e[r++] = n
}
class fO {
    constructor(e) {
        this._stackIndex = 0,
        this._globalUniformDataStack = [],
        this._uniformsPool = [],
        this._activeUniforms = [],
        this._bindGroupPool = [],
        this._activeBindGroups = [],
        this._renderer = e
    }
    reset() {
        this._stackIndex = 0;
        for (let e = 0; e < this._activeUniforms.length; e++)
            this._uniformsPool.push(this._activeUniforms[e]);
        for (let e = 0; e < this._activeBindGroups.length; e++)
            this._bindGroupPool.push(this._activeBindGroups[e]);
        this._activeUniforms.length = 0,
        this._activeBindGroups.length = 0
    }
    start(e) {
        this.reset(),
        this.push(e)
    }
    bind({size: e, projectionMatrix: r, worldTransformMatrix: n, worldColor: i, offset: o}) {
        const s = this._renderer.renderTarget.renderTarget
          , a = this._stackIndex ? this._globalUniformDataStack[this._stackIndex - 1] : {
            projectionData: s,
            worldTransformMatrix: new Pe,
            worldColor: 4294967295,
            offset: new Gt
        }
          , l = {
            projectionMatrix: r || this._renderer.renderTarget.projectionMatrix,
            resolution: e || s.size,
            worldTransformMatrix: n || a.worldTransformMatrix,
            worldColor: i || a.worldColor,
            offset: o || a.offset,
            bindGroup: null
        }
          , c = this._uniformsPool.pop() || this._createUniforms();
        this._activeUniforms.push(c);
        const u = c.uniforms;
        u.uProjectionMatrix = l.projectionMatrix,
        u.uResolution = l.resolution,
        u.uWorldTransformMatrix.copyFrom(l.worldTransformMatrix),
        u.uWorldTransformMatrix.tx -= l.offset.x,
        u.uWorldTransformMatrix.ty -= l.offset.y,
        xd(l.worldColor, u.uWorldColorAlpha, 0),
        c.update();
        let f;
        this._renderer.renderPipes.uniformBatch ? f = this._renderer.renderPipes.uniformBatch.getUniformBindGroup(c, !1) : (f = this._bindGroupPool.pop() || new is,
        this._activeBindGroups.push(f),
        f.setResource(c, 0)),
        l.bindGroup = f,
        this._currentGlobalUniformData = l
    }
    push(e) {
        this.bind(e),
        this._globalUniformDataStack[this._stackIndex++] = this._currentGlobalUniformData
    }
    pop() {
        this._currentGlobalUniformData = this._globalUniformDataStack[--this._stackIndex - 1],
        this._renderer.type === qn.WEBGL && this._currentGlobalUniformData.bindGroup.resources[0].update()
    }
    get bindGroup() {
        return this._currentGlobalUniformData.bindGroup
    }
    get globalUniformData() {
        return this._currentGlobalUniformData
    }
    get uniformGroup() {
        return this._currentGlobalUniformData.bindGroup.resources[0]
    }
    _createUniforms() {
        return new vn({
            uProjectionMatrix: {
                value: new Pe,
                type: "mat3x3<f32>"
            },
            uWorldTransformMatrix: {
                value: new Pe,
                type: "mat3x3<f32>"
            },
            uWorldColorAlpha: {
                value: new Float32Array(4),
                type: "vec4<f32>"
            },
            uResolution: {
                value: [0, 0],
                type: "vec2<f32>"
            }
        },{
            isStatic: !0
        })
    }
    destroy() {
        this._renderer = null,
        this._globalUniformDataStack.length = 0,
        this._uniformsPool.length = 0,
        this._activeUniforms.length = 0,
        this._bindGroupPool.length = 0,
        this._activeBindGroups.length = 0,
        this._currentGlobalUniformData = null
    }
}
fO.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem, X.CanvasSystem],
    name: "globalUniforms"
};
let gde = 1;
class dO {
    constructor() {
        this._tasks = [],
        this._offset = 0
    }
    init() {
        Hr.system.add(this._update, this)
    }
    repeat(e, r, n=!0) {
        const i = gde++;
        let o = 0;
        return n && (this._offset += 1e3,
        o = this._offset),
        this._tasks.push({
            func: e,
            duration: r,
            start: performance.now(),
            offset: o,
            last: performance.now(),
            repeat: !0,
            id: i
        }),
        i
    }
    cancel(e) {
        for (let r = 0; r < this._tasks.length; r++)
            if (this._tasks[r].id === e) {
                this._tasks.splice(r, 1);
                return
            }
    }
    _update() {
        const e = performance.now();
        for (let r = 0; r < this._tasks.length; r++) {
            const n = this._tasks[r];
            if (e - n.offset - n.last >= n.duration) {
                const i = e - n.start;
                n.func(i),
                n.last = e
            }
        }
    }
    destroy() {
        Hr.system.remove(this._update, this),
        this._tasks.length = 0
    }
}
dO.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem, X.CanvasSystem],
    name: "scheduler",
    priority: 0
};
let $3 = !1;
function mde(t) {
    if (!$3) {
        if (je.get().getNavigator().userAgent.toLowerCase().indexOf("chrome") > -1) {
            const e = [`%c  %c  %c  %c  %c PixiJS %c v${$x} (${t}) http://www.pixijs.com/

`, "background: #E72264; padding:5px 0;", "background: #6CA2EA; padding:5px 0;", "background: #B5D33D; padding:5px 0;", "background: #FED23F; padding:5px 0;", "color: #FFFFFF; background: #E72264; padding:5px 0;", "color: #E72264; background: #FFFFFF; padding:5px 0;"];
            globalThis.console.log(...e)
        } else
            globalThis.console && globalThis.console.log(`PixiJS ${$x} - ${t} - http://www.pixijs.com/`);
        $3 = !0
    }
}
class zb {
    constructor(e) {
        this._renderer = e
    }
    init(e) {
        if (e.hello) {
            let r = this._renderer.name;
            this._renderer.type === qn.WEBGL && (r += ` ${this._renderer.context.webGLVersion}`),
            mde(r)
        }
    }
}
zb.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem, X.CanvasSystem],
    name: "hello",
    priority: -2
};
zb.defaultOptions = {
    hello: !1
};
function vde(t) {
    let e = !1;
    for (const n in t)
        if (t[n] == null) {
            e = !0;
            break
        }
    if (!e)
        return t;
    const r = Object.create(null);
    for (const n in t) {
        const i = t[n];
        i && (r[n] = i)
    }
    return r
}
function yde(t) {
    let e = 0;
    for (let r = 0; r < t.length; r++)
        t[r] == null ? e++ : t[r - e] = t[r];
    return t.length -= e,
    t
}
let Ede = 0;
const jb = class hO {
    constructor(e) {
        this._managedRenderables = [],
        this._managedHashes = [],
        this._managedArrays = [],
        this._renderer = e
    }
    init(e) {
        e = {
            ...hO.defaultOptions,
            ...e
        },
        this.maxUnusedTime = e.renderableGCMaxUnusedTime,
        this._frequency = e.renderableGCFrequency,
        this.enabled = e.renderableGCActive
    }
    get enabled() {
        return !!this._handler
    }
    set enabled(e) {
        this.enabled !== e && (e ? (this._handler = this._renderer.scheduler.repeat( () => this.run(), this._frequency, !1),
        this._hashHandler = this._renderer.scheduler.repeat( () => {
            for (const r of this._managedHashes)
                r.context[r.hash] = vde(r.context[r.hash])
        }
        , this._frequency),
        this._arrayHandler = this._renderer.scheduler.repeat( () => {
            for (const r of this._managedArrays)
                yde(r.context[r.hash])
        }
        , this._frequency)) : (this._renderer.scheduler.cancel(this._handler),
        this._renderer.scheduler.cancel(this._hashHandler),
        this._renderer.scheduler.cancel(this._arrayHandler)))
    }
    addManagedHash(e, r) {
        this._managedHashes.push({
            context: e,
            hash: r
        })
    }
    addManagedArray(e, r) {
        this._managedArrays.push({
            context: e,
            hash: r
        })
    }
    prerender({container: e}) {
        this._now = performance.now(),
        e.renderGroup.gcTick = Ede++,
        this._updateInstructionGCTick(e.renderGroup, e.renderGroup.gcTick)
    }
    addRenderable(e) {
        this.enabled && (e._lastUsed === -1 && (this._managedRenderables.push(e),
        e.once("destroyed", this._removeRenderable, this)),
        e._lastUsed = this._now)
    }
    run() {
        var o;
        const e = this._now
          , r = this._managedRenderables
          , n = this._renderer.renderPipes;
        let i = 0;
        for (let s = 0; s < r.length; s++) {
            const a = r[s];
            if (a === null) {
                i++;
                continue
            }
            const l = a.renderGroup ?? a.parentRenderGroup
              , c = ((o = l == null ? void 0 : l.instructionSet) == null ? void 0 : o.gcTick) ?? -1;
            if (((l == null ? void 0 : l.gcTick) ?? 0) === c && (a._lastUsed = e),
            e - a._lastUsed > this.maxUnusedTime) {
                if (!a.destroyed) {
                    const u = n;
                    l && (l.structureDidChange = !0),
                    u[a.renderPipeId].destroyRenderable(a)
                }
                a._lastUsed = -1,
                i++,
                a.off("destroyed", this._removeRenderable, this)
            } else
                r[s - i] = a
        }
        r.length -= i
    }
    destroy() {
        this.enabled = !1,
        this._renderer = null,
        this._managedRenderables.length = 0,
        this._managedHashes.length = 0,
        this._managedArrays.length = 0
    }
    _removeRenderable(e) {
        const r = this._managedRenderables.indexOf(e);
        r >= 0 && (e.off("destroyed", this._removeRenderable, this),
        this._managedRenderables[r] = null)
    }
    _updateInstructionGCTick(e, r) {
        e.instructionSet.gcTick = r;
        for (const n of e.renderGroupChildren)
            this._updateInstructionGCTick(n, r)
    }
}
;
jb.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem],
    name: "renderableGC",
    priority: 0
};
jb.defaultOptions = {
    renderableGCActive: !0,
    renderableGCMaxUnusedTime: 6e4,
    renderableGCFrequency: 3e4
};
let _de = jb;
const Wb = class xO {
    constructor(e) {
        this._renderer = e,
        this.count = 0,
        this.checkCount = 0
    }
    init(e) {
        e = {
            ...xO.defaultOptions,
            ...e
        },
        this.checkCountMax = e.textureGCCheckCountMax,
        this.maxIdle = e.textureGCAMaxIdle ?? e.textureGCMaxIdle,
        this.active = e.textureGCActive
    }
    postrender() {
        this._renderer.renderingToScreen && (this.count++,
        this.active && (this.checkCount++,
        this.checkCount > this.checkCountMax && (this.checkCount = 0,
        this.run())))
    }
    run() {
        const e = this._renderer.texture.managedTextures;
        for (let r = 0; r < e.length; r++) {
            const n = e[r];
            n.autoGarbageCollect && n.resource && n._touched > -1 && this.count - n._touched > this.maxIdle && (n._touched = -1,
            n.unload())
        }
    }
    destroy() {
        this._renderer = null
    }
}
;
Wb.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem],
    name: "textureGC"
};
Wb.defaultOptions = {
    textureGCActive: !0,
    textureGCAMaxIdle: null,
    textureGCMaxIdle: 60 * 60,
    textureGCCheckCountMax: 600
};
let bde = Wb;
const Yb = class pO {
    get autoDensity() {
        return this.texture.source.autoDensity
    }
    set autoDensity(e) {
        this.texture.source.autoDensity = e
    }
    get resolution() {
        return this.texture.source._resolution
    }
    set resolution(e) {
        this.texture.source.resize(this.texture.source.width, this.texture.source.height, e)
    }
    init(e) {
        e = {
            ...pO.defaultOptions,
            ...e
        },
        e.view && (Re(tt, "ViewSystem.view has been renamed to ViewSystem.canvas"),
        e.canvas = e.view),
        this.screen = new mt(0,0,e.width,e.height),
        this.canvas = e.canvas || je.get().createCanvas(),
        this.antialias = !!e.antialias,
        this.texture = GI(this.canvas, e),
        this.renderTarget = new vE({
            colorTextures: [this.texture],
            depth: !!e.depth,
            isRoot: !0
        }),
        this.texture.source.transparent = e.backgroundAlpha < 1,
        this.resolution = e.resolution
    }
    resize(e, r, n) {
        this.texture.source.resize(e, r, n),
        this.screen.width = this.texture.frame.width,
        this.screen.height = this.texture.frame.height
    }
    destroy(e=!1) {
        (typeof e == "boolean" ? e : !!(e != null && e.removeView)) && this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas),
        this.texture.destroy()
    }
}
;
Yb.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem, X.CanvasSystem],
    name: "view",
    priority: 0
};
Yb.defaultOptions = {
    width: 800,
    height: 600,
    autoDensity: !1,
    antialias: !1
};
let Cde = Yb;
const gO = [fde, fO, zb, Cde, oO, bde, uO, dde, PP, _de, dO]
  , mO = [lO, bI, sO, rO, CI, wI, AI, tO]
  , Ade = [...gO, UI, Efe, pfe, kI, BI, JI, jI, FI, KI, XI, OI, Xfe, RI, II]
  , wde = [...mO]
  , Bde = [yI, eO, QI]
  , vO = []
  , yO = []
  , EO = [];
$e.handleByNamedList(X.WebGLSystem, vO);
$e.handleByNamedList(X.WebGLPipes, yO);
$e.handleByNamedList(X.WebGLPipesAdaptor, EO);
$e.add(...Ade, ...wde, ...Bde);
class Sde extends x1 {
    constructor() {
        const e = {
            name: "webgl",
            type: qn.WEBGL,
            systems: vO,
            renderPipes: yO,
            renderPipeAdaptors: EO
        };
        super(e)
    }
}
const Tde = Object.freeze(Object.defineProperty({
    __proto__: null,
    WebGLRenderer: Sde
}, Symbol.toStringTag, {
    value: "Module"
}));
class _O {
    constructor(e) {
        this._hash = Object.create(null),
        this._renderer = e,
        this._renderer.renderableGC.addManagedHash(this, "_hash")
    }
    contextChange(e) {
        this._gpu = e
    }
    getBindGroup(e, r, n) {
        return e._updateKey(),
        this._hash[e._key] || this._createBindGroup(e, r, n)
    }
    _createBindGroup(e, r, n) {
        const i = this._gpu.device
          , o = r.layout[n]
          , s = []
          , a = this._renderer;
        for (const u in o) {
            const f = e.resources[u] ?? e.resources[o[u]];
            let d;
            if (f._resourceType === "uniformGroup") {
                const h = f;
                a.ubo.updateUniformGroup(h);
                const x = h.buffer;
                d = {
                    buffer: a.buffer.getGPUBuffer(x),
                    offset: 0,
                    size: x.descriptor.size
                }
            } else if (f._resourceType === "buffer") {
                const h = f;
                d = {
                    buffer: a.buffer.getGPUBuffer(h),
                    offset: 0,
                    size: h.descriptor.size
                }
            } else if (f._resourceType === "bufferResource") {
                const h = f;
                d = {
                    buffer: a.buffer.getGPUBuffer(h.buffer),
                    offset: h.offset,
                    size: h.size
                }
            } else if (f._resourceType === "textureSampler") {
                const h = f;
                d = a.texture.getGpuSampler(h)
            } else if (f._resourceType === "textureSource") {
                const h = f;
                d = a.texture.getGpuSource(h).createView({})
            }
            s.push({
                binding: o[u],
                resource: d
            })
        }
        const l = a.shader.getProgramData(r).bindGroups[n]
          , c = i.createBindGroup({
            layout: l,
            entries: s
        });
        return this._hash[e._key] = c,
        c
    }
    destroy() {
        for (const e of Object.keys(this._hash))
            this._hash[e] = null;
        this._hash = null,
        this._renderer = null
    }
}
_O.extension = {
    type: [X.WebGPUSystem],
    name: "bindGroup"
};
class bO {
    constructor(e) {
        this._gpuBuffers = Object.create(null),
        e.renderableGC.addManagedHash(this, "_gpuBuffers")
    }
    contextChange(e) {
        this._gpu = e
    }
    getGPUBuffer(e) {
        return this._gpuBuffers[e.uid] || this.createGPUBuffer(e)
    }
    updateBuffer(e) {
        const r = this._gpuBuffers[e.uid] || this.createGPUBuffer(e)
          , n = e.data;
        return e._updateID && n && (e._updateID = 0,
        this._gpu.device.queue.writeBuffer(r, 0, n.buffer, 0, (e._updateSize || n.byteLength) + 3 & -4)),
        r
    }
    destroyAll() {
        var e;
        for (const r in this._gpuBuffers)
            (e = this._gpuBuffers[r]) == null || e.destroy();
        this._gpuBuffers = {}
    }
    createGPUBuffer(e) {
        this._gpuBuffers[e.uid] || (e.on("update", this.updateBuffer, this),
        e.on("change", this.onBufferChange, this),
        e.on("destroy", this.onBufferDestroy, this));
        const r = this._gpu.device.createBuffer(e.descriptor);
        return e._updateID = 0,
        e.data && (uE(e.data.buffer, r.getMappedRange()),
        r.unmap()),
        this._gpuBuffers[e.uid] = r,
        r
    }
    onBufferChange(e) {
        this._gpuBuffers[e.uid].destroy(),
        e._updateID = 0,
        this._gpuBuffers[e.uid] = this.createGPUBuffer(e)
    }
    onBufferDestroy(e) {
        this._destroyBuffer(e)
    }
    destroy() {
        this.destroyAll(),
        this._gpuBuffers = {}
    }
    _destroyBuffer(e) {
        if (e.off("update", this.updateBuffer, this),
        e.off("change", this.onBufferChange, this),
        e.off("destroy", this.onBufferDestroy, this),
        !this._gpuBuffers[e.uid])
            return;
        this._gpuBuffers[e.uid].destroy(),
        this._gpuBuffers[e.uid] = null
    }
}
bO.extension = {
    type: [X.WebGPUSystem],
    name: "buffer"
};
class Dde {
    constructor({minUniformOffsetAlignment: e}) {
        this._minUniformOffsetAlignment = 256,
        this.byteIndex = 0,
        this._minUniformOffsetAlignment = e,
        this.data = new Float32Array(65535)
    }
    clear() {
        this.byteIndex = 0
    }
    addEmptyGroup(e) {
        if (e > this._minUniformOffsetAlignment / 4)
            throw new Error(`UniformBufferBatch: array is too large: ${e * 4}`);
        const r = this.byteIndex;
        let n = r + e * 4;
        if (n = Math.ceil(n / this._minUniformOffsetAlignment) * this._minUniformOffsetAlignment,
        n > this.data.length * 4)
            throw new Error("UniformBufferBatch: ubo batch got too big");
        return this.byteIndex = n,
        r
    }
    addGroup(e) {
        const r = this.addEmptyGroup(e.length);
        for (let n = 0; n < e.length; n++)
            this.data[r / 4 + n] = e[n];
        return r
    }
    destroy() {
        this.data = null
    }
}
class CO {
    constructor(e) {
        this._colorMaskCache = 15,
        this._renderer = e
    }
    setMask(e) {
        this._colorMaskCache !== e && (this._colorMaskCache = e,
        this._renderer.pipeline.setColorMask(e))
    }
    destroy() {
        this._renderer = null,
        this._colorMaskCache = null
    }
}
CO.extension = {
    type: [X.WebGPUSystem],
    name: "colorMask"
};
class Xb {
    constructor(e) {
        this._renderer = e
    }
    async init(e) {
        return this._initPromise ? this._initPromise : (this._initPromise = (e.gpu ? Promise.resolve(e.gpu) : this._createDeviceAndAdaptor(e)).then(r => {
            this.gpu = r,
            this._renderer.runners.contextChange.emit(this.gpu)
        }
        ),
        this._initPromise)
    }
    contextChange(e) {
        this._renderer.gpu = e
    }
    async _createDeviceAndAdaptor(e) {
        const r = await je.get().getNavigator().gpu.requestAdapter({
            powerPreference: e.powerPreference,
            forceFallbackAdapter: e.forceFallbackAdapter
        })
          , n = ["texture-compression-bc", "texture-compression-astc", "texture-compression-etc2"].filter(o => r.features.has(o))
          , i = await r.requestDevice({
            requiredFeatures: n
        });
        return {
            adapter: r,
            device: i
        }
    }
    destroy() {
        this.gpu = null,
        this._renderer = null
    }
}
Xb.extension = {
    type: [X.WebGPUSystem],
    name: "device"
};
Xb.defaultOptions = {
    powerPreference: void 0,
    forceFallbackAdapter: !1
};
class AO {
    constructor(e) {
        this._boundBindGroup = Object.create(null),
        this._boundVertexBuffer = Object.create(null),
        this._renderer = e
    }
    renderStart() {
        this.commandFinished = new Promise(e => {
            this._resolveCommandFinished = e
        }
        ),
        this.commandEncoder = this._renderer.gpu.device.createCommandEncoder()
    }
    beginRenderPass(e) {
        this.endRenderPass(),
        this._clearCache(),
        this.renderPassEncoder = this.commandEncoder.beginRenderPass(e.descriptor)
    }
    endRenderPass() {
        this.renderPassEncoder && this.renderPassEncoder.end(),
        this.renderPassEncoder = null
    }
    setViewport(e) {
        this.renderPassEncoder.setViewport(e.x, e.y, e.width, e.height, 0, 1)
    }
    setPipelineFromGeometryProgramAndState(e, r, n, i) {
        const o = this._renderer.pipeline.getPipeline(e, r, n, i);
        this.setPipeline(o)
    }
    setPipeline(e) {
        this._boundPipeline !== e && (this._boundPipeline = e,
        this.renderPassEncoder.setPipeline(e))
    }
    _setVertexBuffer(e, r) {
        this._boundVertexBuffer[e] !== r && (this._boundVertexBuffer[e] = r,
        this.renderPassEncoder.setVertexBuffer(e, this._renderer.buffer.updateBuffer(r)))
    }
    _setIndexBuffer(e) {
        if (this._boundIndexBuffer === e)
            return;
        this._boundIndexBuffer = e;
        const r = e.data.BYTES_PER_ELEMENT === 2 ? "uint16" : "uint32";
        this.renderPassEncoder.setIndexBuffer(this._renderer.buffer.updateBuffer(e), r)
    }
    resetBindGroup(e) {
        this._boundBindGroup[e] = null
    }
    setBindGroup(e, r, n) {
        if (this._boundBindGroup[e] === r)
            return;
        this._boundBindGroup[e] = r,
        r._touch(this._renderer.textureGC.count);
        const i = this._renderer.bindGroup.getBindGroup(r, n, e);
        this.renderPassEncoder.setBindGroup(e, i)
    }
    setGeometry(e, r) {
        const n = this._renderer.pipeline.getBufferNamesToBind(e, r);
        for (const i in n)
            this._setVertexBuffer(parseInt(i, 10), e.attributes[n[i]].buffer);
        e.indexBuffer && this._setIndexBuffer(e.indexBuffer)
    }
    _setShaderBindGroups(e, r) {
        for (const n in e.groups) {
            const i = e.groups[n];
            r || this._syncBindGroup(i),
            this.setBindGroup(n, i, e.gpuProgram)
        }
    }
    _syncBindGroup(e) {
        for (const r in e.resources) {
            const n = e.resources[r];
            n.isUniformGroup && this._renderer.ubo.updateUniformGroup(n)
        }
    }
    draw(e) {
        const {geometry: r, shader: n, state: i, topology: o, size: s, start: a, instanceCount: l, skipSync: c} = e;
        this.setPipelineFromGeometryProgramAndState(r, n.gpuProgram, i, o),
        this.setGeometry(r, n.gpuProgram),
        this._setShaderBindGroups(n, c),
        r.indexBuffer ? this.renderPassEncoder.drawIndexed(s || r.indexBuffer.data.length, l ?? r.instanceCount, a || 0) : this.renderPassEncoder.draw(s || r.getSize(), l ?? r.instanceCount, a || 0)
    }
    finishRenderPass() {
        this.renderPassEncoder && (this.renderPassEncoder.end(),
        this.renderPassEncoder = null)
    }
    postrender() {
        this.finishRenderPass(),
        this._gpu.device.queue.submit([this.commandEncoder.finish()]),
        this._resolveCommandFinished(),
        this.commandEncoder = null
    }
    restoreRenderPass() {
        const e = this._renderer.renderTarget.adaptor.getDescriptor(this._renderer.renderTarget.renderTarget, !1, [0, 0, 0, 1]);
        this.renderPassEncoder = this.commandEncoder.beginRenderPass(e);
        const r = this._boundPipeline
          , n = {
            ...this._boundVertexBuffer
        }
          , i = this._boundIndexBuffer
          , o = {
            ...this._boundBindGroup
        };
        this._clearCache();
        const s = this._renderer.renderTarget.viewport;
        this.renderPassEncoder.setViewport(s.x, s.y, s.width, s.height, 0, 1),
        this.setPipeline(r);
        for (const a in n)
            this._setVertexBuffer(a, n[a]);
        for (const a in o)
            this.setBindGroup(a, o[a], null);
        this._setIndexBuffer(i)
    }
    _clearCache() {
        for (let e = 0; e < 16; e++)
            this._boundBindGroup[e] = null,
            this._boundVertexBuffer[e] = null;
        this._boundIndexBuffer = null,
        this._boundPipeline = null
    }
    destroy() {
        this._renderer = null,
        this._gpu = null,
        this._boundBindGroup = null,
        this._boundVertexBuffer = null,
        this._boundIndexBuffer = null,
        this._boundPipeline = null
    }
    contextChange(e) {
        this._gpu = e
    }
}
AO.extension = {
    type: [X.WebGPUSystem],
    name: "encoder",
    priority: 1
};
class wO {
    constructor(e) {
        this._renderer = e
    }
    contextChange() {
        this.maxTextures = this._renderer.device.gpu.device.limits.maxSampledTexturesPerShaderStage,
        this.maxBatchableTextures = this.maxTextures
    }
    destroy() {}
}
wO.extension = {
    type: [X.WebGPUSystem],
    name: "limits"
};
class BO {
    constructor(e) {
        this._renderTargetStencilState = Object.create(null),
        this._renderer = e,
        e.renderTarget.onRenderTargetChange.add(this)
    }
    onRenderTargetChange(e) {
        let r = this._renderTargetStencilState[e.uid];
        r || (r = this._renderTargetStencilState[e.uid] = {
            stencilMode: ar.DISABLED,
            stencilReference: 0
        }),
        this._activeRenderTarget = e,
        this.setStencilMode(r.stencilMode, r.stencilReference)
    }
    setStencilMode(e, r) {
        const n = this._renderTargetStencilState[this._activeRenderTarget.uid];
        n.stencilMode = e,
        n.stencilReference = r;
        const i = this._renderer;
        i.pipeline.setStencilMode(e),
        i.encoder.renderPassEncoder.setStencilReference(r)
    }
    destroy() {
        this._renderer.renderTarget.onRenderTargetChange.remove(this),
        this._renderer = null,
        this._activeRenderTarget = null,
        this._renderTargetStencilState = null
    }
}
BO.extension = {
    type: [X.WebGPUSystem],
    name: "stencil"
};
const Qh = {
    i32: {
        align: 4,
        size: 4
    },
    u32: {
        align: 4,
        size: 4
    },
    f32: {
        align: 4,
        size: 4
    },
    f16: {
        align: 2,
        size: 2
    },
    "vec2<i32>": {
        align: 8,
        size: 8
    },
    "vec2<u32>": {
        align: 8,
        size: 8
    },
    "vec2<f32>": {
        align: 8,
        size: 8
    },
    "vec2<f16>": {
        align: 4,
        size: 4
    },
    "vec3<i32>": {
        align: 16,
        size: 12
    },
    "vec3<u32>": {
        align: 16,
        size: 12
    },
    "vec3<f32>": {
        align: 16,
        size: 12
    },
    "vec3<f16>": {
        align: 8,
        size: 6
    },
    "vec4<i32>": {
        align: 16,
        size: 16
    },
    "vec4<u32>": {
        align: 16,
        size: 16
    },
    "vec4<f32>": {
        align: 16,
        size: 16
    },
    "vec4<f16>": {
        align: 8,
        size: 8
    },
    "mat2x2<f32>": {
        align: 8,
        size: 16
    },
    "mat2x2<f16>": {
        align: 4,
        size: 8
    },
    "mat3x2<f32>": {
        align: 8,
        size: 24
    },
    "mat3x2<f16>": {
        align: 4,
        size: 12
    },
    "mat4x2<f32>": {
        align: 8,
        size: 32
    },
    "mat4x2<f16>": {
        align: 4,
        size: 16
    },
    "mat2x3<f32>": {
        align: 16,
        size: 32
    },
    "mat2x3<f16>": {
        align: 8,
        size: 16
    },
    "mat3x3<f32>": {
        align: 16,
        size: 48
    },
    "mat3x3<f16>": {
        align: 8,
        size: 24
    },
    "mat4x3<f32>": {
        align: 16,
        size: 64
    },
    "mat4x3<f16>": {
        align: 8,
        size: 32
    },
    "mat2x4<f32>": {
        align: 16,
        size: 32
    },
    "mat2x4<f16>": {
        align: 8,
        size: 16
    },
    "mat3x4<f32>": {
        align: 16,
        size: 48
    },
    "mat3x4<f16>": {
        align: 8,
        size: 24
    },
    "mat4x4<f32>": {
        align: 16,
        size: 64
    },
    "mat4x4<f16>": {
        align: 8,
        size: 32
    }
};
function Fde(t) {
    const e = t.map(n => ({
        data: n,
        offset: 0,
        size: 0
    }));
    let r = 0;
    for (let n = 0; n < e.length; n++) {
        const i = e[n];
        let o = Qh[i.data.type].size;
        const s = Qh[i.data.type].align;
        if (!Qh[i.data.type])
            throw new Error(`[Pixi.js] WebGPU UniformBuffer: Unknown type ${i.data.type}`);
        i.data.size > 1 && (o = Math.max(o, s) * i.data.size),
        r = Math.ceil(r / s) * s,
        i.size = o,
        i.offset = r,
        r += o
    }
    return r = Math.ceil(r / 16) * 16,
    {
        uboElements: e,
        size: r
    }
}
function Pde(t, e) {
    const {size: r, align: n} = Qh[t.data.type]
      , i = (n - r) / 4
      , o = t.data.type.indexOf("i32") >= 0 ? "dataInt32" : "data";
    return `
         v = uv.${t.data.name};
         ${e !== 0 ? `offset += ${e};` : ""}

         arrayOffset = offset;

         t = 0;

         for(var i=0; i < ${t.data.size * (r / 4)}; i++)
         {
             for(var j = 0; j < ${r / 4}; j++)
             {
                 ${o}[arrayOffset++] = v[t++];
             }
             ${i !== 0 ? `arrayOffset += ${i};` : ""}
         }
     `
}
function Ide(t) {
    return LI(t, "uboWgsl", Pde, Cfe)
}
class SO extends MI {
    constructor() {
        super({
            createUboElements: Fde,
            generateUboSync: Ide
        })
    }
}
SO.extension = {
    type: [X.WebGPUSystem],
    name: "ubo"
};
const Ps = 128;
class TO {
    constructor(e) {
        this._bindGroupHash = Object.create(null),
        this._buffers = [],
        this._bindGroups = [],
        this._bufferResources = [],
        this._renderer = e,
        this._renderer.renderableGC.addManagedHash(this, "_bindGroupHash"),
        this._batchBuffer = new Dde({
            minUniformOffsetAlignment: Ps
        });
        const r = 256 / Ps;
        for (let n = 0; n < r; n++) {
            let i = it.UNIFORM | it.COPY_DST;
            n === 0 && (i |= it.COPY_SRC),
            this._buffers.push(new Yn({
                data: this._batchBuffer.data,
                usage: i
            }))
        }
    }
    renderEnd() {
        this._uploadBindGroups(),
        this._resetBindGroups()
    }
    _resetBindGroups() {
        for (const e in this._bindGroupHash)
            this._bindGroupHash[e] = null;
        this._batchBuffer.clear()
    }
    getUniformBindGroup(e, r) {
        if (!r && this._bindGroupHash[e.uid])
            return this._bindGroupHash[e.uid];
        this._renderer.ubo.ensureUniformGroup(e);
        const n = e.buffer.data
          , i = this._batchBuffer.addEmptyGroup(n.length);
        return this._renderer.ubo.syncUniformGroup(e, this._batchBuffer.data, i / 4),
        this._bindGroupHash[e.uid] = this._getBindGroup(i / Ps),
        this._bindGroupHash[e.uid]
    }
    getUboResource(e) {
        this._renderer.ubo.updateUniformGroup(e);
        const r = e.buffer.data
          , n = this._batchBuffer.addGroup(r);
        return this._getBufferResource(n / Ps)
    }
    getArrayBindGroup(e) {
        const r = this._batchBuffer.addGroup(e);
        return this._getBindGroup(r / Ps)
    }
    getArrayBufferResource(e) {
        const n = this._batchBuffer.addGroup(e) / Ps;
        return this._getBufferResource(n)
    }
    _getBufferResource(e) {
        if (!this._bufferResources[e]) {
            const r = this._buffers[e % 2];
            this._bufferResources[e] = new Ub({
                buffer: r,
                offset: (e / 2 | 0) * 256,
                size: Ps
            })
        }
        return this._bufferResources[e]
    }
    _getBindGroup(e) {
        if (!this._bindGroups[e]) {
            const r = new is({
                0: this._getBufferResource(e)
            });
            this._bindGroups[e] = r
        }
        return this._bindGroups[e]
    }
    _uploadBindGroups() {
        const e = this._renderer.buffer
          , r = this._buffers[0];
        r.update(this._batchBuffer.byteIndex),
        e.updateBuffer(r);
        const n = this._renderer.gpu.device.createCommandEncoder();
        for (let i = 1; i < this._buffers.length; i++) {
            const o = this._buffers[i];
            n.copyBufferToBuffer(e.getGPUBuffer(r), Ps, e.getGPUBuffer(o), 0, this._batchBuffer.byteIndex)
        }
        this._renderer.gpu.device.queue.submit([n.finish()])
    }
    destroy() {
        var e;
        for (let r = 0; r < this._bindGroups.length; r++)
            (e = this._bindGroups[r]) == null || e.destroy();
        this._bindGroups = null,
        this._bindGroupHash = null;
        for (let r = 0; r < this._buffers.length; r++)
            this._buffers[r].destroy();
        this._buffers = null;
        for (let r = 0; r < this._bufferResources.length; r++)
            this._bufferResources[r].destroy();
        this._bufferResources = null,
        this._batchBuffer.destroy(),
        this._bindGroupHash = null,
        this._renderer = null
    }
}
TO.extension = {
    type: [X.WebGPUPipes],
    name: "uniformBatch"
};
const Ode = {
    "point-list": 0,
    "line-list": 1,
    "line-strip": 2,
    "triangle-list": 3,
    "triangle-strip": 4
};
function kde(t, e, r, n, i) {
    return t << 24 | e << 16 | r << 10 | n << 5 | i
}
function Rde(t, e, r, n) {
    return r << 6 | t << 3 | n << 1 | e
}
class DO {
    constructor(e) {
        this._moduleCache = Object.create(null),
        this._bufferLayoutsCache = Object.create(null),
        this._bindingNamesCache = Object.create(null),
        this._pipeCache = Object.create(null),
        this._pipeStateCaches = Object.create(null),
        this._colorMask = 15,
        this._multisampleCount = 1,
        this._renderer = e
    }
    contextChange(e) {
        this._gpu = e,
        this.setStencilMode(ar.DISABLED),
        this._updatePipeHash()
    }
    setMultisampleCount(e) {
        this._multisampleCount !== e && (this._multisampleCount = e,
        this._updatePipeHash())
    }
    setRenderTarget(e) {
        this._multisampleCount = e.msaaSamples,
        this._depthStencilAttachment = e.descriptor.depthStencilAttachment ? 1 : 0,
        this._updatePipeHash()
    }
    setColorMask(e) {
        this._colorMask !== e && (this._colorMask = e,
        this._updatePipeHash())
    }
    setStencilMode(e) {
        this._stencilMode !== e && (this._stencilMode = e,
        this._stencilState = Ca[e],
        this._updatePipeHash())
    }
    setPipeline(e, r, n, i) {
        const o = this.getPipeline(e, r, n);
        i.setPipeline(o)
    }
    getPipeline(e, r, n, i) {
        e._layoutKey || (TI(e, r.attributeData),
        this._generateBufferKey(e)),
        i || (i = e.topology);
        const o = kde(e._layoutKey, r._layoutKey, n.data, n._blendModeId, Ode[i]);
        return this._pipeCache[o] ? this._pipeCache[o] : (this._pipeCache[o] = this._createPipeline(e, r, n, i),
        this._pipeCache[o])
    }
    _createPipeline(e, r, n, i) {
        const o = this._gpu.device
          , s = this._createVertexBufferLayouts(e, r)
          , a = this._renderer.state.getColorTargets(n);
        a[0].writeMask = this._stencilMode === ar.RENDERING_MASK_ADD ? 0 : this._colorMask;
        const l = this._renderer.shader.getProgramData(r).pipeline
          , c = {
            vertex: {
                module: this._getModule(r.vertex.source),
                entryPoint: r.vertex.entryPoint,
                buffers: s
            },
            fragment: {
                module: this._getModule(r.fragment.source),
                entryPoint: r.fragment.entryPoint,
                targets: a
            },
            primitive: {
                topology: i,
                cullMode: n.cullMode
            },
            layout: l,
            multisample: {
                count: this._multisampleCount
            },
            label: "PIXI Pipeline"
        };
        return this._depthStencilAttachment && (c.depthStencil = {
            ...this._stencilState,
            format: "depth24plus-stencil8",
            depthWriteEnabled: n.depthTest,
            depthCompare: n.depthTest ? "less" : "always"
        }),
        o.createRenderPipeline(c)
    }
    _getModule(e) {
        return this._moduleCache[e] || this._createModule(e)
    }
    _createModule(e) {
        const r = this._gpu.device;
        return this._moduleCache[e] = r.createShaderModule({
            code: e
        }),
        this._moduleCache[e]
    }
    _generateBufferKey(e) {
        const r = [];
        let n = 0;
        const i = Object.keys(e.attributes).sort();
        for (let s = 0; s < i.length; s++) {
            const a = e.attributes[i[s]];
            r[n++] = a.offset,
            r[n++] = a.format,
            r[n++] = a.stride,
            r[n++] = a.instance
        }
        const o = r.join("|");
        return e._layoutKey = wf(o, "geometry"),
        e._layoutKey
    }
    _generateAttributeLocationsKey(e) {
        const r = [];
        let n = 0;
        const i = Object.keys(e.attributeData).sort();
        for (let s = 0; s < i.length; s++) {
            const a = e.attributeData[i[s]];
            r[n++] = a.location
        }
        const o = r.join("|");
        return e._attributeLocationsKey = wf(o, "programAttributes"),
        e._attributeLocationsKey
    }
    getBufferNamesToBind(e, r) {
        const n = e._layoutKey << 16 | r._attributeLocationsKey;
        if (this._bindingNamesCache[n])
            return this._bindingNamesCache[n];
        const i = this._createVertexBufferLayouts(e, r)
          , o = Object.create(null)
          , s = r.attributeData;
        for (let a = 0; a < i.length; a++) {
            const c = Object.values(i[a].attributes)[0].shaderLocation;
            for (const u in s)
                if (s[u].location === c) {
                    o[a] = u;
                    break
                }
        }
        return this._bindingNamesCache[n] = o,
        o
    }
    _createVertexBufferLayouts(e, r) {
        r._attributeLocationsKey || this._generateAttributeLocationsKey(r);
        const n = e._layoutKey << 16 | r._attributeLocationsKey;
        if (this._bufferLayoutsCache[n])
            return this._bufferLayoutsCache[n];
        const i = [];
        return e.buffers.forEach(o => {
            const s = {
                arrayStride: 0,
                stepMode: "vertex",
                attributes: []
            }
              , a = s.attributes;
            for (const l in r.attributeData) {
                const c = e.attributes[l];
                (c.divisor ?? 1) !== 1 && Ne(`Attribute ${l} has an invalid divisor value of '${c.divisor}'. WebGPU only supports a divisor value of 1`),
                c.buffer === o && (s.arrayStride = c.stride,
                s.stepMode = c.instance ? "instance" : "vertex",
                a.push({
                    shaderLocation: r.attributeData[l].location,
                    offset: c.offset,
                    format: c.format
                }))
            }
            a.length && i.push(s)
        }
        ),
        this._bufferLayoutsCache[n] = i,
        i
    }
    _updatePipeHash() {
        const e = Rde(this._stencilMode, this._multisampleCount, this._colorMask, this._depthStencilAttachment);
        this._pipeStateCaches[e] || (this._pipeStateCaches[e] = Object.create(null)),
        this._pipeCache = this._pipeStateCaches[e]
    }
    destroy() {
        this._renderer = null,
        this._bufferLayoutsCache = null
    }
}
DO.extension = {
    type: [X.WebGPUSystem],
    name: "pipeline"
};
class Mde {
    constructor() {
        this.contexts = [],
        this.msaaTextures = [],
        this.msaaSamples = 1
    }
}
class Nde {
    init(e, r) {
        this._renderer = e,
        this._renderTargetSystem = r
    }
    copyToTexture(e, r, n, i, o) {
        const s = this._renderer
          , a = this._getGpuColorTexture(e)
          , l = s.texture.getGpuSource(r.source);
        return s.encoder.commandEncoder.copyTextureToTexture({
            texture: a,
            origin: n
        }, {
            texture: l,
            origin: o
        }, i),
        r
    }
    startRenderPass(e, r=!0, n, i) {
        const s = this._renderTargetSystem.getGpuRenderTarget(e)
          , a = this.getDescriptor(e, r, n);
        s.descriptor = a,
        this._renderer.pipeline.setRenderTarget(s),
        this._renderer.encoder.beginRenderPass(s),
        this._renderer.encoder.setViewport(i)
    }
    finishRenderPass() {
        this._renderer.encoder.endRenderPass()
    }
    _getGpuColorTexture(e) {
        const r = this._renderTargetSystem.getGpuRenderTarget(e);
        return r.contexts[0] ? r.contexts[0].getCurrentTexture() : this._renderer.texture.getGpuSource(e.colorTextures[0].source)
    }
    getDescriptor(e, r, n) {
        typeof r == "boolean" && (r = r ? Vn.ALL : Vn.NONE);
        const i = this._renderTargetSystem
          , o = i.getGpuRenderTarget(e)
          , s = e.colorTextures.map( (c, u) => {
            const f = o.contexts[u];
            let d, h;
            f ? d = f.getCurrentTexture().createView() : d = this._renderer.texture.getGpuSource(c).createView({
                mipLevelCount: 1
            }),
            o.msaaTextures[u] && (h = d,
            d = this._renderer.texture.getTextureView(o.msaaTextures[u]));
            const x = r & Vn.COLOR ? "clear" : "load";
            return n ?? (n = i.defaultClearColor),
            {
                view: d,
                resolveTarget: h,
                clearValue: n,
                storeOp: "store",
                loadOp: x
            }
        }
        );
        let a;
        if ((e.stencil || e.depth) && !e.depthStencilTexture && (e.ensureDepthStencilTexture(),
        e.depthStencilTexture.source.sampleCount = o.msaa ? 4 : 1),
        e.depthStencilTexture) {
            const c = r & Vn.STENCIL ? "clear" : "load"
              , u = r & Vn.DEPTH ? "clear" : "load";
            a = {
                view: this._renderer.texture.getGpuSource(e.depthStencilTexture.source).createView(),
                stencilStoreOp: "store",
                stencilLoadOp: c,
                depthClearValue: 1,
                depthLoadOp: u,
                depthStoreOp: "store"
            }
        }
        return {
            colorAttachments: s,
            depthStencilAttachment: a
        }
    }
    clear(e, r=!0, n, i) {
        if (!r)
            return;
        const {gpu: o, encoder: s} = this._renderer
          , a = o.device;
        if (s.commandEncoder === null) {
            const c = a.createCommandEncoder()
              , u = this.getDescriptor(e, r, n)
              , f = c.beginRenderPass(u);
            f.setViewport(i.x, i.y, i.width, i.height, 0, 1),
            f.end();
            const d = c.finish();
            a.queue.submit([d])
        } else
            this.startRenderPass(e, r, n, i)
    }
    initGpuRenderTarget(e) {
        e.isRoot = !0;
        const r = new Mde;
        return e.colorTextures.forEach( (n, i) => {
            if (n instanceof go) {
                const o = n.resource.getContext("webgpu")
                  , s = n.transparent ? "premultiplied" : "opaque";
                try {
                    o.configure({
                        device: this._renderer.gpu.device,
                        usage: GPUTextureUsage.TEXTURE_BINDING | GPUTextureUsage.COPY_DST | GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.COPY_SRC,
                        format: "bgra8unorm",
                        alphaMode: s
                    })
                } catch (a) {
                    console.error(a)
                }
                r.contexts[i] = o
            }
            if (r.msaa = n.source.antialias,
            n.source.antialias) {
                const o = new Br({
                    width: 0,
                    height: 0,
                    sampleCount: 4
                });
                r.msaaTextures[i] = o
            }
        }
        ),
        r.msaa && (r.msaaSamples = 4,
        e.depthStencilTexture && (e.depthStencilTexture.source.sampleCount = 4)),
        r
    }
    destroyGpuRenderTarget(e) {
        e.contexts.forEach(r => {
            r.unconfigure()
        }
        ),
        e.msaaTextures.forEach(r => {
            r.destroy()
        }
        ),
        e.msaaTextures.length = 0,
        e.contexts.length = 0
    }
    ensureDepthStencilTexture(e) {
        const r = this._renderTargetSystem.getGpuRenderTarget(e);
        e.depthStencilTexture && r.msaa && (e.depthStencilTexture.source.sampleCount = 4)
    }
    resizeGpuRenderTarget(e) {
        const r = this._renderTargetSystem.getGpuRenderTarget(e);
        r.width = e.width,
        r.height = e.height,
        r.msaa && e.colorTextures.forEach( (n, i) => {
            const o = r.msaaTextures[i];
            o == null || o.resize(n.source.width, n.source.height, n.source._resolution)
        }
        )
    }
}
class FO extends zI {
    constructor(e) {
        super(e),
        this.adaptor = new Nde,
        this.adaptor.init(e, this)
    }
}
FO.extension = {
    type: [X.WebGPUSystem],
    name: "renderTarget"
};
class PO {
    constructor() {
        this._gpuProgramData = Object.create(null)
    }
    contextChange(e) {
        this._gpu = e
    }
    getProgramData(e) {
        return this._gpuProgramData[e._layoutKey] || this._createGPUProgramData(e)
    }
    _createGPUProgramData(e) {
        const r = this._gpu.device
          , n = e.gpuLayout.map(o => r.createBindGroupLayout({
            entries: o
        }))
          , i = {
            bindGroupLayouts: n
        };
        return this._gpuProgramData[e._layoutKey] = {
            bindGroups: n,
            pipeline: r.createPipelineLayout(i)
        },
        this._gpuProgramData[e._layoutKey]
    }
    destroy() {
        this._gpu = null,
        this._gpuProgramData = null
    }
}
PO.extension = {
    type: [X.WebGPUSystem],
    name: "shader"
};
const Mn = {};
Mn.normal = {
    alpha: {
        srcFactor: "one",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    },
    color: {
        srcFactor: "one",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    }
};
Mn.add = {
    alpha: {
        srcFactor: "src-alpha",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    },
    color: {
        srcFactor: "one",
        dstFactor: "one",
        operation: "add"
    }
};
Mn.multiply = {
    alpha: {
        srcFactor: "one",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    },
    color: {
        srcFactor: "dst",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    }
};
Mn.screen = {
    alpha: {
        srcFactor: "one",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    },
    color: {
        srcFactor: "one",
        dstFactor: "one-minus-src",
        operation: "add"
    }
};
Mn.overlay = {
    alpha: {
        srcFactor: "one",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    },
    color: {
        srcFactor: "one",
        dstFactor: "one-minus-src",
        operation: "add"
    }
};
Mn.none = {
    alpha: {
        srcFactor: "one",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    },
    color: {
        srcFactor: "zero",
        dstFactor: "zero",
        operation: "add"
    }
};
Mn["normal-npm"] = {
    alpha: {
        srcFactor: "one",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    },
    color: {
        srcFactor: "src-alpha",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    }
};
Mn["add-npm"] = {
    alpha: {
        srcFactor: "one",
        dstFactor: "one",
        operation: "add"
    },
    color: {
        srcFactor: "src-alpha",
        dstFactor: "one",
        operation: "add"
    }
};
Mn["screen-npm"] = {
    alpha: {
        srcFactor: "one",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    },
    color: {
        srcFactor: "src-alpha",
        dstFactor: "one-minus-src",
        operation: "add"
    }
};
Mn.erase = {
    alpha: {
        srcFactor: "zero",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    },
    color: {
        srcFactor: "zero",
        dstFactor: "one-minus-src",
        operation: "add"
    }
};
Mn.min = {
    alpha: {
        srcFactor: "one",
        dstFactor: "one",
        operation: "min"
    },
    color: {
        srcFactor: "one",
        dstFactor: "one",
        operation: "min"
    }
};
Mn.max = {
    alpha: {
        srcFactor: "one",
        dstFactor: "one",
        operation: "max"
    },
    color: {
        srcFactor: "one",
        dstFactor: "one",
        operation: "max"
    }
};
class IO {
    constructor() {
        this.defaultState = new Hi,
        this.defaultState.blend = !0
    }
    contextChange(e) {
        this.gpu = e
    }
    getColorTargets(e) {
        return [{
            format: "bgra8unorm",
            writeMask: 0,
            blend: Mn[e.blendMode] || Mn.normal
        }]
    }
    destroy() {
        this.gpu = null
    }
}
IO.extension = {
    type: [X.WebGPUSystem],
    name: "state"
};
const Lde = {
    type: "image",
    upload(t, e, r) {
        const n = t.resource
          , i = (t.pixelWidth | 0) * (t.pixelHeight | 0)
          , o = n.byteLength / i;
        r.device.queue.writeTexture({
            texture: e
        }, n, {
            offset: 0,
            rowsPerImage: t.pixelHeight,
            bytesPerRow: t.pixelWidth * o
        }, {
            width: t.pixelWidth,
            height: t.pixelHeight,
            depthOrArrayLayers: 1
        })
    }
}
  , OO = {
    "bc1-rgba-unorm": {
        blockBytes: 8,
        blockWidth: 4,
        blockHeight: 4
    },
    "bc2-rgba-unorm": {
        blockBytes: 16,
        blockWidth: 4,
        blockHeight: 4
    },
    "bc3-rgba-unorm": {
        blockBytes: 16,
        blockWidth: 4,
        blockHeight: 4
    },
    "bc7-rgba-unorm": {
        blockBytes: 16,
        blockWidth: 4,
        blockHeight: 4
    },
    "etc1-rgb-unorm": {
        blockBytes: 8,
        blockWidth: 4,
        blockHeight: 4
    },
    "etc2-rgba8unorm": {
        blockBytes: 16,
        blockWidth: 4,
        blockHeight: 4
    },
    "astc-4x4-unorm": {
        blockBytes: 16,
        blockWidth: 4,
        blockHeight: 4
    }
}
  , $de = {
    blockBytes: 4,
    blockWidth: 1,
    blockHeight: 1
}
  , Ude = {
    type: "compressed",
    upload(t, e, r) {
        let n = t.pixelWidth
          , i = t.pixelHeight;
        const o = OO[t.format] || $de;
        for (let s = 0; s < t.resource.length; s++) {
            const a = t.resource[s]
              , l = Math.ceil(n / o.blockWidth) * o.blockBytes;
            r.device.queue.writeTexture({
                texture: e,
                mipLevel: s
            }, a, {
                offset: 0,
                bytesPerRow: l
            }, {
                width: Math.ceil(n / o.blockWidth) * o.blockWidth,
                height: Math.ceil(i / o.blockHeight) * o.blockHeight,
                depthOrArrayLayers: 1
            }),
            n = Math.max(n >> 1, 1),
            i = Math.max(i >> 1, 1)
        }
    }
}
  , kO = {
    type: "image",
    upload(t, e, r) {
        const n = t.resource;
        if (!n)
            return;
        if (globalThis.HTMLImageElement && n instanceof HTMLImageElement) {
            const a = je.get().createCanvas(n.width, n.height);
            a.getContext("2d").drawImage(n, 0, 0, n.width, n.height),
            t.resource = a,
            Ne("ImageSource: Image element passed, converting to canvas and replacing resource.")
        }
        const i = Math.min(e.width, t.resourceWidth || t.pixelWidth)
          , o = Math.min(e.height, t.resourceHeight || t.pixelHeight)
          , s = t.alphaMode === "premultiply-alpha-on-upload";
        r.device.queue.copyExternalImageToTexture({
            source: n
        }, {
            texture: e,
            premultipliedAlpha: s
        }, {
            width: i,
            height: o
        })
    }
}
  , Gde = {
    type: "video",
    upload(t, e, r) {
        kO.upload(t, e, r)
    }
};
class Hde {
    constructor(e) {
        this.device = e,
        this.sampler = e.createSampler({
            minFilter: "linear"
        }),
        this.pipelines = {}
    }
    _getMipmapPipeline(e) {
        let r = this.pipelines[e];
        return r || (this.mipmapShaderModule || (this.mipmapShaderModule = this.device.createShaderModule({
            code: `
                        var<private> pos : array<vec2<f32>, 3> = array<vec2<f32>, 3>(
                        vec2<f32>(-1.0, -1.0), vec2<f32>(-1.0, 3.0), vec2<f32>(3.0, -1.0));

                        struct VertexOutput {
                        @builtin(position) position : vec4<f32>,
                        @location(0) texCoord : vec2<f32>,
                        };

                        @vertex
                        fn vertexMain(@builtin(vertex_index) vertexIndex : u32) -> VertexOutput {
                        var output : VertexOutput;
                        output.texCoord = pos[vertexIndex] * vec2<f32>(0.5, -0.5) + vec2<f32>(0.5);
                        output.position = vec4<f32>(pos[vertexIndex], 0.0, 1.0);
                        return output;
                        }

                        @group(0) @binding(0) var imgSampler : sampler;
                        @group(0) @binding(1) var img : texture_2d<f32>;

                        @fragment
                        fn fragmentMain(@location(0) texCoord : vec2<f32>) -> @location(0) vec4<f32> {
                        return textureSample(img, imgSampler, texCoord);
                        }
                    `
        })),
        r = this.device.createRenderPipeline({
            layout: "auto",
            vertex: {
                module: this.mipmapShaderModule,
                entryPoint: "vertexMain"
            },
            fragment: {
                module: this.mipmapShaderModule,
                entryPoint: "fragmentMain",
                targets: [{
                    format: e
                }]
            }
        }),
        this.pipelines[e] = r),
        r
    }
    generateMipmap(e) {
        const r = this._getMipmapPipeline(e.format);
        if (e.dimension === "3d" || e.dimension === "1d")
            throw new Error("Generating mipmaps for non-2d textures is currently unsupported!");
        let n = e;
        const i = e.depthOrArrayLayers || 1
          , o = e.usage & GPUTextureUsage.RENDER_ATTACHMENT;
        if (!o) {
            const l = {
                size: {
                    width: Math.ceil(e.width / 2),
                    height: Math.ceil(e.height / 2),
                    depthOrArrayLayers: i
                },
                format: e.format,
                usage: GPUTextureUsage.TEXTURE_BINDING | GPUTextureUsage.COPY_SRC | GPUTextureUsage.RENDER_ATTACHMENT,
                mipLevelCount: e.mipLevelCount - 1
            };
            n = this.device.createTexture(l)
        }
        const s = this.device.createCommandEncoder({})
          , a = r.getBindGroupLayout(0);
        for (let l = 0; l < i; ++l) {
            let c = e.createView({
                baseMipLevel: 0,
                mipLevelCount: 1,
                dimension: "2d",
                baseArrayLayer: l,
                arrayLayerCount: 1
            })
              , u = o ? 1 : 0;
            for (let f = 1; f < e.mipLevelCount; ++f) {
                const d = n.createView({
                    baseMipLevel: u++,
                    mipLevelCount: 1,
                    dimension: "2d",
                    baseArrayLayer: l,
                    arrayLayerCount: 1
                })
                  , h = s.beginRenderPass({
                    colorAttachments: [{
                        view: d,
                        storeOp: "store",
                        loadOp: "clear",
                        clearValue: {
                            r: 0,
                            g: 0,
                            b: 0,
                            a: 0
                        }
                    }]
                })
                  , x = this.device.createBindGroup({
                    layout: a,
                    entries: [{
                        binding: 0,
                        resource: this.sampler
                    }, {
                        binding: 1,
                        resource: c
                    }]
                });
                h.setPipeline(r),
                h.setBindGroup(0, x),
                h.draw(3, 1, 0, 0),
                h.end(),
                c = d
            }
        }
        if (!o) {
            const l = {
                width: Math.ceil(e.width / 2),
                height: Math.ceil(e.height / 2),
                depthOrArrayLayers: i
            };
            for (let c = 1; c < e.mipLevelCount; ++c)
                s.copyTextureToTexture({
                    texture: n,
                    mipLevel: c - 1
                }, {
                    texture: e,
                    mipLevel: c
                }, l),
                l.width = Math.ceil(l.width / 2),
                l.height = Math.ceil(l.height / 2)
        }
        return this.device.queue.submit([s.finish()]),
        o || n.destroy(),
        e
    }
}
class RO {
    constructor(e) {
        this.managedTextures = [],
        this._gpuSources = Object.create(null),
        this._gpuSamplers = Object.create(null),
        this._bindGroupHash = Object.create(null),
        this._textureViewHash = Object.create(null),
        this._uploads = {
            image: kO,
            buffer: Lde,
            video: Gde,
            compressed: Ude
        },
        this._renderer = e,
        e.renderableGC.addManagedHash(this, "_gpuSources"),
        e.renderableGC.addManagedHash(this, "_gpuSamplers"),
        e.renderableGC.addManagedHash(this, "_bindGroupHash"),
        e.renderableGC.addManagedHash(this, "_textureViewHash")
    }
    contextChange(e) {
        this._gpu = e
    }
    initSource(e) {
        return this._gpuSources[e.uid] ? this._gpuSources[e.uid] : this._initSource(e)
    }
    _initSource(e) {
        if (e.autoGenerateMipmaps) {
            const l = Math.max(e.pixelWidth, e.pixelHeight);
            e.mipLevelCount = Math.floor(Math.log2(l)) + 1
        }
        let r = GPUTextureUsage.TEXTURE_BINDING | GPUTextureUsage.COPY_DST;
        e.uploadMethodId !== "compressed" && (r |= GPUTextureUsage.RENDER_ATTACHMENT,
        r |= GPUTextureUsage.COPY_SRC);
        const n = OO[e.format] || {
            blockBytes: 4,
            blockWidth: 1,
            blockHeight: 1
        }
          , i = Math.ceil(e.pixelWidth / n.blockWidth) * n.blockWidth
          , o = Math.ceil(e.pixelHeight / n.blockHeight) * n.blockHeight
          , s = {
            label: e.label,
            size: {
                width: i,
                height: o
            },
            format: e.format,
            sampleCount: e.sampleCount,
            mipLevelCount: e.mipLevelCount,
            dimension: e.dimension,
            usage: r
        }
          , a = this._gpuSources[e.uid] = this._gpu.device.createTexture(s);
        return this.managedTextures.includes(e) || (e.on("update", this.onSourceUpdate, this),
        e.on("resize", this.onSourceResize, this),
        e.on("destroy", this.onSourceDestroy, this),
        e.on("unload", this.onSourceUnload, this),
        e.on("updateMipmaps", this.onUpdateMipmaps, this),
        this.managedTextures.push(e)),
        this.onSourceUpdate(e),
        a
    }
    onSourceUpdate(e) {
        const r = this.getGpuSource(e);
        r && (this._uploads[e.uploadMethodId] && this._uploads[e.uploadMethodId].upload(e, r, this._gpu),
        e.autoGenerateMipmaps && e.mipLevelCount > 1 && this.onUpdateMipmaps(e))
    }
    onSourceUnload(e) {
        const r = this._gpuSources[e.uid];
        r && (this._gpuSources[e.uid] = null,
        r.destroy())
    }
    onUpdateMipmaps(e) {
        this._mipmapGenerator || (this._mipmapGenerator = new Hde(this._gpu.device));
        const r = this.getGpuSource(e);
        this._mipmapGenerator.generateMipmap(r)
    }
    onSourceDestroy(e) {
        e.off("update", this.onSourceUpdate, this),
        e.off("unload", this.onSourceUnload, this),
        e.off("destroy", this.onSourceDestroy, this),
        e.off("resize", this.onSourceResize, this),
        e.off("updateMipmaps", this.onUpdateMipmaps, this),
        this.managedTextures.splice(this.managedTextures.indexOf(e), 1),
        this.onSourceUnload(e)
    }
    onSourceResize(e) {
        const r = this._gpuSources[e.uid];
        r ? (r.width !== e.pixelWidth || r.height !== e.pixelHeight) && (this._textureViewHash[e.uid] = null,
        this._bindGroupHash[e.uid] = null,
        this.onSourceUnload(e),
        this.initSource(e)) : this.initSource(e)
    }
    _initSampler(e) {
        return this._gpuSamplers[e._resourceId] = this._gpu.device.createSampler(e),
        this._gpuSamplers[e._resourceId]
    }
    getGpuSampler(e) {
        return this._gpuSamplers[e._resourceId] || this._initSampler(e)
    }
    getGpuSource(e) {
        return this._gpuSources[e.uid] || this.initSource(e)
    }
    getTextureBindGroup(e) {
        return this._bindGroupHash[e.uid] ?? this._createTextureBindGroup(e)
    }
    _createTextureBindGroup(e) {
        const r = e.source;
        return this._bindGroupHash[e.uid] = new is({
            0: r,
            1: r.style,
            2: new vn({
                uTextureMatrix: {
                    type: "mat3x3<f32>",
                    value: e.textureMatrix.mapCoord
                }
            })
        }),
        this._bindGroupHash[e.uid]
    }
    getTextureView(e) {
        const r = e.source;
        return this._textureViewHash[r.uid] ?? this._createTextureView(r)
    }
    _createTextureView(e) {
        return this._textureViewHash[e.uid] = this.getGpuSource(e).createView(),
        this._textureViewHash[e.uid]
    }
    generateCanvas(e) {
        const r = this._renderer
          , n = r.gpu.device.createCommandEncoder()
          , i = je.get().createCanvas();
        i.width = e.source.pixelWidth,
        i.height = e.source.pixelHeight;
        const o = i.getContext("webgpu");
        return o.configure({
            device: r.gpu.device,
            usage: GPUTextureUsage.COPY_DST | GPUTextureUsage.COPY_SRC,
            format: je.get().getNavigator().gpu.getPreferredCanvasFormat(),
            alphaMode: "premultiplied"
        }),
        n.copyTextureToTexture({
            texture: r.texture.getGpuSource(e.source),
            origin: {
                x: 0,
                y: 0
            }
        }, {
            texture: o.getCurrentTexture()
        }, {
            width: i.width,
            height: i.height
        }),
        r.gpu.device.queue.submit([n.finish()]),
        i
    }
    getPixels(e) {
        const r = this.generateCanvas(e)
          , n = ms.getOptimalCanvasAndContext(r.width, r.height)
          , i = n.context;
        i.drawImage(r, 0, 0);
        const {width: o, height: s} = r
          , a = i.getImageData(0, 0, o, s)
          , l = new Uint8ClampedArray(a.data.buffer);
        return ms.returnCanvasAndContext(n),
        {
            pixels: l,
            width: o,
            height: s
        }
    }
    destroy() {
        this.managedTextures.slice().forEach(e => this.onSourceDestroy(e)),
        this.managedTextures = null;
        for (const e of Object.keys(this._bindGroupHash)) {
            const r = Number(e)
              , n = this._bindGroupHash[r];
            n == null || n.destroy(),
            this._bindGroupHash[r] = null
        }
        this._renderer = null,
        this._gpu = null,
        this._mipmapGenerator = null,
        this._gpuSources = null,
        this._bindGroupHash = null,
        this._textureViewHash = null,
        this._gpuSamplers = null
    }
}
RO.extension = {
    type: [X.WebGPUSystem],
    name: "texture"
};
class MO {
    constructor() {
        this._maxTextures = 0
    }
    contextChange(e) {
        const r = new vn({
            uTransformMatrix: {
                value: new Pe,
                type: "mat3x3<f32>"
            },
            uColor: {
                value: new Float32Array([1, 1, 1, 1]),
                type: "vec4<f32>"
            },
            uRound: {
                value: 0,
                type: "f32"
            }
        });
        this._maxTextures = e.limits.maxBatchableTextures;
        const n = ud({
            name: "graphics",
            bits: [_b, Cb(this._maxTextures), cfe, dd]
        });
        this.shader = new _i({
            gpuProgram: n,
            resources: {
                localUniforms: r
            }
        })
    }
    execute(e, r) {
        const n = r.context
          , i = n.customShader || this.shader
          , o = e.renderer
          , s = o.graphicsContext
          , {batcher: a, instructions: l} = s.getContextRenderData(n)
          , c = o.encoder;
        c.setGeometry(a.geometry, i.gpuProgram);
        const u = o.globalUniforms.bindGroup;
        c.setBindGroup(0, u, i.gpuProgram);
        const f = o.renderPipes.uniformBatch.getUniformBindGroup(i.resources.localUniforms, !0);
        c.setBindGroup(2, f, i.gpuProgram);
        const d = l.instructions;
        let h = null;
        for (let x = 0; x < l.instructionSize; x++) {
            const y = d[x];
            if (y.topology !== h && (h = y.topology,
            c.setPipelineFromGeometryProgramAndState(a.geometry, i.gpuProgram, e.state, y.topology)),
            i.groups[1] = y.bindGroup,
            !y.gpuBindGroup) {
                const m = y.textures;
                y.bindGroup = Eb(m.textures, m.count, this._maxTextures),
                y.gpuBindGroup = o.bindGroup.getBindGroup(y.bindGroup, i.gpuProgram, 1)
            }
            c.setBindGroup(1, y.bindGroup, i.gpuProgram),
            c.renderPassEncoder.drawIndexed(y.size, 1, y.start)
        }
    }
    destroy() {
        this.shader.destroy(!0),
        this.shader = null
    }
}
MO.extension = {
    type: [X.WebGPUPipesAdaptor],
    name: "graphics"
};
class NO {
    init() {
        const e = ud({
            name: "mesh",
            bits: [Y0, ufe, dd]
        });
        this._shader = new _i({
            gpuProgram: e,
            resources: {
                uTexture: Be.EMPTY._source,
                uSampler: Be.EMPTY._source.style,
                textureUniforms: {
                    uTextureMatrix: {
                        type: "mat3x3<f32>",
                        value: new Pe
                    }
                }
            }
        })
    }
    execute(e, r) {
        const n = e.renderer;
        let i = r._shader;
        if (!i)
            i = this._shader,
            i.groups[2] = n.texture.getTextureBindGroup(r.texture);
        else if (!i.gpuProgram) {
            Ne("Mesh shader has no gpuProgram", r.shader);
            return
        }
        const o = i.gpuProgram;
        if (o.autoAssignGlobalUniforms && (i.groups[0] = n.globalUniforms.bindGroup),
        o.autoAssignLocalUniforms) {
            const s = e.localUniforms;
            i.groups[1] = n.renderPipes.uniformBatch.getUniformBindGroup(s, !0)
        }
        n.encoder.draw({
            geometry: r._geometry,
            shader: i,
            state: r.state
        })
    }
    destroy() {
        this._shader.destroy(!0),
        this._shader = null
    }
}
NO.extension = {
    type: [X.WebGPUPipesAdaptor],
    name: "mesh"
};
const Vde = [...gO, SO, AO, Xb, wO, bO, RO, FO, PO, IO, DO, CO, BO, _O]
  , zde = [...mO, TO]
  , jde = [EI, NO, MO]
  , LO = []
  , $O = []
  , UO = [];
$e.handleByNamedList(X.WebGPUSystem, LO);
$e.handleByNamedList(X.WebGPUPipes, $O);
$e.handleByNamedList(X.WebGPUPipesAdaptor, UO);
$e.add(...Vde, ...zde, ...jde);
class Wde extends x1 {
    constructor() {
        const e = {
            name: "webgpu",
            type: qn.WEBGPU,
            systems: LO,
            renderPipes: $O,
            renderPipeAdaptors: UO
        };
        super(e)
    }
}
const Yde = Object.freeze(Object.defineProperty({
    __proto__: null,
    WebGPURenderer: Wde
}, Symbol.toStringTag, {
    value: "Module"
}));
class Xde {
    constructor() {
        this.batches = [],
        this.batched = !1
    }
    destroy() {
        this.batches.forEach(e => {
            xr.return(e)
        }
        ),
        this.batches.length = 0
    }
}
class GO {
    constructor(e, r) {
        this.state = Hi.for2d(),
        this.renderer = e,
        this._adaptor = r,
        this.renderer.runners.contextChange.add(this)
    }
    contextChange() {
        this._adaptor.contextChange(this.renderer)
    }
    validateRenderable(e) {
        const r = e.context
          , n = !!e._gpuData
          , i = this.renderer.graphicsContext.updateGpuContext(r);
        return !!(i.isBatchable || n !== i.isBatchable)
    }
    addRenderable(e, r) {
        const n = this.renderer.graphicsContext.updateGpuContext(e.context);
        e.didViewUpdate && this._rebuild(e),
        n.isBatchable ? this._addToBatcher(e, r) : (this.renderer.renderPipes.batch.break(r),
        r.add(e))
    }
    updateRenderable(e) {
        const n = this._getGpuDataForRenderable(e).batches;
        for (let i = 0; i < n.length; i++) {
            const o = n[i];
            o._batcher.updateElement(o)
        }
    }
    execute(e) {
        if (!e.isRenderable)
            return;
        const r = this.renderer
          , n = e.context;
        if (!r.graphicsContext.getGpuContext(n).batches.length)
            return;
        const o = n.customShader || this._adaptor.shader;
        this.state.blendMode = e.groupBlendMode;
        const s = o.resources.localUniforms.uniforms;
        s.uTransformMatrix = e.groupTransform,
        s.uRound = r._roundPixels | e._roundPixels,
        xd(e.groupColorAlpha, s.uColor, 0),
        this._adaptor.execute(this, e)
    }
    _rebuild(e) {
        const r = this._getGpuDataForRenderable(e)
          , n = this.renderer.graphicsContext.updateGpuContext(e.context);
        r.destroy(),
        n.isBatchable && this._updateBatchesForRenderable(e, r)
    }
    _addToBatcher(e, r) {
        const n = this.renderer.renderPipes.batch
          , i = this._getGpuDataForRenderable(e).batches;
        for (let o = 0; o < i.length; o++) {
            const s = i[o];
            n.addToBatch(s, r)
        }
    }
    _getGpuDataForRenderable(e) {
        return e._gpuData[this.renderer.uid] || this._initGpuDataForRenderable(e)
    }
    _initGpuDataForRenderable(e) {
        const r = new Xde;
        return e._gpuData[this.renderer.uid] = r,
        r
    }
    _updateBatchesForRenderable(e, r) {
        const n = e.context
          , i = this.renderer.graphicsContext.getGpuContext(n)
          , o = this.renderer._roundPixels | e._roundPixels;
        r.batches = i.batches.map(s => {
            const a = xr.get(Sb);
            return s.copyTo(a),
            a.renderable = e,
            a.roundPixels = o,
            a
        }
        )
    }
    destroy() {
        this.renderer = null,
        this._adaptor.destroy(),
        this._adaptor = null,
        this.state = null
    }
}
GO.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "graphics"
};
const HO = class VO extends Rb {
    constructor(...e) {
        super({});
        let r = e[0] ?? {};
        typeof r == "number" && (Re(tt, "PlaneGeometry constructor changed please use { width, height, verticesX, verticesY } instead"),
        r = {
            width: r,
            height: e[1],
            verticesX: e[2],
            verticesY: e[3]
        }),
        this.build(r)
    }
    build(e) {
        e = {
            ...VO.defaultOptions,
            ...e
        },
        this.verticesX = this.verticesX ?? e.verticesX,
        this.verticesY = this.verticesY ?? e.verticesY,
        this.width = this.width ?? e.width,
        this.height = this.height ?? e.height;
        const r = this.verticesX * this.verticesY
          , n = []
          , i = []
          , o = []
          , s = this.verticesX - 1
          , a = this.verticesY - 1
          , l = this.width / s
          , c = this.height / a;
        for (let f = 0; f < r; f++) {
            const d = f % this.verticesX
              , h = f / this.verticesX | 0;
            n.push(d * l, h * c),
            i.push(d / s, h / a)
        }
        const u = s * a;
        for (let f = 0; f < u; f++) {
            const d = f % s
              , h = f / s | 0
              , x = h * this.verticesX + d
              , y = h * this.verticesX + d + 1
              , m = (h + 1) * this.verticesX + d
              , E = (h + 1) * this.verticesX + d + 1;
            o.push(x, y, m, y, E, m)
        }
        this.buffers[0].data = new Float32Array(n),
        this.buffers[1].data = new Float32Array(i),
        this.indexBuffer.data = new Uint32Array(o),
        this.buffers[0].update(),
        this.buffers[1].update(),
        this.indexBuffer.update()
    }
}
;
HO.defaultOptions = {
    width: 100,
    height: 100,
    verticesX: 10,
    verticesY: 10
};
let Kde = HO;
class Kb {
    constructor() {
        this.batcherName = "default",
        this.packAsQuad = !1,
        this.indexOffset = 0,
        this.attributeOffset = 0,
        this.roundPixels = 0,
        this._batcher = null,
        this._batch = null,
        this._textureMatrixUpdateId = -1,
        this._uvUpdateId = -1
    }
    get blendMode() {
        return this.renderable.groupBlendMode
    }
    get topology() {
        return this._topology || this.geometry.topology
    }
    set topology(e) {
        this._topology = e
    }
    reset() {
        this.renderable = null,
        this.texture = null,
        this._batcher = null,
        this._batch = null,
        this.geometry = null,
        this._uvUpdateId = -1,
        this._textureMatrixUpdateId = -1
    }
    setTexture(e) {
        this.texture !== e && (this.texture = e,
        this._textureMatrixUpdateId = -1)
    }
    get uvs() {
        const r = this.geometry.getBuffer("aUV")
          , n = r.data;
        let i = n;
        const o = this.texture.textureMatrix;
        return o.isSimple || (i = this._transformedUvs,
        (this._textureMatrixUpdateId !== o._updateID || this._uvUpdateId !== r._updateID) && ((!i || i.length < n.length) && (i = this._transformedUvs = new Float32Array(n.length)),
        this._textureMatrixUpdateId = o._updateID,
        this._uvUpdateId = r._updateID,
        o.multiplyUvs(n, i))),
        i
    }
    get positions() {
        return this.geometry.positions
    }
    get indices() {
        return this.geometry.indices
    }
    get color() {
        return this.renderable.groupColorAlpha
    }
    get groupTransform() {
        return this.renderable.groupTransform
    }
    get attributeSize() {
        return this.geometry.positions.length / 2
    }
    get indexSize() {
        return this.geometry.indices.length
    }
}
class U3 {
    destroy() {}
}
class zO {
    constructor(e, r) {
        this.localUniforms = new vn({
            uTransformMatrix: {
                value: new Pe,
                type: "mat3x3<f32>"
            },
            uColor: {
                value: new Float32Array([1, 1, 1, 1]),
                type: "vec4<f32>"
            },
            uRound: {
                value: 0,
                type: "f32"
            }
        }),
        this.localUniformsBindGroup = new is({
            0: this.localUniforms
        }),
        this.renderer = e,
        this._adaptor = r,
        this._adaptor.init()
    }
    validateRenderable(e) {
        const r = this._getMeshData(e)
          , n = r.batched
          , i = e.batched;
        if (r.batched = i,
        n !== i)
            return !0;
        if (i) {
            const o = e._geometry;
            if (o.indices.length !== r.indexSize || o.positions.length !== r.vertexSize)
                return r.indexSize = o.indices.length,
                r.vertexSize = o.positions.length,
                !0;
            const s = this._getBatchableMesh(e);
            return s.texture.uid !== e._texture.uid && (s._textureMatrixUpdateId = -1),
            !s._batcher.checkAndUpdateTexture(s, e._texture)
        }
        return !1
    }
    addRenderable(e, r) {
        var o, s;
        const n = this.renderer.renderPipes.batch
          , i = this._getMeshData(e);
        if (e.didViewUpdate && (i.indexSize = (o = e._geometry.indices) == null ? void 0 : o.length,
        i.vertexSize = (s = e._geometry.positions) == null ? void 0 : s.length),
        i.batched) {
            const a = this._getBatchableMesh(e);
            a.setTexture(e._texture),
            a.geometry = e._geometry,
            n.addToBatch(a, r)
        } else
            n.break(r),
            r.add(e)
    }
    updateRenderable(e) {
        if (e.batched) {
            const r = this._getBatchableMesh(e);
            r.setTexture(e._texture),
            r.geometry = e._geometry,
            r._batcher.updateElement(r)
        }
    }
    execute(e) {
        if (!e.isRenderable)
            return;
        e.state.blendMode = Df(e.groupBlendMode, e.texture._source);
        const r = this.localUniforms;
        r.uniforms.uTransformMatrix = e.groupTransform,
        r.uniforms.uRound = this.renderer._roundPixels | e._roundPixels,
        r.update(),
        xd(e.groupColorAlpha, r.uniforms.uColor, 0),
        this._adaptor.execute(this, e)
    }
    _getMeshData(e) {
        var r, n;
        return (r = e._gpuData)[n = this.renderer.uid] || (r[n] = new U3),
        e._gpuData[this.renderer.uid].meshData || this._initMeshData(e)
    }
    _initMeshData(e) {
        return e._gpuData[this.renderer.uid].meshData = {
            batched: e.batched,
            indexSize: 0,
            vertexSize: 0
        },
        e._gpuData[this.renderer.uid].meshData
    }
    _getBatchableMesh(e) {
        var r, n;
        return (r = e._gpuData)[n = this.renderer.uid] || (r[n] = new U3),
        e._gpuData[this.renderer.uid].batchableMesh || this._initBatchableMesh(e)
    }
    _initBatchableMesh(e) {
        const r = new Kb;
        return r.renderable = e,
        r.setTexture(e._texture),
        r.transform = e.groupTransform,
        r.roundPixels = this.renderer._roundPixels | e._roundPixels,
        e._gpuData[this.renderer.uid].batchableMesh = r,
        r
    }
    destroy() {
        this.localUniforms = null,
        this.localUniformsBindGroup = null,
        this._adaptor.destroy(),
        this._adaptor = null,
        this.renderer = null
    }
}
zO.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "mesh"
};
class qde {
    execute(e, r) {
        const n = e.state
          , i = e.renderer
          , o = r.shader || e.defaultShader;
        o.resources.uTexture = r.texture._source,
        o.resources.uniforms = e.localUniforms;
        const s = i.gl
          , a = e.getBuffers(r);
        i.shader.bind(o),
        i.state.set(n),
        i.geometry.bind(a.geometry, o.glProgram);
        const c = a.geometry.indexBuffer.data.BYTES_PER_ELEMENT === 2 ? s.UNSIGNED_SHORT : s.UNSIGNED_INT;
        s.drawElements(s.TRIANGLES, r.particleChildren.length * 6, c, 0)
    }
}
class Zde {
    execute(e, r) {
        const n = e.renderer
          , i = r.shader || e.defaultShader;
        i.groups[0] = n.renderPipes.uniformBatch.getUniformBindGroup(e.localUniforms, !0),
        i.groups[1] = n.texture.getTextureBindGroup(r.texture);
        const o = e.state
          , s = e.getBuffers(r);
        n.encoder.draw({
            geometry: s.geometry,
            shader: r.shader || e.defaultShader,
            state: o,
            size: r.particleChildren.length * 6
        })
    }
}
function G3(t, e=null) {
    const r = t * 6;
    if (r > 65535 ? e || (e = new Uint32Array(r)) : e || (e = new Uint16Array(r)),
    e.length !== r)
        throw new Error(`Out buffer length is incorrect, got ${e.length} and expected ${r}`);
    for (let n = 0, i = 0; n < r; n += 6,
    i += 4)
        e[n + 0] = i + 0,
        e[n + 1] = i + 1,
        e[n + 2] = i + 2,
        e[n + 3] = i + 0,
        e[n + 4] = i + 2,
        e[n + 5] = i + 3;
    return e
}
function Jde(t) {
    return {
        dynamicUpdate: H3(t, !0),
        staticUpdate: H3(t, !1)
    }
}
function H3(t, e) {
    const r = [];
    r.push(`

        var index = 0;

        for (let i = 0; i < ps.length; ++i)
        {
            const p = ps[i];

            `);
    let n = 0;
    for (const o in t) {
        const s = t[o];
        if (e !== s.dynamic)
            continue;
        r.push(`offset = index + ${n}`),
        r.push(s.code);
        const a = ha(s.format);
        n += a.stride / 4
    }
    r.push(`
            index += stride * 4;
        }
    `),
    r.unshift(`
        var stride = ${n};
    `);
    const i = r.join(`
`);
    return new Function("ps","f32v","u32v",i)
}
class Qde {
    constructor(e) {
        this._size = 0,
        this._generateParticleUpdateCache = {};
        const r = this._size = e.size ?? 1e3
          , n = e.properties;
        let i = 0
          , o = 0;
        for (const u in n) {
            const f = n[u]
              , d = ha(f.format);
            f.dynamic ? o += d.stride : i += d.stride
        }
        this._dynamicStride = o / 4,
        this._staticStride = i / 4,
        this.staticAttributeBuffer = new Tc(r * 4 * i),
        this.dynamicAttributeBuffer = new Tc(r * 4 * o),
        this.indexBuffer = G3(r);
        const s = new cd;
        let a = 0
          , l = 0;
        this._staticBuffer = new Yn({
            data: new Float32Array(1),
            label: "static-particle-buffer",
            shrinkToFit: !1,
            usage: it.VERTEX | it.COPY_DST
        }),
        this._dynamicBuffer = new Yn({
            data: new Float32Array(1),
            label: "dynamic-particle-buffer",
            shrinkToFit: !1,
            usage: it.VERTEX | it.COPY_DST
        });
        for (const u in n) {
            const f = n[u]
              , d = ha(f.format);
            f.dynamic ? (s.addAttribute(f.attributeName, {
                buffer: this._dynamicBuffer,
                stride: this._dynamicStride * 4,
                offset: a * 4,
                format: f.format
            }),
            a += d.size) : (s.addAttribute(f.attributeName, {
                buffer: this._staticBuffer,
                stride: this._staticStride * 4,
                offset: l * 4,
                format: f.format
            }),
            l += d.size)
        }
        s.addIndex(this.indexBuffer);
        const c = this.getParticleUpdate(n);
        this._dynamicUpload = c.dynamicUpdate,
        this._staticUpload = c.staticUpdate,
        this.geometry = s
    }
    getParticleUpdate(e) {
        const r = ehe(e);
        return this._generateParticleUpdateCache[r] ? this._generateParticleUpdateCache[r] : (this._generateParticleUpdateCache[r] = this.generateParticleUpdate(e),
        this._generateParticleUpdateCache[r])
    }
    generateParticleUpdate(e) {
        return Jde(e)
    }
    update(e, r) {
        e.length > this._size && (r = !0,
        this._size = Math.max(e.length, this._size * 1.5 | 0),
        this.staticAttributeBuffer = new Tc(this._size * this._staticStride * 4 * 4),
        this.dynamicAttributeBuffer = new Tc(this._size * this._dynamicStride * 4 * 4),
        this.indexBuffer = G3(this._size),
        this.geometry.indexBuffer.setDataWithSize(this.indexBuffer, this.indexBuffer.byteLength, !0));
        const n = this.dynamicAttributeBuffer;
        if (this._dynamicUpload(e, n.float32View, n.uint32View),
        this._dynamicBuffer.setDataWithSize(this.dynamicAttributeBuffer.float32View, e.length * this._dynamicStride * 4, !0),
        r) {
            const i = this.staticAttributeBuffer;
            this._staticUpload(e, i.float32View, i.uint32View),
            this._staticBuffer.setDataWithSize(i.float32View, e.length * this._staticStride * 4, !0)
        }
    }
    destroy() {
        this._staticBuffer.destroy(),
        this._dynamicBuffer.destroy(),
        this.geometry.destroy()
    }
}
function ehe(t) {
    const e = [];
    for (const r in t) {
        const n = t[r];
        e.push(r, n.code, n.dynamic ? "d" : "s")
    }
    return e.join("_")
}
var the = `varying vec2 vUV;
varying vec4 vColor;

uniform sampler2D uTexture;

void main(void){
    vec4 color = texture2D(uTexture, vUV) * vColor;
    gl_FragColor = color;
}`
  , rhe = `attribute vec2 aVertex;
attribute vec2 aUV;
attribute vec4 aColor;

attribute vec2 aPosition;
attribute float aRotation;

uniform mat3 uTranslationMatrix;
uniform float uRound;
uniform vec2 uResolution;
uniform vec4 uColor;

varying vec2 vUV;
varying vec4 vColor;

vec2 roundPixels(vec2 position, vec2 targetSize)
{       
    return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
}

void main(void){
    float cosRotation = cos(aRotation);
    float sinRotation = sin(aRotation);
    float x = aVertex.x * cosRotation - aVertex.y * sinRotation;
    float y = aVertex.x * sinRotation + aVertex.y * cosRotation;

    vec2 v = vec2(x, y);
    v = v + aPosition;

    gl_Position = vec4((uTranslationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);

    if(uRound == 1.0)
    {
        gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
    }

    vUV = aUV;
    vColor = vec4(aColor.rgb * aColor.a, aColor.a) * uColor;
}
`
  , V3 = `
struct ParticleUniforms {
  uTranslationMatrix:mat3x3<f32>,
  uColor:vec4<f32>,
  uRound:f32,
  uResolution:vec2<f32>,
};

fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32>
{
  return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
}

@group(0) @binding(0) var<uniform> uniforms: ParticleUniforms;

@group(1) @binding(0) var uTexture: texture_2d<f32>;
@group(1) @binding(1) var uSampler : sampler;

struct VSOutput {
    @builtin(position) position: vec4<f32>,
    @location(0) uv : vec2<f32>,
    @location(1) color : vec4<f32>,
  };
@vertex
fn mainVertex(
  @location(0) aVertex: vec2<f32>,
  @location(1) aPosition: vec2<f32>,
  @location(2) aUV: vec2<f32>,
  @location(3) aColor: vec4<f32>,
  @location(4) aRotation: f32,
) -> VSOutput {
  
   let v = vec2(
       aVertex.x * cos(aRotation) - aVertex.y * sin(aRotation),
       aVertex.x * sin(aRotation) + aVertex.y * cos(aRotation)
   ) + aPosition;

   var position = vec4((uniforms.uTranslationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);

   if(uniforms.uRound == 1.0) {
       position = vec4(roundPixels(position.xy, uniforms.uResolution), position.zw);
   }

    let vColor = vec4(aColor.rgb * aColor.a, aColor.a) * uniforms.uColor;

  return VSOutput(
   position,
   aUV,
   vColor,
  );
}

@fragment
fn mainFragment(
  @location(0) uv: vec2<f32>,
  @location(1) color: vec4<f32>,
  @builtin(position) position: vec4<f32>,
) -> @location(0) vec4<f32> {

    var sample = textureSample(uTexture, uSampler, uv) * color;
   
    return sample;
}`;
class nhe extends _i {
    constructor() {
        const e = ba.from({
            vertex: rhe,
            fragment: the
        })
          , r = Cs.from({
            fragment: {
                source: V3,
                entryPoint: "mainFragment"
            },
            vertex: {
                source: V3,
                entryPoint: "mainVertex"
            }
        });
        super({
            glProgram: e,
            gpuProgram: r,
            resources: {
                uTexture: Be.WHITE.source,
                uSampler: new wo({}),
                uniforms: {
                    uTranslationMatrix: {
                        value: new Pe,
                        type: "mat3x3<f32>"
                    },
                    uColor: {
                        value: new Ut(16777215),
                        type: "vec4<f32>"
                    },
                    uRound: {
                        value: 1,
                        type: "f32"
                    },
                    uResolution: {
                        value: [0, 0],
                        type: "vec2<f32>"
                    }
                }
            }
        })
    }
}
class jO {
    constructor(e, r) {
        this.state = Hi.for2d(),
        this.localUniforms = new vn({
            uTranslationMatrix: {
                value: new Pe,
                type: "mat3x3<f32>"
            },
            uColor: {
                value: new Float32Array(4),
                type: "vec4<f32>"
            },
            uRound: {
                value: 1,
                type: "f32"
            },
            uResolution: {
                value: [0, 0],
                type: "vec2<f32>"
            }
        }),
        this.renderer = e,
        this.adaptor = r,
        this.defaultShader = new nhe,
        this.state = Hi.for2d()
    }
    validateRenderable(e) {
        return !1
    }
    addRenderable(e, r) {
        this.renderer.renderPipes.batch.break(r),
        r.add(e)
    }
    getBuffers(e) {
        return e._gpuData[this.renderer.uid] || this._initBuffer(e)
    }
    _initBuffer(e) {
        return e._gpuData[this.renderer.uid] = new Qde({
            size: e.particleChildren.length,
            properties: e._properties
        }),
        e._gpuData[this.renderer.uid]
    }
    updateRenderable(e) {}
    execute(e) {
        const r = e.particleChildren;
        if (r.length === 0)
            return;
        const n = this.renderer
          , i = this.getBuffers(e);
        e.texture || (e.texture = r[0].texture);
        const o = this.state;
        i.update(r, e._childrenDirty),
        e._childrenDirty = !1,
        o.blendMode = Df(e.blendMode, e.texture._source);
        const s = this.localUniforms.uniforms
          , a = s.uTranslationMatrix;
        e.worldTransform.copyTo(a),
        a.prepend(n.globalUniforms.globalUniformData.projectionMatrix),
        s.uResolution = n.globalUniforms.globalUniformData.resolution,
        s.uRound = n._roundPixels | e._roundPixels,
        xd(e.groupColorAlpha, s.uColor, 0),
        this.adaptor.execute(this, e)
    }
    destroy() {
        this.renderer = null,
        this.defaultShader && (this.defaultShader.destroy(),
        this.defaultShader = null)
    }
}
class WO extends jO {
    constructor(e) {
        super(e, new qde)
    }
}
WO.extension = {
    type: [X.WebGLPipes],
    name: "particle"
};
class YO extends jO {
    constructor(e) {
        super(e, new Zde)
    }
}
YO.extension = {
    type: [X.WebGPUPipes],
    name: "particle"
};
const XO = class bE {
    constructor(e) {
        if (e instanceof Be)
            this.texture = e,
            Qy(this, bE.defaultOptions, {});
        else {
            const r = {
                ...bE.defaultOptions,
                ...e
            };
            Qy(this, r, {})
        }
    }
    get alpha() {
        return this._alpha
    }
    set alpha(e) {
        this._alpha = Math.min(Math.max(e, 0), 1),
        this._updateColor()
    }
    get tint() {
        return U0(this._tint)
    }
    set tint(e) {
        this._tint = Ut.shared.setValue(e ?? 16777215).toBgrNumber(),
        this._updateColor()
    }
    _updateColor() {
        this.color = this._tint + ((this._alpha * 255 | 0) << 24)
    }
}
;
XO.defaultOptions = {
    anchorX: 0,
    anchorY: 0,
    x: 0,
    y: 0,
    scaleX: 1,
    scaleY: 1,
    rotation: 0,
    tint: 16777215,
    alpha: 1
};
let l5e = XO;
const z3 = {
    vertex: {
        attributeName: "aVertex",
        format: "float32x2",
        code: `
            const texture = p.texture;
            const sx = p.scaleX;
            const sy = p.scaleY;
            const ax = p.anchorX;
            const ay = p.anchorY;
            const trim = texture.trim;
            const orig = texture.orig;

            if (trim)
            {
                w1 = trim.x - (ax * orig.width);
                w0 = w1 + trim.width;

                h1 = trim.y - (ay * orig.height);
                h0 = h1 + trim.height;
            }
            else
            {
                w1 = -ax * (orig.width);
                w0 = w1 + orig.width;

                h1 = -ay * (orig.height);
                h0 = h1 + orig.height;
            }

            f32v[offset] = w1 * sx;
            f32v[offset + 1] = h1 * sy;

            f32v[offset + stride] = w0 * sx;
            f32v[offset + stride + 1] = h1 * sy;

            f32v[offset + (stride * 2)] = w0 * sx;
            f32v[offset + (stride * 2) + 1] = h0 * sy;

            f32v[offset + (stride * 3)] = w1 * sx;
            f32v[offset + (stride * 3) + 1] = h0 * sy;
        `,
        dynamic: !1
    },
    position: {
        attributeName: "aPosition",
        format: "float32x2",
        code: `
            var x = p.x;
            var y = p.y;

            f32v[offset] = x;
            f32v[offset + 1] = y;

            f32v[offset + stride] = x;
            f32v[offset + stride + 1] = y;

            f32v[offset + (stride * 2)] = x;
            f32v[offset + (stride * 2) + 1] = y;

            f32v[offset + (stride * 3)] = x;
            f32v[offset + (stride * 3) + 1] = y;
        `,
        dynamic: !0
    },
    rotation: {
        attributeName: "aRotation",
        format: "float32",
        code: `
            var rotation = p.rotation;

            f32v[offset] = rotation;
            f32v[offset + stride] = rotation;
            f32v[offset + (stride * 2)] = rotation;
            f32v[offset + (stride * 3)] = rotation;
        `,
        dynamic: !1
    },
    uvs: {
        attributeName: "aUV",
        format: "float32x2",
        code: `
            var uvs = p.texture.uvs;

            f32v[offset] = uvs.x0;
            f32v[offset + 1] = uvs.y0;

            f32v[offset + stride] = uvs.x1;
            f32v[offset + stride + 1] = uvs.y1;

            f32v[offset + (stride * 2)] = uvs.x2;
            f32v[offset + (stride * 2) + 1] = uvs.y2;

            f32v[offset + (stride * 3)] = uvs.x3;
            f32v[offset + (stride * 3) + 1] = uvs.y3;
        `,
        dynamic: !1
    },
    color: {
        attributeName: "aColor",
        format: "unorm8x4",
        code: `
            const c = p.color;

            u32v[offset] = c;
            u32v[offset + stride] = c;
            u32v[offset + (stride * 2)] = c;
            u32v[offset + (stride * 3)] = c;
        `,
        dynamic: !1
    }
}
  , ihe = new jr(0,0,0,0)
  , KO = class CE extends ad {
    constructor(e={}) {
        e = {
            ...CE.defaultOptions,
            ...e,
            dynamicProperties: {
                ...CE.defaultOptions.dynamicProperties,
                ...e == null ? void 0 : e.dynamicProperties
            }
        };
        const {dynamicProperties: r, shader: n, roundPixels: i, texture: o, particles: s, ...a} = e;
        super({
            label: "ParticleContainer",
            ...a
        }),
        this.renderPipeId = "particle",
        this.batched = !1,
        this._childrenDirty = !1,
        this.texture = o || null,
        this.shader = n,
        this._properties = {};
        for (const l in z3) {
            const c = z3[l]
              , u = r[l];
            this._properties[l] = {
                ...c,
                dynamic: u
            }
        }
        this.allowChildren = !0,
        this.roundPixels = i ?? !1,
        this.particleChildren = s ?? []
    }
    addParticle(...e) {
        for (let r = 0; r < e.length; r++)
            this.particleChildren.push(e[r]);
        return this.onViewUpdate(),
        e[0]
    }
    removeParticle(...e) {
        let r = !1;
        for (let n = 0; n < e.length; n++) {
            const i = this.particleChildren.indexOf(e[n]);
            i > -1 && (this.particleChildren.splice(i, 1),
            r = !0)
        }
        return r && this.onViewUpdate(),
        e[0]
    }
    update() {
        this._childrenDirty = !0
    }
    onViewUpdate() {
        this._childrenDirty = !0,
        super.onViewUpdate()
    }
    get bounds() {
        return ihe
    }
    updateBounds() {}
    destroy(e=!1) {
        var n, i;
        if (super.destroy(e),
        typeof e == "boolean" ? e : e == null ? void 0 : e.texture) {
            const o = typeof e == "boolean" ? e : e == null ? void 0 : e.textureSource
              , s = this.texture ?? ((n = this.particleChildren[0]) == null ? void 0 : n.texture);
            s && s.destroy(o)
        }
        this.texture = null,
        (i = this.shader) == null || i.destroy()
    }
    removeParticles(e, r) {
        e ?? (e = 0),
        r ?? (r = this.particleChildren.length);
        const n = this.particleChildren.splice(e, r - e);
        return this.onViewUpdate(),
        n
    }
    removeParticleAt(e) {
        const r = this.particleChildren.splice(e, 1);
        return this.onViewUpdate(),
        r[0]
    }
    addParticleAt(e, r) {
        return this.particleChildren.splice(r, 0, e),
        this.onViewUpdate(),
        e
    }
    addChild(...e) {
        throw new Error("ParticleContainer.addChild() is not available. Please use ParticleContainer.addParticle()")
    }
    removeChild(...e) {
        throw new Error("ParticleContainer.removeChild() is not available. Please use ParticleContainer.removeParticle()")
    }
    removeChildren(e, r) {
        throw new Error("ParticleContainer.removeChildren() is not available. Please use ParticleContainer.removeParticles()")
    }
    removeChildAt(e) {
        throw new Error("ParticleContainer.removeChildAt() is not available. Please use ParticleContainer.removeParticleAt()")
    }
    getChildAt(e) {
        throw new Error("ParticleContainer.getChildAt() is not available. Please use ParticleContainer.getParticleAt()")
    }
    setChildIndex(e, r) {
        throw new Error("ParticleContainer.setChildIndex() is not available. Please use ParticleContainer.setParticleIndex()")
    }
    getChildIndex(e) {
        throw new Error("ParticleContainer.getChildIndex() is not available. Please use ParticleContainer.getParticleIndex()")
    }
    addChildAt(e, r) {
        throw new Error("ParticleContainer.addChildAt() is not available. Please use ParticleContainer.addParticleAt()")
    }
    swapChildren(e, r) {
        throw new Error("ParticleContainer.swapChildren() is not available. Please use ParticleContainer.swapParticles()")
    }
    reparentChild(...e) {
        throw new Error("ParticleContainer.reparentChild() is not available with the particle container")
    }
    reparentChildAt(e, r) {
        throw new Error("ParticleContainer.reparentChildAt() is not available with the particle container")
    }
}
;
KO.defaultOptions = {
    dynamicProperties: {
        vertex: !1,
        position: !0,
        rotation: !1,
        uvs: !1,
        color: !1
    },
    roundPixels: !1
};
let c5e = KO;
const qO = class ZO extends Kde {
    constructor(e={}) {
        e = {
            ...ZO.defaultOptions,
            ...e
        },
        super({
            width: e.width,
            height: e.height,
            verticesX: 4,
            verticesY: 4
        }),
        this.update(e)
    }
    update(e) {
        var r, n;
        this.width = e.width ?? this.width,
        this.height = e.height ?? this.height,
        this._originalWidth = e.originalWidth ?? this._originalWidth,
        this._originalHeight = e.originalHeight ?? this._originalHeight,
        this._leftWidth = e.leftWidth ?? this._leftWidth,
        this._rightWidth = e.rightWidth ?? this._rightWidth,
        this._topHeight = e.topHeight ?? this._topHeight,
        this._bottomHeight = e.bottomHeight ?? this._bottomHeight,
        this._anchorX = (r = e.anchor) == null ? void 0 : r.x,
        this._anchorY = (n = e.anchor) == null ? void 0 : n.y,
        this.updateUvs(),
        this.updatePositions()
    }
    updatePositions() {
        const e = this.positions
          , {width: r, height: n, _leftWidth: i, _rightWidth: o, _topHeight: s, _bottomHeight: a, _anchorX: l, _anchorY: c} = this
          , u = i + o
          , f = r > u ? 1 : r / u
          , d = s + a
          , h = n > d ? 1 : n / d
          , x = Math.min(f, h)
          , y = l * r
          , m = c * n;
        e[0] = e[8] = e[16] = e[24] = -y,
        e[2] = e[10] = e[18] = e[26] = i * x - y,
        e[4] = e[12] = e[20] = e[28] = r - o * x - y,
        e[6] = e[14] = e[22] = e[30] = r - y,
        e[1] = e[3] = e[5] = e[7] = -m,
        e[9] = e[11] = e[13] = e[15] = s * x - m,
        e[17] = e[19] = e[21] = e[23] = n - a * x - m,
        e[25] = e[27] = e[29] = e[31] = n - m,
        this.getBuffer("aPosition").update()
    }
    updateUvs() {
        const e = this.uvs;
        e[0] = e[8] = e[16] = e[24] = 0,
        e[1] = e[3] = e[5] = e[7] = 0,
        e[6] = e[14] = e[22] = e[30] = 1,
        e[25] = e[27] = e[29] = e[31] = 1;
        const r = 1 / this._originalWidth
          , n = 1 / this._originalHeight;
        e[2] = e[10] = e[18] = e[26] = r * this._leftWidth,
        e[9] = e[11] = e[13] = e[15] = n * this._topHeight,
        e[4] = e[12] = e[20] = e[28] = 1 - r * this._rightWidth,
        e[17] = e[19] = e[21] = e[23] = 1 - n * this._bottomHeight,
        this.getBuffer("aUV").update()
    }
}
;
qO.defaultOptions = {
    width: 100,
    height: 100,
    leftWidth: 10,
    topHeight: 10,
    rightWidth: 10,
    bottomHeight: 10,
    originalWidth: 100,
    originalHeight: 100
};
let ohe = qO;
class she extends Kb {
    constructor() {
        super(),
        this.geometry = new ohe
    }
    destroy() {
        this.geometry.destroy()
    }
}
class JO {
    constructor(e) {
        this._renderer = e
    }
    addRenderable(e, r) {
        const n = this._getGpuSprite(e);
        e.didViewUpdate && this._updateBatchableSprite(e, n),
        this._renderer.renderPipes.batch.addToBatch(n, r)
    }
    updateRenderable(e) {
        const r = this._getGpuSprite(e);
        e.didViewUpdate && this._updateBatchableSprite(e, r),
        r._batcher.updateElement(r)
    }
    validateRenderable(e) {
        const r = this._getGpuSprite(e);
        return !r._batcher.checkAndUpdateTexture(r, e._texture)
    }
    _updateBatchableSprite(e, r) {
        r.geometry.update(e),
        r.setTexture(e._texture)
    }
    _getGpuSprite(e) {
        return e._gpuData[this._renderer.uid] || this._initGPUSprite(e)
    }
    _initGPUSprite(e) {
        const r = e._gpuData[this._renderer.uid] = new she
          , n = r;
        return n.renderable = e,
        n.transform = e.groupTransform,
        n.texture = e._texture,
        n.roundPixels = this._renderer._roundPixels | e._roundPixels,
        e.didViewUpdate || this._updateBatchableSprite(e, n),
        r
    }
    destroy() {
        this._renderer = null
    }
}
JO.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "nineSliceSprite"
};
const ahe = {
    name: "tiling-bit",
    vertex: {
        header: `
            struct TilingUniforms {
                uMapCoord:mat3x3<f32>,
                uClampFrame:vec4<f32>,
                uClampOffset:vec2<f32>,
                uTextureTransform:mat3x3<f32>,
                uSizeAnchor:vec4<f32>
            };

            @group(2) @binding(0) var<uniform> tilingUniforms: TilingUniforms;
            @group(2) @binding(1) var uTexture: texture_2d<f32>;
            @group(2) @binding(2) var uSampler: sampler;
        `,
        main: `
            uv = (tilingUniforms.uTextureTransform * vec3(uv, 1.0)).xy;

            position = (position - tilingUniforms.uSizeAnchor.zw) * tilingUniforms.uSizeAnchor.xy;
        `
    },
    fragment: {
        header: `
            struct TilingUniforms {
                uMapCoord:mat3x3<f32>,
                uClampFrame:vec4<f32>,
                uClampOffset:vec2<f32>,
                uTextureTransform:mat3x3<f32>,
                uSizeAnchor:vec4<f32>
            };

            @group(2) @binding(0) var<uniform> tilingUniforms: TilingUniforms;
            @group(2) @binding(1) var uTexture: texture_2d<f32>;
            @group(2) @binding(2) var uSampler: sampler;
        `,
        main: `

            var coord = vUV + ceil(tilingUniforms.uClampOffset - vUV);
            coord = (tilingUniforms.uMapCoord * vec3(coord, 1.0)).xy;
            var unclamped = coord;
            coord = clamp(coord, tilingUniforms.uClampFrame.xy, tilingUniforms.uClampFrame.zw);

            var bias = 0.;

            if(unclamped.x == coord.x && unclamped.y == coord.y)
            {
                bias = -32.;
            }

            outColor = textureSampleBias(uTexture, uSampler, coord, bias);
        `
    }
}
  , lhe = {
    name: "tiling-bit",
    vertex: {
        header: `
            uniform mat3 uTextureTransform;
            uniform vec4 uSizeAnchor;

        `,
        main: `
            uv = (uTextureTransform * vec3(aUV, 1.0)).xy;

            position = (position - uSizeAnchor.zw) * uSizeAnchor.xy;
        `
    },
    fragment: {
        header: `
            uniform sampler2D uTexture;
            uniform mat3 uMapCoord;
            uniform vec4 uClampFrame;
            uniform vec2 uClampOffset;
        `,
        main: `

        vec2 coord = vUV + ceil(uClampOffset - vUV);
        coord = (uMapCoord * vec3(coord, 1.0)).xy;
        vec2 unclamped = coord;
        coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);

        outColor = texture(uTexture, coord, unclamped == coord ? 0.0 : -32.0);// lod-bias very negative to force lod 0

        `
    }
};
let dm, hm;
class che extends _i {
    constructor() {
        dm ?? (dm = ud({
            name: "tiling-sprite-shader",
            bits: [Y0, ahe, dd]
        })),
        hm ?? (hm = fd({
            name: "tiling-sprite-shader",
            bits: [Nb, lhe, hd]
        }));
        const e = new vn({
            uMapCoord: {
                value: new Pe,
                type: "mat3x3<f32>"
            },
            uClampFrame: {
                value: new Float32Array([0, 0, 1, 1]),
                type: "vec4<f32>"
            },
            uClampOffset: {
                value: new Float32Array([0, 0]),
                type: "vec2<f32>"
            },
            uTextureTransform: {
                value: new Pe,
                type: "mat3x3<f32>"
            },
            uSizeAnchor: {
                value: new Float32Array([100, 100, .5, .5]),
                type: "vec4<f32>"
            }
        });
        super({
            glProgram: hm,
            gpuProgram: dm,
            resources: {
                localUniforms: new vn({
                    uTransformMatrix: {
                        value: new Pe,
                        type: "mat3x3<f32>"
                    },
                    uColor: {
                        value: new Float32Array([1, 1, 1, 1]),
                        type: "vec4<f32>"
                    },
                    uRound: {
                        value: 0,
                        type: "f32"
                    }
                }),
                tilingUniforms: e,
                uTexture: Be.EMPTY.source,
                uSampler: Be.EMPTY.source.style
            }
        })
    }
    updateUniforms(e, r, n, i, o, s) {
        const a = this.resources.tilingUniforms
          , l = s.width
          , c = s.height
          , u = s.textureMatrix
          , f = a.uniforms.uTextureTransform;
        f.set(n.a * l / e, n.b * l / r, n.c * c / e, n.d * c / r, n.tx / e, n.ty / r),
        f.invert(),
        a.uniforms.uMapCoord = u.mapCoord,
        a.uniforms.uClampFrame = u.uClampFrame,
        a.uniforms.uClampOffset = u.uClampOffset,
        a.uniforms.uTextureTransform = f,
        a.uniforms.uSizeAnchor[0] = e,
        a.uniforms.uSizeAnchor[1] = r,
        a.uniforms.uSizeAnchor[2] = i,
        a.uniforms.uSizeAnchor[3] = o,
        s && (this.resources.uTexture = s.source,
        this.resources.uSampler = s.source.style)
    }
}
class uhe extends Rb {
    constructor() {
        super({
            positions: new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]),
            uvs: new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]),
            indices: new Uint32Array([0, 1, 2, 0, 2, 3])
        })
    }
}
function fhe(t, e) {
    const r = t.anchor.x
      , n = t.anchor.y;
    e[0] = -r * t.width,
    e[1] = -n * t.height,
    e[2] = (1 - r) * t.width,
    e[3] = -n * t.height,
    e[4] = (1 - r) * t.width,
    e[5] = (1 - n) * t.height,
    e[6] = -r * t.width,
    e[7] = (1 - n) * t.height
}
function dhe(t, e, r, n) {
    let i = 0;
    const o = t.length / (e || 2)
      , s = n.a
      , a = n.b
      , l = n.c
      , c = n.d
      , u = n.tx
      , f = n.ty;
    for (r *= e; i < o; ) {
        const d = t[r]
          , h = t[r + 1];
        t[r] = s * d + l * h + u,
        t[r + 1] = a * d + c * h + f,
        r += e,
        i++
    }
}
function hhe(t, e) {
    const r = t.texture
      , n = r.frame.width
      , i = r.frame.height;
    let o = 0
      , s = 0;
    t.applyAnchorToTexture && (o = t.anchor.x,
    s = t.anchor.y),
    e[0] = e[6] = -o,
    e[2] = e[4] = 1 - o,
    e[1] = e[3] = -s,
    e[5] = e[7] = 1 - s;
    const a = Pe.shared;
    a.copyFrom(t._tileTransform.matrix),
    a.tx /= t.width,
    a.ty /= t.height,
    a.invert(),
    a.scale(t.width / n, t.height / i),
    dhe(e, 2, 0, a)
}
const ex = new uhe;
class xhe {
    constructor() {
        this.canBatch = !0,
        this.geometry = new Rb({
            indices: ex.indices.slice(),
            positions: ex.positions.slice(),
            uvs: ex.uvs.slice()
        })
    }
    destroy() {
        var e;
        this.geometry.destroy(),
        (e = this.shader) == null || e.destroy()
    }
}
class QO {
    constructor(e) {
        this._state = Hi.default2d,
        this._renderer = e
    }
    validateRenderable(e) {
        const r = this._getTilingSpriteData(e)
          , n = r.canBatch;
        this._updateCanBatch(e);
        const i = r.canBatch;
        if (i && i === n) {
            const {batchableMesh: o} = r;
            return !o._batcher.checkAndUpdateTexture(o, e.texture)
        }
        return n !== i
    }
    addRenderable(e, r) {
        const n = this._renderer.renderPipes.batch;
        this._updateCanBatch(e);
        const i = this._getTilingSpriteData(e)
          , {geometry: o, canBatch: s} = i;
        if (s) {
            i.batchableMesh || (i.batchableMesh = new Kb);
            const a = i.batchableMesh;
            e.didViewUpdate && (this._updateBatchableMesh(e),
            a.geometry = o,
            a.renderable = e,
            a.transform = e.groupTransform,
            a.setTexture(e._texture)),
            a.roundPixels = this._renderer._roundPixels | e._roundPixels,
            n.addToBatch(a, r)
        } else
            n.break(r),
            i.shader || (i.shader = new che),
            this.updateRenderable(e),
            r.add(e)
    }
    execute(e) {
        const {shader: r} = this._getTilingSpriteData(e);
        r.groups[0] = this._renderer.globalUniforms.bindGroup;
        const n = r.resources.localUniforms.uniforms;
        n.uTransformMatrix = e.groupTransform,
        n.uRound = this._renderer._roundPixels | e._roundPixels,
        xd(e.groupColorAlpha, n.uColor, 0),
        this._state.blendMode = Df(e.groupBlendMode, e.texture._source),
        this._renderer.encoder.draw({
            geometry: ex,
            shader: r,
            state: this._state
        })
    }
    updateRenderable(e) {
        const r = this._getTilingSpriteData(e)
          , {canBatch: n} = r;
        if (n) {
            const {batchableMesh: i} = r;
            e.didViewUpdate && this._updateBatchableMesh(e),
            i._batcher.updateElement(i)
        } else if (e.didViewUpdate) {
            const {shader: i} = r;
            i.updateUniforms(e.width, e.height, e._tileTransform.matrix, e.anchor.x, e.anchor.y, e.texture)
        }
    }
    _getTilingSpriteData(e) {
        return e._gpuData[this._renderer.uid] || this._initTilingSpriteData(e)
    }
    _initTilingSpriteData(e) {
        const r = new xhe;
        return r.renderable = e,
        e._gpuData[this._renderer.uid] = r,
        r
    }
    _updateBatchableMesh(e) {
        const r = this._getTilingSpriteData(e)
          , {geometry: n} = r
          , i = e.texture.source.style;
        i.addressMode !== "repeat" && (i.addressMode = "repeat",
        i.update()),
        hhe(e, n.uvs),
        fhe(e, n.positions)
    }
    destroy() {
        this._renderer = null
    }
    _updateCanBatch(e) {
        const r = this._getTilingSpriteData(e)
          , n = e.texture;
        let i = !0;
        return this._renderer.type === qn.WEBGL && (i = this._renderer.context.supports.nonPowOf2wrapping),
        r.canBatch = n.textureMatrix.isSimple && (i || n.source.isPowerOfTwo),
        r.canBatch
    }
}
QO.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "tilingSprite"
};
const phe = {
    name: "local-uniform-msdf-bit",
    vertex: {
        header: `
            struct LocalUniforms {
                uColor:vec4<f32>,
                uTransformMatrix:mat3x3<f32>,
                uDistance: f32,
                uRound:f32,
            }

            @group(2) @binding(0) var<uniform> localUniforms : LocalUniforms;
        `,
        main: `
            vColor *= localUniforms.uColor;
            modelMatrix *= localUniforms.uTransformMatrix;
        `,
        end: `
            if(localUniforms.uRound == 1)
            {
                vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
            }
        `
    },
    fragment: {
        header: `
            struct LocalUniforms {
                uColor:vec4<f32>,
                uTransformMatrix:mat3x3<f32>,
                uDistance: f32
            }

            @group(2) @binding(0) var<uniform> localUniforms : LocalUniforms;
         `,
        main: `
            outColor = vec4<f32>(calculateMSDFAlpha(outColor, localUniforms.uColor, localUniforms.uDistance));
        `
    }
}
  , ghe = {
    name: "local-uniform-msdf-bit",
    vertex: {
        header: `
            uniform mat3 uTransformMatrix;
            uniform vec4 uColor;
            uniform float uRound;
        `,
        main: `
            vColor *= uColor;
            modelMatrix *= uTransformMatrix;
        `,
        end: `
            if(uRound == 1.)
            {
                gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
            }
        `
    },
    fragment: {
        header: `
            uniform float uDistance;
         `,
        main: `
            outColor = vec4(calculateMSDFAlpha(outColor, vColor, uDistance));
        `
    }
}
  , mhe = {
    name: "msdf-bit",
    fragment: {
        header: `
            fn calculateMSDFAlpha(msdfColor:vec4<f32>, shapeColor:vec4<f32>, distance:f32) -> f32 {

                // MSDF
                var median = msdfColor.r + msdfColor.g + msdfColor.b -
                    min(msdfColor.r, min(msdfColor.g, msdfColor.b)) -
                    max(msdfColor.r, max(msdfColor.g, msdfColor.b));

                // SDF
                median = min(median, msdfColor.a);

                var screenPxDistance = distance * (median - 0.5);
                var alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);
                if (median < 0.01) {
                    alpha = 0.0;
                } else if (median > 0.99) {
                    alpha = 1.0;
                }

                // Gamma correction for coverage-like alpha
                var luma: f32 = dot(shapeColor.rgb, vec3<f32>(0.299, 0.587, 0.114));
                var gamma: f32 = mix(1.0, 1.0 / 2.2, luma);
                var coverage: f32 = pow(shapeColor.a * alpha, gamma);

                return coverage;

            }
        `
    }
}
  , vhe = {
    name: "msdf-bit",
    fragment: {
        header: `
            float calculateMSDFAlpha(vec4 msdfColor, vec4 shapeColor, float distance) {

                // MSDF
                float median = msdfColor.r + msdfColor.g + msdfColor.b -
                                min(msdfColor.r, min(msdfColor.g, msdfColor.b)) -
                                max(msdfColor.r, max(msdfColor.g, msdfColor.b));

                // SDF
                median = min(median, msdfColor.a);

                float screenPxDistance = distance * (median - 0.5);
                float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);

                if (median < 0.01) {
                    alpha = 0.0;
                } else if (median > 0.99) {
                    alpha = 1.0;
                }

                // Gamma correction for coverage-like alpha
                float luma = dot(shapeColor.rgb, vec3(0.299, 0.587, 0.114));
                float gamma = mix(1.0, 1.0 / 2.2, luma);
                float coverage = pow(shapeColor.a * alpha, gamma);

                return coverage;
            }
        `
    }
};
let xm, pm;
class yhe extends _i {
    constructor(e) {
        const r = new vn({
            uColor: {
                value: new Float32Array([1, 1, 1, 1]),
                type: "vec4<f32>"
            },
            uTransformMatrix: {
                value: new Pe,
                type: "mat3x3<f32>"
            },
            uDistance: {
                value: 4,
                type: "f32"
            },
            uRound: {
                value: 0,
                type: "f32"
            }
        });
        xm ?? (xm = ud({
            name: "sdf-shader",
            bits: [_b, Cb(e), phe, mhe, dd]
        })),
        pm ?? (pm = fd({
            name: "sdf-shader",
            bits: [bb, Ab(e), ghe, vhe, hd]
        })),
        super({
            glProgram: pm,
            gpuProgram: xm,
            resources: {
                localUniforms: r,
                batchSamplers: wb(e)
            }
        })
    }
}
class Ehe extends jx {
    destroy() {
        this.context.customShader && this.context.customShader.destroy(),
        super.destroy()
    }
}
class ek {
    constructor(e) {
        this._renderer = e
    }
    validateRenderable(e) {
        const r = this._getGpuBitmapText(e);
        return this._renderer.renderPipes.graphics.validateRenderable(r)
    }
    addRenderable(e, r) {
        const n = this._getGpuBitmapText(e);
        j3(e, n),
        e._didTextUpdate && (e._didTextUpdate = !1,
        this._updateContext(e, n)),
        this._renderer.renderPipes.graphics.addRenderable(n, r),
        n.context.customShader && this._updateDistanceField(e)
    }
    updateRenderable(e) {
        const r = this._getGpuBitmapText(e);
        j3(e, r),
        this._renderer.renderPipes.graphics.updateRenderable(r),
        r.context.customShader && this._updateDistanceField(e)
    }
    _updateContext(e, r) {
        const {context: n} = r
          , i = xE.getFont(e.text, e._style);
        n.clear(),
        i.distanceField.type !== "none" && (n.customShader || (n.customShader = new yhe(this._renderer.limits.maxBatchableTextures)));
        const o = Ii.graphemeSegmenter(e.text)
          , s = e._style;
        let a = i.baseLineOffset;
        const l = tI(o, s, i, !0)
          , c = s.padding
          , u = l.scale;
        let f = l.width
          , d = l.height + l.offsetY;
        s._stroke && (f += s._stroke.width / u,
        d += s._stroke.width / u),
        n.translate(-e._anchor._x * f - c, -e._anchor._y * d - c).scale(u, u);
        const h = i.applyFillAsTint ? s._fill.color : 16777215;
        let x = i.fontMetrics.fontSize
          , y = i.lineHeight;
        s.lineHeight && (x = s.fontSize / u,
        y = s.lineHeight / u);
        let m = (y - x) / 2;
        m - i.baseLineOffset < 0 && (m = 0);
        for (let E = 0; E < l.lines.length; E++) {
            const g = l.lines[E];
            for (let p = 0; p < g.charPositions.length; p++) {
                const v = g.chars[p]
                  , _ = i.chars[v];
                if (_ != null && _.texture) {
                    const b = _.texture;
                    n.texture(b, h || "black", Math.round(g.charPositions[p] + _.xOffset), Math.round(a + _.yOffset + m), b.orig.width, b.orig.height)
                }
            }
            a += y
        }
    }
    _getGpuBitmapText(e) {
        return e._gpuData[this._renderer.uid] || this.initGpuText(e)
    }
    initGpuText(e) {
        const r = new Ehe;
        return e._gpuData[this._renderer.uid] = r,
        this._updateContext(e, r),
        r
    }
    _updateDistanceField(e) {
        const r = this._getGpuBitmapText(e).context
          , n = e._style.fontFamily
          , i = Et.get(`${n}-bitmap`)
          , {a: o, b: s, c: a, d: l} = e.groupTransform
          , c = Math.sqrt(o * o + s * s)
          , u = Math.sqrt(a * a + l * l)
          , f = (Math.abs(c) + Math.abs(u)) / 2
          , d = i.baseRenderedFontSize / e._style.fontSize
          , h = f * i.distanceField.range * (1 / d);
        r.customShader.resources.localUniforms.uniforms.uDistance = h
    }
    destroy() {
        this._renderer = null
    }
}
ek.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "bitmapText"
};
function j3(t, e) {
    e.groupTransform = t.groupTransform,
    e.groupColorAlpha = t.groupColorAlpha,
    e.groupColor = t.groupColor,
    e.groupBlendMode = t.groupBlendMode,
    e.globalDisplayStatus = t.globalDisplayStatus,
    e.groupTransform = t.groupTransform,
    e.localDisplayStatus = t.localDisplayStatus,
    e.groupAlpha = t.groupAlpha,
    e._roundPixels = t._roundPixels
}
class _he extends v1 {
    constructor(e) {
        super(),
        this.generatingTexture = !1,
        this.currentKey = "--",
        this._renderer = e,
        e.runners.resolutionChange.add(this)
    }
    resolutionChange() {
        const e = this.renderable;
        e._autoResolution && e.onViewUpdate()
    }
    destroy() {
        const {htmlText: e} = this._renderer;
        e.getReferenceCount(this.currentKey) === null ? e.returnTexturePromise(this.texturePromise) : e.decreaseReferenceCount(this.currentKey),
        this._renderer.runners.resolutionChange.remove(this),
        this.texturePromise = null,
        this._renderer = null
    }
}
function AE(t, e) {
    const {texture: r, bounds: n} = t
      , i = e._style._getFinalPadding();
    zF(n, e._anchor, r);
    const o = e._anchor._x * i * 2
      , s = e._anchor._y * i * 2;
    n.minX -= i - o,
    n.minY -= i - s,
    n.maxX -= i - o,
    n.maxY -= i - s
}
class tk {
    constructor(e) {
        this._renderer = e
    }
    validateRenderable(e) {
        const r = this._getGpuText(e)
          , n = e.styleKey;
        return r.currentKey !== n
    }
    addRenderable(e, r) {
        const n = this._getGpuText(e);
        if (e._didTextUpdate) {
            const i = e._autoResolution ? this._renderer.resolution : e.resolution;
            (n.currentKey !== e.styleKey || e.resolution !== i) && this._updateGpuText(e).catch(o => {
                console.error(o)
            }
            ),
            e._didTextUpdate = !1,
            AE(n, e)
        }
        this._renderer.renderPipes.batch.addToBatch(n, r)
    }
    updateRenderable(e) {
        const r = this._getGpuText(e);
        r._batcher.updateElement(r)
    }
    async _updateGpuText(e) {
        e._didTextUpdate = !1;
        const r = this._getGpuText(e);
        if (r.generatingTexture)
            return;
        const n = r.texturePromise;
        r.texturePromise = null,
        r.generatingTexture = !0,
        e._resolution = e._autoResolution ? this._renderer.resolution : e.resolution;
        let i = this._renderer.htmlText.getTexturePromise(e);
        n && (i = i.finally( () => {
            this._renderer.htmlText.decreaseReferenceCount(r.currentKey),
            this._renderer.htmlText.returnTexturePromise(n)
        }
        )),
        r.texturePromise = i,
        r.currentKey = e.styleKey,
        r.texture = await i;
        const o = e.renderGroup || e.parentRenderGroup;
        o && (o.structureDidChange = !0),
        r.generatingTexture = !1,
        AE(r, e)
    }
    _getGpuText(e) {
        return e._gpuData[this._renderer.uid] || this.initGpuText(e)
    }
    initGpuText(e) {
        const r = new _he(this._renderer);
        return r.renderable = e,
        r.transform = e.groupTransform,
        r.texture = Be.EMPTY,
        r.bounds = {
            minX: 0,
            maxX: 1,
            minY: 0,
            maxY: 0
        },
        r.roundPixels = this._renderer._roundPixels | e._roundPixels,
        e._resolution = e._autoResolution ? this._renderer.resolution : e.resolution,
        e._gpuData[this._renderer.uid] = r,
        r
    }
    destroy() {
        this._renderer = null
    }
}
tk.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "htmlText"
};
function bhe() {
    const {userAgent: t} = je.get().getNavigator();
    return /^((?!chrome|android).)*safari/i.test(t)
}
const Che = new jr;
function rk(t, e, r, n) {
    const i = Che;
    i.minX = 0,
    i.minY = 0,
    i.maxX = t.width / n | 0,
    i.maxY = t.height / n | 0;
    const o = sr.getOptimalTexture(i.width, i.height, n, !1);
    return o.source.uploadMethodId = "image",
    o.source.resource = t,
    o.source.alphaMode = "premultiply-alpha-on-upload",
    o.frame.width = e / n,
    o.frame.height = r / n,
    o.source.emit("update", o.source),
    o.updateUvs(),
    o
}
function Ahe(t, e) {
    const r = e.fontFamily
      , n = []
      , i = {}
      , o = /font-family:([^;"\s]+)/g
      , s = t.match(o);
    function a(l) {
        i[l] || (n.push(l),
        i[l] = !0)
    }
    if (Array.isArray(r))
        for (let l = 0; l < r.length; l++)
            a(r[l]);
    else
        a(r);
    s && s.forEach(l => {
        const c = l.split(":")[1].trim();
        a(c)
    }
    );
    for (const l in e.tagStyles) {
        const c = e.tagStyles[l].fontFamily;
        a(c)
    }
    return n
}
async function whe(t) {
    const r = await (await je.get().fetch(t)).blob()
      , n = new FileReader;
    return await new Promise( (o, s) => {
        n.onloadend = () => o(n.result),
        n.onerror = s,
        n.readAsDataURL(r)
    }
    )
}
async function Bhe(t, e) {
    const r = await whe(e);
    return `@font-face {
        font-family: "${t.fontFamily}";
        font-weight: ${t.fontWeight};
        font-style: ${t.fontStyle};
        src: url('${r}');
    }`
}
const gm = new Map;
async function She(t) {
    const e = t.filter(r => Et.has(`${r}-and-url`)).map(r => {
        if (!gm.has(r)) {
            const {entries: n} = Et.get(`${r}-and-url`)
              , i = [];
            n.forEach(o => {
                const s = o.url
                  , l = o.faces.map(c => ({
                    weight: c.weight,
                    style: c.style
                }));
                i.push(...l.map(c => Bhe({
                    fontWeight: c.weight,
                    fontStyle: c.style,
                    fontFamily: r
                }, s)))
            }
            ),
            gm.set(r, Promise.all(i).then(o => o.join(`
`)))
        }
        return gm.get(r)
    }
    );
    return (await Promise.all(e)).join(`
`)
}
function The(t, e, r, n, i) {
    const {domElement: o, styleElement: s, svgRoot: a} = i;
    o.innerHTML = `<style>${e.cssStyle}</style><div style='padding:0;'>${t}</div>`,
    o.setAttribute("style", `transform: scale(${r});transform-origin: top left; display: inline-block`),
    s.textContent = n;
    const {width: l, height: c} = i.image;
    return a.setAttribute("width", l.toString()),
    a.setAttribute("height", c.toString()),
    new XMLSerializer().serializeToString(a)
}
function Dhe(t, e) {
    const r = ms.getOptimalCanvasAndContext(t.width, t.height, e)
      , {context: n} = r;
    return n.clearRect(0, 0, t.width, t.height),
    n.drawImage(t, 0, 0),
    r
}
function Fhe(t, e, r) {
    return new Promise(async n => {
        r && await new Promise(i => setTimeout(i, 100)),
        t.onload = () => {
            n()
        }
        ,
        t.src = `data:image/svg+xml;charset=utf8,${encodeURIComponent(e)}`,
        t.crossOrigin = "anonymous"
    }
    )
}
class nk {
    constructor(e) {
        this._activeTextures = {},
        this._renderer = e,
        this._createCanvas = e.type === qn.WEBGPU
    }
    getTexture(e) {
        return this.getTexturePromise(e)
    }
    getManagedTexture(e) {
        const r = e.styleKey;
        if (this._activeTextures[r])
            return this._increaseReferenceCount(r),
            this._activeTextures[r].promise;
        const n = this._buildTexturePromise(e).then(i => (this._activeTextures[r].texture = i,
        i));
        return this._activeTextures[r] = {
            texture: null,
            promise: n,
            usageCount: 1
        },
        n
    }
    getReferenceCount(e) {
        var r;
        return ((r = this._activeTextures[e]) == null ? void 0 : r.usageCount) ?? null
    }
    _increaseReferenceCount(e) {
        this._activeTextures[e].usageCount++
    }
    decreaseReferenceCount(e) {
        const r = this._activeTextures[e];
        r && (r.usageCount--,
        r.usageCount === 0 && (r.texture ? this._cleanUp(r.texture) : r.promise.then(n => {
            r.texture = n,
            this._cleanUp(r.texture)
        }
        ).catch( () => {
            Ne("HTMLTextSystem: Failed to clean texture")
        }
        ),
        this._activeTextures[e] = null))
    }
    getTexturePromise(e) {
        return this._buildTexturePromise(e)
    }
    async _buildTexturePromise(e) {
        const {text: r, style: n, resolution: i, textureStyle: o} = e
          , s = xr.get(vI)
          , a = Ahe(r, n)
          , l = await She(a)
          , c = lfe(r, n, l, s)
          , u = Math.ceil(Math.ceil(Math.max(1, c.width) + n.padding * 2) * i)
          , f = Math.ceil(Math.ceil(Math.max(1, c.height) + n.padding * 2) * i)
          , d = s.image
          , h = 2;
        d.width = (u | 0) + h,
        d.height = (f | 0) + h;
        const x = The(r, n, i, l, s);
        await Fhe(d, x, bhe() && a.length > 0);
        const y = d;
        let m;
        this._createCanvas && (m = Dhe(d, i));
        const E = rk(m ? m.canvas : y, d.width - h, d.height - h, i);
        return o && (E.source.style = o),
        this._createCanvas && (this._renderer.texture.initSource(E.source),
        ms.returnCanvasAndContext(m)),
        xr.return(s),
        E
    }
    returnTexturePromise(e) {
        e.then(r => {
            this._cleanUp(r)
        }
        ).catch( () => {
            Ne("HTMLTextSystem: Failed to clean texture")
        }
        )
    }
    _cleanUp(e) {
        sr.returnTexture(e, !0),
        e.source.resource = null,
        e.source.uploadMethodId = "unknown"
    }
    destroy() {
        this._renderer = null;
        for (const e in this._activeTextures)
            this._activeTextures[e] && this.returnTexturePromise(this._activeTextures[e].promise);
        this._activeTextures = null
    }
}
nk.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem, X.CanvasSystem],
    name: "htmlText"
};
class Phe extends v1 {
    constructor(e) {
        super(),
        this._renderer = e,
        e.runners.resolutionChange.add(this)
    }
    resolutionChange() {
        const e = this.renderable;
        e._autoResolution && e.onViewUpdate()
    }
    destroy() {
        const {canvasText: e} = this._renderer;
        e.getReferenceCount(this.currentKey) > 0 ? e.decreaseReferenceCount(this.currentKey) : this.texture && e.returnTexture(this.texture),
        this._renderer.runners.resolutionChange.remove(this),
        this._renderer = null
    }
}
class ik {
    constructor(e) {
        this._renderer = e
    }
    validateRenderable(e) {
        const r = this._getGpuText(e)
          , n = e.styleKey;
        return r.currentKey !== n ? !0 : e._didTextUpdate
    }
    addRenderable(e, r) {
        const n = this._getGpuText(e);
        if (e._didTextUpdate) {
            const i = e._autoResolution ? this._renderer.resolution : e.resolution;
            (n.currentKey !== e.styleKey || e.resolution !== i) && this._updateGpuText(e),
            e._didTextUpdate = !1,
            AE(n, e)
        }
        this._renderer.renderPipes.batch.addToBatch(n, r)
    }
    updateRenderable(e) {
        const r = this._getGpuText(e);
        r._batcher.updateElement(r)
    }
    _updateGpuText(e) {
        const r = this._getGpuText(e);
        r.texture && this._renderer.canvasText.decreaseReferenceCount(r.currentKey),
        e._resolution = e._autoResolution ? this._renderer.resolution : e.resolution,
        r.texture = this._renderer.canvasText.getManagedTexture(e),
        r.currentKey = e.styleKey
    }
    _getGpuText(e) {
        return e._gpuData[this._renderer.uid] || this.initGpuText(e)
    }
    initGpuText(e) {
        const r = new Phe(this._renderer);
        return r.currentKey = "--",
        r.renderable = e,
        r.transform = e.groupTransform,
        r.bounds = {
            minX: 0,
            maxX: 1,
            minY: 0,
            maxY: 0
        },
        r.roundPixels = this._renderer._roundPixels | e._roundPixels,
        e._gpuData[this._renderer.uid] = r,
        r
    }
    destroy() {
        this._renderer = null
    }
}
ik.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "text"
};
class ok {
    constructor(e) {
        this._activeTextures = {},
        this._renderer = e
    }
    getTexture(e, r, n, i) {
        typeof e == "string" && (Re("8.0.0", "CanvasTextSystem.getTexture: Use object TextOptions instead of separate arguments"),
        e = {
            text: e,
            style: n,
            resolution: r
        }),
        e.style instanceof Tl || (e.style = new Tl(e.style)),
        e.textureStyle instanceof wo || (e.textureStyle = new wo(e.textureStyle)),
        typeof e.text != "string" && (e.text = e.text.toString());
        const {text: o, style: s, textureStyle: a} = e
          , l = e.resolution ?? this._renderer.resolution
          , {frame: c, canvasAndContext: u} = W0.getCanvasAndContext({
            text: o,
            style: s,
            resolution: l
        })
          , f = rk(u.canvas, c.width, c.height, l);
        if (a && (f.source.style = a),
        s.trim && (c.pad(s.padding),
        f.frame.copyFrom(c),
        f.frame.scale(1 / l),
        f.updateUvs()),
        s.filters) {
            const d = this._applyFilters(f, s.filters);
            return this.returnTexture(f),
            W0.returnCanvasAndContext(u),
            d
        }
        return this._renderer.texture.initSource(f._source),
        W0.returnCanvasAndContext(u),
        f
    }
    returnTexture(e) {
        const r = e.source;
        r.resource = null,
        r.uploadMethodId = "unknown",
        r.alphaMode = "no-premultiply-alpha",
        sr.returnTexture(e, !0)
    }
    renderTextToCanvas() {
        Re("8.10.0", "CanvasTextSystem.renderTextToCanvas: no longer supported, use CanvasTextSystem.getTexture instead")
    }
    getManagedTexture(e) {
        e._resolution = e._autoResolution ? this._renderer.resolution : e.resolution;
        const r = e.styleKey;
        if (this._activeTextures[r])
            return this._increaseReferenceCount(r),
            this._activeTextures[r].texture;
        const n = this.getTexture({
            text: e.text,
            style: e.style,
            resolution: e._resolution,
            textureStyle: e.textureStyle
        });
        return this._activeTextures[r] = {
            texture: n,
            usageCount: 1
        },
        n
    }
    decreaseReferenceCount(e) {
        const r = this._activeTextures[e];
        r.usageCount--,
        r.usageCount === 0 && (this.returnTexture(r.texture),
        this._activeTextures[e] = null)
    }
    getReferenceCount(e) {
        var r;
        return ((r = this._activeTextures[e]) == null ? void 0 : r.usageCount) ?? 0
    }
    _increaseReferenceCount(e) {
        this._activeTextures[e].usageCount++
    }
    _applyFilters(e, r) {
        const n = this._renderer.renderTarget.renderTarget
          , i = this._renderer.filter.generateFilteredTexture({
            texture: e,
            filters: r
        });
        return this._renderer.renderTarget.bind(n, !1),
        i
    }
    destroy() {
        this._renderer = null;
        for (const e in this._activeTextures)
            this._activeTextures[e] && this.returnTexture(this._activeTextures[e].texture);
        this._activeTextures = null
    }
}
ok.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem, X.CanvasSystem],
    name: "canvasText"
};
$e.add(Qse, eae);
var hl = {}
  , sk = {}
  , ss = {};
Object.defineProperty(ss, "__esModule", {
    value: !0
});
ss.loop = ss.conditional = ss.parse = void 0;
var Ihe = function t(e, r) {
    var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}
      , i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : n;
    if (Array.isArray(r))
        r.forEach(function(s) {
            return t(e, s, n, i)
        });
    else if (typeof r == "function")
        r(e, n, i, t);
    else {
        var o = Object.keys(r)[0];
        Array.isArray(r[o]) ? (i[o] = {},
        t(e, r[o], n, i[o])) : i[o] = r[o](e, n, i, t)
    }
    return n
};
ss.parse = Ihe;
var Ohe = function(e, r) {
    return function(n, i, o, s) {
        r(n, i, o) && s(n, e, i, o)
    }
};
ss.conditional = Ohe;
var khe = function(e, r) {
    return function(n, i, o, s) {
        for (var a = [], l = n.pos; r(n, i, o); ) {
            var c = {};
            if (s(n, e, i, c),
            n.pos === l)
                break;
            l = n.pos,
            a.push(c)
        }
        return a
    }
};
ss.loop = khe;
var or = {};
Object.defineProperty(or, "__esModule", {
    value: !0
});
or.readBits = or.readArray = or.readUnsigned = or.readString = or.peekBytes = or.readBytes = or.peekByte = or.readByte = or.buildStream = void 0;
var Rhe = function(e) {
    return {
        data: e,
        pos: 0
    }
};
or.buildStream = Rhe;
var ak = function() {
    return function(e) {
        return e.data[e.pos++]
    }
};
or.readByte = ak;
var Mhe = function() {
    var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
    return function(r) {
        return r.data[r.pos + e]
    }
};
or.peekByte = Mhe;
var y1 = function(e) {
    return function(r) {
        return r.data.subarray(r.pos, r.pos += e)
    }
};
or.readBytes = y1;
var Nhe = function(e) {
    return function(r) {
        return r.data.subarray(r.pos, r.pos + e)
    }
};
or.peekBytes = Nhe;
var Lhe = function(e) {
    return function(r) {
        return Array.from(y1(e)(r)).map(function(n) {
            return String.fromCharCode(n)
        }).join("")
    }
};
or.readString = Lhe;
var $he = function(e) {
    return function(r) {
        var n = y1(2)(r);
        return e ? (n[1] << 8) + n[0] : (n[0] << 8) + n[1]
    }
};
or.readUnsigned = $he;
var Uhe = function(e, r) {
    return function(n, i, o) {
        for (var s = typeof r == "function" ? r(n, i, o) : r, a = y1(e), l = new Array(s), c = 0; c < s; c++)
            l[c] = a(n);
        return l
    }
};
or.readArray = Uhe;
var Ghe = function(e, r, n) {
    for (var i = 0, o = 0; o < n; o++)
        i += e[r + o] && Math.pow(2, n - o - 1);
    return i
}
  , Hhe = function(e) {
    return function(r) {
        for (var n = ak()(r), i = new Array(8), o = 0; o < 8; o++)
            i[7 - o] = !!(n & 1 << o);
        return Object.keys(e).reduce(function(s, a) {
            var l = e[a];
            return l.length ? s[a] = Ghe(i, l.index, l.length) : s[a] = i[l.index],
            s
        }, {})
    }
};
or.readBits = Hhe;
(function(t) {
    Object.defineProperty(t, "__esModule", {
        value: !0
    }),
    t.default = void 0;
    var e = ss
      , r = or
      , n = {
        blocks: function(d) {
            for (var h = 0, x = [], y = d.data.length, m = 0, E = (0,
            r.readByte)()(d); E !== h && E; E = (0,
            r.readByte)()(d)) {
                if (d.pos + E >= y) {
                    var g = y - d.pos;
                    x.push((0,
                    r.readBytes)(g)(d)),
                    m += g;
                    break
                }
                x.push((0,
                r.readBytes)(E)(d)),
                m += E
            }
            for (var p = new Uint8Array(m), v = 0, _ = 0; _ < x.length; _++)
                p.set(x[_], v),
                v += x[_].length;
            return p
        }
    }
      , i = (0,
    e.conditional)({
        gce: [{
            codes: (0,
            r.readBytes)(2)
        }, {
            byteSize: (0,
            r.readByte)()
        }, {
            extras: (0,
            r.readBits)({
                future: {
                    index: 0,
                    length: 3
                },
                disposal: {
                    index: 3,
                    length: 3
                },
                userInput: {
                    index: 6
                },
                transparentColorGiven: {
                    index: 7
                }
            })
        }, {
            delay: (0,
            r.readUnsigned)(!0)
        }, {
            transparentColorIndex: (0,
            r.readByte)()
        }, {
            terminator: (0,
            r.readByte)()
        }]
    }, function(f) {
        var d = (0,
        r.peekBytes)(2)(f);
        return d[0] === 33 && d[1] === 249
    })
      , o = (0,
    e.conditional)({
        image: [{
            code: (0,
            r.readByte)()
        }, {
            descriptor: [{
                left: (0,
                r.readUnsigned)(!0)
            }, {
                top: (0,
                r.readUnsigned)(!0)
            }, {
                width: (0,
                r.readUnsigned)(!0)
            }, {
                height: (0,
                r.readUnsigned)(!0)
            }, {
                lct: (0,
                r.readBits)({
                    exists: {
                        index: 0
                    },
                    interlaced: {
                        index: 1
                    },
                    sort: {
                        index: 2
                    },
                    future: {
                        index: 3,
                        length: 2
                    },
                    size: {
                        index: 5,
                        length: 3
                    }
                })
            }]
        }, (0,
        e.conditional)({
            lct: (0,
            r.readArray)(3, function(f, d, h) {
                return Math.pow(2, h.descriptor.lct.size + 1)
            })
        }, function(f, d, h) {
            return h.descriptor.lct.exists
        }), {
            data: [{
                minCodeSize: (0,
                r.readByte)()
            }, n]
        }]
    }, function(f) {
        return (0,
        r.peekByte)()(f) === 44
    })
      , s = (0,
    e.conditional)({
        text: [{
            codes: (0,
            r.readBytes)(2)
        }, {
            blockSize: (0,
            r.readByte)()
        }, {
            preData: function(d, h, x) {
                return (0,
                r.readBytes)(x.text.blockSize)(d)
            }
        }, n]
    }, function(f) {
        var d = (0,
        r.peekBytes)(2)(f);
        return d[0] === 33 && d[1] === 1
    })
      , a = (0,
    e.conditional)({
        application: [{
            codes: (0,
            r.readBytes)(2)
        }, {
            blockSize: (0,
            r.readByte)()
        }, {
            id: function(d, h, x) {
                return (0,
                r.readString)(x.blockSize)(d)
            }
        }, n]
    }, function(f) {
        var d = (0,
        r.peekBytes)(2)(f);
        return d[0] === 33 && d[1] === 255
    })
      , l = (0,
    e.conditional)({
        comment: [{
            codes: (0,
            r.readBytes)(2)
        }, n]
    }, function(f) {
        var d = (0,
        r.peekBytes)(2)(f);
        return d[0] === 33 && d[1] === 254
    })
      , c = [{
        header: [{
            signature: (0,
            r.readString)(3)
        }, {
            version: (0,
            r.readString)(3)
        }]
    }, {
        lsd: [{
            width: (0,
            r.readUnsigned)(!0)
        }, {
            height: (0,
            r.readUnsigned)(!0)
        }, {
            gct: (0,
            r.readBits)({
                exists: {
                    index: 0
                },
                resolution: {
                    index: 1,
                    length: 3
                },
                sort: {
                    index: 4
                },
                size: {
                    index: 5,
                    length: 3
                }
            })
        }, {
            backgroundColorIndex: (0,
            r.readByte)()
        }, {
            pixelAspectRatio: (0,
            r.readByte)()
        }]
    }, (0,
    e.conditional)({
        gct: (0,
        r.readArray)(3, function(f, d) {
            return Math.pow(2, d.lsd.gct.size + 1)
        })
    }, function(f, d) {
        return d.lsd.gct.exists
    }), {
        frames: (0,
        e.loop)([i, a, l, o, s], function(f) {
            var d = (0,
            r.peekByte)()(f);
            return d === 33 || d === 44
        })
    }]
      , u = c;
    t.default = u
}
)(sk);
var E1 = {};
Object.defineProperty(E1, "__esModule", {
    value: !0
});
E1.deinterlace = void 0;
var Vhe = function(e, r) {
    for (var n = new Array(e.length), i = e.length / r, o = function(d, h) {
        var x = e.slice(h * r, (h + 1) * r);
        n.splice.apply(n, [d * r, r].concat(x))
    }, s = [0, 4, 2, 1], a = [8, 8, 4, 2], l = 0, c = 0; c < 4; c++)
        for (var u = s[c]; u < i; u += a[c])
            o(u, l),
            l++;
    return n
};
E1.deinterlace = Vhe;
var _1 = {};
Object.defineProperty(_1, "__esModule", {
    value: !0
});
_1.lzw = void 0;
var zhe = function(e, r, n) {
    var i = 4096, o = -1, s = n, a, l, c, u, f, d, h, b, x, y, _, m, C, w, A, T, E = new Array(n), g = new Array(i), p = new Array(i), v = new Array(i + 1);
    for (m = e,
    l = 1 << m,
    f = l + 1,
    a = l + 2,
    h = o,
    u = m + 1,
    c = (1 << u) - 1,
    x = 0; x < l; x++)
        g[x] = 0,
        p[x] = x;
    var _, b, C, w, T, A;
    for (_ = b = C = w = T = A = 0,
    y = 0; y < s; ) {
        if (w === 0) {
            if (b < u) {
                _ += r[A] << b,
                b += 8,
                A++;
                continue
            }
            if (x = _ & c,
            _ >>= u,
            b -= u,
            x > a || x == f)
                break;
            if (x == l) {
                u = m + 1,
                c = (1 << u) - 1,
                a = l + 2,
                h = o;
                continue
            }
            if (h == o) {
                v[w++] = p[x],
                h = x,
                C = x;
                continue
            }
            for (d = x,
            x == a && (v[w++] = C,
            x = h); x > l; )
                v[w++] = p[x],
                x = g[x];
            C = p[x] & 255,
            v[w++] = C,
            a < i && (g[a] = h,
            p[a] = C,
            a++,
            !(a & c) && a < i && (u++,
            c += a)),
            h = d
        }
        w--,
        E[T++] = v[w],
        y++
    }
    for (y = T; y < s; y++)
        E[y] = 0;
    return E
};
_1.lzw = zhe;
Object.defineProperty(hl, "__esModule", {
    value: !0
});
var lk = hl.decompressFrames = hl.decompressFrame = ck = hl.parseGIF = void 0
  , jhe = qhe(sk)
  , Whe = ss
  , Yhe = or
  , Xhe = E1
  , Khe = _1;
function qhe(t) {
    return t && t.__esModule ? t : {
        default: t
    }
}
var Zhe = function(e) {
    var r = new Uint8Array(e);
    return (0,
    Whe.parse)((0,
    Yhe.buildStream)(r), jhe.default)
}
  , ck = hl.parseGIF = Zhe
  , Jhe = function(e) {
    for (var r = e.pixels.length, n = new Uint8ClampedArray(r * 4), i = 0; i < r; i++) {
        var o = i * 4
          , s = e.pixels[i]
          , a = e.colorTable[s] || [0, 0, 0];
        n[o] = a[0],
        n[o + 1] = a[1],
        n[o + 2] = a[2],
        n[o + 3] = s !== e.transparentIndex ? 255 : 0
    }
    return n
}
  , uk = function(e, r, n) {
    if (!e.image) {
        console.warn("gif frame does not have associated image.");
        return
    }
    var i = e.image
      , o = i.descriptor.width * i.descriptor.height
      , s = (0,
    Khe.lzw)(i.data.minCodeSize, i.data.blocks, o);
    i.descriptor.lct.interlaced && (s = (0,
    Xhe.deinterlace)(s, i.descriptor.width));
    var a = {
        pixels: s,
        dims: {
            top: e.image.descriptor.top,
            left: e.image.descriptor.left,
            width: e.image.descriptor.width,
            height: e.image.descriptor.height
        }
    };
    return i.descriptor.lct && i.descriptor.lct.exists ? a.colorTable = i.lct : a.colorTable = r,
    e.gce && (a.delay = (e.gce.delay || 10) * 10,
    a.disposalType = e.gce.extras.disposal,
    e.gce.extras.transparentColorGiven && (a.transparentIndex = e.gce.transparentColorIndex)),
    n && (a.patch = Jhe(a)),
    a
};
hl.decompressFrame = uk;
var Qhe = function(e, r) {
    return e.frames.filter(function(n) {
        return n.image
    }).map(function(n) {
        return uk(n, e.gct, r)
    })
};
lk = hl.decompressFrames = Qhe;
class b1 {
    constructor(e) {
        if (!e || !e.length)
            throw new Error("Invalid frames");
        const [{texture: {width: r, height: n}}] = e;
        this.width = r,
        this.height = n,
        this.frames = e,
        this.textures = this.frames.map(i => i.texture),
        this.totalFrames = this.frames.length,
        this.duration = this.frames[this.totalFrames - 1].end
    }
    destroy() {
        for (const e of this.textures)
            e.destroy(!0);
        for (const e of this.frames)
            e.texture = null;
        this.frames.length = 0,
        this.textures.length = 0,
        Object.assign(this, {
            frames: null,
            textures: null,
            width: 0,
            height: 0,
            duration: 0,
            totalFrames: 0
        })
    }
    static from(e, r) {
        if (!e || e.byteLength === 0)
            throw new Error("Invalid buffer");
        const n = g => {
            let p = null;
            for (const v of g.frames)
                p = v.gce ?? p,
                "image"in v && !("gce"in v) && (v.gce = p)
        }
          , i = ck(e);
        n(i);
        const o = lk(i, !0)
          , s = []
          , a = i.lsd.width
          , l = i.lsd.height
          , c = je.get().createCanvas(a, l)
          , u = c.getContext("2d", {
            willReadFrequently: !0
        })
          , f = je.get().createCanvas()
          , d = f.getContext("2d");
        let h = 0
          , x = null;
        const {fps: y=30, ...m} = r ?? {}
          , E = 1e3 / y;
        for (let g = 0; g < o.length; g++) {
            const {disposalType: p=2, delay: v=E, patch: _, dims: {width: b, height: C, left: w, top: T}} = o[g];
            f.width = b,
            f.height = C,
            d.clearRect(0, 0, b, C);
            const A = d.createImageData(b, C);
            A.data.set(_),
            d.putImageData(A, 0, 0),
            p === 3 && (x = u.getImageData(0, 0, a, l)),
            u.drawImage(f, w, T);
            const B = u.getImageData(0, 0, a, l);
            p === 2 ? u.clearRect(0, 0, a, l) : p === 3 && u.putImageData(x, 0, 0);
            const S = je.get().createCanvas(B.width, B.height);
            S.getContext("2d").putImageData(B, 0, 0),
            s.push({
                start: h,
                end: h + v,
                texture: new Be({
                    source: new go({
                        resource: S,
                        ...m
                    })
                })
            }),
            h += v
        }
        return c.width = c.height = 0,
        f.width = f.height = 0,
        new b1(s)
    }
}
const exe = {
    extension: X.Asset,
    detection: {
        test: async () => !0,
        add: async t => [...t, "gif"],
        remove: async t => t.filter(e => e !== "gif")
    },
    loader: {
        name: "gifLoader",
        id: "gif",
        test: t => Fn.extname(t) === ".gif" || t.startsWith("data:image/gif"),
        load: async (t, e) => {
            const n = await (await je.get().fetch(t)).arrayBuffer();
            return b1.from(n, e == null ? void 0 : e.data)
        }
        ,
        unload: async t => {
            t.destroy()
        }
    }
}
  , fk = class wE extends Al {
    constructor(...e) {
        const r = e[0]instanceof b1 ? {
            source: e[0]
        } : e[0]
          , {source: n, fps: i, loop: o, animationSpeed: s, autoPlay: a, autoUpdate: l, onComplete: c, onFrameChange: u, onLoop: f, ...d} = Object.assign({}, wE.defaultOptions, r);
        super({
            texture: Be.EMPTY,
            ...d
        }),
        this.animationSpeed = 1,
        this.loop = !0,
        this.duration = 0,
        this.autoPlay = !0,
        this.dirty = !1,
        this._currentFrame = 0,
        this._autoUpdate = !1,
        this._isConnectedToTicker = !1,
        this._playing = !1,
        this._currentTime = 0,
        this.onRender = () => this._updateFrame(),
        this.texture = n.textures[0],
        this.duration = n.frames[n.frames.length - 1].end,
        this._source = n,
        this._playing = !1,
        this._currentTime = 0,
        this._isConnectedToTicker = !1,
        Object.assign(this, {
            fps: i,
            loop: o,
            animationSpeed: s,
            autoPlay: a,
            autoUpdate: l,
            onComplete: c,
            onFrameChange: u,
            onLoop: f
        }),
        this.currentFrame = 0,
        a && this.play()
    }
    stop() {
        this._playing && (this._playing = !1,
        this._autoUpdate && this._isConnectedToTicker && (Hr.shared.remove(this.update, this),
        this._isConnectedToTicker = !1))
    }
    play() {
        this._playing || (this._playing = !0,
        this._autoUpdate && !this._isConnectedToTicker && (Hr.shared.add(this.update, this, Bl.HIGH),
        this._isConnectedToTicker = !0),
        !this.loop && this.currentFrame === this._source.frames.length - 1 && (this._currentTime = 0))
    }
    get progress() {
        return this._currentTime / this.duration
    }
    get playing() {
        return this._playing
    }
    update(e) {
        var s, a;
        if (!this._playing)
            return;
        const r = this.animationSpeed * e.deltaTime / Hr.targetFPMS
          , n = this._currentTime + r
          , i = n % this.duration
          , o = this._source.frames.findIndex(l => l.start <= i && l.end > i);
        n >= this.duration ? this.loop ? (this._currentTime = i,
        this._updateFrameIndex(o),
        (s = this.onLoop) == null || s.call(this)) : (this._currentTime = this.duration,
        this._updateFrameIndex(this.totalFrames - 1),
        (a = this.onComplete) == null || a.call(this),
        this.stop()) : (this._currentTime = i,
        this._updateFrameIndex(o))
    }
    _updateFrame() {
        this.dirty && (this.texture = this._source.frames[this._currentFrame].texture,
        this.dirty = !1)
    }
    get autoUpdate() {
        return this._autoUpdate
    }
    set autoUpdate(e) {
        e !== this._autoUpdate && (this._autoUpdate = e,
        !this._autoUpdate && this._isConnectedToTicker ? (Hr.shared.remove(this.update, this),
        this._isConnectedToTicker = !1) : this._autoUpdate && !this._isConnectedToTicker && this._playing && (Hr.shared.add(this.update, this),
        this._isConnectedToTicker = !0))
    }
    get currentFrame() {
        return this._currentFrame
    }
    set currentFrame(e) {
        this._updateFrameIndex(e),
        this._currentTime = this._source.frames[e].start
    }
    get source() {
        return this._source
    }
    _updateFrameIndex(e) {
        var r;
        if (e < 0 || e >= this.totalFrames)
            throw new Error(`Frame index out of range, expecting 0 to ${this.totalFrames}, got ${e}`);
        this._currentFrame !== e && (this._currentFrame = e,
        this.dirty = !0,
        (r = this.onFrameChange) == null || r.call(this, e))
    }
    get totalFrames() {
        return this._source.totalFrames
    }
    destroy(e=!1) {
        this.stop(),
        super.destroy(),
        e && this._source.destroy();
        const r = null;
        this._source = r,
        this.onComplete = r,
        this.onFrameChange = r,
        this.onLoop = r
    }
    clone() {
        const e = new wE({
            source: this._source,
            autoUpdate: this._autoUpdate,
            loop: this.loop,
            autoPlay: this.autoPlay,
            animationSpeed: this.animationSpeed,
            onComplete: this.onComplete,
            onFrameChange: this.onFrameChange,
            onLoop: this.onLoop
        });
        return e.dirty = !0,
        e
    }
}
;
fk.defaultOptions = {
    fps: 30,
    loop: !0,
    animationSpeed: 1,
    autoPlay: !0,
    autoUpdate: !0,
    onComplete: null,
    onFrameChange: null,
    onLoop: null
};
let u5e = fk;
$e.add(exe);
function dk(t, e) {
    return function() {
        return t.apply(e, arguments)
    }
}
const {toString: txe} = Object.prototype
  , {getPrototypeOf: qb} = Object
  , {iterator: C1, toStringTag: hk} = Symbol
  , A1 = (t => e => {
    const r = txe.call(e);
    return t[r] || (t[r] = r.slice(8, -1).toLowerCase())
}
)(Object.create(null))
  , Yi = t => (t = t.toLowerCase(),
e => A1(e) === t)
  , w1 = t => e => typeof e === t
  , {isArray: ku} = Array
  , cu = w1("undefined");
function pd(t) {
    return t !== null && !cu(t) && t.constructor !== null && !cu(t.constructor) && Pn(t.constructor.isBuffer) && t.constructor.isBuffer(t)
}
const xk = Yi("ArrayBuffer");
function rxe(t) {
    let e;
    return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && xk(t.buffer),
    e
}
const nxe = w1("string")
  , Pn = w1("function")
  , pk = w1("number")
  , gd = t => t !== null && typeof t == "object"
  , ixe = t => t === !0 || t === !1
  , tx = t => {
    if (A1(t) !== "object")
        return !1;
    const e = qb(t);
    return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(hk in t) && !(C1 in t)
}
  , oxe = t => {
    if (!gd(t) || pd(t))
        return !1;
    try {
        return Object.keys(t).length === 0 && Object.getPrototypeOf(t) === Object.prototype
    } catch {
        return !1
    }
}
  , sxe = Yi("Date")
  , axe = Yi("File")
  , lxe = Yi("Blob")
  , cxe = Yi("FileList")
  , uxe = t => gd(t) && Pn(t.pipe)
  , fxe = t => {
    let e;
    return t && (typeof FormData == "function" && t instanceof FormData || Pn(t.append) && ((e = A1(t)) === "formdata" || e === "object" && Pn(t.toString) && t.toString() === "[object FormData]"))
}
  , dxe = Yi("URLSearchParams")
  , [hxe,xxe,pxe,gxe] = ["ReadableStream", "Request", "Response", "Headers"].map(Yi)
  , mxe = t => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
function md(t, e, {allOwnKeys: r=!1}={}) {
    if (t === null || typeof t > "u")
        return;
    let n, i;
    if (typeof t != "object" && (t = [t]),
    ku(t))
        for (n = 0,
        i = t.length; n < i; n++)
            e.call(null, t[n], n, t);
    else {
        if (pd(t))
            return;
        const o = r ? Object.getOwnPropertyNames(t) : Object.keys(t)
          , s = o.length;
        let a;
        for (n = 0; n < s; n++)
            a = o[n],
            e.call(null, t[a], a, t)
    }
}
function gk(t, e) {
    if (pd(t))
        return null;
    e = e.toLowerCase();
    const r = Object.keys(t);
    let n = r.length, i;
    for (; n-- > 0; )
        if (i = r[n],
        e === i.toLowerCase())
            return i;
    return null
}
const el = ( () => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)()
  , mk = t => !cu(t) && t !== el;
function BE() {
    const {caseless: t, skipUndefined: e} = mk(this) && this || {}
      , r = {}
      , n = (i, o) => {
        const s = t && gk(r, o) || o;
        tx(r[s]) && tx(i) ? r[s] = BE(r[s], i) : tx(i) ? r[s] = BE({}, i) : ku(i) ? r[s] = i.slice() : (!e || !cu(i)) && (r[s] = i)
    }
    ;
    for (let i = 0, o = arguments.length; i < o; i++)
        arguments[i] && md(arguments[i], n);
    return r
}
const vxe = (t, e, r, {allOwnKeys: n}={}) => (md(e, (i, o) => {
    r && Pn(i) ? t[o] = dk(i, r) : t[o] = i
}
, {
    allOwnKeys: n
}),
t)
  , yxe = t => (t.charCodeAt(0) === 65279 && (t = t.slice(1)),
t)
  , Exe = (t, e, r, n) => {
    t.prototype = Object.create(e.prototype, n),
    t.prototype.constructor = t,
    Object.defineProperty(t, "super", {
        value: e.prototype
    }),
    r && Object.assign(t.prototype, r)
}
  , _xe = (t, e, r, n) => {
    let i, o, s;
    const a = {};
    if (e = e || {},
    t == null)
        return e;
    do {
        for (i = Object.getOwnPropertyNames(t),
        o = i.length; o-- > 0; )
            s = i[o],
            (!n || n(s, t, e)) && !a[s] && (e[s] = t[s],
            a[s] = !0);
        t = r !== !1 && qb(t)
    } while (t && (!r || r(t, e)) && t !== Object.prototype);
    return e
}
  , bxe = (t, e, r) => {
    t = String(t),
    (r === void 0 || r > t.length) && (r = t.length),
    r -= e.length;
    const n = t.indexOf(e, r);
    return n !== -1 && n === r
}
  , Cxe = t => {
    if (!t)
        return null;
    if (ku(t))
        return t;
    let e = t.length;
    if (!pk(e))
        return null;
    const r = new Array(e);
    for (; e-- > 0; )
        r[e] = t[e];
    return r
}
  , Axe = (t => e => t && e instanceof t)(typeof Uint8Array < "u" && qb(Uint8Array))
  , wxe = (t, e) => {
    const n = (t && t[C1]).call(t);
    let i;
    for (; (i = n.next()) && !i.done; ) {
        const o = i.value;
        e.call(t, o[0], o[1])
    }
}
  , Bxe = (t, e) => {
    let r;
    const n = [];
    for (; (r = t.exec(e)) !== null; )
        n.push(r);
    return n
}
  , Sxe = Yi("HTMLFormElement")
  , Txe = t => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(r, n, i) {
    return n.toUpperCase() + i
})
  , W3 = ( ({hasOwnProperty: t}) => (e, r) => t.call(e, r))(Object.prototype)
  , Dxe = Yi("RegExp")
  , vk = (t, e) => {
    const r = Object.getOwnPropertyDescriptors(t)
      , n = {};
    md(r, (i, o) => {
        let s;
        (s = e(i, o, t)) !== !1 && (n[o] = s || i)
    }
    ),
    Object.defineProperties(t, n)
}
  , Fxe = t => {
    vk(t, (e, r) => {
        if (Pn(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
            return !1;
        const n = t[r];
        if (Pn(n)) {
            if (e.enumerable = !1,
            "writable"in e) {
                e.writable = !1;
                return
            }
            e.set || (e.set = () => {
                throw Error("Can not rewrite read-only method '" + r + "'")
            }
            )
        }
    }
    )
}
  , Pxe = (t, e) => {
    const r = {}
      , n = i => {
        i.forEach(o => {
            r[o] = !0
        }
        )
    }
    ;
    return ku(t) ? n(t) : n(String(t).split(e)),
    r
}
  , Ixe = () => {}
  , Oxe = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
function kxe(t) {
    return !!(t && Pn(t.append) && t[hk] === "FormData" && t[C1])
}
const Rxe = t => {
    const e = new Array(10)
      , r = (n, i) => {
        if (gd(n)) {
            if (e.indexOf(n) >= 0)
                return;
            if (pd(n))
                return n;
            if (!("toJSON"in n)) {
                e[i] = n;
                const o = ku(n) ? [] : {};
                return md(n, (s, a) => {
                    const l = r(s, i + 1);
                    !cu(l) && (o[a] = l)
                }
                ),
                e[i] = void 0,
                o
            }
        }
        return n
    }
    ;
    return r(t, 0)
}
  , Mxe = Yi("AsyncFunction")
  , Nxe = t => t && (gd(t) || Pn(t)) && Pn(t.then) && Pn(t.catch)
  , yk = ( (t, e) => t ? setImmediate : e ? ( (r, n) => (el.addEventListener("message", ({source: i, data: o}) => {
    i === el && o === r && n.length && n.shift()()
}
, !1),
i => {
    n.push(i),
    el.postMessage(r, "*")
}
))(`axios@${Math.random()}`, []) : r => setTimeout(r))(typeof setImmediate == "function", Pn(el.postMessage))
  , Lxe = typeof queueMicrotask < "u" ? queueMicrotask.bind(el) : typeof process < "u" && process.nextTick || yk
  , $xe = t => t != null && Pn(t[C1])
  , ne = {
    isArray: ku,
    isArrayBuffer: xk,
    isBuffer: pd,
    isFormData: fxe,
    isArrayBufferView: rxe,
    isString: nxe,
    isNumber: pk,
    isBoolean: ixe,
    isObject: gd,
    isPlainObject: tx,
    isEmptyObject: oxe,
    isReadableStream: hxe,
    isRequest: xxe,
    isResponse: pxe,
    isHeaders: gxe,
    isUndefined: cu,
    isDate: sxe,
    isFile: axe,
    isBlob: lxe,
    isRegExp: Dxe,
    isFunction: Pn,
    isStream: uxe,
    isURLSearchParams: dxe,
    isTypedArray: Axe,
    isFileList: cxe,
    forEach: md,
    merge: BE,
    extend: vxe,
    trim: mxe,
    stripBOM: yxe,
    inherits: Exe,
    toFlatObject: _xe,
    kindOf: A1,
    kindOfTest: Yi,
    endsWith: bxe,
    toArray: Cxe,
    forEachEntry: wxe,
    matchAll: Bxe,
    isHTMLForm: Sxe,
    hasOwnProperty: W3,
    hasOwnProp: W3,
    reduceDescriptors: vk,
    freezeMethods: Fxe,
    toObjectSet: Pxe,
    toCamelCase: Txe,
    noop: Ixe,
    toFiniteNumber: Oxe,
    findKey: gk,
    global: el,
    isContextDefined: mk,
    isSpecCompliantForm: kxe,
    toJSONObject: Rxe,
    isAsyncFn: Mxe,
    isThenable: Nxe,
    setImmediate: yk,
    asap: Lxe,
    isIterable: $xe
};
function Ye(t, e, r, n, i) {
    Error.call(this),
    Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack,
    this.message = t,
    this.name = "AxiosError",
    e && (this.code = e),
    r && (this.config = r),
    n && (this.request = n),
    i && (this.response = i,
    this.status = i.status ? i.status : null)
}
ne.inherits(Ye, Error, {
    toJSON: function() {
        return {
            message: this.message,
            name: this.name,
            description: this.description,
            number: this.number,
            fileName: this.fileName,
            lineNumber: this.lineNumber,
            columnNumber: this.columnNumber,
            stack: this.stack,
            config: ne.toJSONObject(this.config),
            code: this.code,
            status: this.status
        }
    }
});
const Ek = Ye.prototype
  , _k = {};
["ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL"].forEach(t => {
    _k[t] = {
        value: t
    }
}
);
Object.defineProperties(Ye, _k);
Object.defineProperty(Ek, "isAxiosError", {
    value: !0
});
Ye.from = (t, e, r, n, i, o) => {
    const s = Object.create(Ek);
    ne.toFlatObject(t, s, function(u) {
        return u !== Error.prototype
    }, c => c !== "isAxiosError");
    const a = t && t.message ? t.message : "Error"
      , l = e == null && t ? t.code : e;
    return Ye.call(s, a, l, r, n, i),
    t && s.cause == null && Object.defineProperty(s, "cause", {
        value: t,
        configurable: !0
    }),
    s.name = t && t.name || "Error",
    o && Object.assign(s, o),
    s
}
;
const Uxe = null;
function SE(t) {
    return ne.isPlainObject(t) || ne.isArray(t)
}
function bk(t) {
    return ne.endsWith(t, "[]") ? t.slice(0, -2) : t
}
function Y3(t, e, r) {
    return t ? t.concat(e).map(function(i, o) {
        return i = bk(i),
        !r && o ? "[" + i + "]" : i
    }).join(r ? "." : "") : e
}
function Gxe(t) {
    return ne.isArray(t) && !t.some(SE)
}
const Hxe = ne.toFlatObject(ne, {}, null, function(e) {
    return /^is[A-Z]/.test(e)
});
function B1(t, e, r) {
    if (!ne.isObject(t))
        throw new TypeError("target must be an object");
    e = e || new FormData,
    r = ne.toFlatObject(r, {
        metaTokens: !0,
        dots: !1,
        indexes: !1
    }, !1, function(y, m) {
        return !ne.isUndefined(m[y])
    });
    const n = r.metaTokens
      , i = r.visitor || u
      , o = r.dots
      , s = r.indexes
      , l = (r.Blob || typeof Blob < "u" && Blob) && ne.isSpecCompliantForm(e);
    if (!ne.isFunction(i))
        throw new TypeError("visitor must be a function");
    function c(x) {
        if (x === null)
            return "";
        if (ne.isDate(x))
            return x.toISOString();
        if (ne.isBoolean(x))
            return x.toString();
        if (!l && ne.isBlob(x))
            throw new Ye("Blob is not supported. Use a Buffer instead.");
        return ne.isArrayBuffer(x) || ne.isTypedArray(x) ? l && typeof Blob == "function" ? new Blob([x]) : Buffer.from(x) : x
    }
    function u(x, y, m) {
        let E = x;
        if (x && !m && typeof x == "object") {
            if (ne.endsWith(y, "{}"))
                y = n ? y : y.slice(0, -2),
                x = JSON.stringify(x);
            else if (ne.isArray(x) && Gxe(x) || (ne.isFileList(x) || ne.endsWith(y, "[]")) && (E = ne.toArray(x)))
                return y = bk(y),
                E.forEach(function(p, v) {
                    !(ne.isUndefined(p) || p === null) && e.append(s === !0 ? Y3([y], v, o) : s === null ? y : y + "[]", c(p))
                }),
                !1
        }
        return SE(x) ? !0 : (e.append(Y3(m, y, o), c(x)),
        !1)
    }
    const f = []
      , d = Object.assign(Hxe, {
        defaultVisitor: u,
        convertValue: c,
        isVisitable: SE
    });
    function h(x, y) {
        if (!ne.isUndefined(x)) {
            if (f.indexOf(x) !== -1)
                throw Error("Circular reference detected in " + y.join("."));
            f.push(x),
            ne.forEach(x, function(E, g) {
                (!(ne.isUndefined(E) || E === null) && i.call(e, E, ne.isString(g) ? g.trim() : g, y, d)) === !0 && h(E, y ? y.concat(g) : [g])
            }),
            f.pop()
        }
    }
    if (!ne.isObject(t))
        throw new TypeError("data must be an object");
    return h(t),
    e
}
function X3(t) {
    const e = {
        "!": "%21",
        "'": "%27",
        "(": "%28",
        ")": "%29",
        "~": "%7E",
        "%20": "+",
        "%00": "\0"
    };
    return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g, function(n) {
        return e[n]
    })
}
function Zb(t, e) {
    this._pairs = [],
    t && B1(t, this, e)
}
const Ck = Zb.prototype;
Ck.append = function(e, r) {
    this._pairs.push([e, r])
}
;
Ck.toString = function(e) {
    const r = e ? function(n) {
        return e.call(this, n, X3)
    }
    : X3;
    return this._pairs.map(function(i) {
        return r(i[0]) + "=" + r(i[1])
    }, "").join("&")
}
;
function Vxe(t) {
    return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+")
}
function Ak(t, e, r) {
    if (!e)
        return t;
    const n = r && r.encode || Vxe;
    ne.isFunction(r) && (r = {
        serialize: r
    });
    const i = r && r.serialize;
    let o;
    if (i ? o = i(e, r) : o = ne.isURLSearchParams(e) ? e.toString() : new Zb(e,r).toString(n),
    o) {
        const s = t.indexOf("#");
        s !== -1 && (t = t.slice(0, s)),
        t += (t.indexOf("?") === -1 ? "?" : "&") + o
    }
    return t
}
class zxe {
    constructor() {
        this.handlers = []
    }
    use(e, r, n) {
        return this.handlers.push({
            fulfilled: e,
            rejected: r,
            synchronous: n ? n.synchronous : !1,
            runWhen: n ? n.runWhen : null
        }),
        this.handlers.length - 1
    }
    eject(e) {
        this.handlers[e] && (this.handlers[e] = null)
    }
    clear() {
        this.handlers && (this.handlers = [])
    }
    forEach(e) {
        ne.forEach(this.handlers, function(n) {
            n !== null && e(n)
        })
    }
}
const K3 = zxe
  , wk = {
    silentJSONParsing: !0,
    forcedJSONParsing: !0,
    clarifyTimeoutError: !1
}
  , jxe = typeof URLSearchParams < "u" ? URLSearchParams : Zb
  , Wxe = typeof FormData < "u" ? FormData : null
  , Yxe = typeof Blob < "u" ? Blob : null
  , Xxe = {
    isBrowser: !0,
    classes: {
        URLSearchParams: jxe,
        FormData: Wxe,
        Blob: Yxe
    },
    protocols: ["http", "https", "file", "blob", "url", "data"]
}
  , Jb = typeof window < "u" && typeof document < "u"
  , TE = typeof navigator == "object" && navigator || void 0
  , Kxe = Jb && (!TE || ["ReactNative", "NativeScript", "NS"].indexOf(TE.product) < 0)
  , qxe = ( () => typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function")()
  , Zxe = Jb && window.location.href || "http://localhost"
  , Jxe = Object.freeze(Object.defineProperty({
    __proto__: null,
    hasBrowserEnv: Jb,
    hasStandardBrowserEnv: Kxe,
    hasStandardBrowserWebWorkerEnv: qxe,
    navigator: TE,
    origin: Zxe
}, Symbol.toStringTag, {
    value: "Module"
}))
  , Qr = {
    ...Jxe,
    ...Xxe
};
function Qxe(t, e) {
    return B1(t, new Qr.classes.URLSearchParams, {
        visitor: function(r, n, i, o) {
            return Qr.isNode && ne.isBuffer(r) ? (this.append(n, r.toString("base64")),
            !1) : o.defaultVisitor.apply(this, arguments)
        },
        ...e
    })
}
function epe(t) {
    return ne.matchAll(/\w+|\[(\w*)]/g, t).map(e => e[0] === "[]" ? "" : e[1] || e[0])
}
function tpe(t) {
    const e = {}
      , r = Object.keys(t);
    let n;
    const i = r.length;
    let o;
    for (n = 0; n < i; n++)
        o = r[n],
        e[o] = t[o];
    return e
}
function Bk(t) {
    function e(r, n, i, o) {
        let s = r[o++];
        if (s === "__proto__")
            return !0;
        const a = Number.isFinite(+s)
          , l = o >= r.length;
        return s = !s && ne.isArray(i) ? i.length : s,
        l ? (ne.hasOwnProp(i, s) ? i[s] = [i[s], n] : i[s] = n,
        !a) : ((!i[s] || !ne.isObject(i[s])) && (i[s] = []),
        e(r, n, i[s], o) && ne.isArray(i[s]) && (i[s] = tpe(i[s])),
        !a)
    }
    if (ne.isFormData(t) && ne.isFunction(t.entries)) {
        const r = {};
        return ne.forEachEntry(t, (n, i) => {
            e(epe(n), i, r, 0)
        }
        ),
        r
    }
    return null
}
function rpe(t, e, r) {
    if (ne.isString(t))
        try {
            return (e || JSON.parse)(t),
            ne.trim(t)
        } catch (n) {
            if (n.name !== "SyntaxError")
                throw n
        }
    return (r || JSON.stringify)(t)
}
const Qb = {
    transitional: wk,
    adapter: ["xhr", "http", "fetch"],
    transformRequest: [function(e, r) {
        const n = r.getContentType() || ""
          , i = n.indexOf("application/json") > -1
          , o = ne.isObject(e);
        if (o && ne.isHTMLForm(e) && (e = new FormData(e)),
        ne.isFormData(e))
            return i ? JSON.stringify(Bk(e)) : e;
        if (ne.isArrayBuffer(e) || ne.isBuffer(e) || ne.isStream(e) || ne.isFile(e) || ne.isBlob(e) || ne.isReadableStream(e))
            return e;
        if (ne.isArrayBufferView(e))
            return e.buffer;
        if (ne.isURLSearchParams(e))
            return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1),
            e.toString();
        let a;
        if (o) {
            if (n.indexOf("application/x-www-form-urlencoded") > -1)
                return Qxe(e, this.formSerializer).toString();
            if ((a = ne.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
                const l = this.env && this.env.FormData;
                return B1(a ? {
                    "files[]": e
                } : e, l && new l, this.formSerializer)
            }
        }
        return o || i ? (r.setContentType("application/json", !1),
        rpe(e)) : e
    }
    ],
    transformResponse: [function(e) {
        const r = this.transitional || Qb.transitional
          , n = r && r.forcedJSONParsing
          , i = this.responseType === "json";
        if (ne.isResponse(e) || ne.isReadableStream(e))
            return e;
        if (e && ne.isString(e) && (n && !this.responseType || i)) {
            const s = !(r && r.silentJSONParsing) && i;
            try {
                return JSON.parse(e, this.parseReviver)
            } catch (a) {
                if (s)
                    throw a.name === "SyntaxError" ? Ye.from(a, Ye.ERR_BAD_RESPONSE, this, null, this.response) : a
            }
        }
        return e
    }
    ],
    timeout: 0,
    xsrfCookieName: "XSRF-TOKEN",
    xsrfHeaderName: "X-XSRF-TOKEN",
    maxContentLength: -1,
    maxBodyLength: -1,
    env: {
        FormData: Qr.classes.FormData,
        Blob: Qr.classes.Blob
    },
    validateStatus: function(e) {
        return e >= 200 && e < 300
    },
    headers: {
        common: {
            Accept: "application/json, text/plain, */*",
            "Content-Type": void 0
        }
    }
};
ne.forEach(["delete", "get", "head", "post", "put", "patch"], t => {
    Qb.headers[t] = {}
}
);
const eC = Qb
  , npe = ne.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"])
  , ipe = t => {
    const e = {};
    let r, n, i;
    return t && t.split(`
`).forEach(function(s) {
        i = s.indexOf(":"),
        r = s.substring(0, i).trim().toLowerCase(),
        n = s.substring(i + 1).trim(),
        !(!r || e[r] && npe[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n)
    }),
    e
}
  , q3 = Symbol("internals");
function l0(t) {
    return t && String(t).trim().toLowerCase()
}
function rx(t) {
    return t === !1 || t == null ? t : ne.isArray(t) ? t.map(rx) : String(t)
}
function ope(t) {
    const e = Object.create(null)
      , r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
    let n;
    for (; n = r.exec(t); )
        e[n[1]] = n[2];
    return e
}
const spe = t => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
function mm(t, e, r, n, i) {
    if (ne.isFunction(n))
        return n.call(this, e, r);
    if (i && (e = r),
    !!ne.isString(e)) {
        if (ne.isString(n))
            return e.indexOf(n) !== -1;
        if (ne.isRegExp(n))
            return n.test(e)
    }
}
function ape(t) {
    return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, r, n) => r.toUpperCase() + n)
}
function lpe(t, e) {
    const r = ne.toCamelCase(" " + e);
    ["get", "set", "has"].forEach(n => {
        Object.defineProperty(t, n + r, {
            value: function(i, o, s) {
                return this[n].call(this, e, i, o, s)
            },
            configurable: !0
        })
    }
    )
}
class S1 {
    constructor(e) {
        e && this.set(e)
    }
    set(e, r, n) {
        const i = this;
        function o(a, l, c) {
            const u = l0(l);
            if (!u)
                throw new Error("header name must be a non-empty string");
            const f = ne.findKey(i, u);
            (!f || i[f] === void 0 || c === !0 || c === void 0 && i[f] !== !1) && (i[f || l] = rx(a))
        }
        const s = (a, l) => ne.forEach(a, (c, u) => o(c, u, l));
        if (ne.isPlainObject(e) || e instanceof this.constructor)
            s(e, r);
        else if (ne.isString(e) && (e = e.trim()) && !spe(e))
            s(ipe(e), r);
        else if (ne.isObject(e) && ne.isIterable(e)) {
            let a = {}, l, c;
            for (const u of e) {
                if (!ne.isArray(u))
                    throw TypeError("Object iterator must return a key-value pair");
                a[c = u[0]] = (l = a[c]) ? ne.isArray(l) ? [...l, u[1]] : [l, u[1]] : u[1]
            }
            s(a, r)
        } else
            e != null && o(r, e, n);
        return this
    }
    get(e, r) {
        if (e = l0(e),
        e) {
            const n = ne.findKey(this, e);
            if (n) {
                const i = this[n];
                if (!r)
                    return i;
                if (r === !0)
                    return ope(i);
                if (ne.isFunction(r))
                    return r.call(this, i, n);
                if (ne.isRegExp(r))
                    return r.exec(i);
                throw new TypeError("parser must be boolean|regexp|function")
            }
        }
    }
    has(e, r) {
        if (e = l0(e),
        e) {
            const n = ne.findKey(this, e);
            return !!(n && this[n] !== void 0 && (!r || mm(this, this[n], n, r)))
        }
        return !1
    }
    delete(e, r) {
        const n = this;
        let i = !1;
        function o(s) {
            if (s = l0(s),
            s) {
                const a = ne.findKey(n, s);
                a && (!r || mm(n, n[a], a, r)) && (delete n[a],
                i = !0)
            }
        }
        return ne.isArray(e) ? e.forEach(o) : o(e),
        i
    }
    clear(e) {
        const r = Object.keys(this);
        let n = r.length
          , i = !1;
        for (; n--; ) {
            const o = r[n];
            (!e || mm(this, this[o], o, e, !0)) && (delete this[o],
            i = !0)
        }
        return i
    }
    normalize(e) {
        const r = this
          , n = {};
        return ne.forEach(this, (i, o) => {
            const s = ne.findKey(n, o);
            if (s) {
                r[s] = rx(i),
                delete r[o];
                return
            }
            const a = e ? ape(o) : String(o).trim();
            a !== o && delete r[o],
            r[a] = rx(i),
            n[a] = !0
        }
        ),
        this
    }
    concat(...e) {
        return this.constructor.concat(this, ...e)
    }
    toJSON(e) {
        const r = Object.create(null);
        return ne.forEach(this, (n, i) => {
            n != null && n !== !1 && (r[i] = e && ne.isArray(n) ? n.join(", ") : n)
        }
        ),
        r
    }
    [Symbol.iterator]() {
        return Object.entries(this.toJSON())[Symbol.iterator]()
    }
    toString() {
        return Object.entries(this.toJSON()).map( ([e,r]) => e + ": " + r).join(`
`)
    }
    getSetCookie() {
        return this.get("set-cookie") || []
    }
    get[Symbol.toStringTag]() {
        return "AxiosHeaders"
    }
    static from(e) {
        return e instanceof this ? e : new this(e)
    }
    static concat(e, ...r) {
        const n = new this(e);
        return r.forEach(i => n.set(i)),
        n
    }
    static accessor(e) {
        const n = (this[q3] = this[q3] = {
            accessors: {}
        }).accessors
          , i = this.prototype;
        function o(s) {
            const a = l0(s);
            n[a] || (lpe(i, s),
            n[a] = !0)
        }
        return ne.isArray(e) ? e.forEach(o) : o(e),
        this
    }
}
S1.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
ne.reduceDescriptors(S1.prototype, ({value: t}, e) => {
    let r = e[0].toUpperCase() + e.slice(1);
    return {
        get: () => t,
        set(n) {
            this[r] = n
        }
    }
}
);
ne.freezeMethods(S1);
const $i = S1;
function vm(t, e) {
    const r = this || eC
      , n = e || r
      , i = $i.from(n.headers);
    let o = n.data;
    return ne.forEach(t, function(a) {
        o = a.call(r, o, i.normalize(), e ? e.status : void 0)
    }),
    i.normalize(),
    o
}
function Sk(t) {
    return !!(t && t.__CANCEL__)
}
function Ru(t, e, r) {
    Ye.call(this, t ?? "canceled", Ye.ERR_CANCELED, e, r),
    this.name = "CanceledError"
}
ne.inherits(Ru, Ye, {
    __CANCEL__: !0
});
function Tk(t, e, r) {
    const n = r.config.validateStatus;
    !r.status || !n || n(r.status) ? t(r) : e(new Ye("Request failed with status code " + r.status,[Ye.ERR_BAD_REQUEST, Ye.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],r.config,r.request,r))
}
function cpe(t) {
    const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
    return e && e[1] || ""
}
function upe(t, e) {
    t = t || 10;
    const r = new Array(t)
      , n = new Array(t);
    let i = 0, o = 0, s;
    return e = e !== void 0 ? e : 1e3,
    function(l) {
        const c = Date.now()
          , u = n[o];
        s || (s = c),
        r[i] = l,
        n[i] = c;
        let f = o
          , d = 0;
        for (; f !== i; )
            d += r[f++],
            f = f % t;
        if (i = (i + 1) % t,
        i === o && (o = (o + 1) % t),
        c - s < e)
            return;
        const h = u && c - u;
        return h ? Math.round(d * 1e3 / h) : void 0
    }
}
function fpe(t, e) {
    let r = 0, n = 1e3 / e, i, o;
    const s = (c, u=Date.now()) => {
        r = u,
        i = null,
        o && (clearTimeout(o),
        o = null),
        t(...c)
    }
    ;
    return [ (...c) => {
        const u = Date.now()
          , f = u - r;
        f >= n ? s(c, u) : (i = c,
        o || (o = setTimeout( () => {
            o = null,
            s(i)
        }
        , n - f)))
    }
    , () => i && s(i)]
}
const Wx = (t, e, r=3) => {
    let n = 0;
    const i = upe(50, 250);
    return fpe(o => {
        const s = o.loaded
          , a = o.lengthComputable ? o.total : void 0
          , l = s - n
          , c = i(l)
          , u = s <= a;
        n = s;
        const f = {
            loaded: s,
            total: a,
            progress: a ? s / a : void 0,
            bytes: l,
            rate: c || void 0,
            estimated: c && a && u ? (a - s) / c : void 0,
            event: o,
            lengthComputable: a != null,
            [e ? "download" : "upload"]: !0
        };
        t(f)
    }
    , r)
}
  , Z3 = (t, e) => {
    const r = t != null;
    return [n => e[0]({
        lengthComputable: r,
        total: t,
        loaded: n
    }), e[1]]
}
  , J3 = t => (...e) => ne.asap( () => t(...e))
  , dpe = Qr.hasStandardBrowserEnv ? ( (t, e) => r => (r = new URL(r,Qr.origin),
t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(new URL(Qr.origin), Qr.navigator && /(msie|trident)/i.test(Qr.navigator.userAgent)) : () => !0
  , hpe = Qr.hasStandardBrowserEnv ? {
    write(t, e, r, n, i, o, s) {
        if (typeof document > "u")
            return;
        const a = [`${t}=${encodeURIComponent(e)}`];
        ne.isNumber(r) && a.push(`expires=${new Date(r).toUTCString()}`),
        ne.isString(n) && a.push(`path=${n}`),
        ne.isString(i) && a.push(`domain=${i}`),
        o === !0 && a.push("secure"),
        ne.isString(s) && a.push(`SameSite=${s}`),
        document.cookie = a.join("; ")
    },
    read(t) {
        if (typeof document > "u")
            return null;
        const e = document.cookie.match(new RegExp("(?:^|; )" + t + "=([^;]*)"));
        return e ? decodeURIComponent(e[1]) : null
    },
    remove(t) {
        this.write(t, "", Date.now() - 864e5, "/")
    }
} : {
    write() {},
    read() {
        return null
    },
    remove() {}
};
function xpe(t) {
    return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)
}
function ppe(t, e) {
    return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t
}
function Dk(t, e, r) {
    let n = !xpe(e);
    return t && (n || r == !1) ? ppe(t, e) : e
}
const Q3 = t => t instanceof $i ? {
    ...t
} : t;
function Dl(t, e) {
    e = e || {};
    const r = {};
    function n(c, u, f, d) {
        return ne.isPlainObject(c) && ne.isPlainObject(u) ? ne.merge.call({
            caseless: d
        }, c, u) : ne.isPlainObject(u) ? ne.merge({}, u) : ne.isArray(u) ? u.slice() : u
    }
    function i(c, u, f, d) {
        if (ne.isUndefined(u)) {
            if (!ne.isUndefined(c))
                return n(void 0, c, f, d)
        } else
            return n(c, u, f, d)
    }
    function o(c, u) {
        if (!ne.isUndefined(u))
            return n(void 0, u)
    }
    function s(c, u) {
        if (ne.isUndefined(u)) {
            if (!ne.isUndefined(c))
                return n(void 0, c)
        } else
            return n(void 0, u)
    }
    function a(c, u, f) {
        if (f in e)
            return n(c, u);
        if (f in t)
            return n(void 0, c)
    }
    const l = {
        url: o,
        method: o,
        data: o,
        baseURL: s,
        transformRequest: s,
        transformResponse: s,
        paramsSerializer: s,
        timeout: s,
        timeoutMessage: s,
        withCredentials: s,
        withXSRFToken: s,
        adapter: s,
        responseType: s,
        xsrfCookieName: s,
        xsrfHeaderName: s,
        onUploadProgress: s,
        onDownloadProgress: s,
        decompress: s,
        maxContentLength: s,
        maxBodyLength: s,
        beforeRedirect: s,
        transport: s,
        httpAgent: s,
        httpsAgent: s,
        cancelToken: s,
        socketPath: s,
        responseEncoding: s,
        validateStatus: a,
        headers: (c, u, f) => i(Q3(c), Q3(u), f, !0)
    };
    return ne.forEach(Object.keys({
        ...t,
        ...e
    }), function(u) {
        const f = l[u] || i
          , d = f(t[u], e[u], u);
        ne.isUndefined(d) && f !== a || (r[u] = d)
    }),
    r
}
const Fk = t => {
    const e = Dl({}, t);
    let {data: r, withXSRFToken: n, xsrfHeaderName: i, xsrfCookieName: o, headers: s, auth: a} = e;
    if (e.headers = s = $i.from(s),
    e.url = Ak(Dk(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer),
    a && s.set("Authorization", "Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))),
    ne.isFormData(r)) {
        if (Qr.hasStandardBrowserEnv || Qr.hasStandardBrowserWebWorkerEnv)
            s.setContentType(void 0);
        else if (ne.isFunction(r.getHeaders)) {
            const l = r.getHeaders()
              , c = ["content-type", "content-length"];
            Object.entries(l).forEach( ([u,f]) => {
                c.includes(u.toLowerCase()) && s.set(u, f)
            }
            )
        }
    }
    if (Qr.hasStandardBrowserEnv && (n && ne.isFunction(n) && (n = n(e)),
    n || n !== !1 && dpe(e.url))) {
        const l = i && o && hpe.read(o);
        l && s.set(i, l)
    }
    return e
}
  , gpe = typeof XMLHttpRequest < "u"
  , mpe = gpe && function(t) {
    return new Promise(function(r, n) {
        const i = Fk(t);
        let o = i.data;
        const s = $i.from(i.headers).normalize();
        let {responseType: a, onUploadProgress: l, onDownloadProgress: c} = i, u, f, d, h, x;
        function y() {
            h && h(),
            x && x(),
            i.cancelToken && i.cancelToken.unsubscribe(u),
            i.signal && i.signal.removeEventListener("abort", u)
        }
        let m = new XMLHttpRequest;
        m.open(i.method.toUpperCase(), i.url, !0),
        m.timeout = i.timeout;
        function E() {
            if (!m)
                return;
            const p = $i.from("getAllResponseHeaders"in m && m.getAllResponseHeaders())
              , _ = {
                data: !a || a === "text" || a === "json" ? m.responseText : m.response,
                status: m.status,
                statusText: m.statusText,
                headers: p,
                config: t,
                request: m
            };
            Tk(function(C) {
                r(C),
                y()
            }, function(C) {
                n(C),
                y()
            }, _),
            m = null
        }
        "onloadend"in m ? m.onloadend = E : m.onreadystatechange = function() {
            !m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(E)
        }
        ,
        m.onabort = function() {
            m && (n(new Ye("Request aborted",Ye.ECONNABORTED,t,m)),
            m = null)
        }
        ,
        m.onerror = function(v) {
            const _ = v && v.message ? v.message : "Network Error"
              , b = new Ye(_,Ye.ERR_NETWORK,t,m);
            b.event = v || null,
            n(b),
            m = null
        }
        ,
        m.ontimeout = function() {
            let v = i.timeout ? "timeout of " + i.timeout + "ms exceeded" : "timeout exceeded";
            const _ = i.transitional || wk;
            i.timeoutErrorMessage && (v = i.timeoutErrorMessage),
            n(new Ye(v,_.clarifyTimeoutError ? Ye.ETIMEDOUT : Ye.ECONNABORTED,t,m)),
            m = null
        }
        ,
        o === void 0 && s.setContentType(null),
        "setRequestHeader"in m && ne.forEach(s.toJSON(), function(v, _) {
            m.setRequestHeader(_, v)
        }),
        ne.isUndefined(i.withCredentials) || (m.withCredentials = !!i.withCredentials),
        a && a !== "json" && (m.responseType = i.responseType),
        c && ([d,x] = Wx(c, !0),
        m.addEventListener("progress", d)),
        l && m.upload && ([f,h] = Wx(l),
        m.upload.addEventListener("progress", f),
        m.upload.addEventListener("loadend", h)),
        (i.cancelToken || i.signal) && (u = p => {
            m && (n(!p || p.type ? new Ru(null,t,m) : p),
            m.abort(),
            m = null)
        }
        ,
        i.cancelToken && i.cancelToken.subscribe(u),
        i.signal && (i.signal.aborted ? u() : i.signal.addEventListener("abort", u)));
        const g = cpe(i.url);
        if (g && Qr.protocols.indexOf(g) === -1) {
            n(new Ye("Unsupported protocol " + g + ":",Ye.ERR_BAD_REQUEST,t));
            return
        }
        m.send(o || null)
    }
    )
}
  , vpe = (t, e) => {
    const {length: r} = t = t ? t.filter(Boolean) : [];
    if (e || r) {
        let n = new AbortController, i;
        const o = function(c) {
            if (!i) {
                i = !0,
                a();
                const u = c instanceof Error ? c : this.reason;
                n.abort(u instanceof Ye ? u : new Ru(u instanceof Error ? u.message : u))
            }
        };
        let s = e && setTimeout( () => {
            s = null,
            o(new Ye(`timeout ${e} of ms exceeded`,Ye.ETIMEDOUT))
        }
        , e);
        const a = () => {
            t && (s && clearTimeout(s),
            s = null,
            t.forEach(c => {
                c.unsubscribe ? c.unsubscribe(o) : c.removeEventListener("abort", o)
            }
            ),
            t = null)
        }
        ;
        t.forEach(c => c.addEventListener("abort", o));
        const {signal: l} = n;
        return l.unsubscribe = () => ne.asap(a),
        l
    }
}
  , ype = vpe
  , Epe = function*(t, e) {
    let r = t.byteLength;
    if (!e || r < e) {
        yield t;
        return
    }
    let n = 0, i;
    for (; n < r; )
        i = n + e,
        yield t.slice(n, i),
        n = i
}
  , _pe = async function*(t, e) {
    for await(const r of bpe(t))
        yield*Epe(r, e)
}
  , bpe = async function*(t) {
    if (t[Symbol.asyncIterator]) {
        yield*t;
        return
    }
    const e = t.getReader();
    try {
        for (; ; ) {
            const {done: r, value: n} = await e.read();
            if (r)
                break;
            yield n
        }
    } finally {
        await e.cancel()
    }
}
  , e4 = (t, e, r, n) => {
    const i = _pe(t, e);
    let o = 0, s, a = l => {
        s || (s = !0,
        n && n(l))
    }
    ;
    return new ReadableStream({
        async pull(l) {
            try {
                const {done: c, value: u} = await i.next();
                if (c) {
                    a(),
                    l.close();
                    return
                }
                let f = u.byteLength;
                if (r) {
                    let d = o += f;
                    r(d)
                }
                l.enqueue(new Uint8Array(u))
            } catch (c) {
                throw a(c),
                c
            }
        },
        cancel(l) {
            return a(l),
            i.return()
        }
    },{
        highWaterMark: 2
    })
}
  , t4 = 64 * 1024
  , {isFunction: Bh} = ne
  , Cpe = ( ({Request: t, Response: e}) => ({
    Request: t,
    Response: e
}))(ne.global)
  , {ReadableStream: r4, TextEncoder: n4} = ne.global
  , i4 = (t, ...e) => {
    try {
        return !!t(...e)
    } catch {
        return !1
    }
}
  , Ape = t => {
    t = ne.merge.call({
        skipUndefined: !0
    }, Cpe, t);
    const {fetch: e, Request: r, Response: n} = t
      , i = e ? Bh(e) : typeof fetch == "function"
      , o = Bh(r)
      , s = Bh(n);
    if (!i)
        return !1;
    const a = i && Bh(r4)
      , l = i && (typeof n4 == "function" ? (x => y => x.encode(y))(new n4) : async x => new Uint8Array(await new r(x).arrayBuffer()))
      , c = o && a && i4( () => {
        let x = !1;
        const y = new r(Qr.origin,{
            body: new r4,
            method: "POST",
            get duplex() {
                return x = !0,
                "half"
            }
        }).headers.has("Content-Type");
        return x && !y
    }
    )
      , u = s && a && i4( () => ne.isReadableStream(new n("").body))
      , f = {
        stream: u && (x => x.body)
    };
    i && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach(x => {
        !f[x] && (f[x] = (y, m) => {
            let E = y && y[x];
            if (E)
                return E.call(y);
            throw new Ye(`Response type '${x}' is not supported`,Ye.ERR_NOT_SUPPORT,m)
        }
        )
    }
    );
    const d = async x => {
        if (x == null)
            return 0;
        if (ne.isBlob(x))
            return x.size;
        if (ne.isSpecCompliantForm(x))
            return (await new r(Qr.origin,{
                method: "POST",
                body: x
            }).arrayBuffer()).byteLength;
        if (ne.isArrayBufferView(x) || ne.isArrayBuffer(x))
            return x.byteLength;
        if (ne.isURLSearchParams(x) && (x = x + ""),
        ne.isString(x))
            return (await l(x)).byteLength
    }
      , h = async (x, y) => {
        const m = ne.toFiniteNumber(x.getContentLength());
        return m ?? d(y)
    }
    ;
    return async x => {
        let {url: y, method: m, data: E, signal: g, cancelToken: p, timeout: v, onDownloadProgress: _, onUploadProgress: b, responseType: C, headers: w, withCredentials: T="same-origin", fetchOptions: A} = Fk(x)
          , B = e || fetch;
        C = C ? (C + "").toLowerCase() : "text";
        let S = ype([g, p && p.toAbortSignal()], v)
          , D = null;
        const F = S && S.unsubscribe && ( () => {
            S.unsubscribe()
        }
        );
        let R;
        try {
            if (b && c && m !== "get" && m !== "head" && (R = await h(w, E)) !== 0) {
                let U = new r(y,{
                    method: "POST",
                    body: E,
                    duplex: "half"
                }), $;
                if (ne.isFormData(E) && ($ = U.headers.get("content-type")) && w.setContentType($),
                U.body) {
                    const [V,W] = Z3(R, Wx(J3(b)));
                    E = e4(U.body, t4, V, W)
                }
            }
            ne.isString(T) || (T = T ? "include" : "omit");
            const P = o && "credentials"in r.prototype
              , N = {
                ...A,
                signal: S,
                method: m.toUpperCase(),
                headers: w.normalize().toJSON(),
                body: E,
                duplex: "half",
                credentials: P ? T : void 0
            };
            D = o && new r(y,N);
            let j = await (o ? B(D, A) : B(y, N));
            const K = u && (C === "stream" || C === "response");
            if (u && (_ || K && F)) {
                const U = {};
                ["status", "statusText", "headers"].forEach(H => {
                    U[H] = j[H]
                }
                );
                const $ = ne.toFiniteNumber(j.headers.get("content-length"))
                  , [V,W] = _ && Z3($, Wx(J3(_), !0)) || [];
                j = new n(e4(j.body, t4, V, () => {
                    W && W(),
                    F && F()
                }
                ),U)
            }
            C = C || "text";
            let oe = await f[ne.findKey(f, C) || "text"](j, x);
            return !K && F && F(),
            await new Promise( (U, $) => {
                Tk(U, $, {
                    data: oe,
                    headers: $i.from(j.headers),
                    status: j.status,
                    statusText: j.statusText,
                    config: x,
                    request: D
                })
            }
            )
        } catch (P) {
            throw F && F(),
            P && P.name === "TypeError" && /Load failed|fetch/i.test(P.message) ? Object.assign(new Ye("Network Error",Ye.ERR_NETWORK,x,D), {
                cause: P.cause || P
            }) : Ye.from(P, P && P.code, x, D)
        }
    }
}
  , wpe = new Map
  , Pk = t => {
    let e = t && t.env || {};
    const {fetch: r, Request: n, Response: i} = e
      , o = [n, i, r];
    let s = o.length, a = s, l, c, u = wpe;
    for (; a--; )
        l = o[a],
        c = u.get(l),
        c === void 0 && u.set(l, c = a ? new Map : Ape(e)),
        u = c;
    return c
}
;
Pk();
const tC = {
    http: Uxe,
    xhr: mpe,
    fetch: {
        get: Pk
    }
};
ne.forEach(tC, (t, e) => {
    if (t) {
        try {
            Object.defineProperty(t, "name", {
                value: e
            })
        } catch {}
        Object.defineProperty(t, "adapterName", {
            value: e
        })
    }
}
);
const o4 = t => `- ${t}`
  , Bpe = t => ne.isFunction(t) || t === null || t === !1;
function Spe(t, e) {
    t = ne.isArray(t) ? t : [t];
    const {length: r} = t;
    let n, i;
    const o = {};
    for (let s = 0; s < r; s++) {
        n = t[s];
        let a;
        if (i = n,
        !Bpe(n) && (i = tC[(a = String(n)).toLowerCase()],
        i === void 0))
            throw new Ye(`Unknown adapter '${a}'`);
        if (i && (ne.isFunction(i) || (i = i.get(e))))
            break;
        o[a || "#" + s] = i
    }
    if (!i) {
        const s = Object.entries(o).map( ([l,c]) => `adapter ${l} ` + (c === !1 ? "is not supported by the environment" : "is not available in the build"));
        let a = r ? s.length > 1 ? `since :
` + s.map(o4).join(`
`) : " " + o4(s[0]) : "as no adapter specified";
        throw new Ye("There is no suitable adapter to dispatch the request " + a,"ERR_NOT_SUPPORT")
    }
    return i
}
const Ik = {
    getAdapter: Spe,
    adapters: tC
};
function ym(t) {
    if (t.cancelToken && t.cancelToken.throwIfRequested(),
    t.signal && t.signal.aborted)
        throw new Ru(null,t)
}
function s4(t) {
    return ym(t),
    t.headers = $i.from(t.headers),
    t.data = vm.call(t, t.transformRequest),
    ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1),
    Ik.getAdapter(t.adapter || eC.adapter, t)(t).then(function(n) {
        return ym(t),
        n.data = vm.call(t, t.transformResponse, n),
        n.headers = $i.from(n.headers),
        n
    }, function(n) {
        return Sk(n) || (ym(t),
        n && n.response && (n.response.data = vm.call(t, t.transformResponse, n.response),
        n.response.headers = $i.from(n.response.headers))),
        Promise.reject(n)
    })
}
const Ok = "1.13.2"
  , T1 = {};
["object", "boolean", "number", "function", "string", "symbol"].forEach( (t, e) => {
    T1[t] = function(n) {
        return typeof n === t || "a" + (e < 1 ? "n " : " ") + t
    }
}
);
const a4 = {};
T1.transitional = function(e, r, n) {
    function i(o, s) {
        return "[Axios v" + Ok + "] Transitional option '" + o + "'" + s + (n ? ". " + n : "")
    }
    return (o, s, a) => {
        if (e === !1)
            throw new Ye(i(s, " has been removed" + (r ? " in " + r : "")),Ye.ERR_DEPRECATED);
        return r && !a4[s] && (a4[s] = !0,
        console.warn(i(s, " has been deprecated since v" + r + " and will be removed in the near future"))),
        e ? e(o, s, a) : !0
    }
}
;
T1.spelling = function(e) {
    return (r, n) => (console.warn(`${n} is likely a misspelling of ${e}`),
    !0)
}
;
function Tpe(t, e, r) {
    if (typeof t != "object")
        throw new Ye("options must be an object",Ye.ERR_BAD_OPTION_VALUE);
    const n = Object.keys(t);
    let i = n.length;
    for (; i-- > 0; ) {
        const o = n[i]
          , s = e[o];
        if (s) {
            const a = t[o]
              , l = a === void 0 || s(a, o, t);
            if (l !== !0)
                throw new Ye("option " + o + " must be " + l,Ye.ERR_BAD_OPTION_VALUE);
            continue
        }
        if (r !== !0)
            throw new Ye("Unknown option " + o,Ye.ERR_BAD_OPTION)
    }
}
const nx = {
    assertOptions: Tpe,
    validators: T1
}
  , Qi = nx.validators;
class Yx {
    constructor(e) {
        this.defaults = e || {},
        this.interceptors = {
            request: new K3,
            response: new K3
        }
    }
    async request(e, r) {
        try {
            return await this._request(e, r)
        } catch (n) {
            if (n instanceof Error) {
                let i = {};
                Error.captureStackTrace ? Error.captureStackTrace(i) : i = new Error;
                const o = i.stack ? i.stack.replace(/^.+\n/, "") : "";
                try {
                    n.stack ? o && !String(n.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (n.stack += `
` + o) : n.stack = o
                } catch {}
            }
            throw n
        }
    }
    _request(e, r) {
        typeof e == "string" ? (r = r || {},
        r.url = e) : r = e || {},
        r = Dl(this.defaults, r);
        const {transitional: n, paramsSerializer: i, headers: o} = r;
        n !== void 0 && nx.assertOptions(n, {
            silentJSONParsing: Qi.transitional(Qi.boolean),
            forcedJSONParsing: Qi.transitional(Qi.boolean),
            clarifyTimeoutError: Qi.transitional(Qi.boolean)
        }, !1),
        i != null && (ne.isFunction(i) ? r.paramsSerializer = {
            serialize: i
        } : nx.assertOptions(i, {
            encode: Qi.function,
            serialize: Qi.function
        }, !0)),
        r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0),
        nx.assertOptions(r, {
            baseUrl: Qi.spelling("baseURL"),
            withXsrfToken: Qi.spelling("withXSRFToken")
        }, !0),
        r.method = (r.method || this.defaults.method || "get").toLowerCase();
        let s = o && ne.merge(o.common, o[r.method]);
        o && ne.forEach(["delete", "get", "head", "post", "put", "patch", "common"], x => {
            delete o[x]
        }
        ),
        r.headers = $i.concat(s, o);
        const a = [];
        let l = !0;
        this.interceptors.request.forEach(function(y) {
            typeof y.runWhen == "function" && y.runWhen(r) === !1 || (l = l && y.synchronous,
            a.unshift(y.fulfilled, y.rejected))
        });
        const c = [];
        this.interceptors.response.forEach(function(y) {
            c.push(y.fulfilled, y.rejected)
        });
        let u, f = 0, d;
        if (!l) {
            const x = [s4.bind(this), void 0];
            for (x.unshift(...a),
            x.push(...c),
            d = x.length,
            u = Promise.resolve(r); f < d; )
                u = u.then(x[f++], x[f++]);
            return u
        }
        d = a.length;
        let h = r;
        for (; f < d; ) {
            const x = a[f++]
              , y = a[f++];
            try {
                h = x(h)
            } catch (m) {
                y.call(this, m);
                break
            }
        }
        try {
            u = s4.call(this, h)
        } catch (x) {
            return Promise.reject(x)
        }
        for (f = 0,
        d = c.length; f < d; )
            u = u.then(c[f++], c[f++]);
        return u
    }
    getUri(e) {
        e = Dl(this.defaults, e);
        const r = Dk(e.baseURL, e.url, e.allowAbsoluteUrls);
        return Ak(r, e.params, e.paramsSerializer)
    }
}
ne.forEach(["delete", "get", "head", "options"], function(e) {
    Yx.prototype[e] = function(r, n) {
        return this.request(Dl(n || {}, {
            method: e,
            url: r,
            data: (n || {}).data
        }))
    }
});
ne.forEach(["post", "put", "patch"], function(e) {
    function r(n) {
        return function(o, s, a) {
            return this.request(Dl(a || {}, {
                method: e,
                headers: n ? {
                    "Content-Type": "multipart/form-data"
                } : {},
                url: o,
                data: s
            }))
        }
    }
    Yx.prototype[e] = r(),
    Yx.prototype[e + "Form"] = r(!0)
});
const ix = Yx;
class rC {
    constructor(e) {
        if (typeof e != "function")
            throw new TypeError("executor must be a function.");
        let r;
        this.promise = new Promise(function(o) {
            r = o
        }
        );
        const n = this;
        this.promise.then(i => {
            if (!n._listeners)
                return;
            let o = n._listeners.length;
            for (; o-- > 0; )
                n._listeners[o](i);
            n._listeners = null
        }
        ),
        this.promise.then = i => {
            let o;
            const s = new Promise(a => {
                n.subscribe(a),
                o = a
            }
            ).then(i);
            return s.cancel = function() {
                n.unsubscribe(o)
            }
            ,
            s
        }
        ,
        e(function(o, s, a) {
            n.reason || (n.reason = new Ru(o,s,a),
            r(n.reason))
        })
    }
    throwIfRequested() {
        if (this.reason)
            throw this.reason
    }
    subscribe(e) {
        if (this.reason) {
            e(this.reason);
            return
        }
        this._listeners ? this._listeners.push(e) : this._listeners = [e]
    }
    unsubscribe(e) {
        if (!this._listeners)
            return;
        const r = this._listeners.indexOf(e);
        r !== -1 && this._listeners.splice(r, 1)
    }
    toAbortSignal() {
        const e = new AbortController
          , r = n => {
            e.abort(n)
        }
        ;
        return this.subscribe(r),
        e.signal.unsubscribe = () => this.unsubscribe(r),
        e.signal
    }
    static source() {
        let e;
        return {
            token: new rC(function(i) {
                e = i
            }
            ),
            cancel: e
        }
    }
}
const Dpe = rC;
function Fpe(t) {
    return function(r) {
        return t.apply(null, r)
    }
}
function Ppe(t) {
    return ne.isObject(t) && t.isAxiosError === !0
}
const DE = {
    Continue: 100,
    SwitchingProtocols: 101,
    Processing: 102,
    EarlyHints: 103,
    Ok: 200,
    Created: 201,
    Accepted: 202,
    NonAuthoritativeInformation: 203,
    NoContent: 204,
    ResetContent: 205,
    PartialContent: 206,
    MultiStatus: 207,
    AlreadyReported: 208,
    ImUsed: 226,
    MultipleChoices: 300,
    MovedPermanently: 301,
    Found: 302,
    SeeOther: 303,
    NotModified: 304,
    UseProxy: 305,
    Unused: 306,
    TemporaryRedirect: 307,
    PermanentRedirect: 308,
    BadRequest: 400,
    Unauthorized: 401,
    PaymentRequired: 402,
    Forbidden: 403,
    NotFound: 404,
    MethodNotAllowed: 405,
    NotAcceptable: 406,
    ProxyAuthenticationRequired: 407,
    RequestTimeout: 408,
    Conflict: 409,
    Gone: 410,
    LengthRequired: 411,
    PreconditionFailed: 412,
    PayloadTooLarge: 413,
    UriTooLong: 414,
    UnsupportedMediaType: 415,
    RangeNotSatisfiable: 416,
    ExpectationFailed: 417,
    ImATeapot: 418,
    MisdirectedRequest: 421,
    UnprocessableEntity: 422,
    Locked: 423,
    FailedDependency: 424,
    TooEarly: 425,
    UpgradeRequired: 426,
    PreconditionRequired: 428,
    TooManyRequests: 429,
    RequestHeaderFieldsTooLarge: 431,
    UnavailableForLegalReasons: 451,
    InternalServerError: 500,
    NotImplemented: 501,
    BadGateway: 502,
    ServiceUnavailable: 503,
    GatewayTimeout: 504,
    HttpVersionNotSupported: 505,
    VariantAlsoNegotiates: 506,
    InsufficientStorage: 507,
    LoopDetected: 508,
    NotExtended: 510,
    NetworkAuthenticationRequired: 511,
    WebServerIsDown: 521,
    ConnectionTimedOut: 522,
    OriginIsUnreachable: 523,
    TimeoutOccurred: 524,
    SslHandshakeFailed: 525,
    InvalidSslCertificate: 526
};
Object.entries(DE).forEach( ([t,e]) => {
    DE[e] = t
}
);
const Ipe = DE;
function kk(t) {
    const e = new ix(t)
      , r = dk(ix.prototype.request, e);
    return ne.extend(r, ix.prototype, e, {
        allOwnKeys: !0
    }),
    ne.extend(r, e, null, {
        allOwnKeys: !0
    }),
    r.create = function(i) {
        return kk(Dl(t, i))
    }
    ,
    r
}
const pr = kk(eC);
pr.Axios = ix;
pr.CanceledError = Ru;
pr.CancelToken = Dpe;
pr.isCancel = Sk;
pr.VERSION = Ok;
pr.toFormData = B1;
pr.AxiosError = Ye;
pr.Cancel = pr.CanceledError;
pr.all = function(e) {
    return Promise.all(e)
}
;
pr.spread = Fpe;
pr.isAxiosError = Ppe;
pr.mergeConfig = Dl;
pr.AxiosHeaders = $i;
pr.formToJSON = t => Bk(ne.isHTMLForm(t) ? new FormData(t) : t);
pr.getAdapter = Ik.getAdapter;
pr.HttpStatusCode = Ipe;
pr.default = pr;
const f5e = pr;
var Rk = {
    exports: {}
};
(function(t, e) {
    (function(r, n) {
        t.exports = n()
    }
    )(er, function() {
        return function(r, n, i) {
            r = r || {};
            var o = n.prototype
              , s = {
                future: "in %s",
                past: "%s ago",
                s: "a few seconds",
                m: "a minute",
                mm: "%d minutes",
                h: "an hour",
                hh: "%d hours",
                d: "a day",
                dd: "%d days",
                M: "a month",
                MM: "%d months",
                y: "a year",
                yy: "%d years"
            };
            function a(c, u, f, d) {
                return o.fromToBase(c, u, f, d)
            }
            i.en.relativeTime = s,
            o.fromToBase = function(c, u, f, d, h) {
                for (var x, y, m, E = f.$locale().relativeTime || s, g = r.thresholds || [{
                    l: "s",
                    r: 44,
                    d: "second"
                }, {
                    l: "m",
                    r: 89
                }, {
                    l: "mm",
                    r: 44,
                    d: "minute"
                }, {
                    l: "h",
                    r: 89
                }, {
                    l: "hh",
                    r: 21,
                    d: "hour"
                }, {
                    l: "d",
                    r: 35
                }, {
                    l: "dd",
                    r: 25,
                    d: "day"
                }, {
                    l: "M",
                    r: 45
                }, {
                    l: "MM",
                    r: 10,
                    d: "month"
                }, {
                    l: "y",
                    r: 17
                }, {
                    l: "yy",
                    d: "year"
                }], p = g.length, v = 0; v < p; v += 1) {
                    var _ = g[v];
                    _.d && (x = d ? i(c).diff(f, _.d, !0) : f.diff(c, _.d, !0));
                    var b = (r.rounding || Math.round)(Math.abs(x));
                    if (m = x > 0,
                    b <= _.r || !_.r) {
                        b <= 1 && v > 0 && (_ = g[v - 1]);
                        var C = E[_.l];
                        h && (b = h("" + b)),
                        y = typeof C == "string" ? C.replace("%d", b) : C(b, u, _.l, m);
                        break
                    }
                }
                if (u)
                    return y;
                var w = m ? E.future : E.past;
                return typeof w == "function" ? w(y) : w.replace("%s", y)
            }
            ,
            o.to = function(c, u) {
                return a(c, u, this, !0)
            }
            ,
            o.from = function(c, u) {
                return a(c, u, this)
            }
            ;
            var l = function(c) {
                return c.$u ? i.utc() : i()
            };
            o.toNow = function(c) {
                return this.to(l(this), c)
            }
            ,
            o.fromNow = function(c) {
                return this.from(l(this), c)
            }
        }
    })
}
)(Rk);
var Ope = Rk.exports;
const d5e = Vi(Ope);
var kpe = {
    exports: {}
};
(function(t, e) {
    (function(r, n) {
        t.exports = n(F2)
    }
    )(er, function(r) {
        function n(s) {
            return s && typeof s == "object" && "default"in s ? s : {
                default: s
            }
        }
        var i = n(r)
          , o = {
            name: "zh-cn",
            weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
            weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"),
            weekdaysMin: "日_一_二_三_四_五_六".split("_"),
            months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
            monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
            ordinal: function(s, a) {
                return a === "W" ? s + "周" : s + "日"
            },
            weekStart: 1,
            yearStart: 4,
            formats: {
                LT: "HH:mm",
                LTS: "HH:mm:ss",
                L: "YYYY/MM/DD",
                LL: "YYYY年M月D日",
                LLL: "YYYY年M月D日Ah点mm分",
                LLLL: "YYYY年M月D日ddddAh点mm分",
                l: "YYYY/M/D",
                ll: "YYYY年M月D日",
                lll: "YYYY年M月D日 HH:mm",
                llll: "YYYY年M月D日dddd HH:mm"
            },
            relativeTime: {
                future: "%s内",
                past: "%s前",
                s: "几秒",
                m: "1 分钟",
                mm: "%d 分钟",
                h: "1 小时",
                hh: "%d 小时",
                d: "1 天",
                dd: "%d 天",
                M: "1 个月",
                MM: "%d 个月",
                y: "1 年",
                yy: "%d 年"
            },
            meridiem: function(s, a) {
                var l = 100 * s + a;
                return l < 600 ? "凌晨" : l < 900 ? "早上" : l < 1100 ? "上午" : l < 1300 ? "中午" : l < 1800 ? "下午" : "晚上"
            }
        };
        return i.default.locale(o, null, !0),
        o
    })
}
)(kpe);
var Rpe = {
    exports: {}
};
(function(t, e) {
    (function(r, n) {
        t.exports = n(F2)
    }
    )(er, function(r) {
        function n(s) {
            return s && typeof s == "object" && "default"in s ? s : {
                default: s
            }
        }
        var i = n(r)
          , o = {
            name: "zh-tw",
            weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
            weekdaysShort: "週日_週一_週二_週三_週四_週五_週六".split("_"),
            weekdaysMin: "日_一_二_三_四_五_六".split("_"),
            months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
            monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
            ordinal: function(s, a) {
                return a === "W" ? s + "週" : s + "日"
            },
            formats: {
                LT: "HH:mm",
                LTS: "HH:mm:ss",
                L: "YYYY/MM/DD",
                LL: "YYYY年M月D日",
                LLL: "YYYY年M月D日 HH:mm",
                LLLL: "YYYY年M月D日dddd HH:mm",
                l: "YYYY/M/D",
                ll: "YYYY年M月D日",
                lll: "YYYY年M月D日 HH:mm",
                llll: "YYYY年M月D日dddd HH:mm"
            },
            relativeTime: {
                future: "%s內",
                past: "%s前",
                s: "幾秒",
                m: "1 分鐘",
                mm: "%d 分鐘",
                h: "1 小時",
                hh: "%d 小時",
                d: "1 天",
                dd: "%d 天",
                M: "1 個月",
                MM: "%d 個月",
                y: "1 年",
                yy: "%d 年"
            },
            meridiem: function(s, a) {
                var l = 100 * s + a;
                return l < 600 ? "凌晨" : l < 900 ? "早上" : l < 1100 ? "上午" : l < 1300 ? "中午" : l < 1800 ? "下午" : "晚上"
            }
        };
        return i.default.locale(o, null, !0),
        o
    })
}
)(Rpe);
var Mpe = {
    exports: {}
};
(function(t, e) {
    (function(r, n) {
        t.exports = n()
    }
    )(er, function() {
        return {
            name: "en",
            weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
            months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
            ordinal: function(r) {
                var n = ["th", "st", "nd", "rd"]
                  , i = r % 100;
                return "[" + r + (n[(i - 20) % 10] || n[i] || n[0]) + "]"
            }
        }
    })
}
)(Mpe);
const Mk = new Proxy({},{
    get(t, e) {
        throw new Error(`Module "" has been externalized for browser compatibility. Cannot access ".${e}" in client code.  See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`)
    }
})
  , Npe = Object.freeze(Object.defineProperty({
    __proto__: null,
    default: Mk
}, Symbol.toStringTag, {
    value: "Module"
}));
var FE = null;
function Lpe(t) {
    try {
        return crypto.getRandomValues(new Uint8Array(t))
    } catch {}
    try {
        return Mk.randomBytes(t)
    } catch {}
    if (!FE)
        throw Error("Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative");
    return FE(t)
}
function $pe(t) {
    FE = t
}
function nC(t, e) {
    if (t = t || iC,
    typeof t != "number")
        throw Error("Illegal arguments: " + typeof t + ", " + typeof e);
    t < 4 ? t = 4 : t > 31 && (t = 31);
    var r = [];
    return r.push("$2b$"),
    t < 10 && r.push("0"),
    r.push(t.toString()),
    r.push("$"),
    r.push(Xx(Lpe(Pf), Pf)),
    r.join("")
}
function Nk(t, e, r) {
    if (typeof e == "function" && (r = e,
    e = void 0),
    typeof t == "function" && (r = t,
    t = void 0),
    typeof t > "u")
        t = iC;
    else if (typeof t != "number")
        throw Error("illegal arguments: " + typeof t);
    function n(i) {
        Mi(function() {
            try {
                i(null, nC(t))
            } catch (o) {
                i(o)
            }
        })
    }
    if (r) {
        if (typeof r != "function")
            throw Error("Illegal callback: " + typeof r);
        n(r)
    } else
        return new Promise(function(i, o) {
            n(function(s, a) {
                if (s) {
                    o(s);
                    return
                }
                i(a)
            })
        }
        )
}
function Lk(t, e) {
    if (typeof e > "u" && (e = iC),
    typeof e == "number" && (e = nC(e)),
    typeof t != "string" || typeof e != "string")
        throw Error("Illegal arguments: " + typeof t + ", " + typeof e);
    return PE(t, e)
}
function $k(t, e, r, n) {
    function i(o) {
        typeof t == "string" && typeof e == "number" ? Nk(e, function(s, a) {
            PE(t, a, o, n)
        }) : typeof t == "string" && typeof e == "string" ? PE(t, e, o, n) : Mi(o.bind(this, Error("Illegal arguments: " + typeof t + ", " + typeof e)))
    }
    if (r) {
        if (typeof r != "function")
            throw Error("Illegal callback: " + typeof r);
        i(r)
    } else
        return new Promise(function(o, s) {
            i(function(a, l) {
                if (a) {
                    s(a);
                    return
                }
                o(l)
            })
        }
        )
}
function Uk(t, e) {
    for (var r = t.length ^ e.length, n = 0; n < t.length; ++n)
        r |= t.charCodeAt(n) ^ e.charCodeAt(n);
    return r === 0
}
function Upe(t, e) {
    if (typeof t != "string" || typeof e != "string")
        throw Error("Illegal arguments: " + typeof t + ", " + typeof e);
    return e.length !== 60 ? !1 : Uk(Lk(t, e.substring(0, e.length - 31)), e)
}
function Gpe(t, e, r, n) {
    function i(o) {
        if (typeof t != "string" || typeof e != "string") {
            Mi(o.bind(this, Error("Illegal arguments: " + typeof t + ", " + typeof e)));
            return
        }
        if (e.length !== 60) {
            Mi(o.bind(this, null, !1));
            return
        }
        $k(t, e.substring(0, 29), function(s, a) {
            s ? o(s) : o(null, Uk(a, e))
        }, n)
    }
    if (r) {
        if (typeof r != "function")
            throw Error("Illegal callback: " + typeof r);
        i(r)
    } else
        return new Promise(function(o, s) {
            i(function(a, l) {
                if (a) {
                    s(a);
                    return
                }
                o(l)
            })
        }
        )
}
function Hpe(t) {
    if (typeof t != "string")
        throw Error("Illegal arguments: " + typeof t);
    return parseInt(t.split("$")[2], 10)
}
function Vpe(t) {
    if (typeof t != "string")
        throw Error("Illegal arguments: " + typeof t);
    if (t.length !== 60)
        throw Error("Illegal hash length: " + t.length + " != 60");
    return t.substring(0, 29)
}
function zpe(t) {
    if (typeof t != "string")
        throw Error("Illegal arguments: " + typeof t);
    return Gk(t) > 72
}
var Mi = typeof setImmediate == "function" ? setImmediate : typeof scheduler == "object" && typeof scheduler.postTask == "function" ? scheduler.postTask.bind(scheduler) : setTimeout;
function Gk(t) {
    for (var e = 0, r = 0, n = 0; n < t.length; ++n)
        r = t.charCodeAt(n),
        r < 128 ? e += 1 : r < 2048 ? e += 2 : (r & 64512) === 55296 && (t.charCodeAt(n + 1) & 64512) === 56320 ? (++n,
        e += 4) : e += 3;
    return e
}
function jpe(t) {
    for (var e = 0, r, n, i = new Array(Gk(t)), o = 0, s = t.length; o < s; ++o)
        r = t.charCodeAt(o),
        r < 128 ? i[e++] = r : r < 2048 ? (i[e++] = r >> 6 | 192,
        i[e++] = r & 63 | 128) : (r & 64512) === 55296 && ((n = t.charCodeAt(o + 1)) & 64512) === 56320 ? (r = 65536 + ((r & 1023) << 10) + (n & 1023),
        ++o,
        i[e++] = r >> 18 | 240,
        i[e++] = r >> 12 & 63 | 128,
        i[e++] = r >> 6 & 63 | 128,
        i[e++] = r & 63 | 128) : (i[e++] = r >> 12 | 224,
        i[e++] = r >> 6 & 63 | 128,
        i[e++] = r & 63 | 128);
    return i
}
var hc = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split("")
  , Is = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, -1, -1, -1, -1, -1, -1, -1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, -1, -1, -1, -1];
function Xx(t, e) {
    var r = 0, n = [], i, o;
    if (e <= 0 || e > t.length)
        throw Error("Illegal len: " + e);
    for (; r < e; ) {
        if (i = t[r++] & 255,
        n.push(hc[i >> 2 & 63]),
        i = (i & 3) << 4,
        r >= e) {
            n.push(hc[i & 63]);
            break
        }
        if (o = t[r++] & 255,
        i |= o >> 4 & 15,
        n.push(hc[i & 63]),
        i = (o & 15) << 2,
        r >= e) {
            n.push(hc[i & 63]);
            break
        }
        o = t[r++] & 255,
        i |= o >> 6 & 3,
        n.push(hc[i & 63]),
        n.push(hc[o & 63])
    }
    return n.join("")
}
function Hk(t, e) {
    var r = 0, n = t.length, i = 0, o = [], s, a, l, c, u, f;
    if (e <= 0)
        throw Error("Illegal len: " + e);
    for (; r < n - 1 && i < e && (f = t.charCodeAt(r++),
    s = f < Is.length ? Is[f] : -1,
    f = t.charCodeAt(r++),
    a = f < Is.length ? Is[f] : -1,
    !(s == -1 || a == -1 || (u = s << 2 >>> 0,
    u |= (a & 48) >> 4,
    o.push(String.fromCharCode(u)),
    ++i >= e || r >= n) || (f = t.charCodeAt(r++),
    l = f < Is.length ? Is[f] : -1,
    l == -1) || (u = (a & 15) << 4 >>> 0,
    u |= (l & 60) >> 2,
    o.push(String.fromCharCode(u)),
    ++i >= e || r >= n))); )
        f = t.charCodeAt(r++),
        c = f < Is.length ? Is[f] : -1,
        u = (l & 3) << 6 >>> 0,
        u |= c,
        o.push(String.fromCharCode(u)),
        ++i;
    var d = [];
    for (r = 0; r < i; r++)
        d.push(o[r].charCodeAt(0));
    return d
}
var Pf = 16
  , iC = 10
  , Wpe = 16
  , Ype = 100
  , l4 = [608135816, 2242054355, 320440878, 57701188, 2752067618, 698298832, 137296536, 3964562569, 1160258022, 953160567, 3193202383, 887688300, 3232508343, 3380367581, 1065670069, 3041331479, 2450970073, 2306472731]
  , c4 = [3509652390, 2564797868, 805139163, 3491422135, 3101798381, 1780907670, 3128725573, 4046225305, 614570311, 3012652279, 134345442, 2240740374, 1667834072, 1901547113, 2757295779, 4103290238, 227898511, 1921955416, 1904987480, 2182433518, 2069144605, 3260701109, 2620446009, 720527379, 3318853667, 677414384, 3393288472, 3101374703, 2390351024, 1614419982, 1822297739, 2954791486, 3608508353, 3174124327, 2024746970, 1432378464, 3864339955, 2857741204, 1464375394, 1676153920, 1439316330, 715854006, 3033291828, 289532110, 2706671279, 2087905683, 3018724369, 1668267050, 732546397, 1947742710, 3462151702, 2609353502, 2950085171, 1814351708, 2050118529, 680887927, 999245976, 1800124847, 3300911131, 1713906067, 1641548236, 4213287313, 1216130144, 1575780402, 4018429277, 3917837745, 3693486850, 3949271944, 596196993, 3549867205, 258830323, 2213823033, 772490370, 2760122372, 1774776394, 2652871518, 566650946, 4142492826, 1728879713, 2882767088, 1783734482, 3629395816, 2517608232, 2874225571, 1861159788, 326777828, 3124490320, 2130389656, 2716951837, 967770486, 1724537150, 2185432712, 2364442137, 1164943284, 2105845187, 998989502, 3765401048, 2244026483, 1075463327, 1455516326, 1322494562, 910128902, 469688178, 1117454909, 936433444, 3490320968, 3675253459, 1240580251, 122909385, 2157517691, 634681816, 4142456567, 3825094682, 3061402683, 2540495037, 79693498, 3249098678, 1084186820, 1583128258, 426386531, 1761308591, 1047286709, 322548459, 995290223, 1845252383, 2603652396, 3431023940, 2942221577, 3202600964, 3727903485, 1712269319, 422464435, 3234572375, 1170764815, 3523960633, 3117677531, 1434042557, 442511882, 3600875718, 1076654713, 1738483198, 4213154764, 2393238008, 3677496056, 1014306527, 4251020053, 793779912, 2902807211, 842905082, 4246964064, 1395751752, 1040244610, 2656851899, 3396308128, 445077038, 3742853595, 3577915638, 679411651, 2892444358, 2354009459, 1767581616, 3150600392, 3791627101, 3102740896, 284835224, 4246832056, 1258075500, 768725851, 2589189241, 3069724005, 3532540348, 1274779536, 3789419226, 2764799539, 1660621633, 3471099624, 4011903706, 913787905, 3497959166, 737222580, 2514213453, 2928710040, 3937242737, 1804850592, 3499020752, 2949064160, 2386320175, 2390070455, 2415321851, 4061277028, 2290661394, 2416832540, 1336762016, 1754252060, 3520065937, 3014181293, 791618072, 3188594551, 3933548030, 2332172193, 3852520463, 3043980520, 413987798, 3465142937, 3030929376, 4245938359, 2093235073, 3534596313, 375366246, 2157278981, 2479649556, 555357303, 3870105701, 2008414854, 3344188149, 4221384143, 3956125452, 2067696032, 3594591187, 2921233993, 2428461, 544322398, 577241275, 1471733935, 610547355, 4027169054, 1432588573, 1507829418, 2025931657, 3646575487, 545086370, 48609733, 2200306550, 1653985193, 298326376, 1316178497, 3007786442, 2064951626, 458293330, 2589141269, 3591329599, 3164325604, 727753846, 2179363840, 146436021, 1461446943, 4069977195, 705550613, 3059967265, 3887724982, 4281599278, 3313849956, 1404054877, 2845806497, 146425753, 1854211946, 1266315497, 3048417604, 3681880366, 3289982499, 290971e4, 1235738493, 2632868024, 2414719590, 3970600049, 1771706367, 1449415276, 3266420449, 422970021, 1963543593, 2690192192, 3826793022, 1062508698, 1531092325, 1804592342, 2583117782, 2714934279, 4024971509, 1294809318, 4028980673, 1289560198, 2221992742, 1669523910, 35572830, 157838143, 1052438473, 1016535060, 1802137761, 1753167236, 1386275462, 3080475397, 2857371447, 1040679964, 2145300060, 2390574316, 1461121720, 2956646967, 4031777805, 4028374788, 33600511, 2920084762, 1018524850, 629373528, 3691585981, 3515945977, 2091462646, 2486323059, 586499841, 988145025, 935516892, 3367335476, 2599673255, 2839830854, 265290510, 3972581182, 2759138881, 3795373465, 1005194799, 847297441, 406762289, 1314163512, 1332590856, 1866599683, 4127851711, 750260880, 613907577, 1450815602, 3165620655, 3734664991, 3650291728, 3012275730, 3704569646, 1427272223, 778793252, 1343938022, 2676280711, 2052605720, 1946737175, 3164576444, 3914038668, 3967478842, 3682934266, 1661551462, 3294938066, 4011595847, 840292616, 3712170807, 616741398, 312560963, 711312465, 1351876610, 322626781, 1910503582, 271666773, 2175563734, 1594956187, 70604529, 3617834859, 1007753275, 1495573769, 4069517037, 2549218298, 2663038764, 504708206, 2263041392, 3941167025, 2249088522, 1514023603, 1998579484, 1312622330, 694541497, 2582060303, 2151582166, 1382467621, 776784248, 2618340202, 3323268794, 2497899128, 2784771155, 503983604, 4076293799, 907881277, 423175695, 432175456, 1378068232, 4145222326, 3954048622, 3938656102, 3820766613, 2793130115, 2977904593, 26017576, 3274890735, 3194772133, 1700274565, 1756076034, 4006520079, 3677328699, 720338349, 1533947780, 354530856, 688349552, 3973924725, 1637815568, 332179504, 3949051286, 53804574, 2852348879, 3044236432, 1282449977, 3583942155, 3416972820, 4006381244, 1617046695, 2628476075, 3002303598, 1686838959, 431878346, 2686675385, 1700445008, 1080580658, 1009431731, 832498133, 3223435511, 2605976345, 2271191193, 2516031870, 1648197032, 4164389018, 2548247927, 300782431, 375919233, 238389289, 3353747414, 2531188641, 2019080857, 1475708069, 455242339, 2609103871, 448939670, 3451063019, 1395535956, 2413381860, 1841049896, 1491858159, 885456874, 4264095073, 4001119347, 1565136089, 3898914787, 1108368660, 540939232, 1173283510, 2745871338, 3681308437, 4207628240, 3343053890, 4016749493, 1699691293, 1103962373, 3625875870, 2256883143, 3830138730, 1031889488, 3479347698, 1535977030, 4236805024, 3251091107, 2132092099, 1774941330, 1199868427, 1452454533, 157007616, 2904115357, 342012276, 595725824, 1480756522, 206960106, 497939518, 591360097, 863170706, 2375253569, 3596610801, 1814182875, 2094937945, 3421402208, 1082520231, 3463918190, 2785509508, 435703966, 3908032597, 1641649973, 2842273706, 3305899714, 1510255612, 2148256476, 2655287854, 3276092548, 4258621189, 236887753, 3681803219, 274041037, 1734335097, 3815195456, 3317970021, 1899903192, 1026095262, 4050517792, 356393447, 2410691914, 3873677099, 3682840055, 3913112168, 2491498743, 4132185628, 2489919796, 1091903735, 1979897079, 3170134830, 3567386728, 3557303409, 857797738, 1136121015, 1342202287, 507115054, 2535736646, 337727348, 3213592640, 1301675037, 2528481711, 1895095763, 1721773893, 3216771564, 62756741, 2142006736, 835421444, 2531993523, 1442658625, 3659876326, 2882144922, 676362277, 1392781812, 170690266, 3921047035, 1759253602, 3611846912, 1745797284, 664899054, 1329594018, 3901205900, 3045908486, 2062866102, 2865634940, 3543621612, 3464012697, 1080764994, 553557557, 3656615353, 3996768171, 991055499, 499776247, 1265440854, 648242737, 3940784050, 980351604, 3713745714, 1749149687, 3396870395, 4211799374, 3640570775, 1161844396, 3125318951, 1431517754, 545492359, 4268468663, 3499529547, 1437099964, 2702547544, 3433638243, 2581715763, 2787789398, 1060185593, 1593081372, 2418618748, 4260947970, 69676912, 2159744348, 86519011, 2512459080, 3838209314, 1220612927, 3339683548, 133810670, 1090789135, 1078426020, 1569222167, 845107691, 3583754449, 4072456591, 1091646820, 628848692, 1613405280, 3757631651, 526609435, 236106946, 48312990, 2942717905, 3402727701, 1797494240, 859738849, 992217954, 4005476642, 2243076622, 3870952857, 3732016268, 765654824, 3490871365, 2511836413, 1685915746, 3888969200, 1414112111, 2273134842, 3281911079, 4080962846, 172450625, 2569994100, 980381355, 4109958455, 2819808352, 2716589560, 2568741196, 3681446669, 3329971472, 1835478071, 660984891, 3704678404, 4045999559, 3422617507, 3040415634, 1762651403, 1719377915, 3470491036, 2693910283, 3642056355, 3138596744, 1364962596, 2073328063, 1983633131, 926494387, 3423689081, 2150032023, 4096667949, 1749200295, 3328846651, 309677260, 2016342300, 1779581495, 3079819751, 111262694, 1274766160, 443224088, 298511866, 1025883608, 3806446537, 1145181785, 168956806, 3641502830, 3584813610, 1689216846, 3666258015, 3200248200, 1692713982, 2646376535, 4042768518, 1618508792, 1610833997, 3523052358, 4130873264, 2001055236, 3610705100, 2202168115, 4028541809, 2961195399, 1006657119, 2006996926, 3186142756, 1430667929, 3210227297, 1314452623, 4074634658, 4101304120, 2273951170, 1399257539, 3367210612, 3027628629, 1190975929, 2062231137, 2333990788, 2221543033, 2438960610, 1181637006, 548689776, 2362791313, 3372408396, 3104550113, 3145860560, 296247880, 1970579870, 3078560182, 3769228297, 1714227617, 3291629107, 3898220290, 166772364, 1251581989, 493813264, 448347421, 195405023, 2709975567, 677966185, 3703036547, 1463355134, 2715995803, 1338867538, 1343315457, 2802222074, 2684532164, 233230375, 2599980071, 2000651841, 3277868038, 1638401717, 4028070440, 3237316320, 6314154, 819756386, 300326615, 590932579, 1405279636, 3267499572, 3150704214, 2428286686, 3959192993, 3461946742, 1862657033, 1266418056, 963775037, 2089974820, 2263052895, 1917689273, 448879540, 3550394620, 3981727096, 150775221, 3627908307, 1303187396, 508620638, 2975983352, 2726630617, 1817252668, 1876281319, 1457606340, 908771278, 3720792119, 3617206836, 2455994898, 1729034894, 1080033504, 976866871, 3556439503, 2881648439, 1522871579, 1555064734, 1336096578, 3548522304, 2579274686, 3574697629, 3205460757, 3593280638, 3338716283, 3079412587, 564236357, 2993598910, 1781952180, 1464380207, 3163844217, 3332601554, 1699332808, 1393555694, 1183702653, 3581086237, 1288719814, 691649499, 2847557200, 2895455976, 3193889540, 2717570544, 1781354906, 1676643554, 2592534050, 3230253752, 1126444790, 2770207658, 2633158820, 2210423226, 2615765581, 2414155088, 3127139286, 673620729, 2805611233, 1269405062, 4015350505, 3341807571, 4149409754, 1057255273, 2012875353, 2162469141, 2276492801, 2601117357, 993977747, 3918593370, 2654263191, 753973209, 36408145, 2530585658, 25011837, 3520020182, 2088578344, 530523599, 2918365339, 1524020338, 1518925132, 3760827505, 3759777254, 1202760957, 3985898139, 3906192525, 674977740, 4174734889, 2031300136, 2019492241, 3983892565, 4153806404, 3822280332, 352677332, 2297720250, 60907813, 90501309, 3286998549, 1016092578, 2535922412, 2839152426, 457141659, 509813237, 4120667899, 652014361, 1966332200, 2975202805, 55981186, 2327461051, 676427537, 3255491064, 2882294119, 3433927263, 1307055953, 942726286, 933058658, 2468411793, 3933900994, 4215176142, 1361170020, 2001714738, 2830558078, 3274259782, 1222529897, 1679025792, 2729314320, 3714953764, 1770335741, 151462246, 3013232138, 1682292957, 1483529935, 471910574, 1539241949, 458788160, 3436315007, 1807016891, 3718408830, 978976581, 1043663428, 3165965781, 1927990952, 4200891579, 2372276910, 3208408903, 3533431907, 1412390302, 2931980059, 4132332400, 1947078029, 3881505623, 4168226417, 2941484381, 1077988104, 1320477388, 886195818, 18198404, 3786409e3, 2509781533, 112762804, 3463356488, 1866414978, 891333506, 18488651, 661792760, 1628790961, 3885187036, 3141171499, 876946877, 2693282273, 1372485963, 791857591, 2686433993, 3759982718, 3167212022, 3472953795, 2716379847, 445679433, 3561995674, 3504004811, 3574258232, 54117162, 3331405415, 2381918588, 3769707343, 4154350007, 1140177722, 4074052095, 668550556, 3214352940, 367459370, 261225585, 2610173221, 4209349473, 3468074219, 3265815641, 314222801, 3066103646, 3808782860, 282218597, 3406013506, 3773591054, 379116347, 1285071038, 846784868, 2669647154, 3771962079, 3550491691, 2305946142, 453669953, 1268987020, 3317592352, 3279303384, 3744833421, 2610507566, 3859509063, 266596637, 3847019092, 517658769, 3462560207, 3443424879, 370717030, 4247526661, 2224018117, 4143653529, 4112773975, 2788324899, 2477274417, 1456262402, 2901442914, 1517677493, 1846949527, 2295493580, 3734397586, 2176403920, 1280348187, 1908823572, 3871786941, 846861322, 1172426758, 3287448474, 3383383037, 1655181056, 3139813346, 901632758, 1897031941, 2986607138, 3066810236, 3447102507, 1393639104, 373351379, 950779232, 625454576, 3124240540, 4148612726, 2007998917, 544563296, 2244738638, 2330496472, 2058025392, 1291430526, 424198748, 50039436, 29584100, 3605783033, 2429876329, 2791104160, 1057563949, 3255363231, 3075367218, 3463963227, 1469046755, 985887462]
  , Vk = [1332899944, 1700884034, 1701343084, 1684370003, 1668446532, 1869963892];
function If(t, e, r, n) {
    var i, o = t[e], s = t[e + 1];
    return o ^= r[0],
    i = n[o >>> 24],
    i += n[256 | o >> 16 & 255],
    i ^= n[512 | o >> 8 & 255],
    i += n[768 | o & 255],
    s ^= i ^ r[1],
    i = n[s >>> 24],
    i += n[256 | s >> 16 & 255],
    i ^= n[512 | s >> 8 & 255],
    i += n[768 | s & 255],
    o ^= i ^ r[2],
    i = n[o >>> 24],
    i += n[256 | o >> 16 & 255],
    i ^= n[512 | o >> 8 & 255],
    i += n[768 | o & 255],
    s ^= i ^ r[3],
    i = n[s >>> 24],
    i += n[256 | s >> 16 & 255],
    i ^= n[512 | s >> 8 & 255],
    i += n[768 | s & 255],
    o ^= i ^ r[4],
    i = n[o >>> 24],
    i += n[256 | o >> 16 & 255],
    i ^= n[512 | o >> 8 & 255],
    i += n[768 | o & 255],
    s ^= i ^ r[5],
    i = n[s >>> 24],
    i += n[256 | s >> 16 & 255],
    i ^= n[512 | s >> 8 & 255],
    i += n[768 | s & 255],
    o ^= i ^ r[6],
    i = n[o >>> 24],
    i += n[256 | o >> 16 & 255],
    i ^= n[512 | o >> 8 & 255],
    i += n[768 | o & 255],
    s ^= i ^ r[7],
    i = n[s >>> 24],
    i += n[256 | s >> 16 & 255],
    i ^= n[512 | s >> 8 & 255],
    i += n[768 | s & 255],
    o ^= i ^ r[8],
    i = n[o >>> 24],
    i += n[256 | o >> 16 & 255],
    i ^= n[512 | o >> 8 & 255],
    i += n[768 | o & 255],
    s ^= i ^ r[9],
    i = n[s >>> 24],
    i += n[256 | s >> 16 & 255],
    i ^= n[512 | s >> 8 & 255],
    i += n[768 | s & 255],
    o ^= i ^ r[10],
    i = n[o >>> 24],
    i += n[256 | o >> 16 & 255],
    i ^= n[512 | o >> 8 & 255],
    i += n[768 | o & 255],
    s ^= i ^ r[11],
    i = n[s >>> 24],
    i += n[256 | s >> 16 & 255],
    i ^= n[512 | s >> 8 & 255],
    i += n[768 | s & 255],
    o ^= i ^ r[12],
    i = n[o >>> 24],
    i += n[256 | o >> 16 & 255],
    i ^= n[512 | o >> 8 & 255],
    i += n[768 | o & 255],
    s ^= i ^ r[13],
    i = n[s >>> 24],
    i += n[256 | s >> 16 & 255],
    i ^= n[512 | s >> 8 & 255],
    i += n[768 | s & 255],
    o ^= i ^ r[14],
    i = n[o >>> 24],
    i += n[256 | o >> 16 & 255],
    i ^= n[512 | o >> 8 & 255],
    i += n[768 | o & 255],
    s ^= i ^ r[15],
    i = n[s >>> 24],
    i += n[256 | s >> 16 & 255],
    i ^= n[512 | s >> 8 & 255],
    i += n[768 | s & 255],
    o ^= i ^ r[16],
    t[e] = s ^ r[Wpe + 1],
    t[e + 1] = o,
    t
}
function Cc(t, e) {
    for (var r = 0, n = 0; r < 4; ++r)
        n = n << 8 | t[e] & 255,
        e = (e + 1) % t.length;
    return {
        key: n,
        offp: e
    }
}
function u4(t, e, r) {
    for (var n = 0, i = [0, 0], o = e.length, s = r.length, a, l = 0; l < o; l++)
        a = Cc(t, n),
        n = a.offp,
        e[l] = e[l] ^ a.key;
    for (l = 0; l < o; l += 2)
        i = If(i, 0, e, r),
        e[l] = i[0],
        e[l + 1] = i[1];
    for (l = 0; l < s; l += 2)
        i = If(i, 0, e, r),
        r[l] = i[0],
        r[l + 1] = i[1]
}
function Xpe(t, e, r, n) {
    for (var i = 0, o = [0, 0], s = r.length, a = n.length, l, c = 0; c < s; c++)
        l = Cc(e, i),
        i = l.offp,
        r[c] = r[c] ^ l.key;
    for (i = 0,
    c = 0; c < s; c += 2)
        l = Cc(t, i),
        i = l.offp,
        o[0] ^= l.key,
        l = Cc(t, i),
        i = l.offp,
        o[1] ^= l.key,
        o = If(o, 0, r, n),
        r[c] = o[0],
        r[c + 1] = o[1];
    for (c = 0; c < a; c += 2)
        l = Cc(t, i),
        i = l.offp,
        o[0] ^= l.key,
        l = Cc(t, i),
        i = l.offp,
        o[1] ^= l.key,
        o = If(o, 0, r, n),
        n[c] = o[0],
        n[c + 1] = o[1]
}
function f4(t, e, r, n, i) {
    var o = Vk.slice(), s = o.length, a;
    if (r < 4 || r > 31)
        if (a = Error("Illegal number of rounds (4-31): " + r),
        n) {
            Mi(n.bind(this, a));
            return
        } else
            throw a;
    if (e.length !== Pf)
        if (a = Error("Illegal salt length: " + e.length + " != " + Pf),
        n) {
            Mi(n.bind(this, a));
            return
        } else
            throw a;
    r = 1 << r >>> 0;
    var l, c, u = 0, f;
    typeof Int32Array == "function" ? (l = new Int32Array(l4),
    c = new Int32Array(c4)) : (l = l4.slice(),
    c = c4.slice()),
    Xpe(e, t, l, c);
    function d() {
        if (i && i(u / r),
        u < r)
            for (var x = Date.now(); u < r && (u = u + 1,
            u4(t, l, c),
            u4(e, l, c),
            !(Date.now() - x > Ype)); )
                ;
        else {
            for (u = 0; u < 64; u++)
                for (f = 0; f < s >> 1; f++)
                    If(o, f << 1, l, c);
            var y = [];
            for (u = 0; u < s; u++)
                y.push((o[u] >> 24 & 255) >>> 0),
                y.push((o[u] >> 16 & 255) >>> 0),
                y.push((o[u] >> 8 & 255) >>> 0),
                y.push((o[u] & 255) >>> 0);
            if (n) {
                n(null, y);
                return
            } else
                return y
        }
        n && Mi(d)
    }
    if (typeof n < "u")
        d();
    else
        for (var h; ; )
            if (typeof (h = d()) < "u")
                return h || []
}
function PE(t, e, r, n) {
    var i;
    if (typeof t != "string" || typeof e != "string")
        if (i = Error("Invalid string / salt: Not a string"),
        r) {
            Mi(r.bind(this, i));
            return
        } else
            throw i;
    var o, s;
    if (e.charAt(0) !== "$" || e.charAt(1) !== "2")
        if (i = Error("Invalid salt version: " + e.substring(0, 2)),
        r) {
            Mi(r.bind(this, i));
            return
        } else
            throw i;
    if (e.charAt(2) === "$")
        o = String.fromCharCode(0),
        s = 3;
    else {
        if (o = e.charAt(2),
        o !== "a" && o !== "b" && o !== "y" || e.charAt(3) !== "$")
            if (i = Error("Invalid salt revision: " + e.substring(2, 4)),
            r) {
                Mi(r.bind(this, i));
                return
            } else
                throw i;
        s = 4
    }
    if (e.charAt(s + 2) > "$")
        if (i = Error("Missing salt rounds"),
        r) {
            Mi(r.bind(this, i));
            return
        } else
            throw i;
    var a = parseInt(e.substring(s, s + 1), 10) * 10
      , l = parseInt(e.substring(s + 1, s + 2), 10)
      , c = a + l
      , u = e.substring(s + 3, s + 25);
    t += o >= "a" ? "\0" : "";
    var f = jpe(t)
      , d = Hk(u, Pf);
    function h(x) {
        var y = [];
        return y.push("$2"),
        o >= "a" && y.push(o),
        y.push("$"),
        c < 10 && y.push("0"),
        y.push(c.toString()),
        y.push("$"),
        y.push(Xx(d, d.length)),
        y.push(Xx(x, Vk.length * 4 - 1)),
        y.join("")
    }
    if (typeof r > "u")
        return h(f4(f, d, c));
    f4(f, d, c, function(x, y) {
        x ? r(x, null) : r(null, h(y))
    }, n)
}
function Kpe(t, e) {
    return Xx(t, e)
}
function qpe(t, e) {
    return Hk(t, e)
}
const h5e = {
    setRandomFallback: $pe,
    genSaltSync: nC,
    genSalt: Nk,
    hashSync: Lk,
    hash: $k,
    compareSync: Upe,
    compare: Gpe,
    getRounds: Hpe,
    getSalt: Vpe,
    truncates: zpe,
    encodeBase64: Kpe,
    decodeBase64: qpe
};
/*! Capacitor: https://capacitorjs.com/ - MIT License */
var Fl;
(function(t) {
    t.Unimplemented = "UNIMPLEMENTED",
    t.Unavailable = "UNAVAILABLE"
}
)(Fl || (Fl = {}));
class ox extends Error {
    constructor(e, r, n) {
        super(e),
        this.message = e,
        this.code = r,
        this.data = n
    }
}
const Zpe = t => {
    var e, r;
    return t != null && t.androidBridge ? "android" : !((r = (e = t == null ? void 0 : t.webkit) === null || e === void 0 ? void 0 : e.messageHandlers) === null || r === void 0) && r.bridge ? "ios" : "web"
}
  , Jpe = t => {
    const e = t.CapacitorCustomPlatform || null
      , r = t.Capacitor || {}
      , n = r.Plugins = r.Plugins || {}
      , i = () => e !== null ? e.name : Zpe(t)
      , o = () => i() !== "web"
      , s = f => {
        const d = c.get(f);
        return !!(d != null && d.platforms.has(i()) || a(f))
    }
      , a = f => {
        var d;
        return (d = r.PluginHeaders) === null || d === void 0 ? void 0 : d.find(h => h.name === f)
    }
      , l = f => t.console.error(f)
      , c = new Map
      , u = (f, d={}) => {
        const h = c.get(f);
        if (h)
            return console.warn(`Capacitor plugin "${f}" already registered. Cannot register plugins twice.`),
            h.proxy;
        const x = i()
          , y = a(f);
        let m;
        const E = async () => (!m && x in d ? m = typeof d[x] == "function" ? m = await d[x]() : m = d[x] : e !== null && !m && "web"in d && (m = typeof d.web == "function" ? m = await d.web() : m = d.web),
        m)
          , g = (w, T) => {
            var A, B;
            if (y) {
                const S = y == null ? void 0 : y.methods.find(D => T === D.name);
                if (S)
                    return S.rtype === "promise" ? D => r.nativePromise(f, T.toString(), D) : (D, F) => r.nativeCallback(f, T.toString(), D, F);
                if (w)
                    return (A = w[T]) === null || A === void 0 ? void 0 : A.bind(w)
            } else {
                if (w)
                    return (B = w[T]) === null || B === void 0 ? void 0 : B.bind(w);
                throw new ox(`"${f}" plugin is not implemented on ${x}`,Fl.Unimplemented)
            }
        }
          , p = w => {
            let T;
            const A = (...B) => {
                const S = E().then(D => {
                    const F = g(D, w);
                    if (F) {
                        const R = F(...B);
                        return T = R == null ? void 0 : R.remove,
                        R
                    } else
                        throw new ox(`"${f}.${w}()" is not implemented on ${x}`,Fl.Unimplemented)
                }
                );
                return w === "addListener" && (S.remove = async () => T()),
                S
            }
            ;
            return A.toString = () => `${w.toString()}() { [capacitor code] }`,
            Object.defineProperty(A, "name", {
                value: w,
                writable: !1,
                configurable: !1
            }),
            A
        }
          , v = p("addListener")
          , _ = p("removeListener")
          , b = (w, T) => {
            const A = v({
                eventName: w
            }, T)
              , B = async () => {
                const D = await A;
                _({
                    eventName: w,
                    callbackId: D
                }, T)
            }
              , S = new Promise(D => A.then( () => D({
                remove: B
            })));
            return S.remove = async () => {
                console.warn("Using addListener() without 'await' is deprecated."),
                await B()
            }
            ,
            S
        }
          , C = new Proxy({},{
            get(w, T) {
                switch (T) {
                case "$$typeof":
                    return;
                case "toJSON":
                    return () => ({});
                case "addListener":
                    return y ? b : v;
                case "removeListener":
                    return _;
                default:
                    return p(T)
                }
            }
        });
        return n[f] = C,
        c.set(f, {
            name: f,
            proxy: C,
            platforms: new Set([...Object.keys(d), ...y ? [x] : []])
        }),
        C
    }
    ;
    return r.convertFileSrc || (r.convertFileSrc = f => f),
    r.getPlatform = i,
    r.handleError = l,
    r.isNativePlatform = o,
    r.isPluginAvailable = s,
    r.registerPlugin = u,
    r.Exception = ox,
    r.DEBUG = !!r.DEBUG,
    r.isLoggingEnabled = !!r.isLoggingEnabled,
    r
}
  , Qpe = t => t.Capacitor = Jpe(t)
  , Kx = Qpe(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {})
  , vd = Kx.registerPlugin;
class D1 {
    constructor() {
        this.listeners = {},
        this.retainedEventArguments = {},
        this.windowListeners = {}
    }
    addListener(e, r) {
        let n = !1;
        this.listeners[e] || (this.listeners[e] = [],
        n = !0),
        this.listeners[e].push(r);
        const o = this.windowListeners[e];
        o && !o.registered && this.addWindowListener(o),
        n && this.sendRetainedArgumentsForEvent(e);
        const s = async () => this.removeListener(e, r);
        return Promise.resolve({
            remove: s
        })
    }
    async removeAllListeners() {
        this.listeners = {};
        for (const e in this.windowListeners)
            this.removeWindowListener(this.windowListeners[e]);
        this.windowListeners = {}
    }
    notifyListeners(e, r, n) {
        const i = this.listeners[e];
        if (!i) {
            if (n) {
                let o = this.retainedEventArguments[e];
                o || (o = []),
                o.push(r),
                this.retainedEventArguments[e] = o
            }
            return
        }
        i.forEach(o => o(r))
    }
    hasListeners(e) {
        var r;
        return !!(!((r = this.listeners[e]) === null || r === void 0) && r.length)
    }
    registerWindowListener(e, r) {
        this.windowListeners[r] = {
            registered: !1,
            windowEventName: e,
            pluginEventName: r,
            handler: n => {
                this.notifyListeners(r, n)
            }
        }
    }
    unimplemented(e="not implemented") {
        return new Kx.Exception(e,Fl.Unimplemented)
    }
    unavailable(e="not available") {
        return new Kx.Exception(e,Fl.Unavailable)
    }
    async removeListener(e, r) {
        const n = this.listeners[e];
        if (!n)
            return;
        const i = n.indexOf(r);
        this.listeners[e].splice(i, 1),
        this.listeners[e].length || this.removeWindowListener(this.windowListeners[e])
    }
    addWindowListener(e) {
        window.addEventListener(e.windowEventName, e.handler),
        e.registered = !0
    }
    removeWindowListener(e) {
        e && (window.removeEventListener(e.windowEventName, e.handler),
        e.registered = !1)
    }
    sendRetainedArgumentsForEvent(e) {
        const r = this.retainedEventArguments[e];
        r && (delete this.retainedEventArguments[e],
        r.forEach(n => {
            this.notifyListeners(e, n)
        }
        ))
    }
}
const e1e = vd("WebView")
  , d4 = t => encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape)
  , h4 = t => t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
class t1e extends D1 {
    async getCookies() {
        const e = document.cookie
          , r = {};
        return e.split(";").forEach(n => {
            if (n.length <= 0)
                return;
            let[i,o] = n.replace(/=/, "CAP_COOKIE").split("CAP_COOKIE");
            i = h4(i).trim(),
            o = h4(o).trim(),
            r[i] = o
        }
        ),
        r
    }
    async setCookie(e) {
        try {
            const r = d4(e.key)
              , n = d4(e.value)
              , i = `; expires=${(e.expires || "").replace("expires=", "")}`
              , o = (e.path || "/").replace("path=", "")
              , s = e.url != null && e.url.length > 0 ? `domain=${e.url}` : "";
            document.cookie = `${r}=${n || ""}${i}; path=${o}; ${s};`
        } catch (r) {
            return Promise.reject(r)
        }
    }
    async deleteCookie(e) {
        try {
            document.cookie = `${e.key}=; Max-Age=0`
        } catch (r) {
            return Promise.reject(r)
        }
    }
    async clearCookies() {
        try {
            const e = document.cookie.split(";") || [];
            for (const r of e)
                document.cookie = r.replace(/^ +/, "").replace(/=.*/, `=;expires=${new Date().toUTCString()};path=/`)
        } catch (e) {
            return Promise.reject(e)
        }
    }
    async clearAllCookies() {
        try {
            await this.clearCookies()
        } catch (e) {
            return Promise.reject(e)
        }
    }
}
const r1e = vd("CapacitorCookies", {
    web: () => new t1e
})
  , n1e = async t => new Promise( (e, r) => {
    const n = new FileReader;
    n.onload = () => {
        const i = n.result;
        e(i.indexOf(",") >= 0 ? i.split(",")[1] : i)
    }
    ,
    n.onerror = i => r(i),
    n.readAsDataURL(t)
}
)
  , i1e = (t={}) => {
    const e = Object.keys(t);
    return Object.keys(t).map(i => i.toLocaleLowerCase()).reduce( (i, o, s) => (i[o] = t[e[s]],
    i), {})
}
  , o1e = (t, e=!0) => t ? Object.entries(t).reduce( (n, i) => {
    const [o,s] = i;
    let a, l;
    return Array.isArray(s) ? (l = "",
    s.forEach(c => {
        a = e ? encodeURIComponent(c) : c,
        l += `${o}=${a}&`
    }
    ),
    l.slice(0, -1)) : (a = e ? encodeURIComponent(s) : s,
    l = `${o}=${a}`),
    `${n}&${l}`
}
, "").substr(1) : null
  , zk = (t, e={}) => {
    const r = Object.assign({
        method: t.method || "GET",
        headers: t.headers
    }, e)
      , i = i1e(t.headers)["content-type"] || "";
    if (typeof t.data == "string")
        r.body = t.data;
    else if (i.includes("application/x-www-form-urlencoded")) {
        const o = new URLSearchParams;
        for (const [s,a] of Object.entries(t.data || {}))
            o.set(s, a);
        r.body = o.toString()
    } else if (i.includes("multipart/form-data") || t.data instanceof FormData) {
        const o = new FormData;
        if (t.data instanceof FormData)
            t.data.forEach( (a, l) => {
                o.append(l, a)
            }
            );
        else
            for (const a of Object.keys(t.data))
                o.append(a, t.data[a]);
        r.body = o;
        const s = new Headers(r.headers);
        s.delete("content-type"),
        r.headers = s
    } else
        (i.includes("application/json") || typeof t.data == "object") && (r.body = JSON.stringify(t.data));
    return r
}
;
class s1e extends D1 {
    async request(e) {
        const r = zk(e, e.webFetchExtra)
          , n = o1e(e.params, e.shouldEncodeUrlParams)
          , i = n ? `${e.url}?${n}` : e.url
          , o = await fetch(i, r)
          , s = o.headers.get("content-type") || "";
        let {responseType: a="text"} = o.ok ? e : {};
        s.includes("application/json") && (a = "json");
        let l, c;
        switch (a) {
        case "arraybuffer":
        case "blob":
            c = await o.blob(),
            l = await n1e(c);
            break;
        case "json":
            l = await o.json();
            break;
        case "document":
        case "text":
        default:
            l = await o.text()
        }
        const u = {};
        return o.headers.forEach( (f, d) => {
            u[d] = f
        }
        ),
        {
            data: l,
            headers: u,
            status: o.status,
            url: o.url
        }
    }
    async get(e) {
        return this.request(Object.assign(Object.assign({}, e), {
            method: "GET"
        }))
    }
    async post(e) {
        return this.request(Object.assign(Object.assign({}, e), {
            method: "POST"
        }))
    }
    async put(e) {
        return this.request(Object.assign(Object.assign({}, e), {
            method: "PUT"
        }))
    }
    async patch(e) {
        return this.request(Object.assign(Object.assign({}, e), {
            method: "PATCH"
        }))
    }
    async delete(e) {
        return this.request(Object.assign(Object.assign({}, e), {
            method: "DELETE"
        }))
    }
}
const a1e = vd("CapacitorHttp", {
    web: () => new s1e
})
  , x5e = Object.freeze(Object.defineProperty({
    __proto__: null,
    Capacitor: Kx,
    CapacitorCookies: r1e,
    CapacitorException: ox,
    CapacitorHttp: a1e,
    get ExceptionCode() {
        return Fl
    },
    WebPlugin: D1,
    WebView: e1e,
    buildRequestInit: zk,
    registerPlugin: vd
}, Symbol.toStringTag, {
    value: "Module"
}))
  , p5e = vd("App", {
    web: () => ef( () => Promise.resolve().then( () => P3e), void 0).then(t => new t.AppWeb)
});
$e.add(sle);
$e.mixin(Rn, ale);
$e.add(OP);
$e.add(kP);
$e.add(cI);
$e.mixin(Rn, L0e);
$e.add(lI);
$e.add(GO);
$e.add(Db);
$e.add(zO);
$e.add(WO);
$e.add(YO);
$e.add(ok);
$e.add(ik);
$e.add(ek);
$e.add(nk);
$e.add(tk);
$e.add(QO);
$e.add(JO);
$e.add(xI);
$e.add(hI);
const l1e = Object.freeze(Object.defineProperty({
    __proto__: null
}, Symbol.toStringTag, {
    value: "Module"
}))
  , c1e = Object.freeze(Object.defineProperty({
    __proto__: null
}, Symbol.toStringTag, {
    value: "Module"
}))
  , u1e = () => {}
;
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const jk = function(t) {
    const e = [];
    let r = 0;
    for (let n = 0; n < t.length; n++) {
        let i = t.charCodeAt(n);
        i < 128 ? e[r++] = i : i < 2048 ? (e[r++] = i >> 6 | 192,
        e[r++] = i & 63 | 128) : (i & 64512) === 55296 && n + 1 < t.length && (t.charCodeAt(n + 1) & 64512) === 56320 ? (i = 65536 + ((i & 1023) << 10) + (t.charCodeAt(++n) & 1023),
        e[r++] = i >> 18 | 240,
        e[r++] = i >> 12 & 63 | 128,
        e[r++] = i >> 6 & 63 | 128,
        e[r++] = i & 63 | 128) : (e[r++] = i >> 12 | 224,
        e[r++] = i >> 6 & 63 | 128,
        e[r++] = i & 63 | 128)
    }
    return e
}
  , f1e = function(t) {
    const e = [];
    let r = 0
      , n = 0;
    for (; r < t.length; ) {
        const i = t[r++];
        if (i < 128)
            e[n++] = String.fromCharCode(i);
        else if (i > 191 && i < 224) {
            const o = t[r++];
            e[n++] = String.fromCharCode((i & 31) << 6 | o & 63)
        } else if (i > 239 && i < 365) {
            const o = t[r++]
              , s = t[r++]
              , a = t[r++]
              , l = ((i & 7) << 18 | (o & 63) << 12 | (s & 63) << 6 | a & 63) - 65536;
            e[n++] = String.fromCharCode(55296 + (l >> 10)),
            e[n++] = String.fromCharCode(56320 + (l & 1023))
        } else {
            const o = t[r++]
              , s = t[r++];
            e[n++] = String.fromCharCode((i & 15) << 12 | (o & 63) << 6 | s & 63)
        }
    }
    return e.join("")
}
  , Wk = {
    byteToCharMap_: null,
    charToByteMap_: null,
    byteToCharMapWebSafe_: null,
    charToByteMapWebSafe_: null,
    ENCODED_VALS_BASE: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
    get ENCODED_VALS() {
        return this.ENCODED_VALS_BASE + "+/="
    },
    get ENCODED_VALS_WEBSAFE() {
        return this.ENCODED_VALS_BASE + "-_."
    },
    HAS_NATIVE_SUPPORT: typeof atob == "function",
    encodeByteArray(t, e) {
        if (!Array.isArray(t))
            throw Error("encodeByteArray takes an array as a parameter");
        this.init_();
        const r = e ? this.byteToCharMapWebSafe_ : this.byteToCharMap_
          , n = [];
        for (let i = 0; i < t.length; i += 3) {
            const o = t[i]
              , s = i + 1 < t.length
              , a = s ? t[i + 1] : 0
              , l = i + 2 < t.length
              , c = l ? t[i + 2] : 0
              , u = o >> 2
              , f = (o & 3) << 4 | a >> 4;
            let d = (a & 15) << 2 | c >> 6
              , h = c & 63;
            l || (h = 64,
            s || (d = 64)),
            n.push(r[u], r[f], r[d], r[h])
        }
        return n.join("")
    },
    encodeString(t, e) {
        return this.HAS_NATIVE_SUPPORT && !e ? btoa(t) : this.encodeByteArray(jk(t), e)
    },
    decodeString(t, e) {
        return this.HAS_NATIVE_SUPPORT && !e ? atob(t) : f1e(this.decodeStringToByteArray(t, e))
    },
    decodeStringToByteArray(t, e) {
        this.init_();
        const r = e ? this.charToByteMapWebSafe_ : this.charToByteMap_
          , n = [];
        for (let i = 0; i < t.length; ) {
            const o = r[t.charAt(i++)]
              , a = i < t.length ? r[t.charAt(i)] : 0;
            ++i;
            const c = i < t.length ? r[t.charAt(i)] : 64;
            ++i;
            const f = i < t.length ? r[t.charAt(i)] : 64;
            if (++i,
            o == null || a == null || c == null || f == null)
                throw new d1e;
            const d = o << 2 | a >> 4;
            if (n.push(d),
            c !== 64) {
                const h = a << 4 & 240 | c >> 2;
                if (n.push(h),
                f !== 64) {
                    const x = c << 6 & 192 | f;
                    n.push(x)
                }
            }
        }
        return n
    },
    init_() {
        if (!this.byteToCharMap_) {
            this.byteToCharMap_ = {},
            this.charToByteMap_ = {},
            this.byteToCharMapWebSafe_ = {},
            this.charToByteMapWebSafe_ = {};
            for (let t = 0; t < this.ENCODED_VALS.length; t++)
                this.byteToCharMap_[t] = this.ENCODED_VALS.charAt(t),
                this.charToByteMap_[this.byteToCharMap_[t]] = t,
                this.byteToCharMapWebSafe_[t] = this.ENCODED_VALS_WEBSAFE.charAt(t),
                this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]] = t,
                t >= this.ENCODED_VALS_BASE.length && (this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)] = t,
                this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)] = t)
        }
    }
};
class d1e extends Error {
    constructor() {
        super(...arguments),
        this.name = "DecodeBase64StringError"
    }
}
const h1e = function(t) {
    const e = jk(t);
    return Wk.encodeByteArray(e, !0)
}
  , Yk = function(t) {
    return h1e(t).replace(/\./g, "")
}
  , Xk = function(t) {
    try {
        return Wk.decodeString(t, !0)
    } catch (e) {
        console.error("base64Decode failed: ", e)
    }
    return null
};
/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function x1e() {
    if (typeof self < "u")
        return self;
    if (typeof window < "u")
        return window;
    if (typeof global < "u")
        return global;
    throw new Error("Unable to locate global object.")
}
/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const p1e = () => x1e().__FIREBASE_DEFAULTS__
  , g1e = () => {
    if (typeof process > "u" || typeof process.env > "u")
        return;
    const t = {}.__FIREBASE_DEFAULTS__;
    if (t)
        return JSON.parse(t)
}
  , m1e = () => {
    if (typeof document > "u")
        return;
    let t;
    try {
        t = document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)
    } catch {
        return
    }
    const e = t && Xk(t[1]);
    return e && JSON.parse(e)
}
  , v1e = () => {
    try {
        return u1e() || p1e() || g1e() || m1e()
    } catch (t) {
        console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);
        return
    }
}
  , Kk = () => {
    var t;
    return (t = v1e()) === null || t === void 0 ? void 0 : t.config
}
;
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
class y1e {
    constructor() {
        this.reject = () => {}
        ,
        this.resolve = () => {}
        ,
        this.promise = new Promise( (e, r) => {
            this.resolve = e,
            this.reject = r
        }
        )
    }
    wrapCallback(e) {
        return (r, n) => {
            r ? this.reject(r) : this.resolve(n),
            typeof e == "function" && (this.promise.catch( () => {}
            ),
            e.length === 1 ? e(r) : e(r, n))
        }
    }
}
function E1e() {
    return typeof window < "u" || qk()
}
function qk() {
    return typeof WorkerGlobalScope < "u" && typeof self < "u" && self instanceof WorkerGlobalScope
}
function Zk() {
    const t = typeof chrome == "object" ? chrome.runtime : typeof browser == "object" ? browser.runtime : void 0;
    return typeof t == "object" && t.id !== void 0
}
function F1() {
    try {
        return typeof indexedDB == "object"
    } catch {
        return !1
    }
}
function P1() {
    return new Promise( (t, e) => {
        try {
            let r = !0;
            const n = "validate-browser-context-for-indexeddb-analytics-module"
              , i = self.indexedDB.open(n);
            i.onsuccess = () => {
                i.result.close(),
                r || self.indexedDB.deleteDatabase(n),
                t(!0)
            }
            ,
            i.onupgradeneeded = () => {
                r = !1
            }
            ,
            i.onerror = () => {
                var o;
                e(((o = i.error) === null || o === void 0 ? void 0 : o.message) || "")
            }
        } catch (r) {
            e(r)
        }
    }
    )
}
function oC() {
    return !(typeof navigator > "u" || !navigator.cookieEnabled)
}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const _1e = "FirebaseError";
class Aa extends Error {
    constructor(e, r, n) {
        super(r),
        this.code = e,
        this.customData = n,
        this.name = _1e,
        Object.setPrototypeOf(this, Aa.prototype),
        Error.captureStackTrace && Error.captureStackTrace(this, yd.prototype.create)
    }
}
class yd {
    constructor(e, r, n) {
        this.service = e,
        this.serviceName = r,
        this.errors = n
    }
    create(e, ...r) {
        const n = r[0] || {}
          , i = `${this.service}/${e}`
          , o = this.errors[e]
          , s = o ? b1e(o, n) : "Error"
          , a = `${this.serviceName}: ${s} (${i}).`;
        return new Aa(i,a,n)
    }
}
function b1e(t, e) {
    return t.replace(C1e, (r, n) => {
        const i = e[n];
        return i != null ? String(i) : `<${n}?>`
    }
    )
}
const C1e = /\{\$([^}]+)}/g;
function qx(t, e) {
    if (t === e)
        return !0;
    const r = Object.keys(t)
      , n = Object.keys(e);
    for (const i of r) {
        if (!n.includes(i))
            return !1;
        const o = t[i]
          , s = e[i];
        if (x4(o) && x4(s)) {
            if (!qx(o, s))
                return !1
        } else if (o !== s)
            return !1
    }
    for (const i of n)
        if (!r.includes(i))
            return !1;
    return !0
}
function x4(t) {
    return t !== null && typeof t == "object"
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const A1e = 1e3
  , w1e = 2
  , B1e = 4 * 60 * 60 * 1e3
  , S1e = .5;
function p4(t, e=A1e, r=w1e) {
    const n = e * Math.pow(r, t)
      , i = Math.round(S1e * n * (Math.random() - .5) * 2);
    return Math.min(B1e, n + i)
}
/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function Xi(t) {
    return t && t._delegate ? t._delegate : t
}
class Bo {
    constructor(e, r, n) {
        this.name = e,
        this.instanceFactory = r,
        this.type = n,
        this.multipleInstances = !1,
        this.serviceProps = {},
        this.instantiationMode = "LAZY",
        this.onInstanceCreated = null
    }
    setInstantiationMode(e) {
        return this.instantiationMode = e,
        this
    }
    setMultipleInstances(e) {
        return this.multipleInstances = e,
        this
    }
    setServiceProps(e) {
        return this.serviceProps = e,
        this
    }
    setInstanceCreatedCallback(e) {
        return this.onInstanceCreated = e,
        this
    }
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Ha = "[DEFAULT]";
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
class T1e {
    constructor(e, r) {
        this.name = e,
        this.container = r,
        this.component = null,
        this.instances = new Map,
        this.instancesDeferred = new Map,
        this.instancesOptions = new Map,
        this.onInitCallbacks = new Map
    }
    get(e) {
        const r = this.normalizeInstanceIdentifier(e);
        if (!this.instancesDeferred.has(r)) {
            const n = new y1e;
            if (this.instancesDeferred.set(r, n),
            this.isInitialized(r) || this.shouldAutoInitialize())
                try {
                    const i = this.getOrInitializeService({
                        instanceIdentifier: r
                    });
                    i && n.resolve(i)
                } catch {}
        }
        return this.instancesDeferred.get(r).promise
    }
    getImmediate(e) {
        var r;
        const n = this.normalizeInstanceIdentifier(e == null ? void 0 : e.identifier)
          , i = (r = e == null ? void 0 : e.optional) !== null && r !== void 0 ? r : !1;
        if (this.isInitialized(n) || this.shouldAutoInitialize())
            try {
                return this.getOrInitializeService({
                    instanceIdentifier: n
                })
            } catch (o) {
                if (i)
                    return null;
                throw o
            }
        else {
            if (i)
                return null;
            throw Error(`Service ${this.name} is not available`)
        }
    }
    getComponent() {
        return this.component
    }
    setComponent(e) {
        if (e.name !== this.name)
            throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);
        if (this.component)
            throw Error(`Component for ${this.name} has already been provided`);
        if (this.component = e,
        !!this.shouldAutoInitialize()) {
            if (F1e(e))
                try {
                    this.getOrInitializeService({
                        instanceIdentifier: Ha
                    })
                } catch {}
            for (const [r,n] of this.instancesDeferred.entries()) {
                const i = this.normalizeInstanceIdentifier(r);
                try {
                    const o = this.getOrInitializeService({
                        instanceIdentifier: i
                    });
                    n.resolve(o)
                } catch {}
            }
        }
    }
    clearInstance(e=Ha) {
        this.instancesDeferred.delete(e),
        this.instancesOptions.delete(e),
        this.instances.delete(e)
    }
    async delete() {
        const e = Array.from(this.instances.values());
        await Promise.all([...e.filter(r => "INTERNAL"in r).map(r => r.INTERNAL.delete()), ...e.filter(r => "_delete"in r).map(r => r._delete())])
    }
    isComponentSet() {
        return this.component != null
    }
    isInitialized(e=Ha) {
        return this.instances.has(e)
    }
    getOptions(e=Ha) {
        return this.instancesOptions.get(e) || {}
    }
    initialize(e={}) {
        const {options: r={}} = e
          , n = this.normalizeInstanceIdentifier(e.instanceIdentifier);
        if (this.isInitialized(n))
            throw Error(`${this.name}(${n}) has already been initialized`);
        if (!this.isComponentSet())
            throw Error(`Component ${this.name} has not been registered yet`);
        const i = this.getOrInitializeService({
            instanceIdentifier: n,
            options: r
        });
        for (const [o,s] of this.instancesDeferred.entries()) {
            const a = this.normalizeInstanceIdentifier(o);
            n === a && s.resolve(i)
        }
        return i
    }
    onInit(e, r) {
        var n;
        const i = this.normalizeInstanceIdentifier(r)
          , o = (n = this.onInitCallbacks.get(i)) !== null && n !== void 0 ? n : new Set;
        o.add(e),
        this.onInitCallbacks.set(i, o);
        const s = this.instances.get(i);
        return s && e(s, i),
        () => {
            o.delete(e)
        }
    }
    invokeOnInitCallbacks(e, r) {
        const n = this.onInitCallbacks.get(r);
        if (n)
            for (const i of n)
                try {
                    i(e, r)
                } catch {}
    }
    getOrInitializeService({instanceIdentifier: e, options: r={}}) {
        let n = this.instances.get(e);
        if (!n && this.component && (n = this.component.instanceFactory(this.container, {
            instanceIdentifier: D1e(e),
            options: r
        }),
        this.instances.set(e, n),
        this.instancesOptions.set(e, r),
        this.invokeOnInitCallbacks(n, e),
        this.component.onInstanceCreated))
            try {
                this.component.onInstanceCreated(this.container, e, n)
            } catch {}
        return n || null
    }
    normalizeInstanceIdentifier(e=Ha) {
        return this.component ? this.component.multipleInstances ? e : Ha : e
    }
    shouldAutoInitialize() {
        return !!this.component && this.component.instantiationMode !== "EXPLICIT"
    }
}
function D1e(t) {
    return t === Ha ? void 0 : t
}
function F1e(t) {
    return t.instantiationMode === "EAGER"
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
class Jk {
    constructor(e) {
        this.name = e,
        this.providers = new Map
    }
    addComponent(e) {
        const r = this.getProvider(e.name);
        if (r.isComponentSet())
            throw new Error(`Component ${e.name} has already been registered with ${this.name}`);
        r.setComponent(e)
    }
    addOrOverwriteComponent(e) {
        this.getProvider(e.name).isComponentSet() && this.providers.delete(e.name),
        this.addComponent(e)
    }
    getProvider(e) {
        if (this.providers.has(e))
            return this.providers.get(e);
        const r = new T1e(e,this);
        return this.providers.set(e, r),
        r
    }
    getProviders() {
        return Array.from(this.providers.values())
    }
}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const sC = [];
var Tt;
(function(t) {
    t[t.DEBUG = 0] = "DEBUG",
    t[t.VERBOSE = 1] = "VERBOSE",
    t[t.INFO = 2] = "INFO",
    t[t.WARN = 3] = "WARN",
    t[t.ERROR = 4] = "ERROR",
    t[t.SILENT = 5] = "SILENT"
}
)(Tt || (Tt = {}));
const Qk = {
    debug: Tt.DEBUG,
    verbose: Tt.VERBOSE,
    info: Tt.INFO,
    warn: Tt.WARN,
    error: Tt.ERROR,
    silent: Tt.SILENT
}
  , P1e = Tt.INFO
  , I1e = {
    [Tt.DEBUG]: "log",
    [Tt.VERBOSE]: "log",
    [Tt.INFO]: "info",
    [Tt.WARN]: "warn",
    [Tt.ERROR]: "error"
}
  , O1e = (t, e, ...r) => {
    if (e < t.logLevel)
        return;
    const n = new Date().toISOString()
      , i = I1e[e];
    if (i)
        console[i](`[${n}]  ${t.name}:`, ...r);
    else
        throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)
}
;
class eR {
    constructor(e) {
        this.name = e,
        this._logLevel = P1e,
        this._logHandler = O1e,
        this._userLogHandler = null,
        sC.push(this)
    }
    get logLevel() {
        return this._logLevel
    }
    set logLevel(e) {
        if (!(e in Tt))
            throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);
        this._logLevel = e
    }
    setLogLevel(e) {
        this._logLevel = typeof e == "string" ? Qk[e] : e
    }
    get logHandler() {
        return this._logHandler
    }
    set logHandler(e) {
        if (typeof e != "function")
            throw new TypeError("Value assigned to `logHandler` must be a function");
        this._logHandler = e
    }
    get userLogHandler() {
        return this._userLogHandler
    }
    set userLogHandler(e) {
        this._userLogHandler = e
    }
    debug(...e) {
        this._userLogHandler && this._userLogHandler(this, Tt.DEBUG, ...e),
        this._logHandler(this, Tt.DEBUG, ...e)
    }
    log(...e) {
        this._userLogHandler && this._userLogHandler(this, Tt.VERBOSE, ...e),
        this._logHandler(this, Tt.VERBOSE, ...e)
    }
    info(...e) {
        this._userLogHandler && this._userLogHandler(this, Tt.INFO, ...e),
        this._logHandler(this, Tt.INFO, ...e)
    }
    warn(...e) {
        this._userLogHandler && this._userLogHandler(this, Tt.WARN, ...e),
        this._logHandler(this, Tt.WARN, ...e)
    }
    error(...e) {
        this._userLogHandler && this._userLogHandler(this, Tt.ERROR, ...e),
        this._logHandler(this, Tt.ERROR, ...e)
    }
}
function k1e(t) {
    sC.forEach(e => {
        e.setLogLevel(t)
    }
    )
}
function R1e(t, e) {
    for (const r of sC) {
        let n = null;
        e && e.level && (n = Qk[e.level]),
        t === null ? r.userLogHandler = null : r.userLogHandler = (i, o, ...s) => {
            const a = s.map(l => {
                if (l == null)
                    return null;
                if (typeof l == "string")
                    return l;
                if (typeof l == "number" || typeof l == "boolean")
                    return l.toString();
                if (l instanceof Error)
                    return l.message;
                try {
                    return JSON.stringify(l)
                } catch {
                    return null
                }
            }
            ).filter(l => l).join(" ");
            o >= (n ?? i.logLevel) && t({
                level: Tt[o].toLowerCase(),
                message: a,
                args: s,
                type: i.name
            })
        }
    }
}
const M1e = (t, e) => e.some(r => t instanceof r);
let g4, m4;
function N1e() {
    return g4 || (g4 = [IDBDatabase, IDBObjectStore, IDBIndex, IDBCursor, IDBTransaction])
}
function L1e() {
    return m4 || (m4 = [IDBCursor.prototype.advance, IDBCursor.prototype.continue, IDBCursor.prototype.continuePrimaryKey])
}
const tR = new WeakMap
  , IE = new WeakMap
  , rR = new WeakMap
  , Em = new WeakMap
  , aC = new WeakMap;
function $1e(t) {
    const e = new Promise( (r, n) => {
        const i = () => {
            t.removeEventListener("success", o),
            t.removeEventListener("error", s)
        }
          , o = () => {
            r(as(t.result)),
            i()
        }
          , s = () => {
            n(t.error),
            i()
        }
        ;
        t.addEventListener("success", o),
        t.addEventListener("error", s)
    }
    );
    return e.then(r => {
        r instanceof IDBCursor && tR.set(r, t)
    }
    ).catch( () => {}
    ),
    aC.set(e, t),
    e
}
function U1e(t) {
    if (IE.has(t))
        return;
    const e = new Promise( (r, n) => {
        const i = () => {
            t.removeEventListener("complete", o),
            t.removeEventListener("error", s),
            t.removeEventListener("abort", s)
        }
          , o = () => {
            r(),
            i()
        }
          , s = () => {
            n(t.error || new DOMException("AbortError","AbortError")),
            i()
        }
        ;
        t.addEventListener("complete", o),
        t.addEventListener("error", s),
        t.addEventListener("abort", s)
    }
    );
    IE.set(t, e)
}
let OE = {
    get(t, e, r) {
        if (t instanceof IDBTransaction) {
            if (e === "done")
                return IE.get(t);
            if (e === "objectStoreNames")
                return t.objectStoreNames || rR.get(t);
            if (e === "store")
                return r.objectStoreNames[1] ? void 0 : r.objectStore(r.objectStoreNames[0])
        }
        return as(t[e])
    },
    set(t, e, r) {
        return t[e] = r,
        !0
    },
    has(t, e) {
        return t instanceof IDBTransaction && (e === "done" || e === "store") ? !0 : e in t
    }
};
function G1e(t) {
    OE = t(OE)
}
function H1e(t) {
    return t === IDBDatabase.prototype.transaction && !("objectStoreNames"in IDBTransaction.prototype) ? function(e, ...r) {
        const n = t.call(_m(this), e, ...r);
        return rR.set(n, e.sort ? e.sort() : [e]),
        as(n)
    }
    : L1e().includes(t) ? function(...e) {
        return t.apply(_m(this), e),
        as(tR.get(this))
    }
    : function(...e) {
        return as(t.apply(_m(this), e))
    }
}
function V1e(t) {
    return typeof t == "function" ? H1e(t) : (t instanceof IDBTransaction && U1e(t),
    M1e(t, N1e()) ? new Proxy(t,OE) : t)
}
function as(t) {
    if (t instanceof IDBRequest)
        return $1e(t);
    if (Em.has(t))
        return Em.get(t);
    const e = V1e(t);
    return e !== t && (Em.set(t, e),
    aC.set(e, t)),
    e
}
const _m = t => aC.get(t);
function I1(t, e, {blocked: r, upgrade: n, blocking: i, terminated: o}={}) {
    const s = indexedDB.open(t, e)
      , a = as(s);
    return n && s.addEventListener("upgradeneeded", l => {
        n(as(s.result), l.oldVersion, l.newVersion, as(s.transaction), l)
    }
    ),
    r && s.addEventListener("blocked", l => r(l.oldVersion, l.newVersion, l)),
    a.then(l => {
        o && l.addEventListener("close", () => o()),
        i && l.addEventListener("versionchange", c => i(c.oldVersion, c.newVersion, c))
    }
    ).catch( () => {}
    ),
    a
}
function bm(t, {blocked: e}={}) {
    const r = indexedDB.deleteDatabase(t);
    return e && r.addEventListener("blocked", n => e(n.oldVersion, n)),
    as(r).then( () => {}
    )
}
const z1e = ["get", "getKey", "getAll", "getAllKeys", "count"]
  , j1e = ["put", "add", "delete", "clear"]
  , Cm = new Map;
function v4(t, e) {
    if (!(t instanceof IDBDatabase && !(e in t) && typeof e == "string"))
        return;
    if (Cm.get(e))
        return Cm.get(e);
    const r = e.replace(/FromIndex$/, "")
      , n = e !== r
      , i = j1e.includes(r);
    if (!(r in (n ? IDBIndex : IDBObjectStore).prototype) || !(i || z1e.includes(r)))
        return;
    const o = async function(s, ...a) {
        const l = this.transaction(s, i ? "readwrite" : "readonly");
        let c = l.store;
        return n && (c = c.index(a.shift())),
        (await Promise.all([c[r](...a), i && l.done]))[0]
    };
    return Cm.set(e, o),
    o
}
G1e(t => ({
    ...t,
    get: (e, r, n) => v4(e, r) || t.get(e, r, n),
    has: (e, r) => !!v4(e, r) || t.has(e, r)
}));
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
class W1e {
    constructor(e) {
        this.container = e
    }
    getPlatformInfoString() {
        return this.container.getProviders().map(r => {
            if (Y1e(r)) {
                const n = r.getImmediate();
                return `${n.library}/${n.version}`
            } else
                return null
        }
        ).filter(r => r).join(" ")
    }
}
function Y1e(t) {
    const e = t.getComponent();
    return (e == null ? void 0 : e.type) === "VERSION"
}
const Zx = "@firebase/app"
  , kE = "0.13.2";
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const vs = new eR("@firebase/app")
  , X1e = "@firebase/app-compat"
  , K1e = "@firebase/analytics-compat"
  , q1e = "@firebase/analytics"
  , Z1e = "@firebase/app-check-compat"
  , J1e = "@firebase/app-check"
  , Q1e = "@firebase/auth"
  , ege = "@firebase/auth-compat"
  , tge = "@firebase/database"
  , rge = "@firebase/data-connect"
  , nge = "@firebase/database-compat"
  , ige = "@firebase/functions"
  , oge = "@firebase/functions-compat"
  , sge = "@firebase/installations"
  , age = "@firebase/installations-compat"
  , lge = "@firebase/messaging"
  , cge = "@firebase/messaging-compat"
  , uge = "@firebase/performance"
  , fge = "@firebase/performance-compat"
  , dge = "@firebase/remote-config"
  , hge = "@firebase/remote-config-compat"
  , xge = "@firebase/storage"
  , pge = "@firebase/storage-compat"
  , gge = "@firebase/firestore"
  , mge = "@firebase/ai"
  , vge = "@firebase/firestore-compat"
  , yge = "firebase"
  , Ege = "11.10.0";
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Of = "[DEFAULT]"
  , _ge = {
    [Zx]: "fire-core",
    [X1e]: "fire-core-compat",
    [q1e]: "fire-analytics",
    [K1e]: "fire-analytics-compat",
    [J1e]: "fire-app-check",
    [Z1e]: "fire-app-check-compat",
    [Q1e]: "fire-auth",
    [ege]: "fire-auth-compat",
    [tge]: "fire-rtdb",
    [rge]: "fire-data-connect",
    [nge]: "fire-rtdb-compat",
    [ige]: "fire-fn",
    [oge]: "fire-fn-compat",
    [sge]: "fire-iid",
    [age]: "fire-iid-compat",
    [lge]: "fire-fcm",
    [cge]: "fire-fcm-compat",
    [uge]: "fire-perf",
    [fge]: "fire-perf-compat",
    [dge]: "fire-rc",
    [hge]: "fire-rc-compat",
    [xge]: "fire-gcs",
    [pge]: "fire-gcs-compat",
    [gge]: "fire-fst",
    [vge]: "fire-fst-compat",
    [mge]: "fire-vertex",
    "fire-js": "fire-js",
    [yge]: "fire-js-all"
};
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const xa = new Map
  , uu = new Map
  , fu = new Map;
function RE(t, e) {
    try {
        t.container.addComponent(e)
    } catch (r) {
        vs.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`, r)
    }
}
function bge(t, e) {
    t.container.addOrOverwriteComponent(e)
}
function So(t) {
    const e = t.name;
    if (fu.has(e))
        return vs.debug(`There were multiple attempts to register component ${e}.`),
        !1;
    fu.set(e, t);
    for (const r of xa.values())
        RE(r, t);
    for (const r of uu.values())
        RE(r, t);
    return !0
}
function Yl(t, e) {
    const r = t.container.getProvider("heartbeat").getImmediate({
        optional: !0
    });
    return r && r.triggerHeartbeat(),
    t.container.getProvider(e)
}
function Cge(t, e, r=Of) {
    Yl(t, e).clearInstance(r)
}
function nR(t) {
    return t.options !== void 0
}
function Age(t) {
    return t == null ? !1 : t.settings !== void 0
}
function wge() {
    fu.clear()
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Bge = {
    "no-app": "No Firebase App '{$appName}' has been created - call initializeApp() first",
    "bad-app-name": "Illegal App name: '{$appName}'",
    "duplicate-app": "Firebase App named '{$appName}' already exists with different options or config",
    "app-deleted": "Firebase App named '{$appName}' already deleted",
    "server-app-deleted": "Firebase Server App has been deleted",
    "no-options": "Need to provide options, when not being deployed to hosting via source.",
    "invalid-app-argument": "firebase.{$appName}() takes either no argument or a Firebase App instance.",
    "invalid-log-argument": "First argument to `onLog` must be null or a function.",
    "idb-open": "Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.",
    "idb-get": "Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",
    "idb-set": "Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",
    "idb-delete": "Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.",
    "finalization-registry-not-supported": "FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.",
    "invalid-server-app-environment": "FirebaseServerApp is not for use in browser environments."
}
  , mi = new yd("app","Firebase",Bge);
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
class iR {
    constructor(e, r, n) {
        this._isDeleted = !1,
        this._options = Object.assign({}, e),
        this._config = Object.assign({}, r),
        this._name = r.name,
        this._automaticDataCollectionEnabled = r.automaticDataCollectionEnabled,
        this._container = n,
        this.container.addComponent(new Bo("app", () => this,"PUBLIC"))
    }
    get automaticDataCollectionEnabled() {
        return this.checkDestroyed(),
        this._automaticDataCollectionEnabled
    }
    set automaticDataCollectionEnabled(e) {
        this.checkDestroyed(),
        this._automaticDataCollectionEnabled = e
    }
    get name() {
        return this.checkDestroyed(),
        this._name
    }
    get options() {
        return this.checkDestroyed(),
        this._options
    }
    get config() {
        return this.checkDestroyed(),
        this._config
    }
    get container() {
        return this._container
    }
    get isDeleted() {
        return this._isDeleted
    }
    set isDeleted(e) {
        this._isDeleted = e
    }
    checkDestroyed() {
        if (this.isDeleted)
            throw mi.create("app-deleted", {
                appName: this._name
            })
    }
}
/**
 * @license
 * Copyright 2023 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function y4(t, e) {
    const r = Xk(t.split(".")[1]);
    if (r === null) {
        console.error(`FirebaseServerApp ${e} is invalid: second part could not be parsed.`);
        return
    }
    if (JSON.parse(r).exp === void 0) {
        console.error(`FirebaseServerApp ${e} is invalid: expiration claim could not be parsed`);
        return
    }
    const i = JSON.parse(r).exp * 1e3
      , o = new Date().getTime();
    i - o <= 0 && console.error(`FirebaseServerApp ${e} is invalid: the token has expired.`)
}
class Sge extends iR {
    constructor(e, r, n, i) {
        const o = r.automaticDataCollectionEnabled !== void 0 ? r.automaticDataCollectionEnabled : !0
          , s = {
            name: n,
            automaticDataCollectionEnabled: o
        };
        if (e.apiKey !== void 0)
            super(e, s, i);
        else {
            const a = e;
            super(a.options, s, i)
        }
        this._serverConfig = Object.assign({
            automaticDataCollectionEnabled: o
        }, r),
        this._serverConfig.authIdToken && y4(this._serverConfig.authIdToken, "authIdToken"),
        this._serverConfig.appCheckToken && y4(this._serverConfig.appCheckToken, "appCheckToken"),
        this._finalizationRegistry = null,
        typeof FinalizationRegistry < "u" && (this._finalizationRegistry = new FinalizationRegistry( () => {
            this.automaticCleanup()
        }
        )),
        this._refCount = 0,
        this.incRefCount(this._serverConfig.releaseOnDeref),
        this._serverConfig.releaseOnDeref = void 0,
        r.releaseOnDeref = void 0,
        vi(Zx, kE, "serverapp")
    }
    toJSON() {}
    get refCount() {
        return this._refCount
    }
    incRefCount(e) {
        this.isDeleted || (this._refCount++,
        e !== void 0 && this._finalizationRegistry !== null && this._finalizationRegistry.register(e, this))
    }
    decRefCount() {
        return this.isDeleted ? 0 : --this._refCount
    }
    automaticCleanup() {
        sR(this)
    }
    get settings() {
        return this.checkDestroyed(),
        this._serverConfig
    }
    checkDestroyed() {
        if (this.isDeleted)
            throw mi.create("server-app-deleted")
    }
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Tge = Ege;
function oR(t, e={}) {
    let r = t;
    typeof e != "object" && (e = {
        name: e
    });
    const n = Object.assign({
        name: Of,
        automaticDataCollectionEnabled: !0
    }, e)
      , i = n.name;
    if (typeof i != "string" || !i)
        throw mi.create("bad-app-name", {
            appName: String(i)
        });
    if (r || (r = Kk()),
    !r)
        throw mi.create("no-options");
    const o = xa.get(i);
    if (o) {
        if (qx(r, o.options) && qx(n, o.config))
            return o;
        throw mi.create("duplicate-app", {
            appName: i
        })
    }
    const s = new Jk(i);
    for (const l of fu.values())
        s.addComponent(l);
    const a = new iR(r,n,s);
    return xa.set(i, a),
    a
}
function Dge(t, e) {
    if (E1e() && !qk())
        throw mi.create("invalid-server-app-environment");
    e.automaticDataCollectionEnabled === void 0 && (e.automaticDataCollectionEnabled = !0);
    let r;
    nR(t) ? r = t.options : r = t;
    const n = Object.assign(Object.assign({}, e), r);
    n.releaseOnDeref !== void 0 && delete n.releaseOnDeref;
    const i = c => [...c].reduce( (u, f) => Math.imul(31, u) + f.charCodeAt(0) | 0, 0);
    if (e.releaseOnDeref !== void 0 && typeof FinalizationRegistry > "u")
        throw mi.create("finalization-registry-not-supported", {});
    const o = "" + i(JSON.stringify(n))
      , s = uu.get(o);
    if (s)
        return s.incRefCount(e.releaseOnDeref),
        s;
    const a = new Jk(o);
    for (const c of fu.values())
        a.addComponent(c);
    const l = new Sge(r,e,o,a);
    return uu.set(o, l),
    l
}
function lC(t=Of) {
    const e = xa.get(t);
    if (!e && t === Of && Kk())
        return oR();
    if (!e)
        throw mi.create("no-app", {
            appName: t
        });
    return e
}
function Fge() {
    return Array.from(xa.values())
}
async function sR(t) {
    let e = !1;
    const r = t.name;
    xa.has(r) ? (e = !0,
    xa.delete(r)) : uu.has(r) && t.decRefCount() <= 0 && (uu.delete(r),
    e = !0),
    e && (await Promise.all(t.container.getProviders().map(n => n.delete())),
    t.isDeleted = !0)
}
function vi(t, e, r) {
    var n;
    let i = (n = _ge[t]) !== null && n !== void 0 ? n : t;
    r && (i += `-${r}`);
    const o = i.match(/\s|\//)
      , s = e.match(/\s|\//);
    if (o || s) {
        const a = [`Unable to register library "${i}" with version "${e}":`];
        o && a.push(`library name "${i}" contains illegal characters (whitespace or "/")`),
        o && s && a.push("and"),
        s && a.push(`version name "${e}" contains illegal characters (whitespace or "/")`),
        vs.warn(a.join(" "));
        return
    }
    So(new Bo(`${i}-version`, () => ({
        library: i,
        version: e
    }),"VERSION"))
}
function Pge(t, e) {
    if (t !== null && typeof t != "function")
        throw mi.create("invalid-log-argument");
    R1e(t, e)
}
function Ige(t) {
    k1e(t)
}
/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Oge = "firebase-heartbeat-database"
  , kge = 1
  , kf = "firebase-heartbeat-store";
let Am = null;
function aR() {
    return Am || (Am = I1(Oge, kge, {
        upgrade: (t, e) => {
            switch (e) {
            case 0:
                try {
                    t.createObjectStore(kf)
                } catch (r) {
                    console.warn(r)
                }
            }
        }
    }).catch(t => {
        throw mi.create("idb-open", {
            originalErrorMessage: t.message
        })
    }
    )),
    Am
}
async function Rge(t) {
    try {
        const r = (await aR()).transaction(kf)
          , n = await r.objectStore(kf).get(lR(t));
        return await r.done,
        n
    } catch (e) {
        if (e instanceof Aa)
            vs.warn(e.message);
        else {
            const r = mi.create("idb-get", {
                originalErrorMessage: e == null ? void 0 : e.message
            });
            vs.warn(r.message)
        }
    }
}
async function E4(t, e) {
    try {
        const n = (await aR()).transaction(kf, "readwrite");
        await n.objectStore(kf).put(e, lR(t)),
        await n.done
    } catch (r) {
        if (r instanceof Aa)
            vs.warn(r.message);
        else {
            const n = mi.create("idb-set", {
                originalErrorMessage: r == null ? void 0 : r.message
            });
            vs.warn(n.message)
        }
    }
}
function lR(t) {
    return `${t.name}!${t.options.appId}`
}
/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Mge = 1024
  , Nge = 30;
class Lge {
    constructor(e) {
        this.container = e,
        this._heartbeatsCache = null;
        const r = this.container.getProvider("app").getImmediate();
        this._storage = new Uge(r),
        this._heartbeatsCachePromise = this._storage.read().then(n => (this._heartbeatsCache = n,
        n))
    }
    async triggerHeartbeat() {
        var e, r;
        try {
            const i = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString()
              , o = _4();
            if (((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null && (this._heartbeatsCache = await this._heartbeatsCachePromise,
            ((r = this._heartbeatsCache) === null || r === void 0 ? void 0 : r.heartbeats) == null) || this._heartbeatsCache.lastSentHeartbeatDate === o || this._heartbeatsCache.heartbeats.some(s => s.date === o))
                return;
            if (this._heartbeatsCache.heartbeats.push({
                date: o,
                agent: i
            }),
            this._heartbeatsCache.heartbeats.length > Nge) {
                const s = Gge(this._heartbeatsCache.heartbeats);
                this._heartbeatsCache.heartbeats.splice(s, 1)
            }
            return this._storage.overwrite(this._heartbeatsCache)
        } catch (n) {
            vs.warn(n)
        }
    }
    async getHeartbeatsHeader() {
        var e;
        try {
            if (this._heartbeatsCache === null && await this._heartbeatsCachePromise,
            ((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null || this._heartbeatsCache.heartbeats.length === 0)
                return "";
            const r = _4()
              , {heartbeatsToSend: n, unsentEntries: i} = $ge(this._heartbeatsCache.heartbeats)
              , o = Yk(JSON.stringify({
                version: 2,
                heartbeats: n
            }));
            return this._heartbeatsCache.lastSentHeartbeatDate = r,
            i.length > 0 ? (this._heartbeatsCache.heartbeats = i,
            await this._storage.overwrite(this._heartbeatsCache)) : (this._heartbeatsCache.heartbeats = [],
            this._storage.overwrite(this._heartbeatsCache)),
            o
        } catch (r) {
            return vs.warn(r),
            ""
        }
    }
}
function _4() {
    return new Date().toISOString().substring(0, 10)
}
function $ge(t, e=Mge) {
    const r = [];
    let n = t.slice();
    for (const i of t) {
        const o = r.find(s => s.agent === i.agent);
        if (o) {
            if (o.dates.push(i.date),
            b4(r) > e) {
                o.dates.pop();
                break
            }
        } else if (r.push({
            agent: i.agent,
            dates: [i.date]
        }),
        b4(r) > e) {
            r.pop();
            break
        }
        n = n.slice(1)
    }
    return {
        heartbeatsToSend: r,
        unsentEntries: n
    }
}
class Uge {
    constructor(e) {
        this.app = e,
        this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck()
    }
    async runIndexedDBEnvironmentCheck() {
        return F1() ? P1().then( () => !0).catch( () => !1) : !1
    }
    async read() {
        if (await this._canUseIndexedDBPromise) {
            const r = await Rge(this.app);
            return r != null && r.heartbeats ? r : {
                heartbeats: []
            }
        } else
            return {
                heartbeats: []
            }
    }
    async overwrite(e) {
        var r;
        if (await this._canUseIndexedDBPromise) {
            const i = await this.read();
            return E4(this.app, {
                lastSentHeartbeatDate: (r = e.lastSentHeartbeatDate) !== null && r !== void 0 ? r : i.lastSentHeartbeatDate,
                heartbeats: e.heartbeats
            })
        } else
            return
    }
    async add(e) {
        var r;
        if (await this._canUseIndexedDBPromise) {
            const i = await this.read();
            return E4(this.app, {
                lastSentHeartbeatDate: (r = e.lastSentHeartbeatDate) !== null && r !== void 0 ? r : i.lastSentHeartbeatDate,
                heartbeats: [...i.heartbeats, ...e.heartbeats]
            })
        } else
            return
    }
}
function b4(t) {
    return Yk(JSON.stringify({
        version: 2,
        heartbeats: t
    })).length
}
function Gge(t) {
    if (t.length === 0)
        return -1;
    let e = 0
      , r = t[0].date;
    for (let n = 1; n < t.length; n++)
        t[n].date < r && (r = t[n].date,
        e = n);
    return e
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function Hge(t) {
    So(new Bo("platform-logger",e => new W1e(e),"PRIVATE")),
    So(new Bo("heartbeat",e => new Lge(e),"PRIVATE")),
    vi(Zx, kE, t),
    vi(Zx, kE, "esm2017"),
    vi("fire-js", "")
}
Hge("");
var Vge = "firebase"
  , zge = "11.10.0";
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
vi(Vge, zge, "app");
const g5e = Object.freeze(Object.defineProperty({
    __proto__: null,
    FirebaseError: Aa,
    SDK_VERSION: Tge,
    _DEFAULT_ENTRY_NAME: Of,
    _addComponent: RE,
    _addOrOverwriteComponent: bge,
    _apps: xa,
    _clearComponents: wge,
    _components: fu,
    _getProvider: Yl,
    _isFirebaseApp: nR,
    _isFirebaseServerApp: Age,
    _registerComponent: So,
    _removeServiceInstance: Cge,
    _serverApps: uu,
    deleteApp: sR,
    getApp: lC,
    getApps: Fge,
    initializeApp: oR,
    initializeServerApp: Dge,
    onLog: Pge,
    registerVersion: vi,
    setLogLevel: Ige
}, Symbol.toStringTag, {
    value: "Module"
}))
  , cR = "@firebase/installations"
  , cC = "0.6.18";
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const uR = 1e4
  , fR = `w:${cC}`
  , dR = "FIS_v2"
  , jge = "https://firebaseinstallations.googleapis.com/v1"
  , Wge = 60 * 60 * 1e3
  , Yge = "installations"
  , Xge = "Installations";
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Kge = {
    "missing-app-config-values": 'Missing App configuration value: "{$valueName}"',
    "not-registered": "Firebase Installation is not registered.",
    "installation-not-found": "Firebase Installation not found.",
    "request-failed": '{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',
    "app-offline": "Could not process request. Application offline.",
    "delete-pending-registration": "Can't delete installation while there is a pending registration request."
}
  , Pl = new yd(Yge,Xge,Kge);
function hR(t) {
    return t instanceof Aa && t.code.includes("request-failed")
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function xR({projectId: t}) {
    return `${jge}/projects/${t}/installations`
}
function pR(t) {
    return {
        token: t.token,
        requestStatus: 2,
        expiresIn: Zge(t.expiresIn),
        creationTime: Date.now()
    }
}
async function gR(t, e) {
    const n = (await e.json()).error;
    return Pl.create("request-failed", {
        requestName: t,
        serverCode: n.code,
        serverMessage: n.message,
        serverStatus: n.status
    })
}
function mR({apiKey: t}) {
    return new Headers({
        "Content-Type": "application/json",
        Accept: "application/json",
        "x-goog-api-key": t
    })
}
function qge(t, {refreshToken: e}) {
    const r = mR(t);
    return r.append("Authorization", Jge(e)),
    r
}
async function vR(t) {
    const e = await t();
    return e.status >= 500 && e.status < 600 ? t() : e
}
function Zge(t) {
    return Number(t.replace("s", "000"))
}
function Jge(t) {
    return `${dR} ${t}`
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function Qge({appConfig: t, heartbeatServiceProvider: e}, {fid: r}) {
    const n = xR(t)
      , i = mR(t)
      , o = e.getImmediate({
        optional: !0
    });
    if (o) {
        const c = await o.getHeartbeatsHeader();
        c && i.append("x-firebase-client", c)
    }
    const s = {
        fid: r,
        authVersion: dR,
        appId: t.appId,
        sdkVersion: fR
    }
      , a = {
        method: "POST",
        headers: i,
        body: JSON.stringify(s)
    }
      , l = await vR( () => fetch(n, a));
    if (l.ok) {
        const c = await l.json();
        return {
            fid: c.fid || r,
            registrationStatus: 2,
            refreshToken: c.refreshToken,
            authToken: pR(c.authToken)
        }
    } else
        throw await gR("Create Installation", l)
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function yR(t) {
    return new Promise(e => {
        setTimeout(e, t)
    }
    )
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function eme(t) {
    return btoa(String.fromCharCode(...t)).replace(/\+/g, "-").replace(/\//g, "_")
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const tme = /^[cdef][\w-]{21}$/
  , ME = "";
function rme() {
    try {
        const t = new Uint8Array(17);
        (self.crypto || self.msCrypto).getRandomValues(t),
        t[0] = 112 + t[0] % 16;
        const r = nme(t);
        return tme.test(r) ? r : ME
    } catch {
        return ME
    }
}
function nme(t) {
    return eme(t).substr(0, 22)
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function O1(t) {
    return `${t.appName}!${t.appId}`
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const ER = new Map;
function _R(t, e) {
    const r = O1(t);
    bR(r, e),
    ime(r, e)
}
function bR(t, e) {
    const r = ER.get(t);
    if (r)
        for (const n of r)
            n(e)
}
function ime(t, e) {
    const r = ome();
    r && r.postMessage({
        key: t,
        fid: e
    }),
    sme()
}
let tl = null;
function ome() {
    return !tl && "BroadcastChannel"in self && (tl = new BroadcastChannel("[Firebase] FID Change"),
    tl.onmessage = t => {
        bR(t.data.key, t.data.fid)
    }
    ),
    tl
}
function sme() {
    ER.size === 0 && tl && (tl.close(),
    tl = null)
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const ame = "firebase-installations-database"
  , lme = 1
  , Il = "firebase-installations-store";
let wm = null;
function uC() {
    return wm || (wm = I1(ame, lme, {
        upgrade: (t, e) => {
            switch (e) {
            case 0:
                t.createObjectStore(Il)
            }
        }
    })),
    wm
}
async function Jx(t, e) {
    const r = O1(t)
      , i = (await uC()).transaction(Il, "readwrite")
      , o = i.objectStore(Il)
      , s = await o.get(r);
    return await o.put(e, r),
    await i.done,
    (!s || s.fid !== e.fid) && _R(t, e.fid),
    e
}
async function CR(t) {
    const e = O1(t)
      , n = (await uC()).transaction(Il, "readwrite");
    await n.objectStore(Il).delete(e),
    await n.done
}
async function k1(t, e) {
    const r = O1(t)
      , i = (await uC()).transaction(Il, "readwrite")
      , o = i.objectStore(Il)
      , s = await o.get(r)
      , a = e(s);
    return a === void 0 ? await o.delete(r) : await o.put(a, r),
    await i.done,
    a && (!s || s.fid !== a.fid) && _R(t, a.fid),
    a
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function fC(t) {
    let e;
    const r = await k1(t.appConfig, n => {
        const i = cme(n)
          , o = ume(t, i);
        return e = o.registrationPromise,
        o.installationEntry
    }
    );
    return r.fid === ME ? {
        installationEntry: await e
    } : {
        installationEntry: r,
        registrationPromise: e
    }
}
function cme(t) {
    const e = t || {
        fid: rme(),
        registrationStatus: 0
    };
    return AR(e)
}
function ume(t, e) {
    if (e.registrationStatus === 0) {
        if (!navigator.onLine) {
            const i = Promise.reject(Pl.create("app-offline"));
            return {
                installationEntry: e,
                registrationPromise: i
            }
        }
        const r = {
            fid: e.fid,
            registrationStatus: 1,
            registrationTime: Date.now()
        }
          , n = fme(t, r);
        return {
            installationEntry: r,
            registrationPromise: n
        }
    } else
        return e.registrationStatus === 1 ? {
            installationEntry: e,
            registrationPromise: dme(t)
        } : {
            installationEntry: e
        }
}
async function fme(t, e) {
    try {
        const r = await Qge(t, e);
        return Jx(t.appConfig, r)
    } catch (r) {
        throw hR(r) && r.customData.serverCode === 409 ? await CR(t.appConfig) : await Jx(t.appConfig, {
            fid: e.fid,
            registrationStatus: 0
        }),
        r
    }
}
async function dme(t) {
    let e = await C4(t.appConfig);
    for (; e.registrationStatus === 1; )
        await yR(100),
        e = await C4(t.appConfig);
    if (e.registrationStatus === 0) {
        const {installationEntry: r, registrationPromise: n} = await fC(t);
        return n || r
    }
    return e
}
function C4(t) {
    return k1(t, e => {
        if (!e)
            throw Pl.create("installation-not-found");
        return AR(e)
    }
    )
}
function AR(t) {
    return hme(t) ? {
        fid: t.fid,
        registrationStatus: 0
    } : t
}
function hme(t) {
    return t.registrationStatus === 1 && t.registrationTime + uR < Date.now()
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function xme({appConfig: t, heartbeatServiceProvider: e}, r) {
    const n = pme(t, r)
      , i = qge(t, r)
      , o = e.getImmediate({
        optional: !0
    });
    if (o) {
        const c = await o.getHeartbeatsHeader();
        c && i.append("x-firebase-client", c)
    }
    const s = {
        installation: {
            sdkVersion: fR,
            appId: t.appId
        }
    }
      , a = {
        method: "POST",
        headers: i,
        body: JSON.stringify(s)
    }
      , l = await vR( () => fetch(n, a));
    if (l.ok) {
        const c = await l.json();
        return pR(c)
    } else
        throw await gR("Generate Auth Token", l)
}
function pme(t, {fid: e}) {
    return `${xR(t)}/${e}/authTokens:generate`
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function dC(t, e=!1) {
    let r;
    const n = await k1(t.appConfig, o => {
        if (!wR(o))
            throw Pl.create("not-registered");
        const s = o.authToken;
        if (!e && vme(s))
            return o;
        if (s.requestStatus === 1)
            return r = gme(t, e),
            o;
        {
            if (!navigator.onLine)
                throw Pl.create("app-offline");
            const a = Eme(o);
            return r = mme(t, a),
            a
        }
    }
    );
    return r ? await r : n.authToken
}
async function gme(t, e) {
    let r = await A4(t.appConfig);
    for (; r.authToken.requestStatus === 1; )
        await yR(100),
        r = await A4(t.appConfig);
    const n = r.authToken;
    return n.requestStatus === 0 ? dC(t, e) : n
}
function A4(t) {
    return k1(t, e => {
        if (!wR(e))
            throw Pl.create("not-registered");
        const r = e.authToken;
        return _me(r) ? Object.assign(Object.assign({}, e), {
            authToken: {
                requestStatus: 0
            }
        }) : e
    }
    )
}
async function mme(t, e) {
    try {
        const r = await xme(t, e)
          , n = Object.assign(Object.assign({}, e), {
            authToken: r
        });
        return await Jx(t.appConfig, n),
        r
    } catch (r) {
        if (hR(r) && (r.customData.serverCode === 401 || r.customData.serverCode === 404))
            await CR(t.appConfig);
        else {
            const n = Object.assign(Object.assign({}, e), {
                authToken: {
                    requestStatus: 0
                }
            });
            await Jx(t.appConfig, n)
        }
        throw r
    }
}
function wR(t) {
    return t !== void 0 && t.registrationStatus === 2
}
function vme(t) {
    return t.requestStatus === 2 && !yme(t)
}
function yme(t) {
    const e = Date.now();
    return e < t.creationTime || t.creationTime + t.expiresIn < e + Wge
}
function Eme(t) {
    const e = {
        requestStatus: 1,
        requestTime: Date.now()
    };
    return Object.assign(Object.assign({}, t), {
        authToken: e
    })
}
function _me(t) {
    return t.requestStatus === 1 && t.requestTime + uR < Date.now()
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function bme(t) {
    const e = t
      , {installationEntry: r, registrationPromise: n} = await fC(e);
    return n ? n.catch(console.error) : dC(e).catch(console.error),
    r.fid
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function Cme(t, e=!1) {
    const r = t;
    return await Ame(r),
    (await dC(r, e)).token
}
async function Ame(t) {
    const {registrationPromise: e} = await fC(t);
    e && await e
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function wme(t) {
    if (!t || !t.options)
        throw Bm("App Configuration");
    if (!t.name)
        throw Bm("App Name");
    const e = ["projectId", "apiKey", "appId"];
    for (const r of e)
        if (!t.options[r])
            throw Bm(r);
    return {
        appName: t.name,
        projectId: t.options.projectId,
        apiKey: t.options.apiKey,
        appId: t.options.appId
    }
}
function Bm(t) {
    return Pl.create("missing-app-config-values", {
        valueName: t
    })
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const BR = "installations"
  , Bme = "installations-internal"
  , Sme = t => {
    const e = t.getProvider("app").getImmediate()
      , r = wme(e)
      , n = Yl(e, "heartbeat");
    return {
        app: e,
        appConfig: r,
        heartbeatServiceProvider: n,
        _delete: () => Promise.resolve()
    }
}
  , Tme = t => {
    const e = t.getProvider("app").getImmediate()
      , r = Yl(e, BR).getImmediate();
    return {
        getId: () => bme(r),
        getToken: i => Cme(r, i)
    }
}
;
function Dme() {
    So(new Bo(BR,Sme,"PUBLIC")),
    So(new Bo(Bme,Tme,"PRIVATE"))
}
Dme();
vi(cR, cC);
vi(cR, cC, "esm2017");
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Fme = "/firebase-messaging-sw.js"
  , Pme = "/firebase-cloud-messaging-push-scope"
  , SR = "BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4"
  , Ime = "https://fcmregistrations.googleapis.com/v1"
  , TR = "google.c.a.c_id"
  , Ome = "google.c.a.c_l"
  , kme = "google.c.a.ts"
  , Rme = "google.c.a.e"
  , w4 = 1e4;
var B4;
(function(t) {
    t[t.DATA_MESSAGE = 1] = "DATA_MESSAGE",
    t[t.DISPLAY_NOTIFICATION = 3] = "DISPLAY_NOTIFICATION"
}
)(B4 || (B4 = {}));
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
var Rf;
(function(t) {
    t.PUSH_RECEIVED = "push-received",
    t.NOTIFICATION_CLICKED = "notification-clicked"
}
)(Rf || (Rf = {}));
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function zo(t) {
    const e = new Uint8Array(t);
    return btoa(String.fromCharCode(...e)).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_")
}
function Mme(t) {
    const e = "=".repeat((4 - t.length % 4) % 4)
      , r = (t + e).replace(/\-/g, "+").replace(/_/g, "/")
      , n = atob(r)
      , i = new Uint8Array(n.length);
    for (let o = 0; o < n.length; ++o)
        i[o] = n.charCodeAt(o);
    return i
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Sm = "fcm_token_details_db"
  , Nme = 5
  , S4 = "fcm_token_object_Store";
async function Lme(t) {
    if ("databases"in indexedDB && !(await indexedDB.databases()).map(o => o.name).includes(Sm))
        return null;
    let e = null;
    return (await I1(Sm, Nme, {
        upgrade: async (n, i, o, s) => {
            var a;
            if (i < 2 || !n.objectStoreNames.contains(S4))
                return;
            const l = s.objectStore(S4)
              , c = await l.index("fcmSenderId").get(t);
            if (await l.clear(),
            !!c) {
                if (i === 2) {
                    const u = c;
                    if (!u.auth || !u.p256dh || !u.endpoint)
                        return;
                    e = {
                        token: u.fcmToken,
                        createTime: (a = u.createTime) !== null && a !== void 0 ? a : Date.now(),
                        subscriptionOptions: {
                            auth: u.auth,
                            p256dh: u.p256dh,
                            endpoint: u.endpoint,
                            swScope: u.swScope,
                            vapidKey: typeof u.vapidKey == "string" ? u.vapidKey : zo(u.vapidKey)
                        }
                    }
                } else if (i === 3) {
                    const u = c;
                    e = {
                        token: u.fcmToken,
                        createTime: u.createTime,
                        subscriptionOptions: {
                            auth: zo(u.auth),
                            p256dh: zo(u.p256dh),
                            endpoint: u.endpoint,
                            swScope: u.swScope,
                            vapidKey: zo(u.vapidKey)
                        }
                    }
                } else if (i === 4) {
                    const u = c;
                    e = {
                        token: u.fcmToken,
                        createTime: u.createTime,
                        subscriptionOptions: {
                            auth: zo(u.auth),
                            p256dh: zo(u.p256dh),
                            endpoint: u.endpoint,
                            swScope: u.swScope,
                            vapidKey: zo(u.vapidKey)
                        }
                    }
                }
            }
        }
    })).close(),
    await bm(Sm),
    await bm("fcm_vapid_details_db"),
    await bm("undefined"),
    $me(e) ? e : null
}
function $me(t) {
    if (!t || !t.subscriptionOptions)
        return !1;
    const {subscriptionOptions: e} = t;
    return typeof t.createTime == "number" && t.createTime > 0 && typeof t.token == "string" && t.token.length > 0 && typeof e.auth == "string" && e.auth.length > 0 && typeof e.p256dh == "string" && e.p256dh.length > 0 && typeof e.endpoint == "string" && e.endpoint.length > 0 && typeof e.swScope == "string" && e.swScope.length > 0 && typeof e.vapidKey == "string" && e.vapidKey.length > 0
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Ume = "firebase-messaging-database"
  , Gme = 1
  , Ol = "firebase-messaging-store";
let Tm = null;
function hC() {
    return Tm || (Tm = I1(Ume, Gme, {
        upgrade: (t, e) => {
            switch (e) {
            case 0:
                t.createObjectStore(Ol)
            }
        }
    })),
    Tm
}
async function DR(t) {
    const e = pC(t)
      , n = await (await hC()).transaction(Ol).objectStore(Ol).get(e);
    if (n)
        return n;
    {
        const i = await Lme(t.appConfig.senderId);
        if (i)
            return await xC(t, i),
            i
    }
}
async function xC(t, e) {
    const r = pC(t)
      , i = (await hC()).transaction(Ol, "readwrite");
    return await i.objectStore(Ol).put(e, r),
    await i.done,
    e
}
async function Hme(t) {
    const e = pC(t)
      , n = (await hC()).transaction(Ol, "readwrite");
    await n.objectStore(Ol).delete(e),
    await n.done
}
function pC({appConfig: t}) {
    return t.appId
}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Vme = {
    "missing-app-config-values": 'Missing App configuration value: "{$valueName}"',
    "only-available-in-window": "This method is available in a Window context.",
    "only-available-in-sw": "This method is available in a service worker context.",
    "permission-default": "The notification permission was not granted and dismissed instead.",
    "permission-blocked": "The notification permission was not granted and blocked instead.",
    "unsupported-browser": "This browser doesn't support the API's required to use the Firebase SDK.",
    "indexed-db-unsupported": "This browser doesn't support indexedDb.open() (ex. Safari iFrame, Firefox Private Browsing, etc)",
    "failed-service-worker-registration": "We are unable to register the default service worker. {$browserErrorMessage}",
    "token-subscribe-failed": "A problem occurred while subscribing the user to FCM: {$errorInfo}",
    "token-subscribe-no-token": "FCM returned no token when subscribing the user to push.",
    "token-unsubscribe-failed": "A problem occurred while unsubscribing the user from FCM: {$errorInfo}",
    "token-update-failed": "A problem occurred while updating the user from FCM: {$errorInfo}",
    "token-update-no-token": "FCM returned no token when updating the user to push.",
    "use-sw-after-get-token": "The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",
    "invalid-sw-registration": "The input to useServiceWorker() must be a ServiceWorkerRegistration.",
    "invalid-bg-handler": "The input to setBackgroundMessageHandler() must be a function.",
    "invalid-vapid-key": "The public VAPID key must be a string.",
    "use-vapid-key-after-get-token": "The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used."
}
  , zr = new yd("messaging","Messaging",Vme);
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function zme(t, e) {
    const r = await mC(t)
      , n = PR(e)
      , i = {
        method: "POST",
        headers: r,
        body: JSON.stringify(n)
    };
    let o;
    try {
        o = await (await fetch(gC(t.appConfig), i)).json()
    } catch (s) {
        throw zr.create("token-subscribe-failed", {
            errorInfo: s == null ? void 0 : s.toString()
        })
    }
    if (o.error) {
        const s = o.error.message;
        throw zr.create("token-subscribe-failed", {
            errorInfo: s
        })
    }
    if (!o.token)
        throw zr.create("token-subscribe-no-token");
    return o.token
}
async function jme(t, e) {
    const r = await mC(t)
      , n = PR(e.subscriptionOptions)
      , i = {
        method: "PATCH",
        headers: r,
        body: JSON.stringify(n)
    };
    let o;
    try {
        o = await (await fetch(`${gC(t.appConfig)}/${e.token}`, i)).json()
    } catch (s) {
        throw zr.create("token-update-failed", {
            errorInfo: s == null ? void 0 : s.toString()
        })
    }
    if (o.error) {
        const s = o.error.message;
        throw zr.create("token-update-failed", {
            errorInfo: s
        })
    }
    if (!o.token)
        throw zr.create("token-update-no-token");
    return o.token
}
async function FR(t, e) {
    const n = {
        method: "DELETE",
        headers: await mC(t)
    };
    try {
        const o = await (await fetch(`${gC(t.appConfig)}/${e}`, n)).json();
        if (o.error) {
            const s = o.error.message;
            throw zr.create("token-unsubscribe-failed", {
                errorInfo: s
            })
        }
    } catch (i) {
        throw zr.create("token-unsubscribe-failed", {
            errorInfo: i == null ? void 0 : i.toString()
        })
    }
}
function gC({projectId: t}) {
    return `${Ime}/projects/${t}/registrations`
}
async function mC({appConfig: t, installations: e}) {
    const r = await e.getToken();
    return new Headers({
        "Content-Type": "application/json",
        Accept: "application/json",
        "x-goog-api-key": t.apiKey,
        "x-goog-firebase-installations-auth": `FIS ${r}`
    })
}
function PR({p256dh: t, auth: e, endpoint: r, vapidKey: n}) {
    const i = {
        web: {
            endpoint: r,
            auth: e,
            p256dh: t
        }
    };
    return n !== SR && (i.web.applicationPubKey = n),
    i
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Wme = 7 * 24 * 60 * 60 * 1e3;
async function Yme(t) {
    const e = await qme(t.swRegistration, t.vapidKey)
      , r = {
        vapidKey: t.vapidKey,
        swScope: t.swRegistration.scope,
        endpoint: e.endpoint,
        auth: zo(e.getKey("auth")),
        p256dh: zo(e.getKey("p256dh"))
    }
      , n = await DR(t.firebaseDependencies);
    if (n) {
        if (Zme(n.subscriptionOptions, r))
            return Date.now() >= n.createTime + Wme ? Kme(t, {
                token: n.token,
                createTime: Date.now(),
                subscriptionOptions: r
            }) : n.token;
        try {
            await FR(t.firebaseDependencies, n.token)
        } catch (i) {
            console.warn(i)
        }
        return T4(t.firebaseDependencies, r)
    } else
        return T4(t.firebaseDependencies, r)
}
async function Xme(t) {
    const e = await DR(t.firebaseDependencies);
    e && (await FR(t.firebaseDependencies, e.token),
    await Hme(t.firebaseDependencies));
    const r = await t.swRegistration.pushManager.getSubscription();
    return r ? r.unsubscribe() : !0
}
async function Kme(t, e) {
    try {
        const r = await jme(t.firebaseDependencies, e)
          , n = Object.assign(Object.assign({}, e), {
            token: r,
            createTime: Date.now()
        });
        return await xC(t.firebaseDependencies, n),
        r
    } catch (r) {
        throw r
    }
}
async function T4(t, e) {
    const n = {
        token: await zme(t, e),
        createTime: Date.now(),
        subscriptionOptions: e
    };
    return await xC(t, n),
    n.token
}
async function qme(t, e) {
    const r = await t.pushManager.getSubscription();
    return r || t.pushManager.subscribe({
        userVisibleOnly: !0,
        applicationServerKey: Mme(e)
    })
}
function Zme(t, e) {
    const r = e.vapidKey === t.vapidKey
      , n = e.endpoint === t.endpoint
      , i = e.auth === t.auth
      , o = e.p256dh === t.p256dh;
    return r && n && i && o
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function D4(t) {
    const e = {
        from: t.from,
        collapseKey: t.collapse_key,
        messageId: t.fcmMessageId
    };
    return Jme(e, t),
    Qme(e, t),
    eve(e, t),
    e
}
function Jme(t, e) {
    if (!e.notification)
        return;
    t.notification = {};
    const r = e.notification.title;
    r && (t.notification.title = r);
    const n = e.notification.body;
    n && (t.notification.body = n);
    const i = e.notification.image;
    i && (t.notification.image = i);
    const o = e.notification.icon;
    o && (t.notification.icon = o)
}
function Qme(t, e) {
    e.data && (t.data = e.data)
}
function eve(t, e) {
    var r, n, i, o, s;
    if (!e.fcmOptions && !(!((r = e.notification) === null || r === void 0) && r.click_action))
        return;
    t.fcmOptions = {};
    const a = (i = (n = e.fcmOptions) === null || n === void 0 ? void 0 : n.link) !== null && i !== void 0 ? i : (o = e.notification) === null || o === void 0 ? void 0 : o.click_action;
    a && (t.fcmOptions.link = a);
    const l = (s = e.fcmOptions) === null || s === void 0 ? void 0 : s.analytics_label;
    l && (t.fcmOptions.analyticsLabel = l)
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function tve(t) {
    return typeof t == "object" && !!t && TR in t
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
rve("AzSCbw63g1R0nCw85jG8", "Iaya3yLKwmgvh7cF0q4");
function rve(t, e) {
    const r = [];
    for (let n = 0; n < t.length; n++)
        r.push(t.charAt(n)),
        n < e.length && r.push(e.charAt(n));
    return r.join("")
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function nve(t) {
    if (!t || !t.options)
        throw Dm("App Configuration Object");
    if (!t.name)
        throw Dm("App Name");
    const e = ["projectId", "apiKey", "appId", "messagingSenderId"]
      , {options: r} = t;
    for (const n of e)
        if (!r[n])
            throw Dm(n);
    return {
        appName: t.name,
        projectId: r.projectId,
        apiKey: r.apiKey,
        appId: r.appId,
        senderId: r.messagingSenderId
    }
}
function Dm(t) {
    return zr.create("missing-app-config-values", {
        valueName: t
    })
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
class ive {
    constructor(e, r, n) {
        this.deliveryMetricsExportedToBigQueryEnabled = !1,
        this.onBackgroundMessageHandler = null,
        this.onMessageHandler = null,
        this.logEvents = [],
        this.isLogServiceStarted = !1;
        const i = nve(e);
        this.firebaseDependencies = {
            app: e,
            appConfig: i,
            installations: r,
            analyticsProvider: n
        }
    }
    _delete() {
        return Promise.resolve()
    }
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function IR(t) {
    try {
        t.swRegistration = await navigator.serviceWorker.register(Fme, {
            scope: Pme
        }),
        t.swRegistration.update().catch( () => {}
        ),
        await ove(t.swRegistration)
    } catch (e) {
        throw zr.create("failed-service-worker-registration", {
            browserErrorMessage: e == null ? void 0 : e.message
        })
    }
}
async function ove(t) {
    return new Promise( (e, r) => {
        const n = setTimeout( () => r(new Error(`Service worker not registered after ${w4} ms`)), w4)
          , i = t.installing || t.waiting;
        t.active ? (clearTimeout(n),
        e()) : i ? i.onstatechange = o => {
            var s;
            ((s = o.target) === null || s === void 0 ? void 0 : s.state) === "activated" && (i.onstatechange = null,
            clearTimeout(n),
            e())
        }
        : (clearTimeout(n),
        r(new Error("No incoming service worker found.")))
    }
    )
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function sve(t, e) {
    if (!e && !t.swRegistration && await IR(t),
    !(!e && t.swRegistration)) {
        if (!(e instanceof ServiceWorkerRegistration))
            throw zr.create("invalid-sw-registration");
        t.swRegistration = e
    }
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function ave(t, e) {
    e ? t.vapidKey = e : t.vapidKey || (t.vapidKey = SR)
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function OR(t, e) {
    if (!navigator)
        throw zr.create("only-available-in-window");
    if (Notification.permission === "default" && await Notification.requestPermission(),
    Notification.permission !== "granted")
        throw zr.create("permission-blocked");
    return await ave(t, e == null ? void 0 : e.vapidKey),
    await sve(t, e == null ? void 0 : e.serviceWorkerRegistration),
    Yme(t)
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function lve(t, e, r) {
    const n = cve(e);
    (await t.firebaseDependencies.analyticsProvider.get()).logEvent(n, {
        message_id: r[TR],
        message_name: r[Ome],
        message_time: r[kme],
        message_device_time: Math.floor(Date.now() / 1e3)
    })
}
function cve(t) {
    switch (t) {
    case Rf.NOTIFICATION_CLICKED:
        return "notification_open";
    case Rf.PUSH_RECEIVED:
        return "notification_foreground";
    default:
        throw new Error
    }
}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function uve(t, e) {
    const r = e.data;
    if (!r.isFirebaseMessaging)
        return;
    t.onMessageHandler && r.messageType === Rf.PUSH_RECEIVED && (typeof t.onMessageHandler == "function" ? t.onMessageHandler(D4(r)) : t.onMessageHandler.next(D4(r)));
    const n = r.data;
    tve(n) && n[Rme] === "1" && await lve(t, r.messageType, n)
}
const F4 = "@firebase/messaging"
  , P4 = "0.12.22";
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const fve = t => {
    const e = new ive(t.getProvider("app").getImmediate(),t.getProvider("installations-internal").getImmediate(),t.getProvider("analytics-internal"));
    return navigator.serviceWorker.addEventListener("message", r => uve(e, r)),
    e
}
  , dve = t => {
    const e = t.getProvider("messaging").getImmediate();
    return {
        getToken: n => OR(e, n)
    }
}
;
function hve() {
    So(new Bo("messaging",fve,"PUBLIC")),
    So(new Bo("messaging-internal",dve,"PRIVATE")),
    vi(F4, P4),
    vi(F4, P4, "esm2017")
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function kR() {
    try {
        await P1()
    } catch {
        return !1
    }
    return typeof window < "u" && F1() && oC() && "serviceWorker"in navigator && "PushManager"in window && "Notification"in window && "fetch"in window && ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification") && PushSubscription.prototype.hasOwnProperty("getKey")
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function xve(t) {
    if (!navigator)
        throw zr.create("only-available-in-window");
    return t.swRegistration || await IR(t),
    Xme(t)
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function pve(t, e) {
    if (!navigator)
        throw zr.create("only-available-in-window");
    return t.onMessageHandler = e,
    () => {
        t.onMessageHandler = null
    }
}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function gve(t=lC()) {
    return kR().then(e => {
        if (!e)
            throw zr.create("unsupported-browser")
    }
    , e => {
        throw zr.create("indexed-db-unsupported")
    }
    ),
    Yl(Xi(t), "messaging").getImmediate()
}
async function mve(t, e) {
    return t = Xi(t),
    OR(t, e)
}
function vve(t) {
    return t = Xi(t),
    xve(t)
}
function yve(t, e) {
    return t = Xi(t),
    pve(t, e)
}
hve();
const m5e = Object.freeze(Object.defineProperty({
    __proto__: null,
    deleteToken: vve,
    getMessaging: gve,
    getToken: mve,
    isSupported: kR,
    onMessage: yve
}, Symbol.toStringTag, {
    value: "Module"
}));
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Qx = "analytics"
  , Eve = "firebase_id"
  , _ve = "origin"
  , bve = 60 * 1e3
  , Cve = "https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig"
  , vC = "https://www.googletagmanager.com/gtag/js";
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Mr = new eR("@firebase/analytics");
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Ave = {
    "already-exists": "A Firebase Analytics instance with the appId {$id}  already exists. Only one Firebase Analytics instance can be created for each appId.",
    "already-initialized": "initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-initialized instance.",
    "already-initialized-settings": "Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.",
    "interop-component-reg-failed": "Firebase Analytics Interop Component failed to instantiate: {$reason}",
    "invalid-analytics-context": "Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}",
    "indexeddb-unavailable": "IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}",
    "fetch-throttle": "The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.",
    "config-fetch-failed": "Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}",
    "no-api-key": 'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',
    "no-app-id": 'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',
    "no-client-id": 'The "client_id" field is empty.',
    "invalid-gtag-resource": "Trusted Types detected an invalid gtag resource: {$gtagURL}."
}
  , mn = new yd("analytics","Analytics",Ave);
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function wve(t) {
    if (!t.startsWith(vC)) {
        const e = mn.create("invalid-gtag-resource", {
            gtagURL: t
        });
        return Mr.warn(e.message),
        ""
    }
    return t
}
function RR(t) {
    return Promise.all(t.map(e => e.catch(r => r)))
}
function Bve(t, e) {
    let r;
    return window.trustedTypes && (r = window.trustedTypes.createPolicy(t, e)),
    r
}
function Sve(t, e) {
    const r = Bve("firebase-js-sdk-policy", {
        createScriptURL: wve
    })
      , n = document.createElement("script")
      , i = `${vC}?l=${t}&id=${e}`;
    n.src = r ? r == null ? void 0 : r.createScriptURL(i) : i,
    n.async = !0,
    document.head.appendChild(n)
}
function Tve(t) {
    let e = [];
    return Array.isArray(window[t]) ? e = window[t] : window[t] = e,
    e
}
async function Dve(t, e, r, n, i, o) {
    const s = n[i];
    try {
        if (s)
            await e[s];
        else {
            const l = (await RR(r)).find(c => c.measurementId === i);
            l && await e[l.appId]
        }
    } catch (a) {
        Mr.error(a)
    }
    t("config", i, o)
}
async function Fve(t, e, r, n, i) {
    try {
        let o = [];
        if (i && i.send_to) {
            let s = i.send_to;
            Array.isArray(s) || (s = [s]);
            const a = await RR(r);
            for (const l of s) {
                const c = a.find(f => f.measurementId === l)
                  , u = c && e[c.appId];
                if (u)
                    o.push(u);
                else {
                    o = [];
                    break
                }
            }
        }
        o.length === 0 && (o = Object.values(e)),
        await Promise.all(o),
        t("event", n, i || {})
    } catch (o) {
        Mr.error(o)
    }
}
function Pve(t, e, r, n) {
    async function i(o, ...s) {
        try {
            if (o === "event") {
                const [a,l] = s;
                await Fve(t, e, r, a, l)
            } else if (o === "config") {
                const [a,l] = s;
                await Dve(t, e, r, n, a, l)
            } else if (o === "consent") {
                const [a,l] = s;
                t("consent", a, l)
            } else if (o === "get") {
                const [a,l,c] = s;
                t("get", a, l, c)
            } else if (o === "set") {
                const [a] = s;
                t("set", a)
            } else
                t(o, ...s)
        } catch (a) {
            Mr.error(a)
        }
    }
    return i
}
function Ive(t, e, r, n, i) {
    let o = function(...s) {
        window[n].push(arguments)
    };
    return window[i] && typeof window[i] == "function" && (o = window[i]),
    window[i] = Pve(o, t, e, r),
    {
        gtagCore: o,
        wrappedGtag: window[i]
    }
}
function Ove(t) {
    const e = window.document.getElementsByTagName("script");
    for (const r of Object.values(e))
        if (r.src && r.src.includes(vC) && r.src.includes(t))
            return r;
    return null
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const kve = 30
  , Rve = 1e3;
class Mve {
    constructor(e={}, r=Rve) {
        this.throttleMetadata = e,
        this.intervalMillis = r
    }
    getThrottleMetadata(e) {
        return this.throttleMetadata[e]
    }
    setThrottleMetadata(e, r) {
        this.throttleMetadata[e] = r
    }
    deleteThrottleMetadata(e) {
        delete this.throttleMetadata[e]
    }
}
const MR = new Mve;
function Nve(t) {
    return new Headers({
        Accept: "application/json",
        "x-goog-api-key": t
    })
}
async function Lve(t) {
    var e;
    const {appId: r, apiKey: n} = t
      , i = {
        method: "GET",
        headers: Nve(n)
    }
      , o = Cve.replace("{app-id}", r)
      , s = await fetch(o, i);
    if (s.status !== 200 && s.status !== 304) {
        let a = "";
        try {
            const l = await s.json();
            !((e = l.error) === null || e === void 0) && e.message && (a = l.error.message)
        } catch {}
        throw mn.create("config-fetch-failed", {
            httpStatus: s.status,
            responseMessage: a
        })
    }
    return s.json()
}
async function $ve(t, e=MR, r) {
    const {appId: n, apiKey: i, measurementId: o} = t.options;
    if (!n)
        throw mn.create("no-app-id");
    if (!i) {
        if (o)
            return {
                measurementId: o,
                appId: n
            };
        throw mn.create("no-api-key")
    }
    const s = e.getThrottleMetadata(n) || {
        backoffCount: 0,
        throttleEndTimeMillis: Date.now()
    }
      , a = new Hve;
    return setTimeout(async () => {
        a.abort()
    }
    , r !== void 0 ? r : bve),
    NR({
        appId: n,
        apiKey: i,
        measurementId: o
    }, s, a, e)
}
async function NR(t, {throttleEndTimeMillis: e, backoffCount: r}, n, i=MR) {
    var o;
    const {appId: s, measurementId: a} = t;
    try {
        await Uve(n, e)
    } catch (l) {
        if (a)
            return Mr.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${a} provided in the "measurementId" field in the local Firebase config. [${l == null ? void 0 : l.message}]`),
            {
                appId: s,
                measurementId: a
            };
        throw l
    }
    try {
        const l = await Lve(t);
        return i.deleteThrottleMetadata(s),
        l
    } catch (l) {
        const c = l;
        if (!Gve(c)) {
            if (i.deleteThrottleMetadata(s),
            a)
                return Mr.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${a} provided in the "measurementId" field in the local Firebase config. [${c == null ? void 0 : c.message}]`),
                {
                    appId: s,
                    measurementId: a
                };
            throw l
        }
        const u = Number((o = c == null ? void 0 : c.customData) === null || o === void 0 ? void 0 : o.httpStatus) === 503 ? p4(r, i.intervalMillis, kve) : p4(r, i.intervalMillis)
          , f = {
            throttleEndTimeMillis: Date.now() + u,
            backoffCount: r + 1
        };
        return i.setThrottleMetadata(s, f),
        Mr.debug(`Calling attemptFetch again in ${u} millis`),
        NR(t, f, n, i)
    }
}
function Uve(t, e) {
    return new Promise( (r, n) => {
        const i = Math.max(e - Date.now(), 0)
          , o = setTimeout(r, i);
        t.addEventListener( () => {
            clearTimeout(o),
            n(mn.create("fetch-throttle", {
                throttleEndTimeMillis: e
            }))
        }
        )
    }
    )
}
function Gve(t) {
    if (!(t instanceof Aa) || !t.customData)
        return !1;
    const e = Number(t.customData.httpStatus);
    return e === 429 || e === 500 || e === 503 || e === 504
}
class Hve {
    constructor() {
        this.listeners = []
    }
    addEventListener(e) {
        this.listeners.push(e)
    }
    abort() {
        this.listeners.forEach(e => e())
    }
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
let NE;
async function Vve(t, e, r, n, i) {
    if (i && i.global) {
        t("event", r, n);
        return
    } else {
        const o = await e
          , s = Object.assign(Object.assign({}, n), {
            send_to: o
        });
        t("event", r, s)
    }
}
async function zve(t, e, r, n) {
    if (n && n.global)
        return t("set", {
            screen_name: r
        }),
        Promise.resolve();
    {
        const i = await e;
        t("config", i, {
            update: !0,
            screen_name: r
        })
    }
}
async function jve(t, e, r, n) {
    if (n && n.global)
        return t("set", {
            user_id: r
        }),
        Promise.resolve();
    {
        const i = await e;
        t("config", i, {
            update: !0,
            user_id: r
        })
    }
}
async function Wve(t, e, r, n) {
    if (n && n.global) {
        const i = {};
        for (const o of Object.keys(r))
            i[`user_properties.${o}`] = r[o];
        return t("set", i),
        Promise.resolve()
    } else {
        const i = await e;
        t("config", i, {
            update: !0,
            user_properties: r
        })
    }
}
async function Yve(t, e) {
    const r = await e;
    return new Promise( (n, i) => {
        t("get", r, "client_id", o => {
            o || i(mn.create("no-client-id")),
            n(o)
        }
        )
    }
    )
}
async function Xve(t, e) {
    const r = await t;
    window[`ga-disable-${r}`] = !e
}
let LE;
function LR(t) {
    LE = t
}
function $R(t) {
    NE = t
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function Kve() {
    if (F1())
        try {
            await P1()
        } catch (t) {
            return Mr.warn(mn.create("indexeddb-unavailable", {
                errorInfo: t == null ? void 0 : t.toString()
            }).message),
            !1
        }
    else
        return Mr.warn(mn.create("indexeddb-unavailable", {
            errorInfo: "IndexedDB is not available in this environment."
        }).message),
        !1;
    return !0
}
async function qve(t, e, r, n, i, o, s) {
    var a;
    const l = $ve(t);
    l.then(h => {
        r[h.measurementId] = h.appId,
        t.options.measurementId && h.measurementId !== t.options.measurementId && Mr.warn(`The measurement ID in the local Firebase config (${t.options.measurementId}) does not match the measurement ID fetched from the server (${h.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)
    }
    ).catch(h => Mr.error(h)),
    e.push(l);
    const c = Kve().then(h => {
        if (h)
            return n.getId()
    }
    )
      , [u,f] = await Promise.all([l, c]);
    Ove(o) || Sve(o, u.measurementId),
    LE && (i("consent", "default", LE),
    LR(void 0)),
    i("js", new Date);
    const d = (a = s == null ? void 0 : s.config) !== null && a !== void 0 ? a : {};
    return d[_ve] = "firebase",
    d.update = !0,
    f != null && (d[Eve] = f),
    i("config", u.measurementId, d),
    NE && (i("set", NE),
    $R(void 0)),
    u.measurementId
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
class Zve {
    constructor(e) {
        this.app = e
    }
    _delete() {
        return delete mo[this.app.options.appId],
        Promise.resolve()
    }
}
let mo = {}
  , I4 = [];
const O4 = {};
let sx = "dataLayer", UR = "gtag", k4, To, $E = !1;
function Jve(t) {
    if ($E)
        throw mn.create("already-initialized");
    t.dataLayerName && (sx = t.dataLayerName),
    t.gtagName && (UR = t.gtagName)
}
function Qve() {
    const t = [];
    if (Zk() && t.push("This is a browser extension environment."),
    oC() || t.push("Cookies are not available."),
    t.length > 0) {
        const e = t.map( (n, i) => `(${i + 1}) ${n}`).join(" ")
          , r = mn.create("invalid-analytics-context", {
            errorInfo: e
        });
        Mr.warn(r.message)
    }
}
function eye(t, e, r) {
    Qve();
    const n = t.options.appId;
    if (!n)
        throw mn.create("no-app-id");
    if (!t.options.apiKey)
        if (t.options.measurementId)
            Mr.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${t.options.measurementId} provided in the "measurementId" field in the local Firebase config.`);
        else
            throw mn.create("no-api-key");
    if (mo[n] != null)
        throw mn.create("already-exists", {
            id: n
        });
    if (!$E) {
        Tve(sx);
        const {wrappedGtag: o, gtagCore: s} = Ive(mo, I4, O4, sx, UR);
        To = o,
        k4 = s,
        $E = !0
    }
    return mo[n] = qve(t, I4, O4, e, k4, sx, r),
    new Zve(t)
}
function tye(t=lC()) {
    t = Xi(t);
    const e = Yl(t, Qx);
    return e.isInitialized() ? e.getImmediate() : GR(t)
}
function GR(t, e={}) {
    const r = Yl(t, Qx);
    if (r.isInitialized()) {
        const i = r.getImmediate();
        if (qx(e, r.getOptions()))
            return i;
        throw mn.create("already-initialized")
    }
    return r.initialize({
        options: e
    })
}
async function rye() {
    if (Zk() || !oC() || !F1())
        return !1;
    try {
        return await P1()
    } catch {
        return !1
    }
}
function nye(t, e, r) {
    t = Xi(t),
    zve(To, mo[t.app.options.appId], e, r).catch(n => Mr.error(n))
}
async function iye(t) {
    return t = Xi(t),
    Yve(To, mo[t.app.options.appId])
}
function oye(t, e, r) {
    t = Xi(t),
    jve(To, mo[t.app.options.appId], e, r).catch(n => Mr.error(n))
}
function sye(t, e, r) {
    t = Xi(t),
    Wve(To, mo[t.app.options.appId], e, r).catch(n => Mr.error(n))
}
function aye(t, e) {
    t = Xi(t),
    Xve(mo[t.app.options.appId], e).catch(r => Mr.error(r))
}
function lye(t) {
    To ? To("set", t) : $R(t)
}
function HR(t, e, r, n) {
    t = Xi(t),
    Vve(To, mo[t.app.options.appId], e, r, n).catch(i => Mr.error(i))
}
function cye(t) {
    To ? To("consent", "update", t) : LR(t)
}
const R4 = "@firebase/analytics"
  , M4 = "0.10.17";
function uye() {
    So(new Bo(Qx, (e, {options: r}) => {
        const n = e.getProvider("app").getImmediate()
          , i = e.getProvider("installations-internal").getImmediate();
        return eye(n, i, r)
    }
    ,"PUBLIC")),
    So(new Bo("analytics-internal",t,"PRIVATE")),
    vi(R4, M4),
    vi(R4, M4, "esm2017");
    function t(e) {
        try {
            const r = e.getProvider(Qx).getImmediate();
            return {
                logEvent: (n, i, o) => HR(r, n, i, o)
            }
        } catch (r) {
            throw mn.create("interop-component-reg-failed", {
                reason: r
            })
        }
    }
}
uye();
const v5e = Object.freeze(Object.defineProperty({
    __proto__: null,
    getAnalytics: tye,
    getGoogleAnalyticsClientId: iye,
    initializeAnalytics: GR,
    isSupported: rye,
    logEvent: HR,
    setAnalyticsCollectionEnabled: aye,
    setConsent: cye,
    setCurrentScreen: nye,
    setDefaultEventParameters: lye,
    setUserId: oye,
    setUserProperties: sye,
    settings: Jve
}, Symbol.toStringTag, {
    value: "Module"
}));
var Ed = {}
  , fye = function() {
    return typeof Promise == "function" && Promise.prototype && Promise.prototype.then
}
  , VR = {}
  , ei = {};
let yC;
const dye = [0, 26, 44, 70, 100, 134, 172, 196, 242, 292, 346, 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085, 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185, 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706];
ei.getSymbolSize = function(e) {
    if (!e)
        throw new Error('"version" cannot be null or undefined');
    if (e < 1 || e > 40)
        throw new Error('"version" should be in range from 1 to 40');
    return e * 4 + 17
}
;
ei.getSymbolTotalCodewords = function(e) {
    return dye[e]
}
;
ei.getBCHDigit = function(t) {
    let e = 0;
    for (; t !== 0; )
        e++,
        t >>>= 1;
    return e
}
;
ei.setToSJISFunction = function(e) {
    if (typeof e != "function")
        throw new Error('"toSJISFunc" is not a valid function.');
    yC = e
}
;
ei.isKanjiModeEnabled = function() {
    return typeof yC < "u"
}
;
ei.toSJIS = function(e) {
    return yC(e)
}
;
var R1 = {};
(function(t) {
    t.L = {
        bit: 1
    },
    t.M = {
        bit: 0
    },
    t.Q = {
        bit: 3
    },
    t.H = {
        bit: 2
    };
    function e(r) {
        if (typeof r != "string")
            throw new Error("Param is not a string");
        switch (r.toLowerCase()) {
        case "l":
        case "low":
            return t.L;
        case "m":
        case "medium":
            return t.M;
        case "q":
        case "quartile":
            return t.Q;
        case "h":
        case "high":
            return t.H;
        default:
            throw new Error("Unknown EC Level: " + r)
        }
    }
    t.isValid = function(n) {
        return n && typeof n.bit < "u" && n.bit >= 0 && n.bit < 4
    }
    ,
    t.from = function(n, i) {
        if (t.isValid(n))
            return n;
        try {
            return e(n)
        } catch {
            return i
        }
    }
}
)(R1);
function zR() {
    this.buffer = [],
    this.length = 0
}
zR.prototype = {
    get: function(t) {
        const e = Math.floor(t / 8);
        return (this.buffer[e] >>> 7 - t % 8 & 1) === 1
    },
    put: function(t, e) {
        for (let r = 0; r < e; r++)
            this.putBit((t >>> e - r - 1 & 1) === 1)
    },
    getLengthInBits: function() {
        return this.length
    },
    putBit: function(t) {
        const e = Math.floor(this.length / 8);
        this.buffer.length <= e && this.buffer.push(0),
        t && (this.buffer[e] |= 128 >>> this.length % 8),
        this.length++
    }
};
var hye = zR;
function _d(t) {
    if (!t || t < 1)
        throw new Error("BitMatrix size must be defined and greater than 0");
    this.size = t,
    this.data = new Uint8Array(t * t),
    this.reservedBit = new Uint8Array(t * t)
}
_d.prototype.set = function(t, e, r, n) {
    const i = t * this.size + e;
    this.data[i] = r,
    n && (this.reservedBit[i] = !0)
}
;
_d.prototype.get = function(t, e) {
    return this.data[t * this.size + e]
}
;
_d.prototype.xor = function(t, e, r) {
    this.data[t * this.size + e] ^= r
}
;
_d.prototype.isReserved = function(t, e) {
    return this.reservedBit[t * this.size + e]
}
;
var xye = _d
  , jR = {};
(function(t) {
    const e = ei.getSymbolSize;
    t.getRowColCoords = function(n) {
        if (n === 1)
            return [];
        const i = Math.floor(n / 7) + 2
          , o = e(n)
          , s = o === 145 ? 26 : Math.ceil((o - 13) / (2 * i - 2)) * 2
          , a = [o - 7];
        for (let l = 1; l < i - 1; l++)
            a[l] = a[l - 1] - s;
        return a.push(6),
        a.reverse()
    }
    ,
    t.getPositions = function(n) {
        const i = []
          , o = t.getRowColCoords(n)
          , s = o.length;
        for (let a = 0; a < s; a++)
            for (let l = 0; l < s; l++)
                a === 0 && l === 0 || a === 0 && l === s - 1 || a === s - 1 && l === 0 || i.push([o[a], o[l]]);
        return i
    }
}
)(jR);
var WR = {};
const pye = ei.getSymbolSize
  , N4 = 7;
WR.getPositions = function(e) {
    const r = pye(e);
    return [[0, 0], [r - N4, 0], [0, r - N4]]
}
;
var YR = {};
(function(t) {
    t.Patterns = {
        PATTERN000: 0,
        PATTERN001: 1,
        PATTERN010: 2,
        PATTERN011: 3,
        PATTERN100: 4,
        PATTERN101: 5,
        PATTERN110: 6,
        PATTERN111: 7
    };
    const e = {
        N1: 3,
        N2: 3,
        N3: 40,
        N4: 10
    };
    t.isValid = function(i) {
        return i != null && i !== "" && !isNaN(i) && i >= 0 && i <= 7
    }
    ,
    t.from = function(i) {
        return t.isValid(i) ? parseInt(i, 10) : void 0
    }
    ,
    t.getPenaltyN1 = function(i) {
        const o = i.size;
        let s = 0
          , a = 0
          , l = 0
          , c = null
          , u = null;
        for (let f = 0; f < o; f++) {
            a = l = 0,
            c = u = null;
            for (let d = 0; d < o; d++) {
                let h = i.get(f, d);
                h === c ? a++ : (a >= 5 && (s += e.N1 + (a - 5)),
                c = h,
                a = 1),
                h = i.get(d, f),
                h === u ? l++ : (l >= 5 && (s += e.N1 + (l - 5)),
                u = h,
                l = 1)
            }
            a >= 5 && (s += e.N1 + (a - 5)),
            l >= 5 && (s += e.N1 + (l - 5))
        }
        return s
    }
    ,
    t.getPenaltyN2 = function(i) {
        const o = i.size;
        let s = 0;
        for (let a = 0; a < o - 1; a++)
            for (let l = 0; l < o - 1; l++) {
                const c = i.get(a, l) + i.get(a, l + 1) + i.get(a + 1, l) + i.get(a + 1, l + 1);
                (c === 4 || c === 0) && s++
            }
        return s * e.N2
    }
    ,
    t.getPenaltyN3 = function(i) {
        const o = i.size;
        let s = 0
          , a = 0
          , l = 0;
        for (let c = 0; c < o; c++) {
            a = l = 0;
            for (let u = 0; u < o; u++)
                a = a << 1 & 2047 | i.get(c, u),
                u >= 10 && (a === 1488 || a === 93) && s++,
                l = l << 1 & 2047 | i.get(u, c),
                u >= 10 && (l === 1488 || l === 93) && s++
        }
        return s * e.N3
    }
    ,
    t.getPenaltyN4 = function(i) {
        let o = 0;
        const s = i.data.length;
        for (let l = 0; l < s; l++)
            o += i.data[l];
        return Math.abs(Math.ceil(o * 100 / s / 5) - 10) * e.N4
    }
    ;
    function r(n, i, o) {
        switch (n) {
        case t.Patterns.PATTERN000:
            return (i + o) % 2 === 0;
        case t.Patterns.PATTERN001:
            return i % 2 === 0;
        case t.Patterns.PATTERN010:
            return o % 3 === 0;
        case t.Patterns.PATTERN011:
            return (i + o) % 3 === 0;
        case t.Patterns.PATTERN100:
            return (Math.floor(i / 2) + Math.floor(o / 3)) % 2 === 0;
        case t.Patterns.PATTERN101:
            return i * o % 2 + i * o % 3 === 0;
        case t.Patterns.PATTERN110:
            return (i * o % 2 + i * o % 3) % 2 === 0;
        case t.Patterns.PATTERN111:
            return (i * o % 3 + (i + o) % 2) % 2 === 0;
        default:
            throw new Error("bad maskPattern:" + n)
        }
    }
    t.applyMask = function(i, o) {
        const s = o.size;
        for (let a = 0; a < s; a++)
            for (let l = 0; l < s; l++)
                o.isReserved(l, a) || o.xor(l, a, r(i, l, a))
    }
    ,
    t.getBestMask = function(i, o) {
        const s = Object.keys(t.Patterns).length;
        let a = 0
          , l = 1 / 0;
        for (let c = 0; c < s; c++) {
            o(c),
            t.applyMask(c, i);
            const u = t.getPenaltyN1(i) + t.getPenaltyN2(i) + t.getPenaltyN3(i) + t.getPenaltyN4(i);
            t.applyMask(c, i),
            u < l && (l = u,
            a = c)
        }
        return a
    }
}
)(YR);
var M1 = {};
const Ws = R1
  , Sh = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 4, 1, 2, 4, 4, 2, 4, 4, 4, 2, 4, 6, 5, 2, 4, 6, 6, 2, 5, 8, 8, 4, 5, 8, 8, 4, 5, 8, 11, 4, 8, 10, 11, 4, 9, 12, 16, 4, 9, 16, 16, 6, 10, 12, 18, 6, 10, 17, 16, 6, 11, 16, 19, 6, 13, 18, 21, 7, 14, 21, 25, 8, 16, 20, 25, 8, 17, 23, 25, 9, 17, 23, 34, 9, 18, 25, 30, 10, 20, 27, 32, 12, 21, 29, 35, 12, 23, 34, 37, 12, 25, 34, 40, 13, 26, 35, 42, 14, 28, 38, 45, 15, 29, 40, 48, 16, 31, 43, 51, 17, 33, 45, 54, 18, 35, 48, 57, 19, 37, 51, 60, 19, 38, 53, 63, 20, 40, 56, 66, 21, 43, 59, 70, 22, 45, 62, 74, 24, 47, 65, 77, 25, 49, 68, 81]
  , Th = [7, 10, 13, 17, 10, 16, 22, 28, 15, 26, 36, 44, 20, 36, 52, 64, 26, 48, 72, 88, 36, 64, 96, 112, 40, 72, 108, 130, 48, 88, 132, 156, 60, 110, 160, 192, 72, 130, 192, 224, 80, 150, 224, 264, 96, 176, 260, 308, 104, 198, 288, 352, 120, 216, 320, 384, 132, 240, 360, 432, 144, 280, 408, 480, 168, 308, 448, 532, 180, 338, 504, 588, 196, 364, 546, 650, 224, 416, 600, 700, 224, 442, 644, 750, 252, 476, 690, 816, 270, 504, 750, 900, 300, 560, 810, 960, 312, 588, 870, 1050, 336, 644, 952, 1110, 360, 700, 1020, 1200, 390, 728, 1050, 1260, 420, 784, 1140, 1350, 450, 812, 1200, 1440, 480, 868, 1290, 1530, 510, 924, 1350, 1620, 540, 980, 1440, 1710, 570, 1036, 1530, 1800, 570, 1064, 1590, 1890, 600, 1120, 1680, 1980, 630, 1204, 1770, 2100, 660, 1260, 1860, 2220, 720, 1316, 1950, 2310, 750, 1372, 2040, 2430];
M1.getBlocksCount = function(e, r) {
    switch (r) {
    case Ws.L:
        return Sh[(e - 1) * 4 + 0];
    case Ws.M:
        return Sh[(e - 1) * 4 + 1];
    case Ws.Q:
        return Sh[(e - 1) * 4 + 2];
    case Ws.H:
        return Sh[(e - 1) * 4 + 3];
    default:
        return
    }
}
;
M1.getTotalCodewordsCount = function(e, r) {
    switch (r) {
    case Ws.L:
        return Th[(e - 1) * 4 + 0];
    case Ws.M:
        return Th[(e - 1) * 4 + 1];
    case Ws.Q:
        return Th[(e - 1) * 4 + 2];
    case Ws.H:
        return Th[(e - 1) * 4 + 3];
    default:
        return
    }
}
;
var XR = {}
  , N1 = {};
const K0 = new Uint8Array(512)
  , ep = new Uint8Array(256);
(function() {
    let e = 1;
    for (let r = 0; r < 255; r++)
        K0[r] = e,
        ep[e] = r,
        e <<= 1,
        e & 256 && (e ^= 285);
    for (let r = 255; r < 512; r++)
        K0[r] = K0[r - 255]
}
)();
N1.log = function(e) {
    if (e < 1)
        throw new Error("log(" + e + ")");
    return ep[e]
}
;
N1.exp = function(e) {
    return K0[e]
}
;
N1.mul = function(e, r) {
    return e === 0 || r === 0 ? 0 : K0[ep[e] + ep[r]]
}
;
(function(t) {
    const e = N1;
    t.mul = function(n, i) {
        const o = new Uint8Array(n.length + i.length - 1);
        for (let s = 0; s < n.length; s++)
            for (let a = 0; a < i.length; a++)
                o[s + a] ^= e.mul(n[s], i[a]);
        return o
    }
    ,
    t.mod = function(n, i) {
        let o = new Uint8Array(n);
        for (; o.length - i.length >= 0; ) {
            const s = o[0];
            for (let l = 0; l < i.length; l++)
                o[l] ^= e.mul(i[l], s);
            let a = 0;
            for (; a < o.length && o[a] === 0; )
                a++;
            o = o.slice(a)
        }
        return o
    }
    ,
    t.generateECPolynomial = function(n) {
        let i = new Uint8Array([1]);
        for (let o = 0; o < n; o++)
            i = t.mul(i, new Uint8Array([1, e.exp(o)]));
        return i
    }
}
)(XR);
const KR = XR;
function EC(t) {
    this.genPoly = void 0,
    this.degree = t,
    this.degree && this.initialize(this.degree)
}
EC.prototype.initialize = function(e) {
    this.degree = e,
    this.genPoly = KR.generateECPolynomial(this.degree)
}
;
EC.prototype.encode = function(e) {
    if (!this.genPoly)
        throw new Error("Encoder not initialized");
    const r = new Uint8Array(e.length + this.degree);
    r.set(e);
    const n = KR.mod(r, this.genPoly)
      , i = this.degree - n.length;
    if (i > 0) {
        const o = new Uint8Array(this.degree);
        return o.set(n, i),
        o
    }
    return n
}
;
var gye = EC
  , qR = {}
  , wa = {}
  , _C = {};
_C.isValid = function(e) {
    return !isNaN(e) && e >= 1 && e <= 40
}
;
var Oo = {};
const ZR = "[0-9]+"
  , mye = "[A-Z $%*+\\-./:]+";
let Mf = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
Mf = Mf.replace(/u/g, "\\u");
const vye = "(?:(?![A-Z0-9 $%*+\\-./:]|" + Mf + `)(?:.|[\r
]))+`;
Oo.KANJI = new RegExp(Mf,"g");
Oo.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");
Oo.BYTE = new RegExp(vye,"g");
Oo.NUMERIC = new RegExp(ZR,"g");
Oo.ALPHANUMERIC = new RegExp(mye,"g");
const yye = new RegExp("^" + Mf + "$")
  , Eye = new RegExp("^" + ZR + "$")
  , _ye = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
Oo.testKanji = function(e) {
    return yye.test(e)
}
;
Oo.testNumeric = function(e) {
    return Eye.test(e)
}
;
Oo.testAlphanumeric = function(e) {
    return _ye.test(e)
}
;
(function(t) {
    const e = _C
      , r = Oo;
    t.NUMERIC = {
        id: "Numeric",
        bit: 1,
        ccBits: [10, 12, 14]
    },
    t.ALPHANUMERIC = {
        id: "Alphanumeric",
        bit: 2,
        ccBits: [9, 11, 13]
    },
    t.BYTE = {
        id: "Byte",
        bit: 4,
        ccBits: [8, 16, 16]
    },
    t.KANJI = {
        id: "Kanji",
        bit: 8,
        ccBits: [8, 10, 12]
    },
    t.MIXED = {
        bit: -1
    },
    t.getCharCountIndicator = function(o, s) {
        if (!o.ccBits)
            throw new Error("Invalid mode: " + o);
        if (!e.isValid(s))
            throw new Error("Invalid version: " + s);
        return s >= 1 && s < 10 ? o.ccBits[0] : s < 27 ? o.ccBits[1] : o.ccBits[2]
    }
    ,
    t.getBestModeForData = function(o) {
        return r.testNumeric(o) ? t.NUMERIC : r.testAlphanumeric(o) ? t.ALPHANUMERIC : r.testKanji(o) ? t.KANJI : t.BYTE
    }
    ,
    t.toString = function(o) {
        if (o && o.id)
            return o.id;
        throw new Error("Invalid mode")
    }
    ,
    t.isValid = function(o) {
        return o && o.bit && o.ccBits
    }
    ;
    function n(i) {
        if (typeof i != "string")
            throw new Error("Param is not a string");
        switch (i.toLowerCase()) {
        case "numeric":
            return t.NUMERIC;
        case "alphanumeric":
            return t.ALPHANUMERIC;
        case "kanji":
            return t.KANJI;
        case "byte":
            return t.BYTE;
        default:
            throw new Error("Unknown mode: " + i)
        }
    }
    t.from = function(o, s) {
        if (t.isValid(o))
            return o;
        try {
            return n(o)
        } catch {
            return s
        }
    }
}
)(wa);
(function(t) {
    const e = ei
      , r = M1
      , n = R1
      , i = wa
      , o = _C
      , s = 7973
      , a = e.getBCHDigit(s);
    function l(d, h, x) {
        for (let y = 1; y <= 40; y++)
            if (h <= t.getCapacity(y, x, d))
                return y
    }
    function c(d, h) {
        return i.getCharCountIndicator(d, h) + 4
    }
    function u(d, h) {
        let x = 0;
        return d.forEach(function(y) {
            const m = c(y.mode, h);
            x += m + y.getBitsLength()
        }),
        x
    }
    function f(d, h) {
        for (let x = 1; x <= 40; x++)
            if (u(d, x) <= t.getCapacity(x, h, i.MIXED))
                return x
    }
    t.from = function(h, x) {
        return o.isValid(h) ? parseInt(h, 10) : x
    }
    ,
    t.getCapacity = function(h, x, y) {
        if (!o.isValid(h))
            throw new Error("Invalid QR Code version");
        typeof y > "u" && (y = i.BYTE);
        const m = e.getSymbolTotalCodewords(h)
          , E = r.getTotalCodewordsCount(h, x)
          , g = (m - E) * 8;
        if (y === i.MIXED)
            return g;
        const p = g - c(y, h);
        switch (y) {
        case i.NUMERIC:
            return Math.floor(p / 10 * 3);
        case i.ALPHANUMERIC:
            return Math.floor(p / 11 * 2);
        case i.KANJI:
            return Math.floor(p / 13);
        case i.BYTE:
        default:
            return Math.floor(p / 8)
        }
    }
    ,
    t.getBestVersionForData = function(h, x) {
        let y;
        const m = n.from(x, n.M);
        if (Array.isArray(h)) {
            if (h.length > 1)
                return f(h, m);
            if (h.length === 0)
                return 1;
            y = h[0]
        } else
            y = h;
        return l(y.mode, y.getLength(), m)
    }
    ,
    t.getEncodedBits = function(h) {
        if (!o.isValid(h) || h < 7)
            throw new Error("Invalid QR Code version");
        let x = h << 12;
        for (; e.getBCHDigit(x) - a >= 0; )
            x ^= s << e.getBCHDigit(x) - a;
        return h << 12 | x
    }
}
)(qR);
var JR = {};
const UE = ei
  , QR = 1335
  , bye = 21522
  , L4 = UE.getBCHDigit(QR);
JR.getEncodedBits = function(e, r) {
    const n = e.bit << 3 | r;
    let i = n << 10;
    for (; UE.getBCHDigit(i) - L4 >= 0; )
        i ^= QR << UE.getBCHDigit(i) - L4;
    return (n << 10 | i) ^ bye
}
;
var eM = {};
const Cye = wa;
function du(t) {
    this.mode = Cye.NUMERIC,
    this.data = t.toString()
}
du.getBitsLength = function(e) {
    return 10 * Math.floor(e / 3) + (e % 3 ? e % 3 * 3 + 1 : 0)
}
;
du.prototype.getLength = function() {
    return this.data.length
}
;
du.prototype.getBitsLength = function() {
    return du.getBitsLength(this.data.length)
}
;
du.prototype.write = function(e) {
    let r, n, i;
    for (r = 0; r + 3 <= this.data.length; r += 3)
        n = this.data.substr(r, 3),
        i = parseInt(n, 10),
        e.put(i, 10);
    const o = this.data.length - r;
    o > 0 && (n = this.data.substr(r),
    i = parseInt(n, 10),
    e.put(i, o * 3 + 1))
}
;
var Aye = du;
const wye = wa
  , Fm = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", " ", "$", "%", "*", "+", "-", ".", "/", ":"];
function hu(t) {
    this.mode = wye.ALPHANUMERIC,
    this.data = t
}
hu.getBitsLength = function(e) {
    return 11 * Math.floor(e / 2) + 6 * (e % 2)
}
;
hu.prototype.getLength = function() {
    return this.data.length
}
;
hu.prototype.getBitsLength = function() {
    return hu.getBitsLength(this.data.length)
}
;
hu.prototype.write = function(e) {
    let r;
    for (r = 0; r + 2 <= this.data.length; r += 2) {
        let n = Fm.indexOf(this.data[r]) * 45;
        n += Fm.indexOf(this.data[r + 1]),
        e.put(n, 11)
    }
    this.data.length % 2 && e.put(Fm.indexOf(this.data[r]), 6)
}
;
var Bye = hu;
const Sye = wa;
function xu(t) {
    this.mode = Sye.BYTE,
    typeof t == "string" ? this.data = new TextEncoder().encode(t) : this.data = new Uint8Array(t)
}
xu.getBitsLength = function(e) {
    return e * 8
}
;
xu.prototype.getLength = function() {
    return this.data.length
}
;
xu.prototype.getBitsLength = function() {
    return xu.getBitsLength(this.data.length)
}
;
xu.prototype.write = function(t) {
    for (let e = 0, r = this.data.length; e < r; e++)
        t.put(this.data[e], 8)
}
;
var Tye = xu;
const Dye = wa
  , Fye = ei;
function pu(t) {
    this.mode = Dye.KANJI,
    this.data = t
}
pu.getBitsLength = function(e) {
    return e * 13
}
;
pu.prototype.getLength = function() {
    return this.data.length
}
;
pu.prototype.getBitsLength = function() {
    return pu.getBitsLength(this.data.length)
}
;
pu.prototype.write = function(t) {
    let e;
    for (e = 0; e < this.data.length; e++) {
        let r = Fye.toSJIS(this.data[e]);
        if (r >= 33088 && r <= 40956)
            r -= 33088;
        else if (r >= 57408 && r <= 60351)
            r -= 49472;
        else
            throw new Error("Invalid SJIS character: " + this.data[e] + `
Make sure your charset is UTF-8`);
        r = (r >>> 8 & 255) * 192 + (r & 255),
        t.put(r, 13)
    }
}
;
var Pye = pu
  , tM = {
    exports: {}
};
(function(t) {
    var e = {
        single_source_shortest_paths: function(r, n, i) {
            var o = {}
              , s = {};
            s[n] = 0;
            var a = e.PriorityQueue.make();
            a.push(n, 0);
            for (var l, c, u, f, d, h, x, y, m; !a.empty(); ) {
                l = a.pop(),
                c = l.value,
                f = l.cost,
                d = r[c] || {};
                for (u in d)
                    d.hasOwnProperty(u) && (h = d[u],
                    x = f + h,
                    y = s[u],
                    m = typeof s[u] > "u",
                    (m || y > x) && (s[u] = x,
                    a.push(u, x),
                    o[u] = c))
            }
            if (typeof i < "u" && typeof s[i] > "u") {
                var E = ["Could not find a path from ", n, " to ", i, "."].join("");
                throw new Error(E)
            }
            return o
        },
        extract_shortest_path_from_predecessor_list: function(r, n) {
            for (var i = [], o = n; o; )
                i.push(o),
                r[o],
                o = r[o];
            return i.reverse(),
            i
        },
        find_path: function(r, n, i) {
            var o = e.single_source_shortest_paths(r, n, i);
            return e.extract_shortest_path_from_predecessor_list(o, i)
        },
        PriorityQueue: {
            make: function(r) {
                var n = e.PriorityQueue, i = {}, o;
                r = r || {};
                for (o in n)
                    n.hasOwnProperty(o) && (i[o] = n[o]);
                return i.queue = [],
                i.sorter = r.sorter || n.default_sorter,
                i
            },
            default_sorter: function(r, n) {
                return r.cost - n.cost
            },
            push: function(r, n) {
                var i = {
                    value: r,
                    cost: n
                };
                this.queue.push(i),
                this.queue.sort(this.sorter)
            },
            pop: function() {
                return this.queue.shift()
            },
            empty: function() {
                return this.queue.length === 0
            }
        }
    };
    t.exports = e
}
)(tM);
var Iye = tM.exports;
(function(t) {
    const e = wa
      , r = Aye
      , n = Bye
      , i = Tye
      , o = Pye
      , s = Oo
      , a = ei
      , l = Iye;
    function c(E) {
        return unescape(encodeURIComponent(E)).length
    }
    function u(E, g, p) {
        const v = [];
        let _;
        for (; (_ = E.exec(p)) !== null; )
            v.push({
                data: _[0],
                index: _.index,
                mode: g,
                length: _[0].length
            });
        return v
    }
    function f(E) {
        const g = u(s.NUMERIC, e.NUMERIC, E)
          , p = u(s.ALPHANUMERIC, e.ALPHANUMERIC, E);
        let v, _;
        return a.isKanjiModeEnabled() ? (v = u(s.BYTE, e.BYTE, E),
        _ = u(s.KANJI, e.KANJI, E)) : (v = u(s.BYTE_KANJI, e.BYTE, E),
        _ = []),
        g.concat(p, v, _).sort(function(C, w) {
            return C.index - w.index
        }).map(function(C) {
            return {
                data: C.data,
                mode: C.mode,
                length: C.length
            }
        })
    }
    function d(E, g) {
        switch (g) {
        case e.NUMERIC:
            return r.getBitsLength(E);
        case e.ALPHANUMERIC:
            return n.getBitsLength(E);
        case e.KANJI:
            return o.getBitsLength(E);
        case e.BYTE:
            return i.getBitsLength(E)
        }
    }
    function h(E) {
        return E.reduce(function(g, p) {
            const v = g.length - 1 >= 0 ? g[g.length - 1] : null;
            return v && v.mode === p.mode ? (g[g.length - 1].data += p.data,
            g) : (g.push(p),
            g)
        }, [])
    }
    function x(E) {
        const g = [];
        for (let p = 0; p < E.length; p++) {
            const v = E[p];
            switch (v.mode) {
            case e.NUMERIC:
                g.push([v, {
                    data: v.data,
                    mode: e.ALPHANUMERIC,
                    length: v.length
                }, {
                    data: v.data,
                    mode: e.BYTE,
                    length: v.length
                }]);
                break;
            case e.ALPHANUMERIC:
                g.push([v, {
                    data: v.data,
                    mode: e.BYTE,
                    length: v.length
                }]);
                break;
            case e.KANJI:
                g.push([v, {
                    data: v.data,
                    mode: e.BYTE,
                    length: c(v.data)
                }]);
                break;
            case e.BYTE:
                g.push([{
                    data: v.data,
                    mode: e.BYTE,
                    length: c(v.data)
                }])
            }
        }
        return g
    }
    function y(E, g) {
        const p = {}
          , v = {
            start: {}
        };
        let _ = ["start"];
        for (let b = 0; b < E.length; b++) {
            const C = E[b]
              , w = [];
            for (let T = 0; T < C.length; T++) {
                const A = C[T]
                  , B = "" + b + T;
                w.push(B),
                p[B] = {
                    node: A,
                    lastCount: 0
                },
                v[B] = {};
                for (let S = 0; S < _.length; S++) {
                    const D = _[S];
                    p[D] && p[D].node.mode === A.mode ? (v[D][B] = d(p[D].lastCount + A.length, A.mode) - d(p[D].lastCount, A.mode),
                    p[D].lastCount += A.length) : (p[D] && (p[D].lastCount = A.length),
                    v[D][B] = d(A.length, A.mode) + 4 + e.getCharCountIndicator(A.mode, g))
                }
            }
            _ = w
        }
        for (let b = 0; b < _.length; b++)
            v[_[b]].end = 0;
        return {
            map: v,
            table: p
        }
    }
    function m(E, g) {
        let p;
        const v = e.getBestModeForData(E);
        if (p = e.from(g, v),
        p !== e.BYTE && p.bit < v.bit)
            throw new Error('"' + E + '" cannot be encoded with mode ' + e.toString(p) + `.
 Suggested mode is: ` + e.toString(v));
        switch (p === e.KANJI && !a.isKanjiModeEnabled() && (p = e.BYTE),
        p) {
        case e.NUMERIC:
            return new r(E);
        case e.ALPHANUMERIC:
            return new n(E);
        case e.KANJI:
            return new o(E);
        case e.BYTE:
            return new i(E)
        }
    }
    t.fromArray = function(g) {
        return g.reduce(function(p, v) {
            return typeof v == "string" ? p.push(m(v, null)) : v.data && p.push(m(v.data, v.mode)),
            p
        }, [])
    }
    ,
    t.fromString = function(g, p) {
        const v = f(g, a.isKanjiModeEnabled())
          , _ = x(v)
          , b = y(_, p)
          , C = l.find_path(b.map, "start", "end")
          , w = [];
        for (let T = 1; T < C.length - 1; T++)
            w.push(b.table[C[T]].node);
        return t.fromArray(h(w))
    }
    ,
    t.rawSplit = function(g) {
        return t.fromArray(f(g, a.isKanjiModeEnabled()))
    }
}
)(eM);
const L1 = ei
  , Pm = R1
  , Oye = hye
  , kye = xye
  , Rye = jR
  , Mye = WR
  , GE = YR
  , HE = M1
  , Nye = gye
  , tp = qR
  , Lye = JR
  , $ye = wa
  , Im = eM;
function Uye(t, e) {
    const r = t.size
      , n = Mye.getPositions(e);
    for (let i = 0; i < n.length; i++) {
        const o = n[i][0]
          , s = n[i][1];
        for (let a = -1; a <= 7; a++)
            if (!(o + a <= -1 || r <= o + a))
                for (let l = -1; l <= 7; l++)
                    s + l <= -1 || r <= s + l || (a >= 0 && a <= 6 && (l === 0 || l === 6) || l >= 0 && l <= 6 && (a === 0 || a === 6) || a >= 2 && a <= 4 && l >= 2 && l <= 4 ? t.set(o + a, s + l, !0, !0) : t.set(o + a, s + l, !1, !0))
    }
}
function Gye(t) {
    const e = t.size;
    for (let r = 8; r < e - 8; r++) {
        const n = r % 2 === 0;
        t.set(r, 6, n, !0),
        t.set(6, r, n, !0)
    }
}
function Hye(t, e) {
    const r = Rye.getPositions(e);
    for (let n = 0; n < r.length; n++) {
        const i = r[n][0]
          , o = r[n][1];
        for (let s = -2; s <= 2; s++)
            for (let a = -2; a <= 2; a++)
                s === -2 || s === 2 || a === -2 || a === 2 || s === 0 && a === 0 ? t.set(i + s, o + a, !0, !0) : t.set(i + s, o + a, !1, !0)
    }
}
function Vye(t, e) {
    const r = t.size
      , n = tp.getEncodedBits(e);
    let i, o, s;
    for (let a = 0; a < 18; a++)
        i = Math.floor(a / 3),
        o = a % 3 + r - 8 - 3,
        s = (n >> a & 1) === 1,
        t.set(i, o, s, !0),
        t.set(o, i, s, !0)
}
function Om(t, e, r) {
    const n = t.size
      , i = Lye.getEncodedBits(e, r);
    let o, s;
    for (o = 0; o < 15; o++)
        s = (i >> o & 1) === 1,
        o < 6 ? t.set(o, 8, s, !0) : o < 8 ? t.set(o + 1, 8, s, !0) : t.set(n - 15 + o, 8, s, !0),
        o < 8 ? t.set(8, n - o - 1, s, !0) : o < 9 ? t.set(8, 15 - o - 1 + 1, s, !0) : t.set(8, 15 - o - 1, s, !0);
    t.set(n - 8, 8, 1, !0)
}
function zye(t, e) {
    const r = t.size;
    let n = -1
      , i = r - 1
      , o = 7
      , s = 0;
    for (let a = r - 1; a > 0; a -= 2)
        for (a === 6 && a--; ; ) {
            for (let l = 0; l < 2; l++)
                if (!t.isReserved(i, a - l)) {
                    let c = !1;
                    s < e.length && (c = (e[s] >>> o & 1) === 1),
                    t.set(i, a - l, c),
                    o--,
                    o === -1 && (s++,
                    o = 7)
                }
            if (i += n,
            i < 0 || r <= i) {
                i -= n,
                n = -n;
                break
            }
        }
}
function jye(t, e, r) {
    const n = new Oye;
    r.forEach(function(l) {
        n.put(l.mode.bit, 4),
        n.put(l.getLength(), $ye.getCharCountIndicator(l.mode, t)),
        l.write(n)
    });
    const i = L1.getSymbolTotalCodewords(t)
      , o = HE.getTotalCodewordsCount(t, e)
      , s = (i - o) * 8;
    for (n.getLengthInBits() + 4 <= s && n.put(0, 4); n.getLengthInBits() % 8 !== 0; )
        n.putBit(0);
    const a = (s - n.getLengthInBits()) / 8;
    for (let l = 0; l < a; l++)
        n.put(l % 2 ? 17 : 236, 8);
    return Wye(n, t, e)
}
function Wye(t, e, r) {
    const n = L1.getSymbolTotalCodewords(e)
      , i = HE.getTotalCodewordsCount(e, r)
      , o = n - i
      , s = HE.getBlocksCount(e, r)
      , a = n % s
      , l = s - a
      , c = Math.floor(n / s)
      , u = Math.floor(o / s)
      , f = u + 1
      , d = c - u
      , h = new Nye(d);
    let x = 0;
    const y = new Array(s)
      , m = new Array(s);
    let E = 0;
    const g = new Uint8Array(t.buffer);
    for (let C = 0; C < s; C++) {
        const w = C < l ? u : f;
        y[C] = g.slice(x, x + w),
        m[C] = h.encode(y[C]),
        x += w,
        E = Math.max(E, w)
    }
    const p = new Uint8Array(n);
    let v = 0, _, b;
    for (_ = 0; _ < E; _++)
        for (b = 0; b < s; b++)
            _ < y[b].length && (p[v++] = y[b][_]);
    for (_ = 0; _ < d; _++)
        for (b = 0; b < s; b++)
            p[v++] = m[b][_];
    return p
}
function Yye(t, e, r, n) {
    let i;
    if (Array.isArray(t))
        i = Im.fromArray(t);
    else if (typeof t == "string") {
        let c = e;
        if (!c) {
            const u = Im.rawSplit(t);
            c = tp.getBestVersionForData(u, r)
        }
        i = Im.fromString(t, c || 40)
    } else
        throw new Error("Invalid data");
    const o = tp.getBestVersionForData(i, r);
    if (!o)
        throw new Error("The amount of data is too big to be stored in a QR Code");
    if (!e)
        e = o;
    else if (e < o)
        throw new Error(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: ` + o + `.
`);
    const s = jye(e, r, i)
      , a = L1.getSymbolSize(e)
      , l = new kye(a);
    return Uye(l, e),
    Gye(l),
    Hye(l, e),
    Om(l, r, 0),
    e >= 7 && Vye(l, e),
    zye(l, s),
    isNaN(n) && (n = GE.getBestMask(l, Om.bind(null, l, r))),
    GE.applyMask(n, l),
    Om(l, r, n),
    {
        modules: l,
        version: e,
        errorCorrectionLevel: r,
        maskPattern: n,
        segments: i
    }
}
VR.create = function(e, r) {
    if (typeof e > "u" || e === "")
        throw new Error("No input text");
    let n = Pm.M, i, o;
    return typeof r < "u" && (n = Pm.from(r.errorCorrectionLevel, Pm.M),
    i = tp.from(r.version),
    o = GE.from(r.maskPattern),
    r.toSJISFunc && L1.setToSJISFunction(r.toSJISFunc)),
    Yye(e, i, n, o)
}
;
var rM = {}
  , bC = {};
(function(t) {
    function e(r) {
        if (typeof r == "number" && (r = r.toString()),
        typeof r != "string")
            throw new Error("Color should be defined as hex string");
        let n = r.slice().replace("#", "").split("");
        if (n.length < 3 || n.length === 5 || n.length > 8)
            throw new Error("Invalid hex color: " + r);
        (n.length === 3 || n.length === 4) && (n = Array.prototype.concat.apply([], n.map(function(o) {
            return [o, o]
        }))),
        n.length === 6 && n.push("F", "F");
        const i = parseInt(n.join(""), 16);
        return {
            r: i >> 24 & 255,
            g: i >> 16 & 255,
            b: i >> 8 & 255,
            a: i & 255,
            hex: "#" + n.slice(0, 6).join("")
        }
    }
    t.getOptions = function(n) {
        n || (n = {}),
        n.color || (n.color = {});
        const i = typeof n.margin > "u" || n.margin === null || n.margin < 0 ? 4 : n.margin
          , o = n.width && n.width >= 21 ? n.width : void 0
          , s = n.scale || 4;
        return {
            width: o,
            scale: o ? 4 : s,
            margin: i,
            color: {
                dark: e(n.color.dark || "#000000ff"),
                light: e(n.color.light || "#ffffffff")
            },
            type: n.type,
            rendererOpts: n.rendererOpts || {}
        }
    }
    ,
    t.getScale = function(n, i) {
        return i.width && i.width >= n + i.margin * 2 ? i.width / (n + i.margin * 2) : i.scale
    }
    ,
    t.getImageWidth = function(n, i) {
        const o = t.getScale(n, i);
        return Math.floor((n + i.margin * 2) * o)
    }
    ,
    t.qrToImageData = function(n, i, o) {
        const s = i.modules.size
          , a = i.modules.data
          , l = t.getScale(s, o)
          , c = Math.floor((s + o.margin * 2) * l)
          , u = o.margin * l
          , f = [o.color.light, o.color.dark];
        for (let d = 0; d < c; d++)
            for (let h = 0; h < c; h++) {
                let x = (d * c + h) * 4
                  , y = o.color.light;
                if (d >= u && h >= u && d < c - u && h < c - u) {
                    const m = Math.floor((d - u) / l)
                      , E = Math.floor((h - u) / l);
                    y = f[a[m * s + E] ? 1 : 0]
                }
                n[x++] = y.r,
                n[x++] = y.g,
                n[x++] = y.b,
                n[x] = y.a
            }
    }
}
)(bC);
(function(t) {
    const e = bC;
    function r(i, o, s) {
        i.clearRect(0, 0, o.width, o.height),
        o.style || (o.style = {}),
        o.height = s,
        o.width = s,
        o.style.height = s + "px",
        o.style.width = s + "px"
    }
    function n() {
        try {
            return document.createElement("canvas")
        } catch {
            throw new Error("You need to specify a canvas element")
        }
    }
    t.render = function(o, s, a) {
        let l = a
          , c = s;
        typeof l > "u" && (!s || !s.getContext) && (l = s,
        s = void 0),
        s || (c = n()),
        l = e.getOptions(l);
        const u = e.getImageWidth(o.modules.size, l)
          , f = c.getContext("2d")
          , d = f.createImageData(u, u);
        return e.qrToImageData(d.data, o, l),
        r(f, c, u),
        f.putImageData(d, 0, 0),
        c
    }
    ,
    t.renderToDataURL = function(o, s, a) {
        let l = a;
        typeof l > "u" && (!s || !s.getContext) && (l = s,
        s = void 0),
        l || (l = {});
        const c = t.render(o, s, l)
          , u = l.type || "image/png"
          , f = l.rendererOpts || {};
        return c.toDataURL(u, f.quality)
    }
}
)(rM);
var nM = {};
const Xye = bC;
function $4(t, e) {
    const r = t.a / 255
      , n = e + '="' + t.hex + '"';
    return r < 1 ? n + " " + e + '-opacity="' + r.toFixed(2).slice(1) + '"' : n
}
function km(t, e, r) {
    let n = t + e;
    return typeof r < "u" && (n += " " + r),
    n
}
function Kye(t, e, r) {
    let n = ""
      , i = 0
      , o = !1
      , s = 0;
    for (let a = 0; a < t.length; a++) {
        const l = Math.floor(a % e)
          , c = Math.floor(a / e);
        !l && !o && (o = !0),
        t[a] ? (s++,
        a > 0 && l > 0 && t[a - 1] || (n += o ? km("M", l + r, .5 + c + r) : km("m", i, 0),
        i = 0,
        o = !1),
        l + 1 < e && t[a + 1] || (n += km("h", s),
        s = 0)) : i++
    }
    return n
}
nM.render = function(e, r, n) {
    const i = Xye.getOptions(r)
      , o = e.modules.size
      , s = e.modules.data
      , a = o + i.margin * 2
      , l = i.color.light.a ? "<path " + $4(i.color.light, "fill") + ' d="M0 0h' + a + "v" + a + 'H0z"/>' : ""
      , c = "<path " + $4(i.color.dark, "stroke") + ' d="' + Kye(s, o, i.margin) + '"/>'
      , u = 'viewBox="0 0 ' + a + " " + a + '"'
      , d = '<svg xmlns="http://www.w3.org/2000/svg" ' + (i.width ? 'width="' + i.width + '" height="' + i.width + '" ' : "") + u + ' shape-rendering="crispEdges">' + l + c + `</svg>
`;
    return typeof n == "function" && n(null, d),
    d
}
;
const qye = fye
  , VE = VR
  , iM = rM
  , Zye = nM;
function CC(t, e, r, n, i) {
    const o = [].slice.call(arguments, 1)
      , s = o.length
      , a = typeof o[s - 1] == "function";
    if (!a && !qye())
        throw new Error("Callback required as last argument");
    if (a) {
        if (s < 2)
            throw new Error("Too few arguments provided");
        s === 2 ? (i = r,
        r = e,
        e = n = void 0) : s === 3 && (e.getContext && typeof i > "u" ? (i = n,
        n = void 0) : (i = n,
        n = r,
        r = e,
        e = void 0))
    } else {
        if (s < 1)
            throw new Error("Too few arguments provided");
        return s === 1 ? (r = e,
        e = n = void 0) : s === 2 && !e.getContext && (n = r,
        r = e,
        e = void 0),
        new Promise(function(l, c) {
            try {
                const u = VE.create(r, n);
                l(t(u, e, n))
            } catch (u) {
                c(u)
            }
        }
        )
    }
    try {
        const l = VE.create(r, n);
        i(null, t(l, e, n))
    } catch (l) {
        i(l)
    }
}
Ed.create = VE.create;
Ed.toCanvas = CC.bind(null, iM.render);
Ed.toDataURL = CC.bind(null, iM.renderToDataURL);
Ed.toString = CC.bind(null, function(t, e, r) {
    return Zye.render(t, r)
});
function y5e(t, e) {
    const r = cF(t)
      , n = ie("");
    return me(r, async i => {
        r.value && fa && (n.value = await Ed.toDataURL(i, e))
    }
    , {
        immediate: !0
    }),
    n
}
var oM = {
    exports: {}
};
function Jye(t) {
    throw new Error('Could not dynamically require "' + t + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')
}
var Rm = {
    exports: {}
};
const sM = q_(Npe);
var U4;
function ko() {
    return U4 || (U4 = 1,
    function(t, e) {
        (function(r, n) {
            t.exports = n()
        }
        )(er, function() {
            var r = r || function(n, i) {
                var o;
                if (typeof window < "u" && window.crypto && (o = window.crypto),
                typeof self < "u" && self.crypto && (o = self.crypto),
                typeof globalThis < "u" && globalThis.crypto && (o = globalThis.crypto),
                !o && typeof window < "u" && window.msCrypto && (o = window.msCrypto),
                !o && typeof er < "u" && er.crypto && (o = er.crypto),
                !o && typeof Jye == "function")
                    try {
                        o = sM
                    } catch {}
                var s = function() {
                    if (o) {
                        if (typeof o.getRandomValues == "function")
                            try {
                                return o.getRandomValues(new Uint32Array(1))[0]
                            } catch {}
                        if (typeof o.randomBytes == "function")
                            try {
                                return o.randomBytes(4).readInt32LE()
                            } catch {}
                    }
                    throw new Error("Native crypto module could not be used to get secure random number.")
                }
                  , a = Object.create || function() {
                    function g() {}
                    return function(p) {
                        var v;
                        return g.prototype = p,
                        v = new g,
                        g.prototype = null,
                        v
                    }
                }()
                  , l = {}
                  , c = l.lib = {}
                  , u = c.Base = function() {
                    return {
                        extend: function(g) {
                            var p = a(this);
                            return g && p.mixIn(g),
                            (!p.hasOwnProperty("init") || this.init === p.init) && (p.init = function() {
                                p.$super.init.apply(this, arguments)
                            }
                            ),
                            p.init.prototype = p,
                            p.$super = this,
                            p
                        },
                        create: function() {
                            var g = this.extend();
                            return g.init.apply(g, arguments),
                            g
                        },
                        init: function() {},
                        mixIn: function(g) {
                            for (var p in g)
                                g.hasOwnProperty(p) && (this[p] = g[p]);
                            g.hasOwnProperty("toString") && (this.toString = g.toString)
                        },
                        clone: function() {
                            return this.init.prototype.extend(this)
                        }
                    }
                }()
                  , f = c.WordArray = u.extend({
                    init: function(g, p) {
                        g = this.words = g || [],
                        p != i ? this.sigBytes = p : this.sigBytes = g.length * 4
                    },
                    toString: function(g) {
                        return (g || h).stringify(this)
                    },
                    concat: function(g) {
                        var p = this.words
                          , v = g.words
                          , _ = this.sigBytes
                          , b = g.sigBytes;
                        if (this.clamp(),
                        _ % 4)
                            for (var C = 0; C < b; C++) {
                                var w = v[C >>> 2] >>> 24 - C % 4 * 8 & 255;
                                p[_ + C >>> 2] |= w << 24 - (_ + C) % 4 * 8
                            }
                        else
                            for (var T = 0; T < b; T += 4)
                                p[_ + T >>> 2] = v[T >>> 2];
                        return this.sigBytes += b,
                        this
                    },
                    clamp: function() {
                        var g = this.words
                          , p = this.sigBytes;
                        g[p >>> 2] &= 4294967295 << 32 - p % 4 * 8,
                        g.length = n.ceil(p / 4)
                    },
                    clone: function() {
                        var g = u.clone.call(this);
                        return g.words = this.words.slice(0),
                        g
                    },
                    random: function(g) {
                        for (var p = [], v = 0; v < g; v += 4)
                            p.push(s());
                        return new f.init(p,g)
                    }
                })
                  , d = l.enc = {}
                  , h = d.Hex = {
                    stringify: function(g) {
                        for (var p = g.words, v = g.sigBytes, _ = [], b = 0; b < v; b++) {
                            var C = p[b >>> 2] >>> 24 - b % 4 * 8 & 255;
                            _.push((C >>> 4).toString(16)),
                            _.push((C & 15).toString(16))
                        }
                        return _.join("")
                    },
                    parse: function(g) {
                        for (var p = g.length, v = [], _ = 0; _ < p; _ += 2)
                            v[_ >>> 3] |= parseInt(g.substr(_, 2), 16) << 24 - _ % 8 * 4;
                        return new f.init(v,p / 2)
                    }
                }
                  , x = d.Latin1 = {
                    stringify: function(g) {
                        for (var p = g.words, v = g.sigBytes, _ = [], b = 0; b < v; b++) {
                            var C = p[b >>> 2] >>> 24 - b % 4 * 8 & 255;
                            _.push(String.fromCharCode(C))
                        }
                        return _.join("")
                    },
                    parse: function(g) {
                        for (var p = g.length, v = [], _ = 0; _ < p; _++)
                            v[_ >>> 2] |= (g.charCodeAt(_) & 255) << 24 - _ % 4 * 8;
                        return new f.init(v,p)
                    }
                }
                  , y = d.Utf8 = {
                    stringify: function(g) {
                        try {
                            return decodeURIComponent(escape(x.stringify(g)))
                        } catch {
                            throw new Error("Malformed UTF-8 data")
                        }
                    },
                    parse: function(g) {
                        return x.parse(unescape(encodeURIComponent(g)))
                    }
                }
                  , m = c.BufferedBlockAlgorithm = u.extend({
                    reset: function() {
                        this._data = new f.init,
                        this._nDataBytes = 0
                    },
                    _append: function(g) {
                        typeof g == "string" && (g = y.parse(g)),
                        this._data.concat(g),
                        this._nDataBytes += g.sigBytes
                    },
                    _process: function(g) {
                        var p, v = this._data, _ = v.words, b = v.sigBytes, C = this.blockSize, w = C * 4, T = b / w;
                        g ? T = n.ceil(T) : T = n.max((T | 0) - this._minBufferSize, 0);
                        var A = T * C
                          , B = n.min(A * 4, b);
                        if (A) {
                            for (var S = 0; S < A; S += C)
                                this._doProcessBlock(_, S);
                            p = _.splice(0, A),
                            v.sigBytes -= B
                        }
                        return new f.init(p,B)
                    },
                    clone: function() {
                        var g = u.clone.call(this);
                        return g._data = this._data.clone(),
                        g
                    },
                    _minBufferSize: 0
                });
                c.Hasher = m.extend({
                    cfg: u.extend(),
                    init: function(g) {
                        this.cfg = this.cfg.extend(g),
                        this.reset()
                    },
                    reset: function() {
                        m.reset.call(this),
                        this._doReset()
                    },
                    update: function(g) {
                        return this._append(g),
                        this._process(),
                        this
                    },
                    finalize: function(g) {
                        g && this._append(g);
                        var p = this._doFinalize();
                        return p
                    },
                    blockSize: 16,
                    _createHelper: function(g) {
                        return function(p, v) {
                            return new g.init(v).finalize(p)
                        }
                    },
                    _createHmacHelper: function(g) {
                        return function(p, v) {
                            return new E.HMAC.init(g,v).finalize(p)
                        }
                    }
                });
                var E = l.algo = {};
                return l
            }(Math);
            return r
        })
    }(Rm)),
    Rm.exports
}
var Mm = {
    exports: {}
}, G4;
function Qye() {
    return G4 || (G4 = 1,
    function(t, e) {
        (function(r, n) {
            t.exports = n(ko())
        }
        )(er, function(r) {
            return function() {
                var n = r
                  , i = n.lib
                  , o = i.WordArray
                  , s = n.enc;
                s.Base64 = {
                    stringify: function(l) {
                        var c = l.words
                          , u = l.sigBytes
                          , f = this._map;
                        l.clamp();
                        for (var d = [], h = 0; h < u; h += 3)
                            for (var x = c[h >>> 2] >>> 24 - h % 4 * 8 & 255, y = c[h + 1 >>> 2] >>> 24 - (h + 1) % 4 * 8 & 255, m = c[h + 2 >>> 2] >>> 24 - (h + 2) % 4 * 8 & 255, E = x << 16 | y << 8 | m, g = 0; g < 4 && h + g * .75 < u; g++)
                                d.push(f.charAt(E >>> 6 * (3 - g) & 63));
                        var p = f.charAt(64);
                        if (p)
                            for (; d.length % 4; )
                                d.push(p);
                        return d.join("")
                    },
                    parse: function(l) {
                        var c = l.length
                          , u = this._map
                          , f = this._reverseMap;
                        if (!f) {
                            f = this._reverseMap = [];
                            for (var d = 0; d < u.length; d++)
                                f[u.charCodeAt(d)] = d
                        }
                        var h = u.charAt(64);
                        if (h) {
                            var x = l.indexOf(h);
                            x !== -1 && (c = x)
                        }
                        return a(l, c, f)
                    },
                    _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
                };
                function a(l, c, u) {
                    for (var f = [], d = 0, h = 0; h < c; h++)
                        if (h % 4) {
                            var x = u[l.charCodeAt(h - 1)] << h % 4 * 2
                              , y = u[l.charCodeAt(h)] >>> 6 - h % 4 * 2
                              , m = x | y;
                            f[d >>> 2] |= m << 24 - d % 4 * 8,
                            d++
                        }
                    return o.create(f, d)
                }
            }(),
            r.enc.Base64
        })
    }(Mm)),
    Mm.exports
}
var Nm = {
    exports: {}
}, H4;
function eEe() {
    return H4 || (H4 = 1,
    function(t, e) {
        (function(r, n) {
            t.exports = n(ko())
        }
        )(er, function(r) {
            return function(n) {
                var i = r
                  , o = i.lib
                  , s = o.WordArray
                  , a = o.Hasher
                  , l = i.algo
                  , c = [];
                (function() {
                    for (var y = 0; y < 64; y++)
                        c[y] = n.abs(n.sin(y + 1)) * 4294967296 | 0
                }
                )();
                var u = l.MD5 = a.extend({
                    _doReset: function() {
                        this._hash = new s.init([1732584193, 4023233417, 2562383102, 271733878])
                    },
                    _doProcessBlock: function(y, m) {
                        for (var E = 0; E < 16; E++) {
                            var g = m + E
                              , p = y[g];
                            y[g] = (p << 8 | p >>> 24) & 16711935 | (p << 24 | p >>> 8) & 4278255360
                        }
                        var v = this._hash.words
                          , _ = y[m + 0]
                          , b = y[m + 1]
                          , C = y[m + 2]
                          , w = y[m + 3]
                          , T = y[m + 4]
                          , A = y[m + 5]
                          , B = y[m + 6]
                          , S = y[m + 7]
                          , D = y[m + 8]
                          , F = y[m + 9]
                          , R = y[m + 10]
                          , P = y[m + 11]
                          , N = y[m + 12]
                          , j = y[m + 13]
                          , K = y[m + 14]
                          , oe = y[m + 15]
                          , U = v[0]
                          , $ = v[1]
                          , V = v[2]
                          , W = v[3];
                        U = f(U, $, V, W, _, 7, c[0]),
                        W = f(W, U, $, V, b, 12, c[1]),
                        V = f(V, W, U, $, C, 17, c[2]),
                        $ = f($, V, W, U, w, 22, c[3]),
                        U = f(U, $, V, W, T, 7, c[4]),
                        W = f(W, U, $, V, A, 12, c[5]),
                        V = f(V, W, U, $, B, 17, c[6]),
                        $ = f($, V, W, U, S, 22, c[7]),
                        U = f(U, $, V, W, D, 7, c[8]),
                        W = f(W, U, $, V, F, 12, c[9]),
                        V = f(V, W, U, $, R, 17, c[10]),
                        $ = f($, V, W, U, P, 22, c[11]),
                        U = f(U, $, V, W, N, 7, c[12]),
                        W = f(W, U, $, V, j, 12, c[13]),
                        V = f(V, W, U, $, K, 17, c[14]),
                        $ = f($, V, W, U, oe, 22, c[15]),
                        U = d(U, $, V, W, b, 5, c[16]),
                        W = d(W, U, $, V, B, 9, c[17]),
                        V = d(V, W, U, $, P, 14, c[18]),
                        $ = d($, V, W, U, _, 20, c[19]),
                        U = d(U, $, V, W, A, 5, c[20]),
                        W = d(W, U, $, V, R, 9, c[21]),
                        V = d(V, W, U, $, oe, 14, c[22]),
                        $ = d($, V, W, U, T, 20, c[23]),
                        U = d(U, $, V, W, F, 5, c[24]),
                        W = d(W, U, $, V, K, 9, c[25]),
                        V = d(V, W, U, $, w, 14, c[26]),
                        $ = d($, V, W, U, D, 20, c[27]),
                        U = d(U, $, V, W, j, 5, c[28]),
                        W = d(W, U, $, V, C, 9, c[29]),
                        V = d(V, W, U, $, S, 14, c[30]),
                        $ = d($, V, W, U, N, 20, c[31]),
                        U = h(U, $, V, W, A, 4, c[32]),
                        W = h(W, U, $, V, D, 11, c[33]),
                        V = h(V, W, U, $, P, 16, c[34]),
                        $ = h($, V, W, U, K, 23, c[35]),
                        U = h(U, $, V, W, b, 4, c[36]),
                        W = h(W, U, $, V, T, 11, c[37]),
                        V = h(V, W, U, $, S, 16, c[38]),
                        $ = h($, V, W, U, R, 23, c[39]),
                        U = h(U, $, V, W, j, 4, c[40]),
                        W = h(W, U, $, V, _, 11, c[41]),
                        V = h(V, W, U, $, w, 16, c[42]),
                        $ = h($, V, W, U, B, 23, c[43]),
                        U = h(U, $, V, W, F, 4, c[44]),
                        W = h(W, U, $, V, N, 11, c[45]),
                        V = h(V, W, U, $, oe, 16, c[46]),
                        $ = h($, V, W, U, C, 23, c[47]),
                        U = x(U, $, V, W, _, 6, c[48]),
                        W = x(W, U, $, V, S, 10, c[49]),
                        V = x(V, W, U, $, K, 15, c[50]),
                        $ = x($, V, W, U, A, 21, c[51]),
                        U = x(U, $, V, W, N, 6, c[52]),
                        W = x(W, U, $, V, w, 10, c[53]),
                        V = x(V, W, U, $, R, 15, c[54]),
                        $ = x($, V, W, U, b, 21, c[55]),
                        U = x(U, $, V, W, D, 6, c[56]),
                        W = x(W, U, $, V, oe, 10, c[57]),
                        V = x(V, W, U, $, B, 15, c[58]),
                        $ = x($, V, W, U, j, 21, c[59]),
                        U = x(U, $, V, W, T, 6, c[60]),
                        W = x(W, U, $, V, P, 10, c[61]),
                        V = x(V, W, U, $, C, 15, c[62]),
                        $ = x($, V, W, U, F, 21, c[63]),
                        v[0] = v[0] + U | 0,
                        v[1] = v[1] + $ | 0,
                        v[2] = v[2] + V | 0,
                        v[3] = v[3] + W | 0
                    },
                    _doFinalize: function() {
                        var y = this._data
                          , m = y.words
                          , E = this._nDataBytes * 8
                          , g = y.sigBytes * 8;
                        m[g >>> 5] |= 128 << 24 - g % 32;
                        var p = n.floor(E / 4294967296)
                          , v = E;
                        m[(g + 64 >>> 9 << 4) + 15] = (p << 8 | p >>> 24) & 16711935 | (p << 24 | p >>> 8) & 4278255360,
                        m[(g + 64 >>> 9 << 4) + 14] = (v << 8 | v >>> 24) & 16711935 | (v << 24 | v >>> 8) & 4278255360,
                        y.sigBytes = (m.length + 1) * 4,
                        this._process();
                        for (var _ = this._hash, b = _.words, C = 0; C < 4; C++) {
                            var w = b[C];
                            b[C] = (w << 8 | w >>> 24) & 16711935 | (w << 24 | w >>> 8) & 4278255360
                        }
                        return _
                    },
                    clone: function() {
                        var y = a.clone.call(this);
                        return y._hash = this._hash.clone(),
                        y
                    }
                });
                function f(y, m, E, g, p, v, _) {
                    var b = y + (m & E | ~m & g) + p + _;
                    return (b << v | b >>> 32 - v) + m
                }
                function d(y, m, E, g, p, v, _) {
                    var b = y + (m & g | E & ~g) + p + _;
                    return (b << v | b >>> 32 - v) + m
                }
                function h(y, m, E, g, p, v, _) {
                    var b = y + (m ^ E ^ g) + p + _;
                    return (b << v | b >>> 32 - v) + m
                }
                function x(y, m, E, g, p, v, _) {
                    var b = y + (E ^ (m | ~g)) + p + _;
                    return (b << v | b >>> 32 - v) + m
                }
                i.MD5 = a._createHelper(u),
                i.HmacMD5 = a._createHmacHelper(u)
            }(Math),
            r.MD5
        })
    }(Nm)),
    Nm.exports
}
var Lm = {
    exports: {}
}, $m = {
    exports: {}
}, V4;
function tEe() {
    return V4 || (V4 = 1,
    function(t, e) {
        (function(r, n) {
            t.exports = n(ko())
        }
        )(er, function(r) {
            return function() {
                var n = r
                  , i = n.lib
                  , o = i.WordArray
                  , s = i.Hasher
                  , a = n.algo
                  , l = []
                  , c = a.SHA1 = s.extend({
                    _doReset: function() {
                        this._hash = new o.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520])
                    },
                    _doProcessBlock: function(u, f) {
                        for (var d = this._hash.words, h = d[0], x = d[1], y = d[2], m = d[3], E = d[4], g = 0; g < 80; g++) {
                            if (g < 16)
                                l[g] = u[f + g] | 0;
                            else {
                                var p = l[g - 3] ^ l[g - 8] ^ l[g - 14] ^ l[g - 16];
                                l[g] = p << 1 | p >>> 31
                            }
                            var v = (h << 5 | h >>> 27) + E + l[g];
                            g < 20 ? v += (x & y | ~x & m) + 1518500249 : g < 40 ? v += (x ^ y ^ m) + 1859775393 : g < 60 ? v += (x & y | x & m | y & m) - 1894007588 : v += (x ^ y ^ m) - 899497514,
                            E = m,
                            m = y,
                            y = x << 30 | x >>> 2,
                            x = h,
                            h = v
                        }
                        d[0] = d[0] + h | 0,
                        d[1] = d[1] + x | 0,
                        d[2] = d[2] + y | 0,
                        d[3] = d[3] + m | 0,
                        d[4] = d[4] + E | 0
                    },
                    _doFinalize: function() {
                        var u = this._data
                          , f = u.words
                          , d = this._nDataBytes * 8
                          , h = u.sigBytes * 8;
                        return f[h >>> 5] |= 128 << 24 - h % 32,
                        f[(h + 64 >>> 9 << 4) + 14] = Math.floor(d / 4294967296),
                        f[(h + 64 >>> 9 << 4) + 15] = d,
                        u.sigBytes = f.length * 4,
                        this._process(),
                        this._hash
                    },
                    clone: function() {
                        var u = s.clone.call(this);
                        return u._hash = this._hash.clone(),
                        u
                    }
                });
                n.SHA1 = s._createHelper(c),
                n.HmacSHA1 = s._createHmacHelper(c)
            }(),
            r.SHA1
        })
    }($m)),
    $m.exports
}
var Um = {
    exports: {}
}, z4;
function rEe() {
    return z4 || (z4 = 1,
    function(t, e) {
        (function(r, n) {
            t.exports = n(ko())
        }
        )(er, function(r) {
            (function() {
                var n = r
                  , i = n.lib
                  , o = i.Base
                  , s = n.enc
                  , a = s.Utf8
                  , l = n.algo;
                l.HMAC = o.extend({
                    init: function(c, u) {
                        c = this._hasher = new c.init,
                        typeof u == "string" && (u = a.parse(u));
                        var f = c.blockSize
                          , d = f * 4;
                        u.sigBytes > d && (u = c.finalize(u)),
                        u.clamp();
                        for (var h = this._oKey = u.clone(), x = this._iKey = u.clone(), y = h.words, m = x.words, E = 0; E < f; E++)
                            y[E] ^= 1549556828,
                            m[E] ^= 909522486;
                        h.sigBytes = x.sigBytes = d,
                        this.reset()
                    },
                    reset: function() {
                        var c = this._hasher;
                        c.reset(),
                        c.update(this._iKey)
                    },
                    update: function(c) {
                        return this._hasher.update(c),
                        this
                    },
                    finalize: function(c) {
                        var u = this._hasher
                          , f = u.finalize(c);
                        u.reset();
                        var d = u.finalize(this._oKey.clone().concat(f));
                        return d
                    }
                })
            }
            )()
        })
    }(Um)),
    Um.exports
}
var j4;
function aM() {
    return j4 || (j4 = 1,
    function(t, e) {
        (function(r, n, i) {
            t.exports = n(ko(), tEe(), rEe())
        }
        )(er, function(r) {
            return function() {
                var n = r
                  , i = n.lib
                  , o = i.Base
                  , s = i.WordArray
                  , a = n.algo
                  , l = a.MD5
                  , c = a.EvpKDF = o.extend({
                    cfg: o.extend({
                        keySize: 128 / 32,
                        hasher: l,
                        iterations: 1
                    }),
                    init: function(u) {
                        this.cfg = this.cfg.extend(u)
                    },
                    compute: function(u, f) {
                        for (var d, h = this.cfg, x = h.hasher.create(), y = s.create(), m = y.words, E = h.keySize, g = h.iterations; m.length < E; ) {
                            d && x.update(d),
                            d = x.update(u).finalize(f),
                            x.reset();
                            for (var p = 1; p < g; p++)
                                d = x.finalize(d),
                                x.reset();
                            y.concat(d)
                        }
                        return y.sigBytes = E * 4,
                        y
                    }
                });
                n.EvpKDF = function(u, f, d) {
                    return c.create(d).compute(u, f)
                }
            }(),
            r.EvpKDF
        })
    }(Lm)),
    Lm.exports
}
var Gm = {
    exports: {}
}, W4;
function AC() {
    return W4 || (W4 = 1,
    function(t, e) {
        (function(r, n, i) {
            t.exports = n(ko(), aM())
        }
        )(er, function(r) {
            r.lib.Cipher || function(n) {
                var i = r
                  , o = i.lib
                  , s = o.Base
                  , a = o.WordArray
                  , l = o.BufferedBlockAlgorithm
                  , c = i.enc;
                c.Utf8;
                var u = c.Base64
                  , f = i.algo
                  , d = f.EvpKDF
                  , h = o.Cipher = l.extend({
                    cfg: s.extend(),
                    createEncryptor: function(A, B) {
                        return this.create(this._ENC_XFORM_MODE, A, B)
                    },
                    createDecryptor: function(A, B) {
                        return this.create(this._DEC_XFORM_MODE, A, B)
                    },
                    init: function(A, B, S) {
                        this.cfg = this.cfg.extend(S),
                        this._xformMode = A,
                        this._key = B,
                        this.reset()
                    },
                    reset: function() {
                        l.reset.call(this),
                        this._doReset()
                    },
                    process: function(A) {
                        return this._append(A),
                        this._process()
                    },
                    finalize: function(A) {
                        A && this._append(A);
                        var B = this._doFinalize();
                        return B
                    },
                    keySize: 128 / 32,
                    ivSize: 128 / 32,
                    _ENC_XFORM_MODE: 1,
                    _DEC_XFORM_MODE: 2,
                    _createHelper: function() {
                        function A(B) {
                            return typeof B == "string" ? T : b
                        }
                        return function(B) {
                            return {
                                encrypt: function(S, D, F) {
                                    return A(D).encrypt(B, S, D, F)
                                },
                                decrypt: function(S, D, F) {
                                    return A(D).decrypt(B, S, D, F)
                                }
                            }
                        }
                    }()
                });
                o.StreamCipher = h.extend({
                    _doFinalize: function() {
                        var A = this._process(!0);
                        return A
                    },
                    blockSize: 1
                });
                var x = i.mode = {}
                  , y = o.BlockCipherMode = s.extend({
                    createEncryptor: function(A, B) {
                        return this.Encryptor.create(A, B)
                    },
                    createDecryptor: function(A, B) {
                        return this.Decryptor.create(A, B)
                    },
                    init: function(A, B) {
                        this._cipher = A,
                        this._iv = B
                    }
                })
                  , m = x.CBC = function() {
                    var A = y.extend();
                    A.Encryptor = A.extend({
                        processBlock: function(S, D) {
                            var F = this._cipher
                              , R = F.blockSize;
                            B.call(this, S, D, R),
                            F.encryptBlock(S, D),
                            this._prevBlock = S.slice(D, D + R)
                        }
                    }),
                    A.Decryptor = A.extend({
                        processBlock: function(S, D) {
                            var F = this._cipher
                              , R = F.blockSize
                              , P = S.slice(D, D + R);
                            F.decryptBlock(S, D),
                            B.call(this, S, D, R),
                            this._prevBlock = P
                        }
                    });
                    function B(S, D, F) {
                        var R, P = this._iv;
                        P ? (R = P,
                        this._iv = n) : R = this._prevBlock;
                        for (var N = 0; N < F; N++)
                            S[D + N] ^= R[N]
                    }
                    return A
                }()
                  , E = i.pad = {}
                  , g = E.Pkcs7 = {
                    pad: function(A, B) {
                        for (var S = B * 4, D = S - A.sigBytes % S, F = D << 24 | D << 16 | D << 8 | D, R = [], P = 0; P < D; P += 4)
                            R.push(F);
                        var N = a.create(R, D);
                        A.concat(N)
                    },
                    unpad: function(A) {
                        var B = A.words[A.sigBytes - 1 >>> 2] & 255;
                        A.sigBytes -= B
                    }
                };
                o.BlockCipher = h.extend({
                    cfg: h.cfg.extend({
                        mode: m,
                        padding: g
                    }),
                    reset: function() {
                        var A;
                        h.reset.call(this);
                        var B = this.cfg
                          , S = B.iv
                          , D = B.mode;
                        this._xformMode == this._ENC_XFORM_MODE ? A = D.createEncryptor : (A = D.createDecryptor,
                        this._minBufferSize = 1),
                        this._mode && this._mode.__creator == A ? this._mode.init(this, S && S.words) : (this._mode = A.call(D, this, S && S.words),
                        this._mode.__creator = A)
                    },
                    _doProcessBlock: function(A, B) {
                        this._mode.processBlock(A, B)
                    },
                    _doFinalize: function() {
                        var A, B = this.cfg.padding;
                        return this._xformMode == this._ENC_XFORM_MODE ? (B.pad(this._data, this.blockSize),
                        A = this._process(!0)) : (A = this._process(!0),
                        B.unpad(A)),
                        A
                    },
                    blockSize: 128 / 32
                });
                var p = o.CipherParams = s.extend({
                    init: function(A) {
                        this.mixIn(A)
                    },
                    toString: function(A) {
                        return (A || this.formatter).stringify(this)
                    }
                })
                  , v = i.format = {}
                  , _ = v.OpenSSL = {
                    stringify: function(A) {
                        var B, S = A.ciphertext, D = A.salt;
                        return D ? B = a.create([1398893684, 1701076831]).concat(D).concat(S) : B = S,
                        B.toString(u)
                    },
                    parse: function(A) {
                        var B, S = u.parse(A), D = S.words;
                        return D[0] == 1398893684 && D[1] == 1701076831 && (B = a.create(D.slice(2, 4)),
                        D.splice(0, 4),
                        S.sigBytes -= 16),
                        p.create({
                            ciphertext: S,
                            salt: B
                        })
                    }
                }
                  , b = o.SerializableCipher = s.extend({
                    cfg: s.extend({
                        format: _
                    }),
                    encrypt: function(A, B, S, D) {
                        D = this.cfg.extend(D);
                        var F = A.createEncryptor(S, D)
                          , R = F.finalize(B)
                          , P = F.cfg;
                        return p.create({
                            ciphertext: R,
                            key: S,
                            iv: P.iv,
                            algorithm: A,
                            mode: P.mode,
                            padding: P.padding,
                            blockSize: A.blockSize,
                            formatter: D.format
                        })
                    },
                    decrypt: function(A, B, S, D) {
                        D = this.cfg.extend(D),
                        B = this._parse(B, D.format);
                        var F = A.createDecryptor(S, D).finalize(B.ciphertext);
                        return F
                    },
                    _parse: function(A, B) {
                        return typeof A == "string" ? B.parse(A, this) : A
                    }
                })
                  , C = i.kdf = {}
                  , w = C.OpenSSL = {
                    execute: function(A, B, S, D, F) {
                        if (D || (D = a.random(64 / 8)),
                        F)
                            var R = d.create({
                                keySize: B + S,
                                hasher: F
                            }).compute(A, D);
                        else
                            var R = d.create({
                                keySize: B + S
                            }).compute(A, D);
                        var P = a.create(R.words.slice(B), S * 4);
                        return R.sigBytes = B * 4,
                        p.create({
                            key: R,
                            iv: P,
                            salt: D
                        })
                    }
                }
                  , T = o.PasswordBasedCipher = b.extend({
                    cfg: b.cfg.extend({
                        kdf: w
                    }),
                    encrypt: function(A, B, S, D) {
                        D = this.cfg.extend(D);
                        var F = D.kdf.execute(S, A.keySize, A.ivSize, D.salt, D.hasher);
                        D.iv = F.iv;
                        var R = b.encrypt.call(this, A, B, F.key, D);
                        return R.mixIn(F),
                        R
                    },
                    decrypt: function(A, B, S, D) {
                        D = this.cfg.extend(D),
                        B = this._parse(B, D.format);
                        var F = D.kdf.execute(S, A.keySize, A.ivSize, B.salt, D.hasher);
                        D.iv = F.iv;
                        var R = b.decrypt.call(this, A, B, F.key, D);
                        return R
                    }
                })
            }()
        })
    }(Gm)),
    Gm.exports
}
(function(t, e) {
    (function(r, n, i) {
        t.exports = n(ko(), Qye(), eEe(), aM(), AC())
    }
    )(er, function(r) {
        return function() {
            var n = r
              , i = n.lib
              , o = i.BlockCipher
              , s = n.algo
              , a = []
              , l = []
              , c = []
              , u = []
              , f = []
              , d = []
              , h = []
              , x = []
              , y = []
              , m = [];
            (function() {
                for (var p = [], v = 0; v < 256; v++)
                    v < 128 ? p[v] = v << 1 : p[v] = v << 1 ^ 283;
                for (var _ = 0, b = 0, v = 0; v < 256; v++) {
                    var C = b ^ b << 1 ^ b << 2 ^ b << 3 ^ b << 4;
                    C = C >>> 8 ^ C & 255 ^ 99,
                    a[_] = C,
                    l[C] = _;
                    var w = p[_]
                      , T = p[w]
                      , A = p[T]
                      , B = p[C] * 257 ^ C * 16843008;
                    c[_] = B << 24 | B >>> 8,
                    u[_] = B << 16 | B >>> 16,
                    f[_] = B << 8 | B >>> 24,
                    d[_] = B;
                    var B = A * 16843009 ^ T * 65537 ^ w * 257 ^ _ * 16843008;
                    h[C] = B << 24 | B >>> 8,
                    x[C] = B << 16 | B >>> 16,
                    y[C] = B << 8 | B >>> 24,
                    m[C] = B,
                    _ ? (_ = w ^ p[p[p[A ^ w]]],
                    b ^= p[p[b]]) : _ = b = 1
                }
            }
            )();
            var E = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54]
              , g = s.AES = o.extend({
                _doReset: function() {
                    var p;
                    if (!(this._nRounds && this._keyPriorReset === this._key)) {
                        for (var v = this._keyPriorReset = this._key, _ = v.words, b = v.sigBytes / 4, C = this._nRounds = b + 6, w = (C + 1) * 4, T = this._keySchedule = [], A = 0; A < w; A++)
                            A < b ? T[A] = _[A] : (p = T[A - 1],
                            A % b ? b > 6 && A % b == 4 && (p = a[p >>> 24] << 24 | a[p >>> 16 & 255] << 16 | a[p >>> 8 & 255] << 8 | a[p & 255]) : (p = p << 8 | p >>> 24,
                            p = a[p >>> 24] << 24 | a[p >>> 16 & 255] << 16 | a[p >>> 8 & 255] << 8 | a[p & 255],
                            p ^= E[A / b | 0] << 24),
                            T[A] = T[A - b] ^ p);
                        for (var B = this._invKeySchedule = [], S = 0; S < w; S++) {
                            var A = w - S;
                            if (S % 4)
                                var p = T[A];
                            else
                                var p = T[A - 4];
                            S < 4 || A <= 4 ? B[S] = p : B[S] = h[a[p >>> 24]] ^ x[a[p >>> 16 & 255]] ^ y[a[p >>> 8 & 255]] ^ m[a[p & 255]]
                        }
                    }
                },
                encryptBlock: function(p, v) {
                    this._doCryptBlock(p, v, this._keySchedule, c, u, f, d, a)
                },
                decryptBlock: function(p, v) {
                    var _ = p[v + 1];
                    p[v + 1] = p[v + 3],
                    p[v + 3] = _,
                    this._doCryptBlock(p, v, this._invKeySchedule, h, x, y, m, l);
                    var _ = p[v + 1];
                    p[v + 1] = p[v + 3],
                    p[v + 3] = _
                },
                _doCryptBlock: function(p, v, _, b, C, w, T, A) {
                    for (var B = this._nRounds, S = p[v] ^ _[0], D = p[v + 1] ^ _[1], F = p[v + 2] ^ _[2], R = p[v + 3] ^ _[3], P = 4, N = 1; N < B; N++) {
                        var j = b[S >>> 24] ^ C[D >>> 16 & 255] ^ w[F >>> 8 & 255] ^ T[R & 255] ^ _[P++]
                          , K = b[D >>> 24] ^ C[F >>> 16 & 255] ^ w[R >>> 8 & 255] ^ T[S & 255] ^ _[P++]
                          , oe = b[F >>> 24] ^ C[R >>> 16 & 255] ^ w[S >>> 8 & 255] ^ T[D & 255] ^ _[P++]
                          , U = b[R >>> 24] ^ C[S >>> 16 & 255] ^ w[D >>> 8 & 255] ^ T[F & 255] ^ _[P++];
                        S = j,
                        D = K,
                        F = oe,
                        R = U
                    }
                    var j = (A[S >>> 24] << 24 | A[D >>> 16 & 255] << 16 | A[F >>> 8 & 255] << 8 | A[R & 255]) ^ _[P++]
                      , K = (A[D >>> 24] << 24 | A[F >>> 16 & 255] << 16 | A[R >>> 8 & 255] << 8 | A[S & 255]) ^ _[P++]
                      , oe = (A[F >>> 24] << 24 | A[R >>> 16 & 255] << 16 | A[S >>> 8 & 255] << 8 | A[D & 255]) ^ _[P++]
                      , U = (A[R >>> 24] << 24 | A[S >>> 16 & 255] << 16 | A[D >>> 8 & 255] << 8 | A[F & 255]) ^ _[P++];
                    p[v] = j,
                    p[v + 1] = K,
                    p[v + 2] = oe,
                    p[v + 3] = U
                },
                keySize: 256 / 32
            });
            n.AES = o._createHelper(g)
        }(),
        r.AES
    })
}
)(oM);
var nEe = oM.exports;
const E5e = Vi(nEe);
var lM = {
    exports: {}
};
(function(t, e) {
    (function(r, n) {
        t.exports = n(ko())
    }
    )(er, function(r) {
        return r.enc.Utf8
    })
}
)(lM);
var iEe = lM.exports;
const _5e = Vi(iEe);
var cM = {
    exports: {}
};
(function(t, e) {
    (function(r, n, i) {
        t.exports = n(ko(), AC())
    }
    )(er, function(r) {
        return r.mode.ECB = function() {
            var n = r.lib.BlockCipherMode.extend();
            return n.Encryptor = n.extend({
                processBlock: function(i, o) {
                    this._cipher.encryptBlock(i, o)
                }
            }),
            n.Decryptor = n.extend({
                processBlock: function(i, o) {
                    this._cipher.decryptBlock(i, o)
                }
            }),
            n
        }(),
        r.mode.ECB
    })
}
)(cM);
var oEe = cM.exports;
const b5e = Vi(oEe);
var uM = {
    exports: {}
};
(function(t, e) {
    (function(r, n, i) {
        t.exports = n(ko(), AC())
    }
    )(er, function(r) {
        return r.pad.Pkcs7
    })
}
)(uM);
var sEe = uM.exports;
const C5e = Vi(sEe);
function Y4(t) {
    return t !== null && typeof t == "object" && "constructor"in t && t.constructor === Object
}
function wC(t={}, e={}) {
    Object.keys(e).forEach(r => {
        typeof t[r] > "u" ? t[r] = e[r] : Y4(e[r]) && Y4(t[r]) && Object.keys(e[r]).length > 0 && wC(t[r], e[r])
    }
    )
}
const fM = {
    body: {},
    addEventListener() {},
    removeEventListener() {},
    activeElement: {
        blur() {},
        nodeName: ""
    },
    querySelector() {
        return null
    },
    querySelectorAll() {
        return []
    },
    getElementById() {
        return null
    },
    createEvent() {
        return {
            initEvent() {}
        }
    },
    createElement() {
        return {
            children: [],
            childNodes: [],
            style: {},
            setAttribute() {},
            getElementsByTagName() {
                return []
            }
        }
    },
    createElementNS() {
        return {}
    },
    importNode() {
        return null
    },
    location: {
        hash: "",
        host: "",
        hostname: "",
        href: "",
        origin: "",
        pathname: "",
        protocol: "",
        search: ""
    }
};
function tn() {
    const t = typeof document < "u" ? document : {};
    return wC(t, fM),
    t
}
const aEe = {
    document: fM,
    navigator: {
        userAgent: ""
    },
    location: {
        hash: "",
        host: "",
        hostname: "",
        href: "",
        origin: "",
        pathname: "",
        protocol: "",
        search: ""
    },
    history: {
        replaceState() {},
        pushState() {},
        go() {},
        back() {}
    },
    CustomEvent: function() {
        return this
    },
    addEventListener() {},
    removeEventListener() {},
    getComputedStyle() {
        return {
            getPropertyValue() {
                return ""
            }
        }
    },
    Image() {},
    Date() {},
    screen: {},
    setTimeout() {},
    clearTimeout() {},
    matchMedia() {
        return {}
    },
    requestAnimationFrame(t) {
        return typeof setTimeout > "u" ? (t(),
        null) : setTimeout(t, 0)
    },
    cancelAnimationFrame(t) {
        typeof setTimeout > "u" || clearTimeout(t)
    }
};
function Nr() {
    const t = typeof window < "u" ? window : {};
    return wC(t, aEe),
    t
}
function lEe(t) {
    const e = t.__proto__;
    Object.defineProperty(t, "__proto__", {
        get() {
            return e
        },
        set(r) {
            e.__proto__ = r
        }
    })
}
class Ys extends Array {
    constructor(e) {
        typeof e == "number" ? super(e) : (super(...e || []),
        lEe(this))
    }
}
function bd(t=[]) {
    const e = [];
    return t.forEach(r => {
        Array.isArray(r) ? e.push(...bd(r)) : e.push(r)
    }
    ),
    e
}
function dM(t, e) {
    return Array.prototype.filter.call(t, e)
}
function cEe(t) {
    const e = [];
    for (let r = 0; r < t.length; r += 1)
        e.indexOf(t[r]) === -1 && e.push(t[r]);
    return e
}
function uEe(t, e) {
    if (typeof t != "string")
        return [t];
    const r = []
      , n = e.querySelectorAll(t);
    for (let i = 0; i < n.length; i += 1)
        r.push(n[i]);
    return r
}
function De(t, e) {
    const r = Nr()
      , n = tn();
    let i = [];
    if (!e && t instanceof Ys)
        return t;
    if (!t)
        return new Ys(i);
    if (typeof t == "string") {
        const o = t.trim();
        if (o.indexOf("<") >= 0 && o.indexOf(">") >= 0) {
            let s = "div";
            o.indexOf("<li") === 0 && (s = "ul"),
            o.indexOf("<tr") === 0 && (s = "tbody"),
            (o.indexOf("<td") === 0 || o.indexOf("<th") === 0) && (s = "tr"),
            o.indexOf("<tbody") === 0 && (s = "table"),
            o.indexOf("<option") === 0 && (s = "select");
            const a = n.createElement(s);
            a.innerHTML = o;
            for (let l = 0; l < a.childNodes.length; l += 1)
                i.push(a.childNodes[l])
        } else
            i = uEe(t.trim(), e || n)
    } else if (t.nodeType || t === r || t === n)
        i.push(t);
    else if (Array.isArray(t)) {
        if (t instanceof Ys)
            return t;
        i = t
    }
    return new Ys(cEe(i))
}
De.fn = Ys.prototype;
function fEe(...t) {
    const e = bd(t.map(r => r.split(" ")));
    return this.forEach(r => {
        r.classList.add(...e)
    }
    ),
    this
}
function dEe(...t) {
    const e = bd(t.map(r => r.split(" ")));
    return this.forEach(r => {
        r.classList.remove(...e)
    }
    ),
    this
}
function hEe(...t) {
    const e = bd(t.map(r => r.split(" ")));
    this.forEach(r => {
        e.forEach(n => {
            r.classList.toggle(n)
        }
        )
    }
    )
}
function xEe(...t) {
    const e = bd(t.map(r => r.split(" ")));
    return dM(this, r => e.filter(n => r.classList.contains(n)).length > 0).length > 0
}
function pEe(t, e) {
    if (arguments.length === 1 && typeof t == "string")
        return this[0] ? this[0].getAttribute(t) : void 0;
    for (let r = 0; r < this.length; r += 1)
        if (arguments.length === 2)
            this[r].setAttribute(t, e);
        else
            for (const n in t)
                this[r][n] = t[n],
                this[r].setAttribute(n, t[n]);
    return this
}
function gEe(t) {
    for (let e = 0; e < this.length; e += 1)
        this[e].removeAttribute(t);
    return this
}
function mEe(t) {
    for (let e = 0; e < this.length; e += 1)
        this[e].style.transform = t;
    return this
}
function vEe(t) {
    for (let e = 0; e < this.length; e += 1)
        this[e].style.transitionDuration = typeof t != "string" ? `${t}ms` : t;
    return this
}
function yEe(...t) {
    let[e,r,n,i] = t;
    typeof t[1] == "function" && ([e,n,i] = t,
    r = void 0),
    i || (i = !1);
    function o(c) {
        const u = c.target;
        if (!u)
            return;
        const f = c.target.dom7EventData || [];
        if (f.indexOf(c) < 0 && f.unshift(c),
        De(u).is(r))
            n.apply(u, f);
        else {
            const d = De(u).parents();
            for (let h = 0; h < d.length; h += 1)
                De(d[h]).is(r) && n.apply(d[h], f)
        }
    }
    function s(c) {
        const u = c && c.target ? c.target.dom7EventData || [] : [];
        u.indexOf(c) < 0 && u.unshift(c),
        n.apply(this, u)
    }
    const a = e.split(" ");
    let l;
    for (let c = 0; c < this.length; c += 1) {
        const u = this[c];
        if (r)
            for (l = 0; l < a.length; l += 1) {
                const f = a[l];
                u.dom7LiveListeners || (u.dom7LiveListeners = {}),
                u.dom7LiveListeners[f] || (u.dom7LiveListeners[f] = []),
                u.dom7LiveListeners[f].push({
                    listener: n,
                    proxyListener: o
                }),
                u.addEventListener(f, o, i)
            }
        else
            for (l = 0; l < a.length; l += 1) {
                const f = a[l];
                u.dom7Listeners || (u.dom7Listeners = {}),
                u.dom7Listeners[f] || (u.dom7Listeners[f] = []),
                u.dom7Listeners[f].push({
                    listener: n,
                    proxyListener: s
                }),
                u.addEventListener(f, s, i)
            }
    }
    return this
}
function EEe(...t) {
    let[e,r,n,i] = t;
    typeof t[1] == "function" && ([e,n,i] = t,
    r = void 0),
    i || (i = !1);
    const o = e.split(" ");
    for (let s = 0; s < o.length; s += 1) {
        const a = o[s];
        for (let l = 0; l < this.length; l += 1) {
            const c = this[l];
            let u;
            if (!r && c.dom7Listeners ? u = c.dom7Listeners[a] : r && c.dom7LiveListeners && (u = c.dom7LiveListeners[a]),
            u && u.length)
                for (let f = u.length - 1; f >= 0; f -= 1) {
                    const d = u[f];
                    n && d.listener === n || n && d.listener && d.listener.dom7proxy && d.listener.dom7proxy === n ? (c.removeEventListener(a, d.proxyListener, i),
                    u.splice(f, 1)) : n || (c.removeEventListener(a, d.proxyListener, i),
                    u.splice(f, 1))
                }
        }
    }
    return this
}
function _Ee(...t) {
    const e = Nr()
      , r = t[0].split(" ")
      , n = t[1];
    for (let i = 0; i < r.length; i += 1) {
        const o = r[i];
        for (let s = 0; s < this.length; s += 1) {
            const a = this[s];
            if (e.CustomEvent) {
                const l = new e.CustomEvent(o,{
                    detail: n,
                    bubbles: !0,
                    cancelable: !0
                });
                a.dom7EventData = t.filter( (c, u) => u > 0),
                a.dispatchEvent(l),
                a.dom7EventData = [],
                delete a.dom7EventData
            }
        }
    }
    return this
}
function bEe(t) {
    const e = this;
    function r(n) {
        n.target === this && (t.call(this, n),
        e.off("transitionend", r))
    }
    return t && e.on("transitionend", r),
    this
}
function CEe(t) {
    if (this.length > 0) {
        if (t) {
            const e = this.styles();
            return this[0].offsetWidth + parseFloat(e.getPropertyValue("margin-right")) + parseFloat(e.getPropertyValue("margin-left"))
        }
        return this[0].offsetWidth
    }
    return null
}
function AEe(t) {
    if (this.length > 0) {
        if (t) {
            const e = this.styles();
            return this[0].offsetHeight + parseFloat(e.getPropertyValue("margin-top")) + parseFloat(e.getPropertyValue("margin-bottom"))
        }
        return this[0].offsetHeight
    }
    return null
}
function wEe() {
    if (this.length > 0) {
        const t = Nr()
          , e = tn()
          , r = this[0]
          , n = r.getBoundingClientRect()
          , i = e.body
          , o = r.clientTop || i.clientTop || 0
          , s = r.clientLeft || i.clientLeft || 0
          , a = r === t ? t.scrollY : r.scrollTop
          , l = r === t ? t.scrollX : r.scrollLeft;
        return {
            top: n.top + a - o,
            left: n.left + l - s
        }
    }
    return null
}
function BEe() {
    const t = Nr();
    return this[0] ? t.getComputedStyle(this[0], null) : {}
}
function SEe(t, e) {
    const r = Nr();
    let n;
    if (arguments.length === 1)
        if (typeof t == "string") {
            if (this[0])
                return r.getComputedStyle(this[0], null).getPropertyValue(t)
        } else {
            for (n = 0; n < this.length; n += 1)
                for (const i in t)
                    this[n].style[i] = t[i];
            return this
        }
    if (arguments.length === 2 && typeof t == "string") {
        for (n = 0; n < this.length; n += 1)
            this[n].style[t] = e;
        return this
    }
    return this
}
function TEe(t) {
    return t ? (this.forEach( (e, r) => {
        t.apply(e, [e, r])
    }
    ),
    this) : this
}
function DEe(t) {
    const e = dM(this, t);
    return De(e)
}
function FEe(t) {
    if (typeof t > "u")
        return this[0] ? this[0].innerHTML : null;
    for (let e = 0; e < this.length; e += 1)
        this[e].innerHTML = t;
    return this
}
function PEe(t) {
    if (typeof t > "u")
        return this[0] ? this[0].textContent.trim() : null;
    for (let e = 0; e < this.length; e += 1)
        this[e].textContent = t;
    return this
}
function IEe(t) {
    const e = Nr()
      , r = tn()
      , n = this[0];
    let i, o;
    if (!n || typeof t > "u")
        return !1;
    if (typeof t == "string") {
        if (n.matches)
            return n.matches(t);
        if (n.webkitMatchesSelector)
            return n.webkitMatchesSelector(t);
        if (n.msMatchesSelector)
            return n.msMatchesSelector(t);
        for (i = De(t),
        o = 0; o < i.length; o += 1)
            if (i[o] === n)
                return !0;
        return !1
    }
    if (t === r)
        return n === r;
    if (t === e)
        return n === e;
    if (t.nodeType || t instanceof Ys) {
        for (i = t.nodeType ? [t] : t,
        o = 0; o < i.length; o += 1)
            if (i[o] === n)
                return !0;
        return !1
    }
    return !1
}
function OEe() {
    let t = this[0], e;
    if (t) {
        for (e = 0; (t = t.previousSibling) !== null; )
            t.nodeType === 1 && (e += 1);
        return e
    }
}
function kEe(t) {
    if (typeof t > "u")
        return this;
    const e = this.length;
    if (t > e - 1)
        return De([]);
    if (t < 0) {
        const r = e + t;
        return r < 0 ? De([]) : De([this[r]])
    }
    return De([this[t]])
}
function REe(...t) {
    let e;
    const r = tn();
    for (let n = 0; n < t.length; n += 1) {
        e = t[n];
        for (let i = 0; i < this.length; i += 1)
            if (typeof e == "string") {
                const o = r.createElement("div");
                for (o.innerHTML = e; o.firstChild; )
                    this[i].appendChild(o.firstChild)
            } else if (e instanceof Ys)
                for (let o = 0; o < e.length; o += 1)
                    this[i].appendChild(e[o]);
            else
                this[i].appendChild(e)
    }
    return this
}
function MEe(t) {
    const e = tn();
    let r, n;
    for (r = 0; r < this.length; r += 1)
        if (typeof t == "string") {
            const i = e.createElement("div");
            for (i.innerHTML = t,
            n = i.childNodes.length - 1; n >= 0; n -= 1)
                this[r].insertBefore(i.childNodes[n], this[r].childNodes[0])
        } else if (t instanceof Ys)
            for (n = 0; n < t.length; n += 1)
                this[r].insertBefore(t[n], this[r].childNodes[0]);
        else
            this[r].insertBefore(t, this[r].childNodes[0]);
    return this
}
function NEe(t) {
    return this.length > 0 ? t ? this[0].nextElementSibling && De(this[0].nextElementSibling).is(t) ? De([this[0].nextElementSibling]) : De([]) : this[0].nextElementSibling ? De([this[0].nextElementSibling]) : De([]) : De([])
}
function LEe(t) {
    const e = [];
    let r = this[0];
    if (!r)
        return De([]);
    for (; r.nextElementSibling; ) {
        const n = r.nextElementSibling;
        t ? De(n).is(t) && e.push(n) : e.push(n),
        r = n
    }
    return De(e)
}
function $Ee(t) {
    if (this.length > 0) {
        const e = this[0];
        return t ? e.previousElementSibling && De(e.previousElementSibling).is(t) ? De([e.previousElementSibling]) : De([]) : e.previousElementSibling ? De([e.previousElementSibling]) : De([])
    }
    return De([])
}
function UEe(t) {
    const e = [];
    let r = this[0];
    if (!r)
        return De([]);
    for (; r.previousElementSibling; ) {
        const n = r.previousElementSibling;
        t ? De(n).is(t) && e.push(n) : e.push(n),
        r = n
    }
    return De(e)
}
function GEe(t) {
    const e = [];
    for (let r = 0; r < this.length; r += 1)
        this[r].parentNode !== null && (t ? De(this[r].parentNode).is(t) && e.push(this[r].parentNode) : e.push(this[r].parentNode));
    return De(e)
}
function HEe(t) {
    const e = [];
    for (let r = 0; r < this.length; r += 1) {
        let n = this[r].parentNode;
        for (; n; )
            t ? De(n).is(t) && e.push(n) : e.push(n),
            n = n.parentNode
    }
    return De(e)
}
function VEe(t) {
    let e = this;
    return typeof t > "u" ? De([]) : (e.is(t) || (e = e.parents(t).eq(0)),
    e)
}
function zEe(t) {
    const e = [];
    for (let r = 0; r < this.length; r += 1) {
        const n = this[r].querySelectorAll(t);
        for (let i = 0; i < n.length; i += 1)
            e.push(n[i])
    }
    return De(e)
}
function jEe(t) {
    const e = [];
    for (let r = 0; r < this.length; r += 1) {
        const n = this[r].children;
        for (let i = 0; i < n.length; i += 1)
            (!t || De(n[i]).is(t)) && e.push(n[i])
    }
    return De(e)
}
function WEe() {
    for (let t = 0; t < this.length; t += 1)
        this[t].parentNode && this[t].parentNode.removeChild(this[t]);
    return this
}
const X4 = {
    addClass: fEe,
    removeClass: dEe,
    hasClass: xEe,
    toggleClass: hEe,
    attr: pEe,
    removeAttr: gEe,
    transform: mEe,
    transition: vEe,
    on: yEe,
    off: EEe,
    trigger: _Ee,
    transitionEnd: bEe,
    outerWidth: CEe,
    outerHeight: AEe,
    styles: BEe,
    offset: wEe,
    css: SEe,
    each: TEe,
    html: FEe,
    text: PEe,
    is: IEe,
    index: OEe,
    eq: kEe,
    append: REe,
    prepend: MEe,
    next: NEe,
    nextAll: LEe,
    prev: $Ee,
    prevAll: UEe,
    parent: GEe,
    parents: HEe,
    closest: VEe,
    find: zEe,
    children: jEe,
    filter: DEe,
    remove: WEe
};
Object.keys(X4).forEach(t => {
    Object.defineProperty(De.fn, t, {
        value: X4[t],
        writable: !0
    })
}
);
function YEe(t) {
    const e = t;
    Object.keys(e).forEach(r => {
        try {
            e[r] = null
        } catch {}
        try {
            delete e[r]
        } catch {}
    }
    )
}
function rp(t, e=0) {
    return setTimeout(t, e)
}
function Nf() {
    return Date.now()
}
function XEe(t) {
    const e = Nr();
    let r;
    return e.getComputedStyle && (r = e.getComputedStyle(t, null)),
    !r && t.currentStyle && (r = t.currentStyle),
    r || (r = t.style),
    r
}
function KEe(t, e="x") {
    const r = Nr();
    let n, i, o;
    const s = XEe(t);
    return r.WebKitCSSMatrix ? (i = s.transform || s.webkitTransform,
    i.split(",").length > 6 && (i = i.split(", ").map(a => a.replace(",", ".")).join(", ")),
    o = new r.WebKitCSSMatrix(i === "none" ? "" : i)) : (o = s.MozTransform || s.OTransform || s.MsTransform || s.msTransform || s.transform || s.getPropertyValue("transform").replace("translate(", "matrix(1, 0, 0, 1,"),
    n = o.toString().split(",")),
    e === "x" && (r.WebKitCSSMatrix ? i = o.m41 : n.length === 16 ? i = parseFloat(n[12]) : i = parseFloat(n[4])),
    e === "y" && (r.WebKitCSSMatrix ? i = o.m42 : n.length === 16 ? i = parseFloat(n[13]) : i = parseFloat(n[5])),
    i || 0
}
function Dh(t) {
    return typeof t == "object" && t !== null && t.constructor && Object.prototype.toString.call(t).slice(8, -1) === "Object"
}
function qEe(t) {
    return typeof window < "u" && typeof window.HTMLElement < "u" ? t instanceof HTMLElement : t && (t.nodeType === 1 || t.nodeType === 11)
}
function Hn(...t) {
    const e = Object(t[0])
      , r = ["__proto__", "constructor", "prototype"];
    for (let n = 1; n < t.length; n += 1) {
        const i = t[n];
        if (i != null && !qEe(i)) {
            const o = Object.keys(Object(i)).filter(s => r.indexOf(s) < 0);
            for (let s = 0, a = o.length; s < a; s += 1) {
                const l = o[s]
                  , c = Object.getOwnPropertyDescriptor(i, l);
                c !== void 0 && c.enumerable && (Dh(e[l]) && Dh(i[l]) ? i[l].__swiper__ ? e[l] = i[l] : Hn(e[l], i[l]) : !Dh(e[l]) && Dh(i[l]) ? (e[l] = {},
                i[l].__swiper__ ? e[l] = i[l] : Hn(e[l], i[l])) : e[l] = i[l])
            }
        }
    }
    return e
}
function Fh(t, e, r) {
    t.style.setProperty(e, r)
}
function hM({swiper: t, targetPosition: e, side: r}) {
    const n = Nr()
      , i = -t.translate;
    let o = null, s;
    const a = t.params.speed;
    t.wrapperEl.style.scrollSnapType = "none",
    n.cancelAnimationFrame(t.cssModeFrameID);
    const l = e > i ? "next" : "prev"
      , c = (f, d) => l === "next" && f >= d || l === "prev" && f <= d
      , u = () => {
        s = new Date().getTime(),
        o === null && (o = s);
        const f = Math.max(Math.min((s - o) / a, 1), 0)
          , d = .5 - Math.cos(f * Math.PI) / 2;
        let h = i + d * (e - i);
        if (c(h, e) && (h = e),
        t.wrapperEl.scrollTo({
            [r]: h
        }),
        c(h, e)) {
            t.wrapperEl.style.overflow = "hidden",
            t.wrapperEl.style.scrollSnapType = "",
            setTimeout( () => {
                t.wrapperEl.style.overflow = "",
                t.wrapperEl.scrollTo({
                    [r]: h
                })
            }
            ),
            n.cancelAnimationFrame(t.cssModeFrameID);
            return
        }
        t.cssModeFrameID = n.requestAnimationFrame(u)
    }
    ;
    u()
}
let Hm;
function ZEe() {
    const t = Nr()
      , e = tn();
    return {
        smoothScroll: e.documentElement && "scrollBehavior"in e.documentElement.style,
        touch: !!("ontouchstart"in t || t.DocumentTouch && e instanceof t.DocumentTouch),
        passiveListener: function() {
            let n = !1;
            try {
                const i = Object.defineProperty({}, "passive", {
                    get() {
                        n = !0
                    }
                });
                t.addEventListener("testPassiveListener", null, i)
            } catch {}
            return n
        }(),
        gestures: function() {
            return "ongesturestart"in t
        }()
    }
}
function xM() {
    return Hm || (Hm = ZEe()),
    Hm
}
let Vm;
function JEe({userAgent: t}={}) {
    const e = xM()
      , r = Nr()
      , n = r.navigator.platform
      , i = t || r.navigator.userAgent
      , o = {
        ios: !1,
        android: !1
    }
      , s = r.screen.width
      , a = r.screen.height
      , l = i.match(/(Android);?[\s\/]+([\d.]+)?/);
    let c = i.match(/(iPad).*OS\s([\d_]+)/);
    const u = i.match(/(iPod)(.*OS\s([\d_]+))?/)
      , f = !c && i.match(/(iPhone\sOS|iOS)\s([\d_]+)/)
      , d = n === "Win32";
    let h = n === "MacIntel";
    const x = ["1024x1366", "1366x1024", "834x1194", "1194x834", "834x1112", "1112x834", "768x1024", "1024x768", "820x1180", "1180x820", "810x1080", "1080x810"];
    return !c && h && e.touch && x.indexOf(`${s}x${a}`) >= 0 && (c = i.match(/(Version)\/([\d.]+)/),
    c || (c = [0, 1, "13_0_0"]),
    h = !1),
    l && !d && (o.os = "android",
    o.android = !0),
    (c || f || u) && (o.os = "ios",
    o.ios = !0),
    o
}
function QEe(t={}) {
    return Vm || (Vm = JEe(t)),
    Vm
}
let zm;
function e_e() {
    const t = Nr();
    function e() {
        const r = t.navigator.userAgent.toLowerCase();
        return r.indexOf("safari") >= 0 && r.indexOf("chrome") < 0 && r.indexOf("android") < 0
    }
    return {
        isSafari: e(),
        isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t.navigator.userAgent)
    }
}
function t_e() {
    return zm || (zm = e_e()),
    zm
}
function r_e({swiper: t, on: e, emit: r}) {
    const n = Nr();
    let i = null
      , o = null;
    const s = () => {
        !t || t.destroyed || !t.initialized || (r("beforeResize"),
        r("resize"))
    }
      , a = () => {
        !t || t.destroyed || !t.initialized || (i = new ResizeObserver(u => {
            o = n.requestAnimationFrame( () => {
                const {width: f, height: d} = t;
                let h = f
                  , x = d;
                u.forEach( ({contentBoxSize: y, contentRect: m, target: E}) => {
                    E && E !== t.el || (h = m ? m.width : (y[0] || y).inlineSize,
                    x = m ? m.height : (y[0] || y).blockSize)
                }
                ),
                (h !== f || x !== d) && s()
            }
            )
        }
        ),
        i.observe(t.el))
    }
      , l = () => {
        o && n.cancelAnimationFrame(o),
        i && i.unobserve && t.el && (i.unobserve(t.el),
        i = null)
    }
      , c = () => {
        !t || t.destroyed || !t.initialized || r("orientationchange")
    }
    ;
    e("init", () => {
        if (t.params.resizeObserver && typeof n.ResizeObserver < "u") {
            a();
            return
        }
        n.addEventListener("resize", s),
        n.addEventListener("orientationchange", c)
    }
    ),
    e("destroy", () => {
        l(),
        n.removeEventListener("resize", s),
        n.removeEventListener("orientationchange", c)
    }
    )
}
function n_e({swiper: t, extendParams: e, on: r, emit: n}) {
    const i = []
      , o = Nr()
      , s = (c, u={}) => {
        const f = o.MutationObserver || o.WebkitMutationObserver
          , d = new f(h => {
            if (h.length === 1) {
                n("observerUpdate", h[0]);
                return
            }
            const x = function() {
                n("observerUpdate", h[0])
            };
            o.requestAnimationFrame ? o.requestAnimationFrame(x) : o.setTimeout(x, 0)
        }
        );
        d.observe(c, {
            attributes: typeof u.attributes > "u" ? !0 : u.attributes,
            childList: typeof u.childList > "u" ? !0 : u.childList,
            characterData: typeof u.characterData > "u" ? !0 : u.characterData
        }),
        i.push(d)
    }
      , a = () => {
        if (t.params.observer) {
            if (t.params.observeParents) {
                const c = t.$el.parents();
                for (let u = 0; u < c.length; u += 1)
                    s(c[u])
            }
            s(t.$el[0], {
                childList: t.params.observeSlideChildren
            }),
            s(t.$wrapperEl[0], {
                attributes: !1
            })
        }
    }
      , l = () => {
        i.forEach(c => {
            c.disconnect()
        }
        ),
        i.splice(0, i.length)
    }
    ;
    e({
        observer: !1,
        observeParents: !1,
        observeSlideChildren: !1
    }),
    r("init", a),
    r("destroy", l)
}
const i_e = {
    on(t, e, r) {
        const n = this;
        if (!n.eventsListeners || n.destroyed || typeof e != "function")
            return n;
        const i = r ? "unshift" : "push";
        return t.split(" ").forEach(o => {
            n.eventsListeners[o] || (n.eventsListeners[o] = []),
            n.eventsListeners[o][i](e)
        }
        ),
        n
    },
    once(t, e, r) {
        const n = this;
        if (!n.eventsListeners || n.destroyed || typeof e != "function")
            return n;
        function i(...o) {
            n.off(t, i),
            i.__emitterProxy && delete i.__emitterProxy,
            e.apply(n, o)
        }
        return i.__emitterProxy = e,
        n.on(t, i, r)
    },
    onAny(t, e) {
        const r = this;
        if (!r.eventsListeners || r.destroyed || typeof t != "function")
            return r;
        const n = e ? "unshift" : "push";
        return r.eventsAnyListeners.indexOf(t) < 0 && r.eventsAnyListeners[n](t),
        r
    },
    offAny(t) {
        const e = this;
        if (!e.eventsListeners || e.destroyed || !e.eventsAnyListeners)
            return e;
        const r = e.eventsAnyListeners.indexOf(t);
        return r >= 0 && e.eventsAnyListeners.splice(r, 1),
        e
    },
    off(t, e) {
        const r = this;
        return !r.eventsListeners || r.destroyed || !r.eventsListeners || t.split(" ").forEach(n => {
            typeof e > "u" ? r.eventsListeners[n] = [] : r.eventsListeners[n] && r.eventsListeners[n].forEach( (i, o) => {
                (i === e || i.__emitterProxy && i.__emitterProxy === e) && r.eventsListeners[n].splice(o, 1)
            }
            )
        }
        ),
        r
    },
    emit(...t) {
        const e = this;
        if (!e.eventsListeners || e.destroyed || !e.eventsListeners)
            return e;
        let r, n, i;
        return typeof t[0] == "string" || Array.isArray(t[0]) ? (r = t[0],
        n = t.slice(1, t.length),
        i = e) : (r = t[0].events,
        n = t[0].data,
        i = t[0].context || e),
        n.unshift(i),
        (Array.isArray(r) ? r : r.split(" ")).forEach(s => {
            e.eventsAnyListeners && e.eventsAnyListeners.length && e.eventsAnyListeners.forEach(a => {
                a.apply(i, [s, ...n])
            }
            ),
            e.eventsListeners && e.eventsListeners[s] && e.eventsListeners[s].forEach(a => {
                a.apply(i, n)
            }
            )
        }
        ),
        e
    }
};
function o_e() {
    const t = this;
    let e, r;
    const n = t.$el;
    typeof t.params.width < "u" && t.params.width !== null ? e = t.params.width : e = n[0].clientWidth,
    typeof t.params.height < "u" && t.params.height !== null ? r = t.params.height : r = n[0].clientHeight,
    !(e === 0 && t.isHorizontal() || r === 0 && t.isVertical()) && (e = e - parseInt(n.css("padding-left") || 0, 10) - parseInt(n.css("padding-right") || 0, 10),
    r = r - parseInt(n.css("padding-top") || 0, 10) - parseInt(n.css("padding-bottom") || 0, 10),
    Number.isNaN(e) && (e = 0),
    Number.isNaN(r) && (r = 0),
    Object.assign(t, {
        width: e,
        height: r,
        size: t.isHorizontal() ? e : r
    }))
}
function s_e() {
    const t = this;
    function e(A) {
        return t.isHorizontal() ? A : {
            width: "height",
            "margin-top": "margin-left",
            "margin-bottom ": "margin-right",
            "margin-left": "margin-top",
            "margin-right": "margin-bottom",
            "padding-left": "padding-top",
            "padding-right": "padding-bottom",
            marginRight: "marginBottom"
        }[A]
    }
    function r(A, B) {
        return parseFloat(A.getPropertyValue(e(B)) || 0)
    }
    const n = t.params
      , {$wrapperEl: i, size: o, rtlTranslate: s, wrongRTL: a} = t
      , l = t.virtual && n.virtual.enabled
      , c = l ? t.virtual.slides.length : t.slides.length
      , u = i.children(`.${t.params.slideClass}`)
      , f = l ? t.virtual.slides.length : u.length;
    let d = [];
    const h = []
      , x = [];
    let y = n.slidesOffsetBefore;
    typeof y == "function" && (y = n.slidesOffsetBefore.call(t));
    let m = n.slidesOffsetAfter;
    typeof m == "function" && (m = n.slidesOffsetAfter.call(t));
    const E = t.snapGrid.length
      , g = t.slidesGrid.length;
    let p = n.spaceBetween
      , v = -y
      , _ = 0
      , b = 0;
    if (typeof o > "u")
        return;
    typeof p == "string" && p.indexOf("%") >= 0 && (p = parseFloat(p.replace("%", "")) / 100 * o),
    t.virtualSize = -p,
    s ? u.css({
        marginLeft: "",
        marginBottom: "",
        marginTop: ""
    }) : u.css({
        marginRight: "",
        marginBottom: "",
        marginTop: ""
    }),
    n.centeredSlides && n.cssMode && (Fh(t.wrapperEl, "--swiper-centered-offset-before", ""),
    Fh(t.wrapperEl, "--swiper-centered-offset-after", ""));
    const C = n.grid && n.grid.rows > 1 && t.grid;
    C && t.grid.initSlides(f);
    let w;
    const T = n.slidesPerView === "auto" && n.breakpoints && Object.keys(n.breakpoints).filter(A => typeof n.breakpoints[A].slidesPerView < "u").length > 0;
    for (let A = 0; A < f; A += 1) {
        w = 0;
        const B = u.eq(A);
        if (C && t.grid.updateSlide(A, B, f, e),
        B.css("display") !== "none") {
            if (n.slidesPerView === "auto") {
                T && (u[A].style[e("width")] = "");
                const S = getComputedStyle(B[0])
                  , D = B[0].style.transform
                  , F = B[0].style.webkitTransform;
                if (D && (B[0].style.transform = "none"),
                F && (B[0].style.webkitTransform = "none"),
                n.roundLengths)
                    w = t.isHorizontal() ? B.outerWidth(!0) : B.outerHeight(!0);
                else {
                    const R = r(S, "width")
                      , P = r(S, "padding-left")
                      , N = r(S, "padding-right")
                      , j = r(S, "margin-left")
                      , K = r(S, "margin-right")
                      , oe = S.getPropertyValue("box-sizing");
                    if (oe && oe === "border-box")
                        w = R + j + K;
                    else {
                        const {clientWidth: U, offsetWidth: $} = B[0];
                        w = R + P + N + j + K + ($ - U)
                    }
                }
                D && (B[0].style.transform = D),
                F && (B[0].style.webkitTransform = F),
                n.roundLengths && (w = Math.floor(w))
            } else
                w = (o - (n.slidesPerView - 1) * p) / n.slidesPerView,
                n.roundLengths && (w = Math.floor(w)),
                u[A] && (u[A].style[e("width")] = `${w}px`);
            u[A] && (u[A].swiperSlideSize = w),
            x.push(w),
            n.centeredSlides ? (v = v + w / 2 + _ / 2 + p,
            _ === 0 && A !== 0 && (v = v - o / 2 - p),
            A === 0 && (v = v - o / 2 - p),
            Math.abs(v) < 1 / 1e3 && (v = 0),
            n.roundLengths && (v = Math.floor(v)),
            b % n.slidesPerGroup === 0 && d.push(v),
            h.push(v)) : (n.roundLengths && (v = Math.floor(v)),
            (b - Math.min(t.params.slidesPerGroupSkip, b)) % t.params.slidesPerGroup === 0 && d.push(v),
            h.push(v),
            v = v + w + p),
            t.virtualSize += w + p,
            _ = w,
            b += 1
        }
    }
    if (t.virtualSize = Math.max(t.virtualSize, o) + m,
    s && a && (n.effect === "slide" || n.effect === "coverflow") && i.css({
        width: `${t.virtualSize + n.spaceBetween}px`
    }),
    n.setWrapperSize && i.css({
        [e("width")]: `${t.virtualSize + n.spaceBetween}px`
    }),
    C && t.grid.updateWrapperSize(w, d, e),
    !n.centeredSlides) {
        const A = [];
        for (let B = 0; B < d.length; B += 1) {
            let S = d[B];
            n.roundLengths && (S = Math.floor(S)),
            d[B] <= t.virtualSize - o && A.push(S)
        }
        d = A,
        Math.floor(t.virtualSize - o) - Math.floor(d[d.length - 1]) > 1 && d.push(t.virtualSize - o)
    }
    if (d.length === 0 && (d = [0]),
    n.spaceBetween !== 0) {
        const A = t.isHorizontal() && s ? "marginLeft" : e("marginRight");
        u.filter( (B, S) => n.cssMode ? S !== u.length - 1 : !0).css({
            [A]: `${p}px`
        })
    }
    if (n.centeredSlides && n.centeredSlidesBounds) {
        let A = 0;
        x.forEach(S => {
            A += S + (n.spaceBetween ? n.spaceBetween : 0)
        }
        ),
        A -= n.spaceBetween;
        const B = A - o;
        d = d.map(S => S < 0 ? -y : S > B ? B + m : S)
    }
    if (n.centerInsufficientSlides) {
        let A = 0;
        if (x.forEach(B => {
            A += B + (n.spaceBetween ? n.spaceBetween : 0)
        }
        ),
        A -= n.spaceBetween,
        A < o) {
            const B = (o - A) / 2;
            d.forEach( (S, D) => {
                d[D] = S - B
            }
            ),
            h.forEach( (S, D) => {
                h[D] = S + B
            }
            )
        }
    }
    if (Object.assign(t, {
        slides: u,
        snapGrid: d,
        slidesGrid: h,
        slidesSizesGrid: x
    }),
    n.centeredSlides && n.cssMode && !n.centeredSlidesBounds) {
        Fh(t.wrapperEl, "--swiper-centered-offset-before", `${-d[0]}px`),
        Fh(t.wrapperEl, "--swiper-centered-offset-after", `${t.size / 2 - x[x.length - 1] / 2}px`);
        const A = -t.snapGrid[0]
          , B = -t.slidesGrid[0];
        t.snapGrid = t.snapGrid.map(S => S + A),
        t.slidesGrid = t.slidesGrid.map(S => S + B)
    }
    if (f !== c && t.emit("slidesLengthChange"),
    d.length !== E && (t.params.watchOverflow && t.checkOverflow(),
    t.emit("snapGridLengthChange")),
    h.length !== g && t.emit("slidesGridLengthChange"),
    n.watchSlidesProgress && t.updateSlidesOffset(),
    !l && !n.cssMode && (n.effect === "slide" || n.effect === "fade")) {
        const A = `${n.containerModifierClass}backface-hidden`
          , B = t.$el.hasClass(A);
        f <= n.maxBackfaceHiddenSlides ? B || t.$el.addClass(A) : B && t.$el.removeClass(A)
    }
}
function a_e(t) {
    const e = this
      , r = []
      , n = e.virtual && e.params.virtual.enabled;
    let i = 0, o;
    typeof t == "number" ? e.setTransition(t) : t === !0 && e.setTransition(e.params.speed);
    const s = a => n ? e.slides.filter(l => parseInt(l.getAttribute("data-swiper-slide-index"), 10) === a)[0] : e.slides.eq(a)[0];
    if (e.params.slidesPerView !== "auto" && e.params.slidesPerView > 1)
        if (e.params.centeredSlides)
            (e.visibleSlides || De([])).each(a => {
                r.push(a)
            }
            );
        else
            for (o = 0; o < Math.ceil(e.params.slidesPerView); o += 1) {
                const a = e.activeIndex + o;
                if (a > e.slides.length && !n)
                    break;
                r.push(s(a))
            }
    else
        r.push(s(e.activeIndex));
    for (o = 0; o < r.length; o += 1)
        if (typeof r[o] < "u") {
            const a = r[o].offsetHeight;
            i = a > i ? a : i
        }
    (i || i === 0) && e.$wrapperEl.css("height", `${i}px`)
}
function l_e() {
    const t = this
      , e = t.slides;
    for (let r = 0; r < e.length; r += 1)
        e[r].swiperSlideOffset = t.isHorizontal() ? e[r].offsetLeft : e[r].offsetTop
}
function c_e(t=this && this.translate || 0) {
    const e = this
      , r = e.params
      , {slides: n, rtlTranslate: i, snapGrid: o} = e;
    if (n.length === 0)
        return;
    typeof n[0].swiperSlideOffset > "u" && e.updateSlidesOffset();
    let s = -t;
    i && (s = t),
    n.removeClass(r.slideVisibleClass),
    e.visibleSlidesIndexes = [],
    e.visibleSlides = [];
    for (let a = 0; a < n.length; a += 1) {
        const l = n[a];
        let c = l.swiperSlideOffset;
        r.cssMode && r.centeredSlides && (c -= n[0].swiperSlideOffset);
        const u = (s + (r.centeredSlides ? e.minTranslate() : 0) - c) / (l.swiperSlideSize + r.spaceBetween)
          , f = (s - o[0] + (r.centeredSlides ? e.minTranslate() : 0) - c) / (l.swiperSlideSize + r.spaceBetween)
          , d = -(s - c)
          , h = d + e.slidesSizesGrid[a];
        (d >= 0 && d < e.size - 1 || h > 1 && h <= e.size || d <= 0 && h >= e.size) && (e.visibleSlides.push(l),
        e.visibleSlidesIndexes.push(a),
        n.eq(a).addClass(r.slideVisibleClass)),
        l.progress = i ? -u : u,
        l.originalProgress = i ? -f : f
    }
    e.visibleSlides = De(e.visibleSlides)
}
function u_e(t) {
    const e = this;
    if (typeof t > "u") {
        const c = e.rtlTranslate ? -1 : 1;
        t = e && e.translate && e.translate * c || 0
    }
    const r = e.params
      , n = e.maxTranslate() - e.minTranslate();
    let {progress: i, isBeginning: o, isEnd: s} = e;
    const a = o
      , l = s;
    n === 0 ? (i = 0,
    o = !0,
    s = !0) : (i = (t - e.minTranslate()) / n,
    o = i <= 0,
    s = i >= 1),
    Object.assign(e, {
        progress: i,
        isBeginning: o,
        isEnd: s
    }),
    (r.watchSlidesProgress || r.centeredSlides && r.autoHeight) && e.updateSlidesProgress(t),
    o && !a && e.emit("reachBeginning toEdge"),
    s && !l && e.emit("reachEnd toEdge"),
    (a && !o || l && !s) && e.emit("fromEdge"),
    e.emit("progress", i)
}
function f_e() {
    const t = this
      , {slides: e, params: r, $wrapperEl: n, activeIndex: i, realIndex: o} = t
      , s = t.virtual && r.virtual.enabled;
    e.removeClass(`${r.slideActiveClass} ${r.slideNextClass} ${r.slidePrevClass} ${r.slideDuplicateActiveClass} ${r.slideDuplicateNextClass} ${r.slideDuplicatePrevClass}`);
    let a;
    s ? a = t.$wrapperEl.find(`.${r.slideClass}[data-swiper-slide-index="${i}"]`) : a = e.eq(i),
    a.addClass(r.slideActiveClass),
    r.loop && (a.hasClass(r.slideDuplicateClass) ? n.children(`.${r.slideClass}:not(.${r.slideDuplicateClass})[data-swiper-slide-index="${o}"]`).addClass(r.slideDuplicateActiveClass) : n.children(`.${r.slideClass}.${r.slideDuplicateClass}[data-swiper-slide-index="${o}"]`).addClass(r.slideDuplicateActiveClass));
    let l = a.nextAll(`.${r.slideClass}`).eq(0).addClass(r.slideNextClass);
    r.loop && l.length === 0 && (l = e.eq(0),
    l.addClass(r.slideNextClass));
    let c = a.prevAll(`.${r.slideClass}`).eq(0).addClass(r.slidePrevClass);
    r.loop && c.length === 0 && (c = e.eq(-1),
    c.addClass(r.slidePrevClass)),
    r.loop && (l.hasClass(r.slideDuplicateClass) ? n.children(`.${r.slideClass}:not(.${r.slideDuplicateClass})[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(r.slideDuplicateNextClass) : n.children(`.${r.slideClass}.${r.slideDuplicateClass}[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(r.slideDuplicateNextClass),
    c.hasClass(r.slideDuplicateClass) ? n.children(`.${r.slideClass}:not(.${r.slideDuplicateClass})[data-swiper-slide-index="${c.attr("data-swiper-slide-index")}"]`).addClass(r.slideDuplicatePrevClass) : n.children(`.${r.slideClass}.${r.slideDuplicateClass}[data-swiper-slide-index="${c.attr("data-swiper-slide-index")}"]`).addClass(r.slideDuplicatePrevClass)),
    t.emitSlidesClasses()
}
function d_e(t) {
    const e = this
      , r = e.rtlTranslate ? e.translate : -e.translate
      , {slidesGrid: n, snapGrid: i, params: o, activeIndex: s, realIndex: a, snapIndex: l} = e;
    let c = t, u;
    if (typeof c > "u") {
        for (let d = 0; d < n.length; d += 1)
            typeof n[d + 1] < "u" ? r >= n[d] && r < n[d + 1] - (n[d + 1] - n[d]) / 2 ? c = d : r >= n[d] && r < n[d + 1] && (c = d + 1) : r >= n[d] && (c = d);
        o.normalizeSlideIndex && (c < 0 || typeof c > "u") && (c = 0)
    }
    if (i.indexOf(r) >= 0)
        u = i.indexOf(r);
    else {
        const d = Math.min(o.slidesPerGroupSkip, c);
        u = d + Math.floor((c - d) / o.slidesPerGroup)
    }
    if (u >= i.length && (u = i.length - 1),
    c === s) {
        u !== l && (e.snapIndex = u,
        e.emit("snapIndexChange"));
        return
    }
    const f = parseInt(e.slides.eq(c).attr("data-swiper-slide-index") || c, 10);
    Object.assign(e, {
        snapIndex: u,
        realIndex: f,
        previousIndex: s,
        activeIndex: c
    }),
    e.emit("activeIndexChange"),
    e.emit("snapIndexChange"),
    a !== f && e.emit("realIndexChange"),
    (e.initialized || e.params.runCallbacksOnInit) && e.emit("slideChange")
}
function h_e(t) {
    const e = this
      , r = e.params
      , n = De(t).closest(`.${r.slideClass}`)[0];
    let i = !1, o;
    if (n) {
        for (let s = 0; s < e.slides.length; s += 1)
            if (e.slides[s] === n) {
                i = !0,
                o = s;
                break
            }
    }
    if (n && i)
        e.clickedSlide = n,
        e.virtual && e.params.virtual.enabled ? e.clickedIndex = parseInt(De(n).attr("data-swiper-slide-index"), 10) : e.clickedIndex = o;
    else {
        e.clickedSlide = void 0,
        e.clickedIndex = void 0;
        return
    }
    r.slideToClickedSlide && e.clickedIndex !== void 0 && e.clickedIndex !== e.activeIndex && e.slideToClickedSlide()
}
const x_e = {
    updateSize: o_e,
    updateSlides: s_e,
    updateAutoHeight: a_e,
    updateSlidesOffset: l_e,
    updateSlidesProgress: c_e,
    updateProgress: u_e,
    updateSlidesClasses: f_e,
    updateActiveIndex: d_e,
    updateClickedSlide: h_e
};
function p_e(t=this.isHorizontal() ? "x" : "y") {
    const e = this
      , {params: r, rtlTranslate: n, translate: i, $wrapperEl: o} = e;
    if (r.virtualTranslate)
        return n ? -i : i;
    if (r.cssMode)
        return i;
    let s = KEe(o[0], t);
    return n && (s = -s),
    s || 0
}
function g_e(t, e) {
    const r = this
      , {rtlTranslate: n, params: i, $wrapperEl: o, wrapperEl: s, progress: a} = r;
    let l = 0
      , c = 0;
    const u = 0;
    r.isHorizontal() ? l = n ? -t : t : c = t,
    i.roundLengths && (l = Math.floor(l),
    c = Math.floor(c)),
    i.cssMode ? s[r.isHorizontal() ? "scrollLeft" : "scrollTop"] = r.isHorizontal() ? -l : -c : i.virtualTranslate || o.transform(`translate3d(${l}px, ${c}px, ${u}px)`),
    r.previousTranslate = r.translate,
    r.translate = r.isHorizontal() ? l : c;
    let f;
    const d = r.maxTranslate() - r.minTranslate();
    d === 0 ? f = 0 : f = (t - r.minTranslate()) / d,
    f !== a && r.updateProgress(t),
    r.emit("setTranslate", r.translate, e)
}
function m_e() {
    return -this.snapGrid[0]
}
function v_e() {
    return -this.snapGrid[this.snapGrid.length - 1]
}
function y_e(t=0, e=this.params.speed, r=!0, n=!0, i) {
    const o = this
      , {params: s, wrapperEl: a} = o;
    if (o.animating && s.preventInteractionOnTransition)
        return !1;
    const l = o.minTranslate()
      , c = o.maxTranslate();
    let u;
    if (n && t > l ? u = l : n && t < c ? u = c : u = t,
    o.updateProgress(u),
    s.cssMode) {
        const f = o.isHorizontal();
        if (e === 0)
            a[f ? "scrollLeft" : "scrollTop"] = -u;
        else {
            if (!o.support.smoothScroll)
                return hM({
                    swiper: o,
                    targetPosition: -u,
                    side: f ? "left" : "top"
                }),
                !0;
            a.scrollTo({
                [f ? "left" : "top"]: -u,
                behavior: "smooth"
            })
        }
        return !0
    }
    return e === 0 ? (o.setTransition(0),
    o.setTranslate(u),
    r && (o.emit("beforeTransitionStart", e, i),
    o.emit("transitionEnd"))) : (o.setTransition(e),
    o.setTranslate(u),
    r && (o.emit("beforeTransitionStart", e, i),
    o.emit("transitionStart")),
    o.animating || (o.animating = !0,
    o.onTranslateToWrapperTransitionEnd || (o.onTranslateToWrapperTransitionEnd = function(d) {
        !o || o.destroyed || d.target === this && (o.$wrapperEl[0].removeEventListener("transitionend", o.onTranslateToWrapperTransitionEnd),
        o.$wrapperEl[0].removeEventListener("webkitTransitionEnd", o.onTranslateToWrapperTransitionEnd),
        o.onTranslateToWrapperTransitionEnd = null,
        delete o.onTranslateToWrapperTransitionEnd,
        r && o.emit("transitionEnd"))
    }
    ),
    o.$wrapperEl[0].addEventListener("transitionend", o.onTranslateToWrapperTransitionEnd),
    o.$wrapperEl[0].addEventListener("webkitTransitionEnd", o.onTranslateToWrapperTransitionEnd))),
    !0
}
const E_e = {
    getTranslate: p_e,
    setTranslate: g_e,
    minTranslate: m_e,
    maxTranslate: v_e,
    translateTo: y_e
};
function __e(t, e) {
    const r = this;
    r.params.cssMode || r.$wrapperEl.transition(t),
    r.emit("setTransition", t, e)
}
function pM({swiper: t, runCallbacks: e, direction: r, step: n}) {
    const {activeIndex: i, previousIndex: o} = t;
    let s = r;
    if (s || (i > o ? s = "next" : i < o ? s = "prev" : s = "reset"),
    t.emit(`transition${n}`),
    e && i !== o) {
        if (s === "reset") {
            t.emit(`slideResetTransition${n}`);
            return
        }
        t.emit(`slideChangeTransition${n}`),
        s === "next" ? t.emit(`slideNextTransition${n}`) : t.emit(`slidePrevTransition${n}`)
    }
}
function b_e(t=!0, e) {
    const r = this
      , {params: n} = r;
    n.cssMode || (n.autoHeight && r.updateAutoHeight(),
    pM({
        swiper: r,
        runCallbacks: t,
        direction: e,
        step: "Start"
    }))
}
function C_e(t=!0, e) {
    const r = this
      , {params: n} = r;
    r.animating = !1,
    !n.cssMode && (r.setTransition(0),
    pM({
        swiper: r,
        runCallbacks: t,
        direction: e,
        step: "End"
    }))
}
const A_e = {
    setTransition: __e,
    transitionStart: b_e,
    transitionEnd: C_e
};
function w_e(t=0, e=this.params.speed, r=!0, n, i) {
    if (typeof t != "number" && typeof t != "string")
        throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof t}] given.`);
    if (typeof t == "string") {
        const p = parseInt(t, 10);
        if (!isFinite(p))
            throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${t}] given.`);
        t = p
    }
    const o = this;
    let s = t;
    s < 0 && (s = 0);
    const {params: a, snapGrid: l, slidesGrid: c, previousIndex: u, activeIndex: f, rtlTranslate: d, wrapperEl: h, enabled: x} = o;
    if (o.animating && a.preventInteractionOnTransition || !x && !n && !i)
        return !1;
    const y = Math.min(o.params.slidesPerGroupSkip, s);
    let m = y + Math.floor((s - y) / o.params.slidesPerGroup);
    m >= l.length && (m = l.length - 1);
    const E = -l[m];
    if (a.normalizeSlideIndex)
        for (let p = 0; p < c.length; p += 1) {
            const v = -Math.floor(E * 100)
              , _ = Math.floor(c[p] * 100)
              , b = Math.floor(c[p + 1] * 100);
            typeof c[p + 1] < "u" ? v >= _ && v < b - (b - _) / 2 ? s = p : v >= _ && v < b && (s = p + 1) : v >= _ && (s = p)
        }
    if (o.initialized && s !== f && (!o.allowSlideNext && E < o.translate && E < o.minTranslate() || !o.allowSlidePrev && E > o.translate && E > o.maxTranslate() && (f || 0) !== s))
        return !1;
    s !== (u || 0) && r && o.emit("beforeSlideChangeStart"),
    o.updateProgress(E);
    let g;
    if (s > f ? g = "next" : s < f ? g = "prev" : g = "reset",
    d && -E === o.translate || !d && E === o.translate)
        return o.updateActiveIndex(s),
        a.autoHeight && o.updateAutoHeight(),
        o.updateSlidesClasses(),
        a.effect !== "slide" && o.setTranslate(E),
        g !== "reset" && (o.transitionStart(r, g),
        o.transitionEnd(r, g)),
        !1;
    if (a.cssMode) {
        const p = o.isHorizontal()
          , v = d ? E : -E;
        if (e === 0) {
            const _ = o.virtual && o.params.virtual.enabled;
            _ && (o.wrapperEl.style.scrollSnapType = "none",
            o._immediateVirtual = !0),
            h[p ? "scrollLeft" : "scrollTop"] = v,
            _ && requestAnimationFrame( () => {
                o.wrapperEl.style.scrollSnapType = "",
                o._swiperImmediateVirtual = !1
            }
            )
        } else {
            if (!o.support.smoothScroll)
                return hM({
                    swiper: o,
                    targetPosition: v,
                    side: p ? "left" : "top"
                }),
                !0;
            h.scrollTo({
                [p ? "left" : "top"]: v,
                behavior: "smooth"
            })
        }
        return !0
    }
    return o.setTransition(e),
    o.setTranslate(E),
    o.updateActiveIndex(s),
    o.updateSlidesClasses(),
    o.emit("beforeTransitionStart", e, n),
    o.transitionStart(r, g),
    e === 0 ? o.transitionEnd(r, g) : o.animating || (o.animating = !0,
    o.onSlideToWrapperTransitionEnd || (o.onSlideToWrapperTransitionEnd = function(v) {
        !o || o.destroyed || v.target === this && (o.$wrapperEl[0].removeEventListener("transitionend", o.onSlideToWrapperTransitionEnd),
        o.$wrapperEl[0].removeEventListener("webkitTransitionEnd", o.onSlideToWrapperTransitionEnd),
        o.onSlideToWrapperTransitionEnd = null,
        delete o.onSlideToWrapperTransitionEnd,
        o.transitionEnd(r, g))
    }
    ),
    o.$wrapperEl[0].addEventListener("transitionend", o.onSlideToWrapperTransitionEnd),
    o.$wrapperEl[0].addEventListener("webkitTransitionEnd", o.onSlideToWrapperTransitionEnd)),
    !0
}
function B_e(t=0, e=this.params.speed, r=!0, n) {
    if (typeof t == "string") {
        const s = parseInt(t, 10);
        if (!isFinite(s))
            throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${t}] given.`);
        t = s
    }
    const i = this;
    let o = t;
    return i.params.loop && (o += i.loopedSlides),
    i.slideTo(o, e, r, n)
}
function S_e(t=this.params.speed, e=!0, r) {
    const n = this
      , {animating: i, enabled: o, params: s} = n;
    if (!o)
        return n;
    let a = s.slidesPerGroup;
    s.slidesPerView === "auto" && s.slidesPerGroup === 1 && s.slidesPerGroupAuto && (a = Math.max(n.slidesPerViewDynamic("current", !0), 1));
    const l = n.activeIndex < s.slidesPerGroupSkip ? 1 : a;
    if (s.loop) {
        if (i && s.loopPreventsSlide)
            return !1;
        n.loopFix(),
        n._clientLeft = n.$wrapperEl[0].clientLeft
    }
    return s.rewind && n.isEnd ? n.slideTo(0, t, e, r) : n.slideTo(n.activeIndex + l, t, e, r)
}
function T_e(t=this.params.speed, e=!0, r) {
    const n = this
      , {params: i, animating: o, snapGrid: s, slidesGrid: a, rtlTranslate: l, enabled: c} = n;
    if (!c)
        return n;
    if (i.loop) {
        if (o && i.loopPreventsSlide)
            return !1;
        n.loopFix(),
        n._clientLeft = n.$wrapperEl[0].clientLeft
    }
    const u = l ? n.translate : -n.translate;
    function f(m) {
        return m < 0 ? -Math.floor(Math.abs(m)) : Math.floor(m)
    }
    const d = f(u)
      , h = s.map(m => f(m));
    let x = s[h.indexOf(d) - 1];
    if (typeof x > "u" && i.cssMode) {
        let m;
        s.forEach( (E, g) => {
            d >= E && (m = g)
        }
        ),
        typeof m < "u" && (x = s[m > 0 ? m - 1 : m])
    }
    let y = 0;
    if (typeof x < "u" && (y = a.indexOf(x),
    y < 0 && (y = n.activeIndex - 1),
    i.slidesPerView === "auto" && i.slidesPerGroup === 1 && i.slidesPerGroupAuto && (y = y - n.slidesPerViewDynamic("previous", !0) + 1,
    y = Math.max(y, 0))),
    i.rewind && n.isBeginning) {
        const m = n.params.virtual && n.params.virtual.enabled && n.virtual ? n.virtual.slides.length - 1 : n.slides.length - 1;
        return n.slideTo(m, t, e, r)
    }
    return n.slideTo(y, t, e, r)
}
function D_e(t=this.params.speed, e=!0, r) {
    const n = this;
    return n.slideTo(n.activeIndex, t, e, r)
}
function F_e(t=this.params.speed, e=!0, r, n=.5) {
    const i = this;
    let o = i.activeIndex;
    const s = Math.min(i.params.slidesPerGroupSkip, o)
      , a = s + Math.floor((o - s) / i.params.slidesPerGroup)
      , l = i.rtlTranslate ? i.translate : -i.translate;
    if (l >= i.snapGrid[a]) {
        const c = i.snapGrid[a]
          , u = i.snapGrid[a + 1];
        l - c > (u - c) * n && (o += i.params.slidesPerGroup)
    } else {
        const c = i.snapGrid[a - 1]
          , u = i.snapGrid[a];
        l - c <= (u - c) * n && (o -= i.params.slidesPerGroup)
    }
    return o = Math.max(o, 0),
    o = Math.min(o, i.slidesGrid.length - 1),
    i.slideTo(o, t, e, r)
}
function P_e() {
    const t = this
      , {params: e, $wrapperEl: r} = t
      , n = e.slidesPerView === "auto" ? t.slidesPerViewDynamic() : e.slidesPerView;
    let i = t.clickedIndex, o;
    if (e.loop) {
        if (t.animating)
            return;
        o = parseInt(De(t.clickedSlide).attr("data-swiper-slide-index"), 10),
        e.centeredSlides ? i < t.loopedSlides - n / 2 || i > t.slides.length - t.loopedSlides + n / 2 ? (t.loopFix(),
        i = r.children(`.${e.slideClass}[data-swiper-slide-index="${o}"]:not(.${e.slideDuplicateClass})`).eq(0).index(),
        rp( () => {
            t.slideTo(i)
        }
        )) : t.slideTo(i) : i > t.slides.length - n ? (t.loopFix(),
        i = r.children(`.${e.slideClass}[data-swiper-slide-index="${o}"]:not(.${e.slideDuplicateClass})`).eq(0).index(),
        rp( () => {
            t.slideTo(i)
        }
        )) : t.slideTo(i)
    } else
        t.slideTo(i)
}
const I_e = {
    slideTo: w_e,
    slideToLoop: B_e,
    slideNext: S_e,
    slidePrev: T_e,
    slideReset: D_e,
    slideToClosest: F_e,
    slideToClickedSlide: P_e
};
function O_e() {
    const t = this
      , e = tn()
      , {params: r, $wrapperEl: n} = t
      , i = n.children().length > 0 ? De(n.children()[0].parentNode) : n;
    i.children(`.${r.slideClass}.${r.slideDuplicateClass}`).remove();
    let o = i.children(`.${r.slideClass}`);
    if (r.loopFillGroupWithBlank) {
        const l = r.slidesPerGroup - o.length % r.slidesPerGroup;
        if (l !== r.slidesPerGroup) {
            for (let c = 0; c < l; c += 1) {
                const u = De(e.createElement("div")).addClass(`${r.slideClass} ${r.slideBlankClass}`);
                i.append(u)
            }
            o = i.children(`.${r.slideClass}`)
        }
    }
    r.slidesPerView === "auto" && !r.loopedSlides && (r.loopedSlides = o.length),
    t.loopedSlides = Math.ceil(parseFloat(r.loopedSlides || r.slidesPerView, 10)),
    t.loopedSlides += r.loopAdditionalSlides,
    t.loopedSlides > o.length && t.params.loopedSlidesLimit && (t.loopedSlides = o.length);
    const s = []
      , a = [];
    o.each( (l, c) => {
        De(l).attr("data-swiper-slide-index", c)
    }
    );
    for (let l = 0; l < t.loopedSlides; l += 1) {
        const c = l - Math.floor(l / o.length) * o.length;
        a.push(o.eq(c)[0]),
        s.unshift(o.eq(o.length - c - 1)[0])
    }
    for (let l = 0; l < a.length; l += 1)
        i.append(De(a[l].cloneNode(!0)).addClass(r.slideDuplicateClass));
    for (let l = s.length - 1; l >= 0; l -= 1)
        i.prepend(De(s[l].cloneNode(!0)).addClass(r.slideDuplicateClass))
}
function k_e() {
    const t = this;
    t.emit("beforeLoopFix");
    const {activeIndex: e, slides: r, loopedSlides: n, allowSlidePrev: i, allowSlideNext: o, snapGrid: s, rtlTranslate: a} = t;
    let l;
    t.allowSlidePrev = !0,
    t.allowSlideNext = !0;
    const u = -s[e] - t.getTranslate();
    e < n ? (l = r.length - n * 3 + e,
    l += n,
    t.slideTo(l, 0, !1, !0) && u !== 0 && t.setTranslate((a ? -t.translate : t.translate) - u)) : e >= r.length - n && (l = -r.length + e + n,
    l += n,
    t.slideTo(l, 0, !1, !0) && u !== 0 && t.setTranslate((a ? -t.translate : t.translate) - u)),
    t.allowSlidePrev = i,
    t.allowSlideNext = o,
    t.emit("loopFix")
}
function R_e() {
    const t = this
      , {$wrapperEl: e, params: r, slides: n} = t;
    e.children(`.${r.slideClass}.${r.slideDuplicateClass},.${r.slideClass}.${r.slideBlankClass}`).remove(),
    n.removeAttr("data-swiper-slide-index")
}
const M_e = {
    loopCreate: O_e,
    loopFix: k_e,
    loopDestroy: R_e
};
function N_e(t) {
    const e = this;
    if (e.support.touch || !e.params.simulateTouch || e.params.watchOverflow && e.isLocked || e.params.cssMode)
        return;
    const r = e.params.touchEventsTarget === "container" ? e.el : e.wrapperEl;
    r.style.cursor = "move",
    r.style.cursor = t ? "grabbing" : "grab"
}
function L_e() {
    const t = this;
    t.support.touch || t.params.watchOverflow && t.isLocked || t.params.cssMode || (t[t.params.touchEventsTarget === "container" ? "el" : "wrapperEl"].style.cursor = "")
}
const $_e = {
    setGrabCursor: N_e,
    unsetGrabCursor: L_e
};
function U_e(t, e=this) {
    function r(n) {
        if (!n || n === tn() || n === Nr())
            return null;
        n.assignedSlot && (n = n.assignedSlot);
        const i = n.closest(t);
        return !i && !n.getRootNode ? null : i || r(n.getRootNode().host)
    }
    return r(e)
}
function G_e(t) {
    const e = this
      , r = tn()
      , n = Nr()
      , i = e.touchEventsData
      , {params: o, touches: s, enabled: a} = e;
    if (!a || e.animating && o.preventInteractionOnTransition)
        return;
    !e.animating && o.cssMode && o.loop && e.loopFix();
    let l = t;
    l.originalEvent && (l = l.originalEvent);
    let c = De(l.target);
    if (o.touchEventsTarget === "wrapper" && !c.closest(e.wrapperEl).length || (i.isTouchEvent = l.type === "touchstart",
    !i.isTouchEvent && "which"in l && l.which === 3) || !i.isTouchEvent && "button"in l && l.button > 0 || i.isTouched && i.isMoved)
        return;
    const u = !!o.noSwipingClass && o.noSwipingClass !== ""
      , f = t.composedPath ? t.composedPath() : t.path;
    u && l.target && l.target.shadowRoot && f && (c = De(f[0]));
    const d = o.noSwipingSelector ? o.noSwipingSelector : `.${o.noSwipingClass}`
      , h = !!(l.target && l.target.shadowRoot);
    if (o.noSwiping && (h ? U_e(d, c[0]) : c.closest(d)[0])) {
        e.allowClick = !0;
        return
    }
    if (o.swipeHandler && !c.closest(o.swipeHandler)[0])
        return;
    s.currentX = l.type === "touchstart" ? l.targetTouches[0].pageX : l.pageX,
    s.currentY = l.type === "touchstart" ? l.targetTouches[0].pageY : l.pageY;
    const x = s.currentX
      , y = s.currentY
      , m = o.edgeSwipeDetection || o.iOSEdgeSwipeDetection
      , E = o.edgeSwipeThreshold || o.iOSEdgeSwipeThreshold;
    if (m && (x <= E || x >= n.innerWidth - E))
        if (m === "prevent")
            t.preventDefault();
        else
            return;
    if (Object.assign(i, {
        isTouched: !0,
        isMoved: !1,
        allowTouchCallbacks: !0,
        isScrolling: void 0,
        startMoving: void 0
    }),
    s.startX = x,
    s.startY = y,
    i.touchStartTime = Nf(),
    e.allowClick = !0,
    e.updateSize(),
    e.swipeDirection = void 0,
    o.threshold > 0 && (i.allowThresholdMove = !1),
    l.type !== "touchstart") {
        let g = !0;
        c.is(i.focusableElements) && (g = !1,
        c[0].nodeName === "SELECT" && (i.isTouched = !1)),
        r.activeElement && De(r.activeElement).is(i.focusableElements) && r.activeElement !== c[0] && r.activeElement.blur();
        const p = g && e.allowTouchMove && o.touchStartPreventDefault;
        (o.touchStartForcePreventDefault || p) && !c[0].isContentEditable && l.preventDefault()
    }
    e.params.freeMode && e.params.freeMode.enabled && e.freeMode && e.animating && !o.cssMode && e.freeMode.onTouchStart(),
    e.emit("touchStart", l)
}
function H_e(t) {
    const e = tn()
      , r = this
      , n = r.touchEventsData
      , {params: i, touches: o, rtlTranslate: s, enabled: a} = r;
    if (!a)
        return;
    let l = t;
    if (l.originalEvent && (l = l.originalEvent),
    !n.isTouched) {
        n.startMoving && n.isScrolling && r.emit("touchMoveOpposite", l);
        return
    }
    if (n.isTouchEvent && l.type !== "touchmove")
        return;
    const c = l.type === "touchmove" && l.targetTouches && (l.targetTouches[0] || l.changedTouches[0])
      , u = l.type === "touchmove" ? c.pageX : l.pageX
      , f = l.type === "touchmove" ? c.pageY : l.pageY;
    if (l.preventedByNestedSwiper) {
        o.startX = u,
        o.startY = f;
        return
    }
    if (!r.allowTouchMove) {
        De(l.target).is(n.focusableElements) || (r.allowClick = !1),
        n.isTouched && (Object.assign(o, {
            startX: u,
            startY: f,
            currentX: u,
            currentY: f
        }),
        n.touchStartTime = Nf());
        return
    }
    if (n.isTouchEvent && i.touchReleaseOnEdges && !i.loop) {
        if (r.isVertical()) {
            if (f < o.startY && r.translate <= r.maxTranslate() || f > o.startY && r.translate >= r.minTranslate()) {
                n.isTouched = !1,
                n.isMoved = !1;
                return
            }
        } else if (u < o.startX && r.translate <= r.maxTranslate() || u > o.startX && r.translate >= r.minTranslate())
            return
    }
    if (n.isTouchEvent && e.activeElement && l.target === e.activeElement && De(l.target).is(n.focusableElements)) {
        n.isMoved = !0,
        r.allowClick = !1;
        return
    }
    if (n.allowTouchCallbacks && r.emit("touchMove", l),
    l.targetTouches && l.targetTouches.length > 1)
        return;
    o.currentX = u,
    o.currentY = f;
    const d = o.currentX - o.startX
      , h = o.currentY - o.startY;
    if (r.params.threshold && Math.sqrt(d ** 2 + h ** 2) < r.params.threshold)
        return;
    if (typeof n.isScrolling > "u") {
        let E;
        r.isHorizontal() && o.currentY === o.startY || r.isVertical() && o.currentX === o.startX ? n.isScrolling = !1 : d * d + h * h >= 25 && (E = Math.atan2(Math.abs(h), Math.abs(d)) * 180 / Math.PI,
        n.isScrolling = r.isHorizontal() ? E > i.touchAngle : 90 - E > i.touchAngle)
    }
    if (n.isScrolling && r.emit("touchMoveOpposite", l),
    typeof n.startMoving > "u" && (o.currentX !== o.startX || o.currentY !== o.startY) && (n.startMoving = !0),
    n.isScrolling) {
        n.isTouched = !1;
        return
    }
    if (!n.startMoving)
        return;
    r.allowClick = !1,
    !i.cssMode && l.cancelable && l.preventDefault(),
    i.touchMoveStopPropagation && !i.nested && l.stopPropagation(),
    n.isMoved || (i.loop && !i.cssMode && r.loopFix(),
    n.startTranslate = r.getTranslate(),
    r.setTransition(0),
    r.animating && r.$wrapperEl.trigger("webkitTransitionEnd transitionend"),
    n.allowMomentumBounce = !1,
    i.grabCursor && (r.allowSlideNext === !0 || r.allowSlidePrev === !0) && r.setGrabCursor(!0),
    r.emit("sliderFirstMove", l)),
    r.emit("sliderMove", l),
    n.isMoved = !0;
    let x = r.isHorizontal() ? d : h;
    o.diff = x,
    x *= i.touchRatio,
    s && (x = -x),
    r.swipeDirection = x > 0 ? "prev" : "next",
    n.currentTranslate = x + n.startTranslate;
    let y = !0
      , m = i.resistanceRatio;
    if (i.touchReleaseOnEdges && (m = 0),
    x > 0 && n.currentTranslate > r.minTranslate() ? (y = !1,
    i.resistance && (n.currentTranslate = r.minTranslate() - 1 + (-r.minTranslate() + n.startTranslate + x) ** m)) : x < 0 && n.currentTranslate < r.maxTranslate() && (y = !1,
    i.resistance && (n.currentTranslate = r.maxTranslate() + 1 - (r.maxTranslate() - n.startTranslate - x) ** m)),
    y && (l.preventedByNestedSwiper = !0),
    !r.allowSlideNext && r.swipeDirection === "next" && n.currentTranslate < n.startTranslate && (n.currentTranslate = n.startTranslate),
    !r.allowSlidePrev && r.swipeDirection === "prev" && n.currentTranslate > n.startTranslate && (n.currentTranslate = n.startTranslate),
    !r.allowSlidePrev && !r.allowSlideNext && (n.currentTranslate = n.startTranslate),
    i.threshold > 0)
        if (Math.abs(x) > i.threshold || n.allowThresholdMove) {
            if (!n.allowThresholdMove) {
                n.allowThresholdMove = !0,
                o.startX = o.currentX,
                o.startY = o.currentY,
                n.currentTranslate = n.startTranslate,
                o.diff = r.isHorizontal() ? o.currentX - o.startX : o.currentY - o.startY;
                return
            }
        } else {
            n.currentTranslate = n.startTranslate;
            return
        }
    !i.followFinger || i.cssMode || ((i.freeMode && i.freeMode.enabled && r.freeMode || i.watchSlidesProgress) && (r.updateActiveIndex(),
    r.updateSlidesClasses()),
    r.params.freeMode && i.freeMode.enabled && r.freeMode && r.freeMode.onTouchMove(),
    r.updateProgress(n.currentTranslate),
    r.setTranslate(n.currentTranslate))
}
function V_e(t) {
    const e = this
      , r = e.touchEventsData
      , {params: n, touches: i, rtlTranslate: o, slidesGrid: s, enabled: a} = e;
    if (!a)
        return;
    let l = t;
    if (l.originalEvent && (l = l.originalEvent),
    r.allowTouchCallbacks && e.emit("touchEnd", l),
    r.allowTouchCallbacks = !1,
    !r.isTouched) {
        r.isMoved && n.grabCursor && e.setGrabCursor(!1),
        r.isMoved = !1,
        r.startMoving = !1;
        return
    }
    n.grabCursor && r.isMoved && r.isTouched && (e.allowSlideNext === !0 || e.allowSlidePrev === !0) && e.setGrabCursor(!1);
    const c = Nf()
      , u = c - r.touchStartTime;
    if (e.allowClick) {
        const g = l.path || l.composedPath && l.composedPath();
        e.updateClickedSlide(g && g[0] || l.target),
        e.emit("tap click", l),
        u < 300 && c - r.lastClickTime < 300 && e.emit("doubleTap doubleClick", l)
    }
    if (r.lastClickTime = Nf(),
    rp( () => {
        e.destroyed || (e.allowClick = !0)
    }
    ),
    !r.isTouched || !r.isMoved || !e.swipeDirection || i.diff === 0 || r.currentTranslate === r.startTranslate) {
        r.isTouched = !1,
        r.isMoved = !1,
        r.startMoving = !1;
        return
    }
    r.isTouched = !1,
    r.isMoved = !1,
    r.startMoving = !1;
    let f;
    if (n.followFinger ? f = o ? e.translate : -e.translate : f = -r.currentTranslate,
    n.cssMode)
        return;
    if (e.params.freeMode && n.freeMode.enabled) {
        e.freeMode.onTouchEnd({
            currentPos: f
        });
        return
    }
    let d = 0
      , h = e.slidesSizesGrid[0];
    for (let g = 0; g < s.length; g += g < n.slidesPerGroupSkip ? 1 : n.slidesPerGroup) {
        const p = g < n.slidesPerGroupSkip - 1 ? 1 : n.slidesPerGroup;
        typeof s[g + p] < "u" ? f >= s[g] && f < s[g + p] && (d = g,
        h = s[g + p] - s[g]) : f >= s[g] && (d = g,
        h = s[s.length - 1] - s[s.length - 2])
    }
    let x = null
      , y = null;
    n.rewind && (e.isBeginning ? y = e.params.virtual && e.params.virtual.enabled && e.virtual ? e.virtual.slides.length - 1 : e.slides.length - 1 : e.isEnd && (x = 0));
    const m = (f - s[d]) / h
      , E = d < n.slidesPerGroupSkip - 1 ? 1 : n.slidesPerGroup;
    if (u > n.longSwipesMs) {
        if (!n.longSwipes) {
            e.slideTo(e.activeIndex);
            return
        }
        e.swipeDirection === "next" && (m >= n.longSwipesRatio ? e.slideTo(n.rewind && e.isEnd ? x : d + E) : e.slideTo(d)),
        e.swipeDirection === "prev" && (m > 1 - n.longSwipesRatio ? e.slideTo(d + E) : y !== null && m < 0 && Math.abs(m) > n.longSwipesRatio ? e.slideTo(y) : e.slideTo(d))
    } else {
        if (!n.shortSwipes) {
            e.slideTo(e.activeIndex);
            return
        }
        e.navigation && (l.target === e.navigation.nextEl || l.target === e.navigation.prevEl) ? l.target === e.navigation.nextEl ? e.slideTo(d + E) : e.slideTo(d) : (e.swipeDirection === "next" && e.slideTo(x !== null ? x : d + E),
        e.swipeDirection === "prev" && e.slideTo(y !== null ? y : d))
    }
}
function K4() {
    const t = this
      , {params: e, el: r} = t;
    if (r && r.offsetWidth === 0)
        return;
    e.breakpoints && t.setBreakpoint();
    const {allowSlideNext: n, allowSlidePrev: i, snapGrid: o} = t;
    t.allowSlideNext = !0,
    t.allowSlidePrev = !0,
    t.updateSize(),
    t.updateSlides(),
    t.updateSlidesClasses(),
    (e.slidesPerView === "auto" || e.slidesPerView > 1) && t.isEnd && !t.isBeginning && !t.params.centeredSlides ? t.slideTo(t.slides.length - 1, 0, !1, !0) : t.slideTo(t.activeIndex, 0, !1, !0),
    t.autoplay && t.autoplay.running && t.autoplay.paused && t.autoplay.run(),
    t.allowSlidePrev = i,
    t.allowSlideNext = n,
    t.params.watchOverflow && o !== t.snapGrid && t.checkOverflow()
}
function z_e(t) {
    const e = this;
    e.enabled && (e.allowClick || (e.params.preventClicks && t.preventDefault(),
    e.params.preventClicksPropagation && e.animating && (t.stopPropagation(),
    t.stopImmediatePropagation())))
}
function j_e() {
    const t = this
      , {wrapperEl: e, rtlTranslate: r, enabled: n} = t;
    if (!n)
        return;
    t.previousTranslate = t.translate,
    t.isHorizontal() ? t.translate = -e.scrollLeft : t.translate = -e.scrollTop,
    t.translate === 0 && (t.translate = 0),
    t.updateActiveIndex(),
    t.updateSlidesClasses();
    let i;
    const o = t.maxTranslate() - t.minTranslate();
    o === 0 ? i = 0 : i = (t.translate - t.minTranslate()) / o,
    i !== t.progress && t.updateProgress(r ? -t.translate : t.translate),
    t.emit("setTranslate", t.translate, !1)
}
let q4 = !1;
function W_e() {}
const gM = (t, e) => {
    const r = tn()
      , {params: n, touchEvents: i, el: o, wrapperEl: s, device: a, support: l} = t
      , c = !!n.nested
      , u = e === "on" ? "addEventListener" : "removeEventListener"
      , f = e;
    if (!l.touch)
        o[u](i.start, t.onTouchStart, !1),
        r[u](i.move, t.onTouchMove, c),
        r[u](i.end, t.onTouchEnd, !1);
    else {
        const d = i.start === "touchstart" && l.passiveListener && n.passiveListeners ? {
            passive: !0,
            capture: !1
        } : !1;
        o[u](i.start, t.onTouchStart, d),
        o[u](i.move, t.onTouchMove, l.passiveListener ? {
            passive: !1,
            capture: c
        } : c),
        o[u](i.end, t.onTouchEnd, d),
        i.cancel && o[u](i.cancel, t.onTouchEnd, d)
    }
    (n.preventClicks || n.preventClicksPropagation) && o[u]("click", t.onClick, !0),
    n.cssMode && s[u]("scroll", t.onScroll),
    n.updateOnWindowResize ? t[f](a.ios || a.android ? "resize orientationchange observerUpdate" : "resize observerUpdate", K4, !0) : t[f]("observerUpdate", K4, !0)
}
;
function Y_e() {
    const t = this
      , e = tn()
      , {params: r, support: n} = t;
    t.onTouchStart = G_e.bind(t),
    t.onTouchMove = H_e.bind(t),
    t.onTouchEnd = V_e.bind(t),
    r.cssMode && (t.onScroll = j_e.bind(t)),
    t.onClick = z_e.bind(t),
    n.touch && !q4 && (e.addEventListener("touchstart", W_e),
    q4 = !0),
    gM(t, "on")
}
function X_e() {
    gM(this, "off")
}
const K_e = {
    attachEvents: Y_e,
    detachEvents: X_e
}
  , Z4 = (t, e) => t.grid && e.grid && e.grid.rows > 1;
function q_e() {
    const t = this
      , {activeIndex: e, initialized: r, loopedSlides: n=0, params: i, $el: o} = t
      , s = i.breakpoints;
    if (!s || s && Object.keys(s).length === 0)
        return;
    const a = t.getBreakpoint(s, t.params.breakpointsBase, t.el);
    if (!a || t.currentBreakpoint === a)
        return;
    const c = (a in s ? s[a] : void 0) || t.originalParams
      , u = Z4(t, i)
      , f = Z4(t, c)
      , d = i.enabled;
    u && !f ? (o.removeClass(`${i.containerModifierClass}grid ${i.containerModifierClass}grid-column`),
    t.emitContainerClasses()) : !u && f && (o.addClass(`${i.containerModifierClass}grid`),
    (c.grid.fill && c.grid.fill === "column" || !c.grid.fill && i.grid.fill === "column") && o.addClass(`${i.containerModifierClass}grid-column`),
    t.emitContainerClasses()),
    ["navigation", "pagination", "scrollbar"].forEach(m => {
        const E = i[m] && i[m].enabled
          , g = c[m] && c[m].enabled;
        E && !g && t[m].disable(),
        !E && g && t[m].enable()
    }
    );
    const h = c.direction && c.direction !== i.direction
      , x = i.loop && (c.slidesPerView !== i.slidesPerView || h);
    h && r && t.changeDirection(),
    Hn(t.params, c);
    const y = t.params.enabled;
    Object.assign(t, {
        allowTouchMove: t.params.allowTouchMove,
        allowSlideNext: t.params.allowSlideNext,
        allowSlidePrev: t.params.allowSlidePrev
    }),
    d && !y ? t.disable() : !d && y && t.enable(),
    t.currentBreakpoint = a,
    t.emit("_beforeBreakpoint", c),
    x && r && (t.loopDestroy(),
    t.loopCreate(),
    t.updateSlides(),
    t.slideTo(e - n + t.loopedSlides, 0, !1)),
    t.emit("breakpoint", c)
}
function Z_e(t, e="window", r) {
    if (!t || e === "container" && !r)
        return;
    let n = !1;
    const i = Nr()
      , o = e === "window" ? i.innerHeight : r.clientHeight
      , s = Object.keys(t).map(a => {
        if (typeof a == "string" && a.indexOf("@") === 0) {
            const l = parseFloat(a.substr(1));
            return {
                value: o * l,
                point: a
            }
        }
        return {
            value: a,
            point: a
        }
    }
    );
    s.sort( (a, l) => parseInt(a.value, 10) - parseInt(l.value, 10));
    for (let a = 0; a < s.length; a += 1) {
        const {point: l, value: c} = s[a];
        e === "window" ? i.matchMedia(`(min-width: ${c}px)`).matches && (n = l) : c <= r.clientWidth && (n = l)
    }
    return n || "max"
}
const J_e = {
    setBreakpoint: q_e,
    getBreakpoint: Z_e
};
function Q_e(t, e) {
    const r = [];
    return t.forEach(n => {
        typeof n == "object" ? Object.keys(n).forEach(i => {
            n[i] && r.push(e + i)
        }
        ) : typeof n == "string" && r.push(e + n)
    }
    ),
    r
}
function e2e() {
    const t = this
      , {classNames: e, params: r, rtl: n, $el: i, device: o, support: s} = t
      , a = Q_e(["initialized", r.direction, {
        "pointer-events": !s.touch
    }, {
        "free-mode": t.params.freeMode && r.freeMode.enabled
    }, {
        autoheight: r.autoHeight
    }, {
        rtl: n
    }, {
        grid: r.grid && r.grid.rows > 1
    }, {
        "grid-column": r.grid && r.grid.rows > 1 && r.grid.fill === "column"
    }, {
        android: o.android
    }, {
        ios: o.ios
    }, {
        "css-mode": r.cssMode
    }, {
        centered: r.cssMode && r.centeredSlides
    }, {
        "watch-progress": r.watchSlidesProgress
    }], r.containerModifierClass);
    e.push(...a),
    i.addClass([...e].join(" ")),
    t.emitContainerClasses()
}
function t2e() {
    const t = this
      , {$el: e, classNames: r} = t;
    e.removeClass(r.join(" ")),
    t.emitContainerClasses()
}
const r2e = {
    addClasses: e2e,
    removeClasses: t2e
};
function n2e(t, e, r, n, i, o) {
    const s = Nr();
    let a;
    function l() {
        o && o()
    }
    !De(t).parent("picture")[0] && (!t.complete || !i) && e ? (a = new s.Image,
    a.onload = l,
    a.onerror = l,
    n && (a.sizes = n),
    r && (a.srcset = r),
    e && (a.src = e)) : l()
}
function i2e() {
    const t = this;
    t.imagesToLoad = t.$el.find("img");
    function e() {
        typeof t > "u" || t === null || !t || t.destroyed || (t.imagesLoaded !== void 0 && (t.imagesLoaded += 1),
        t.imagesLoaded === t.imagesToLoad.length && (t.params.updateOnImagesReady && t.update(),
        t.emit("imagesReady")))
    }
    for (let r = 0; r < t.imagesToLoad.length; r += 1) {
        const n = t.imagesToLoad[r];
        t.loadImage(n, n.currentSrc || n.getAttribute("src"), n.srcset || n.getAttribute("srcset"), n.sizes || n.getAttribute("sizes"), !0, e)
    }
}
const o2e = {
    loadImage: n2e,
    preloadImages: i2e
};
function s2e() {
    const t = this
      , {isLocked: e, params: r} = t
      , {slidesOffsetBefore: n} = r;
    if (n) {
        const i = t.slides.length - 1
          , o = t.slidesGrid[i] + t.slidesSizesGrid[i] + n * 2;
        t.isLocked = t.size > o
    } else
        t.isLocked = t.snapGrid.length === 1;
    r.allowSlideNext === !0 && (t.allowSlideNext = !t.isLocked),
    r.allowSlidePrev === !0 && (t.allowSlidePrev = !t.isLocked),
    e && e !== t.isLocked && (t.isEnd = !1),
    e !== t.isLocked && t.emit(t.isLocked ? "lock" : "unlock")
}
const a2e = {
    checkOverflow: s2e
}
  , J4 = {
    init: !0,
    direction: "horizontal",
    touchEventsTarget: "wrapper",
    initialSlide: 0,
    speed: 300,
    cssMode: !1,
    updateOnWindowResize: !0,
    resizeObserver: !0,
    nested: !1,
    createElements: !1,
    enabled: !0,
    focusableElements: "input, select, option, textarea, button, video, label",
    width: null,
    height: null,
    preventInteractionOnTransition: !1,
    userAgent: null,
    url: null,
    edgeSwipeDetection: !1,
    edgeSwipeThreshold: 20,
    autoHeight: !1,
    setWrapperSize: !1,
    virtualTranslate: !1,
    effect: "slide",
    breakpoints: void 0,
    breakpointsBase: "window",
    spaceBetween: 0,
    slidesPerView: 1,
    slidesPerGroup: 1,
    slidesPerGroupSkip: 0,
    slidesPerGroupAuto: !1,
    centeredSlides: !1,
    centeredSlidesBounds: !1,
    slidesOffsetBefore: 0,
    slidesOffsetAfter: 0,
    normalizeSlideIndex: !0,
    centerInsufficientSlides: !1,
    watchOverflow: !0,
    roundLengths: !1,
    touchRatio: 1,
    touchAngle: 45,
    simulateTouch: !0,
    shortSwipes: !0,
    longSwipes: !0,
    longSwipesRatio: .5,
    longSwipesMs: 300,
    followFinger: !0,
    allowTouchMove: !0,
    threshold: 0,
    touchMoveStopPropagation: !1,
    touchStartPreventDefault: !0,
    touchStartForcePreventDefault: !1,
    touchReleaseOnEdges: !1,
    uniqueNavElements: !0,
    resistance: !0,
    resistanceRatio: .85,
    watchSlidesProgress: !1,
    grabCursor: !1,
    preventClicks: !0,
    preventClicksPropagation: !0,
    slideToClickedSlide: !1,
    preloadImages: !0,
    updateOnImagesReady: !0,
    loop: !1,
    loopAdditionalSlides: 0,
    loopedSlides: null,
    loopedSlidesLimit: !0,
    loopFillGroupWithBlank: !1,
    loopPreventsSlide: !0,
    rewind: !1,
    allowSlidePrev: !0,
    allowSlideNext: !0,
    swipeHandler: null,
    noSwiping: !0,
    noSwipingClass: "swiper-no-swiping",
    noSwipingSelector: null,
    passiveListeners: !0,
    maxBackfaceHiddenSlides: 10,
    containerModifierClass: "swiper-",
    slideClass: "swiper-slide",
    slideBlankClass: "swiper-slide-invisible-blank",
    slideActiveClass: "swiper-slide-active",
    slideDuplicateActiveClass: "swiper-slide-duplicate-active",
    slideVisibleClass: "swiper-slide-visible",
    slideDuplicateClass: "swiper-slide-duplicate",
    slideNextClass: "swiper-slide-next",
    slideDuplicateNextClass: "swiper-slide-duplicate-next",
    slidePrevClass: "swiper-slide-prev",
    slideDuplicatePrevClass: "swiper-slide-duplicate-prev",
    wrapperClass: "swiper-wrapper",
    runCallbacksOnInit: !0,
    _emitClasses: !1
};
function l2e(t, e) {
    return function(n={}) {
        const i = Object.keys(n)[0]
          , o = n[i];
        if (typeof o != "object" || o === null) {
            Hn(e, n);
            return
        }
        if (["navigation", "pagination", "scrollbar"].indexOf(i) >= 0 && t[i] === !0 && (t[i] = {
            auto: !0
        }),
        !(i in t && "enabled"in o)) {
            Hn(e, n);
            return
        }
        t[i] === !0 && (t[i] = {
            enabled: !0
        }),
        typeof t[i] == "object" && !("enabled"in t[i]) && (t[i].enabled = !0),
        t[i] || (t[i] = {
            enabled: !1
        }),
        Hn(e, n)
    }
}
const jm = {
    eventsEmitter: i_e,
    update: x_e,
    translate: E_e,
    transition: A_e,
    slide: I_e,
    loop: M_e,
    grabCursor: $_e,
    events: K_e,
    breakpoints: J_e,
    checkOverflow: a2e,
    classes: r2e,
    images: o2e
}
  , Wm = {};
let gu = class Vo {
    constructor(...e) {
        let r, n;
        if (e.length === 1 && e[0].constructor && Object.prototype.toString.call(e[0]).slice(8, -1) === "Object" ? n = e[0] : [r,n] = e,
        n || (n = {}),
        n = Hn({}, n),
        r && !n.el && (n.el = r),
        n.el && De(n.el).length > 1) {
            const a = [];
            return De(n.el).each(l => {
                const c = Hn({}, n, {
                    el: l
                });
                a.push(new Vo(c))
            }
            ),
            a
        }
        const i = this;
        i.__swiper__ = !0,
        i.support = xM(),
        i.device = QEe({
            userAgent: n.userAgent
        }),
        i.browser = t_e(),
        i.eventsListeners = {},
        i.eventsAnyListeners = [],
        i.modules = [...i.__modules__],
        n.modules && Array.isArray(n.modules) && i.modules.push(...n.modules);
        const o = {};
        i.modules.forEach(a => {
            a({
                swiper: i,
                extendParams: l2e(n, o),
                on: i.on.bind(i),
                once: i.once.bind(i),
                off: i.off.bind(i),
                emit: i.emit.bind(i)
            })
        }
        );
        const s = Hn({}, J4, o);
        return i.params = Hn({}, s, Wm, n),
        i.originalParams = Hn({}, i.params),
        i.passedParams = Hn({}, n),
        i.params && i.params.on && Object.keys(i.params.on).forEach(a => {
            i.on(a, i.params.on[a])
        }
        ),
        i.params && i.params.onAny && i.onAny(i.params.onAny),
        i.$ = De,
        Object.assign(i, {
            enabled: i.params.enabled,
            el: r,
            classNames: [],
            slides: De(),
            slidesGrid: [],
            snapGrid: [],
            slidesSizesGrid: [],
            isHorizontal() {
                return i.params.direction === "horizontal"
            },
            isVertical() {
                return i.params.direction === "vertical"
            },
            activeIndex: 0,
            realIndex: 0,
            isBeginning: !0,
            isEnd: !1,
            translate: 0,
            previousTranslate: 0,
            progress: 0,
            velocity: 0,
            animating: !1,
            allowSlideNext: i.params.allowSlideNext,
            allowSlidePrev: i.params.allowSlidePrev,
            touchEvents: function() {
                const l = ["touchstart", "touchmove", "touchend", "touchcancel"]
                  , c = ["pointerdown", "pointermove", "pointerup"];
                return i.touchEventsTouch = {
                    start: l[0],
                    move: l[1],
                    end: l[2],
                    cancel: l[3]
                },
                i.touchEventsDesktop = {
                    start: c[0],
                    move: c[1],
                    end: c[2]
                },
                i.support.touch || !i.params.simulateTouch ? i.touchEventsTouch : i.touchEventsDesktop
            }(),
            touchEventsData: {
                isTouched: void 0,
                isMoved: void 0,
                allowTouchCallbacks: void 0,
                touchStartTime: void 0,
                isScrolling: void 0,
                currentTranslate: void 0,
                startTranslate: void 0,
                allowThresholdMove: void 0,
                focusableElements: i.params.focusableElements,
                lastClickTime: Nf(),
                clickTimeout: void 0,
                velocities: [],
                allowMomentumBounce: void 0,
                isTouchEvent: void 0,
                startMoving: void 0
            },
            allowClick: !0,
            allowTouchMove: i.params.allowTouchMove,
            touches: {
                startX: 0,
                startY: 0,
                currentX: 0,
                currentY: 0,
                diff: 0
            },
            imagesToLoad: [],
            imagesLoaded: 0
        }),
        i.emit("_swiper"),
        i.params.init && i.init(),
        i
    }
    enable() {
        const e = this;
        e.enabled || (e.enabled = !0,
        e.params.grabCursor && e.setGrabCursor(),
        e.emit("enable"))
    }
    disable() {
        const e = this;
        e.enabled && (e.enabled = !1,
        e.params.grabCursor && e.unsetGrabCursor(),
        e.emit("disable"))
    }
    setProgress(e, r) {
        const n = this;
        e = Math.min(Math.max(e, 0), 1);
        const i = n.minTranslate()
          , s = (n.maxTranslate() - i) * e + i;
        n.translateTo(s, typeof r > "u" ? 0 : r),
        n.updateActiveIndex(),
        n.updateSlidesClasses()
    }
    emitContainerClasses() {
        const e = this;
        if (!e.params._emitClasses || !e.el)
            return;
        const r = e.el.className.split(" ").filter(n => n.indexOf("swiper") === 0 || n.indexOf(e.params.containerModifierClass) === 0);
        e.emit("_containerClasses", r.join(" "))
    }
    getSlideClasses(e) {
        const r = this;
        return r.destroyed ? "" : e.className.split(" ").filter(n => n.indexOf("swiper-slide") === 0 || n.indexOf(r.params.slideClass) === 0).join(" ")
    }
    emitSlidesClasses() {
        const e = this;
        if (!e.params._emitClasses || !e.el)
            return;
        const r = [];
        e.slides.each(n => {
            const i = e.getSlideClasses(n);
            r.push({
                slideEl: n,
                classNames: i
            }),
            e.emit("_slideClass", n, i)
        }
        ),
        e.emit("_slideClasses", r)
    }
    slidesPerViewDynamic(e="current", r=!1) {
        const n = this
          , {params: i, slides: o, slidesGrid: s, slidesSizesGrid: a, size: l, activeIndex: c} = n;
        let u = 1;
        if (i.centeredSlides) {
            let f = o[c].swiperSlideSize, d;
            for (let h = c + 1; h < o.length; h += 1)
                o[h] && !d && (f += o[h].swiperSlideSize,
                u += 1,
                f > l && (d = !0));
            for (let h = c - 1; h >= 0; h -= 1)
                o[h] && !d && (f += o[h].swiperSlideSize,
                u += 1,
                f > l && (d = !0))
        } else if (e === "current")
            for (let f = c + 1; f < o.length; f += 1)
                (r ? s[f] + a[f] - s[c] < l : s[f] - s[c] < l) && (u += 1);
        else
            for (let f = c - 1; f >= 0; f -= 1)
                s[c] - s[f] < l && (u += 1);
        return u
    }
    update() {
        const e = this;
        if (!e || e.destroyed)
            return;
        const {snapGrid: r, params: n} = e;
        n.breakpoints && e.setBreakpoint(),
        e.updateSize(),
        e.updateSlides(),
        e.updateProgress(),
        e.updateSlidesClasses();
        function i() {
            const s = e.rtlTranslate ? e.translate * -1 : e.translate
              , a = Math.min(Math.max(s, e.maxTranslate()), e.minTranslate());
            e.setTranslate(a),
            e.updateActiveIndex(),
            e.updateSlidesClasses()
        }
        let o;
        e.params.freeMode && e.params.freeMode.enabled ? (i(),
        e.params.autoHeight && e.updateAutoHeight()) : ((e.params.slidesPerView === "auto" || e.params.slidesPerView > 1) && e.isEnd && !e.params.centeredSlides ? o = e.slideTo(e.slides.length - 1, 0, !1, !0) : o = e.slideTo(e.activeIndex, 0, !1, !0),
        o || i()),
        n.watchOverflow && r !== e.snapGrid && e.checkOverflow(),
        e.emit("update")
    }
    changeDirection(e, r=!0) {
        const n = this
          , i = n.params.direction;
        return e || (e = i === "horizontal" ? "vertical" : "horizontal"),
        e === i || e !== "horizontal" && e !== "vertical" || (n.$el.removeClass(`${n.params.containerModifierClass}${i}`).addClass(`${n.params.containerModifierClass}${e}`),
        n.emitContainerClasses(),
        n.params.direction = e,
        n.slides.each(o => {
            e === "vertical" ? o.style.width = "" : o.style.height = ""
        }
        ),
        n.emit("changeDirection"),
        r && n.update()),
        n
    }
    changeLanguageDirection(e) {
        const r = this;
        r.rtl && e === "rtl" || !r.rtl && e === "ltr" || (r.rtl = e === "rtl",
        r.rtlTranslate = r.params.direction === "horizontal" && r.rtl,
        r.rtl ? (r.$el.addClass(`${r.params.containerModifierClass}rtl`),
        r.el.dir = "rtl") : (r.$el.removeClass(`${r.params.containerModifierClass}rtl`),
        r.el.dir = "ltr"),
        r.update())
    }
    mount(e) {
        const r = this;
        if (r.mounted)
            return !0;
        const n = De(e || r.params.el);
        if (e = n[0],
        !e)
            return !1;
        e.swiper = r;
        const i = () => `.${(r.params.wrapperClass || "").trim().split(" ").join(".")}`;
        let s = ( () => {
            if (e && e.shadowRoot && e.shadowRoot.querySelector) {
                const a = De(e.shadowRoot.querySelector(i()));
                return a.children = l => n.children(l),
                a
            }
            return n.children ? n.children(i()) : De(n).children(i())
        }
        )();
        if (s.length === 0 && r.params.createElements) {
            const l = tn().createElement("div");
            s = De(l),
            l.className = r.params.wrapperClass,
            n.append(l),
            n.children(`.${r.params.slideClass}`).each(c => {
                s.append(c)
            }
            )
        }
        return Object.assign(r, {
            $el: n,
            el: e,
            $wrapperEl: s,
            wrapperEl: s[0],
            mounted: !0,
            rtl: e.dir.toLowerCase() === "rtl" || n.css("direction") === "rtl",
            rtlTranslate: r.params.direction === "horizontal" && (e.dir.toLowerCase() === "rtl" || n.css("direction") === "rtl"),
            wrongRTL: s.css("display") === "-webkit-box"
        }),
        !0
    }
    init(e) {
        const r = this;
        return r.initialized || r.mount(e) === !1 || (r.emit("beforeInit"),
        r.params.breakpoints && r.setBreakpoint(),
        r.addClasses(),
        r.params.loop && r.loopCreate(),
        r.updateSize(),
        r.updateSlides(),
        r.params.watchOverflow && r.checkOverflow(),
        r.params.grabCursor && r.enabled && r.setGrabCursor(),
        r.params.preloadImages && r.preloadImages(),
        r.params.loop ? r.slideTo(r.params.initialSlide + r.loopedSlides, 0, r.params.runCallbacksOnInit, !1, !0) : r.slideTo(r.params.initialSlide, 0, r.params.runCallbacksOnInit, !1, !0),
        r.attachEvents(),
        r.initialized = !0,
        r.emit("init"),
        r.emit("afterInit")),
        r
    }
    destroy(e=!0, r=!0) {
        const n = this
          , {params: i, $el: o, $wrapperEl: s, slides: a} = n;
        return typeof n.params > "u" || n.destroyed || (n.emit("beforeDestroy"),
        n.initialized = !1,
        n.detachEvents(),
        i.loop && n.loopDestroy(),
        r && (n.removeClasses(),
        o.removeAttr("style"),
        s.removeAttr("style"),
        a && a.length && a.removeClass([i.slideVisibleClass, i.slideActiveClass, i.slideNextClass, i.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),
        n.emit("destroy"),
        Object.keys(n.eventsListeners).forEach(l => {
            n.off(l)
        }
        ),
        e !== !1 && (n.$el[0].swiper = null,
        YEe(n)),
        n.destroyed = !0),
        null
    }
    static extendDefaults(e) {
        Hn(Wm, e)
    }
    static get extendedDefaults() {
        return Wm
    }
    static get defaults() {
        return J4
    }
    static installModule(e) {
        Vo.prototype.__modules__ || (Vo.prototype.__modules__ = []);
        const r = Vo.prototype.__modules__;
        typeof e == "function" && r.indexOf(e) < 0 && r.push(e)
    }
    static use(e) {
        return Array.isArray(e) ? (e.forEach(r => Vo.installModule(r)),
        Vo) : (Vo.installModule(e),
        Vo)
    }
}
;
Object.keys(jm).forEach(t => {
    Object.keys(jm[t]).forEach(e => {
        gu.prototype[e] = jm[t][e]
    }
    )
}
);
gu.use([r_e, n_e]);
function A5e({swiper: t, extendParams: e, on: r, emit: n}) {
    let i;
    t.autoplay = {
        running: !1,
        paused: !1
    },
    e({
        autoplay: {
            enabled: !1,
            delay: 3e3,
            waitForTransition: !0,
            disableOnInteraction: !0,
            stopOnLastSlide: !1,
            reverseDirection: !1,
            pauseOnMouseEnter: !1
        }
    });
    function o() {
        if (!t.size) {
            t.autoplay.running = !1,
            t.autoplay.paused = !1;
            return
        }
        const y = t.slides.eq(t.activeIndex);
        let m = t.params.autoplay.delay;
        y.attr("data-swiper-autoplay") && (m = y.attr("data-swiper-autoplay") || t.params.autoplay.delay),
        clearTimeout(i),
        i = rp( () => {
            let E;
            t.params.autoplay.reverseDirection ? t.params.loop ? (t.loopFix(),
            E = t.slidePrev(t.params.speed, !0, !0),
            n("autoplay")) : t.isBeginning ? t.params.autoplay.stopOnLastSlide ? a() : (E = t.slideTo(t.slides.length - 1, t.params.speed, !0, !0),
            n("autoplay")) : (E = t.slidePrev(t.params.speed, !0, !0),
            n("autoplay")) : t.params.loop ? (t.loopFix(),
            E = t.slideNext(t.params.speed, !0, !0),
            n("autoplay")) : t.isEnd ? t.params.autoplay.stopOnLastSlide ? a() : (E = t.slideTo(0, t.params.speed, !0, !0),
            n("autoplay")) : (E = t.slideNext(t.params.speed, !0, !0),
            n("autoplay")),
            (t.params.cssMode && t.autoplay.running || E === !1) && o()
        }
        , m)
    }
    function s() {
        return typeof i < "u" || t.autoplay.running ? !1 : (t.autoplay.running = !0,
        n("autoplayStart"),
        o(),
        !0)
    }
    function a() {
        return !t.autoplay.running || typeof i > "u" ? !1 : (i && (clearTimeout(i),
        i = void 0),
        t.autoplay.running = !1,
        n("autoplayStop"),
        !0)
    }
    function l(y) {
        t.autoplay.running && (t.autoplay.paused || (i && clearTimeout(i),
        t.autoplay.paused = !0,
        y === 0 || !t.params.autoplay.waitForTransition ? (t.autoplay.paused = !1,
        o()) : ["transitionend", "webkitTransitionEnd"].forEach(m => {
            t.$wrapperEl[0].addEventListener(m, u)
        }
        )))
    }
    function c() {
        const y = tn();
        y.visibilityState === "hidden" && t.autoplay.running && l(),
        y.visibilityState === "visible" && t.autoplay.paused && (o(),
        t.autoplay.paused = !1)
    }
    function u(y) {
        !t || t.destroyed || !t.$wrapperEl || y.target === t.$wrapperEl[0] && (["transitionend", "webkitTransitionEnd"].forEach(m => {
            t.$wrapperEl[0].removeEventListener(m, u)
        }
        ),
        t.autoplay.paused = !1,
        t.autoplay.running ? o() : a())
    }
    function f() {
        t.params.autoplay.disableOnInteraction ? a() : (n("autoplayPause"),
        l()),
        ["transitionend", "webkitTransitionEnd"].forEach(y => {
            t.$wrapperEl[0].removeEventListener(y, u)
        }
        )
    }
    function d() {
        t.params.autoplay.disableOnInteraction || (t.autoplay.paused = !1,
        n("autoplayResume"),
        o())
    }
    function h() {
        t.params.autoplay.pauseOnMouseEnter && (t.$el.on("mouseenter", f),
        t.$el.on("mouseleave", d))
    }
    function x() {
        t.$el.off("mouseenter", f),
        t.$el.off("mouseleave", d)
    }
    r("init", () => {
        t.params.autoplay.enabled && (s(),
        tn().addEventListener("visibilitychange", c),
        h())
    }
    ),
    r("beforeTransitionStart", (y, m, E) => {
        t.autoplay.running && (E || !t.params.autoplay.disableOnInteraction ? t.autoplay.pause(m) : a())
    }
    ),
    r("sliderFirstMove", () => {
        t.autoplay.running && (t.params.autoplay.disableOnInteraction ? a() : l())
    }
    ),
    r("touchEnd", () => {
        t.params.cssMode && t.autoplay.paused && !t.params.autoplay.disableOnInteraction && o()
    }
    ),
    r("destroy", () => {
        x(),
        t.autoplay.running && a(),
        tn().removeEventListener("visibilitychange", c)
    }
    ),
    Object.assign(t.autoplay, {
        pause: l,
        run: o,
        start: s,
        stop: a
    })
}
function kl(t) {
    return typeof t == "object" && t !== null && t.constructor && Object.prototype.toString.call(t).slice(8, -1) === "Object"
}
function Xs(t, e) {
    const r = ["__proto__", "constructor", "prototype"];
    Object.keys(e).filter(n => r.indexOf(n) < 0).forEach(n => {
        typeof t[n] > "u" ? t[n] = e[n] : kl(e[n]) && kl(t[n]) && Object.keys(e[n]).length > 0 ? e[n].__swiper__ ? t[n] = e[n] : Xs(t[n], e[n]) : t[n] = e[n]
    }
    )
}
function mM(t={}) {
    return t.navigation && typeof t.navigation.nextEl > "u" && typeof t.navigation.prevEl > "u"
}
function vM(t={}) {
    return t.pagination && typeof t.pagination.el > "u"
}
function yM(t={}) {
    return t.scrollbar && typeof t.scrollbar.el > "u"
}
function EM(t="") {
    const e = t.split(" ").map(n => n.trim()).filter(n => !!n)
      , r = [];
    return e.forEach(n => {
        r.indexOf(n) < 0 && r.push(n)
    }
    ),
    r.join(" ")
}
const _M = ["modules", "init", "_direction", "touchEventsTarget", "initialSlide", "_speed", "cssMode", "updateOnWindowResize", "resizeObserver", "nested", "focusableElements", "_enabled", "_width", "_height", "preventInteractionOnTransition", "userAgent", "url", "_edgeSwipeDetection", "_edgeSwipeThreshold", "_freeMode", "_autoHeight", "setWrapperSize", "virtualTranslate", "_effect", "breakpoints", "_spaceBetween", "_slidesPerView", "maxBackfaceHiddenSlides", "_grid", "_slidesPerGroup", "_slidesPerGroupSkip", "_slidesPerGroupAuto", "_centeredSlides", "_centeredSlidesBounds", "_slidesOffsetBefore", "_slidesOffsetAfter", "normalizeSlideIndex", "_centerInsufficientSlides", "_watchOverflow", "roundLengths", "touchRatio", "touchAngle", "simulateTouch", "_shortSwipes", "_longSwipes", "longSwipesRatio", "longSwipesMs", "_followFinger", "allowTouchMove", "_threshold", "touchMoveStopPropagation", "touchStartPreventDefault", "touchStartForcePreventDefault", "touchReleaseOnEdges", "uniqueNavElements", "_resistance", "_resistanceRatio", "_watchSlidesProgress", "_grabCursor", "preventClicks", "preventClicksPropagation", "_slideToClickedSlide", "_preloadImages", "updateOnImagesReady", "_loop", "_loopAdditionalSlides", "_loopedSlides", "_loopedSlidesLimit", "_loopFillGroupWithBlank", "loopPreventsSlide", "_rewind", "_allowSlidePrev", "_allowSlideNext", "_swipeHandler", "_noSwiping", "noSwipingClass", "noSwipingSelector", "passiveListeners", "containerModifierClass", "slideClass", "slideBlankClass", "slideActiveClass", "slideDuplicateActiveClass", "slideVisibleClass", "slideDuplicateClass", "slideNextClass", "slideDuplicateNextClass", "slidePrevClass", "slideDuplicatePrevClass", "wrapperClass", "runCallbacksOnInit", "observer", "observeParents", "observeSlideChildren", "a11y", "_autoplay", "_controller", "coverflowEffect", "cubeEffect", "fadeEffect", "flipEffect", "creativeEffect", "cardsEffect", "hashNavigation", "history", "keyboard", "lazy", "mousewheel", "_navigation", "_pagination", "parallax", "_scrollbar", "_thumbs", "virtual", "zoom"];
function Q4(t={}, e=!0) {
    const r = {
        on: {}
    }
      , n = {}
      , i = {};
    Xs(r, gu.defaults),
    Xs(r, gu.extendedDefaults),
    r._emitClasses = !0,
    r.init = !1;
    const o = {}
      , s = _M.map(l => l.replace(/_/, ""))
      , a = Object.assign({}, t);
    return Object.keys(a).forEach(l => {
        typeof t[l] > "u" || (s.indexOf(l) >= 0 ? kl(t[l]) ? (r[l] = {},
        i[l] = {},
        Xs(r[l], t[l]),
        Xs(i[l], t[l])) : (r[l] = t[l],
        i[l] = t[l]) : l.search(/on[A-Z]/) === 0 && typeof t[l] == "function" ? e ? n[`${l[2].toLowerCase()}${l.substr(3)}`] = t[l] : r.on[`${l[2].toLowerCase()}${l.substr(3)}`] = t[l] : o[l] = t[l])
    }
    ),
    ["navigation", "pagination", "scrollbar"].forEach(l => {
        r[l] === !0 && (r[l] = {}),
        r[l] === !1 && delete r[l]
    }
    ),
    {
        params: r,
        passedParams: i,
        rest: o,
        events: n
    }
}
function c2e({el: t, nextEl: e, prevEl: r, paginationEl: n, scrollbarEl: i, swiper: o}, s) {
    mM(s) && e && r && (o.params.navigation.nextEl = e,
    o.originalParams.navigation.nextEl = e,
    o.params.navigation.prevEl = r,
    o.originalParams.navigation.prevEl = r),
    vM(s) && n && (o.params.pagination.el = n,
    o.originalParams.pagination.el = n),
    yM(s) && i && (o.params.scrollbar.el = i,
    o.originalParams.scrollbar.el = i),
    o.init(t)
}
const bM = (t, e) => {
    let r = e.slidesPerView;
    if (e.breakpoints) {
        const i = gu.prototype.getBreakpoint(e.breakpoints)
          , o = i in e.breakpoints ? e.breakpoints[i] : void 0;
        o && o.slidesPerView && (r = o.slidesPerView)
    }
    let n = Math.ceil(parseFloat(e.loopedSlides || r, 10));
    return n += e.loopAdditionalSlides,
    n > t.length && e.loopedSlidesLimit && (n = t.length),
    n
}
;
function u2e(t, e, r) {
    const n = e.map( (l, c) => (l.props || (l.props = {}),
    l.props.swiperRef = t,
    l.props["data-swiper-slide-index"] = c,
    l));
    function i(l, c, u) {
        return l.props || (l.props = {}),
        Or(l.type, {
            ...l.props,
            key: `${l.key}-duplicate-${c}-${u}`,
            class: `${l.props.className || ""} ${r.slideDuplicateClass} ${l.props.class || ""}`
        }, l.children)
    }
    if (r.loopFillGroupWithBlank) {
        const l = r.slidesPerGroup - n.length % r.slidesPerGroup;
        if (l !== r.slidesPerGroup)
            for (let c = 0; c < l; c += 1) {
                const u = Or("div", {
                    class: `${r.slideClass} ${r.slideBlankClass}`
                });
                n.push(u)
            }
    }
    r.slidesPerView === "auto" && !r.loopedSlides && (r.loopedSlides = n.length);
    const o = bM(n, r)
      , s = []
      , a = [];
    for (let l = 0; l < o; l += 1) {
        const c = l - Math.floor(l / n.length) * n.length;
        a.push(i(n[c], l, "append")),
        s.unshift(i(n[n.length - c - 1], l, "prepend"))
    }
    return t.value && (t.value.loopedSlides = o),
    [...s, ...n, ...a]
}
function f2e(t, e, r, n, i) {
    const o = [];
    if (!e)
        return o;
    const s = l => {
        o.indexOf(l) < 0 && o.push(l)
    }
    ;
    if (r && n) {
        const l = n.map(i)
          , c = r.map(i);
        l.join("") !== c.join("") && s("children"),
        n.length !== r.length && s("children")
    }
    return _M.filter(l => l[0] === "_").map(l => l.replace(/_/, "")).forEach(l => {
        if (l in t && l in e)
            if (kl(t[l]) && kl(e[l])) {
                const c = Object.keys(t[l])
                  , u = Object.keys(e[l]);
                c.length !== u.length ? s(l) : (c.forEach(f => {
                    t[l][f] !== e[l][f] && s(l)
                }
                ),
                u.forEach(f => {
                    t[l][f] !== e[l][f] && s(l)
                }
                ))
            } else
                t[l] !== e[l] && s(l)
    }
    ),
    o
}
function Ym(t, e, r) {
    t === void 0 && (t = {});
    const n = []
      , i = {
        "container-start": [],
        "container-end": [],
        "wrapper-start": [],
        "wrapper-end": []
    }
      , o = (s, a) => {
        Array.isArray(s) && s.forEach(l => {
            const c = typeof l.type == "symbol";
            a === "default" && (a = "container-end"),
            c && l.children ? o(l.children, "default") : l.type && (l.type.name === "SwiperSlide" || l.type.name === "AsyncComponentWrapper") ? n.push(l) : i[a] && i[a].push(l)
        }
        )
    }
    ;
    return Object.keys(t).forEach(s => {
        if (typeof t[s] != "function")
            return;
        const a = t[s]();
        o(a, s)
    }
    ),
    r.value = e.value,
    e.value = n,
    {
        slides: n,
        slots: i
    }
}
function d2e({swiper: t, slides: e, passedParams: r, changedParams: n, nextEl: i, prevEl: o, scrollbarEl: s, paginationEl: a}) {
    const l = n.filter(_ => _ !== "children" && _ !== "direction")
      , {params: c, pagination: u, navigation: f, scrollbar: d, virtual: h, thumbs: x} = t;
    let y, m, E, g, p;
    n.includes("thumbs") && r.thumbs && r.thumbs.swiper && c.thumbs && !c.thumbs.swiper && (y = !0),
    n.includes("controller") && r.controller && r.controller.control && c.controller && !c.controller.control && (m = !0),
    n.includes("pagination") && r.pagination && (r.pagination.el || a) && (c.pagination || c.pagination === !1) && u && !u.el && (E = !0),
    n.includes("scrollbar") && r.scrollbar && (r.scrollbar.el || s) && (c.scrollbar || c.scrollbar === !1) && d && !d.el && (g = !0),
    n.includes("navigation") && r.navigation && (r.navigation.prevEl || o) && (r.navigation.nextEl || i) && (c.navigation || c.navigation === !1) && f && !f.prevEl && !f.nextEl && (p = !0);
    const v = _ => {
        t[_] && (t[_].destroy(),
        _ === "navigation" ? (c[_].prevEl = void 0,
        c[_].nextEl = void 0,
        t[_].prevEl = void 0,
        t[_].nextEl = void 0) : (c[_].el = void 0,
        t[_].el = void 0))
    }
    ;
    l.forEach(_ => {
        if (kl(c[_]) && kl(r[_]))
            Xs(c[_], r[_]);
        else {
            const b = r[_];
            (b === !0 || b === !1) && (_ === "navigation" || _ === "pagination" || _ === "scrollbar") ? b === !1 && v(_) : c[_] = r[_]
        }
    }
    ),
    l.includes("controller") && !m && t.controller && t.controller.control && c.controller && c.controller.control && (t.controller.control = c.controller.control),
    n.includes("children") && e && h && c.virtual.enabled ? (h.slides = e,
    h.update(!0)) : n.includes("children") && t.lazy && t.params.lazy.enabled && t.lazy.load(),
    y && x.init() && x.update(!0),
    m && (t.controller.control = c.controller.control),
    E && (a && (c.pagination.el = a),
    u.init(),
    u.render(),
    u.update()),
    g && (s && (c.scrollbar.el = s),
    d.init(),
    d.updateSize(),
    d.setTranslate()),
    p && (i && (c.navigation.nextEl = i),
    o && (c.navigation.prevEl = o),
    f.init(),
    f.update()),
    n.includes("allowSlideNext") && (t.allowSlideNext = r.allowSlideNext),
    n.includes("allowSlidePrev") && (t.allowSlidePrev = r.allowSlidePrev),
    n.includes("direction") && t.changeDirection(r.direction, !1),
    t.update()
}
function h2e(t, e, r) {
    if (!r)
        return null;
    const n = t.value.isHorizontal() ? {
        [t.value.rtlTranslate ? "right" : "left"]: `${r.offset}px`
    } : {
        top: `${r.offset}px`
    };
    return e.filter( (i, o) => o >= r.from && o <= r.to).map(i => (i.props || (i.props = {}),
    i.props.style || (i.props.style = {}),
    i.props.swiperRef = t,
    i.props.style = n,
    Or(i.type, {
        ...i.props
    }, i.children)))
}
const x2e = t => {
    !t || t.destroyed || !t.params.virtual || t.params.virtual && !t.params.virtual.enabled || (t.updateSlides(),
    t.updateProgress(),
    t.updateSlidesClasses(),
    t.lazy && t.params.lazy.enabled && t.lazy.load(),
    t.parallax && t.params.parallax && t.params.parallax.enabled && t.parallax.setTranslate())
}
  , w5e = {
    name: "Swiper",
    props: {
        tag: {
            type: String,
            default: "div"
        },
        wrapperTag: {
            type: String,
            default: "div"
        },
        modules: {
            type: Array,
            default: void 0
        },
        init: {
            type: Boolean,
            default: void 0
        },
        direction: {
            type: String,
            default: void 0
        },
        touchEventsTarget: {
            type: String,
            default: void 0
        },
        initialSlide: {
            type: Number,
            default: void 0
        },
        speed: {
            type: Number,
            default: void 0
        },
        cssMode: {
            type: Boolean,
            default: void 0
        },
        updateOnWindowResize: {
            type: Boolean,
            default: void 0
        },
        resizeObserver: {
            type: Boolean,
            default: void 0
        },
        nested: {
            type: Boolean,
            default: void 0
        },
        focusableElements: {
            type: String,
            default: void 0
        },
        width: {
            type: Number,
            default: void 0
        },
        height: {
            type: Number,
            default: void 0
        },
        preventInteractionOnTransition: {
            type: Boolean,
            default: void 0
        },
        userAgent: {
            type: String,
            default: void 0
        },
        url: {
            type: String,
            default: void 0
        },
        edgeSwipeDetection: {
            type: [Boolean, String],
            default: void 0
        },
        edgeSwipeThreshold: {
            type: Number,
            default: void 0
        },
        autoHeight: {
            type: Boolean,
            default: void 0
        },
        setWrapperSize: {
            type: Boolean,
            default: void 0
        },
        virtualTranslate: {
            type: Boolean,
            default: void 0
        },
        effect: {
            type: String,
            default: void 0
        },
        breakpoints: {
            type: Object,
            default: void 0
        },
        spaceBetween: {
            type: Number,
            default: void 0
        },
        slidesPerView: {
            type: [Number, String],
            default: void 0
        },
        maxBackfaceHiddenSlides: {
            type: Number,
            default: void 0
        },
        slidesPerGroup: {
            type: Number,
            default: void 0
        },
        slidesPerGroupSkip: {
            type: Number,
            default: void 0
        },
        slidesPerGroupAuto: {
            type: Boolean,
            default: void 0
        },
        centeredSlides: {
            type: Boolean,
            default: void 0
        },
        centeredSlidesBounds: {
            type: Boolean,
            default: void 0
        },
        slidesOffsetBefore: {
            type: Number,
            default: void 0
        },
        slidesOffsetAfter: {
            type: Number,
            default: void 0
        },
        normalizeSlideIndex: {
            type: Boolean,
            default: void 0
        },
        centerInsufficientSlides: {
            type: Boolean,
            default: void 0
        },
        watchOverflow: {
            type: Boolean,
            default: void 0
        },
        roundLengths: {
            type: Boolean,
            default: void 0
        },
        touchRatio: {
            type: Number,
            default: void 0
        },
        touchAngle: {
            type: Number,
            default: void 0
        },
        simulateTouch: {
            type: Boolean,
            default: void 0
        },
        shortSwipes: {
            type: Boolean,
            default: void 0
        },
        longSwipes: {
            type: Boolean,
            default: void 0
        },
        longSwipesRatio: {
            type: Number,
            default: void 0
        },
        longSwipesMs: {
            type: Number,
            default: void 0
        },
        followFinger: {
            type: Boolean,
            default: void 0
        },
        allowTouchMove: {
            type: Boolean,
            default: void 0
        },
        threshold: {
            type: Number,
            default: void 0
        },
        touchMoveStopPropagation: {
            type: Boolean,
            default: void 0
        },
        touchStartPreventDefault: {
            type: Boolean,
            default: void 0
        },
        touchStartForcePreventDefault: {
            type: Boolean,
            default: void 0
        },
        touchReleaseOnEdges: {
            type: Boolean,
            default: void 0
        },
        uniqueNavElements: {
            type: Boolean,
            default: void 0
        },
        resistance: {
            type: Boolean,
            default: void 0
        },
        resistanceRatio: {
            type: Number,
            default: void 0
        },
        watchSlidesProgress: {
            type: Boolean,
            default: void 0
        },
        grabCursor: {
            type: Boolean,
            default: void 0
        },
        preventClicks: {
            type: Boolean,
            default: void 0
        },
        preventClicksPropagation: {
            type: Boolean,
            default: void 0
        },
        slideToClickedSlide: {
            type: Boolean,
            default: void 0
        },
        preloadImages: {
            type: Boolean,
            default: void 0
        },
        updateOnImagesReady: {
            type: Boolean,
            default: void 0
        },
        loop: {
            type: Boolean,
            default: void 0
        },
        loopAdditionalSlides: {
            type: Number,
            default: void 0
        },
        loopedSlides: {
            type: Number,
            default: void 0
        },
        loopedSlidesLimit: {
            type: Boolean,
            default: !0
        },
        loopFillGroupWithBlank: {
            type: Boolean,
            default: void 0
        },
        loopPreventsSlide: {
            type: Boolean,
            default: void 0
        },
        rewind: {
            type: Boolean,
            default: void 0
        },
        allowSlidePrev: {
            type: Boolean,
            default: void 0
        },
        allowSlideNext: {
            type: Boolean,
            default: void 0
        },
        swipeHandler: {
            type: Boolean,
            default: void 0
        },
        noSwiping: {
            type: Boolean,
            default: void 0
        },
        noSwipingClass: {
            type: String,
            default: void 0
        },
        noSwipingSelector: {
            type: String,
            default: void 0
        },
        passiveListeners: {
            type: Boolean,
            default: void 0
        },
        containerModifierClass: {
            type: String,
            default: void 0
        },
        slideClass: {
            type: String,
            default: void 0
        },
        slideBlankClass: {
            type: String,
            default: void 0
        },
        slideActiveClass: {
            type: String,
            default: void 0
        },
        slideDuplicateActiveClass: {
            type: String,
            default: void 0
        },
        slideVisibleClass: {
            type: String,
            default: void 0
        },
        slideDuplicateClass: {
            type: String,
            default: void 0
        },
        slideNextClass: {
            type: String,
            default: void 0
        },
        slideDuplicateNextClass: {
            type: String,
            default: void 0
        },
        slidePrevClass: {
            type: String,
            default: void 0
        },
        slideDuplicatePrevClass: {
            type: String,
            default: void 0
        },
        wrapperClass: {
            type: String,
            default: void 0
        },
        runCallbacksOnInit: {
            type: Boolean,
            default: void 0
        },
        observer: {
            type: Boolean,
            default: void 0
        },
        observeParents: {
            type: Boolean,
            default: void 0
        },
        observeSlideChildren: {
            type: Boolean,
            default: void 0
        },
        a11y: {
            type: [Boolean, Object],
            default: void 0
        },
        autoplay: {
            type: [Boolean, Object],
            default: void 0
        },
        controller: {
            type: Object,
            default: void 0
        },
        coverflowEffect: {
            type: Object,
            default: void 0
        },
        cubeEffect: {
            type: Object,
            default: void 0
        },
        fadeEffect: {
            type: Object,
            default: void 0
        },
        flipEffect: {
            type: Object,
            default: void 0
        },
        creativeEffect: {
            type: Object,
            default: void 0
        },
        cardsEffect: {
            type: Object,
            default: void 0
        },
        hashNavigation: {
            type: [Boolean, Object],
            default: void 0
        },
        history: {
            type: [Boolean, Object],
            default: void 0
        },
        keyboard: {
            type: [Boolean, Object],
            default: void 0
        },
        lazy: {
            type: [Boolean, Object],
            default: void 0
        },
        mousewheel: {
            type: [Boolean, Object],
            default: void 0
        },
        navigation: {
            type: [Boolean, Object],
            default: void 0
        },
        pagination: {
            type: [Boolean, Object],
            default: void 0
        },
        parallax: {
            type: [Boolean, Object],
            default: void 0
        },
        scrollbar: {
            type: [Boolean, Object],
            default: void 0
        },
        thumbs: {
            type: Object,
            default: void 0
        },
        virtual: {
            type: [Boolean, Object],
            default: void 0
        },
        zoom: {
            type: [Boolean, Object],
            default: void 0
        },
        grid: {
            type: [Object],
            default: void 0
        },
        freeMode: {
            type: [Boolean, Object],
            default: void 0
        },
        enabled: {
            type: Boolean,
            default: void 0
        }
    },
    emits: ["_beforeBreakpoint", "_containerClasses", "_slideClass", "_slideClasses", "_swiper", "_freeModeNoMomentumRelease", "activeIndexChange", "afterInit", "autoplay", "autoplayStart", "autoplayStop", "autoplayPause", "autoplayResume", "beforeDestroy", "beforeInit", "beforeLoopFix", "beforeResize", "beforeSlideChangeStart", "beforeTransitionStart", "breakpoint", "changeDirection", "click", "disable", "doubleTap", "doubleClick", "destroy", "enable", "fromEdge", "hashChange", "hashSet", "imagesReady", "init", "keyPress", "lazyImageLoad", "lazyImageReady", "lock", "loopFix", "momentumBounce", "navigationHide", "navigationShow", "navigationPrev", "navigationNext", "observerUpdate", "orientationchange", "paginationHide", "paginationRender", "paginationShow", "paginationUpdate", "progress", "reachBeginning", "reachEnd", "realIndexChange", "resize", "scroll", "scrollbarDragEnd", "scrollbarDragMove", "scrollbarDragStart", "setTransition", "setTranslate", "slideChange", "slideChangeTransitionEnd", "slideChangeTransitionStart", "slideNextTransitionEnd", "slideNextTransitionStart", "slidePrevTransitionEnd", "slidePrevTransitionStart", "slideResetTransitionStart", "slideResetTransitionEnd", "sliderMove", "sliderFirstMove", "slidesLengthChange", "slidesGridLengthChange", "snapGridLengthChange", "snapIndexChange", "swiper", "tap", "toEdge", "touchEnd", "touchMove", "touchMoveOpposite", "touchStart", "transitionEnd", "transitionStart", "unlock", "update", "virtualUpdate", "zoomChange"],
    setup(t, e) {
        let {slots: r, emit: n} = e;
        const {tag: i, wrapperTag: o} = t
          , s = ie("swiper")
          , a = ie(null)
          , l = ie(!1)
          , c = ie(!1)
          , u = ie(null)
          , f = ie(null)
          , d = ie(null)
          , h = {
            value: []
        }
          , x = {
            value: []
        }
          , y = ie(null)
          , m = ie(null)
          , E = ie(null)
          , g = ie(null)
          , {params: p, passedParams: v} = Q4(t, !1);
        Ym(r, h, x),
        d.value = v,
        x.value = h.value;
        const _ = () => {
            Ym(r, h, x),
            l.value = !0
        }
        ;
        if (p.onAny = function(C) {
            for (var w = arguments.length, T = new Array(w > 1 ? w - 1 : 0), A = 1; A < w; A++)
                T[A - 1] = arguments[A];
            n(C, ...T)
        }
        ,
        Object.assign(p.on, {
            _beforeBreakpoint: _,
            _containerClasses(C, w) {
                s.value = w
            }
        }),
        f.value = new gu(p),
        f.value.loopCreate = () => {}
        ,
        f.value.loopDestroy = () => {}
        ,
        p.loop && (f.value.loopedSlides = bM(h.value, p)),
        f.value.virtual && f.value.params.virtual.enabled) {
            f.value.virtual.slides = h.value;
            const C = {
                cache: !1,
                slides: h.value,
                renderExternal: w => {
                    a.value = w
                }
                ,
                renderExternalUpdate: !1
            };
            Xs(f.value.params.virtual, C),
            Xs(f.value.originalParams.virtual, C)
        }
        Gl( () => {
            !c.value && f.value && (f.value.emitSlidesClasses(),
            c.value = !0);
            const {passedParams: C} = Q4(t, !1)
              , w = f2e(C, d.value, h.value, x.value, T => T.props && T.props.key);
            d.value = C,
            (w.length || l.value) && f.value && !f.value.destroyed && d2e({
                swiper: f.value,
                slides: h.value,
                passedParams: C,
                changedParams: w,
                nextEl: y.value,
                prevEl: m.value,
                scrollbarEl: g.value,
                paginationEl: E.value
            }),
            l.value = !1
        }
        ),
        xi("swiper", f),
        me(a, () => {
            Xe( () => {
                x2e(f.value)
            }
            )
        }
        ),
        Ht( () => {
            u.value && (c2e({
                el: u.value,
                nextEl: y.value,
                prevEl: m.value,
                paginationEl: E.value,
                scrollbarEl: g.value,
                swiper: f.value
            }, p),
            n("swiper", f.value))
        }
        ),
        Zn( () => {
            f.value && !f.value.destroyed && f.value.destroy(!0, !1)
        }
        );
        function b(C) {
            return p.virtual ? h2e(f, C, a.value) : !p.loop || f.value && f.value.destroyed ? (C.forEach(w => {
                w.props || (w.props = {}),
                w.props.swiperRef = f
            }
            ),
            C) : u2e(f, C, p)
        }
        return () => {
            const {slides: C, slots: w} = Ym(r, h, x);
            return Or(i, {
                ref: u,
                class: EM(s.value)
            }, [w["container-start"], Or(o, {
                class: "swiper-wrapper"
            }, [w["wrapper-start"], b(C), w["wrapper-end"]]), mM(t) && [Or("div", {
                ref: m,
                class: "swiper-button-prev"
            }), Or("div", {
                ref: y,
                class: "swiper-button-next"
            })], yM(t) && Or("div", {
                ref: g,
                class: "swiper-scrollbar"
            }), vM(t) && Or("div", {
                ref: E,
                class: "swiper-pagination"
            }), w["container-end"]])
        }
    }
}
  , B5e = {
    name: "SwiperSlide",
    props: {
        tag: {
            type: String,
            default: "div"
        },
        swiperRef: {
            type: Object,
            required: !1
        },
        zoom: {
            type: Boolean,
            default: void 0
        },
        virtualIndex: {
            type: [String, Number],
            default: void 0
        }
    },
    setup(t, e) {
        let {slots: r} = e
          , n = !1;
        const {swiperRef: i} = t
          , o = ie(null)
          , s = ie("swiper-slide");
        function a(c, u, f) {
            u === o.value && (s.value = f)
        }
        Ht( () => {
            !i || !i.value || (i.value.on("_slideClass", a),
            n = !0)
        }
        ),
        Pp( () => {
            n || !i || !i.value || (i.value.on("_slideClass", a),
            n = !0)
        }
        ),
        Gl( () => {
            !o.value || !i || !i.value || i.value.destroyed && s.value !== "swiper-slide" && (s.value = "swiper-slide")
        }
        ),
        Zn( () => {
            !i || !i.value || i.value.off("_slideClass", a)
        }
        );
        const l = ae( () => ({
            isActive: s.value.indexOf("swiper-slide-active") >= 0 || s.value.indexOf("swiper-slide-duplicate-active") >= 0,
            isVisible: s.value.indexOf("swiper-slide-visible") >= 0,
            isDuplicate: s.value.indexOf("swiper-slide-duplicate") >= 0,
            isPrev: s.value.indexOf("swiper-slide-prev") >= 0 || s.value.indexOf("swiper-slide-duplicate-prev") >= 0,
            isNext: s.value.indexOf("swiper-slide-next") >= 0 || s.value.indexOf("swiper-slide-duplicate-next") >= 0
        }));
        return xi("swiperSlide", l),
        () => Or(t.tag, {
            class: EM(`${s.value}`),
            ref: o,
            "data-swiper-slide-index": t.virtualIndex
        }, t.zoom ? Or("div", {
            class: "swiper-zoom-container",
            "data-swiper-zoom": typeof t.zoom == "number" ? t.zoom : void 0
        }, r.default && r.default(l.value)) : r.default && r.default(l.value))
    }
};
var _e = {
    pullStartY: null,
    pullMoveY: null,
    handlers: [],
    styleEl: null,
    events: null,
    dist: 0,
    state: "pending",
    timeout: null,
    distResisted: 0,
    supportsPassive: !1,
    supportsPointerEvents: typeof window < "u" && !!window.PointerEvent
};
try {
    window.addEventListener("test", null, {
        get passive() {
            _e.supportsPassive = !0
        }
    })
} catch {}
function p2e(t) {
    if (!t.ptrElement) {
        var e = document.createElement("div");
        t.mainElement !== document.body ? t.mainElement.parentNode.insertBefore(e, t.mainElement) : document.body.insertBefore(e, document.body.firstChild),
        e.classList.add(t.classPrefix + "ptr"),
        e.innerHTML = t.getMarkup().replace(/__PREFIX__/g, t.classPrefix),
        t.ptrElement = e,
        typeof t.onInit == "function" && t.onInit(t),
        _e.styleEl || (_e.styleEl = document.createElement("style"),
        _e.styleEl.setAttribute("id", "pull-to-refresh-js-style"),
        document.head.appendChild(_e.styleEl)),
        _e.styleEl.textContent = t.getStyles().replace(/__PREFIX__/g, t.classPrefix).replace(/\s+/g, " ")
    }
    return t
}
function g2e(t) {
    t.ptrElement && (t.ptrElement.classList.remove(t.classPrefix + "refresh"),
    t.ptrElement.style[t.cssProp] = "0px",
    setTimeout(function() {
        t.ptrElement && t.ptrElement.parentNode && (t.ptrElement.parentNode.removeChild(t.ptrElement),
        t.ptrElement = null),
        _e.state = "pending"
    }, t.refreshTimeout))
}
function m2e(t) {
    var e = t.ptrElement.querySelector("." + t.classPrefix + "icon")
      , r = t.ptrElement.querySelector("." + t.classPrefix + "text");
    e && (_e.state === "refreshing" ? e.innerHTML = t.iconRefreshing : e.innerHTML = t.iconArrow),
    r && (_e.state === "releasing" && (r.innerHTML = t.instructionsReleaseToRefresh),
    (_e.state === "pulling" || _e.state === "pending") && (r.innerHTML = t.instructionsPullToRefresh),
    _e.state === "refreshing" && (r.innerHTML = t.instructionsRefreshing))
}
var Un = {
    setupDOM: p2e,
    onReset: g2e,
    update: m2e
}, e6, Xm = function(e) {
    return _e.pointerEventsEnabled && _e.supportsPointerEvents ? e.screenY : e.touches[0].screenY
}, CM = function() {
    var t;
    function e(s) {
        var a = _e.handlers.filter(function(l) {
            return l.contains(s.target)
        })[0];
        _e.enable = !!a,
        a && _e.state === "pending" && (t = Un.setupDOM(a),
        a.shouldPullToRefresh() && (_e.pullStartY = Xm(s)),
        clearTimeout(_e.timeout),
        Un.update(a))
    }
    function r(s) {
        if (t && t.ptrElement && _e.enable) {
            if (_e.pullStartY ? _e.pullMoveY = Xm(s) : t.shouldPullToRefresh() && (_e.pullStartY = Xm(s)),
            _e.state === "refreshing") {
                s.cancelable && t.shouldPullToRefresh() && _e.pullStartY < _e.pullMoveY && s.preventDefault();
                return
            }
            _e.state === "pending" && (t.ptrElement.classList.add(t.classPrefix + "pull"),
            _e.state = "pulling",
            Un.update(t)),
            _e.pullStartY && _e.pullMoveY && (_e.dist = _e.pullMoveY - _e.pullStartY),
            _e.distExtra = _e.dist - t.distIgnore,
            _e.distExtra > 0 && (s.cancelable && s.preventDefault(),
            t.ptrElement.style[t.cssProp] = _e.distResisted + "px",
            _e.distResisted = t.resistanceFunction(_e.distExtra / t.distThreshold) * Math.min(t.distMax, _e.distExtra),
            _e.state === "pulling" && _e.distResisted > t.distThreshold && (t.ptrElement.classList.add(t.classPrefix + "release"),
            _e.state = "releasing",
            Un.update(t)),
            _e.state === "releasing" && _e.distResisted < t.distThreshold && (t.ptrElement.classList.remove(t.classPrefix + "release"),
            _e.state = "pulling",
            Un.update(t)))
        }
    }
    function n() {
        if (t && t.ptrElement && _e.enable) {
            if (clearTimeout(e6),
            e6 = setTimeout(function() {
                t && t.ptrElement && _e.state === "pending" && Un.onReset(t)
            }, 500),
            _e.state === "releasing" && _e.distResisted > t.distThreshold)
                _e.state = "refreshing",
                t.ptrElement.style[t.cssProp] = t.distReload + "px",
                t.ptrElement.classList.add(t.classPrefix + "refresh"),
                _e.timeout = setTimeout(function() {
                    var s = t.onRefresh(function() {
                        return Un.onReset(t)
                    });
                    s && typeof s.then == "function" && s.then(function() {
                        return Un.onReset(t)
                    }),
                    !s && !t.onRefresh.length && Un.onReset(t)
                }, t.refreshTimeout);
            else {
                if (_e.state === "refreshing")
                    return;
                t.ptrElement.style[t.cssProp] = "0px",
                _e.state = "pending"
            }
            Un.update(t),
            t.ptrElement.classList.remove(t.classPrefix + "release"),
            t.ptrElement.classList.remove(t.classPrefix + "pull"),
            _e.pullStartY = _e.pullMoveY = null,
            _e.dist = _e.distResisted = 0
        }
    }
    function i() {
        t && t.mainElement.classList.toggle(t.classPrefix + "top", t.shouldPullToRefresh())
    }
    var o = _e.supportsPassive ? {
        passive: _e.passive || !1
    } : void 0;
    return _e.pointerEventsEnabled && _e.supportsPointerEvents ? (window.addEventListener("pointerup", n),
    window.addEventListener("pointerdown", e),
    window.addEventListener("pointermove", r, o)) : (window.addEventListener("touchend", n),
    window.addEventListener("touchstart", e),
    window.addEventListener("touchmove", r, o)),
    window.addEventListener("scroll", i),
    {
        onTouchEnd: n,
        onTouchStart: e,
        onTouchMove: r,
        onScroll: i,
        destroy: function() {
            _e.pointerEventsEnabled && _e.supportsPointerEvents ? (window.removeEventListener("pointerdown", e),
            window.removeEventListener("pointerup", n),
            window.removeEventListener("pointermove", r, o)) : (window.removeEventListener("touchstart", e),
            window.removeEventListener("touchend", n),
            window.removeEventListener("touchmove", r, o)),
            window.removeEventListener("scroll", i)
        }
    }
}, v2e = `
<div class="__PREFIX__box">
  <div class="__PREFIX__content">
    <div class="__PREFIX__icon"></div>
    <div class="__PREFIX__text"></div>
  </div>
</div>
`, y2e = `
.__PREFIX__ptr {
  box-shadow: inset 0 -3px 5px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  font-size: 0.85em;
  font-weight: bold;
  top: 0;
  height: 0;
  transition: height 0.3s, min-height 0.3s;
  text-align: center;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  align-content: stretch;
}

.__PREFIX__box {
  padding: 10px;
  flex-basis: 100%;
}

.__PREFIX__pull {
  transition: none;
}

.__PREFIX__text {
  margin-top: .33em;
  color: rgba(0, 0, 0, 0.3);
}

.__PREFIX__icon {
  color: rgba(0, 0, 0, 0.3);
  transition: transform .3s;
}

/*
When at the top of the page, disable vertical overscroll so passive touch
listeners can take over.
*/
.__PREFIX__top {
  touch-action: pan-x pan-down pinch-zoom;
}

.__PREFIX__release .__PREFIX__icon {
  transform: rotate(180deg);
}
`, Km = {
    distThreshold: 60,
    distMax: 80,
    distReload: 50,
    distIgnore: 0,
    mainElement: "body",
    triggerElement: "body",
    ptrElement: ".ptr",
    classPrefix: "ptr--",
    cssProp: "min-height",
    iconArrow: "&#8675;",
    iconRefreshing: "&hellip;",
    instructionsPullToRefresh: "Pull down to refresh",
    instructionsReleaseToRefresh: "Release to refresh",
    instructionsRefreshing: "Refreshing",
    refreshTimeout: 500,
    getMarkup: function() {
        return v2e
    },
    getStyles: function() {
        return y2e
    },
    onInit: function() {},
    onRefresh: function() {
        return location.reload()
    },
    resistanceFunction: function(t) {
        return Math.min(1, t / 2.5)
    },
    shouldPullToRefresh: function() {
        return !window.scrollY
    }
}, E2e = ["mainElement", "ptrElement", "triggerElement"], t6 = function(t) {
    var e = {};
    return Object.keys(Km).forEach(function(r) {
        e[r] = t[r] || Km[r]
    }),
    e.refreshTimeout = typeof t.refreshTimeout == "number" ? t.refreshTimeout : Km.refreshTimeout,
    E2e.forEach(function(r) {
        typeof e[r] == "string" && (e[r] = document.querySelector(e[r]))
    }),
    _e.events || (_e.events = CM()),
    e.contains = function(r) {
        return e.triggerElement.contains(r)
    }
    ,
    e.destroy = function() {
        clearTimeout(_e.timeout);
        var r = _e.handlers.indexOf(e);
        _e.handlers.splice(r, 1)
    }
    ,
    e
}, _2e = {
    setPassiveMode: function(e) {
        _e.passive = e
    },
    setPointerEventsMode: function(e) {
        _e.pointerEventsEnabled = e
    },
    destroyAll: function() {
        _e.events && (_e.events.destroy(),
        _e.events = null),
        _e.handlers.forEach(function(e) {
            e.destroy()
        })
    },
    init: function(e) {
        e === void 0 && (e = {});
        var r = t6(e);
        return _e.handlers.push(r),
        r
    },
    _: {
        setupHandler: t6,
        setupEvents: CM,
        setupDOM: Un.setupDOM,
        onReset: Un.onReset,
        update: Un.update
    }
};
const S5e = _2e;
var AM = !1;
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var Bn = function() {
    return Bn = Object.assign || function(t) {
        for (var e, r = 1, n = arguments.length; r < n; r++)
            for (var i in e = arguments[r])
                Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
        return t
    }
    ,
    Bn.apply(this, arguments)
};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var zE = function(t, e) {
    return zE = Object.setPrototypeOf || {
        __proto__: []
    }instanceof Array && function(r, n) {
        r.__proto__ = n
    }
    || function(r, n) {
        for (var i in n)
            Object.prototype.hasOwnProperty.call(n, i) && (r[i] = n[i])
    }
    ,
    zE(t, e)
};
function BC(t, e) {
    if (typeof e != "function" && e !== null)
        throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
    function r() {
        this.constructor = t
    }
    zE(t, e),
    t.prototype = e === null ? Object.create(e) : (r.prototype = e.prototype,
    new r)
}
var ls = function() {
    return ls = Object.assign || function(t) {
        for (var e, r = 1, n = arguments.length; r < n; r++)
            for (var i in e = arguments[r])
                Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
        return t
    }
    ,
    ls.apply(this, arguments)
};
function cs(t, e, r, n) {
    return new (r || (r = Promise))(function(i, o) {
        function s(c) {
            try {
                l(n.next(c))
            } catch (u) {
                o(u)
            }
        }
        function a(c) {
            try {
                l(n.throw(c))
            } catch (u) {
                o(u)
            }
        }
        function l(c) {
            var u;
            c.done ? i(c.value) : (u = c.value,
            u instanceof r ? u : new r(function(f) {
                f(u)
            }
            )).then(s, a)
        }
        l((n = n.apply(t, e || [])).next())
    }
    )
}
function us(t, e) {
    var r, n, i, o, s = {
        label: 0,
        sent: function() {
            if (1 & i[0])
                throw i[1];
            return i[1]
        },
        trys: [],
        ops: []
    };
    return o = {
        next: a(0),
        throw: a(1),
        return: a(2)
    },
    typeof Symbol == "function" && (o[Symbol.iterator] = function() {
        return this
    }
    ),
    o;
    function a(l) {
        return function(c) {
            return function(u) {
                if (r)
                    throw new TypeError("Generator is already executing.");
                for (; s; )
                    try {
                        if (r = 1,
                        n && (i = 2 & u[0] ? n.return : u[0] ? n.throw || ((i = n.return) && i.call(n),
                        0) : n.next) && !(i = i.call(n, u[1])).done)
                            return i;
                        switch (n = 0,
                        i && (u = [2 & u[0], i.value]),
                        u[0]) {
                        case 0:
                        case 1:
                            i = u;
                            break;
                        case 4:
                            return s.label++,
                            {
                                value: u[1],
                                done: !1
                            };
                        case 5:
                            s.label++,
                            n = u[1],
                            u = [0];
                            continue;
                        case 7:
                            u = s.ops.pop(),
                            s.trys.pop();
                            continue;
                        default:
                            if (!((i = (i = s.trys).length > 0 && i[i.length - 1]) || u[0] !== 6 && u[0] !== 2)) {
                                s = 0;
                                continue
                            }
                            if (u[0] === 3 && (!i || u[1] > i[0] && u[1] < i[3])) {
                                s.label = u[1];
                                break
                            }
                            if (u[0] === 6 && s.label < i[1]) {
                                s.label = i[1],
                                i = u;
                                break
                            }
                            if (i && s.label < i[2]) {
                                s.label = i[2],
                                s.ops.push(u);
                                break
                            }
                            i[2] && s.ops.pop(),
                            s.trys.pop();
                            continue
                        }
                        u = e.call(t, s)
                    } catch (f) {
                        u = [6, f],
                        n = 0
                    } finally {
                        r = i = 0
                    }
                if (5 & u[0])
                    throw u[1];
                return {
                    value: u[0] ? u[1] : void 0,
                    done: !0
                }
            }([l, c])
        }
    }
}
function Dc(t, e) {
    for (var r = 0, n = e.length, i = t.length; r < n; r++,
    i++)
        t[i] = e[r];
    return t
}
Array.prototype.includes || Object.defineProperty(Array.prototype, "includes", {
    value: function(t, e) {
        if (this == null)
            throw new TypeError('"this" is null or not defined');
        var r = Object(this)
          , n = r.length >>> 0;
        if (n === 0)
            return !1;
        for (var i, o, s = 0 | e, a = Math.max(s >= 0 ? s : n - Math.abs(s), 0); a < n; ) {
            if ((i = r[a]) === (o = t) || typeof i == "number" && typeof o == "number" && isNaN(i) && isNaN(o))
                return !0;
            a++
        }
        return !1
    }
}),
String.prototype.includes || (String.prototype.includes = function(t, e) {
    return typeof e != "number" && (e = 0),
    !(e + t.length > this.length) && this.indexOf(t, e) !== -1
}
),
Array.prototype.find || Object.defineProperty(Array.prototype, "find", {
    value: function(t) {
        if (this == null)
            throw new TypeError('"this" is null or not defined');
        var e = Object(this)
          , r = e.length >>> 0;
        if (typeof t != "function")
            throw new TypeError("predicate must be a function");
        for (var n = arguments[1], i = 0; i < r; ) {
            var o = e[i];
            if (t.call(n, o, i, e))
                return o;
            i++
        }
    }
});
var Lf = function(t) {
    for (var e = [], r = 1; r < arguments.length; r++)
        e[r - 1] = arguments[r];
    return e.some(function(n) {
        return Object.prototype.toString.call(t).slice(8, -1).toLowerCase() === n
    })
}
  , mu = function(t, e) {
    return Object.prototype.hasOwnProperty.call(t, e)
}
  , SC = function(t) {
    return [].filter.call(t, function(e) {
        return e !== `
`
    }).join("")
}
  , Ks = function(t) {
    if (typeof t != "string" || (t = t.toLocaleLowerCase().trim()) === "transparent")
        return !1;
    var e;
    return !(/^rgba/.test(t) && ((e = /([^\s,]+)\)$/.exec(t)) === null ? 0 : typeof e == "object" ? NaN : typeof e == "number" ? e : typeof e == "string" ? e[e.length - 1] === "%" ? Number(e.slice(0, -1)) / 100 : Number(e) : NaN) === 0)
}
  , wM = function(t, e) {
    var r, n = ((r = t.padding) === null || r === void 0 ? void 0 : r.split(" ").map(function(u) {
        return e(u)
    })) || [0], i = 0, o = 0, s = 0, a = 0;
    switch (n.length) {
    case 1:
        i = o = s = a = n[0];
        break;
    case 2:
        i = o = n[0],
        s = a = n[1];
        break;
    case 3:
        i = n[0],
        s = a = n[1],
        o = n[2];
        break;
    default:
        i = n[0],
        o = n[1],
        s = n[2],
        a = n[3]
    }
    var l = {
        paddingTop: i,
        paddingBottom: o,
        paddingLeft: s,
        paddingRight: a
    };
    for (var c in l)
        l[c] = mu(t, c) && Lf(t[c], "string", "number") ? e(t[c]) : l[c];
    return [i, o, s, a]
}
  , BM = function(t) {
    var e = []
      , r = t.map(function(i) {
        return Number(i)
    }).reduce(function(i, o) {
        if (o > 0) {
            var s = i + o;
            return e.push(s),
            s
        }
        return e.push(NaN),
        i
    }, 0)
      , n = Math.random() * r;
    return e.findIndex(function(i) {
        return n <= i
    })
}
  , TC = function(t, e, r, n) {
    n === void 0 && (n = 1 / 0),
    n <= 0 && (n = 1 / 0);
    for (var i = "", o = [], s = t.measureText("...").width, a = 0; a < e.length; a++) {
        i += e[a];
        var l = t.measureText(i).width
          , c = r(o);
        if (n === o.length + 1 && (l += s),
        c < 0)
            return o;
        if (l > c && (o.push(i.slice(0, -1)),
        i = e[a]),
        n === o.length)
            return o[o.length - 1] += "...",
            o
    }
    return i && o.push(i),
    o.length || o.push(e),
    o
}
  , rl = function() {
    function t() {
        this.subs = []
    }
    return t.prototype.addSub = function(e) {
        this.subs.includes(e) || this.subs.push(e)
    }
    ,
    t.prototype.notify = function() {
        this.subs.forEach(function(e) {
            e.update()
        })
    }
    ,
    t
}()
  , b2e = "__proto__"in {};
function r6(t, e, r, n) {
    Object.defineProperty(t, e, {
        value: r,
        enumerable: !!n,
        writable: !0,
        configurable: !0
    })
}
var SM = Array.prototype
  , ax = Object.create(SM);
["push", "pop", "shift", "unshift", "sort", "splice", "reverse"].forEach(function(t) {
    ax[t] = function() {
        for (var e = [], r = 0; r < arguments.length; r++)
            e[r] = arguments[r];
        var n = SM[t].apply(this, e)
          , i = this.__luckyOb__;
        return ["push", "unshift", "splice"].includes(t) && i.walk(this),
        i.dep.notify(),
        n
    }
});
var C2e = function() {
    function t(e) {
        this.dep = new rl,
        r6(e, "__luckyOb__", this),
        Array.isArray(e) && (b2e ? e.__proto__ = ax : Object.getOwnPropertyNames(ax).forEach(function(r) {
            r6(e, r, ax[r])
        })),
        this.walk(e)
    }
    return t.prototype.walk = function(e) {
        Object.keys(e).forEach(function(r) {
            TM(e, r, e[r])
        })
    }
    ,
    t
}();
function n6(t) {
    if (t && typeof t == "object")
        return "__luckyOb__"in t ? t.__luckyOb__ : new C2e(t)
}
function TM(t, e, r) {
    var n = new rl
      , i = Object.getOwnPropertyDescriptor(t, e);
    if (!i || i.configurable !== !1) {
        var o = i && i.get
          , s = i && i.set;
        o && !s || arguments.length !== 2 || (r = t[e]);
        var a = n6(r);
        Object.defineProperty(t, e, {
            get: function() {
                var l = o ? o.call(t) : r;
                return rl.target && (n.addSub(rl.target),
                a && a.dep.addSub(rl.target)),
                l
            },
            set: function(l) {
                l !== r && (r = l,
                o && !s || (s ? s.call(t, l) : r = l,
                a = n6(l),
                n.notify()))
            }
        })
    }
}
var A2e = 0
  , w2e = function() {
    function t(e, r, n, i) {
        i === void 0 && (i = {}),
        this.id = A2e++,
        this.$lucky = e,
        this.expr = r,
        this.deep = !!i.deep,
        this.getter = typeof r == "function" ? r : function(o) {
            o += ".";
            for (var s = [], a = "", l = 0; l < o.length; l++) {
                var c = o[l];
                if (/\[|\./.test(c))
                    s.push(a),
                    a = "";
                else {
                    if (/\W/.test(c))
                        continue;
                    a += c
                }
            }
            return function(u) {
                return s.reduce(function(f, d) {
                    return f[d]
                }, u)
            }
        }(r),
        this.cb = n,
        this.value = this.get()
    }
    return t.prototype.get = function() {
        rl.target = this;
        var e = this.getter.call(this.$lucky, this.$lucky);
        return this.deep && function(r) {
            var n = function(i) {
                Lf(i, "array", "object") && Object.keys(i).forEach(function(o) {
                    var s = i[o];
                    n(s)
                })
            };
            n(r)
        }(e),
        rl.target = null,
        e
    }
    ,
    t.prototype.update = function() {
        var e = this.get()
          , r = this.value;
        this.value = e,
        this.cb.call(this.$lucky, e, r)
    }
    ,
    t
}()
  , DC = function() {
    function t(e, r) {
        var n = this;
        this.version = "1.7.21",
        this.htmlFontSize = 16,
        this.rAF = function() {}
        ,
        this.boxWidth = 0,
        this.boxHeight = 0,
        typeof e == "string" ? e = {
            el: e
        } : e.nodeType === 1 && (e = {
            el: "",
            divElement: e
        }),
        e = e,
        this.config = e,
        this.data = r,
        e.flag || (e.flag = "WEB"),
        e.el && (e.divElement = document.querySelector(e.el)),
        e.divElement && (e.canvasElement = document.createElement("canvas"),
        e.divElement.appendChild(e.canvasElement)),
        e.canvasElement && (e.ctx = e.canvasElement.getContext("2d"),
        e.canvasElement.setAttribute("package", "lucky-canvas@1.7.21"),
        e.canvasElement.addEventListener("click", function(i) {
            return n.handleClick(i)
        })),
        this.ctx = e.ctx,
        this.initWindowFunction(),
        this.config.ctx || console.error("无法获取到 CanvasContext2D"),
        window && typeof window.addEventListener == "function" && window.addEventListener("resize", function(i, o) {
            o === void 0 && (o = 300);
            var s = null;
            return function() {
                for (var a = this, l = [], c = 0; c < arguments.length; c++)
                    l[c] = arguments[c];
                s || (s = setTimeout(function() {
                    i.apply(a, l),
                    clearTimeout(s),
                    s = null
                }, o))
            }
        }(function() {
            return n.resize()
        }, 300)),
        window && typeof window.MutationObserver == "function" && new window.MutationObserver(function() {
            n.resize()
        }
        ).observe(document.documentElement, {
            attributes: !0
        })
    }
    return t.prototype.resize = function() {
        var e, r;
        (r = (e = this.config).beforeResize) === null || r === void 0 || r.call(e),
        this.setHTMLFontSize(),
        this.setDpr(),
        this.resetWidthAndHeight(),
        this.zoomCanvas()
    }
    ,
    t.prototype.initLucky = function() {
        if (this.resize(),
        !this.boxWidth || !this.boxHeight)
            return console.error("无法获取到宽度或高度")
    }
    ,
    t.prototype.handleClick = function(e) {}
    ,
    t.prototype.setHTMLFontSize = function() {
        window && (this.htmlFontSize = +window.getComputedStyle(document.documentElement).fontSize.slice(0, -2))
    }
    ,
    t.prototype.clearCanvas = function() {
        var e = [this.boxWidth, this.boxHeight]
          , r = e[0]
          , n = e[1];
        this.ctx.clearRect(-r, -n, 2 * r, 2 * n)
    }
    ,
    t.prototype.setDpr = function() {
        var e = this.config;
        e.dpr || (window ? window.dpr = e.dpr = window.devicePixelRatio || 1 : e.dpr || console.error(e, "未传入 dpr 可能会导致绘制异常"))
    }
    ,
    t.prototype.resetWidthAndHeight = function() {
        var e = this.config
          , r = this.data
          , n = 0
          , i = 0;
        e.divElement && (n = e.divElement.offsetWidth,
        i = e.divElement.offsetHeight),
        this.boxWidth = this.getLength(r.width || e.width) || n,
        this.boxHeight = this.getLength(r.height || e.height) || i,
        e.divElement && (e.divElement.style.overflow = "hidden",
        e.divElement.style.width = this.boxWidth + "px",
        e.divElement.style.height = this.boxHeight + "px")
    }
    ,
    t.prototype.zoomCanvas = function() {
        var e = this.config
          , r = this.ctx
          , n = e.canvasElement
          , i = e.dpr
          , o = [this.boxWidth * i, this.boxHeight * i]
          , s = o[0]
          , a = o[1];
        n && (n.width = s,
        n.height = a,
        n.style.width = s + "px",
        n.style.height = a + "px",
        n.style["transform-origin"] = "left top",
        n.style.transform = "scale(" + 1 / i + ")",
        r.scale(i, i))
    }
    ,
    t.prototype.initWindowFunction = function() {
        var e = this.config;
        if (window)
            return this.rAF = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(n) {
                window.setTimeout(n, 1e3 / 60)
            }
            ,
            e.setTimeout = window.setTimeout,
            e.setInterval = window.setInterval,
            e.clearTimeout = window.clearTimeout,
            void (e.clearInterval = window.clearInterval);
        if (e.rAF)
            this.rAF = e.rAF;
        else if (e.setTimeout) {
            var r = e.setTimeout;
            this.rAF = function(n) {
                return r(n, 16.7)
            }
        } else
            this.rAF = function(n) {
                return setTimeout(n, 16.7)
            }
    }
    ,
    t.prototype.loadImg = function(e, r, n) {
        var i = this;
        return n === void 0 && (n = "$resolve"),
        new Promise(function(o, s) {
            if (e || s("=> '" + r.src + "' 不能为空或不合法"),
            i.config.flag !== "WEB")
                return r[n] = o,
                void (r.$reject = s);
            var a = new Image;
            a.onload = function() {
                return o(a)
            }
            ,
            a.onerror = function() {
                return s("=> '" + r.src + "' 图片加载失败")
            }
            ,
            a.src = e
        }
        )
    }
    ,
    t.prototype.drawImage = function(e, r) {
        for (var n, i = [], o = 2; o < arguments.length; o++)
            i[o - 2] = arguments[o];
        var s = this.config
          , a = s.flag
          , l = s.dpr;
        if (["WEB", "MP-WX"].includes(a))
            n = r;
        else {
            if (!["UNI-H5", "UNI-MP", "TARO-H5", "TARO-MP"].includes(a))
                return console.error("意料之外的 flag, 该平台尚未兼容!");
            n = r.path
        }
        if (!n.canvas)
            return i.length === 8 && (i = i.map(function(f, d) {
                return d < 4 ? f * l : f
            })),
            e.drawImage.apply(e, Dc([n], i));
        var c = n.canvas.getContext("2d");
        i = i.map(function(f) {
            return f * l
        });
        var u = c.getImageData.apply(c, i.slice(0, 4));
        e.putImageData.apply(e, Dc([u], i.slice(4, 6)))
    }
    ,
    t.prototype.computedWidthAndHeight = function(e, r, n, i) {
        if (!r.width && !r.height)
            return [e.width, e.height];
        if (r.width && !r.height) {
            var o = this.getLength(r.width, n);
            return [o, e.height * (o / e.width)]
        }
        if (!r.width && r.height) {
            var s = this.getLength(r.height, i);
            return [e.width * (s / e.height), s]
        }
        return [this.getLength(r.width, n), this.getLength(r.height, i)]
    }
    ,
    t.prototype.changeUnits = function(e, r) {
        var n = this;
        r === void 0 && (r = 1);
        var i = this.config;
        return Number(e.replace(/^([-]*[0-9.]*)([a-z%]*)$/, function(o, s, a) {
            var l = {
                "%": function(u) {
                    return u * (r / 100)
                },
                px: function(u) {
                    return 1 * u
                },
                rem: function(u) {
                    return u * n.htmlFontSize
                },
                vw: function(u) {
                    return u / 100 * window.innerWidth
                }
            }[a];
            if (l)
                return l(s);
            var c = i.handleCssUnit || i.unitFunc;
            return c ? c(s, a) : s
        }))
    }
    ,
    t.prototype.getLength = function(e, r) {
        return Lf(e, "number") ? e : Lf(e, "string") ? this.changeUnits(e, r) : 0
    }
    ,
    t.prototype.getOffsetX = function(e, r) {
        return r === void 0 && (r = 0),
        (r - e) / 2
    }
    ,
    t.prototype.getOffscreenCanvas = function(e, r) {
        if (!mu(this, "_offscreenCanvas") && (window && window.document && this.config.flag === "WEB" ? this._offscreenCanvas = document.createElement("canvas") : this._offscreenCanvas = this.config.offscreenCanvas,
        !this._offscreenCanvas))
            return console.error("离屏 Canvas 无法渲染!");
        var n = this.config.dpr
          , i = this._offscreenCanvas;
        i.width = (e || 300) * n,
        i.height = (r || 150) * n;
        var o = i.getContext("2d");
        return o.clearRect(0, 0, e, r),
        o.scale(n, n),
        o.dpr = n,
        {
            _offscreenCanvas: i,
            _ctx: o
        }
    }
    ,
    t.prototype.$set = function(e, r, n) {
        e && typeof e == "object" && TM(e, r, n)
    }
    ,
    t.prototype.$computed = function(e, r, n) {
        var i = this;
        Object.defineProperty(e, r, {
            get: function() {
                return n.call(i)
            }
        })
    }
    ,
    t.prototype.$watch = function(e, r, n) {
        n === void 0 && (n = {}),
        typeof r == "object" && (r = (n = r).handler);
        var i = new w2e(this,e,r,n);
        return n.immediate && r.call(this, i.value),
        function() {}
    }
    ,
    t.version = "1.7.21",
    t
}()
  , ka = function(t) {
    return Math.PI / 180 * t
}
  , np = function(t) {
    for (var e = [], r = 1; r < arguments.length; r++)
        e[r - 1] = arguments[r];
    var n = e[0]
      , i = e[1]
      , o = e[2]
      , s = e[3]
      , a = e[4]
      , l = Math.min(o, s)
      , c = Math.PI;
    a > l / 2 && (a = l / 2),
    t.beginPath(),
    t.moveTo(n + a, i),
    t.lineTo(n + a, i),
    t.lineTo(n + o - a, i),
    t.arc(n + o - a, i + a, a, -c / 2, 0),
    t.lineTo(n + o, i + s - a),
    t.arc(n + o - a, i + s - a, a, 0, c / 2),
    t.lineTo(n + a, i + s),
    t.arc(n + a, i + s - a, a, c / 2, c),
    t.lineTo(n, i + a),
    t.arc(n + a, i + a, a, c, -c / 2),
    t.closePath()
}
  , FC = function(t, e, r, n) {
    return t >= n && (t = n),
    r * (t /= n) * t + e
}
  , vu = function(t, e, r, n) {
    return t >= n && (t = n),
    -r * (t /= n) * (t - 2) + e
}
  , B2e = function(t) {
    function e(r, n) {
        var i, o = t.call(this, r, {
            width: n.width,
            height: n.height
        }) || this;
        return o.blocks = [],
        o.prizes = [],
        o.buttons = [],
        o.defaultConfig = {},
        o.defaultStyle = {},
        o._defaultConfig = {},
        o._defaultStyle = {},
        o.Radius = 0,
        o.prizeRadius = 0,
        o.prizeDeg = 0,
        o.prizeAng = 0,
        o.rotateDeg = 0,
        o.maxBtnRadius = 0,
        o.startTime = 0,
        o.endTime = 0,
        o.stopDeg = 0,
        o.endDeg = 0,
        o.FPS = 16.6,
        o.step = 0,
        o.ImageCache = new Map,
        o.initData(n),
        o.initWatch(),
        o.initComputed(),
        (i = r.beforeCreate) === null || i === void 0 || i.call(o),
        o.init(),
        o
    }
    return BC(e, t),
    e.prototype.resize = function() {
        var r, n;
        t.prototype.resize.call(this),
        this.Radius = Math.min(this.boxWidth, this.boxHeight) / 2,
        this.ctx.translate(this.Radius, this.Radius),
        this.draw(),
        (n = (r = this.config).afterResize) === null || n === void 0 || n.call(r)
    }
    ,
    e.prototype.initLucky = function() {
        this.Radius = 0,
        this.prizeRadius = 0,
        this.prizeDeg = 0,
        this.prizeAng = 0,
        this.rotateDeg = 0,
        this.maxBtnRadius = 0,
        this.startTime = 0,
        this.endTime = 0,
        this.stopDeg = 0,
        this.endDeg = 0,
        this.FPS = 16.6,
        this.prizeFlag = -1,
        this.step = 0,
        t.prototype.initLucky.call(this)
    }
    ,
    e.prototype.initData = function(r) {
        this.$set(this, "width", r.width || "300px"),
        this.$set(this, "height", r.height || "300px"),
        this.$set(this, "blocks", r.blocks || []),
        this.$set(this, "prizes", r.prizes || []),
        this.$set(this, "buttons", r.buttons || []),
        this.$set(this, "defaultConfig", r.defaultConfig || {}),
        this.$set(this, "defaultStyle", r.defaultStyle || {}),
        this.$set(this, "startCallback", r.start),
        this.$set(this, "endCallback", r.end)
    }
    ,
    e.prototype.initComputed = function() {
        var r = this;
        this.$computed(this, "_defaultConfig", function() {
            return ls({
                gutter: "0px",
                offsetDegree: 0,
                speed: 20,
                speedFunction: "quad",
                accelerationTime: 2500,
                decelerationTime: 2500,
                stopRange: 0
            }, r.defaultConfig)
        }),
        this.$computed(this, "_defaultStyle", function() {
            return ls({
                fontSize: "18px",
                fontColor: "#000",
                fontStyle: "sans-serif",
                fontWeight: "400",
                background: "rgba(0,0,0,0)",
                wordWrap: !0,
                lengthLimit: "90%"
            }, r.defaultStyle)
        })
    }
    ,
    e.prototype.initWatch = function() {
        var r = this;
        this.$watch("width", function(n) {
            r.data.width = n,
            r.resize()
        }),
        this.$watch("height", function(n) {
            r.data.height = n,
            r.resize()
        }),
        this.$watch("blocks", function(n) {
            r.initImageCache()
        }, {
            deep: !0
        }),
        this.$watch("prizes", function(n) {
            r.initImageCache()
        }, {
            deep: !0
        }),
        this.$watch("buttons", function(n) {
            r.initImageCache()
        }, {
            deep: !0
        }),
        this.$watch("defaultConfig", function() {
            return r.draw()
        }, {
            deep: !0
        }),
        this.$watch("defaultStyle", function() {
            return r.draw()
        }, {
            deep: !0
        }),
        this.$watch("startCallback", function() {
            return r.init()
        }),
        this.$watch("endCallback", function() {
            return r.init()
        })
    }
    ,
    e.prototype.init = function() {
        var r, n;
        return cs(this, void 0, void 0, function() {
            var i;
            return us(this, function(o) {
                switch (o.label) {
                case 0:
                    return this.initLucky(),
                    i = this.config,
                    (r = i.beforeInit) === null || r === void 0 || r.call(this),
                    this.draw(),
                    this.draw(),
                    [4, this.initImageCache()];
                case 1:
                    return o.sent(),
                    (n = i.afterInit) === null || n === void 0 || n.call(this),
                    [2]
                }
            })
        })
    }
    ,
    e.prototype.initImageCache = function() {
        var r = this;
        return new Promise(function(n) {
            var i = {
                blocks: r.blocks.map(function(o) {
                    return o.imgs
                }),
                prizes: r.prizes.map(function(o) {
                    return o.imgs
                }),
                buttons: r.buttons.map(function(o) {
                    return o.imgs
                })
            };
            Object.keys(i).forEach(function(o) {
                var s = i[o]
                  , a = [];
                s && s.forEach(function(l, c) {
                    l && l.forEach(function(u, f) {
                        a.push(r.loadAndCacheImg(o, c, f))
                    })
                }),
                Promise.all(a).then(function() {
                    r.draw(),
                    n()
                })
            })
        }
        )
    }
    ,
    e.prototype.handleClick = function(r) {
        var n, i = this.ctx;
        i.beginPath(),
        i.arc(0, 0, this.maxBtnRadius, 0, 2 * Math.PI, !1),
        i.isPointInPath(r.offsetX, r.offsetY) && this.step === 0 && ((n = this.startCallback) === null || n === void 0 || n.call(this, r))
    }
    ,
    e.prototype.loadAndCacheImg = function(r, n, i) {
        return cs(this, void 0, void 0, function() {
            var o = this;
            return us(this, function(s) {
                return [2, new Promise(function(a, l) {
                    var c = o[r][n];
                    if (c && c.imgs) {
                        var u = c.imgs[i];
                        u && o.loadImg(u.src, u).then(function(f) {
                            return cs(o, void 0, void 0, function() {
                                return us(this, function(d) {
                                    switch (d.label) {
                                    case 0:
                                        return typeof u.formatter != "function" ? [3, 2] : [4, Promise.resolve(u.formatter.call(this, f))];
                                    case 1:
                                        f = d.sent(),
                                        d.label = 2;
                                    case 2:
                                        return this.ImageCache.set(u.src, f),
                                        a(),
                                        [2]
                                    }
                                })
                            })
                        }).catch(function(f) {
                            console.error(r + "[" + n + "].imgs[" + i + "] " + f),
                            l()
                        })
                    }
                }
                )]
            })
        })
    }
    ,
    e.prototype.drawBlock = function(r, n, i) {
        var o = this
          , s = this.ctx;
        Ks(n.background) && (s.beginPath(),
        s.fillStyle = n.background,
        s.arc(0, 0, r, 0, 2 * Math.PI, !1),
        s.fill()),
        n.imgs && n.imgs.forEach(function(a, l) {
            var c = o.ImageCache.get(a.src);
            if (c) {
                var u = o.computedWidthAndHeight(c, a, 2 * r, 2 * r)
                  , f = u[0]
                  , d = u[1]
                  , h = [o.getOffsetX(f) + o.getLength(a.left, 2 * r), o.getLength(a.top, 2 * r) - r]
                  , x = h[0]
                  , y = h[1];
                s.save(),
                a.rotate && s.rotate(ka(o.rotateDeg)),
                o.drawImage(s, c, x, y, f, d),
                s.restore()
            }
        })
    }
    ,
    e.prototype.draw = function() {
        var r, n, i = this, o = this, s = o.config, a = o.ctx, l = o._defaultConfig, c = o._defaultStyle;
        (r = s.beforeDraw) === null || r === void 0 || r.call(this, a),
        a.clearRect(-this.Radius, -this.Radius, 2 * this.Radius, 2 * this.Radius),
        this.prizeRadius = this.blocks.reduce(function(x, y, m) {
            return i.drawBlock(x, y, m),
            x - i.getLength(y.padding && y.padding.split(" ")[0])
        }, this.Radius),
        this.prizeDeg = 360 / this.prizes.length,
        this.prizeAng = ka(this.prizeDeg);
        var u = this.prizeRadius * Math.sin(this.prizeAng / 2) * 2
          , f = ka(this.rotateDeg - 90 + this.prizeDeg / 2 + l.offsetDegree)
          , d = function(x, y) {
            return i.getOffsetX(a.measureText(y).width) + i.getLength(x.left, u)
        }
          , h = function(x, y, m) {
            var E = x.lineHeight || c.lineHeight || x.fontSize || c.fontSize;
            return i.getLength(x.top, y) + (m + 1) * i.getLength(E)
        };
        a.save(),
        this.prizes.forEach(function(x, y) {
            var m = f + y * i.prizeAng
              , E = i.prizeRadius - i.maxBtnRadius
              , g = x.background || c.background;
            Ks(g) && (a.fillStyle = g,
            function(_, b, C, w, T, A) {
                _.beginPath();
                var B, S, D = ka(90 / Math.PI / C * A), F = w + D, R = T - D;
                _.arc(0, 0, C, F, R, !1),
                _.lineTo.apply(_, (B = (w + T) / 2,
                S = A / 2 / Math.abs(Math.sin((w - T) / 2)),
                [+(Math.cos(B) * S).toFixed(8), +(Math.sin(B) * S).toFixed(8)])),
                _.closePath()
            }(a, i.maxBtnRadius, i.prizeRadius, m - i.prizeAng / 2, m + i.prizeAng / 2, i.getLength(l.gutter)),
            a.fill());
            var p = Math.cos(m) * i.prizeRadius
              , v = Math.sin(m) * i.prizeRadius;
            a.translate(p, v),
            a.rotate(m + ka(90)),
            x.imgs && x.imgs.forEach(function(_, b) {
                var C = i.ImageCache.get(_.src);
                if (C) {
                    var w = i.computedWidthAndHeight(C, _, i.prizeAng * i.prizeRadius, E)
                      , T = w[0]
                      , A = w[1]
                      , B = [i.getOffsetX(T) + i.getLength(_.left, u), i.getLength(_.top, E)]
                      , S = B[0]
                      , D = B[1];
                    i.drawImage(a, C, S, D, T, A)
                }
            }),
            x.fonts && x.fonts.forEach(function(_) {
                var b = _.fontColor || c.fontColor
                  , C = _.fontWeight || c.fontWeight
                  , w = i.getLength(_.fontSize || c.fontSize)
                  , T = _.fontStyle || c.fontStyle
                  , A = mu(_, "wordWrap") ? _.wordWrap : c.wordWrap
                  , B = _.lengthLimit || c.lengthLimit
                  , S = _.lineClamp || c.lineClamp;
                a.fillStyle = b,
                a.font = C + " " + (w >> 0) + "px " + T;
                var D = String(_.text);
                (A ? TC(a, SC(D), function(F) {
                    var R = (i.prizeRadius - h(_, E, F.length)) * Math.tan(i.prizeAng / 2) * 2 - i.getLength(l.gutter);
                    return i.getLength(B, R)
                }, S) : D.split(`
`)).filter(function(F) {
                    return !!F
                }).forEach(function(F, R) {
                    a.fillText(F, d(_, F), h(_, E, R))
                })
            }),
            a.rotate(ka(360) - m - ka(90)),
            a.translate(-p, -v)
        }),
        a.restore(),
        this.buttons.forEach(function(x, y) {
            var m = i.getLength(x.radius, i.prizeRadius);
            i.maxBtnRadius = Math.max(i.maxBtnRadius, m),
            Ks(x.background) && (a.beginPath(),
            a.fillStyle = x.background,
            a.arc(0, 0, m, 0, 2 * Math.PI, !1),
            a.fill()),
            x.pointer && Ks(x.background) && (a.beginPath(),
            a.fillStyle = x.background,
            a.moveTo(-m, 0),
            a.lineTo(m, 0),
            a.lineTo(0, 2 * -m),
            a.closePath(),
            a.fill()),
            x.imgs && x.imgs.forEach(function(E, g) {
                var p = i.ImageCache.get(E.src);
                if (p) {
                    var v = i.computedWidthAndHeight(p, E, 2 * m, 2 * m)
                      , _ = v[0]
                      , b = v[1]
                      , C = [i.getOffsetX(_) + i.getLength(E.left, m), i.getLength(E.top, m)]
                      , w = C[0]
                      , T = C[1];
                    i.drawImage(a, p, w, T, _, b)
                }
            }),
            x.fonts && x.fonts.forEach(function(E) {
                var g = E.fontColor || c.fontColor
                  , p = E.fontWeight || c.fontWeight
                  , v = i.getLength(E.fontSize || c.fontSize)
                  , _ = E.fontStyle || c.fontStyle;
                a.fillStyle = g,
                a.font = p + " " + (v >> 0) + "px " + _,
                String(E.text).split(`
`).forEach(function(b, C) {
                    a.fillText(b, d(E, b), h(E, m, C))
                })
            })
        }),
        (n = s.afterDraw) === null || n === void 0 || n.call(this, a)
    }
    ,
    e.prototype.carveOnGunwaleOfAMovingBoat = function() {
        var r = this
          , n = r._defaultConfig
          , i = r.prizeFlag
          , o = r.prizeDeg
          , s = r.rotateDeg;
        this.endTime = Date.now();
        for (var a = this.stopDeg = s, l = n.speed, c = (Math.random() * o - o / 2) * this.getLength(n.stopRange), u = 0, f = 0, d = 0; ++u; ) {
            var h = 360 * u - i * o - s - n.offsetDegree + c - o / 2
              , x = vu(this.FPS, a, h, n.decelerationTime) - a;
            if (x > l) {
                this.endDeg = l - f > x - l ? h : d;
                break
            }
            d = h,
            f = x
        }
    }
    ,
    e.prototype.play = function() {
        var r, n;
        this.step === 0 && (this.startTime = Date.now(),
        this.prizeFlag = void 0,
        this.step = 1,
        (n = (r = this.config).afterStart) === null || n === void 0 || n.call(r),
        this.run())
    }
    ,
    e.prototype.stop = function(r) {
        if (this.step !== 0 && this.step !== 3) {
            if (!r && r !== 0) {
                var n = this.prizes.map(function(i) {
                    return i.range
                });
                r = BM(n)
            }
            r < 0 ? (this.step = 0,
            this.prizeFlag = -1) : (this.step = 2,
            this.prizeFlag = r % this.prizes.length)
        }
    }
    ,
    e.prototype.run = function(r) {
        var n;
        r === void 0 && (r = 0);
        var i = this
          , o = i.rAF
          , s = i.step
          , a = i.prizeFlag
          , l = i._defaultConfig
          , c = l.accelerationTime
          , u = l.decelerationTime
          , f = l.speed;
        if (s !== 0) {
            if (a !== -1) {
                s !== 3 || this.endDeg || this.carveOnGunwaleOfAMovingBoat();
                var d = Date.now() - this.startTime
                  , h = Date.now() - this.endTime
                  , x = this.rotateDeg;
                if (s === 1 || d < c) {
                    this.FPS = d / r;
                    var y = FC(d, 0, f, c);
                    y === f && (this.step = 2),
                    x += y % 360
                } else
                    s === 2 ? (x += f % 360,
                    a !== void 0 && a >= 0 && (this.step = 3,
                    this.stopDeg = 0,
                    this.endDeg = 0)) : s === 3 ? (x = vu(h, this.stopDeg, this.endDeg, u),
                    h >= u && (this.step = 0)) : this.stop(-1);
                this.rotateDeg = x,
                this.draw(),
                o(this.run.bind(this, r + 1))
            }
        } else
            (n = this.endCallback) === null || n === void 0 || n.call(this, this.prizes.find(function(m, E) {
                return E === a
            }) || {})
    }
    ,
    e.prototype.conversionAxis = function(r, n) {
        var i = this.config;
        return [r / i.dpr - this.Radius, n / i.dpr - this.Radius]
    }
    ,
    e
}(DC)
  , S2e = function(t) {
    function e(r, n) {
        var i, o = t.call(this, r, {
            width: n.width,
            height: n.height
        }) || this;
        return o.rows = 3,
        o.cols = 3,
        o.blocks = [],
        o.prizes = [],
        o.buttons = [],
        o.defaultConfig = {},
        o.defaultStyle = {},
        o.activeStyle = {},
        o._defaultConfig = {},
        o._defaultStyle = {},
        o._activeStyle = {},
        o.cellWidth = 0,
        o.cellHeight = 0,
        o.startTime = 0,
        o.endTime = 0,
        o.currIndex = 0,
        o.stopIndex = 0,
        o.endIndex = 0,
        o.demo = !1,
        o.timer = 0,
        o.FPS = 16.6,
        o.step = 0,
        o.prizeFlag = -1,
        o.cells = [],
        o.ImageCache = new Map,
        o.initData(n),
        o.initWatch(),
        o.initComputed(),
        (i = r.beforeCreate) === null || i === void 0 || i.call(o),
        o.init(),
        o
    }
    return BC(e, t),
    e.prototype.resize = function() {
        var r, n;
        t.prototype.resize.call(this),
        this.draw(),
        (n = (r = this.config).afterResize) === null || n === void 0 || n.call(r)
    }
    ,
    e.prototype.initLucky = function() {
        this.cellWidth = 0,
        this.cellHeight = 0,
        this.startTime = 0,
        this.endTime = 0,
        this.currIndex = 0,
        this.stopIndex = 0,
        this.endIndex = 0,
        this.demo = !1,
        this.timer = 0,
        this.FPS = 16.6,
        this.prizeFlag = -1,
        this.step = 0,
        t.prototype.initLucky.call(this)
    }
    ,
    e.prototype.initData = function(r) {
        this.$set(this, "width", r.width || "300px"),
        this.$set(this, "height", r.height || "300px"),
        this.$set(this, "rows", Number(r.rows) || 3),
        this.$set(this, "cols", Number(r.cols) || 3),
        this.$set(this, "blocks", r.blocks || []),
        this.$set(this, "prizes", r.prizes || []),
        this.$set(this, "buttons", r.buttons || []),
        this.$set(this, "button", r.button),
        this.$set(this, "defaultConfig", r.defaultConfig || {}),
        this.$set(this, "defaultStyle", r.defaultStyle || {}),
        this.$set(this, "activeStyle", r.activeStyle || {}),
        this.$set(this, "startCallback", r.start),
        this.$set(this, "endCallback", r.end)
    }
    ,
    e.prototype.initComputed = function() {
        var r = this;
        this.$computed(this, "_defaultConfig", function() {
            var n = ls({
                gutter: 5,
                speed: 20,
                accelerationTime: 2500,
                decelerationTime: 2500
            }, r.defaultConfig);
            return n.gutter = r.getLength(n.gutter),
            n.speed = n.speed / 40,
            n
        }),
        this.$computed(this, "_defaultStyle", function() {
            return ls({
                borderRadius: 20,
                fontColor: "#000",
                fontSize: "18px",
                fontStyle: "sans-serif",
                fontWeight: "400",
                background: "rgba(0,0,0,0)",
                shadow: "",
                wordWrap: !0,
                lengthLimit: "90%"
            }, r.defaultStyle)
        }),
        this.$computed(this, "_activeStyle", function() {
            return ls({
                background: "#ffce98",
                shadow: ""
            }, r.activeStyle)
        })
    }
    ,
    e.prototype.initWatch = function() {
        var r = this;
        this.$watch("width", function(n) {
            r.data.width = n,
            r.resize()
        }),
        this.$watch("height", function(n) {
            r.data.height = n,
            r.resize()
        }),
        this.$watch("blocks", function(n) {
            r.initImageCache()
        }, {
            deep: !0
        }),
        this.$watch("prizes", function(n) {
            r.initImageCache()
        }, {
            deep: !0
        }),
        this.$watch("buttons", function(n) {
            r.initImageCache()
        }, {
            deep: !0
        }),
        this.$watch("rows", function() {
            return r.init()
        }),
        this.$watch("cols", function() {
            return r.init()
        }),
        this.$watch("defaultConfig", function() {
            return r.draw()
        }, {
            deep: !0
        }),
        this.$watch("defaultStyle", function() {
            return r.draw()
        }, {
            deep: !0
        }),
        this.$watch("activeStyle", function() {
            return r.draw()
        }, {
            deep: !0
        }),
        this.$watch("startCallback", function() {
            return r.init()
        }),
        this.$watch("endCallback", function() {
            return r.init()
        })
    }
    ,
    e.prototype.init = function() {
        var r, n;
        return cs(this, void 0, void 0, function() {
            var i;
            return us(this, function(o) {
                switch (o.label) {
                case 0:
                    return this.initLucky(),
                    i = this.config,
                    (r = i.beforeInit) === null || r === void 0 || r.call(this),
                    this.draw(),
                    [4, this.initImageCache()];
                case 1:
                    return o.sent(),
                    (n = i.afterInit) === null || n === void 0 || n.call(this),
                    [2]
                }
            })
        })
    }
    ,
    e.prototype.initImageCache = function() {
        var r = this;
        return new Promise(function(n) {
            var i = r.buttons.map(function(s) {
                return s.imgs
            });
            r.button && i.push(r.button.imgs);
            var o = {
                blocks: r.blocks.map(function(s) {
                    return s.imgs
                }),
                prizes: r.prizes.map(function(s) {
                    return s.imgs
                }),
                buttons: i
            };
            Object.keys(o).forEach(function(s) {
                var a = o[s]
                  , l = [];
                a && a.forEach(function(c, u) {
                    c && c.forEach(function(f, d) {
                        l.push(r.loadAndCacheImg(s, u, d))
                    })
                }),
                Promise.all(l).then(function() {
                    r.draw(),
                    n()
                })
            })
        }
        )
    }
    ,
    e.prototype.handleClick = function(r) {
        var n = this
          , i = this.ctx;
        Dc(Dc([], this.buttons), [this.button]).forEach(function(o) {
            var s;
            if (o) {
                var a = n.getGeometricProperty([o.x, o.y, o.col || 1, o.row || 1])
                  , l = a[0]
                  , c = a[1]
                  , u = a[2]
                  , f = a[3];
                i.beginPath(),
                i.rect(l, c, u, f),
                i.isPointInPath(r.offsetX, r.offsetY) && n.step === 0 && (typeof o.callback == "function" && o.callback.call(n, o),
                (s = n.startCallback) === null || s === void 0 || s.call(n, r, o))
            }
        })
    }
    ,
    e.prototype.loadAndCacheImg = function(r, n, i) {
        return cs(this, void 0, void 0, function() {
            var o = this;
            return us(this, function(s) {
                return [2, new Promise(function(a, l) {
                    var c = o[r][n];
                    if (r === "buttons" && !o.buttons.length && o.button && (c = o.button),
                    c && c.imgs) {
                        var u = c.imgs[i];
                        if (u) {
                            var f = [o.loadImg(u.src, u), u.activeSrc && o.loadImg(u.activeSrc, u, "$activeResolve")];
                            Promise.all(f).then(function(d) {
                                var h = d[0]
                                  , x = d[1];
                                return cs(o, void 0, void 0, function() {
                                    var y;
                                    return us(this, function(m) {
                                        switch (m.label) {
                                        case 0:
                                            return typeof (y = u.formatter) != "function" ? [3, 3] : [4, Promise.resolve(y.call(this, h))];
                                        case 1:
                                            return h = m.sent(),
                                            x ? [4, Promise.resolve(y.call(this, x))] : [3, 3];
                                        case 2:
                                            x = m.sent(),
                                            m.label = 3;
                                        case 3:
                                            return this.ImageCache.set(u.src, h),
                                            x && this.ImageCache.set(u.activeSrc, x),
                                            a(),
                                            [2]
                                        }
                                    })
                                })
                            }).catch(function(d) {
                                console.error(r + "[" + n + "].imgs[" + i + "] " + d),
                                l()
                            })
                        }
                    }
                }
                )]
            })
        })
    }
    ,
    e.prototype.draw = function() {
        var r, n, i = this, o = this, s = o.config, a = o.ctx, l = o._defaultConfig, c = o._defaultStyle, u = o._activeStyle;
        (r = s.beforeDraw) === null || r === void 0 || r.call(this, a),
        a.clearRect(0, 0, this.boxWidth, this.boxHeight),
        this.cells = Dc(Dc([], this.prizes), this.buttons),
        this.button && this.cells.push(this.button),
        this.cells.forEach(function(f) {
            f.col = f.col || 1,
            f.row = f.row || 1
        }),
        this.prizeArea = this.blocks.reduce(function(f, d, h) {
            var x = f.x
              , y = f.y
              , m = f.w
              , E = f.h
              , g = wM(d, i.getLength.bind(i))
              , p = g[0]
              , v = g[1]
              , _ = g[2]
              , b = g[3]
              , C = d.borderRadius ? i.getLength(d.borderRadius) : 0
              , w = d.background;
            return Ks(w) && (a.fillStyle = i.handleBackground(x, y, m, E, w),
            np(a, x, y, m, E, C),
            a.fill()),
            d.imgs && d.imgs.forEach(function(T, A) {
                var B = i.ImageCache.get(T.src);
                if (B) {
                    var S = i.computedWidthAndHeight(B, T, m, E)
                      , D = S[0]
                      , F = S[1]
                      , R = [i.getOffsetX(D, m) + i.getLength(T.left, m), i.getLength(T.top, E)]
                      , P = R[0]
                      , N = R[1];
                    i.drawImage(a, B, x + P, y + N, D, F)
                }
            }),
            {
                x: x + _,
                y: y + p,
                w: m - _ - b,
                h: E - p - v
            }
        }, {
            x: 0,
            y: 0,
            w: this.boxWidth,
            h: this.boxHeight
        }),
        this.cellWidth = (this.prizeArea.w - l.gutter * (this.cols - 1)) / this.cols,
        this.cellHeight = (this.prizeArea.h - l.gutter * (this.rows - 1)) / this.rows,
        this.cells.forEach(function(f, d) {
            var h = i.getGeometricProperty([f.x, f.y, f.col, f.row])
              , x = h[0]
              , y = h[1]
              , m = h[2]
              , E = h[3]
              , g = !1;
            (i.prizeFlag === void 0 || i.prizeFlag > -1) && (g = d === i.currIndex % i.prizes.length >> 0);
            var p = g ? u.background : f.background || c.background;
            if (Ks(p)) {
                var v = (g ? u.shadow : f.shadow || c.shadow).replace(/px/g, "").split(",")[0].split(" ").map(function(b, C) {
                    return C < 3 ? Number(b) : b
                });
                v.length === 4 && (a.shadowColor = v[3],
                a.shadowOffsetX = v[0] * s.dpr,
                a.shadowOffsetY = v[1] * s.dpr,
                a.shadowBlur = v[2],
                v[0] > 0 ? m -= v[0] : (m += v[0],
                x -= v[0]),
                v[1] > 0 ? E -= v[1] : (E += v[1],
                y -= v[1])),
                a.fillStyle = i.handleBackground(x, y, m, E, p);
                var _ = i.getLength(f.borderRadius ? f.borderRadius : c.borderRadius);
                np(a, x, y, m, E, _),
                a.fill(),
                a.shadowColor = "rgba(0, 0, 0, 0)",
                a.shadowOffsetX = 0,
                a.shadowOffsetY = 0,
                a.shadowBlur = 0
            }
            d >= i.prizes.length && (d -= i.prizes.length),
            f.imgs && f.imgs.forEach(function(b, C) {
                var w = i.ImageCache.get(b.src)
                  , T = i.ImageCache.get(b.activeSrc);
                if (w) {
                    var A = g && T || w;
                    if (A) {
                        var B = i.computedWidthAndHeight(A, b, m, E)
                          , S = B[0]
                          , D = B[1]
                          , F = [x + i.getOffsetX(S, m) + i.getLength(b.left, m), y + i.getLength(b.top, E)]
                          , R = F[0]
                          , P = F[1];
                        i.drawImage(a, A, R, P, S, D)
                    }
                }
            }),
            f.fonts && f.fonts.forEach(function(b) {
                var C = g && u.fontStyle ? u.fontStyle : b.fontStyle || c.fontStyle
                  , w = g && u.fontWeight ? u.fontWeight : b.fontWeight || c.fontWeight
                  , T = g && u.fontSize ? i.getLength(u.fontSize) : i.getLength(b.fontSize || c.fontSize)
                  , A = g && u.lineHeight ? u.lineHeight : b.lineHeight || c.lineHeight || b.fontSize || c.fontSize
                  , B = mu(b, "wordWrap") ? b.wordWrap : c.wordWrap
                  , S = b.lengthLimit || c.lengthLimit
                  , D = b.lineClamp || c.lineClamp;
                a.font = w + " " + (T >> 0) + "px " + C,
                a.fillStyle = g && u.fontColor ? u.fontColor : b.fontColor || c.fontColor;
                var F = []
                  , R = String(b.text);
                if (B) {
                    var P = i.getLength(S, m);
                    F = TC(a, SC(R), function() {
                        return P
                    }, D)
                } else
                    F = R.split(`
`);
                F.forEach(function(N, j) {
                    a.fillText(N, x + i.getOffsetX(a.measureText(N).width, m) + i.getLength(b.left, m), y + i.getLength(b.top, E) + (j + 1) * i.getLength(A))
                })
            })
        }),
        (n = s.afterDraw) === null || n === void 0 || n.call(this, a)
    }
    ,
    e.prototype.handleBackground = function(r, n, i, o, s) {
        var a = this.ctx;
        return s.includes("linear-gradient") && (s = function(l, c, u, f, d, h) {
            var x = /linear-gradient\((.+)\)/.exec(h)[1].split(",").map(function(p) {
                return p.trim()
            })
              , y = x.shift()
              , m = [0, 0, 0, 0];
            if (y.includes("deg")) {
                var E = function(p) {
                    return Math.tan(p / 180 * Math.PI)
                };
                (y = y.slice(0, -3) % 360) >= 0 && y < 45 ? m = [c, u + d, c + f, u + d - f * E(y - 0)] : y >= 45 && y < 90 ? m = [c, u + d, c + f - d * E(y - 45), u] : y >= 90 && y < 135 ? m = [c + f, u + d, c + f - d * E(y - 90), u] : y >= 135 && y < 180 ? m = [c + f, u + d, c, u + f * E(y - 135)] : y >= 180 && y < 225 ? m = [c + f, u, c, u + f * E(y - 180)] : y >= 225 && y < 270 ? m = [c + f, u, c + d * E(y - 225), u + d] : y >= 270 && y < 315 ? m = [c, u, c + d * E(y - 270), u + d] : y >= 315 && y < 360 && (m = [c, u, c + f, u + d - f * E(y - 315)])
            } else
                y.includes("top") ? m = [c, u + d, c, u] : y.includes("bottom") ? m = [c, u, c, u + d] : y.includes("left") ? m = [c + f, u, c, u] : y.includes("right") && (m = [c, u, c + f, u]);
            var g = l.createLinearGradient.apply(l, m.map(function(p) {
                return p >> 0
            }));
            return x.reduce(function(p, v, _) {
                var b = v.split(" ");
                return b.length === 1 ? p.addColorStop(_, b[0]) : b.length === 2 && p.addColorStop.apply(p, b),
                p
            }, g)
        }(a, r, n, i, o, s)),
        s
    }
    ,
    e.prototype.carveOnGunwaleOfAMovingBoat = function() {
        var r = this
          , n = r._defaultConfig
          , i = r.prizeFlag
          , o = r.currIndex;
        this.endTime = Date.now();
        for (var s = this.stopIndex = o, a = n.speed, l = 0, c = 0, u = 0; ++l; ) {
            var f = this.prizes.length * l + i - s
              , d = vu(this.FPS, s, f, n.decelerationTime) - s;
            if (d > a) {
                this.endIndex = a - c > d - a ? f : u;
                break
            }
            u = f,
            c = d
        }
    }
    ,
    e.prototype.play = function() {
        var r, n;
        this.step === 0 && (this.startTime = Date.now(),
        this.prizeFlag = void 0,
        this.step = 1,
        (n = (r = this.config).afterStart) === null || n === void 0 || n.call(r),
        this.run())
    }
    ,
    e.prototype.stop = function(r) {
        if (this.step !== 0 && this.step !== 3) {
            if (!r && r !== 0) {
                var n = this.prizes.map(function(i) {
                    return i.range
                });
                r = BM(n)
            }
            r < 0 ? (this.step = 0,
            this.prizeFlag = -1) : (this.step = 2,
            this.prizeFlag = r % this.prizes.length)
        }
    }
    ,
    e.prototype.run = function(r) {
        var n;
        r === void 0 && (r = 0);
        var i = this
          , o = i.rAF
          , s = i.step
          , a = i.prizes
          , l = i.prizeFlag
          , c = i._defaultConfig
          , u = c.accelerationTime
          , f = c.decelerationTime
          , d = c.speed;
        if (s !== 0) {
            if (l !== -1) {
                s !== 3 || this.endIndex || this.carveOnGunwaleOfAMovingBoat();
                var h = Date.now() - this.startTime
                  , x = Date.now() - this.endTime
                  , y = this.currIndex;
                if (s === 1 || h < u) {
                    this.FPS = h / r;
                    var m = FC(h, .1, d - .1, u);
                    m === d && (this.step = 2),
                    y += m % a.length
                } else
                    s === 2 ? (y += d % a.length,
                    l !== void 0 && l >= 0 && (this.step = 3,
                    this.stopIndex = 0,
                    this.endIndex = 0)) : s === 3 ? (y = vu(x, this.stopIndex, this.endIndex, f),
                    x >= f && (this.step = 0)) : this.stop(-1);
                this.currIndex = y,
                this.draw(),
                o(this.run.bind(this, r + 1))
            }
        } else
            (n = this.endCallback) === null || n === void 0 || n.call(this, this.prizes.find(function(E, g) {
                return g === l
            }) || {})
    }
    ,
    e.prototype.getGeometricProperty = function(r) {
        var n = r[0]
          , i = r[1]
          , o = r[2]
          , s = o === void 0 ? 1 : o
          , a = r[3]
          , l = a === void 0 ? 1 : a
          , c = this.cellWidth
          , u = this.cellHeight
          , f = this._defaultConfig.gutter
          , d = [this.prizeArea.x + (c + f) * n, this.prizeArea.y + (u + f) * i];
        return s && l && d.push(c * s + f * (s - 1), u * l + f * (l - 1)),
        d
    }
    ,
    e.prototype.conversionAxis = function(r, n) {
        var i = this.config;
        return [r / i.dpr, n / i.dpr]
    }
    ,
    e
}(DC)
  , T2e = function(t) {
    function e(r, n) {
        var i, o = t.call(this, r, {
            width: n.width,
            height: n.height
        }) || this;
        return o.blocks = [],
        o.prizes = [],
        o.slots = [],
        o.defaultConfig = {},
        o._defaultConfig = {},
        o.defaultStyle = {},
        o._defaultStyle = {},
        o.endCallback = function() {}
        ,
        o.cellWidth = 0,
        o.cellHeight = 0,
        o.cellAndSpacing = 0,
        o.widthAndSpacing = 0,
        o.heightAndSpacing = 0,
        o.FPS = 16.6,
        o.scroll = [],
        o.stopScroll = [],
        o.endScroll = [],
        o.startTime = 0,
        o.endTime = 0,
        o.step = 0,
        o.prizeFlag = void 0,
        o.ImageCache = new Map,
        o.initData(n),
        o.initWatch(),
        o.initComputed(),
        (i = r.beforeCreate) === null || i === void 0 || i.call(o),
        o.init(),
        o
    }
    return BC(e, t),
    e.prototype.resize = function() {
        var r, n;
        t.prototype.resize.call(this),
        this.draw(),
        (n = (r = this.config).afterResize) === null || n === void 0 || n.call(r)
    }
    ,
    e.prototype.initLucky = function() {
        this.cellWidth = 0,
        this.cellHeight = 0,
        this.cellAndSpacing = 0,
        this.widthAndSpacing = 0,
        this.heightAndSpacing = 0,
        this.FPS = 16.6,
        this.scroll = [],
        this.stopScroll = [],
        this.endScroll = [],
        this.startTime = 0,
        this.endTime = 0,
        this.prizeFlag = void 0,
        this.step = 0,
        t.prototype.initLucky.call(this)
    }
    ,
    e.prototype.initData = function(r) {
        this.$set(this, "width", r.width || "300px"),
        this.$set(this, "height", r.height || "300px"),
        this.$set(this, "blocks", r.blocks || []),
        this.$set(this, "prizes", r.prizes || []),
        this.$set(this, "slots", r.slots || []),
        this.$set(this, "defaultConfig", r.defaultConfig || {}),
        this.$set(this, "defaultStyle", r.defaultStyle || {}),
        this.$set(this, "endCallback", r.end)
    }
    ,
    e.prototype.initComputed = function() {
        var r = this;
        this.$computed(this, "_defaultConfig", function() {
            var n = ls({
                mode: "vertical",
                rowSpacing: 0,
                colSpacing: 5,
                speed: 20,
                direction: 1,
                accelerationTime: 2500,
                decelerationTime: 2500
            }, r.defaultConfig);
            return n.rowSpacing = r.getLength(n.rowSpacing),
            n.colSpacing = r.getLength(n.colSpacing),
            n
        }),
        this.$computed(this, "_defaultStyle", function() {
            return ls({
                borderRadius: 0,
                fontColor: "#000",
                fontSize: "18px",
                fontStyle: "sans-serif",
                fontWeight: "400",
                background: "rgba(0,0,0,0)",
                wordWrap: !0,
                lengthLimit: "90%"
            }, r.defaultStyle)
        })
    }
    ,
    e.prototype.initWatch = function() {
        var r = this;
        this.$watch("width", function(n) {
            r.data.width = n,
            r.resize()
        }),
        this.$watch("height", function(n) {
            r.data.height = n,
            r.resize()
        }),
        this.$watch("blocks", function(n) {
            r.initImageCache()
        }, {
            deep: !0
        }),
        this.$watch("prizes", function(n) {
            r.initImageCache()
        }, {
            deep: !0
        }),
        this.$watch("slots", function(n) {
            r.drawOffscreenCanvas(),
            r.draw()
        }, {
            deep: !0
        }),
        this.$watch("defaultConfig", function() {
            return r.draw()
        }, {
            deep: !0
        }),
        this.$watch("defaultStyle", function() {
            return r.draw()
        }, {
            deep: !0
        }),
        this.$watch("endCallback", function() {
            return r.init()
        })
    }
    ,
    e.prototype.init = function() {
        var r, n;
        return cs(this, void 0, void 0, function() {
            var i;
            return us(this, function(o) {
                switch (o.label) {
                case 0:
                    return this.initLucky(),
                    i = this.config,
                    (r = i.beforeInit) === null || r === void 0 || r.call(this),
                    this.drawOffscreenCanvas(),
                    this.draw(),
                    [4, this.initImageCache()];
                case 1:
                    return o.sent(),
                    (n = i.afterInit) === null || n === void 0 || n.call(this),
                    [2]
                }
            })
        })
    }
    ,
    e.prototype.initImageCache = function() {
        var r = this;
        return new Promise(function(n) {
            var i = {
                blocks: r.blocks.map(function(o) {
                    return o.imgs
                }),
                prizes: r.prizes.map(function(o) {
                    return o.imgs
                })
            };
            Object.keys(i).forEach(function(o) {
                var s = i[o]
                  , a = [];
                s && s.forEach(function(l, c) {
                    l && l.forEach(function(u, f) {
                        a.push(r.loadAndCacheImg(o, c, f))
                    })
                }),
                Promise.all(a).then(function() {
                    r.drawOffscreenCanvas(),
                    r.draw(),
                    n()
                })
            })
        }
        )
    }
    ,
    e.prototype.loadAndCacheImg = function(r, n, i) {
        return cs(this, void 0, void 0, function() {
            var o = this;
            return us(this, function(s) {
                return [2, new Promise(function(a, l) {
                    var c = o[r][n];
                    if (c && c.imgs) {
                        var u = c.imgs[i];
                        u && o.loadImg(u.src, u).then(function(f) {
                            return cs(o, void 0, void 0, function() {
                                return us(this, function(d) {
                                    switch (d.label) {
                                    case 0:
                                        return typeof u.formatter != "function" ? [3, 2] : [4, Promise.resolve(u.formatter.call(this, f))];
                                    case 1:
                                        f = d.sent(),
                                        d.label = 2;
                                    case 2:
                                        return this.ImageCache.set(u.src, f),
                                        a(),
                                        [2]
                                    }
                                })
                            })
                        }).catch(function(f) {
                            console.error(r + "[" + n + "].imgs[" + i + "] " + f),
                            l()
                        })
                    }
                }
                )]
            })
        })
    }
    ,
    e.prototype.drawOffscreenCanvas = function() {
        var r = this
          , n = this._defaultConfig
          , i = this._defaultStyle
          , o = this.drawBlocks()
          , s = o.w
          , a = o.h
          , l = this.prizes.length
          , c = this.displacementWidthOrHeight()
          , u = c.cellWidth
          , f = c.cellHeight
          , d = c.widthAndSpacing
          , h = c.heightAndSpacing
          , x = new Array(l).fill(void 0).map(function(v, _) {
            return _
        })
          , y = 0
          , m = 0;
        this.slots.forEach(function(v, _) {
            r.scroll[_] === void 0 && (r.scroll[_] = 0),
            v.order = v.order || x;
            var b = v.order.length;
            y = Math.max(y, s + d * b),
            m = Math.max(m, a + h * b)
        });
        var E = this.getOffscreenCanvas(y, m)
          , g = E._offscreenCanvas
          , p = E._ctx;
        this._offscreenCanvas = g,
        this.slots.forEach(function(v, _) {
            var b = u * _
              , C = f * _
              , w = 0
              , T = function(K, oe) {
                for (var U = {}, $ = [], V = 0; V < K.length; V++)
                    U[V] = K[V];
                for (V = 0; V < oe.length; V++) {
                    var W = U[oe[V]];
                    W && ($[V] = W)
                }
                return $
            }(r.prizes, v.order);
            if (T.length) {
                T.forEach(function(K, oe) {
                    if (K) {
                        v.order[oe];
                        var U = d * oe + n.colSpacing / 2
                          , $ = h * oe + n.rowSpacing / 2
                          , V = r.displacement([b, $, h], [U, C, d])
                          , W = V[0]
                          , H = V[1]
                          , Q = V[2];
                        w += Q;
                        var G = K.background || i.background;
                        if (Ks(G)) {
                            var re = r.getLength(mu(K, "borderRadius") ? K.borderRadius : i.borderRadius);
                            np(p, W, H, u, u, re),
                            p.fillStyle = G,
                            p.fill()
                        }
                        K.imgs && K.imgs.forEach(function(te, he) {
                            var xe = r.ImageCache.get(te.src);
                            if (xe) {
                                var ve = r.computedWidthAndHeight(xe, te, u, f)
                                  , I = ve[0]
                                  , z = ve[1]
                                  , q = [W + r.getOffsetX(I, u) + r.getLength(te.left, u), H + r.getLength(te.top, f)]
                                  , ce = q[0]
                                  , fe = q[1];
                                r.drawImage(p, xe, ce, fe, I, z)
                            }
                        }),
                        K.fonts && K.fonts.forEach(function(te) {
                            var he = te.fontStyle || i.fontStyle
                              , xe = te.fontWeight || i.fontWeight
                              , ve = r.getLength(te.fontSize || i.fontSize)
                              , I = te.lineHeight || i.lineHeight || te.fontSize || i.fontSize
                              , z = mu(te, "wordWrap") ? te.wordWrap : i.wordWrap
                              , q = te.lengthLimit || i.lengthLimit
                              , ce = te.lineClamp || i.lineClamp;
                            p.font = xe + " " + (ve >> 0) + "px " + he,
                            p.fillStyle = te.fontColor || i.fontColor;
                            var fe = []
                              , k = String(te.text);
                            if (z) {
                                var L = r.getLength(q, u);
                                fe = TC(p, SC(k), function() {
                                    return L
                                }, ce)
                            } else
                                fe = k.split(`
`);
                            fe.forEach(function(Y, ee) {
                                p.fillText(Y, W + r.getOffsetX(p.measureText(Y).width, u) + r.getLength(te.left, u), H + r.getLength(te.top, f) + (ee + 1) * r.getLength(I))
                            })
                        })
                    }
                });
                for (var A = r.displacement([b, 0, u, w], [0, C, w, f]), B = A[0], S = A[1], D = A[2], F = A[3], R = w; R < m + w; ) {
                    var P = r.displacement([B, R], [R, S])
                      , N = P[0]
                      , j = P[1];
                    r.drawImage(p, g, B, S, D, F, N, j, D, F),
                    R += w
                }
            }
        })
    }
    ,
    e.prototype.drawBlocks = function() {
        var r = this
          , n = this;
        n.config;
        var i = n.ctx;
        n._defaultConfig;
        var o = n._defaultStyle;
        return this.prizeArea = this.blocks.reduce(function(s, a, l) {
            var c = s.x
              , u = s.y
              , f = s.w
              , d = s.h
              , h = wM(a, r.getLength.bind(r))
              , x = h[0]
              , y = h[1]
              , m = h[2]
              , E = h[3]
              , g = a.borderRadius ? r.getLength(a.borderRadius) : 0
              , p = a.background || o.background;
            return Ks(p) && (np(i, c, u, f, d, g),
            i.fillStyle = p,
            i.fill()),
            a.imgs && a.imgs.forEach(function(v, _) {
                var b = r.ImageCache.get(v.src);
                if (b) {
                    var C = r.computedWidthAndHeight(b, v, f, d)
                      , w = C[0]
                      , T = C[1]
                      , A = [r.getOffsetX(w, f) + r.getLength(v.left, f), r.getLength(v.top, d)]
                      , B = A[0]
                      , S = A[1];
                    r.drawImage(i, b, c + B, u + S, w, T)
                }
            }),
            {
                x: c + m,
                y: u + x,
                w: f - m - E,
                h: d - x - y
            }
        }, {
            x: 0,
            y: 0,
            w: this.boxWidth,
            h: this.boxHeight
        })
    }
    ,
    e.prototype.draw = function() {
        var r, n = this, i = this, o = i.config, s = i.ctx;
        i._defaultConfig,
        i._defaultStyle,
        (r = o.beforeDraw) === null || r === void 0 || r.call(this, s),
        s.clearRect(0, 0, this.boxWidth, this.boxHeight);
        var a = this.drawBlocks()
          , l = a.x
          , c = a.y
          , u = a.w
          , f = a.h;
        if (this._offscreenCanvas) {
            var d = this
              , h = d.cellWidth
              , x = d.cellHeight
              , y = d.cellAndSpacing
              , m = d.widthAndSpacing
              , E = d.heightAndSpacing;
            this.slots.forEach(function(g, p) {
                var v = y * g.order.length
                  , _ = n.displacement(-(f - E) / 2, -(u - m) / 2)
                  , b = n.scroll[p] + _;
                b < 0 && (b = b % v + v),
                b > v && (b %= v);
                var C = n.displacement([h * p, b, h, f], [b, x * p, u, x])
                  , w = C[0]
                  , T = C[1]
                  , A = C[2]
                  , B = C[3]
                  , S = n.displacement([l + m * p, c, h, f], [l, c + E * p, u, x])
                  , D = S[0]
                  , F = S[1]
                  , R = S[2]
                  , P = S[3];
                n.drawImage(s, n._offscreenCanvas, w, T, A, B, D, F, R, P)
            })
        }
    }
    ,
    e.prototype.carveOnGunwaleOfAMovingBoat = function() {
        var r = this
          , n = this
          , i = n._defaultConfig
          , o = n.prizeFlag
          , s = n.cellAndSpacing;
        this.endTime = Date.now(),
        this.slots.forEach(function(a, l) {
            var c = a.order;
            if (c.length)
                for (var u = a.speed || i.speed, f = a.direction || i.direction, d = c.findIndex(function(g) {
                    return g === o[l]
                }), h = s * c.length, x = r.stopScroll[l] = r.scroll[l], y = 0; ++y; ) {
                    var m = s * d + h * y * f - x
                      , E = vu(r.FPS, x, m, i.decelerationTime) - x;
                    if (Math.abs(E) > u) {
                        r.endScroll[l] = m;
                        break
                    }
                }
        })
    }
    ,
    e.prototype.play = function() {
        var r, n;
        this.step === 0 && (this.startTime = Date.now(),
        this.prizeFlag = void 0,
        this.step = 1,
        (n = (r = this.config).afterStart) === null || n === void 0 || n.call(r),
        this.run())
    }
    ,
    e.prototype.stop = function(r) {
        var n;
        if (this.step !== 0 && this.step !== 3) {
            if (typeof r == "number")
                this.prizeFlag = new Array(this.slots.length).fill(r);
            else {
                if (!Lf(r, "array"))
                    return this.stop(-1),
                    console.error("stop() 无法识别的参数类型 " + typeof r);
                if (r.length !== this.slots.length)
                    return this.stop(-1),
                    console.error("stop([" + r + "]) 参数长度的不正确");
                this.prizeFlag = r
            }
            !((n = this.prizeFlag) === null || n === void 0) && n.includes(-1) ? (this.prizeFlag = [],
            this.step = 0) : this.step = 2
        }
    }
    ,
    e.prototype.run = function(r) {
        var n, i, o = this;
        r === void 0 && (r = 0);
        var s = this
          , a = s.rAF
          , l = s.step
          , c = s.prizeFlag
          , u = s._defaultConfig
          , f = s.cellAndSpacing
          , d = s.slots
          , h = u.accelerationTime
          , x = u.decelerationTime;
        if (this.step !== 0 || (c == null ? void 0 : c.length) !== d.length) {
            if (c === void 0 || c.length) {
                this.step !== 3 || this.endScroll.length || this.carveOnGunwaleOfAMovingBoat();
                var y = Date.now() - this.startTime
                  , m = Date.now() - this.endTime;
                d.forEach(function(_, b) {
                    var C = _.order;
                    if (C && C.length) {
                        var w = f * C.length
                          , T = Math.abs(_.speed || u.speed)
                          , A = _.direction || u.direction
                          , B = 0
                          , S = o.scroll[b];
                        if (l === 1 || y < h) {
                            o.FPS = y / r;
                            var D = FC(y, 0, T, h);
                            D === T && (o.step = 2),
                            B = (S + D * A) % w
                        } else if (l === 2)
                            B = (S + T * A) % w,
                            (c == null ? void 0 : c.length) === d.length && (o.step = 3,
                            o.stopScroll = [],
                            o.endScroll = []);
                        else if (l === 3 && m) {
                            var F = o.stopScroll[b]
                              , R = o.endScroll[b];
                            B = vu(m, F, R, x),
                            m >= x && (o.step = 0)
                        }
                        o.scroll[b] = B
                    }
                }),
                this.draw(),
                a(this.run.bind(this, r + 1))
            }
        } else {
            for (var E = c[0], g = 0; g < d.length; g++) {
                var p = d[g]
                  , v = c[g];
                if (!(!((n = p.order) === null || n === void 0) && n.includes(v)) || E !== v) {
                    E = -1;
                    break
                }
            }
            (i = this.endCallback) === null || i === void 0 || i.call(this, this.prizes.find(function(_, b) {
                return b === E
            }) || void 0)
        }
    }
    ,
    e.prototype.displacement = function(r, n) {
        return this._defaultConfig.mode === "horizontal" ? n : r
    }
    ,
    e.prototype.displacementWidthOrHeight = function() {
        var r = this._defaultConfig.mode
          , n = this.slots.length
          , i = this._defaultConfig
          , o = i.colSpacing
          , s = i.rowSpacing
          , a = this.prizeArea || this.drawBlocks();
        a.x,
        a.y;
        var l, c, u = a.w, f = a.h, d = 0, h = 0;
        return r === "horizontal" ? (h = this.cellHeight = (f - s * (n - 1)) / n,
        d = this.cellWidth = h) : (d = this.cellWidth = (u - o * (n - 1)) / n,
        h = this.cellHeight = d),
        l = this.widthAndSpacing = this.cellWidth + o,
        c = this.heightAndSpacing = this.cellHeight + s,
        this.cellAndSpacing = r === "horizontal" ? l : c,
        {
            cellWidth: d,
            cellHeight: h,
            widthAndSpacing: l,
            heightAndSpacing: c
        }
    }
    ,
    e
}(DC)
  , PC = function(t, e, r) {
    e === void 0 && (e = {});
    var n = e.props
      , i = e.domProps
      , o = e.on
      , s = function(c, u) {
        var f = {};
        for (var d in c)
            Object.prototype.hasOwnProperty.call(c, d) && u.indexOf(d) < 0 && (f[d] = c[d]);
        if (c != null && typeof Object.getOwnPropertySymbols == "function") {
            var h = 0;
            for (d = Object.getOwnPropertySymbols(c); h < d.length; h++)
                u.indexOf(d[h]) < 0 && Object.prototype.propertyIsEnumerable.call(c, d[h]) && (f[d[h]] = c[d[h]])
        }
        return f
    }(e, ["props", "domProps", "on"])
      , a = function(c) {
        return c ? Object.entries(c).reduce(function(u, f) {
            var d, h = f[0], x = f[1];
            return h = "on" + (h = h.charAt(0).toUpperCase() + h.slice(1)),
            Bn(Bn({}, u), ((d = {})[h] = x,
            d))
        }, {}) : null
    }(o)
      , l = Bn(Bn(Bn(Bn({}, s), n), i), a);
    return Or(t, l, r)
}
  , IC = "@lucky-canvas/vue"
  , D2e = be({
    name: "LuckyWheel",
    props: {
        width: {
            type: [String, Number]
        },
        height: {
            type: [String, Number]
        },
        blocks: {
            type: Array,
            default: function() {
                return []
            }
        },
        prizes: {
            type: Array,
            default: function() {
                return []
            }
        },
        buttons: {
            type: Array,
            default: function() {
                return []
            }
        },
        defaultStyle: {
            type: Object,
            default: function() {
                return {}
            }
        },
        defaultConfig: {
            type: Object,
            default: function() {
                return {}
            }
        }
    },
    emits: ["start", "end", "success", "error", "finally"],
    watch: {
        blocks: function(t, e) {
            this.lucky && (this.lucky.blocks = t)
        },
        prizes: function(t, e) {
            this.lucky && (this.lucky.prizes = t)
        },
        buttons: function(t, e) {
            this.lucky && (this.lucky.buttons = t)
        }
    },
    data: function() {
        return {
            lucky: null
        }
    },
    mounted: function() {
        this.$refs.myLucky && this.$refs.myLucky.setAttribute("package", IC + "@0.1.11");
        try {
            this.initLucky(),
            this.$emit("success")
        } catch (t) {
            this.$emit("error", t)
        } finally {
            this.$emit("finally")
        }
    },
    methods: {
        initLucky: function() {
            var t = this;
            this.lucky = new B2e({
                flag: "WEB",
                width: String(this.width),
                height: String(this.height),
                divElement: this.$refs.myLucky,
                rAF: window.requestAnimationFrame,
                setTimeout: window.setTimeout,
                setInterval: window.setInterval,
                clearTimeout: window.clearTimeout,
                clearInterval: window.clearInterval
            },Bn(Bn({}, this.$props), {
                start: function(e) {
                    t.$emit("start", e)
                },
                end: function(e) {
                    t.$emit("end", e)
                }
            }))
        },
        init: function() {
            this.lucky && this.lucky.init()
        },
        play: function() {
            var t;
            (t = this.lucky) === null || t === void 0 || t.play()
        },
        stop: function(t) {
            var e;
            (e = this.lucky) === null || e === void 0 || e.stop(t)
        }
    },
    render: function() {
        return PC("div", {
            ref: "myLucky"
        })
    }
})
  , F2e = be({
    name: "LuckyGrid",
    props: {
        width: {
            type: [String, Number]
        },
        height: {
            type: [String, Number]
        },
        cols: {
            type: [String, Number],
            default: 3
        },
        rows: {
            type: [String, Number],
            default: 3
        },
        blocks: {
            type: Array,
            default: function() {
                return []
            }
        },
        prizes: {
            type: Array,
            default: function() {
                return []
            }
        },
        buttons: {
            type: Array,
            default: function() {
                return []
            }
        },
        button: {
            type: Object
        },
        defaultStyle: {
            type: Object,
            default: function() {
                return {}
            }
        },
        activeStyle: {
            type: Object,
            default: function() {
                return {}
            }
        },
        defaultConfig: {
            type: Object,
            default: function() {
                return {}
            }
        }
    },
    emits: ["start", "end", "success", "error", "finally"],
    watch: {
        cols: function(t, e) {
            this.lucky && (this.lucky.cols = t)
        },
        rows: function(t, e) {
            this.lucky && (this.lucky.rows = t)
        },
        blocks: function(t, e) {
            this.lucky && (this.lucky.blocks = t)
        },
        prizes: function(t, e) {
            this.lucky && (this.lucky.prizes = t)
        },
        buttons: function(t, e) {
            this.lucky && (this.lucky.buttons = t)
        },
        button: function(t, e) {
            this.lucky && (this.lucky.button = t)
        }
    },
    data: function() {
        return {
            lucky: null
        }
    },
    mounted: function() {
        this.$refs.myLucky && this.$refs.myLucky.setAttribute("package", IC + "@0.1.11");
        try {
            this.initLucky(),
            this.$emit("success")
        } catch (t) {
            this.$emit("error", t)
        } finally {
            this.$emit("finally")
        }
    },
    methods: {
        initLucky: function() {
            var t = this;
            this.lucky = new S2e({
                flag: "WEB",
                width: String(this.width),
                height: String(this.height),
                divElement: this.$refs.myLucky,
                rAF: window.requestAnimationFrame,
                setTimeout: window.setTimeout,
                setInterval: window.setInterval,
                clearTimeout: window.clearTimeout,
                clearInterval: window.clearInterval
            },Bn(Bn({}, this.$props), {
                start: function(e, r) {
                    t.$emit("start", e, r)
                },
                end: function(e) {
                    t.$emit("end", e)
                }
            }))
        },
        init: function() {
            this.lucky && this.lucky.init()
        },
        play: function() {
            var t;
            (t = this.lucky) === null || t === void 0 || t.play()
        },
        stop: function(t) {
            var e;
            (e = this.lucky) === null || e === void 0 || e.stop(t)
        }
    },
    render: function() {
        return PC("div", {
            ref: "myLucky"
        })
    }
})
  , P2e = be({
    name: "SlotMachine",
    props: {
        width: {
            type: [String, Number]
        },
        height: {
            type: [String, Number]
        },
        blocks: {
            type: Array,
            default: function() {
                return []
            }
        },
        prizes: {
            type: Array,
            default: function() {
                return []
            }
        },
        slots: {
            type: Array,
            default: function() {
                return []
            }
        },
        defaultStyle: {
            type: Object,
            default: function() {
                return {}
            }
        },
        defaultConfig: {
            type: Object,
            default: function() {
                return {}
            }
        }
    },
    watch: {
        blocks: function(t, e) {
            this.lucky && (this.lucky.blocks = t)
        },
        slots: function(t, e) {
            this.lucky && (this.lucky.slots = t)
        },
        prizes: function(t, e) {
            this.lucky && (this.lucky.prizes = t)
        }
    },
    data: function() {
        return {
            lucky: null
        }
    },
    mounted: function() {
        this.$refs.myLucky && this.$refs.myLucky.setAttribute("package", IC + "@0.1.11");
        try {
            this.initLucky(),
            this.$emit("success")
        } catch (t) {
            this.$emit("error", t)
        } finally {
            this.$emit("finally")
        }
    },
    methods: {
        initLucky: function() {
            var t = this;
            this.lucky = new T2e({
                flag: "WEB",
                width: String(this.width),
                height: String(this.height),
                divElement: this.$refs.myLucky,
                rAF: window.requestAnimationFrame,
                setTimeout: window.setTimeout,
                setInterval: window.setInterval,
                clearTimeout: window.clearTimeout,
                clearInterval: window.clearInterval
            },Bn(Bn({}, this.$props), {
                start: function(e) {
                    t.$emit("start", e)
                },
                end: function(e) {
                    t.$emit("end", e)
                }
            }))
        },
        init: function() {
            this.lucky && this.lucky.init()
        },
        play: function() {
            var t;
            (t = this.lucky) === null || t === void 0 || t.play()
        },
        stop: function(t) {
            var e;
            (e = this.lucky) === null || e === void 0 || e.stop(t)
        }
    },
    render: function() {
        return PC("div", {
            ref: "myLucky"
        })
    }
})
  , I2e = function(t) {
    t.component("LuckyWheel", D2e),
    t.component("LuckyGrid", F2e),
    t.component("SlotMachine", P2e)
};
typeof window < "u" && window.Vue && AM && I2e(window.Vue);
function O2e(t, e) {
    var r = Object.setPrototypeOf;
    r ? r(t, e) : t.__proto__ = e
}
function k2e(t, e) {
    e === void 0 && (e = t.constructor);
    var r = Error.captureStackTrace;
    r && r(t, e)
}
var R2e = function() {
    var t = function(r, n) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(i, o) {
            i.__proto__ = o
        }
        || function(i, o) {
            for (var s in o)
                Object.prototype.hasOwnProperty.call(o, s) && (i[s] = o[s])
        }
        ,
        t(r, n)
    };
    return function(e, r) {
        if (typeof r != "function" && r !== null)
            throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), M2e = function(t) {
    R2e(e, t);
    function e(r, n) {
        var i = this.constructor
          , o = t.call(this, r, n) || this;
        return Object.defineProperty(o, "name", {
            value: i.name,
            enumerable: !1,
            configurable: !0
        }),
        O2e(o, i.prototype),
        k2e(o),
        o
    }
    return e
}(Error), N2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), Nn = function(t) {
    N2e(e, t);
    function e(r) {
        r === void 0 && (r = void 0);
        var n = t.call(this, r) || this;
        return n.message = r,
        n
    }
    return e.prototype.getKind = function() {
        var r = this.constructor;
        return r.kind
    }
    ,
    e.kind = "Exception",
    e
}(M2e), L2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), ir = function(t) {
    L2e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.kind = "ArgumentException",
    e
}(Nn), $2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), Me = function(t) {
    $2e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.kind = "IllegalArgumentException",
    e
}(Nn), DM = function() {
    function t(e) {
        if (this.binarizer = e,
        e === null)
            throw new Me("Binarizer must be non-null.")
    }
    return t.prototype.getWidth = function() {
        return this.binarizer.getWidth()
    }
    ,
    t.prototype.getHeight = function() {
        return this.binarizer.getHeight()
    }
    ,
    t.prototype.getBlackRow = function(e, r) {
        return this.binarizer.getBlackRow(e, r)
    }
    ,
    t.prototype.getBlackMatrix = function() {
        return (this.matrix === null || this.matrix === void 0) && (this.matrix = this.binarizer.getBlackMatrix()),
        this.matrix
    }
    ,
    t.prototype.isCropSupported = function() {
        return this.binarizer.getLuminanceSource().isCropSupported()
    }
    ,
    t.prototype.crop = function(e, r, n, i) {
        var o = this.binarizer.getLuminanceSource().crop(e, r, n, i);
        return new t(this.binarizer.createBinarizer(o))
    }
    ,
    t.prototype.isRotateSupported = function() {
        return this.binarizer.getLuminanceSource().isRotateSupported()
    }
    ,
    t.prototype.rotateCounterClockwise = function() {
        var e = this.binarizer.getLuminanceSource().rotateCounterClockwise();
        return new t(this.binarizer.createBinarizer(e))
    }
    ,
    t.prototype.rotateCounterClockwise45 = function() {
        var e = this.binarizer.getLuminanceSource().rotateCounterClockwise45();
        return new t(this.binarizer.createBinarizer(e))
    }
    ,
    t.prototype.toString = function() {
        try {
            return this.getBlackMatrix().toString()
        } catch {
            return ""
        }
    }
    ,
    t
}(), U2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), fr = function(t) {
    U2e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.getChecksumInstance = function() {
        return new e
    }
    ,
    e.kind = "ChecksumException",
    e
}(Nn), G2e = function() {
    function t(e) {
        this.source = e
    }
    return t.prototype.getLuminanceSource = function() {
        return this.source
    }
    ,
    t.prototype.getWidth = function() {
        return this.source.getWidth()
    }
    ,
    t.prototype.getHeight = function() {
        return this.source.getHeight()
    }
    ,
    t
}(), Ft = function() {
    function t() {}
    return t.arraycopy = function(e, r, n, i, o) {
        for (; o--; )
            n[i++] = e[r++]
    }
    ,
    t.currentTimeMillis = function() {
        return Date.now()
    }
    ,
    t
}(), H2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), OC = function(t) {
    H2e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.kind = "IndexOutOfBoundsException",
    e
}(Nn), V2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), i6 = function(t) {
    V2e(e, t);
    function e(r, n) {
        r === void 0 && (r = void 0),
        n === void 0 && (n = void 0);
        var i = t.call(this, n) || this;
        return i.index = r,
        i.message = n,
        i
    }
    return e.kind = "ArrayIndexOutOfBoundsException",
    e
}(OC), z2e = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, br = function() {
    function t() {}
    return t.fill = function(e, r) {
        for (var n = 0, i = e.length; n < i; n++)
            e[n] = r
    }
    ,
    t.fillWithin = function(e, r, n, i) {
        t.rangeCheck(e.length, r, n);
        for (var o = r; o < n; o++)
            e[o] = i
    }
    ,
    t.rangeCheck = function(e, r, n) {
        if (r > n)
            throw new Me("fromIndex(" + r + ") > toIndex(" + n + ")");
        if (r < 0)
            throw new i6(r);
        if (n > e)
            throw new i6(n)
    }
    ,
    t.asList = function() {
        for (var e = [], r = 0; r < arguments.length; r++)
            e[r] = arguments[r];
        return e
    }
    ,
    t.create = function(e, r, n) {
        var i = Array.from({
            length: e
        });
        return i.map(function(o) {
            return Array.from({
                length: r
            }).fill(n)
        })
    }
    ,
    t.createInt32Array = function(e, r, n) {
        var i = Array.from({
            length: e
        });
        return i.map(function(o) {
            return Int32Array.from({
                length: r
            }).fill(n)
        })
    }
    ,
    t.equals = function(e, r) {
        if (!e || !r || !e.length || !r.length || e.length !== r.length)
            return !1;
        for (var n = 0, i = e.length; n < i; n++)
            if (e[n] !== r[n])
                return !1;
        return !0
    }
    ,
    t.hashCode = function(e) {
        var r, n;
        if (e === null)
            return 0;
        var i = 1;
        try {
            for (var o = z2e(e), s = o.next(); !s.done; s = o.next()) {
                var a = s.value;
                i = 31 * i + a
            }
        } catch (l) {
            r = {
                error: l
            }
        } finally {
            try {
                s && !s.done && (n = o.return) && n.call(o)
            } finally {
                if (r)
                    throw r.error
            }
        }
        return i
    }
    ,
    t.fillUint8Array = function(e, r) {
        for (var n = 0; n !== e.length; n++)
            e[n] = r
    }
    ,
    t.copyOf = function(e, r) {
        return e.slice(0, r)
    }
    ,
    t.copyOfUint8Array = function(e, r) {
        if (e.length <= r) {
            var n = new Uint8Array(r);
            return n.set(e),
            n
        }
        return e.slice(0, r)
    }
    ,
    t.copyOfRange = function(e, r, n) {
        var i = n - r
          , o = new Int32Array(i);
        return Ft.arraycopy(e, r, o, 0, i),
        o
    }
    ,
    t.binarySearch = function(e, r, n) {
        n === void 0 && (n = t.numberComparator);
        for (var i = 0, o = e.length - 1; i <= o; ) {
            var s = o + i >> 1
              , a = n(r, e[s]);
            if (a > 0)
                i = s + 1;
            else if (a < 0)
                o = s - 1;
            else
                return s
        }
        return -i - 1
    }
    ,
    t.numberComparator = function(e, r) {
        return e - r
    }
    ,
    t
}(), qe = function() {
    function t() {}
    return t.numberOfTrailingZeros = function(e) {
        var r;
        if (e === 0)
            return 32;
        var n = 31;
        return r = e << 16,
        r !== 0 && (n -= 16,
        e = r),
        r = e << 8,
        r !== 0 && (n -= 8,
        e = r),
        r = e << 4,
        r !== 0 && (n -= 4,
        e = r),
        r = e << 2,
        r !== 0 && (n -= 2,
        e = r),
        n - (e << 1 >>> 31)
    }
    ,
    t.numberOfLeadingZeros = function(e) {
        if (e === 0)
            return 32;
        var r = 1;
        return e >>> 16 || (r += 16,
        e <<= 16),
        e >>> 24 || (r += 8,
        e <<= 8),
        e >>> 28 || (r += 4,
        e <<= 4),
        e >>> 30 || (r += 2,
        e <<= 2),
        r -= e >>> 31,
        r
    }
    ,
    t.toHexString = function(e) {
        return e.toString(16)
    }
    ,
    t.toBinaryString = function(e) {
        return String(parseInt(String(e), 2))
    }
    ,
    t.bitCount = function(e) {
        return e = e - (e >>> 1 & 1431655765),
        e = (e & 858993459) + (e >>> 2 & 858993459),
        e = e + (e >>> 4) & 252645135,
        e = e + (e >>> 8),
        e = e + (e >>> 16),
        e & 63
    }
    ,
    t.truncDivision = function(e, r) {
        return Math.trunc(e / r)
    }
    ,
    t.parseInt = function(e, r) {
        return r === void 0 && (r = void 0),
        parseInt(e, r)
    }
    ,
    t.MIN_VALUE_32_BITS = -2147483648,
    t.MAX_VALUE = Number.MAX_SAFE_INTEGER,
    t
}(), kr = function() {
    function t(e, r) {
        e === void 0 ? (this.size = 0,
        this.bits = new Int32Array(1)) : (this.size = e,
        r == null ? this.bits = t.makeArray(e) : this.bits = r)
    }
    return t.prototype.getSize = function() {
        return this.size
    }
    ,
    t.prototype.getSizeInBytes = function() {
        return Math.floor((this.size + 7) / 8)
    }
    ,
    t.prototype.ensureCapacity = function(e) {
        if (e > this.bits.length * 32) {
            var r = t.makeArray(e);
            Ft.arraycopy(this.bits, 0, r, 0, this.bits.length),
            this.bits = r
        }
    }
    ,
    t.prototype.get = function(e) {
        return (this.bits[Math.floor(e / 32)] & 1 << (e & 31)) !== 0
    }
    ,
    t.prototype.set = function(e) {
        this.bits[Math.floor(e / 32)] |= 1 << (e & 31)
    }
    ,
    t.prototype.flip = function(e) {
        this.bits[Math.floor(e / 32)] ^= 1 << (e & 31)
    }
    ,
    t.prototype.getNextSet = function(e) {
        var r = this.size;
        if (e >= r)
            return r;
        var n = this.bits
          , i = Math.floor(e / 32)
          , o = n[i];
        o &= ~((1 << (e & 31)) - 1);
        for (var s = n.length; o === 0; ) {
            if (++i === s)
                return r;
            o = n[i]
        }
        var a = i * 32 + qe.numberOfTrailingZeros(o);
        return a > r ? r : a
    }
    ,
    t.prototype.getNextUnset = function(e) {
        var r = this.size;
        if (e >= r)
            return r;
        var n = this.bits
          , i = Math.floor(e / 32)
          , o = ~n[i];
        o &= ~((1 << (e & 31)) - 1);
        for (var s = n.length; o === 0; ) {
            if (++i === s)
                return r;
            o = ~n[i]
        }
        var a = i * 32 + qe.numberOfTrailingZeros(o);
        return a > r ? r : a
    }
    ,
    t.prototype.setBulk = function(e, r) {
        this.bits[Math.floor(e / 32)] = r
    }
    ,
    t.prototype.setRange = function(e, r) {
        if (r < e || e < 0 || r > this.size)
            throw new Me;
        if (r !== e) {
            r--;
            for (var n = Math.floor(e / 32), i = Math.floor(r / 32), o = this.bits, s = n; s <= i; s++) {
                var a = s > n ? 0 : e & 31
                  , l = s < i ? 31 : r & 31
                  , c = (2 << l) - (1 << a);
                o[s] |= c
            }
        }
    }
    ,
    t.prototype.clear = function() {
        for (var e = this.bits.length, r = this.bits, n = 0; n < e; n++)
            r[n] = 0
    }
    ,
    t.prototype.isRange = function(e, r, n) {
        if (r < e || e < 0 || r > this.size)
            throw new Me;
        if (r === e)
            return !0;
        r--;
        for (var i = Math.floor(e / 32), o = Math.floor(r / 32), s = this.bits, a = i; a <= o; a++) {
            var l = a > i ? 0 : e & 31
              , c = a < o ? 31 : r & 31
              , u = (2 << c) - (1 << l) & 4294967295;
            if ((s[a] & u) !== (n ? u : 0))
                return !1
        }
        return !0
    }
    ,
    t.prototype.appendBit = function(e) {
        this.ensureCapacity(this.size + 1),
        e && (this.bits[Math.floor(this.size / 32)] |= 1 << (this.size & 31)),
        this.size++
    }
    ,
    t.prototype.appendBits = function(e, r) {
        if (r < 0 || r > 32)
            throw new Me("Num bits must be between 0 and 32");
        this.ensureCapacity(this.size + r);
        for (var n = r; n > 0; n--)
            this.appendBit((e >> n - 1 & 1) === 1)
    }
    ,
    t.prototype.appendBitArray = function(e) {
        var r = e.size;
        this.ensureCapacity(this.size + r);
        for (var n = 0; n < r; n++)
            this.appendBit(e.get(n))
    }
    ,
    t.prototype.xor = function(e) {
        if (this.size !== e.size)
            throw new Me("Sizes don't match");
        for (var r = this.bits, n = 0, i = r.length; n < i; n++)
            r[n] ^= e.bits[n]
    }
    ,
    t.prototype.toBytes = function(e, r, n, i) {
        for (var o = 0; o < i; o++) {
            for (var s = 0, a = 0; a < 8; a++)
                this.get(e) && (s |= 1 << 7 - a),
                e++;
            r[n + o] = s
        }
    }
    ,
    t.prototype.getBitArray = function() {
        return this.bits
    }
    ,
    t.prototype.reverse = function() {
        for (var e = new Int32Array(this.bits.length), r = Math.floor((this.size - 1) / 32), n = r + 1, i = this.bits, o = 0; o < n; o++) {
            var s = i[o];
            s = s >> 1 & 1431655765 | (s & 1431655765) << 1,
            s = s >> 2 & 858993459 | (s & 858993459) << 2,
            s = s >> 4 & 252645135 | (s & 252645135) << 4,
            s = s >> 8 & 16711935 | (s & 16711935) << 8,
            s = s >> 16 & 65535 | (s & 65535) << 16,
            e[r - o] = s
        }
        if (this.size !== n * 32) {
            for (var a = n * 32 - this.size, l = e[0] >>> a, o = 1; o < n; o++) {
                var c = e[o];
                l |= c << 32 - a,
                e[o - 1] = l,
                l = c >>> a
            }
            e[n - 1] = l
        }
        this.bits = e
    }
    ,
    t.makeArray = function(e) {
        return new Int32Array(Math.floor((e + 31) / 32))
    }
    ,
    t.prototype.equals = function(e) {
        if (!(e instanceof t))
            return !1;
        var r = e;
        return this.size === r.size && br.equals(this.bits, r.bits)
    }
    ,
    t.prototype.hashCode = function() {
        return 31 * this.size + br.hashCode(this.bits)
    }
    ,
    t.prototype.toString = function() {
        for (var e = "", r = 0, n = this.size; r < n; r++)
            r & 7 || (e += " "),
            e += this.get(r) ? "X" : ".";
        return e
    }
    ,
    t.prototype.clone = function() {
        return new t(this.size,this.bits.slice())
    }
    ,
    t.prototype.toArray = function() {
        for (var e = [], r = 0, n = this.size; r < n; r++)
            e.push(this.get(r));
        return e
    }
    ,
    t
}(), jE;
(function(t) {
    t[t.OTHER = 0] = "OTHER",
    t[t.PURE_BARCODE = 1] = "PURE_BARCODE",
    t[t.POSSIBLE_FORMATS = 2] = "POSSIBLE_FORMATS",
    t[t.TRY_HARDER = 3] = "TRY_HARDER",
    t[t.CHARACTER_SET = 4] = "CHARACTER_SET",
    t[t.ALLOWED_LENGTHS = 5] = "ALLOWED_LENGTHS",
    t[t.ASSUME_CODE_39_CHECK_DIGIT = 6] = "ASSUME_CODE_39_CHECK_DIGIT",
    t[t.ENABLE_CODE_39_EXTENDED_MODE = 7] = "ENABLE_CODE_39_EXTENDED_MODE",
    t[t.ASSUME_GS1 = 8] = "ASSUME_GS1",
    t[t.RETURN_CODABAR_START_END = 9] = "RETURN_CODABAR_START_END",
    t[t.NEED_RESULT_POINT_CALLBACK = 10] = "NEED_RESULT_POINT_CALLBACK",
    t[t.ALLOWED_EAN_EXTENSIONS = 11] = "ALLOWED_EAN_EXTENSIONS"
}
)(jE || (jE = {}));
const Pt = jE;
var j2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), ge = function(t) {
    j2e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.getFormatInstance = function() {
        return new e
    }
    ,
    e.kind = "FormatException",
    e
}(Nn), W2e = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, vt;
(function(t) {
    t[t.Cp437 = 0] = "Cp437",
    t[t.ISO8859_1 = 1] = "ISO8859_1",
    t[t.ISO8859_2 = 2] = "ISO8859_2",
    t[t.ISO8859_3 = 3] = "ISO8859_3",
    t[t.ISO8859_4 = 4] = "ISO8859_4",
    t[t.ISO8859_5 = 5] = "ISO8859_5",
    t[t.ISO8859_6 = 6] = "ISO8859_6",
    t[t.ISO8859_7 = 7] = "ISO8859_7",
    t[t.ISO8859_8 = 8] = "ISO8859_8",
    t[t.ISO8859_9 = 9] = "ISO8859_9",
    t[t.ISO8859_10 = 10] = "ISO8859_10",
    t[t.ISO8859_11 = 11] = "ISO8859_11",
    t[t.ISO8859_13 = 12] = "ISO8859_13",
    t[t.ISO8859_14 = 13] = "ISO8859_14",
    t[t.ISO8859_15 = 14] = "ISO8859_15",
    t[t.ISO8859_16 = 15] = "ISO8859_16",
    t[t.SJIS = 16] = "SJIS",
    t[t.Cp1250 = 17] = "Cp1250",
    t[t.Cp1251 = 18] = "Cp1251",
    t[t.Cp1252 = 19] = "Cp1252",
    t[t.Cp1256 = 20] = "Cp1256",
    t[t.UnicodeBigUnmarked = 21] = "UnicodeBigUnmarked",
    t[t.UTF8 = 22] = "UTF8",
    t[t.ASCII = 23] = "ASCII",
    t[t.Big5 = 24] = "Big5",
    t[t.GB18030 = 25] = "GB18030",
    t[t.EUC_KR = 26] = "EUC_KR"
}
)(vt || (vt = {}));
var _r = function() {
    function t(e, r, n) {
        for (var i, o, s = [], a = 3; a < arguments.length; a++)
            s[a - 3] = arguments[a];
        this.valueIdentifier = e,
        this.name = n,
        typeof r == "number" ? this.values = Int32Array.from([r]) : this.values = r,
        this.otherEncodingNames = s,
        t.VALUE_IDENTIFIER_TO_ECI.set(e, this),
        t.NAME_TO_ECI.set(n, this);
        for (var l = this.values, c = 0, u = l.length; c !== u; c++) {
            var f = l[c];
            t.VALUES_TO_ECI.set(f, this)
        }
        try {
            for (var d = W2e(s), h = d.next(); !h.done; h = d.next()) {
                var x = h.value;
                t.NAME_TO_ECI.set(x, this)
            }
        } catch (y) {
            i = {
                error: y
            }
        } finally {
            try {
                h && !h.done && (o = d.return) && o.call(d)
            } finally {
                if (i)
                    throw i.error
            }
        }
    }
    return t.prototype.getValueIdentifier = function() {
        return this.valueIdentifier
    }
    ,
    t.prototype.getName = function() {
        return this.name
    }
    ,
    t.prototype.getValue = function() {
        return this.values[0]
    }
    ,
    t.getCharacterSetECIByValue = function(e) {
        if (e < 0 || e >= 900)
            throw new ge("incorect value");
        var r = t.VALUES_TO_ECI.get(e);
        if (r === void 0)
            throw new ge("incorect value");
        return r
    }
    ,
    t.getCharacterSetECIByName = function(e) {
        var r = t.NAME_TO_ECI.get(e);
        if (r === void 0)
            throw new ge("incorect value");
        return r
    }
    ,
    t.prototype.equals = function(e) {
        if (!(e instanceof t))
            return !1;
        var r = e;
        return this.getName() === r.getName()
    }
    ,
    t.VALUE_IDENTIFIER_TO_ECI = new Map,
    t.VALUES_TO_ECI = new Map,
    t.NAME_TO_ECI = new Map,
    t.Cp437 = new t(vt.Cp437,Int32Array.from([0, 2]),"Cp437"),
    t.ISO8859_1 = new t(vt.ISO8859_1,Int32Array.from([1, 3]),"ISO-8859-1","ISO88591","ISO8859_1"),
    t.ISO8859_2 = new t(vt.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),
    t.ISO8859_3 = new t(vt.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),
    t.ISO8859_4 = new t(vt.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),
    t.ISO8859_5 = new t(vt.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),
    t.ISO8859_6 = new t(vt.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),
    t.ISO8859_7 = new t(vt.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),
    t.ISO8859_8 = new t(vt.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),
    t.ISO8859_9 = new t(vt.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),
    t.ISO8859_10 = new t(vt.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),
    t.ISO8859_11 = new t(vt.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),
    t.ISO8859_13 = new t(vt.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),
    t.ISO8859_14 = new t(vt.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),
    t.ISO8859_15 = new t(vt.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),
    t.ISO8859_16 = new t(vt.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),
    t.SJIS = new t(vt.SJIS,20,"SJIS","Shift_JIS"),
    t.Cp1250 = new t(vt.Cp1250,21,"Cp1250","windows-1250"),
    t.Cp1251 = new t(vt.Cp1251,22,"Cp1251","windows-1251"),
    t.Cp1252 = new t(vt.Cp1252,23,"Cp1252","windows-1252"),
    t.Cp1256 = new t(vt.Cp1256,24,"Cp1256","windows-1256"),
    t.UnicodeBigUnmarked = new t(vt.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),
    t.UTF8 = new t(vt.UTF8,26,"UTF8","UTF-8"),
    t.ASCII = new t(vt.ASCII,Int32Array.from([27, 170]),"ASCII","US-ASCII"),
    t.Big5 = new t(vt.Big5,28,"Big5"),
    t.GB18030 = new t(vt.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),
    t.EUC_KR = new t(vt.EUC_KR,30,"EUC_KR","EUC-KR"),
    t
}(), Y2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), lx = function(t) {
    Y2e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.kind = "UnsupportedOperationException",
    e
}(Nn), yi = function() {
    function t() {}
    return t.decode = function(e, r) {
        var n = this.encodingName(r);
        return this.customDecoder ? this.customDecoder(e, n) : typeof TextDecoder > "u" || this.shouldDecodeOnFallback(n) ? this.decodeFallback(e, n) : new TextDecoder(n).decode(e)
    }
    ,
    t.shouldDecodeOnFallback = function(e) {
        return !t.isBrowser() && e === "ISO-8859-1"
    }
    ,
    t.encode = function(e, r) {
        var n = this.encodingName(r);
        return this.customEncoder ? this.customEncoder(e, n) : typeof TextEncoder > "u" ? this.encodeFallback(e) : new TextEncoder().encode(e)
    }
    ,
    t.isBrowser = function() {
        return typeof window < "u" && {}.toString.call(window) === "[object Window]"
    }
    ,
    t.encodingName = function(e) {
        return typeof e == "string" ? e : e.getName()
    }
    ,
    t.encodingCharacterSet = function(e) {
        return e instanceof _r ? e : _r.getCharacterSetECIByName(e)
    }
    ,
    t.decodeFallback = function(e, r) {
        var n = this.encodingCharacterSet(r);
        if (t.isDecodeFallbackSupported(n)) {
            for (var i = "", o = 0, s = e.length; o < s; o++) {
                var a = e[o].toString(16);
                a.length < 2 && (a = "0" + a),
                i += "%" + a
            }
            return decodeURIComponent(i)
        }
        if (n.equals(_r.UnicodeBigUnmarked))
            return String.fromCharCode.apply(null, new Uint16Array(e.buffer));
        throw new lx("Encoding " + this.encodingName(r) + " not supported by fallback.")
    }
    ,
    t.isDecodeFallbackSupported = function(e) {
        return e.equals(_r.UTF8) || e.equals(_r.ISO8859_1) || e.equals(_r.ASCII)
    }
    ,
    t.encodeFallback = function(e) {
        for (var r = btoa(unescape(encodeURIComponent(e))), n = r.split(""), i = [], o = 0; o < n.length; o++)
            i.push(n[o].charCodeAt(0));
        return new Uint8Array(i)
    }
    ,
    t
}(), nt = function() {
    function t() {}
    return t.castAsNonUtf8Char = function(e, r) {
        r === void 0 && (r = null);
        var n = r ? r.getName() : this.ISO88591;
        return yi.decode(new Uint8Array([e]), n)
    }
    ,
    t.guessEncoding = function(e, r) {
        if (r != null && r.get(Pt.CHARACTER_SET) !== void 0)
            return r.get(Pt.CHARACTER_SET).toString();
        for (var n = e.length, i = !0, o = !0, s = !0, a = 0, l = 0, c = 0, u = 0, f = 0, d = 0, h = 0, x = 0, y = 0, m = 0, E = 0, g = e.length > 3 && e[0] === 239 && e[1] === 187 && e[2] === 191, p = 0; p < n && (i || o || s); p++) {
            var v = e[p] & 255;
            s && (a > 0 ? v & 128 ? a-- : s = !1 : v & 128 && (v & 64 ? (a++,
            v & 32 ? (a++,
            v & 16 ? (a++,
            v & 8 ? s = !1 : u++) : c++) : l++) : s = !1)),
            i && (v > 127 && v < 160 ? i = !1 : v > 159 && (v < 192 || v === 215 || v === 247) && E++),
            o && (f > 0 ? v < 64 || v === 127 || v > 252 ? o = !1 : f-- : v === 128 || v === 160 || v > 239 ? o = !1 : v > 160 && v < 224 ? (d++,
            x = 0,
            h++,
            h > y && (y = h)) : v > 127 ? (f++,
            h = 0,
            x++,
            x > m && (m = x)) : (h = 0,
            x = 0))
        }
        return s && a > 0 && (s = !1),
        o && f > 0 && (o = !1),
        s && (g || l + c + u > 0) ? t.UTF8 : o && (t.ASSUME_SHIFT_JIS || y >= 3 || m >= 3) ? t.SHIFT_JIS : i && o ? y === 2 && d === 2 || E * 10 >= n ? t.SHIFT_JIS : t.ISO88591 : i ? t.ISO88591 : o ? t.SHIFT_JIS : s ? t.UTF8 : t.PLATFORM_DEFAULT_ENCODING
    }
    ,
    t.format = function(e) {
        for (var r = [], n = 1; n < arguments.length; n++)
            r[n - 1] = arguments[n];
        var i = -1;
        function o(a, l, c, u, f, d) {
            if (a === "%%")
                return "%";
            if (r[++i] !== void 0) {
                a = u ? parseInt(u.substr(1)) : void 0;
                var h = f ? parseInt(f.substr(1)) : void 0, x;
                switch (d) {
                case "s":
                    x = r[i];
                    break;
                case "c":
                    x = r[i][0];
                    break;
                case "f":
                    x = parseFloat(r[i]).toFixed(a);
                    break;
                case "p":
                    x = parseFloat(r[i]).toPrecision(a);
                    break;
                case "e":
                    x = parseFloat(r[i]).toExponential(a);
                    break;
                case "x":
                    x = parseInt(r[i]).toString(h || 16);
                    break;
                case "d":
                    x = parseFloat(parseInt(r[i], h || 10).toPrecision(a)).toFixed(0);
                    break
                }
                x = typeof x == "object" ? JSON.stringify(x) : (+x).toString(h);
                for (var y = parseInt(c), m = c && c[0] + "" == "0" ? "0" : " "; x.length < y; )
                    x = l !== void 0 ? x + m : m + x;
                return x
            }
        }
        var s = /%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;
        return e.replace(s, o)
    }
    ,
    t.getBytes = function(e, r) {
        return yi.encode(e, r)
    }
    ,
    t.getCharCode = function(e, r) {
        return r === void 0 && (r = 0),
        e.charCodeAt(r)
    }
    ,
    t.getCharAt = function(e) {
        return String.fromCharCode(e)
    }
    ,
    t.SHIFT_JIS = _r.SJIS.getName(),
    t.GB2312 = "GB2312",
    t.ISO88591 = _r.ISO8859_1.getName(),
    t.EUC_JP = "EUC_JP",
    t.UTF8 = _r.UTF8.getName(),
    t.PLATFORM_DEFAULT_ENCODING = t.UTF8,
    t.ASSUME_SHIFT_JIS = !1,
    t
}(), Ke = function() {
    function t(e) {
        e === void 0 && (e = ""),
        this.value = e
    }
    return t.prototype.enableDecoding = function(e) {
        return this.encoding = e,
        this
    }
    ,
    t.prototype.append = function(e) {
        return typeof e == "string" ? this.value += e.toString() : this.encoding ? this.value += nt.castAsNonUtf8Char(e, this.encoding) : this.value += String.fromCharCode(e),
        this
    }
    ,
    t.prototype.appendChars = function(e, r, n) {
        for (var i = r; r < r + n; i++)
            this.append(e[i]);
        return this
    }
    ,
    t.prototype.length = function() {
        return this.value.length
    }
    ,
    t.prototype.charAt = function(e) {
        return this.value.charAt(e)
    }
    ,
    t.prototype.deleteCharAt = function(e) {
        this.value = this.value.substr(0, e) + this.value.substring(e + 1)
    }
    ,
    t.prototype.setCharAt = function(e, r) {
        this.value = this.value.substr(0, e) + r + this.value.substr(e + 1)
    }
    ,
    t.prototype.substring = function(e, r) {
        return this.value.substring(e, r)
    }
    ,
    t.prototype.setLengthToZero = function() {
        this.value = ""
    }
    ,
    t.prototype.toString = function() {
        return this.value
    }
    ,
    t.prototype.insert = function(e, r) {
        this.value = this.value.substring(0, e) + r + this.value.substring(e)
    }
    ,
    t
}(), Do = function() {
    function t(e, r, n, i) {
        if (this.width = e,
        this.height = r,
        this.rowSize = n,
        this.bits = i,
        r == null && (r = e),
        this.height = r,
        e < 1 || r < 1)
            throw new Me("Both dimensions must be greater than 0");
        n == null && (n = Math.floor((e + 31) / 32)),
        this.rowSize = n,
        i == null && (this.bits = new Int32Array(this.rowSize * this.height))
    }
    return t.parseFromBooleanArray = function(e) {
        for (var r = e.length, n = e[0].length, i = new t(n,r), o = 0; o < r; o++)
            for (var s = e[o], a = 0; a < n; a++)
                s[a] && i.set(a, o);
        return i
    }
    ,
    t.parseFromString = function(e, r, n) {
        if (e === null)
            throw new Me("stringRepresentation cannot be null");
        for (var i = new Array(e.length), o = 0, s = 0, a = -1, l = 0, c = 0; c < e.length; )
            if (e.charAt(c) === `
` || e.charAt(c) === "\r") {
                if (o > s) {
                    if (a === -1)
                        a = o - s;
                    else if (o - s !== a)
                        throw new Me("row lengths do not match");
                    s = o,
                    l++
                }
                c++
            } else if (e.substring(c, c + r.length) === r)
                c += r.length,
                i[o] = !0,
                o++;
            else if (e.substring(c, c + n.length) === n)
                c += n.length,
                i[o] = !1,
                o++;
            else
                throw new Me("illegal character encountered: " + e.substring(c));
        if (o > s) {
            if (a === -1)
                a = o - s;
            else if (o - s !== a)
                throw new Me("row lengths do not match");
            l++
        }
        for (var u = new t(a,l), f = 0; f < o; f++)
            i[f] && u.set(Math.floor(f % a), Math.floor(f / a));
        return u
    }
    ,
    t.prototype.get = function(e, r) {
        var n = r * this.rowSize + Math.floor(e / 32);
        return (this.bits[n] >>> (e & 31) & 1) !== 0
    }
    ,
    t.prototype.set = function(e, r) {
        var n = r * this.rowSize + Math.floor(e / 32);
        this.bits[n] |= 1 << (e & 31) & 4294967295
    }
    ,
    t.prototype.unset = function(e, r) {
        var n = r * this.rowSize + Math.floor(e / 32);
        this.bits[n] &= ~(1 << (e & 31) & 4294967295)
    }
    ,
    t.prototype.flip = function(e, r) {
        var n = r * this.rowSize + Math.floor(e / 32);
        this.bits[n] ^= 1 << (e & 31) & 4294967295
    }
    ,
    t.prototype.xor = function(e) {
        if (this.width !== e.getWidth() || this.height !== e.getHeight() || this.rowSize !== e.getRowSize())
            throw new Me("input matrix dimensions do not match");
        for (var r = new kr(Math.floor(this.width / 32) + 1), n = this.rowSize, i = this.bits, o = 0, s = this.height; o < s; o++)
            for (var a = o * n, l = e.getRow(o, r).getBitArray(), c = 0; c < n; c++)
                i[a + c] ^= l[c]
    }
    ,
    t.prototype.clear = function() {
        for (var e = this.bits, r = e.length, n = 0; n < r; n++)
            e[n] = 0
    }
    ,
    t.prototype.setRegion = function(e, r, n, i) {
        if (r < 0 || e < 0)
            throw new Me("Left and top must be nonnegative");
        if (i < 1 || n < 1)
            throw new Me("Height and width must be at least 1");
        var o = e + n
          , s = r + i;
        if (s > this.height || o > this.width)
            throw new Me("The region must fit inside the matrix");
        for (var a = this.rowSize, l = this.bits, c = r; c < s; c++)
            for (var u = c * a, f = e; f < o; f++)
                l[u + Math.floor(f / 32)] |= 1 << (f & 31) & 4294967295
    }
    ,
    t.prototype.getRow = function(e, r) {
        r == null || r.getSize() < this.width ? r = new kr(this.width) : r.clear();
        for (var n = this.rowSize, i = this.bits, o = e * n, s = 0; s < n; s++)
            r.setBulk(s * 32, i[o + s]);
        return r
    }
    ,
    t.prototype.setRow = function(e, r) {
        Ft.arraycopy(r.getBitArray(), 0, this.bits, e * this.rowSize, this.rowSize)
    }
    ,
    t.prototype.rotate180 = function() {
        for (var e = this.getWidth(), r = this.getHeight(), n = new kr(e), i = new kr(e), o = 0, s = Math.floor((r + 1) / 2); o < s; o++)
            n = this.getRow(o, n),
            i = this.getRow(r - 1 - o, i),
            n.reverse(),
            i.reverse(),
            this.setRow(o, i),
            this.setRow(r - 1 - o, n)
    }
    ,
    t.prototype.getEnclosingRectangle = function() {
        for (var e = this.width, r = this.height, n = this.rowSize, i = this.bits, o = e, s = r, a = -1, l = -1, c = 0; c < r; c++)
            for (var u = 0; u < n; u++) {
                var f = i[c * n + u];
                if (f !== 0) {
                    if (c < s && (s = c),
                    c > l && (l = c),
                    u * 32 < o) {
                        for (var d = 0; !(f << 31 - d & 4294967295); )
                            d++;
                        u * 32 + d < o && (o = u * 32 + d)
                    }
                    if (u * 32 + 31 > a) {
                        for (var d = 31; !(f >>> d); )
                            d--;
                        u * 32 + d > a && (a = u * 32 + d)
                    }
                }
            }
        return a < o || l < s ? null : Int32Array.from([o, s, a - o + 1, l - s + 1])
    }
    ,
    t.prototype.getTopLeftOnBit = function() {
        for (var e = this.rowSize, r = this.bits, n = 0; n < r.length && r[n] === 0; )
            n++;
        if (n === r.length)
            return null;
        for (var i = n / e, o = n % e * 32, s = r[n], a = 0; !(s << 31 - a & 4294967295); )
            a++;
        return o += a,
        Int32Array.from([o, i])
    }
    ,
    t.prototype.getBottomRightOnBit = function() {
        for (var e = this.rowSize, r = this.bits, n = r.length - 1; n >= 0 && r[n] === 0; )
            n--;
        if (n < 0)
            return null;
        for (var i = Math.floor(n / e), o = Math.floor(n % e) * 32, s = r[n], a = 31; !(s >>> a); )
            a--;
        return o += a,
        Int32Array.from([o, i])
    }
    ,
    t.prototype.getWidth = function() {
        return this.width
    }
    ,
    t.prototype.getHeight = function() {
        return this.height
    }
    ,
    t.prototype.getRowSize = function() {
        return this.rowSize
    }
    ,
    t.prototype.equals = function(e) {
        if (!(e instanceof t))
            return !1;
        var r = e;
        return this.width === r.width && this.height === r.height && this.rowSize === r.rowSize && br.equals(this.bits, r.bits)
    }
    ,
    t.prototype.hashCode = function() {
        var e = this.width;
        return e = 31 * e + this.width,
        e = 31 * e + this.height,
        e = 31 * e + this.rowSize,
        e = 31 * e + br.hashCode(this.bits),
        e
    }
    ,
    t.prototype.toString = function(e, r, n) {
        return e === void 0 && (e = "X "),
        r === void 0 && (r = "  "),
        n === void 0 && (n = `
`),
        this.buildToString(e, r, n)
    }
    ,
    t.prototype.buildToString = function(e, r, n) {
        for (var i = new Ke, o = 0, s = this.height; o < s; o++) {
            for (var a = 0, l = this.width; a < l; a++)
                i.append(this.get(a, o) ? e : r);
            i.append(n)
        }
        return i.toString()
    }
    ,
    t.prototype.clone = function() {
        return new t(this.width,this.height,this.rowSize,this.bits.slice())
    }
    ,
    t
}(), X2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), le = function(t) {
    X2e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.getNotFoundInstance = function() {
        return new e
    }
    ,
    e.kind = "NotFoundException",
    e
}(Nn), K2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), q2e = function(t) {
    K2e(e, t);
    function e(r) {
        var n = t.call(this, r) || this;
        return n.luminances = e.EMPTY,
        n.buckets = new Int32Array(e.LUMINANCE_BUCKETS),
        n
    }
    return e.prototype.getBlackRow = function(r, n) {
        var i = this.getLuminanceSource()
          , o = i.getWidth();
        n == null || n.getSize() < o ? n = new kr(o) : n.clear(),
        this.initArrays(o);
        for (var s = i.getRow(r, this.luminances), a = this.buckets, l = 0; l < o; l++)
            a[(s[l] & 255) >> e.LUMINANCE_SHIFT]++;
        var c = e.estimateBlackPoint(a);
        if (o < 3)
            for (var l = 0; l < o; l++)
                (s[l] & 255) < c && n.set(l);
        else
            for (var u = s[0] & 255, f = s[1] & 255, l = 1; l < o - 1; l++) {
                var d = s[l + 1] & 255;
                (f * 4 - u - d) / 2 < c && n.set(l),
                u = f,
                f = d
            }
        return n
    }
    ,
    e.prototype.getBlackMatrix = function() {
        var r = this.getLuminanceSource()
          , n = r.getWidth()
          , i = r.getHeight()
          , o = new Do(n,i);
        this.initArrays(n);
        for (var s = this.buckets, a = 1; a < 5; a++)
            for (var l = Math.floor(i * a / 5), c = r.getRow(l, this.luminances), u = Math.floor(n * 4 / 5), f = Math.floor(n / 5); f < u; f++) {
                var d = c[f] & 255;
                s[d >> e.LUMINANCE_SHIFT]++
            }
        for (var h = e.estimateBlackPoint(s), x = r.getMatrix(), a = 0; a < i; a++)
            for (var y = a * n, f = 0; f < n; f++) {
                var d = x[y + f] & 255;
                d < h && o.set(f, a)
            }
        return o
    }
    ,
    e.prototype.createBinarizer = function(r) {
        return new e(r)
    }
    ,
    e.prototype.initArrays = function(r) {
        this.luminances.length < r && (this.luminances = new Uint8ClampedArray(r));
        for (var n = this.buckets, i = 0; i < e.LUMINANCE_BUCKETS; i++)
            n[i] = 0
    }
    ,
    e.estimateBlackPoint = function(r) {
        for (var n = r.length, i = 0, o = 0, s = 0, a = 0; a < n; a++)
            r[a] > s && (o = a,
            s = r[a]),
            r[a] > i && (i = r[a]);
        for (var l = 0, c = 0, a = 0; a < n; a++) {
            var u = a - o
              , f = r[a] * u * u;
            f > c && (l = a,
            c = f)
        }
        if (o > l) {
            var d = o;
            o = l,
            l = d
        }
        if (l - o <= n / 16)
            throw new le;
        for (var h = l - 1, x = -1, a = l - 1; a > o; a--) {
            var y = a - o
              , f = y * y * (l - a) * (i - r[a]);
            f > x && (h = a,
            x = f)
        }
        return h << e.LUMINANCE_SHIFT
    }
    ,
    e.LUMINANCE_BITS = 5,
    e.LUMINANCE_SHIFT = 8 - e.LUMINANCE_BITS,
    e.LUMINANCE_BUCKETS = 1 << e.LUMINANCE_BITS,
    e.EMPTY = Uint8ClampedArray.from([0]),
    e
}(G2e), Z2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), FM = function(t) {
    Z2e(e, t);
    function e(r) {
        var n = t.call(this, r) || this;
        return n.matrix = null,
        n
    }
    return e.prototype.getBlackMatrix = function() {
        if (this.matrix !== null)
            return this.matrix;
        var r = this.getLuminanceSource()
          , n = r.getWidth()
          , i = r.getHeight();
        if (n >= e.MINIMUM_DIMENSION && i >= e.MINIMUM_DIMENSION) {
            var o = r.getMatrix()
              , s = n >> e.BLOCK_SIZE_POWER;
            n & e.BLOCK_SIZE_MASK && s++;
            var a = i >> e.BLOCK_SIZE_POWER;
            i & e.BLOCK_SIZE_MASK && a++;
            var l = e.calculateBlackPoints(o, s, a, n, i)
              , c = new Do(n,i);
            e.calculateThresholdForBlock(o, s, a, n, i, l, c),
            this.matrix = c
        } else
            this.matrix = t.prototype.getBlackMatrix.call(this);
        return this.matrix
    }
    ,
    e.prototype.createBinarizer = function(r) {
        return new e(r)
    }
    ,
    e.calculateThresholdForBlock = function(r, n, i, o, s, a, l) {
        for (var c = s - e.BLOCK_SIZE, u = o - e.BLOCK_SIZE, f = 0; f < i; f++) {
            var d = f << e.BLOCK_SIZE_POWER;
            d > c && (d = c);
            for (var h = e.cap(f, 2, i - 3), x = 0; x < n; x++) {
                var y = x << e.BLOCK_SIZE_POWER;
                y > u && (y = u);
                for (var m = e.cap(x, 2, n - 3), E = 0, g = -2; g <= 2; g++) {
                    var p = a[h + g];
                    E += p[m - 2] + p[m - 1] + p[m] + p[m + 1] + p[m + 2]
                }
                var v = E / 25;
                e.thresholdBlock(r, y, d, v, o, l)
            }
        }
    }
    ,
    e.cap = function(r, n, i) {
        return r < n ? n : r > i ? i : r
    }
    ,
    e.thresholdBlock = function(r, n, i, o, s, a) {
        for (var l = 0, c = i * s + n; l < e.BLOCK_SIZE; l++,
        c += s)
            for (var u = 0; u < e.BLOCK_SIZE; u++)
                (r[c + u] & 255) <= o && a.set(n + u, i + l)
    }
    ,
    e.calculateBlackPoints = function(r, n, i, o, s) {
        for (var a = s - e.BLOCK_SIZE, l = o - e.BLOCK_SIZE, c = new Array(i), u = 0; u < i; u++) {
            c[u] = new Int32Array(n);
            var f = u << e.BLOCK_SIZE_POWER;
            f > a && (f = a);
            for (var d = 0; d < n; d++) {
                var h = d << e.BLOCK_SIZE_POWER;
                h > l && (h = l);
                for (var x = 0, y = 255, m = 0, E = 0, g = f * o + h; E < e.BLOCK_SIZE; E++,
                g += o) {
                    for (var p = 0; p < e.BLOCK_SIZE; p++) {
                        var v = r[g + p] & 255;
                        x += v,
                        v < y && (y = v),
                        v > m && (m = v)
                    }
                    if (m - y > e.MIN_DYNAMIC_RANGE)
                        for (E++,
                        g += o; E < e.BLOCK_SIZE; E++,
                        g += o)
                            for (var p = 0; p < e.BLOCK_SIZE; p++)
                                x += r[g + p] & 255
                }
                var _ = x >> e.BLOCK_SIZE_POWER * 2;
                if (m - y <= e.MIN_DYNAMIC_RANGE && (_ = y / 2,
                u > 0 && d > 0)) {
                    var b = (c[u - 1][d] + 2 * c[u][d - 1] + c[u - 1][d - 1]) / 4;
                    y < b && (_ = b)
                }
                c[u][d] = _
            }
        }
        return c
    }
    ,
    e.BLOCK_SIZE_POWER = 3,
    e.BLOCK_SIZE = 1 << e.BLOCK_SIZE_POWER,
    e.BLOCK_SIZE_MASK = e.BLOCK_SIZE - 1,
    e.MINIMUM_DIMENSION = e.BLOCK_SIZE * 5,
    e.MIN_DYNAMIC_RANGE = 24,
    e
}(q2e), Cd = function() {
    function t(e, r) {
        this.width = e,
        this.height = r
    }
    return t.prototype.getWidth = function() {
        return this.width
    }
    ,
    t.prototype.getHeight = function() {
        return this.height
    }
    ,
    t.prototype.isCropSupported = function() {
        return !1
    }
    ,
    t.prototype.crop = function(e, r, n, i) {
        throw new lx("This luminance source does not support cropping.")
    }
    ,
    t.prototype.isRotateSupported = function() {
        return !1
    }
    ,
    t.prototype.rotateCounterClockwise = function() {
        throw new lx("This luminance source does not support rotation by 90 degrees.")
    }
    ,
    t.prototype.rotateCounterClockwise45 = function() {
        throw new lx("This luminance source does not support rotation by 45 degrees.")
    }
    ,
    t.prototype.toString = function() {
        for (var e = new Uint8ClampedArray(this.width), r = new Ke, n = 0; n < this.height; n++) {
            for (var i = this.getRow(n, e), o = 0; o < this.width; o++) {
                var s = i[o] & 255
                  , a = void 0;
                s < 64 ? a = "#" : s < 128 ? a = "+" : s < 192 ? a = "." : a = " ",
                r.append(a)
            }
            r.append(`
`)
        }
        return r.toString()
    }
    ,
    t
}(), J2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), $1 = function(t) {
    J2e(e, t);
    function e(r) {
        var n = t.call(this, r.getWidth(), r.getHeight()) || this;
        return n.delegate = r,
        n
    }
    return e.prototype.getRow = function(r, n) {
        for (var i = this.delegate.getRow(r, n), o = this.getWidth(), s = 0; s < o; s++)
            i[s] = 255 - (i[s] & 255);
        return i
    }
    ,
    e.prototype.getMatrix = function() {
        for (var r = this.delegate.getMatrix(), n = this.getWidth() * this.getHeight(), i = new Uint8ClampedArray(n), o = 0; o < n; o++)
            i[o] = 255 - (r[o] & 255);
        return i
    }
    ,
    e.prototype.isCropSupported = function() {
        return this.delegate.isCropSupported()
    }
    ,
    e.prototype.crop = function(r, n, i, o) {
        return new e(this.delegate.crop(r, n, i, o))
    }
    ,
    e.prototype.isRotateSupported = function() {
        return this.delegate.isRotateSupported()
    }
    ,
    e.prototype.invert = function() {
        return this.delegate
    }
    ,
    e.prototype.rotateCounterClockwise = function() {
        return new e(this.delegate.rotateCounterClockwise())
    }
    ,
    e.prototype.rotateCounterClockwise45 = function() {
        return new e(this.delegate.rotateCounterClockwise45())
    }
    ,
    e
}(Cd), Q2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), ebe = function(t) {
    Q2e(e, t);
    function e(r, n) {
        n === void 0 && (n = !1);
        var i = t.call(this, r.width, r.height) || this;
        return i.canvas = r,
        i.tempCanvasElement = null,
        i.buffer = e.makeBufferFromCanvasImageData(r, n),
        i
    }
    return e.makeBufferFromCanvasImageData = function(r, n) {
        n === void 0 && (n = !1);
        var i = r.getContext("2d").getImageData(0, 0, r.width, r.height);
        return e.toGrayscaleBuffer(i.data, r.width, r.height, n)
    }
    ,
    e.toGrayscaleBuffer = function(r, n, i, o) {
        o === void 0 && (o = !1);
        var s = new Uint8ClampedArray(n * i);
        if (e.FRAME_INDEX = !e.FRAME_INDEX,
        e.FRAME_INDEX || !o)
            for (var a = 0, l = 0, c = r.length; a < c; a += 4,
            l++) {
                var u = void 0
                  , f = r[a + 3];
                if (f === 0)
                    u = 255;
                else {
                    var d = r[a]
                      , h = r[a + 1]
                      , x = r[a + 2];
                    u = 306 * d + 601 * h + 117 * x + 512 >> 10
                }
                s[l] = u
            }
        else
            for (var a = 0, l = 0, y = r.length; a < y; a += 4,
            l++) {
                var u = void 0
                  , f = r[a + 3];
                if (f === 0)
                    u = 255;
                else {
                    var d = r[a]
                      , h = r[a + 1]
                      , x = r[a + 2];
                    u = 306 * d + 601 * h + 117 * x + 512 >> 10
                }
                s[l] = 255 - u
            }
        return s
    }
    ,
    e.prototype.getRow = function(r, n) {
        if (r < 0 || r >= this.getHeight())
            throw new Me("Requested row is outside the image: " + r);
        var i = this.getWidth()
          , o = r * i;
        return n === null ? n = this.buffer.slice(o, o + i) : (n.length < i && (n = new Uint8ClampedArray(i)),
        n.set(this.buffer.slice(o, o + i))),
        n
    }
    ,
    e.prototype.getMatrix = function() {
        return this.buffer
    }
    ,
    e.prototype.isCropSupported = function() {
        return !0
    }
    ,
    e.prototype.crop = function(r, n, i, o) {
        return t.prototype.crop.call(this, r, n, i, o),
        this
    }
    ,
    e.prototype.isRotateSupported = function() {
        return !0
    }
    ,
    e.prototype.rotateCounterClockwise = function() {
        return this.rotate(-90),
        this
    }
    ,
    e.prototype.rotateCounterClockwise45 = function() {
        return this.rotate(-45),
        this
    }
    ,
    e.prototype.getTempCanvasElement = function() {
        if (this.tempCanvasElement === null) {
            var r = this.canvas.ownerDocument.createElement("canvas");
            r.width = this.canvas.width,
            r.height = this.canvas.height,
            this.tempCanvasElement = r
        }
        return this.tempCanvasElement
    }
    ,
    e.prototype.rotate = function(r) {
        var n = this.getTempCanvasElement()
          , i = n.getContext("2d")
          , o = r * e.DEGREE_TO_RADIANS
          , s = this.canvas.width
          , a = this.canvas.height
          , l = Math.ceil(Math.abs(Math.cos(o)) * s + Math.abs(Math.sin(o)) * a)
          , c = Math.ceil(Math.abs(Math.sin(o)) * s + Math.abs(Math.cos(o)) * a);
        return n.width = l,
        n.height = c,
        i.translate(l / 2, c / 2),
        i.rotate(o),
        i.drawImage(this.canvas, s / -2, a / -2),
        this.buffer = e.makeBufferFromCanvasImageData(n),
        this
    }
    ,
    e.prototype.invert = function() {
        return new $1(this)
    }
    ,
    e.DEGREE_TO_RADIANS = Math.PI / 180,
    e.FRAME_INDEX = !0,
    e
}(Cd), tbe = function() {
    function t(e, r, n) {
        this.deviceId = e,
        this.label = r,
        this.kind = "videoinput",
        this.groupId = n || void 0
    }
    return t.prototype.toJSON = function() {
        return {
            kind: this.kind,
            groupId: this.groupId,
            deviceId: this.deviceId,
            label: this.label
        }
    }
    ,
    t
}(), sn = globalThis && globalThis.__awaiter || function(t, e, r, n) {
    function i(o) {
        return o instanceof r ? o : new r(function(s) {
            s(o)
        }
        )
    }
    return new (r || (r = Promise))(function(o, s) {
        function a(u) {
            try {
                c(n.next(u))
            } catch (f) {
                s(f)
            }
        }
        function l(u) {
            try {
                c(n.throw(u))
            } catch (f) {
                s(f)
            }
        }
        function c(u) {
            u.done ? o(u.value) : i(u.value).then(a, l)
        }
        c((n = n.apply(t, e || [])).next())
    }
    )
}
, an = globalThis && globalThis.__generator || function(t, e) {
    var r = {
        label: 0,
        sent: function() {
            if (o[0] & 1)
                throw o[1];
            return o[1]
        },
        trys: [],
        ops: []
    }, n, i, o, s;
    return s = {
        next: a(0),
        throw: a(1),
        return: a(2)
    },
    typeof Symbol == "function" && (s[Symbol.iterator] = function() {
        return this
    }
    ),
    s;
    function a(c) {
        return function(u) {
            return l([c, u])
        }
    }
    function l(c) {
        if (n)
            throw new TypeError("Generator is already executing.");
        for (; r; )
            try {
                if (n = 1,
                i && (o = c[0] & 2 ? i.return : c[0] ? i.throw || ((o = i.return) && o.call(i),
                0) : i.next) && !(o = o.call(i, c[1])).done)
                    return o;
                switch (i = 0,
                o && (c = [c[0] & 2, o.value]),
                c[0]) {
                case 0:
                case 1:
                    o = c;
                    break;
                case 4:
                    return r.label++,
                    {
                        value: c[1],
                        done: !1
                    };
                case 5:
                    r.label++,
                    i = c[1],
                    c = [0];
                    continue;
                case 7:
                    c = r.ops.pop(),
                    r.trys.pop();
                    continue;
                default:
                    if (o = r.trys,
                    !(o = o.length > 0 && o[o.length - 1]) && (c[0] === 6 || c[0] === 2)) {
                        r = 0;
                        continue
                    }
                    if (c[0] === 3 && (!o || c[1] > o[0] && c[1] < o[3])) {
                        r.label = c[1];
                        break
                    }
                    if (c[0] === 6 && r.label < o[1]) {
                        r.label = o[1],
                        o = c;
                        break
                    }
                    if (o && r.label < o[2]) {
                        r.label = o[2],
                        r.ops.push(c);
                        break
                    }
                    o[2] && r.ops.pop(),
                    r.trys.pop();
                    continue
                }
                c = e.call(t, r)
            } catch (u) {
                c = [6, u],
                i = 0
            } finally {
                n = o = 0
            }
        if (c[0] & 5)
            throw c[1];
        return {
            value: c[0] ? c[1] : void 0,
            done: !0
        }
    }
}
, rbe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, Mu = function() {
    function t(e, r, n) {
        r === void 0 && (r = 500),
        this.reader = e,
        this.timeBetweenScansMillis = r,
        this._hints = n,
        this._stopContinuousDecode = !1,
        this._stopAsyncDecode = !1,
        this._timeBetweenDecodingAttempts = 0
    }
    return Object.defineProperty(t.prototype, "hasNavigator", {
        get: function() {
            return typeof navigator < "u"
        },
        enumerable: !1,
        configurable: !0
    }),
    Object.defineProperty(t.prototype, "isMediaDevicesSuported", {
        get: function() {
            return this.hasNavigator && !!navigator.mediaDevices
        },
        enumerable: !1,
        configurable: !0
    }),
    Object.defineProperty(t.prototype, "canEnumerateDevices", {
        get: function() {
            return !!(this.isMediaDevicesSuported && navigator.mediaDevices.enumerateDevices)
        },
        enumerable: !1,
        configurable: !0
    }),
    Object.defineProperty(t.prototype, "timeBetweenDecodingAttempts", {
        get: function() {
            return this._timeBetweenDecodingAttempts
        },
        set: function(e) {
            this._timeBetweenDecodingAttempts = e < 0 ? 0 : e
        },
        enumerable: !1,
        configurable: !0
    }),
    Object.defineProperty(t.prototype, "hints", {
        get: function() {
            return this._hints
        },
        set: function(e) {
            this._hints = e || null
        },
        enumerable: !1,
        configurable: !0
    }),
    t.prototype.listVideoInputDevices = function() {
        return sn(this, void 0, void 0, function() {
            var e, r, n, i, o, s, a, l, c, u, f, d;
            return an(this, function(h) {
                switch (h.label) {
                case 0:
                    if (!this.hasNavigator)
                        throw new Error("Can't enumerate devices, navigator is not present.");
                    if (!this.canEnumerateDevices)
                        throw new Error("Can't enumerate devices, method not supported.");
                    return [4, navigator.mediaDevices.enumerateDevices()];
                case 1:
                    e = h.sent(),
                    r = [];
                    try {
                        for (n = rbe(e),
                        i = n.next(); !i.done; i = n.next())
                            o = i.value,
                            s = o.kind === "video" ? "videoinput" : o.kind,
                            s === "videoinput" && (a = o.deviceId || o.id,
                            l = o.label || "Video device " + (r.length + 1),
                            c = o.groupId,
                            u = {
                                deviceId: a,
                                label: l,
                                kind: s,
                                groupId: c
                            },
                            r.push(u))
                    } catch (x) {
                        f = {
                            error: x
                        }
                    } finally {
                        try {
                            i && !i.done && (d = n.return) && d.call(n)
                        } finally {
                            if (f)
                                throw f.error
                        }
                    }
                    return [2, r]
                }
            })
        })
    }
    ,
    t.prototype.getVideoInputDevices = function() {
        return sn(this, void 0, void 0, function() {
            var e;
            return an(this, function(r) {
                switch (r.label) {
                case 0:
                    return [4, this.listVideoInputDevices()];
                case 1:
                    return e = r.sent(),
                    [2, e.map(function(n) {
                        return new tbe(n.deviceId,n.label)
                    })]
                }
            })
        })
    }
    ,
    t.prototype.findDeviceById = function(e) {
        return sn(this, void 0, void 0, function() {
            var r;
            return an(this, function(n) {
                switch (n.label) {
                case 0:
                    return [4, this.listVideoInputDevices()];
                case 1:
                    return r = n.sent(),
                    r ? [2, r.find(function(i) {
                        return i.deviceId === e
                    })] : [2, null]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromInputVideoDevice = function(e, r) {
        return sn(this, void 0, void 0, function() {
            return an(this, function(n) {
                switch (n.label) {
                case 0:
                    return [4, this.decodeOnceFromVideoDevice(e, r)];
                case 1:
                    return [2, n.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeOnceFromVideoDevice = function(e, r) {
        return sn(this, void 0, void 0, function() {
            var n, i;
            return an(this, function(o) {
                switch (o.label) {
                case 0:
                    return this.reset(),
                    e ? n = {
                        deviceId: {
                            exact: e
                        }
                    } : n = {
                        facingMode: "environment"
                    },
                    i = {
                        video: n
                    },
                    [4, this.decodeOnceFromConstraints(i, r)];
                case 1:
                    return [2, o.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeOnceFromConstraints = function(e, r) {
        return sn(this, void 0, void 0, function() {
            var n;
            return an(this, function(i) {
                switch (i.label) {
                case 0:
                    return [4, navigator.mediaDevices.getUserMedia(e)];
                case 1:
                    return n = i.sent(),
                    [4, this.decodeOnceFromStream(n, r)];
                case 2:
                    return [2, i.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeOnceFromStream = function(e, r) {
        return sn(this, void 0, void 0, function() {
            var n, i;
            return an(this, function(o) {
                switch (o.label) {
                case 0:
                    return this.reset(),
                    [4, this.attachStreamToVideo(e, r)];
                case 1:
                    return n = o.sent(),
                    [4, this.decodeOnce(n)];
                case 2:
                    return i = o.sent(),
                    [2, i]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromInputVideoDeviceContinuously = function(e, r, n) {
        return sn(this, void 0, void 0, function() {
            return an(this, function(i) {
                switch (i.label) {
                case 0:
                    return [4, this.decodeFromVideoDevice(e, r, n)];
                case 1:
                    return [2, i.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromVideoDevice = function(e, r, n) {
        return sn(this, void 0, void 0, function() {
            var i, o;
            return an(this, function(s) {
                switch (s.label) {
                case 0:
                    return e ? i = {
                        deviceId: {
                            exact: e
                        }
                    } : i = {
                        facingMode: "environment"
                    },
                    o = {
                        video: i
                    },
                    [4, this.decodeFromConstraints(o, r, n)];
                case 1:
                    return [2, s.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromConstraints = function(e, r, n) {
        return sn(this, void 0, void 0, function() {
            var i;
            return an(this, function(o) {
                switch (o.label) {
                case 0:
                    return [4, navigator.mediaDevices.getUserMedia(e)];
                case 1:
                    return i = o.sent(),
                    [4, this.decodeFromStream(i, r, n)];
                case 2:
                    return [2, o.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromStream = function(e, r, n) {
        return sn(this, void 0, void 0, function() {
            var i;
            return an(this, function(o) {
                switch (o.label) {
                case 0:
                    return this.reset(),
                    [4, this.attachStreamToVideo(e, r)];
                case 1:
                    return i = o.sent(),
                    [4, this.decodeContinuously(i, n)];
                case 2:
                    return [2, o.sent()]
                }
            })
        })
    }
    ,
    t.prototype.stopAsyncDecode = function() {
        this._stopAsyncDecode = !0
    }
    ,
    t.prototype.stopContinuousDecode = function() {
        this._stopContinuousDecode = !0
    }
    ,
    t.prototype.attachStreamToVideo = function(e, r) {
        return sn(this, void 0, void 0, function() {
            var n;
            return an(this, function(i) {
                switch (i.label) {
                case 0:
                    return n = this.prepareVideoElement(r),
                    this.addVideoSource(n, e),
                    this.videoElement = n,
                    this.stream = e,
                    [4, this.playVideoOnLoadAsync(n)];
                case 1:
                    return i.sent(),
                    [2, n]
                }
            })
        })
    }
    ,
    t.prototype.playVideoOnLoadAsync = function(e) {
        var r = this;
        return new Promise(function(n, i) {
            return r.playVideoOnLoad(e, function() {
                return n()
            })
        }
        )
    }
    ,
    t.prototype.playVideoOnLoad = function(e, r) {
        var n = this;
        this.videoEndedListener = function() {
            return n.stopStreams()
        }
        ,
        this.videoCanPlayListener = function() {
            return n.tryPlayVideo(e)
        }
        ,
        e.addEventListener("ended", this.videoEndedListener),
        e.addEventListener("canplay", this.videoCanPlayListener),
        e.addEventListener("playing", r),
        this.tryPlayVideo(e)
    }
    ,
    t.prototype.isVideoPlaying = function(e) {
        return e.currentTime > 0 && !e.paused && !e.ended && e.readyState > 2
    }
    ,
    t.prototype.tryPlayVideo = function(e) {
        return sn(this, void 0, void 0, function() {
            return an(this, function(r) {
                switch (r.label) {
                case 0:
                    if (this.isVideoPlaying(e))
                        return console.warn("Trying to play video that is already playing."),
                        [2];
                    r.label = 1;
                case 1:
                    return r.trys.push([1, 3, , 4]),
                    [4, e.play()];
                case 2:
                    return r.sent(),
                    [3, 4];
                case 3:
                    return r.sent(),
                    console.warn("It was not possible to play the video."),
                    [3, 4];
                case 4:
                    return [2]
                }
            })
        })
    }
    ,
    t.prototype.getMediaElement = function(e, r) {
        var n = document.getElementById(e);
        if (!n)
            throw new ir("element with id '" + e + "' not found");
        if (n.nodeName.toLowerCase() !== r.toLowerCase())
            throw new ir("element with id '" + e + "' must be an " + r + " element");
        return n
    }
    ,
    t.prototype.decodeFromImage = function(e, r) {
        if (!e && !r)
            throw new ir("either imageElement with a src set or an url must be provided");
        return r && !e ? this.decodeFromImageUrl(r) : this.decodeFromImageElement(e)
    }
    ,
    t.prototype.decodeFromVideo = function(e, r) {
        if (!e && !r)
            throw new ir("Either an element with a src set or an URL must be provided");
        return r && !e ? this.decodeFromVideoUrl(r) : this.decodeFromVideoElement(e)
    }
    ,
    t.prototype.decodeFromVideoContinuously = function(e, r, n) {
        if (e === void 0 && r === void 0)
            throw new ir("Either an element with a src set or an URL must be provided");
        return r && !e ? this.decodeFromVideoUrlContinuously(r, n) : this.decodeFromVideoElementContinuously(e, n)
    }
    ,
    t.prototype.decodeFromImageElement = function(e) {
        if (!e)
            throw new ir("An image element must be provided.");
        this.reset();
        var r = this.prepareImageElement(e);
        this.imageElement = r;
        var n;
        return this.isImageLoaded(r) ? n = this.decodeOnce(r, !1, !0) : n = this._decodeOnLoadImage(r),
        n
    }
    ,
    t.prototype.decodeFromVideoElement = function(e) {
        var r = this._decodeFromVideoElementSetup(e);
        return this._decodeOnLoadVideo(r)
    }
    ,
    t.prototype.decodeFromVideoElementContinuously = function(e, r) {
        var n = this._decodeFromVideoElementSetup(e);
        return this._decodeOnLoadVideoContinuously(n, r)
    }
    ,
    t.prototype._decodeFromVideoElementSetup = function(e) {
        if (!e)
            throw new ir("A video element must be provided.");
        this.reset();
        var r = this.prepareVideoElement(e);
        return this.videoElement = r,
        r
    }
    ,
    t.prototype.decodeFromImageUrl = function(e) {
        if (!e)
            throw new ir("An URL must be provided.");
        this.reset();
        var r = this.prepareImageElement();
        this.imageElement = r;
        var n = this._decodeOnLoadImage(r);
        return r.src = e,
        n
    }
    ,
    t.prototype.decodeFromVideoUrl = function(e) {
        if (!e)
            throw new ir("An URL must be provided.");
        this.reset();
        var r = this.prepareVideoElement()
          , n = this.decodeFromVideoElement(r);
        return r.src = e,
        n
    }
    ,
    t.prototype.decodeFromVideoUrlContinuously = function(e, r) {
        if (!e)
            throw new ir("An URL must be provided.");
        this.reset();
        var n = this.prepareVideoElement()
          , i = this.decodeFromVideoElementContinuously(n, r);
        return n.src = e,
        i
    }
    ,
    t.prototype._decodeOnLoadImage = function(e) {
        var r = this;
        return new Promise(function(n, i) {
            r.imageLoadedListener = function() {
                return r.decodeOnce(e, !1, !0).then(n, i)
            }
            ,
            e.addEventListener("load", r.imageLoadedListener)
        }
        )
    }
    ,
    t.prototype._decodeOnLoadVideo = function(e) {
        return sn(this, void 0, void 0, function() {
            return an(this, function(r) {
                switch (r.label) {
                case 0:
                    return [4, this.playVideoOnLoadAsync(e)];
                case 1:
                    return r.sent(),
                    [4, this.decodeOnce(e)];
                case 2:
                    return [2, r.sent()]
                }
            })
        })
    }
    ,
    t.prototype._decodeOnLoadVideoContinuously = function(e, r) {
        return sn(this, void 0, void 0, function() {
            return an(this, function(n) {
                switch (n.label) {
                case 0:
                    return [4, this.playVideoOnLoadAsync(e)];
                case 1:
                    return n.sent(),
                    this.decodeContinuously(e, r),
                    [2]
                }
            })
        })
    }
    ,
    t.prototype.isImageLoaded = function(e) {
        return !(!e.complete || e.naturalWidth === 0)
    }
    ,
    t.prototype.prepareImageElement = function(e) {
        var r;
        return typeof e > "u" && (r = document.createElement("img"),
        r.width = 200,
        r.height = 200),
        typeof e == "string" && (r = this.getMediaElement(e, "img")),
        e instanceof HTMLImageElement && (r = e),
        r
    }
    ,
    t.prototype.prepareVideoElement = function(e) {
        var r;
        return !e && typeof document < "u" && (r = document.createElement("video"),
        r.width = 200,
        r.height = 200),
        typeof e == "string" && (r = this.getMediaElement(e, "video")),
        e instanceof HTMLVideoElement && (r = e),
        r.setAttribute("autoplay", "true"),
        r.setAttribute("muted", "true"),
        r.setAttribute("playsinline", "true"),
        r
    }
    ,
    t.prototype.decodeOnce = function(e, r, n) {
        var i = this;
        r === void 0 && (r = !0),
        n === void 0 && (n = !0),
        this._stopAsyncDecode = !1;
        var o = function(s, a) {
            if (i._stopAsyncDecode) {
                a(new le("Video stream has ended before any code could be detected.")),
                i._stopAsyncDecode = void 0;
                return
            }
            try {
                var l = i.decode(e);
                s(l)
            } catch (d) {
                var c = r && d instanceof le
                  , u = d instanceof fr || d instanceof ge
                  , f = u && n;
                if (c || f)
                    return setTimeout(o, i._timeBetweenDecodingAttempts, s, a);
                a(d)
            }
        };
        return new Promise(function(s, a) {
            return o(s, a)
        }
        )
    }
    ,
    t.prototype.decodeContinuously = function(e, r) {
        var n = this;
        this._stopContinuousDecode = !1;
        var i = function() {
            if (n._stopContinuousDecode) {
                n._stopContinuousDecode = void 0;
                return
            }
            try {
                var o = n.decode(e);
                r(o, null),
                setTimeout(i, n.timeBetweenScansMillis)
            } catch (l) {
                r(null, l);
                var s = l instanceof fr || l instanceof ge
                  , a = l instanceof le;
                (s || a) && setTimeout(i, n._timeBetweenDecodingAttempts)
            }
        };
        i()
    }
    ,
    t.prototype.decode = function(e) {
        var r = this.createBinaryBitmap(e);
        return this.decodeBitmap(r)
    }
    ,
    t.prototype.createBinaryBitmap = function(e) {
        this.getCaptureCanvasContext(e);
        var r = !1;
        e instanceof HTMLVideoElement ? (this.drawFrameOnCanvas(e),
        r = !0) : this.drawImageOnCanvas(e);
        var n = this.getCaptureCanvas(e)
          , i = new ebe(n,r)
          , o = new FM(i);
        return new DM(o)
    }
    ,
    t.prototype.getCaptureCanvasContext = function(e) {
        if (!this.captureCanvasContext) {
            var r = this.getCaptureCanvas(e)
              , n = void 0;
            try {
                n = r.getContext("2d", {
                    willReadFrequently: !0
                })
            } catch {
                n = r.getContext("2d")
            }
            this.captureCanvasContext = n
        }
        return this.captureCanvasContext
    }
    ,
    t.prototype.getCaptureCanvas = function(e) {
        if (!this.captureCanvas) {
            var r = this.createCaptureCanvas(e);
            this.captureCanvas = r
        }
        return this.captureCanvas
    }
    ,
    t.prototype.drawFrameOnCanvas = function(e, r, n) {
        r === void 0 && (r = {
            sx: 0,
            sy: 0,
            sWidth: e.videoWidth,
            sHeight: e.videoHeight,
            dx: 0,
            dy: 0,
            dWidth: e.videoWidth,
            dHeight: e.videoHeight
        }),
        n === void 0 && (n = this.captureCanvasContext),
        n.drawImage(e, r.sx, r.sy, r.sWidth, r.sHeight, r.dx, r.dy, r.dWidth, r.dHeight)
    }
    ,
    t.prototype.drawImageOnCanvas = function(e, r, n) {
        r === void 0 && (r = {
            sx: 0,
            sy: 0,
            sWidth: e.naturalWidth,
            sHeight: e.naturalHeight,
            dx: 0,
            dy: 0,
            dWidth: e.naturalWidth,
            dHeight: e.naturalHeight
        }),
        n === void 0 && (n = this.captureCanvasContext),
        n.drawImage(e, r.sx, r.sy, r.sWidth, r.sHeight, r.dx, r.dy, r.dWidth, r.dHeight)
    }
    ,
    t.prototype.decodeBitmap = function(e) {
        return this.reader.decode(e, this._hints)
    }
    ,
    t.prototype.createCaptureCanvas = function(e) {
        if (typeof document > "u")
            return this._destroyCaptureCanvas(),
            null;
        var r = document.createElement("canvas"), n, i;
        return typeof e < "u" && (e instanceof HTMLVideoElement ? (n = e.videoWidth,
        i = e.videoHeight) : e instanceof HTMLImageElement && (n = e.naturalWidth || e.width,
        i = e.naturalHeight || e.height)),
        r.style.width = n + "px",
        r.style.height = i + "px",
        r.width = n,
        r.height = i,
        r
    }
    ,
    t.prototype.stopStreams = function() {
        this.stream && (this.stream.getVideoTracks().forEach(function(e) {
            return e.stop()
        }),
        this.stream = void 0),
        this._stopAsyncDecode === !1 && this.stopAsyncDecode(),
        this._stopContinuousDecode === !1 && this.stopContinuousDecode()
    }
    ,
    t.prototype.reset = function() {
        this.stopStreams(),
        this._destroyVideoElement(),
        this._destroyImageElement(),
        this._destroyCaptureCanvas()
    }
    ,
    t.prototype._destroyVideoElement = function() {
        this.videoElement && (typeof this.videoEndedListener < "u" && this.videoElement.removeEventListener("ended", this.videoEndedListener),
        typeof this.videoPlayingEventListener < "u" && this.videoElement.removeEventListener("playing", this.videoPlayingEventListener),
        typeof this.videoCanPlayListener < "u" && this.videoElement.removeEventListener("loadedmetadata", this.videoCanPlayListener),
        this.cleanVideoSource(this.videoElement),
        this.videoElement = void 0)
    }
    ,
    t.prototype._destroyImageElement = function() {
        this.imageElement && (this.imageLoadedListener !== void 0 && this.imageElement.removeEventListener("load", this.imageLoadedListener),
        this.imageElement.src = void 0,
        this.imageElement.removeAttribute("src"),
        this.imageElement = void 0)
    }
    ,
    t.prototype._destroyCaptureCanvas = function() {
        this.captureCanvasContext = void 0,
        this.captureCanvas = void 0
    }
    ,
    t.prototype.addVideoSource = function(e, r) {
        try {
            e.srcObject = r
        } catch {
            e.src = URL.createObjectURL(r)
        }
    }
    ,
    t.prototype.cleanVideoSource = function(e) {
        try {
            e.srcObject = null
        } catch {
            e.src = ""
        }
        this.videoElement.removeAttribute("src")
    }
    ,
    t
}(), nn = function() {
    function t(e, r, n, i, o, s) {
        n === void 0 && (n = r == null ? 0 : 8 * r.length),
        s === void 0 && (s = Ft.currentTimeMillis()),
        this.text = e,
        this.rawBytes = r,
        this.numBits = n,
        this.resultPoints = i,
        this.format = o,
        this.timestamp = s,
        this.text = e,
        this.rawBytes = r,
        n == null ? this.numBits = r == null ? 0 : 8 * r.length : this.numBits = n,
        this.resultPoints = i,
        this.format = o,
        this.resultMetadata = null,
        s == null ? this.timestamp = Ft.currentTimeMillis() : this.timestamp = s
    }
    return t.prototype.getText = function() {
        return this.text
    }
    ,
    t.prototype.getRawBytes = function() {
        return this.rawBytes
    }
    ,
    t.prototype.getNumBits = function() {
        return this.numBits
    }
    ,
    t.prototype.getResultPoints = function() {
        return this.resultPoints
    }
    ,
    t.prototype.getBarcodeFormat = function() {
        return this.format
    }
    ,
    t.prototype.getResultMetadata = function() {
        return this.resultMetadata
    }
    ,
    t.prototype.putMetadata = function(e, r) {
        this.resultMetadata === null && (this.resultMetadata = new Map),
        this.resultMetadata.set(e, r)
    }
    ,
    t.prototype.putAllMetadata = function(e) {
        e !== null && (this.resultMetadata === null ? this.resultMetadata = e : this.resultMetadata = new Map(e))
    }
    ,
    t.prototype.addResultPoints = function(e) {
        var r = this.resultPoints;
        if (r === null)
            this.resultPoints = e;
        else if (e !== null && e.length > 0) {
            var n = new Array(r.length + e.length);
            Ft.arraycopy(r, 0, n, 0, r.length),
            Ft.arraycopy(e, 0, n, r.length, e.length),
            this.resultPoints = n
        }
    }
    ,
    t.prototype.getTimestamp = function() {
        return this.timestamp
    }
    ,
    t.prototype.toString = function() {
        return this.text
    }
    ,
    t
}(), WE;
(function(t) {
    t[t.AZTEC = 0] = "AZTEC",
    t[t.CODABAR = 1] = "CODABAR",
    t[t.CODE_39 = 2] = "CODE_39",
    t[t.CODE_93 = 3] = "CODE_93",
    t[t.CODE_128 = 4] = "CODE_128",
    t[t.DATA_MATRIX = 5] = "DATA_MATRIX",
    t[t.EAN_8 = 6] = "EAN_8",
    t[t.EAN_13 = 7] = "EAN_13",
    t[t.ITF = 8] = "ITF",
    t[t.MAXICODE = 9] = "MAXICODE",
    t[t.PDF_417 = 10] = "PDF_417",
    t[t.QR_CODE = 11] = "QR_CODE",
    t[t.RSS_14 = 12] = "RSS_14",
    t[t.RSS_EXPANDED = 13] = "RSS_EXPANDED",
    t[t.UPC_A = 14] = "UPC_A",
    t[t.UPC_E = 15] = "UPC_E",
    t[t.UPC_EAN_EXTENSION = 16] = "UPC_EAN_EXTENSION"
}
)(WE || (WE = {}));
const ke = WE;
var YE;
(function(t) {
    t[t.OTHER = 0] = "OTHER",
    t[t.ORIENTATION = 1] = "ORIENTATION",
    t[t.BYTE_SEGMENTS = 2] = "BYTE_SEGMENTS",
    t[t.ERROR_CORRECTION_LEVEL = 3] = "ERROR_CORRECTION_LEVEL",
    t[t.ISSUE_NUMBER = 4] = "ISSUE_NUMBER",
    t[t.SUGGESTED_PRICE = 5] = "SUGGESTED_PRICE",
    t[t.POSSIBLE_COUNTRY = 6] = "POSSIBLE_COUNTRY",
    t[t.UPC_EAN_EXTENSION = 7] = "UPC_EAN_EXTENSION",
    t[t.PDF417_EXTRA_METADATA = 8] = "PDF417_EXTRA_METADATA",
    t[t.STRUCTURED_APPEND_SEQUENCE = 9] = "STRUCTURED_APPEND_SEQUENCE",
    t[t.STRUCTURED_APPEND_PARITY = 10] = "STRUCTURED_APPEND_PARITY"
}
)(YE || (YE = {}));
const Vr = YE;
var U1 = function() {
    function t(e, r, n, i, o, s) {
        o === void 0 && (o = -1),
        s === void 0 && (s = -1),
        this.rawBytes = e,
        this.text = r,
        this.byteSegments = n,
        this.ecLevel = i,
        this.structuredAppendSequenceNumber = o,
        this.structuredAppendParity = s,
        this.numBits = e == null ? 0 : 8 * e.length
    }
    return t.prototype.getRawBytes = function() {
        return this.rawBytes
    }
    ,
    t.prototype.getNumBits = function() {
        return this.numBits
    }
    ,
    t.prototype.setNumBits = function(e) {
        this.numBits = e
    }
    ,
    t.prototype.getText = function() {
        return this.text
    }
    ,
    t.prototype.getByteSegments = function() {
        return this.byteSegments
    }
    ,
    t.prototype.getECLevel = function() {
        return this.ecLevel
    }
    ,
    t.prototype.getErrorsCorrected = function() {
        return this.errorsCorrected
    }
    ,
    t.prototype.setErrorsCorrected = function(e) {
        this.errorsCorrected = e
    }
    ,
    t.prototype.getErasures = function() {
        return this.erasures
    }
    ,
    t.prototype.setErasures = function(e) {
        this.erasures = e
    }
    ,
    t.prototype.getOther = function() {
        return this.other
    }
    ,
    t.prototype.setOther = function(e) {
        this.other = e
    }
    ,
    t.prototype.hasStructuredAppend = function() {
        return this.structuredAppendParity >= 0 && this.structuredAppendSequenceNumber >= 0
    }
    ,
    t.prototype.getStructuredAppendParity = function() {
        return this.structuredAppendParity
    }
    ,
    t.prototype.getStructuredAppendSequenceNumber = function() {
        return this.structuredAppendSequenceNumber
    }
    ,
    t
}(), _0 = function() {
    function t() {}
    return t.prototype.exp = function(e) {
        return this.expTable[e]
    }
    ,
    t.prototype.log = function(e) {
        if (e === 0)
            throw new Me;
        return this.logTable[e]
    }
    ,
    t.addOrSubtract = function(e, r) {
        return e ^ r
    }
    ,
    t
}(), na = function() {
    function t(e, r) {
        if (r.length === 0)
            throw new Me;
        this.field = e;
        var n = r.length;
        if (n > 1 && r[0] === 0) {
            for (var i = 1; i < n && r[i] === 0; )
                i++;
            i === n ? this.coefficients = Int32Array.from([0]) : (this.coefficients = new Int32Array(n - i),
            Ft.arraycopy(r, i, this.coefficients, 0, this.coefficients.length))
        } else
            this.coefficients = r
    }
    return t.prototype.getCoefficients = function() {
        return this.coefficients
    }
    ,
    t.prototype.getDegree = function() {
        return this.coefficients.length - 1
    }
    ,
    t.prototype.isZero = function() {
        return this.coefficients[0] === 0
    }
    ,
    t.prototype.getCoefficient = function(e) {
        return this.coefficients[this.coefficients.length - 1 - e]
    }
    ,
    t.prototype.evaluateAt = function(e) {
        if (e === 0)
            return this.getCoefficient(0);
        var r = this.coefficients, n;
        if (e === 1) {
            n = 0;
            for (var i = 0, o = r.length; i !== o; i++) {
                var s = r[i];
                n = _0.addOrSubtract(n, s)
            }
            return n
        }
        n = r[0];
        for (var a = r.length, l = this.field, i = 1; i < a; i++)
            n = _0.addOrSubtract(l.multiply(e, n), r[i]);
        return n
    }
    ,
    t.prototype.addOrSubtract = function(e) {
        if (!this.field.equals(e.field))
            throw new Me("GenericGFPolys do not have same GenericGF field");
        if (this.isZero())
            return e;
        if (e.isZero())
            return this;
        var r = this.coefficients
          , n = e.coefficients;
        if (r.length > n.length) {
            var i = r;
            r = n,
            n = i
        }
        var o = new Int32Array(n.length)
          , s = n.length - r.length;
        Ft.arraycopy(n, 0, o, 0, s);
        for (var a = s; a < n.length; a++)
            o[a] = _0.addOrSubtract(r[a - s], n[a]);
        return new t(this.field,o)
    }
    ,
    t.prototype.multiply = function(e) {
        if (!this.field.equals(e.field))
            throw new Me("GenericGFPolys do not have same GenericGF field");
        if (this.isZero() || e.isZero())
            return this.field.getZero();
        for (var r = this.coefficients, n = r.length, i = e.coefficients, o = i.length, s = new Int32Array(n + o - 1), a = this.field, l = 0; l < n; l++)
            for (var c = r[l], u = 0; u < o; u++)
                s[l + u] = _0.addOrSubtract(s[l + u], a.multiply(c, i[u]));
        return new t(a,s)
    }
    ,
    t.prototype.multiplyScalar = function(e) {
        if (e === 0)
            return this.field.getZero();
        if (e === 1)
            return this;
        for (var r = this.coefficients.length, n = this.field, i = new Int32Array(r), o = this.coefficients, s = 0; s < r; s++)
            i[s] = n.multiply(o[s], e);
        return new t(n,i)
    }
    ,
    t.prototype.multiplyByMonomial = function(e, r) {
        if (e < 0)
            throw new Me;
        if (r === 0)
            return this.field.getZero();
        for (var n = this.coefficients, i = n.length, o = new Int32Array(i + e), s = this.field, a = 0; a < i; a++)
            o[a] = s.multiply(n[a], r);
        return new t(s,o)
    }
    ,
    t.prototype.divide = function(e) {
        if (!this.field.equals(e.field))
            throw new Me("GenericGFPolys do not have same GenericGF field");
        if (e.isZero())
            throw new Me("Divide by 0");
        for (var r = this.field, n = r.getZero(), i = this, o = e.getCoefficient(e.getDegree()), s = r.inverse(o); i.getDegree() >= e.getDegree() && !i.isZero(); ) {
            var a = i.getDegree() - e.getDegree()
              , l = r.multiply(i.getCoefficient(i.getDegree()), s)
              , c = e.multiplyByMonomial(a, l)
              , u = r.buildMonomial(a, l);
            n = n.addOrSubtract(u),
            i = i.addOrSubtract(c)
        }
        return [n, i]
    }
    ,
    t.prototype.toString = function() {
        for (var e = "", r = this.getDegree(); r >= 0; r--) {
            var n = this.getCoefficient(r);
            if (n !== 0) {
                if (n < 0 ? (e += " - ",
                n = -n) : e.length > 0 && (e += " + "),
                r === 0 || n !== 1) {
                    var i = this.field.log(n);
                    i === 0 ? e += "1" : i === 1 ? e += "a" : (e += "a^",
                    e += i)
                }
                r !== 0 && (r === 1 ? e += "x" : (e += "x^",
                e += r))
            }
        }
        return e
    }
    ,
    t
}(), nbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), PM = function(t) {
    nbe(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.kind = "ArithmeticException",
    e
}(Nn), ibe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), Sn = function(t) {
    ibe(e, t);
    function e(r, n, i) {
        var o = t.call(this) || this;
        o.primitive = r,
        o.size = n,
        o.generatorBase = i;
        for (var s = new Int32Array(n), a = 1, l = 0; l < n; l++)
            s[l] = a,
            a *= 2,
            a >= n && (a ^= r,
            a &= n - 1);
        o.expTable = s;
        for (var c = new Int32Array(n), l = 0; l < n - 1; l++)
            c[s[l]] = l;
        return o.logTable = c,
        o.zero = new na(o,Int32Array.from([0])),
        o.one = new na(o,Int32Array.from([1])),
        o
    }
    return e.prototype.getZero = function() {
        return this.zero
    }
    ,
    e.prototype.getOne = function() {
        return this.one
    }
    ,
    e.prototype.buildMonomial = function(r, n) {
        if (r < 0)
            throw new Me;
        if (n === 0)
            return this.zero;
        var i = new Int32Array(r + 1);
        return i[0] = n,
        new na(this,i)
    }
    ,
    e.prototype.inverse = function(r) {
        if (r === 0)
            throw new PM;
        return this.expTable[this.size - this.logTable[r] - 1]
    }
    ,
    e.prototype.multiply = function(r, n) {
        return r === 0 || n === 0 ? 0 : this.expTable[(this.logTable[r] + this.logTable[n]) % (this.size - 1)]
    }
    ,
    e.prototype.getSize = function() {
        return this.size
    }
    ,
    e.prototype.getGeneratorBase = function() {
        return this.generatorBase
    }
    ,
    e.prototype.toString = function() {
        return "GF(0x" + qe.toHexString(this.primitive) + "," + this.size + ")"
    }
    ,
    e.prototype.equals = function(r) {
        return r === this
    }
    ,
    e.AZTEC_DATA_12 = new e(4201,4096,1),
    e.AZTEC_DATA_10 = new e(1033,1024,1),
    e.AZTEC_DATA_6 = new e(67,64,1),
    e.AZTEC_PARAM = new e(19,16,1),
    e.QR_CODE_FIELD_256 = new e(285,256,0),
    e.DATA_MATRIX_FIELD_256 = new e(301,256,1),
    e.AZTEC_DATA_8 = e.DATA_MATRIX_FIELD_256,
    e.MAXICODE_FIELD_64 = e.AZTEC_DATA_6,
    e
}(_0), obe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), Ph = function(t) {
    obe(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.kind = "ReedSolomonException",
    e
}(Nn), sbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), Ad = function(t) {
    sbe(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.kind = "IllegalStateException",
    e
}(Nn), G1 = function() {
    function t(e) {
        this.field = e
    }
    return t.prototype.decode = function(e, r) {
        for (var n = this.field, i = new na(n,e), o = new Int32Array(r), s = !0, a = 0; a < r; a++) {
            var l = i.evaluateAt(n.exp(a + n.getGeneratorBase()));
            o[o.length - 1 - a] = l,
            l !== 0 && (s = !1)
        }
        if (!s)
            for (var c = new na(n,o), u = this.runEuclideanAlgorithm(n.buildMonomial(r, 1), c, r), f = u[0], d = u[1], h = this.findErrorLocations(f), x = this.findErrorMagnitudes(d, h), a = 0; a < h.length; a++) {
                var y = e.length - 1 - n.log(h[a]);
                if (y < 0)
                    throw new Ph("Bad error location");
                e[y] = Sn.addOrSubtract(e[y], x[a])
            }
    }
    ,
    t.prototype.runEuclideanAlgorithm = function(e, r, n) {
        if (e.getDegree() < r.getDegree()) {
            var i = e;
            e = r,
            r = i
        }
        for (var o = this.field, s = e, a = r, l = o.getZero(), c = o.getOne(); a.getDegree() >= (n / 2 | 0); ) {
            var u = s
              , f = l;
            if (s = a,
            l = c,
            s.isZero())
                throw new Ph("r_{i-1} was zero");
            a = u;
            for (var d = o.getZero(), h = s.getCoefficient(s.getDegree()), x = o.inverse(h); a.getDegree() >= s.getDegree() && !a.isZero(); ) {
                var y = a.getDegree() - s.getDegree()
                  , m = o.multiply(a.getCoefficient(a.getDegree()), x);
                d = d.addOrSubtract(o.buildMonomial(y, m)),
                a = a.addOrSubtract(s.multiplyByMonomial(y, m))
            }
            if (c = d.multiply(l).addOrSubtract(f),
            a.getDegree() >= s.getDegree())
                throw new Ad("Division algorithm failed to reduce polynomial?")
        }
        var E = c.getCoefficient(0);
        if (E === 0)
            throw new Ph("sigmaTilde(0) was zero");
        var g = o.inverse(E)
          , p = c.multiplyScalar(g)
          , v = a.multiplyScalar(g);
        return [p, v]
    }
    ,
    t.prototype.findErrorLocations = function(e) {
        var r = e.getDegree();
        if (r === 1)
            return Int32Array.from([e.getCoefficient(1)]);
        for (var n = new Int32Array(r), i = 0, o = this.field, s = 1; s < o.getSize() && i < r; s++)
            e.evaluateAt(s) === 0 && (n[i] = o.inverse(s),
            i++);
        if (i !== r)
            throw new Ph("Error locator degree does not match number of roots");
        return n
    }
    ,
    t.prototype.findErrorMagnitudes = function(e, r) {
        for (var n = r.length, i = new Int32Array(n), o = this.field, s = 0; s < n; s++) {
            for (var a = o.inverse(r[s]), l = 1, c = 0; c < n; c++)
                if (s !== c) {
                    var u = o.multiply(r[c], a)
                      , f = u & 1 ? u & -2 : u | 1;
                    l = o.multiply(l, f)
                }
            i[s] = o.multiply(e.evaluateAt(a), o.inverse(l)),
            o.getGeneratorBase() !== 0 && (i[s] = o.multiply(i[s], a))
        }
        return i
    }
    ,
    t
}(), Lr;
(function(t) {
    t[t.UPPER = 0] = "UPPER",
    t[t.LOWER = 1] = "LOWER",
    t[t.MIXED = 2] = "MIXED",
    t[t.DIGIT = 3] = "DIGIT",
    t[t.PUNCT = 4] = "PUNCT",
    t[t.BINARY = 5] = "BINARY"
}
)(Lr || (Lr = {}));
var o6 = function() {
    function t() {}
    return t.prototype.decode = function(e) {
        this.ddata = e;
        var r = e.getBits()
          , n = this.extractBits(r)
          , i = this.correctBits(n)
          , o = t.convertBoolArrayToByteArray(i)
          , s = t.getEncodedData(i)
          , a = new U1(o,s,null,null);
        return a.setNumBits(i.length),
        a
    }
    ,
    t.highLevelDecode = function(e) {
        return this.getEncodedData(e)
    }
    ,
    t.getEncodedData = function(e) {
        for (var r = e.length, n = Lr.UPPER, i = Lr.UPPER, o = "", s = 0; s < r; )
            if (i === Lr.BINARY) {
                if (r - s < 5)
                    break;
                var a = t.readCode(e, s, 5);
                if (s += 5,
                a === 0) {
                    if (r - s < 11)
                        break;
                    a = t.readCode(e, s, 11) + 31,
                    s += 11
                }
                for (var l = 0; l < a; l++) {
                    if (r - s < 8) {
                        s = r;
                        break
                    }
                    var c = t.readCode(e, s, 8);
                    o += nt.castAsNonUtf8Char(c),
                    s += 8
                }
                i = n
            } else {
                var u = i === Lr.DIGIT ? 4 : 5;
                if (r - s < u)
                    break;
                var c = t.readCode(e, s, u);
                s += u;
                var f = t.getCharacter(i, c);
                f.startsWith("CTRL_") ? (n = i,
                i = t.getTable(f.charAt(5)),
                f.charAt(6) === "L" && (n = i)) : (o += f,
                i = n)
            }
        return o
    }
    ,
    t.getTable = function(e) {
        switch (e) {
        case "L":
            return Lr.LOWER;
        case "P":
            return Lr.PUNCT;
        case "M":
            return Lr.MIXED;
        case "D":
            return Lr.DIGIT;
        case "B":
            return Lr.BINARY;
        case "U":
        default:
            return Lr.UPPER
        }
    }
    ,
    t.getCharacter = function(e, r) {
        switch (e) {
        case Lr.UPPER:
            return t.UPPER_TABLE[r];
        case Lr.LOWER:
            return t.LOWER_TABLE[r];
        case Lr.MIXED:
            return t.MIXED_TABLE[r];
        case Lr.PUNCT:
            return t.PUNCT_TABLE[r];
        case Lr.DIGIT:
            return t.DIGIT_TABLE[r];
        default:
            throw new Ad("Bad table")
        }
    }
    ,
    t.prototype.correctBits = function(e) {
        var r, n;
        this.ddata.getNbLayers() <= 2 ? (n = 6,
        r = Sn.AZTEC_DATA_6) : this.ddata.getNbLayers() <= 8 ? (n = 8,
        r = Sn.AZTEC_DATA_8) : this.ddata.getNbLayers() <= 22 ? (n = 10,
        r = Sn.AZTEC_DATA_10) : (n = 12,
        r = Sn.AZTEC_DATA_12);
        var i = this.ddata.getNbDatablocks()
          , o = e.length / n;
        if (o < i)
            throw new ge;
        for (var s = e.length % n, a = new Int32Array(o), l = 0; l < o; l++,
        s += n)
            a[l] = t.readCode(e, s, n);
        try {
            var c = new G1(r);
            c.decode(a, o - i)
        } catch (m) {
            throw new ge(m)
        }
        for (var u = (1 << n) - 1, f = 0, l = 0; l < i; l++) {
            var d = a[l];
            if (d === 0 || d === u)
                throw new ge;
            (d === 1 || d === u - 1) && f++
        }
        for (var h = new Array(i * n - f), x = 0, l = 0; l < i; l++) {
            var d = a[l];
            if (d === 1 || d === u - 1)
                h.fill(d > 1, x, x + n - 1),
                x += n - 1;
            else
                for (var y = n - 1; y >= 0; --y)
                    h[x++] = (d & 1 << y) !== 0
        }
        return h
    }
    ,
    t.prototype.extractBits = function(e) {
        var r = this.ddata.isCompact()
          , n = this.ddata.getNbLayers()
          , i = (r ? 11 : 14) + n * 4
          , o = new Int32Array(i)
          , s = new Array(this.totalBitsInLayer(n, r));
        if (r)
            for (var a = 0; a < o.length; a++)
                o[a] = a;
        else
            for (var l = i + 1 + 2 * qe.truncDivision(qe.truncDivision(i, 2) - 1, 15), c = i / 2, u = qe.truncDivision(l, 2), a = 0; a < c; a++) {
                var f = a + qe.truncDivision(a, 15);
                o[c - a - 1] = u - f - 1,
                o[c + a] = u + f + 1
            }
        for (var a = 0, d = 0; a < n; a++) {
            for (var h = (n - a) * 4 + (r ? 9 : 12), x = a * 2, y = i - 1 - x, m = 0; m < h; m++)
                for (var E = m * 2, g = 0; g < 2; g++)
                    s[d + E + g] = e.get(o[x + g], o[x + m]),
                    s[d + 2 * h + E + g] = e.get(o[x + m], o[y - g]),
                    s[d + 4 * h + E + g] = e.get(o[y - g], o[y - m]),
                    s[d + 6 * h + E + g] = e.get(o[y - m], o[x + g]);
            d += h * 8
        }
        return s
    }
    ,
    t.readCode = function(e, r, n) {
        for (var i = 0, o = r; o < r + n; o++)
            i <<= 1,
            e[o] && (i |= 1);
        return i
    }
    ,
    t.readByte = function(e, r) {
        var n = e.length - r;
        return n >= 8 ? t.readCode(e, r, 8) : t.readCode(e, r, n) << 8 - n
    }
    ,
    t.convertBoolArrayToByteArray = function(e) {
        for (var r = new Uint8Array((e.length + 7) / 8), n = 0; n < r.length; n++)
            r[n] = t.readByte(e, 8 * n);
        return r
    }
    ,
    t.prototype.totalBitsInLayer = function(e, r) {
        return ((r ? 88 : 112) + 16 * e) * e
    }
    ,
    t.UPPER_TABLE = ["CTRL_PS", " ", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "CTRL_LL", "CTRL_ML", "CTRL_DL", "CTRL_BS"],
    t.LOWER_TABLE = ["CTRL_PS", " ", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "CTRL_US", "CTRL_ML", "CTRL_DL", "CTRL_BS"],
    t.MIXED_TABLE = ["CTRL_PS", " ", "", "", "", "", "", "", "\x07", "\b", "	", `
`, "\v", "\f", "\r", "\x1B", "", "", "", "", "@", "\\", "^", "_", "`", "|", "~", "", "CTRL_LL", "CTRL_UL", "CTRL_PL", "CTRL_BS"],
    t.PUNCT_TABLE = ["", "\r", `\r
`, ". ", ", ", ": ", "!", '"', "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/", ":", ";", "<", "=", ">", "?", "[", "]", "{", "}", "CTRL_UL"],
    t.DIGIT_TABLE = ["CTRL_PS", " ", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ",", ".", "CTRL_UL", "CTRL_US"],
    t
}()
  , ft = function() {
    function t() {}
    return t.round = function(e) {
        return isNaN(e) ? 0 : e <= Number.MIN_SAFE_INTEGER ? Number.MIN_SAFE_INTEGER : e >= Number.MAX_SAFE_INTEGER ? Number.MAX_SAFE_INTEGER : e + (e < 0 ? -.5 : .5) | 0
    }
    ,
    t.distance = function(e, r, n, i) {
        var o = e - n
          , s = r - i;
        return Math.sqrt(o * o + s * s)
    }
    ,
    t.sum = function(e) {
        for (var r = 0, n = 0, i = e.length; n !== i; n++) {
            var o = e[n];
            r += o
        }
        return r
    }
    ,
    t
}()
  , XE = function() {
    function t() {}
    return t.floatToIntBits = function(e) {
        return e
    }
    ,
    t.MAX_VALUE = Number.MAX_SAFE_INTEGER,
    t
}()
  , Te = function() {
    function t(e, r) {
        this.x = e,
        this.y = r
    }
    return t.prototype.getX = function() {
        return this.x
    }
    ,
    t.prototype.getY = function() {
        return this.y
    }
    ,
    t.prototype.equals = function(e) {
        if (e instanceof t) {
            var r = e;
            return this.x === r.x && this.y === r.y
        }
        return !1
    }
    ,
    t.prototype.hashCode = function() {
        return 31 * XE.floatToIntBits(this.x) + XE.floatToIntBits(this.y)
    }
    ,
    t.prototype.toString = function() {
        return "(" + this.x + "," + this.y + ")"
    }
    ,
    t.orderBestPatterns = function(e) {
        var r = this.distance(e[0], e[1]), n = this.distance(e[1], e[2]), i = this.distance(e[0], e[2]), o, s, a;
        if (n >= r && n >= i ? (s = e[0],
        o = e[1],
        a = e[2]) : i >= n && i >= r ? (s = e[1],
        o = e[0],
        a = e[2]) : (s = e[2],
        o = e[0],
        a = e[1]),
        this.crossProductZ(o, s, a) < 0) {
            var l = o;
            o = a,
            a = l
        }
        e[0] = o,
        e[1] = s,
        e[2] = a
    }
    ,
    t.distance = function(e, r) {
        return ft.distance(e.x, e.y, r.x, r.y)
    }
    ,
    t.crossProductZ = function(e, r, n) {
        var i = r.x
          , o = r.y;
        return (n.x - i) * (e.y - o) - (n.y - o) * (e.x - i)
    }
    ,
    t
}()
  , kC = function() {
    function t(e, r) {
        this.bits = e,
        this.points = r
    }
    return t.prototype.getBits = function() {
        return this.bits
    }
    ,
    t.prototype.getPoints = function() {
        return this.points
    }
    ,
    t
}()
  , abe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , lbe = function(t) {
    abe(e, t);
    function e(r, n, i, o, s) {
        var a = t.call(this, r, n) || this;
        return a.compact = i,
        a.nbDatablocks = o,
        a.nbLayers = s,
        a
    }
    return e.prototype.getNbLayers = function() {
        return this.nbLayers
    }
    ,
    e.prototype.getNbDatablocks = function() {
        return this.nbDatablocks
    }
    ,
    e.prototype.isCompact = function() {
        return this.compact
    }
    ,
    e
}(kC)
  , KE = function() {
    function t(e, r, n, i) {
        this.image = e,
        this.height = e.getHeight(),
        this.width = e.getWidth(),
        r == null && (r = t.INIT_SIZE),
        n == null && (n = e.getWidth() / 2 | 0),
        i == null && (i = e.getHeight() / 2 | 0);
        var o = r / 2 | 0;
        if (this.leftInit = n - o,
        this.rightInit = n + o,
        this.upInit = i - o,
        this.downInit = i + o,
        this.upInit < 0 || this.leftInit < 0 || this.downInit >= this.height || this.rightInit >= this.width)
            throw new le
    }
    return t.prototype.detect = function() {
        for (var e = this.leftInit, r = this.rightInit, n = this.upInit, i = this.downInit, o = !1, s = !0, a = !1, l = !1, c = !1, u = !1, f = !1, d = this.width, h = this.height; s; ) {
            s = !1;
            for (var x = !0; (x || !l) && r < d; )
                x = this.containsBlackPoint(n, i, r, !1),
                x ? (r++,
                s = !0,
                l = !0) : l || r++;
            if (r >= d) {
                o = !0;
                break
            }
            for (var y = !0; (y || !c) && i < h; )
                y = this.containsBlackPoint(e, r, i, !0),
                y ? (i++,
                s = !0,
                c = !0) : c || i++;
            if (i >= h) {
                o = !0;
                break
            }
            for (var m = !0; (m || !u) && e >= 0; )
                m = this.containsBlackPoint(n, i, e, !1),
                m ? (e--,
                s = !0,
                u = !0) : u || e--;
            if (e < 0) {
                o = !0;
                break
            }
            for (var E = !0; (E || !f) && n >= 0; )
                E = this.containsBlackPoint(e, r, n, !0),
                E ? (n--,
                s = !0,
                f = !0) : f || n--;
            if (n < 0) {
                o = !0;
                break
            }
            s && (a = !0)
        }
        if (!o && a) {
            for (var g = r - e, p = null, v = 1; p === null && v < g; v++)
                p = this.getBlackPointOnSegment(e, i - v, e + v, i);
            if (p == null)
                throw new le;
            for (var _ = null, v = 1; _ === null && v < g; v++)
                _ = this.getBlackPointOnSegment(e, n + v, e + v, n);
            if (_ == null)
                throw new le;
            for (var b = null, v = 1; b === null && v < g; v++)
                b = this.getBlackPointOnSegment(r, n + v, r - v, n);
            if (b == null)
                throw new le;
            for (var C = null, v = 1; C === null && v < g; v++)
                C = this.getBlackPointOnSegment(r, i - v, r - v, i);
            if (C == null)
                throw new le;
            return this.centerEdges(C, p, b, _)
        } else
            throw new le
    }
    ,
    t.prototype.getBlackPointOnSegment = function(e, r, n, i) {
        for (var o = ft.round(ft.distance(e, r, n, i)), s = (n - e) / o, a = (i - r) / o, l = this.image, c = 0; c < o; c++) {
            var u = ft.round(e + c * s)
              , f = ft.round(r + c * a);
            if (l.get(u, f))
                return new Te(u,f)
        }
        return null
    }
    ,
    t.prototype.centerEdges = function(e, r, n, i) {
        var o = e.getX()
          , s = e.getY()
          , a = r.getX()
          , l = r.getY()
          , c = n.getX()
          , u = n.getY()
          , f = i.getX()
          , d = i.getY()
          , h = t.CORR;
        return o < this.width / 2 ? [new Te(f - h,d + h), new Te(a + h,l + h), new Te(c - h,u - h), new Te(o + h,s - h)] : [new Te(f + h,d + h), new Te(a + h,l - h), new Te(c - h,u + h), new Te(o - h,s - h)]
    }
    ,
    t.prototype.containsBlackPoint = function(e, r, n, i) {
        var o = this.image;
        if (i) {
            for (var s = e; s <= r; s++)
                if (o.get(s, n))
                    return !0
        } else
            for (var a = e; a <= r; a++)
                if (o.get(n, a))
                    return !0;
        return !1
    }
    ,
    t.INIT_SIZE = 10,
    t.CORR = 1,
    t
}()
  , s6 = function() {
    function t() {}
    return t.checkAndNudgePoints = function(e, r) {
        for (var n = e.getWidth(), i = e.getHeight(), o = !0, s = 0; s < r.length && o; s += 2) {
            var a = Math.floor(r[s])
              , l = Math.floor(r[s + 1]);
            if (a < -1 || a > n || l < -1 || l > i)
                throw new le;
            o = !1,
            a === -1 ? (r[s] = 0,
            o = !0) : a === n && (r[s] = n - 1,
            o = !0),
            l === -1 ? (r[s + 1] = 0,
            o = !0) : l === i && (r[s + 1] = i - 1,
            o = !0)
        }
        o = !0;
        for (var s = r.length - 2; s >= 0 && o; s -= 2) {
            var a = Math.floor(r[s])
              , l = Math.floor(r[s + 1]);
            if (a < -1 || a > n || l < -1 || l > i)
                throw new le;
            o = !1,
            a === -1 ? (r[s] = 0,
            o = !0) : a === n && (r[s] = n - 1,
            o = !0),
            l === -1 ? (r[s + 1] = 0,
            o = !0) : l === i && (r[s + 1] = i - 1,
            o = !0)
        }
    }
    ,
    t
}()
  , IM = function() {
    function t(e, r, n, i, o, s, a, l, c) {
        this.a11 = e,
        this.a21 = r,
        this.a31 = n,
        this.a12 = i,
        this.a22 = o,
        this.a32 = s,
        this.a13 = a,
        this.a23 = l,
        this.a33 = c
    }
    return t.quadrilateralToQuadrilateral = function(e, r, n, i, o, s, a, l, c, u, f, d, h, x, y, m) {
        var E = t.quadrilateralToSquare(e, r, n, i, o, s, a, l)
          , g = t.squareToQuadrilateral(c, u, f, d, h, x, y, m);
        return g.times(E)
    }
    ,
    t.prototype.transformPoints = function(e) {
        for (var r = e.length, n = this.a11, i = this.a12, o = this.a13, s = this.a21, a = this.a22, l = this.a23, c = this.a31, u = this.a32, f = this.a33, d = 0; d < r; d += 2) {
            var h = e[d]
              , x = e[d + 1]
              , y = o * h + l * x + f;
            e[d] = (n * h + s * x + c) / y,
            e[d + 1] = (i * h + a * x + u) / y
        }
    }
    ,
    t.prototype.transformPointsWithValues = function(e, r) {
        for (var n = this.a11, i = this.a12, o = this.a13, s = this.a21, a = this.a22, l = this.a23, c = this.a31, u = this.a32, f = this.a33, d = e.length, h = 0; h < d; h++) {
            var x = e[h]
              , y = r[h]
              , m = o * x + l * y + f;
            e[h] = (n * x + s * y + c) / m,
            r[h] = (i * x + a * y + u) / m
        }
    }
    ,
    t.squareToQuadrilateral = function(e, r, n, i, o, s, a, l) {
        var c = e - n + o - a
          , u = r - i + s - l;
        if (c === 0 && u === 0)
            return new t(n - e,o - n,e,i - r,s - i,r,0,0,1);
        var f = n - o
          , d = a - o
          , h = i - s
          , x = l - s
          , y = f * x - d * h
          , m = (c * x - d * u) / y
          , E = (f * u - c * h) / y;
        return new t(n - e + m * n,a - e + E * a,e,i - r + m * i,l - r + E * l,r,m,E,1)
    }
    ,
    t.quadrilateralToSquare = function(e, r, n, i, o, s, a, l) {
        return t.squareToQuadrilateral(e, r, n, i, o, s, a, l).buildAdjoint()
    }
    ,
    t.prototype.buildAdjoint = function() {
        return new t(this.a22 * this.a33 - this.a23 * this.a32,this.a23 * this.a31 - this.a21 * this.a33,this.a21 * this.a32 - this.a22 * this.a31,this.a13 * this.a32 - this.a12 * this.a33,this.a11 * this.a33 - this.a13 * this.a31,this.a12 * this.a31 - this.a11 * this.a32,this.a12 * this.a23 - this.a13 * this.a22,this.a13 * this.a21 - this.a11 * this.a23,this.a11 * this.a22 - this.a12 * this.a21)
    }
    ,
    t.prototype.times = function(e) {
        return new t(this.a11 * e.a11 + this.a21 * e.a12 + this.a31 * e.a13,this.a11 * e.a21 + this.a21 * e.a22 + this.a31 * e.a23,this.a11 * e.a31 + this.a21 * e.a32 + this.a31 * e.a33,this.a12 * e.a11 + this.a22 * e.a12 + this.a32 * e.a13,this.a12 * e.a21 + this.a22 * e.a22 + this.a32 * e.a23,this.a12 * e.a31 + this.a22 * e.a32 + this.a32 * e.a33,this.a13 * e.a11 + this.a23 * e.a12 + this.a33 * e.a13,this.a13 * e.a21 + this.a23 * e.a22 + this.a33 * e.a23,this.a13 * e.a31 + this.a23 * e.a32 + this.a33 * e.a33)
    }
    ,
    t
}()
  , cbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , ube = function(t) {
    cbe(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.prototype.sampleGrid = function(r, n, i, o, s, a, l, c, u, f, d, h, x, y, m, E, g, p, v) {
        var _ = IM.quadrilateralToQuadrilateral(o, s, a, l, c, u, f, d, h, x, y, m, E, g, p, v);
        return this.sampleGridWithTransform(r, n, i, _)
    }
    ,
    e.prototype.sampleGridWithTransform = function(r, n, i, o) {
        if (n <= 0 || i <= 0)
            throw new le;
        for (var s = new Do(n,i), a = new Float32Array(2 * n), l = 0; l < i; l++) {
            for (var c = a.length, u = l + .5, f = 0; f < c; f += 2)
                a[f] = f / 2 + .5,
                a[f + 1] = u;
            o.transformPoints(a),
            s6.checkAndNudgePoints(r, a);
            try {
                for (var f = 0; f < c; f += 2)
                    r.get(Math.floor(a[f]), Math.floor(a[f + 1])) && s.set(f / 2, l)
            } catch {
                throw new le
            }
        }
        return s
    }
    ,
    e
}(s6)
  , RC = function() {
    function t() {}
    return t.setGridSampler = function(e) {
        t.gridSampler = e
    }
    ,
    t.getInstance = function() {
        return t.gridSampler
    }
    ,
    t.gridSampler = new ube,
    t
}()
  , _n = function() {
    function t(e, r) {
        this.x = e,
        this.y = r
    }
    return t.prototype.toResultPoint = function() {
        return new Te(this.getX(),this.getY())
    }
    ,
    t.prototype.getX = function() {
        return this.x
    }
    ,
    t.prototype.getY = function() {
        return this.y
    }
    ,
    t
}()
  , fbe = function() {
    function t(e) {
        this.EXPECTED_CORNER_BITS = new Int32Array([3808, 476, 2107, 1799]),
        this.image = e
    }
    return t.prototype.detect = function() {
        return this.detectMirror(!1)
    }
    ,
    t.prototype.detectMirror = function(e) {
        var r = this.getMatrixCenter()
          , n = this.getBullsEyeCorners(r);
        if (e) {
            var i = n[0];
            n[0] = n[2],
            n[2] = i
        }
        this.extractParameters(n);
        var o = this.sampleGrid(this.image, n[this.shift % 4], n[(this.shift + 1) % 4], n[(this.shift + 2) % 4], n[(this.shift + 3) % 4])
          , s = this.getMatrixCornerPoints(n);
        return new lbe(o,s,this.compact,this.nbDataBlocks,this.nbLayers)
    }
    ,
    t.prototype.extractParameters = function(e) {
        if (!this.isValidPoint(e[0]) || !this.isValidPoint(e[1]) || !this.isValidPoint(e[2]) || !this.isValidPoint(e[3]))
            throw new le;
        var r = 2 * this.nbCenterLayers
          , n = new Int32Array([this.sampleLine(e[0], e[1], r), this.sampleLine(e[1], e[2], r), this.sampleLine(e[2], e[3], r), this.sampleLine(e[3], e[0], r)]);
        this.shift = this.getRotation(n, r);
        for (var i = 0, o = 0; o < 4; o++) {
            var s = n[(this.shift + o) % 4];
            this.compact ? (i <<= 7,
            i += s >> 1 & 127) : (i <<= 10,
            i += (s >> 2 & 992) + (s >> 1 & 31))
        }
        var a = this.getCorrectedParameterData(i, this.compact);
        this.compact ? (this.nbLayers = (a >> 6) + 1,
        this.nbDataBlocks = (a & 63) + 1) : (this.nbLayers = (a >> 11) + 1,
        this.nbDataBlocks = (a & 2047) + 1)
    }
    ,
    t.prototype.getRotation = function(e, r) {
        var n = 0;
        e.forEach(function(o, s, a) {
            var l = (o >> r - 2 << 1) + (o & 1);
            n = (n << 3) + l
        }),
        n = ((n & 1) << 11) + (n >> 1);
        for (var i = 0; i < 4; i++)
            if (qe.bitCount(n ^ this.EXPECTED_CORNER_BITS[i]) <= 2)
                return i;
        throw new le
    }
    ,
    t.prototype.getCorrectedParameterData = function(e, r) {
        var n, i;
        r ? (n = 7,
        i = 2) : (n = 10,
        i = 4);
        for (var o = n - i, s = new Int32Array(n), a = n - 1; a >= 0; --a)
            s[a] = e & 15,
            e >>= 4;
        try {
            var l = new G1(Sn.AZTEC_PARAM);
            l.decode(s, o)
        } catch {
            throw new le
        }
        for (var c = 0, a = 0; a < i; a++)
            c = (c << 4) + s[a];
        return c
    }
    ,
    t.prototype.getBullsEyeCorners = function(e) {
        var r = e
          , n = e
          , i = e
          , o = e
          , s = !0;
        for (this.nbCenterLayers = 1; this.nbCenterLayers < 9; this.nbCenterLayers++) {
            var a = this.getFirstDifferent(r, s, 1, -1)
              , l = this.getFirstDifferent(n, s, 1, 1)
              , c = this.getFirstDifferent(i, s, -1, 1)
              , u = this.getFirstDifferent(o, s, -1, -1);
            if (this.nbCenterLayers > 2) {
                var f = this.distancePoint(u, a) * this.nbCenterLayers / (this.distancePoint(o, r) * (this.nbCenterLayers + 2));
                if (f < .75 || f > 1.25 || !this.isWhiteOrBlackRectangle(a, l, c, u))
                    break
            }
            r = a,
            n = l,
            i = c,
            o = u,
            s = !s
        }
        if (this.nbCenterLayers !== 5 && this.nbCenterLayers !== 7)
            throw new le;
        this.compact = this.nbCenterLayers === 5;
        var d = new Te(r.getX() + .5,r.getY() - .5)
          , h = new Te(n.getX() + .5,n.getY() + .5)
          , x = new Te(i.getX() - .5,i.getY() + .5)
          , y = new Te(o.getX() - .5,o.getY() - .5);
        return this.expandSquare([d, h, x, y], 2 * this.nbCenterLayers - 3, 2 * this.nbCenterLayers)
    }
    ,
    t.prototype.getMatrixCenter = function() {
        var e, r, n, i;
        try {
            var o = new KE(this.image).detect();
            e = o[0],
            r = o[1],
            n = o[2],
            i = o[3]
        } catch {
            var s = this.image.getWidth() / 2
              , a = this.image.getHeight() / 2;
            e = this.getFirstDifferent(new _n(s + 7,a - 7), !1, 1, -1).toResultPoint(),
            r = this.getFirstDifferent(new _n(s + 7,a + 7), !1, 1, 1).toResultPoint(),
            n = this.getFirstDifferent(new _n(s - 7,a + 7), !1, -1, 1).toResultPoint(),
            i = this.getFirstDifferent(new _n(s - 7,a - 7), !1, -1, -1).toResultPoint()
        }
        var l = ft.round((e.getX() + i.getX() + r.getX() + n.getX()) / 4)
          , c = ft.round((e.getY() + i.getY() + r.getY() + n.getY()) / 4);
        try {
            var o = new KE(this.image,15,l,c).detect();
            e = o[0],
            r = o[1],
            n = o[2],
            i = o[3]
        } catch {
            e = this.getFirstDifferent(new _n(l + 7,c - 7), !1, 1, -1).toResultPoint(),
            r = this.getFirstDifferent(new _n(l + 7,c + 7), !1, 1, 1).toResultPoint(),
            n = this.getFirstDifferent(new _n(l - 7,c + 7), !1, -1, 1).toResultPoint(),
            i = this.getFirstDifferent(new _n(l - 7,c - 7), !1, -1, -1).toResultPoint()
        }
        return l = ft.round((e.getX() + i.getX() + r.getX() + n.getX()) / 4),
        c = ft.round((e.getY() + i.getY() + r.getY() + n.getY()) / 4),
        new _n(l,c)
    }
    ,
    t.prototype.getMatrixCornerPoints = function(e) {
        return this.expandSquare(e, 2 * this.nbCenterLayers, this.getDimension())
    }
    ,
    t.prototype.sampleGrid = function(e, r, n, i, o) {
        var s = RC.getInstance()
          , a = this.getDimension()
          , l = a / 2 - this.nbCenterLayers
          , c = a / 2 + this.nbCenterLayers;
        return s.sampleGrid(e, a, a, l, l, c, l, c, c, l, c, r.getX(), r.getY(), n.getX(), n.getY(), i.getX(), i.getY(), o.getX(), o.getY())
    }
    ,
    t.prototype.sampleLine = function(e, r, n) {
        for (var i = 0, o = this.distanceResultPoint(e, r), s = o / n, a = e.getX(), l = e.getY(), c = s * (r.getX() - e.getX()) / o, u = s * (r.getY() - e.getY()) / o, f = 0; f < n; f++)
            this.image.get(ft.round(a + f * c), ft.round(l + f * u)) && (i |= 1 << n - f - 1);
        return i
    }
    ,
    t.prototype.isWhiteOrBlackRectangle = function(e, r, n, i) {
        var o = 3;
        e = new _n(e.getX() - o,e.getY() + o),
        r = new _n(r.getX() - o,r.getY() - o),
        n = new _n(n.getX() + o,n.getY() - o),
        i = new _n(i.getX() + o,i.getY() + o);
        var s = this.getColor(i, e);
        if (s === 0)
            return !1;
        var a = this.getColor(e, r);
        return a !== s || (a = this.getColor(r, n),
        a !== s) ? !1 : (a = this.getColor(n, i),
        a === s)
    }
    ,
    t.prototype.getColor = function(e, r) {
        for (var n = this.distancePoint(e, r), i = (r.getX() - e.getX()) / n, o = (r.getY() - e.getY()) / n, s = 0, a = e.getX(), l = e.getY(), c = this.image.get(e.getX(), e.getY()), u = Math.ceil(n), f = 0; f < u; f++)
            a += i,
            l += o,
            this.image.get(ft.round(a), ft.round(l)) !== c && s++;
        var d = s / n;
        return d > .1 && d < .9 ? 0 : d <= .1 === c ? 1 : -1
    }
    ,
    t.prototype.getFirstDifferent = function(e, r, n, i) {
        for (var o = e.getX() + n, s = e.getY() + i; this.isValid(o, s) && this.image.get(o, s) === r; )
            o += n,
            s += i;
        for (o -= n,
        s -= i; this.isValid(o, s) && this.image.get(o, s) === r; )
            o += n;
        for (o -= n; this.isValid(o, s) && this.image.get(o, s) === r; )
            s += i;
        return s -= i,
        new _n(o,s)
    }
    ,
    t.prototype.expandSquare = function(e, r, n) {
        var i = n / (2 * r)
          , o = e[0].getX() - e[2].getX()
          , s = e[0].getY() - e[2].getY()
          , a = (e[0].getX() + e[2].getX()) / 2
          , l = (e[0].getY() + e[2].getY()) / 2
          , c = new Te(a + i * o,l + i * s)
          , u = new Te(a - i * o,l - i * s);
        o = e[1].getX() - e[3].getX(),
        s = e[1].getY() - e[3].getY(),
        a = (e[1].getX() + e[3].getX()) / 2,
        l = (e[1].getY() + e[3].getY()) / 2;
        var f = new Te(a + i * o,l + i * s)
          , d = new Te(a - i * o,l - i * s)
          , h = [c, f, u, d];
        return h
    }
    ,
    t.prototype.isValid = function(e, r) {
        return e >= 0 && e < this.image.getWidth() && r > 0 && r < this.image.getHeight()
    }
    ,
    t.prototype.isValidPoint = function(e) {
        var r = ft.round(e.getX())
          , n = ft.round(e.getY());
        return this.isValid(r, n)
    }
    ,
    t.prototype.distancePoint = function(e, r) {
        return ft.distance(e.getX(), e.getY(), r.getX(), r.getY())
    }
    ,
    t.prototype.distanceResultPoint = function(e, r) {
        return ft.distance(e.getX(), e.getY(), r.getX(), r.getY())
    }
    ,
    t.prototype.getDimension = function() {
        return this.compact ? 4 * this.nbLayers + 11 : this.nbLayers <= 4 ? 4 * this.nbLayers + 15 : 4 * this.nbLayers + 2 * (qe.truncDivision(this.nbLayers - 4, 8) + 1) + 15
    }
    ,
    t
}()
  , ip = function() {
    function t() {}
    return t.prototype.decode = function(e, r) {
        r === void 0 && (r = null);
        var n = null
          , i = new fbe(e.getBlackMatrix())
          , o = null
          , s = null;
        try {
            var a = i.detectMirror(!1);
            o = a.getPoints(),
            this.reportFoundResultPoints(r, o),
            s = new o6().decode(a)
        } catch (f) {
            n = f
        }
        if (s == null)
            try {
                var a = i.detectMirror(!0);
                o = a.getPoints(),
                this.reportFoundResultPoints(r, o),
                s = new o6().decode(a)
            } catch (f) {
                throw n ?? f
            }
        var l = new nn(s.getText(),s.getRawBytes(),s.getNumBits(),o,ke.AZTEC,Ft.currentTimeMillis())
          , c = s.getByteSegments();
        c != null && l.putMetadata(Vr.BYTE_SEGMENTS, c);
        var u = s.getECLevel();
        return u != null && l.putMetadata(Vr.ERROR_CORRECTION_LEVEL, u),
        l
    }
    ,
    t.prototype.reportFoundResultPoints = function(e, r) {
        if (e != null) {
            var n = e.get(Pt.NEED_RESULT_POINT_CALLBACK);
            n != null && r.forEach(function(i, o, s) {
                n.foundPossibleResultPoint(i)
            })
        }
    }
    ,
    t.prototype.reset = function() {}
    ,
    t
}()
  , dbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    dbe(e, t);
    function e(r) {
        return r === void 0 && (r = 500),
        t.call(this, new ip, r) || this
    }
    return e
}
)(Mu);
var Ar = function() {
    function t() {}
    return t.prototype.decode = function(e, r) {
        try {
            return this.doDecode(e, r)
        } catch {
            var n = r && r.get(Pt.TRY_HARDER) === !0;
            if (n && e.isRotateSupported()) {
                var i = e.rotateCounterClockwise()
                  , o = this.doDecode(i, r)
                  , s = o.getResultMetadata()
                  , a = 270;
                s !== null && s.get(Vr.ORIENTATION) === !0 && (a = a + s.get(Vr.ORIENTATION) % 360),
                o.putMetadata(Vr.ORIENTATION, a);
                var l = o.getResultPoints();
                if (l !== null)
                    for (var c = i.getHeight(), u = 0; u < l.length; u++)
                        l[u] = new Te(c - l[u].getY() - 1,l[u].getX());
                return o
            } else
                throw new le
        }
    }
    ,
    t.prototype.reset = function() {}
    ,
    t.prototype.doDecode = function(e, r) {
        var n = e.getWidth(), i = e.getHeight(), o = new kr(n), s = r && r.get(Pt.TRY_HARDER) === !0, a = Math.max(1, i >> (s ? 8 : 5)), l;
        s ? l = i : l = 15;
        for (var c = Math.trunc(i / 2), u = 0; u < l; u++) {
            var f = Math.trunc((u + 1) / 2)
              , d = (u & 1) === 0
              , h = c + a * (d ? f : -f);
            if (h < 0 || h >= i)
                break;
            try {
                o = e.getBlackRow(h, o)
            } catch {
                continue
            }
            for (var x = function(g) {
                if (g === 1 && (o.reverse(),
                r && r.get(Pt.NEED_RESULT_POINT_CALLBACK) === !0)) {
                    var p = new Map;
                    r.forEach(function(b, C) {
                        return p.set(C, b)
                    }),
                    p.delete(Pt.NEED_RESULT_POINT_CALLBACK),
                    r = p
                }
                try {
                    var v = y.decodeRow(h, o, r);
                    if (g === 1) {
                        v.putMetadata(Vr.ORIENTATION, 180);
                        var _ = v.getResultPoints();
                        _ !== null && (_[0] = new Te(n - _[0].getX() - 1,_[0].getY()),
                        _[1] = new Te(n - _[1].getX() - 1,_[1].getY()))
                    }
                    return {
                        value: v
                    }
                } catch {}
            }, y = this, m = 0; m < 2; m++) {
                var E = x(m);
                if (typeof E == "object")
                    return E.value
            }
        }
        throw new le
    }
    ,
    t.recordPattern = function(e, r, n) {
        for (var i = n.length, o = 0; o < i; o++)
            n[o] = 0;
        var s = e.getSize();
        if (r >= s)
            throw new le;
        for (var a = !e.get(r), l = 0, c = r; c < s; ) {
            if (e.get(c) !== a)
                n[l]++;
            else {
                if (++l === i)
                    break;
                n[l] = 1,
                a = !a
            }
            c++
        }
        if (!(l === i || l === i - 1 && c === s))
            throw new le
    }
    ,
    t.recordPatternInReverse = function(e, r, n) {
        for (var i = n.length, o = e.get(r); r > 0 && i >= 0; )
            e.get(--r) !== o && (i--,
            o = !o);
        if (i >= 0)
            throw new le;
        t.recordPattern(e, r + 1, n)
    }
    ,
    t.patternMatchVariance = function(e, r, n) {
        for (var i = e.length, o = 0, s = 0, a = 0; a < i; a++)
            o += e[a],
            s += r[a];
        if (o < s)
            return Number.POSITIVE_INFINITY;
        var l = o / s;
        n *= l;
        for (var c = 0, u = 0; u < i; u++) {
            var f = e[u]
              , d = r[u] * l
              , h = f > d ? f - d : d - f;
            if (h > n)
                return Number.POSITIVE_INFINITY;
            c += h
        }
        return c / o
    }
    ,
    t
}()
  , hbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , a6 = function(t) {
    hbe(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.findStartPattern = function(r) {
        for (var n = r.getSize(), i = r.getNextSet(0), o = 0, s = Int32Array.from([0, 0, 0, 0, 0, 0]), a = i, l = !1, c = 6, u = i; u < n; u++)
            if (r.get(u) !== l)
                s[o]++;
            else {
                if (o === c - 1) {
                    for (var f = e.MAX_AVG_VARIANCE, d = -1, h = e.CODE_START_A; h <= e.CODE_START_C; h++) {
                        var x = Ar.patternMatchVariance(s, e.CODE_PATTERNS[h], e.MAX_INDIVIDUAL_VARIANCE);
                        x < f && (f = x,
                        d = h)
                    }
                    if (d >= 0 && r.isRange(Math.max(0, a - (u - a) / 2), a, !1))
                        return Int32Array.from([a, u, d]);
                    a += s[0] + s[1],
                    s = s.slice(2, s.length),
                    s[o - 1] = 0,
                    s[o] = 0,
                    o--
                } else
                    o++;
                s[o] = 1,
                l = !l
            }
        throw new le
    }
    ,
    e.decodeCode = function(r, n, i) {
        Ar.recordPattern(r, i, n);
        for (var o = e.MAX_AVG_VARIANCE, s = -1, a = 0; a < e.CODE_PATTERNS.length; a++) {
            var l = e.CODE_PATTERNS[a]
              , c = this.patternMatchVariance(n, l, e.MAX_INDIVIDUAL_VARIANCE);
            c < o && (o = c,
            s = a)
        }
        if (s >= 0)
            return s;
        throw new le
    }
    ,
    e.prototype.decodeRow = function(r, n, i) {
        var o = i && i.get(Pt.ASSUME_GS1) === !0
          , s = e.findStartPattern(n)
          , a = s[2]
          , l = 0
          , c = new Uint8Array(20);
        c[l++] = a;
        var u;
        switch (a) {
        case e.CODE_START_A:
            u = e.CODE_CODE_A;
            break;
        case e.CODE_START_B:
            u = e.CODE_CODE_B;
            break;
        case e.CODE_START_C:
            u = e.CODE_CODE_C;
            break;
        default:
            throw new ge
        }
        for (var f = !1, d = !1, h = "", x = s[0], y = s[1], m = Int32Array.from([0, 0, 0, 0, 0, 0]), E = 0, g = 0, p = a, v = 0, _ = !0, b = !1, C = !1; !f; ) {
            var w = d;
            switch (d = !1,
            E = g,
            g = e.decodeCode(n, m, y),
            c[l++] = g,
            g !== e.CODE_STOP && (_ = !0),
            g !== e.CODE_STOP && (v++,
            p += v * g),
            x = y,
            y += m.reduce(function(N, j) {
                return N + j
            }, 0),
            g) {
            case e.CODE_START_A:
            case e.CODE_START_B:
            case e.CODE_START_C:
                throw new ge
            }
            switch (u) {
            case e.CODE_CODE_A:
                if (g < 64)
                    C === b ? h += String.fromCharCode(" ".charCodeAt(0) + g) : h += String.fromCharCode(" ".charCodeAt(0) + g + 128),
                    C = !1;
                else if (g < 96)
                    C === b ? h += String.fromCharCode(g - 64) : h += String.fromCharCode(g + 64),
                    C = !1;
                else
                    switch (g !== e.CODE_STOP && (_ = !1),
                    g) {
                    case e.CODE_FNC_1:
                        o && (h.length === 0 ? h += "]C1" : h += String.fromCharCode(29));
                        break;
                    case e.CODE_FNC_2:
                    case e.CODE_FNC_3:
                        break;
                    case e.CODE_FNC_4_A:
                        !b && C ? (b = !0,
                        C = !1) : b && C ? (b = !1,
                        C = !1) : C = !0;
                        break;
                    case e.CODE_SHIFT:
                        d = !0,
                        u = e.CODE_CODE_B;
                        break;
                    case e.CODE_CODE_B:
                        u = e.CODE_CODE_B;
                        break;
                    case e.CODE_CODE_C:
                        u = e.CODE_CODE_C;
                        break;
                    case e.CODE_STOP:
                        f = !0;
                        break
                    }
                break;
            case e.CODE_CODE_B:
                if (g < 96)
                    C === b ? h += String.fromCharCode(" ".charCodeAt(0) + g) : h += String.fromCharCode(" ".charCodeAt(0) + g + 128),
                    C = !1;
                else
                    switch (g !== e.CODE_STOP && (_ = !1),
                    g) {
                    case e.CODE_FNC_1:
                        o && (h.length === 0 ? h += "]C1" : h += String.fromCharCode(29));
                        break;
                    case e.CODE_FNC_2:
                    case e.CODE_FNC_3:
                        break;
                    case e.CODE_FNC_4_B:
                        !b && C ? (b = !0,
                        C = !1) : b && C ? (b = !1,
                        C = !1) : C = !0;
                        break;
                    case e.CODE_SHIFT:
                        d = !0,
                        u = e.CODE_CODE_A;
                        break;
                    case e.CODE_CODE_A:
                        u = e.CODE_CODE_A;
                        break;
                    case e.CODE_CODE_C:
                        u = e.CODE_CODE_C;
                        break;
                    case e.CODE_STOP:
                        f = !0;
                        break
                    }
                break;
            case e.CODE_CODE_C:
                if (g < 100)
                    g < 10 && (h += "0"),
                    h += g;
                else
                    switch (g !== e.CODE_STOP && (_ = !1),
                    g) {
                    case e.CODE_FNC_1:
                        o && (h.length === 0 ? h += "]C1" : h += String.fromCharCode(29));
                        break;
                    case e.CODE_CODE_A:
                        u = e.CODE_CODE_A;
                        break;
                    case e.CODE_CODE_B:
                        u = e.CODE_CODE_B;
                        break;
                    case e.CODE_STOP:
                        f = !0;
                        break
                    }
                break
            }
            w && (u = u === e.CODE_CODE_A ? e.CODE_CODE_B : e.CODE_CODE_A)
        }
        var T = y - x;
        if (y = n.getNextUnset(y),
        !n.isRange(y, Math.min(n.getSize(), y + (y - x) / 2), !1))
            throw new le;
        if (p -= v * E,
        p % 103 !== E)
            throw new fr;
        var A = h.length;
        if (A === 0)
            throw new le;
        A > 0 && _ && (u === e.CODE_CODE_C ? h = h.substring(0, A - 2) : h = h.substring(0, A - 1));
        for (var B = (s[1] + s[0]) / 2, S = x + T / 2, D = c.length, F = new Uint8Array(D), R = 0; R < D; R++)
            F[R] = c[R];
        var P = [new Te(B,r), new Te(S,r)];
        return new nn(h,F,0,P,ke.CODE_128,new Date().getTime())
    }
    ,
    e.CODE_PATTERNS = [Int32Array.from([2, 1, 2, 2, 2, 2]), Int32Array.from([2, 2, 2, 1, 2, 2]), Int32Array.from([2, 2, 2, 2, 2, 1]), Int32Array.from([1, 2, 1, 2, 2, 3]), Int32Array.from([1, 2, 1, 3, 2, 2]), Int32Array.from([1, 3, 1, 2, 2, 2]), Int32Array.from([1, 2, 2, 2, 1, 3]), Int32Array.from([1, 2, 2, 3, 1, 2]), Int32Array.from([1, 3, 2, 2, 1, 2]), Int32Array.from([2, 2, 1, 2, 1, 3]), Int32Array.from([2, 2, 1, 3, 1, 2]), Int32Array.from([2, 3, 1, 2, 1, 2]), Int32Array.from([1, 1, 2, 2, 3, 2]), Int32Array.from([1, 2, 2, 1, 3, 2]), Int32Array.from([1, 2, 2, 2, 3, 1]), Int32Array.from([1, 1, 3, 2, 2, 2]), Int32Array.from([1, 2, 3, 1, 2, 2]), Int32Array.from([1, 2, 3, 2, 2, 1]), Int32Array.from([2, 2, 3, 2, 1, 1]), Int32Array.from([2, 2, 1, 1, 3, 2]), Int32Array.from([2, 2, 1, 2, 3, 1]), Int32Array.from([2, 1, 3, 2, 1, 2]), Int32Array.from([2, 2, 3, 1, 1, 2]), Int32Array.from([3, 1, 2, 1, 3, 1]), Int32Array.from([3, 1, 1, 2, 2, 2]), Int32Array.from([3, 2, 1, 1, 2, 2]), Int32Array.from([3, 2, 1, 2, 2, 1]), Int32Array.from([3, 1, 2, 2, 1, 2]), Int32Array.from([3, 2, 2, 1, 1, 2]), Int32Array.from([3, 2, 2, 2, 1, 1]), Int32Array.from([2, 1, 2, 1, 2, 3]), Int32Array.from([2, 1, 2, 3, 2, 1]), Int32Array.from([2, 3, 2, 1, 2, 1]), Int32Array.from([1, 1, 1, 3, 2, 3]), Int32Array.from([1, 3, 1, 1, 2, 3]), Int32Array.from([1, 3, 1, 3, 2, 1]), Int32Array.from([1, 1, 2, 3, 1, 3]), Int32Array.from([1, 3, 2, 1, 1, 3]), Int32Array.from([1, 3, 2, 3, 1, 1]), Int32Array.from([2, 1, 1, 3, 1, 3]), Int32Array.from([2, 3, 1, 1, 1, 3]), Int32Array.from([2, 3, 1, 3, 1, 1]), Int32Array.from([1, 1, 2, 1, 3, 3]), Int32Array.from([1, 1, 2, 3, 3, 1]), Int32Array.from([1, 3, 2, 1, 3, 1]), Int32Array.from([1, 1, 3, 1, 2, 3]), Int32Array.from([1, 1, 3, 3, 2, 1]), Int32Array.from([1, 3, 3, 1, 2, 1]), Int32Array.from([3, 1, 3, 1, 2, 1]), Int32Array.from([2, 1, 1, 3, 3, 1]), Int32Array.from([2, 3, 1, 1, 3, 1]), Int32Array.from([2, 1, 3, 1, 1, 3]), Int32Array.from([2, 1, 3, 3, 1, 1]), Int32Array.from([2, 1, 3, 1, 3, 1]), Int32Array.from([3, 1, 1, 1, 2, 3]), Int32Array.from([3, 1, 1, 3, 2, 1]), Int32Array.from([3, 3, 1, 1, 2, 1]), Int32Array.from([3, 1, 2, 1, 1, 3]), Int32Array.from([3, 1, 2, 3, 1, 1]), Int32Array.from([3, 3, 2, 1, 1, 1]), Int32Array.from([3, 1, 4, 1, 1, 1]), Int32Array.from([2, 2, 1, 4, 1, 1]), Int32Array.from([4, 3, 1, 1, 1, 1]), Int32Array.from([1, 1, 1, 2, 2, 4]), Int32Array.from([1, 1, 1, 4, 2, 2]), Int32Array.from([1, 2, 1, 1, 2, 4]), Int32Array.from([1, 2, 1, 4, 2, 1]), Int32Array.from([1, 4, 1, 1, 2, 2]), Int32Array.from([1, 4, 1, 2, 2, 1]), Int32Array.from([1, 1, 2, 2, 1, 4]), Int32Array.from([1, 1, 2, 4, 1, 2]), Int32Array.from([1, 2, 2, 1, 1, 4]), Int32Array.from([1, 2, 2, 4, 1, 1]), Int32Array.from([1, 4, 2, 1, 1, 2]), Int32Array.from([1, 4, 2, 2, 1, 1]), Int32Array.from([2, 4, 1, 2, 1, 1]), Int32Array.from([2, 2, 1, 1, 1, 4]), Int32Array.from([4, 1, 3, 1, 1, 1]), Int32Array.from([2, 4, 1, 1, 1, 2]), Int32Array.from([1, 3, 4, 1, 1, 1]), Int32Array.from([1, 1, 1, 2, 4, 2]), Int32Array.from([1, 2, 1, 1, 4, 2]), Int32Array.from([1, 2, 1, 2, 4, 1]), Int32Array.from([1, 1, 4, 2, 1, 2]), Int32Array.from([1, 2, 4, 1, 1, 2]), Int32Array.from([1, 2, 4, 2, 1, 1]), Int32Array.from([4, 1, 1, 2, 1, 2]), Int32Array.from([4, 2, 1, 1, 1, 2]), Int32Array.from([4, 2, 1, 2, 1, 1]), Int32Array.from([2, 1, 2, 1, 4, 1]), Int32Array.from([2, 1, 4, 1, 2, 1]), Int32Array.from([4, 1, 2, 1, 2, 1]), Int32Array.from([1, 1, 1, 1, 4, 3]), Int32Array.from([1, 1, 1, 3, 4, 1]), Int32Array.from([1, 3, 1, 1, 4, 1]), Int32Array.from([1, 1, 4, 1, 1, 3]), Int32Array.from([1, 1, 4, 3, 1, 1]), Int32Array.from([4, 1, 1, 1, 1, 3]), Int32Array.from([4, 1, 1, 3, 1, 1]), Int32Array.from([1, 1, 3, 1, 4, 1]), Int32Array.from([1, 1, 4, 1, 3, 1]), Int32Array.from([3, 1, 1, 1, 4, 1]), Int32Array.from([4, 1, 1, 1, 3, 1]), Int32Array.from([2, 1, 1, 4, 1, 2]), Int32Array.from([2, 1, 1, 2, 1, 4]), Int32Array.from([2, 1, 1, 2, 3, 2]), Int32Array.from([2, 3, 3, 1, 1, 1, 2])],
    e.MAX_AVG_VARIANCE = .25,
    e.MAX_INDIVIDUAL_VARIANCE = .7,
    e.CODE_SHIFT = 98,
    e.CODE_CODE_C = 99,
    e.CODE_CODE_B = 100,
    e.CODE_CODE_A = 101,
    e.CODE_FNC_1 = 102,
    e.CODE_FNC_2 = 97,
    e.CODE_FNC_3 = 96,
    e.CODE_FNC_4_A = 101,
    e.CODE_FNC_4_B = 100,
    e.CODE_START_A = 103,
    e.CODE_START_B = 104,
    e.CODE_START_C = 105,
    e.CODE_STOP = 106,
    e
}(Ar)
  , xbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , qm = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , l6 = function(t) {
    xbe(e, t);
    function e(r, n) {
        r === void 0 && (r = !1),
        n === void 0 && (n = !1);
        var i = t.call(this) || this;
        return i.usingCheckDigit = r,
        i.extendedMode = n,
        i.decodeRowResult = "",
        i.counters = new Int32Array(9),
        i
    }
    return e.prototype.decodeRow = function(r, n, i) {
        var o, s, a, l, c = this.counters;
        c.fill(0),
        this.decodeRowResult = "";
        var u = e.findAsteriskPattern(n, c), f = n.getNextSet(u[1]), d = n.getSize(), h, x;
        do {
            e.recordPattern(n, f, c);
            var y = e.toNarrowWidePattern(c);
            if (y < 0)
                throw new le;
            h = e.patternToChar(y),
            this.decodeRowResult += h,
            x = f;
            try {
                for (var m = (o = void 0,
                qm(c)), E = m.next(); !E.done; E = m.next()) {
                    var g = E.value;
                    f += g
                }
            } catch (D) {
                o = {
                    error: D
                }
            } finally {
                try {
                    E && !E.done && (s = m.return) && s.call(m)
                } finally {
                    if (o)
                        throw o.error
                }
            }
            f = n.getNextSet(f)
        } while (h !== "*");
        this.decodeRowResult = this.decodeRowResult.substring(0, this.decodeRowResult.length - 1);
        var p = 0;
        try {
            for (var v = qm(c), _ = v.next(); !_.done; _ = v.next()) {
                var g = _.value;
                p += g
            }
        } catch (D) {
            a = {
                error: D
            }
        } finally {
            try {
                _ && !_.done && (l = v.return) && l.call(v)
            } finally {
                if (a)
                    throw a.error
            }
        }
        var b = f - x - p;
        if (f !== d && b * 2 < p)
            throw new le;
        if (this.usingCheckDigit) {
            for (var C = this.decodeRowResult.length - 1, w = 0, T = 0; T < C; T++)
                w += e.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(T));
            if (this.decodeRowResult.charAt(C) !== e.ALPHABET_STRING.charAt(w % 43))
                throw new fr;
            this.decodeRowResult = this.decodeRowResult.substring(0, C)
        }
        if (this.decodeRowResult.length === 0)
            throw new le;
        var A;
        this.extendedMode ? A = e.decodeExtended(this.decodeRowResult) : A = this.decodeRowResult;
        var B = (u[1] + u[0]) / 2
          , S = x + p / 2;
        return new nn(A,null,0,[new Te(B,r), new Te(S,r)],ke.CODE_39,new Date().getTime())
    }
    ,
    e.findAsteriskPattern = function(r, n) {
        for (var i = r.getSize(), o = r.getNextSet(0), s = 0, a = o, l = !1, c = n.length, u = o; u < i; u++)
            if (r.get(u) !== l)
                n[s]++;
            else {
                if (s === c - 1) {
                    if (this.toNarrowWidePattern(n) === e.ASTERISK_ENCODING && r.isRange(Math.max(0, a - Math.floor((u - a) / 2)), a, !1))
                        return [a, u];
                    a += n[0] + n[1],
                    n.copyWithin(0, 2, 2 + s - 1),
                    n[s - 1] = 0,
                    n[s] = 0,
                    s--
                } else
                    s++;
                n[s] = 1,
                l = !l
            }
        throw new le
    }
    ,
    e.toNarrowWidePattern = function(r) {
        var n, i, o = r.length, s = 0, a;
        do {
            var l = 2147483647;
            try {
                for (var c = (n = void 0,
                qm(r)), u = c.next(); !u.done; u = c.next()) {
                    var f = u.value;
                    f < l && f > s && (l = f)
                }
            } catch (y) {
                n = {
                    error: y
                }
            } finally {
                try {
                    u && !u.done && (i = c.return) && i.call(c)
                } finally {
                    if (n)
                        throw n.error
                }
            }
            s = l,
            a = 0;
            for (var d = 0, h = 0, x = 0; x < o; x++) {
                var f = r[x];
                f > s && (h |= 1 << o - 1 - x,
                a++,
                d += f)
            }
            if (a === 3) {
                for (var x = 0; x < o && a > 0; x++) {
                    var f = r[x];
                    if (f > s && (a--,
                    f * 2 >= d))
                        return -1
                }
                return h
            }
        } while (a > 3);
        return -1
    }
    ,
    e.patternToChar = function(r) {
        for (var n = 0; n < e.CHARACTER_ENCODINGS.length; n++)
            if (e.CHARACTER_ENCODINGS[n] === r)
                return e.ALPHABET_STRING.charAt(n);
        if (r === e.ASTERISK_ENCODING)
            return "*";
        throw new le
    }
    ,
    e.decodeExtended = function(r) {
        for (var n = r.length, i = "", o = 0; o < n; o++) {
            var s = r.charAt(o);
            if (s === "+" || s === "$" || s === "%" || s === "/") {
                var a = r.charAt(o + 1)
                  , l = "\0";
                switch (s) {
                case "+":
                    if (a >= "A" && a <= "Z")
                        l = String.fromCharCode(a.charCodeAt(0) + 32);
                    else
                        throw new ge;
                    break;
                case "$":
                    if (a >= "A" && a <= "Z")
                        l = String.fromCharCode(a.charCodeAt(0) - 64);
                    else
                        throw new ge;
                    break;
                case "%":
                    if (a >= "A" && a <= "E")
                        l = String.fromCharCode(a.charCodeAt(0) - 38);
                    else if (a >= "F" && a <= "J")
                        l = String.fromCharCode(a.charCodeAt(0) - 11);
                    else if (a >= "K" && a <= "O")
                        l = String.fromCharCode(a.charCodeAt(0) + 16);
                    else if (a >= "P" && a <= "T")
                        l = String.fromCharCode(a.charCodeAt(0) + 43);
                    else if (a === "U")
                        l = "\0";
                    else if (a === "V")
                        l = "@";
                    else if (a === "W")
                        l = "`";
                    else if (a === "X" || a === "Y" || a === "Z")
                        l = "";
                    else
                        throw new ge;
                    break;
                case "/":
                    if (a >= "A" && a <= "O")
                        l = String.fromCharCode(a.charCodeAt(0) - 32);
                    else if (a === "Z")
                        l = ":";
                    else
                        throw new ge;
                    break
                }
                i += l,
                o++
            } else
                i += s
        }
        return i
    }
    ,
    e.ALPHABET_STRING = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",
    e.CHARACTER_ENCODINGS = [52, 289, 97, 352, 49, 304, 112, 37, 292, 100, 265, 73, 328, 25, 280, 88, 13, 268, 76, 28, 259, 67, 322, 19, 274, 82, 7, 262, 70, 22, 385, 193, 448, 145, 400, 208, 133, 388, 196, 168, 162, 138, 42],
    e.ASTERISK_ENCODING = 148,
    e
}(Ar)
  , pbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Zm = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , c6 = function(t) {
    pbe(e, t);
    function e() {
        var r = t.call(this) || this;
        return r.decodeRowResult = "",
        r.counters = new Int32Array(6),
        r
    }
    return e.prototype.decodeRow = function(r, n, i) {
        var o, s, a, l, c = this.findAsteriskPattern(n), u = n.getNextSet(c[1]), f = n.getSize(), d = this.counters;
        d.fill(0),
        this.decodeRowResult = "";
        var h, x;
        do {
            e.recordPattern(n, u, d);
            var y = this.toPattern(d);
            if (y < 0)
                throw new le;
            h = this.patternToChar(y),
            this.decodeRowResult += h,
            x = u;
            try {
                for (var m = (o = void 0,
                Zm(d)), E = m.next(); !E.done; E = m.next()) {
                    var g = E.value;
                    u += g
                }
            } catch (T) {
                o = {
                    error: T
                }
            } finally {
                try {
                    E && !E.done && (s = m.return) && s.call(m)
                } finally {
                    if (o)
                        throw o.error
                }
            }
            u = n.getNextSet(u)
        } while (h !== "*");
        this.decodeRowResult = this.decodeRowResult.substring(0, this.decodeRowResult.length - 1);
        var p = 0;
        try {
            for (var v = Zm(d), _ = v.next(); !_.done; _ = v.next()) {
                var g = _.value;
                p += g
            }
        } catch (T) {
            a = {
                error: T
            }
        } finally {
            try {
                _ && !_.done && (l = v.return) && l.call(v)
            } finally {
                if (a)
                    throw a.error
            }
        }
        if (u === f || !n.get(u))
            throw new le;
        if (this.decodeRowResult.length < 2)
            throw new le;
        this.checkChecksums(this.decodeRowResult),
        this.decodeRowResult = this.decodeRowResult.substring(0, this.decodeRowResult.length - 2);
        var b = this.decodeExtended(this.decodeRowResult)
          , C = (c[1] + c[0]) / 2
          , w = x + p / 2;
        return new nn(b,null,0,[new Te(C,r), new Te(w,r)],ke.CODE_93,new Date().getTime())
    }
    ,
    e.prototype.findAsteriskPattern = function(r) {
        var n = r.getSize()
          , i = r.getNextSet(0);
        this.counters.fill(0);
        for (var o = this.counters, s = i, a = !1, l = o.length, c = 0, u = i; u < n; u++)
            if (r.get(u) !== a)
                o[c]++;
            else {
                if (c === l - 1) {
                    if (this.toPattern(o) === e.ASTERISK_ENCODING)
                        return new Int32Array([s, u]);
                    s += o[0] + o[1],
                    o.copyWithin(0, 2, 2 + c - 1),
                    o[c - 1] = 0,
                    o[c] = 0,
                    c--
                } else
                    c++;
                o[c] = 1,
                a = !a
            }
        throw new le
    }
    ,
    e.prototype.toPattern = function(r) {
        var n, i, o = 0;
        try {
            for (var s = Zm(r), a = s.next(); !a.done; a = s.next()) {
                var l = a.value;
                o += l
            }
        } catch (x) {
            n = {
                error: x
            }
        } finally {
            try {
                a && !a.done && (i = s.return) && i.call(s)
            } finally {
                if (n)
                    throw n.error
            }
        }
        for (var c = 0, u = r.length, f = 0; f < u; f++) {
            var d = Math.round(r[f] * 9 / o);
            if (d < 1 || d > 4)
                return -1;
            if (f & 1)
                c <<= d;
            else
                for (var h = 0; h < d; h++)
                    c = c << 1 | 1
        }
        return c
    }
    ,
    e.prototype.patternToChar = function(r) {
        for (var n = 0; n < e.CHARACTER_ENCODINGS.length; n++)
            if (e.CHARACTER_ENCODINGS[n] === r)
                return e.ALPHABET_STRING.charAt(n);
        throw new le
    }
    ,
    e.prototype.decodeExtended = function(r) {
        for (var n = r.length, i = "", o = 0; o < n; o++) {
            var s = r.charAt(o);
            if (s >= "a" && s <= "d") {
                if (o >= n - 1)
                    throw new ge;
                var a = r.charAt(o + 1)
                  , l = "\0";
                switch (s) {
                case "d":
                    if (a >= "A" && a <= "Z")
                        l = String.fromCharCode(a.charCodeAt(0) + 32);
                    else
                        throw new ge;
                    break;
                case "a":
                    if (a >= "A" && a <= "Z")
                        l = String.fromCharCode(a.charCodeAt(0) - 64);
                    else
                        throw new ge;
                    break;
                case "b":
                    if (a >= "A" && a <= "E")
                        l = String.fromCharCode(a.charCodeAt(0) - 38);
                    else if (a >= "F" && a <= "J")
                        l = String.fromCharCode(a.charCodeAt(0) - 11);
                    else if (a >= "K" && a <= "O")
                        l = String.fromCharCode(a.charCodeAt(0) + 16);
                    else if (a >= "P" && a <= "T")
                        l = String.fromCharCode(a.charCodeAt(0) + 43);
                    else if (a === "U")
                        l = "\0";
                    else if (a === "V")
                        l = "@";
                    else if (a === "W")
                        l = "`";
                    else if (a >= "X" && a <= "Z")
                        l = String.fromCharCode(127);
                    else
                        throw new ge;
                    break;
                case "c":
                    if (a >= "A" && a <= "O")
                        l = String.fromCharCode(a.charCodeAt(0) - 32);
                    else if (a === "Z")
                        l = ":";
                    else
                        throw new ge;
                    break
                }
                i += l,
                o++
            } else
                i += s
        }
        return i
    }
    ,
    e.prototype.checkChecksums = function(r) {
        var n = r.length;
        this.checkOneChecksum(r, n - 2, 20),
        this.checkOneChecksum(r, n - 1, 15)
    }
    ,
    e.prototype.checkOneChecksum = function(r, n, i) {
        for (var o = 1, s = 0, a = n - 1; a >= 0; a--)
            s += o * e.ALPHABET_STRING.indexOf(r.charAt(a)),
            ++o > i && (o = 1);
        if (r.charAt(n) !== e.ALPHABET_STRING[s % 47])
            throw new fr
    }
    ,
    e.ALPHABET_STRING = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%abcd*",
    e.CHARACTER_ENCODINGS = [276, 328, 324, 322, 296, 292, 290, 336, 274, 266, 424, 420, 418, 404, 402, 394, 360, 356, 354, 308, 282, 344, 332, 326, 300, 278, 436, 434, 428, 422, 406, 410, 364, 358, 310, 314, 302, 468, 466, 458, 366, 374, 430, 294, 474, 470, 306, 350],
    e.ASTERISK_ENCODING = e.CHARACTER_ENCODINGS[47],
    e
}(Ar)
  , gbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , mbe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , u6 = function(t) {
    gbe(e, t);
    function e() {
        var r = t !== null && t.apply(this, arguments) || this;
        return r.narrowLineWidth = -1,
        r
    }
    return e.prototype.decodeRow = function(r, n, i) {
        var o, s, a = this.decodeStart(n), l = this.decodeEnd(n), c = new Ke;
        e.decodeMiddle(n, a[1], l[0], c);
        var u = c.toString()
          , f = null;
        i != null && (f = i.get(Pt.ALLOWED_LENGTHS)),
        f == null && (f = e.DEFAULT_ALLOWED_LENGTHS);
        var d = u.length
          , h = !1
          , x = 0;
        try {
            for (var y = mbe(f), m = y.next(); !m.done; m = y.next()) {
                var E = m.value;
                if (d === E) {
                    h = !0;
                    break
                }
                E > x && (x = E)
            }
        } catch (v) {
            o = {
                error: v
            }
        } finally {
            try {
                m && !m.done && (s = y.return) && s.call(y)
            } finally {
                if (o)
                    throw o.error
            }
        }
        if (!h && d > x && (h = !0),
        !h)
            throw new ge;
        var g = [new Te(a[1],r), new Te(l[0],r)]
          , p = new nn(u,null,0,g,ke.ITF,new Date().getTime());
        return p
    }
    ,
    e.decodeMiddle = function(r, n, i, o) {
        var s = new Int32Array(10)
          , a = new Int32Array(5)
          , l = new Int32Array(5);
        for (s.fill(0),
        a.fill(0),
        l.fill(0); n < i; ) {
            Ar.recordPattern(r, n, s);
            for (var c = 0; c < 5; c++) {
                var u = 2 * c;
                a[c] = s[u],
                l[c] = s[u + 1]
            }
            var f = e.decodeDigit(a);
            o.append(f.toString()),
            f = this.decodeDigit(l),
            o.append(f.toString()),
            s.forEach(function(d) {
                n += d
            })
        }
    }
    ,
    e.prototype.decodeStart = function(r) {
        var n = e.skipWhiteSpace(r)
          , i = e.findGuardPattern(r, n, e.START_PATTERN);
        return this.narrowLineWidth = (i[1] - i[0]) / 4,
        this.validateQuietZone(r, i[0]),
        i
    }
    ,
    e.prototype.validateQuietZone = function(r, n) {
        var i = this.narrowLineWidth * 10;
        i = i < n ? i : n;
        for (var o = n - 1; i > 0 && o >= 0 && !r.get(o); o--)
            i--;
        if (i !== 0)
            throw new le
    }
    ,
    e.skipWhiteSpace = function(r) {
        var n = r.getSize()
          , i = r.getNextSet(0);
        if (i === n)
            throw new le;
        return i
    }
    ,
    e.prototype.decodeEnd = function(r) {
        r.reverse();
        try {
            var n = e.skipWhiteSpace(r)
              , i = void 0;
            try {
                i = e.findGuardPattern(r, n, e.END_PATTERN_REVERSED[0])
            } catch (s) {
                s instanceof le && (i = e.findGuardPattern(r, n, e.END_PATTERN_REVERSED[1]))
            }
            this.validateQuietZone(r, i[0]);
            var o = i[0];
            return i[0] = r.getSize() - i[1],
            i[1] = r.getSize() - o,
            i
        } finally {
            r.reverse()
        }
    }
    ,
    e.findGuardPattern = function(r, n, i) {
        var o = i.length
          , s = new Int32Array(o)
          , a = r.getSize()
          , l = !1
          , c = 0
          , u = n;
        s.fill(0);
        for (var f = n; f < a; f++)
            if (r.get(f) !== l)
                s[c]++;
            else {
                if (c === o - 1) {
                    if (Ar.patternMatchVariance(s, i, e.MAX_INDIVIDUAL_VARIANCE) < e.MAX_AVG_VARIANCE)
                        return [u, f];
                    u += s[0] + s[1],
                    Ft.arraycopy(s, 2, s, 0, c - 1),
                    s[c - 1] = 0,
                    s[c] = 0,
                    c--
                } else
                    c++;
                s[c] = 1,
                l = !l
            }
        throw new le
    }
    ,
    e.decodeDigit = function(r) {
        for (var n = e.MAX_AVG_VARIANCE, i = -1, o = e.PATTERNS.length, s = 0; s < o; s++) {
            var a = e.PATTERNS[s]
              , l = Ar.patternMatchVariance(r, a, e.MAX_INDIVIDUAL_VARIANCE);
            l < n ? (n = l,
            i = s) : l === n && (i = -1)
        }
        if (i >= 0)
            return i % 10;
        throw new le
    }
    ,
    e.PATTERNS = [Int32Array.from([1, 1, 2, 2, 1]), Int32Array.from([2, 1, 1, 1, 2]), Int32Array.from([1, 2, 1, 1, 2]), Int32Array.from([2, 2, 1, 1, 1]), Int32Array.from([1, 1, 2, 1, 2]), Int32Array.from([2, 1, 2, 1, 1]), Int32Array.from([1, 2, 2, 1, 1]), Int32Array.from([1, 1, 1, 2, 2]), Int32Array.from([2, 1, 1, 2, 1]), Int32Array.from([1, 2, 1, 2, 1]), Int32Array.from([1, 1, 3, 3, 1]), Int32Array.from([3, 1, 1, 1, 3]), Int32Array.from([1, 3, 1, 1, 3]), Int32Array.from([3, 3, 1, 1, 1]), Int32Array.from([1, 1, 3, 1, 3]), Int32Array.from([3, 1, 3, 1, 1]), Int32Array.from([1, 3, 3, 1, 1]), Int32Array.from([1, 1, 1, 3, 3]), Int32Array.from([3, 1, 1, 3, 1]), Int32Array.from([1, 3, 1, 3, 1])],
    e.MAX_AVG_VARIANCE = .38,
    e.MAX_INDIVIDUAL_VARIANCE = .5,
    e.DEFAULT_ALLOWED_LENGTHS = [6, 8, 10, 12, 14],
    e.START_PATTERN = Int32Array.from([1, 1, 1, 1]),
    e.END_PATTERN_REVERSED = [Int32Array.from([1, 1, 2]), Int32Array.from([1, 1, 3])],
    e
}(Ar)
  , vbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , yu = function(t) {
    vbe(e, t);
    function e() {
        var r = t !== null && t.apply(this, arguments) || this;
        return r.decodeRowStringBuffer = "",
        r
    }
    return e.findStartGuardPattern = function(r) {
        for (var n = !1, i, o = 0, s = Int32Array.from([0, 0, 0]); !n; ) {
            s = Int32Array.from([0, 0, 0]),
            i = e.findGuardPattern(r, o, !1, this.START_END_PATTERN, s);
            var a = i[0];
            o = i[1];
            var l = a - (o - a);
            l >= 0 && (n = r.isRange(l, a, !1))
        }
        return i
    }
    ,
    e.checkChecksum = function(r) {
        return e.checkStandardUPCEANChecksum(r)
    }
    ,
    e.checkStandardUPCEANChecksum = function(r) {
        var n = r.length;
        if (n === 0)
            return !1;
        var i = parseInt(r.charAt(n - 1), 10);
        return e.getStandardUPCEANChecksum(r.substring(0, n - 1)) === i
    }
    ,
    e.getStandardUPCEANChecksum = function(r) {
        for (var n = r.length, i = 0, o = n - 1; o >= 0; o -= 2) {
            var s = r.charAt(o).charCodeAt(0) - "0".charCodeAt(0);
            if (s < 0 || s > 9)
                throw new ge;
            i += s
        }
        i *= 3;
        for (var o = n - 2; o >= 0; o -= 2) {
            var s = r.charAt(o).charCodeAt(0) - "0".charCodeAt(0);
            if (s < 0 || s > 9)
                throw new ge;
            i += s
        }
        return (1e3 - i) % 10
    }
    ,
    e.decodeEnd = function(r, n) {
        return e.findGuardPattern(r, n, !1, e.START_END_PATTERN, new Int32Array(e.START_END_PATTERN.length).fill(0))
    }
    ,
    e.findGuardPatternWithoutCounters = function(r, n, i, o) {
        return this.findGuardPattern(r, n, i, o, new Int32Array(o.length))
    }
    ,
    e.findGuardPattern = function(r, n, i, o, s) {
        var a = r.getSize();
        n = i ? r.getNextUnset(n) : r.getNextSet(n);
        for (var l = 0, c = n, u = o.length, f = i, d = n; d < a; d++)
            if (r.get(d) !== f)
                s[l]++;
            else {
                if (l === u - 1) {
                    if (Ar.patternMatchVariance(s, o, e.MAX_INDIVIDUAL_VARIANCE) < e.MAX_AVG_VARIANCE)
                        return Int32Array.from([c, d]);
                    c += s[0] + s[1];
                    for (var h = s.slice(2, s.length), x = 0; x < l - 1; x++)
                        s[x] = h[x];
                    s[l - 1] = 0,
                    s[l] = 0,
                    l--
                } else
                    l++;
                s[l] = 1,
                f = !f
            }
        throw new le
    }
    ,
    e.decodeDigit = function(r, n, i, o) {
        this.recordPattern(r, i, n);
        for (var s = this.MAX_AVG_VARIANCE, a = -1, l = o.length, c = 0; c < l; c++) {
            var u = o[c]
              , f = Ar.patternMatchVariance(n, u, e.MAX_INDIVIDUAL_VARIANCE);
            f < s && (s = f,
            a = c)
        }
        if (a >= 0)
            return a;
        throw new le
    }
    ,
    e.MAX_AVG_VARIANCE = .48,
    e.MAX_INDIVIDUAL_VARIANCE = .7,
    e.START_END_PATTERN = Int32Array.from([1, 1, 1]),
    e.MIDDLE_PATTERN = Int32Array.from([1, 1, 1, 1, 1]),
    e.END_PATTERN = Int32Array.from([1, 1, 1, 1, 1, 1]),
    e.L_PATTERNS = [Int32Array.from([3, 2, 1, 1]), Int32Array.from([2, 2, 2, 1]), Int32Array.from([2, 1, 2, 2]), Int32Array.from([1, 4, 1, 1]), Int32Array.from([1, 1, 3, 2]), Int32Array.from([1, 2, 3, 1]), Int32Array.from([1, 1, 1, 4]), Int32Array.from([1, 3, 1, 2]), Int32Array.from([1, 2, 1, 3]), Int32Array.from([3, 1, 1, 2])],
    e
}(Ar)
  , ybe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , Ebe = function() {
    function t() {
        this.CHECK_DIGIT_ENCODINGS = [24, 20, 18, 17, 12, 6, 3, 10, 9, 5],
        this.decodeMiddleCounters = Int32Array.from([0, 0, 0, 0]),
        this.decodeRowStringBuffer = ""
    }
    return t.prototype.decodeRow = function(e, r, n) {
        var i = this.decodeRowStringBuffer
          , o = this.decodeMiddle(r, n, i)
          , s = i.toString()
          , a = t.parseExtensionString(s)
          , l = [new Te((n[0] + n[1]) / 2,e), new Te(o,e)]
          , c = new nn(s,null,0,l,ke.UPC_EAN_EXTENSION,new Date().getTime());
        return a != null && c.putAllMetadata(a),
        c
    }
    ,
    t.prototype.decodeMiddle = function(e, r, n) {
        var i, o, s = this.decodeMiddleCounters;
        s[0] = 0,
        s[1] = 0,
        s[2] = 0,
        s[3] = 0;
        for (var a = e.getSize(), l = r[1], c = 0, u = 0; u < 5 && l < a; u++) {
            var f = yu.decodeDigit(e, s, l, yu.L_AND_G_PATTERNS);
            n += String.fromCharCode("0".charCodeAt(0) + f % 10);
            try {
                for (var d = (i = void 0,
                ybe(s)), h = d.next(); !h.done; h = d.next()) {
                    var x = h.value;
                    l += x
                }
            } catch (m) {
                i = {
                    error: m
                }
            } finally {
                try {
                    h && !h.done && (o = d.return) && o.call(d)
                } finally {
                    if (i)
                        throw i.error
                }
            }
            f >= 10 && (c |= 1 << 4 - u),
            u !== 4 && (l = e.getNextSet(l),
            l = e.getNextUnset(l))
        }
        if (n.length !== 5)
            throw new le;
        var y = this.determineCheckDigit(c);
        if (t.extensionChecksum(n.toString()) !== y)
            throw new le;
        return l
    }
    ,
    t.extensionChecksum = function(e) {
        for (var r = e.length, n = 0, i = r - 2; i >= 0; i -= 2)
            n += e.charAt(i).charCodeAt(0) - "0".charCodeAt(0);
        n *= 3;
        for (var i = r - 1; i >= 0; i -= 2)
            n += e.charAt(i).charCodeAt(0) - "0".charCodeAt(0);
        return n *= 3,
        n % 10
    }
    ,
    t.prototype.determineCheckDigit = function(e) {
        for (var r = 0; r < 10; r++)
            if (e === this.CHECK_DIGIT_ENCODINGS[r])
                return r;
        throw new le
    }
    ,
    t.parseExtensionString = function(e) {
        if (e.length !== 5)
            return null;
        var r = t.parseExtension5String(e);
        return r == null ? null : new Map([[Vr.SUGGESTED_PRICE, r]])
    }
    ,
    t.parseExtension5String = function(e) {
        var r;
        switch (e.charAt(0)) {
        case "0":
            r = "£";
            break;
        case "5":
            r = "$";
            break;
        case "9":
            switch (e) {
            case "90000":
                return null;
            case "99991":
                return "0.00";
            case "99990":
                return "Used"
            }
            r = "";
            break;
        default:
            r = "";
            break
        }
        var n = parseInt(e.substring(1))
          , i = (n / 100).toString()
          , o = n % 100
          , s = o < 10 ? "0" + o : o.toString();
        return r + i + "." + s
    }
    ,
    t
}()
  , _be = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , bbe = function() {
    function t() {
        this.decodeMiddleCounters = Int32Array.from([0, 0, 0, 0]),
        this.decodeRowStringBuffer = ""
    }
    return t.prototype.decodeRow = function(e, r, n) {
        var i = this.decodeRowStringBuffer
          , o = this.decodeMiddle(r, n, i)
          , s = i.toString()
          , a = t.parseExtensionString(s)
          , l = [new Te((n[0] + n[1]) / 2,e), new Te(o,e)]
          , c = new nn(s,null,0,l,ke.UPC_EAN_EXTENSION,new Date().getTime());
        return a != null && c.putAllMetadata(a),
        c
    }
    ,
    t.prototype.decodeMiddle = function(e, r, n) {
        var i, o, s = this.decodeMiddleCounters;
        s[0] = 0,
        s[1] = 0,
        s[2] = 0,
        s[3] = 0;
        for (var a = e.getSize(), l = r[1], c = 0, u = 0; u < 2 && l < a; u++) {
            var f = yu.decodeDigit(e, s, l, yu.L_AND_G_PATTERNS);
            n += String.fromCharCode("0".charCodeAt(0) + f % 10);
            try {
                for (var d = (i = void 0,
                _be(s)), h = d.next(); !h.done; h = d.next()) {
                    var x = h.value;
                    l += x
                }
            } catch (y) {
                i = {
                    error: y
                }
            } finally {
                try {
                    h && !h.done && (o = d.return) && o.call(d)
                } finally {
                    if (i)
                        throw i.error
                }
            }
            f >= 10 && (c |= 1 << 1 - u),
            u !== 1 && (l = e.getNextSet(l),
            l = e.getNextUnset(l))
        }
        if (n.length !== 2)
            throw new le;
        if (parseInt(n.toString()) % 4 !== c)
            throw new le;
        return l
    }
    ,
    t.parseExtensionString = function(e) {
        return e.length !== 2 ? null : new Map([[Vr.ISSUE_NUMBER, parseInt(e)]])
    }
    ,
    t
}()
  , Cbe = function() {
    function t() {}
    return t.decodeRow = function(e, r, n) {
        var i = yu.findGuardPattern(r, n, !1, this.EXTENSION_START_PATTERN, new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));
        try {
            var o = new Ebe;
            return o.decodeRow(e, r, i)
        } catch {
            var s = new bbe;
            return s.decodeRow(e, r, i)
        }
    }
    ,
    t.EXTENSION_START_PATTERN = Int32Array.from([1, 1, 2]),
    t
}()
  , Abe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Er = function(t) {
    Abe(e, t);
    function e() {
        var r = t.call(this) || this;
        r.decodeRowStringBuffer = "",
        e.L_AND_G_PATTERNS = e.L_PATTERNS.map(function(a) {
            return Int32Array.from(a)
        });
        for (var n = 10; n < 20; n++) {
            for (var i = e.L_PATTERNS[n - 10], o = new Int32Array(i.length), s = 0; s < i.length; s++)
                o[s] = i[i.length - s - 1];
            e.L_AND_G_PATTERNS[n] = o
        }
        return r
    }
    return e.prototype.decodeRow = function(r, n, i) {
        var o = e.findStartGuardPattern(n)
          , s = i == null ? null : i.get(Pt.NEED_RESULT_POINT_CALLBACK);
        if (s != null) {
            var a = new Te((o[0] + o[1]) / 2,r);
            s.foundPossibleResultPoint(a)
        }
        var l = this.decodeMiddle(n, o, this.decodeRowStringBuffer)
          , c = l.rowOffset
          , u = l.resultString;
        if (s != null) {
            var f = new Te(c,r);
            s.foundPossibleResultPoint(f)
        }
        var d = e.decodeEnd(n, c);
        if (s != null) {
            var h = new Te((d[0] + d[1]) / 2,r);
            s.foundPossibleResultPoint(h)
        }
        var x = d[1]
          , y = x + (x - d[0]);
        if (y >= n.getSize() || !n.isRange(x, y, !1))
            throw new le;
        var m = u.toString();
        if (m.length < 8)
            throw new ge;
        if (!e.checkChecksum(m))
            throw new fr;
        var E = (o[1] + o[0]) / 2
          , g = (d[1] + d[0]) / 2
          , p = this.getBarcodeFormat()
          , v = [new Te(E,r), new Te(g,r)]
          , _ = new nn(m,null,0,v,p,new Date().getTime())
          , b = 0;
        try {
            var C = Cbe.decodeRow(r, n, d[1]);
            _.putMetadata(Vr.UPC_EAN_EXTENSION, C.getText()),
            _.putAllMetadata(C.getResultMetadata()),
            _.addResultPoints(C.getResultPoints()),
            b = C.getText().length
        } catch {}
        var w = i == null ? null : i.get(Pt.ALLOWED_EAN_EXTENSIONS);
        if (w != null) {
            var T = !1;
            for (var A in w)
                if (b.toString() === A) {
                    T = !0;
                    break
                }
            if (!T)
                throw new le
        }
        return p === ke.EAN_13 || ke.UPC_A,
        _
    }
    ,
    e.checkChecksum = function(r) {
        return e.checkStandardUPCEANChecksum(r)
    }
    ,
    e.checkStandardUPCEANChecksum = function(r) {
        var n = r.length;
        if (n === 0)
            return !1;
        var i = parseInt(r.charAt(n - 1), 10);
        return e.getStandardUPCEANChecksum(r.substring(0, n - 1)) === i
    }
    ,
    e.getStandardUPCEANChecksum = function(r) {
        for (var n = r.length, i = 0, o = n - 1; o >= 0; o -= 2) {
            var s = r.charAt(o).charCodeAt(0) - "0".charCodeAt(0);
            if (s < 0 || s > 9)
                throw new ge;
            i += s
        }
        i *= 3;
        for (var o = n - 2; o >= 0; o -= 2) {
            var s = r.charAt(o).charCodeAt(0) - "0".charCodeAt(0);
            if (s < 0 || s > 9)
                throw new ge;
            i += s
        }
        return (1e3 - i) % 10
    }
    ,
    e.decodeEnd = function(r, n) {
        return e.findGuardPattern(r, n, !1, e.START_END_PATTERN, new Int32Array(e.START_END_PATTERN.length).fill(0))
    }
    ,
    e
}(yu)
  , wbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , f6 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , qE = function(t) {
    wbe(e, t);
    function e() {
        var r = t.call(this) || this;
        return r.decodeMiddleCounters = Int32Array.from([0, 0, 0, 0]),
        r
    }
    return e.prototype.decodeMiddle = function(r, n, i) {
        var o, s, a, l, c = this.decodeMiddleCounters;
        c[0] = 0,
        c[1] = 0,
        c[2] = 0,
        c[3] = 0;
        for (var u = r.getSize(), f = n[1], d = 0, h = 0; h < 6 && f < u; h++) {
            var x = Er.decodeDigit(r, c, f, Er.L_AND_G_PATTERNS);
            i += String.fromCharCode("0".charCodeAt(0) + x % 10);
            try {
                for (var y = (o = void 0,
                f6(c)), m = y.next(); !m.done; m = y.next()) {
                    var E = m.value;
                    f += E
                }
            } catch (_) {
                o = {
                    error: _
                }
            } finally {
                try {
                    m && !m.done && (s = y.return) && s.call(y)
                } finally {
                    if (o)
                        throw o.error
                }
            }
            x >= 10 && (d |= 1 << 5 - h)
        }
        i = e.determineFirstDigit(i, d);
        var g = Er.findGuardPattern(r, f, !0, Er.MIDDLE_PATTERN, new Int32Array(Er.MIDDLE_PATTERN.length).fill(0));
        f = g[1];
        for (var h = 0; h < 6 && f < u; h++) {
            var x = Er.decodeDigit(r, c, f, Er.L_PATTERNS);
            i += String.fromCharCode("0".charCodeAt(0) + x);
            try {
                for (var p = (a = void 0,
                f6(c)), v = p.next(); !v.done; v = p.next()) {
                    var E = v.value;
                    f += E
                }
            } catch (C) {
                a = {
                    error: C
                }
            } finally {
                try {
                    v && !v.done && (l = p.return) && l.call(p)
                } finally {
                    if (a)
                        throw a.error
                }
            }
        }
        return {
            rowOffset: f,
            resultString: i
        }
    }
    ,
    e.prototype.getBarcodeFormat = function() {
        return ke.EAN_13
    }
    ,
    e.determineFirstDigit = function(r, n) {
        for (var i = 0; i < 10; i++)
            if (n === this.FIRST_DIGIT_ENCODINGS[i])
                return r = String.fromCharCode("0".charCodeAt(0) + i) + r,
                r;
        throw new le
    }
    ,
    e.FIRST_DIGIT_ENCODINGS = [0, 11, 13, 14, 19, 25, 28, 21, 22, 26],
    e
}(Er)
  , Bbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , d6 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , h6 = function(t) {
    Bbe(e, t);
    function e() {
        var r = t.call(this) || this;
        return r.decodeMiddleCounters = Int32Array.from([0, 0, 0, 0]),
        r
    }
    return e.prototype.decodeMiddle = function(r, n, i) {
        var o, s, a, l, c = this.decodeMiddleCounters;
        c[0] = 0,
        c[1] = 0,
        c[2] = 0,
        c[3] = 0;
        for (var u = r.getSize(), f = n[1], d = 0; d < 4 && f < u; d++) {
            var h = Er.decodeDigit(r, c, f, Er.L_PATTERNS);
            i += String.fromCharCode("0".charCodeAt(0) + h);
            try {
                for (var x = (o = void 0,
                d6(c)), y = x.next(); !y.done; y = x.next()) {
                    var m = y.value;
                    f += m
                }
            } catch (v) {
                o = {
                    error: v
                }
            } finally {
                try {
                    y && !y.done && (s = x.return) && s.call(x)
                } finally {
                    if (o)
                        throw o.error
                }
            }
        }
        var E = Er.findGuardPattern(r, f, !0, Er.MIDDLE_PATTERN, new Int32Array(Er.MIDDLE_PATTERN.length).fill(0));
        f = E[1];
        for (var d = 0; d < 4 && f < u; d++) {
            var h = Er.decodeDigit(r, c, f, Er.L_PATTERNS);
            i += String.fromCharCode("0".charCodeAt(0) + h);
            try {
                for (var g = (a = void 0,
                d6(c)), p = g.next(); !p.done; p = g.next()) {
                    var m = p.value;
                    f += m
                }
            } catch (b) {
                a = {
                    error: b
                }
            } finally {
                try {
                    p && !p.done && (l = g.return) && l.call(g)
                } finally {
                    if (a)
                        throw a.error
                }
            }
        }
        return {
            rowOffset: f,
            resultString: i
        }
    }
    ,
    e.prototype.getBarcodeFormat = function() {
        return ke.EAN_8
    }
    ,
    e
}(Er)
  , Sbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , x6 = function(t) {
    Sbe(e, t);
    function e() {
        var r = t !== null && t.apply(this, arguments) || this;
        return r.ean13Reader = new qE,
        r
    }
    return e.prototype.getBarcodeFormat = function() {
        return ke.UPC_A
    }
    ,
    e.prototype.decode = function(r, n) {
        return this.maybeReturnResult(this.ean13Reader.decode(r))
    }
    ,
    e.prototype.decodeRow = function(r, n, i) {
        return this.maybeReturnResult(this.ean13Reader.decodeRow(r, n, i))
    }
    ,
    e.prototype.decodeMiddle = function(r, n, i) {
        return this.ean13Reader.decodeMiddle(r, n, i)
    }
    ,
    e.prototype.maybeReturnResult = function(r) {
        var n = r.getText();
        if (n.charAt(0) === "0") {
            var i = new nn(n.substring(1),null,null,r.getResultPoints(),ke.UPC_A);
            return r.getResultMetadata() != null && i.putAllMetadata(r.getResultMetadata()),
            i
        } else
            throw new le
    }
    ,
    e.prototype.reset = function() {
        this.ean13Reader.reset()
    }
    ,
    e
}(Er)
  , Tbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Dbe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , p6 = function(t) {
    Tbe(e, t);
    function e() {
        var r = t.call(this) || this;
        return r.decodeMiddleCounters = new Int32Array(4),
        r
    }
    return e.prototype.decodeMiddle = function(r, n, i) {
        var o, s, a = this.decodeMiddleCounters.map(function(m) {
            return m
        });
        a[0] = 0,
        a[1] = 0,
        a[2] = 0,
        a[3] = 0;
        for (var l = r.getSize(), c = n[1], u = 0, f = 0; f < 6 && c < l; f++) {
            var d = e.decodeDigit(r, a, c, e.L_AND_G_PATTERNS);
            i += String.fromCharCode("0".charCodeAt(0) + d % 10);
            try {
                for (var h = (o = void 0,
                Dbe(a)), x = h.next(); !x.done; x = h.next()) {
                    var y = x.value;
                    c += y
                }
            } catch (m) {
                o = {
                    error: m
                }
            } finally {
                try {
                    x && !x.done && (s = h.return) && s.call(h)
                } finally {
                    if (o)
                        throw o.error
                }
            }
            d >= 10 && (u |= 1 << 5 - f)
        }
        return e.determineNumSysAndCheckDigit(new Ke(i), u),
        c
    }
    ,
    e.prototype.decodeEnd = function(r, n) {
        return e.findGuardPatternWithoutCounters(r, n, !0, e.MIDDLE_END_PATTERN)
    }
    ,
    e.prototype.checkChecksum = function(r) {
        return Er.checkChecksum(e.convertUPCEtoUPCA(r))
    }
    ,
    e.determineNumSysAndCheckDigit = function(r, n) {
        for (var i = 0; i <= 1; i++)
            for (var o = 0; o < 10; o++)
                if (n === this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[i][o]) {
                    r.insert(0, "0" + i),
                    r.append("0" + o);
                    return
                }
        throw le.getNotFoundInstance()
    }
    ,
    e.prototype.getBarcodeFormat = function() {
        return ke.UPC_E
    }
    ,
    e.convertUPCEtoUPCA = function(r) {
        var n = r.slice(1, 7).split("").map(function(s) {
            return s.charCodeAt(0)
        })
          , i = new Ke;
        i.append(r.charAt(0));
        var o = n[5];
        switch (o) {
        case 0:
        case 1:
        case 2:
            i.appendChars(n, 0, 2),
            i.append(o),
            i.append("0000"),
            i.appendChars(n, 2, 3);
            break;
        case 3:
            i.appendChars(n, 0, 3),
            i.append("00000"),
            i.appendChars(n, 3, 2);
            break;
        case 4:
            i.appendChars(n, 0, 4),
            i.append("00000"),
            i.append(n[4]);
            break;
        default:
            i.appendChars(n, 0, 5),
            i.append("0000"),
            i.append(o);
            break
        }
        return r.length >= 8 && i.append(r.charAt(7)),
        i.toString()
    }
    ,
    e.MIDDLE_END_PATTERN = Int32Array.from([1, 1, 1, 1, 1, 1]),
    e.NUMSYS_AND_CHECK_DIGIT_PATTERNS = [Int32Array.from([56, 52, 50, 49, 44, 38, 35, 42, 41, 37]), Int32Array.from([7, 11, 13, 14, 19, 25, 28, 21, 22, 1])],
    e
}(Er)
  , Fbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , g6 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , Jm = function(t) {
    Fbe(e, t);
    function e(r) {
        var n = t.call(this) || this
          , i = r == null ? null : r.get(Pt.POSSIBLE_FORMATS)
          , o = [];
        return i != null && (i.indexOf(ke.EAN_13) > -1 && o.push(new qE),
        i.indexOf(ke.UPC_A) > -1 && o.push(new x6),
        i.indexOf(ke.EAN_8) > -1 && o.push(new h6),
        i.indexOf(ke.UPC_E) > -1 && o.push(new p6)),
        o.length === 0 && (o.push(new qE),
        o.push(new x6),
        o.push(new h6),
        o.push(new p6)),
        n.readers = o,
        n
    }
    return e.prototype.decodeRow = function(r, n, i) {
        var o, s;
        try {
            for (var a = g6(this.readers), l = a.next(); !l.done; l = a.next()) {
                var c = l.value;
                try {
                    var u = c.decodeRow(r, n, i)
                      , f = u.getBarcodeFormat() === ke.EAN_13 && u.getText().charAt(0) === "0"
                      , d = i == null ? null : i.get(Pt.POSSIBLE_FORMATS)
                      , h = d == null || d.includes(ke.UPC_A);
                    if (f && h) {
                        var x = u.getRawBytes()
                          , y = new nn(u.getText().substring(1),x,x ? x.length : null,u.getResultPoints(),ke.UPC_A);
                        return y.putAllMetadata(u.getResultMetadata()),
                        y
                    }
                    return u
                } catch {}
            }
        } catch (m) {
            o = {
                error: m
            }
        } finally {
            try {
                l && !l.done && (s = a.return) && s.call(a)
            } finally {
                if (o)
                    throw o.error
            }
        }
        throw new le
    }
    ,
    e.prototype.reset = function() {
        var r, n;
        try {
            for (var i = g6(this.readers), o = i.next(); !o.done; o = i.next()) {
                var s = o.value;
                s.reset()
            }
        } catch (a) {
            r = {
                error: a
            }
        } finally {
            try {
                o && !o.done && (n = i.return) && n.call(i)
            } finally {
                if (r)
                    throw r.error
            }
        }
    }
    ,
    e
}(Ar)
  , Pbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Ibe = function(t) {
    Pbe(e, t);
    function e() {
        var r = t !== null && t.apply(this, arguments) || this;
        return r.CODA_BAR_CHAR_SET = {
            nnnnnww: "0",
            nnnnwwn: "1",
            nnnwnnw: "2",
            wwnnnnn: "3",
            nnwnnwn: "4",
            wnnnnwn: "5",
            nwnnnnw: "6",
            nwnnwnn: "7",
            nwwnnnn: "8",
            wnnwnnn: "9",
            nnnwwnn: "-",
            nnwwnnn: "$",
            wnnnwnw: ":",
            wnwnnnw: "/",
            wnwnwnn: ".",
            nnwwwww: "+",
            nnwwnwn: "A",
            nwnwnnw: "B",
            nnnwnww: "C",
            nnnwwwn: "D"
        },
        r
    }
    return e.prototype.decodeRow = function(r, n, i) {
        var o = this.getValidRowData(n);
        if (!o)
            throw new le;
        var s = this.codaBarDecodeRow(o.row);
        if (!s)
            throw new le;
        return new nn(s,null,0,[new Te(o.left,r), new Te(o.right,r)],ke.CODABAR,new Date().getTime())
    }
    ,
    e.prototype.getValidRowData = function(r) {
        var n = r.toArray()
          , i = n.indexOf(!0);
        if (i === -1)
            return null;
        var o = n.lastIndexOf(!0);
        if (o <= i)
            return null;
        n = n.slice(i, o + 1);
        for (var s = [], a = n[0], l = 1, c = 1; c < n.length; c++)
            n[c] === a ? l++ : (a = n[c],
            s.push(l),
            l = 1);
        return s.push(l),
        s.length < 23 && (s.length + 1) % 8 !== 0 ? null : {
            row: s,
            left: i,
            right: o
        }
    }
    ,
    e.prototype.codaBarDecodeRow = function(r) {
        for (var n = [], i = Math.ceil(r.reduce(function(l, c) {
            return (l + c) / 2
        }, 0)); r.length > 0; ) {
            var o = r.splice(0, 8).splice(0, 7)
              , s = o.map(function(l) {
                return l < i ? "n" : "w"
            }).join("");
            if (this.CODA_BAR_CHAR_SET[s] === void 0)
                return null;
            n.push(this.CODA_BAR_CHAR_SET[s])
        }
        var a = n.join("");
        return this.validCodaBarString(a) ? a : null
    }
    ,
    e.prototype.validCodaBarString = function(r) {
        var n = /^[A-D].{1,}[A-D]$/;
        return n.test(r)
    }
    ,
    e
}(Ar)
  , Obe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , kbe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , Va = function(t) {
    Obe(e, t);
    function e() {
        var r = t.call(this) || this;
        return r.decodeFinderCounters = new Int32Array(4),
        r.dataCharacterCounters = new Int32Array(8),
        r.oddRoundingErrors = new Array(4),
        r.evenRoundingErrors = new Array(4),
        r.oddCounts = new Array(r.dataCharacterCounters.length / 2),
        r.evenCounts = new Array(r.dataCharacterCounters.length / 2),
        r
    }
    return e.prototype.getDecodeFinderCounters = function() {
        return this.decodeFinderCounters
    }
    ,
    e.prototype.getDataCharacterCounters = function() {
        return this.dataCharacterCounters
    }
    ,
    e.prototype.getOddRoundingErrors = function() {
        return this.oddRoundingErrors
    }
    ,
    e.prototype.getEvenRoundingErrors = function() {
        return this.evenRoundingErrors
    }
    ,
    e.prototype.getOddCounts = function() {
        return this.oddCounts
    }
    ,
    e.prototype.getEvenCounts = function() {
        return this.evenCounts
    }
    ,
    e.prototype.parseFinderValue = function(r, n) {
        for (var i = 0; i < n.length; i++)
            if (Ar.patternMatchVariance(r, n[i], e.MAX_INDIVIDUAL_VARIANCE) < e.MAX_AVG_VARIANCE)
                return i;
        throw new le
    }
    ,
    e.count = function(r) {
        return ft.sum(new Int32Array(r))
    }
    ,
    e.increment = function(r, n) {
        for (var i = 0, o = n[0], s = 1; s < r.length; s++)
            n[s] > o && (o = n[s],
            i = s);
        r[i]++
    }
    ,
    e.decrement = function(r, n) {
        for (var i = 0, o = n[0], s = 1; s < r.length; s++)
            n[s] < o && (o = n[s],
            i = s);
        r[i]--
    }
    ,
    e.isFinderPattern = function(r) {
        var n, i, o = r[0] + r[1], s = o + r[2] + r[3], a = o / s;
        if (a >= e.MIN_FINDER_PATTERN_RATIO && a <= e.MAX_FINDER_PATTERN_RATIO) {
            var l = Number.MAX_SAFE_INTEGER
              , c = Number.MIN_SAFE_INTEGER;
            try {
                for (var u = kbe(r), f = u.next(); !f.done; f = u.next()) {
                    var d = f.value;
                    d > c && (c = d),
                    d < l && (l = d)
                }
            } catch (h) {
                n = {
                    error: h
                }
            } finally {
                try {
                    f && !f.done && (i = u.return) && i.call(u)
                } finally {
                    if (n)
                        throw n.error
                }
            }
            return c < 10 * l
        }
        return !1
    }
    ,
    e.MAX_AVG_VARIANCE = .2,
    e.MAX_INDIVIDUAL_VARIANCE = .45,
    e.MIN_FINDER_PATTERN_RATIO = 9.5 / 12,
    e.MAX_FINDER_PATTERN_RATIO = 12.5 / 14,
    e
}(Ar)
  , op = function() {
    function t(e, r) {
        this.value = e,
        this.checksumPortion = r
    }
    return t.prototype.getValue = function() {
        return this.value
    }
    ,
    t.prototype.getChecksumPortion = function() {
        return this.checksumPortion
    }
    ,
    t.prototype.toString = function() {
        return this.value + "(" + this.checksumPortion + ")"
    }
    ,
    t.prototype.equals = function(e) {
        if (!(e instanceof t))
            return !1;
        var r = e;
        return this.value === r.value && this.checksumPortion === r.checksumPortion
    }
    ,
    t.prototype.hashCode = function() {
        return this.value ^ this.checksumPortion
    }
    ,
    t
}()
  , OM = function() {
    function t(e, r, n, i, o) {
        this.value = e,
        this.startEnd = r,
        this.value = e,
        this.startEnd = r,
        this.resultPoints = new Array,
        this.resultPoints.push(new Te(n,o)),
        this.resultPoints.push(new Te(i,o))
    }
    return t.prototype.getValue = function() {
        return this.value
    }
    ,
    t.prototype.getStartEnd = function() {
        return this.startEnd
    }
    ,
    t.prototype.getResultPoints = function() {
        return this.resultPoints
    }
    ,
    t.prototype.equals = function(e) {
        if (!(e instanceof t))
            return !1;
        var r = e;
        return this.value === r.value
    }
    ,
    t.prototype.hashCode = function() {
        return this.value
    }
    ,
    t
}()
  , Rbe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , Fc = function() {
    function t() {}
    return t.getRSSvalue = function(e, r, n) {
        var i, o, s = 0;
        try {
            for (var a = Rbe(e), l = a.next(); !l.done; l = a.next()) {
                var c = l.value;
                s += c
            }
        } catch (g) {
            i = {
                error: g
            }
        } finally {
            try {
                l && !l.done && (o = a.return) && o.call(a)
            } finally {
                if (i)
                    throw i.error
            }
        }
        for (var u = 0, f = 0, d = e.length, h = 0; h < d - 1; h++) {
            var x = void 0;
            for (x = 1,
            f |= 1 << h; x < e[h]; x++,
            f &= ~(1 << h)) {
                var y = t.combins(s - x - 1, d - h - 2);
                if (n && f === 0 && s - x - (d - h - 1) >= d - h - 1 && (y -= t.combins(s - x - (d - h), d - h - 2)),
                d - h - 1 > 1) {
                    for (var m = 0, E = s - x - (d - h - 2); E > r; E--)
                        m += t.combins(s - x - E - 1, d - h - 3);
                    y -= m * (d - 1 - h)
                } else
                    s - x > r && y--;
                u += y
            }
            s -= x
        }
        return u
    }
    ,
    t.combins = function(e, r) {
        var n, i;
        e - r > r ? (i = r,
        n = e - r) : (i = e - r,
        n = r);
        for (var o = 1, s = 1, a = e; a > n; a--)
            o *= a,
            s <= i && (o /= s,
            s++);
        for (; s <= i; )
            o /= s,
            s++;
        return o
    }
    ,
    t
}()
  , Mbe = function() {
    function t() {}
    return t.buildBitArray = function(e) {
        var r = e.length * 2 - 1;
        e[e.length - 1].getRightChar() == null && (r -= 1);
        for (var n = 12 * r, i = new kr(n), o = 0, s = e[0], a = s.getRightChar().getValue(), l = 11; l >= 0; --l)
            a & 1 << l && i.set(o),
            o++;
        for (var l = 1; l < e.length; ++l) {
            for (var c = e[l], u = c.getLeftChar().getValue(), f = 11; f >= 0; --f)
                u & 1 << f && i.set(o),
                o++;
            if (c.getRightChar() !== null)
                for (var d = c.getRightChar().getValue(), f = 11; f >= 0; --f)
                    d & 1 << f && i.set(o),
                    o++
        }
        return i
    }
    ,
    t
}()
  , Ra = function() {
    function t(e, r) {
        r ? this.decodedInformation = null : (this.finished = e,
        this.decodedInformation = r)
    }
    return t.prototype.getDecodedInformation = function() {
        return this.decodedInformation
    }
    ,
    t.prototype.isFinished = function() {
        return this.finished
    }
    ,
    t
}()
  , MC = function() {
    function t(e) {
        this.newPosition = e
    }
    return t.prototype.getNewPosition = function() {
        return this.newPosition
    }
    ,
    t
}()
  , Nbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , wi = function(t) {
    Nbe(e, t);
    function e(r, n) {
        var i = t.call(this, r) || this;
        return i.value = n,
        i
    }
    return e.prototype.getValue = function() {
        return this.value
    }
    ,
    e.prototype.isFNC1 = function() {
        return this.value === e.FNC1
    }
    ,
    e.FNC1 = "$",
    e
}(MC)
  , Lbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Ma = function(t) {
    Lbe(e, t);
    function e(r, n, i) {
        var o = t.call(this, r) || this;
        return i ? (o.remaining = !0,
        o.remainingValue = o.remainingValue) : (o.remaining = !1,
        o.remainingValue = 0),
        o.newString = n,
        o
    }
    return e.prototype.getNewString = function() {
        return this.newString
    }
    ,
    e.prototype.isRemaining = function() {
        return this.remaining
    }
    ,
    e.prototype.getRemainingValue = function() {
        return this.remainingValue
    }
    ,
    e
}(MC)
  , $be = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , xc = function(t) {
    $be(e, t);
    function e(r, n, i) {
        var o = t.call(this, r) || this;
        if (n < 0 || n > 10 || i < 0 || i > 10)
            throw new ge;
        return o.firstDigit = n,
        o.secondDigit = i,
        o
    }
    return e.prototype.getFirstDigit = function() {
        return this.firstDigit
    }
    ,
    e.prototype.getSecondDigit = function() {
        return this.secondDigit
    }
    ,
    e.prototype.getValue = function() {
        return this.firstDigit * 10 + this.secondDigit
    }
    ,
    e.prototype.isFirstDigitFNC1 = function() {
        return this.firstDigit === e.FNC1
    }
    ,
    e.prototype.isSecondDigitFNC1 = function() {
        return this.secondDigit === e.FNC1
    }
    ,
    e.prototype.isAnyFNC1 = function() {
        return this.firstDigit === e.FNC1 || this.secondDigit === e.FNC1
    }
    ,
    e.FNC1 = 10,
    e
}(MC)
  , Ih = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , Ube = function() {
    function t() {}
    return t.parseFieldsInGeneralPurpose = function(e) {
        var r, n, i, o, s, a, l, c;
        if (!e)
            return null;
        if (e.length < 2)
            throw new le;
        var u = e.substring(0, 2);
        try {
            for (var f = Ih(t.TWO_DIGIT_DATA_LENGTH), d = f.next(); !d.done; d = f.next()) {
                var h = d.value;
                if (h[0] === u)
                    return h[1] === t.VARIABLE_LENGTH ? t.processVariableAI(2, h[2], e) : t.processFixedAI(2, h[1], e)
            }
        } catch (b) {
            r = {
                error: b
            }
        } finally {
            try {
                d && !d.done && (n = f.return) && n.call(f)
            } finally {
                if (r)
                    throw r.error
            }
        }
        if (e.length < 3)
            throw new le;
        var x = e.substring(0, 3);
        try {
            for (var y = Ih(t.THREE_DIGIT_DATA_LENGTH), m = y.next(); !m.done; m = y.next()) {
                var h = m.value;
                if (h[0] === x)
                    return h[1] === t.VARIABLE_LENGTH ? t.processVariableAI(3, h[2], e) : t.processFixedAI(3, h[1], e)
            }
        } catch (b) {
            i = {
                error: b
            }
        } finally {
            try {
                m && !m.done && (o = y.return) && o.call(y)
            } finally {
                if (i)
                    throw i.error
            }
        }
        try {
            for (var E = Ih(t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH), g = E.next(); !g.done; g = E.next()) {
                var h = g.value;
                if (h[0] === x)
                    return h[1] === t.VARIABLE_LENGTH ? t.processVariableAI(4, h[2], e) : t.processFixedAI(4, h[1], e)
            }
        } catch (b) {
            s = {
                error: b
            }
        } finally {
            try {
                g && !g.done && (a = E.return) && a.call(E)
            } finally {
                if (s)
                    throw s.error
            }
        }
        if (e.length < 4)
            throw new le;
        var p = e.substring(0, 4);
        try {
            for (var v = Ih(t.FOUR_DIGIT_DATA_LENGTH), _ = v.next(); !_.done; _ = v.next()) {
                var h = _.value;
                if (h[0] === p)
                    return h[1] === t.VARIABLE_LENGTH ? t.processVariableAI(4, h[2], e) : t.processFixedAI(4, h[1], e)
            }
        } catch (b) {
            l = {
                error: b
            }
        } finally {
            try {
                _ && !_.done && (c = v.return) && c.call(v)
            } finally {
                if (l)
                    throw l.error
            }
        }
        throw new le
    }
    ,
    t.processFixedAI = function(e, r, n) {
        if (n.length < e)
            throw new le;
        var i = n.substring(0, e);
        if (n.length < e + r)
            throw new le;
        var o = n.substring(e, e + r)
          , s = n.substring(e + r)
          , a = "(" + i + ")" + o
          , l = t.parseFieldsInGeneralPurpose(s);
        return l == null ? a : a + l
    }
    ,
    t.processVariableAI = function(e, r, n) {
        var i = n.substring(0, e), o;
        n.length < e + r ? o = n.length : o = e + r;
        var s = n.substring(e, o)
          , a = n.substring(o)
          , l = "(" + i + ")" + s
          , c = t.parseFieldsInGeneralPurpose(a);
        return c == null ? l : l + c
    }
    ,
    t.VARIABLE_LENGTH = [],
    t.TWO_DIGIT_DATA_LENGTH = [["00", 18], ["01", 14], ["02", 14], ["10", t.VARIABLE_LENGTH, 20], ["11", 6], ["12", 6], ["13", 6], ["15", 6], ["17", 6], ["20", 2], ["21", t.VARIABLE_LENGTH, 20], ["22", t.VARIABLE_LENGTH, 29], ["30", t.VARIABLE_LENGTH, 8], ["37", t.VARIABLE_LENGTH, 8], ["90", t.VARIABLE_LENGTH, 30], ["91", t.VARIABLE_LENGTH, 30], ["92", t.VARIABLE_LENGTH, 30], ["93", t.VARIABLE_LENGTH, 30], ["94", t.VARIABLE_LENGTH, 30], ["95", t.VARIABLE_LENGTH, 30], ["96", t.VARIABLE_LENGTH, 30], ["97", t.VARIABLE_LENGTH, 3], ["98", t.VARIABLE_LENGTH, 30], ["99", t.VARIABLE_LENGTH, 30]],
    t.THREE_DIGIT_DATA_LENGTH = [["240", t.VARIABLE_LENGTH, 30], ["241", t.VARIABLE_LENGTH, 30], ["242", t.VARIABLE_LENGTH, 6], ["250", t.VARIABLE_LENGTH, 30], ["251", t.VARIABLE_LENGTH, 30], ["253", t.VARIABLE_LENGTH, 17], ["254", t.VARIABLE_LENGTH, 20], ["400", t.VARIABLE_LENGTH, 30], ["401", t.VARIABLE_LENGTH, 30], ["402", 17], ["403", t.VARIABLE_LENGTH, 30], ["410", 13], ["411", 13], ["412", 13], ["413", 13], ["414", 13], ["420", t.VARIABLE_LENGTH, 20], ["421", t.VARIABLE_LENGTH, 15], ["422", 3], ["423", t.VARIABLE_LENGTH, 15], ["424", 3], ["425", 3], ["426", 3]],
    t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH = [["310", 6], ["311", 6], ["312", 6], ["313", 6], ["314", 6], ["315", 6], ["316", 6], ["320", 6], ["321", 6], ["322", 6], ["323", 6], ["324", 6], ["325", 6], ["326", 6], ["327", 6], ["328", 6], ["329", 6], ["330", 6], ["331", 6], ["332", 6], ["333", 6], ["334", 6], ["335", 6], ["336", 6], ["340", 6], ["341", 6], ["342", 6], ["343", 6], ["344", 6], ["345", 6], ["346", 6], ["347", 6], ["348", 6], ["349", 6], ["350", 6], ["351", 6], ["352", 6], ["353", 6], ["354", 6], ["355", 6], ["356", 6], ["357", 6], ["360", 6], ["361", 6], ["362", 6], ["363", 6], ["364", 6], ["365", 6], ["366", 6], ["367", 6], ["368", 6], ["369", 6], ["390", t.VARIABLE_LENGTH, 15], ["391", t.VARIABLE_LENGTH, 18], ["392", t.VARIABLE_LENGTH, 15], ["393", t.VARIABLE_LENGTH, 18], ["703", t.VARIABLE_LENGTH, 30]],
    t.FOUR_DIGIT_DATA_LENGTH = [["7001", 13], ["7002", t.VARIABLE_LENGTH, 30], ["7003", 10], ["8001", 14], ["8002", t.VARIABLE_LENGTH, 20], ["8003", t.VARIABLE_LENGTH, 30], ["8004", t.VARIABLE_LENGTH, 30], ["8005", 6], ["8006", 18], ["8007", t.VARIABLE_LENGTH, 30], ["8008", t.VARIABLE_LENGTH, 12], ["8018", 18], ["8020", t.VARIABLE_LENGTH, 25], ["8100", 6], ["8101", 10], ["8102", 2], ["8110", t.VARIABLE_LENGTH, 70], ["8200", t.VARIABLE_LENGTH, 70]],
    t
}()
  , cx = function() {
    function t(e) {
        this.buffer = new Ke,
        this.information = e
    }
    return t.prototype.decodeAllCodes = function(e, r) {
        var n = r
          , i = null;
        do {
            var o = this.decodeGeneralPurposeField(n, i)
              , s = Ube.parseFieldsInGeneralPurpose(o.getNewString());
            if (s != null && e.append(s),
            o.isRemaining() ? i = "" + o.getRemainingValue() : i = null,
            n === o.getNewPosition())
                break;
            n = o.getNewPosition()
        } while (!0);
        return e.toString()
    }
    ,
    t.prototype.isStillNumeric = function(e) {
        if (e + 7 > this.information.getSize())
            return e + 4 <= this.information.getSize();
        for (var r = e; r < e + 3; ++r)
            if (this.information.get(r))
                return !0;
        return this.information.get(e + 3)
    }
    ,
    t.prototype.decodeNumeric = function(e) {
        if (e + 7 > this.information.getSize()) {
            var r = this.extractNumericValueFromBitArray(e, 4);
            return r === 0 ? new xc(this.information.getSize(),xc.FNC1,xc.FNC1) : new xc(this.information.getSize(),r - 1,xc.FNC1)
        }
        var n = this.extractNumericValueFromBitArray(e, 7)
          , i = (n - 8) / 11
          , o = (n - 8) % 11;
        return new xc(e + 7,i,o)
    }
    ,
    t.prototype.extractNumericValueFromBitArray = function(e, r) {
        return t.extractNumericValueFromBitArray(this.information, e, r)
    }
    ,
    t.extractNumericValueFromBitArray = function(e, r, n) {
        for (var i = 0, o = 0; o < n; ++o)
            e.get(r + o) && (i |= 1 << n - o - 1);
        return i
    }
    ,
    t.prototype.decodeGeneralPurposeField = function(e, r) {
        this.buffer.setLengthToZero(),
        r != null && this.buffer.append(r),
        this.current.setPosition(e);
        var n = this.parseBlocks();
        return n != null && n.isRemaining() ? new Ma(this.current.getPosition(),this.buffer.toString(),n.getRemainingValue()) : new Ma(this.current.getPosition(),this.buffer.toString())
    }
    ,
    t.prototype.parseBlocks = function() {
        var e, r;
        do {
            var n = this.current.getPosition();
            this.current.isAlpha() ? (r = this.parseAlphaBlock(),
            e = r.isFinished()) : this.current.isIsoIec646() ? (r = this.parseIsoIec646Block(),
            e = r.isFinished()) : (r = this.parseNumericBlock(),
            e = r.isFinished());
            var i = n !== this.current.getPosition();
            if (!i && !e)
                break
        } while (!e);
        return r.getDecodedInformation()
    }
    ,
    t.prototype.parseNumericBlock = function() {
        for (; this.isStillNumeric(this.current.getPosition()); ) {
            var e = this.decodeNumeric(this.current.getPosition());
            if (this.current.setPosition(e.getNewPosition()),
            e.isFirstDigitFNC1()) {
                var r = void 0;
                return e.isSecondDigitFNC1() ? r = new Ma(this.current.getPosition(),this.buffer.toString()) : r = new Ma(this.current.getPosition(),this.buffer.toString(),e.getSecondDigit()),
                new Ra(!0,r)
            }
            if (this.buffer.append(e.getFirstDigit()),
            e.isSecondDigitFNC1()) {
                var r = new Ma(this.current.getPosition(),this.buffer.toString());
                return new Ra(!0,r)
            }
            this.buffer.append(e.getSecondDigit())
        }
        return this.isNumericToAlphaNumericLatch(this.current.getPosition()) && (this.current.setAlpha(),
        this.current.incrementPosition(4)),
        new Ra(!1)
    }
    ,
    t.prototype.parseIsoIec646Block = function() {
        for (; this.isStillIsoIec646(this.current.getPosition()); ) {
            var e = this.decodeIsoIec646(this.current.getPosition());
            if (this.current.setPosition(e.getNewPosition()),
            e.isFNC1()) {
                var r = new Ma(this.current.getPosition(),this.buffer.toString());
                return new Ra(!0,r)
            }
            this.buffer.append(e.getValue())
        }
        return this.isAlphaOr646ToNumericLatch(this.current.getPosition()) ? (this.current.incrementPosition(3),
        this.current.setNumeric()) : this.isAlphaTo646ToAlphaLatch(this.current.getPosition()) && (this.current.getPosition() + 5 < this.information.getSize() ? this.current.incrementPosition(5) : this.current.setPosition(this.information.getSize()),
        this.current.setAlpha()),
        new Ra(!1)
    }
    ,
    t.prototype.parseAlphaBlock = function() {
        for (; this.isStillAlpha(this.current.getPosition()); ) {
            var e = this.decodeAlphanumeric(this.current.getPosition());
            if (this.current.setPosition(e.getNewPosition()),
            e.isFNC1()) {
                var r = new Ma(this.current.getPosition(),this.buffer.toString());
                return new Ra(!0,r)
            }
            this.buffer.append(e.getValue())
        }
        return this.isAlphaOr646ToNumericLatch(this.current.getPosition()) ? (this.current.incrementPosition(3),
        this.current.setNumeric()) : this.isAlphaTo646ToAlphaLatch(this.current.getPosition()) && (this.current.getPosition() + 5 < this.information.getSize() ? this.current.incrementPosition(5) : this.current.setPosition(this.information.getSize()),
        this.current.setIsoIec646()),
        new Ra(!1)
    }
    ,
    t.prototype.isStillIsoIec646 = function(e) {
        if (e + 5 > this.information.getSize())
            return !1;
        var r = this.extractNumericValueFromBitArray(e, 5);
        if (r >= 5 && r < 16)
            return !0;
        if (e + 7 > this.information.getSize())
            return !1;
        var n = this.extractNumericValueFromBitArray(e, 7);
        if (n >= 64 && n < 116)
            return !0;
        if (e + 8 > this.information.getSize())
            return !1;
        var i = this.extractNumericValueFromBitArray(e, 8);
        return i >= 232 && i < 253
    }
    ,
    t.prototype.decodeIsoIec646 = function(e) {
        var r = this.extractNumericValueFromBitArray(e, 5);
        if (r === 15)
            return new wi(e + 5,wi.FNC1);
        if (r >= 5 && r < 15)
            return new wi(e + 5,"0" + (r - 5));
        var n = this.extractNumericValueFromBitArray(e, 7);
        if (n >= 64 && n < 90)
            return new wi(e + 7,"" + (n + 1));
        if (n >= 90 && n < 116)
            return new wi(e + 7,"" + (n + 7));
        var i = this.extractNumericValueFromBitArray(e, 8), o;
        switch (i) {
        case 232:
            o = "!";
            break;
        case 233:
            o = '"';
            break;
        case 234:
            o = "%";
            break;
        case 235:
            o = "&";
            break;
        case 236:
            o = "'";
            break;
        case 237:
            o = "(";
            break;
        case 238:
            o = ")";
            break;
        case 239:
            o = "*";
            break;
        case 240:
            o = "+";
            break;
        case 241:
            o = ",";
            break;
        case 242:
            o = "-";
            break;
        case 243:
            o = ".";
            break;
        case 244:
            o = "/";
            break;
        case 245:
            o = ":";
            break;
        case 246:
            o = ";";
            break;
        case 247:
            o = "<";
            break;
        case 248:
            o = "=";
            break;
        case 249:
            o = ">";
            break;
        case 250:
            o = "?";
            break;
        case 251:
            o = "_";
            break;
        case 252:
            o = " ";
            break;
        default:
            throw new ge
        }
        return new wi(e + 8,o)
    }
    ,
    t.prototype.isStillAlpha = function(e) {
        if (e + 5 > this.information.getSize())
            return !1;
        var r = this.extractNumericValueFromBitArray(e, 5);
        if (r >= 5 && r < 16)
            return !0;
        if (e + 6 > this.information.getSize())
            return !1;
        var n = this.extractNumericValueFromBitArray(e, 6);
        return n >= 16 && n < 63
    }
    ,
    t.prototype.decodeAlphanumeric = function(e) {
        var r = this.extractNumericValueFromBitArray(e, 5);
        if (r === 15)
            return new wi(e + 5,wi.FNC1);
        if (r >= 5 && r < 15)
            return new wi(e + 5,"0" + (r - 5));
        var n = this.extractNumericValueFromBitArray(e, 6);
        if (n >= 32 && n < 58)
            return new wi(e + 6,"" + (n + 33));
        var i;
        switch (n) {
        case 58:
            i = "*";
            break;
        case 59:
            i = ",";
            break;
        case 60:
            i = "-";
            break;
        case 61:
            i = ".";
            break;
        case 62:
            i = "/";
            break;
        default:
            throw new Ad("Decoding invalid alphanumeric value: " + n)
        }
        return new wi(e + 6,i)
    }
    ,
    t.prototype.isAlphaTo646ToAlphaLatch = function(e) {
        if (e + 1 > this.information.getSize())
            return !1;
        for (var r = 0; r < 5 && r + e < this.information.getSize(); ++r)
            if (r === 2) {
                if (!this.information.get(e + 2))
                    return !1
            } else if (this.information.get(e + r))
                return !1;
        return !0
    }
    ,
    t.prototype.isAlphaOr646ToNumericLatch = function(e) {
        if (e + 3 > this.information.getSize())
            return !1;
        for (var r = e; r < e + 3; ++r)
            if (this.information.get(r))
                return !1;
        return !0
    }
    ,
    t.prototype.isNumericToAlphaNumericLatch = function(e) {
        if (e + 1 > this.information.getSize())
            return !1;
        for (var r = 0; r < 4 && r + e < this.information.getSize(); ++r)
            if (this.information.get(e + r))
                return !1;
        return !0
    }
    ,
    t
}()
  , kM = function() {
    function t(e) {
        this.information = e,
        this.generalDecoder = new cx(e)
    }
    return t.prototype.getInformation = function() {
        return this.information
    }
    ,
    t.prototype.getGeneralDecoder = function() {
        return this.generalDecoder
    }
    ,
    t
}()
  , Gbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Oi = function(t) {
    Gbe(e, t);
    function e(r) {
        return t.call(this, r) || this
    }
    return e.prototype.encodeCompressedGtin = function(r, n) {
        r.append("(01)");
        var i = r.length();
        r.append("9"),
        this.encodeCompressedGtinWithoutAI(r, n, i)
    }
    ,
    e.prototype.encodeCompressedGtinWithoutAI = function(r, n, i) {
        for (var o = 0; o < 4; ++o) {
            var s = this.getGeneralDecoder().extractNumericValueFromBitArray(n + 10 * o, 10);
            s / 100 === 0 && r.append("0"),
            s / 10 === 0 && r.append("0"),
            r.append(s)
        }
        e.appendCheckDigit(r, i)
    }
    ,
    e.appendCheckDigit = function(r, n) {
        for (var i = 0, o = 0; o < 13; o++) {
            var s = r.charAt(o + n).charCodeAt(0) - "0".charCodeAt(0);
            i += o & 1 ? s : 3 * s
        }
        i = 10 - i % 10,
        i === 10 && (i = 0),
        r.append(i)
    }
    ,
    e.GTIN_SIZE = 40,
    e
}(kM)
  , Hbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Vbe = function(t) {
    Hbe(e, t);
    function e(r) {
        return t.call(this, r) || this
    }
    return e.prototype.parseInformation = function() {
        var r = new Ke;
        r.append("(01)");
        var n = r.length()
          , i = this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE, 4);
        return r.append(i),
        this.encodeCompressedGtinWithoutAI(r, e.HEADER_SIZE + 4, n),
        this.getGeneralDecoder().decodeAllCodes(r, e.HEADER_SIZE + 44)
    }
    ,
    e.HEADER_SIZE = 1 + 1 + 2,
    e
}(Oi)
  , zbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , jbe = function(t) {
    zbe(e, t);
    function e(r) {
        return t.call(this, r) || this
    }
    return e.prototype.parseInformation = function() {
        var r = new Ke;
        return this.getGeneralDecoder().decodeAllCodes(r, e.HEADER_SIZE)
    }
    ,
    e.HEADER_SIZE = 2 + 1 + 2,
    e
}(kM)
  , Wbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , ux = function(t) {
    Wbe(e, t);
    function e(r) {
        return t.call(this, r) || this
    }
    return e.prototype.encodeCompressedWeight = function(r, n, i) {
        var o = this.getGeneralDecoder().extractNumericValueFromBitArray(n, i);
        this.addWeightCode(r, o);
        for (var s = this.checkWeight(o), a = 1e5, l = 0; l < 5; ++l)
            s / a === 0 && r.append("0"),
            a /= 10;
        r.append(s)
    }
    ,
    e
}(Oi)
  , Ybe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , RM = function(t) {
    Ybe(e, t);
    function e(r) {
        return t.call(this, r) || this
    }
    return e.prototype.parseInformation = function() {
        if (this.getInformation().getSize() !== e.HEADER_SIZE + ux.GTIN_SIZE + e.WEIGHT_SIZE)
            throw new le;
        var r = new Ke;
        return this.encodeCompressedGtin(r, e.HEADER_SIZE),
        this.encodeCompressedWeight(r, e.HEADER_SIZE + ux.GTIN_SIZE, e.WEIGHT_SIZE),
        r.toString()
    }
    ,
    e.HEADER_SIZE = 4 + 1,
    e.WEIGHT_SIZE = 15,
    e
}(ux)
  , Xbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Kbe = function(t) {
    Xbe(e, t);
    function e(r) {
        return t.call(this, r) || this
    }
    return e.prototype.addWeightCode = function(r, n) {
        r.append("(3103)")
    }
    ,
    e.prototype.checkWeight = function(r) {
        return r
    }
    ,
    e
}(RM)
  , qbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Zbe = function(t) {
    qbe(e, t);
    function e(r) {
        return t.call(this, r) || this
    }
    return e.prototype.addWeightCode = function(r, n) {
        n < 1e4 ? r.append("(3202)") : r.append("(3203)")
    }
    ,
    e.prototype.checkWeight = function(r) {
        return r < 1e4 ? r : r - 1e4
    }
    ,
    e
}(RM)
  , Jbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Qbe = function(t) {
    Jbe(e, t);
    function e(r) {
        return t.call(this, r) || this
    }
    return e.prototype.parseInformation = function() {
        if (this.getInformation().getSize() < e.HEADER_SIZE + Oi.GTIN_SIZE)
            throw new le;
        var r = new Ke;
        this.encodeCompressedGtin(r, e.HEADER_SIZE);
        var n = this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE + Oi.GTIN_SIZE, e.LAST_DIGIT_SIZE);
        r.append("(392"),
        r.append(n),
        r.append(")");
        var i = this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE + Oi.GTIN_SIZE + e.LAST_DIGIT_SIZE, null);
        return r.append(i.getNewString()),
        r.toString()
    }
    ,
    e.HEADER_SIZE = 5 + 1 + 2,
    e.LAST_DIGIT_SIZE = 2,
    e
}(Oi)
  , eCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , tCe = function(t) {
    eCe(e, t);
    function e(r) {
        return t.call(this, r) || this
    }
    return e.prototype.parseInformation = function() {
        if (this.getInformation().getSize() < e.HEADER_SIZE + Oi.GTIN_SIZE)
            throw new le;
        var r = new Ke;
        this.encodeCompressedGtin(r, e.HEADER_SIZE);
        var n = this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE + Oi.GTIN_SIZE, e.LAST_DIGIT_SIZE);
        r.append("(393"),
        r.append(n),
        r.append(")");
        var i = this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE + Oi.GTIN_SIZE + e.LAST_DIGIT_SIZE, e.FIRST_THREE_DIGITS_SIZE);
        i / 100 === 0 && r.append("0"),
        i / 10 === 0 && r.append("0"),
        r.append(i);
        var o = this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE + Oi.GTIN_SIZE + e.LAST_DIGIT_SIZE + e.FIRST_THREE_DIGITS_SIZE, null);
        return r.append(o.getNewString()),
        r.toString()
    }
    ,
    e.HEADER_SIZE = 5 + 1 + 2,
    e.LAST_DIGIT_SIZE = 2,
    e.FIRST_THREE_DIGITS_SIZE = 10,
    e
}(Oi)
  , rCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Os = function(t) {
    rCe(e, t);
    function e(r, n, i) {
        var o = t.call(this, r) || this;
        return o.dateCode = i,
        o.firstAIdigits = n,
        o
    }
    return e.prototype.parseInformation = function() {
        if (this.getInformation().getSize() !== e.HEADER_SIZE + e.GTIN_SIZE + e.WEIGHT_SIZE + e.DATE_SIZE)
            throw new le;
        var r = new Ke;
        return this.encodeCompressedGtin(r, e.HEADER_SIZE),
        this.encodeCompressedWeight(r, e.HEADER_SIZE + e.GTIN_SIZE, e.WEIGHT_SIZE),
        this.encodeCompressedDate(r, e.HEADER_SIZE + e.GTIN_SIZE + e.WEIGHT_SIZE),
        r.toString()
    }
    ,
    e.prototype.encodeCompressedDate = function(r, n) {
        var i = this.getGeneralDecoder().extractNumericValueFromBitArray(n, e.DATE_SIZE);
        if (i !== 38400) {
            r.append("("),
            r.append(this.dateCode),
            r.append(")");
            var o = i % 32;
            i /= 32;
            var s = i % 12 + 1;
            i /= 12;
            var a = i;
            a / 10 === 0 && r.append("0"),
            r.append(a),
            s / 10 === 0 && r.append("0"),
            r.append(s),
            o / 10 === 0 && r.append("0"),
            r.append(o)
        }
    }
    ,
    e.prototype.addWeightCode = function(r, n) {
        r.append("("),
        r.append(this.firstAIdigits),
        r.append(n / 1e5),
        r.append(")")
    }
    ,
    e.prototype.checkWeight = function(r) {
        return r % 1e5
    }
    ,
    e.HEADER_SIZE = 7 + 1,
    e.WEIGHT_SIZE = 20,
    e.DATE_SIZE = 16,
    e
}(ux);
function nCe(t) {
    try {
        if (t.get(1))
            return new Vbe(t);
        if (!t.get(2))
            return new jbe(t);
        var e = cx.extractNumericValueFromBitArray(t, 1, 4);
        switch (e) {
        case 4:
            return new Kbe(t);
        case 5:
            return new Zbe(t)
        }
        var r = cx.extractNumericValueFromBitArray(t, 1, 5);
        switch (r) {
        case 12:
            return new Qbe(t);
        case 13:
            return new tCe(t)
        }
        var n = cx.extractNumericValueFromBitArray(t, 1, 7);
        switch (n) {
        case 56:
            return new Os(t,"310","11");
        case 57:
            return new Os(t,"320","11");
        case 58:
            return new Os(t,"310","13");
        case 59:
            return new Os(t,"320","13");
        case 60:
            return new Os(t,"310","15");
        case 61:
            return new Os(t,"320","15");
        case 62:
            return new Os(t,"310","17");
        case 63:
            return new Os(t,"320","17")
        }
    } catch (i) {
        throw console.log(i),
        new Ad("unknown decoder: " + t)
    }
}
var m6 = function() {
    function t(e, r, n, i) {
        this.leftchar = e,
        this.rightchar = r,
        this.finderpattern = n,
        this.maybeLast = i
    }
    return t.prototype.mayBeLast = function() {
        return this.maybeLast
    }
    ,
    t.prototype.getLeftChar = function() {
        return this.leftchar
    }
    ,
    t.prototype.getRightChar = function() {
        return this.rightchar
    }
    ,
    t.prototype.getFinderPattern = function() {
        return this.finderpattern
    }
    ,
    t.prototype.mustBeLast = function() {
        return this.rightchar == null
    }
    ,
    t.prototype.toString = function() {
        return "[ " + this.leftchar + ", " + this.rightchar + " : " + (this.finderpattern == null ? "null" : this.finderpattern.getValue()) + " ]"
    }
    ,
    t.equals = function(e, r) {
        return e instanceof t ? t.equalsOrNull(e.leftchar, r.leftchar) && t.equalsOrNull(e.rightchar, r.rightchar) && t.equalsOrNull(e.finderpattern, r.finderpattern) : !1
    }
    ,
    t.equalsOrNull = function(e, r) {
        return e === null ? r === null : t.equals(e, r)
    }
    ,
    t.prototype.hashCode = function() {
        var e = this.leftchar.getValue() ^ this.rightchar.getValue() ^ this.finderpattern.getValue();
        return e
    }
    ,
    t
}()
  , iCe = function() {
    function t(e, r, n) {
        this.pairs = e,
        this.rowNumber = r,
        this.wasReversed = n
    }
    return t.prototype.getPairs = function() {
        return this.pairs
    }
    ,
    t.prototype.getRowNumber = function() {
        return this.rowNumber
    }
    ,
    t.prototype.isReversed = function() {
        return this.wasReversed
    }
    ,
    t.prototype.isEquivalent = function(e) {
        return this.checkEqualitity(this, e)
    }
    ,
    t.prototype.toString = function() {
        return "{ " + this.pairs + " }"
    }
    ,
    t.prototype.equals = function(e, r) {
        return e instanceof t ? this.checkEqualitity(e, r) && e.wasReversed === r.wasReversed : !1
    }
    ,
    t.prototype.checkEqualitity = function(e, r) {
        if (!(!e || !r)) {
            var n;
            return e.forEach(function(i, o) {
                r.forEach(function(s) {
                    i.getLeftChar().getValue() === s.getLeftChar().getValue() && i.getRightChar().getValue() === s.getRightChar().getValue() && i.getFinderPatter().getValue() === s.getFinderPatter().getValue() && (n = !0)
                })
            }),
            n
        }
    }
    ,
    t
}()
  , oCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , ks = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , sCe = function(t) {
    oCe(e, t);
    function e() {
        var r = t !== null && t.apply(this, arguments) || this;
        return r.pairs = new Array(e.MAX_PAIRS),
        r.rows = new Array,
        r.startEnd = [2],
        r
    }
    return e.prototype.decodeRow = function(r, n, i) {
        this.pairs.length = 0,
        this.startFromEven = !1;
        try {
            return e.constructResult(this.decodeRow2pairs(r, n))
        } catch {}
        return this.pairs.length = 0,
        this.startFromEven = !0,
        e.constructResult(this.decodeRow2pairs(r, n))
    }
    ,
    e.prototype.reset = function() {
        this.pairs.length = 0,
        this.rows.length = 0
    }
    ,
    e.prototype.decodeRow2pairs = function(r, n) {
        for (var i = !1; !i; )
            try {
                this.pairs.push(this.retrieveNextPair(n, this.pairs, r))
            } catch (a) {
                if (a instanceof le) {
                    if (!this.pairs.length)
                        throw new le;
                    i = !0
                }
            }
        if (this.checkChecksum())
            return this.pairs;
        var o;
        if (this.rows.length ? o = !0 : o = !1,
        this.storeRow(r, !1),
        o) {
            var s = this.checkRowsBoolean(!1);
            if (s != null || (s = this.checkRowsBoolean(!0),
            s != null))
                return s
        }
        throw new le
    }
    ,
    e.prototype.checkRowsBoolean = function(r) {
        if (this.rows.length > 25)
            return this.rows.length = 0,
            null;
        this.pairs.length = 0,
        r && (this.rows = this.rows.reverse());
        var n = null;
        try {
            n = this.checkRows(new Array, 0)
        } catch (i) {
            console.log(i)
        }
        return r && (this.rows = this.rows.reverse()),
        n
    }
    ,
    e.prototype.checkRows = function(r, n) {
        for (var i, o, s = n; s < this.rows.length; s++) {
            var a = this.rows[s];
            this.pairs.length = 0;
            try {
                for (var l = (i = void 0,
                ks(r)), c = l.next(); !c.done; c = l.next()) {
                    var u = c.value;
                    this.pairs.push(u.getPairs())
                }
            } catch (d) {
                i = {
                    error: d
                }
            } finally {
                try {
                    c && !c.done && (o = l.return) && o.call(l)
                } finally {
                    if (i)
                        throw i.error
                }
            }
            if (this.pairs.push(a.getPairs()),
            !!e.isValidSequence(this.pairs)) {
                if (this.checkChecksum())
                    return this.pairs;
                var f = new Array(r);
                f.push(a);
                try {
                    return this.checkRows(f, s + 1)
                } catch (d) {
                    console.log(d)
                }
            }
        }
        throw new le
    }
    ,
    e.isValidSequence = function(r) {
        var n, i;
        try {
            for (var o = ks(e.FINDER_PATTERN_SEQUENCES), s = o.next(); !s.done; s = o.next()) {
                var a = s.value;
                if (!(r.length > a.length)) {
                    for (var l = !0, c = 0; c < r.length; c++)
                        if (r[c].getFinderPattern().getValue() !== a[c]) {
                            l = !1;
                            break
                        }
                    if (l)
                        return !0
                }
            }
        } catch (u) {
            n = {
                error: u
            }
        } finally {
            try {
                s && !s.done && (i = o.return) && i.call(o)
            } finally {
                if (n)
                    throw n.error
            }
        }
        return !1
    }
    ,
    e.prototype.storeRow = function(r, n) {
        for (var i = 0, o = !1, s = !1; i < this.rows.length; ) {
            var a = this.rows[i];
            if (a.getRowNumber() > r) {
                s = a.isEquivalent(this.pairs);
                break
            }
            o = a.isEquivalent(this.pairs),
            i++
        }
        s || o || e.isPartialRow(this.pairs, this.rows) || (this.rows.push(i, new iCe(this.pairs,r,n)),
        this.removePartialRows(this.pairs, this.rows))
    }
    ,
    e.prototype.removePartialRows = function(r, n) {
        var i, o, s, a, l, c;
        try {
            for (var u = ks(n), f = u.next(); !f.done; f = u.next()) {
                var d = f.value;
                if (d.getPairs().length !== r.length) {
                    var h = !0;
                    try {
                        for (var x = (s = void 0,
                        ks(d.getPairs())), y = x.next(); !y.done; y = x.next()) {
                            var m = y.value
                              , E = !1;
                            try {
                                for (var g = (l = void 0,
                                ks(r)), p = g.next(); !p.done; p = g.next()) {
                                    var v = p.value;
                                    if (m6.equals(m, v)) {
                                        E = !0;
                                        break
                                    }
                                }
                            } catch (_) {
                                l = {
                                    error: _
                                }
                            } finally {
                                try {
                                    p && !p.done && (c = g.return) && c.call(g)
                                } finally {
                                    if (l)
                                        throw l.error
                                }
                            }
                            E || (h = !1)
                        }
                    } catch (_) {
                        s = {
                            error: _
                        }
                    } finally {
                        try {
                            y && !y.done && (a = x.return) && a.call(x)
                        } finally {
                            if (s)
                                throw s.error
                        }
                    }
                }
            }
        } catch (_) {
            i = {
                error: _
            }
        } finally {
            try {
                f && !f.done && (o = u.return) && o.call(u)
            } finally {
                if (i)
                    throw i.error
            }
        }
    }
    ,
    e.isPartialRow = function(r, n) {
        var i, o, s, a, l, c;
        try {
            for (var u = ks(n), f = u.next(); !f.done; f = u.next()) {
                var d = f.value
                  , h = !0;
                try {
                    for (var x = (s = void 0,
                    ks(r)), y = x.next(); !y.done; y = x.next()) {
                        var m = y.value
                          , E = !1;
                        try {
                            for (var g = (l = void 0,
                            ks(d.getPairs())), p = g.next(); !p.done; p = g.next()) {
                                var v = p.value;
                                if (m.equals(v)) {
                                    E = !0;
                                    break
                                }
                            }
                        } catch (_) {
                            l = {
                                error: _
                            }
                        } finally {
                            try {
                                p && !p.done && (c = g.return) && c.call(g)
                            } finally {
                                if (l)
                                    throw l.error
                            }
                        }
                        if (!E) {
                            h = !1;
                            break
                        }
                    }
                } catch (_) {
                    s = {
                        error: _
                    }
                } finally {
                    try {
                        y && !y.done && (a = x.return) && a.call(x)
                    } finally {
                        if (s)
                            throw s.error
                    }
                }
                if (h)
                    return !0
            }
        } catch (_) {
            i = {
                error: _
            }
        } finally {
            try {
                f && !f.done && (o = u.return) && o.call(u)
            } finally {
                if (i)
                    throw i.error
            }
        }
        return !1
    }
    ,
    e.prototype.getRows = function() {
        return this.rows
    }
    ,
    e.constructResult = function(r) {
        var n = Mbe.buildBitArray(r)
          , i = nCe(n)
          , o = i.parseInformation()
          , s = r[0].getFinderPattern().getResultPoints()
          , a = r[r.length - 1].getFinderPattern().getResultPoints()
          , l = [s[0], s[1], a[0], a[1]];
        return new nn(o,null,null,l,ke.RSS_EXPANDED,null)
    }
    ,
    e.prototype.checkChecksum = function() {
        var r = this.pairs.get(0)
          , n = r.getLeftChar()
          , i = r.getRightChar();
        if (i === null)
            return !1;
        for (var o = i.getChecksumPortion(), s = 2, a = 1; a < this.pairs.size(); ++a) {
            var l = this.pairs.get(a);
            o += l.getLeftChar().getChecksumPortion(),
            s++;
            var c = l.getRightChar();
            c != null && (o += c.getChecksumPortion(),
            s++)
        }
        o %= 211;
        var u = 211 * (s - 4) + o;
        return u === n.getValue()
    }
    ,
    e.getNextSecondBar = function(r, n) {
        var i;
        return r.get(n) ? (i = r.getNextUnset(n),
        i = r.getNextSet(i)) : (i = r.getNextSet(n),
        i = r.getNextUnset(i)),
        i
    }
    ,
    e.prototype.retrieveNextPair = function(r, n, i) {
        var o = n.length % 2 === 0;
        this.startFromEven && (o = !o);
        var s, a = !0, l = -1;
        do
            this.findNextPair(r, n, l),
            s = this.parseFoundFinderPattern(r, i, o),
            s === null ? l = e.getNextSecondBar(r, this.startEnd[0]) : a = !1;
        while (a);
        var c = this.decodeDataCharacter(r, s, o, !0);
        if (!this.isEmptyPair(n) && n[n.length - 1].mustBeLast())
            throw new le;
        var u;
        try {
            u = this.decodeDataCharacter(r, s, o, !1)
        } catch (f) {
            u = null,
            console.log(f)
        }
        return new m6(c,u,s,!0)
    }
    ,
    e.prototype.isEmptyPair = function(r) {
        return r.length === 0
    }
    ,
    e.prototype.findNextPair = function(r, n, i) {
        var o = this.getDecodeFinderCounters();
        o[0] = 0,
        o[1] = 0,
        o[2] = 0,
        o[3] = 0;
        var s = r.getSize(), a;
        if (i >= 0)
            a = i;
        else if (this.isEmptyPair(n))
            a = 0;
        else {
            var l = n[n.length - 1];
            a = l.getFinderPattern().getStartEnd()[1]
        }
        var c = n.length % 2 !== 0;
        this.startFromEven && (c = !c);
        for (var u = !1; a < s && (u = !r.get(a),
        !!u); )
            a++;
        for (var f = 0, d = a, h = a; h < s; h++)
            if (r.get(h) !== u)
                o[f]++;
            else {
                if (f === 3) {
                    if (c && e.reverseCounters(o),
                    e.isFinderPattern(o)) {
                        this.startEnd[0] = d,
                        this.startEnd[1] = h;
                        return
                    }
                    c && e.reverseCounters(o),
                    d += o[0] + o[1],
                    o[0] = o[2],
                    o[1] = o[3],
                    o[2] = 0,
                    o[3] = 0,
                    f--
                } else
                    f++;
                o[f] = 1,
                u = !u
            }
        throw new le
    }
    ,
    e.reverseCounters = function(r) {
        for (var n = r.length, i = 0; i < n / 2; ++i) {
            var o = r[i];
            r[i] = r[n - i - 1],
            r[n - i - 1] = o
        }
    }
    ,
    e.prototype.parseFoundFinderPattern = function(r, n, i) {
        var o, s, a;
        if (i) {
            for (var l = this.startEnd[0] - 1; l >= 0 && !r.get(l); )
                l--;
            l++,
            o = this.startEnd[0] - l,
            s = l,
            a = this.startEnd[1]
        } else
            s = this.startEnd[0],
            a = r.getNextUnset(this.startEnd[1] + 1),
            o = a - this.startEnd[1];
        var c = this.getDecodeFinderCounters();
        Ft.arraycopy(c, 0, c, 1, c.length - 1),
        c[0] = o;
        var u;
        try {
            u = this.parseFinderValue(c, e.FINDER_PATTERNS)
        } catch {
            return null
        }
        return new OM(u,[s, a],s,a,n)
    }
    ,
    e.prototype.decodeDataCharacter = function(r, n, i, o) {
        for (var s = this.getDataCharacterCounters(), a = 0; a < s.length; a++)
            s[a] = 0;
        if (o)
            e.recordPatternInReverse(r, n.getStartEnd()[0], s);
        else {
            e.recordPattern(r, n.getStartEnd()[1], s);
            for (var l = 0, c = s.length - 1; l < c; l++,
            c--) {
                var u = s[l];
                s[l] = s[c],
                s[c] = u
            }
        }
        var f = 17
          , d = ft.sum(new Int32Array(s)) / f
          , h = (n.getStartEnd()[1] - n.getStartEnd()[0]) / 15;
        if (Math.abs(d - h) / h > .3)
            throw new le;
        for (var x = this.getOddCounts(), y = this.getEvenCounts(), m = this.getOddRoundingErrors(), E = this.getEvenRoundingErrors(), l = 0; l < s.length; l++) {
            var g = 1 * s[l] / d
              , p = g + .5;
            if (p < 1) {
                if (g < .3)
                    throw new le;
                p = 1
            } else if (p > 8) {
                if (g > 8.7)
                    throw new le;
                p = 8
            }
            var v = l / 2;
            l & 1 ? (y[v] = p,
            E[v] = g - p) : (x[v] = p,
            m[v] = g - p)
        }
        this.adjustOddEvenCounts(f);
        for (var _ = 4 * n.getValue() + (i ? 0 : 2) + (o ? 0 : 1) - 1, b = 0, C = 0, l = x.length - 1; l >= 0; l--) {
            if (e.isNotA1left(n, i, o)) {
                var w = e.WEIGHTS[_][2 * l];
                C += x[l] * w
            }
            b += x[l]
        }
        for (var T = 0, l = y.length - 1; l >= 0; l--)
            if (e.isNotA1left(n, i, o)) {
                var w = e.WEIGHTS[_][2 * l + 1];
                T += y[l] * w
            }
        var A = C + T;
        if (b & 1 || b > 13 || b < 4)
            throw new le;
        var B = (13 - b) / 2
          , S = e.SYMBOL_WIDEST[B]
          , D = 9 - S
          , F = Fc.getRSSvalue(x, S, !0)
          , R = Fc.getRSSvalue(y, D, !1)
          , P = e.EVEN_TOTAL_SUBSET[B]
          , N = e.GSUM[B]
          , j = F * P + R + N;
        return new op(j,A)
    }
    ,
    e.isNotA1left = function(r, n, i) {
        return !(r.getValue() === 0 && n && i)
    }
    ,
    e.prototype.adjustOddEvenCounts = function(r) {
        var n = ft.sum(new Int32Array(this.getOddCounts()))
          , i = ft.sum(new Int32Array(this.getEvenCounts()))
          , o = !1
          , s = !1;
        n > 13 ? s = !0 : n < 4 && (o = !0);
        var a = !1
          , l = !1;
        i > 13 ? l = !0 : i < 4 && (a = !0);
        var c = n + i - r
          , u = (n & 1) === 1
          , f = (i & 1) === 0;
        if (c === 1)
            if (u) {
                if (f)
                    throw new le;
                s = !0
            } else {
                if (!f)
                    throw new le;
                l = !0
            }
        else if (c === -1)
            if (u) {
                if (f)
                    throw new le;
                o = !0
            } else {
                if (!f)
                    throw new le;
                a = !0
            }
        else if (c === 0) {
            if (u) {
                if (!f)
                    throw new le;
                n < i ? (o = !0,
                l = !0) : (s = !0,
                a = !0)
            } else if (f)
                throw new le
        } else
            throw new le;
        if (o) {
            if (s)
                throw new le;
            e.increment(this.getOddCounts(), this.getOddRoundingErrors())
        }
        if (s && e.decrement(this.getOddCounts(), this.getOddRoundingErrors()),
        a) {
            if (l)
                throw new le;
            e.increment(this.getEvenCounts(), this.getOddRoundingErrors())
        }
        l && e.decrement(this.getEvenCounts(), this.getEvenRoundingErrors())
    }
    ,
    e.SYMBOL_WIDEST = [7, 5, 4, 3, 1],
    e.EVEN_TOTAL_SUBSET = [4, 20, 52, 104, 204],
    e.GSUM = [0, 348, 1388, 2948, 3988],
    e.FINDER_PATTERNS = [Int32Array.from([1, 8, 4, 1]), Int32Array.from([3, 6, 4, 1]), Int32Array.from([3, 4, 6, 1]), Int32Array.from([3, 2, 8, 1]), Int32Array.from([2, 6, 5, 1]), Int32Array.from([2, 2, 9, 1])],
    e.WEIGHTS = [[1, 3, 9, 27, 81, 32, 96, 77], [20, 60, 180, 118, 143, 7, 21, 63], [189, 145, 13, 39, 117, 140, 209, 205], [193, 157, 49, 147, 19, 57, 171, 91], [62, 186, 136, 197, 169, 85, 44, 132], [185, 133, 188, 142, 4, 12, 36, 108], [113, 128, 173, 97, 80, 29, 87, 50], [150, 28, 84, 41, 123, 158, 52, 156], [46, 138, 203, 187, 139, 206, 196, 166], [76, 17, 51, 153, 37, 111, 122, 155], [43, 129, 176, 106, 107, 110, 119, 146], [16, 48, 144, 10, 30, 90, 59, 177], [109, 116, 137, 200, 178, 112, 125, 164], [70, 210, 208, 202, 184, 130, 179, 115], [134, 191, 151, 31, 93, 68, 204, 190], [148, 22, 66, 198, 172, 94, 71, 2], [6, 18, 54, 162, 64, 192, 154, 40], [120, 149, 25, 75, 14, 42, 126, 167], [79, 26, 78, 23, 69, 207, 199, 175], [103, 98, 83, 38, 114, 131, 182, 124], [161, 61, 183, 127, 170, 88, 53, 159], [55, 165, 73, 8, 24, 72, 5, 15], [45, 135, 194, 160, 58, 174, 100, 89]],
    e.FINDER_PAT_A = 0,
    e.FINDER_PAT_B = 1,
    e.FINDER_PAT_C = 2,
    e.FINDER_PAT_D = 3,
    e.FINDER_PAT_E = 4,
    e.FINDER_PAT_F = 5,
    e.FINDER_PATTERN_SEQUENCES = [[e.FINDER_PAT_A, e.FINDER_PAT_A], [e.FINDER_PAT_A, e.FINDER_PAT_B, e.FINDER_PAT_B], [e.FINDER_PAT_A, e.FINDER_PAT_C, e.FINDER_PAT_B, e.FINDER_PAT_D], [e.FINDER_PAT_A, e.FINDER_PAT_E, e.FINDER_PAT_B, e.FINDER_PAT_D, e.FINDER_PAT_C], [e.FINDER_PAT_A, e.FINDER_PAT_E, e.FINDER_PAT_B, e.FINDER_PAT_D, e.FINDER_PAT_D, e.FINDER_PAT_F], [e.FINDER_PAT_A, e.FINDER_PAT_E, e.FINDER_PAT_B, e.FINDER_PAT_D, e.FINDER_PAT_E, e.FINDER_PAT_F, e.FINDER_PAT_F], [e.FINDER_PAT_A, e.FINDER_PAT_A, e.FINDER_PAT_B, e.FINDER_PAT_B, e.FINDER_PAT_C, e.FINDER_PAT_C, e.FINDER_PAT_D, e.FINDER_PAT_D], [e.FINDER_PAT_A, e.FINDER_PAT_A, e.FINDER_PAT_B, e.FINDER_PAT_B, e.FINDER_PAT_C, e.FINDER_PAT_C, e.FINDER_PAT_D, e.FINDER_PAT_E, e.FINDER_PAT_E], [e.FINDER_PAT_A, e.FINDER_PAT_A, e.FINDER_PAT_B, e.FINDER_PAT_B, e.FINDER_PAT_C, e.FINDER_PAT_C, e.FINDER_PAT_D, e.FINDER_PAT_E, e.FINDER_PAT_F, e.FINDER_PAT_F], [e.FINDER_PAT_A, e.FINDER_PAT_A, e.FINDER_PAT_B, e.FINDER_PAT_B, e.FINDER_PAT_C, e.FINDER_PAT_D, e.FINDER_PAT_D, e.FINDER_PAT_E, e.FINDER_PAT_E, e.FINDER_PAT_F, e.FINDER_PAT_F]],
    e.MAX_PAIRS = 11,
    e
}(Va)
  , aCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , lCe = function(t) {
    aCe(e, t);
    function e(r, n, i) {
        var o = t.call(this, r, n) || this;
        return o.count = 0,
        o.finderPattern = i,
        o
    }
    return e.prototype.getFinderPattern = function() {
        return this.finderPattern
    }
    ,
    e.prototype.getCount = function() {
        return this.count
    }
    ,
    e.prototype.incrementCount = function() {
        this.count++
    }
    ,
    e
}(op)
  , cCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Qm = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , v6 = function(t) {
    cCe(e, t);
    function e() {
        var r = t !== null && t.apply(this, arguments) || this;
        return r.possibleLeftPairs = [],
        r.possibleRightPairs = [],
        r
    }
    return e.prototype.decodeRow = function(r, n, i) {
        var o, s, a, l, c = this.decodePair(n, !1, r, i);
        e.addOrTally(this.possibleLeftPairs, c),
        n.reverse();
        var u = this.decodePair(n, !0, r, i);
        e.addOrTally(this.possibleRightPairs, u),
        n.reverse();
        try {
            for (var f = Qm(this.possibleLeftPairs), d = f.next(); !d.done; d = f.next()) {
                var h = d.value;
                if (h.getCount() > 1)
                    try {
                        for (var x = (a = void 0,
                        Qm(this.possibleRightPairs)), y = x.next(); !y.done; y = x.next()) {
                            var m = y.value;
                            if (m.getCount() > 1 && e.checkChecksum(h, m))
                                return e.constructResult(h, m)
                        }
                    } catch (E) {
                        a = {
                            error: E
                        }
                    } finally {
                        try {
                            y && !y.done && (l = x.return) && l.call(x)
                        } finally {
                            if (a)
                                throw a.error
                        }
                    }
            }
        } catch (E) {
            o = {
                error: E
            }
        } finally {
            try {
                d && !d.done && (s = f.return) && s.call(f)
            } finally {
                if (o)
                    throw o.error
            }
        }
        throw new le
    }
    ,
    e.addOrTally = function(r, n) {
        var i, o;
        if (n != null) {
            var s = !1;
            try {
                for (var a = Qm(r), l = a.next(); !l.done; l = a.next()) {
                    var c = l.value;
                    if (c.getValue() === n.getValue()) {
                        c.incrementCount(),
                        s = !0;
                        break
                    }
                }
            } catch (u) {
                i = {
                    error: u
                }
            } finally {
                try {
                    l && !l.done && (o = a.return) && o.call(a)
                } finally {
                    if (i)
                        throw i.error
                }
            }
            s || r.push(n)
        }
    }
    ,
    e.prototype.reset = function() {
        this.possibleLeftPairs.length = 0,
        this.possibleRightPairs.length = 0
    }
    ,
    e.constructResult = function(r, n) {
        for (var i = 4537077 * r.getValue() + n.getValue(), o = new String(i).toString(), s = new Ke, a = 13 - o.length; a > 0; a--)
            s.append("0");
        s.append(o);
        for (var l = 0, a = 0; a < 13; a++) {
            var c = s.charAt(a).charCodeAt(0) - "0".charCodeAt(0);
            l += a & 1 ? c : 3 * c
        }
        l = 10 - l % 10,
        l === 10 && (l = 0),
        s.append(l.toString());
        var u = r.getFinderPattern().getResultPoints()
          , f = n.getFinderPattern().getResultPoints();
        return new nn(s.toString(),null,0,[u[0], u[1], f[0], f[1]],ke.RSS_14,new Date().getTime())
    }
    ,
    e.checkChecksum = function(r, n) {
        var i = (r.getChecksumPortion() + 16 * n.getChecksumPortion()) % 79
          , o = 9 * r.getFinderPattern().getValue() + n.getFinderPattern().getValue();
        return o > 72 && o--,
        o > 8 && o--,
        i === o
    }
    ,
    e.prototype.decodePair = function(r, n, i, o) {
        try {
            var s = this.findFinderPattern(r, n)
              , a = this.parseFoundFinderPattern(r, i, n, s)
              , l = o == null ? null : o.get(Pt.NEED_RESULT_POINT_CALLBACK);
            if (l != null) {
                var c = (s[0] + s[1]) / 2;
                n && (c = r.getSize() - 1 - c),
                l.foundPossibleResultPoint(new Te(c,i))
            }
            var u = this.decodeDataCharacter(r, a, !0)
              , f = this.decodeDataCharacter(r, a, !1);
            return new lCe(1597 * u.getValue() + f.getValue(),u.getChecksumPortion() + 4 * f.getChecksumPortion(),a)
        } catch {
            return null
        }
    }
    ,
    e.prototype.decodeDataCharacter = function(r, n, i) {
        for (var o = this.getDataCharacterCounters(), s = 0; s < o.length; s++)
            o[s] = 0;
        if (i)
            Ar.recordPatternInReverse(r, n.getStartEnd()[0], o);
        else {
            Ar.recordPattern(r, n.getStartEnd()[1] + 1, o);
            for (var a = 0, l = o.length - 1; a < l; a++,
            l--) {
                var c = o[a];
                o[a] = o[l],
                o[l] = c
            }
        }
        for (var u = i ? 16 : 15, f = ft.sum(new Int32Array(o)) / u, d = this.getOddCounts(), h = this.getEvenCounts(), x = this.getOddRoundingErrors(), y = this.getEvenRoundingErrors(), a = 0; a < o.length; a++) {
            var m = o[a] / f
              , E = Math.floor(m + .5);
            E < 1 ? E = 1 : E > 8 && (E = 8);
            var g = Math.floor(a / 2);
            a & 1 ? (h[g] = E,
            y[g] = m - E) : (d[g] = E,
            x[g] = m - E)
        }
        this.adjustOddEvenCounts(i, u);
        for (var p = 0, v = 0, a = d.length - 1; a >= 0; a--)
            v *= 9,
            v += d[a],
            p += d[a];
        for (var _ = 0, b = 0, a = h.length - 1; a >= 0; a--)
            _ *= 9,
            _ += h[a],
            b += h[a];
        var C = v + 3 * _;
        if (i) {
            if (p & 1 || p > 12 || p < 4)
                throw new le;
            var w = (12 - p) / 2
              , T = e.OUTSIDE_ODD_WIDEST[w]
              , A = 9 - T
              , B = Fc.getRSSvalue(d, T, !1)
              , S = Fc.getRSSvalue(h, A, !0)
              , D = e.OUTSIDE_EVEN_TOTAL_SUBSET[w]
              , F = e.OUTSIDE_GSUM[w];
            return new op(B * D + S + F,C)
        } else {
            if (b & 1 || b > 10 || b < 4)
                throw new le;
            var w = (10 - b) / 2
              , T = e.INSIDE_ODD_WIDEST[w]
              , A = 9 - T
              , B = Fc.getRSSvalue(d, T, !0)
              , S = Fc.getRSSvalue(h, A, !1)
              , R = e.INSIDE_ODD_TOTAL_SUBSET[w]
              , F = e.INSIDE_GSUM[w];
            return new op(S * R + B + F,C)
        }
    }
    ,
    e.prototype.findFinderPattern = function(r, n) {
        var i = this.getDecodeFinderCounters();
        i[0] = 0,
        i[1] = 0,
        i[2] = 0,
        i[3] = 0;
        for (var o = r.getSize(), s = !1, a = 0; a < o && (s = !r.get(a),
        n !== s); )
            a++;
        for (var l = 0, c = a, u = a; u < o; u++)
            if (r.get(u) !== s)
                i[l]++;
            else {
                if (l === 3) {
                    if (Va.isFinderPattern(i))
                        return [c, u];
                    c += i[0] + i[1],
                    i[0] = i[2],
                    i[1] = i[3],
                    i[2] = 0,
                    i[3] = 0,
                    l--
                } else
                    l++;
                i[l] = 1,
                s = !s
            }
        throw new le
    }
    ,
    e.prototype.parseFoundFinderPattern = function(r, n, i, o) {
        for (var s = r.get(o[0]), a = o[0] - 1; a >= 0 && s !== r.get(a); )
            a--;
        a++;
        var l = o[0] - a
          , c = this.getDecodeFinderCounters()
          , u = new Int32Array(c.length);
        Ft.arraycopy(c, 0, u, 1, c.length - 1),
        u[0] = l;
        var f = this.parseFinderValue(u, e.FINDER_PATTERNS)
          , d = a
          , h = o[1];
        return i && (d = r.getSize() - 1 - d,
        h = r.getSize() - 1 - h),
        new OM(f,[a, o[1]],d,h,n)
    }
    ,
    e.prototype.adjustOddEvenCounts = function(r, n) {
        var i = ft.sum(new Int32Array(this.getOddCounts()))
          , o = ft.sum(new Int32Array(this.getEvenCounts()))
          , s = !1
          , a = !1
          , l = !1
          , c = !1;
        r ? (i > 12 ? a = !0 : i < 4 && (s = !0),
        o > 12 ? c = !0 : o < 4 && (l = !0)) : (i > 11 ? a = !0 : i < 5 && (s = !0),
        o > 10 ? c = !0 : o < 4 && (l = !0));
        var u = i + o - n
          , f = (i & 1) === (r ? 1 : 0)
          , d = (o & 1) === 1;
        if (u === 1)
            if (f) {
                if (d)
                    throw new le;
                a = !0
            } else {
                if (!d)
                    throw new le;
                c = !0
            }
        else if (u === -1)
            if (f) {
                if (d)
                    throw new le;
                s = !0
            } else {
                if (!d)
                    throw new le;
                l = !0
            }
        else if (u === 0) {
            if (f) {
                if (!d)
                    throw new le;
                i < o ? (s = !0,
                c = !0) : (a = !0,
                l = !0)
            } else if (d)
                throw new le
        } else
            throw new le;
        if (s) {
            if (a)
                throw new le;
            Va.increment(this.getOddCounts(), this.getOddRoundingErrors())
        }
        if (a && Va.decrement(this.getOddCounts(), this.getOddRoundingErrors()),
        l) {
            if (c)
                throw new le;
            Va.increment(this.getEvenCounts(), this.getOddRoundingErrors())
        }
        c && Va.decrement(this.getEvenCounts(), this.getEvenRoundingErrors())
    }
    ,
    e.OUTSIDE_EVEN_TOTAL_SUBSET = [1, 10, 34, 70, 126],
    e.INSIDE_ODD_TOTAL_SUBSET = [4, 20, 48, 81],
    e.OUTSIDE_GSUM = [0, 161, 961, 2015, 2715],
    e.INSIDE_GSUM = [0, 336, 1036, 1516],
    e.OUTSIDE_ODD_WIDEST = [8, 6, 4, 3, 1],
    e.INSIDE_ODD_WIDEST = [2, 4, 6, 8],
    e.FINDER_PATTERNS = [Int32Array.from([3, 8, 2, 1]), Int32Array.from([3, 5, 5, 1]), Int32Array.from([3, 3, 7, 1]), Int32Array.from([3, 1, 9, 1]), Int32Array.from([2, 7, 4, 1]), Int32Array.from([2, 5, 6, 1]), Int32Array.from([2, 3, 8, 1]), Int32Array.from([1, 5, 7, 1]), Int32Array.from([1, 3, 9, 1])],
    e
}(Va)
  , uCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Pc = function(t) {
    uCe(e, t);
    function e(r) {
        var n = t.call(this) || this;
        n.readers = [];
        var i = r ? r.get(Pt.POSSIBLE_FORMATS) : null
          , o = r && r.get(Pt.ASSUME_CODE_39_CHECK_DIGIT) !== void 0
          , s = r && r.get(Pt.ENABLE_CODE_39_EXTENDED_MODE) !== void 0;
        return i && ((i.includes(ke.EAN_13) || i.includes(ke.UPC_A) || i.includes(ke.EAN_8) || i.includes(ke.UPC_E)) && n.readers.push(new Jm(r)),
        i.includes(ke.CODE_39) && n.readers.push(new l6(o,s)),
        i.includes(ke.CODE_93) && n.readers.push(new c6),
        i.includes(ke.CODE_128) && n.readers.push(new a6),
        i.includes(ke.ITF) && n.readers.push(new u6),
        i.includes(ke.CODABAR) && n.readers.push(new Ibe),
        i.includes(ke.RSS_14) && n.readers.push(new v6),
        i.includes(ke.RSS_EXPANDED) && (console.warn("RSS Expanded reader IS NOT ready for production yet! use at your own risk."),
        n.readers.push(new sCe))),
        n.readers.length === 0 && (n.readers.push(new Jm(r)),
        n.readers.push(new l6),
        n.readers.push(new c6),
        n.readers.push(new Jm(r)),
        n.readers.push(new a6),
        n.readers.push(new u6),
        n.readers.push(new v6)),
        n
    }
    return e.prototype.decodeRow = function(r, n, i) {
        for (var o = 0; o < this.readers.length; o++)
            try {
                return this.readers[o].decodeRow(r, n, i)
            } catch {}
        throw new le
    }
    ,
    e.prototype.reset = function() {
        this.readers.forEach(function(r) {
            return r.reset()
        })
    }
    ,
    e
}(Ar)
  , fCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    fCe(e, t);
    function e(r, n) {
        return r === void 0 && (r = 500),
        t.call(this, new Pc(n), r, n) || this
    }
    return e
}
)(Mu);
var y6 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, pt = function() {
    function t(e, r, n) {
        this.ecCodewords = e,
        this.ecBlocks = [r],
        n && this.ecBlocks.push(n)
    }
    return t.prototype.getECCodewords = function() {
        return this.ecCodewords
    }
    ,
    t.prototype.getECBlocks = function() {
        return this.ecBlocks
    }
    ,
    t
}(), dt = function() {
    function t(e, r) {
        this.count = e,
        this.dataCodewords = r
    }
    return t.prototype.getCount = function() {
        return this.count
    }
    ,
    t.prototype.getDataCodewords = function() {
        return this.dataCodewords
    }
    ,
    t
}(), dCe = function() {
    function t(e, r, n, i, o, s) {
        var a, l;
        this.versionNumber = e,
        this.symbolSizeRows = r,
        this.symbolSizeColumns = n,
        this.dataRegionSizeRows = i,
        this.dataRegionSizeColumns = o,
        this.ecBlocks = s;
        var c = 0
          , u = s.getECCodewords()
          , f = s.getECBlocks();
        try {
            for (var d = y6(f), h = d.next(); !h.done; h = d.next()) {
                var x = h.value;
                c += x.getCount() * (x.getDataCodewords() + u)
            }
        } catch (y) {
            a = {
                error: y
            }
        } finally {
            try {
                h && !h.done && (l = d.return) && l.call(d)
            } finally {
                if (a)
                    throw a.error
            }
        }
        this.totalCodewords = c
    }
    return t.prototype.getVersionNumber = function() {
        return this.versionNumber
    }
    ,
    t.prototype.getSymbolSizeRows = function() {
        return this.symbolSizeRows
    }
    ,
    t.prototype.getSymbolSizeColumns = function() {
        return this.symbolSizeColumns
    }
    ,
    t.prototype.getDataRegionSizeRows = function() {
        return this.dataRegionSizeRows
    }
    ,
    t.prototype.getDataRegionSizeColumns = function() {
        return this.dataRegionSizeColumns
    }
    ,
    t.prototype.getTotalCodewords = function() {
        return this.totalCodewords
    }
    ,
    t.prototype.getECBlocks = function() {
        return this.ecBlocks
    }
    ,
    t.getVersionForDimensions = function(e, r) {
        var n, i;
        if (e & 1 || r & 1)
            throw new ge;
        try {
            for (var o = y6(t.VERSIONS), s = o.next(); !s.done; s = o.next()) {
                var a = s.value;
                if (a.symbolSizeRows === e && a.symbolSizeColumns === r)
                    return a
            }
        } catch (l) {
            n = {
                error: l
            }
        } finally {
            try {
                s && !s.done && (i = o.return) && i.call(o)
            } finally {
                if (n)
                    throw n.error
            }
        }
        throw new ge
    }
    ,
    t.prototype.toString = function() {
        return "" + this.versionNumber
    }
    ,
    t.buildVersions = function() {
        return [new t(1,10,10,8,8,new pt(5,new dt(1,3))), new t(2,12,12,10,10,new pt(7,new dt(1,5))), new t(3,14,14,12,12,new pt(10,new dt(1,8))), new t(4,16,16,14,14,new pt(12,new dt(1,12))), new t(5,18,18,16,16,new pt(14,new dt(1,18))), new t(6,20,20,18,18,new pt(18,new dt(1,22))), new t(7,22,22,20,20,new pt(20,new dt(1,30))), new t(8,24,24,22,22,new pt(24,new dt(1,36))), new t(9,26,26,24,24,new pt(28,new dt(1,44))), new t(10,32,32,14,14,new pt(36,new dt(1,62))), new t(11,36,36,16,16,new pt(42,new dt(1,86))), new t(12,40,40,18,18,new pt(48,new dt(1,114))), new t(13,44,44,20,20,new pt(56,new dt(1,144))), new t(14,48,48,22,22,new pt(68,new dt(1,174))), new t(15,52,52,24,24,new pt(42,new dt(2,102))), new t(16,64,64,14,14,new pt(56,new dt(2,140))), new t(17,72,72,16,16,new pt(36,new dt(4,92))), new t(18,80,80,18,18,new pt(48,new dt(4,114))), new t(19,88,88,20,20,new pt(56,new dt(4,144))), new t(20,96,96,22,22,new pt(68,new dt(4,174))), new t(21,104,104,24,24,new pt(56,new dt(6,136))), new t(22,120,120,18,18,new pt(68,new dt(6,175))), new t(23,132,132,20,20,new pt(62,new dt(8,163))), new t(24,144,144,22,22,new pt(62,new dt(8,156),new dt(2,155))), new t(25,8,18,6,16,new pt(7,new dt(1,5))), new t(26,8,32,6,14,new pt(11,new dt(1,10))), new t(27,12,26,10,24,new pt(14,new dt(1,16))), new t(28,12,36,10,16,new pt(18,new dt(1,22))), new t(29,16,36,14,16,new pt(24,new dt(1,32))), new t(30,16,48,14,22,new pt(28,new dt(1,49)))]
    }
    ,
    t.VERSIONS = t.buildVersions(),
    t
}(), hCe = function() {
    function t(e) {
        var r = e.getHeight();
        if (r < 8 || r > 144 || r & 1)
            throw new ge;
        this.version = t.readVersion(e),
        this.mappingBitMatrix = this.extractDataRegion(e),
        this.readMappingMatrix = new Do(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())
    }
    return t.prototype.getVersion = function() {
        return this.version
    }
    ,
    t.readVersion = function(e) {
        var r = e.getHeight()
          , n = e.getWidth();
        return dCe.getVersionForDimensions(r, n)
    }
    ,
    t.prototype.readCodewords = function() {
        var e = new Int8Array(this.version.getTotalCodewords())
          , r = 0
          , n = 4
          , i = 0
          , o = this.mappingBitMatrix.getHeight()
          , s = this.mappingBitMatrix.getWidth()
          , a = !1
          , l = !1
          , c = !1
          , u = !1;
        do
            if (n === o && i === 0 && !a)
                e[r++] = this.readCorner1(o, s) & 255,
                n -= 2,
                i += 2,
                a = !0;
            else if (n === o - 2 && i === 0 && s & 3 && !l)
                e[r++] = this.readCorner2(o, s) & 255,
                n -= 2,
                i += 2,
                l = !0;
            else if (n === o + 4 && i === 2 && !(s & 7) && !c)
                e[r++] = this.readCorner3(o, s) & 255,
                n -= 2,
                i += 2,
                c = !0;
            else if (n === o - 2 && i === 0 && (s & 7) === 4 && !u)
                e[r++] = this.readCorner4(o, s) & 255,
                n -= 2,
                i += 2,
                u = !0;
            else {
                do
                    n < o && i >= 0 && !this.readMappingMatrix.get(i, n) && (e[r++] = this.readUtah(n, i, o, s) & 255),
                    n -= 2,
                    i += 2;
                while (n >= 0 && i < s);
                n += 1,
                i += 3;
                do
                    n >= 0 && i < s && !this.readMappingMatrix.get(i, n) && (e[r++] = this.readUtah(n, i, o, s) & 255),
                    n += 2,
                    i -= 2;
                while (n < o && i >= 0);
                n += 3,
                i += 1
            }
        while (n < o || i < s);
        if (r !== this.version.getTotalCodewords())
            throw new ge;
        return e
    }
    ,
    t.prototype.readModule = function(e, r, n, i) {
        return e < 0 && (e += n,
        r += 4 - (n + 4 & 7)),
        r < 0 && (r += i,
        e += 4 - (i + 4 & 7)),
        this.readMappingMatrix.set(r, e),
        this.mappingBitMatrix.get(r, e)
    }
    ,
    t.prototype.readUtah = function(e, r, n, i) {
        var o = 0;
        return this.readModule(e - 2, r - 2, n, i) && (o |= 1),
        o <<= 1,
        this.readModule(e - 2, r - 1, n, i) && (o |= 1),
        o <<= 1,
        this.readModule(e - 1, r - 2, n, i) && (o |= 1),
        o <<= 1,
        this.readModule(e - 1, r - 1, n, i) && (o |= 1),
        o <<= 1,
        this.readModule(e - 1, r, n, i) && (o |= 1),
        o <<= 1,
        this.readModule(e, r - 2, n, i) && (o |= 1),
        o <<= 1,
        this.readModule(e, r - 1, n, i) && (o |= 1),
        o <<= 1,
        this.readModule(e, r, n, i) && (o |= 1),
        o
    }
    ,
    t.prototype.readCorner1 = function(e, r) {
        var n = 0;
        return this.readModule(e - 1, 0, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(e - 1, 1, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(e - 1, 2, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 2, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 1, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(1, r - 1, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(2, r - 1, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(3, r - 1, e, r) && (n |= 1),
        n
    }
    ,
    t.prototype.readCorner2 = function(e, r) {
        var n = 0;
        return this.readModule(e - 3, 0, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(e - 2, 0, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(e - 1, 0, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 4, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 3, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 2, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 1, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(1, r - 1, e, r) && (n |= 1),
        n
    }
    ,
    t.prototype.readCorner3 = function(e, r) {
        var n = 0;
        return this.readModule(e - 1, 0, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(e - 1, r - 1, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 3, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 2, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 1, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(1, r - 3, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(1, r - 2, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(1, r - 1, e, r) && (n |= 1),
        n
    }
    ,
    t.prototype.readCorner4 = function(e, r) {
        var n = 0;
        return this.readModule(e - 3, 0, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(e - 2, 0, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(e - 1, 0, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 2, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 1, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(1, r - 1, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(2, r - 1, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(3, r - 1, e, r) && (n |= 1),
        n
    }
    ,
    t.prototype.extractDataRegion = function(e) {
        var r = this.version.getSymbolSizeRows()
          , n = this.version.getSymbolSizeColumns();
        if (e.getHeight() !== r)
            throw new Me("Dimension of bitMatrix must match the version size");
        for (var i = this.version.getDataRegionSizeRows(), o = this.version.getDataRegionSizeColumns(), s = r / i | 0, a = n / o | 0, l = s * i, c = a * o, u = new Do(c,l), f = 0; f < s; ++f)
            for (var d = f * i, h = 0; h < a; ++h)
                for (var x = h * o, y = 0; y < i; ++y)
                    for (var m = f * (i + 2) + 1 + y, E = d + y, g = 0; g < o; ++g) {
                        var p = h * (o + 2) + 1 + g;
                        if (e.get(p, m)) {
                            var v = x + g;
                            u.set(v, E)
                        }
                    }
        return u
    }
    ,
    t
}(), E6 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, xCe = function() {
    function t(e, r) {
        this.numDataCodewords = e,
        this.codewords = r
    }
    return t.getDataBlocks = function(e, r) {
        var n, i, o, s, a = r.getECBlocks(), l = 0, c = a.getECBlocks();
        try {
            for (var u = E6(c), f = u.next(); !f.done; f = u.next()) {
                var d = f.value;
                l += d.getCount()
            }
        } catch (F) {
            n = {
                error: F
            }
        } finally {
            try {
                f && !f.done && (i = u.return) && i.call(u)
            } finally {
                if (n)
                    throw n.error
            }
        }
        var h = new Array(l)
          , x = 0;
        try {
            for (var y = E6(c), m = y.next(); !m.done; m = y.next())
                for (var d = m.value, E = 0; E < d.getCount(); E++) {
                    var g = d.getDataCodewords()
                      , p = a.getECCodewords() + g;
                    h[x++] = new t(g,new Uint8Array(p))
                }
        } catch (F) {
            o = {
                error: F
            }
        } finally {
            try {
                m && !m.done && (s = y.return) && s.call(y)
            } finally {
                if (o)
                    throw o.error
            }
        }
        for (var v = h[0].codewords.length, _ = v - a.getECCodewords(), b = _ - 1, C = 0, E = 0; E < b; E++)
            for (var w = 0; w < x; w++)
                h[w].codewords[E] = e[C++];
        for (var T = r.getVersionNumber() === 24, A = T ? 8 : x, w = 0; w < A; w++)
            h[w].codewords[_ - 1] = e[C++];
        for (var B = h[0].codewords.length, E = _; E < B; E++)
            for (var w = 0; w < x; w++) {
                var S = T ? (w + 8) % x : w
                  , D = T && S > 7 ? E - 1 : E;
                h[S].codewords[D] = e[C++]
            }
        if (C !== e.length)
            throw new Me;
        return h
    }
    ,
    t.prototype.getNumDataCodewords = function() {
        return this.numDataCodewords
    }
    ,
    t.prototype.getCodewords = function() {
        return this.codewords
    }
    ,
    t
}(), MM = function() {
    function t(e) {
        this.bytes = e,
        this.byteOffset = 0,
        this.bitOffset = 0
    }
    return t.prototype.getBitOffset = function() {
        return this.bitOffset
    }
    ,
    t.prototype.getByteOffset = function() {
        return this.byteOffset
    }
    ,
    t.prototype.readBits = function(e) {
        if (e < 1 || e > 32 || e > this.available())
            throw new Me("" + e);
        var r = 0
          , n = this.bitOffset
          , i = this.byteOffset
          , o = this.bytes;
        if (n > 0) {
            var s = 8 - n
              , a = e < s ? e : s
              , l = s - a
              , c = 255 >> 8 - a << l;
            r = (o[i] & c) >> l,
            e -= a,
            n += a,
            n === 8 && (n = 0,
            i++)
        }
        if (e > 0) {
            for (; e >= 8; )
                r = r << 8 | o[i] & 255,
                i++,
                e -= 8;
            if (e > 0) {
                var l = 8 - e
                  , c = 255 >> l << l;
                r = r << e | (o[i] & c) >> l,
                n += e
            }
        }
        return this.bitOffset = n,
        this.byteOffset = i,
        r
    }
    ,
    t.prototype.available = function() {
        return 8 * (this.bytes.length - this.byteOffset) - this.bitOffset
    }
    ,
    t
}(), gr;
(function(t) {
    t[t.PAD_ENCODE = 0] = "PAD_ENCODE",
    t[t.ASCII_ENCODE = 1] = "ASCII_ENCODE",
    t[t.C40_ENCODE = 2] = "C40_ENCODE",
    t[t.TEXT_ENCODE = 3] = "TEXT_ENCODE",
    t[t.ANSIX12_ENCODE = 4] = "ANSIX12_ENCODE",
    t[t.EDIFACT_ENCODE = 5] = "EDIFACT_ENCODE",
    t[t.BASE256_ENCODE = 6] = "BASE256_ENCODE"
}
)(gr || (gr = {}));
var pCe = function() {
    function t() {}
    return t.decode = function(e) {
        var r = new MM(e)
          , n = new Ke
          , i = new Ke
          , o = new Array
          , s = gr.ASCII_ENCODE;
        do
            if (s === gr.ASCII_ENCODE)
                s = this.decodeAsciiSegment(r, n, i);
            else {
                switch (s) {
                case gr.C40_ENCODE:
                    this.decodeC40Segment(r, n);
                    break;
                case gr.TEXT_ENCODE:
                    this.decodeTextSegment(r, n);
                    break;
                case gr.ANSIX12_ENCODE:
                    this.decodeAnsiX12Segment(r, n);
                    break;
                case gr.EDIFACT_ENCODE:
                    this.decodeEdifactSegment(r, n);
                    break;
                case gr.BASE256_ENCODE:
                    this.decodeBase256Segment(r, n, o);
                    break;
                default:
                    throw new ge
                }
                s = gr.ASCII_ENCODE
            }
        while (s !== gr.PAD_ENCODE && r.available() > 0);
        return i.length() > 0 && n.append(i.toString()),
        new U1(e,n.toString(),o.length === 0 ? null : o,null)
    }
    ,
    t.decodeAsciiSegment = function(e, r, n) {
        var i = !1;
        do {
            var o = e.readBits(8);
            if (o === 0)
                throw new ge;
            if (o <= 128)
                return i && (o += 128),
                r.append(String.fromCharCode(o - 1)),
                gr.ASCII_ENCODE;
            if (o === 129)
                return gr.PAD_ENCODE;
            if (o <= 229) {
                var s = o - 130;
                s < 10 && r.append("0"),
                r.append("" + s)
            } else
                switch (o) {
                case 230:
                    return gr.C40_ENCODE;
                case 231:
                    return gr.BASE256_ENCODE;
                case 232:
                    r.append(String.fromCharCode(29));
                    break;
                case 233:
                case 234:
                    break;
                case 235:
                    i = !0;
                    break;
                case 236:
                    r.append("[)>05"),
                    n.insert(0, "");
                    break;
                case 237:
                    r.append("[)>06"),
                    n.insert(0, "");
                    break;
                case 238:
                    return gr.ANSIX12_ENCODE;
                case 239:
                    return gr.TEXT_ENCODE;
                case 240:
                    return gr.EDIFACT_ENCODE;
                case 241:
                    break;
                default:
                    if (o !== 254 || e.available() !== 0)
                        throw new ge;
                    break
                }
        } while (e.available() > 0);
        return gr.ASCII_ENCODE
    }
    ,
    t.decodeC40Segment = function(e, r) {
        var n = !1
          , i = []
          , o = 0;
        do {
            if (e.available() === 8)
                return;
            var s = e.readBits(8);
            if (s === 254)
                return;
            this.parseTwoBytes(s, e.readBits(8), i);
            for (var a = 0; a < 3; a++) {
                var l = i[a];
                switch (o) {
                case 0:
                    if (l < 3)
                        o = l + 1;
                    else if (l < this.C40_BASIC_SET_CHARS.length) {
                        var c = this.C40_BASIC_SET_CHARS[l];
                        n ? (r.append(String.fromCharCode(c.charCodeAt(0) + 128)),
                        n = !1) : r.append(c)
                    } else
                        throw new ge;
                    break;
                case 1:
                    n ? (r.append(String.fromCharCode(l + 128)),
                    n = !1) : r.append(String.fromCharCode(l)),
                    o = 0;
                    break;
                case 2:
                    if (l < this.C40_SHIFT2_SET_CHARS.length) {
                        var c = this.C40_SHIFT2_SET_CHARS[l];
                        n ? (r.append(String.fromCharCode(c.charCodeAt(0) + 128)),
                        n = !1) : r.append(c)
                    } else
                        switch (l) {
                        case 27:
                            r.append(String.fromCharCode(29));
                            break;
                        case 30:
                            n = !0;
                            break;
                        default:
                            throw new ge
                        }
                    o = 0;
                    break;
                case 3:
                    n ? (r.append(String.fromCharCode(l + 224)),
                    n = !1) : r.append(String.fromCharCode(l + 96)),
                    o = 0;
                    break;
                default:
                    throw new ge
                }
            }
        } while (e.available() > 0)
    }
    ,
    t.decodeTextSegment = function(e, r) {
        var n = !1
          , i = []
          , o = 0;
        do {
            if (e.available() === 8)
                return;
            var s = e.readBits(8);
            if (s === 254)
                return;
            this.parseTwoBytes(s, e.readBits(8), i);
            for (var a = 0; a < 3; a++) {
                var l = i[a];
                switch (o) {
                case 0:
                    if (l < 3)
                        o = l + 1;
                    else if (l < this.TEXT_BASIC_SET_CHARS.length) {
                        var c = this.TEXT_BASIC_SET_CHARS[l];
                        n ? (r.append(String.fromCharCode(c.charCodeAt(0) + 128)),
                        n = !1) : r.append(c)
                    } else
                        throw new ge;
                    break;
                case 1:
                    n ? (r.append(String.fromCharCode(l + 128)),
                    n = !1) : r.append(String.fromCharCode(l)),
                    o = 0;
                    break;
                case 2:
                    if (l < this.TEXT_SHIFT2_SET_CHARS.length) {
                        var c = this.TEXT_SHIFT2_SET_CHARS[l];
                        n ? (r.append(String.fromCharCode(c.charCodeAt(0) + 128)),
                        n = !1) : r.append(c)
                    } else
                        switch (l) {
                        case 27:
                            r.append(String.fromCharCode(29));
                            break;
                        case 30:
                            n = !0;
                            break;
                        default:
                            throw new ge
                        }
                    o = 0;
                    break;
                case 3:
                    if (l < this.TEXT_SHIFT3_SET_CHARS.length) {
                        var c = this.TEXT_SHIFT3_SET_CHARS[l];
                        n ? (r.append(String.fromCharCode(c.charCodeAt(0) + 128)),
                        n = !1) : r.append(c),
                        o = 0
                    } else
                        throw new ge;
                    break;
                default:
                    throw new ge
                }
            }
        } while (e.available() > 0)
    }
    ,
    t.decodeAnsiX12Segment = function(e, r) {
        var n = [];
        do {
            if (e.available() === 8)
                return;
            var i = e.readBits(8);
            if (i === 254)
                return;
            this.parseTwoBytes(i, e.readBits(8), n);
            for (var o = 0; o < 3; o++) {
                var s = n[o];
                switch (s) {
                case 0:
                    r.append("\r");
                    break;
                case 1:
                    r.append("*");
                    break;
                case 2:
                    r.append(">");
                    break;
                case 3:
                    r.append(" ");
                    break;
                default:
                    if (s < 14)
                        r.append(String.fromCharCode(s + 44));
                    else if (s < 40)
                        r.append(String.fromCharCode(s + 51));
                    else
                        throw new ge;
                    break
                }
            }
        } while (e.available() > 0)
    }
    ,
    t.parseTwoBytes = function(e, r, n) {
        var i = (e << 8) + r - 1
          , o = Math.floor(i / 1600);
        n[0] = o,
        i -= o * 1600,
        o = Math.floor(i / 40),
        n[1] = o,
        n[2] = i - o * 40
    }
    ,
    t.decodeEdifactSegment = function(e, r) {
        do {
            if (e.available() <= 16)
                return;
            for (var n = 0; n < 4; n++) {
                var i = e.readBits(6);
                if (i === 31) {
                    var o = 8 - e.getBitOffset();
                    o !== 8 && e.readBits(o);
                    return
                }
                i & 32 || (i |= 64),
                r.append(String.fromCharCode(i))
            }
        } while (e.available() > 0)
    }
    ,
    t.decodeBase256Segment = function(e, r, n) {
        var i = 1 + e.getByteOffset(), o = this.unrandomize255State(e.readBits(8), i++), s;
        if (o === 0 ? s = e.available() / 8 | 0 : o < 250 ? s = o : s = 250 * (o - 249) + this.unrandomize255State(e.readBits(8), i++),
        s < 0)
            throw new ge;
        for (var a = new Uint8Array(s), l = 0; l < s; l++) {
            if (e.available() < 8)
                throw new ge;
            a[l] = this.unrandomize255State(e.readBits(8), i++)
        }
        n.push(a);
        try {
            r.append(yi.decode(a, nt.ISO88591))
        } catch (c) {
            throw new Ad("Platform does not support required encoding: " + c.message)
        }
    }
    ,
    t.unrandomize255State = function(e, r) {
        var n = 149 * r % 255 + 1
          , i = e - n;
        return i >= 0 ? i : i + 256
    }
    ,
    t.C40_BASIC_SET_CHARS = ["*", "*", "*", " ", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"],
    t.C40_SHIFT2_SET_CHARS = ["!", '"', "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/", ":", ";", "<", "=", ">", "?", "@", "[", "\\", "]", "^", "_"],
    t.TEXT_BASIC_SET_CHARS = ["*", "*", "*", " ", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"],
    t.TEXT_SHIFT2_SET_CHARS = t.C40_SHIFT2_SET_CHARS,
    t.TEXT_SHIFT3_SET_CHARS = ["`", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "{", "|", "}", "~", String.fromCharCode(127)],
    t
}()
  , gCe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , mCe = function() {
    function t() {
        this.rsDecoder = new G1(Sn.DATA_MATRIX_FIELD_256)
    }
    return t.prototype.decode = function(e) {
        var r, n, i = new hCe(e), o = i.getVersion(), s = i.readCodewords(), a = xCe.getDataBlocks(s, o), l = 0;
        try {
            for (var c = gCe(a), u = c.next(); !u.done; u = c.next()) {
                var f = u.value;
                l += f.getNumDataCodewords()
            }
        } catch (p) {
            r = {
                error: p
            }
        } finally {
            try {
                u && !u.done && (n = c.return) && n.call(c)
            } finally {
                if (r)
                    throw r.error
            }
        }
        for (var d = new Uint8Array(l), h = a.length, x = 0; x < h; x++) {
            var y = a[x]
              , m = y.getCodewords()
              , E = y.getNumDataCodewords();
            this.correctErrors(m, E);
            for (var g = 0; g < E; g++)
                d[g * h + x] = m[g]
        }
        return pCe.decode(d)
    }
    ,
    t.prototype.correctErrors = function(e, r) {
        var n = new Int32Array(e);
        try {
            this.rsDecoder.decode(n, e.length - r)
        } catch {
            throw new fr
        }
        for (var i = 0; i < r; i++)
            e[i] = n[i]
    }
    ,
    t
}()
  , vCe = function() {
    function t(e) {
        this.image = e,
        this.rectangleDetector = new KE(this.image)
    }
    return t.prototype.detect = function() {
        var e = this.rectangleDetector.detect()
          , r = this.detectSolid1(e);
        if (r = this.detectSolid2(r),
        r[3] = this.correctTopRight(r),
        !r[3])
            throw new le;
        r = this.shiftToModuleCenter(r);
        var n = r[0]
          , i = r[1]
          , o = r[2]
          , s = r[3]
          , a = this.transitionsBetween(n, s) + 1
          , l = this.transitionsBetween(o, s) + 1;
        (a & 1) === 1 && (a += 1),
        (l & 1) === 1 && (l += 1),
        4 * a < 7 * l && 4 * l < 7 * a && (a = l = Math.max(a, l));
        var c = t.sampleGrid(this.image, n, i, o, s, a, l);
        return new kC(c,[n, i, o, s])
    }
    ,
    t.shiftPoint = function(e, r, n) {
        var i = (r.getX() - e.getX()) / (n + 1)
          , o = (r.getY() - e.getY()) / (n + 1);
        return new Te(e.getX() + i,e.getY() + o)
    }
    ,
    t.moveAway = function(e, r, n) {
        var i = e.getX()
          , o = e.getY();
        return i < r ? i -= 1 : i += 1,
        o < n ? o -= 1 : o += 1,
        new Te(i,o)
    }
    ,
    t.prototype.detectSolid1 = function(e) {
        var r = e[0]
          , n = e[1]
          , i = e[3]
          , o = e[2]
          , s = this.transitionsBetween(r, n)
          , a = this.transitionsBetween(n, i)
          , l = this.transitionsBetween(i, o)
          , c = this.transitionsBetween(o, r)
          , u = s
          , f = [o, r, n, i];
        return u > a && (u = a,
        f[0] = r,
        f[1] = n,
        f[2] = i,
        f[3] = o),
        u > l && (u = l,
        f[0] = n,
        f[1] = i,
        f[2] = o,
        f[3] = r),
        u > c && (f[0] = i,
        f[1] = o,
        f[2] = r,
        f[3] = n),
        f
    }
    ,
    t.prototype.detectSolid2 = function(e) {
        var r = e[0]
          , n = e[1]
          , i = e[2]
          , o = e[3]
          , s = this.transitionsBetween(r, o)
          , a = t.shiftPoint(n, i, (s + 1) * 4)
          , l = t.shiftPoint(i, n, (s + 1) * 4)
          , c = this.transitionsBetween(a, r)
          , u = this.transitionsBetween(l, o);
        return c < u ? (e[0] = r,
        e[1] = n,
        e[2] = i,
        e[3] = o) : (e[0] = n,
        e[1] = i,
        e[2] = o,
        e[3] = r),
        e
    }
    ,
    t.prototype.correctTopRight = function(e) {
        var r = e[0]
          , n = e[1]
          , i = e[2]
          , o = e[3]
          , s = this.transitionsBetween(r, o)
          , a = this.transitionsBetween(n, o)
          , l = t.shiftPoint(r, n, (a + 1) * 4)
          , c = t.shiftPoint(i, n, (s + 1) * 4);
        s = this.transitionsBetween(l, o),
        a = this.transitionsBetween(c, o);
        var u = new Te(o.getX() + (i.getX() - n.getX()) / (s + 1),o.getY() + (i.getY() - n.getY()) / (s + 1))
          , f = new Te(o.getX() + (r.getX() - n.getX()) / (a + 1),o.getY() + (r.getY() - n.getY()) / (a + 1));
        if (!this.isValid(u))
            return this.isValid(f) ? f : null;
        if (!this.isValid(f))
            return u;
        var d = this.transitionsBetween(l, u) + this.transitionsBetween(c, u)
          , h = this.transitionsBetween(l, f) + this.transitionsBetween(c, f);
        return d > h ? u : f
    }
    ,
    t.prototype.shiftToModuleCenter = function(e) {
        var r = e[0]
          , n = e[1]
          , i = e[2]
          , o = e[3]
          , s = this.transitionsBetween(r, o) + 1
          , a = this.transitionsBetween(i, o) + 1
          , l = t.shiftPoint(r, n, a * 4)
          , c = t.shiftPoint(i, n, s * 4);
        s = this.transitionsBetween(l, o) + 1,
        a = this.transitionsBetween(c, o) + 1,
        (s & 1) === 1 && (s += 1),
        (a & 1) === 1 && (a += 1);
        var u = (r.getX() + n.getX() + i.getX() + o.getX()) / 4
          , f = (r.getY() + n.getY() + i.getY() + o.getY()) / 4;
        r = t.moveAway(r, u, f),
        n = t.moveAway(n, u, f),
        i = t.moveAway(i, u, f),
        o = t.moveAway(o, u, f);
        var d, h;
        return l = t.shiftPoint(r, n, a * 4),
        l = t.shiftPoint(l, o, s * 4),
        d = t.shiftPoint(n, r, a * 4),
        d = t.shiftPoint(d, i, s * 4),
        c = t.shiftPoint(i, o, a * 4),
        c = t.shiftPoint(c, n, s * 4),
        h = t.shiftPoint(o, i, a * 4),
        h = t.shiftPoint(h, r, s * 4),
        [l, d, c, h]
    }
    ,
    t.prototype.isValid = function(e) {
        return e.getX() >= 0 && e.getX() < this.image.getWidth() && e.getY() > 0 && e.getY() < this.image.getHeight()
    }
    ,
    t.sampleGrid = function(e, r, n, i, o, s, a) {
        var l = RC.getInstance();
        return l.sampleGrid(e, s, a, .5, .5, s - .5, .5, s - .5, a - .5, .5, a - .5, r.getX(), r.getY(), o.getX(), o.getY(), i.getX(), i.getY(), n.getX(), n.getY())
    }
    ,
    t.prototype.transitionsBetween = function(e, r) {
        var n = Math.trunc(e.getX())
          , i = Math.trunc(e.getY())
          , o = Math.trunc(r.getX())
          , s = Math.trunc(r.getY())
          , a = Math.abs(s - i) > Math.abs(o - n);
        if (a) {
            var l = n;
            n = i,
            i = l,
            l = o,
            o = s,
            s = l
        }
        for (var c = Math.abs(o - n), u = Math.abs(s - i), f = -c / 2, d = i < s ? 1 : -1, h = n < o ? 1 : -1, x = 0, y = this.image.get(a ? i : n, a ? n : i), m = n, E = i; m !== o; m += h) {
            var g = this.image.get(a ? E : m, a ? m : E);
            if (g !== y && (x++,
            y = g),
            f += u,
            f > 0) {
                if (E === s)
                    break;
                E += d,
                f -= c
            }
        }
        return x
    }
    ,
    t
}()
  , sp = function() {
    function t() {
        this.decoder = new mCe
    }
    return t.prototype.decode = function(e, r) {
        r === void 0 && (r = null);
        var n, i;
        if (r != null && r.has(Pt.PURE_BARCODE)) {
            var o = t.extractPureBits(e.getBlackMatrix());
            n = this.decoder.decode(o),
            i = t.NO_POINTS
        } else {
            var s = new vCe(e.getBlackMatrix()).detect();
            n = this.decoder.decode(s.getBits()),
            i = s.getPoints()
        }
        var a = n.getRawBytes()
          , l = new nn(n.getText(),a,8 * a.length,i,ke.DATA_MATRIX,Ft.currentTimeMillis())
          , c = n.getByteSegments();
        c != null && l.putMetadata(Vr.BYTE_SEGMENTS, c);
        var u = n.getECLevel();
        return u != null && l.putMetadata(Vr.ERROR_CORRECTION_LEVEL, u),
        l
    }
    ,
    t.prototype.reset = function() {}
    ,
    t.extractPureBits = function(e) {
        var r = e.getTopLeftOnBit()
          , n = e.getBottomRightOnBit();
        if (r == null || n == null)
            throw new le;
        var i = this.moduleSize(r, e)
          , o = r[1]
          , s = n[1]
          , a = r[0]
          , l = n[0]
          , c = (l - a + 1) / i
          , u = (s - o + 1) / i;
        if (c <= 0 || u <= 0)
            throw new le;
        var f = i / 2;
        o += f,
        a += f;
        for (var d = new Do(c,u), h = 0; h < u; h++)
            for (var x = o + h * i, y = 0; y < c; y++)
                e.get(a + y * i, x) && d.set(y, h);
        return d
    }
    ,
    t.moduleSize = function(e, r) {
        for (var n = r.getWidth(), i = e[0], o = e[1]; i < n && r.get(i, o); )
            i++;
        if (i === n)
            throw new le;
        var s = i - e[0];
        if (s === 0)
            throw new le;
        return s
    }
    ,
    t.NO_POINTS = [],
    t
}()
  , yCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    yCe(e, t);
    function e(r) {
        return r === void 0 && (r = 500),
        t.call(this, new sp, r) || this
    }
    return e
}
)(Mu);
var Ic;
(function(t) {
    t[t.L = 0] = "L",
    t[t.M = 1] = "M",
    t[t.Q = 2] = "Q",
    t[t.H = 3] = "H"
}
)(Ic || (Ic = {}));
var ECe = function() {
    function t(e, r, n) {
        this.value = e,
        this.stringValue = r,
        this.bits = n,
        t.FOR_BITS.set(n, this),
        t.FOR_VALUE.set(e, this)
    }
    return t.prototype.getValue = function() {
        return this.value
    }
    ,
    t.prototype.getBits = function() {
        return this.bits
    }
    ,
    t.fromString = function(e) {
        switch (e) {
        case "L":
            return t.L;
        case "M":
            return t.M;
        case "Q":
            return t.Q;
        case "H":
            return t.H;
        default:
            throw new ir(e + "not available")
        }
    }
    ,
    t.prototype.toString = function() {
        return this.stringValue
    }
    ,
    t.prototype.equals = function(e) {
        if (!(e instanceof t))
            return !1;
        var r = e;
        return this.value === r.value
    }
    ,
    t.forBits = function(e) {
        if (e < 0 || e >= t.FOR_BITS.size)
            throw new Me;
        return t.FOR_BITS.get(e)
    }
    ,
    t.FOR_BITS = new Map,
    t.FOR_VALUE = new Map,
    t.L = new t(Ic.L,"L",1),
    t.M = new t(Ic.M,"M",0),
    t.Q = new t(Ic.Q,"Q",3),
    t.H = new t(Ic.H,"H",2),
    t
}(), _Ce = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, NM = function() {
    function t(e) {
        this.errorCorrectionLevel = ECe.forBits(e >> 3 & 3),
        this.dataMask = e & 7
    }
    return t.numBitsDiffering = function(e, r) {
        return qe.bitCount(e ^ r)
    }
    ,
    t.decodeFormatInformation = function(e, r) {
        var n = t.doDecodeFormatInformation(e, r);
        return n !== null ? n : t.doDecodeFormatInformation(e ^ t.FORMAT_INFO_MASK_QR, r ^ t.FORMAT_INFO_MASK_QR)
    }
    ,
    t.doDecodeFormatInformation = function(e, r) {
        var n, i, o = Number.MAX_SAFE_INTEGER, s = 0;
        try {
            for (var a = _Ce(t.FORMAT_INFO_DECODE_LOOKUP), l = a.next(); !l.done; l = a.next()) {
                var c = l.value
                  , u = c[0];
                if (u === e || u === r)
                    return new t(c[1]);
                var f = t.numBitsDiffering(e, u);
                f < o && (s = c[1],
                o = f),
                e !== r && (f = t.numBitsDiffering(r, u),
                f < o && (s = c[1],
                o = f))
            }
        } catch (d) {
            n = {
                error: d
            }
        } finally {
            try {
                l && !l.done && (i = a.return) && i.call(a)
            } finally {
                if (n)
                    throw n.error
            }
        }
        return o <= 3 ? new t(s) : null
    }
    ,
    t.prototype.getErrorCorrectionLevel = function() {
        return this.errorCorrectionLevel
    }
    ,
    t.prototype.getDataMask = function() {
        return this.dataMask
    }
    ,
    t.prototype.hashCode = function() {
        return this.errorCorrectionLevel.getBits() << 3 | this.dataMask
    }
    ,
    t.prototype.equals = function(e) {
        if (!(e instanceof t))
            return !1;
        var r = e;
        return this.errorCorrectionLevel === r.errorCorrectionLevel && this.dataMask === r.dataMask
    }
    ,
    t.FORMAT_INFO_MASK_QR = 21522,
    t.FORMAT_INFO_DECODE_LOOKUP = [Int32Array.from([21522, 0]), Int32Array.from([20773, 1]), Int32Array.from([24188, 2]), Int32Array.from([23371, 3]), Int32Array.from([17913, 4]), Int32Array.from([16590, 5]), Int32Array.from([20375, 6]), Int32Array.from([19104, 7]), Int32Array.from([30660, 8]), Int32Array.from([29427, 9]), Int32Array.from([32170, 10]), Int32Array.from([30877, 11]), Int32Array.from([26159, 12]), Int32Array.from([25368, 13]), Int32Array.from([27713, 14]), Int32Array.from([26998, 15]), Int32Array.from([5769, 16]), Int32Array.from([5054, 17]), Int32Array.from([7399, 18]), Int32Array.from([6608, 19]), Int32Array.from([1890, 20]), Int32Array.from([597, 21]), Int32Array.from([3340, 22]), Int32Array.from([2107, 23]), Int32Array.from([13663, 24]), Int32Array.from([12392, 25]), Int32Array.from([16177, 26]), Int32Array.from([14854, 27]), Int32Array.from([9396, 28]), Int32Array.from([8579, 29]), Int32Array.from([11994, 30]), Int32Array.from([11245, 31])],
    t
}(), bCe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, J = function() {
    function t(e) {
        for (var r = [], n = 1; n < arguments.length; n++)
            r[n - 1] = arguments[n];
        this.ecCodewordsPerBlock = e,
        this.ecBlocks = r
    }
    return t.prototype.getECCodewordsPerBlock = function() {
        return this.ecCodewordsPerBlock
    }
    ,
    t.prototype.getNumBlocks = function() {
        var e, r, n = 0, i = this.ecBlocks;
        try {
            for (var o = bCe(i), s = o.next(); !s.done; s = o.next()) {
                var a = s.value;
                n += a.getCount()
            }
        } catch (l) {
            e = {
                error: l
            }
        } finally {
            try {
                s && !s.done && (r = o.return) && r.call(o)
            } finally {
                if (e)
                    throw e.error
            }
        }
        return n
    }
    ,
    t.prototype.getTotalECCodewords = function() {
        return this.ecCodewordsPerBlock * this.getNumBlocks()
    }
    ,
    t.prototype.getECBlocks = function() {
        return this.ecBlocks
    }
    ,
    t
}(), M = function() {
    function t(e, r) {
        this.count = e,
        this.dataCodewords = r
    }
    return t.prototype.getCount = function() {
        return this.count
    }
    ,
    t.prototype.getDataCodewords = function() {
        return this.dataCodewords
    }
    ,
    t
}(), CCe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, xl = function() {
    function t(e, r) {
        for (var n, i, o = [], s = 2; s < arguments.length; s++)
            o[s - 2] = arguments[s];
        this.versionNumber = e,
        this.alignmentPatternCenters = r,
        this.ecBlocks = o;
        var a = 0
          , l = o[0].getECCodewordsPerBlock()
          , c = o[0].getECBlocks();
        try {
            for (var u = CCe(c), f = u.next(); !f.done; f = u.next()) {
                var d = f.value;
                a += d.getCount() * (d.getDataCodewords() + l)
            }
        } catch (h) {
            n = {
                error: h
            }
        } finally {
            try {
                f && !f.done && (i = u.return) && i.call(u)
            } finally {
                if (n)
                    throw n.error
            }
        }
        this.totalCodewords = a
    }
    return t.prototype.getVersionNumber = function() {
        return this.versionNumber
    }
    ,
    t.prototype.getAlignmentPatternCenters = function() {
        return this.alignmentPatternCenters
    }
    ,
    t.prototype.getTotalCodewords = function() {
        return this.totalCodewords
    }
    ,
    t.prototype.getDimensionForVersion = function() {
        return 17 + 4 * this.versionNumber
    }
    ,
    t.prototype.getECBlocksForLevel = function(e) {
        return this.ecBlocks[e.getValue()]
    }
    ,
    t.getProvisionalVersionForDimension = function(e) {
        if (e % 4 !== 1)
            throw new ge;
        try {
            return this.getVersionForNumber((e - 17) / 4)
        } catch {
            throw new ge
        }
    }
    ,
    t.getVersionForNumber = function(e) {
        if (e < 1 || e > 40)
            throw new Me;
        return t.VERSIONS[e - 1]
    }
    ,
    t.decodeVersionInformation = function(e) {
        for (var r = Number.MAX_SAFE_INTEGER, n = 0, i = 0; i < t.VERSION_DECODE_INFO.length; i++) {
            var o = t.VERSION_DECODE_INFO[i];
            if (o === e)
                return t.getVersionForNumber(i + 7);
            var s = NM.numBitsDiffering(e, o);
            s < r && (n = i + 7,
            r = s)
        }
        return r <= 3 ? t.getVersionForNumber(n) : null
    }
    ,
    t.prototype.buildFunctionPattern = function() {
        var e = this.getDimensionForVersion()
          , r = new Do(e);
        r.setRegion(0, 0, 9, 9),
        r.setRegion(e - 8, 0, 8, 9),
        r.setRegion(0, e - 8, 9, 8);
        for (var n = this.alignmentPatternCenters.length, i = 0; i < n; i++)
            for (var o = this.alignmentPatternCenters[i] - 2, s = 0; s < n; s++)
                i === 0 && (s === 0 || s === n - 1) || i === n - 1 && s === 0 || r.setRegion(this.alignmentPatternCenters[s] - 2, o, 5, 5);
        return r.setRegion(6, 9, 1, e - 17),
        r.setRegion(9, 6, e - 17, 1),
        this.versionNumber > 6 && (r.setRegion(e - 11, 0, 3, 6),
        r.setRegion(0, e - 11, 6, 3)),
        r
    }
    ,
    t.prototype.toString = function() {
        return "" + this.versionNumber
    }
    ,
    t.VERSION_DECODE_INFO = Int32Array.from([31892, 34236, 39577, 42195, 48118, 51042, 55367, 58893, 63784, 68472, 70749, 76311, 79154, 84390, 87683, 92361, 96236, 102084, 102881, 110507, 110734, 117786, 119615, 126325, 127568, 133589, 136944, 141498, 145311, 150283, 152622, 158308, 161089, 167017]),
    t.VERSIONS = [new t(1,new Int32Array(0),new J(7,new M(1,19)),new J(10,new M(1,16)),new J(13,new M(1,13)),new J(17,new M(1,9))), new t(2,Int32Array.from([6, 18]),new J(10,new M(1,34)),new J(16,new M(1,28)),new J(22,new M(1,22)),new J(28,new M(1,16))), new t(3,Int32Array.from([6, 22]),new J(15,new M(1,55)),new J(26,new M(1,44)),new J(18,new M(2,17)),new J(22,new M(2,13))), new t(4,Int32Array.from([6, 26]),new J(20,new M(1,80)),new J(18,new M(2,32)),new J(26,new M(2,24)),new J(16,new M(4,9))), new t(5,Int32Array.from([6, 30]),new J(26,new M(1,108)),new J(24,new M(2,43)),new J(18,new M(2,15),new M(2,16)),new J(22,new M(2,11),new M(2,12))), new t(6,Int32Array.from([6, 34]),new J(18,new M(2,68)),new J(16,new M(4,27)),new J(24,new M(4,19)),new J(28,new M(4,15))), new t(7,Int32Array.from([6, 22, 38]),new J(20,new M(2,78)),new J(18,new M(4,31)),new J(18,new M(2,14),new M(4,15)),new J(26,new M(4,13),new M(1,14))), new t(8,Int32Array.from([6, 24, 42]),new J(24,new M(2,97)),new J(22,new M(2,38),new M(2,39)),new J(22,new M(4,18),new M(2,19)),new J(26,new M(4,14),new M(2,15))), new t(9,Int32Array.from([6, 26, 46]),new J(30,new M(2,116)),new J(22,new M(3,36),new M(2,37)),new J(20,new M(4,16),new M(4,17)),new J(24,new M(4,12),new M(4,13))), new t(10,Int32Array.from([6, 28, 50]),new J(18,new M(2,68),new M(2,69)),new J(26,new M(4,43),new M(1,44)),new J(24,new M(6,19),new M(2,20)),new J(28,new M(6,15),new M(2,16))), new t(11,Int32Array.from([6, 30, 54]),new J(20,new M(4,81)),new J(30,new M(1,50),new M(4,51)),new J(28,new M(4,22),new M(4,23)),new J(24,new M(3,12),new M(8,13))), new t(12,Int32Array.from([6, 32, 58]),new J(24,new M(2,92),new M(2,93)),new J(22,new M(6,36),new M(2,37)),new J(26,new M(4,20),new M(6,21)),new J(28,new M(7,14),new M(4,15))), new t(13,Int32Array.from([6, 34, 62]),new J(26,new M(4,107)),new J(22,new M(8,37),new M(1,38)),new J(24,new M(8,20),new M(4,21)),new J(22,new M(12,11),new M(4,12))), new t(14,Int32Array.from([6, 26, 46, 66]),new J(30,new M(3,115),new M(1,116)),new J(24,new M(4,40),new M(5,41)),new J(20,new M(11,16),new M(5,17)),new J(24,new M(11,12),new M(5,13))), new t(15,Int32Array.from([6, 26, 48, 70]),new J(22,new M(5,87),new M(1,88)),new J(24,new M(5,41),new M(5,42)),new J(30,new M(5,24),new M(7,25)),new J(24,new M(11,12),new M(7,13))), new t(16,Int32Array.from([6, 26, 50, 74]),new J(24,new M(5,98),new M(1,99)),new J(28,new M(7,45),new M(3,46)),new J(24,new M(15,19),new M(2,20)),new J(30,new M(3,15),new M(13,16))), new t(17,Int32Array.from([6, 30, 54, 78]),new J(28,new M(1,107),new M(5,108)),new J(28,new M(10,46),new M(1,47)),new J(28,new M(1,22),new M(15,23)),new J(28,new M(2,14),new M(17,15))), new t(18,Int32Array.from([6, 30, 56, 82]),new J(30,new M(5,120),new M(1,121)),new J(26,new M(9,43),new M(4,44)),new J(28,new M(17,22),new M(1,23)),new J(28,new M(2,14),new M(19,15))), new t(19,Int32Array.from([6, 30, 58, 86]),new J(28,new M(3,113),new M(4,114)),new J(26,new M(3,44),new M(11,45)),new J(26,new M(17,21),new M(4,22)),new J(26,new M(9,13),new M(16,14))), new t(20,Int32Array.from([6, 34, 62, 90]),new J(28,new M(3,107),new M(5,108)),new J(26,new M(3,41),new M(13,42)),new J(30,new M(15,24),new M(5,25)),new J(28,new M(15,15),new M(10,16))), new t(21,Int32Array.from([6, 28, 50, 72, 94]),new J(28,new M(4,116),new M(4,117)),new J(26,new M(17,42)),new J(28,new M(17,22),new M(6,23)),new J(30,new M(19,16),new M(6,17))), new t(22,Int32Array.from([6, 26, 50, 74, 98]),new J(28,new M(2,111),new M(7,112)),new J(28,new M(17,46)),new J(30,new M(7,24),new M(16,25)),new J(24,new M(34,13))), new t(23,Int32Array.from([6, 30, 54, 78, 102]),new J(30,new M(4,121),new M(5,122)),new J(28,new M(4,47),new M(14,48)),new J(30,new M(11,24),new M(14,25)),new J(30,new M(16,15),new M(14,16))), new t(24,Int32Array.from([6, 28, 54, 80, 106]),new J(30,new M(6,117),new M(4,118)),new J(28,new M(6,45),new M(14,46)),new J(30,new M(11,24),new M(16,25)),new J(30,new M(30,16),new M(2,17))), new t(25,Int32Array.from([6, 32, 58, 84, 110]),new J(26,new M(8,106),new M(4,107)),new J(28,new M(8,47),new M(13,48)),new J(30,new M(7,24),new M(22,25)),new J(30,new M(22,15),new M(13,16))), new t(26,Int32Array.from([6, 30, 58, 86, 114]),new J(28,new M(10,114),new M(2,115)),new J(28,new M(19,46),new M(4,47)),new J(28,new M(28,22),new M(6,23)),new J(30,new M(33,16),new M(4,17))), new t(27,Int32Array.from([6, 34, 62, 90, 118]),new J(30,new M(8,122),new M(4,123)),new J(28,new M(22,45),new M(3,46)),new J(30,new M(8,23),new M(26,24)),new J(30,new M(12,15),new M(28,16))), new t(28,Int32Array.from([6, 26, 50, 74, 98, 122]),new J(30,new M(3,117),new M(10,118)),new J(28,new M(3,45),new M(23,46)),new J(30,new M(4,24),new M(31,25)),new J(30,new M(11,15),new M(31,16))), new t(29,Int32Array.from([6, 30, 54, 78, 102, 126]),new J(30,new M(7,116),new M(7,117)),new J(28,new M(21,45),new M(7,46)),new J(30,new M(1,23),new M(37,24)),new J(30,new M(19,15),new M(26,16))), new t(30,Int32Array.from([6, 26, 52, 78, 104, 130]),new J(30,new M(5,115),new M(10,116)),new J(28,new M(19,47),new M(10,48)),new J(30,new M(15,24),new M(25,25)),new J(30,new M(23,15),new M(25,16))), new t(31,Int32Array.from([6, 30, 56, 82, 108, 134]),new J(30,new M(13,115),new M(3,116)),new J(28,new M(2,46),new M(29,47)),new J(30,new M(42,24),new M(1,25)),new J(30,new M(23,15),new M(28,16))), new t(32,Int32Array.from([6, 34, 60, 86, 112, 138]),new J(30,new M(17,115)),new J(28,new M(10,46),new M(23,47)),new J(30,new M(10,24),new M(35,25)),new J(30,new M(19,15),new M(35,16))), new t(33,Int32Array.from([6, 30, 58, 86, 114, 142]),new J(30,new M(17,115),new M(1,116)),new J(28,new M(14,46),new M(21,47)),new J(30,new M(29,24),new M(19,25)),new J(30,new M(11,15),new M(46,16))), new t(34,Int32Array.from([6, 34, 62, 90, 118, 146]),new J(30,new M(13,115),new M(6,116)),new J(28,new M(14,46),new M(23,47)),new J(30,new M(44,24),new M(7,25)),new J(30,new M(59,16),new M(1,17))), new t(35,Int32Array.from([6, 30, 54, 78, 102, 126, 150]),new J(30,new M(12,121),new M(7,122)),new J(28,new M(12,47),new M(26,48)),new J(30,new M(39,24),new M(14,25)),new J(30,new M(22,15),new M(41,16))), new t(36,Int32Array.from([6, 24, 50, 76, 102, 128, 154]),new J(30,new M(6,121),new M(14,122)),new J(28,new M(6,47),new M(34,48)),new J(30,new M(46,24),new M(10,25)),new J(30,new M(2,15),new M(64,16))), new t(37,Int32Array.from([6, 28, 54, 80, 106, 132, 158]),new J(30,new M(17,122),new M(4,123)),new J(28,new M(29,46),new M(14,47)),new J(30,new M(49,24),new M(10,25)),new J(30,new M(24,15),new M(46,16))), new t(38,Int32Array.from([6, 32, 58, 84, 110, 136, 162]),new J(30,new M(4,122),new M(18,123)),new J(28,new M(13,46),new M(32,47)),new J(30,new M(48,24),new M(14,25)),new J(30,new M(42,15),new M(32,16))), new t(39,Int32Array.from([6, 26, 54, 82, 110, 138, 166]),new J(30,new M(20,117),new M(4,118)),new J(28,new M(40,47),new M(7,48)),new J(30,new M(43,24),new M(22,25)),new J(30,new M(10,15),new M(67,16))), new t(40,Int32Array.from([6, 30, 58, 86, 114, 142, 170]),new J(30,new M(19,118),new M(6,119)),new J(28,new M(18,47),new M(31,48)),new J(30,new M(34,24),new M(34,25)),new J(30,new M(20,15),new M(61,16)))],
    t
}(), Tr;
(function(t) {
    t[t.DATA_MASK_000 = 0] = "DATA_MASK_000",
    t[t.DATA_MASK_001 = 1] = "DATA_MASK_001",
    t[t.DATA_MASK_010 = 2] = "DATA_MASK_010",
    t[t.DATA_MASK_011 = 3] = "DATA_MASK_011",
    t[t.DATA_MASK_100 = 4] = "DATA_MASK_100",
    t[t.DATA_MASK_101 = 5] = "DATA_MASK_101",
    t[t.DATA_MASK_110 = 6] = "DATA_MASK_110",
    t[t.DATA_MASK_111 = 7] = "DATA_MASK_111"
}
)(Tr || (Tr = {}));
var _6 = function() {
    function t(e, r) {
        this.value = e,
        this.isMasked = r
    }
    return t.prototype.unmaskBitMatrix = function(e, r) {
        for (var n = 0; n < r; n++)
            for (var i = 0; i < r; i++)
                this.isMasked(n, i) && e.flip(i, n)
    }
    ,
    t.values = new Map([[Tr.DATA_MASK_000, new t(Tr.DATA_MASK_000,function(e, r) {
        return (e + r & 1) === 0
    }
    )], [Tr.DATA_MASK_001, new t(Tr.DATA_MASK_001,function(e, r) {
        return (e & 1) === 0
    }
    )], [Tr.DATA_MASK_010, new t(Tr.DATA_MASK_010,function(e, r) {
        return r % 3 === 0
    }
    )], [Tr.DATA_MASK_011, new t(Tr.DATA_MASK_011,function(e, r) {
        return (e + r) % 3 === 0
    }
    )], [Tr.DATA_MASK_100, new t(Tr.DATA_MASK_100,function(e, r) {
        return (Math.floor(e / 2) + Math.floor(r / 3) & 1) === 0
    }
    )], [Tr.DATA_MASK_101, new t(Tr.DATA_MASK_101,function(e, r) {
        return e * r % 6 === 0
    }
    )], [Tr.DATA_MASK_110, new t(Tr.DATA_MASK_110,function(e, r) {
        return e * r % 6 < 3
    }
    )], [Tr.DATA_MASK_111, new t(Tr.DATA_MASK_111,function(e, r) {
        return (e + r + e * r % 3 & 1) === 0
    }
    )]]),
    t
}(), ACe = function() {
    function t(e) {
        var r = e.getHeight();
        if (r < 21 || (r & 3) !== 1)
            throw new ge;
        this.bitMatrix = e
    }
    return t.prototype.readFormatInformation = function() {
        if (this.parsedFormatInfo !== null && this.parsedFormatInfo !== void 0)
            return this.parsedFormatInfo;
        for (var e = 0, r = 0; r < 6; r++)
            e = this.copyBit(r, 8, e);
        e = this.copyBit(7, 8, e),
        e = this.copyBit(8, 8, e),
        e = this.copyBit(8, 7, e);
        for (var n = 5; n >= 0; n--)
            e = this.copyBit(8, n, e);
        for (var i = this.bitMatrix.getHeight(), o = 0, s = i - 7, n = i - 1; n >= s; n--)
            o = this.copyBit(8, n, o);
        for (var r = i - 8; r < i; r++)
            o = this.copyBit(r, 8, o);
        if (this.parsedFormatInfo = NM.decodeFormatInformation(e, o),
        this.parsedFormatInfo !== null)
            return this.parsedFormatInfo;
        throw new ge
    }
    ,
    t.prototype.readVersion = function() {
        if (this.parsedVersion !== null && this.parsedVersion !== void 0)
            return this.parsedVersion;
        var e = this.bitMatrix.getHeight()
          , r = Math.floor((e - 17) / 4);
        if (r <= 6)
            return xl.getVersionForNumber(r);
        for (var n = 0, i = e - 11, o = 5; o >= 0; o--)
            for (var s = e - 9; s >= i; s--)
                n = this.copyBit(s, o, n);
        var a = xl.decodeVersionInformation(n);
        if (a !== null && a.getDimensionForVersion() === e)
            return this.parsedVersion = a,
            a;
        n = 0;
        for (var s = 5; s >= 0; s--)
            for (var o = e - 9; o >= i; o--)
                n = this.copyBit(s, o, n);
        if (a = xl.decodeVersionInformation(n),
        a !== null && a.getDimensionForVersion() === e)
            return this.parsedVersion = a,
            a;
        throw new ge
    }
    ,
    t.prototype.copyBit = function(e, r, n) {
        var i = this.isMirror ? this.bitMatrix.get(r, e) : this.bitMatrix.get(e, r);
        return i ? n << 1 | 1 : n << 1
    }
    ,
    t.prototype.readCodewords = function() {
        var e = this.readFormatInformation()
          , r = this.readVersion()
          , n = _6.values.get(e.getDataMask())
          , i = this.bitMatrix.getHeight();
        n.unmaskBitMatrix(this.bitMatrix, i);
        for (var o = r.buildFunctionPattern(), s = !0, a = new Uint8Array(r.getTotalCodewords()), l = 0, c = 0, u = 0, f = i - 1; f > 0; f -= 2) {
            f === 6 && f--;
            for (var d = 0; d < i; d++)
                for (var h = s ? i - 1 - d : d, x = 0; x < 2; x++)
                    o.get(f - x, h) || (u++,
                    c <<= 1,
                    this.bitMatrix.get(f - x, h) && (c |= 1),
                    u === 8 && (a[l++] = c,
                    u = 0,
                    c = 0));
            s = !s
        }
        if (l !== r.getTotalCodewords())
            throw new ge;
        return a
    }
    ,
    t.prototype.remask = function() {
        if (this.parsedFormatInfo !== null) {
            var e = _6.values.get(this.parsedFormatInfo.getDataMask())
              , r = this.bitMatrix.getHeight();
            e.unmaskBitMatrix(this.bitMatrix, r)
        }
    }
    ,
    t.prototype.setMirror = function(e) {
        this.parsedVersion = null,
        this.parsedFormatInfo = null,
        this.isMirror = e
    }
    ,
    t.prototype.mirror = function() {
        for (var e = this.bitMatrix, r = 0, n = e.getWidth(); r < n; r++)
            for (var i = r + 1, o = e.getHeight(); i < o; i++)
                e.get(r, i) !== e.get(i, r) && (e.flip(i, r),
                e.flip(r, i))
    }
    ,
    t
}(), b6 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, wCe = function() {
    function t(e, r) {
        this.numDataCodewords = e,
        this.codewords = r
    }
    return t.getDataBlocks = function(e, r, n) {
        var i, o, s, a;
        if (e.length !== r.getTotalCodewords())
            throw new Me;
        var l = r.getECBlocksForLevel(n)
          , c = 0
          , u = l.getECBlocks();
        try {
            for (var f = b6(u), d = f.next(); !d.done; d = f.next()) {
                var h = d.value;
                c += h.getCount()
            }
        } catch (D) {
            i = {
                error: D
            }
        } finally {
            try {
                d && !d.done && (o = f.return) && o.call(f)
            } finally {
                if (i)
                    throw i.error
            }
        }
        var x = new Array(c)
          , y = 0;
        try {
            for (var m = b6(u), E = m.next(); !E.done; E = m.next())
                for (var h = E.value, g = 0; g < h.getCount(); g++) {
                    var p = h.getDataCodewords()
                      , v = l.getECCodewordsPerBlock() + p;
                    x[y++] = new t(p,new Uint8Array(v))
                }
        } catch (D) {
            s = {
                error: D
            }
        } finally {
            try {
                E && !E.done && (a = m.return) && a.call(m)
            } finally {
                if (s)
                    throw s.error
            }
        }
        for (var _ = x[0].codewords.length, b = x.length - 1; b >= 0; ) {
            var C = x[b].codewords.length;
            if (C === _)
                break;
            b--
        }
        b++;
        for (var w = _ - l.getECCodewordsPerBlock(), T = 0, g = 0; g < w; g++)
            for (var A = 0; A < y; A++)
                x[A].codewords[g] = e[T++];
        for (var A = b; A < y; A++)
            x[A].codewords[w] = e[T++];
        for (var B = x[0].codewords.length, g = w; g < B; g++)
            for (var A = 0; A < y; A++) {
                var S = A < b ? g : g + 1;
                x[A].codewords[S] = e[T++]
            }
        return x
    }
    ,
    t.prototype.getNumDataCodewords = function() {
        return this.numDataCodewords
    }
    ,
    t.prototype.getCodewords = function() {
        return this.codewords
    }
    ,
    t
}(), si;
(function(t) {
    t[t.TERMINATOR = 0] = "TERMINATOR",
    t[t.NUMERIC = 1] = "NUMERIC",
    t[t.ALPHANUMERIC = 2] = "ALPHANUMERIC",
    t[t.STRUCTURED_APPEND = 3] = "STRUCTURED_APPEND",
    t[t.BYTE = 4] = "BYTE",
    t[t.ECI = 5] = "ECI",
    t[t.KANJI = 6] = "KANJI",
    t[t.FNC1_FIRST_POSITION = 7] = "FNC1_FIRST_POSITION",
    t[t.FNC1_SECOND_POSITION = 8] = "FNC1_SECOND_POSITION",
    t[t.HANZI = 9] = "HANZI"
}
)(si || (si = {}));
var Mt = function() {
    function t(e, r, n, i) {
        this.value = e,
        this.stringValue = r,
        this.characterCountBitsForVersions = n,
        this.bits = i,
        t.FOR_BITS.set(i, this),
        t.FOR_VALUE.set(e, this)
    }
    return t.forBits = function(e) {
        var r = t.FOR_BITS.get(e);
        if (r === void 0)
            throw new Me;
        return r
    }
    ,
    t.prototype.getCharacterCountBits = function(e) {
        var r = e.getVersionNumber(), n;
        return r <= 9 ? n = 0 : r <= 26 ? n = 1 : n = 2,
        this.characterCountBitsForVersions[n]
    }
    ,
    t.prototype.getValue = function() {
        return this.value
    }
    ,
    t.prototype.getBits = function() {
        return this.bits
    }
    ,
    t.prototype.equals = function(e) {
        if (!(e instanceof t))
            return !1;
        var r = e;
        return this.value === r.value
    }
    ,
    t.prototype.toString = function() {
        return this.stringValue
    }
    ,
    t.FOR_BITS = new Map,
    t.FOR_VALUE = new Map,
    t.TERMINATOR = new t(si.TERMINATOR,"TERMINATOR",Int32Array.from([0, 0, 0]),0),
    t.NUMERIC = new t(si.NUMERIC,"NUMERIC",Int32Array.from([10, 12, 14]),1),
    t.ALPHANUMERIC = new t(si.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9, 11, 13]),2),
    t.STRUCTURED_APPEND = new t(si.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0, 0, 0]),3),
    t.BYTE = new t(si.BYTE,"BYTE",Int32Array.from([8, 16, 16]),4),
    t.ECI = new t(si.ECI,"ECI",Int32Array.from([0, 0, 0]),7),
    t.KANJI = new t(si.KANJI,"KANJI",Int32Array.from([8, 10, 12]),8),
    t.FNC1_FIRST_POSITION = new t(si.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0, 0, 0]),5),
    t.FNC1_SECOND_POSITION = new t(si.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0, 0, 0]),9),
    t.HANZI = new t(si.HANZI,"HANZI",Int32Array.from([8, 10, 12]),13),
    t
}()
  , BCe = function() {
    function t() {}
    return t.decode = function(e, r, n, i) {
        var o = new MM(e)
          , s = new Ke
          , a = new Array
          , l = -1
          , c = -1;
        try {
            var u = null
              , f = !1
              , d = void 0;
            do {
                if (o.available() < 4)
                    d = Mt.TERMINATOR;
                else {
                    var h = o.readBits(4);
                    d = Mt.forBits(h)
                }
                switch (d) {
                case Mt.TERMINATOR:
                    break;
                case Mt.FNC1_FIRST_POSITION:
                case Mt.FNC1_SECOND_POSITION:
                    f = !0;
                    break;
                case Mt.STRUCTURED_APPEND:
                    if (o.available() < 16)
                        throw new ge;
                    l = o.readBits(8),
                    c = o.readBits(8);
                    break;
                case Mt.ECI:
                    var x = t.parseECIValue(o);
                    if (u = _r.getCharacterSetECIByValue(x),
                    u === null)
                        throw new ge;
                    break;
                case Mt.HANZI:
                    var y = o.readBits(4)
                      , m = o.readBits(d.getCharacterCountBits(r));
                    y === t.GB2312_SUBSET && t.decodeHanziSegment(o, s, m);
                    break;
                default:
                    var E = o.readBits(d.getCharacterCountBits(r));
                    switch (d) {
                    case Mt.NUMERIC:
                        t.decodeNumericSegment(o, s, E);
                        break;
                    case Mt.ALPHANUMERIC:
                        t.decodeAlphanumericSegment(o, s, E, f);
                        break;
                    case Mt.BYTE:
                        t.decodeByteSegment(o, s, E, u, a, i);
                        break;
                    case Mt.KANJI:
                        t.decodeKanjiSegment(o, s, E);
                        break;
                    default:
                        throw new ge
                    }
                    break
                }
            } while (d !== Mt.TERMINATOR)
        } catch {
            throw new ge
        }
        return new U1(e,s.toString(),a.length === 0 ? null : a,n === null ? null : n.toString(),l,c)
    }
    ,
    t.decodeHanziSegment = function(e, r, n) {
        if (n * 13 > e.available())
            throw new ge;
        for (var i = new Uint8Array(2 * n), o = 0; n > 0; ) {
            var s = e.readBits(13)
              , a = s / 96 << 8 & 4294967295 | s % 96;
            a < 959 ? a += 41377 : a += 42657,
            i[o] = a >> 8 & 255,
            i[o + 1] = a & 255,
            o += 2,
            n--
        }
        try {
            r.append(yi.decode(i, nt.GB2312))
        } catch (l) {
            throw new ge(l)
        }
    }
    ,
    t.decodeKanjiSegment = function(e, r, n) {
        if (n * 13 > e.available())
            throw new ge;
        for (var i = new Uint8Array(2 * n), o = 0; n > 0; ) {
            var s = e.readBits(13)
              , a = s / 192 << 8 & 4294967295 | s % 192;
            a < 7936 ? a += 33088 : a += 49472,
            i[o] = a >> 8,
            i[o + 1] = a,
            o += 2,
            n--
        }
        try {
            r.append(yi.decode(i, nt.SHIFT_JIS))
        } catch (l) {
            throw new ge(l)
        }
    }
    ,
    t.decodeByteSegment = function(e, r, n, i, o, s) {
        if (8 * n > e.available())
            throw new ge;
        for (var a = new Uint8Array(n), l = 0; l < n; l++)
            a[l] = e.readBits(8);
        var c;
        i === null ? c = nt.guessEncoding(a, s) : c = i.getName();
        try {
            r.append(yi.decode(a, c))
        } catch (u) {
            throw new ge(u)
        }
        o.push(a)
    }
    ,
    t.toAlphaNumericChar = function(e) {
        if (e >= t.ALPHANUMERIC_CHARS.length)
            throw new ge;
        return t.ALPHANUMERIC_CHARS[e]
    }
    ,
    t.decodeAlphanumericSegment = function(e, r, n, i) {
        for (var o = r.length(); n > 1; ) {
            if (e.available() < 11)
                throw new ge;
            var s = e.readBits(11);
            r.append(t.toAlphaNumericChar(Math.floor(s / 45))),
            r.append(t.toAlphaNumericChar(s % 45)),
            n -= 2
        }
        if (n === 1) {
            if (e.available() < 6)
                throw new ge;
            r.append(t.toAlphaNumericChar(e.readBits(6)))
        }
        if (i)
            for (var a = o; a < r.length(); a++)
                r.charAt(a) === "%" && (a < r.length() - 1 && r.charAt(a + 1) === "%" ? r.deleteCharAt(a + 1) : r.setCharAt(a, String.fromCharCode(29)))
    }
    ,
    t.decodeNumericSegment = function(e, r, n) {
        for (; n >= 3; ) {
            if (e.available() < 10)
                throw new ge;
            var i = e.readBits(10);
            if (i >= 1e3)
                throw new ge;
            r.append(t.toAlphaNumericChar(Math.floor(i / 100))),
            r.append(t.toAlphaNumericChar(Math.floor(i / 10) % 10)),
            r.append(t.toAlphaNumericChar(i % 10)),
            n -= 3
        }
        if (n === 2) {
            if (e.available() < 7)
                throw new ge;
            var o = e.readBits(7);
            if (o >= 100)
                throw new ge;
            r.append(t.toAlphaNumericChar(Math.floor(o / 10))),
            r.append(t.toAlphaNumericChar(o % 10))
        } else if (n === 1) {
            if (e.available() < 4)
                throw new ge;
            var s = e.readBits(4);
            if (s >= 10)
                throw new ge;
            r.append(t.toAlphaNumericChar(s))
        }
    }
    ,
    t.parseECIValue = function(e) {
        var r = e.readBits(8);
        if (!(r & 128))
            return r & 127;
        if ((r & 192) === 128) {
            var n = e.readBits(8);
            return (r & 63) << 8 & 4294967295 | n
        }
        if ((r & 224) === 192) {
            var i = e.readBits(16);
            return (r & 31) << 16 & 4294967295 | i
        }
        throw new ge
    }
    ,
    t.ALPHANUMERIC_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",
    t.GB2312_SUBSET = 1,
    t
}()
  , LM = function() {
    function t(e) {
        this.mirrored = e
    }
    return t.prototype.isMirrored = function() {
        return this.mirrored
    }
    ,
    t.prototype.applyMirroredCorrection = function(e) {
        if (!(!this.mirrored || e === null || e.length < 3)) {
            var r = e[0];
            e[0] = e[2],
            e[2] = r
        }
    }
    ,
    t
}()
  , C6 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , SCe = function() {
    function t() {
        this.rsDecoder = new G1(Sn.QR_CODE_FIELD_256)
    }
    return t.prototype.decodeBooleanArray = function(e, r) {
        return this.decodeBitMatrix(Do.parseFromBooleanArray(e), r)
    }
    ,
    t.prototype.decodeBitMatrix = function(e, r) {
        var n = new ACe(e)
          , i = null;
        try {
            return this.decodeBitMatrixParser(n, r)
        } catch (s) {
            i = s
        }
        try {
            n.remask(),
            n.setMirror(!0),
            n.readVersion(),
            n.readFormatInformation(),
            n.mirror();
            var o = this.decodeBitMatrixParser(n, r);
            return o.setOther(new LM(!0)),
            o
        } catch (s) {
            throw i !== null ? i : s
        }
    }
    ,
    t.prototype.decodeBitMatrixParser = function(e, r) {
        var n, i, o, s, a = e.readVersion(), l = e.readFormatInformation().getErrorCorrectionLevel(), c = e.readCodewords(), u = wCe.getDataBlocks(c, a, l), f = 0;
        try {
            for (var d = C6(u), h = d.next(); !h.done; h = d.next()) {
                var x = h.value;
                f += x.getNumDataCodewords()
            }
        } catch (b) {
            n = {
                error: b
            }
        } finally {
            try {
                h && !h.done && (i = d.return) && i.call(d)
            } finally {
                if (n)
                    throw n.error
            }
        }
        var y = new Uint8Array(f)
          , m = 0;
        try {
            for (var E = C6(u), g = E.next(); !g.done; g = E.next()) {
                var x = g.value
                  , p = x.getCodewords()
                  , v = x.getNumDataCodewords();
                this.correctErrors(p, v);
                for (var _ = 0; _ < v; _++)
                    y[m++] = p[_]
            }
        } catch (b) {
            o = {
                error: b
            }
        } finally {
            try {
                g && !g.done && (s = E.return) && s.call(E)
            } finally {
                if (o)
                    throw o.error
            }
        }
        return BCe.decode(y, a, l, r)
    }
    ,
    t.prototype.correctErrors = function(e, r) {
        var n = new Int32Array(e);
        try {
            this.rsDecoder.decode(n, e.length - r)
        } catch {
            throw new fr
        }
        for (var i = 0; i < r; i++)
            e[i] = n[i]
    }
    ,
    t
}()
  , TCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , DCe = function(t) {
    TCe(e, t);
    function e(r, n, i) {
        var o = t.call(this, r, n) || this;
        return o.estimatedModuleSize = i,
        o
    }
    return e.prototype.aboutEquals = function(r, n, i) {
        if (Math.abs(n - this.getY()) <= r && Math.abs(i - this.getX()) <= r) {
            var o = Math.abs(r - this.estimatedModuleSize);
            return o <= 1 || o <= this.estimatedModuleSize
        }
        return !1
    }
    ,
    e.prototype.combineEstimate = function(r, n, i) {
        var o = (this.getX() + n) / 2
          , s = (this.getY() + r) / 2
          , a = (this.estimatedModuleSize + i) / 2;
        return new e(o,s,a)
    }
    ,
    e
}(Te)
  , FCe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , PCe = function() {
    function t(e, r, n, i, o, s, a) {
        this.image = e,
        this.startX = r,
        this.startY = n,
        this.width = i,
        this.height = o,
        this.moduleSize = s,
        this.resultPointCallback = a,
        this.possibleCenters = [],
        this.crossCheckStateCount = new Int32Array(3)
    }
    return t.prototype.find = function() {
        for (var e = this.startX, r = this.height, n = this.width, i = e + n, o = this.startY + r / 2, s = new Int32Array(3), a = this.image, l = 0; l < r; l++) {
            var c = o + (l & 1 ? -Math.floor((l + 1) / 2) : Math.floor((l + 1) / 2));
            s[0] = 0,
            s[1] = 0,
            s[2] = 0;
            for (var u = e; u < i && !a.get(u, c); )
                u++;
            for (var f = 0; u < i; ) {
                if (a.get(u, c))
                    if (f === 1)
                        s[1]++;
                    else if (f === 2) {
                        if (this.foundPatternCross(s)) {
                            var d = this.handlePossibleCenter(s, c, u);
                            if (d !== null)
                                return d
                        }
                        s[0] = s[2],
                        s[1] = 1,
                        s[2] = 0,
                        f = 1
                    } else
                        s[++f]++;
                else
                    f === 1 && f++,
                    s[f]++;
                u++
            }
            if (this.foundPatternCross(s)) {
                var d = this.handlePossibleCenter(s, c, i);
                if (d !== null)
                    return d
            }
        }
        if (this.possibleCenters.length !== 0)
            return this.possibleCenters[0];
        throw new le
    }
    ,
    t.centerFromEnd = function(e, r) {
        return r - e[2] - e[1] / 2
    }
    ,
    t.prototype.foundPatternCross = function(e) {
        for (var r = this.moduleSize, n = r / 2, i = 0; i < 3; i++)
            if (Math.abs(r - e[i]) >= n)
                return !1;
        return !0
    }
    ,
    t.prototype.crossCheckVertical = function(e, r, n, i) {
        var o = this.image
          , s = o.getHeight()
          , a = this.crossCheckStateCount;
        a[0] = 0,
        a[1] = 0,
        a[2] = 0;
        for (var l = e; l >= 0 && o.get(r, l) && a[1] <= n; )
            a[1]++,
            l--;
        if (l < 0 || a[1] > n)
            return NaN;
        for (; l >= 0 && !o.get(r, l) && a[0] <= n; )
            a[0]++,
            l--;
        if (a[0] > n)
            return NaN;
        for (l = e + 1; l < s && o.get(r, l) && a[1] <= n; )
            a[1]++,
            l++;
        if (l === s || a[1] > n)
            return NaN;
        for (; l < s && !o.get(r, l) && a[2] <= n; )
            a[2]++,
            l++;
        if (a[2] > n)
            return NaN;
        var c = a[0] + a[1] + a[2];
        return 5 * Math.abs(c - i) >= 2 * i ? NaN : this.foundPatternCross(a) ? t.centerFromEnd(a, l) : NaN
    }
    ,
    t.prototype.handlePossibleCenter = function(e, r, n) {
        var i, o, s = e[0] + e[1] + e[2], a = t.centerFromEnd(e, n), l = this.crossCheckVertical(r, a, 2 * e[1], s);
        if (!isNaN(l)) {
            var c = (e[0] + e[1] + e[2]) / 3;
            try {
                for (var u = FCe(this.possibleCenters), f = u.next(); !f.done; f = u.next()) {
                    var d = f.value;
                    if (d.aboutEquals(c, l, a))
                        return d.combineEstimate(l, a, c)
                }
            } catch (x) {
                i = {
                    error: x
                }
            } finally {
                try {
                    f && !f.done && (o = u.return) && o.call(u)
                } finally {
                    if (i)
                        throw i.error
                }
            }
            var h = new DCe(a,l,c);
            this.possibleCenters.push(h),
            this.resultPointCallback !== null && this.resultPointCallback !== void 0 && this.resultPointCallback.foundPossibleResultPoint(h)
        }
        return null
    }
    ,
    t
}()
  , ICe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , OCe = function(t) {
    ICe(e, t);
    function e(r, n, i, o) {
        var s = t.call(this, r, n) || this;
        return s.estimatedModuleSize = i,
        s.count = o,
        o === void 0 && (s.count = 1),
        s
    }
    return e.prototype.getEstimatedModuleSize = function() {
        return this.estimatedModuleSize
    }
    ,
    e.prototype.getCount = function() {
        return this.count
    }
    ,
    e.prototype.aboutEquals = function(r, n, i) {
        if (Math.abs(n - this.getY()) <= r && Math.abs(i - this.getX()) <= r) {
            var o = Math.abs(r - this.estimatedModuleSize);
            return o <= 1 || o <= this.estimatedModuleSize
        }
        return !1
    }
    ,
    e.prototype.combineEstimate = function(r, n, i) {
        var o = this.count + 1
          , s = (this.count * this.getX() + n) / o
          , a = (this.count * this.getY() + r) / o
          , l = (this.count * this.estimatedModuleSize + i) / o;
        return new e(s,a,l,o)
    }
    ,
    e
}(Te)
  , kCe = function() {
    function t(e) {
        this.bottomLeft = e[0],
        this.topLeft = e[1],
        this.topRight = e[2]
    }
    return t.prototype.getBottomLeft = function() {
        return this.bottomLeft
    }
    ,
    t.prototype.getTopLeft = function() {
        return this.topLeft
    }
    ,
    t.prototype.getTopRight = function() {
        return this.topRight
    }
    ,
    t
}()
  , c0 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , RCe = function() {
    function t(e, r) {
        this.image = e,
        this.resultPointCallback = r,
        this.possibleCenters = [],
        this.crossCheckStateCount = new Int32Array(5),
        this.resultPointCallback = r
    }
    return t.prototype.getImage = function() {
        return this.image
    }
    ,
    t.prototype.getPossibleCenters = function() {
        return this.possibleCenters
    }
    ,
    t.prototype.find = function(e) {
        var r = e != null && e.get(Pt.TRY_HARDER) !== void 0
          , n = e != null && e.get(Pt.PURE_BARCODE) !== void 0
          , i = this.image
          , o = i.getHeight()
          , s = i.getWidth()
          , a = Math.floor(3 * o / (4 * t.MAX_MODULES));
        (a < t.MIN_SKIP || r) && (a = t.MIN_SKIP);
        for (var l = !1, c = new Int32Array(5), u = a - 1; u < o && !l; u += a) {
            c[0] = 0,
            c[1] = 0,
            c[2] = 0,
            c[3] = 0,
            c[4] = 0;
            for (var f = 0, d = 0; d < s; d++)
                if (i.get(d, u))
                    (f & 1) === 1 && f++,
                    c[f]++;
                else if (f & 1)
                    c[f]++;
                else if (f === 4)
                    if (t.foundPatternCross(c)) {
                        var h = this.handlePossibleCenter(c, u, d, n);
                        if (h === !0)
                            if (a = 2,
                            this.hasSkipped === !0)
                                l = this.haveMultiplyConfirmedCenters();
                            else {
                                var x = this.findRowSkip();
                                x > c[2] && (u += x - c[2] - a,
                                d = s - 1)
                            }
                        else {
                            c[0] = c[2],
                            c[1] = c[3],
                            c[2] = c[4],
                            c[3] = 1,
                            c[4] = 0,
                            f = 3;
                            continue
                        }
                        f = 0,
                        c[0] = 0,
                        c[1] = 0,
                        c[2] = 0,
                        c[3] = 0,
                        c[4] = 0
                    } else
                        c[0] = c[2],
                        c[1] = c[3],
                        c[2] = c[4],
                        c[3] = 1,
                        c[4] = 0,
                        f = 3;
                else
                    c[++f]++;
            if (t.foundPatternCross(c)) {
                var h = this.handlePossibleCenter(c, u, s, n);
                h === !0 && (a = c[0],
                this.hasSkipped && (l = this.haveMultiplyConfirmedCenters()))
            }
        }
        var y = this.selectBestPatterns();
        return Te.orderBestPatterns(y),
        new kCe(y)
    }
    ,
    t.centerFromEnd = function(e, r) {
        return r - e[4] - e[3] - e[2] / 2
    }
    ,
    t.foundPatternCross = function(e) {
        for (var r = 0, n = 0; n < 5; n++) {
            var i = e[n];
            if (i === 0)
                return !1;
            r += i
        }
        if (r < 7)
            return !1;
        var o = r / 7
          , s = o / 2;
        return Math.abs(o - e[0]) < s && Math.abs(o - e[1]) < s && Math.abs(3 * o - e[2]) < 3 * s && Math.abs(o - e[3]) < s && Math.abs(o - e[4]) < s
    }
    ,
    t.prototype.getCrossCheckStateCount = function() {
        var e = this.crossCheckStateCount;
        return e[0] = 0,
        e[1] = 0,
        e[2] = 0,
        e[3] = 0,
        e[4] = 0,
        e
    }
    ,
    t.prototype.crossCheckDiagonal = function(e, r, n, i) {
        for (var o = this.getCrossCheckStateCount(), s = 0, a = this.image; e >= s && r >= s && a.get(r - s, e - s); )
            o[2]++,
            s++;
        if (e < s || r < s)
            return !1;
        for (; e >= s && r >= s && !a.get(r - s, e - s) && o[1] <= n; )
            o[1]++,
            s++;
        if (e < s || r < s || o[1] > n)
            return !1;
        for (; e >= s && r >= s && a.get(r - s, e - s) && o[0] <= n; )
            o[0]++,
            s++;
        if (o[0] > n)
            return !1;
        var l = a.getHeight()
          , c = a.getWidth();
        for (s = 1; e + s < l && r + s < c && a.get(r + s, e + s); )
            o[2]++,
            s++;
        if (e + s >= l || r + s >= c)
            return !1;
        for (; e + s < l && r + s < c && !a.get(r + s, e + s) && o[3] < n; )
            o[3]++,
            s++;
        if (e + s >= l || r + s >= c || o[3] >= n)
            return !1;
        for (; e + s < l && r + s < c && a.get(r + s, e + s) && o[4] < n; )
            o[4]++,
            s++;
        if (o[4] >= n)
            return !1;
        var u = o[0] + o[1] + o[2] + o[3] + o[4];
        return Math.abs(u - i) < 2 * i && t.foundPatternCross(o)
    }
    ,
    t.prototype.crossCheckVertical = function(e, r, n, i) {
        for (var o = this.image, s = o.getHeight(), a = this.getCrossCheckStateCount(), l = e; l >= 0 && o.get(r, l); )
            a[2]++,
            l--;
        if (l < 0)
            return NaN;
        for (; l >= 0 && !o.get(r, l) && a[1] <= n; )
            a[1]++,
            l--;
        if (l < 0 || a[1] > n)
            return NaN;
        for (; l >= 0 && o.get(r, l) && a[0] <= n; )
            a[0]++,
            l--;
        if (a[0] > n)
            return NaN;
        for (l = e + 1; l < s && o.get(r, l); )
            a[2]++,
            l++;
        if (l === s)
            return NaN;
        for (; l < s && !o.get(r, l) && a[3] < n; )
            a[3]++,
            l++;
        if (l === s || a[3] >= n)
            return NaN;
        for (; l < s && o.get(r, l) && a[4] < n; )
            a[4]++,
            l++;
        if (a[4] >= n)
            return NaN;
        var c = a[0] + a[1] + a[2] + a[3] + a[4];
        return 5 * Math.abs(c - i) >= 2 * i ? NaN : t.foundPatternCross(a) ? t.centerFromEnd(a, l) : NaN
    }
    ,
    t.prototype.crossCheckHorizontal = function(e, r, n, i) {
        for (var o = this.image, s = o.getWidth(), a = this.getCrossCheckStateCount(), l = e; l >= 0 && o.get(l, r); )
            a[2]++,
            l--;
        if (l < 0)
            return NaN;
        for (; l >= 0 && !o.get(l, r) && a[1] <= n; )
            a[1]++,
            l--;
        if (l < 0 || a[1] > n)
            return NaN;
        for (; l >= 0 && o.get(l, r) && a[0] <= n; )
            a[0]++,
            l--;
        if (a[0] > n)
            return NaN;
        for (l = e + 1; l < s && o.get(l, r); )
            a[2]++,
            l++;
        if (l === s)
            return NaN;
        for (; l < s && !o.get(l, r) && a[3] < n; )
            a[3]++,
            l++;
        if (l === s || a[3] >= n)
            return NaN;
        for (; l < s && o.get(l, r) && a[4] < n; )
            a[4]++,
            l++;
        if (a[4] >= n)
            return NaN;
        var c = a[0] + a[1] + a[2] + a[3] + a[4];
        return 5 * Math.abs(c - i) >= i ? NaN : t.foundPatternCross(a) ? t.centerFromEnd(a, l) : NaN
    }
    ,
    t.prototype.handlePossibleCenter = function(e, r, n, i) {
        var o = e[0] + e[1] + e[2] + e[3] + e[4]
          , s = t.centerFromEnd(e, n)
          , a = this.crossCheckVertical(r, Math.floor(s), e[2], o);
        if (!isNaN(a) && (s = this.crossCheckHorizontal(Math.floor(s), Math.floor(a), e[2], o),
        !isNaN(s) && (!i || this.crossCheckDiagonal(Math.floor(a), Math.floor(s), e[2], o)))) {
            for (var l = o / 7, c = !1, u = this.possibleCenters, f = 0, d = u.length; f < d; f++) {
                var h = u[f];
                if (h.aboutEquals(l, a, s)) {
                    u[f] = h.combineEstimate(a, s, l),
                    c = !0;
                    break
                }
            }
            if (!c) {
                var x = new OCe(s,a,l);
                u.push(x),
                this.resultPointCallback !== null && this.resultPointCallback !== void 0 && this.resultPointCallback.foundPossibleResultPoint(x)
            }
            return !0
        }
        return !1
    }
    ,
    t.prototype.findRowSkip = function() {
        var e, r, n = this.possibleCenters.length;
        if (n <= 1)
            return 0;
        var i = null;
        try {
            for (var o = c0(this.possibleCenters), s = o.next(); !s.done; s = o.next()) {
                var a = s.value;
                if (a.getCount() >= t.CENTER_QUORUM)
                    if (i == null)
                        i = a;
                    else
                        return this.hasSkipped = !0,
                        Math.floor((Math.abs(i.getX() - a.getX()) - Math.abs(i.getY() - a.getY())) / 2)
            }
        } catch (l) {
            e = {
                error: l
            }
        } finally {
            try {
                s && !s.done && (r = o.return) && r.call(o)
            } finally {
                if (e)
                    throw e.error
            }
        }
        return 0
    }
    ,
    t.prototype.haveMultiplyConfirmedCenters = function() {
        var e, r, n, i, o = 0, s = 0, a = this.possibleCenters.length;
        try {
            for (var l = c0(this.possibleCenters), c = l.next(); !c.done; c = l.next()) {
                var u = c.value;
                u.getCount() >= t.CENTER_QUORUM && (o++,
                s += u.getEstimatedModuleSize())
            }
        } catch (y) {
            e = {
                error: y
            }
        } finally {
            try {
                c && !c.done && (r = l.return) && r.call(l)
            } finally {
                if (e)
                    throw e.error
            }
        }
        if (o < 3)
            return !1;
        var f = s / a
          , d = 0;
        try {
            for (var h = c0(this.possibleCenters), x = h.next(); !x.done; x = h.next()) {
                var u = x.value;
                d += Math.abs(u.getEstimatedModuleSize() - f)
            }
        } catch (y) {
            n = {
                error: y
            }
        } finally {
            try {
                x && !x.done && (i = h.return) && i.call(h)
            } finally {
                if (n)
                    throw n.error
            }
        }
        return d <= .05 * s
    }
    ,
    t.prototype.selectBestPatterns = function() {
        var e, r, n, i, o = this.possibleCenters.length;
        if (o < 3)
            throw new le;
        var s = this.possibleCenters, a;
        if (o > 3) {
            var l = 0
              , c = 0;
            try {
                for (var u = c0(this.possibleCenters), f = u.next(); !f.done; f = u.next()) {
                    var d = f.value
                      , h = d.getEstimatedModuleSize();
                    l += h,
                    c += h * h
                }
            } catch (_) {
                e = {
                    error: _
                }
            } finally {
                try {
                    f && !f.done && (r = u.return) && r.call(u)
                } finally {
                    if (e)
                        throw e.error
                }
            }
            a = l / o;
            var x = Math.sqrt(c / o - a * a);
            s.sort(function(_, b) {
                var C = Math.abs(b.getEstimatedModuleSize() - a)
                  , w = Math.abs(_.getEstimatedModuleSize() - a);
                return C < w ? -1 : C > w ? 1 : 0
            });
            for (var y = Math.max(.2 * a, x), m = 0; m < s.length && s.length > 3; m++) {
                var E = s[m];
                Math.abs(E.getEstimatedModuleSize() - a) > y && (s.splice(m, 1),
                m--)
            }
        }
        if (s.length > 3) {
            var l = 0;
            try {
                for (var g = c0(s), p = g.next(); !p.done; p = g.next()) {
                    var v = p.value;
                    l += v.getEstimatedModuleSize()
                }
            } catch (b) {
                n = {
                    error: b
                }
            } finally {
                try {
                    p && !p.done && (i = g.return) && i.call(g)
                } finally {
                    if (n)
                        throw n.error
                }
            }
            a = l / s.length,
            s.sort(function(b, C) {
                if (C.getCount() === b.getCount()) {
                    var w = Math.abs(C.getEstimatedModuleSize() - a)
                      , T = Math.abs(b.getEstimatedModuleSize() - a);
                    return w < T ? 1 : w > T ? -1 : 0
                } else
                    return C.getCount() - b.getCount()
            }),
            s.splice(3)
        }
        return [s[0], s[1], s[2]]
    }
    ,
    t.CENTER_QUORUM = 2,
    t.MIN_SKIP = 3,
    t.MAX_MODULES = 57,
    t
}()
  , MCe = function() {
    function t(e) {
        this.image = e
    }
    return t.prototype.getImage = function() {
        return this.image
    }
    ,
    t.prototype.getResultPointCallback = function() {
        return this.resultPointCallback
    }
    ,
    t.prototype.detect = function(e) {
        this.resultPointCallback = e == null ? null : e.get(Pt.NEED_RESULT_POINT_CALLBACK);
        var r = new RCe(this.image,this.resultPointCallback)
          , n = r.find(e);
        return this.processFinderPatternInfo(n)
    }
    ,
    t.prototype.processFinderPatternInfo = function(e) {
        var r = e.getTopLeft()
          , n = e.getTopRight()
          , i = e.getBottomLeft()
          , o = this.calculateModuleSize(r, n, i);
        if (o < 1)
            throw new le("No pattern found in proccess finder.");
        var s = t.computeDimension(r, n, i, o)
          , a = xl.getProvisionalVersionForDimension(s)
          , l = a.getDimensionForVersion() - 7
          , c = null;
        if (a.getAlignmentPatternCenters().length > 0)
            for (var u = n.getX() - r.getX() + i.getX(), f = n.getY() - r.getY() + i.getY(), d = 1 - 3 / l, h = Math.floor(r.getX() + d * (u - r.getX())), x = Math.floor(r.getY() + d * (f - r.getY())), y = 4; y <= 16; y <<= 1)
                try {
                    c = this.findAlignmentInRegion(o, h, x, y);
                    break
                } catch (p) {
                    if (!(p instanceof le))
                        throw p
                }
        var m = t.createTransform(r, n, i, c, s), E = t.sampleGrid(this.image, m, s), g;
        return c === null ? g = [i, r, n] : g = [i, r, n, c],
        new kC(E,g)
    }
    ,
    t.createTransform = function(e, r, n, i, o) {
        var s = o - 3.5, a, l, c, u;
        return i !== null ? (a = i.getX(),
        l = i.getY(),
        c = s - 3,
        u = c) : (a = r.getX() - e.getX() + n.getX(),
        l = r.getY() - e.getY() + n.getY(),
        c = s,
        u = s),
        IM.quadrilateralToQuadrilateral(3.5, 3.5, s, 3.5, c, u, 3.5, s, e.getX(), e.getY(), r.getX(), r.getY(), a, l, n.getX(), n.getY())
    }
    ,
    t.sampleGrid = function(e, r, n) {
        var i = RC.getInstance();
        return i.sampleGridWithTransform(e, n, n, r)
    }
    ,
    t.computeDimension = function(e, r, n, i) {
        var o = ft.round(Te.distance(e, r) / i)
          , s = ft.round(Te.distance(e, n) / i)
          , a = Math.floor((o + s) / 2) + 7;
        switch (a & 3) {
        case 0:
            a++;
            break;
        case 2:
            a--;
            break;
        case 3:
            throw new le("Dimensions could be not found.")
        }
        return a
    }
    ,
    t.prototype.calculateModuleSize = function(e, r, n) {
        return (this.calculateModuleSizeOneWay(e, r) + this.calculateModuleSizeOneWay(e, n)) / 2
    }
    ,
    t.prototype.calculateModuleSizeOneWay = function(e, r) {
        var n = this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()), Math.floor(e.getY()), Math.floor(r.getX()), Math.floor(r.getY()))
          , i = this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(r.getX()), Math.floor(r.getY()), Math.floor(e.getX()), Math.floor(e.getY()));
        return isNaN(n) ? i / 7 : isNaN(i) ? n / 7 : (n + i) / 14
    }
    ,
    t.prototype.sizeOfBlackWhiteBlackRunBothWays = function(e, r, n, i) {
        var o = this.sizeOfBlackWhiteBlackRun(e, r, n, i)
          , s = 1
          , a = e - (n - e);
        a < 0 ? (s = e / (e - a),
        a = 0) : a >= this.image.getWidth() && (s = (this.image.getWidth() - 1 - e) / (a - e),
        a = this.image.getWidth() - 1);
        var l = Math.floor(r - (i - r) * s);
        return s = 1,
        l < 0 ? (s = r / (r - l),
        l = 0) : l >= this.image.getHeight() && (s = (this.image.getHeight() - 1 - r) / (l - r),
        l = this.image.getHeight() - 1),
        a = Math.floor(e + (a - e) * s),
        o += this.sizeOfBlackWhiteBlackRun(e, r, a, l),
        o - 1
    }
    ,
    t.prototype.sizeOfBlackWhiteBlackRun = function(e, r, n, i) {
        var o = Math.abs(i - r) > Math.abs(n - e);
        if (o) {
            var s = e;
            e = r,
            r = s,
            s = n,
            n = i,
            i = s
        }
        for (var a = Math.abs(n - e), l = Math.abs(i - r), c = -a / 2, u = e < n ? 1 : -1, f = r < i ? 1 : -1, d = 0, h = n + u, x = e, y = r; x !== h; x += u) {
            var m = o ? y : x
              , E = o ? x : y;
            if (d === 1 === this.image.get(m, E)) {
                if (d === 2)
                    return ft.distance(x, y, e, r);
                d++
            }
            if (c += l,
            c > 0) {
                if (y === i)
                    break;
                y += f,
                c -= a
            }
        }
        return d === 2 ? ft.distance(n + u, i, e, r) : NaN
    }
    ,
    t.prototype.findAlignmentInRegion = function(e, r, n, i) {
        var o = Math.floor(i * e)
          , s = Math.max(0, r - o)
          , a = Math.min(this.image.getWidth() - 1, r + o);
        if (a - s < e * 3)
            throw new le("Alignment top exceeds estimated module size.");
        var l = Math.max(0, n - o)
          , c = Math.min(this.image.getHeight() - 1, n + o);
        if (c - l < e * 3)
            throw new le("Alignment bottom exceeds estimated module size.");
        var u = new PCe(this.image,s,l,a - s,c - l,e,this.resultPointCallback);
        return u.find()
    }
    ,
    t
}()
  , NCe = function() {
    function t() {
        this.decoder = new SCe
    }
    return t.prototype.getDecoder = function() {
        return this.decoder
    }
    ,
    t.prototype.decode = function(e, r) {
        var n, i;
        if (r != null && r.get(Pt.PURE_BARCODE) !== void 0) {
            var o = t.extractPureBits(e.getBlackMatrix());
            n = this.decoder.decodeBitMatrix(o, r),
            i = t.NO_POINTS
        } else {
            var s = new MCe(e.getBlackMatrix()).detect(r);
            n = this.decoder.decodeBitMatrix(s.getBits(), r),
            i = s.getPoints()
        }
        n.getOther()instanceof LM && n.getOther().applyMirroredCorrection(i);
        var a = new nn(n.getText(),n.getRawBytes(),void 0,i,ke.QR_CODE,void 0)
          , l = n.getByteSegments();
        l !== null && a.putMetadata(Vr.BYTE_SEGMENTS, l);
        var c = n.getECLevel();
        return c !== null && a.putMetadata(Vr.ERROR_CORRECTION_LEVEL, c),
        n.hasStructuredAppend() && (a.putMetadata(Vr.STRUCTURED_APPEND_SEQUENCE, n.getStructuredAppendSequenceNumber()),
        a.putMetadata(Vr.STRUCTURED_APPEND_PARITY, n.getStructuredAppendParity())),
        a
    }
    ,
    t.prototype.reset = function() {}
    ,
    t.extractPureBits = function(e) {
        var r = e.getTopLeftOnBit()
          , n = e.getBottomRightOnBit();
        if (r === null || n === null)
            throw new le;
        var i = this.moduleSize(r, e)
          , o = r[1]
          , s = n[1]
          , a = r[0]
          , l = n[0];
        if (a >= l || o >= s)
            throw new le;
        if (s - o !== l - a && (l = a + (s - o),
        l >= e.getWidth()))
            throw new le;
        var c = Math.round((l - a + 1) / i)
          , u = Math.round((s - o + 1) / i);
        if (c <= 0 || u <= 0)
            throw new le;
        if (u !== c)
            throw new le;
        var f = Math.floor(i / 2);
        o += f,
        a += f;
        var d = a + Math.floor((c - 1) * i) - l;
        if (d > 0) {
            if (d > f)
                throw new le;
            a -= d
        }
        var h = o + Math.floor((u - 1) * i) - s;
        if (h > 0) {
            if (h > f)
                throw new le;
            o -= h
        }
        for (var x = new Do(c,u), y = 0; y < u; y++)
            for (var m = o + Math.floor(y * i), E = 0; E < c; E++)
                e.get(a + Math.floor(E * i), m) && x.set(E, y);
        return x
    }
    ,
    t.moduleSize = function(e, r) {
        for (var n = r.getHeight(), i = r.getWidth(), o = e[0], s = e[1], a = !0, l = 0; o < i && s < n; ) {
            if (a !== r.get(o, s)) {
                if (++l === 5)
                    break;
                a = !a
            }
            o++,
            s++
        }
        if (o === i || s === n)
            throw new le;
        return (o - e[0]) / 7
    }
    ,
    t.NO_POINTS = new Array,
    t
}();
const ap = NCe;
var LCe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, at = function() {
    function t() {}
    return t.prototype.PDF417Common = function() {}
    ,
    t.getBitCountSum = function(e) {
        return ft.sum(e)
    }
    ,
    t.toIntArray = function(e) {
        var r, n;
        if (e == null || !e.length)
            return t.EMPTY_INT_ARRAY;
        var i = new Int32Array(e.length)
          , o = 0;
        try {
            for (var s = LCe(e), a = s.next(); !a.done; a = s.next()) {
                var l = a.value;
                i[o++] = l
            }
        } catch (c) {
            r = {
                error: c
            }
        } finally {
            try {
                a && !a.done && (n = s.return) && n.call(s)
            } finally {
                if (r)
                    throw r.error
            }
        }
        return i
    }
    ,
    t.getCodeword = function(e) {
        var r = br.binarySearch(t.SYMBOL_TABLE, e & 262143);
        return r < 0 ? -1 : (t.CODEWORD_TABLE[r] - 1) % t.NUMBER_OF_CODEWORDS
    }
    ,
    t.NUMBER_OF_CODEWORDS = 929,
    t.MAX_CODEWORDS_IN_BARCODE = t.NUMBER_OF_CODEWORDS - 1,
    t.MIN_ROWS_IN_BARCODE = 3,
    t.MAX_ROWS_IN_BARCODE = 90,
    t.MODULES_IN_CODEWORD = 17,
    t.MODULES_IN_STOP_PATTERN = 18,
    t.BARS_IN_MODULE = 8,
    t.EMPTY_INT_ARRAY = new Int32Array([]),
    t.SYMBOL_TABLE = Int32Array.from([66142, 66170, 66206, 66236, 66290, 66292, 66350, 66382, 66396, 66454, 66470, 66476, 66594, 66600, 66614, 66626, 66628, 66632, 66640, 66654, 66662, 66668, 66682, 66690, 66718, 66720, 66748, 66758, 66776, 66798, 66802, 66804, 66820, 66824, 66832, 66846, 66848, 66876, 66880, 66936, 66950, 66956, 66968, 66992, 67006, 67022, 67036, 67042, 67044, 67048, 67062, 67118, 67150, 67164, 67214, 67228, 67256, 67294, 67322, 67350, 67366, 67372, 67398, 67404, 67416, 67438, 67474, 67476, 67490, 67492, 67496, 67510, 67618, 67624, 67650, 67656, 67664, 67678, 67686, 67692, 67706, 67714, 67716, 67728, 67742, 67744, 67772, 67782, 67788, 67800, 67822, 67826, 67828, 67842, 67848, 67870, 67872, 67900, 67904, 67960, 67974, 67992, 68016, 68030, 68046, 68060, 68066, 68068, 68072, 68086, 68104, 68112, 68126, 68128, 68156, 68160, 68216, 68336, 68358, 68364, 68376, 68400, 68414, 68448, 68476, 68494, 68508, 68536, 68546, 68548, 68552, 68560, 68574, 68582, 68588, 68654, 68686, 68700, 68706, 68708, 68712, 68726, 68750, 68764, 68792, 68802, 68804, 68808, 68816, 68830, 68838, 68844, 68858, 68878, 68892, 68920, 68976, 68990, 68994, 68996, 69e3, 69008, 69022, 69024, 69052, 69062, 69068, 69080, 69102, 69106, 69108, 69142, 69158, 69164, 69190, 69208, 69230, 69254, 69260, 69272, 69296, 69310, 69326, 69340, 69386, 69394, 69396, 69410, 69416, 69430, 69442, 69444, 69448, 69456, 69470, 69478, 69484, 69554, 69556, 69666, 69672, 69698, 69704, 69712, 69726, 69754, 69762, 69764, 69776, 69790, 69792, 69820, 69830, 69836, 69848, 69870, 69874, 69876, 69890, 69918, 69920, 69948, 69952, 70008, 70022, 70040, 70064, 70078, 70094, 70108, 70114, 70116, 70120, 70134, 70152, 70174, 70176, 70264, 70384, 70412, 70448, 70462, 70496, 70524, 70542, 70556, 70584, 70594, 70600, 70608, 70622, 70630, 70636, 70664, 70672, 70686, 70688, 70716, 70720, 70776, 70896, 71136, 71180, 71192, 71216, 71230, 71264, 71292, 71360, 71416, 71452, 71480, 71536, 71550, 71554, 71556, 71560, 71568, 71582, 71584, 71612, 71622, 71628, 71640, 71662, 71726, 71732, 71758, 71772, 71778, 71780, 71784, 71798, 71822, 71836, 71864, 71874, 71880, 71888, 71902, 71910, 71916, 71930, 71950, 71964, 71992, 72048, 72062, 72066, 72068, 72080, 72094, 72096, 72124, 72134, 72140, 72152, 72174, 72178, 72180, 72206, 72220, 72248, 72304, 72318, 72416, 72444, 72456, 72464, 72478, 72480, 72508, 72512, 72568, 72588, 72600, 72624, 72638, 72654, 72668, 72674, 72676, 72680, 72694, 72726, 72742, 72748, 72774, 72780, 72792, 72814, 72838, 72856, 72880, 72894, 72910, 72924, 72930, 72932, 72936, 72950, 72966, 72972, 72984, 73008, 73022, 73056, 73084, 73102, 73116, 73144, 73156, 73160, 73168, 73182, 73190, 73196, 73210, 73226, 73234, 73236, 73250, 73252, 73256, 73270, 73282, 73284, 73296, 73310, 73318, 73324, 73346, 73348, 73352, 73360, 73374, 73376, 73404, 73414, 73420, 73432, 73454, 73498, 73518, 73522, 73524, 73550, 73564, 73570, 73572, 73576, 73590, 73800, 73822, 73858, 73860, 73872, 73886, 73888, 73916, 73944, 73970, 73972, 73992, 74014, 74016, 74044, 74048, 74104, 74118, 74136, 74160, 74174, 74210, 74212, 74216, 74230, 74244, 74256, 74270, 74272, 74360, 74480, 74502, 74508, 74544, 74558, 74592, 74620, 74638, 74652, 74680, 74690, 74696, 74704, 74726, 74732, 74782, 74784, 74812, 74992, 75232, 75288, 75326, 75360, 75388, 75456, 75512, 75576, 75632, 75646, 75650, 75652, 75664, 75678, 75680, 75708, 75718, 75724, 75736, 75758, 75808, 75836, 75840, 75896, 76016, 76256, 76736, 76824, 76848, 76862, 76896, 76924, 76992, 77048, 77296, 77340, 77368, 77424, 77438, 77536, 77564, 77572, 77576, 77584, 77600, 77628, 77632, 77688, 77702, 77708, 77720, 77744, 77758, 77774, 77788, 77870, 77902, 77916, 77922, 77928, 77966, 77980, 78008, 78018, 78024, 78032, 78046, 78060, 78074, 78094, 78136, 78192, 78206, 78210, 78212, 78224, 78238, 78240, 78268, 78278, 78284, 78296, 78322, 78324, 78350, 78364, 78448, 78462, 78560, 78588, 78600, 78622, 78624, 78652, 78656, 78712, 78726, 78744, 78768, 78782, 78798, 78812, 78818, 78820, 78824, 78838, 78862, 78876, 78904, 78960, 78974, 79072, 79100, 79296, 79352, 79368, 79376, 79390, 79392, 79420, 79424, 79480, 79600, 79628, 79640, 79664, 79678, 79712, 79740, 79772, 79800, 79810, 79812, 79816, 79824, 79838, 79846, 79852, 79894, 79910, 79916, 79942, 79948, 79960, 79982, 79988, 80006, 80024, 80048, 80062, 80078, 80092, 80098, 80100, 80104, 80134, 80140, 80176, 80190, 80224, 80252, 80270, 80284, 80312, 80328, 80336, 80350, 80358, 80364, 80378, 80390, 80396, 80408, 80432, 80446, 80480, 80508, 80576, 80632, 80654, 80668, 80696, 80752, 80766, 80776, 80784, 80798, 80800, 80828, 80844, 80856, 80878, 80882, 80884, 80914, 80916, 80930, 80932, 80936, 80950, 80962, 80968, 80976, 80990, 80998, 81004, 81026, 81028, 81040, 81054, 81056, 81084, 81094, 81100, 81112, 81134, 81154, 81156, 81160, 81168, 81182, 81184, 81212, 81216, 81272, 81286, 81292, 81304, 81328, 81342, 81358, 81372, 81380, 81384, 81398, 81434, 81454, 81458, 81460, 81486, 81500, 81506, 81508, 81512, 81526, 81550, 81564, 81592, 81602, 81604, 81608, 81616, 81630, 81638, 81644, 81702, 81708, 81722, 81734, 81740, 81752, 81774, 81778, 81780, 82050, 82078, 82080, 82108, 82180, 82184, 82192, 82206, 82208, 82236, 82240, 82296, 82316, 82328, 82352, 82366, 82402, 82404, 82408, 82440, 82448, 82462, 82464, 82492, 82496, 82552, 82672, 82694, 82700, 82712, 82736, 82750, 82784, 82812, 82830, 82882, 82884, 82888, 82896, 82918, 82924, 82952, 82960, 82974, 82976, 83004, 83008, 83064, 83184, 83424, 83468, 83480, 83504, 83518, 83552, 83580, 83648, 83704, 83740, 83768, 83824, 83838, 83842, 83844, 83848, 83856, 83872, 83900, 83910, 83916, 83928, 83950, 83984, 84e3, 84028, 84032, 84088, 84208, 84448, 84928, 85040, 85054, 85088, 85116, 85184, 85240, 85488, 85560, 85616, 85630, 85728, 85756, 85764, 85768, 85776, 85790, 85792, 85820, 85824, 85880, 85894, 85900, 85912, 85936, 85966, 85980, 86048, 86080, 86136, 86256, 86496, 86976, 88160, 88188, 88256, 88312, 88560, 89056, 89200, 89214, 89312, 89340, 89536, 89592, 89608, 89616, 89632, 89664, 89720, 89840, 89868, 89880, 89904, 89952, 89980, 89998, 90012, 90040, 90190, 90204, 90254, 90268, 90296, 90306, 90308, 90312, 90334, 90382, 90396, 90424, 90480, 90494, 90500, 90504, 90512, 90526, 90528, 90556, 90566, 90572, 90584, 90610, 90612, 90638, 90652, 90680, 90736, 90750, 90848, 90876, 90884, 90888, 90896, 90910, 90912, 90940, 90944, 91e3, 91014, 91020, 91032, 91056, 91070, 91086, 91100, 91106, 91108, 91112, 91126, 91150, 91164, 91192, 91248, 91262, 91360, 91388, 91584, 91640, 91664, 91678, 91680, 91708, 91712, 91768, 91888, 91928, 91952, 91966, 92e3, 92028, 92046, 92060, 92088, 92098, 92100, 92104, 92112, 92126, 92134, 92140, 92188, 92216, 92272, 92384, 92412, 92608, 92664, 93168, 93200, 93214, 93216, 93244, 93248, 93304, 93424, 93664, 93720, 93744, 93758, 93792, 93820, 93888, 93944, 93980, 94008, 94064, 94078, 94084, 94088, 94096, 94110, 94112, 94140, 94150, 94156, 94168, 94246, 94252, 94278, 94284, 94296, 94318, 94342, 94348, 94360, 94384, 94398, 94414, 94428, 94440, 94470, 94476, 94488, 94512, 94526, 94560, 94588, 94606, 94620, 94648, 94658, 94660, 94664, 94672, 94686, 94694, 94700, 94714, 94726, 94732, 94744, 94768, 94782, 94816, 94844, 94912, 94968, 94990, 95004, 95032, 95088, 95102, 95112, 95120, 95134, 95136, 95164, 95180, 95192, 95214, 95218, 95220, 95244, 95256, 95280, 95294, 95328, 95356, 95424, 95480, 95728, 95758, 95772, 95800, 95856, 95870, 95968, 95996, 96008, 96016, 96030, 96032, 96060, 96064, 96120, 96152, 96176, 96190, 96220, 96226, 96228, 96232, 96290, 96292, 96296, 96310, 96322, 96324, 96328, 96336, 96350, 96358, 96364, 96386, 96388, 96392, 96400, 96414, 96416, 96444, 96454, 96460, 96472, 96494, 96498, 96500, 96514, 96516, 96520, 96528, 96542, 96544, 96572, 96576, 96632, 96646, 96652, 96664, 96688, 96702, 96718, 96732, 96738, 96740, 96744, 96758, 96772, 96776, 96784, 96798, 96800, 96828, 96832, 96888, 97008, 97030, 97036, 97048, 97072, 97086, 97120, 97148, 97166, 97180, 97208, 97220, 97224, 97232, 97246, 97254, 97260, 97326, 97330, 97332, 97358, 97372, 97378, 97380, 97384, 97398, 97422, 97436, 97464, 97474, 97476, 97480, 97488, 97502, 97510, 97516, 97550, 97564, 97592, 97648, 97666, 97668, 97672, 97680, 97694, 97696, 97724, 97734, 97740, 97752, 97774, 97830, 97836, 97850, 97862, 97868, 97880, 97902, 97906, 97908, 97926, 97932, 97944, 97968, 97998, 98012, 98018, 98020, 98024, 98038, 98618, 98674, 98676, 98838, 98854, 98874, 98892, 98904, 98926, 98930, 98932, 98968, 99006, 99042, 99044, 99048, 99062, 99166, 99194, 99246, 99286, 99350, 99366, 99372, 99386, 99398, 99416, 99438, 99442, 99444, 99462, 99504, 99518, 99534, 99548, 99554, 99556, 99560, 99574, 99590, 99596, 99608, 99632, 99646, 99680, 99708, 99726, 99740, 99768, 99778, 99780, 99784, 99792, 99806, 99814, 99820, 99834, 99858, 99860, 99874, 99880, 99894, 99906, 99920, 99934, 99962, 99970, 99972, 99976, 99984, 99998, 1e5, 100028, 100038, 100044, 100056, 100078, 100082, 100084, 100142, 100174, 100188, 100246, 100262, 100268, 100306, 100308, 100390, 100396, 100410, 100422, 100428, 100440, 100462, 100466, 100468, 100486, 100504, 100528, 100542, 100558, 100572, 100578, 100580, 100584, 100598, 100620, 100656, 100670, 100704, 100732, 100750, 100792, 100802, 100808, 100816, 100830, 100838, 100844, 100858, 100888, 100912, 100926, 100960, 100988, 101056, 101112, 101148, 101176, 101232, 101246, 101250, 101252, 101256, 101264, 101278, 101280, 101308, 101318, 101324, 101336, 101358, 101362, 101364, 101410, 101412, 101416, 101430, 101442, 101448, 101456, 101470, 101478, 101498, 101506, 101508, 101520, 101534, 101536, 101564, 101580, 101618, 101620, 101636, 101640, 101648, 101662, 101664, 101692, 101696, 101752, 101766, 101784, 101838, 101858, 101860, 101864, 101934, 101938, 101940, 101966, 101980, 101986, 101988, 101992, 102030, 102044, 102072, 102082, 102084, 102088, 102096, 102138, 102166, 102182, 102188, 102214, 102220, 102232, 102254, 102282, 102290, 102292, 102306, 102308, 102312, 102326, 102444, 102458, 102470, 102476, 102488, 102514, 102516, 102534, 102552, 102576, 102590, 102606, 102620, 102626, 102632, 102646, 102662, 102668, 102704, 102718, 102752, 102780, 102798, 102812, 102840, 102850, 102856, 102864, 102878, 102886, 102892, 102906, 102936, 102974, 103008, 103036, 103104, 103160, 103224, 103280, 103294, 103298, 103300, 103312, 103326, 103328, 103356, 103366, 103372, 103384, 103406, 103410, 103412, 103472, 103486, 103520, 103548, 103616, 103672, 103920, 103992, 104048, 104062, 104160, 104188, 104194, 104196, 104200, 104208, 104224, 104252, 104256, 104312, 104326, 104332, 104344, 104368, 104382, 104398, 104412, 104418, 104420, 104424, 104482, 104484, 104514, 104520, 104528, 104542, 104550, 104570, 104578, 104580, 104592, 104606, 104608, 104636, 104652, 104690, 104692, 104706, 104712, 104734, 104736, 104764, 104768, 104824, 104838, 104856, 104910, 104930, 104932, 104936, 104968, 104976, 104990, 104992, 105020, 105024, 105080, 105200, 105240, 105278, 105312, 105372, 105410, 105412, 105416, 105424, 105446, 105518, 105524, 105550, 105564, 105570, 105572, 105576, 105614, 105628, 105656, 105666, 105672, 105680, 105702, 105722, 105742, 105756, 105784, 105840, 105854, 105858, 105860, 105864, 105872, 105888, 105932, 105970, 105972, 106006, 106022, 106028, 106054, 106060, 106072, 106100, 106118, 106124, 106136, 106160, 106174, 106190, 106210, 106212, 106216, 106250, 106258, 106260, 106274, 106276, 106280, 106306, 106308, 106312, 106320, 106334, 106348, 106394, 106414, 106418, 106420, 106566, 106572, 106610, 106612, 106630, 106636, 106648, 106672, 106686, 106722, 106724, 106728, 106742, 106758, 106764, 106776, 106800, 106814, 106848, 106876, 106894, 106908, 106936, 106946, 106948, 106952, 106960, 106974, 106982, 106988, 107032, 107056, 107070, 107104, 107132, 107200, 107256, 107292, 107320, 107376, 107390, 107394, 107396, 107400, 107408, 107422, 107424, 107452, 107462, 107468, 107480, 107502, 107506, 107508, 107544, 107568, 107582, 107616, 107644, 107712, 107768, 108016, 108060, 108088, 108144, 108158, 108256, 108284, 108290, 108292, 108296, 108304, 108318, 108320, 108348, 108352, 108408, 108422, 108428, 108440, 108464, 108478, 108494, 108508, 108514, 108516, 108520, 108592, 108640, 108668, 108736, 108792, 109040, 109536, 109680, 109694, 109792, 109820, 110016, 110072, 110084, 110088, 110096, 110112, 110140, 110144, 110200, 110320, 110342, 110348, 110360, 110384, 110398, 110432, 110460, 110478, 110492, 110520, 110532, 110536, 110544, 110558, 110658, 110686, 110714, 110722, 110724, 110728, 110736, 110750, 110752, 110780, 110796, 110834, 110836, 110850, 110852, 110856, 110864, 110878, 110880, 110908, 110912, 110968, 110982, 111e3, 111054, 111074, 111076, 111080, 111108, 111112, 111120, 111134, 111136, 111164, 111168, 111224, 111344, 111372, 111422, 111456, 111516, 111554, 111556, 111560, 111568, 111590, 111632, 111646, 111648, 111676, 111680, 111736, 111856, 112096, 112152, 112224, 112252, 112320, 112440, 112514, 112516, 112520, 112528, 112542, 112544, 112588, 112686, 112718, 112732, 112782, 112796, 112824, 112834, 112836, 112840, 112848, 112870, 112890, 112910, 112924, 112952, 113008, 113022, 113026, 113028, 113032, 113040, 113054, 113056, 113100, 113138, 113140, 113166, 113180, 113208, 113264, 113278, 113376, 113404, 113416, 113424, 113440, 113468, 113472, 113560, 113614, 113634, 113636, 113640, 113686, 113702, 113708, 113734, 113740, 113752, 113778, 113780, 113798, 113804, 113816, 113840, 113854, 113870, 113890, 113892, 113896, 113926, 113932, 113944, 113968, 113982, 114016, 114044, 114076, 114114, 114116, 114120, 114128, 114150, 114170, 114194, 114196, 114210, 114212, 114216, 114242, 114244, 114248, 114256, 114270, 114278, 114306, 114308, 114312, 114320, 114334, 114336, 114364, 114380, 114420, 114458, 114478, 114482, 114484, 114510, 114524, 114530, 114532, 114536, 114842, 114866, 114868, 114970, 114994, 114996, 115042, 115044, 115048, 115062, 115130, 115226, 115250, 115252, 115278, 115292, 115298, 115300, 115304, 115318, 115342, 115394, 115396, 115400, 115408, 115422, 115430, 115436, 115450, 115478, 115494, 115514, 115526, 115532, 115570, 115572, 115738, 115758, 115762, 115764, 115790, 115804, 115810, 115812, 115816, 115830, 115854, 115868, 115896, 115906, 115912, 115920, 115934, 115942, 115948, 115962, 115996, 116024, 116080, 116094, 116098, 116100, 116104, 116112, 116126, 116128, 116156, 116166, 116172, 116184, 116206, 116210, 116212, 116246, 116262, 116268, 116282, 116294, 116300, 116312, 116334, 116338, 116340, 116358, 116364, 116376, 116400, 116414, 116430, 116444, 116450, 116452, 116456, 116498, 116500, 116514, 116520, 116534, 116546, 116548, 116552, 116560, 116574, 116582, 116588, 116602, 116654, 116694, 116714, 116762, 116782, 116786, 116788, 116814, 116828, 116834, 116836, 116840, 116854, 116878, 116892, 116920, 116930, 116936, 116944, 116958, 116966, 116972, 116986, 117006, 117048, 117104, 117118, 117122, 117124, 117136, 117150, 117152, 117180, 117190, 117196, 117208, 117230, 117234, 117236, 117304, 117360, 117374, 117472, 117500, 117506, 117508, 117512, 117520, 117536, 117564, 117568, 117624, 117638, 117644, 117656, 117680, 117694, 117710, 117724, 117730, 117732, 117736, 117750, 117782, 117798, 117804, 117818, 117830, 117848, 117874, 117876, 117894, 117936, 117950, 117966, 117986, 117988, 117992, 118022, 118028, 118040, 118064, 118078, 118112, 118140, 118172, 118210, 118212, 118216, 118224, 118238, 118246, 118266, 118306, 118312, 118338, 118352, 118366, 118374, 118394, 118402, 118404, 118408, 118416, 118430, 118432, 118460, 118476, 118514, 118516, 118574, 118578, 118580, 118606, 118620, 118626, 118628, 118632, 118678, 118694, 118700, 118730, 118738, 118740, 118830, 118834, 118836, 118862, 118876, 118882, 118884, 118888, 118902, 118926, 118940, 118968, 118978, 118980, 118984, 118992, 119006, 119014, 119020, 119034, 119068, 119096, 119152, 119166, 119170, 119172, 119176, 119184, 119198, 119200, 119228, 119238, 119244, 119256, 119278, 119282, 119284, 119324, 119352, 119408, 119422, 119520, 119548, 119554, 119556, 119560, 119568, 119582, 119584, 119612, 119616, 119672, 119686, 119692, 119704, 119728, 119742, 119758, 119772, 119778, 119780, 119784, 119798, 119920, 119934, 120032, 120060, 120256, 120312, 120324, 120328, 120336, 120352, 120384, 120440, 120560, 120582, 120588, 120600, 120624, 120638, 120672, 120700, 120718, 120732, 120760, 120770, 120772, 120776, 120784, 120798, 120806, 120812, 120870, 120876, 120890, 120902, 120908, 120920, 120946, 120948, 120966, 120972, 120984, 121008, 121022, 121038, 121058, 121060, 121064, 121078, 121100, 121112, 121136, 121150, 121184, 121212, 121244, 121282, 121284, 121288, 121296, 121318, 121338, 121356, 121368, 121392, 121406, 121440, 121468, 121536, 121592, 121656, 121730, 121732, 121736, 121744, 121758, 121760, 121804, 121842, 121844, 121890, 121922, 121924, 121928, 121936, 121950, 121958, 121978, 121986, 121988, 121992, 122e3, 122014, 122016, 122044, 122060, 122098, 122100, 122116, 122120, 122128, 122142, 122144, 122172, 122176, 122232, 122246, 122264, 122318, 122338, 122340, 122344, 122414, 122418, 122420, 122446, 122460, 122466, 122468, 122472, 122510, 122524, 122552, 122562, 122564, 122568, 122576, 122598, 122618, 122646, 122662, 122668, 122694, 122700, 122712, 122738, 122740, 122762, 122770, 122772, 122786, 122788, 122792, 123018, 123026, 123028, 123042, 123044, 123048, 123062, 123098, 123146, 123154, 123156, 123170, 123172, 123176, 123190, 123202, 123204, 123208, 123216, 123238, 123244, 123258, 123290, 123314, 123316, 123402, 123410, 123412, 123426, 123428, 123432, 123446, 123458, 123464, 123472, 123486, 123494, 123500, 123514, 123522, 123524, 123528, 123536, 123552, 123580, 123590, 123596, 123608, 123630, 123634, 123636, 123674, 123698, 123700, 123740, 123746, 123748, 123752, 123834, 123914, 123922, 123924, 123938, 123944, 123958, 123970, 123976, 123984, 123998, 124006, 124012, 124026, 124034, 124036, 124048, 124062, 124064, 124092, 124102, 124108, 124120, 124142, 124146, 124148, 124162, 124164, 124168, 124176, 124190, 124192, 124220, 124224, 124280, 124294, 124300, 124312, 124336, 124350, 124366, 124380, 124386, 124388, 124392, 124406, 124442, 124462, 124466, 124468, 124494, 124508, 124514, 124520, 124558, 124572, 124600, 124610, 124612, 124616, 124624, 124646, 124666, 124694, 124710, 124716, 124730, 124742, 124748, 124760, 124786, 124788, 124818, 124820, 124834, 124836, 124840, 124854, 124946, 124948, 124962, 124964, 124968, 124982, 124994, 124996, 125e3, 125008, 125022, 125030, 125036, 125050, 125058, 125060, 125064, 125072, 125086, 125088, 125116, 125126, 125132, 125144, 125166, 125170, 125172, 125186, 125188, 125192, 125200, 125216, 125244, 125248, 125304, 125318, 125324, 125336, 125360, 125374, 125390, 125404, 125410, 125412, 125416, 125430, 125444, 125448, 125456, 125472, 125504, 125560, 125680, 125702, 125708, 125720, 125744, 125758, 125792, 125820, 125838, 125852, 125880, 125890, 125892, 125896, 125904, 125918, 125926, 125932, 125978, 125998, 126002, 126004, 126030, 126044, 126050, 126052, 126056, 126094, 126108, 126136, 126146, 126148, 126152, 126160, 126182, 126202, 126222, 126236, 126264, 126320, 126334, 126338, 126340, 126344, 126352, 126366, 126368, 126412, 126450, 126452, 126486, 126502, 126508, 126522, 126534, 126540, 126552, 126574, 126578, 126580, 126598, 126604, 126616, 126640, 126654, 126670, 126684, 126690, 126692, 126696, 126738, 126754, 126756, 126760, 126774, 126786, 126788, 126792, 126800, 126814, 126822, 126828, 126842, 126894, 126898, 126900, 126934, 127126, 127142, 127148, 127162, 127178, 127186, 127188, 127254, 127270, 127276, 127290, 127302, 127308, 127320, 127342, 127346, 127348, 127370, 127378, 127380, 127394, 127396, 127400, 127450, 127510, 127526, 127532, 127546, 127558, 127576, 127598, 127602, 127604, 127622, 127628, 127640, 127664, 127678, 127694, 127708, 127714, 127716, 127720, 127734, 127754, 127762, 127764, 127778, 127784, 127810, 127812, 127816, 127824, 127838, 127846, 127866, 127898, 127918, 127922, 127924, 128022, 128038, 128044, 128058, 128070, 128076, 128088, 128110, 128114, 128116, 128134, 128140, 128152, 128176, 128190, 128206, 128220, 128226, 128228, 128232, 128246, 128262, 128268, 128280, 128304, 128318, 128352, 128380, 128398, 128412, 128440, 128450, 128452, 128456, 128464, 128478, 128486, 128492, 128506, 128522, 128530, 128532, 128546, 128548, 128552, 128566, 128578, 128580, 128584, 128592, 128606, 128614, 128634, 128642, 128644, 128648, 128656, 128670, 128672, 128700, 128716, 128754, 128756, 128794, 128814, 128818, 128820, 128846, 128860, 128866, 128868, 128872, 128886, 128918, 128934, 128940, 128954, 128978, 128980, 129178, 129198, 129202, 129204, 129238, 129258, 129306, 129326, 129330, 129332, 129358, 129372, 129378, 129380, 129384, 129398, 129430, 129446, 129452, 129466, 129482, 129490, 129492, 129562, 129582, 129586, 129588, 129614, 129628, 129634, 129636, 129640, 129654, 129678, 129692, 129720, 129730, 129732, 129736, 129744, 129758, 129766, 129772, 129814, 129830, 129836, 129850, 129862, 129868, 129880, 129902, 129906, 129908, 129930, 129938, 129940, 129954, 129956, 129960, 129974, 130010]),
    t.CODEWORD_TABLE = Int32Array.from([2627, 1819, 2622, 2621, 1813, 1812, 2729, 2724, 2723, 2779, 2774, 2773, 902, 896, 908, 868, 865, 861, 859, 2511, 873, 871, 1780, 835, 2493, 825, 2491, 842, 837, 844, 1764, 1762, 811, 810, 809, 2483, 807, 2482, 806, 2480, 815, 814, 813, 812, 2484, 817, 816, 1745, 1744, 1742, 1746, 2655, 2637, 2635, 2626, 2625, 2623, 2628, 1820, 2752, 2739, 2737, 2728, 2727, 2725, 2730, 2785, 2783, 2778, 2777, 2775, 2780, 787, 781, 747, 739, 736, 2413, 754, 752, 1719, 692, 689, 681, 2371, 678, 2369, 700, 697, 694, 703, 1688, 1686, 642, 638, 2343, 631, 2341, 627, 2338, 651, 646, 643, 2345, 654, 652, 1652, 1650, 1647, 1654, 601, 599, 2322, 596, 2321, 594, 2319, 2317, 611, 610, 608, 606, 2324, 603, 2323, 615, 614, 612, 1617, 1616, 1614, 1612, 616, 1619, 1618, 2575, 2538, 2536, 905, 901, 898, 909, 2509, 2507, 2504, 870, 867, 864, 860, 2512, 875, 872, 1781, 2490, 2489, 2487, 2485, 1748, 836, 834, 832, 830, 2494, 827, 2492, 843, 841, 839, 845, 1765, 1763, 2701, 2676, 2674, 2653, 2648, 2656, 2634, 2633, 2631, 2629, 1821, 2638, 2636, 2770, 2763, 2761, 2750, 2745, 2753, 2736, 2735, 2733, 2731, 1848, 2740, 2738, 2786, 2784, 591, 588, 576, 569, 566, 2296, 1590, 537, 534, 526, 2276, 522, 2274, 545, 542, 539, 548, 1572, 1570, 481, 2245, 466, 2242, 462, 2239, 492, 485, 482, 2249, 496, 494, 1534, 1531, 1528, 1538, 413, 2196, 406, 2191, 2188, 425, 419, 2202, 415, 2199, 432, 430, 427, 1472, 1467, 1464, 433, 1476, 1474, 368, 367, 2160, 365, 2159, 362, 2157, 2155, 2152, 378, 377, 375, 2166, 372, 2165, 369, 2162, 383, 381, 379, 2168, 1419, 1418, 1416, 1414, 385, 1411, 384, 1423, 1422, 1420, 1424, 2461, 802, 2441, 2439, 790, 786, 783, 794, 2409, 2406, 2403, 750, 742, 738, 2414, 756, 753, 1720, 2367, 2365, 2362, 2359, 1663, 693, 691, 684, 2373, 680, 2370, 702, 699, 696, 704, 1690, 1687, 2337, 2336, 2334, 2332, 1624, 2329, 1622, 640, 637, 2344, 634, 2342, 630, 2340, 650, 648, 645, 2346, 655, 653, 1653, 1651, 1649, 1655, 2612, 2597, 2595, 2571, 2568, 2565, 2576, 2534, 2529, 2526, 1787, 2540, 2537, 907, 904, 900, 910, 2503, 2502, 2500, 2498, 1768, 2495, 1767, 2510, 2508, 2506, 869, 866, 863, 2513, 876, 874, 1782, 2720, 2713, 2711, 2697, 2694, 2691, 2702, 2672, 2670, 2664, 1828, 2678, 2675, 2647, 2646, 2644, 2642, 1823, 2639, 1822, 2654, 2652, 2650, 2657, 2771, 1855, 2765, 2762, 1850, 1849, 2751, 2749, 2747, 2754, 353, 2148, 344, 342, 336, 2142, 332, 2140, 345, 1375, 1373, 306, 2130, 299, 2128, 295, 2125, 319, 314, 311, 2132, 1354, 1352, 1349, 1356, 262, 257, 2101, 253, 2096, 2093, 274, 273, 267, 2107, 263, 2104, 280, 278, 275, 1316, 1311, 1308, 1320, 1318, 2052, 202, 2050, 2044, 2040, 219, 2063, 212, 2060, 208, 2055, 224, 221, 2066, 1260, 1258, 1252, 231, 1248, 229, 1266, 1264, 1261, 1268, 155, 1998, 153, 1996, 1994, 1991, 1988, 165, 164, 2007, 162, 2006, 159, 2003, 2e3, 172, 171, 169, 2012, 166, 2010, 1186, 1184, 1182, 1179, 175, 1176, 173, 1192, 1191, 1189, 1187, 176, 1194, 1193, 2313, 2307, 2305, 592, 589, 2294, 2292, 2289, 578, 572, 568, 2297, 580, 1591, 2272, 2267, 2264, 1547, 538, 536, 529, 2278, 525, 2275, 547, 544, 541, 1574, 1571, 2237, 2235, 2229, 1493, 2225, 1489, 478, 2247, 470, 2244, 465, 2241, 493, 488, 484, 2250, 498, 495, 1536, 1533, 1530, 1539, 2187, 2186, 2184, 2182, 1432, 2179, 1430, 2176, 1427, 414, 412, 2197, 409, 2195, 405, 2193, 2190, 426, 424, 421, 2203, 418, 2201, 431, 429, 1473, 1471, 1469, 1466, 434, 1477, 1475, 2478, 2472, 2470, 2459, 2457, 2454, 2462, 803, 2437, 2432, 2429, 1726, 2443, 2440, 792, 789, 785, 2401, 2399, 2393, 1702, 2389, 1699, 2411, 2408, 2405, 745, 741, 2415, 758, 755, 1721, 2358, 2357, 2355, 2353, 1661, 2350, 1660, 2347, 1657, 2368, 2366, 2364, 2361, 1666, 690, 687, 2374, 683, 2372, 701, 698, 705, 1691, 1689, 2619, 2617, 2610, 2608, 2605, 2613, 2593, 2588, 2585, 1803, 2599, 2596, 2563, 2561, 2555, 1797, 2551, 1795, 2573, 2570, 2567, 2577, 2525, 2524, 2522, 2520, 1786, 2517, 1785, 2514, 1783, 2535, 2533, 2531, 2528, 1788, 2541, 2539, 906, 903, 911, 2721, 1844, 2715, 2712, 1838, 1836, 2699, 2696, 2693, 2703, 1827, 1826, 1824, 2673, 2671, 2669, 2666, 1829, 2679, 2677, 1858, 1857, 2772, 1854, 1853, 1851, 1856, 2766, 2764, 143, 1987, 139, 1986, 135, 133, 131, 1984, 128, 1983, 125, 1981, 138, 137, 136, 1985, 1133, 1132, 1130, 112, 110, 1974, 107, 1973, 104, 1971, 1969, 122, 121, 119, 117, 1977, 114, 1976, 124, 1115, 1114, 1112, 1110, 1117, 1116, 84, 83, 1953, 81, 1952, 78, 1950, 1948, 1945, 94, 93, 91, 1959, 88, 1958, 85, 1955, 99, 97, 95, 1961, 1086, 1085, 1083, 1081, 1078, 100, 1090, 1089, 1087, 1091, 49, 47, 1917, 44, 1915, 1913, 1910, 1907, 59, 1926, 56, 1925, 53, 1922, 1919, 66, 64, 1931, 61, 1929, 1042, 1040, 1038, 71, 1035, 70, 1032, 68, 1048, 1047, 1045, 1043, 1050, 1049, 12, 10, 1869, 1867, 1864, 1861, 21, 1880, 19, 1877, 1874, 1871, 28, 1888, 25, 1886, 22, 1883, 982, 980, 977, 974, 32, 30, 991, 989, 987, 984, 34, 995, 994, 992, 2151, 2150, 2147, 2146, 2144, 356, 355, 354, 2149, 2139, 2138, 2136, 2134, 1359, 343, 341, 338, 2143, 335, 2141, 348, 347, 346, 1376, 1374, 2124, 2123, 2121, 2119, 1326, 2116, 1324, 310, 308, 305, 2131, 302, 2129, 298, 2127, 320, 318, 316, 313, 2133, 322, 321, 1355, 1353, 1351, 1357, 2092, 2091, 2089, 2087, 1276, 2084, 1274, 2081, 1271, 259, 2102, 256, 2100, 252, 2098, 2095, 272, 269, 2108, 266, 2106, 281, 279, 277, 1317, 1315, 1313, 1310, 282, 1321, 1319, 2039, 2037, 2035, 2032, 1203, 2029, 1200, 1197, 207, 2053, 205, 2051, 201, 2049, 2046, 2043, 220, 218, 2064, 215, 2062, 211, 2059, 228, 226, 223, 2069, 1259, 1257, 1254, 232, 1251, 230, 1267, 1265, 1263, 2316, 2315, 2312, 2311, 2309, 2314, 2304, 2303, 2301, 2299, 1593, 2308, 2306, 590, 2288, 2287, 2285, 2283, 1578, 2280, 1577, 2295, 2293, 2291, 579, 577, 574, 571, 2298, 582, 581, 1592, 2263, 2262, 2260, 2258, 1545, 2255, 1544, 2252, 1541, 2273, 2271, 2269, 2266, 1550, 535, 532, 2279, 528, 2277, 546, 543, 549, 1575, 1573, 2224, 2222, 2220, 1486, 2217, 1485, 2214, 1482, 1479, 2238, 2236, 2234, 2231, 1496, 2228, 1492, 480, 477, 2248, 473, 2246, 469, 2243, 490, 487, 2251, 497, 1537, 1535, 1532, 2477, 2476, 2474, 2479, 2469, 2468, 2466, 2464, 1730, 2473, 2471, 2453, 2452, 2450, 2448, 1729, 2445, 1728, 2460, 2458, 2456, 2463, 805, 804, 2428, 2427, 2425, 2423, 1725, 2420, 1724, 2417, 1722, 2438, 2436, 2434, 2431, 1727, 2444, 2442, 793, 791, 788, 795, 2388, 2386, 2384, 1697, 2381, 1696, 2378, 1694, 1692, 2402, 2400, 2398, 2395, 1703, 2392, 1701, 2412, 2410, 2407, 751, 748, 744, 2416, 759, 757, 1807, 2620, 2618, 1806, 1805, 2611, 2609, 2607, 2614, 1802, 1801, 1799, 2594, 2592, 2590, 2587, 1804, 2600, 2598, 1794, 1793, 1791, 1789, 2564, 2562, 2560, 2557, 1798, 2554, 1796, 2574, 2572, 2569, 2578, 1847, 1846, 2722, 1843, 1842, 1840, 1845, 2716, 2714, 1835, 1834, 1832, 1830, 1839, 1837, 2700, 2698, 2695, 2704, 1817, 1811, 1810, 897, 862, 1777, 829, 826, 838, 1760, 1758, 808, 2481, 1741, 1740, 1738, 1743, 2624, 1818, 2726, 2776, 782, 740, 737, 1715, 686, 679, 695, 1682, 1680, 639, 628, 2339, 647, 644, 1645, 1643, 1640, 1648, 602, 600, 597, 595, 2320, 593, 2318, 609, 607, 604, 1611, 1610, 1608, 1606, 613, 1615, 1613, 2328, 926, 924, 892, 886, 899, 857, 850, 2505, 1778, 824, 823, 821, 819, 2488, 818, 2486, 833, 831, 828, 840, 1761, 1759, 2649, 2632, 2630, 2746, 2734, 2732, 2782, 2781, 570, 567, 1587, 531, 527, 523, 540, 1566, 1564, 476, 467, 463, 2240, 486, 483, 1524, 1521, 1518, 1529, 411, 403, 2192, 399, 2189, 423, 416, 1462, 1457, 1454, 428, 1468, 1465, 2210, 366, 363, 2158, 360, 2156, 357, 2153, 376, 373, 370, 2163, 1410, 1409, 1407, 1405, 382, 1402, 380, 1417, 1415, 1412, 1421, 2175, 2174, 777, 774, 771, 784, 732, 725, 722, 2404, 743, 1716, 676, 674, 668, 2363, 665, 2360, 685, 1684, 1681, 626, 624, 622, 2335, 620, 2333, 617, 2330, 641, 635, 649, 1646, 1644, 1642, 2566, 928, 925, 2530, 2527, 894, 891, 888, 2501, 2499, 2496, 858, 856, 854, 851, 1779, 2692, 2668, 2665, 2645, 2643, 2640, 2651, 2768, 2759, 2757, 2744, 2743, 2741, 2748, 352, 1382, 340, 337, 333, 1371, 1369, 307, 300, 296, 2126, 315, 312, 1347, 1342, 1350, 261, 258, 250, 2097, 246, 2094, 271, 268, 264, 1306, 1301, 1298, 276, 1312, 1309, 2115, 203, 2048, 195, 2045, 191, 2041, 213, 209, 2056, 1246, 1244, 1238, 225, 1234, 222, 1256, 1253, 1249, 1262, 2080, 2079, 154, 1997, 150, 1995, 147, 1992, 1989, 163, 160, 2004, 156, 2001, 1175, 1174, 1172, 1170, 1167, 170, 1164, 167, 1185, 1183, 1180, 1177, 174, 1190, 1188, 2025, 2024, 2022, 587, 586, 564, 559, 556, 2290, 573, 1588, 520, 518, 512, 2268, 508, 2265, 530, 1568, 1565, 461, 457, 2233, 450, 2230, 446, 2226, 479, 471, 489, 1526, 1523, 1520, 397, 395, 2185, 392, 2183, 389, 2180, 2177, 410, 2194, 402, 422, 1463, 1461, 1459, 1456, 1470, 2455, 799, 2433, 2430, 779, 776, 773, 2397, 2394, 2390, 734, 728, 724, 746, 1717, 2356, 2354, 2351, 2348, 1658, 677, 675, 673, 670, 667, 688, 1685, 1683, 2606, 2589, 2586, 2559, 2556, 2552, 927, 2523, 2521, 2518, 2515, 1784, 2532, 895, 893, 890, 2718, 2709, 2707, 2689, 2687, 2684, 2663, 2662, 2660, 2658, 1825, 2667, 2769, 1852, 2760, 2758, 142, 141, 1139, 1138, 134, 132, 129, 126, 1982, 1129, 1128, 1126, 1131, 113, 111, 108, 105, 1972, 101, 1970, 120, 118, 115, 1109, 1108, 1106, 1104, 123, 1113, 1111, 82, 79, 1951, 75, 1949, 72, 1946, 92, 89, 86, 1956, 1077, 1076, 1074, 1072, 98, 1069, 96, 1084, 1082, 1079, 1088, 1968, 1967, 48, 45, 1916, 42, 1914, 39, 1911, 1908, 60, 57, 54, 1923, 50, 1920, 1031, 1030, 1028, 1026, 67, 1023, 65, 1020, 62, 1041, 1039, 1036, 1033, 69, 1046, 1044, 1944, 1943, 1941, 11, 9, 1868, 7, 1865, 1862, 1859, 20, 1878, 16, 1875, 13, 1872, 970, 968, 966, 963, 29, 960, 26, 23, 983, 981, 978, 975, 33, 971, 31, 990, 988, 985, 1906, 1904, 1902, 993, 351, 2145, 1383, 331, 330, 328, 326, 2137, 323, 2135, 339, 1372, 1370, 294, 293, 291, 289, 2122, 286, 2120, 283, 2117, 309, 303, 317, 1348, 1346, 1344, 245, 244, 242, 2090, 239, 2088, 236, 2085, 2082, 260, 2099, 249, 270, 1307, 1305, 1303, 1300, 1314, 189, 2038, 186, 2036, 183, 2033, 2030, 2026, 206, 198, 2047, 194, 216, 1247, 1245, 1243, 1240, 227, 1237, 1255, 2310, 2302, 2300, 2286, 2284, 2281, 565, 563, 561, 558, 575, 1589, 2261, 2259, 2256, 2253, 1542, 521, 519, 517, 514, 2270, 511, 533, 1569, 1567, 2223, 2221, 2218, 2215, 1483, 2211, 1480, 459, 456, 453, 2232, 449, 474, 491, 1527, 1525, 1522, 2475, 2467, 2465, 2451, 2449, 2446, 801, 800, 2426, 2424, 2421, 2418, 1723, 2435, 780, 778, 775, 2387, 2385, 2382, 2379, 1695, 2375, 1693, 2396, 735, 733, 730, 727, 749, 1718, 2616, 2615, 2604, 2603, 2601, 2584, 2583, 2581, 2579, 1800, 2591, 2550, 2549, 2547, 2545, 1792, 2542, 1790, 2558, 929, 2719, 1841, 2710, 2708, 1833, 1831, 2690, 2688, 2686, 1815, 1809, 1808, 1774, 1756, 1754, 1737, 1736, 1734, 1739, 1816, 1711, 1676, 1674, 633, 629, 1638, 1636, 1633, 1641, 598, 1605, 1604, 1602, 1600, 605, 1609, 1607, 2327, 887, 853, 1775, 822, 820, 1757, 1755, 1584, 524, 1560, 1558, 468, 464, 1514, 1511, 1508, 1519, 408, 404, 400, 1452, 1447, 1444, 417, 1458, 1455, 2208, 364, 361, 358, 2154, 1401, 1400, 1398, 1396, 374, 1393, 371, 1408, 1406, 1403, 1413, 2173, 2172, 772, 726, 723, 1712, 672, 669, 666, 682, 1678, 1675, 625, 623, 621, 618, 2331, 636, 632, 1639, 1637, 1635, 920, 918, 884, 880, 889, 849, 848, 847, 846, 2497, 855, 852, 1776, 2641, 2742, 2787, 1380, 334, 1367, 1365, 301, 297, 1340, 1338, 1335, 1343, 255, 251, 247, 1296, 1291, 1288, 265, 1302, 1299, 2113, 204, 196, 192, 2042, 1232, 1230, 1224, 214, 1220, 210, 1242, 1239, 1235, 1250, 2077, 2075, 151, 148, 1993, 144, 1990, 1163, 1162, 1160, 1158, 1155, 161, 1152, 157, 1173, 1171, 1168, 1165, 168, 1181, 1178, 2021, 2020, 2018, 2023, 585, 560, 557, 1585, 516, 509, 1562, 1559, 458, 447, 2227, 472, 1516, 1513, 1510, 398, 396, 393, 390, 2181, 386, 2178, 407, 1453, 1451, 1449, 1446, 420, 1460, 2209, 769, 764, 720, 712, 2391, 729, 1713, 664, 663, 661, 659, 2352, 656, 2349, 671, 1679, 1677, 2553, 922, 919, 2519, 2516, 885, 883, 881, 2685, 2661, 2659, 2767, 2756, 2755, 140, 1137, 1136, 130, 127, 1125, 1124, 1122, 1127, 109, 106, 102, 1103, 1102, 1100, 1098, 116, 1107, 1105, 1980, 80, 76, 73, 1947, 1068, 1067, 1065, 1063, 90, 1060, 87, 1075, 1073, 1070, 1080, 1966, 1965, 46, 43, 40, 1912, 36, 1909, 1019, 1018, 1016, 1014, 58, 1011, 55, 1008, 51, 1029, 1027, 1024, 1021, 63, 1037, 1034, 1940, 1939, 1937, 1942, 8, 1866, 4, 1863, 1, 1860, 956, 954, 952, 949, 946, 17, 14, 969, 967, 964, 961, 27, 957, 24, 979, 976, 972, 1901, 1900, 1898, 1896, 986, 1905, 1903, 350, 349, 1381, 329, 327, 324, 1368, 1366, 292, 290, 287, 284, 2118, 304, 1341, 1339, 1337, 1345, 243, 240, 237, 2086, 233, 2083, 254, 1297, 1295, 1293, 1290, 1304, 2114, 190, 187, 184, 2034, 180, 2031, 177, 2027, 199, 1233, 1231, 1229, 1226, 217, 1223, 1241, 2078, 2076, 584, 555, 554, 552, 550, 2282, 562, 1586, 507, 506, 504, 502, 2257, 499, 2254, 515, 1563, 1561, 445, 443, 441, 2219, 438, 2216, 435, 2212, 460, 454, 475, 1517, 1515, 1512, 2447, 798, 797, 2422, 2419, 770, 768, 766, 2383, 2380, 2376, 721, 719, 717, 714, 731, 1714, 2602, 2582, 2580, 2548, 2546, 2543, 923, 921, 2717, 2706, 2705, 2683, 2682, 2680, 1771, 1752, 1750, 1733, 1732, 1731, 1735, 1814, 1707, 1670, 1668, 1631, 1629, 1626, 1634, 1599, 1598, 1596, 1594, 1603, 1601, 2326, 1772, 1753, 1751, 1581, 1554, 1552, 1504, 1501, 1498, 1509, 1442, 1437, 1434, 401, 1448, 1445, 2206, 1392, 1391, 1389, 1387, 1384, 359, 1399, 1397, 1394, 1404, 2171, 2170, 1708, 1672, 1669, 619, 1632, 1630, 1628, 1773, 1378, 1363, 1361, 1333, 1328, 1336, 1286, 1281, 1278, 248, 1292, 1289, 2111, 1218, 1216, 1210, 197, 1206, 193, 1228, 1225, 1221, 1236, 2073, 2071, 1151, 1150, 1148, 1146, 152, 1143, 149, 1140, 145, 1161, 1159, 1156, 1153, 158, 1169, 1166, 2017, 2016, 2014, 2019, 1582, 510, 1556, 1553, 452, 448, 1506, 1500, 394, 391, 387, 1443, 1441, 1439, 1436, 1450, 2207, 765, 716, 713, 1709, 662, 660, 657, 1673, 1671, 916, 914, 879, 878, 877, 882, 1135, 1134, 1121, 1120, 1118, 1123, 1097, 1096, 1094, 1092, 103, 1101, 1099, 1979, 1059, 1058, 1056, 1054, 77, 1051, 74, 1066, 1064, 1061, 1071, 1964, 1963, 1007, 1006, 1004, 1002, 999, 41, 996, 37, 1017, 1015, 1012, 1009, 52, 1025, 1022, 1936, 1935, 1933, 1938, 942, 940, 938, 935, 932, 5, 2, 955, 953, 950, 947, 18, 943, 15, 965, 962, 958, 1895, 1894, 1892, 1890, 973, 1899, 1897, 1379, 325, 1364, 1362, 288, 285, 1334, 1332, 1330, 241, 238, 234, 1287, 1285, 1283, 1280, 1294, 2112, 188, 185, 181, 178, 2028, 1219, 1217, 1215, 1212, 200, 1209, 1227, 2074, 2072, 583, 553, 551, 1583, 505, 503, 500, 513, 1557, 1555, 444, 442, 439, 436, 2213, 455, 451, 1507, 1505, 1502, 796, 763, 762, 760, 767, 711, 710, 708, 706, 2377, 718, 715, 1710, 2544, 917, 915, 2681, 1627, 1597, 1595, 2325, 1769, 1749, 1747, 1499, 1438, 1435, 2204, 1390, 1388, 1385, 1395, 2169, 2167, 1704, 1665, 1662, 1625, 1623, 1620, 1770, 1329, 1282, 1279, 2109, 1214, 1207, 1222, 2068, 2065, 1149, 1147, 1144, 1141, 146, 1157, 1154, 2013, 2011, 2008, 2015, 1579, 1549, 1546, 1495, 1487, 1433, 1431, 1428, 1425, 388, 1440, 2205, 1705, 658, 1667, 1664, 1119, 1095, 1093, 1978, 1057, 1055, 1052, 1062, 1962, 1960, 1005, 1003, 1e3, 997, 38, 1013, 1010, 1932, 1930, 1927, 1934, 941, 939, 936, 933, 6, 930, 3, 951, 948, 944, 1889, 1887, 1884, 1881, 959, 1893, 1891, 35, 1377, 1360, 1358, 1327, 1325, 1322, 1331, 1277, 1275, 1272, 1269, 235, 1284, 2110, 1205, 1204, 1201, 1198, 182, 1195, 179, 1213, 2070, 2067, 1580, 501, 1551, 1548, 440, 437, 1497, 1494, 1490, 1503, 761, 709, 707, 1706, 913, 912, 2198, 1386, 2164, 2161, 1621, 1766, 2103, 1208, 2058, 2054, 1145, 1142, 2005, 2002, 1999, 2009, 1488, 1429, 1426, 2200, 1698, 1659, 1656, 1975, 1053, 1957, 1954, 1001, 998, 1924, 1921, 1918, 1928, 937, 934, 931, 1879, 1876, 1873, 1870, 945, 1885, 1882, 1323, 1273, 1270, 2105, 1202, 1199, 1196, 1211, 2061, 2057, 1576, 1543, 1540, 1484, 1481, 1478, 1491, 1700]),
    t
}(), $Ce = function() {
    function t(e, r) {
        this.bits = e,
        this.points = r
    }
    return t.prototype.getBits = function() {
        return this.bits
    }
    ,
    t.prototype.getPoints = function() {
        return this.points
    }
    ,
    t
}(), UCe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, GCe = function() {
    function t() {}
    return t.detectMultiple = function(e, r, n) {
        var i = e.getBlackMatrix()
          , o = t.detect(n, i);
        return o.length || (i = i.clone(),
        i.rotate180(),
        o = t.detect(n, i)),
        new $Ce(i,o)
    }
    ,
    t.detect = function(e, r) {
        for (var n, i, o = new Array, s = 0, a = 0, l = !1; s < r.getHeight(); ) {
            var c = t.findVertices(r, s, a);
            if (c[0] == null && c[3] == null) {
                if (!l)
                    break;
                l = !1,
                a = 0;
                try {
                    for (var u = (n = void 0,
                    UCe(o)), f = u.next(); !f.done; f = u.next()) {
                        var d = f.value;
                        d[1] != null && (s = Math.trunc(Math.max(s, d[1].getY()))),
                        d[3] != null && (s = Math.max(s, Math.trunc(d[3].getY())))
                    }
                } catch (h) {
                    n = {
                        error: h
                    }
                } finally {
                    try {
                        f && !f.done && (i = u.return) && i.call(u)
                    } finally {
                        if (n)
                            throw n.error
                    }
                }
                s += t.ROW_STEP;
                continue
            }
            if (l = !0,
            o.push(c),
            !e)
                break;
            c[2] != null ? (a = Math.trunc(c[2].getX()),
            s = Math.trunc(c[2].getY())) : (a = Math.trunc(c[4].getX()),
            s = Math.trunc(c[4].getY()))
        }
        return o
    }
    ,
    t.findVertices = function(e, r, n) {
        var i = e.getHeight()
          , o = e.getWidth()
          , s = new Array(8);
        return t.copyToResult(s, t.findRowsWithPattern(e, i, o, r, n, t.START_PATTERN), t.INDEXES_START_PATTERN),
        s[4] != null && (n = Math.trunc(s[4].getX()),
        r = Math.trunc(s[4].getY())),
        t.copyToResult(s, t.findRowsWithPattern(e, i, o, r, n, t.STOP_PATTERN), t.INDEXES_STOP_PATTERN),
        s
    }
    ,
    t.copyToResult = function(e, r, n) {
        for (var i = 0; i < n.length; i++)
            e[n[i]] = r[i]
    }
    ,
    t.findRowsWithPattern = function(e, r, n, i, o, s) {
        for (var a = new Array(4), l = !1, c = new Int32Array(s.length); i < r; i += t.ROW_STEP) {
            var u = t.findGuardPattern(e, o, i, n, !1, s, c);
            if (u != null) {
                for (; i > 0; ) {
                    var f = t.findGuardPattern(e, o, --i, n, !1, s, c);
                    if (f != null)
                        u = f;
                    else {
                        i++;
                        break
                    }
                }
                a[0] = new Te(u[0],i),
                a[1] = new Te(u[1],i),
                l = !0;
                break
            }
        }
        var d = i + 1;
        if (l) {
            for (var h = 0, f = Int32Array.from([Math.trunc(a[0].getX()), Math.trunc(a[1].getX())]); d < r; d++) {
                var u = t.findGuardPattern(e, f[0], d, n, !1, s, c);
                if (u != null && Math.abs(f[0] - u[0]) < t.MAX_PATTERN_DRIFT && Math.abs(f[1] - u[1]) < t.MAX_PATTERN_DRIFT)
                    f = u,
                    h = 0;
                else {
                    if (h > t.SKIPPED_ROW_COUNT_MAX)
                        break;
                    h++
                }
            }
            d -= h + 1,
            a[2] = new Te(f[0],d),
            a[3] = new Te(f[1],d)
        }
        return d - i < t.BARCODE_MIN_HEIGHT && br.fill(a, null),
        a
    }
    ,
    t.findGuardPattern = function(e, r, n, i, o, s, a) {
        br.fillWithin(a, 0, a.length, 0);
        for (var l = r, c = 0; e.get(l, n) && l > 0 && c++ < t.MAX_PIXEL_DRIFT; )
            l--;
        for (var u = l, f = 0, d = s.length, h = o; u < i; u++) {
            var x = e.get(u, n);
            if (x !== h)
                a[f]++;
            else {
                if (f === d - 1) {
                    if (t.patternMatchVariance(a, s, t.MAX_INDIVIDUAL_VARIANCE) < t.MAX_AVG_VARIANCE)
                        return new Int32Array([l, u]);
                    l += a[0] + a[1],
                    Ft.arraycopy(a, 2, a, 0, f - 1),
                    a[f - 1] = 0,
                    a[f] = 0,
                    f--
                } else
                    f++;
                a[f] = 1,
                h = !h
            }
        }
        return f === d - 1 && t.patternMatchVariance(a, s, t.MAX_INDIVIDUAL_VARIANCE) < t.MAX_AVG_VARIANCE ? new Int32Array([l, u - 1]) : null
    }
    ,
    t.patternMatchVariance = function(e, r, n) {
        for (var i = e.length, o = 0, s = 0, a = 0; a < i; a++)
            o += e[a],
            s += r[a];
        if (o < s)
            return 1 / 0;
        var l = o / s;
        n *= l;
        for (var c = 0, u = 0; u < i; u++) {
            var f = e[u]
              , d = r[u] * l
              , h = f > d ? f - d : d - f;
            if (h > n)
                return 1 / 0;
            c += h
        }
        return c / o
    }
    ,
    t.INDEXES_START_PATTERN = Int32Array.from([0, 4, 1, 5]),
    t.INDEXES_STOP_PATTERN = Int32Array.from([6, 2, 7, 3]),
    t.MAX_AVG_VARIANCE = .42,
    t.MAX_INDIVIDUAL_VARIANCE = .8,
    t.START_PATTERN = Int32Array.from([8, 1, 1, 1, 1, 1, 1, 3]),
    t.STOP_PATTERN = Int32Array.from([7, 1, 1, 3, 1, 1, 1, 2, 1]),
    t.MAX_PIXEL_DRIFT = 3,
    t.MAX_PATTERN_DRIFT = 5,
    t.SKIPPED_ROW_COUNT_MAX = 25,
    t.ROW_STEP = 5,
    t.BARCODE_MIN_HEIGHT = 10,
    t
}(), HCe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, nl = function() {
    function t(e, r) {
        if (r.length === 0)
            throw new Me;
        this.field = e;
        var n = r.length;
        if (n > 1 && r[0] === 0) {
            for (var i = 1; i < n && r[i] === 0; )
                i++;
            i === n ? this.coefficients = new Int32Array([0]) : (this.coefficients = new Int32Array(n - i),
            Ft.arraycopy(r, i, this.coefficients, 0, this.coefficients.length))
        } else
            this.coefficients = r
    }
    return t.prototype.getCoefficients = function() {
        return this.coefficients
    }
    ,
    t.prototype.getDegree = function() {
        return this.coefficients.length - 1
    }
    ,
    t.prototype.isZero = function() {
        return this.coefficients[0] === 0
    }
    ,
    t.prototype.getCoefficient = function(e) {
        return this.coefficients[this.coefficients.length - 1 - e]
    }
    ,
    t.prototype.evaluateAt = function(e) {
        var r, n;
        if (e === 0)
            return this.getCoefficient(0);
        if (e === 1) {
            var i = 0;
            try {
                for (var o = HCe(this.coefficients), s = o.next(); !s.done; s = o.next()) {
                    var a = s.value;
                    i = this.field.add(i, a)
                }
            } catch (f) {
                r = {
                    error: f
                }
            } finally {
                try {
                    s && !s.done && (n = o.return) && n.call(o)
                } finally {
                    if (r)
                        throw r.error
                }
            }
            return i
        }
        for (var l = this.coefficients[0], c = this.coefficients.length, u = 1; u < c; u++)
            l = this.field.add(this.field.multiply(e, l), this.coefficients[u]);
        return l
    }
    ,
    t.prototype.add = function(e) {
        if (!this.field.equals(e.field))
            throw new Me("ModulusPolys do not have same ModulusGF field");
        if (this.isZero())
            return e;
        if (e.isZero())
            return this;
        var r = this.coefficients
          , n = e.coefficients;
        if (r.length > n.length) {
            var i = r;
            r = n,
            n = i
        }
        var o = new Int32Array(n.length)
          , s = n.length - r.length;
        Ft.arraycopy(n, 0, o, 0, s);
        for (var a = s; a < n.length; a++)
            o[a] = this.field.add(r[a - s], n[a]);
        return new t(this.field,o)
    }
    ,
    t.prototype.subtract = function(e) {
        if (!this.field.equals(e.field))
            throw new Me("ModulusPolys do not have same ModulusGF field");
        return e.isZero() ? this : this.add(e.negative())
    }
    ,
    t.prototype.multiply = function(e) {
        return e instanceof t ? this.multiplyOther(e) : this.multiplyScalar(e)
    }
    ,
    t.prototype.multiplyOther = function(e) {
        if (!this.field.equals(e.field))
            throw new Me("ModulusPolys do not have same ModulusGF field");
        if (this.isZero() || e.isZero())
            return new t(this.field,new Int32Array([0]));
        for (var r = this.coefficients, n = r.length, i = e.coefficients, o = i.length, s = new Int32Array(n + o - 1), a = 0; a < n; a++)
            for (var l = r[a], c = 0; c < o; c++)
                s[a + c] = this.field.add(s[a + c], this.field.multiply(l, i[c]));
        return new t(this.field,s)
    }
    ,
    t.prototype.negative = function() {
        for (var e = this.coefficients.length, r = new Int32Array(e), n = 0; n < e; n++)
            r[n] = this.field.subtract(0, this.coefficients[n]);
        return new t(this.field,r)
    }
    ,
    t.prototype.multiplyScalar = function(e) {
        if (e === 0)
            return new t(this.field,new Int32Array([0]));
        if (e === 1)
            return this;
        for (var r = this.coefficients.length, n = new Int32Array(r), i = 0; i < r; i++)
            n[i] = this.field.multiply(this.coefficients[i], e);
        return new t(this.field,n)
    }
    ,
    t.prototype.multiplyByMonomial = function(e, r) {
        if (e < 0)
            throw new Me;
        if (r === 0)
            return new t(this.field,new Int32Array([0]));
        for (var n = this.coefficients.length, i = new Int32Array(n + e), o = 0; o < n; o++)
            i[o] = this.field.multiply(this.coefficients[o], r);
        return new t(this.field,i)
    }
    ,
    t.prototype.toString = function() {
        for (var e = new Ke, r = this.getDegree(); r >= 0; r--) {
            var n = this.getCoefficient(r);
            n !== 0 && (n < 0 ? (e.append(" - "),
            n = -n) : e.length() > 0 && e.append(" + "),
            (r === 0 || n !== 1) && e.append(n),
            r !== 0 && (r === 1 ? e.append("x") : (e.append("x^"),
            e.append(r))))
        }
        return e.toString()
    }
    ,
    t
}(), VCe = function() {
    function t() {}
    return t.prototype.add = function(e, r) {
        return (e + r) % this.modulus
    }
    ,
    t.prototype.subtract = function(e, r) {
        return (this.modulus + e - r) % this.modulus
    }
    ,
    t.prototype.exp = function(e) {
        return this.expTable[e]
    }
    ,
    t.prototype.log = function(e) {
        if (e === 0)
            throw new Me;
        return this.logTable[e]
    }
    ,
    t.prototype.inverse = function(e) {
        if (e === 0)
            throw new PM;
        return this.expTable[this.modulus - this.logTable[e] - 1]
    }
    ,
    t.prototype.multiply = function(e, r) {
        return e === 0 || r === 0 ? 0 : this.expTable[(this.logTable[e] + this.logTable[r]) % (this.modulus - 1)]
    }
    ,
    t.prototype.getSize = function() {
        return this.modulus
    }
    ,
    t.prototype.equals = function(e) {
        return e === this
    }
    ,
    t
}(), zCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), jCe = function(t) {
    zCe(e, t);
    function e(r, n) {
        var i = t.call(this) || this;
        i.modulus = r,
        i.expTable = new Int32Array(r),
        i.logTable = new Int32Array(r);
        for (var o = 1, s = 0; s < r; s++)
            i.expTable[s] = o,
            o = o * n % r;
        for (var s = 0; s < r - 1; s++)
            i.logTable[i.expTable[s]] = s;
        return i.zero = new nl(i,new Int32Array([0])),
        i.one = new nl(i,new Int32Array([1])),
        i
    }
    return e.prototype.getZero = function() {
        return this.zero
    }
    ,
    e.prototype.getOne = function() {
        return this.one
    }
    ,
    e.prototype.buildMonomial = function(r, n) {
        if (r < 0)
            throw new Me;
        if (n === 0)
            return this.zero;
        var i = new Int32Array(r + 1);
        return i[0] = n,
        new nl(this,i)
    }
    ,
    e.PDF417_GF = new e(at.NUMBER_OF_CODEWORDS,3),
    e
}(VCe), WCe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, YCe = function() {
    function t() {
        this.field = jCe.PDF417_GF
    }
    return t.prototype.decode = function(e, r, n) {
        for (var i, o, s = new nl(this.field,e), a = new Int32Array(r), l = !1, c = r; c > 0; c--) {
            var u = s.evaluateAt(this.field.exp(c));
            a[r - c] = u,
            u !== 0 && (l = !0)
        }
        if (!l)
            return 0;
        var f = this.field.getOne();
        if (n != null)
            try {
                for (var d = WCe(n), h = d.next(); !h.done; h = d.next()) {
                    var x = h.value
                      , y = this.field.exp(e.length - 1 - x)
                      , m = new nl(this.field,new Int32Array([this.field.subtract(0, y), 1]));
                    f = f.multiply(m)
                }
            } catch (w) {
                i = {
                    error: w
                }
            } finally {
                try {
                    h && !h.done && (o = d.return) && o.call(d)
                } finally {
                    if (i)
                        throw i.error
                }
            }
        for (var E = new nl(this.field,a), g = this.runEuclideanAlgorithm(this.field.buildMonomial(r, 1), E, r), p = g[0], v = g[1], _ = this.findErrorLocations(p), b = this.findErrorMagnitudes(v, p, _), c = 0; c < _.length; c++) {
            var C = e.length - 1 - this.field.log(_[c]);
            if (C < 0)
                throw fr.getChecksumInstance();
            e[C] = this.field.subtract(e[C], b[c])
        }
        return _.length
    }
    ,
    t.prototype.runEuclideanAlgorithm = function(e, r, n) {
        if (e.getDegree() < r.getDegree()) {
            var i = e;
            e = r,
            r = i
        }
        for (var o = e, s = r, a = this.field.getZero(), l = this.field.getOne(); s.getDegree() >= Math.round(n / 2); ) {
            var c = o
              , u = a;
            if (o = s,
            a = l,
            o.isZero())
                throw fr.getChecksumInstance();
            s = c;
            for (var f = this.field.getZero(), d = o.getCoefficient(o.getDegree()), h = this.field.inverse(d); s.getDegree() >= o.getDegree() && !s.isZero(); ) {
                var x = s.getDegree() - o.getDegree()
                  , y = this.field.multiply(s.getCoefficient(s.getDegree()), h);
                f = f.add(this.field.buildMonomial(x, y)),
                s = s.subtract(o.multiplyByMonomial(x, y))
            }
            l = f.multiply(a).subtract(u).negative()
        }
        var m = l.getCoefficient(0);
        if (m === 0)
            throw fr.getChecksumInstance();
        var E = this.field.inverse(m)
          , g = l.multiply(E)
          , p = s.multiply(E);
        return [g, p]
    }
    ,
    t.prototype.findErrorLocations = function(e) {
        for (var r = e.getDegree(), n = new Int32Array(r), i = 0, o = 1; o < this.field.getSize() && i < r; o++)
            e.evaluateAt(o) === 0 && (n[i] = this.field.inverse(o),
            i++);
        if (i !== r)
            throw fr.getChecksumInstance();
        return n
    }
    ,
    t.prototype.findErrorMagnitudes = function(e, r, n) {
        for (var i = r.getDegree(), o = new Int32Array(i), s = 1; s <= i; s++)
            o[i - s] = this.field.multiply(s, r.getCoefficient(s));
        for (var a = new nl(this.field,o), l = n.length, c = new Int32Array(l), s = 0; s < l; s++) {
            var u = this.field.inverse(n[s])
              , f = this.field.subtract(0, e.evaluateAt(u))
              , d = this.field.inverse(a.evaluateAt(u));
            c[s] = this.field.multiply(f, d)
        }
        return c
    }
    ,
    t
}(), ZE = function() {
    function t(e, r, n, i, o) {
        e instanceof t ? this.constructor_2(e) : this.constructor_1(e, r, n, i, o)
    }
    return t.prototype.constructor_1 = function(e, r, n, i, o) {
        var s = r == null || n == null
          , a = i == null || o == null;
        if (s && a)
            throw new le;
        s ? (r = new Te(0,i.getY()),
        n = new Te(0,o.getY())) : a && (i = new Te(e.getWidth() - 1,r.getY()),
        o = new Te(e.getWidth() - 1,n.getY())),
        this.image = e,
        this.topLeft = r,
        this.bottomLeft = n,
        this.topRight = i,
        this.bottomRight = o,
        this.minX = Math.trunc(Math.min(r.getX(), n.getX())),
        this.maxX = Math.trunc(Math.max(i.getX(), o.getX())),
        this.minY = Math.trunc(Math.min(r.getY(), i.getY())),
        this.maxY = Math.trunc(Math.max(n.getY(), o.getY()))
    }
    ,
    t.prototype.constructor_2 = function(e) {
        this.image = e.image,
        this.topLeft = e.getTopLeft(),
        this.bottomLeft = e.getBottomLeft(),
        this.topRight = e.getTopRight(),
        this.bottomRight = e.getBottomRight(),
        this.minX = e.getMinX(),
        this.maxX = e.getMaxX(),
        this.minY = e.getMinY(),
        this.maxY = e.getMaxY()
    }
    ,
    t.merge = function(e, r) {
        return e == null ? r : r == null ? e : new t(e.image,e.topLeft,e.bottomLeft,r.topRight,r.bottomRight)
    }
    ,
    t.prototype.addMissingRows = function(e, r, n) {
        var i = this.topLeft
          , o = this.bottomLeft
          , s = this.topRight
          , a = this.bottomRight;
        if (e > 0) {
            var l = n ? this.topLeft : this.topRight
              , c = Math.trunc(l.getY() - e);
            c < 0 && (c = 0);
            var u = new Te(l.getX(),c);
            n ? i = u : s = u
        }
        if (r > 0) {
            var f = n ? this.bottomLeft : this.bottomRight
              , d = Math.trunc(f.getY() + r);
            d >= this.image.getHeight() && (d = this.image.getHeight() - 1);
            var h = new Te(f.getX(),d);
            n ? o = h : a = h
        }
        return new t(this.image,i,o,s,a)
    }
    ,
    t.prototype.getMinX = function() {
        return this.minX
    }
    ,
    t.prototype.getMaxX = function() {
        return this.maxX
    }
    ,
    t.prototype.getMinY = function() {
        return this.minY
    }
    ,
    t.prototype.getMaxY = function() {
        return this.maxY
    }
    ,
    t.prototype.getTopLeft = function() {
        return this.topLeft
    }
    ,
    t.prototype.getTopRight = function() {
        return this.topRight
    }
    ,
    t.prototype.getBottomLeft = function() {
        return this.bottomLeft
    }
    ,
    t.prototype.getBottomRight = function() {
        return this.bottomRight
    }
    ,
    t
}(), XCe = function() {
    function t(e, r, n, i) {
        this.columnCount = e,
        this.errorCorrectionLevel = i,
        this.rowCountUpperPart = r,
        this.rowCountLowerPart = n,
        this.rowCount = r + n
    }
    return t.prototype.getColumnCount = function() {
        return this.columnCount
    }
    ,
    t.prototype.getErrorCorrectionLevel = function() {
        return this.errorCorrectionLevel
    }
    ,
    t.prototype.getRowCount = function() {
        return this.rowCount
    }
    ,
    t.prototype.getRowCountUpperPart = function() {
        return this.rowCountUpperPart
    }
    ,
    t.prototype.getRowCountLowerPart = function() {
        return this.rowCountLowerPart
    }
    ,
    t
}(), NC = function() {
    function t() {
        this.buffer = ""
    }
    return t.form = function(e, r) {
        var n = -1;
        function i(s, a, l, c, u, f) {
            if (s === "%%")
                return "%";
            if (r[++n] !== void 0) {
                s = c ? parseInt(c.substr(1)) : void 0;
                var d = u ? parseInt(u.substr(1)) : void 0, h;
                switch (f) {
                case "s":
                    h = r[n];
                    break;
                case "c":
                    h = r[n][0];
                    break;
                case "f":
                    h = parseFloat(r[n]).toFixed(s);
                    break;
                case "p":
                    h = parseFloat(r[n]).toPrecision(s);
                    break;
                case "e":
                    h = parseFloat(r[n]).toExponential(s);
                    break;
                case "x":
                    h = parseInt(r[n]).toString(d || 16);
                    break;
                case "d":
                    h = parseFloat(parseInt(r[n], d || 10).toPrecision(s)).toFixed(0);
                    break
                }
                h = typeof h == "object" ? JSON.stringify(h) : (+h).toString(d);
                for (var x = parseInt(l), y = l && l[0] + "" == "0" ? "0" : " "; h.length < x; )
                    h = a !== void 0 ? h + y : y + h;
                return h
            }
        }
        var o = /%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;
        return e.replace(o, i)
    }
    ,
    t.prototype.format = function(e) {
        for (var r = [], n = 1; n < arguments.length; n++)
            r[n - 1] = arguments[n];
        this.buffer += t.form(e, r)
    }
    ,
    t.prototype.toString = function() {
        return this.buffer
    }
    ,
    t
}(), KCe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, $M = function() {
    function t(e) {
        this.boundingBox = new ZE(e),
        this.codewords = new Array(e.getMaxY() - e.getMinY() + 1)
    }
    return t.prototype.getCodewordNearby = function(e) {
        var r = this.getCodeword(e);
        if (r != null)
            return r;
        for (var n = 1; n < t.MAX_NEARBY_DISTANCE; n++) {
            var i = this.imageRowToCodewordIndex(e) - n;
            if (i >= 0 && (r = this.codewords[i],
            r != null) || (i = this.imageRowToCodewordIndex(e) + n,
            i < this.codewords.length && (r = this.codewords[i],
            r != null)))
                return r
        }
        return null
    }
    ,
    t.prototype.imageRowToCodewordIndex = function(e) {
        return e - this.boundingBox.getMinY()
    }
    ,
    t.prototype.setCodeword = function(e, r) {
        this.codewords[this.imageRowToCodewordIndex(e)] = r
    }
    ,
    t.prototype.getCodeword = function(e) {
        return this.codewords[this.imageRowToCodewordIndex(e)]
    }
    ,
    t.prototype.getBoundingBox = function() {
        return this.boundingBox
    }
    ,
    t.prototype.getCodewords = function() {
        return this.codewords
    }
    ,
    t.prototype.toString = function() {
        var e, r, n = new NC, i = 0;
        try {
            for (var o = KCe(this.codewords), s = o.next(); !s.done; s = o.next()) {
                var a = s.value;
                if (a == null) {
                    n.format("%3d:    |   %n", i++);
                    continue
                }
                n.format("%3d: %3d|%3d%n", i++, a.getRowNumber(), a.getValue())
            }
        } catch (l) {
            e = {
                error: l
            }
        } finally {
            try {
                s && !s.done && (r = o.return) && r.call(o)
            } finally {
                if (e)
                    throw e.error
            }
        }
        return n.toString()
    }
    ,
    t.MAX_NEARBY_DISTANCE = 5,
    t
}(), qCe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, ZCe = globalThis && globalThis.__read || function(t, e) {
    var r = typeof Symbol == "function" && t[Symbol.iterator];
    if (!r)
        return t;
    var n = r.call(t), i, o = [], s;
    try {
        for (; (e === void 0 || e-- > 0) && !(i = n.next()).done; )
            o.push(i.value)
    } catch (a) {
        s = {
            error: a
        }
    } finally {
        try {
            i && !i.done && (r = n.return) && r.call(n)
        } finally {
            if (s)
                throw s.error
        }
    }
    return o
}
, b0 = function() {
    function t() {
        this.values = new Map
    }
    return t.prototype.setValue = function(e) {
        e = Math.trunc(e);
        var r = this.values.get(e);
        r == null && (r = 0),
        r++,
        this.values.set(e, r)
    }
    ,
    t.prototype.getValue = function() {
        var e, r, n = -1, i = new Array, o = function(f, d) {
            var h = {
                getKey: function() {
                    return f
                },
                getValue: function() {
                    return d
                }
            };
            h.getValue() > n ? (n = h.getValue(),
            i = [],
            i.push(h.getKey())) : h.getValue() === n && i.push(h.getKey())
        };
        try {
            for (var s = qCe(this.values.entries()), a = s.next(); !a.done; a = s.next()) {
                var l = ZCe(a.value, 2)
                  , c = l[0]
                  , u = l[1];
                o(c, u)
            }
        } catch (f) {
            e = {
                error: f
            }
        } finally {
            try {
                a && !a.done && (r = s.return) && r.call(s)
            } finally {
                if (e)
                    throw e.error
            }
        }
        return at.toIntArray(i)
    }
    ,
    t.prototype.getConfidence = function(e) {
        return this.values.get(e)
    }
    ,
    t
}(), JCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), ev = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, A6 = function(t) {
    JCe(e, t);
    function e(r, n) {
        var i = t.call(this, r) || this;
        return i._isLeft = n,
        i
    }
    return e.prototype.setRowNumbers = function() {
        var r, n;
        try {
            for (var i = ev(this.getCodewords()), o = i.next(); !o.done; o = i.next()) {
                var s = o.value;
                s != null && s.setRowNumberAsRowIndicatorColumn()
            }
        } catch (a) {
            r = {
                error: a
            }
        } finally {
            try {
                o && !o.done && (n = i.return) && n.call(i)
            } finally {
                if (r)
                    throw r.error
            }
        }
    }
    ,
    e.prototype.adjustCompleteIndicatorColumnRowNumbers = function(r) {
        var n = this.getCodewords();
        this.setRowNumbers(),
        this.removeIncorrectCodewords(n, r);
        for (var i = this.getBoundingBox(), o = this._isLeft ? i.getTopLeft() : i.getTopRight(), s = this._isLeft ? i.getBottomLeft() : i.getBottomRight(), a = this.imageRowToCodewordIndex(Math.trunc(o.getY())), l = this.imageRowToCodewordIndex(Math.trunc(s.getY())), c = -1, u = 1, f = 0, d = a; d < l; d++)
            if (n[d] != null) {
                var h = n[d]
                  , x = h.getRowNumber() - c;
                if (x === 0)
                    f++;
                else if (x === 1)
                    u = Math.max(u, f),
                    f = 1,
                    c = h.getRowNumber();
                else if (x < 0 || h.getRowNumber() >= r.getRowCount() || x > d)
                    n[d] = null;
                else {
                    var y = void 0;
                    u > 2 ? y = (u - 2) * x : y = x;
                    for (var m = y >= d, E = 1; E <= y && !m; E++)
                        m = n[d - E] != null;
                    m ? n[d] = null : (c = h.getRowNumber(),
                    f = 1)
                }
            }
    }
    ,
    e.prototype.getRowHeights = function() {
        var r, n, i = this.getBarcodeMetadata();
        if (i == null)
            return null;
        this.adjustIncompleteIndicatorColumnRowNumbers(i);
        var o = new Int32Array(i.getRowCount());
        try {
            for (var s = ev(this.getCodewords()), a = s.next(); !a.done; a = s.next()) {
                var l = a.value;
                if (l != null) {
                    var c = l.getRowNumber();
                    if (c >= o.length)
                        continue;
                    o[c]++
                }
            }
        } catch (u) {
            r = {
                error: u
            }
        } finally {
            try {
                a && !a.done && (n = s.return) && n.call(s)
            } finally {
                if (r)
                    throw r.error
            }
        }
        return o
    }
    ,
    e.prototype.adjustIncompleteIndicatorColumnRowNumbers = function(r) {
        for (var n = this.getBoundingBox(), i = this._isLeft ? n.getTopLeft() : n.getTopRight(), o = this._isLeft ? n.getBottomLeft() : n.getBottomRight(), s = this.imageRowToCodewordIndex(Math.trunc(i.getY())), a = this.imageRowToCodewordIndex(Math.trunc(o.getY())), l = this.getCodewords(), c = -1, u = s; u < a; u++)
            if (l[u] != null) {
                var f = l[u];
                f.setRowNumberAsRowIndicatorColumn();
                var d = f.getRowNumber() - c;
                d === 0 || (d === 1 ? c = f.getRowNumber() : f.getRowNumber() >= r.getRowCount() ? l[u] = null : c = f.getRowNumber())
            }
    }
    ,
    e.prototype.getBarcodeMetadata = function() {
        var r, n, i = this.getCodewords(), o = new b0, s = new b0, a = new b0, l = new b0;
        try {
            for (var c = ev(i), u = c.next(); !u.done; u = c.next()) {
                var f = u.value;
                if (f != null) {
                    f.setRowNumberAsRowIndicatorColumn();
                    var d = f.getValue() % 30
                      , h = f.getRowNumber();
                    switch (this._isLeft || (h += 2),
                    h % 3) {
                    case 0:
                        s.setValue(d * 3 + 1);
                        break;
                    case 1:
                        l.setValue(d / 3),
                        a.setValue(d % 3);
                        break;
                    case 2:
                        o.setValue(d + 1);
                        break
                    }
                }
            }
        } catch (y) {
            r = {
                error: y
            }
        } finally {
            try {
                u && !u.done && (n = c.return) && n.call(c)
            } finally {
                if (r)
                    throw r.error
            }
        }
        if (o.getValue().length === 0 || s.getValue().length === 0 || a.getValue().length === 0 || l.getValue().length === 0 || o.getValue()[0] < 1 || s.getValue()[0] + a.getValue()[0] < at.MIN_ROWS_IN_BARCODE || s.getValue()[0] + a.getValue()[0] > at.MAX_ROWS_IN_BARCODE)
            return null;
        var x = new XCe(o.getValue()[0],s.getValue()[0],a.getValue()[0],l.getValue()[0]);
        return this.removeIncorrectCodewords(i, x),
        x
    }
    ,
    e.prototype.removeIncorrectCodewords = function(r, n) {
        for (var i = 0; i < r.length; i++) {
            var o = r[i];
            if (r[i] != null) {
                var s = o.getValue() % 30
                  , a = o.getRowNumber();
                if (a > n.getRowCount()) {
                    r[i] = null;
                    continue
                }
                switch (this._isLeft || (a += 2),
                a % 3) {
                case 0:
                    s * 3 + 1 !== n.getRowCountUpperPart() && (r[i] = null);
                    break;
                case 1:
                    (Math.trunc(s / 3) !== n.getErrorCorrectionLevel() || s % 3 !== n.getRowCountLowerPart()) && (r[i] = null);
                    break;
                case 2:
                    s + 1 !== n.getColumnCount() && (r[i] = null);
                    break
                }
            }
        }
    }
    ,
    e.prototype.isLeft = function() {
        return this._isLeft
    }
    ,
    e.prototype.toString = function() {
        return "IsLeft: " + this._isLeft + `
` + t.prototype.toString.call(this)
    }
    ,
    e
}($M), QCe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, e8e = function() {
    function t(e, r) {
        this.ADJUST_ROW_NUMBER_SKIP = 2,
        this.barcodeMetadata = e,
        this.barcodeColumnCount = e.getColumnCount(),
        this.boundingBox = r,
        this.detectionResultColumns = new Array(this.barcodeColumnCount + 2)
    }
    return t.prototype.getDetectionResultColumns = function() {
        this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),
        this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount + 1]);
        var e = at.MAX_CODEWORDS_IN_BARCODE, r;
        do
            r = e,
            e = this.adjustRowNumbersAndGetCount();
        while (e > 0 && e < r);
        return this.detectionResultColumns
    }
    ,
    t.prototype.adjustIndicatorColumnRowNumbers = function(e) {
        e != null && e.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)
    }
    ,
    t.prototype.adjustRowNumbersAndGetCount = function() {
        var e = this.adjustRowNumbersByRow();
        if (e === 0)
            return 0;
        for (var r = 1; r < this.barcodeColumnCount + 1; r++)
            for (var n = this.detectionResultColumns[r].getCodewords(), i = 0; i < n.length; i++)
                n[i] != null && (n[i].hasValidRowNumber() || this.adjustRowNumbers(r, i, n));
        return e
    }
    ,
    t.prototype.adjustRowNumbersByRow = function() {
        this.adjustRowNumbersFromBothRI();
        var e = this.adjustRowNumbersFromLRI();
        return e + this.adjustRowNumbersFromRRI()
    }
    ,
    t.prototype.adjustRowNumbersFromBothRI = function() {
        if (!(this.detectionResultColumns[0] == null || this.detectionResultColumns[this.barcodeColumnCount + 1] == null)) {
            for (var e = this.detectionResultColumns[0].getCodewords(), r = this.detectionResultColumns[this.barcodeColumnCount + 1].getCodewords(), n = 0; n < e.length; n++)
                if (e[n] != null && r[n] != null && e[n].getRowNumber() === r[n].getRowNumber())
                    for (var i = 1; i <= this.barcodeColumnCount; i++) {
                        var o = this.detectionResultColumns[i].getCodewords()[n];
                        o != null && (o.setRowNumber(e[n].getRowNumber()),
                        o.hasValidRowNumber() || (this.detectionResultColumns[i].getCodewords()[n] = null))
                    }
        }
    }
    ,
    t.prototype.adjustRowNumbersFromRRI = function() {
        if (this.detectionResultColumns[this.barcodeColumnCount + 1] == null)
            return 0;
        for (var e = 0, r = this.detectionResultColumns[this.barcodeColumnCount + 1].getCodewords(), n = 0; n < r.length; n++)
            if (r[n] != null)
                for (var i = r[n].getRowNumber(), o = 0, s = this.barcodeColumnCount + 1; s > 0 && o < this.ADJUST_ROW_NUMBER_SKIP; s--) {
                    var a = this.detectionResultColumns[s].getCodewords()[n];
                    a != null && (o = t.adjustRowNumberIfValid(i, o, a),
                    a.hasValidRowNumber() || e++)
                }
        return e
    }
    ,
    t.prototype.adjustRowNumbersFromLRI = function() {
        if (this.detectionResultColumns[0] == null)
            return 0;
        for (var e = 0, r = this.detectionResultColumns[0].getCodewords(), n = 0; n < r.length; n++)
            if (r[n] != null)
                for (var i = r[n].getRowNumber(), o = 0, s = 1; s < this.barcodeColumnCount + 1 && o < this.ADJUST_ROW_NUMBER_SKIP; s++) {
                    var a = this.detectionResultColumns[s].getCodewords()[n];
                    a != null && (o = t.adjustRowNumberIfValid(i, o, a),
                    a.hasValidRowNumber() || e++)
                }
        return e
    }
    ,
    t.adjustRowNumberIfValid = function(e, r, n) {
        return n == null || n.hasValidRowNumber() || (n.isValidRowNumber(e) ? (n.setRowNumber(e),
        r = 0) : ++r),
        r
    }
    ,
    t.prototype.adjustRowNumbers = function(e, r, n) {
        var i, o;
        if (this.detectionResultColumns[e - 1] != null) {
            var s = n[r]
              , a = this.detectionResultColumns[e - 1].getCodewords()
              , l = a;
            this.detectionResultColumns[e + 1] != null && (l = this.detectionResultColumns[e + 1].getCodewords());
            var c = new Array(14);
            c[2] = a[r],
            c[3] = l[r],
            r > 0 && (c[0] = n[r - 1],
            c[4] = a[r - 1],
            c[5] = l[r - 1]),
            r > 1 && (c[8] = n[r - 2],
            c[10] = a[r - 2],
            c[11] = l[r - 2]),
            r < n.length - 1 && (c[1] = n[r + 1],
            c[6] = a[r + 1],
            c[7] = l[r + 1]),
            r < n.length - 2 && (c[9] = n[r + 2],
            c[12] = a[r + 2],
            c[13] = l[r + 2]);
            try {
                for (var u = QCe(c), f = u.next(); !f.done; f = u.next()) {
                    var d = f.value;
                    if (t.adjustRowNumber(s, d))
                        return
                }
            } catch (h) {
                i = {
                    error: h
                }
            } finally {
                try {
                    f && !f.done && (o = u.return) && o.call(u)
                } finally {
                    if (i)
                        throw i.error
                }
            }
        }
    }
    ,
    t.adjustRowNumber = function(e, r) {
        return r == null ? !1 : r.hasValidRowNumber() && r.getBucket() === e.getBucket() ? (e.setRowNumber(r.getRowNumber()),
        !0) : !1
    }
    ,
    t.prototype.getBarcodeColumnCount = function() {
        return this.barcodeColumnCount
    }
    ,
    t.prototype.getBarcodeRowCount = function() {
        return this.barcodeMetadata.getRowCount()
    }
    ,
    t.prototype.getBarcodeECLevel = function() {
        return this.barcodeMetadata.getErrorCorrectionLevel()
    }
    ,
    t.prototype.setBoundingBox = function(e) {
        this.boundingBox = e
    }
    ,
    t.prototype.getBoundingBox = function() {
        return this.boundingBox
    }
    ,
    t.prototype.setDetectionResultColumn = function(e, r) {
        this.detectionResultColumns[e] = r
    }
    ,
    t.prototype.getDetectionResultColumn = function(e) {
        return this.detectionResultColumns[e]
    }
    ,
    t.prototype.toString = function() {
        var e = this.detectionResultColumns[0];
        e == null && (e = this.detectionResultColumns[this.barcodeColumnCount + 1]);
        for (var r = new NC, n = 0; n < e.getCodewords().length; n++) {
            r.format("CW %3d:", n);
            for (var i = 0; i < this.barcodeColumnCount + 2; i++) {
                if (this.detectionResultColumns[i] == null) {
                    r.format("    |   ");
                    continue
                }
                var o = this.detectionResultColumns[i].getCodewords()[n];
                if (o == null) {
                    r.format("    |   ");
                    continue
                }
                r.format(" %3d|%3d", o.getRowNumber(), o.getValue())
            }
            r.format("%n")
        }
        return r.toString()
    }
    ,
    t
}(), t8e = function() {
    function t(e, r, n, i) {
        this.rowNumber = t.BARCODE_ROW_UNKNOWN,
        this.startX = Math.trunc(e),
        this.endX = Math.trunc(r),
        this.bucket = Math.trunc(n),
        this.value = Math.trunc(i)
    }
    return t.prototype.hasValidRowNumber = function() {
        return this.isValidRowNumber(this.rowNumber)
    }
    ,
    t.prototype.isValidRowNumber = function(e) {
        return e !== t.BARCODE_ROW_UNKNOWN && this.bucket === e % 3 * 3
    }
    ,
    t.prototype.setRowNumberAsRowIndicatorColumn = function() {
        this.rowNumber = Math.trunc(Math.trunc(this.value / 30) * 3 + Math.trunc(this.bucket / 3))
    }
    ,
    t.prototype.getWidth = function() {
        return this.endX - this.startX
    }
    ,
    t.prototype.getStartX = function() {
        return this.startX
    }
    ,
    t.prototype.getEndX = function() {
        return this.endX
    }
    ,
    t.prototype.getBucket = function() {
        return this.bucket
    }
    ,
    t.prototype.getValue = function() {
        return this.value
    }
    ,
    t.prototype.getRowNumber = function() {
        return this.rowNumber
    }
    ,
    t.prototype.setRowNumber = function(e) {
        this.rowNumber = e
    }
    ,
    t.prototype.toString = function() {
        return this.rowNumber + "|" + this.value
    }
    ,
    t.BARCODE_ROW_UNKNOWN = -1,
    t
}(), r8e = function() {
    function t() {}
    return t.initialize = function() {
        for (var e = 0; e < at.SYMBOL_TABLE.length; e++)
            for (var r = at.SYMBOL_TABLE[e], n = r & 1, i = 0; i < at.BARS_IN_MODULE; i++) {
                for (var o = 0; (r & 1) === n; )
                    o += 1,
                    r >>= 1;
                n = r & 1,
                t.RATIOS_TABLE[e] || (t.RATIOS_TABLE[e] = new Array(at.BARS_IN_MODULE)),
                t.RATIOS_TABLE[e][at.BARS_IN_MODULE - i - 1] = Math.fround(o / at.MODULES_IN_CODEWORD)
            }
        this.bSymbolTableReady = !0
    }
    ,
    t.getDecodedValue = function(e) {
        var r = t.getDecodedCodewordValue(t.sampleBitCounts(e));
        return r !== -1 ? r : t.getClosestDecodedValue(e)
    }
    ,
    t.sampleBitCounts = function(e) {
        for (var r = ft.sum(e), n = new Int32Array(at.BARS_IN_MODULE), i = 0, o = 0, s = 0; s < at.MODULES_IN_CODEWORD; s++) {
            var a = r / (2 * at.MODULES_IN_CODEWORD) + s * r / at.MODULES_IN_CODEWORD;
            o + e[i] <= a && (o += e[i],
            i++),
            n[i]++
        }
        return n
    }
    ,
    t.getDecodedCodewordValue = function(e) {
        var r = t.getBitValue(e);
        return at.getCodeword(r) === -1 ? -1 : r
    }
    ,
    t.getBitValue = function(e) {
        for (var r = 0, n = 0; n < e.length; n++)
            for (var i = 0; i < e[n]; i++)
                r = r << 1 | (n % 2 === 0 ? 1 : 0);
        return Math.trunc(r)
    }
    ,
    t.getClosestDecodedValue = function(e) {
        var r = ft.sum(e)
          , n = new Array(at.BARS_IN_MODULE);
        if (r > 1)
            for (var i = 0; i < n.length; i++)
                n[i] = Math.fround(e[i] / r);
        var o = XE.MAX_VALUE
          , s = -1;
        this.bSymbolTableReady || t.initialize();
        for (var a = 0; a < t.RATIOS_TABLE.length; a++) {
            for (var l = 0, c = t.RATIOS_TABLE[a], u = 0; u < at.BARS_IN_MODULE; u++) {
                var f = Math.fround(c[u] - n[u]);
                if (l += Math.fround(f * f),
                l >= o)
                    break
            }
            l < o && (o = l,
            s = at.SYMBOL_TABLE[a])
        }
        return s
    }
    ,
    t.bSymbolTableReady = !1,
    t.RATIOS_TABLE = new Array(at.SYMBOL_TABLE.length).map(function(e) {
        return new Array(at.BARS_IN_MODULE)
    }),
    t
}(), n8e = function() {
    function t() {
        this.segmentCount = -1,
        this.fileSize = -1,
        this.timestamp = -1,
        this.checksum = -1
    }
    return t.prototype.getSegmentIndex = function() {
        return this.segmentIndex
    }
    ,
    t.prototype.setSegmentIndex = function(e) {
        this.segmentIndex = e
    }
    ,
    t.prototype.getFileId = function() {
        return this.fileId
    }
    ,
    t.prototype.setFileId = function(e) {
        this.fileId = e
    }
    ,
    t.prototype.getOptionalData = function() {
        return this.optionalData
    }
    ,
    t.prototype.setOptionalData = function(e) {
        this.optionalData = e
    }
    ,
    t.prototype.isLastSegment = function() {
        return this.lastSegment
    }
    ,
    t.prototype.setLastSegment = function(e) {
        this.lastSegment = e
    }
    ,
    t.prototype.getSegmentCount = function() {
        return this.segmentCount
    }
    ,
    t.prototype.setSegmentCount = function(e) {
        this.segmentCount = e
    }
    ,
    t.prototype.getSender = function() {
        return this.sender || null
    }
    ,
    t.prototype.setSender = function(e) {
        this.sender = e
    }
    ,
    t.prototype.getAddressee = function() {
        return this.addressee || null
    }
    ,
    t.prototype.setAddressee = function(e) {
        this.addressee = e
    }
    ,
    t.prototype.getFileName = function() {
        return this.fileName
    }
    ,
    t.prototype.setFileName = function(e) {
        this.fileName = e
    }
    ,
    t.prototype.getFileSize = function() {
        return this.fileSize
    }
    ,
    t.prototype.setFileSize = function(e) {
        this.fileSize = e
    }
    ,
    t.prototype.getChecksum = function() {
        return this.checksum
    }
    ,
    t.prototype.setChecksum = function(e) {
        this.checksum = e
    }
    ,
    t.prototype.getTimestamp = function() {
        return this.timestamp
    }
    ,
    t.prototype.setTimestamp = function(e) {
        this.timestamp = e
    }
    ,
    t
}(), w6 = function() {
    function t() {}
    return t.parseLong = function(e, r) {
        return r === void 0 && (r = void 0),
        parseInt(e, r)
    }
    ,
    t
}(), i8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), o8e = function(t) {
    i8e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.kind = "NullPointerException",
    e
}(Nn), s8e = function() {
    function t() {}
    return t.prototype.writeBytes = function(e) {
        this.writeBytesOffset(e, 0, e.length)
    }
    ,
    t.prototype.writeBytesOffset = function(e, r, n) {
        if (e == null)
            throw new o8e;
        if (r < 0 || r > e.length || n < 0 || r + n > e.length || r + n < 0)
            throw new OC;
        if (n === 0)
            return;
        for (var i = 0; i < n; i++)
            this.write(e[r + i])
    }
    ,
    t.prototype.flush = function() {}
    ,
    t.prototype.close = function() {}
    ,
    t
}(), a8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), l8e = function(t) {
    a8e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e
}(Nn), c8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), u8e = function(t) {
    c8e(e, t);
    function e(r) {
        r === void 0 && (r = 32);
        var n = t.call(this) || this;
        if (n.count = 0,
        r < 0)
            throw new Me("Negative initial size: " + r);
        return n.buf = new Uint8Array(r),
        n
    }
    return e.prototype.ensureCapacity = function(r) {
        r - this.buf.length > 0 && this.grow(r)
    }
    ,
    e.prototype.grow = function(r) {
        var n = this.buf.length
          , i = n << 1;
        if (i - r < 0 && (i = r),
        i < 0) {
            if (r < 0)
                throw new l8e;
            i = qe.MAX_VALUE
        }
        this.buf = br.copyOfUint8Array(this.buf, i)
    }
    ,
    e.prototype.write = function(r) {
        this.ensureCapacity(this.count + 1),
        this.buf[this.count] = r,
        this.count += 1
    }
    ,
    e.prototype.writeBytesOffset = function(r, n, i) {
        if (n < 0 || n > r.length || i < 0 || n + i - r.length > 0)
            throw new OC;
        this.ensureCapacity(this.count + i),
        Ft.arraycopy(r, n, this.buf, this.count, i),
        this.count += i
    }
    ,
    e.prototype.writeTo = function(r) {
        r.writeBytesOffset(this.buf, 0, this.count)
    }
    ,
    e.prototype.reset = function() {
        this.count = 0
    }
    ,
    e.prototype.toByteArray = function() {
        return br.copyOfUint8Array(this.buf, this.count)
    }
    ,
    e.prototype.size = function() {
        return this.count
    }
    ,
    e.prototype.toString = function(r) {
        return r ? typeof r == "string" ? this.toString_string(r) : this.toString_number(r) : this.toString_void()
    }
    ,
    e.prototype.toString_void = function() {
        return new String(this.buf).toString()
    }
    ,
    e.prototype.toString_string = function(r) {
        return new String(this.buf).toString()
    }
    ,
    e.prototype.toString_number = function(r) {
        return new String(this.buf).toString()
    }
    ,
    e.prototype.close = function() {}
    ,
    e
}(s8e), _t;
(function(t) {
    t[t.ALPHA = 0] = "ALPHA",
    t[t.LOWER = 1] = "LOWER",
    t[t.MIXED = 2] = "MIXED",
    t[t.PUNCT = 3] = "PUNCT",
    t[t.ALPHA_SHIFT = 4] = "ALPHA_SHIFT",
    t[t.PUNCT_SHIFT = 5] = "PUNCT_SHIFT"
}
)(_t || (_t = {}));
function UM() {
    if (typeof window < "u")
        return window.BigInt || null;
    if (typeof global < "u")
        return global.BigInt || null;
    if (typeof self < "u")
        return self.BigInt || null;
    throw new Error("Can't search globals for BigInt!")
}
var Oh;
function $s(t) {
    if (typeof Oh > "u" && (Oh = UM()),
    Oh === null)
        throw new Error("BigInt is not supported!");
    return Oh(t)
}
function f8e() {
    var t = [];
    t[0] = $s(1);
    var e = $s(900);
    t[1] = e;
    for (var r = 2; r < 16; r++)
        t[r] = t[r - 1] * e;
    return t
}
var d8e = function() {
    function t() {}
    return t.decode = function(e, r) {
        var n = new Ke("")
          , i = _r.ISO8859_1;
        n.enableDecoding(i);
        for (var o = 1, s = e[o++], a = new n8e; o < e[0]; ) {
            switch (s) {
            case t.TEXT_COMPACTION_MODE_LATCH:
                o = t.textCompaction(e, o, n);
                break;
            case t.BYTE_COMPACTION_MODE_LATCH:
            case t.BYTE_COMPACTION_MODE_LATCH_6:
                o = t.byteCompaction(s, e, i, o, n);
                break;
            case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:
                n.append(e[o++]);
                break;
            case t.NUMERIC_COMPACTION_MODE_LATCH:
                o = t.numericCompaction(e, o, n);
                break;
            case t.ECI_CHARSET:
                _r.getCharacterSetECIByValue(e[o++]);
                break;
            case t.ECI_GENERAL_PURPOSE:
                o += 2;
                break;
            case t.ECI_USER_DEFINED:
                o++;
                break;
            case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:
                o = t.decodeMacroBlock(e, o, a);
                break;
            case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:
            case t.MACRO_PDF417_TERMINATOR:
                throw new ge;
            default:
                o--,
                o = t.textCompaction(e, o, n);
                break
            }
            if (o < e.length)
                s = e[o++];
            else
                throw ge.getFormatInstance()
        }
        if (n.length() === 0)
            throw ge.getFormatInstance();
        var l = new U1(null,n.toString(),null,r);
        return l.setOther(a),
        l
    }
    ,
    t.decodeMacroBlock = function(e, r, n) {
        if (r + t.NUMBER_OF_SEQUENCE_CODEWORDS > e[0])
            throw ge.getFormatInstance();
        for (var i = new Int32Array(t.NUMBER_OF_SEQUENCE_CODEWORDS), o = 0; o < t.NUMBER_OF_SEQUENCE_CODEWORDS; o++,
        r++)
            i[o] = e[r];
        n.setSegmentIndex(qe.parseInt(t.decodeBase900toBase10(i, t.NUMBER_OF_SEQUENCE_CODEWORDS)));
        var s = new Ke;
        r = t.textCompaction(e, r, s),
        n.setFileId(s.toString());
        var a = -1;
        for (e[r] === t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD && (a = r + 1); r < e[0]; )
            switch (e[r]) {
            case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:
                switch (r++,
                e[r]) {
                case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:
                    var l = new Ke;
                    r = t.textCompaction(e, r + 1, l),
                    n.setFileName(l.toString());
                    break;
                case t.MACRO_PDF417_OPTIONAL_FIELD_SENDER:
                    var c = new Ke;
                    r = t.textCompaction(e, r + 1, c),
                    n.setSender(c.toString());
                    break;
                case t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:
                    var u = new Ke;
                    r = t.textCompaction(e, r + 1, u),
                    n.setAddressee(u.toString());
                    break;
                case t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:
                    var f = new Ke;
                    r = t.numericCompaction(e, r + 1, f),
                    n.setSegmentCount(qe.parseInt(f.toString()));
                    break;
                case t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:
                    var d = new Ke;
                    r = t.numericCompaction(e, r + 1, d),
                    n.setTimestamp(w6.parseLong(d.toString()));
                    break;
                case t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:
                    var h = new Ke;
                    r = t.numericCompaction(e, r + 1, h),
                    n.setChecksum(qe.parseInt(h.toString()));
                    break;
                case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:
                    var x = new Ke;
                    r = t.numericCompaction(e, r + 1, x),
                    n.setFileSize(w6.parseLong(x.toString()));
                    break;
                default:
                    throw ge.getFormatInstance()
                }
                break;
            case t.MACRO_PDF417_TERMINATOR:
                r++,
                n.setLastSegment(!0);
                break;
            default:
                throw ge.getFormatInstance()
            }
        if (a !== -1) {
            var y = r - a;
            n.isLastSegment() && y--,
            n.setOptionalData(br.copyOfRange(e, a, a + y))
        }
        return r
    }
    ,
    t.textCompaction = function(e, r, n) {
        for (var i = new Int32Array((e[0] - r) * 2), o = new Int32Array((e[0] - r) * 2), s = 0, a = !1; r < e[0] && !a; ) {
            var l = e[r++];
            if (l < t.TEXT_COMPACTION_MODE_LATCH)
                i[s] = l / 30,
                i[s + 1] = l % 30,
                s += 2;
            else
                switch (l) {
                case t.TEXT_COMPACTION_MODE_LATCH:
                    i[s++] = t.TEXT_COMPACTION_MODE_LATCH;
                    break;
                case t.BYTE_COMPACTION_MODE_LATCH:
                case t.BYTE_COMPACTION_MODE_LATCH_6:
                case t.NUMERIC_COMPACTION_MODE_LATCH:
                case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:
                case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:
                case t.MACRO_PDF417_TERMINATOR:
                    r--,
                    a = !0;
                    break;
                case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:
                    i[s] = t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,
                    l = e[r++],
                    o[s] = l,
                    s++;
                    break
                }
        }
        return t.decodeTextCompaction(i, o, s, n),
        r
    }
    ,
    t.decodeTextCompaction = function(e, r, n, i) {
        for (var o = _t.ALPHA, s = _t.ALPHA, a = 0; a < n; ) {
            var l = e[a]
              , c = "";
            switch (o) {
            case _t.ALPHA:
                if (l < 26)
                    c = String.fromCharCode(65 + l);
                else
                    switch (l) {
                    case 26:
                        c = " ";
                        break;
                    case t.LL:
                        o = _t.LOWER;
                        break;
                    case t.ML:
                        o = _t.MIXED;
                        break;
                    case t.PS:
                        s = o,
                        o = _t.PUNCT_SHIFT;
                        break;
                    case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:
                        i.append(r[a]);
                        break;
                    case t.TEXT_COMPACTION_MODE_LATCH:
                        o = _t.ALPHA;
                        break
                    }
                break;
            case _t.LOWER:
                if (l < 26)
                    c = String.fromCharCode(97 + l);
                else
                    switch (l) {
                    case 26:
                        c = " ";
                        break;
                    case t.AS:
                        s = o,
                        o = _t.ALPHA_SHIFT;
                        break;
                    case t.ML:
                        o = _t.MIXED;
                        break;
                    case t.PS:
                        s = o,
                        o = _t.PUNCT_SHIFT;
                        break;
                    case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:
                        i.append(r[a]);
                        break;
                    case t.TEXT_COMPACTION_MODE_LATCH:
                        o = _t.ALPHA;
                        break
                    }
                break;
            case _t.MIXED:
                if (l < t.PL)
                    c = t.MIXED_CHARS[l];
                else
                    switch (l) {
                    case t.PL:
                        o = _t.PUNCT;
                        break;
                    case 26:
                        c = " ";
                        break;
                    case t.LL:
                        o = _t.LOWER;
                        break;
                    case t.AL:
                        o = _t.ALPHA;
                        break;
                    case t.PS:
                        s = o,
                        o = _t.PUNCT_SHIFT;
                        break;
                    case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:
                        i.append(r[a]);
                        break;
                    case t.TEXT_COMPACTION_MODE_LATCH:
                        o = _t.ALPHA;
                        break
                    }
                break;
            case _t.PUNCT:
                if (l < t.PAL)
                    c = t.PUNCT_CHARS[l];
                else
                    switch (l) {
                    case t.PAL:
                        o = _t.ALPHA;
                        break;
                    case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:
                        i.append(r[a]);
                        break;
                    case t.TEXT_COMPACTION_MODE_LATCH:
                        o = _t.ALPHA;
                        break
                    }
                break;
            case _t.ALPHA_SHIFT:
                if (o = s,
                l < 26)
                    c = String.fromCharCode(65 + l);
                else
                    switch (l) {
                    case 26:
                        c = " ";
                        break;
                    case t.TEXT_COMPACTION_MODE_LATCH:
                        o = _t.ALPHA;
                        break
                    }
                break;
            case _t.PUNCT_SHIFT:
                if (o = s,
                l < t.PAL)
                    c = t.PUNCT_CHARS[l];
                else
                    switch (l) {
                    case t.PAL:
                        o = _t.ALPHA;
                        break;
                    case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:
                        i.append(r[a]);
                        break;
                    case t.TEXT_COMPACTION_MODE_LATCH:
                        o = _t.ALPHA;
                        break
                    }
                break
            }
            c !== "" && i.append(c),
            a++
        }
    }
    ,
    t.byteCompaction = function(e, r, n, i, o) {
        var s = new u8e
          , a = 0
          , l = 0
          , c = !1;
        switch (e) {
        case t.BYTE_COMPACTION_MODE_LATCH:
            for (var u = new Int32Array(6), f = r[i++]; i < r[0] && !c; )
                switch (u[a++] = f,
                l = 900 * l + f,
                f = r[i++],
                f) {
                case t.TEXT_COMPACTION_MODE_LATCH:
                case t.BYTE_COMPACTION_MODE_LATCH:
                case t.NUMERIC_COMPACTION_MODE_LATCH:
                case t.BYTE_COMPACTION_MODE_LATCH_6:
                case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:
                case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:
                case t.MACRO_PDF417_TERMINATOR:
                    i--,
                    c = !0;
                    break;
                default:
                    if (a % 5 === 0 && a > 0) {
                        for (var d = 0; d < 6; ++d)
                            s.write(Number($s(l) >> $s(8 * (5 - d))));
                        l = 0,
                        a = 0
                    }
                    break
                }
            i === r[0] && f < t.TEXT_COMPACTION_MODE_LATCH && (u[a++] = f);
            for (var h = 0; h < a; h++)
                s.write(u[h]);
            break;
        case t.BYTE_COMPACTION_MODE_LATCH_6:
            for (; i < r[0] && !c; ) {
                var x = r[i++];
                if (x < t.TEXT_COMPACTION_MODE_LATCH)
                    a++,
                    l = 900 * l + x;
                else
                    switch (x) {
                    case t.TEXT_COMPACTION_MODE_LATCH:
                    case t.BYTE_COMPACTION_MODE_LATCH:
                    case t.NUMERIC_COMPACTION_MODE_LATCH:
                    case t.BYTE_COMPACTION_MODE_LATCH_6:
                    case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:
                    case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:
                    case t.MACRO_PDF417_TERMINATOR:
                        i--,
                        c = !0;
                        break
                    }
                if (a % 5 === 0 && a > 0) {
                    for (var d = 0; d < 6; ++d)
                        s.write(Number($s(l) >> $s(8 * (5 - d))));
                    l = 0,
                    a = 0
                }
            }
            break
        }
        return o.append(yi.decode(s.toByteArray(), n)),
        i
    }
    ,
    t.numericCompaction = function(e, r, n) {
        for (var i = 0, o = !1, s = new Int32Array(t.MAX_NUMERIC_CODEWORDS); r < e[0] && !o; ) {
            var a = e[r++];
            if (r === e[0] && (o = !0),
            a < t.TEXT_COMPACTION_MODE_LATCH)
                s[i] = a,
                i++;
            else
                switch (a) {
                case t.TEXT_COMPACTION_MODE_LATCH:
                case t.BYTE_COMPACTION_MODE_LATCH:
                case t.BYTE_COMPACTION_MODE_LATCH_6:
                case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:
                case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:
                case t.MACRO_PDF417_TERMINATOR:
                    r--,
                    o = !0;
                    break
                }
            (i % t.MAX_NUMERIC_CODEWORDS === 0 || a === t.NUMERIC_COMPACTION_MODE_LATCH || o) && i > 0 && (n.append(t.decodeBase900toBase10(s, i)),
            i = 0)
        }
        return r
    }
    ,
    t.decodeBase900toBase10 = function(e, r) {
        for (var n = $s(0), i = 0; i < r; i++)
            n += t.EXP900[r - i - 1] * $s(e[i]);
        var o = n.toString();
        if (o.charAt(0) !== "1")
            throw new ge;
        return o.substring(1)
    }
    ,
    t.TEXT_COMPACTION_MODE_LATCH = 900,
    t.BYTE_COMPACTION_MODE_LATCH = 901,
    t.NUMERIC_COMPACTION_MODE_LATCH = 902,
    t.BYTE_COMPACTION_MODE_LATCH_6 = 924,
    t.ECI_USER_DEFINED = 925,
    t.ECI_GENERAL_PURPOSE = 926,
    t.ECI_CHARSET = 927,
    t.BEGIN_MACRO_PDF417_CONTROL_BLOCK = 928,
    t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD = 923,
    t.MACRO_PDF417_TERMINATOR = 922,
    t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE = 913,
    t.MAX_NUMERIC_CODEWORDS = 15,
    t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME = 0,
    t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT = 1,
    t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP = 2,
    t.MACRO_PDF417_OPTIONAL_FIELD_SENDER = 3,
    t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE = 4,
    t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE = 5,
    t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM = 6,
    t.PL = 25,
    t.LL = 27,
    t.AS = 27,
    t.ML = 28,
    t.AL = 28,
    t.PS = 29,
    t.PAL = 29,
    t.PUNCT_CHARS = `;<>@[\\]_\`~!\r	,:
-.$/"|*()?{}'`,
    t.MIXED_CHARS = "0123456789&\r	,:#-.$/+%*=^",
    t.EXP900 = UM() ? f8e() : [],
    t.NUMBER_OF_SEQUENCE_CODEWORDS = 2,
    t
}()
  , u0 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , h8e = function() {
    function t() {}
    return t.decode = function(e, r, n, i, o, s, a) {
        for (var l = new ZE(e,r,n,i,o), c = null, u = null, f, d = !0; ; d = !1) {
            if (r != null && (c = t.getRowIndicatorColumn(e, l, r, !0, s, a)),
            i != null && (u = t.getRowIndicatorColumn(e, l, i, !1, s, a)),
            f = t.merge(c, u),
            f == null)
                throw le.getNotFoundInstance();
            var h = f.getBoundingBox();
            if (d && h != null && (h.getMinY() < l.getMinY() || h.getMaxY() > l.getMaxY()))
                l = h;
            else
                break
        }
        f.setBoundingBox(l);
        var x = f.getBarcodeColumnCount() + 1;
        f.setDetectionResultColumn(0, c),
        f.setDetectionResultColumn(x, u);
        for (var y = c != null, m = 1; m <= x; m++) {
            var E = y ? m : x - m;
            if (f.getDetectionResultColumn(E) === void 0) {
                var g = void 0;
                E === 0 || E === x ? g = new A6(l,E === 0) : g = new $M(l),
                f.setDetectionResultColumn(E, g);
                for (var p = -1, v = p, _ = l.getMinY(); _ <= l.getMaxY(); _++) {
                    if (p = t.getStartColumn(f, E, _, y),
                    p < 0 || p > l.getMaxX()) {
                        if (v === -1)
                            continue;
                        p = v
                    }
                    var b = t.detectCodeword(e, l.getMinX(), l.getMaxX(), y, p, _, s, a);
                    b != null && (g.setCodeword(_, b),
                    v = p,
                    s = Math.min(s, b.getWidth()),
                    a = Math.max(a, b.getWidth()))
                }
            }
        }
        return t.createDecoderResult(f)
    }
    ,
    t.merge = function(e, r) {
        if (e == null && r == null)
            return null;
        var n = t.getBarcodeMetadata(e, r);
        if (n == null)
            return null;
        var i = ZE.merge(t.adjustBoundingBox(e), t.adjustBoundingBox(r));
        return new e8e(n,i)
    }
    ,
    t.adjustBoundingBox = function(e) {
        var r, n;
        if (e == null)
            return null;
        var i = e.getRowHeights();
        if (i == null)
            return null;
        var o = t.getMax(i)
          , s = 0;
        try {
            for (var a = u0(i), l = a.next(); !l.done; l = a.next()) {
                var c = l.value;
                if (s += o - c,
                c > 0)
                    break
            }
        } catch (h) {
            r = {
                error: h
            }
        } finally {
            try {
                l && !l.done && (n = a.return) && n.call(a)
            } finally {
                if (r)
                    throw r.error
            }
        }
        for (var u = e.getCodewords(), f = 0; s > 0 && u[f] == null; f++)
            s--;
        for (var d = 0, f = i.length - 1; f >= 0 && (d += o - i[f],
        !(i[f] > 0)); f--)
            ;
        for (var f = u.length - 1; d > 0 && u[f] == null; f--)
            d--;
        return e.getBoundingBox().addMissingRows(s, d, e.isLeft())
    }
    ,
    t.getMax = function(e) {
        var r, n, i = -1;
        try {
            for (var o = u0(e), s = o.next(); !s.done; s = o.next()) {
                var a = s.value;
                i = Math.max(i, a)
            }
        } catch (l) {
            r = {
                error: l
            }
        } finally {
            try {
                s && !s.done && (n = o.return) && n.call(o)
            } finally {
                if (r)
                    throw r.error
            }
        }
        return i
    }
    ,
    t.getBarcodeMetadata = function(e, r) {
        var n;
        if (e == null || (n = e.getBarcodeMetadata()) == null)
            return r == null ? null : r.getBarcodeMetadata();
        var i;
        return r == null || (i = r.getBarcodeMetadata()) == null ? n : n.getColumnCount() !== i.getColumnCount() && n.getErrorCorrectionLevel() !== i.getErrorCorrectionLevel() && n.getRowCount() !== i.getRowCount() ? null : n
    }
    ,
    t.getRowIndicatorColumn = function(e, r, n, i, o, s) {
        for (var a = new A6(r,i), l = 0; l < 2; l++)
            for (var c = l === 0 ? 1 : -1, u = Math.trunc(Math.trunc(n.getX())), f = Math.trunc(Math.trunc(n.getY())); f <= r.getMaxY() && f >= r.getMinY(); f += c) {
                var d = t.detectCodeword(e, 0, e.getWidth(), i, u, f, o, s);
                d != null && (a.setCodeword(f, d),
                i ? u = d.getStartX() : u = d.getEndX())
            }
        return a
    }
    ,
    t.adjustCodewordCount = function(e, r) {
        var n = r[0][1]
          , i = n.getValue()
          , o = e.getBarcodeColumnCount() * e.getBarcodeRowCount() - t.getNumberOfECCodeWords(e.getBarcodeECLevel());
        if (i.length === 0) {
            if (o < 1 || o > at.MAX_CODEWORDS_IN_BARCODE)
                throw le.getNotFoundInstance();
            n.setValue(o)
        } else
            i[0] !== o && n.setValue(o)
    }
    ,
    t.createDecoderResult = function(e) {
        var r = t.createBarcodeMatrix(e);
        t.adjustCodewordCount(e, r);
        for (var n = new Array, i = new Int32Array(e.getBarcodeRowCount() * e.getBarcodeColumnCount()), o = [], s = new Array, a = 0; a < e.getBarcodeRowCount(); a++)
            for (var l = 0; l < e.getBarcodeColumnCount(); l++) {
                var c = r[a][l + 1].getValue()
                  , u = a * e.getBarcodeColumnCount() + l;
                c.length === 0 ? n.push(u) : c.length === 1 ? i[u] = c[0] : (s.push(u),
                o.push(c))
            }
        for (var f = new Array(o.length), d = 0; d < f.length; d++)
            f[d] = o[d];
        return t.createDecoderResultFromAmbiguousValues(e.getBarcodeECLevel(), i, at.toIntArray(n), at.toIntArray(s), f)
    }
    ,
    t.createDecoderResultFromAmbiguousValues = function(e, r, n, i, o) {
        for (var s = new Int32Array(i.length), a = 100; a-- > 0; ) {
            for (var l = 0; l < s.length; l++)
                r[i[l]] = o[l][s[l]];
            try {
                return t.decodeCodewords(r, e, n)
            } catch (u) {
                var c = u instanceof fr;
                if (!c)
                    throw u
            }
            if (s.length === 0)
                throw fr.getChecksumInstance();
            for (var l = 0; l < s.length; l++)
                if (s[l] < o[l].length - 1) {
                    s[l]++;
                    break
                } else if (s[l] = 0,
                l === s.length - 1)
                    throw fr.getChecksumInstance()
        }
        throw fr.getChecksumInstance()
    }
    ,
    t.createBarcodeMatrix = function(e) {
        for (var r, n, i, o, s = Array.from({
            length: e.getBarcodeRowCount()
        }, function() {
            return new Array(e.getBarcodeColumnCount() + 2)
        }), a = 0; a < s.length; a++)
            for (var l = 0; l < s[a].length; l++)
                s[a][l] = new b0;
        var c = 0;
        try {
            for (var u = u0(e.getDetectionResultColumns()), f = u.next(); !f.done; f = u.next()) {
                var d = f.value;
                if (d != null)
                    try {
                        for (var h = (i = void 0,
                        u0(d.getCodewords())), x = h.next(); !x.done; x = h.next()) {
                            var y = x.value;
                            if (y != null) {
                                var m = y.getRowNumber();
                                if (m >= 0) {
                                    if (m >= s.length)
                                        continue;
                                    s[m][c].setValue(y.getValue())
                                }
                            }
                        }
                    } catch (E) {
                        i = {
                            error: E
                        }
                    } finally {
                        try {
                            x && !x.done && (o = h.return) && o.call(h)
                        } finally {
                            if (i)
                                throw i.error
                        }
                    }
                c++
            }
        } catch (E) {
            r = {
                error: E
            }
        } finally {
            try {
                f && !f.done && (n = u.return) && n.call(u)
            } finally {
                if (r)
                    throw r.error
            }
        }
        return s
    }
    ,
    t.isValidBarcodeColumn = function(e, r) {
        return r >= 0 && r <= e.getBarcodeColumnCount() + 1
    }
    ,
    t.getStartColumn = function(e, r, n, i) {
        var o, s, a = i ? 1 : -1, l = null;
        if (t.isValidBarcodeColumn(e, r - a) && (l = e.getDetectionResultColumn(r - a).getCodeword(n)),
        l != null)
            return i ? l.getEndX() : l.getStartX();
        if (l = e.getDetectionResultColumn(r).getCodewordNearby(n),
        l != null)
            return i ? l.getStartX() : l.getEndX();
        if (t.isValidBarcodeColumn(e, r - a) && (l = e.getDetectionResultColumn(r - a).getCodewordNearby(n)),
        l != null)
            return i ? l.getEndX() : l.getStartX();
        for (var c = 0; t.isValidBarcodeColumn(e, r - a); ) {
            r -= a;
            try {
                for (var u = (o = void 0,
                u0(e.getDetectionResultColumn(r).getCodewords())), f = u.next(); !f.done; f = u.next()) {
                    var d = f.value;
                    if (d != null)
                        return (i ? d.getEndX() : d.getStartX()) + a * c * (d.getEndX() - d.getStartX())
                }
            } catch (h) {
                o = {
                    error: h
                }
            } finally {
                try {
                    f && !f.done && (s = u.return) && s.call(u)
                } finally {
                    if (o)
                        throw o.error
                }
            }
            c++
        }
        return i ? e.getBoundingBox().getMinX() : e.getBoundingBox().getMaxX()
    }
    ,
    t.detectCodeword = function(e, r, n, i, o, s, a, l) {
        o = t.adjustCodewordStartColumn(e, r, n, i, o, s);
        var c = t.getModuleBitCount(e, r, n, i, o, s);
        if (c == null)
            return null;
        var u, f = ft.sum(c);
        if (i)
            u = o + f;
        else {
            for (var d = 0; d < c.length / 2; d++) {
                var h = c[d];
                c[d] = c[c.length - 1 - d],
                c[c.length - 1 - d] = h
            }
            u = o,
            o = u - f
        }
        if (!t.checkCodewordSkew(f, a, l))
            return null;
        var x = r8e.getDecodedValue(c)
          , y = at.getCodeword(x);
        return y === -1 ? null : new t8e(o,u,t.getCodewordBucketNumber(x),y)
    }
    ,
    t.getModuleBitCount = function(e, r, n, i, o, s) {
        for (var a = o, l = new Int32Array(8), c = 0, u = i ? 1 : -1, f = i; (i ? a < n : a >= r) && c < l.length; )
            e.get(a, s) === f ? (l[c]++,
            a += u) : (c++,
            f = !f);
        return c === l.length || a === (i ? n : r) && c === l.length - 1 ? l : null
    }
    ,
    t.getNumberOfECCodeWords = function(e) {
        return 2 << e
    }
    ,
    t.adjustCodewordStartColumn = function(e, r, n, i, o, s) {
        for (var a = o, l = i ? -1 : 1, c = 0; c < 2; c++) {
            for (; (i ? a >= r : a < n) && i === e.get(a, s); ) {
                if (Math.abs(o - a) > t.CODEWORD_SKEW_SIZE)
                    return o;
                a += l
            }
            l = -l,
            i = !i
        }
        return a
    }
    ,
    t.checkCodewordSkew = function(e, r, n) {
        return r - t.CODEWORD_SKEW_SIZE <= e && e <= n + t.CODEWORD_SKEW_SIZE
    }
    ,
    t.decodeCodewords = function(e, r, n) {
        if (e.length === 0)
            throw ge.getFormatInstance();
        var i = 1 << r + 1
          , o = t.correctErrors(e, n, i);
        t.verifyCodewordCount(e, i);
        var s = d8e.decode(e, "" + r);
        return s.setErrorsCorrected(o),
        s.setErasures(n.length),
        s
    }
    ,
    t.correctErrors = function(e, r, n) {
        if (r != null && r.length > n / 2 + t.MAX_ERRORS || n < 0 || n > t.MAX_EC_CODEWORDS)
            throw fr.getChecksumInstance();
        return t.errorCorrection.decode(e, n, r)
    }
    ,
    t.verifyCodewordCount = function(e, r) {
        if (e.length < 4)
            throw ge.getFormatInstance();
        var n = e[0];
        if (n > e.length)
            throw ge.getFormatInstance();
        if (n === 0)
            if (r < e.length)
                e[0] = e.length - r;
            else
                throw ge.getFormatInstance()
    }
    ,
    t.getBitCountForCodeword = function(e) {
        for (var r = new Int32Array(8), n = 0, i = r.length - 1; !((e & 1) !== n && (n = e & 1,
        i--,
        i < 0)); )
            r[i]++,
            e >>= 1;
        return r
    }
    ,
    t.getCodewordBucketNumber = function(e) {
        return e instanceof Int32Array ? this.getCodewordBucketNumber_Int32Array(e) : this.getCodewordBucketNumber_number(e)
    }
    ,
    t.getCodewordBucketNumber_number = function(e) {
        return t.getCodewordBucketNumber(t.getBitCountForCodeword(e))
    }
    ,
    t.getCodewordBucketNumber_Int32Array = function(e) {
        return (e[0] - e[2] + e[4] - e[6] + 9) % 9
    }
    ,
    t.toString = function(e) {
        for (var r = new NC, n = 0; n < e.length; n++) {
            r.format("Row %2d: ", n);
            for (var i = 0; i < e[n].length; i++) {
                var o = e[n][i];
                o.getValue().length === 0 ? r.format("        ", null) : r.format("%4d(%2d)", o.getValue()[0], o.getConfidence(o.getValue()[0]))
            }
            r.format("%n")
        }
        return r.toString()
    }
    ,
    t.CODEWORD_SKEW_SIZE = 2,
    t.MAX_ERRORS = 3,
    t.MAX_EC_CODEWORDS = 512,
    t.errorCorrection = new YCe,
    t
}()
  , x8e = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , lp = function() {
    function t() {}
    return t.prototype.decode = function(e, r) {
        r === void 0 && (r = null);
        var n = t.decode(e, r, !1);
        if (n == null || n.length === 0 || n[0] == null)
            throw le.getNotFoundInstance();
        return n[0]
    }
    ,
    t.prototype.decodeMultiple = function(e, r) {
        r === void 0 && (r = null);
        try {
            return t.decode(e, r, !0)
        } catch (n) {
            throw n instanceof ge || n instanceof fr ? le.getNotFoundInstance() : n
        }
    }
    ,
    t.decode = function(e, r, n) {
        var i, o, s = new Array, a = GCe.detectMultiple(e, r, n);
        try {
            for (var l = x8e(a.getPoints()), c = l.next(); !c.done; c = l.next()) {
                var u = c.value
                  , f = h8e.decode(a.getBits(), u[4], u[5], u[6], u[7], t.getMinCodewordWidth(u), t.getMaxCodewordWidth(u))
                  , d = new nn(f.getText(),f.getRawBytes(),void 0,u,ke.PDF_417);
                d.putMetadata(Vr.ERROR_CORRECTION_LEVEL, f.getECLevel());
                var h = f.getOther();
                h != null && d.putMetadata(Vr.PDF417_EXTRA_METADATA, h),
                s.push(d)
            }
        } catch (x) {
            i = {
                error: x
            }
        } finally {
            try {
                c && !c.done && (o = l.return) && o.call(l)
            } finally {
                if (i)
                    throw i.error
            }
        }
        return s.map(function(x) {
            return x
        })
    }
    ,
    t.getMaxWidth = function(e, r) {
        return e == null || r == null ? 0 : Math.trunc(Math.abs(e.getX() - r.getX()))
    }
    ,
    t.getMinWidth = function(e, r) {
        return e == null || r == null ? qe.MAX_VALUE : Math.trunc(Math.abs(e.getX() - r.getX()))
    }
    ,
    t.getMaxCodewordWidth = function(e) {
        return Math.floor(Math.max(Math.max(t.getMaxWidth(e[0], e[4]), t.getMaxWidth(e[6], e[2]) * at.MODULES_IN_CODEWORD / at.MODULES_IN_STOP_PATTERN), Math.max(t.getMaxWidth(e[1], e[5]), t.getMaxWidth(e[7], e[3]) * at.MODULES_IN_CODEWORD / at.MODULES_IN_STOP_PATTERN)))
    }
    ,
    t.getMinCodewordWidth = function(e) {
        return Math.floor(Math.min(Math.min(t.getMinWidth(e[0], e[4]), t.getMinWidth(e[6], e[2]) * at.MODULES_IN_CODEWORD / at.MODULES_IN_STOP_PATTERN), Math.min(t.getMinWidth(e[1], e[5]), t.getMinWidth(e[7], e[3]) * at.MODULES_IN_CODEWORD / at.MODULES_IN_STOP_PATTERN)))
    }
    ,
    t.prototype.reset = function() {}
    ,
    t
}()
  , p8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , B6 = function(t) {
    p8e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.kind = "ReaderException",
    e
}(Nn)
  , S6 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , GM = function() {
    function t() {}
    return t.prototype.decode = function(e, r) {
        return this.setHints(r),
        this.decodeInternal(e)
    }
    ,
    t.prototype.decodeWithState = function(e) {
        return (this.readers === null || this.readers === void 0) && this.setHints(null),
        this.decodeInternal(e)
    }
    ,
    t.prototype.setHints = function(e) {
        this.hints = e;
        var r = e != null && e.get(Pt.TRY_HARDER) !== void 0
          , n = e == null ? null : e.get(Pt.POSSIBLE_FORMATS)
          , i = new Array;
        if (n != null) {
            var o = n.some(function(s) {
                return s === ke.UPC_A || s === ke.UPC_E || s === ke.EAN_13 || s === ke.EAN_8 || s === ke.CODABAR || s === ke.CODE_39 || s === ke.CODE_93 || s === ke.CODE_128 || s === ke.ITF || s === ke.RSS_14 || s === ke.RSS_EXPANDED
            });
            o && !r && i.push(new Pc(e)),
            n.includes(ke.QR_CODE) && i.push(new ap),
            n.includes(ke.DATA_MATRIX) && i.push(new sp),
            n.includes(ke.AZTEC) && i.push(new ip),
            n.includes(ke.PDF_417) && i.push(new lp),
            o && r && i.push(new Pc(e))
        }
        i.length === 0 && (r || i.push(new Pc(e)),
        i.push(new ap),
        i.push(new sp),
        i.push(new ip),
        i.push(new lp),
        r && i.push(new Pc(e))),
        this.readers = i
    }
    ,
    t.prototype.reset = function() {
        var e, r;
        if (this.readers !== null)
            try {
                for (var n = S6(this.readers), i = n.next(); !i.done; i = n.next()) {
                    var o = i.value;
                    o.reset()
                }
            } catch (s) {
                e = {
                    error: s
                }
            } finally {
                try {
                    i && !i.done && (r = n.return) && r.call(n)
                } finally {
                    if (e)
                        throw e.error
                }
            }
    }
    ,
    t.prototype.decodeInternal = function(e) {
        var r, n;
        if (this.readers === null)
            throw new B6("No readers where selected, nothing can be read.");
        try {
            for (var i = S6(this.readers), o = i.next(); !o.done; o = i.next()) {
                var s = o.value;
                try {
                    return s.decode(e, this.hints)
                } catch (a) {
                    if (a instanceof B6)
                        continue
                }
            }
        } catch (a) {
            r = {
                error: a
            }
        } finally {
            try {
                o && !o.done && (n = i.return) && n.call(i)
            } finally {
                if (r)
                    throw r.error
            }
        }
        throw new le("No MultiFormat Readers were able to detect the code.")
    }
    ,
    t
}()
  , g8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    g8e(e, t);
    function e(r, n) {
        r === void 0 && (r = null),
        n === void 0 && (n = 500);
        var i = this
          , o = new GM;
        return o.setHints(r),
        i = t.call(this, o, n) || this,
        i
    }
    return e.prototype.decodeBitmap = function(r) {
        return this.reader.decodeWithState(r)
    }
    ,
    e
}
)(Mu);
var m8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    m8e(e, t);
    function e(r) {
        return r === void 0 && (r = 500),
        t.call(this, new lp, r) || this
    }
    return e
}
)(Mu);
var v8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    v8e(e, t);
    function e(r) {
        return r === void 0 && (r = 500),
        t.call(this, new ap, r) || this
    }
    return e
}
)(Mu);
var JE;
(function(t) {
    t[t.ERROR_CORRECTION = 0] = "ERROR_CORRECTION",
    t[t.CHARACTER_SET = 1] = "CHARACTER_SET",
    t[t.DATA_MATRIX_SHAPE = 2] = "DATA_MATRIX_SHAPE",
    t[t.DATA_MATRIX_COMPACT = 3] = "DATA_MATRIX_COMPACT",
    t[t.MIN_SIZE = 4] = "MIN_SIZE",
    t[t.MAX_SIZE = 5] = "MAX_SIZE",
    t[t.MARGIN = 6] = "MARGIN",
    t[t.PDF417_COMPACT = 7] = "PDF417_COMPACT",
    t[t.PDF417_COMPACTION = 8] = "PDF417_COMPACTION",
    t[t.PDF417_DIMENSIONS = 9] = "PDF417_DIMENSIONS",
    t[t.AZTEC_LAYERS = 10] = "AZTEC_LAYERS",
    t[t.QR_VERSION = 11] = "QR_VERSION",
    t[t.GS1_FORMAT = 12] = "GS1_FORMAT",
    t[t.FORCE_C40 = 13] = "FORCE_C40"
}
)(JE || (JE = {}));
const kh = JE;
var HM = function() {
    function t(e) {
        this.field = e,
        this.cachedGenerators = [],
        this.cachedGenerators.push(new na(e,Int32Array.from([1])))
    }
    return t.prototype.buildGenerator = function(e) {
        var r = this.cachedGenerators;
        if (e >= r.length)
            for (var n = r[r.length - 1], i = this.field, o = r.length; o <= e; o++) {
                var s = n.multiply(new na(i,Int32Array.from([1, i.exp(o - 1 + i.getGeneratorBase())])));
                r.push(s),
                n = s
            }
        return r[e]
    }
    ,
    t.prototype.encode = function(e, r) {
        if (r === 0)
            throw new Me("No error correction bytes");
        var n = e.length - r;
        if (n <= 0)
            throw new Me("No data bytes provided");
        var i = this.buildGenerator(r)
          , o = new Int32Array(n);
        Ft.arraycopy(e, 0, o, 0, n);
        var s = new na(this.field,o);
        s = s.multiplyByMonomial(r, 1);
        for (var a = s.divide(i)[1], l = a.getCoefficients(), c = r - l.length, u = 0; u < c; u++)
            e[n + u] = 0;
        Ft.arraycopy(l, 0, e, n + c, l.length)
    }
    ,
    t
}()
  , C0 = function() {
    function t() {}
    return t.applyMaskPenaltyRule1 = function(e) {
        return t.applyMaskPenaltyRule1Internal(e, !0) + t.applyMaskPenaltyRule1Internal(e, !1)
    }
    ,
    t.applyMaskPenaltyRule2 = function(e) {
        for (var r = 0, n = e.getArray(), i = e.getWidth(), o = e.getHeight(), s = 0; s < o - 1; s++)
            for (var a = n[s], l = 0; l < i - 1; l++) {
                var c = a[l];
                c === a[l + 1] && c === n[s + 1][l] && c === n[s + 1][l + 1] && r++
            }
        return t.N2 * r
    }
    ,
    t.applyMaskPenaltyRule3 = function(e) {
        for (var r = 0, n = e.getArray(), i = e.getWidth(), o = e.getHeight(), s = 0; s < o; s++)
            for (var a = 0; a < i; a++) {
                var l = n[s];
                a + 6 < i && l[a] === 1 && l[a + 1] === 0 && l[a + 2] === 1 && l[a + 3] === 1 && l[a + 4] === 1 && l[a + 5] === 0 && l[a + 6] === 1 && (t.isWhiteHorizontal(l, a - 4, a) || t.isWhiteHorizontal(l, a + 7, a + 11)) && r++,
                s + 6 < o && n[s][a] === 1 && n[s + 1][a] === 0 && n[s + 2][a] === 1 && n[s + 3][a] === 1 && n[s + 4][a] === 1 && n[s + 5][a] === 0 && n[s + 6][a] === 1 && (t.isWhiteVertical(n, a, s - 4, s) || t.isWhiteVertical(n, a, s + 7, s + 11)) && r++
            }
        return r * t.N3
    }
    ,
    t.isWhiteHorizontal = function(e, r, n) {
        r = Math.max(r, 0),
        n = Math.min(n, e.length);
        for (var i = r; i < n; i++)
            if (e[i] === 1)
                return !1;
        return !0
    }
    ,
    t.isWhiteVertical = function(e, r, n, i) {
        n = Math.max(n, 0),
        i = Math.min(i, e.length);
        for (var o = n; o < i; o++)
            if (e[o][r] === 1)
                return !1;
        return !0
    }
    ,
    t.applyMaskPenaltyRule4 = function(e) {
        for (var r = 0, n = e.getArray(), i = e.getWidth(), o = e.getHeight(), s = 0; s < o; s++)
            for (var a = n[s], l = 0; l < i; l++)
                a[l] === 1 && r++;
        var c = e.getHeight() * e.getWidth()
          , u = Math.floor(Math.abs(r * 2 - c) * 10 / c);
        return u * t.N4
    }
    ,
    t.getDataMaskBit = function(e, r, n) {
        var i, o;
        switch (e) {
        case 0:
            i = n + r & 1;
            break;
        case 1:
            i = n & 1;
            break;
        case 2:
            i = r % 3;
            break;
        case 3:
            i = (n + r) % 3;
            break;
        case 4:
            i = Math.floor(n / 2) + Math.floor(r / 3) & 1;
            break;
        case 5:
            o = n * r,
            i = (o & 1) + o % 3;
            break;
        case 6:
            o = n * r,
            i = (o & 1) + o % 3 & 1;
            break;
        case 7:
            o = n * r,
            i = o % 3 + (n + r & 1) & 1;
            break;
        default:
            throw new Me("Invalid mask pattern: " + e)
        }
        return i === 0
    }
    ,
    t.applyMaskPenaltyRule1Internal = function(e, r) {
        for (var n = 0, i = r ? e.getHeight() : e.getWidth(), o = r ? e.getWidth() : e.getHeight(), s = e.getArray(), a = 0; a < i; a++) {
            for (var l = 0, c = -1, u = 0; u < o; u++) {
                var f = r ? s[a][u] : s[u][a];
                f === c ? l++ : (l >= 5 && (n += t.N1 + (l - 5)),
                l = 1,
                c = f)
            }
            l >= 5 && (n += t.N1 + (l - 5))
        }
        return n
    }
    ,
    t.N1 = 3,
    t.N2 = 3,
    t.N3 = 40,
    t.N4 = 10,
    t
}()
  , y8e = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , E8e = function() {
    function t(e, r) {
        this.width = e,
        this.height = r;
        for (var n = new Array(r), i = 0; i !== r; i++)
            n[i] = new Uint8Array(e);
        this.bytes = n
    }
    return t.prototype.getHeight = function() {
        return this.height
    }
    ,
    t.prototype.getWidth = function() {
        return this.width
    }
    ,
    t.prototype.get = function(e, r) {
        return this.bytes[r][e]
    }
    ,
    t.prototype.getArray = function() {
        return this.bytes
    }
    ,
    t.prototype.setNumber = function(e, r, n) {
        this.bytes[r][e] = n
    }
    ,
    t.prototype.setBoolean = function(e, r, n) {
        this.bytes[r][e] = n ? 1 : 0
    }
    ,
    t.prototype.clear = function(e) {
        var r, n;
        try {
            for (var i = y8e(this.bytes), o = i.next(); !o.done; o = i.next()) {
                var s = o.value;
                br.fill(s, e)
            }
        } catch (a) {
            r = {
                error: a
            }
        } finally {
            try {
                o && !o.done && (n = i.return) && n.call(i)
            } finally {
                if (r)
                    throw r.error
            }
        }
    }
    ,
    t.prototype.equals = function(e) {
        if (!(e instanceof t))
            return !1;
        var r = e;
        if (this.width !== r.width || this.height !== r.height)
            return !1;
        for (var n = 0, i = this.height; n < i; ++n)
            for (var o = this.bytes[n], s = r.bytes[n], a = 0, l = this.width; a < l; ++a)
                if (o[a] !== s[a])
                    return !1;
        return !0
    }
    ,
    t.prototype.toString = function() {
        for (var e = new Ke, r = 0, n = this.height; r < n; ++r) {
            for (var i = this.bytes[r], o = 0, s = this.width; o < s; ++o)
                switch (i[o]) {
                case 0:
                    e.append(" 0");
                    break;
                case 1:
                    e.append(" 1");
                    break;
                default:
                    e.append("  ");
                    break
                }
            e.append(`
`)
        }
        return e.toString()
    }
    ,
    t
}()
  , QE = function() {
    function t() {
        this.maskPattern = -1
    }
    return t.prototype.getMode = function() {
        return this.mode
    }
    ,
    t.prototype.getECLevel = function() {
        return this.ecLevel
    }
    ,
    t.prototype.getVersion = function() {
        return this.version
    }
    ,
    t.prototype.getMaskPattern = function() {
        return this.maskPattern
    }
    ,
    t.prototype.getMatrix = function() {
        return this.matrix
    }
    ,
    t.prototype.toString = function() {
        var e = new Ke;
        return e.append(`<<
`),
        e.append(" mode: "),
        e.append(this.mode ? this.mode.toString() : "null"),
        e.append(`
 ecLevel: `),
        e.append(this.ecLevel ? this.ecLevel.toString() : "null"),
        e.append(`
 version: `),
        e.append(this.version ? this.version.toString() : "null"),
        e.append(`
 maskPattern: `),
        e.append(this.maskPattern.toString()),
        this.matrix ? (e.append(`
 matrix:
`),
        e.append(this.matrix.toString())) : e.append(`
 matrix: null
`),
        e.append(`>>
`),
        e.toString()
    }
    ,
    t.prototype.setMode = function(e) {
        this.mode = e
    }
    ,
    t.prototype.setECLevel = function(e) {
        this.ecLevel = e
    }
    ,
    t.prototype.setVersion = function(e) {
        this.version = e
    }
    ,
    t.prototype.setMaskPattern = function(e) {
        this.maskPattern = e
    }
    ,
    t.prototype.setMatrix = function(e) {
        this.matrix = e
    }
    ,
    t.isValidMaskPattern = function(e) {
        return e >= 0 && e < t.NUM_MASK_PATTERNS
    }
    ,
    t.NUM_MASK_PATTERNS = 8,
    t
}()
  , _8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Rt = function(t) {
    _8e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.kind = "WriterException",
    e
}(Nn)
  , T6 = function() {
    function t() {}
    return t.clearMatrix = function(e) {
        e.clear(255)
    }
    ,
    t.buildMatrix = function(e, r, n, i, o) {
        t.clearMatrix(o),
        t.embedBasicPatterns(n, o),
        t.embedTypeInfo(r, i, o),
        t.maybeEmbedVersionInfo(n, o),
        t.embedDataBits(e, i, o)
    }
    ,
    t.embedBasicPatterns = function(e, r) {
        t.embedPositionDetectionPatternsAndSeparators(r),
        t.embedDarkDotAtLeftBottomCorner(r),
        t.maybeEmbedPositionAdjustmentPatterns(e, r),
        t.embedTimingPatterns(r)
    }
    ,
    t.embedTypeInfo = function(e, r, n) {
        var i = new kr;
        t.makeTypeInfoBits(e, r, i);
        for (var o = 0, s = i.getSize(); o < s; ++o) {
            var a = i.get(i.getSize() - 1 - o)
              , l = t.TYPE_INFO_COORDINATES[o]
              , c = l[0]
              , u = l[1];
            if (n.setBoolean(c, u, a),
            o < 8) {
                var f = n.getWidth() - o - 1
                  , d = 8;
                n.setBoolean(f, d, a)
            } else {
                var f = 8
                  , d = n.getHeight() - 7 + (o - 8);
                n.setBoolean(f, d, a)
            }
        }
    }
    ,
    t.maybeEmbedVersionInfo = function(e, r) {
        if (!(e.getVersionNumber() < 7)) {
            var n = new kr;
            t.makeVersionInfoBits(e, n);
            for (var i = 6 * 3 - 1, o = 0; o < 6; ++o)
                for (var s = 0; s < 3; ++s) {
                    var a = n.get(i);
                    i--,
                    r.setBoolean(o, r.getHeight() - 11 + s, a),
                    r.setBoolean(r.getHeight() - 11 + s, o, a)
                }
        }
    }
    ,
    t.embedDataBits = function(e, r, n) {
        for (var i = 0, o = -1, s = n.getWidth() - 1, a = n.getHeight() - 1; s > 0; ) {
            for (s === 6 && (s -= 1); a >= 0 && a < n.getHeight(); ) {
                for (var l = 0; l < 2; ++l) {
                    var c = s - l;
                    if (t.isEmpty(n.get(c, a))) {
                        var u = void 0;
                        i < e.getSize() ? (u = e.get(i),
                        ++i) : u = !1,
                        r !== 255 && C0.getDataMaskBit(r, c, a) && (u = !u),
                        n.setBoolean(c, a, u)
                    }
                }
                a += o
            }
            o = -o,
            a += o,
            s -= 2
        }
        if (i !== e.getSize())
            throw new Rt("Not all bits consumed: " + i + "/" + e.getSize())
    }
    ,
    t.findMSBSet = function(e) {
        return 32 - qe.numberOfLeadingZeros(e)
    }
    ,
    t.calculateBCHCode = function(e, r) {
        if (r === 0)
            throw new Me("0 polynomial");
        var n = t.findMSBSet(r);
        for (e <<= n - 1; t.findMSBSet(e) >= n; )
            e ^= r << t.findMSBSet(e) - n;
        return e
    }
    ,
    t.makeTypeInfoBits = function(e, r, n) {
        if (!QE.isValidMaskPattern(r))
            throw new Rt("Invalid mask pattern");
        var i = e.getBits() << 3 | r;
        n.appendBits(i, 5);
        var o = t.calculateBCHCode(i, t.TYPE_INFO_POLY);
        n.appendBits(o, 10);
        var s = new kr;
        if (s.appendBits(t.TYPE_INFO_MASK_PATTERN, 15),
        n.xor(s),
        n.getSize() !== 15)
            throw new Rt("should not happen but we got: " + n.getSize())
    }
    ,
    t.makeVersionInfoBits = function(e, r) {
        r.appendBits(e.getVersionNumber(), 6);
        var n = t.calculateBCHCode(e.getVersionNumber(), t.VERSION_INFO_POLY);
        if (r.appendBits(n, 12),
        r.getSize() !== 18)
            throw new Rt("should not happen but we got: " + r.getSize())
    }
    ,
    t.isEmpty = function(e) {
        return e === 255
    }
    ,
    t.embedTimingPatterns = function(e) {
        for (var r = 8; r < e.getWidth() - 8; ++r) {
            var n = (r + 1) % 2;
            t.isEmpty(e.get(r, 6)) && e.setNumber(r, 6, n),
            t.isEmpty(e.get(6, r)) && e.setNumber(6, r, n)
        }
    }
    ,
    t.embedDarkDotAtLeftBottomCorner = function(e) {
        if (e.get(8, e.getHeight() - 8) === 0)
            throw new Rt;
        e.setNumber(8, e.getHeight() - 8, 1)
    }
    ,
    t.embedHorizontalSeparationPattern = function(e, r, n) {
        for (var i = 0; i < 8; ++i) {
            if (!t.isEmpty(n.get(e + i, r)))
                throw new Rt;
            n.setNumber(e + i, r, 0)
        }
    }
    ,
    t.embedVerticalSeparationPattern = function(e, r, n) {
        for (var i = 0; i < 7; ++i) {
            if (!t.isEmpty(n.get(e, r + i)))
                throw new Rt;
            n.setNumber(e, r + i, 0)
        }
    }
    ,
    t.embedPositionAdjustmentPattern = function(e, r, n) {
        for (var i = 0; i < 5; ++i)
            for (var o = t.POSITION_ADJUSTMENT_PATTERN[i], s = 0; s < 5; ++s)
                n.setNumber(e + s, r + i, o[s])
    }
    ,
    t.embedPositionDetectionPattern = function(e, r, n) {
        for (var i = 0; i < 7; ++i)
            for (var o = t.POSITION_DETECTION_PATTERN[i], s = 0; s < 7; ++s)
                n.setNumber(e + s, r + i, o[s])
    }
    ,
    t.embedPositionDetectionPatternsAndSeparators = function(e) {
        var r = t.POSITION_DETECTION_PATTERN[0].length;
        t.embedPositionDetectionPattern(0, 0, e),
        t.embedPositionDetectionPattern(e.getWidth() - r, 0, e),
        t.embedPositionDetectionPattern(0, e.getWidth() - r, e);
        var n = 8;
        t.embedHorizontalSeparationPattern(0, n - 1, e),
        t.embedHorizontalSeparationPattern(e.getWidth() - n, n - 1, e),
        t.embedHorizontalSeparationPattern(0, e.getWidth() - n, e);
        var i = 7;
        t.embedVerticalSeparationPattern(i, 0, e),
        t.embedVerticalSeparationPattern(e.getHeight() - i - 1, 0, e),
        t.embedVerticalSeparationPattern(i, e.getHeight() - i, e)
    }
    ,
    t.maybeEmbedPositionAdjustmentPatterns = function(e, r) {
        if (!(e.getVersionNumber() < 2))
            for (var n = e.getVersionNumber() - 1, i = t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[n], o = 0, s = i.length; o !== s; o++) {
                var a = i[o];
                if (a >= 0)
                    for (var l = 0; l !== s; l++) {
                        var c = i[l];
                        c >= 0 && t.isEmpty(r.get(c, a)) && t.embedPositionAdjustmentPattern(c - 2, a - 2, r)
                    }
            }
    }
    ,
    t.POSITION_DETECTION_PATTERN = Array.from([Int32Array.from([1, 1, 1, 1, 1, 1, 1]), Int32Array.from([1, 0, 0, 0, 0, 0, 1]), Int32Array.from([1, 0, 1, 1, 1, 0, 1]), Int32Array.from([1, 0, 1, 1, 1, 0, 1]), Int32Array.from([1, 0, 1, 1, 1, 0, 1]), Int32Array.from([1, 0, 0, 0, 0, 0, 1]), Int32Array.from([1, 1, 1, 1, 1, 1, 1])]),
    t.POSITION_ADJUSTMENT_PATTERN = Array.from([Int32Array.from([1, 1, 1, 1, 1]), Int32Array.from([1, 0, 0, 0, 1]), Int32Array.from([1, 0, 1, 0, 1]), Int32Array.from([1, 0, 0, 0, 1]), Int32Array.from([1, 1, 1, 1, 1])]),
    t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE = Array.from([Int32Array.from([-1, -1, -1, -1, -1, -1, -1]), Int32Array.from([6, 18, -1, -1, -1, -1, -1]), Int32Array.from([6, 22, -1, -1, -1, -1, -1]), Int32Array.from([6, 26, -1, -1, -1, -1, -1]), Int32Array.from([6, 30, -1, -1, -1, -1, -1]), Int32Array.from([6, 34, -1, -1, -1, -1, -1]), Int32Array.from([6, 22, 38, -1, -1, -1, -1]), Int32Array.from([6, 24, 42, -1, -1, -1, -1]), Int32Array.from([6, 26, 46, -1, -1, -1, -1]), Int32Array.from([6, 28, 50, -1, -1, -1, -1]), Int32Array.from([6, 30, 54, -1, -1, -1, -1]), Int32Array.from([6, 32, 58, -1, -1, -1, -1]), Int32Array.from([6, 34, 62, -1, -1, -1, -1]), Int32Array.from([6, 26, 46, 66, -1, -1, -1]), Int32Array.from([6, 26, 48, 70, -1, -1, -1]), Int32Array.from([6, 26, 50, 74, -1, -1, -1]), Int32Array.from([6, 30, 54, 78, -1, -1, -1]), Int32Array.from([6, 30, 56, 82, -1, -1, -1]), Int32Array.from([6, 30, 58, 86, -1, -1, -1]), Int32Array.from([6, 34, 62, 90, -1, -1, -1]), Int32Array.from([6, 28, 50, 72, 94, -1, -1]), Int32Array.from([6, 26, 50, 74, 98, -1, -1]), Int32Array.from([6, 30, 54, 78, 102, -1, -1]), Int32Array.from([6, 28, 54, 80, 106, -1, -1]), Int32Array.from([6, 32, 58, 84, 110, -1, -1]), Int32Array.from([6, 30, 58, 86, 114, -1, -1]), Int32Array.from([6, 34, 62, 90, 118, -1, -1]), Int32Array.from([6, 26, 50, 74, 98, 122, -1]), Int32Array.from([6, 30, 54, 78, 102, 126, -1]), Int32Array.from([6, 26, 52, 78, 104, 130, -1]), Int32Array.from([6, 30, 56, 82, 108, 134, -1]), Int32Array.from([6, 34, 60, 86, 112, 138, -1]), Int32Array.from([6, 30, 58, 86, 114, 142, -1]), Int32Array.from([6, 34, 62, 90, 118, 146, -1]), Int32Array.from([6, 30, 54, 78, 102, 126, 150]), Int32Array.from([6, 24, 50, 76, 102, 128, 154]), Int32Array.from([6, 28, 54, 80, 106, 132, 158]), Int32Array.from([6, 32, 58, 84, 110, 136, 162]), Int32Array.from([6, 26, 54, 82, 110, 138, 166]), Int32Array.from([6, 30, 58, 86, 114, 142, 170])]),
    t.TYPE_INFO_COORDINATES = Array.from([Int32Array.from([8, 0]), Int32Array.from([8, 1]), Int32Array.from([8, 2]), Int32Array.from([8, 3]), Int32Array.from([8, 4]), Int32Array.from([8, 5]), Int32Array.from([8, 7]), Int32Array.from([8, 8]), Int32Array.from([7, 8]), Int32Array.from([5, 8]), Int32Array.from([4, 8]), Int32Array.from([3, 8]), Int32Array.from([2, 8]), Int32Array.from([1, 8]), Int32Array.from([0, 8])]),
    t.VERSION_INFO_POLY = 7973,
    t.TYPE_INFO_POLY = 1335,
    t.TYPE_INFO_MASK_PATTERN = 21522,
    t
}()
  , b8e = function() {
    function t(e, r) {
        this.dataBytes = e,
        this.errorCorrectionBytes = r
    }
    return t.prototype.getDataBytes = function() {
        return this.dataBytes
    }
    ,
    t.prototype.getErrorCorrectionBytes = function() {
        return this.errorCorrectionBytes
    }
    ,
    t
}()
  , D6 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
;
(function() {
    function t() {}
    return t.calculateMaskPenalty = function(e) {
        return C0.applyMaskPenaltyRule1(e) + C0.applyMaskPenaltyRule2(e) + C0.applyMaskPenaltyRule3(e) + C0.applyMaskPenaltyRule4(e)
    }
    ,
    t.encode = function(e, r, n) {
        n === void 0 && (n = null);
        var i = t.DEFAULT_BYTE_MODE_ENCODING
          , o = n !== null && n.get(kh.CHARACTER_SET) !== void 0;
        o && (i = n.get(kh.CHARACTER_SET).toString());
        var s = this.chooseMode(e, i)
          , a = new kr;
        if (s === Mt.BYTE && (o || t.DEFAULT_BYTE_MODE_ENCODING !== i)) {
            var l = _r.getCharacterSetECIByName(i);
            l !== void 0 && this.appendECI(l, a)
        }
        this.appendModeInfo(s, a);
        var c = new kr;
        this.appendBytes(e, s, c, i);
        var u;
        if (n !== null && n.get(kh.QR_VERSION) !== void 0) {
            var f = Number.parseInt(n.get(kh.QR_VERSION).toString(), 10);
            u = xl.getVersionForNumber(f);
            var d = this.calculateBitsNeeded(s, a, c, u);
            if (!this.willFit(d, u, r))
                throw new Rt("Data too big for requested version")
        } else
            u = this.recommendVersion(r, s, a, c);
        var h = new kr;
        h.appendBitArray(a);
        var x = s === Mt.BYTE ? c.getSizeInBytes() : e.length;
        this.appendLengthInfo(x, u, s, h),
        h.appendBitArray(c);
        var y = u.getECBlocksForLevel(r)
          , m = u.getTotalCodewords() - y.getTotalECCodewords();
        this.terminateBits(m, h);
        var E = this.interleaveWithECBytes(h, u.getTotalCodewords(), m, y.getNumBlocks())
          , g = new QE;
        g.setECLevel(r),
        g.setMode(s),
        g.setVersion(u);
        var p = u.getDimensionForVersion()
          , v = new E8e(p,p)
          , _ = this.chooseMaskPattern(E, r, u, v);
        return g.setMaskPattern(_),
        T6.buildMatrix(E, r, u, _, v),
        g.setMatrix(v),
        g
    }
    ,
    t.recommendVersion = function(e, r, n, i) {
        var o = this.calculateBitsNeeded(r, n, i, xl.getVersionForNumber(1))
          , s = this.chooseVersion(o, e)
          , a = this.calculateBitsNeeded(r, n, i, s);
        return this.chooseVersion(a, e)
    }
    ,
    t.calculateBitsNeeded = function(e, r, n, i) {
        return r.getSize() + e.getCharacterCountBits(i) + n.getSize()
    }
    ,
    t.getAlphanumericCode = function(e) {
        return e < t.ALPHANUMERIC_TABLE.length ? t.ALPHANUMERIC_TABLE[e] : -1
    }
    ,
    t.chooseMode = function(e, r) {
        if (r === void 0 && (r = null),
        _r.SJIS.getName() === r && this.isOnlyDoubleByteKanji(e))
            return Mt.KANJI;
        for (var n = !1, i = !1, o = 0, s = e.length; o < s; ++o) {
            var a = e.charAt(o);
            if (t.isDigit(a))
                n = !0;
            else if (this.getAlphanumericCode(a.charCodeAt(0)) !== -1)
                i = !0;
            else
                return Mt.BYTE
        }
        return i ? Mt.ALPHANUMERIC : n ? Mt.NUMERIC : Mt.BYTE
    }
    ,
    t.isOnlyDoubleByteKanji = function(e) {
        var r;
        try {
            r = yi.encode(e, _r.SJIS)
        } catch {
            return !1
        }
        var n = r.length;
        if (n % 2 !== 0)
            return !1;
        for (var i = 0; i < n; i += 2) {
            var o = r[i] & 255;
            if ((o < 129 || o > 159) && (o < 224 || o > 235))
                return !1
        }
        return !0
    }
    ,
    t.chooseMaskPattern = function(e, r, n, i) {
        for (var o = Number.MAX_SAFE_INTEGER, s = -1, a = 0; a < QE.NUM_MASK_PATTERNS; a++) {
            T6.buildMatrix(e, r, n, a, i);
            var l = this.calculateMaskPenalty(i);
            l < o && (o = l,
            s = a)
        }
        return s
    }
    ,
    t.chooseVersion = function(e, r) {
        for (var n = 1; n <= 40; n++) {
            var i = xl.getVersionForNumber(n);
            if (t.willFit(e, i, r))
                return i
        }
        throw new Rt("Data too big")
    }
    ,
    t.willFit = function(e, r, n) {
        var i = r.getTotalCodewords()
          , o = r.getECBlocksForLevel(n)
          , s = o.getTotalECCodewords()
          , a = i - s
          , l = (e + 7) / 8;
        return a >= l
    }
    ,
    t.terminateBits = function(e, r) {
        var n = e * 8;
        if (r.getSize() > n)
            throw new Rt("data bits cannot fit in the QR Code" + r.getSize() + " > " + n);
        for (var i = 0; i < 4 && r.getSize() < n; ++i)
            r.appendBit(!1);
        var o = r.getSize() & 7;
        if (o > 0)
            for (var i = o; i < 8; i++)
                r.appendBit(!1);
        for (var s = e - r.getSizeInBytes(), i = 0; i < s; ++i)
            r.appendBits(i & 1 ? 17 : 236, 8);
        if (r.getSize() !== n)
            throw new Rt("Bits size does not equal capacity")
    }
    ,
    t.getNumDataBytesAndNumECBytesForBlockID = function(e, r, n, i, o, s) {
        if (i >= n)
            throw new Rt("Block ID too large");
        var a = e % n
          , l = n - a
          , c = Math.floor(e / n)
          , u = c + 1
          , f = Math.floor(r / n)
          , d = f + 1
          , h = c - f
          , x = u - d;
        if (h !== x)
            throw new Rt("EC bytes mismatch");
        if (n !== l + a)
            throw new Rt("RS blocks mismatch");
        if (e !== (f + h) * l + (d + x) * a)
            throw new Rt("Total bytes mismatch");
        i < l ? (o[0] = f,
        s[0] = h) : (o[0] = d,
        s[0] = x)
    }
    ,
    t.interleaveWithECBytes = function(e, r, n, i) {
        var o, s, a, l;
        if (e.getSizeInBytes() !== n)
            throw new Rt("Number of bits and data bytes does not match");
        for (var c = 0, u = 0, f = 0, d = new Array, h = 0; h < i; ++h) {
            var x = new Int32Array(1)
              , y = new Int32Array(1);
            t.getNumDataBytesAndNumECBytesForBlockID(r, n, i, h, x, y);
            var m = x[0]
              , E = new Uint8Array(m);
            e.toBytes(8 * c, E, 0, m);
            var g = t.generateECBytes(E, y[0]);
            d.push(new b8e(E,g)),
            u = Math.max(u, m),
            f = Math.max(f, g.length),
            c += x[0]
        }
        if (n !== c)
            throw new Rt("Data bytes does not match offset");
        for (var p = new kr, h = 0; h < u; ++h)
            try {
                for (var v = (o = void 0,
                D6(d)), _ = v.next(); !_.done; _ = v.next()) {
                    var b = _.value
                      , E = b.getDataBytes();
                    h < E.length && p.appendBits(E[h], 8)
                }
            } catch (A) {
                o = {
                    error: A
                }
            } finally {
                try {
                    _ && !_.done && (s = v.return) && s.call(v)
                } finally {
                    if (o)
                        throw o.error
                }
            }
        for (var h = 0; h < f; ++h)
            try {
                for (var C = (a = void 0,
                D6(d)), w = C.next(); !w.done; w = C.next()) {
                    var b = w.value
                      , g = b.getErrorCorrectionBytes();
                    h < g.length && p.appendBits(g[h], 8)
                }
            } catch (A) {
                a = {
                    error: A
                }
            } finally {
                try {
                    w && !w.done && (l = C.return) && l.call(C)
                } finally {
                    if (a)
                        throw a.error
                }
            }
        if (r !== p.getSizeInBytes())
            throw new Rt("Interleaving error: " + r + " and " + p.getSizeInBytes() + " differ.");
        return p
    }
    ,
    t.generateECBytes = function(e, r) {
        for (var n = e.length, i = new Int32Array(n + r), o = 0; o < n; o++)
            i[o] = e[o] & 255;
        new HM(Sn.QR_CODE_FIELD_256).encode(i, r);
        for (var s = new Uint8Array(r), o = 0; o < r; o++)
            s[o] = i[n + o];
        return s
    }
    ,
    t.appendModeInfo = function(e, r) {
        r.appendBits(e.getBits(), 4)
    }
    ,
    t.appendLengthInfo = function(e, r, n, i) {
        var o = n.getCharacterCountBits(r);
        if (e >= 1 << o)
            throw new Rt(e + " is bigger than " + ((1 << o) - 1));
        i.appendBits(e, o)
    }
    ,
    t.appendBytes = function(e, r, n, i) {
        switch (r) {
        case Mt.NUMERIC:
            t.appendNumericBytes(e, n);
            break;
        case Mt.ALPHANUMERIC:
            t.appendAlphanumericBytes(e, n);
            break;
        case Mt.BYTE:
            t.append8BitBytes(e, n, i);
            break;
        case Mt.KANJI:
            t.appendKanjiBytes(e, n);
            break;
        default:
            throw new Rt("Invalid mode: " + r)
        }
    }
    ,
    t.getDigit = function(e) {
        return e.charCodeAt(0) - 48
    }
    ,
    t.isDigit = function(e) {
        var r = t.getDigit(e);
        return r >= 0 && r <= 9
    }
    ,
    t.appendNumericBytes = function(e, r) {
        for (var n = e.length, i = 0; i < n; ) {
            var o = t.getDigit(e.charAt(i));
            if (i + 2 < n) {
                var s = t.getDigit(e.charAt(i + 1))
                  , a = t.getDigit(e.charAt(i + 2));
                r.appendBits(o * 100 + s * 10 + a, 10),
                i += 3
            } else if (i + 1 < n) {
                var s = t.getDigit(e.charAt(i + 1));
                r.appendBits(o * 10 + s, 7),
                i += 2
            } else
                r.appendBits(o, 4),
                i++
        }
    }
    ,
    t.appendAlphanumericBytes = function(e, r) {
        for (var n = e.length, i = 0; i < n; ) {
            var o = t.getAlphanumericCode(e.charCodeAt(i));
            if (o === -1)
                throw new Rt;
            if (i + 1 < n) {
                var s = t.getAlphanumericCode(e.charCodeAt(i + 1));
                if (s === -1)
                    throw new Rt;
                r.appendBits(o * 45 + s, 11),
                i += 2
            } else
                r.appendBits(o, 6),
                i++
        }
    }
    ,
    t.append8BitBytes = function(e, r, n) {
        var i;
        try {
            i = yi.encode(e, n)
        } catch (l) {
            throw new Rt(l)
        }
        for (var o = 0, s = i.length; o !== s; o++) {
            var a = i[o];
            r.appendBits(a, 8)
        }
    }
    ,
    t.appendKanjiBytes = function(e, r) {
        var n;
        try {
            n = yi.encode(e, _r.SJIS)
        } catch (f) {
            throw new Rt(f)
        }
        for (var i = n.length, o = 0; o < i; o += 2) {
            var s = n[o] & 255
              , a = n[o + 1] & 255
              , l = s << 8 & 4294967295 | a
              , c = -1;
            if (l >= 33088 && l <= 40956 ? c = l - 33088 : l >= 57408 && l <= 60351 && (c = l - 49472),
            c === -1)
                throw new Rt("Invalid byte sequence");
            var u = (c >> 8) * 192 + (c & 255);
            r.appendBits(u, 13)
        }
    }
    ,
    t.appendECI = function(e, r) {
        r.appendBits(Mt.ECI.getBits(), 4),
        r.appendBits(e.getValue(), 8)
    }
    ,
    t.ALPHANUMERIC_TABLE = Int32Array.from([-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1]),
    t.DEFAULT_BYTE_MODE_ENCODING = _r.UTF8.getName(),
    t
}
)();
var C8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    C8e(e, t);
    function e(r, n, i, o, s, a, l, c) {
        var u = t.call(this, a, l) || this;
        if (u.yuvData = r,
        u.dataWidth = n,
        u.dataHeight = i,
        u.left = o,
        u.top = s,
        o + a > n || s + l > i)
            throw new Me("Crop rectangle does not fit within image data.");
        return c && u.reverseHorizontal(a, l),
        u
    }
    return e.prototype.getRow = function(r, n) {
        if (r < 0 || r >= this.getHeight())
            throw new Me("Requested row is outside the image: " + r);
        var i = this.getWidth();
        (n == null || n.length < i) && (n = new Uint8ClampedArray(i));
        var o = (r + this.top) * this.dataWidth + this.left;
        return Ft.arraycopy(this.yuvData, o, n, 0, i),
        n
    }
    ,
    e.prototype.getMatrix = function() {
        var r = this.getWidth()
          , n = this.getHeight();
        if (r === this.dataWidth && n === this.dataHeight)
            return this.yuvData;
        var i = r * n
          , o = new Uint8ClampedArray(i)
          , s = this.top * this.dataWidth + this.left;
        if (r === this.dataWidth)
            return Ft.arraycopy(this.yuvData, s, o, 0, i),
            o;
        for (var a = 0; a < n; a++) {
            var l = a * r;
            Ft.arraycopy(this.yuvData, s, o, l, r),
            s += this.dataWidth
        }
        return o
    }
    ,
    e.prototype.isCropSupported = function() {
        return !0
    }
    ,
    e.prototype.crop = function(r, n, i, o) {
        return new e(this.yuvData,this.dataWidth,this.dataHeight,this.left + r,this.top + n,i,o,!1)
    }
    ,
    e.prototype.renderThumbnail = function() {
        for (var r = this.getWidth() / e.THUMBNAIL_SCALE_FACTOR, n = this.getHeight() / e.THUMBNAIL_SCALE_FACTOR, i = new Int32Array(r * n), o = this.yuvData, s = this.top * this.dataWidth + this.left, a = 0; a < n; a++) {
            for (var l = a * r, c = 0; c < r; c++) {
                var u = o[s + c * e.THUMBNAIL_SCALE_FACTOR] & 255;
                i[l + c] = 4278190080 | u * 65793
            }
            s += this.dataWidth * e.THUMBNAIL_SCALE_FACTOR
        }
        return i
    }
    ,
    e.prototype.getThumbnailWidth = function() {
        return this.getWidth() / e.THUMBNAIL_SCALE_FACTOR
    }
    ,
    e.prototype.getThumbnailHeight = function() {
        return this.getHeight() / e.THUMBNAIL_SCALE_FACTOR
    }
    ,
    e.prototype.reverseHorizontal = function(r, n) {
        for (var i = this.yuvData, o = 0, s = this.top * this.dataWidth + this.left; o < n; o++,
        s += this.dataWidth)
            for (var a = s + r / 2, l = s, c = s + r - 1; l < a; l++,
            c--) {
                var u = i[l];
                i[l] = i[c],
                i[c] = u
            }
    }
    ,
    e.prototype.invert = function() {
        return new $1(this)
    }
    ,
    e.THUMBNAIL_SCALE_FACTOR = 2,
    e
}
)(Cd);
var A8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    A8e(e, t);
    function e(r, n, i, o, s, a, l) {
        var c = t.call(this, n, i) || this;
        if (c.dataWidth = o,
        c.dataHeight = s,
        c.left = a,
        c.top = l,
        r.BYTES_PER_ELEMENT === 4) {
            for (var u = n * i, f = new Uint8ClampedArray(u), d = 0; d < u; d++) {
                var h = r[d]
                  , x = h >> 16 & 255
                  , y = h >> 7 & 510
                  , m = h & 255;
                f[d] = (x + y + m) / 4 & 255
            }
            c.luminances = f
        } else
            c.luminances = r;
        if (o === void 0 && (c.dataWidth = n),
        s === void 0 && (c.dataHeight = i),
        a === void 0 && (c.left = 0),
        l === void 0 && (c.top = 0),
        c.left + n > c.dataWidth || c.top + i > c.dataHeight)
            throw new Me("Crop rectangle does not fit within image data.");
        return c
    }
    return e.prototype.getRow = function(r, n) {
        if (r < 0 || r >= this.getHeight())
            throw new Me("Requested row is outside the image: " + r);
        var i = this.getWidth();
        (n == null || n.length < i) && (n = new Uint8ClampedArray(i));
        var o = (r + this.top) * this.dataWidth + this.left;
        return Ft.arraycopy(this.luminances, o, n, 0, i),
        n
    }
    ,
    e.prototype.getMatrix = function() {
        var r = this.getWidth()
          , n = this.getHeight();
        if (r === this.dataWidth && n === this.dataHeight)
            return this.luminances;
        var i = r * n
          , o = new Uint8ClampedArray(i)
          , s = this.top * this.dataWidth + this.left;
        if (r === this.dataWidth)
            return Ft.arraycopy(this.luminances, s, o, 0, i),
            o;
        for (var a = 0; a < n; a++) {
            var l = a * r;
            Ft.arraycopy(this.luminances, s, o, l, r),
            s += this.dataWidth
        }
        return o
    }
    ,
    e.prototype.isCropSupported = function() {
        return !0
    }
    ,
    e.prototype.crop = function(r, n, i, o) {
        return new e(this.luminances,i,o,this.dataWidth,this.dataHeight,this.left + r,this.top + n)
    }
    ,
    e.prototype.invert = function() {
        return new $1(this)
    }
    ,
    e
}
)(Cd);
var w8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), B8e = function(t) {
    w8e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.forName = function(r) {
        return this.getCharacterSetECIByName(r)
    }
    ,
    e
}(_r), S8e = function() {
    function t() {}
    return t.ISO_8859_1 = _r.ISO8859_1,
    t
}(), e_, T8e = 301, D8e = function(t, e) {
    for (var r = 1, n = 0; n < 255; n++)
        e[n] = r,
        t[r] = n,
        r *= 2,
        r >= 256 && (r ^= T8e);
    return {
        LOG: t,
        ALOG: e
    }
};
e_ = D8e([], []),
e_.LOG;
e_.ALOG;
var F6;
(function(t) {
    t[t.FORCE_NONE = 0] = "FORCE_NONE",
    t[t.FORCE_SQUARE = 1] = "FORCE_SQUARE",
    t[t.FORCE_RECTANGLE = 2] = "FORCE_RECTANGLE"
}
)(F6 || (F6 = {}));
var P6 = 129
  , VM = 230
  , F8e = 231
  , P8e = 235
  , I8e = 236
  , O8e = 237
  , k8e = 238
  , R8e = 239
  , M8e = 240
  , tv = 254
  , N8e = 254
  , I6 = "[)>05"
  , O6 = "[)>06"
  , k6 = ""
  , yt = 0
  , $r = 1
  , cn = 2
  , mr = 3
  , Dr = 4
  , Kr = 5
  , L8e = function() {
    function t() {}
    return t.prototype.getEncodingMode = function() {
        return yt
    }
    ,
    t.prototype.encode = function(e) {
        var r = ki.determineConsecutiveDigitCount(e.getMessage(), e.pos);
        if (r >= 2)
            e.writeCodeword(this.encodeASCIIDigits(e.getMessage().charCodeAt(e.pos), e.getMessage().charCodeAt(e.pos + 1))),
            e.pos += 2;
        else {
            var n = e.getCurrentChar()
              , i = ki.lookAheadTest(e.getMessage(), e.pos, this.getEncodingMode());
            if (i !== this.getEncodingMode())
                switch (i) {
                case Kr:
                    e.writeCodeword(F8e),
                    e.signalEncoderChange(Kr);
                    return;
                case $r:
                    e.writeCodeword(VM),
                    e.signalEncoderChange($r);
                    return;
                case mr:
                    e.writeCodeword(k8e),
                    e.signalEncoderChange(mr);
                    break;
                case cn:
                    e.writeCodeword(R8e),
                    e.signalEncoderChange(cn);
                    break;
                case Dr:
                    e.writeCodeword(M8e),
                    e.signalEncoderChange(Dr);
                    break;
                default:
                    throw new Error("Illegal mode: " + i)
                }
            else
                ki.isExtendedASCII(n) ? (e.writeCodeword(P8e),
                e.writeCodeword(n - 128 + 1),
                e.pos++) : (e.writeCodeword(n + 1),
                e.pos++)
        }
    }
    ,
    t.prototype.encodeASCIIDigits = function(e, r) {
        if (ki.isDigit(e) && ki.isDigit(r)) {
            var n = (e - 48) * 10 + (r - 48);
            return n + 130
        }
        throw new Error("not digits: " + e + r)
    }
    ,
    t
}()
  , $8e = function() {
    function t() {}
    return t.prototype.getEncodingMode = function() {
        return Kr
    }
    ,
    t.prototype.encode = function(e) {
        var r = new Ke;
        for (r.append(0); e.hasMoreCharacters(); ) {
            var n = e.getCurrentChar();
            r.append(n),
            e.pos++;
            var i = ki.lookAheadTest(e.getMessage(), e.pos, this.getEncodingMode());
            if (i !== this.getEncodingMode()) {
                e.signalEncoderChange(yt);
                break
            }
        }
        var o = r.length() - 1
          , s = 1
          , a = e.getCodewordCount() + o + s;
        e.updateSymbolInfo(a);
        var l = e.getSymbolInfo().getDataCapacity() - a > 0;
        if (e.hasMoreCharacters() || l)
            if (o <= 249)
                r.setCharAt(0, nt.getCharAt(o));
            else if (o <= 1555)
                r.setCharAt(0, nt.getCharAt(Math.floor(o / 250) + 249)),
                r.insert(1, nt.getCharAt(o % 250));
            else
                throw new Error("Message length not in valid ranges: " + o);
        for (var c = 0, n = r.length(); c < n; c++)
            e.writeCodeword(this.randomize255State(r.charAt(c).charCodeAt(0), e.getCodewordCount() + 1))
    }
    ,
    t.prototype.randomize255State = function(e, r) {
        var n = 149 * r % 255 + 1
          , i = e + n;
        return i <= 255 ? i : i - 256
    }
    ,
    t
}()
  , LC = function() {
    function t() {}
    return t.prototype.getEncodingMode = function() {
        return $r
    }
    ,
    t.prototype.encodeMaximal = function(e) {
        for (var r = new Ke, n = 0, i = e.pos, o = 0; e.hasMoreCharacters(); ) {
            var s = e.getCurrentChar();
            e.pos++,
            n = this.encodeChar(s, r),
            r.length() % 3 === 0 && (i = e.pos,
            o = r.length())
        }
        if (o !== r.length()) {
            var a = Math.floor(r.length() / 3 * 2)
              , l = Math.floor(e.getCodewordCount() + a + 1);
            e.updateSymbolInfo(l);
            var c = e.getSymbolInfo().getDataCapacity() - l
              , u = Math.floor(r.length() % 3);
            (u === 2 && c !== 2 || u === 1 && (n > 3 || c !== 1)) && (e.pos = i)
        }
        r.length() > 0 && e.writeCodeword(VM),
        this.handleEOD(e, r)
    }
    ,
    t.prototype.encode = function(e) {
        for (var r = new Ke; e.hasMoreCharacters(); ) {
            var n = e.getCurrentChar();
            e.pos++;
            var i = this.encodeChar(n, r)
              , o = Math.floor(r.length() / 3) * 2
              , s = e.getCodewordCount() + o;
            e.updateSymbolInfo(s);
            var a = e.getSymbolInfo().getDataCapacity() - s;
            if (!e.hasMoreCharacters()) {
                var l = new Ke;
                for (r.length() % 3 === 2 && a !== 2 && (i = this.backtrackOneCharacter(e, r, l, i)); r.length() % 3 === 1 && (i > 3 || a !== 1); )
                    i = this.backtrackOneCharacter(e, r, l, i);
                break
            }
            var c = r.length();
            if (c % 3 === 0) {
                var u = ki.lookAheadTest(e.getMessage(), e.pos, this.getEncodingMode());
                if (u !== this.getEncodingMode()) {
                    e.signalEncoderChange(yt);
                    break
                }
            }
        }
        this.handleEOD(e, r)
    }
    ,
    t.prototype.backtrackOneCharacter = function(e, r, n, i) {
        var o = r.length()
          , s = r.toString().substring(0, o - i);
        r.setLengthToZero(),
        r.append(s),
        e.pos--;
        var a = e.getCurrentChar();
        return i = this.encodeChar(a, n),
        e.resetSymbolInfo(),
        i
    }
    ,
    t.prototype.writeNextTriplet = function(e, r) {
        e.writeCodewords(this.encodeToCodewords(r.toString()));
        var n = r.toString().substring(3);
        r.setLengthToZero(),
        r.append(n)
    }
    ,
    t.prototype.handleEOD = function(e, r) {
        var n = Math.floor(r.length() / 3 * 2)
          , i = r.length() % 3
          , o = e.getCodewordCount() + n;
        e.updateSymbolInfo(o);
        var s = e.getSymbolInfo().getDataCapacity() - o;
        if (i === 2) {
            for (r.append("\0"); r.length() >= 3; )
                this.writeNextTriplet(e, r);
            e.hasMoreCharacters() && e.writeCodeword(tv)
        } else if (s === 1 && i === 1) {
            for (; r.length() >= 3; )
                this.writeNextTriplet(e, r);
            e.hasMoreCharacters() && e.writeCodeword(tv),
            e.pos--
        } else if (i === 0) {
            for (; r.length() >= 3; )
                this.writeNextTriplet(e, r);
            (s > 0 || e.hasMoreCharacters()) && e.writeCodeword(tv)
        } else
            throw new Error("Unexpected case. Please report!");
        e.signalEncoderChange(yt)
    }
    ,
    t.prototype.encodeChar = function(e, r) {
        if (e === " ".charCodeAt(0))
            return r.append(3),
            1;
        if (e >= "0".charCodeAt(0) && e <= "9".charCodeAt(0))
            return r.append(e - 48 + 4),
            1;
        if (e >= "A".charCodeAt(0) && e <= "Z".charCodeAt(0))
            return r.append(e - 65 + 14),
            1;
        if (e < " ".charCodeAt(0))
            return r.append(0),
            r.append(e),
            2;
        if (e <= "/".charCodeAt(0))
            return r.append(1),
            r.append(e - 33),
            2;
        if (e <= "@".charCodeAt(0))
            return r.append(1),
            r.append(e - 58 + 15),
            2;
        if (e <= "_".charCodeAt(0))
            return r.append(1),
            r.append(e - 91 + 22),
            2;
        if (e <= 127)
            return r.append(2),
            r.append(e - 96),
            2;
        r.append("1");
        var n = 2;
        return n += this.encodeChar(e - 128, r),
        n
    }
    ,
    t.prototype.encodeToCodewords = function(e) {
        var r = 1600 * e.charCodeAt(0) + 40 * e.charCodeAt(1) + e.charCodeAt(2) + 1
          , n = r / 256
          , i = r % 256
          , o = new Ke;
        return o.append(n),
        o.append(i),
        o.toString()
    }
    ,
    t
}()
  , U8e = function() {
    function t() {}
    return t.prototype.getEncodingMode = function() {
        return Dr
    }
    ,
    t.prototype.encode = function(e) {
        for (var r = new Ke; e.hasMoreCharacters(); ) {
            var n = e.getCurrentChar();
            this.encodeChar(n, r),
            e.pos++;
            var i = r.length();
            if (i >= 4) {
                e.writeCodewords(this.encodeToCodewords(r.toString()));
                var o = r.toString().substring(4);
                r.setLengthToZero(),
                r.append(o);
                var s = ki.lookAheadTest(e.getMessage(), e.pos, this.getEncodingMode());
                if (s !== this.getEncodingMode()) {
                    e.signalEncoderChange(yt);
                    break
                }
            }
        }
        r.append(nt.getCharAt(31)),
        this.handleEOD(e, r)
    }
    ,
    t.prototype.handleEOD = function(e, r) {
        try {
            var n = r.length();
            if (n === 0)
                return;
            if (n === 1) {
                e.updateSymbolInfo();
                var i = e.getSymbolInfo().getDataCapacity() - e.getCodewordCount()
                  , o = e.getRemainingCharacters();
                if (o > i && (e.updateSymbolInfo(e.getCodewordCount() + 1),
                i = e.getSymbolInfo().getDataCapacity() - e.getCodewordCount()),
                o <= i && i <= 2)
                    return
            }
            if (n > 4)
                throw new Error("Count must not exceed 4");
            var s = n - 1
              , a = this.encodeToCodewords(r.toString())
              , l = !e.hasMoreCharacters()
              , c = l && s <= 2;
            if (s <= 2) {
                e.updateSymbolInfo(e.getCodewordCount() + s);
                var i = e.getSymbolInfo().getDataCapacity() - e.getCodewordCount();
                i >= 3 && (c = !1,
                e.updateSymbolInfo(e.getCodewordCount() + a.length))
            }
            c ? (e.resetSymbolInfo(),
            e.pos -= s) : e.writeCodewords(a)
        } finally {
            e.signalEncoderChange(yt)
        }
    }
    ,
    t.prototype.encodeChar = function(e, r) {
        e >= " ".charCodeAt(0) && e <= "?".charCodeAt(0) ? r.append(e) : e >= "@".charCodeAt(0) && e <= "^".charCodeAt(0) ? r.append(nt.getCharAt(e - 64)) : ki.illegalCharacter(nt.getCharAt(e))
    }
    ,
    t.prototype.encodeToCodewords = function(e) {
        var r = e.length;
        if (r === 0)
            throw new Error("StringBuilder must not be empty");
        var n = e.charAt(0).charCodeAt(0)
          , i = r >= 2 ? e.charAt(1).charCodeAt(0) : 0
          , o = r >= 3 ? e.charAt(2).charCodeAt(0) : 0
          , s = r >= 4 ? e.charAt(3).charCodeAt(0) : 0
          , a = (n << 18) + (i << 12) + (o << 6) + s
          , l = a >> 16 & 255
          , c = a >> 8 & 255
          , u = a & 255
          , f = new Ke;
        return f.append(l),
        r >= 2 && f.append(c),
        r >= 3 && f.append(u),
        f.toString()
    }
    ,
    t
}()
  , G8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , H8e = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , ht = function() {
    function t(e, r, n, i, o, s, a, l) {
        a === void 0 && (a = 0),
        l === void 0 && (l = 0),
        this.rectangular = e,
        this.dataCapacity = r,
        this.errorCodewords = n,
        this.matrixWidth = i,
        this.matrixHeight = o,
        this.dataRegions = s,
        this.rsBlockData = a,
        this.rsBlockError = l
    }
    return t.lookup = function(e, r, n, i, o) {
        var s, a;
        r === void 0 && (r = 0),
        n === void 0 && (n = null),
        i === void 0 && (i = null),
        o === void 0 && (o = !0);
        try {
            for (var l = H8e(z8e), c = l.next(); !c.done; c = l.next()) {
                var u = c.value;
                if (!(r === 1 && u.rectangular) && !(r === 2 && !u.rectangular) && !(n != null && (u.getSymbolWidth() < n.getWidth() || u.getSymbolHeight() < n.getHeight())) && !(i != null && (u.getSymbolWidth() > i.getWidth() || u.getSymbolHeight() > i.getHeight())) && e <= u.dataCapacity)
                    return u
            }
        } catch (f) {
            s = {
                error: f
            }
        } finally {
            try {
                c && !c.done && (a = l.return) && a.call(l)
            } finally {
                if (s)
                    throw s.error
            }
        }
        if (o)
            throw new Error("Can't find a symbol arrangement that matches the message. Data codewords: " + e);
        return null
    }
    ,
    t.prototype.getHorizontalDataRegions = function() {
        switch (this.dataRegions) {
        case 1:
            return 1;
        case 2:
        case 4:
            return 2;
        case 16:
            return 4;
        case 36:
            return 6;
        default:
            throw new Error("Cannot handle this number of data regions")
        }
    }
    ,
    t.prototype.getVerticalDataRegions = function() {
        switch (this.dataRegions) {
        case 1:
        case 2:
            return 1;
        case 4:
            return 2;
        case 16:
            return 4;
        case 36:
            return 6;
        default:
            throw new Error("Cannot handle this number of data regions")
        }
    }
    ,
    t.prototype.getSymbolDataWidth = function() {
        return this.getHorizontalDataRegions() * this.matrixWidth
    }
    ,
    t.prototype.getSymbolDataHeight = function() {
        return this.getVerticalDataRegions() * this.matrixHeight
    }
    ,
    t.prototype.getSymbolWidth = function() {
        return this.getSymbolDataWidth() + this.getHorizontalDataRegions() * 2
    }
    ,
    t.prototype.getSymbolHeight = function() {
        return this.getSymbolDataHeight() + this.getVerticalDataRegions() * 2
    }
    ,
    t.prototype.getCodewordCount = function() {
        return this.dataCapacity + this.errorCodewords
    }
    ,
    t.prototype.getInterleavedBlockCount = function() {
        return this.rsBlockData ? this.dataCapacity / this.rsBlockData : 1
    }
    ,
    t.prototype.getDataCapacity = function() {
        return this.dataCapacity
    }
    ,
    t.prototype.getErrorCodewords = function() {
        return this.errorCodewords
    }
    ,
    t.prototype.getDataLengthForInterleavedBlock = function(e) {
        return this.rsBlockData
    }
    ,
    t.prototype.getErrorLengthForInterleavedBlock = function(e) {
        return this.rsBlockError
    }
    ,
    t
}()
  , V8e = function(t) {
    G8e(e, t);
    function e() {
        return t.call(this, !1, 1558, 620, 22, 22, 36, -1, 62) || this
    }
    return e.prototype.getInterleavedBlockCount = function() {
        return 10
    }
    ,
    e.prototype.getDataLengthForInterleavedBlock = function(r) {
        return r <= 8 ? 156 : 155
    }
    ,
    e
}(ht)
  , z8e = [new ht(!1,3,5,8,8,1), new ht(!1,5,7,10,10,1), new ht(!0,5,7,16,6,1), new ht(!1,8,10,12,12,1), new ht(!0,10,11,14,6,2), new ht(!1,12,12,14,14,1), new ht(!0,16,14,24,10,1), new ht(!1,18,14,16,16,1), new ht(!1,22,18,18,18,1), new ht(!0,22,18,16,10,2), new ht(!1,30,20,20,20,1), new ht(!0,32,24,16,14,2), new ht(!1,36,24,22,22,1), new ht(!1,44,28,24,24,1), new ht(!0,49,28,22,14,2), new ht(!1,62,36,14,14,4), new ht(!1,86,42,16,16,4), new ht(!1,114,48,18,18,4), new ht(!1,144,56,20,20,4), new ht(!1,174,68,22,22,4), new ht(!1,204,84,24,24,4,102,42), new ht(!1,280,112,14,14,16,140,56), new ht(!1,368,144,16,16,16,92,36), new ht(!1,456,192,18,18,16,114,48), new ht(!1,576,224,20,20,16,144,56), new ht(!1,696,272,22,22,16,174,68), new ht(!1,816,336,24,24,16,136,56), new ht(!1,1050,408,18,18,36,175,68), new ht(!1,1304,496,20,20,36,163,62), new V8e]
  , j8e = function() {
    function t(e) {
        this.msg = e,
        this.pos = 0,
        this.skipAtEnd = 0;
        for (var r = e.split("").map(function(a) {
            return a.charCodeAt(0)
        }), n = new Ke, i = 0, o = r.length; i < o; i++) {
            var s = String.fromCharCode(r[i] & 255);
            if (s === "?" && e.charAt(i) !== "?")
                throw new Error("Message contains characters outside ISO-8859-1 encoding.");
            n.append(s)
        }
        this.msg = n.toString(),
        this.shape = 0,
        this.codewords = new Ke,
        this.newEncoding = -1
    }
    return t.prototype.setSymbolShape = function(e) {
        this.shape = e
    }
    ,
    t.prototype.setSizeConstraints = function(e, r) {
        this.minSize = e,
        this.maxSize = r
    }
    ,
    t.prototype.getMessage = function() {
        return this.msg
    }
    ,
    t.prototype.setSkipAtEnd = function(e) {
        this.skipAtEnd = e
    }
    ,
    t.prototype.getCurrentChar = function() {
        return this.msg.charCodeAt(this.pos)
    }
    ,
    t.prototype.getCurrent = function() {
        return this.msg.charCodeAt(this.pos)
    }
    ,
    t.prototype.getCodewords = function() {
        return this.codewords
    }
    ,
    t.prototype.writeCodewords = function(e) {
        this.codewords.append(e)
    }
    ,
    t.prototype.writeCodeword = function(e) {
        this.codewords.append(e)
    }
    ,
    t.prototype.getCodewordCount = function() {
        return this.codewords.length()
    }
    ,
    t.prototype.getNewEncoding = function() {
        return this.newEncoding
    }
    ,
    t.prototype.signalEncoderChange = function(e) {
        this.newEncoding = e
    }
    ,
    t.prototype.resetEncoderSignal = function() {
        this.newEncoding = -1
    }
    ,
    t.prototype.hasMoreCharacters = function() {
        return this.pos < this.getTotalMessageCharCount()
    }
    ,
    t.prototype.getTotalMessageCharCount = function() {
        return this.msg.length - this.skipAtEnd
    }
    ,
    t.prototype.getRemainingCharacters = function() {
        return this.getTotalMessageCharCount() - this.pos
    }
    ,
    t.prototype.getSymbolInfo = function() {
        return this.symbolInfo
    }
    ,
    t.prototype.updateSymbolInfo = function(e) {
        e === void 0 && (e = this.getCodewordCount()),
        (this.symbolInfo == null || e > this.symbolInfo.getDataCapacity()) && (this.symbolInfo = ht.lookup(e, this.shape, this.minSize, this.maxSize, !0))
    }
    ,
    t.prototype.resetSymbolInfo = function() {
        this.symbolInfo = null
    }
    ,
    t
}()
  , W8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Y8e = function(t) {
    W8e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.prototype.getEncodingMode = function() {
        return mr
    }
    ,
    e.prototype.encode = function(r) {
        for (var n = new Ke; r.hasMoreCharacters(); ) {
            var i = r.getCurrentChar();
            r.pos++,
            this.encodeChar(i, n);
            var o = n.length();
            if (o % 3 === 0) {
                this.writeNextTriplet(r, n);
                var s = ki.lookAheadTest(r.getMessage(), r.pos, this.getEncodingMode());
                if (s !== this.getEncodingMode()) {
                    r.signalEncoderChange(yt);
                    break
                }
            }
        }
        this.handleEOD(r, n)
    }
    ,
    e.prototype.encodeChar = function(r, n) {
        switch (r) {
        case 13:
            n.append(0);
            break;
        case "*".charCodeAt(0):
            n.append(1);
            break;
        case ">".charCodeAt(0):
            n.append(2);
            break;
        case " ".charCodeAt(0):
            n.append(3);
            break;
        default:
            r >= "0".charCodeAt(0) && r <= "9".charCodeAt(0) ? n.append(r - 48 + 4) : r >= "A".charCodeAt(0) && r <= "Z".charCodeAt(0) ? n.append(r - 65 + 14) : ki.illegalCharacter(nt.getCharAt(r));
            break
        }
        return 1
    }
    ,
    e.prototype.handleEOD = function(r, n) {
        r.updateSymbolInfo();
        var i = r.getSymbolInfo().getDataCapacity() - r.getCodewordCount()
          , o = n.length();
        r.pos -= o,
        (r.getRemainingCharacters() > 1 || i > 1 || r.getRemainingCharacters() !== i) && r.writeCodeword(N8e),
        r.getNewEncoding() < 0 && r.signalEncoderChange(yt)
    }
    ,
    e
}(LC)
  , X8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , K8e = function(t) {
    X8e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.prototype.getEncodingMode = function() {
        return cn
    }
    ,
    e.prototype.encodeChar = function(r, n) {
        if (r === " ".charCodeAt(0))
            return n.append(3),
            1;
        if (r >= "0".charCodeAt(0) && r <= "9".charCodeAt(0))
            return n.append(r - 48 + 4),
            1;
        if (r >= "a".charCodeAt(0) && r <= "z".charCodeAt(0))
            return n.append(r - 97 + 14),
            1;
        if (r < " ".charCodeAt(0))
            return n.append(0),
            n.append(r),
            2;
        if (r <= "/".charCodeAt(0))
            return n.append(1),
            n.append(r - 33),
            2;
        if (r <= "@".charCodeAt(0))
            return n.append(1),
            n.append(r - 58 + 15),
            2;
        if (r >= "[".charCodeAt(0) && r <= "_".charCodeAt(0))
            return n.append(1),
            n.append(r - 91 + 22),
            2;
        if (r === "`".charCodeAt(0))
            return n.append(2),
            n.append(0),
            2;
        if (r <= "Z".charCodeAt(0))
            return n.append(2),
            n.append(r - 65 + 1),
            2;
        if (r <= 127)
            return n.append(2),
            n.append(r - 123 + 27),
            2;
        n.append("1");
        var i = 2;
        return i += this.encodeChar(r - 128, n),
        i
    }
    ,
    e
}(LC)
  , q8e = function() {
    function t() {}
    return t.randomize253State = function(e) {
        var r = 149 * e % 253 + 1
          , n = P6 + r;
        return n <= 254 ? n : n - 254
    }
    ,
    t.encodeHighLevel = function(e, r, n, i, o) {
        r === void 0 && (r = 0),
        n === void 0 && (n = null),
        i === void 0 && (i = null),
        o === void 0 && (o = !1);
        var s = new LC
          , a = [new L8e, s, new K8e, new Y8e, new U8e, new $8e]
          , l = new j8e(e);
        l.setSymbolShape(r),
        l.setSizeConstraints(n, i),
        e.startsWith(I6) && e.endsWith(k6) ? (l.writeCodeword(I8e),
        l.setSkipAtEnd(2),
        l.pos += I6.length) : e.startsWith(O6) && e.endsWith(k6) && (l.writeCodeword(O8e),
        l.setSkipAtEnd(2),
        l.pos += O6.length);
        var c = yt;
        for (o && (s.encodeMaximal(l),
        c = l.getNewEncoding(),
        l.resetEncoderSignal()); l.hasMoreCharacters(); )
            a[c].encode(l),
            l.getNewEncoding() >= 0 && (c = l.getNewEncoding(),
            l.resetEncoderSignal());
        var u = l.getCodewordCount();
        l.updateSymbolInfo();
        var f = l.getSymbolInfo().getDataCapacity();
        u < f && c !== yt && c !== Kr && c !== Dr && l.writeCodeword("þ");
        var d = l.getCodewords();
        for (d.length() < f && d.append(P6); d.length() < f; )
            d.append(this.randomize253State(d.length() + 1));
        return l.getCodewords().toString()
    }
    ,
    t.lookAheadTest = function(e, r, n) {
        var i = this.lookAheadTestIntern(e, r, n);
        if (n === mr && i === mr) {
            for (var o = Math.min(r + 3, e.length), s = r; s < o; s++)
                if (!this.isNativeX12(e.charCodeAt(s)))
                    return yt
        } else if (n === Dr && i === Dr) {
            for (var o = Math.min(r + 4, e.length), s = r; s < o; s++)
                if (!this.isNativeEDIFACT(e.charCodeAt(s)))
                    return yt
        }
        return i
    }
    ,
    t.lookAheadTestIntern = function(e, r, n) {
        if (r >= e.length)
            return n;
        var i;
        n === yt ? i = [0, 1, 1, 1, 1, 1.25] : (i = [1, 2, 2, 2, 2, 2.25],
        i[n] = 0);
        for (var o = 0, s = new Uint8Array(6), a = []; ; ) {
            if (r + o === e.length) {
                br.fill(s, 0),
                br.fill(a, 0);
                var l = this.findMinimums(i, a, qe.MAX_VALUE, s)
                  , c = this.getMinimumCount(s);
                if (a[yt] === l)
                    return yt;
                if (c === 1) {
                    if (s[Kr] > 0)
                        return Kr;
                    if (s[Dr] > 0)
                        return Dr;
                    if (s[cn] > 0)
                        return cn;
                    if (s[mr] > 0)
                        return mr
                }
                return $r
            }
            var u = e.charCodeAt(r + o);
            if (o++,
            this.isDigit(u) ? i[yt] += .5 : this.isExtendedASCII(u) ? (i[yt] = Math.ceil(i[yt]),
            i[yt] += 2) : (i[yt] = Math.ceil(i[yt]),
            i[yt]++),
            this.isNativeC40(u) ? i[$r] += 2 / 3 : this.isExtendedASCII(u) ? i[$r] += 8 / 3 : i[$r] += 4 / 3,
            this.isNativeText(u) ? i[cn] += 2 / 3 : this.isExtendedASCII(u) ? i[cn] += 8 / 3 : i[cn] += 4 / 3,
            this.isNativeX12(u) ? i[mr] += 2 / 3 : this.isExtendedASCII(u) ? i[mr] += 13 / 3 : i[mr] += 10 / 3,
            this.isNativeEDIFACT(u) ? i[Dr] += 3 / 4 : this.isExtendedASCII(u) ? i[Dr] += 17 / 4 : i[Dr] += 13 / 4,
            this.isSpecialB256(u) ? i[Kr] += 4 : i[Kr]++,
            o >= 4) {
                if (br.fill(s, 0),
                br.fill(a, 0),
                this.findMinimums(i, a, qe.MAX_VALUE, s),
                a[yt] < this.min(a[Kr], a[$r], a[cn], a[mr], a[Dr]))
                    return yt;
                if (a[Kr] < a[yt] || a[Kr] + 1 < this.min(a[$r], a[cn], a[mr], a[Dr]))
                    return Kr;
                if (a[Dr] + 1 < this.min(a[Kr], a[$r], a[cn], a[mr], a[yt]))
                    return Dr;
                if (a[cn] + 1 < this.min(a[Kr], a[$r], a[Dr], a[mr], a[yt]))
                    return cn;
                if (a[mr] + 1 < this.min(a[Kr], a[$r], a[Dr], a[cn], a[yt]))
                    return mr;
                if (a[$r] + 1 < this.min(a[yt], a[Kr], a[Dr], a[cn])) {
                    if (a[$r] < a[mr])
                        return $r;
                    if (a[$r] === a[mr]) {
                        for (var f = r + o + 1; f < e.length; ) {
                            var d = e.charCodeAt(f);
                            if (this.isX12TermSep(d))
                                return mr;
                            if (!this.isNativeX12(d))
                                break;
                            f++
                        }
                        return $r
                    }
                }
            }
        }
    }
    ,
    t.min = function(e, r, n, i, o) {
        var s = Math.min(e, Math.min(r, Math.min(n, i)));
        return o === void 0 ? s : Math.min(s, o)
    }
    ,
    t.findMinimums = function(e, r, n, i) {
        for (var o = 0; o < 6; o++) {
            var s = r[o] = Math.ceil(e[o]);
            n > s && (n = s,
            br.fill(i, 0)),
            n === s && (i[o] = i[o] + 1)
        }
        return n
    }
    ,
    t.getMinimumCount = function(e) {
        for (var r = 0, n = 0; n < 6; n++)
            r += e[n];
        return r || 0
    }
    ,
    t.isDigit = function(e) {
        return e >= "0".charCodeAt(0) && e <= "9".charCodeAt(0)
    }
    ,
    t.isExtendedASCII = function(e) {
        return e >= 128 && e <= 255
    }
    ,
    t.isNativeC40 = function(e) {
        return e === " ".charCodeAt(0) || e >= "0".charCodeAt(0) && e <= "9".charCodeAt(0) || e >= "A".charCodeAt(0) && e <= "Z".charCodeAt(0)
    }
    ,
    t.isNativeText = function(e) {
        return e === " ".charCodeAt(0) || e >= "0".charCodeAt(0) && e <= "9".charCodeAt(0) || e >= "a".charCodeAt(0) && e <= "z".charCodeAt(0)
    }
    ,
    t.isNativeX12 = function(e) {
        return this.isX12TermSep(e) || e === " ".charCodeAt(0) || e >= "0".charCodeAt(0) && e <= "9".charCodeAt(0) || e >= "A".charCodeAt(0) && e <= "Z".charCodeAt(0)
    }
    ,
    t.isX12TermSep = function(e) {
        return e === 13 || e === "*".charCodeAt(0) || e === ">".charCodeAt(0)
    }
    ,
    t.isNativeEDIFACT = function(e) {
        return e >= " ".charCodeAt(0) && e <= "^".charCodeAt(0)
    }
    ,
    t.isSpecialB256 = function(e) {
        return !1
    }
    ,
    t.determineConsecutiveDigitCount = function(e, r) {
        r === void 0 && (r = 0);
        for (var n = e.length, i = r; i < n && this.isDigit(e.charCodeAt(i)); )
            i++;
        return i - r
    }
    ,
    t.illegalCharacter = function(e) {
        var r = qe.toHexString(e.charCodeAt(0));
        throw r = "0000".substring(0, 4 - r.length) + r,
        new Error("Illegal character: " + e + " (0x" + r + ")")
    }
    ,
    t
}();
const ki = q8e;
var rv = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , R6 = function() {
    function t(e) {
        this.charset = e,
        this.name = e.name
    }
    return t.prototype.canEncode = function(e) {
        try {
            return yi.encode(e, this.charset) != null
        } catch {
            return !1
        }
    }
    ,
    t
}()
  , Z8e = function() {
    function t(e, r, n) {
        var i, o, s, a, l, c;
        this.ENCODERS = ["IBM437", "ISO-8859-2", "ISO-8859-3", "ISO-8859-4", "ISO-8859-5", "ISO-8859-6", "ISO-8859-7", "ISO-8859-8", "ISO-8859-9", "ISO-8859-10", "ISO-8859-11", "ISO-8859-13", "ISO-8859-14", "ISO-8859-15", "ISO-8859-16", "windows-1250", "windows-1251", "windows-1252", "windows-1256", "Shift_JIS"].map(function(T) {
            return new R6(B8e.forName(T))
        }),
        this.encoders = [];
        var u = [];
        u.push(new R6(S8e.ISO_8859_1));
        for (var f = r != null && r.name.startsWith("UTF"), d = 0; d < e.length; d++) {
            var h = !1;
            try {
                for (var x = (i = void 0,
                rv(u)), y = x.next(); !y.done; y = x.next()) {
                    var m = y.value
                      , E = e.charAt(d)
                      , g = E.charCodeAt(0);
                    if (g === n || m.canEncode(E)) {
                        h = !0;
                        break
                    }
                }
            } catch (T) {
                i = {
                    error: T
                }
            } finally {
                try {
                    y && !y.done && (o = x.return) && o.call(x)
                } finally {
                    if (i)
                        throw i.error
                }
            }
            if (!h)
                try {
                    for (var p = (s = void 0,
                    rv(this.ENCODERS)), v = p.next(); !v.done; v = p.next()) {
                        var m = v.value;
                        if (m.canEncode(e.charAt(d))) {
                            u.push(m),
                            h = !0;
                            break
                        }
                    }
                } catch (T) {
                    s = {
                        error: T
                    }
                } finally {
                    try {
                        v && !v.done && (a = p.return) && a.call(p)
                    } finally {
                        if (s)
                            throw s.error
                    }
                }
            h || (f = !0)
        }
        if (u.length === 1 && !f)
            this.encoders = [u[0]];
        else {
            this.encoders = [];
            var _ = 0;
            try {
                for (var b = rv(u), C = b.next(); !C.done; C = b.next()) {
                    var m = C.value;
                    this.encoders[_++] = m
                }
            } catch (T) {
                l = {
                    error: T
                }
            } finally {
                try {
                    C && !C.done && (c = b.return) && c.call(b)
                } finally {
                    if (l)
                        throw l.error
                }
            }
        }
        var w = -1;
        if (r != null) {
            for (var d = 0; d < this.encoders.length; d++)
                if (this.encoders[d] != null && r.name === this.encoders[d].name) {
                    w = d;
                    break
                }
        }
        this.priorityEncoderIndex = w
    }
    return t.prototype.length = function() {
        return this.encoders.length
    }
    ,
    t.prototype.getCharsetName = function(e) {
        if (!(e < this.length()))
            throw new Error("index must be less than length");
        return this.encoders[e].name
    }
    ,
    t.prototype.getCharset = function(e) {
        if (!(e < this.length()))
            throw new Error("index must be less than length");
        return this.encoders[e].charset
    }
    ,
    t.prototype.getECIValue = function(e) {
        return this.encoders[e].charset.getValueIdentifier()
    }
    ,
    t.prototype.getPriorityEncoderIndex = function() {
        return this.priorityEncoderIndex
    }
    ,
    t.prototype.canEncode = function(e, r) {
        if (!(r < this.length()))
            throw new Error("index must be less than length");
        return !0
    }
    ,
    t.prototype.encode = function(e, r) {
        if (!(r < this.length()))
            throw new Error("index must be less than length");
        return yi.encode(nt.getCharAt(e), this.encoders[r].name)
    }
    ,
    t
}()
  , J8e = 3
  , Q8e = function() {
    function t(e, r, n) {
        this.fnc1 = n;
        var i = new Z8e(e,r,n);
        if (i.length() === 1)
            for (var o = 0; o < this.bytes.length; o++) {
                var s = e.charAt(o).charCodeAt(0);
                this.bytes[o] = s === n ? 1e3 : s
            }
        else
            this.bytes = this.encodeMinimally(e, i, n)
    }
    return t.prototype.getFNC1Character = function() {
        return this.fnc1
    }
    ,
    t.prototype.length = function() {
        return this.bytes.length
    }
    ,
    t.prototype.haveNCharacters = function(e, r) {
        if (e + r - 1 >= this.bytes.length)
            return !1;
        for (var n = 0; n < r; n++)
            if (this.isECI(e + n))
                return !1;
        return !0
    }
    ,
    t.prototype.charAt = function(e) {
        if (e < 0 || e >= this.length())
            throw new Error("" + e);
        if (this.isECI(e))
            throw new Error("value at " + e + " is not a character but an ECI");
        return this.isFNC1(e) ? this.fnc1 : this.bytes[e]
    }
    ,
    t.prototype.subSequence = function(e, r) {
        if (e < 0 || e > r || r > this.length())
            throw new Error("" + e);
        for (var n = new Ke, i = e; i < r; i++) {
            if (this.isECI(i))
                throw new Error("value at " + i + " is not a character but an ECI");
            n.append(this.charAt(i))
        }
        return n.toString()
    }
    ,
    t.prototype.isECI = function(e) {
        if (e < 0 || e >= this.length())
            throw new Error("" + e);
        return this.bytes[e] > 255 && this.bytes[e] <= 999
    }
    ,
    t.prototype.isFNC1 = function(e) {
        if (e < 0 || e >= this.length())
            throw new Error("" + e);
        return this.bytes[e] === 1e3
    }
    ,
    t.prototype.getECIValue = function(e) {
        if (e < 0 || e >= this.length())
            throw new Error("" + e);
        if (!this.isECI(e))
            throw new Error("value at " + e + " is not an ECI but a character");
        return this.bytes[e] - 256
    }
    ,
    t.prototype.addEdge = function(e, r, n) {
        (e[r][n.encoderIndex] == null || e[r][n.encoderIndex].cachedTotalSize > n.cachedTotalSize) && (e[r][n.encoderIndex] = n)
    }
    ,
    t.prototype.addEdges = function(e, r, n, i, o, s) {
        var a = e.charAt(i).charCodeAt(0)
          , l = 0
          , c = r.length();
        r.getPriorityEncoderIndex() >= 0 && (a === s || r.canEncode(a, r.getPriorityEncoderIndex())) && (l = r.getPriorityEncoderIndex(),
        c = l + 1);
        for (var u = l; u < c; u++)
            (a === s || r.canEncode(a, u)) && this.addEdge(n, i + 1, new M6(a,r,u,o,s))
    }
    ,
    t.prototype.encodeMinimally = function(e, r, n) {
        var i = e.length
          , o = new M6[i + 1][r.length()];
        this.addEdges(e, r, o, 0, null, n);
        for (var s = 1; s <= i; s++) {
            for (var a = 0; a < r.length(); a++)
                o[s][a] != null && s < i && this.addEdges(e, r, o, s, o[s][a], n);
            for (var a = 0; a < r.length(); a++)
                o[s - 1][a] = null
        }
        for (var l = -1, c = qe.MAX_VALUE, a = 0; a < r.length(); a++)
            if (o[i][a] != null) {
                var u = o[i][a];
                u.cachedTotalSize < c && (c = u.cachedTotalSize,
                l = a)
            }
        if (l < 0)
            throw new Error('Failed to encode "' + e + '"');
        for (var f = [], d = o[i][l]; d != null; ) {
            if (d.isFNC1())
                f.unshift(1e3);
            else
                for (var h = r.encode(d.c, d.encoderIndex), s = h.length - 1; s >= 0; s--)
                    f.unshift(h[s] & 255);
            var x = d.previous === null ? 0 : d.previous.encoderIndex;
            x !== d.encoderIndex && f.unshift(256 + r.getECIValue(d.encoderIndex)),
            d = d.previous
        }
        for (var y = [], s = 0; s < y.length; s++)
            y[s] = f[s];
        return y
    }
    ,
    t
}()
  , M6 = function() {
    function t(e, r, n, i, o) {
        this.c = e,
        this.encoderSet = r,
        this.encoderIndex = n,
        this.previous = i,
        this.fnc1 = o,
        this.c = e === o ? 1e3 : e;
        var s = this.isFNC1() ? 1 : r.encode(e, n).length
          , a = i === null ? 0 : i.encoderIndex;
        a !== n && (s += J8e),
        i != null && (s += i.cachedTotalSize),
        this.cachedTotalSize = s
    }
    return t.prototype.isFNC1 = function() {
        return this.c === 1e3
    }
    ,
    t
}()
  , e9e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
globalThis && globalThis.__values;
var t9e = globalThis && globalThis.__read || function(t, e) {
    var r = typeof Symbol == "function" && t[Symbol.iterator];
    if (!r)
        return t;
    var n = r.call(t), i, o = [], s;
    try {
        for (; (e === void 0 || e-- > 0) && !(i = n.next()).done; )
            o.push(i.value)
    } catch (a) {
        s = {
            error: a
        }
    } finally {
        try {
            i && !i.done && (r = n.return) && r.call(n)
        } finally {
            if (s)
                throw s.error
        }
    }
    return o
}
;
globalThis && globalThis.__spread;
var N6;
(function(t) {
    t[t.ASCII = 0] = "ASCII",
    t[t.C40 = 1] = "C40",
    t[t.TEXT = 2] = "TEXT",
    t[t.X12 = 3] = "X12",
    t[t.EDF = 4] = "EDF",
    t[t.B256 = 5] = "B256"
}
)(N6 || (N6 = {}));
(function(t) {
    e9e(e, t);
    function e(r, n, i, o, s) {
        var a = t.call(this, r, n, i) || this;
        return a.shape = o,
        a.macroId = s,
        a
    }
    return e.prototype.getMacroId = function() {
        return this.macroId
    }
    ,
    e.prototype.getShapeHint = function() {
        return this.shape
    }
    ,
    e
}
)(Q8e);
var r9e = function() {
    function t() {}
    return t.prototype.isCompact = function() {
        return this.compact
    }
    ,
    t.prototype.setCompact = function(e) {
        this.compact = e
    }
    ,
    t.prototype.getSize = function() {
        return this.size
    }
    ,
    t.prototype.setSize = function(e) {
        this.size = e
    }
    ,
    t.prototype.getLayers = function() {
        return this.layers
    }
    ,
    t.prototype.setLayers = function(e) {
        this.layers = e
    }
    ,
    t.prototype.getCodeWords = function() {
        return this.codeWords
    }
    ,
    t.prototype.setCodeWords = function(e) {
        this.codeWords = e
    }
    ,
    t.prototype.getMatrix = function() {
        return this.matrix
    }
    ,
    t.prototype.setMatrix = function(e) {
        this.matrix = e
    }
    ,
    t
}()
  , L6 = function() {
    function t() {}
    return t.singletonList = function(e) {
        return [e]
    }
    ,
    t.min = function(e, r) {
        return e.sort(r)[0]
    }
    ,
    t
}()
  , n9e = function() {
    function t(e) {
        this.previous = e
    }
    return t.prototype.getPrevious = function() {
        return this.previous
    }
    ,
    t
}()
  , i9e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , $C = function(t) {
    i9e(e, t);
    function e(r, n, i) {
        var o = t.call(this, r) || this;
        return o.value = n,
        o.bitCount = i,
        o
    }
    return e.prototype.appendTo = function(r, n) {
        r.appendBits(this.value, this.bitCount)
    }
    ,
    e.prototype.add = function(r, n) {
        return new e(this,r,n)
    }
    ,
    e.prototype.addBinaryShift = function(r, n) {
        return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),
        new e(this,r,n)
    }
    ,
    e.prototype.toString = function() {
        var r = this.value & (1 << this.bitCount) - 1;
        return r |= 1 << this.bitCount,
        "<" + qe.toBinaryString(r | 1 << this.bitCount).substring(1) + ">"
    }
    ,
    e
}(n9e)
  , o9e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , s9e = function(t) {
    o9e(e, t);
    function e(r, n, i) {
        var o = t.call(this, r, 0, 0) || this;
        return o.binaryShiftStart = n,
        o.binaryShiftByteCount = i,
        o
    }
    return e.prototype.appendTo = function(r, n) {
        for (var i = 0; i < this.binaryShiftByteCount; i++)
            (i === 0 || i === 31 && this.binaryShiftByteCount <= 62) && (r.appendBits(31, 5),
            this.binaryShiftByteCount > 62 ? r.appendBits(this.binaryShiftByteCount - 31, 16) : i === 0 ? r.appendBits(Math.min(this.binaryShiftByteCount, 31), 5) : r.appendBits(this.binaryShiftByteCount - 31, 5)),
            r.appendBits(n[this.binaryShiftStart + i], 8)
    }
    ,
    e.prototype.addBinaryShift = function(r, n) {
        return new e(this,r,n)
    }
    ,
    e.prototype.toString = function() {
        return "<" + this.binaryShiftStart + "::" + (this.binaryShiftStart + this.binaryShiftByteCount - 1) + ">"
    }
    ,
    e
}($C);
function a9e(t, e, r) {
    return new s9e(t,e,r)
}
function f0(t, e, r) {
    return new $C(t,e,r)
}
var l9e = ["UPPER", "LOWER", "DIGIT", "MIXED", "PUNCT"]
  , ia = 0
  , cp = 1
  , di = 2
  , zM = 3
  , ho = 4
  , c9e = new $C(null,0,0)
  , nv = [Int32Array.from([0, (5 << 16) + 28, (5 << 16) + 30, (5 << 16) + 29, 655360 + 928 + 30]), Int32Array.from([(9 << 16) + 480 + 14, 0, (5 << 16) + 30, (5 << 16) + 29, 655360 + 928 + 30]), Int32Array.from([(4 << 16) + 14, (9 << 16) + 448 + 28, 0, (9 << 16) + 448 + 29, 917504 + 14336 + 928 + 30]), Int32Array.from([(5 << 16) + 29, (5 << 16) + 28, 655360 + 928 + 30, 0, (5 << 16) + 30]), Int32Array.from([(5 << 16) + 31, 655360 + 992 + 28, 655360 + 992 + 30, 655360 + 992 + 29, 0])]
  , u9e = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
;
function f9e(t) {
    var e, r;
    try {
        for (var n = u9e(t), i = n.next(); !i.done; i = n.next()) {
            var o = i.value;
            br.fill(o, -1)
        }
    } catch (s) {
        e = {
            error: s
        }
    } finally {
        try {
            i && !i.done && (r = n.return) && r.call(n)
        } finally {
            if (e)
                throw e.error
        }
    }
    return t[ia][ho] = 0,
    t[cp][ho] = 0,
    t[cp][ia] = 28,
    t[zM][ho] = 0,
    t[di][ho] = 0,
    t[di][ia] = 15,
    t
}
var jM = f9e(br.createInt32Array(6, 6))
  , d9e = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , h9e = function() {
    function t(e, r, n, i) {
        this.token = e,
        this.mode = r,
        this.binaryShiftByteCount = n,
        this.bitCount = i
    }
    return t.prototype.getMode = function() {
        return this.mode
    }
    ,
    t.prototype.getToken = function() {
        return this.token
    }
    ,
    t.prototype.getBinaryShiftByteCount = function() {
        return this.binaryShiftByteCount
    }
    ,
    t.prototype.getBitCount = function() {
        return this.bitCount
    }
    ,
    t.prototype.latchAndAppend = function(e, r) {
        var n = this.bitCount
          , i = this.token;
        if (e !== this.mode) {
            var o = nv[this.mode][e];
            i = f0(i, o & 65535, o >> 16),
            n += o >> 16
        }
        var s = e === di ? 4 : 5;
        return i = f0(i, r, s),
        new t(i,e,0,n + s)
    }
    ,
    t.prototype.shiftAndAppend = function(e, r) {
        var n = this.token
          , i = this.mode === di ? 4 : 5;
        return n = f0(n, jM[this.mode][e], i),
        n = f0(n, r, 5),
        new t(n,this.mode,0,this.bitCount + i + 5)
    }
    ,
    t.prototype.addBinaryShiftChar = function(e) {
        var r = this.token
          , n = this.mode
          , i = this.bitCount;
        if (this.mode === ho || this.mode === di) {
            var o = nv[n][ia];
            r = f0(r, o & 65535, o >> 16),
            i += o >> 16,
            n = ia
        }
        var s = this.binaryShiftByteCount === 0 || this.binaryShiftByteCount === 31 ? 18 : this.binaryShiftByteCount === 62 ? 9 : 8
          , a = new t(r,n,this.binaryShiftByteCount + 1,i + s);
        return a.binaryShiftByteCount === 2047 + 31 && (a = a.endBinaryShift(e + 1)),
        a
    }
    ,
    t.prototype.endBinaryShift = function(e) {
        if (this.binaryShiftByteCount === 0)
            return this;
        var r = this.token;
        return r = a9e(r, e - this.binaryShiftByteCount, this.binaryShiftByteCount),
        new t(r,this.mode,0,this.bitCount)
    }
    ,
    t.prototype.isBetterThanOrEqualTo = function(e) {
        var r = this.bitCount + (nv[this.mode][e.mode] >> 16);
        return this.binaryShiftByteCount < e.binaryShiftByteCount ? r += t.calculateBinaryShiftCost(e) - t.calculateBinaryShiftCost(this) : this.binaryShiftByteCount > e.binaryShiftByteCount && e.binaryShiftByteCount > 0 && (r += 10),
        r <= e.bitCount
    }
    ,
    t.prototype.toBitArray = function(e) {
        for (var r, n, i = [], o = this.endBinaryShift(e.length).token; o !== null; o = o.getPrevious())
            i.unshift(o);
        var s = new kr;
        try {
            for (var a = d9e(i), l = a.next(); !l.done; l = a.next()) {
                var c = l.value;
                c.appendTo(s, e)
            }
        } catch (u) {
            r = {
                error: u
            }
        } finally {
            try {
                l && !l.done && (n = a.return) && n.call(a)
            } finally {
                if (r)
                    throw r.error
            }
        }
        return s
    }
    ,
    t.prototype.toString = function() {
        return nt.format("%s bits=%d bytes=%d", l9e[this.mode], this.bitCount, this.binaryShiftByteCount)
    }
    ,
    t.calculateBinaryShiftCost = function(e) {
        return e.binaryShiftByteCount > 62 ? 21 : e.binaryShiftByteCount > 31 ? 20 : e.binaryShiftByteCount > 0 ? 10 : 0
    }
    ,
    t.INITIAL_STATE = new t(c9e,ia,0,0),
    t
}();
function x9e(t) {
    var e = nt.getCharCode(" ")
      , r = nt.getCharCode(".")
      , n = nt.getCharCode(",");
    t[ia][e] = 1;
    for (var i = nt.getCharCode("Z"), o = nt.getCharCode("A"), s = o; s <= i; s++)
        t[ia][s] = s - o + 2;
    t[cp][e] = 1;
    for (var a = nt.getCharCode("z"), l = nt.getCharCode("a"), s = l; s <= a; s++)
        t[cp][s] = s - l + 2;
    t[di][e] = 1;
    for (var c = nt.getCharCode("9"), u = nt.getCharCode("0"), s = u; s <= c; s++)
        t[di][s] = s - u + 2;
    t[di][n] = 12,
    t[di][r] = 13;
    for (var f = ["\0", " ", "", "", "", "", "", "", "\x07", "\b", "	", `
`, "\v", "\f", "\r", "\x1B", "", "", "", "", "@", "\\", "^", "_", "`", "|", "~", ""], d = 0; d < f.length; d++)
        t[zM][nt.getCharCode(f[d])] = d;
    for (var h = ["\0", "\r", "\0", "\0", "\0", "\0", "!", "'", "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/", ":", ";", "<", "=", ">", "?", "[", "]", "{", "}"], d = 0; d < h.length; d++)
        nt.getCharCode(h[d]) > 0 && (t[ho][nt.getCharCode(h[d])] = d);
    return t
}
var iv = x9e(br.createInt32Array(5, 256))
  , Rh = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , p9e = function() {
    function t(e) {
        this.text = e
    }
    return t.prototype.encode = function() {
        for (var e = nt.getCharCode(" "), r = nt.getCharCode(`
`), n = L6.singletonList(h9e.INITIAL_STATE), i = 0; i < this.text.length; i++) {
            var o = void 0
              , s = i + 1 < this.text.length ? this.text[i + 1] : 0;
            switch (this.text[i]) {
            case nt.getCharCode("\r"):
                o = s === r ? 2 : 0;
                break;
            case nt.getCharCode("."):
                o = s === e ? 3 : 0;
                break;
            case nt.getCharCode(","):
                o = s === e ? 4 : 0;
                break;
            case nt.getCharCode(":"):
                o = s === e ? 5 : 0;
                break;
            default:
                o = 0
            }
            o > 0 ? (n = t.updateStateListForPair(n, i, o),
            i++) : n = this.updateStateListForChar(n, i)
        }
        var a = L6.min(n, function(l, c) {
            return l.getBitCount() - c.getBitCount()
        });
        return a.toBitArray(this.text)
    }
    ,
    t.prototype.updateStateListForChar = function(e, r) {
        var n, i, o = [];
        try {
            for (var s = Rh(e), a = s.next(); !a.done; a = s.next()) {
                var l = a.value;
                this.updateStateForChar(l, r, o)
            }
        } catch (c) {
            n = {
                error: c
            }
        } finally {
            try {
                a && !a.done && (i = s.return) && i.call(s)
            } finally {
                if (n)
                    throw n.error
            }
        }
        return t.simplifyStates(o)
    }
    ,
    t.prototype.updateStateForChar = function(e, r, n) {
        for (var i = this.text[r] & 255, o = iv[e.getMode()][i] > 0, s = null, a = 0; a <= ho; a++) {
            var l = iv[a][i];
            if (l > 0) {
                if (s == null && (s = e.endBinaryShift(r)),
                !o || a === e.getMode() || a === di) {
                    var c = s.latchAndAppend(a, l);
                    n.push(c)
                }
                if (!o && jM[e.getMode()][a] >= 0) {
                    var u = s.shiftAndAppend(a, l);
                    n.push(u)
                }
            }
        }
        if (e.getBinaryShiftByteCount() > 0 || iv[e.getMode()][i] === 0) {
            var f = e.addBinaryShiftChar(r);
            n.push(f)
        }
    }
    ,
    t.updateStateListForPair = function(e, r, n) {
        var i, o, s = [];
        try {
            for (var a = Rh(e), l = a.next(); !l.done; l = a.next()) {
                var c = l.value;
                this.updateStateForPair(c, r, n, s)
            }
        } catch (u) {
            i = {
                error: u
            }
        } finally {
            try {
                l && !l.done && (o = a.return) && o.call(a)
            } finally {
                if (i)
                    throw i.error
            }
        }
        return this.simplifyStates(s)
    }
    ,
    t.updateStateForPair = function(e, r, n, i) {
        var o = e.endBinaryShift(r);
        if (i.push(o.latchAndAppend(ho, n)),
        e.getMode() !== ho && i.push(o.shiftAndAppend(ho, n)),
        n === 3 || n === 4) {
            var s = o.latchAndAppend(di, 16 - n).latchAndAppend(di, 1);
            i.push(s)
        }
        if (e.getBinaryShiftByteCount() > 0) {
            var a = e.addBinaryShiftChar(r).addBinaryShiftChar(r + 1);
            i.push(a)
        }
    }
    ,
    t.simplifyStates = function(e) {
        var r, n, i, o, s = [];
        try {
            for (var a = Rh(e), l = a.next(); !l.done; l = a.next()) {
                var c = l.value
                  , u = !0
                  , f = function(m) {
                    if (m.isBetterThanOrEqualTo(c))
                        return u = !1,
                        "break";
                    c.isBetterThanOrEqualTo(m) && (s = s.filter(function(E) {
                        return E !== m
                    }))
                };
                try {
                    for (var d = (i = void 0,
                    Rh(s)), h = d.next(); !h.done; h = d.next()) {
                        var x = h.value
                          , y = f(x);
                        if (y === "break")
                            break
                    }
                } catch (m) {
                    i = {
                        error: m
                    }
                } finally {
                    try {
                        h && !h.done && (o = d.return) && o.call(d)
                    } finally {
                        if (i)
                            throw i.error
                    }
                }
                u && s.push(c)
            }
        } catch (m) {
            r = {
                error: m
            }
        } finally {
            try {
                l && !l.done && (n = a.return) && n.call(a)
            } finally {
                if (r)
                    throw r.error
            }
        }
        return s
    }
    ,
    t
}()
  , g9e = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
;
(function() {
    function t() {}
    return t.encodeBytes = function(e) {
        return t.encode(e, t.DEFAULT_EC_PERCENT, t.DEFAULT_AZTEC_LAYERS)
    }
    ,
    t.encode = function(e, r, n) {
        var i = new p9e(e).encode(), o = qe.truncDivision(i.getSize() * r, 100) + 11, s = i.getSize() + o, a, l, c, u, f;
        if (n !== t.DEFAULT_AZTEC_LAYERS) {
            if (a = n < 0,
            l = Math.abs(n),
            l > (a ? t.MAX_NB_BITS_COMPACT : t.MAX_NB_BITS))
                throw new Me(nt.format("Illegal value %s for layers", n));
            c = t.totalBitsInLayer(l, a),
            u = t.WORD_SIZE[l];
            var d = c - c % u;
            if (f = t.stuffBits(i, u),
            f.getSize() + o > d)
                throw new Me("Data to large for user specified layer");
            if (a && f.getSize() > u * 64)
                throw new Me("Data to large for user specified layer")
        } else {
            u = 0,
            f = null;
            for (var h = 0; ; h++) {
                if (h > t.MAX_NB_BITS)
                    throw new Me("Data too large for an Aztec code");
                if (a = h <= 3,
                l = a ? h + 1 : h,
                c = t.totalBitsInLayer(l, a),
                !(s > c)) {
                    (f == null || u !== t.WORD_SIZE[l]) && (u = t.WORD_SIZE[l],
                    f = t.stuffBits(i, u));
                    var d = c - c % u;
                    if (!(a && f.getSize() > u * 64) && f.getSize() + o <= d)
                        break
                }
            }
        }
        var x = t.generateCheckWords(f, c, u), y = f.getSize() / u, m = t.generateModeMessage(a, l, y), E = (a ? 11 : 14) + l * 4, g = new Int32Array(E), p;
        if (a) {
            p = E;
            for (var h = 0; h < g.length; h++)
                g[h] = h
        } else {
            p = E + 1 + 2 * qe.truncDivision(qe.truncDivision(E, 2) - 1, 15);
            for (var v = qe.truncDivision(E, 2), _ = qe.truncDivision(p, 2), h = 0; h < v; h++) {
                var b = h + qe.truncDivision(h, 15);
                g[v - h - 1] = _ - b - 1,
                g[v + h] = _ + b + 1
            }
        }
        for (var C = new Do(p), h = 0, w = 0; h < l; h++) {
            for (var T = (l - h) * 4 + (a ? 9 : 12), A = 0; A < T; A++)
                for (var B = A * 2, S = 0; S < 2; S++)
                    x.get(w + B + S) && C.set(g[h * 2 + S], g[h * 2 + A]),
                    x.get(w + T * 2 + B + S) && C.set(g[h * 2 + A], g[E - 1 - h * 2 - S]),
                    x.get(w + T * 4 + B + S) && C.set(g[E - 1 - h * 2 - S], g[E - 1 - h * 2 - A]),
                    x.get(w + T * 6 + B + S) && C.set(g[E - 1 - h * 2 - A], g[h * 2 + S]);
            w += T * 8
        }
        if (t.drawModeMessage(C, a, p, m),
        a)
            t.drawBullsEye(C, qe.truncDivision(p, 2), 5);
        else {
            t.drawBullsEye(C, qe.truncDivision(p, 2), 7);
            for (var h = 0, A = 0; h < qe.truncDivision(E, 2) - 1; h += 15,
            A += 16)
                for (var S = qe.truncDivision(p, 2) & 1; S < p; S += 2)
                    C.set(qe.truncDivision(p, 2) - A, S),
                    C.set(qe.truncDivision(p, 2) + A, S),
                    C.set(S, qe.truncDivision(p, 2) - A),
                    C.set(S, qe.truncDivision(p, 2) + A)
        }
        var D = new r9e;
        return D.setCompact(a),
        D.setSize(p),
        D.setLayers(l),
        D.setCodeWords(y),
        D.setMatrix(C),
        D
    }
    ,
    t.drawBullsEye = function(e, r, n) {
        for (var i = 0; i < n; i += 2)
            for (var o = r - i; o <= r + i; o++)
                e.set(o, r - i),
                e.set(o, r + i),
                e.set(r - i, o),
                e.set(r + i, o);
        e.set(r - n, r - n),
        e.set(r - n + 1, r - n),
        e.set(r - n, r - n + 1),
        e.set(r + n, r - n),
        e.set(r + n, r - n + 1),
        e.set(r + n, r + n - 1)
    }
    ,
    t.generateModeMessage = function(e, r, n) {
        var i = new kr;
        return e ? (i.appendBits(r - 1, 2),
        i.appendBits(n - 1, 6),
        i = t.generateCheckWords(i, 28, 4)) : (i.appendBits(r - 1, 5),
        i.appendBits(n - 1, 11),
        i = t.generateCheckWords(i, 40, 4)),
        i
    }
    ,
    t.drawModeMessage = function(e, r, n, i) {
        var o = qe.truncDivision(n, 2);
        if (r)
            for (var s = 0; s < 7; s++) {
                var a = o - 3 + s;
                i.get(s) && e.set(a, o - 5),
                i.get(s + 7) && e.set(o + 5, a),
                i.get(20 - s) && e.set(a, o + 5),
                i.get(27 - s) && e.set(o - 5, a)
            }
        else
            for (var s = 0; s < 10; s++) {
                var a = o - 5 + s + qe.truncDivision(s, 5);
                i.get(s) && e.set(a, o - 7),
                i.get(s + 10) && e.set(o + 7, a),
                i.get(29 - s) && e.set(a, o + 7),
                i.get(39 - s) && e.set(o - 7, a)
            }
    }
    ,
    t.generateCheckWords = function(e, r, n) {
        var i, o, s = e.getSize() / n, a = new HM(t.getGF(n)), l = qe.truncDivision(r, n), c = t.bitsToWords(e, n, l);
        a.encode(c, l - s);
        var u = r % n
          , f = new kr;
        f.appendBits(0, u);
        try {
            for (var d = g9e(Array.from(c)), h = d.next(); !h.done; h = d.next()) {
                var x = h.value;
                f.appendBits(x, n)
            }
        } catch (y) {
            i = {
                error: y
            }
        } finally {
            try {
                h && !h.done && (o = d.return) && o.call(d)
            } finally {
                if (i)
                    throw i.error
            }
        }
        return f
    }
    ,
    t.bitsToWords = function(e, r, n) {
        var i = new Int32Array(n), o, s;
        for (o = 0,
        s = e.getSize() / r; o < s; o++) {
            for (var a = 0, l = 0; l < r; l++)
                a |= e.get(o * r + l) ? 1 << r - l - 1 : 0;
            i[o] = a
        }
        return i
    }
    ,
    t.getGF = function(e) {
        switch (e) {
        case 4:
            return Sn.AZTEC_PARAM;
        case 6:
            return Sn.AZTEC_DATA_6;
        case 8:
            return Sn.AZTEC_DATA_8;
        case 10:
            return Sn.AZTEC_DATA_10;
        case 12:
            return Sn.AZTEC_DATA_12;
        default:
            throw new Me("Unsupported word size " + e)
        }
    }
    ,
    t.stuffBits = function(e, r) {
        for (var n = new kr, i = e.getSize(), o = (1 << r) - 2, s = 0; s < i; s += r) {
            for (var a = 0, l = 0; l < r; l++)
                (s + l >= i || e.get(s + l)) && (a |= 1 << r - 1 - l);
            (a & o) === o ? (n.appendBits(a & o, r),
            s--) : a & o ? n.appendBits(a, r) : (n.appendBits(a | 1, r),
            s--)
        }
        return n
    }
    ,
    t.totalBitsInLayer = function(e, r) {
        return ((r ? 88 : 112) + 16 * e) * e
    }
    ,
    t.DEFAULT_EC_PERCENT = 33,
    t.DEFAULT_AZTEC_LAYERS = 0,
    t.MAX_NB_BITS = 32,
    t.MAX_NB_BITS_COMPACT = 4,
    t.WORD_SIZE = Int32Array.from([4, 6, 6, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12]),
    t
}
)();
var m9e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        if (typeof r != "function" && r !== null)
            throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , v9e = function(t) {
    m9e(e, t);
    function e(r) {
        var n = t.call(this, r.width, r.height) || this;
        return n.canvas = r,
        n.tempCanvasElement = null,
        n.buffer = e.makeBufferFromCanvasImageData(r),
        n
    }
    return e.makeBufferFromCanvasImageData = function(r) {
        var n;
        try {
            n = r.getContext("2d", {
                willReadFrequently: !0
            })
        } catch {
            n = r.getContext("2d")
        }
        if (!n)
            throw new Error("Couldn't get canvas context.");
        var i = n.getImageData(0, 0, r.width, r.height);
        return e.toGrayscaleBuffer(i.data, r.width, r.height)
    }
    ,
    e.toGrayscaleBuffer = function(r, n, i) {
        for (var o = new Uint8ClampedArray(n * i), s = 0, a = 0, l = r.length; s < l; s += 4,
        a++) {
            var c = void 0
              , u = r[s + 3];
            if (u === 0)
                c = 255;
            else {
                var f = r[s]
                  , d = r[s + 1]
                  , h = r[s + 2];
                c = 306 * f + 601 * d + 117 * h + 512 >> 10
            }
            o[a] = c
        }
        return o
    }
    ,
    e.prototype.getRow = function(r, n) {
        if (r < 0 || r >= this.getHeight())
            throw new Me("Requested row is outside the image: " + r);
        var i = this.getWidth()
          , o = r * i;
        return n === null ? n = this.buffer.slice(o, o + i) : (n.length < i && (n = new Uint8ClampedArray(i)),
        n.set(this.buffer.slice(o, o + i))),
        n
    }
    ,
    e.prototype.getMatrix = function() {
        return this.buffer
    }
    ,
    e.prototype.isCropSupported = function() {
        return !0
    }
    ,
    e.prototype.crop = function(r, n, i, o) {
        return t.prototype.crop.call(this, r, n, i, o),
        this
    }
    ,
    e.prototype.isRotateSupported = function() {
        return !0
    }
    ,
    e.prototype.rotateCounterClockwise = function() {
        return this.rotate(-90),
        this
    }
    ,
    e.prototype.rotateCounterClockwise45 = function() {
        return this.rotate(-45),
        this
    }
    ,
    e.prototype.invert = function() {
        return new $1(this)
    }
    ,
    e.prototype.getTempCanvasElement = function() {
        if (this.tempCanvasElement === null) {
            var r = this.canvas.ownerDocument.createElement("canvas");
            r.width = this.canvas.width,
            r.height = this.canvas.height,
            this.tempCanvasElement = r
        }
        return this.tempCanvasElement
    }
    ,
    e.prototype.rotate = function(r) {
        var n = this.getTempCanvasElement();
        if (!n)
            throw new Error("Could not create a Canvas element.");
        var i = r * e.DEGREE_TO_RADIANS
          , o = this.canvas.width
          , s = this.canvas.height
          , a = Math.ceil(Math.abs(Math.cos(i)) * o + Math.abs(Math.sin(i)) * s)
          , l = Math.ceil(Math.abs(Math.sin(i)) * o + Math.abs(Math.cos(i)) * s);
        n.width = a,
        n.height = l;
        var c = n.getContext("2d");
        if (!c)
            throw new Error("Could not create a Canvas Context element.");
        return c.translate(a / 2, l / 2),
        c.rotate(i),
        c.drawImage(this.canvas, o / -2, s / -2),
        this.buffer = e.makeBufferFromCanvasImageData(n),
        this
    }
    ,
    e.DEGREE_TO_RADIANS = Math.PI / 180,
    e
}(Cd);
function WM() {
    return typeof navigator < "u"
}
function y9e() {
    return WM() && !!navigator.mediaDevices
}
function E9e() {
    return !!(y9e() && navigator.mediaDevices.enumerateDevices)
}
var Oc = globalThis && globalThis.__assign || function() {
    return Oc = Object.assign || function(t) {
        for (var e, r = 1, n = arguments.length; r < n; r++) {
            e = arguments[r];
            for (var i in e)
                Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i])
        }
        return t
    }
    ,
    Oc.apply(this, arguments)
}
  , zt = globalThis && globalThis.__awaiter || function(t, e, r, n) {
    function i(o) {
        return o instanceof r ? o : new r(function(s) {
            s(o)
        }
        )
    }
    return new (r || (r = Promise))(function(o, s) {
        function a(u) {
            try {
                c(n.next(u))
            } catch (f) {
                s(f)
            }
        }
        function l(u) {
            try {
                c(n.throw(u))
            } catch (f) {
                s(f)
            }
        }
        function c(u) {
            u.done ? o(u.value) : i(u.value).then(a, l)
        }
        c((n = n.apply(t, e || [])).next())
    }
    )
}
  , jt = globalThis && globalThis.__generator || function(t, e) {
    var r = {
        label: 0,
        sent: function() {
            if (o[0] & 1)
                throw o[1];
            return o[1]
        },
        trys: [],
        ops: []
    }, n, i, o, s;
    return s = {
        next: a(0),
        throw: a(1),
        return: a(2)
    },
    typeof Symbol == "function" && (s[Symbol.iterator] = function() {
        return this
    }
    ),
    s;
    function a(c) {
        return function(u) {
            return l([c, u])
        }
    }
    function l(c) {
        if (n)
            throw new TypeError("Generator is already executing.");
        for (; r; )
            try {
                if (n = 1,
                i && (o = c[0] & 2 ? i.return : c[0] ? i.throw || ((o = i.return) && o.call(i),
                0) : i.next) && !(o = o.call(i, c[1])).done)
                    return o;
                switch (i = 0,
                o && (c = [c[0] & 2, o.value]),
                c[0]) {
                case 0:
                case 1:
                    o = c;
                    break;
                case 4:
                    return r.label++,
                    {
                        value: c[1],
                        done: !1
                    };
                case 5:
                    r.label++,
                    i = c[1],
                    c = [0];
                    continue;
                case 7:
                    c = r.ops.pop(),
                    r.trys.pop();
                    continue;
                default:
                    if (o = r.trys,
                    !(o = o.length > 0 && o[o.length - 1]) && (c[0] === 6 || c[0] === 2)) {
                        r = 0;
                        continue
                    }
                    if (c[0] === 3 && (!o || c[1] > o[0] && c[1] < o[3])) {
                        r.label = c[1];
                        break
                    }
                    if (c[0] === 6 && r.label < o[1]) {
                        r.label = o[1],
                        o = c;
                        break
                    }
                    if (o && r.label < o[2]) {
                        r.label = o[2],
                        r.ops.push(c);
                        break
                    }
                    o[2] && r.ops.pop(),
                    r.trys.pop();
                    continue
                }
                c = e.call(t, r)
            } catch (u) {
                c = [6, u],
                i = 0
            } finally {
                n = o = 0
            }
        if (c[0] & 5)
            throw c[1];
        return {
            value: c[0] ? c[1] : void 0,
            done: !0
        }
    }
}
  , ov = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , _9e = {
    delayBetweenScanAttempts: 500,
    delayBetweenScanSuccess: 500,
    tryPlayVideoTimeout: 5e3
}
  , Nu = function() {
    function t(e, r, n) {
        r === void 0 && (r = new Map),
        n === void 0 && (n = {}),
        this.reader = e,
        this.hints = r,
        this.options = Oc(Oc({}, _9e), n)
    }
    return Object.defineProperty(t.prototype, "possibleFormats", {
        set: function(e) {
            this.hints.set(Pt.POSSIBLE_FORMATS, e)
        },
        enumerable: !1,
        configurable: !0
    }),
    t.addVideoSource = function(e, r) {
        try {
            e.srcObject = r
        } catch {
            console.error("got interrupted by new loading request")
        }
    }
    ,
    t.mediaStreamSetTorch = function(e, r) {
        return zt(this, void 0, void 0, function() {
            return jt(this, function(n) {
                switch (n.label) {
                case 0:
                    return [4, e.applyConstraints({
                        advanced: [{
                            fillLightMode: r ? "flash" : "off",
                            torch: !!r
                        }]
                    })];
                case 1:
                    return n.sent(),
                    [2]
                }
            })
        })
    }
    ,
    t.mediaStreamIsTorchCompatible = function(e) {
        var r, n, i = e.getVideoTracks();
        try {
            for (var o = ov(i), s = o.next(); !s.done; s = o.next()) {
                var a = s.value;
                if (t.mediaStreamIsTorchCompatibleTrack(a))
                    return !0
            }
        } catch (l) {
            r = {
                error: l
            }
        } finally {
            try {
                s && !s.done && (n = o.return) && n.call(o)
            } finally {
                if (r)
                    throw r.error
            }
        }
        return !1
    }
    ,
    t.mediaStreamIsTorchCompatibleTrack = function(e) {
        try {
            var r = e.getCapabilities();
            return "torch"in r
        } catch (n) {
            return console.error(n),
            console.warn("Your browser may be not fully compatible with WebRTC and/or ImageCapture specs. Torch will not be available."),
            !1
        }
    }
    ,
    t.isVideoPlaying = function(e) {
        return e.currentTime > 0 && !e.paused && e.readyState > 2
    }
    ,
    t.getMediaElement = function(e, r) {
        var n = document.getElementById(e);
        if (!n)
            throw new ir("element with id '".concat(e, "' not found"));
        if (n.nodeName.toLowerCase() !== r.toLowerCase())
            throw new ir("element with id '".concat(e, "' must be an ").concat(r, " element"));
        return n
    }
    ,
    t.createVideoElement = function(e) {
        if (e instanceof HTMLVideoElement)
            return e;
        if (typeof e == "string")
            return t.getMediaElement(e, "video");
        if (!e && typeof document < "u") {
            var r = document.createElement("video");
            return r.width = 200,
            r.height = 200,
            r
        }
        throw new Error("Couldn't get videoElement from videoSource!")
    }
    ,
    t.prepareImageElement = function(e) {
        if (e instanceof HTMLImageElement)
            return e;
        if (typeof e == "string")
            return t.getMediaElement(e, "img");
        if (typeof e > "u") {
            var r = document.createElement("img");
            return r.width = 200,
            r.height = 200,
            r
        }
        throw new Error("Couldn't get imageElement from imageSource!")
    }
    ,
    t.prepareVideoElement = function(e) {
        var r = t.createVideoElement(e);
        return r.setAttribute("autoplay", "true"),
        r.setAttribute("muted", "true"),
        r.setAttribute("playsinline", "true"),
        r
    }
    ,
    t.isImageLoaded = function(e) {
        return !(!e.complete || e.naturalWidth === 0)
    }
    ,
    t.createBinaryBitmapFromCanvas = function(e) {
        var r = new v9e(e)
          , n = new FM(r);
        return new DM(n)
    }
    ,
    t.drawImageOnCanvas = function(e, r) {
        e.drawImage(r, 0, 0)
    }
    ,
    t.getMediaElementDimensions = function(e) {
        if (e instanceof HTMLVideoElement)
            return {
                height: e.videoHeight,
                width: e.videoWidth
            };
        if (e instanceof HTMLImageElement)
            return {
                height: e.naturalHeight || e.height,
                width: e.naturalWidth || e.width
            };
        throw new Error("Couldn't find the Source's dimensions!")
    }
    ,
    t.createCaptureCanvas = function(e) {
        if (!e)
            throw new ir("Cannot create a capture canvas without a media element.");
        if (typeof document > "u")
            throw new Error(`The page "Document" is undefined, make sure you're running in a browser.`);
        var r = document.createElement("canvas")
          , n = t.getMediaElementDimensions(e)
          , i = n.width
          , o = n.height;
        return r.style.width = i + "px",
        r.style.height = o + "px",
        r.width = i,
        r.height = o,
        r
    }
    ,
    t.tryPlayVideo = function(e) {
        return zt(this, void 0, void 0, function() {
            var r;
            return jt(this, function(n) {
                switch (n.label) {
                case 0:
                    if (e != null && e.ended)
                        return console.error("Trying to play video that has ended."),
                        [2, !1];
                    if (t.isVideoPlaying(e))
                        return console.warn("Trying to play video that is already playing."),
                        [2, !0];
                    n.label = 1;
                case 1:
                    return n.trys.push([1, 3, , 4]),
                    [4, e.play()];
                case 2:
                    return n.sent(),
                    [2, !0];
                case 3:
                    return r = n.sent(),
                    console.warn("It was not possible to play the video.", r),
                    [2, !1];
                case 4:
                    return [2]
                }
            })
        })
    }
    ,
    t.createCanvasFromMediaElement = function(e) {
        var r = t.createCaptureCanvas(e)
          , n = r.getContext("2d");
        if (!n)
            throw new Error("Couldn't find Canvas 2D Context.");
        return t.drawImageOnCanvas(n, e),
        r
    }
    ,
    t.createBinaryBitmapFromMediaElem = function(e) {
        var r = t.createCanvasFromMediaElement(e);
        return t.createBinaryBitmapFromCanvas(r)
    }
    ,
    t.destroyImageElement = function(e) {
        e.src = "",
        e.removeAttribute("src"),
        e = void 0
    }
    ,
    t.listVideoInputDevices = function() {
        return zt(this, void 0, void 0, function() {
            var e, r, n, i, o, s, a, l, c, u, f, d;
            return jt(this, function(h) {
                switch (h.label) {
                case 0:
                    if (!WM())
                        throw new Error("Can't enumerate devices, navigator is not present.");
                    if (!E9e())
                        throw new Error("Can't enumerate devices, method not supported.");
                    return [4, navigator.mediaDevices.enumerateDevices()];
                case 1:
                    e = h.sent(),
                    r = [];
                    try {
                        for (n = ov(e),
                        i = n.next(); !i.done; i = n.next())
                            o = i.value,
                            s = o.kind === "video" ? "videoinput" : o.kind,
                            s === "videoinput" && (a = o.deviceId || o.id,
                            l = o.label || "Video device ".concat(r.length + 1),
                            c = o.groupId,
                            u = {
                                deviceId: a,
                                label: l,
                                kind: s,
                                groupId: c
                            },
                            r.push(u))
                    } catch (x) {
                        f = {
                            error: x
                        }
                    } finally {
                        try {
                            i && !i.done && (d = n.return) && d.call(n)
                        } finally {
                            if (f)
                                throw f.error
                        }
                    }
                    return [2, r]
                }
            })
        })
    }
    ,
    t.findDeviceById = function(e) {
        return zt(this, void 0, void 0, function() {
            var r;
            return jt(this, function(n) {
                switch (n.label) {
                case 0:
                    return [4, t.listVideoInputDevices()];
                case 1:
                    return r = n.sent(),
                    r ? [2, r.find(function(i) {
                        return i.deviceId === e
                    })] : [2]
                }
            })
        })
    }
    ,
    t.cleanVideoSource = function(e) {
        if (e) {
            try {
                e.srcObject = null
            } catch {
                e.src = ""
            }
            e && e.removeAttribute("src")
        }
    }
    ,
    t.releaseAllStreams = function() {
        t.streamTracker.length !== 0 && t.streamTracker.forEach(function(e) {
            e.getTracks().forEach(function(r) {
                return r.stop()
            })
        }),
        t.streamTracker = []
    }
    ,
    t.playVideoOnLoadAsync = function(e, r) {
        return zt(this, void 0, void 0, function() {
            var n;
            return jt(this, function(i) {
                switch (i.label) {
                case 0:
                    return [4, t.tryPlayVideo(e)];
                case 1:
                    return n = i.sent(),
                    n ? [2, !0] : [2, new Promise(function(o, s) {
                        var a = setTimeout(function() {
                            t.isVideoPlaying(e) || (s(!1),
                            e.removeEventListener("canplay", l))
                        }, r)
                          , l = function() {
                            t.tryPlayVideo(e).then(function(c) {
                                clearTimeout(a),
                                e.removeEventListener("canplay", l),
                                o(c)
                            })
                        };
                        e.addEventListener("canplay", l)
                    }
                    )]
                }
            })
        })
    }
    ,
    t.attachStreamToVideo = function(e, r, n) {
        return n === void 0 && (n = 5e3),
        zt(this, void 0, void 0, function() {
            var i;
            return jt(this, function(o) {
                switch (o.label) {
                case 0:
                    return i = t.prepareVideoElement(r),
                    t.addVideoSource(i, e),
                    [4, t.playVideoOnLoadAsync(i, n)];
                case 1:
                    return o.sent(),
                    [2, i]
                }
            })
        })
    }
    ,
    t._waitImageLoad = function(e) {
        return new Promise(function(r, n) {
            var i = 1e4
              , o = setTimeout(function() {
                t.isImageLoaded(e) || (e.removeEventListener("load", s),
                n())
            }, i)
              , s = function() {
                clearTimeout(o),
                e.removeEventListener("load", s),
                r()
            };
            e.addEventListener("load", s)
        }
        )
    }
    ,
    t.checkCallbackFnOrThrow = function(e) {
        if (!e)
            throw new ir("`callbackFn` is a required parameter, you cannot capture results without it.")
    }
    ,
    t.disposeMediaStream = function(e) {
        e.getVideoTracks().forEach(function(r) {
            return r.stop()
        }),
        e = void 0
    }
    ,
    t.prototype.decode = function(e) {
        var r = t.createCanvasFromMediaElement(e);
        return this.decodeFromCanvas(r)
    }
    ,
    t.prototype.decodeBitmap = function(e) {
        return this.reader.decode(e, this.hints)
    }
    ,
    t.prototype.decodeFromCanvas = function(e) {
        var r = t.createBinaryBitmapFromCanvas(e);
        return this.decodeBitmap(r)
    }
    ,
    t.prototype.decodeFromImageElement = function(e) {
        return zt(this, void 0, void 0, function() {
            var r;
            return jt(this, function(n) {
                switch (n.label) {
                case 0:
                    if (!e)
                        throw new ir("An image element must be provided.");
                    return r = t.prepareImageElement(e),
                    [4, this._decodeOnLoadImage(r)];
                case 1:
                    return [2, n.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromImageUrl = function(e) {
        return zt(this, void 0, void 0, function() {
            var r;
            return jt(this, function(n) {
                switch (n.label) {
                case 0:
                    if (!e)
                        throw new ir("An URL must be provided.");
                    r = t.prepareImageElement(),
                    r.src = e,
                    n.label = 1;
                case 1:
                    return n.trys.push([1, , 3, 4]),
                    [4, this.decodeFromImageElement(r)];
                case 2:
                    return [2, n.sent()];
                case 3:
                    return t.destroyImageElement(r),
                    [7];
                case 4:
                    return [2]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromConstraints = function(e, r, n) {
        return zt(this, void 0, void 0, function() {
            var i, o;
            return jt(this, function(s) {
                switch (s.label) {
                case 0:
                    return t.checkCallbackFnOrThrow(n),
                    [4, this.getUserMedia(e)];
                case 1:
                    i = s.sent(),
                    s.label = 2;
                case 2:
                    return s.trys.push([2, 4, , 5]),
                    [4, this.decodeFromStream(i, r, n)];
                case 3:
                    return [2, s.sent()];
                case 4:
                    throw o = s.sent(),
                    t.disposeMediaStream(i),
                    o;
                case 5:
                    return [2]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromStream = function(e, r, n) {
        return zt(this, void 0, void 0, function() {
            var i, o, s, a, l, c, u, f, d, h = this;
            return jt(this, function(x) {
                switch (x.label) {
                case 0:
                    return t.checkCallbackFnOrThrow(n),
                    i = this.options.tryPlayVideoTimeout,
                    [4, t.attachStreamToVideo(e, r, i)];
                case 1:
                    return o = x.sent(),
                    s = function() {
                        t.disposeMediaStream(e),
                        t.cleanVideoSource(o)
                    }
                    ,
                    a = this.scan(o, n, s),
                    l = e.getVideoTracks(),
                    c = Oc(Oc({}, a), {
                        stop: function() {
                            a.stop()
                        },
                        streamVideoConstraintsApply: function(y, m) {
                            return zt(this, void 0, void 0, function() {
                                var E, g, p, v, _, b, C;
                                return jt(this, function(w) {
                                    switch (w.label) {
                                    case 0:
                                        E = m ? l.filter(m) : l,
                                        w.label = 1;
                                    case 1:
                                        w.trys.push([1, 6, 7, 8]),
                                        g = ov(E),
                                        p = g.next(),
                                        w.label = 2;
                                    case 2:
                                        return p.done ? [3, 5] : (v = p.value,
                                        [4, v.applyConstraints(y)]);
                                    case 3:
                                        w.sent(),
                                        w.label = 4;
                                    case 4:
                                        return p = g.next(),
                                        [3, 2];
                                    case 5:
                                        return [3, 8];
                                    case 6:
                                        return _ = w.sent(),
                                        b = {
                                            error: _
                                        },
                                        [3, 8];
                                    case 7:
                                        try {
                                            p && !p.done && (C = g.return) && C.call(g)
                                        } finally {
                                            if (b)
                                                throw b.error
                                        }
                                        return [7];
                                    case 8:
                                        return [2]
                                    }
                                })
                            })
                        },
                        streamVideoConstraintsGet: function(y) {
                            return l.find(y).getConstraints()
                        },
                        streamVideoSettingsGet: function(y) {
                            return l.find(y).getSettings()
                        },
                        streamVideoCapabilitiesGet: function(y) {
                            return l.find(y).getCapabilities()
                        }
                    }),
                    u = t.mediaStreamIsTorchCompatible(e),
                    u && (f = l == null ? void 0 : l.find(function(y) {
                        return t.mediaStreamIsTorchCompatibleTrack(y)
                    }),
                    d = function(y) {
                        return zt(h, void 0, void 0, function() {
                            return jt(this, function(m) {
                                switch (m.label) {
                                case 0:
                                    return [4, t.mediaStreamSetTorch(f, y)];
                                case 1:
                                    return m.sent(),
                                    [2]
                                }
                            })
                        })
                    }
                    ,
                    c.switchTorch = d,
                    c.stop = function() {
                        return zt(h, void 0, void 0, function() {
                            return jt(this, function(y) {
                                switch (y.label) {
                                case 0:
                                    return a.stop(),
                                    [4, d(!1)];
                                case 1:
                                    return y.sent(),
                                    [2]
                                }
                            })
                        })
                    }
                    ),
                    [2, c]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromVideoDevice = function(e, r, n) {
        return zt(this, void 0, void 0, function() {
            var i, o;
            return jt(this, function(s) {
                switch (s.label) {
                case 0:
                    return t.checkCallbackFnOrThrow(n),
                    e ? i = {
                        deviceId: {
                            exact: e
                        }
                    } : i = {
                        facingMode: "environment"
                    },
                    o = {
                        video: i
                    },
                    [4, this.decodeFromConstraints(o, r, n)];
                case 1:
                    return [2, s.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromVideoElement = function(e, r) {
        return zt(this, void 0, void 0, function() {
            var n, i;
            return jt(this, function(o) {
                switch (o.label) {
                case 0:
                    if (t.checkCallbackFnOrThrow(r),
                    !e)
                        throw new ir("A video element must be provided.");
                    return n = t.prepareVideoElement(e),
                    i = this.options.tryPlayVideoTimeout,
                    [4, t.playVideoOnLoadAsync(n, i)];
                case 1:
                    return o.sent(),
                    [2, this.scan(n, r)]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromVideoUrl = function(e, r) {
        return zt(this, void 0, void 0, function() {
            var n, i, o, s;
            return jt(this, function(a) {
                switch (a.label) {
                case 0:
                    if (t.checkCallbackFnOrThrow(r),
                    !e)
                        throw new ir("An URL must be provided.");
                    return n = t.prepareVideoElement(),
                    n.src = e,
                    i = function() {
                        t.cleanVideoSource(n)
                    }
                    ,
                    o = this.options.tryPlayVideoTimeout,
                    [4, t.playVideoOnLoadAsync(n, o)];
                case 1:
                    return a.sent(),
                    s = this.scan(n, r, i),
                    [2, s]
                }
            })
        })
    }
    ,
    t.prototype.decodeOnceFromConstraints = function(e, r) {
        return zt(this, void 0, void 0, function() {
            var n;
            return jt(this, function(i) {
                switch (i.label) {
                case 0:
                    return [4, this.getUserMedia(e)];
                case 1:
                    return n = i.sent(),
                    [4, this.decodeOnceFromStream(n, r)];
                case 2:
                    return [2, i.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeOnceFromStream = function(e, r) {
        return zt(this, void 0, void 0, function() {
            var n, i, o;
            return jt(this, function(s) {
                switch (s.label) {
                case 0:
                    return n = !!r,
                    [4, t.attachStreamToVideo(e, r)];
                case 1:
                    i = s.sent(),
                    s.label = 2;
                case 2:
                    return s.trys.push([2, , 4, 5]),
                    [4, this.scanOneResult(i)];
                case 3:
                    return o = s.sent(),
                    [2, o];
                case 4:
                    return n || t.cleanVideoSource(i),
                    [7];
                case 5:
                    return [2]
                }
            })
        })
    }
    ,
    t.prototype.decodeOnceFromVideoDevice = function(e, r) {
        return zt(this, void 0, void 0, function() {
            var n, i;
            return jt(this, function(o) {
                switch (o.label) {
                case 0:
                    return e ? n = {
                        deviceId: {
                            exact: e
                        }
                    } : n = {
                        facingMode: "environment"
                    },
                    i = {
                        video: n
                    },
                    [4, this.decodeOnceFromConstraints(i, r)];
                case 1:
                    return [2, o.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeOnceFromVideoElement = function(e) {
        return zt(this, void 0, void 0, function() {
            var r, n;
            return jt(this, function(i) {
                switch (i.label) {
                case 0:
                    if (!e)
                        throw new ir("A video element must be provided.");
                    return r = t.prepareVideoElement(e),
                    n = this.options.tryPlayVideoTimeout,
                    [4, t.playVideoOnLoadAsync(r, n)];
                case 1:
                    return i.sent(),
                    [4, this.scanOneResult(r)];
                case 2:
                    return [2, i.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeOnceFromVideoUrl = function(e) {
        return zt(this, void 0, void 0, function() {
            var r, n;
            return jt(this, function(i) {
                switch (i.label) {
                case 0:
                    if (!e)
                        throw new ir("An URL must be provided.");
                    r = t.prepareVideoElement(),
                    r.src = e,
                    n = this.decodeOnceFromVideoElement(r),
                    i.label = 1;
                case 1:
                    return i.trys.push([1, , 3, 4]),
                    [4, n];
                case 2:
                    return [2, i.sent()];
                case 3:
                    return t.cleanVideoSource(r),
                    [7];
                case 4:
                    return [2]
                }
            })
        })
    }
    ,
    t.prototype.scanOneResult = function(e, r, n, i) {
        var o = this;
        return r === void 0 && (r = !0),
        n === void 0 && (n = !0),
        i === void 0 && (i = !0),
        new Promise(function(s, a) {
            o.scan(e, function(l, c, u) {
                if (l) {
                    s(l),
                    u.stop();
                    return
                }
                if (c) {
                    if (c instanceof le && r || c instanceof fr && n || c instanceof ge && i)
                        return;
                    u.stop(),
                    a(c)
                }
            })
        }
        )
    }
    ,
    t.prototype.scan = function(e, r, n) {
        var i = this;
        t.checkCallbackFnOrThrow(r);
        var o = t.createCaptureCanvas(e), s;
        try {
            s = o.getContext("2d", {
                willReadFrequently: !0
            })
        } catch {
            s = o.getContext("2d")
        }
        if (!s)
            throw new Error("Couldn't create canvas for visual element scan.");
        var a = function() {
            s = void 0,
            o = void 0
        }, l = !1, c, u = function() {
            l = !0,
            clearTimeout(c),
            a(),
            n && n()
        }, f = {
            stop: u
        }, d = function() {
            if (!l)
                try {
                    t.drawImageOnCanvas(s, e);
                    var h = i.decodeFromCanvas(o);
                    r(h, void 0, f),
                    c = setTimeout(d, i.options.delayBetweenScanSuccess)
                } catch (E) {
                    r(void 0, E, f);
                    var x = E instanceof fr
                      , y = E instanceof ge
                      , m = E instanceof le;
                    if (x || y || m) {
                        c = setTimeout(d, i.options.delayBetweenScanAttempts);
                        return
                    }
                    a(),
                    n && n(E)
                }
        };
        return d(),
        f
    }
    ,
    t.prototype._decodeOnLoadImage = function(e) {
        return zt(this, void 0, void 0, function() {
            var r;
            return jt(this, function(n) {
                switch (n.label) {
                case 0:
                    return r = t.isImageLoaded(e),
                    r ? [3, 2] : [4, t._waitImageLoad(e)];
                case 1:
                    n.sent(),
                    n.label = 2;
                case 2:
                    return [2, this.decode(e)]
                }
            })
        })
    }
    ,
    t.prototype.getUserMedia = function(e) {
        return zt(this, void 0, void 0, function() {
            var r;
            return jt(this, function(n) {
                switch (n.label) {
                case 0:
                    return [4, navigator.mediaDevices.getUserMedia(e)];
                case 1:
                    return r = n.sent(),
                    t.streamTracker.push(r),
                    [2, r]
                }
            })
        })
    }
    ,
    t.streamTracker = [],
    t
}()
  , b9e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        if (typeof r != "function" && r !== null)
            throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    b9e(e, t);
    function e(r, n) {
        return t.call(this, new ip, r, n) || this
    }
    return e
}
)(Nu);
var C9e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        if (typeof r != "function" && r !== null)
            throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    C9e(e, t);
    function e(r, n) {
        return t.call(this, new Pc(r), r, n) || this
    }
    return e
}
)(Nu);
var A9e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        if (typeof r != "function" && r !== null)
            throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    A9e(e, t);
    function e(r, n) {
        return t.call(this, new sp, r, n) || this
    }
    return e
}
)(Nu);
var w9e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        if (typeof r != "function" && r !== null)
            throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    w9e(e, t);
    function e(r, n) {
        var i = this
          , o = new GM;
        return o.setHints(r),
        i = t.call(this, o, r, n) || this,
        i.reader = o,
        i
    }
    return Object.defineProperty(e.prototype, "possibleFormats", {
        set: function(r) {
            this.hints.set(Pt.POSSIBLE_FORMATS, r),
            this.reader.setHints(this.hints)
        },
        enumerable: !1,
        configurable: !0
    }),
    e.prototype.decodeBitmap = function(r) {
        return this.reader.decodeWithState(r)
    }
    ,
    e.prototype.setHints = function(r) {
        this.hints = r,
        this.reader.setHints(this.hints)
    }
    ,
    e
}
)(Nu);
var B9e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        if (typeof r != "function" && r !== null)
            throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    B9e(e, t);
    function e(r, n) {
        return t.call(this, new lp, r, n) || this
    }
    return e
}
)(Nu);
var S9e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        if (typeof r != "function" && r !== null)
            throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , T5e = function(t) {
    S9e(e, t);
    function e(r, n) {
        return t.call(this, new ap, r, n) || this
    }
    return e
}(Nu);
const YM = new Set
  , Xn = new WeakMap
  , zc = new WeakMap
  , Rl = new WeakMap
  , t_ = new WeakMap
  , T9e = new WeakMap
  , Eu = new WeakMap
  , up = new WeakMap;
let pa;
const il = "__aa_tgt"
  , r_ = "__aa_del"
  , D9e = t => {
    const e = k9e(t);
    e && e.forEach(r => R9e(r))
}
  , F9e = t => {
    t.forEach(e => {
        e.target === pa && I9e(),
        Xn.has(e.target) && Xl(e.target)
    }
    )
}
;
function P9e(t) {
    const e = t_.get(t);
    e == null || e.disconnect();
    let r = Xn.get(t)
      , n = 0;
    const i = 5;
    r || (r = _u(t),
    Xn.set(t, r));
    const {offsetWidth: o, offsetHeight: s} = pa
      , l = [r.top - i, o - (r.left + i + r.width), s - (r.top + i + r.height), r.left - i].map(u => `${-1 * Math.floor(u)}px`).join(" ")
      , c = new IntersectionObserver( () => {
        ++n > 1 && Xl(t)
    }
    ,{
        root: pa,
        threshold: 1,
        rootMargin: l
    });
    c.observe(t),
    t_.set(t, c)
}
function Xl(t) {
    clearTimeout(up.get(t));
    const e = H1(t)
      , r = typeof e == "function" ? 500 : e.duration;
    up.set(t, setTimeout( () => {
        const n = Rl.get(t);
        (!n || n.finished) && (Xn.set(t, _u(t)),
        P9e(t))
    }
    , r))
}
function I9e() {
    clearTimeout(up.get(pa)),
    up.set(pa, setTimeout( () => {
        YM.forEach(t => qM(t, e => XM( () => Xl(e))))
    }
    , 100))
}
function O9e(t) {
    setTimeout( () => {
        T9e.set(t, setInterval( () => XM(Xl.bind(null, t)), 2e3))
    }
    , Math.round(2e3 * Math.random()))
}
function XM(t) {
    typeof requestIdleCallback == "function" ? requestIdleCallback( () => t()) : requestAnimationFrame( () => t())
}
let n_, kc;
typeof window < "u" && (pa = document.documentElement,
n_ = new MutationObserver(D9e),
kc = new ResizeObserver(F9e),
kc.observe(pa));
function k9e(t) {
    return t.reduce( (e, r) => {
        if (e === !1)
            return !1;
        if (r.target instanceof Element) {
            if (sv(r.target),
            !e.has(r.target)) {
                e.add(r.target);
                for (let n = 0; n < r.target.children.length; n++) {
                    const i = r.target.children.item(n);
                    if (i) {
                        if (r_ in i)
                            return !1;
                        sv(r.target, i),
                        e.add(i)
                    }
                }
            }
            if (r.removedNodes.length)
                for (let n = 0; n < r.removedNodes.length; n++) {
                    const i = r.removedNodes[n];
                    if (r_ in i)
                        return !1;
                    i instanceof Element && (e.add(i),
                    sv(r.target, i),
                    zc.set(i, [r.previousSibling, r.nextSibling]))
                }
        }
        return e
    }
    , new Set)
}
function sv(t, e) {
    !e && !(il in t) ? Object.defineProperty(t, il, {
        value: t
    }) : e && !(il in e) && Object.defineProperty(e, il, {
        value: t
    })
}
function R9e(t) {
    var e;
    const r = pa.contains(t)
      , n = Xn.has(t);
    r && zc.has(t) && zc.delete(t),
    Rl.has(t) && ((e = Rl.get(t)) === null || e === void 0 || e.cancel()),
    n && r ? M9e(t) : n && !r ? L9e(t) : N9e(t)
}
function io(t) {
    return Number(t.replace(/[^0-9.\-]/g, ""))
}
function _u(t) {
    const e = t.getBoundingClientRect();
    return {
        top: e.top + window.scrollY,
        left: e.left + window.scrollX,
        width: e.width,
        height: e.height
    }
}
function KM(t, e, r) {
    let n = e.width
      , i = e.height
      , o = r.width
      , s = r.height;
    const a = getComputedStyle(t);
    if (a.getPropertyValue("box-sizing") === "content-box") {
        const c = io(a.paddingTop) + io(a.paddingBottom) + io(a.borderTopWidth) + io(a.borderBottomWidth)
          , u = io(a.paddingLeft) + io(a.paddingRight) + io(a.borderRightWidth) + io(a.borderLeftWidth);
        n -= u,
        o -= u,
        i -= c,
        s -= c
    }
    return [n, o, i, s].map(Math.round)
}
function H1(t) {
    return il in t && Eu.has(t[il]) ? Eu.get(t[il]) : {
        duration: 250,
        easing: "ease-in-out"
    }
}
function qM(t, ...e) {
    e.forEach(r => r(t, Eu.has(t)));
    for (let r = 0; r < t.children.length; r++) {
        const n = t.children.item(r);
        n && e.forEach(i => i(n, Eu.has(n)))
    }
}
function M9e(t) {
    const e = Xn.get(t)
      , r = _u(t);
    let n;
    if (!e)
        return;
    const i = H1(t);
    if (typeof i != "function") {
        const o = e.left - r.left
          , s = e.top - r.top
          , [a,l,c,u] = KM(t, e, r)
          , f = {
            transform: `translate(${o}px, ${s}px)`
        }
          , d = {
            transform: "translate(0, 0)"
        };
        a !== l && (f.width = `${a}px`,
        d.width = `${l}px`),
        c !== u && (f.height = `${c}px`,
        d.height = `${u}px`),
        n = t.animate([f, d], i)
    } else
        n = new Animation(i(t, "remain", e, r)),
        n.play();
    Rl.set(t, n),
    Xn.set(t, r),
    n.addEventListener("finish", Xl.bind(null, t))
}
function N9e(t) {
    const e = _u(t);
    Xn.set(t, e);
    const r = H1(t);
    let n;
    typeof r != "function" ? n = t.animate([{
        transform: "scale(.98)",
        opacity: 0
    }, {
        transform: "scale(0.98)",
        opacity: 0,
        offset: .5
    }, {
        transform: "scale(1)",
        opacity: 1
    }], {
        duration: r.duration * 1.5,
        easing: "ease-in"
    }) : (n = new Animation(r(t, "add", e)),
    n.play()),
    Rl.set(t, n),
    n.addEventListener("finish", Xl.bind(null, t))
}
function L9e(t) {
    if (!zc.has(t) || !Xn.has(t))
        return;
    const [e,r] = zc.get(t);
    Object.defineProperty(t, r_, {
        value: !0
    }),
    r && r.parentNode && r.parentNode instanceof Element ? r.parentNode.insertBefore(t, r) : e && e.parentNode && e.parentNode.appendChild(t);
    const [n,i,o,s] = $9e(t)
      , a = H1(t)
      , l = Xn.get(t);
    let c;
    Object.assign(t.style, {
        position: "absolute",
        top: `${n}px`,
        left: `${i}px`,
        width: `${o}px`,
        height: `${s}px`,
        margin: 0,
        pointerEvents: "none",
        transformOrigin: "center",
        zIndex: 100
    }),
    typeof a != "function" ? c = t.animate([{
        transform: "scale(1)",
        opacity: 1
    }, {
        transform: "scale(.98)",
        opacity: 0
    }], {
        duration: a.duration,
        easing: "ease-out"
    }) : (c = new Animation(a(t, "remove", l)),
    c.play()),
    Rl.set(t, c),
    c.addEventListener("finish", () => {
        var u;
        t.remove(),
        Xn.delete(t),
        zc.delete(t),
        Rl.delete(t),
        (u = t_.get(t)) === null || u === void 0 || u.disconnect()
    }
    )
}
function $9e(t) {
    const e = Xn.get(t)
      , [r,,n] = KM(t, e, _u(t));
    let i = t.parentElement;
    for (; i && (getComputedStyle(i).position === "static" || i instanceof HTMLBodyElement); )
        i = i.parentElement;
    i || (i = document.body);
    const o = getComputedStyle(i)
      , s = Xn.get(i) || _u(i)
      , a = Math.round(e.top - s.top) - io(o.borderTopWidth)
      , l = Math.round(e.left - s.left) - io(o.borderLeftWidth);
    return [a, l, r, n]
}
function D5e(t, e={}) {
    n_ && kc && (getComputedStyle(t).position === "static" && Object.assign(t.style, {
        position: "relative"
    }),
    qM(t, Xl, O9e, r => kc == null ? void 0 : kc.observe(r)),
    typeof e == "function" ? Eu.set(t, e) : Eu.set(t, {
        duration: 250,
        easing: "ease-in-out",
        ...e
    }),
    n_.observe(t, {
        childList: !0
    }),
    YM.add(t))
}
var Lu = TypeError
  , UC = typeof Map == "function" && Map.prototype
  , av = Object.getOwnPropertyDescriptor && UC ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null
  , fp = UC && av && typeof av.get == "function" ? av.get : null
  , $6 = UC && Map.prototype.forEach
  , GC = typeof Set == "function" && Set.prototype
  , lv = Object.getOwnPropertyDescriptor && GC ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null
  , dp = GC && lv && typeof lv.get == "function" ? lv.get : null
  , U6 = GC && Set.prototype.forEach
  , U9e = typeof WeakMap == "function" && WeakMap.prototype
  , q0 = U9e ? WeakMap.prototype.has : null
  , G9e = typeof WeakSet == "function" && WeakSet.prototype
  , Z0 = G9e ? WeakSet.prototype.has : null
  , H9e = typeof WeakRef == "function" && WeakRef.prototype
  , G6 = H9e ? WeakRef.prototype.deref : null
  , V9e = Boolean.prototype.valueOf
  , z9e = Object.prototype.toString
  , j9e = Function.prototype.toString
  , W9e = String.prototype.match
  , HC = String.prototype.slice
  , qs = String.prototype.replace
  , Y9e = String.prototype.toUpperCase
  , H6 = String.prototype.toLowerCase
  , ZM = RegExp.prototype.test
  , V6 = Array.prototype.concat
  , ao = Array.prototype.join
  , X9e = Array.prototype.slice
  , z6 = Math.floor
  , i_ = typeof BigInt == "function" ? BigInt.prototype.valueOf : null
  , cv = Object.getOwnPropertySymbols
  , o_ = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null
  , bu = typeof Symbol == "function" && typeof Symbol.iterator == "object"
  , J0 = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === bu || "symbol") ? Symbol.toStringTag : null
  , JM = Object.prototype.propertyIsEnumerable
  , j6 = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) {
    return t.__proto__
}
: null);
function W6(t, e) {
    if (t === 1 / 0 || t === -1 / 0 || t !== t || t && t > -1e3 && t < 1e3 || ZM.call(/e/, e))
        return e;
    var r = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
    if (typeof t == "number") {
        var n = t < 0 ? -z6(-t) : z6(t);
        if (n !== t) {
            var i = String(n)
              , o = HC.call(e, i.length + 1);
            return qs.call(i, r, "$&_") + "." + qs.call(qs.call(o, /([0-9]{3})/g, "$&_"), /_$/, "")
        }
    }
    return qs.call(e, r, "$&_")
}
var s_ = sM
  , Y6 = s_.custom
  , X6 = tN(Y6) ? Y6 : null
  , QM = {
    __proto__: null,
    double: '"',
    single: "'"
}
  , K9e = {
    __proto__: null,
    double: /(["\\])/g,
    single: /(['\\])/g
}
  , V1 = function t(e, r, n, i) {
    var o = r || {};
    if (jo(o, "quoteStyle") && !jo(QM, o.quoteStyle))
        throw new TypeError('option "quoteStyle" must be "single" or "double"');
    if (jo(o, "maxStringLength") && (typeof o.maxStringLength == "number" ? o.maxStringLength < 0 && o.maxStringLength !== 1 / 0 : o.maxStringLength !== null))
        throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
    var s = jo(o, "customInspect") ? o.customInspect : !0;
    if (typeof s != "boolean" && s !== "symbol")
        throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
    if (jo(o, "indent") && o.indent !== null && o.indent !== "	" && !(parseInt(o.indent, 10) === o.indent && o.indent > 0))
        throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
    if (jo(o, "numericSeparator") && typeof o.numericSeparator != "boolean")
        throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
    var a = o.numericSeparator;
    if (typeof e > "u")
        return "undefined";
    if (e === null)
        return "null";
    if (typeof e == "boolean")
        return e ? "true" : "false";
    if (typeof e == "string")
        return nN(e, o);
    if (typeof e == "number") {
        if (e === 0)
            return 1 / 0 / e > 0 ? "0" : "-0";
        var l = String(e);
        return a ? W6(e, l) : l
    }
    if (typeof e == "bigint") {
        var c = String(e) + "n";
        return a ? W6(e, c) : c
    }
    var u = typeof o.depth > "u" ? 5 : o.depth;
    if (typeof n > "u" && (n = 0),
    n >= u && u > 0 && typeof e == "object")
        return a_(e) ? "[Array]" : "[Object]";
    var f = hAe(o, n);
    if (typeof i > "u")
        i = [];
    else if (rN(i, e) >= 0)
        return "[Circular]";
    function d(D, F, R) {
        if (F && (i = X9e.call(i),
        i.push(F)),
        R) {
            var P = {
                depth: o.depth
            };
            return jo(o, "quoteStyle") && (P.quoteStyle = o.quoteStyle),
            t(D, P, n + 1, i)
        }
        return t(D, o, n + 1, i)
    }
    if (typeof e == "function" && !K6(e)) {
        var h = iAe(e)
          , x = Mh(e, d);
        return "[Function" + (h ? ": " + h : " (anonymous)") + "]" + (x.length > 0 ? " { " + ao.call(x, ", ") + " }" : "")
    }
    if (tN(e)) {
        var y = bu ? qs.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : o_.call(e);
        return typeof e == "object" && !bu ? d0(y) : y
    }
    if (uAe(e)) {
        for (var m = "<" + H6.call(String(e.nodeName)), E = e.attributes || [], g = 0; g < E.length; g++)
            m += " " + E[g].name + "=" + eN(q9e(E[g].value), "double", o);
        return m += ">",
        e.childNodes && e.childNodes.length && (m += "..."),
        m += "</" + H6.call(String(e.nodeName)) + ">",
        m
    }
    if (a_(e)) {
        if (e.length === 0)
            return "[]";
        var p = Mh(e, d);
        return f && !dAe(p) ? "[" + l_(p, f) + "]" : "[ " + ao.call(p, ", ") + " ]"
    }
    if (J9e(e)) {
        var v = Mh(e, d);
        return !("cause"in Error.prototype) && "cause"in e && !JM.call(e, "cause") ? "{ [" + String(e) + "] " + ao.call(V6.call("[cause]: " + d(e.cause), v), ", ") + " }" : v.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + ao.call(v, ", ") + " }"
    }
    if (typeof e == "object" && s) {
        if (X6 && typeof e[X6] == "function" && s_)
            return s_(e, {
                depth: u - n
            });
        if (s !== "symbol" && typeof e.inspect == "function")
            return e.inspect()
    }
    if (oAe(e)) {
        var _ = [];
        return $6 && $6.call(e, function(D, F) {
            _.push(d(F, e, !0) + " => " + d(D, e))
        }),
        q6("Map", fp.call(e), _, f)
    }
    if (lAe(e)) {
        var b = [];
        return U6 && U6.call(e, function(D) {
            b.push(d(D, e))
        }),
        q6("Set", dp.call(e), b, f)
    }
    if (sAe(e))
        return uv("WeakMap");
    if (cAe(e))
        return uv("WeakSet");
    if (aAe(e))
        return uv("WeakRef");
    if (eAe(e))
        return d0(d(Number(e)));
    if (rAe(e))
        return d0(d(i_.call(e)));
    if (tAe(e))
        return d0(V9e.call(e));
    if (Q9e(e))
        return d0(d(String(e)));
    if (typeof window < "u" && e === window)
        return "{ [object Window] }";
    if (typeof globalThis < "u" && e === globalThis || typeof er < "u" && e === er)
        return "{ [object globalThis] }";
    if (!Z9e(e) && !K6(e)) {
        var C = Mh(e, d)
          , w = j6 ? j6(e) === Object.prototype : e instanceof Object || e.constructor === Object
          , T = e instanceof Object ? "" : "null prototype"
          , A = !w && J0 && Object(e) === e && J0 in e ? HC.call(Ba(e), 8, -1) : T ? "Object" : ""
          , B = w || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : ""
          , S = B + (A || T ? "[" + ao.call(V6.call([], A || [], T || []), ": ") + "] " : "");
        return C.length === 0 ? S + "{}" : f ? S + "{" + l_(C, f) + "}" : S + "{ " + ao.call(C, ", ") + " }"
    }
    return String(e)
};
function eN(t, e, r) {
    var n = r.quoteStyle || e
      , i = QM[n];
    return i + t + i
}
function q9e(t) {
    return qs.call(String(t), /"/g, "&quot;")
}
function Kl(t) {
    return !J0 || !(typeof t == "object" && (J0 in t || typeof t[J0] < "u"))
}
function a_(t) {
    return Ba(t) === "[object Array]" && Kl(t)
}
function Z9e(t) {
    return Ba(t) === "[object Date]" && Kl(t)
}
function K6(t) {
    return Ba(t) === "[object RegExp]" && Kl(t)
}
function J9e(t) {
    return Ba(t) === "[object Error]" && Kl(t)
}
function Q9e(t) {
    return Ba(t) === "[object String]" && Kl(t)
}
function eAe(t) {
    return Ba(t) === "[object Number]" && Kl(t)
}
function tAe(t) {
    return Ba(t) === "[object Boolean]" && Kl(t)
}
function tN(t) {
    if (bu)
        return t && typeof t == "object" && t instanceof Symbol;
    if (typeof t == "symbol")
        return !0;
    if (!t || typeof t != "object" || !o_)
        return !1;
    try {
        return o_.call(t),
        !0
    } catch {}
    return !1
}
function rAe(t) {
    if (!t || typeof t != "object" || !i_)
        return !1;
    try {
        return i_.call(t),
        !0
    } catch {}
    return !1
}
var nAe = Object.prototype.hasOwnProperty || function(t) {
    return t in this
}
;
function jo(t, e) {
    return nAe.call(t, e)
}
function Ba(t) {
    return z9e.call(t)
}
function iAe(t) {
    if (t.name)
        return t.name;
    var e = W9e.call(j9e.call(t), /^function\s*([\w$]+)/);
    return e ? e[1] : null
}
function rN(t, e) {
    if (t.indexOf)
        return t.indexOf(e);
    for (var r = 0, n = t.length; r < n; r++)
        if (t[r] === e)
            return r;
    return -1
}
function oAe(t) {
    if (!fp || !t || typeof t != "object")
        return !1;
    try {
        fp.call(t);
        try {
            dp.call(t)
        } catch {
            return !0
        }
        return t instanceof Map
    } catch {}
    return !1
}
function sAe(t) {
    if (!q0 || !t || typeof t != "object")
        return !1;
    try {
        q0.call(t, q0);
        try {
            Z0.call(t, Z0)
        } catch {
            return !0
        }
        return t instanceof WeakMap
    } catch {}
    return !1
}
function aAe(t) {
    if (!G6 || !t || typeof t != "object")
        return !1;
    try {
        return G6.call(t),
        !0
    } catch {}
    return !1
}
function lAe(t) {
    if (!dp || !t || typeof t != "object")
        return !1;
    try {
        dp.call(t);
        try {
            fp.call(t)
        } catch {
            return !0
        }
        return t instanceof Set
    } catch {}
    return !1
}
function cAe(t) {
    if (!Z0 || !t || typeof t != "object")
        return !1;
    try {
        Z0.call(t, Z0);
        try {
            q0.call(t, q0)
        } catch {
            return !0
        }
        return t instanceof WeakSet
    } catch {}
    return !1
}
function uAe(t) {
    return !t || typeof t != "object" ? !1 : typeof HTMLElement < "u" && t instanceof HTMLElement ? !0 : typeof t.nodeName == "string" && typeof t.getAttribute == "function"
}
function nN(t, e) {
    if (t.length > e.maxStringLength) {
        var r = t.length - e.maxStringLength
          , n = "... " + r + " more character" + (r > 1 ? "s" : "");
        return nN(HC.call(t, 0, e.maxStringLength), e) + n
    }
    var i = K9e[e.quoteStyle || "single"];
    i.lastIndex = 0;
    var o = qs.call(qs.call(t, i, "\\$1"), /[\x00-\x1f]/g, fAe);
    return eN(o, "single", e)
}
function fAe(t) {
    var e = t.charCodeAt(0)
      , r = {
        8: "b",
        9: "t",
        10: "n",
        12: "f",
        13: "r"
    }[e];
    return r ? "\\" + r : "\\x" + (e < 16 ? "0" : "") + Y9e.call(e.toString(16))
}
function d0(t) {
    return "Object(" + t + ")"
}
function uv(t) {
    return t + " { ? }"
}
function q6(t, e, r, n) {
    var i = n ? l_(r, n) : ao.call(r, ", ");
    return t + " (" + e + ") {" + i + "}"
}
function dAe(t) {
    for (var e = 0; e < t.length; e++)
        if (rN(t[e], `
`) >= 0)
            return !1;
    return !0
}
function hAe(t, e) {
    var r;
    if (t.indent === "	")
        r = "	";
    else if (typeof t.indent == "number" && t.indent > 0)
        r = ao.call(Array(t.indent + 1), " ");
    else
        return null;
    return {
        base: r,
        prev: ao.call(Array(e + 1), r)
    }
}
function l_(t, e) {
    if (t.length === 0)
        return "";
    var r = `
` + e.prev + e.base;
    return r + ao.call(t, "," + r) + `
` + e.prev
}
function Mh(t, e) {
    var r = a_(t)
      , n = [];
    if (r) {
        n.length = t.length;
        for (var i = 0; i < t.length; i++)
            n[i] = jo(t, i) ? e(t[i], t) : ""
    }
    var o = typeof cv == "function" ? cv(t) : [], s;
    if (bu) {
        s = {};
        for (var a = 0; a < o.length; a++)
            s["$" + o[a]] = o[a]
    }
    for (var l in t)
        jo(t, l) && (r && String(Number(l)) === l && l < t.length || bu && s["$" + l]instanceof Symbol || (ZM.call(/[^\w$]/, l) ? n.push(e(l, t) + ": " + e(t[l], t)) : n.push(l + ": " + e(t[l], t))));
    if (typeof cv == "function")
        for (var c = 0; c < o.length; c++)
            JM.call(t, o[c]) && n.push("[" + e(o[c]) + "]: " + e(t[o[c]], t));
    return n
}
var xAe = V1
  , pAe = Lu
  , z1 = function(t, e, r) {
    for (var n = t, i; (i = n.next) != null; n = i)
        if (i.key === e)
            return n.next = i.next,
            r || (i.next = t.next,
            t.next = i),
            i
}
  , gAe = function(t, e) {
    if (t) {
        var r = z1(t, e);
        return r && r.value
    }
}
  , mAe = function(t, e, r) {
    var n = z1(t, e);
    n ? n.value = r : t.next = {
        key: e,
        next: t.next,
        value: r
    }
}
  , vAe = function(t, e) {
    return t ? !!z1(t, e) : !1
}
  , yAe = function(t, e) {
    if (t)
        return z1(t, e, !0)
}
  , EAe = function() {
    var e, r = {
        assert: function(n) {
            if (!r.has(n))
                throw new pAe("Side channel does not contain " + xAe(n))
        },
        delete: function(n) {
            var i = e && e.next
              , o = yAe(e, n);
            return o && i && i === o && (e = void 0),
            !!o
        },
        get: function(n) {
            return gAe(e, n)
        },
        has: function(n) {
            return vAe(e, n)
        },
        set: function(n, i) {
            e || (e = {
                next: void 0
            }),
            mAe(e, n, i)
        }
    };
    return r
}
  , iN = Object
  , _Ae = Error
  , bAe = EvalError
  , CAe = RangeError
  , AAe = ReferenceError
  , wAe = SyntaxError
  , BAe = URIError
  , SAe = Math.abs
  , TAe = Math.floor
  , DAe = Math.max
  , FAe = Math.min
  , PAe = Math.pow
  , IAe = Math.round
  , OAe = Number.isNaN || function(e) {
    return e !== e
}
  , kAe = OAe
  , RAe = function(e) {
    return kAe(e) || e === 0 ? e : e < 0 ? -1 : 1
}
  , MAe = Object.getOwnPropertyDescriptor
  , fx = MAe;
if (fx)
    try {
        fx([], "length")
    } catch {
        fx = null
    }
var oN = fx
  , dx = Object.defineProperty || !1;
if (dx)
    try {
        dx({}, "a", {
            value: 1
        })
    } catch {
        dx = !1
    }
var NAe = dx, fv, Z6;
function LAe() {
    return Z6 || (Z6 = 1,
    fv = function() {
        if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
            return !1;
        if (typeof Symbol.iterator == "symbol")
            return !0;
        var e = {}
          , r = Symbol("test")
          , n = Object(r);
        if (typeof r == "string" || Object.prototype.toString.call(r) !== "[object Symbol]" || Object.prototype.toString.call(n) !== "[object Symbol]")
            return !1;
        var i = 42;
        e[r] = i;
        for (var o in e)
            return !1;
        if (typeof Object.keys == "function" && Object.keys(e).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(e).length !== 0)
            return !1;
        var s = Object.getOwnPropertySymbols(e);
        if (s.length !== 1 || s[0] !== r || !Object.prototype.propertyIsEnumerable.call(e, r))
            return !1;
        if (typeof Object.getOwnPropertyDescriptor == "function") {
            var a = Object.getOwnPropertyDescriptor(e, r);
            if (a.value !== i || a.enumerable !== !0)
                return !1
        }
        return !0
    }
    ),
    fv
}
var dv, J6;
function $Ae() {
    if (J6)
        return dv;
    J6 = 1;
    var t = typeof Symbol < "u" && Symbol
      , e = LAe();
    return dv = function() {
        return typeof t != "function" || typeof Symbol != "function" || typeof t("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : e()
    }
    ,
    dv
}
var hv, Q6;
function sN() {
    return Q6 || (Q6 = 1,
    hv = typeof Reflect < "u" && Reflect.getPrototypeOf || null),
    hv
}
var xv, e5;
function aN() {
    if (e5)
        return xv;
    e5 = 1;
    var t = iN;
    return xv = t.getPrototypeOf || null,
    xv
}
var pv, t5;
function UAe() {
    if (t5)
        return pv;
    t5 = 1;
    var t = "Function.prototype.bind called on incompatible "
      , e = Object.prototype.toString
      , r = Math.max
      , n = "[object Function]"
      , i = function(l, c) {
        for (var u = [], f = 0; f < l.length; f += 1)
            u[f] = l[f];
        for (var d = 0; d < c.length; d += 1)
            u[d + l.length] = c[d];
        return u
    }
      , o = function(l, c) {
        for (var u = [], f = c || 0, d = 0; f < l.length; f += 1,
        d += 1)
            u[d] = l[f];
        return u
    }
      , s = function(a, l) {
        for (var c = "", u = 0; u < a.length; u += 1)
            c += a[u],
            u + 1 < a.length && (c += l);
        return c
    };
    return pv = function(l) {
        var c = this;
        if (typeof c != "function" || e.apply(c) !== n)
            throw new TypeError(t + c);
        for (var u = o(arguments, 1), f, d = function() {
            if (this instanceof f) {
                var E = c.apply(this, i(u, arguments));
                return Object(E) === E ? E : this
            }
            return c.apply(l, i(u, arguments))
        }, h = r(0, c.length - u.length), x = [], y = 0; y < h; y++)
            x[y] = "$" + y;
        if (f = Function("binder", "return function (" + s(x, ",") + "){ return binder.apply(this,arguments); }")(d),
        c.prototype) {
            var m = function() {};
            m.prototype = c.prototype,
            f.prototype = new m,
            m.prototype = null
        }
        return f
    }
    ,
    pv
}
var gv, r5;
function j1() {
    if (r5)
        return gv;
    r5 = 1;
    var t = UAe();
    return gv = Function.prototype.bind || t,
    gv
}
var mv, n5;
function VC() {
    return n5 || (n5 = 1,
    mv = Function.prototype.call),
    mv
}
var vv, i5;
function lN() {
    return i5 || (i5 = 1,
    vv = Function.prototype.apply),
    vv
}
var GAe = typeof Reflect < "u" && Reflect && Reflect.apply, HAe = j1(), VAe = lN(), zAe = VC(), jAe = GAe, WAe = jAe || HAe.call(zAe, VAe), YAe = j1(), XAe = Lu, KAe = VC(), qAe = WAe, cN = function(e) {
    if (e.length < 1 || typeof e[0] != "function")
        throw new XAe("a function is required");
    return qAe(YAe, KAe, e)
}, yv, o5;
function ZAe() {
    if (o5)
        return yv;
    o5 = 1;
    var t = cN, e = oN, r;
    try {
        r = [].__proto__ === Array.prototype
    } catch (s) {
        if (!s || typeof s != "object" || !("code"in s) || s.code !== "ERR_PROTO_ACCESS")
            throw s
    }
    var n = !!r && e && e(Object.prototype, "__proto__")
      , i = Object
      , o = i.getPrototypeOf;
    return yv = n && typeof n.get == "function" ? t([n.get]) : typeof o == "function" ? function(a) {
        return o(a == null ? a : i(a))
    }
    : !1,
    yv
}
var Ev, s5;
function JAe() {
    if (s5)
        return Ev;
    s5 = 1;
    var t = sN()
      , e = aN()
      , r = ZAe();
    return Ev = t ? function(i) {
        return t(i)
    }
    : e ? function(i) {
        if (!i || typeof i != "object" && typeof i != "function")
            throw new TypeError("getProto: not an object");
        return e(i)
    }
    : r ? function(i) {
        return r(i)
    }
    : null,
    Ev
}
var _v, a5;
function QAe() {
    if (a5)
        return _v;
    a5 = 1;
    var t = Function.prototype.call
      , e = Object.prototype.hasOwnProperty
      , r = j1();
    return _v = r.call(t, e),
    _v
}
var Je, ewe = iN, twe = _Ae, rwe = bAe, nwe = CAe, iwe = AAe, Cu = wAe, jc = Lu, owe = BAe, swe = SAe, awe = TAe, lwe = DAe, cwe = FAe, uwe = PAe, fwe = IAe, dwe = RAe, uN = Function, bv = function(t) {
    try {
        return uN('"use strict"; return (' + t + ").constructor;")()
    } catch {}
}, $f = oN, hwe = NAe, Cv = function() {
    throw new jc
}, xwe = $f ? function() {
    try {
        return arguments.callee,
        Cv
    } catch {
        try {
            return $f(arguments, "callee").get
        } catch {
            return Cv
        }
    }
}() : Cv, pc = $Ae()(), Fr = JAe(), pwe = aN(), gwe = sN(), fN = lN(), wd = VC(), Ac = {}, mwe = typeof Uint8Array > "u" || !Fr ? Je : Fr(Uint8Array), pl = {
    __proto__: null,
    "%AggregateError%": typeof AggregateError > "u" ? Je : AggregateError,
    "%Array%": Array,
    "%ArrayBuffer%": typeof ArrayBuffer > "u" ? Je : ArrayBuffer,
    "%ArrayIteratorPrototype%": pc && Fr ? Fr([][Symbol.iterator]()) : Je,
    "%AsyncFromSyncIteratorPrototype%": Je,
    "%AsyncFunction%": Ac,
    "%AsyncGenerator%": Ac,
    "%AsyncGeneratorFunction%": Ac,
    "%AsyncIteratorPrototype%": Ac,
    "%Atomics%": typeof Atomics > "u" ? Je : Atomics,
    "%BigInt%": typeof BigInt > "u" ? Je : BigInt,
    "%BigInt64Array%": typeof BigInt64Array > "u" ? Je : BigInt64Array,
    "%BigUint64Array%": typeof BigUint64Array > "u" ? Je : BigUint64Array,
    "%Boolean%": Boolean,
    "%DataView%": typeof DataView > "u" ? Je : DataView,
    "%Date%": Date,
    "%decodeURI%": decodeURI,
    "%decodeURIComponent%": decodeURIComponent,
    "%encodeURI%": encodeURI,
    "%encodeURIComponent%": encodeURIComponent,
    "%Error%": twe,
    "%eval%": eval,
    "%EvalError%": rwe,
    "%Float16Array%": typeof Float16Array > "u" ? Je : Float16Array,
    "%Float32Array%": typeof Float32Array > "u" ? Je : Float32Array,
    "%Float64Array%": typeof Float64Array > "u" ? Je : Float64Array,
    "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? Je : FinalizationRegistry,
    "%Function%": uN,
    "%GeneratorFunction%": Ac,
    "%Int8Array%": typeof Int8Array > "u" ? Je : Int8Array,
    "%Int16Array%": typeof Int16Array > "u" ? Je : Int16Array,
    "%Int32Array%": typeof Int32Array > "u" ? Je : Int32Array,
    "%isFinite%": isFinite,
    "%isNaN%": isNaN,
    "%IteratorPrototype%": pc && Fr ? Fr(Fr([][Symbol.iterator]())) : Je,
    "%JSON%": typeof JSON == "object" ? JSON : Je,
    "%Map%": typeof Map > "u" ? Je : Map,
    "%MapIteratorPrototype%": typeof Map > "u" || !pc || !Fr ? Je : Fr(new Map()[Symbol.iterator]()),
    "%Math%": Math,
    "%Number%": Number,
    "%Object%": ewe,
    "%Object.getOwnPropertyDescriptor%": $f,
    "%parseFloat%": parseFloat,
    "%parseInt%": parseInt,
    "%Promise%": typeof Promise > "u" ? Je : Promise,
    "%Proxy%": typeof Proxy > "u" ? Je : Proxy,
    "%RangeError%": nwe,
    "%ReferenceError%": iwe,
    "%Reflect%": typeof Reflect > "u" ? Je : Reflect,
    "%RegExp%": RegExp,
    "%Set%": typeof Set > "u" ? Je : Set,
    "%SetIteratorPrototype%": typeof Set > "u" || !pc || !Fr ? Je : Fr(new Set()[Symbol.iterator]()),
    "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? Je : SharedArrayBuffer,
    "%String%": String,
    "%StringIteratorPrototype%": pc && Fr ? Fr(""[Symbol.iterator]()) : Je,
    "%Symbol%": pc ? Symbol : Je,
    "%SyntaxError%": Cu,
    "%ThrowTypeError%": xwe,
    "%TypedArray%": mwe,
    "%TypeError%": jc,
    "%Uint8Array%": typeof Uint8Array > "u" ? Je : Uint8Array,
    "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? Je : Uint8ClampedArray,
    "%Uint16Array%": typeof Uint16Array > "u" ? Je : Uint16Array,
    "%Uint32Array%": typeof Uint32Array > "u" ? Je : Uint32Array,
    "%URIError%": owe,
    "%WeakMap%": typeof WeakMap > "u" ? Je : WeakMap,
    "%WeakRef%": typeof WeakRef > "u" ? Je : WeakRef,
    "%WeakSet%": typeof WeakSet > "u" ? Je : WeakSet,
    "%Function.prototype.call%": wd,
    "%Function.prototype.apply%": fN,
    "%Object.defineProperty%": hwe,
    "%Object.getPrototypeOf%": pwe,
    "%Math.abs%": swe,
    "%Math.floor%": awe,
    "%Math.max%": lwe,
    "%Math.min%": cwe,
    "%Math.pow%": uwe,
    "%Math.round%": fwe,
    "%Math.sign%": dwe,
    "%Reflect.getPrototypeOf%": gwe
};
if (Fr)
    try {
        null.error
    } catch (t) {
        var vwe = Fr(Fr(t));
        pl["%Error.prototype%"] = vwe
    }
var ywe = function t(e) {
    var r;
    if (e === "%AsyncFunction%")
        r = bv("async function () {}");
    else if (e === "%GeneratorFunction%")
        r = bv("function* () {}");
    else if (e === "%AsyncGeneratorFunction%")
        r = bv("async function* () {}");
    else if (e === "%AsyncGenerator%") {
        var n = t("%AsyncGeneratorFunction%");
        n && (r = n.prototype)
    } else if (e === "%AsyncIteratorPrototype%") {
        var i = t("%AsyncGenerator%");
        i && Fr && (r = Fr(i.prototype))
    }
    return pl[e] = r,
    r
}
  , l5 = {
    __proto__: null,
    "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
    "%ArrayPrototype%": ["Array", "prototype"],
    "%ArrayProto_entries%": ["Array", "prototype", "entries"],
    "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
    "%ArrayProto_keys%": ["Array", "prototype", "keys"],
    "%ArrayProto_values%": ["Array", "prototype", "values"],
    "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
    "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
    "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
    "%BooleanPrototype%": ["Boolean", "prototype"],
    "%DataViewPrototype%": ["DataView", "prototype"],
    "%DatePrototype%": ["Date", "prototype"],
    "%ErrorPrototype%": ["Error", "prototype"],
    "%EvalErrorPrototype%": ["EvalError", "prototype"],
    "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
    "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
    "%FunctionPrototype%": ["Function", "prototype"],
    "%Generator%": ["GeneratorFunction", "prototype"],
    "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
    "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
    "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
    "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
    "%JSONParse%": ["JSON", "parse"],
    "%JSONStringify%": ["JSON", "stringify"],
    "%MapPrototype%": ["Map", "prototype"],
    "%NumberPrototype%": ["Number", "prototype"],
    "%ObjectPrototype%": ["Object", "prototype"],
    "%ObjProto_toString%": ["Object", "prototype", "toString"],
    "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
    "%PromisePrototype%": ["Promise", "prototype"],
    "%PromiseProto_then%": ["Promise", "prototype", "then"],
    "%Promise_all%": ["Promise", "all"],
    "%Promise_reject%": ["Promise", "reject"],
    "%Promise_resolve%": ["Promise", "resolve"],
    "%RangeErrorPrototype%": ["RangeError", "prototype"],
    "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
    "%RegExpPrototype%": ["RegExp", "prototype"],
    "%SetPrototype%": ["Set", "prototype"],
    "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
    "%StringPrototype%": ["String", "prototype"],
    "%SymbolPrototype%": ["Symbol", "prototype"],
    "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
    "%TypedArrayPrototype%": ["TypedArray", "prototype"],
    "%TypeErrorPrototype%": ["TypeError", "prototype"],
    "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
    "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
    "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
    "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
    "%URIErrorPrototype%": ["URIError", "prototype"],
    "%WeakMapPrototype%": ["WeakMap", "prototype"],
    "%WeakSetPrototype%": ["WeakSet", "prototype"]
}
  , Bd = j1()
  , hp = QAe()
  , Ewe = Bd.call(wd, Array.prototype.concat)
  , _we = Bd.call(fN, Array.prototype.splice)
  , c5 = Bd.call(wd, String.prototype.replace)
  , xp = Bd.call(wd, String.prototype.slice)
  , bwe = Bd.call(wd, RegExp.prototype.exec)
  , Cwe = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g
  , Awe = /\\(\\)?/g
  , wwe = function(e) {
    var r = xp(e, 0, 1)
      , n = xp(e, -1);
    if (r === "%" && n !== "%")
        throw new Cu("invalid intrinsic syntax, expected closing `%`");
    if (n === "%" && r !== "%")
        throw new Cu("invalid intrinsic syntax, expected opening `%`");
    var i = [];
    return c5(e, Cwe, function(o, s, a, l) {
        i[i.length] = a ? c5(l, Awe, "$1") : s || o
    }),
    i
}
  , Bwe = function(e, r) {
    var n = e, i;
    if (hp(l5, n) && (i = l5[n],
    n = "%" + i[0] + "%"),
    hp(pl, n)) {
        var o = pl[n];
        if (o === Ac && (o = ywe(n)),
        typeof o > "u" && !r)
            throw new jc("intrinsic " + e + " exists, but is not available. Please file an issue!");
        return {
            alias: i,
            name: n,
            value: o
        }
    }
    throw new Cu("intrinsic " + e + " does not exist!")
}
  , zC = function(e, r) {
    if (typeof e != "string" || e.length === 0)
        throw new jc("intrinsic name must be a non-empty string");
    if (arguments.length > 1 && typeof r != "boolean")
        throw new jc('"allowMissing" argument must be a boolean');
    if (bwe(/^%?[^%]*%?$/, e) === null)
        throw new Cu("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
    var n = wwe(e)
      , i = n.length > 0 ? n[0] : ""
      , o = Bwe("%" + i + "%", r)
      , s = o.name
      , a = o.value
      , l = !1
      , c = o.alias;
    c && (i = c[0],
    _we(n, Ewe([0, 1], c)));
    for (var u = 1, f = !0; u < n.length; u += 1) {
        var d = n[u]
          , h = xp(d, 0, 1)
          , x = xp(d, -1);
        if ((h === '"' || h === "'" || h === "`" || x === '"' || x === "'" || x === "`") && h !== x)
            throw new Cu("property names with quotes must have matching quotes");
        if ((d === "constructor" || !f) && (l = !0),
        i += "." + d,
        s = "%" + i + "%",
        hp(pl, s))
            a = pl[s];
        else if (a != null) {
            if (!(d in a)) {
                if (!r)
                    throw new jc("base intrinsic for " + e + " exists, but the property is not available.");
                return
            }
            if ($f && u + 1 >= n.length) {
                var y = $f(a, d);
                f = !!y,
                f && "get"in y && !("originalValue"in y.get) ? a = y.get : a = a[d]
            } else
                f = hp(a, d),
                a = a[d];
            f && !l && (pl[s] = a)
        }
    }
    return a
}
  , dN = zC
  , hN = cN
  , Swe = hN([dN("%String.prototype.indexOf%")])
  , xN = function(e, r) {
    var n = dN(e, !!r);
    return typeof n == "function" && Swe(e, ".prototype.") > -1 ? hN([n]) : n
}
  , Twe = zC
  , Sd = xN
  , Dwe = V1
  , Fwe = Lu
  , u5 = Twe("%Map%", !0)
  , Pwe = Sd("Map.prototype.get", !0)
  , Iwe = Sd("Map.prototype.set", !0)
  , Owe = Sd("Map.prototype.has", !0)
  , kwe = Sd("Map.prototype.delete", !0)
  , Rwe = Sd("Map.prototype.size", !0)
  , pN = !!u5 && function() {
    var e, r = {
        assert: function(n) {
            if (!r.has(n))
                throw new Fwe("Side channel does not contain " + Dwe(n))
        },
        delete: function(n) {
            if (e) {
                var i = kwe(e, n);
                return Rwe(e) === 0 && (e = void 0),
                i
            }
            return !1
        },
        get: function(n) {
            if (e)
                return Pwe(e, n)
        },
        has: function(n) {
            return e ? Owe(e, n) : !1
        },
        set: function(n, i) {
            e || (e = new u5),
            Iwe(e, n, i)
        }
    };
    return r
}
  , Mwe = zC
  , W1 = xN
  , Nwe = V1
  , Nh = pN
  , Lwe = Lu
  , gc = Mwe("%WeakMap%", !0)
  , $we = W1("WeakMap.prototype.get", !0)
  , Uwe = W1("WeakMap.prototype.set", !0)
  , Gwe = W1("WeakMap.prototype.has", !0)
  , Hwe = W1("WeakMap.prototype.delete", !0)
  , Vwe = gc ? function() {
    var e, r, n = {
        assert: function(i) {
            if (!n.has(i))
                throw new Lwe("Side channel does not contain " + Nwe(i))
        },
        delete: function(i) {
            if (gc && i && (typeof i == "object" || typeof i == "function")) {
                if (e)
                    return Hwe(e, i)
            } else if (Nh && r)
                return r.delete(i);
            return !1
        },
        get: function(i) {
            return gc && i && (typeof i == "object" || typeof i == "function") && e ? $we(e, i) : r && r.get(i)
        },
        has: function(i) {
            return gc && i && (typeof i == "object" || typeof i == "function") && e ? Gwe(e, i) : !!r && r.has(i)
        },
        set: function(i, o) {
            gc && i && (typeof i == "object" || typeof i == "function") ? (e || (e = new gc),
            Uwe(e, i, o)) : Nh && (r || (r = Nh()),
            r.set(i, o))
        }
    };
    return n
}
: Nh
  , zwe = Lu
  , jwe = V1
  , Wwe = EAe
  , Ywe = pN
  , Xwe = Vwe
  , Kwe = Xwe || Ywe || Wwe
  , qwe = function() {
    var e, r = {
        assert: function(n) {
            if (!r.has(n))
                throw new zwe("Side channel does not contain " + jwe(n))
        },
        delete: function(n) {
            return !!e && e.delete(n)
        },
        get: function(n) {
            return e && e.get(n)
        },
        has: function(n) {
            return !!e && e.has(n)
        },
        set: function(n, i) {
            e || (e = Kwe()),
            e.set(n, i)
        }
    };
    return r
}
  , Zwe = String.prototype.replace
  , Jwe = /%20/g
  , Av = {
    RFC1738: "RFC1738",
    RFC3986: "RFC3986"
}
  , jC = {
    default: Av.RFC3986,
    formatters: {
        RFC1738: function(t) {
            return Zwe.call(t, Jwe, "+")
        },
        RFC3986: function(t) {
            return String(t)
        }
    },
    RFC1738: Av.RFC1738,
    RFC3986: Av.RFC3986
}
  , Qwe = jC
  , wv = Object.prototype.hasOwnProperty
  , Ya = Array.isArray
  , eo = function() {
    for (var t = [], e = 0; e < 256; ++e)
        t.push("%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase());
    return t
}()
  , e3e = function(e) {
    for (; e.length > 1; ) {
        var r = e.pop()
          , n = r.obj[r.prop];
        if (Ya(n)) {
            for (var i = [], o = 0; o < n.length; ++o)
                typeof n[o] < "u" && i.push(n[o]);
            r.obj[r.prop] = i
        }
    }
}
  , gN = function(e, r) {
    for (var n = r && r.plainObjects ? {
        __proto__: null
    } : {}, i = 0; i < e.length; ++i)
        typeof e[i] < "u" && (n[i] = e[i]);
    return n
}
  , t3e = function t(e, r, n) {
    if (!r)
        return e;
    if (typeof r != "object" && typeof r != "function") {
        if (Ya(e))
            e.push(r);
        else if (e && typeof e == "object")
            (n && (n.plainObjects || n.allowPrototypes) || !wv.call(Object.prototype, r)) && (e[r] = !0);
        else
            return [e, r];
        return e
    }
    if (!e || typeof e != "object")
        return [e].concat(r);
    var i = e;
    return Ya(e) && !Ya(r) && (i = gN(e, n)),
    Ya(e) && Ya(r) ? (r.forEach(function(o, s) {
        if (wv.call(e, s)) {
            var a = e[s];
            a && typeof a == "object" && o && typeof o == "object" ? e[s] = t(a, o, n) : e.push(o)
        } else
            e[s] = o
    }),
    e) : Object.keys(r).reduce(function(o, s) {
        var a = r[s];
        return wv.call(o, s) ? o[s] = t(o[s], a, n) : o[s] = a,
        o
    }, i)
}
  , r3e = function(e, r) {
    return Object.keys(r).reduce(function(n, i) {
        return n[i] = r[i],
        n
    }, e)
}
  , n3e = function(t, e, r) {
    var n = t.replace(/\+/g, " ");
    if (r === "iso-8859-1")
        return n.replace(/%[0-9a-f]{2}/gi, unescape);
    try {
        return decodeURIComponent(n)
    } catch {
        return n
    }
}
  , Bv = 1024
  , i3e = function(e, r, n, i, o) {
    if (e.length === 0)
        return e;
    var s = e;
    if (typeof e == "symbol" ? s = Symbol.prototype.toString.call(e) : typeof e != "string" && (s = String(e)),
    n === "iso-8859-1")
        return escape(s).replace(/%u[0-9a-f]{4}/gi, function(h) {
            return "%26%23" + parseInt(h.slice(2), 16) + "%3B"
        });
    for (var a = "", l = 0; l < s.length; l += Bv) {
        for (var c = s.length >= Bv ? s.slice(l, l + Bv) : s, u = [], f = 0; f < c.length; ++f) {
            var d = c.charCodeAt(f);
            if (d === 45 || d === 46 || d === 95 || d === 126 || d >= 48 && d <= 57 || d >= 65 && d <= 90 || d >= 97 && d <= 122 || o === Qwe.RFC1738 && (d === 40 || d === 41)) {
                u[u.length] = c.charAt(f);
                continue
            }
            if (d < 128) {
                u[u.length] = eo[d];
                continue
            }
            if (d < 2048) {
                u[u.length] = eo[192 | d >> 6] + eo[128 | d & 63];
                continue
            }
            if (d < 55296 || d >= 57344) {
                u[u.length] = eo[224 | d >> 12] + eo[128 | d >> 6 & 63] + eo[128 | d & 63];
                continue
            }
            f += 1,
            d = 65536 + ((d & 1023) << 10 | c.charCodeAt(f) & 1023),
            u[u.length] = eo[240 | d >> 18] + eo[128 | d >> 12 & 63] + eo[128 | d >> 6 & 63] + eo[128 | d & 63]
        }
        a += u.join("")
    }
    return a
}
  , o3e = function(e) {
    for (var r = [{
        obj: {
            o: e
        },
        prop: "o"
    }], n = [], i = 0; i < r.length; ++i)
        for (var o = r[i], s = o.obj[o.prop], a = Object.keys(s), l = 0; l < a.length; ++l) {
            var c = a[l]
              , u = s[c];
            typeof u == "object" && u !== null && n.indexOf(u) === -1 && (r.push({
                obj: s,
                prop: c
            }),
            n.push(u))
        }
    return e3e(r),
    e
}
  , s3e = function(e) {
    return Object.prototype.toString.call(e) === "[object RegExp]"
}
  , a3e = function(e) {
    return !e || typeof e != "object" ? !1 : !!(e.constructor && e.constructor.isBuffer && e.constructor.isBuffer(e))
}
  , l3e = function(e, r) {
    return [].concat(e, r)
}
  , c3e = function(e, r) {
    if (Ya(e)) {
        for (var n = [], i = 0; i < e.length; i += 1)
            n.push(r(e[i]));
        return n
    }
    return r(e)
}
  , mN = {
    arrayToObject: gN,
    assign: r3e,
    combine: l3e,
    compact: o3e,
    decode: n3e,
    encode: i3e,
    isBuffer: a3e,
    isRegExp: s3e,
    maybeMap: c3e,
    merge: t3e
}
  , vN = qwe
  , hx = mN
  , Q0 = jC
  , u3e = Object.prototype.hasOwnProperty
  , yN = {
    brackets: function(e) {
        return e + "[]"
    },
    comma: "comma",
    indices: function(e, r) {
        return e + "[" + r + "]"
    },
    repeat: function(e) {
        return e
    }
}
  , so = Array.isArray
  , f3e = Array.prototype.push
  , EN = function(t, e) {
    f3e.apply(t, so(e) ? e : [e])
}
  , d3e = Date.prototype.toISOString
  , f5 = Q0.default
  , vr = {
    addQueryPrefix: !1,
    allowDots: !1,
    allowEmptyArrays: !1,
    arrayFormat: "indices",
    charset: "utf-8",
    charsetSentinel: !1,
    commaRoundTrip: !1,
    delimiter: "&",
    encode: !0,
    encodeDotInKeys: !1,
    encoder: hx.encode,
    encodeValuesOnly: !1,
    filter: void 0,
    format: f5,
    formatter: Q0.formatters[f5],
    indices: !1,
    serializeDate: function(e) {
        return d3e.call(e)
    },
    skipNulls: !1,
    strictNullHandling: !1
}
  , h3e = function(e) {
    return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint"
}
  , Sv = {}
  , x3e = function t(e, r, n, i, o, s, a, l, c, u, f, d, h, x, y, m, E, g) {
    for (var p = e, v = g, _ = 0, b = !1; (v = v.get(Sv)) !== void 0 && !b; ) {
        var C = v.get(e);
        if (_ += 1,
        typeof C < "u") {
            if (C === _)
                throw new RangeError("Cyclic object value");
            b = !0
        }
        typeof v.get(Sv) > "u" && (_ = 0)
    }
    if (typeof u == "function" ? p = u(r, p) : p instanceof Date ? p = h(p) : n === "comma" && so(p) && (p = hx.maybeMap(p, function(oe) {
        return oe instanceof Date ? h(oe) : oe
    })),
    p === null) {
        if (s)
            return c && !m ? c(r, vr.encoder, E, "key", x) : r;
        p = ""
    }
    if (h3e(p) || hx.isBuffer(p)) {
        if (c) {
            var w = m ? r : c(r, vr.encoder, E, "key", x);
            return [y(w) + "=" + y(c(p, vr.encoder, E, "value", x))]
        }
        return [y(r) + "=" + y(String(p))]
    }
    var T = [];
    if (typeof p > "u")
        return T;
    var A;
    if (n === "comma" && so(p))
        m && c && (p = hx.maybeMap(p, c)),
        A = [{
            value: p.length > 0 ? p.join(",") || null : void 0
        }];
    else if (so(u))
        A = u;
    else {
        var B = Object.keys(p);
        A = f ? B.sort(f) : B
    }
    var S = l ? String(r).replace(/\./g, "%2E") : String(r)
      , D = i && so(p) && p.length === 1 ? S + "[]" : S;
    if (o && so(p) && p.length === 0)
        return D + "[]";
    for (var F = 0; F < A.length; ++F) {
        var R = A[F]
          , P = typeof R == "object" && R && typeof R.value < "u" ? R.value : p[R];
        if (!(a && P === null)) {
            var N = d && l ? String(R).replace(/\./g, "%2E") : String(R)
              , j = so(p) ? typeof n == "function" ? n(D, N) : D : D + (d ? "." + N : "[" + N + "]");
            g.set(e, _);
            var K = vN();
            K.set(Sv, g),
            EN(T, t(P, j, n, i, o, s, a, l, n === "comma" && m && so(p) ? null : c, u, f, d, h, x, y, m, E, K))
        }
    }
    return T
}
  , p3e = function(e) {
    if (!e)
        return vr;
    if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
        throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
    if (typeof e.encodeDotInKeys < "u" && typeof e.encodeDotInKeys != "boolean")
        throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
    if (e.encoder !== null && typeof e.encoder < "u" && typeof e.encoder != "function")
        throw new TypeError("Encoder has to be a function.");
    var r = e.charset || vr.charset;
    if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
        throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
    var n = Q0.default;
    if (typeof e.format < "u") {
        if (!u3e.call(Q0.formatters, e.format))
            throw new TypeError("Unknown format option provided.");
        n = e.format
    }
    var i = Q0.formatters[n]
      , o = vr.filter;
    (typeof e.filter == "function" || so(e.filter)) && (o = e.filter);
    var s;
    if (e.arrayFormat in yN ? s = e.arrayFormat : "indices"in e ? s = e.indices ? "indices" : "repeat" : s = vr.arrayFormat,
    "commaRoundTrip"in e && typeof e.commaRoundTrip != "boolean")
        throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
    var a = typeof e.allowDots > "u" ? e.encodeDotInKeys === !0 ? !0 : vr.allowDots : !!e.allowDots;
    return {
        addQueryPrefix: typeof e.addQueryPrefix == "boolean" ? e.addQueryPrefix : vr.addQueryPrefix,
        allowDots: a,
        allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : vr.allowEmptyArrays,
        arrayFormat: s,
        charset: r,
        charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : vr.charsetSentinel,
        commaRoundTrip: !!e.commaRoundTrip,
        delimiter: typeof e.delimiter > "u" ? vr.delimiter : e.delimiter,
        encode: typeof e.encode == "boolean" ? e.encode : vr.encode,
        encodeDotInKeys: typeof e.encodeDotInKeys == "boolean" ? e.encodeDotInKeys : vr.encodeDotInKeys,
        encoder: typeof e.encoder == "function" ? e.encoder : vr.encoder,
        encodeValuesOnly: typeof e.encodeValuesOnly == "boolean" ? e.encodeValuesOnly : vr.encodeValuesOnly,
        filter: o,
        format: n,
        formatter: i,
        serializeDate: typeof e.serializeDate == "function" ? e.serializeDate : vr.serializeDate,
        skipNulls: typeof e.skipNulls == "boolean" ? e.skipNulls : vr.skipNulls,
        sort: typeof e.sort == "function" ? e.sort : null,
        strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : vr.strictNullHandling
    }
}
  , g3e = function(t, e) {
    var r = t, n = p3e(e), i, o;
    typeof n.filter == "function" ? (o = n.filter,
    r = o("", r)) : so(n.filter) && (o = n.filter,
    i = o);
    var s = [];
    if (typeof r != "object" || r === null)
        return "";
    var a = yN[n.arrayFormat]
      , l = a === "comma" && n.commaRoundTrip;
    i || (i = Object.keys(r)),
    n.sort && i.sort(n.sort);
    for (var c = vN(), u = 0; u < i.length; ++u) {
        var f = i[u]
          , d = r[f];
        n.skipNulls && d === null || EN(s, x3e(d, f, a, l, n.allowEmptyArrays, n.strictNullHandling, n.skipNulls, n.encodeDotInKeys, n.encode ? n.encoder : null, n.filter, n.sort, n.allowDots, n.serializeDate, n.format, n.formatter, n.encodeValuesOnly, n.charset, c))
    }
    var h = s.join(n.delimiter)
      , x = n.addQueryPrefix === !0 ? "?" : "";
    return n.charsetSentinel && (n.charset === "iso-8859-1" ? x += "utf8=%26%2310003%3B&" : x += "utf8=%E2%9C%93&"),
    h.length > 0 ? x + h : ""
}
  , Ml = mN
  , c_ = Object.prototype.hasOwnProperty
  , d5 = Array.isArray
  , qt = {
    allowDots: !1,
    allowEmptyArrays: !1,
    allowPrototypes: !1,
    allowSparse: !1,
    arrayLimit: 20,
    charset: "utf-8",
    charsetSentinel: !1,
    comma: !1,
    decodeDotInKeys: !1,
    decoder: Ml.decode,
    delimiter: "&",
    depth: 5,
    duplicates: "combine",
    ignoreQueryPrefix: !1,
    interpretNumericEntities: !1,
    parameterLimit: 1e3,
    parseArrays: !0,
    plainObjects: !1,
    strictDepth: !1,
    strictNullHandling: !1,
    throwOnLimitExceeded: !1
}
  , m3e = function(t) {
    return t.replace(/&#(\d+);/g, function(e, r) {
        return String.fromCharCode(parseInt(r, 10))
    })
}
  , _N = function(t, e, r) {
    if (t && typeof t == "string" && e.comma && t.indexOf(",") > -1)
        return t.split(",");
    if (e.throwOnLimitExceeded && r >= e.arrayLimit)
        throw new RangeError("Array limit exceeded. Only " + e.arrayLimit + " element" + (e.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
    return t
}
  , v3e = "utf8=%26%2310003%3B"
  , y3e = "utf8=%E2%9C%93"
  , E3e = function(e, r) {
    var n = {
        __proto__: null
    }
      , i = r.ignoreQueryPrefix ? e.replace(/^\?/, "") : e;
    i = i.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
    var o = r.parameterLimit === 1 / 0 ? void 0 : r.parameterLimit
      , s = i.split(r.delimiter, r.throwOnLimitExceeded ? o + 1 : o);
    if (r.throwOnLimitExceeded && s.length > o)
        throw new RangeError("Parameter limit exceeded. Only " + o + " parameter" + (o === 1 ? "" : "s") + " allowed.");
    var a = -1, l, c = r.charset;
    if (r.charsetSentinel)
        for (l = 0; l < s.length; ++l)
            s[l].indexOf("utf8=") === 0 && (s[l] === y3e ? c = "utf-8" : s[l] === v3e && (c = "iso-8859-1"),
            a = l,
            l = s.length);
    for (l = 0; l < s.length; ++l)
        if (l !== a) {
            var u = s[l], f = u.indexOf("]="), d = f === -1 ? u.indexOf("=") : f + 1, h, x;
            d === -1 ? (h = r.decoder(u, qt.decoder, c, "key"),
            x = r.strictNullHandling ? null : "") : (h = r.decoder(u.slice(0, d), qt.decoder, c, "key"),
            x = Ml.maybeMap(_N(u.slice(d + 1), r, d5(n[h]) ? n[h].length : 0), function(m) {
                return r.decoder(m, qt.decoder, c, "value")
            })),
            x && r.interpretNumericEntities && c === "iso-8859-1" && (x = m3e(String(x))),
            u.indexOf("[]=") > -1 && (x = d5(x) ? [x] : x);
            var y = c_.call(n, h);
            y && r.duplicates === "combine" ? n[h] = Ml.combine(n[h], x) : (!y || r.duplicates === "last") && (n[h] = x)
        }
    return n
}
  , _3e = function(t, e, r, n) {
    var i = 0;
    if (t.length > 0 && t[t.length - 1] === "[]") {
        var o = t.slice(0, -1).join("");
        i = Array.isArray(e) && e[o] ? e[o].length : 0
    }
    for (var s = n ? e : _N(e, r, i), a = t.length - 1; a >= 0; --a) {
        var l, c = t[a];
        if (c === "[]" && r.parseArrays)
            l = r.allowEmptyArrays && (s === "" || r.strictNullHandling && s === null) ? [] : Ml.combine([], s);
        else {
            l = r.plainObjects ? {
                __proto__: null
            } : {};
            var u = c.charAt(0) === "[" && c.charAt(c.length - 1) === "]" ? c.slice(1, -1) : c
              , f = r.decodeDotInKeys ? u.replace(/%2E/g, ".") : u
              , d = parseInt(f, 10);
            !r.parseArrays && f === "" ? l = {
                0: s
            } : !isNaN(d) && c !== f && String(d) === f && d >= 0 && r.parseArrays && d <= r.arrayLimit ? (l = [],
            l[d] = s) : f !== "__proto__" && (l[f] = s)
        }
        s = l
    }
    return s
}
  , b3e = function(e, r, n, i) {
    if (e) {
        var o = n.allowDots ? e.replace(/\.([^.[]+)/g, "[$1]") : e
          , s = /(\[[^[\]]*])/
          , a = /(\[[^[\]]*])/g
          , l = n.depth > 0 && s.exec(o)
          , c = l ? o.slice(0, l.index) : o
          , u = [];
        if (c) {
            if (!n.plainObjects && c_.call(Object.prototype, c) && !n.allowPrototypes)
                return;
            u.push(c)
        }
        for (var f = 0; n.depth > 0 && (l = a.exec(o)) !== null && f < n.depth; ) {
            if (f += 1,
            !n.plainObjects && c_.call(Object.prototype, l[1].slice(1, -1)) && !n.allowPrototypes)
                return;
            u.push(l[1])
        }
        if (l) {
            if (n.strictDepth === !0)
                throw new RangeError("Input depth exceeded depth option of " + n.depth + " and strictDepth is true");
            u.push("[" + o.slice(l.index) + "]")
        }
        return _3e(u, r, n, i)
    }
}
  , C3e = function(e) {
    if (!e)
        return qt;
    if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
        throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
    if (typeof e.decodeDotInKeys < "u" && typeof e.decodeDotInKeys != "boolean")
        throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
    if (e.decoder !== null && typeof e.decoder < "u" && typeof e.decoder != "function")
        throw new TypeError("Decoder has to be a function.");
    if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
        throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
    if (typeof e.throwOnLimitExceeded < "u" && typeof e.throwOnLimitExceeded != "boolean")
        throw new TypeError("`throwOnLimitExceeded` option must be a boolean");
    var r = typeof e.charset > "u" ? qt.charset : e.charset
      , n = typeof e.duplicates > "u" ? qt.duplicates : e.duplicates;
    if (n !== "combine" && n !== "first" && n !== "last")
        throw new TypeError("The duplicates option must be either combine, first, or last");
    var i = typeof e.allowDots > "u" ? e.decodeDotInKeys === !0 ? !0 : qt.allowDots : !!e.allowDots;
    return {
        allowDots: i,
        allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : qt.allowEmptyArrays,
        allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes : qt.allowPrototypes,
        allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse : qt.allowSparse,
        arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit : qt.arrayLimit,
        charset: r,
        charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : qt.charsetSentinel,
        comma: typeof e.comma == "boolean" ? e.comma : qt.comma,
        decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys : qt.decodeDotInKeys,
        decoder: typeof e.decoder == "function" ? e.decoder : qt.decoder,
        delimiter: typeof e.delimiter == "string" || Ml.isRegExp(e.delimiter) ? e.delimiter : qt.delimiter,
        depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth : qt.depth,
        duplicates: n,
        ignoreQueryPrefix: e.ignoreQueryPrefix === !0,
        interpretNumericEntities: typeof e.interpretNumericEntities == "boolean" ? e.interpretNumericEntities : qt.interpretNumericEntities,
        parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit : qt.parameterLimit,
        parseArrays: e.parseArrays !== !1,
        plainObjects: typeof e.plainObjects == "boolean" ? e.plainObjects : qt.plainObjects,
        strictDepth: typeof e.strictDepth == "boolean" ? !!e.strictDepth : qt.strictDepth,
        strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : qt.strictNullHandling,
        throwOnLimitExceeded: typeof e.throwOnLimitExceeded == "boolean" ? e.throwOnLimitExceeded : !1
    }
}
  , A3e = function(t, e) {
    var r = C3e(e);
    if (t === "" || t === null || typeof t > "u")
        return r.plainObjects ? {
            __proto__: null
        } : {};
    for (var n = typeof t == "string" ? E3e(t, r) : t, i = r.plainObjects ? {
        __proto__: null
    } : {}, o = Object.keys(n), s = 0; s < o.length; ++s) {
        var a = o[s]
          , l = b3e(a, n[a], r, typeof t == "string");
        i = Ml.merge(i, l, r)
    }
    return r.allowSparse === !0 ? i : Ml.compact(i)
}
  , w3e = g3e
  , B3e = A3e
  , S3e = jC
  , T3e = {
    formats: S3e,
    parse: B3e,
    stringify: w3e
};
const F5e = Vi(T3e);
var bN = {
    exports: {}
};
(function(t, e) {
    (function(n, i) {
        t.exports = i()
    }
    )(typeof self < "u" ? self : er, function() {
        return function(r) {
            var n = {};
            function i(o) {
                if (n[o])
                    return n[o].exports;
                var s = n[o] = {
                    i: o,
                    l: !1,
                    exports: {}
                };
                return r[o].call(s.exports, s, s.exports, i),
                s.l = !0,
                s.exports
            }
            return i.m = r,
            i.c = n,
            i.d = function(o, s, a) {
                i.o(o, s) || Object.defineProperty(o, s, {
                    configurable: !1,
                    enumerable: !0,
                    get: a
                })
            }
            ,
            i.n = function(o) {
                var s = o && o.__esModule ? function() {
                    return o.default
                }
                : function() {
                    return o
                }
                ;
                return i.d(s, "a", s),
                s
            }
            ,
            i.o = function(o, s) {
                return Object.prototype.hasOwnProperty.call(o, s)
            }
            ,
            i.p = "",
            i(i.s = 3)
        }([function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = function() {
                function s(a, l) {
                    this.width = l,
                    this.height = a.length / l,
                    this.data = a
                }
                return s.createEmpty = function(a, l) {
                    return new s(new Uint8ClampedArray(a * l),a)
                }
                ,
                s.prototype.get = function(a, l) {
                    return a < 0 || a >= this.width || l < 0 || l >= this.height ? !1 : !!this.data[l * this.width + a]
                }
                ,
                s.prototype.set = function(a, l, c) {
                    this.data[l * this.width + a] = c ? 1 : 0
                }
                ,
                s.prototype.setRegion = function(a, l, c, u, f) {
                    for (var d = l; d < l + u; d++)
                        for (var h = a; h < a + c; h++)
                            this.set(h, d, !!f)
                }
                ,
                s
            }();
            n.BitMatrix = o
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = i(2);
            function s(l, c) {
                return l ^ c
            }
            n.addOrSubtractGF = s;
            var a = function() {
                function l(c, u, f) {
                    this.primitive = c,
                    this.size = u,
                    this.generatorBase = f,
                    this.expTable = new Array(this.size),
                    this.logTable = new Array(this.size);
                    for (var d = 1, h = 0; h < this.size; h++)
                        this.expTable[h] = d,
                        d = d * 2,
                        d >= this.size && (d = (d ^ this.primitive) & this.size - 1);
                    for (var h = 0; h < this.size - 1; h++)
                        this.logTable[this.expTable[h]] = h;
                    this.zero = new o.default(this,Uint8ClampedArray.from([0])),
                    this.one = new o.default(this,Uint8ClampedArray.from([1]))
                }
                return l.prototype.multiply = function(c, u) {
                    return c === 0 || u === 0 ? 0 : this.expTable[(this.logTable[c] + this.logTable[u]) % (this.size - 1)]
                }
                ,
                l.prototype.inverse = function(c) {
                    if (c === 0)
                        throw new Error("Can't invert 0");
                    return this.expTable[this.size - this.logTable[c] - 1]
                }
                ,
                l.prototype.buildMonomial = function(c, u) {
                    if (c < 0)
                        throw new Error("Invalid monomial degree less than 0");
                    if (u === 0)
                        return this.zero;
                    var f = new Uint8ClampedArray(c + 1);
                    return f[0] = u,
                    new o.default(this,f)
                }
                ,
                l.prototype.log = function(c) {
                    if (c === 0)
                        throw new Error("Can't take log(0)");
                    return this.logTable[c]
                }
                ,
                l.prototype.exp = function(c) {
                    return this.expTable[c]
                }
                ,
                l
            }();
            n.default = a
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = i(1)
              , s = function() {
                function a(l, c) {
                    if (c.length === 0)
                        throw new Error("No coefficients.");
                    this.field = l;
                    var u = c.length;
                    if (u > 1 && c[0] === 0) {
                        for (var f = 1; f < u && c[f] === 0; )
                            f++;
                        if (f === u)
                            this.coefficients = l.zero.coefficients;
                        else {
                            this.coefficients = new Uint8ClampedArray(u - f);
                            for (var d = 0; d < this.coefficients.length; d++)
                                this.coefficients[d] = c[f + d]
                        }
                    } else
                        this.coefficients = c
                }
                return a.prototype.degree = function() {
                    return this.coefficients.length - 1
                }
                ,
                a.prototype.isZero = function() {
                    return this.coefficients[0] === 0
                }
                ,
                a.prototype.getCoefficient = function(l) {
                    return this.coefficients[this.coefficients.length - 1 - l]
                }
                ,
                a.prototype.addOrSubtract = function(l) {
                    var c;
                    if (this.isZero())
                        return l;
                    if (l.isZero())
                        return this;
                    var u = this.coefficients
                      , f = l.coefficients;
                    u.length > f.length && (c = [f, u],
                    u = c[0],
                    f = c[1]);
                    for (var d = new Uint8ClampedArray(f.length), h = f.length - u.length, x = 0; x < h; x++)
                        d[x] = f[x];
                    for (var x = h; x < f.length; x++)
                        d[x] = o.addOrSubtractGF(u[x - h], f[x]);
                    return new a(this.field,d)
                }
                ,
                a.prototype.multiply = function(l) {
                    if (l === 0)
                        return this.field.zero;
                    if (l === 1)
                        return this;
                    for (var c = this.coefficients.length, u = new Uint8ClampedArray(c), f = 0; f < c; f++)
                        u[f] = this.field.multiply(this.coefficients[f], l);
                    return new a(this.field,u)
                }
                ,
                a.prototype.multiplyPoly = function(l) {
                    if (this.isZero() || l.isZero())
                        return this.field.zero;
                    for (var c = this.coefficients, u = c.length, f = l.coefficients, d = f.length, h = new Uint8ClampedArray(u + d - 1), x = 0; x < u; x++)
                        for (var y = c[x], m = 0; m < d; m++)
                            h[x + m] = o.addOrSubtractGF(h[x + m], this.field.multiply(y, f[m]));
                    return new a(this.field,h)
                }
                ,
                a.prototype.multiplyByMonomial = function(l, c) {
                    if (l < 0)
                        throw new Error("Invalid degree less than 0");
                    if (c === 0)
                        return this.field.zero;
                    for (var u = this.coefficients.length, f = new Uint8ClampedArray(u + l), d = 0; d < u; d++)
                        f[d] = this.field.multiply(this.coefficients[d], c);
                    return new a(this.field,f)
                }
                ,
                a.prototype.evaluateAt = function(l) {
                    var c = 0;
                    if (l === 0)
                        return this.getCoefficient(0);
                    var u = this.coefficients.length;
                    if (l === 1)
                        return this.coefficients.forEach(function(d) {
                            c = o.addOrSubtractGF(c, d)
                        }),
                        c;
                    c = this.coefficients[0];
                    for (var f = 1; f < u; f++)
                        c = o.addOrSubtractGF(this.field.multiply(l, c), this.coefficients[f]);
                    return c
                }
                ,
                a
            }();
            n.default = s
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = i(4)
              , s = i(5)
              , a = i(11)
              , l = i(12);
            function c(d) {
                var h = l.locate(d);
                if (!h)
                    return null;
                for (var x = 0, y = h; x < y.length; x++) {
                    var m = y[x]
                      , E = a.extract(d, m)
                      , g = s.decode(E.matrix);
                    if (g)
                        return {
                            binaryData: g.bytes,
                            data: g.text,
                            chunks: g.chunks,
                            version: g.version,
                            location: {
                                topRightCorner: E.mappingFunction(m.dimension, 0),
                                topLeftCorner: E.mappingFunction(0, 0),
                                bottomRightCorner: E.mappingFunction(m.dimension, m.dimension),
                                bottomLeftCorner: E.mappingFunction(0, m.dimension),
                                topRightFinderPattern: m.topRight,
                                topLeftFinderPattern: m.topLeft,
                                bottomLeftFinderPattern: m.bottomLeft,
                                bottomRightAlignmentPattern: m.alignmentPattern
                            }
                        }
                }
                return null
            }
            var u = {
                inversionAttempts: "attemptBoth"
            };
            function f(d, h, x, y) {
                y === void 0 && (y = {});
                var m = u;
                Object.keys(m || {}).forEach(function(C) {
                    m[C] = y[C] || m[C]
                });
                var E = m.inversionAttempts === "attemptBoth" || m.inversionAttempts === "invertFirst"
                  , g = m.inversionAttempts === "onlyInvert" || m.inversionAttempts === "invertFirst"
                  , p = o.binarize(d, h, x, E)
                  , v = p.binarized
                  , _ = p.inverted
                  , b = c(g ? _ : v);
                return !b && (m.inversionAttempts === "attemptBoth" || m.inversionAttempts === "invertFirst") && (b = c(g ? v : _)),
                b
            }
            f.default = f,
            n.default = f
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = i(0)
              , s = 8
              , a = 24;
            function l(f, d, h) {
                return f < d ? d : f > h ? h : f
            }
            var c = function() {
                function f(d, h) {
                    this.width = d,
                    this.data = new Uint8ClampedArray(d * h)
                }
                return f.prototype.get = function(d, h) {
                    return this.data[h * this.width + d]
                }
                ,
                f.prototype.set = function(d, h, x) {
                    this.data[h * this.width + d] = x
                }
                ,
                f
            }();
            function u(f, d, h, x) {
                if (f.length !== d * h * 4)
                    throw new Error("Malformed data passed to binarizer.");
                for (var y = new c(d,h), m = 0; m < d; m++)
                    for (var E = 0; E < h; E++) {
                        var g = f[(E * d + m) * 4 + 0]
                          , p = f[(E * d + m) * 4 + 1]
                          , v = f[(E * d + m) * 4 + 2];
                        y.set(m, E, .2126 * g + .7152 * p + .0722 * v)
                    }
                for (var _ = Math.ceil(d / s), b = Math.ceil(h / s), C = new c(_,b), w = 0; w < b; w++)
                    for (var T = 0; T < _; T++) {
                        for (var A = 0, B = 1 / 0, S = 0, E = 0; E < s; E++)
                            for (var m = 0; m < s; m++) {
                                var D = y.get(T * s + m, w * s + E);
                                A += D,
                                B = Math.min(B, D),
                                S = Math.max(S, D)
                            }
                        var F = A / Math.pow(s, 2);
                        if (S - B <= a && (F = B / 2,
                        w > 0 && T > 0)) {
                            var R = (C.get(T, w - 1) + 2 * C.get(T - 1, w) + C.get(T - 1, w - 1)) / 4;
                            B < R && (F = R)
                        }
                        C.set(T, w, F)
                    }
                var P = o.BitMatrix.createEmpty(d, h)
                  , N = null;
                x && (N = o.BitMatrix.createEmpty(d, h));
                for (var w = 0; w < b; w++)
                    for (var T = 0; T < _; T++) {
                        for (var j = l(T, 2, _ - 3), K = l(w, 2, b - 3), A = 0, oe = -2; oe <= 2; oe++)
                            for (var U = -2; U <= 2; U++)
                                A += C.get(j + oe, K + U);
                        for (var $ = A / 25, oe = 0; oe < s; oe++)
                            for (var U = 0; U < s; U++) {
                                var m = T * s + oe
                                  , E = w * s + U
                                  , V = y.get(m, E);
                                P.set(m, E, V <= $),
                                x && N.set(m, E, !(V <= $))
                            }
                    }
                return x ? {
                    binarized: P,
                    inverted: N
                } : {
                    binarized: P
                }
            }
            n.binarize = u
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = i(0)
              , s = i(6)
              , a = i(9)
              , l = i(10);
            function c(v, _) {
                for (var b = v ^ _, C = 0; b; )
                    C++,
                    b &= b - 1;
                return C
            }
            function u(v, _) {
                return _ << 1 | v
            }
            var f = [{
                bits: 21522,
                formatInfo: {
                    errorCorrectionLevel: 1,
                    dataMask: 0
                }
            }, {
                bits: 20773,
                formatInfo: {
                    errorCorrectionLevel: 1,
                    dataMask: 1
                }
            }, {
                bits: 24188,
                formatInfo: {
                    errorCorrectionLevel: 1,
                    dataMask: 2
                }
            }, {
                bits: 23371,
                formatInfo: {
                    errorCorrectionLevel: 1,
                    dataMask: 3
                }
            }, {
                bits: 17913,
                formatInfo: {
                    errorCorrectionLevel: 1,
                    dataMask: 4
                }
            }, {
                bits: 16590,
                formatInfo: {
                    errorCorrectionLevel: 1,
                    dataMask: 5
                }
            }, {
                bits: 20375,
                formatInfo: {
                    errorCorrectionLevel: 1,
                    dataMask: 6
                }
            }, {
                bits: 19104,
                formatInfo: {
                    errorCorrectionLevel: 1,
                    dataMask: 7
                }
            }, {
                bits: 30660,
                formatInfo: {
                    errorCorrectionLevel: 0,
                    dataMask: 0
                }
            }, {
                bits: 29427,
                formatInfo: {
                    errorCorrectionLevel: 0,
                    dataMask: 1
                }
            }, {
                bits: 32170,
                formatInfo: {
                    errorCorrectionLevel: 0,
                    dataMask: 2
                }
            }, {
                bits: 30877,
                formatInfo: {
                    errorCorrectionLevel: 0,
                    dataMask: 3
                }
            }, {
                bits: 26159,
                formatInfo: {
                    errorCorrectionLevel: 0,
                    dataMask: 4
                }
            }, {
                bits: 25368,
                formatInfo: {
                    errorCorrectionLevel: 0,
                    dataMask: 5
                }
            }, {
                bits: 27713,
                formatInfo: {
                    errorCorrectionLevel: 0,
                    dataMask: 6
                }
            }, {
                bits: 26998,
                formatInfo: {
                    errorCorrectionLevel: 0,
                    dataMask: 7
                }
            }, {
                bits: 5769,
                formatInfo: {
                    errorCorrectionLevel: 3,
                    dataMask: 0
                }
            }, {
                bits: 5054,
                formatInfo: {
                    errorCorrectionLevel: 3,
                    dataMask: 1
                }
            }, {
                bits: 7399,
                formatInfo: {
                    errorCorrectionLevel: 3,
                    dataMask: 2
                }
            }, {
                bits: 6608,
                formatInfo: {
                    errorCorrectionLevel: 3,
                    dataMask: 3
                }
            }, {
                bits: 1890,
                formatInfo: {
                    errorCorrectionLevel: 3,
                    dataMask: 4
                }
            }, {
                bits: 597,
                formatInfo: {
                    errorCorrectionLevel: 3,
                    dataMask: 5
                }
            }, {
                bits: 3340,
                formatInfo: {
                    errorCorrectionLevel: 3,
                    dataMask: 6
                }
            }, {
                bits: 2107,
                formatInfo: {
                    errorCorrectionLevel: 3,
                    dataMask: 7
                }
            }, {
                bits: 13663,
                formatInfo: {
                    errorCorrectionLevel: 2,
                    dataMask: 0
                }
            }, {
                bits: 12392,
                formatInfo: {
                    errorCorrectionLevel: 2,
                    dataMask: 1
                }
            }, {
                bits: 16177,
                formatInfo: {
                    errorCorrectionLevel: 2,
                    dataMask: 2
                }
            }, {
                bits: 14854,
                formatInfo: {
                    errorCorrectionLevel: 2,
                    dataMask: 3
                }
            }, {
                bits: 9396,
                formatInfo: {
                    errorCorrectionLevel: 2,
                    dataMask: 4
                }
            }, {
                bits: 8579,
                formatInfo: {
                    errorCorrectionLevel: 2,
                    dataMask: 5
                }
            }, {
                bits: 11994,
                formatInfo: {
                    errorCorrectionLevel: 2,
                    dataMask: 6
                }
            }, {
                bits: 11245,
                formatInfo: {
                    errorCorrectionLevel: 2,
                    dataMask: 7
                }
            }]
              , d = [function(v) {
                return (v.y + v.x) % 2 === 0
            }
            , function(v) {
                return v.y % 2 === 0
            }
            , function(v) {
                return v.x % 3 === 0
            }
            , function(v) {
                return (v.y + v.x) % 3 === 0
            }
            , function(v) {
                return (Math.floor(v.y / 2) + Math.floor(v.x / 3)) % 2 === 0
            }
            , function(v) {
                return v.x * v.y % 2 + v.x * v.y % 3 === 0
            }
            , function(v) {
                return (v.y * v.x % 2 + v.y * v.x % 3) % 2 === 0
            }
            , function(v) {
                return ((v.y + v.x) % 2 + v.y * v.x % 3) % 2 === 0
            }
            ];
            function h(v) {
                var _ = 17 + 4 * v.versionNumber
                  , b = o.BitMatrix.createEmpty(_, _);
                b.setRegion(0, 0, 9, 9, !0),
                b.setRegion(_ - 8, 0, 8, 9, !0),
                b.setRegion(0, _ - 8, 9, 8, !0);
                for (var C = 0, w = v.alignmentPatternCenters; C < w.length; C++)
                    for (var T = w[C], A = 0, B = v.alignmentPatternCenters; A < B.length; A++) {
                        var S = B[A];
                        T === 6 && S === 6 || T === 6 && S === _ - 7 || T === _ - 7 && S === 6 || b.setRegion(T - 2, S - 2, 5, 5, !0)
                    }
                return b.setRegion(6, 9, 1, _ - 17, !0),
                b.setRegion(9, 6, _ - 17, 1, !0),
                v.versionNumber > 6 && (b.setRegion(_ - 11, 0, 3, 6, !0),
                b.setRegion(0, _ - 11, 6, 3, !0)),
                b
            }
            function x(v, _, b) {
                for (var C = d[b.dataMask], w = v.height, T = h(_), A = [], B = 0, S = 0, D = !0, F = w - 1; F > 0; F -= 2) {
                    F === 6 && F--;
                    for (var R = 0; R < w; R++)
                        for (var P = D ? w - 1 - R : R, N = 0; N < 2; N++) {
                            var j = F - N;
                            if (!T.get(j, P)) {
                                S++;
                                var K = v.get(j, P);
                                C({
                                    y: P,
                                    x: j
                                }) && (K = !K),
                                B = u(K, B),
                                S === 8 && (A.push(B),
                                S = 0,
                                B = 0)
                            }
                        }
                    D = !D
                }
                return A
            }
            function y(v) {
                var _ = v.height
                  , b = Math.floor((_ - 17) / 4);
                if (b <= 6)
                    return l.VERSIONS[b - 1];
                for (var C = 0, w = 5; w >= 0; w--)
                    for (var T = _ - 9; T >= _ - 11; T--)
                        C = u(v.get(T, w), C);
                for (var A = 0, T = 5; T >= 0; T--)
                    for (var w = _ - 9; w >= _ - 11; w--)
                        A = u(v.get(T, w), A);
                for (var B = 1 / 0, S, D = 0, F = l.VERSIONS; D < F.length; D++) {
                    var R = F[D];
                    if (R.infoBits === C || R.infoBits === A)
                        return R;
                    var P = c(C, R.infoBits);
                    P < B && (S = R,
                    B = P),
                    P = c(A, R.infoBits),
                    P < B && (S = R,
                    B = P)
                }
                if (B <= 3)
                    return S
            }
            function m(v) {
                for (var _ = 0, b = 0; b <= 8; b++)
                    b !== 6 && (_ = u(v.get(b, 8), _));
                for (var C = 7; C >= 0; C--)
                    C !== 6 && (_ = u(v.get(8, C), _));
                for (var w = v.height, T = 0, C = w - 1; C >= w - 7; C--)
                    T = u(v.get(8, C), T);
                for (var b = w - 8; b < w; b++)
                    T = u(v.get(b, 8), T);
                for (var A = 1 / 0, B = null, S = 0, D = f; S < D.length; S++) {
                    var F = D[S]
                      , R = F.bits
                      , P = F.formatInfo;
                    if (R === _ || R === T)
                        return P;
                    var N = c(_, R);
                    N < A && (B = P,
                    A = N),
                    _ !== T && (N = c(T, R),
                    N < A && (B = P,
                    A = N))
                }
                return A <= 3 ? B : null
            }
            function E(v, _, b) {
                var C = _.errorCorrectionLevels[b]
                  , w = []
                  , T = 0;
                if (C.ecBlocks.forEach(function(K) {
                    for (var oe = 0; oe < K.numBlocks; oe++)
                        w.push({
                            numDataCodewords: K.dataCodewordsPerBlock,
                            codewords: []
                        }),
                        T += K.dataCodewordsPerBlock + C.ecCodewordsPerBlock
                }),
                v.length < T)
                    return null;
                v = v.slice(0, T);
                for (var A = C.ecBlocks[0].dataCodewordsPerBlock, B = 0; B < A; B++)
                    for (var S = 0, D = w; S < D.length; S++) {
                        var F = D[S];
                        F.codewords.push(v.shift())
                    }
                if (C.ecBlocks.length > 1)
                    for (var R = C.ecBlocks[0].numBlocks, P = C.ecBlocks[1].numBlocks, B = 0; B < P; B++)
                        w[R + B].codewords.push(v.shift());
                for (; v.length > 0; )
                    for (var N = 0, j = w; N < j.length; N++) {
                        var F = j[N];
                        F.codewords.push(v.shift())
                    }
                return w
            }
            function g(v) {
                var _ = y(v);
                if (!_)
                    return null;
                var b = m(v);
                if (!b)
                    return null;
                var C = x(v, _, b)
                  , w = E(C, _, b.errorCorrectionLevel);
                if (!w)
                    return null;
                for (var T = w.reduce(function(N, j) {
                    return N + j.numDataCodewords
                }, 0), A = new Uint8ClampedArray(T), B = 0, S = 0, D = w; S < D.length; S++) {
                    var F = D[S]
                      , R = a.decode(F.codewords, F.codewords.length - F.numDataCodewords);
                    if (!R)
                        return null;
                    for (var P = 0; P < F.numDataCodewords; P++)
                        A[B++] = R[P]
                }
                try {
                    return s.decode(A, _.versionNumber)
                } catch {
                    return null
                }
            }
            function p(v) {
                if (v == null)
                    return null;
                var _ = g(v);
                if (_)
                    return _;
                for (var b = 0; b < v.width; b++)
                    for (var C = b + 1; C < v.height; C++)
                        v.get(b, C) !== v.get(C, b) && (v.set(b, C, !v.get(b, C)),
                        v.set(C, b, !v.get(C, b)));
                return g(v)
            }
            n.decode = p
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = i(7), s = i(8), a;
            (function(y) {
                y.Numeric = "numeric",
                y.Alphanumeric = "alphanumeric",
                y.Byte = "byte",
                y.Kanji = "kanji",
                y.ECI = "eci"
            }
            )(a = n.Mode || (n.Mode = {}));
            var l;
            (function(y) {
                y[y.Terminator = 0] = "Terminator",
                y[y.Numeric = 1] = "Numeric",
                y[y.Alphanumeric = 2] = "Alphanumeric",
                y[y.Byte = 4] = "Byte",
                y[y.Kanji = 8] = "Kanji",
                y[y.ECI = 7] = "ECI"
            }
            )(l || (l = {}));
            function c(y, m) {
                for (var E = [], g = "", p = [10, 12, 14][m], v = y.readBits(p); v >= 3; ) {
                    var _ = y.readBits(10);
                    if (_ >= 1e3)
                        throw new Error("Invalid numeric value above 999");
                    var b = Math.floor(_ / 100)
                      , C = Math.floor(_ / 10) % 10
                      , w = _ % 10;
                    E.push(48 + b, 48 + C, 48 + w),
                    g += b.toString() + C.toString() + w.toString(),
                    v -= 3
                }
                if (v === 2) {
                    var _ = y.readBits(7);
                    if (_ >= 100)
                        throw new Error("Invalid numeric value above 99");
                    var b = Math.floor(_ / 10)
                      , C = _ % 10;
                    E.push(48 + b, 48 + C),
                    g += b.toString() + C.toString()
                } else if (v === 1) {
                    var _ = y.readBits(4);
                    if (_ >= 10)
                        throw new Error("Invalid numeric value above 9");
                    E.push(48 + _),
                    g += _.toString()
                }
                return {
                    bytes: E,
                    text: g
                }
            }
            var u = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", " ", "$", "%", "*", "+", "-", ".", "/", ":"];
            function f(y, m) {
                for (var E = [], g = "", p = [9, 11, 13][m], v = y.readBits(p); v >= 2; ) {
                    var _ = y.readBits(11)
                      , b = Math.floor(_ / 45)
                      , C = _ % 45;
                    E.push(u[b].charCodeAt(0), u[C].charCodeAt(0)),
                    g += u[b] + u[C],
                    v -= 2
                }
                if (v === 1) {
                    var b = y.readBits(6);
                    E.push(u[b].charCodeAt(0)),
                    g += u[b]
                }
                return {
                    bytes: E,
                    text: g
                }
            }
            function d(y, m) {
                for (var E = [], g = "", p = [8, 16, 16][m], v = y.readBits(p), _ = 0; _ < v; _++) {
                    var b = y.readBits(8);
                    E.push(b)
                }
                try {
                    g += decodeURIComponent(E.map(function(C) {
                        return "%" + ("0" + C.toString(16)).substr(-2)
                    }).join(""))
                } catch {}
                return {
                    bytes: E,
                    text: g
                }
            }
            function h(y, m) {
                for (var E = [], g = "", p = [8, 10, 12][m], v = y.readBits(p), _ = 0; _ < v; _++) {
                    var b = y.readBits(13)
                      , C = Math.floor(b / 192) << 8 | b % 192;
                    C < 7936 ? C += 33088 : C += 49472,
                    E.push(C >> 8, C & 255),
                    g += String.fromCharCode(s.shiftJISTable[C])
                }
                return {
                    bytes: E,
                    text: g
                }
            }
            function x(y, m) {
                for (var E, g, p, v, _ = new o.BitStream(y), b = m <= 9 ? 0 : m <= 26 ? 1 : 2, C = {
                    text: "",
                    bytes: [],
                    chunks: [],
                    version: m
                }; _.available() >= 4; ) {
                    var w = _.readBits(4);
                    if (w === l.Terminator)
                        return C;
                    if (w === l.ECI)
                        _.readBits(1) === 0 ? C.chunks.push({
                            type: a.ECI,
                            assignmentNumber: _.readBits(7)
                        }) : _.readBits(1) === 0 ? C.chunks.push({
                            type: a.ECI,
                            assignmentNumber: _.readBits(14)
                        }) : _.readBits(1) === 0 ? C.chunks.push({
                            type: a.ECI,
                            assignmentNumber: _.readBits(21)
                        }) : C.chunks.push({
                            type: a.ECI,
                            assignmentNumber: -1
                        });
                    else if (w === l.Numeric) {
                        var T = c(_, b);
                        C.text += T.text,
                        (E = C.bytes).push.apply(E, T.bytes),
                        C.chunks.push({
                            type: a.Numeric,
                            text: T.text
                        })
                    } else if (w === l.Alphanumeric) {
                        var A = f(_, b);
                        C.text += A.text,
                        (g = C.bytes).push.apply(g, A.bytes),
                        C.chunks.push({
                            type: a.Alphanumeric,
                            text: A.text
                        })
                    } else if (w === l.Byte) {
                        var B = d(_, b);
                        C.text += B.text,
                        (p = C.bytes).push.apply(p, B.bytes),
                        C.chunks.push({
                            type: a.Byte,
                            bytes: B.bytes,
                            text: B.text
                        })
                    } else if (w === l.Kanji) {
                        var S = h(_, b);
                        C.text += S.text,
                        (v = C.bytes).push.apply(v, S.bytes),
                        C.chunks.push({
                            type: a.Kanji,
                            bytes: S.bytes,
                            text: S.text
                        })
                    }
                }
                if (_.available() === 0 || _.readBits(_.available()) === 0)
                    return C
            }
            n.decode = x
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = function() {
                function s(a) {
                    this.byteOffset = 0,
                    this.bitOffset = 0,
                    this.bytes = a
                }
                return s.prototype.readBits = function(a) {
                    if (a < 1 || a > 32 || a > this.available())
                        throw new Error("Cannot read " + a.toString() + " bits");
                    var l = 0;
                    if (this.bitOffset > 0) {
                        var c = 8 - this.bitOffset
                          , u = a < c ? a : c
                          , f = c - u
                          , d = 255 >> 8 - u << f;
                        l = (this.bytes[this.byteOffset] & d) >> f,
                        a -= u,
                        this.bitOffset += u,
                        this.bitOffset === 8 && (this.bitOffset = 0,
                        this.byteOffset++)
                    }
                    if (a > 0) {
                        for (; a >= 8; )
                            l = l << 8 | this.bytes[this.byteOffset] & 255,
                            this.byteOffset++,
                            a -= 8;
                        if (a > 0) {
                            var f = 8 - a
                              , d = 255 >> f << f;
                            l = l << a | (this.bytes[this.byteOffset] & d) >> f,
                            this.bitOffset += a
                        }
                    }
                    return l
                }
                ,
                s.prototype.available = function() {
                    return 8 * (this.bytes.length - this.byteOffset) - this.bitOffset
                }
                ,
                s
            }();
            n.BitStream = o
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            }),
            n.shiftJISTable = {
                32: 32,
                33: 33,
                34: 34,
                35: 35,
                36: 36,
                37: 37,
                38: 38,
                39: 39,
                40: 40,
                41: 41,
                42: 42,
                43: 43,
                44: 44,
                45: 45,
                46: 46,
                47: 47,
                48: 48,
                49: 49,
                50: 50,
                51: 51,
                52: 52,
                53: 53,
                54: 54,
                55: 55,
                56: 56,
                57: 57,
                58: 58,
                59: 59,
                60: 60,
                61: 61,
                62: 62,
                63: 63,
                64: 64,
                65: 65,
                66: 66,
                67: 67,
                68: 68,
                69: 69,
                70: 70,
                71: 71,
                72: 72,
                73: 73,
                74: 74,
                75: 75,
                76: 76,
                77: 77,
                78: 78,
                79: 79,
                80: 80,
                81: 81,
                82: 82,
                83: 83,
                84: 84,
                85: 85,
                86: 86,
                87: 87,
                88: 88,
                89: 89,
                90: 90,
                91: 91,
                92: 165,
                93: 93,
                94: 94,
                95: 95,
                96: 96,
                97: 97,
                98: 98,
                99: 99,
                100: 100,
                101: 101,
                102: 102,
                103: 103,
                104: 104,
                105: 105,
                106: 106,
                107: 107,
                108: 108,
                109: 109,
                110: 110,
                111: 111,
                112: 112,
                113: 113,
                114: 114,
                115: 115,
                116: 116,
                117: 117,
                118: 118,
                119: 119,
                120: 120,
                121: 121,
                122: 122,
                123: 123,
                124: 124,
                125: 125,
                126: 8254,
                33088: 12288,
                33089: 12289,
                33090: 12290,
                33091: 65292,
                33092: 65294,
                33093: 12539,
                33094: 65306,
                33095: 65307,
                33096: 65311,
                33097: 65281,
                33098: 12443,
                33099: 12444,
                33100: 180,
                33101: 65344,
                33102: 168,
                33103: 65342,
                33104: 65507,
                33105: 65343,
                33106: 12541,
                33107: 12542,
                33108: 12445,
                33109: 12446,
                33110: 12291,
                33111: 20189,
                33112: 12293,
                33113: 12294,
                33114: 12295,
                33115: 12540,
                33116: 8213,
                33117: 8208,
                33118: 65295,
                33119: 92,
                33120: 12316,
                33121: 8214,
                33122: 65372,
                33123: 8230,
                33124: 8229,
                33125: 8216,
                33126: 8217,
                33127: 8220,
                33128: 8221,
                33129: 65288,
                33130: 65289,
                33131: 12308,
                33132: 12309,
                33133: 65339,
                33134: 65341,
                33135: 65371,
                33136: 65373,
                33137: 12296,
                33138: 12297,
                33139: 12298,
                33140: 12299,
                33141: 12300,
                33142: 12301,
                33143: 12302,
                33144: 12303,
                33145: 12304,
                33146: 12305,
                33147: 65291,
                33148: 8722,
                33149: 177,
                33150: 215,
                33152: 247,
                33153: 65309,
                33154: 8800,
                33155: 65308,
                33156: 65310,
                33157: 8806,
                33158: 8807,
                33159: 8734,
                33160: 8756,
                33161: 9794,
                33162: 9792,
                33163: 176,
                33164: 8242,
                33165: 8243,
                33166: 8451,
                33167: 65509,
                33168: 65284,
                33169: 162,
                33170: 163,
                33171: 65285,
                33172: 65283,
                33173: 65286,
                33174: 65290,
                33175: 65312,
                33176: 167,
                33177: 9734,
                33178: 9733,
                33179: 9675,
                33180: 9679,
                33181: 9678,
                33182: 9671,
                33183: 9670,
                33184: 9633,
                33185: 9632,
                33186: 9651,
                33187: 9650,
                33188: 9661,
                33189: 9660,
                33190: 8251,
                33191: 12306,
                33192: 8594,
                33193: 8592,
                33194: 8593,
                33195: 8595,
                33196: 12307,
                33208: 8712,
                33209: 8715,
                33210: 8838,
                33211: 8839,
                33212: 8834,
                33213: 8835,
                33214: 8746,
                33215: 8745,
                33224: 8743,
                33225: 8744,
                33226: 172,
                33227: 8658,
                33228: 8660,
                33229: 8704,
                33230: 8707,
                33242: 8736,
                33243: 8869,
                33244: 8978,
                33245: 8706,
                33246: 8711,
                33247: 8801,
                33248: 8786,
                33249: 8810,
                33250: 8811,
                33251: 8730,
                33252: 8765,
                33253: 8733,
                33254: 8757,
                33255: 8747,
                33256: 8748,
                33264: 8491,
                33265: 8240,
                33266: 9839,
                33267: 9837,
                33268: 9834,
                33269: 8224,
                33270: 8225,
                33271: 182,
                33276: 9711,
                33359: 65296,
                33360: 65297,
                33361: 65298,
                33362: 65299,
                33363: 65300,
                33364: 65301,
                33365: 65302,
                33366: 65303,
                33367: 65304,
                33368: 65305,
                33376: 65313,
                33377: 65314,
                33378: 65315,
                33379: 65316,
                33380: 65317,
                33381: 65318,
                33382: 65319,
                33383: 65320,
                33384: 65321,
                33385: 65322,
                33386: 65323,
                33387: 65324,
                33388: 65325,
                33389: 65326,
                33390: 65327,
                33391: 65328,
                33392: 65329,
                33393: 65330,
                33394: 65331,
                33395: 65332,
                33396: 65333,
                33397: 65334,
                33398: 65335,
                33399: 65336,
                33400: 65337,
                33401: 65338,
                33409: 65345,
                33410: 65346,
                33411: 65347,
                33412: 65348,
                33413: 65349,
                33414: 65350,
                33415: 65351,
                33416: 65352,
                33417: 65353,
                33418: 65354,
                33419: 65355,
                33420: 65356,
                33421: 65357,
                33422: 65358,
                33423: 65359,
                33424: 65360,
                33425: 65361,
                33426: 65362,
                33427: 65363,
                33428: 65364,
                33429: 65365,
                33430: 65366,
                33431: 65367,
                33432: 65368,
                33433: 65369,
                33434: 65370,
                33439: 12353,
                33440: 12354,
                33441: 12355,
                33442: 12356,
                33443: 12357,
                33444: 12358,
                33445: 12359,
                33446: 12360,
                33447: 12361,
                33448: 12362,
                33449: 12363,
                33450: 12364,
                33451: 12365,
                33452: 12366,
                33453: 12367,
                33454: 12368,
                33455: 12369,
                33456: 12370,
                33457: 12371,
                33458: 12372,
                33459: 12373,
                33460: 12374,
                33461: 12375,
                33462: 12376,
                33463: 12377,
                33464: 12378,
                33465: 12379,
                33466: 12380,
                33467: 12381,
                33468: 12382,
                33469: 12383,
                33470: 12384,
                33471: 12385,
                33472: 12386,
                33473: 12387,
                33474: 12388,
                33475: 12389,
                33476: 12390,
                33477: 12391,
                33478: 12392,
                33479: 12393,
                33480: 12394,
                33481: 12395,
                33482: 12396,
                33483: 12397,
                33484: 12398,
                33485: 12399,
                33486: 12400,
                33487: 12401,
                33488: 12402,
                33489: 12403,
                33490: 12404,
                33491: 12405,
                33492: 12406,
                33493: 12407,
                33494: 12408,
                33495: 12409,
                33496: 12410,
                33497: 12411,
                33498: 12412,
                33499: 12413,
                33500: 12414,
                33501: 12415,
                33502: 12416,
                33503: 12417,
                33504: 12418,
                33505: 12419,
                33506: 12420,
                33507: 12421,
                33508: 12422,
                33509: 12423,
                33510: 12424,
                33511: 12425,
                33512: 12426,
                33513: 12427,
                33514: 12428,
                33515: 12429,
                33516: 12430,
                33517: 12431,
                33518: 12432,
                33519: 12433,
                33520: 12434,
                33521: 12435,
                33600: 12449,
                33601: 12450,
                33602: 12451,
                33603: 12452,
                33604: 12453,
                33605: 12454,
                33606: 12455,
                33607: 12456,
                33608: 12457,
                33609: 12458,
                33610: 12459,
                33611: 12460,
                33612: 12461,
                33613: 12462,
                33614: 12463,
                33615: 12464,
                33616: 12465,
                33617: 12466,
                33618: 12467,
                33619: 12468,
                33620: 12469,
                33621: 12470,
                33622: 12471,
                33623: 12472,
                33624: 12473,
                33625: 12474,
                33626: 12475,
                33627: 12476,
                33628: 12477,
                33629: 12478,
                33630: 12479,
                33631: 12480,
                33632: 12481,
                33633: 12482,
                33634: 12483,
                33635: 12484,
                33636: 12485,
                33637: 12486,
                33638: 12487,
                33639: 12488,
                33640: 12489,
                33641: 12490,
                33642: 12491,
                33643: 12492,
                33644: 12493,
                33645: 12494,
                33646: 12495,
                33647: 12496,
                33648: 12497,
                33649: 12498,
                33650: 12499,
                33651: 12500,
                33652: 12501,
                33653: 12502,
                33654: 12503,
                33655: 12504,
                33656: 12505,
                33657: 12506,
                33658: 12507,
                33659: 12508,
                33660: 12509,
                33661: 12510,
                33662: 12511,
                33664: 12512,
                33665: 12513,
                33666: 12514,
                33667: 12515,
                33668: 12516,
                33669: 12517,
                33670: 12518,
                33671: 12519,
                33672: 12520,
                33673: 12521,
                33674: 12522,
                33675: 12523,
                33676: 12524,
                33677: 12525,
                33678: 12526,
                33679: 12527,
                33680: 12528,
                33681: 12529,
                33682: 12530,
                33683: 12531,
                33684: 12532,
                33685: 12533,
                33686: 12534,
                33695: 913,
                33696: 914,
                33697: 915,
                33698: 916,
                33699: 917,
                33700: 918,
                33701: 919,
                33702: 920,
                33703: 921,
                33704: 922,
                33705: 923,
                33706: 924,
                33707: 925,
                33708: 926,
                33709: 927,
                33710: 928,
                33711: 929,
                33712: 931,
                33713: 932,
                33714: 933,
                33715: 934,
                33716: 935,
                33717: 936,
                33718: 937,
                33727: 945,
                33728: 946,
                33729: 947,
                33730: 948,
                33731: 949,
                33732: 950,
                33733: 951,
                33734: 952,
                33735: 953,
                33736: 954,
                33737: 955,
                33738: 956,
                33739: 957,
                33740: 958,
                33741: 959,
                33742: 960,
                33743: 961,
                33744: 963,
                33745: 964,
                33746: 965,
                33747: 966,
                33748: 967,
                33749: 968,
                33750: 969,
                33856: 1040,
                33857: 1041,
                33858: 1042,
                33859: 1043,
                33860: 1044,
                33861: 1045,
                33862: 1025,
                33863: 1046,
                33864: 1047,
                33865: 1048,
                33866: 1049,
                33867: 1050,
                33868: 1051,
                33869: 1052,
                33870: 1053,
                33871: 1054,
                33872: 1055,
                33873: 1056,
                33874: 1057,
                33875: 1058,
                33876: 1059,
                33877: 1060,
                33878: 1061,
                33879: 1062,
                33880: 1063,
                33881: 1064,
                33882: 1065,
                33883: 1066,
                33884: 1067,
                33885: 1068,
                33886: 1069,
                33887: 1070,
                33888: 1071,
                33904: 1072,
                33905: 1073,
                33906: 1074,
                33907: 1075,
                33908: 1076,
                33909: 1077,
                33910: 1105,
                33911: 1078,
                33912: 1079,
                33913: 1080,
                33914: 1081,
                33915: 1082,
                33916: 1083,
                33917: 1084,
                33918: 1085,
                33920: 1086,
                33921: 1087,
                33922: 1088,
                33923: 1089,
                33924: 1090,
                33925: 1091,
                33926: 1092,
                33927: 1093,
                33928: 1094,
                33929: 1095,
                33930: 1096,
                33931: 1097,
                33932: 1098,
                33933: 1099,
                33934: 1100,
                33935: 1101,
                33936: 1102,
                33937: 1103,
                33951: 9472,
                33952: 9474,
                33953: 9484,
                33954: 9488,
                33955: 9496,
                33956: 9492,
                33957: 9500,
                33958: 9516,
                33959: 9508,
                33960: 9524,
                33961: 9532,
                33962: 9473,
                33963: 9475,
                33964: 9487,
                33965: 9491,
                33966: 9499,
                33967: 9495,
                33968: 9507,
                33969: 9523,
                33970: 9515,
                33971: 9531,
                33972: 9547,
                33973: 9504,
                33974: 9519,
                33975: 9512,
                33976: 9527,
                33977: 9535,
                33978: 9501,
                33979: 9520,
                33980: 9509,
                33981: 9528,
                33982: 9538,
                34975: 20124,
                34976: 21782,
                34977: 23043,
                34978: 38463,
                34979: 21696,
                34980: 24859,
                34981: 25384,
                34982: 23030,
                34983: 36898,
                34984: 33909,
                34985: 33564,
                34986: 31312,
                34987: 24746,
                34988: 25569,
                34989: 28197,
                34990: 26093,
                34991: 33894,
                34992: 33446,
                34993: 39925,
                34994: 26771,
                34995: 22311,
                34996: 26017,
                34997: 25201,
                34998: 23451,
                34999: 22992,
                35e3: 34427,
                35001: 39156,
                35002: 32098,
                35003: 32190,
                35004: 39822,
                35005: 25110,
                35006: 31903,
                35007: 34999,
                35008: 23433,
                35009: 24245,
                35010: 25353,
                35011: 26263,
                35012: 26696,
                35013: 38343,
                35014: 38797,
                35015: 26447,
                35016: 20197,
                35017: 20234,
                35018: 20301,
                35019: 20381,
                35020: 20553,
                35021: 22258,
                35022: 22839,
                35023: 22996,
                35024: 23041,
                35025: 23561,
                35026: 24799,
                35027: 24847,
                35028: 24944,
                35029: 26131,
                35030: 26885,
                35031: 28858,
                35032: 30031,
                35033: 30064,
                35034: 31227,
                35035: 32173,
                35036: 32239,
                35037: 32963,
                35038: 33806,
                35039: 34915,
                35040: 35586,
                35041: 36949,
                35042: 36986,
                35043: 21307,
                35044: 20117,
                35045: 20133,
                35046: 22495,
                35047: 32946,
                35048: 37057,
                35049: 30959,
                35050: 19968,
                35051: 22769,
                35052: 28322,
                35053: 36920,
                35054: 31282,
                35055: 33576,
                35056: 33419,
                35057: 39983,
                35058: 20801,
                35059: 21360,
                35060: 21693,
                35061: 21729,
                35062: 22240,
                35063: 23035,
                35064: 24341,
                35065: 39154,
                35066: 28139,
                35067: 32996,
                35068: 34093,
                35136: 38498,
                35137: 38512,
                35138: 38560,
                35139: 38907,
                35140: 21515,
                35141: 21491,
                35142: 23431,
                35143: 28879,
                35144: 32701,
                35145: 36802,
                35146: 38632,
                35147: 21359,
                35148: 40284,
                35149: 31418,
                35150: 19985,
                35151: 30867,
                35152: 33276,
                35153: 28198,
                35154: 22040,
                35155: 21764,
                35156: 27421,
                35157: 34074,
                35158: 39995,
                35159: 23013,
                35160: 21417,
                35161: 28006,
                35162: 29916,
                35163: 38287,
                35164: 22082,
                35165: 20113,
                35166: 36939,
                35167: 38642,
                35168: 33615,
                35169: 39180,
                35170: 21473,
                35171: 21942,
                35172: 23344,
                35173: 24433,
                35174: 26144,
                35175: 26355,
                35176: 26628,
                35177: 27704,
                35178: 27891,
                35179: 27945,
                35180: 29787,
                35181: 30408,
                35182: 31310,
                35183: 38964,
                35184: 33521,
                35185: 34907,
                35186: 35424,
                35187: 37613,
                35188: 28082,
                35189: 30123,
                35190: 30410,
                35191: 39365,
                35192: 24742,
                35193: 35585,
                35194: 36234,
                35195: 38322,
                35196: 27022,
                35197: 21421,
                35198: 20870,
                35200: 22290,
                35201: 22576,
                35202: 22852,
                35203: 23476,
                35204: 24310,
                35205: 24616,
                35206: 25513,
                35207: 25588,
                35208: 27839,
                35209: 28436,
                35210: 28814,
                35211: 28948,
                35212: 29017,
                35213: 29141,
                35214: 29503,
                35215: 32257,
                35216: 33398,
                35217: 33489,
                35218: 34199,
                35219: 36960,
                35220: 37467,
                35221: 40219,
                35222: 22633,
                35223: 26044,
                35224: 27738,
                35225: 29989,
                35226: 20985,
                35227: 22830,
                35228: 22885,
                35229: 24448,
                35230: 24540,
                35231: 25276,
                35232: 26106,
                35233: 27178,
                35234: 27431,
                35235: 27572,
                35236: 29579,
                35237: 32705,
                35238: 35158,
                35239: 40236,
                35240: 40206,
                35241: 40644,
                35242: 23713,
                35243: 27798,
                35244: 33659,
                35245: 20740,
                35246: 23627,
                35247: 25014,
                35248: 33222,
                35249: 26742,
                35250: 29281,
                35251: 20057,
                35252: 20474,
                35253: 21368,
                35254: 24681,
                35255: 28201,
                35256: 31311,
                35257: 38899,
                35258: 19979,
                35259: 21270,
                35260: 20206,
                35261: 20309,
                35262: 20285,
                35263: 20385,
                35264: 20339,
                35265: 21152,
                35266: 21487,
                35267: 22025,
                35268: 22799,
                35269: 23233,
                35270: 23478,
                35271: 23521,
                35272: 31185,
                35273: 26247,
                35274: 26524,
                35275: 26550,
                35276: 27468,
                35277: 27827,
                35278: 28779,
                35279: 29634,
                35280: 31117,
                35281: 31166,
                35282: 31292,
                35283: 31623,
                35284: 33457,
                35285: 33499,
                35286: 33540,
                35287: 33655,
                35288: 33775,
                35289: 33747,
                35290: 34662,
                35291: 35506,
                35292: 22057,
                35293: 36008,
                35294: 36838,
                35295: 36942,
                35296: 38686,
                35297: 34442,
                35298: 20420,
                35299: 23784,
                35300: 25105,
                35301: 29273,
                35302: 30011,
                35303: 33253,
                35304: 33469,
                35305: 34558,
                35306: 36032,
                35307: 38597,
                35308: 39187,
                35309: 39381,
                35310: 20171,
                35311: 20250,
                35312: 35299,
                35313: 22238,
                35314: 22602,
                35315: 22730,
                35316: 24315,
                35317: 24555,
                35318: 24618,
                35319: 24724,
                35320: 24674,
                35321: 25040,
                35322: 25106,
                35323: 25296,
                35324: 25913,
                35392: 39745,
                35393: 26214,
                35394: 26800,
                35395: 28023,
                35396: 28784,
                35397: 30028,
                35398: 30342,
                35399: 32117,
                35400: 33445,
                35401: 34809,
                35402: 38283,
                35403: 38542,
                35404: 35997,
                35405: 20977,
                35406: 21182,
                35407: 22806,
                35408: 21683,
                35409: 23475,
                35410: 23830,
                35411: 24936,
                35412: 27010,
                35413: 28079,
                35414: 30861,
                35415: 33995,
                35416: 34903,
                35417: 35442,
                35418: 37799,
                35419: 39608,
                35420: 28012,
                35421: 39336,
                35422: 34521,
                35423: 22435,
                35424: 26623,
                35425: 34510,
                35426: 37390,
                35427: 21123,
                35428: 22151,
                35429: 21508,
                35430: 24275,
                35431: 25313,
                35432: 25785,
                35433: 26684,
                35434: 26680,
                35435: 27579,
                35436: 29554,
                35437: 30906,
                35438: 31339,
                35439: 35226,
                35440: 35282,
                35441: 36203,
                35442: 36611,
                35443: 37101,
                35444: 38307,
                35445: 38548,
                35446: 38761,
                35447: 23398,
                35448: 23731,
                35449: 27005,
                35450: 38989,
                35451: 38990,
                35452: 25499,
                35453: 31520,
                35454: 27179,
                35456: 27263,
                35457: 26806,
                35458: 39949,
                35459: 28511,
                35460: 21106,
                35461: 21917,
                35462: 24688,
                35463: 25324,
                35464: 27963,
                35465: 28167,
                35466: 28369,
                35467: 33883,
                35468: 35088,
                35469: 36676,
                35470: 19988,
                35471: 39993,
                35472: 21494,
                35473: 26907,
                35474: 27194,
                35475: 38788,
                35476: 26666,
                35477: 20828,
                35478: 31427,
                35479: 33970,
                35480: 37340,
                35481: 37772,
                35482: 22107,
                35483: 40232,
                35484: 26658,
                35485: 33541,
                35486: 33841,
                35487: 31909,
                35488: 21e3,
                35489: 33477,
                35490: 29926,
                35491: 20094,
                35492: 20355,
                35493: 20896,
                35494: 23506,
                35495: 21002,
                35496: 21208,
                35497: 21223,
                35498: 24059,
                35499: 21914,
                35500: 22570,
                35501: 23014,
                35502: 23436,
                35503: 23448,
                35504: 23515,
                35505: 24178,
                35506: 24185,
                35507: 24739,
                35508: 24863,
                35509: 24931,
                35510: 25022,
                35511: 25563,
                35512: 25954,
                35513: 26577,
                35514: 26707,
                35515: 26874,
                35516: 27454,
                35517: 27475,
                35518: 27735,
                35519: 28450,
                35520: 28567,
                35521: 28485,
                35522: 29872,
                35523: 29976,
                35524: 30435,
                35525: 30475,
                35526: 31487,
                35527: 31649,
                35528: 31777,
                35529: 32233,
                35530: 32566,
                35531: 32752,
                35532: 32925,
                35533: 33382,
                35534: 33694,
                35535: 35251,
                35536: 35532,
                35537: 36011,
                35538: 36996,
                35539: 37969,
                35540: 38291,
                35541: 38289,
                35542: 38306,
                35543: 38501,
                35544: 38867,
                35545: 39208,
                35546: 33304,
                35547: 20024,
                35548: 21547,
                35549: 23736,
                35550: 24012,
                35551: 29609,
                35552: 30284,
                35553: 30524,
                35554: 23721,
                35555: 32747,
                35556: 36107,
                35557: 38593,
                35558: 38929,
                35559: 38996,
                35560: 39e3,
                35561: 20225,
                35562: 20238,
                35563: 21361,
                35564: 21916,
                35565: 22120,
                35566: 22522,
                35567: 22855,
                35568: 23305,
                35569: 23492,
                35570: 23696,
                35571: 24076,
                35572: 24190,
                35573: 24524,
                35574: 25582,
                35575: 26426,
                35576: 26071,
                35577: 26082,
                35578: 26399,
                35579: 26827,
                35580: 26820,
                35648: 27231,
                35649: 24112,
                35650: 27589,
                35651: 27671,
                35652: 27773,
                35653: 30079,
                35654: 31048,
                35655: 23395,
                35656: 31232,
                35657: 32e3,
                35658: 24509,
                35659: 35215,
                35660: 35352,
                35661: 36020,
                35662: 36215,
                35663: 36556,
                35664: 36637,
                35665: 39138,
                35666: 39438,
                35667: 39740,
                35668: 20096,
                35669: 20605,
                35670: 20736,
                35671: 22931,
                35672: 23452,
                35673: 25135,
                35674: 25216,
                35675: 25836,
                35676: 27450,
                35677: 29344,
                35678: 30097,
                35679: 31047,
                35680: 32681,
                35681: 34811,
                35682: 35516,
                35683: 35696,
                35684: 25516,
                35685: 33738,
                35686: 38816,
                35687: 21513,
                35688: 21507,
                35689: 21931,
                35690: 26708,
                35691: 27224,
                35692: 35440,
                35693: 30759,
                35694: 26485,
                35695: 40653,
                35696: 21364,
                35697: 23458,
                35698: 33050,
                35699: 34384,
                35700: 36870,
                35701: 19992,
                35702: 20037,
                35703: 20167,
                35704: 20241,
                35705: 21450,
                35706: 21560,
                35707: 23470,
                35708: 24339,
                35709: 24613,
                35710: 25937,
                35712: 26429,
                35713: 27714,
                35714: 27762,
                35715: 27875,
                35716: 28792,
                35717: 29699,
                35718: 31350,
                35719: 31406,
                35720: 31496,
                35721: 32026,
                35722: 31998,
                35723: 32102,
                35724: 26087,
                35725: 29275,
                35726: 21435,
                35727: 23621,
                35728: 24040,
                35729: 25298,
                35730: 25312,
                35731: 25369,
                35732: 28192,
                35733: 34394,
                35734: 35377,
                35735: 36317,
                35736: 37624,
                35737: 28417,
                35738: 31142,
                35739: 39770,
                35740: 20136,
                35741: 20139,
                35742: 20140,
                35743: 20379,
                35744: 20384,
                35745: 20689,
                35746: 20807,
                35747: 31478,
                35748: 20849,
                35749: 20982,
                35750: 21332,
                35751: 21281,
                35752: 21375,
                35753: 21483,
                35754: 21932,
                35755: 22659,
                35756: 23777,
                35757: 24375,
                35758: 24394,
                35759: 24623,
                35760: 24656,
                35761: 24685,
                35762: 25375,
                35763: 25945,
                35764: 27211,
                35765: 27841,
                35766: 29378,
                35767: 29421,
                35768: 30703,
                35769: 33016,
                35770: 33029,
                35771: 33288,
                35772: 34126,
                35773: 37111,
                35774: 37857,
                35775: 38911,
                35776: 39255,
                35777: 39514,
                35778: 20208,
                35779: 20957,
                35780: 23597,
                35781: 26241,
                35782: 26989,
                35783: 23616,
                35784: 26354,
                35785: 26997,
                35786: 29577,
                35787: 26704,
                35788: 31873,
                35789: 20677,
                35790: 21220,
                35791: 22343,
                35792: 24062,
                35793: 37670,
                35794: 26020,
                35795: 27427,
                35796: 27453,
                35797: 29748,
                35798: 31105,
                35799: 31165,
                35800: 31563,
                35801: 32202,
                35802: 33465,
                35803: 33740,
                35804: 34943,
                35805: 35167,
                35806: 35641,
                35807: 36817,
                35808: 37329,
                35809: 21535,
                35810: 37504,
                35811: 20061,
                35812: 20534,
                35813: 21477,
                35814: 21306,
                35815: 29399,
                35816: 29590,
                35817: 30697,
                35818: 33510,
                35819: 36527,
                35820: 39366,
                35821: 39368,
                35822: 39378,
                35823: 20855,
                35824: 24858,
                35825: 34398,
                35826: 21936,
                35827: 31354,
                35828: 20598,
                35829: 23507,
                35830: 36935,
                35831: 38533,
                35832: 20018,
                35833: 27355,
                35834: 37351,
                35835: 23633,
                35836: 23624,
                35904: 25496,
                35905: 31391,
                35906: 27795,
                35907: 38772,
                35908: 36705,
                35909: 31402,
                35910: 29066,
                35911: 38536,
                35912: 31874,
                35913: 26647,
                35914: 32368,
                35915: 26705,
                35916: 37740,
                35917: 21234,
                35918: 21531,
                35919: 34219,
                35920: 35347,
                35921: 32676,
                35922: 36557,
                35923: 37089,
                35924: 21350,
                35925: 34952,
                35926: 31041,
                35927: 20418,
                35928: 20670,
                35929: 21009,
                35930: 20804,
                35931: 21843,
                35932: 22317,
                35933: 29674,
                35934: 22411,
                35935: 22865,
                35936: 24418,
                35937: 24452,
                35938: 24693,
                35939: 24950,
                35940: 24935,
                35941: 25001,
                35942: 25522,
                35943: 25658,
                35944: 25964,
                35945: 26223,
                35946: 26690,
                35947: 28179,
                35948: 30054,
                35949: 31293,
                35950: 31995,
                35951: 32076,
                35952: 32153,
                35953: 32331,
                35954: 32619,
                35955: 33550,
                35956: 33610,
                35957: 34509,
                35958: 35336,
                35959: 35427,
                35960: 35686,
                35961: 36605,
                35962: 38938,
                35963: 40335,
                35964: 33464,
                35965: 36814,
                35966: 39912,
                35968: 21127,
                35969: 25119,
                35970: 25731,
                35971: 28608,
                35972: 38553,
                35973: 26689,
                35974: 20625,
                35975: 27424,
                35976: 27770,
                35977: 28500,
                35978: 31348,
                35979: 32080,
                35980: 34880,
                35981: 35363,
                35982: 26376,
                35983: 20214,
                35984: 20537,
                35985: 20518,
                35986: 20581,
                35987: 20860,
                35988: 21048,
                35989: 21091,
                35990: 21927,
                35991: 22287,
                35992: 22533,
                35993: 23244,
                35994: 24314,
                35995: 25010,
                35996: 25080,
                35997: 25331,
                35998: 25458,
                35999: 26908,
                36e3: 27177,
                36001: 29309,
                36002: 29356,
                36003: 29486,
                36004: 30740,
                36005: 30831,
                36006: 32121,
                36007: 30476,
                36008: 32937,
                36009: 35211,
                36010: 35609,
                36011: 36066,
                36012: 36562,
                36013: 36963,
                36014: 37749,
                36015: 38522,
                36016: 38997,
                36017: 39443,
                36018: 40568,
                36019: 20803,
                36020: 21407,
                36021: 21427,
                36022: 24187,
                36023: 24358,
                36024: 28187,
                36025: 28304,
                36026: 29572,
                36027: 29694,
                36028: 32067,
                36029: 33335,
                36030: 35328,
                36031: 35578,
                36032: 38480,
                36033: 20046,
                36034: 20491,
                36035: 21476,
                36036: 21628,
                36037: 22266,
                36038: 22993,
                36039: 23396,
                36040: 24049,
                36041: 24235,
                36042: 24359,
                36043: 25144,
                36044: 25925,
                36045: 26543,
                36046: 28246,
                36047: 29392,
                36048: 31946,
                36049: 34996,
                36050: 32929,
                36051: 32993,
                36052: 33776,
                36053: 34382,
                36054: 35463,
                36055: 36328,
                36056: 37431,
                36057: 38599,
                36058: 39015,
                36059: 40723,
                36060: 20116,
                36061: 20114,
                36062: 20237,
                36063: 21320,
                36064: 21577,
                36065: 21566,
                36066: 23087,
                36067: 24460,
                36068: 24481,
                36069: 24735,
                36070: 26791,
                36071: 27278,
                36072: 29786,
                36073: 30849,
                36074: 35486,
                36075: 35492,
                36076: 35703,
                36077: 37264,
                36078: 20062,
                36079: 39881,
                36080: 20132,
                36081: 20348,
                36082: 20399,
                36083: 20505,
                36084: 20502,
                36085: 20809,
                36086: 20844,
                36087: 21151,
                36088: 21177,
                36089: 21246,
                36090: 21402,
                36091: 21475,
                36092: 21521,
                36160: 21518,
                36161: 21897,
                36162: 22353,
                36163: 22434,
                36164: 22909,
                36165: 23380,
                36166: 23389,
                36167: 23439,
                36168: 24037,
                36169: 24039,
                36170: 24055,
                36171: 24184,
                36172: 24195,
                36173: 24218,
                36174: 24247,
                36175: 24344,
                36176: 24658,
                36177: 24908,
                36178: 25239,
                36179: 25304,
                36180: 25511,
                36181: 25915,
                36182: 26114,
                36183: 26179,
                36184: 26356,
                36185: 26477,
                36186: 26657,
                36187: 26775,
                36188: 27083,
                36189: 27743,
                36190: 27946,
                36191: 28009,
                36192: 28207,
                36193: 28317,
                36194: 30002,
                36195: 30343,
                36196: 30828,
                36197: 31295,
                36198: 31968,
                36199: 32005,
                36200: 32024,
                36201: 32094,
                36202: 32177,
                36203: 32789,
                36204: 32771,
                36205: 32943,
                36206: 32945,
                36207: 33108,
                36208: 33167,
                36209: 33322,
                36210: 33618,
                36211: 34892,
                36212: 34913,
                36213: 35611,
                36214: 36002,
                36215: 36092,
                36216: 37066,
                36217: 37237,
                36218: 37489,
                36219: 30783,
                36220: 37628,
                36221: 38308,
                36222: 38477,
                36224: 38917,
                36225: 39321,
                36226: 39640,
                36227: 40251,
                36228: 21083,
                36229: 21163,
                36230: 21495,
                36231: 21512,
                36232: 22741,
                36233: 25335,
                36234: 28640,
                36235: 35946,
                36236: 36703,
                36237: 40633,
                36238: 20811,
                36239: 21051,
                36240: 21578,
                36241: 22269,
                36242: 31296,
                36243: 37239,
                36244: 40288,
                36245: 40658,
                36246: 29508,
                36247: 28425,
                36248: 33136,
                36249: 29969,
                36250: 24573,
                36251: 24794,
                36252: 39592,
                36253: 29403,
                36254: 36796,
                36255: 27492,
                36256: 38915,
                36257: 20170,
                36258: 22256,
                36259: 22372,
                36260: 22718,
                36261: 23130,
                36262: 24680,
                36263: 25031,
                36264: 26127,
                36265: 26118,
                36266: 26681,
                36267: 26801,
                36268: 28151,
                36269: 30165,
                36270: 32058,
                36271: 33390,
                36272: 39746,
                36273: 20123,
                36274: 20304,
                36275: 21449,
                36276: 21766,
                36277: 23919,
                36278: 24038,
                36279: 24046,
                36280: 26619,
                36281: 27801,
                36282: 29811,
                36283: 30722,
                36284: 35408,
                36285: 37782,
                36286: 35039,
                36287: 22352,
                36288: 24231,
                36289: 25387,
                36290: 20661,
                36291: 20652,
                36292: 20877,
                36293: 26368,
                36294: 21705,
                36295: 22622,
                36296: 22971,
                36297: 23472,
                36298: 24425,
                36299: 25165,
                36300: 25505,
                36301: 26685,
                36302: 27507,
                36303: 28168,
                36304: 28797,
                36305: 37319,
                36306: 29312,
                36307: 30741,
                36308: 30758,
                36309: 31085,
                36310: 25998,
                36311: 32048,
                36312: 33756,
                36313: 35009,
                36314: 36617,
                36315: 38555,
                36316: 21092,
                36317: 22312,
                36318: 26448,
                36319: 32618,
                36320: 36001,
                36321: 20916,
                36322: 22338,
                36323: 38442,
                36324: 22586,
                36325: 27018,
                36326: 32948,
                36327: 21682,
                36328: 23822,
                36329: 22524,
                36330: 30869,
                36331: 40442,
                36332: 20316,
                36333: 21066,
                36334: 21643,
                36335: 25662,
                36336: 26152,
                36337: 26388,
                36338: 26613,
                36339: 31364,
                36340: 31574,
                36341: 32034,
                36342: 37679,
                36343: 26716,
                36344: 39853,
                36345: 31545,
                36346: 21273,
                36347: 20874,
                36348: 21047,
                36416: 23519,
                36417: 25334,
                36418: 25774,
                36419: 25830,
                36420: 26413,
                36421: 27578,
                36422: 34217,
                36423: 38609,
                36424: 30352,
                36425: 39894,
                36426: 25420,
                36427: 37638,
                36428: 39851,
                36429: 30399,
                36430: 26194,
                36431: 19977,
                36432: 20632,
                36433: 21442,
                36434: 23665,
                36435: 24808,
                36436: 25746,
                36437: 25955,
                36438: 26719,
                36439: 29158,
                36440: 29642,
                36441: 29987,
                36442: 31639,
                36443: 32386,
                36444: 34453,
                36445: 35715,
                36446: 36059,
                36447: 37240,
                36448: 39184,
                36449: 26028,
                36450: 26283,
                36451: 27531,
                36452: 20181,
                36453: 20180,
                36454: 20282,
                36455: 20351,
                36456: 21050,
                36457: 21496,
                36458: 21490,
                36459: 21987,
                36460: 22235,
                36461: 22763,
                36462: 22987,
                36463: 22985,
                36464: 23039,
                36465: 23376,
                36466: 23629,
                36467: 24066,
                36468: 24107,
                36469: 24535,
                36470: 24605,
                36471: 25351,
                36472: 25903,
                36473: 23388,
                36474: 26031,
                36475: 26045,
                36476: 26088,
                36477: 26525,
                36478: 27490,
                36480: 27515,
                36481: 27663,
                36482: 29509,
                36483: 31049,
                36484: 31169,
                36485: 31992,
                36486: 32025,
                36487: 32043,
                36488: 32930,
                36489: 33026,
                36490: 33267,
                36491: 35222,
                36492: 35422,
                36493: 35433,
                36494: 35430,
                36495: 35468,
                36496: 35566,
                36497: 36039,
                36498: 36060,
                36499: 38604,
                36500: 39164,
                36501: 27503,
                36502: 20107,
                36503: 20284,
                36504: 20365,
                36505: 20816,
                36506: 23383,
                36507: 23546,
                36508: 24904,
                36509: 25345,
                36510: 26178,
                36511: 27425,
                36512: 28363,
                36513: 27835,
                36514: 29246,
                36515: 29885,
                36516: 30164,
                36517: 30913,
                36518: 31034,
                36519: 32780,
                36520: 32819,
                36521: 33258,
                36522: 33940,
                36523: 36766,
                36524: 27728,
                36525: 40575,
                36526: 24335,
                36527: 35672,
                36528: 40235,
                36529: 31482,
                36530: 36600,
                36531: 23437,
                36532: 38635,
                36533: 19971,
                36534: 21489,
                36535: 22519,
                36536: 22833,
                36537: 23241,
                36538: 23460,
                36539: 24713,
                36540: 28287,
                36541: 28422,
                36542: 30142,
                36543: 36074,
                36544: 23455,
                36545: 34048,
                36546: 31712,
                36547: 20594,
                36548: 26612,
                36549: 33437,
                36550: 23649,
                36551: 34122,
                36552: 32286,
                36553: 33294,
                36554: 20889,
                36555: 23556,
                36556: 25448,
                36557: 36198,
                36558: 26012,
                36559: 29038,
                36560: 31038,
                36561: 32023,
                36562: 32773,
                36563: 35613,
                36564: 36554,
                36565: 36974,
                36566: 34503,
                36567: 37034,
                36568: 20511,
                36569: 21242,
                36570: 23610,
                36571: 26451,
                36572: 28796,
                36573: 29237,
                36574: 37196,
                36575: 37320,
                36576: 37675,
                36577: 33509,
                36578: 23490,
                36579: 24369,
                36580: 24825,
                36581: 20027,
                36582: 21462,
                36583: 23432,
                36584: 25163,
                36585: 26417,
                36586: 27530,
                36587: 29417,
                36588: 29664,
                36589: 31278,
                36590: 33131,
                36591: 36259,
                36592: 37202,
                36593: 39318,
                36594: 20754,
                36595: 21463,
                36596: 21610,
                36597: 23551,
                36598: 25480,
                36599: 27193,
                36600: 32172,
                36601: 38656,
                36602: 22234,
                36603: 21454,
                36604: 21608,
                36672: 23447,
                36673: 23601,
                36674: 24030,
                36675: 20462,
                36676: 24833,
                36677: 25342,
                36678: 27954,
                36679: 31168,
                36680: 31179,
                36681: 32066,
                36682: 32333,
                36683: 32722,
                36684: 33261,
                36685: 33311,
                36686: 33936,
                36687: 34886,
                36688: 35186,
                36689: 35728,
                36690: 36468,
                36691: 36655,
                36692: 36913,
                36693: 37195,
                36694: 37228,
                36695: 38598,
                36696: 37276,
                36697: 20160,
                36698: 20303,
                36699: 20805,
                36700: 21313,
                36701: 24467,
                36702: 25102,
                36703: 26580,
                36704: 27713,
                36705: 28171,
                36706: 29539,
                36707: 32294,
                36708: 37325,
                36709: 37507,
                36710: 21460,
                36711: 22809,
                36712: 23487,
                36713: 28113,
                36714: 31069,
                36715: 32302,
                36716: 31899,
                36717: 22654,
                36718: 29087,
                36719: 20986,
                36720: 34899,
                36721: 36848,
                36722: 20426,
                36723: 23803,
                36724: 26149,
                36725: 30636,
                36726: 31459,
                36727: 33308,
                36728: 39423,
                36729: 20934,
                36730: 24490,
                36731: 26092,
                36732: 26991,
                36733: 27529,
                36734: 28147,
                36736: 28310,
                36737: 28516,
                36738: 30462,
                36739: 32020,
                36740: 24033,
                36741: 36981,
                36742: 37255,
                36743: 38918,
                36744: 20966,
                36745: 21021,
                36746: 25152,
                36747: 26257,
                36748: 26329,
                36749: 28186,
                36750: 24246,
                36751: 32210,
                36752: 32626,
                36753: 26360,
                36754: 34223,
                36755: 34295,
                36756: 35576,
                36757: 21161,
                36758: 21465,
                36759: 22899,
                36760: 24207,
                36761: 24464,
                36762: 24661,
                36763: 37604,
                36764: 38500,
                36765: 20663,
                36766: 20767,
                36767: 21213,
                36768: 21280,
                36769: 21319,
                36770: 21484,
                36771: 21736,
                36772: 21830,
                36773: 21809,
                36774: 22039,
                36775: 22888,
                36776: 22974,
                36777: 23100,
                36778: 23477,
                36779: 23558,
                36780: 23567,
                36781: 23569,
                36782: 23578,
                36783: 24196,
                36784: 24202,
                36785: 24288,
                36786: 24432,
                36787: 25215,
                36788: 25220,
                36789: 25307,
                36790: 25484,
                36791: 25463,
                36792: 26119,
                36793: 26124,
                36794: 26157,
                36795: 26230,
                36796: 26494,
                36797: 26786,
                36798: 27167,
                36799: 27189,
                36800: 27836,
                36801: 28040,
                36802: 28169,
                36803: 28248,
                36804: 28988,
                36805: 28966,
                36806: 29031,
                36807: 30151,
                36808: 30465,
                36809: 30813,
                36810: 30977,
                36811: 31077,
                36812: 31216,
                36813: 31456,
                36814: 31505,
                36815: 31911,
                36816: 32057,
                36817: 32918,
                36818: 33750,
                36819: 33931,
                36820: 34121,
                36821: 34909,
                36822: 35059,
                36823: 35359,
                36824: 35388,
                36825: 35412,
                36826: 35443,
                36827: 35937,
                36828: 36062,
                36829: 37284,
                36830: 37478,
                36831: 37758,
                36832: 37912,
                36833: 38556,
                36834: 38808,
                36835: 19978,
                36836: 19976,
                36837: 19998,
                36838: 20055,
                36839: 20887,
                36840: 21104,
                36841: 22478,
                36842: 22580,
                36843: 22732,
                36844: 23330,
                36845: 24120,
                36846: 24773,
                36847: 25854,
                36848: 26465,
                36849: 26454,
                36850: 27972,
                36851: 29366,
                36852: 30067,
                36853: 31331,
                36854: 33976,
                36855: 35698,
                36856: 37304,
                36857: 37664,
                36858: 22065,
                36859: 22516,
                36860: 39166,
                36928: 25325,
                36929: 26893,
                36930: 27542,
                36931: 29165,
                36932: 32340,
                36933: 32887,
                36934: 33394,
                36935: 35302,
                36936: 39135,
                36937: 34645,
                36938: 36785,
                36939: 23611,
                36940: 20280,
                36941: 20449,
                36942: 20405,
                36943: 21767,
                36944: 23072,
                36945: 23517,
                36946: 23529,
                36947: 24515,
                36948: 24910,
                36949: 25391,
                36950: 26032,
                36951: 26187,
                36952: 26862,
                36953: 27035,
                36954: 28024,
                36955: 28145,
                36956: 30003,
                36957: 30137,
                36958: 30495,
                36959: 31070,
                36960: 31206,
                36961: 32051,
                36962: 33251,
                36963: 33455,
                36964: 34218,
                36965: 35242,
                36966: 35386,
                36967: 36523,
                36968: 36763,
                36969: 36914,
                36970: 37341,
                36971: 38663,
                36972: 20154,
                36973: 20161,
                36974: 20995,
                36975: 22645,
                36976: 22764,
                36977: 23563,
                36978: 29978,
                36979: 23613,
                36980: 33102,
                36981: 35338,
                36982: 36805,
                36983: 38499,
                36984: 38765,
                36985: 31525,
                36986: 35535,
                36987: 38920,
                36988: 37218,
                36989: 22259,
                36990: 21416,
                36992: 36887,
                36993: 21561,
                36994: 22402,
                36995: 24101,
                36996: 25512,
                36997: 27700,
                36998: 28810,
                36999: 30561,
                37e3: 31883,
                37001: 32736,
                37002: 34928,
                37003: 36930,
                37004: 37204,
                37005: 37648,
                37006: 37656,
                37007: 38543,
                37008: 29790,
                37009: 39620,
                37010: 23815,
                37011: 23913,
                37012: 25968,
                37013: 26530,
                37014: 36264,
                37015: 38619,
                37016: 25454,
                37017: 26441,
                37018: 26905,
                37019: 33733,
                37020: 38935,
                37021: 38592,
                37022: 35070,
                37023: 28548,
                37024: 25722,
                37025: 23544,
                37026: 19990,
                37027: 28716,
                37028: 30045,
                37029: 26159,
                37030: 20932,
                37031: 21046,
                37032: 21218,
                37033: 22995,
                37034: 24449,
                37035: 24615,
                37036: 25104,
                37037: 25919,
                37038: 25972,
                37039: 26143,
                37040: 26228,
                37041: 26866,
                37042: 26646,
                37043: 27491,
                37044: 28165,
                37045: 29298,
                37046: 29983,
                37047: 30427,
                37048: 31934,
                37049: 32854,
                37050: 22768,
                37051: 35069,
                37052: 35199,
                37053: 35488,
                37054: 35475,
                37055: 35531,
                37056: 36893,
                37057: 37266,
                37058: 38738,
                37059: 38745,
                37060: 25993,
                37061: 31246,
                37062: 33030,
                37063: 38587,
                37064: 24109,
                37065: 24796,
                37066: 25114,
                37067: 26021,
                37068: 26132,
                37069: 26512,
                37070: 30707,
                37071: 31309,
                37072: 31821,
                37073: 32318,
                37074: 33034,
                37075: 36012,
                37076: 36196,
                37077: 36321,
                37078: 36447,
                37079: 30889,
                37080: 20999,
                37081: 25305,
                37082: 25509,
                37083: 25666,
                37084: 25240,
                37085: 35373,
                37086: 31363,
                37087: 31680,
                37088: 35500,
                37089: 38634,
                37090: 32118,
                37091: 33292,
                37092: 34633,
                37093: 20185,
                37094: 20808,
                37095: 21315,
                37096: 21344,
                37097: 23459,
                37098: 23554,
                37099: 23574,
                37100: 24029,
                37101: 25126,
                37102: 25159,
                37103: 25776,
                37104: 26643,
                37105: 26676,
                37106: 27849,
                37107: 27973,
                37108: 27927,
                37109: 26579,
                37110: 28508,
                37111: 29006,
                37112: 29053,
                37113: 26059,
                37114: 31359,
                37115: 31661,
                37116: 32218,
                37184: 32330,
                37185: 32680,
                37186: 33146,
                37187: 33307,
                37188: 33337,
                37189: 34214,
                37190: 35438,
                37191: 36046,
                37192: 36341,
                37193: 36984,
                37194: 36983,
                37195: 37549,
                37196: 37521,
                37197: 38275,
                37198: 39854,
                37199: 21069,
                37200: 21892,
                37201: 28472,
                37202: 28982,
                37203: 20840,
                37204: 31109,
                37205: 32341,
                37206: 33203,
                37207: 31950,
                37208: 22092,
                37209: 22609,
                37210: 23720,
                37211: 25514,
                37212: 26366,
                37213: 26365,
                37214: 26970,
                37215: 29401,
                37216: 30095,
                37217: 30094,
                37218: 30990,
                37219: 31062,
                37220: 31199,
                37221: 31895,
                37222: 32032,
                37223: 32068,
                37224: 34311,
                37225: 35380,
                37226: 38459,
                37227: 36961,
                37228: 40736,
                37229: 20711,
                37230: 21109,
                37231: 21452,
                37232: 21474,
                37233: 20489,
                37234: 21930,
                37235: 22766,
                37236: 22863,
                37237: 29245,
                37238: 23435,
                37239: 23652,
                37240: 21277,
                37241: 24803,
                37242: 24819,
                37243: 25436,
                37244: 25475,
                37245: 25407,
                37246: 25531,
                37248: 25805,
                37249: 26089,
                37250: 26361,
                37251: 24035,
                37252: 27085,
                37253: 27133,
                37254: 28437,
                37255: 29157,
                37256: 20105,
                37257: 30185,
                37258: 30456,
                37259: 31379,
                37260: 31967,
                37261: 32207,
                37262: 32156,
                37263: 32865,
                37264: 33609,
                37265: 33624,
                37266: 33900,
                37267: 33980,
                37268: 34299,
                37269: 35013,
                37270: 36208,
                37271: 36865,
                37272: 36973,
                37273: 37783,
                37274: 38684,
                37275: 39442,
                37276: 20687,
                37277: 22679,
                37278: 24974,
                37279: 33235,
                37280: 34101,
                37281: 36104,
                37282: 36896,
                37283: 20419,
                37284: 20596,
                37285: 21063,
                37286: 21363,
                37287: 24687,
                37288: 25417,
                37289: 26463,
                37290: 28204,
                37291: 36275,
                37292: 36895,
                37293: 20439,
                37294: 23646,
                37295: 36042,
                37296: 26063,
                37297: 32154,
                37298: 21330,
                37299: 34966,
                37300: 20854,
                37301: 25539,
                37302: 23384,
                37303: 23403,
                37304: 23562,
                37305: 25613,
                37306: 26449,
                37307: 36956,
                37308: 20182,
                37309: 22810,
                37310: 22826,
                37311: 27760,
                37312: 35409,
                37313: 21822,
                37314: 22549,
                37315: 22949,
                37316: 24816,
                37317: 25171,
                37318: 26561,
                37319: 33333,
                37320: 26965,
                37321: 38464,
                37322: 39364,
                37323: 39464,
                37324: 20307,
                37325: 22534,
                37326: 23550,
                37327: 32784,
                37328: 23729,
                37329: 24111,
                37330: 24453,
                37331: 24608,
                37332: 24907,
                37333: 25140,
                37334: 26367,
                37335: 27888,
                37336: 28382,
                37337: 32974,
                37338: 33151,
                37339: 33492,
                37340: 34955,
                37341: 36024,
                37342: 36864,
                37343: 36910,
                37344: 38538,
                37345: 40667,
                37346: 39899,
                37347: 20195,
                37348: 21488,
                37349: 22823,
                37350: 31532,
                37351: 37261,
                37352: 38988,
                37353: 40441,
                37354: 28381,
                37355: 28711,
                37356: 21331,
                37357: 21828,
                37358: 23429,
                37359: 25176,
                37360: 25246,
                37361: 25299,
                37362: 27810,
                37363: 28655,
                37364: 29730,
                37365: 35351,
                37366: 37944,
                37367: 28609,
                37368: 35582,
                37369: 33592,
                37370: 20967,
                37371: 34552,
                37372: 21482,
                37440: 21481,
                37441: 20294,
                37442: 36948,
                37443: 36784,
                37444: 22890,
                37445: 33073,
                37446: 24061,
                37447: 31466,
                37448: 36799,
                37449: 26842,
                37450: 35895,
                37451: 29432,
                37452: 40008,
                37453: 27197,
                37454: 35504,
                37455: 20025,
                37456: 21336,
                37457: 22022,
                37458: 22374,
                37459: 25285,
                37460: 25506,
                37461: 26086,
                37462: 27470,
                37463: 28129,
                37464: 28251,
                37465: 28845,
                37466: 30701,
                37467: 31471,
                37468: 31658,
                37469: 32187,
                37470: 32829,
                37471: 32966,
                37472: 34507,
                37473: 35477,
                37474: 37723,
                37475: 22243,
                37476: 22727,
                37477: 24382,
                37478: 26029,
                37479: 26262,
                37480: 27264,
                37481: 27573,
                37482: 30007,
                37483: 35527,
                37484: 20516,
                37485: 30693,
                37486: 22320,
                37487: 24347,
                37488: 24677,
                37489: 26234,
                37490: 27744,
                37491: 30196,
                37492: 31258,
                37493: 32622,
                37494: 33268,
                37495: 34584,
                37496: 36933,
                37497: 39347,
                37498: 31689,
                37499: 30044,
                37500: 31481,
                37501: 31569,
                37502: 33988,
                37504: 36880,
                37505: 31209,
                37506: 31378,
                37507: 33590,
                37508: 23265,
                37509: 30528,
                37510: 20013,
                37511: 20210,
                37512: 23449,
                37513: 24544,
                37514: 25277,
                37515: 26172,
                37516: 26609,
                37517: 27880,
                37518: 34411,
                37519: 34935,
                37520: 35387,
                37521: 37198,
                37522: 37619,
                37523: 39376,
                37524: 27159,
                37525: 28710,
                37526: 29482,
                37527: 33511,
                37528: 33879,
                37529: 36015,
                37530: 19969,
                37531: 20806,
                37532: 20939,
                37533: 21899,
                37534: 23541,
                37535: 24086,
                37536: 24115,
                37537: 24193,
                37538: 24340,
                37539: 24373,
                37540: 24427,
                37541: 24500,
                37542: 25074,
                37543: 25361,
                37544: 26274,
                37545: 26397,
                37546: 28526,
                37547: 29266,
                37548: 30010,
                37549: 30522,
                37550: 32884,
                37551: 33081,
                37552: 33144,
                37553: 34678,
                37554: 35519,
                37555: 35548,
                37556: 36229,
                37557: 36339,
                37558: 37530,
                37559: 38263,
                37560: 38914,
                37561: 40165,
                37562: 21189,
                37563: 25431,
                37564: 30452,
                37565: 26389,
                37566: 27784,
                37567: 29645,
                37568: 36035,
                37569: 37806,
                37570: 38515,
                37571: 27941,
                37572: 22684,
                37573: 26894,
                37574: 27084,
                37575: 36861,
                37576: 37786,
                37577: 30171,
                37578: 36890,
                37579: 22618,
                37580: 26626,
                37581: 25524,
                37582: 27131,
                37583: 20291,
                37584: 28460,
                37585: 26584,
                37586: 36795,
                37587: 34086,
                37588: 32180,
                37589: 37716,
                37590: 26943,
                37591: 28528,
                37592: 22378,
                37593: 22775,
                37594: 23340,
                37595: 32044,
                37596: 29226,
                37597: 21514,
                37598: 37347,
                37599: 40372,
                37600: 20141,
                37601: 20302,
                37602: 20572,
                37603: 20597,
                37604: 21059,
                37605: 35998,
                37606: 21576,
                37607: 22564,
                37608: 23450,
                37609: 24093,
                37610: 24213,
                37611: 24237,
                37612: 24311,
                37613: 24351,
                37614: 24716,
                37615: 25269,
                37616: 25402,
                37617: 25552,
                37618: 26799,
                37619: 27712,
                37620: 30855,
                37621: 31118,
                37622: 31243,
                37623: 32224,
                37624: 33351,
                37625: 35330,
                37626: 35558,
                37627: 36420,
                37628: 36883,
                37696: 37048,
                37697: 37165,
                37698: 37336,
                37699: 40718,
                37700: 27877,
                37701: 25688,
                37702: 25826,
                37703: 25973,
                37704: 28404,
                37705: 30340,
                37706: 31515,
                37707: 36969,
                37708: 37841,
                37709: 28346,
                37710: 21746,
                37711: 24505,
                37712: 25764,
                37713: 36685,
                37714: 36845,
                37715: 37444,
                37716: 20856,
                37717: 22635,
                37718: 22825,
                37719: 23637,
                37720: 24215,
                37721: 28155,
                37722: 32399,
                37723: 29980,
                37724: 36028,
                37725: 36578,
                37726: 39003,
                37727: 28857,
                37728: 20253,
                37729: 27583,
                37730: 28593,
                37731: 3e4,
                37732: 38651,
                37733: 20814,
                37734: 21520,
                37735: 22581,
                37736: 22615,
                37737: 22956,
                37738: 23648,
                37739: 24466,
                37740: 26007,
                37741: 26460,
                37742: 28193,
                37743: 30331,
                37744: 33759,
                37745: 36077,
                37746: 36884,
                37747: 37117,
                37748: 37709,
                37749: 30757,
                37750: 30778,
                37751: 21162,
                37752: 24230,
                37753: 22303,
                37754: 22900,
                37755: 24594,
                37756: 20498,
                37757: 20826,
                37758: 20908,
                37760: 20941,
                37761: 20992,
                37762: 21776,
                37763: 22612,
                37764: 22616,
                37765: 22871,
                37766: 23445,
                37767: 23798,
                37768: 23947,
                37769: 24764,
                37770: 25237,
                37771: 25645,
                37772: 26481,
                37773: 26691,
                37774: 26812,
                37775: 26847,
                37776: 30423,
                37777: 28120,
                37778: 28271,
                37779: 28059,
                37780: 28783,
                37781: 29128,
                37782: 24403,
                37783: 30168,
                37784: 31095,
                37785: 31561,
                37786: 31572,
                37787: 31570,
                37788: 31958,
                37789: 32113,
                37790: 21040,
                37791: 33891,
                37792: 34153,
                37793: 34276,
                37794: 35342,
                37795: 35588,
                37796: 35910,
                37797: 36367,
                37798: 36867,
                37799: 36879,
                37800: 37913,
                37801: 38518,
                37802: 38957,
                37803: 39472,
                37804: 38360,
                37805: 20685,
                37806: 21205,
                37807: 21516,
                37808: 22530,
                37809: 23566,
                37810: 24999,
                37811: 25758,
                37812: 27934,
                37813: 30643,
                37814: 31461,
                37815: 33012,
                37816: 33796,
                37817: 36947,
                37818: 37509,
                37819: 23776,
                37820: 40199,
                37821: 21311,
                37822: 24471,
                37823: 24499,
                37824: 28060,
                37825: 29305,
                37826: 30563,
                37827: 31167,
                37828: 31716,
                37829: 27602,
                37830: 29420,
                37831: 35501,
                37832: 26627,
                37833: 27233,
                37834: 20984,
                37835: 31361,
                37836: 26932,
                37837: 23626,
                37838: 40182,
                37839: 33515,
                37840: 23493,
                37841: 37193,
                37842: 28702,
                37843: 22136,
                37844: 23663,
                37845: 24775,
                37846: 25958,
                37847: 27788,
                37848: 35930,
                37849: 36929,
                37850: 38931,
                37851: 21585,
                37852: 26311,
                37853: 37389,
                37854: 22856,
                37855: 37027,
                37856: 20869,
                37857: 20045,
                37858: 20970,
                37859: 34201,
                37860: 35598,
                37861: 28760,
                37862: 25466,
                37863: 37707,
                37864: 26978,
                37865: 39348,
                37866: 32260,
                37867: 30071,
                37868: 21335,
                37869: 26976,
                37870: 36575,
                37871: 38627,
                37872: 27741,
                37873: 20108,
                37874: 23612,
                37875: 24336,
                37876: 36841,
                37877: 21250,
                37878: 36049,
                37879: 32905,
                37880: 34425,
                37881: 24319,
                37882: 26085,
                37883: 20083,
                37884: 20837,
                37952: 22914,
                37953: 23615,
                37954: 38894,
                37955: 20219,
                37956: 22922,
                37957: 24525,
                37958: 35469,
                37959: 28641,
                37960: 31152,
                37961: 31074,
                37962: 23527,
                37963: 33905,
                37964: 29483,
                37965: 29105,
                37966: 24180,
                37967: 24565,
                37968: 25467,
                37969: 25754,
                37970: 29123,
                37971: 31896,
                37972: 20035,
                37973: 24316,
                37974: 20043,
                37975: 22492,
                37976: 22178,
                37977: 24745,
                37978: 28611,
                37979: 32013,
                37980: 33021,
                37981: 33075,
                37982: 33215,
                37983: 36786,
                37984: 35223,
                37985: 34468,
                37986: 24052,
                37987: 25226,
                37988: 25773,
                37989: 35207,
                37990: 26487,
                37991: 27874,
                37992: 27966,
                37993: 29750,
                37994: 30772,
                37995: 23110,
                37996: 32629,
                37997: 33453,
                37998: 39340,
                37999: 20467,
                38e3: 24259,
                38001: 25309,
                38002: 25490,
                38003: 25943,
                38004: 26479,
                38005: 30403,
                38006: 29260,
                38007: 32972,
                38008: 32954,
                38009: 36649,
                38010: 37197,
                38011: 20493,
                38012: 22521,
                38013: 23186,
                38014: 26757,
                38016: 26995,
                38017: 29028,
                38018: 29437,
                38019: 36023,
                38020: 22770,
                38021: 36064,
                38022: 38506,
                38023: 36889,
                38024: 34687,
                38025: 31204,
                38026: 30695,
                38027: 33833,
                38028: 20271,
                38029: 21093,
                38030: 21338,
                38031: 25293,
                38032: 26575,
                38033: 27850,
                38034: 30333,
                38035: 31636,
                38036: 31893,
                38037: 33334,
                38038: 34180,
                38039: 36843,
                38040: 26333,
                38041: 28448,
                38042: 29190,
                38043: 32283,
                38044: 33707,
                38045: 39361,
                38046: 40614,
                38047: 20989,
                38048: 31665,
                38049: 30834,
                38050: 31672,
                38051: 32903,
                38052: 31560,
                38053: 27368,
                38054: 24161,
                38055: 32908,
                38056: 30033,
                38057: 30048,
                38058: 20843,
                38059: 37474,
                38060: 28300,
                38061: 30330,
                38062: 37271,
                38063: 39658,
                38064: 20240,
                38065: 32624,
                38066: 25244,
                38067: 31567,
                38068: 38309,
                38069: 40169,
                38070: 22138,
                38071: 22617,
                38072: 34532,
                38073: 38588,
                38074: 20276,
                38075: 21028,
                38076: 21322,
                38077: 21453,
                38078: 21467,
                38079: 24070,
                38080: 25644,
                38081: 26001,
                38082: 26495,
                38083: 27710,
                38084: 27726,
                38085: 29256,
                38086: 29359,
                38087: 29677,
                38088: 30036,
                38089: 32321,
                38090: 33324,
                38091: 34281,
                38092: 36009,
                38093: 31684,
                38094: 37318,
                38095: 29033,
                38096: 38930,
                38097: 39151,
                38098: 25405,
                38099: 26217,
                38100: 30058,
                38101: 30436,
                38102: 30928,
                38103: 34115,
                38104: 34542,
                38105: 21290,
                38106: 21329,
                38107: 21542,
                38108: 22915,
                38109: 24199,
                38110: 24444,
                38111: 24754,
                38112: 25161,
                38113: 25209,
                38114: 25259,
                38115: 26e3,
                38116: 27604,
                38117: 27852,
                38118: 30130,
                38119: 30382,
                38120: 30865,
                38121: 31192,
                38122: 32203,
                38123: 32631,
                38124: 32933,
                38125: 34987,
                38126: 35513,
                38127: 36027,
                38128: 36991,
                38129: 38750,
                38130: 39131,
                38131: 27147,
                38132: 31800,
                38133: 20633,
                38134: 23614,
                38135: 24494,
                38136: 26503,
                38137: 27608,
                38138: 29749,
                38139: 30473,
                38140: 32654,
                38208: 40763,
                38209: 26570,
                38210: 31255,
                38211: 21305,
                38212: 30091,
                38213: 39661,
                38214: 24422,
                38215: 33181,
                38216: 33777,
                38217: 32920,
                38218: 24380,
                38219: 24517,
                38220: 30050,
                38221: 31558,
                38222: 36924,
                38223: 26727,
                38224: 23019,
                38225: 23195,
                38226: 32016,
                38227: 30334,
                38228: 35628,
                38229: 20469,
                38230: 24426,
                38231: 27161,
                38232: 27703,
                38233: 28418,
                38234: 29922,
                38235: 31080,
                38236: 34920,
                38237: 35413,
                38238: 35961,
                38239: 24287,
                38240: 25551,
                38241: 30149,
                38242: 31186,
                38243: 33495,
                38244: 37672,
                38245: 37618,
                38246: 33948,
                38247: 34541,
                38248: 39981,
                38249: 21697,
                38250: 24428,
                38251: 25996,
                38252: 27996,
                38253: 28693,
                38254: 36007,
                38255: 36051,
                38256: 38971,
                38257: 25935,
                38258: 29942,
                38259: 19981,
                38260: 20184,
                38261: 22496,
                38262: 22827,
                38263: 23142,
                38264: 23500,
                38265: 20904,
                38266: 24067,
                38267: 24220,
                38268: 24598,
                38269: 25206,
                38270: 25975,
                38272: 26023,
                38273: 26222,
                38274: 28014,
                38275: 29238,
                38276: 31526,
                38277: 33104,
                38278: 33178,
                38279: 33433,
                38280: 35676,
                38281: 36e3,
                38282: 36070,
                38283: 36212,
                38284: 38428,
                38285: 38468,
                38286: 20398,
                38287: 25771,
                38288: 27494,
                38289: 33310,
                38290: 33889,
                38291: 34154,
                38292: 37096,
                38293: 23553,
                38294: 26963,
                38295: 39080,
                38296: 33914,
                38297: 34135,
                38298: 20239,
                38299: 21103,
                38300: 24489,
                38301: 24133,
                38302: 26381,
                38303: 31119,
                38304: 33145,
                38305: 35079,
                38306: 35206,
                38307: 28149,
                38308: 24343,
                38309: 25173,
                38310: 27832,
                38311: 20175,
                38312: 29289,
                38313: 39826,
                38314: 20998,
                38315: 21563,
                38316: 22132,
                38317: 22707,
                38318: 24996,
                38319: 25198,
                38320: 28954,
                38321: 22894,
                38322: 31881,
                38323: 31966,
                38324: 32027,
                38325: 38640,
                38326: 25991,
                38327: 32862,
                38328: 19993,
                38329: 20341,
                38330: 20853,
                38331: 22592,
                38332: 24163,
                38333: 24179,
                38334: 24330,
                38335: 26564,
                38336: 20006,
                38337: 34109,
                38338: 38281,
                38339: 38491,
                38340: 31859,
                38341: 38913,
                38342: 20731,
                38343: 22721,
                38344: 30294,
                38345: 30887,
                38346: 21029,
                38347: 30629,
                38348: 34065,
                38349: 31622,
                38350: 20559,
                38351: 22793,
                38352: 29255,
                38353: 31687,
                38354: 32232,
                38355: 36794,
                38356: 36820,
                38357: 36941,
                38358: 20415,
                38359: 21193,
                38360: 23081,
                38361: 24321,
                38362: 38829,
                38363: 20445,
                38364: 33303,
                38365: 37610,
                38366: 22275,
                38367: 25429,
                38368: 27497,
                38369: 29995,
                38370: 35036,
                38371: 36628,
                38372: 31298,
                38373: 21215,
                38374: 22675,
                38375: 24917,
                38376: 25098,
                38377: 26286,
                38378: 27597,
                38379: 31807,
                38380: 33769,
                38381: 20515,
                38382: 20472,
                38383: 21253,
                38384: 21574,
                38385: 22577,
                38386: 22857,
                38387: 23453,
                38388: 23792,
                38389: 23791,
                38390: 23849,
                38391: 24214,
                38392: 25265,
                38393: 25447,
                38394: 25918,
                38395: 26041,
                38396: 26379,
                38464: 27861,
                38465: 27873,
                38466: 28921,
                38467: 30770,
                38468: 32299,
                38469: 32990,
                38470: 33459,
                38471: 33804,
                38472: 34028,
                38473: 34562,
                38474: 35090,
                38475: 35370,
                38476: 35914,
                38477: 37030,
                38478: 37586,
                38479: 39165,
                38480: 40179,
                38481: 40300,
                38482: 20047,
                38483: 20129,
                38484: 20621,
                38485: 21078,
                38486: 22346,
                38487: 22952,
                38488: 24125,
                38489: 24536,
                38490: 24537,
                38491: 25151,
                38492: 26292,
                38493: 26395,
                38494: 26576,
                38495: 26834,
                38496: 20882,
                38497: 32033,
                38498: 32938,
                38499: 33192,
                38500: 35584,
                38501: 35980,
                38502: 36031,
                38503: 37502,
                38504: 38450,
                38505: 21536,
                38506: 38956,
                38507: 21271,
                38508: 20693,
                38509: 21340,
                38510: 22696,
                38511: 25778,
                38512: 26420,
                38513: 29287,
                38514: 30566,
                38515: 31302,
                38516: 37350,
                38517: 21187,
                38518: 27809,
                38519: 27526,
                38520: 22528,
                38521: 24140,
                38522: 22868,
                38523: 26412,
                38524: 32763,
                38525: 20961,
                38526: 30406,
                38528: 25705,
                38529: 30952,
                38530: 39764,
                38531: 40635,
                38532: 22475,
                38533: 22969,
                38534: 26151,
                38535: 26522,
                38536: 27598,
                38537: 21737,
                38538: 27097,
                38539: 24149,
                38540: 33180,
                38541: 26517,
                38542: 39850,
                38543: 26622,
                38544: 40018,
                38545: 26717,
                38546: 20134,
                38547: 20451,
                38548: 21448,
                38549: 25273,
                38550: 26411,
                38551: 27819,
                38552: 36804,
                38553: 20397,
                38554: 32365,
                38555: 40639,
                38556: 19975,
                38557: 24930,
                38558: 28288,
                38559: 28459,
                38560: 34067,
                38561: 21619,
                38562: 26410,
                38563: 39749,
                38564: 24051,
                38565: 31637,
                38566: 23724,
                38567: 23494,
                38568: 34588,
                38569: 28234,
                38570: 34001,
                38571: 31252,
                38572: 33032,
                38573: 22937,
                38574: 31885,
                38575: 27665,
                38576: 30496,
                38577: 21209,
                38578: 22818,
                38579: 28961,
                38580: 29279,
                38581: 30683,
                38582: 38695,
                38583: 40289,
                38584: 26891,
                38585: 23167,
                38586: 23064,
                38587: 20901,
                38588: 21517,
                38589: 21629,
                38590: 26126,
                38591: 30431,
                38592: 36855,
                38593: 37528,
                38594: 40180,
                38595: 23018,
                38596: 29277,
                38597: 28357,
                38598: 20813,
                38599: 26825,
                38600: 32191,
                38601: 32236,
                38602: 38754,
                38603: 40634,
                38604: 25720,
                38605: 27169,
                38606: 33538,
                38607: 22916,
                38608: 23391,
                38609: 27611,
                38610: 29467,
                38611: 30450,
                38612: 32178,
                38613: 32791,
                38614: 33945,
                38615: 20786,
                38616: 26408,
                38617: 40665,
                38618: 30446,
                38619: 26466,
                38620: 21247,
                38621: 39173,
                38622: 23588,
                38623: 25147,
                38624: 31870,
                38625: 36016,
                38626: 21839,
                38627: 24758,
                38628: 32011,
                38629: 38272,
                38630: 21249,
                38631: 20063,
                38632: 20918,
                38633: 22812,
                38634: 29242,
                38635: 32822,
                38636: 37326,
                38637: 24357,
                38638: 30690,
                38639: 21380,
                38640: 24441,
                38641: 32004,
                38642: 34220,
                38643: 35379,
                38644: 36493,
                38645: 38742,
                38646: 26611,
                38647: 34222,
                38648: 37971,
                38649: 24841,
                38650: 24840,
                38651: 27833,
                38652: 30290,
                38720: 35565,
                38721: 36664,
                38722: 21807,
                38723: 20305,
                38724: 20778,
                38725: 21191,
                38726: 21451,
                38727: 23461,
                38728: 24189,
                38729: 24736,
                38730: 24962,
                38731: 25558,
                38732: 26377,
                38733: 26586,
                38734: 28263,
                38735: 28044,
                38736: 29494,
                38737: 29495,
                38738: 30001,
                38739: 31056,
                38740: 35029,
                38741: 35480,
                38742: 36938,
                38743: 37009,
                38744: 37109,
                38745: 38596,
                38746: 34701,
                38747: 22805,
                38748: 20104,
                38749: 20313,
                38750: 19982,
                38751: 35465,
                38752: 36671,
                38753: 38928,
                38754: 20653,
                38755: 24188,
                38756: 22934,
                38757: 23481,
                38758: 24248,
                38759: 25562,
                38760: 25594,
                38761: 25793,
                38762: 26332,
                38763: 26954,
                38764: 27096,
                38765: 27915,
                38766: 28342,
                38767: 29076,
                38768: 29992,
                38769: 31407,
                38770: 32650,
                38771: 32768,
                38772: 33865,
                38773: 33993,
                38774: 35201,
                38775: 35617,
                38776: 36362,
                38777: 36965,
                38778: 38525,
                38779: 39178,
                38780: 24958,
                38781: 25233,
                38782: 27442,
                38784: 27779,
                38785: 28020,
                38786: 32716,
                38787: 32764,
                38788: 28096,
                38789: 32645,
                38790: 34746,
                38791: 35064,
                38792: 26469,
                38793: 33713,
                38794: 38972,
                38795: 38647,
                38796: 27931,
                38797: 32097,
                38798: 33853,
                38799: 37226,
                38800: 20081,
                38801: 21365,
                38802: 23888,
                38803: 27396,
                38804: 28651,
                38805: 34253,
                38806: 34349,
                38807: 35239,
                38808: 21033,
                38809: 21519,
                38810: 23653,
                38811: 26446,
                38812: 26792,
                38813: 29702,
                38814: 29827,
                38815: 30178,
                38816: 35023,
                38817: 35041,
                38818: 37324,
                38819: 38626,
                38820: 38520,
                38821: 24459,
                38822: 29575,
                38823: 31435,
                38824: 33870,
                38825: 25504,
                38826: 30053,
                38827: 21129,
                38828: 27969,
                38829: 28316,
                38830: 29705,
                38831: 30041,
                38832: 30827,
                38833: 31890,
                38834: 38534,
                38835: 31452,
                38836: 40845,
                38837: 20406,
                38838: 24942,
                38839: 26053,
                38840: 34396,
                38841: 20102,
                38842: 20142,
                38843: 20698,
                38844: 20001,
                38845: 20940,
                38846: 23534,
                38847: 26009,
                38848: 26753,
                38849: 28092,
                38850: 29471,
                38851: 30274,
                38852: 30637,
                38853: 31260,
                38854: 31975,
                38855: 33391,
                38856: 35538,
                38857: 36988,
                38858: 37327,
                38859: 38517,
                38860: 38936,
                38861: 21147,
                38862: 32209,
                38863: 20523,
                38864: 21400,
                38865: 26519,
                38866: 28107,
                38867: 29136,
                38868: 29747,
                38869: 33256,
                38870: 36650,
                38871: 38563,
                38872: 40023,
                38873: 40607,
                38874: 29792,
                38875: 22593,
                38876: 28057,
                38877: 32047,
                38878: 39006,
                38879: 20196,
                38880: 20278,
                38881: 20363,
                38882: 20919,
                38883: 21169,
                38884: 23994,
                38885: 24604,
                38886: 29618,
                38887: 31036,
                38888: 33491,
                38889: 37428,
                38890: 38583,
                38891: 38646,
                38892: 38666,
                38893: 40599,
                38894: 40802,
                38895: 26278,
                38896: 27508,
                38897: 21015,
                38898: 21155,
                38899: 28872,
                38900: 35010,
                38901: 24265,
                38902: 24651,
                38903: 24976,
                38904: 28451,
                38905: 29001,
                38906: 31806,
                38907: 32244,
                38908: 32879,
                38976: 34030,
                38977: 36899,
                38978: 37676,
                38979: 21570,
                38980: 39791,
                38981: 27347,
                38982: 28809,
                38983: 36034,
                38984: 36335,
                38985: 38706,
                38986: 21172,
                38987: 23105,
                38988: 24266,
                38989: 24324,
                38990: 26391,
                38991: 27004,
                38992: 27028,
                38993: 28010,
                38994: 28431,
                38995: 29282,
                38996: 29436,
                38997: 31725,
                38998: 32769,
                38999: 32894,
                39e3: 34635,
                39001: 37070,
                39002: 20845,
                39003: 40595,
                39004: 31108,
                39005: 32907,
                39006: 37682,
                39007: 35542,
                39008: 20525,
                39009: 21644,
                39010: 35441,
                39011: 27498,
                39012: 36036,
                39013: 33031,
                39014: 24785,
                39015: 26528,
                39016: 40434,
                39017: 20121,
                39018: 20120,
                39019: 39952,
                39020: 35435,
                39021: 34241,
                39022: 34152,
                39023: 26880,
                39024: 28286,
                39025: 30871,
                39026: 33109,
                39071: 24332,
                39072: 19984,
                39073: 19989,
                39074: 20010,
                39075: 20017,
                39076: 20022,
                39077: 20028,
                39078: 20031,
                39079: 20034,
                39080: 20054,
                39081: 20056,
                39082: 20098,
                39083: 20101,
                39084: 35947,
                39085: 20106,
                39086: 33298,
                39087: 24333,
                39088: 20110,
                39089: 20126,
                39090: 20127,
                39091: 20128,
                39092: 20130,
                39093: 20144,
                39094: 20147,
                39095: 20150,
                39096: 20174,
                39097: 20173,
                39098: 20164,
                39099: 20166,
                39100: 20162,
                39101: 20183,
                39102: 20190,
                39103: 20205,
                39104: 20191,
                39105: 20215,
                39106: 20233,
                39107: 20314,
                39108: 20272,
                39109: 20315,
                39110: 20317,
                39111: 20311,
                39112: 20295,
                39113: 20342,
                39114: 20360,
                39115: 20367,
                39116: 20376,
                39117: 20347,
                39118: 20329,
                39119: 20336,
                39120: 20369,
                39121: 20335,
                39122: 20358,
                39123: 20374,
                39124: 20760,
                39125: 20436,
                39126: 20447,
                39127: 20430,
                39128: 20440,
                39129: 20443,
                39130: 20433,
                39131: 20442,
                39132: 20432,
                39133: 20452,
                39134: 20453,
                39135: 20506,
                39136: 20520,
                39137: 20500,
                39138: 20522,
                39139: 20517,
                39140: 20485,
                39141: 20252,
                39142: 20470,
                39143: 20513,
                39144: 20521,
                39145: 20524,
                39146: 20478,
                39147: 20463,
                39148: 20497,
                39149: 20486,
                39150: 20547,
                39151: 20551,
                39152: 26371,
                39153: 20565,
                39154: 20560,
                39155: 20552,
                39156: 20570,
                39157: 20566,
                39158: 20588,
                39159: 20600,
                39160: 20608,
                39161: 20634,
                39162: 20613,
                39163: 20660,
                39164: 20658,
                39232: 20681,
                39233: 20682,
                39234: 20659,
                39235: 20674,
                39236: 20694,
                39237: 20702,
                39238: 20709,
                39239: 20717,
                39240: 20707,
                39241: 20718,
                39242: 20729,
                39243: 20725,
                39244: 20745,
                39245: 20737,
                39246: 20738,
                39247: 20758,
                39248: 20757,
                39249: 20756,
                39250: 20762,
                39251: 20769,
                39252: 20794,
                39253: 20791,
                39254: 20796,
                39255: 20795,
                39256: 20799,
                39257: 20800,
                39258: 20818,
                39259: 20812,
                39260: 20820,
                39261: 20834,
                39262: 31480,
                39263: 20841,
                39264: 20842,
                39265: 20846,
                39266: 20864,
                39267: 20866,
                39268: 22232,
                39269: 20876,
                39270: 20873,
                39271: 20879,
                39272: 20881,
                39273: 20883,
                39274: 20885,
                39275: 20886,
                39276: 20900,
                39277: 20902,
                39278: 20898,
                39279: 20905,
                39280: 20906,
                39281: 20907,
                39282: 20915,
                39283: 20913,
                39284: 20914,
                39285: 20912,
                39286: 20917,
                39287: 20925,
                39288: 20933,
                39289: 20937,
                39290: 20955,
                39291: 20960,
                39292: 34389,
                39293: 20969,
                39294: 20973,
                39296: 20976,
                39297: 20981,
                39298: 20990,
                39299: 20996,
                39300: 21003,
                39301: 21012,
                39302: 21006,
                39303: 21031,
                39304: 21034,
                39305: 21038,
                39306: 21043,
                39307: 21049,
                39308: 21071,
                39309: 21060,
                39310: 21067,
                39311: 21068,
                39312: 21086,
                39313: 21076,
                39314: 21098,
                39315: 21108,
                39316: 21097,
                39317: 21107,
                39318: 21119,
                39319: 21117,
                39320: 21133,
                39321: 21140,
                39322: 21138,
                39323: 21105,
                39324: 21128,
                39325: 21137,
                39326: 36776,
                39327: 36775,
                39328: 21164,
                39329: 21165,
                39330: 21180,
                39331: 21173,
                39332: 21185,
                39333: 21197,
                39334: 21207,
                39335: 21214,
                39336: 21219,
                39337: 21222,
                39338: 39149,
                39339: 21216,
                39340: 21235,
                39341: 21237,
                39342: 21240,
                39343: 21241,
                39344: 21254,
                39345: 21256,
                39346: 30008,
                39347: 21261,
                39348: 21264,
                39349: 21263,
                39350: 21269,
                39351: 21274,
                39352: 21283,
                39353: 21295,
                39354: 21297,
                39355: 21299,
                39356: 21304,
                39357: 21312,
                39358: 21318,
                39359: 21317,
                39360: 19991,
                39361: 21321,
                39362: 21325,
                39363: 20950,
                39364: 21342,
                39365: 21353,
                39366: 21358,
                39367: 22808,
                39368: 21371,
                39369: 21367,
                39370: 21378,
                39371: 21398,
                39372: 21408,
                39373: 21414,
                39374: 21413,
                39375: 21422,
                39376: 21424,
                39377: 21430,
                39378: 21443,
                39379: 31762,
                39380: 38617,
                39381: 21471,
                39382: 26364,
                39383: 29166,
                39384: 21486,
                39385: 21480,
                39386: 21485,
                39387: 21498,
                39388: 21505,
                39389: 21565,
                39390: 21568,
                39391: 21548,
                39392: 21549,
                39393: 21564,
                39394: 21550,
                39395: 21558,
                39396: 21545,
                39397: 21533,
                39398: 21582,
                39399: 21647,
                39400: 21621,
                39401: 21646,
                39402: 21599,
                39403: 21617,
                39404: 21623,
                39405: 21616,
                39406: 21650,
                39407: 21627,
                39408: 21632,
                39409: 21622,
                39410: 21636,
                39411: 21648,
                39412: 21638,
                39413: 21703,
                39414: 21666,
                39415: 21688,
                39416: 21669,
                39417: 21676,
                39418: 21700,
                39419: 21704,
                39420: 21672,
                39488: 21675,
                39489: 21698,
                39490: 21668,
                39491: 21694,
                39492: 21692,
                39493: 21720,
                39494: 21733,
                39495: 21734,
                39496: 21775,
                39497: 21780,
                39498: 21757,
                39499: 21742,
                39500: 21741,
                39501: 21754,
                39502: 21730,
                39503: 21817,
                39504: 21824,
                39505: 21859,
                39506: 21836,
                39507: 21806,
                39508: 21852,
                39509: 21829,
                39510: 21846,
                39511: 21847,
                39512: 21816,
                39513: 21811,
                39514: 21853,
                39515: 21913,
                39516: 21888,
                39517: 21679,
                39518: 21898,
                39519: 21919,
                39520: 21883,
                39521: 21886,
                39522: 21912,
                39523: 21918,
                39524: 21934,
                39525: 21884,
                39526: 21891,
                39527: 21929,
                39528: 21895,
                39529: 21928,
                39530: 21978,
                39531: 21957,
                39532: 21983,
                39533: 21956,
                39534: 21980,
                39535: 21988,
                39536: 21972,
                39537: 22036,
                39538: 22007,
                39539: 22038,
                39540: 22014,
                39541: 22013,
                39542: 22043,
                39543: 22009,
                39544: 22094,
                39545: 22096,
                39546: 29151,
                39547: 22068,
                39548: 22070,
                39549: 22066,
                39550: 22072,
                39552: 22123,
                39553: 22116,
                39554: 22063,
                39555: 22124,
                39556: 22122,
                39557: 22150,
                39558: 22144,
                39559: 22154,
                39560: 22176,
                39561: 22164,
                39562: 22159,
                39563: 22181,
                39564: 22190,
                39565: 22198,
                39566: 22196,
                39567: 22210,
                39568: 22204,
                39569: 22209,
                39570: 22211,
                39571: 22208,
                39572: 22216,
                39573: 22222,
                39574: 22225,
                39575: 22227,
                39576: 22231,
                39577: 22254,
                39578: 22265,
                39579: 22272,
                39580: 22271,
                39581: 22276,
                39582: 22281,
                39583: 22280,
                39584: 22283,
                39585: 22285,
                39586: 22291,
                39587: 22296,
                39588: 22294,
                39589: 21959,
                39590: 22300,
                39591: 22310,
                39592: 22327,
                39593: 22328,
                39594: 22350,
                39595: 22331,
                39596: 22336,
                39597: 22351,
                39598: 22377,
                39599: 22464,
                39600: 22408,
                39601: 22369,
                39602: 22399,
                39603: 22409,
                39604: 22419,
                39605: 22432,
                39606: 22451,
                39607: 22436,
                39608: 22442,
                39609: 22448,
                39610: 22467,
                39611: 22470,
                39612: 22484,
                39613: 22482,
                39614: 22483,
                39615: 22538,
                39616: 22486,
                39617: 22499,
                39618: 22539,
                39619: 22553,
                39620: 22557,
                39621: 22642,
                39622: 22561,
                39623: 22626,
                39624: 22603,
                39625: 22640,
                39626: 27584,
                39627: 22610,
                39628: 22589,
                39629: 22649,
                39630: 22661,
                39631: 22713,
                39632: 22687,
                39633: 22699,
                39634: 22714,
                39635: 22750,
                39636: 22715,
                39637: 22712,
                39638: 22702,
                39639: 22725,
                39640: 22739,
                39641: 22737,
                39642: 22743,
                39643: 22745,
                39644: 22744,
                39645: 22757,
                39646: 22748,
                39647: 22756,
                39648: 22751,
                39649: 22767,
                39650: 22778,
                39651: 22777,
                39652: 22779,
                39653: 22780,
                39654: 22781,
                39655: 22786,
                39656: 22794,
                39657: 22800,
                39658: 22811,
                39659: 26790,
                39660: 22821,
                39661: 22828,
                39662: 22829,
                39663: 22834,
                39664: 22840,
                39665: 22846,
                39666: 31442,
                39667: 22869,
                39668: 22864,
                39669: 22862,
                39670: 22874,
                39671: 22872,
                39672: 22882,
                39673: 22880,
                39674: 22887,
                39675: 22892,
                39676: 22889,
                39744: 22904,
                39745: 22913,
                39746: 22941,
                39747: 20318,
                39748: 20395,
                39749: 22947,
                39750: 22962,
                39751: 22982,
                39752: 23016,
                39753: 23004,
                39754: 22925,
                39755: 23001,
                39756: 23002,
                39757: 23077,
                39758: 23071,
                39759: 23057,
                39760: 23068,
                39761: 23049,
                39762: 23066,
                39763: 23104,
                39764: 23148,
                39765: 23113,
                39766: 23093,
                39767: 23094,
                39768: 23138,
                39769: 23146,
                39770: 23194,
                39771: 23228,
                39772: 23230,
                39773: 23243,
                39774: 23234,
                39775: 23229,
                39776: 23267,
                39777: 23255,
                39778: 23270,
                39779: 23273,
                39780: 23254,
                39781: 23290,
                39782: 23291,
                39783: 23308,
                39784: 23307,
                39785: 23318,
                39786: 23346,
                39787: 23248,
                39788: 23338,
                39789: 23350,
                39790: 23358,
                39791: 23363,
                39792: 23365,
                39793: 23360,
                39794: 23377,
                39795: 23381,
                39796: 23386,
                39797: 23387,
                39798: 23397,
                39799: 23401,
                39800: 23408,
                39801: 23411,
                39802: 23413,
                39803: 23416,
                39804: 25992,
                39805: 23418,
                39806: 23424,
                39808: 23427,
                39809: 23462,
                39810: 23480,
                39811: 23491,
                39812: 23495,
                39813: 23497,
                39814: 23508,
                39815: 23504,
                39816: 23524,
                39817: 23526,
                39818: 23522,
                39819: 23518,
                39820: 23525,
                39821: 23531,
                39822: 23536,
                39823: 23542,
                39824: 23539,
                39825: 23557,
                39826: 23559,
                39827: 23560,
                39828: 23565,
                39829: 23571,
                39830: 23584,
                39831: 23586,
                39832: 23592,
                39833: 23608,
                39834: 23609,
                39835: 23617,
                39836: 23622,
                39837: 23630,
                39838: 23635,
                39839: 23632,
                39840: 23631,
                39841: 23409,
                39842: 23660,
                39843: 23662,
                39844: 20066,
                39845: 23670,
                39846: 23673,
                39847: 23692,
                39848: 23697,
                39849: 23700,
                39850: 22939,
                39851: 23723,
                39852: 23739,
                39853: 23734,
                39854: 23740,
                39855: 23735,
                39856: 23749,
                39857: 23742,
                39858: 23751,
                39859: 23769,
                39860: 23785,
                39861: 23805,
                39862: 23802,
                39863: 23789,
                39864: 23948,
                39865: 23786,
                39866: 23819,
                39867: 23829,
                39868: 23831,
                39869: 23900,
                39870: 23839,
                39871: 23835,
                39872: 23825,
                39873: 23828,
                39874: 23842,
                39875: 23834,
                39876: 23833,
                39877: 23832,
                39878: 23884,
                39879: 23890,
                39880: 23886,
                39881: 23883,
                39882: 23916,
                39883: 23923,
                39884: 23926,
                39885: 23943,
                39886: 23940,
                39887: 23938,
                39888: 23970,
                39889: 23965,
                39890: 23980,
                39891: 23982,
                39892: 23997,
                39893: 23952,
                39894: 23991,
                39895: 23996,
                39896: 24009,
                39897: 24013,
                39898: 24019,
                39899: 24018,
                39900: 24022,
                39901: 24027,
                39902: 24043,
                39903: 24050,
                39904: 24053,
                39905: 24075,
                39906: 24090,
                39907: 24089,
                39908: 24081,
                39909: 24091,
                39910: 24118,
                39911: 24119,
                39912: 24132,
                39913: 24131,
                39914: 24128,
                39915: 24142,
                39916: 24151,
                39917: 24148,
                39918: 24159,
                39919: 24162,
                39920: 24164,
                39921: 24135,
                39922: 24181,
                39923: 24182,
                39924: 24186,
                39925: 40636,
                39926: 24191,
                39927: 24224,
                39928: 24257,
                39929: 24258,
                39930: 24264,
                39931: 24272,
                39932: 24271,
                4e4: 24278,
                40001: 24291,
                40002: 24285,
                40003: 24282,
                40004: 24283,
                40005: 24290,
                40006: 24289,
                40007: 24296,
                40008: 24297,
                40009: 24300,
                40010: 24305,
                40011: 24307,
                40012: 24304,
                40013: 24308,
                40014: 24312,
                40015: 24318,
                40016: 24323,
                40017: 24329,
                40018: 24413,
                40019: 24412,
                40020: 24331,
                40021: 24337,
                40022: 24342,
                40023: 24361,
                40024: 24365,
                40025: 24376,
                40026: 24385,
                40027: 24392,
                40028: 24396,
                40029: 24398,
                40030: 24367,
                40031: 24401,
                40032: 24406,
                40033: 24407,
                40034: 24409,
                40035: 24417,
                40036: 24429,
                40037: 24435,
                40038: 24439,
                40039: 24451,
                40040: 24450,
                40041: 24447,
                40042: 24458,
                40043: 24456,
                40044: 24465,
                40045: 24455,
                40046: 24478,
                40047: 24473,
                40048: 24472,
                40049: 24480,
                40050: 24488,
                40051: 24493,
                40052: 24508,
                40053: 24534,
                40054: 24571,
                40055: 24548,
                40056: 24568,
                40057: 24561,
                40058: 24541,
                40059: 24755,
                40060: 24575,
                40061: 24609,
                40062: 24672,
                40064: 24601,
                40065: 24592,
                40066: 24617,
                40067: 24590,
                40068: 24625,
                40069: 24603,
                40070: 24597,
                40071: 24619,
                40072: 24614,
                40073: 24591,
                40074: 24634,
                40075: 24666,
                40076: 24641,
                40077: 24682,
                40078: 24695,
                40079: 24671,
                40080: 24650,
                40081: 24646,
                40082: 24653,
                40083: 24675,
                40084: 24643,
                40085: 24676,
                40086: 24642,
                40087: 24684,
                40088: 24683,
                40089: 24665,
                40090: 24705,
                40091: 24717,
                40092: 24807,
                40093: 24707,
                40094: 24730,
                40095: 24708,
                40096: 24731,
                40097: 24726,
                40098: 24727,
                40099: 24722,
                40100: 24743,
                40101: 24715,
                40102: 24801,
                40103: 24760,
                40104: 24800,
                40105: 24787,
                40106: 24756,
                40107: 24560,
                40108: 24765,
                40109: 24774,
                40110: 24757,
                40111: 24792,
                40112: 24909,
                40113: 24853,
                40114: 24838,
                40115: 24822,
                40116: 24823,
                40117: 24832,
                40118: 24820,
                40119: 24826,
                40120: 24835,
                40121: 24865,
                40122: 24827,
                40123: 24817,
                40124: 24845,
                40125: 24846,
                40126: 24903,
                40127: 24894,
                40128: 24872,
                40129: 24871,
                40130: 24906,
                40131: 24895,
                40132: 24892,
                40133: 24876,
                40134: 24884,
                40135: 24893,
                40136: 24898,
                40137: 24900,
                40138: 24947,
                40139: 24951,
                40140: 24920,
                40141: 24921,
                40142: 24922,
                40143: 24939,
                40144: 24948,
                40145: 24943,
                40146: 24933,
                40147: 24945,
                40148: 24927,
                40149: 24925,
                40150: 24915,
                40151: 24949,
                40152: 24985,
                40153: 24982,
                40154: 24967,
                40155: 25004,
                40156: 24980,
                40157: 24986,
                40158: 24970,
                40159: 24977,
                40160: 25003,
                40161: 25006,
                40162: 25036,
                40163: 25034,
                40164: 25033,
                40165: 25079,
                40166: 25032,
                40167: 25027,
                40168: 25030,
                40169: 25018,
                40170: 25035,
                40171: 32633,
                40172: 25037,
                40173: 25062,
                40174: 25059,
                40175: 25078,
                40176: 25082,
                40177: 25076,
                40178: 25087,
                40179: 25085,
                40180: 25084,
                40181: 25086,
                40182: 25088,
                40183: 25096,
                40184: 25097,
                40185: 25101,
                40186: 25100,
                40187: 25108,
                40188: 25115,
                40256: 25118,
                40257: 25121,
                40258: 25130,
                40259: 25134,
                40260: 25136,
                40261: 25138,
                40262: 25139,
                40263: 25153,
                40264: 25166,
                40265: 25182,
                40266: 25187,
                40267: 25179,
                40268: 25184,
                40269: 25192,
                40270: 25212,
                40271: 25218,
                40272: 25225,
                40273: 25214,
                40274: 25234,
                40275: 25235,
                40276: 25238,
                40277: 25300,
                40278: 25219,
                40279: 25236,
                40280: 25303,
                40281: 25297,
                40282: 25275,
                40283: 25295,
                40284: 25343,
                40285: 25286,
                40286: 25812,
                40287: 25288,
                40288: 25308,
                40289: 25292,
                40290: 25290,
                40291: 25282,
                40292: 25287,
                40293: 25243,
                40294: 25289,
                40295: 25356,
                40296: 25326,
                40297: 25329,
                40298: 25383,
                40299: 25346,
                40300: 25352,
                40301: 25327,
                40302: 25333,
                40303: 25424,
                40304: 25406,
                40305: 25421,
                40306: 25628,
                40307: 25423,
                40308: 25494,
                40309: 25486,
                40310: 25472,
                40311: 25515,
                40312: 25462,
                40313: 25507,
                40314: 25487,
                40315: 25481,
                40316: 25503,
                40317: 25525,
                40318: 25451,
                40320: 25449,
                40321: 25534,
                40322: 25577,
                40323: 25536,
                40324: 25542,
                40325: 25571,
                40326: 25545,
                40327: 25554,
                40328: 25590,
                40329: 25540,
                40330: 25622,
                40331: 25652,
                40332: 25606,
                40333: 25619,
                40334: 25638,
                40335: 25654,
                40336: 25885,
                40337: 25623,
                40338: 25640,
                40339: 25615,
                40340: 25703,
                40341: 25711,
                40342: 25718,
                40343: 25678,
                40344: 25898,
                40345: 25749,
                40346: 25747,
                40347: 25765,
                40348: 25769,
                40349: 25736,
                40350: 25788,
                40351: 25818,
                40352: 25810,
                40353: 25797,
                40354: 25799,
                40355: 25787,
                40356: 25816,
                40357: 25794,
                40358: 25841,
                40359: 25831,
                40360: 33289,
                40361: 25824,
                40362: 25825,
                40363: 25260,
                40364: 25827,
                40365: 25839,
                40366: 25900,
                40367: 25846,
                40368: 25844,
                40369: 25842,
                40370: 25850,
                40371: 25856,
                40372: 25853,
                40373: 25880,
                40374: 25884,
                40375: 25861,
                40376: 25892,
                40377: 25891,
                40378: 25899,
                40379: 25908,
                40380: 25909,
                40381: 25911,
                40382: 25910,
                40383: 25912,
                40384: 30027,
                40385: 25928,
                40386: 25942,
                40387: 25941,
                40388: 25933,
                40389: 25944,
                40390: 25950,
                40391: 25949,
                40392: 25970,
                40393: 25976,
                40394: 25986,
                40395: 25987,
                40396: 35722,
                40397: 26011,
                40398: 26015,
                40399: 26027,
                40400: 26039,
                40401: 26051,
                40402: 26054,
                40403: 26049,
                40404: 26052,
                40405: 26060,
                40406: 26066,
                40407: 26075,
                40408: 26073,
                40409: 26080,
                40410: 26081,
                40411: 26097,
                40412: 26482,
                40413: 26122,
                40414: 26115,
                40415: 26107,
                40416: 26483,
                40417: 26165,
                40418: 26166,
                40419: 26164,
                40420: 26140,
                40421: 26191,
                40422: 26180,
                40423: 26185,
                40424: 26177,
                40425: 26206,
                40426: 26205,
                40427: 26212,
                40428: 26215,
                40429: 26216,
                40430: 26207,
                40431: 26210,
                40432: 26224,
                40433: 26243,
                40434: 26248,
                40435: 26254,
                40436: 26249,
                40437: 26244,
                40438: 26264,
                40439: 26269,
                40440: 26305,
                40441: 26297,
                40442: 26313,
                40443: 26302,
                40444: 26300,
                40512: 26308,
                40513: 26296,
                40514: 26326,
                40515: 26330,
                40516: 26336,
                40517: 26175,
                40518: 26342,
                40519: 26345,
                40520: 26352,
                40521: 26357,
                40522: 26359,
                40523: 26383,
                40524: 26390,
                40525: 26398,
                40526: 26406,
                40527: 26407,
                40528: 38712,
                40529: 26414,
                40530: 26431,
                40531: 26422,
                40532: 26433,
                40533: 26424,
                40534: 26423,
                40535: 26438,
                40536: 26462,
                40537: 26464,
                40538: 26457,
                40539: 26467,
                40540: 26468,
                40541: 26505,
                40542: 26480,
                40543: 26537,
                40544: 26492,
                40545: 26474,
                40546: 26508,
                40547: 26507,
                40548: 26534,
                40549: 26529,
                40550: 26501,
                40551: 26551,
                40552: 26607,
                40553: 26548,
                40554: 26604,
                40555: 26547,
                40556: 26601,
                40557: 26552,
                40558: 26596,
                40559: 26590,
                40560: 26589,
                40561: 26594,
                40562: 26606,
                40563: 26553,
                40564: 26574,
                40565: 26566,
                40566: 26599,
                40567: 27292,
                40568: 26654,
                40569: 26694,
                40570: 26665,
                40571: 26688,
                40572: 26701,
                40573: 26674,
                40574: 26702,
                40576: 26803,
                40577: 26667,
                40578: 26713,
                40579: 26723,
                40580: 26743,
                40581: 26751,
                40582: 26783,
                40583: 26767,
                40584: 26797,
                40585: 26772,
                40586: 26781,
                40587: 26779,
                40588: 26755,
                40589: 27310,
                40590: 26809,
                40591: 26740,
                40592: 26805,
                40593: 26784,
                40594: 26810,
                40595: 26895,
                40596: 26765,
                40597: 26750,
                40598: 26881,
                40599: 26826,
                40600: 26888,
                40601: 26840,
                40602: 26914,
                40603: 26918,
                40604: 26849,
                40605: 26892,
                40606: 26829,
                40607: 26836,
                40608: 26855,
                40609: 26837,
                40610: 26934,
                40611: 26898,
                40612: 26884,
                40613: 26839,
                40614: 26851,
                40615: 26917,
                40616: 26873,
                40617: 26848,
                40618: 26863,
                40619: 26920,
                40620: 26922,
                40621: 26906,
                40622: 26915,
                40623: 26913,
                40624: 26822,
                40625: 27001,
                40626: 26999,
                40627: 26972,
                40628: 27e3,
                40629: 26987,
                40630: 26964,
                40631: 27006,
                40632: 26990,
                40633: 26937,
                40634: 26996,
                40635: 26941,
                40636: 26969,
                40637: 26928,
                40638: 26977,
                40639: 26974,
                40640: 26973,
                40641: 27009,
                40642: 26986,
                40643: 27058,
                40644: 27054,
                40645: 27088,
                40646: 27071,
                40647: 27073,
                40648: 27091,
                40649: 27070,
                40650: 27086,
                40651: 23528,
                40652: 27082,
                40653: 27101,
                40654: 27067,
                40655: 27075,
                40656: 27047,
                40657: 27182,
                40658: 27025,
                40659: 27040,
                40660: 27036,
                40661: 27029,
                40662: 27060,
                40663: 27102,
                40664: 27112,
                40665: 27138,
                40666: 27163,
                40667: 27135,
                40668: 27402,
                40669: 27129,
                40670: 27122,
                40671: 27111,
                40672: 27141,
                40673: 27057,
                40674: 27166,
                40675: 27117,
                40676: 27156,
                40677: 27115,
                40678: 27146,
                40679: 27154,
                40680: 27329,
                40681: 27171,
                40682: 27155,
                40683: 27204,
                40684: 27148,
                40685: 27250,
                40686: 27190,
                40687: 27256,
                40688: 27207,
                40689: 27234,
                40690: 27225,
                40691: 27238,
                40692: 27208,
                40693: 27192,
                40694: 27170,
                40695: 27280,
                40696: 27277,
                40697: 27296,
                40698: 27268,
                40699: 27298,
                40700: 27299,
                40768: 27287,
                40769: 34327,
                40770: 27323,
                40771: 27331,
                40772: 27330,
                40773: 27320,
                40774: 27315,
                40775: 27308,
                40776: 27358,
                40777: 27345,
                40778: 27359,
                40779: 27306,
                40780: 27354,
                40781: 27370,
                40782: 27387,
                40783: 27397,
                40784: 34326,
                40785: 27386,
                40786: 27410,
                40787: 27414,
                40788: 39729,
                40789: 27423,
                40790: 27448,
                40791: 27447,
                40792: 30428,
                40793: 27449,
                40794: 39150,
                40795: 27463,
                40796: 27459,
                40797: 27465,
                40798: 27472,
                40799: 27481,
                40800: 27476,
                40801: 27483,
                40802: 27487,
                40803: 27489,
                40804: 27512,
                40805: 27513,
                40806: 27519,
                40807: 27520,
                40808: 27524,
                40809: 27523,
                40810: 27533,
                40811: 27544,
                40812: 27541,
                40813: 27550,
                40814: 27556,
                40815: 27562,
                40816: 27563,
                40817: 27567,
                40818: 27570,
                40819: 27569,
                40820: 27571,
                40821: 27575,
                40822: 27580,
                40823: 27590,
                40824: 27595,
                40825: 27603,
                40826: 27615,
                40827: 27628,
                40828: 27627,
                40829: 27635,
                40830: 27631,
                40832: 40638,
                40833: 27656,
                40834: 27667,
                40835: 27668,
                40836: 27675,
                40837: 27684,
                40838: 27683,
                40839: 27742,
                40840: 27733,
                40841: 27746,
                40842: 27754,
                40843: 27778,
                40844: 27789,
                40845: 27802,
                40846: 27777,
                40847: 27803,
                40848: 27774,
                40849: 27752,
                40850: 27763,
                40851: 27794,
                40852: 27792,
                40853: 27844,
                40854: 27889,
                40855: 27859,
                40856: 27837,
                40857: 27863,
                40858: 27845,
                40859: 27869,
                40860: 27822,
                40861: 27825,
                40862: 27838,
                40863: 27834,
                40864: 27867,
                40865: 27887,
                40866: 27865,
                40867: 27882,
                40868: 27935,
                40869: 34893,
                40870: 27958,
                40871: 27947,
                40872: 27965,
                40873: 27960,
                40874: 27929,
                40875: 27957,
                40876: 27955,
                40877: 27922,
                40878: 27916,
                40879: 28003,
                40880: 28051,
                40881: 28004,
                40882: 27994,
                40883: 28025,
                40884: 27993,
                40885: 28046,
                40886: 28053,
                40887: 28644,
                40888: 28037,
                40889: 28153,
                40890: 28181,
                40891: 28170,
                40892: 28085,
                40893: 28103,
                40894: 28134,
                40895: 28088,
                40896: 28102,
                40897: 28140,
                40898: 28126,
                40899: 28108,
                40900: 28136,
                40901: 28114,
                40902: 28101,
                40903: 28154,
                40904: 28121,
                40905: 28132,
                40906: 28117,
                40907: 28138,
                40908: 28142,
                40909: 28205,
                40910: 28270,
                40911: 28206,
                40912: 28185,
                40913: 28274,
                40914: 28255,
                40915: 28222,
                40916: 28195,
                40917: 28267,
                40918: 28203,
                40919: 28278,
                40920: 28237,
                40921: 28191,
                40922: 28227,
                40923: 28218,
                40924: 28238,
                40925: 28196,
                40926: 28415,
                40927: 28189,
                40928: 28216,
                40929: 28290,
                40930: 28330,
                40931: 28312,
                40932: 28361,
                40933: 28343,
                40934: 28371,
                40935: 28349,
                40936: 28335,
                40937: 28356,
                40938: 28338,
                40939: 28372,
                40940: 28373,
                40941: 28303,
                40942: 28325,
                40943: 28354,
                40944: 28319,
                40945: 28481,
                40946: 28433,
                40947: 28748,
                40948: 28396,
                40949: 28408,
                40950: 28414,
                40951: 28479,
                40952: 28402,
                40953: 28465,
                40954: 28399,
                40955: 28466,
                40956: 28364,
                161: 65377,
                162: 65378,
                163: 65379,
                164: 65380,
                165: 65381,
                166: 65382,
                167: 65383,
                168: 65384,
                169: 65385,
                170: 65386,
                171: 65387,
                172: 65388,
                173: 65389,
                174: 65390,
                175: 65391,
                176: 65392,
                177: 65393,
                178: 65394,
                179: 65395,
                180: 65396,
                181: 65397,
                182: 65398,
                183: 65399,
                184: 65400,
                185: 65401,
                186: 65402,
                187: 65403,
                188: 65404,
                189: 65405,
                190: 65406,
                191: 65407,
                192: 65408,
                193: 65409,
                194: 65410,
                195: 65411,
                196: 65412,
                197: 65413,
                198: 65414,
                199: 65415,
                200: 65416,
                201: 65417,
                202: 65418,
                203: 65419,
                204: 65420,
                205: 65421,
                206: 65422,
                207: 65423,
                208: 65424,
                209: 65425,
                210: 65426,
                211: 65427,
                212: 65428,
                213: 65429,
                214: 65430,
                215: 65431,
                216: 65432,
                217: 65433,
                218: 65434,
                219: 65435,
                220: 65436,
                221: 65437,
                222: 65438,
                223: 65439,
                57408: 28478,
                57409: 28435,
                57410: 28407,
                57411: 28550,
                57412: 28538,
                57413: 28536,
                57414: 28545,
                57415: 28544,
                57416: 28527,
                57417: 28507,
                57418: 28659,
                57419: 28525,
                57420: 28546,
                57421: 28540,
                57422: 28504,
                57423: 28558,
                57424: 28561,
                57425: 28610,
                57426: 28518,
                57427: 28595,
                57428: 28579,
                57429: 28577,
                57430: 28580,
                57431: 28601,
                57432: 28614,
                57433: 28586,
                57434: 28639,
                57435: 28629,
                57436: 28652,
                57437: 28628,
                57438: 28632,
                57439: 28657,
                57440: 28654,
                57441: 28635,
                57442: 28681,
                57443: 28683,
                57444: 28666,
                57445: 28689,
                57446: 28673,
                57447: 28687,
                57448: 28670,
                57449: 28699,
                57450: 28698,
                57451: 28532,
                57452: 28701,
                57453: 28696,
                57454: 28703,
                57455: 28720,
                57456: 28734,
                57457: 28722,
                57458: 28753,
                57459: 28771,
                57460: 28825,
                57461: 28818,
                57462: 28847,
                57463: 28913,
                57464: 28844,
                57465: 28856,
                57466: 28851,
                57467: 28846,
                57468: 28895,
                57469: 28875,
                57470: 28893,
                57472: 28889,
                57473: 28937,
                57474: 28925,
                57475: 28956,
                57476: 28953,
                57477: 29029,
                57478: 29013,
                57479: 29064,
                57480: 29030,
                57481: 29026,
                57482: 29004,
                57483: 29014,
                57484: 29036,
                57485: 29071,
                57486: 29179,
                57487: 29060,
                57488: 29077,
                57489: 29096,
                57490: 29100,
                57491: 29143,
                57492: 29113,
                57493: 29118,
                57494: 29138,
                57495: 29129,
                57496: 29140,
                57497: 29134,
                57498: 29152,
                57499: 29164,
                57500: 29159,
                57501: 29173,
                57502: 29180,
                57503: 29177,
                57504: 29183,
                57505: 29197,
                57506: 29200,
                57507: 29211,
                57508: 29224,
                57509: 29229,
                57510: 29228,
                57511: 29232,
                57512: 29234,
                57513: 29243,
                57514: 29244,
                57515: 29247,
                57516: 29248,
                57517: 29254,
                57518: 29259,
                57519: 29272,
                57520: 29300,
                57521: 29310,
                57522: 29314,
                57523: 29313,
                57524: 29319,
                57525: 29330,
                57526: 29334,
                57527: 29346,
                57528: 29351,
                57529: 29369,
                57530: 29362,
                57531: 29379,
                57532: 29382,
                57533: 29380,
                57534: 29390,
                57535: 29394,
                57536: 29410,
                57537: 29408,
                57538: 29409,
                57539: 29433,
                57540: 29431,
                57541: 20495,
                57542: 29463,
                57543: 29450,
                57544: 29468,
                57545: 29462,
                57546: 29469,
                57547: 29492,
                57548: 29487,
                57549: 29481,
                57550: 29477,
                57551: 29502,
                57552: 29518,
                57553: 29519,
                57554: 40664,
                57555: 29527,
                57556: 29546,
                57557: 29544,
                57558: 29552,
                57559: 29560,
                57560: 29557,
                57561: 29563,
                57562: 29562,
                57563: 29640,
                57564: 29619,
                57565: 29646,
                57566: 29627,
                57567: 29632,
                57568: 29669,
                57569: 29678,
                57570: 29662,
                57571: 29858,
                57572: 29701,
                57573: 29807,
                57574: 29733,
                57575: 29688,
                57576: 29746,
                57577: 29754,
                57578: 29781,
                57579: 29759,
                57580: 29791,
                57581: 29785,
                57582: 29761,
                57583: 29788,
                57584: 29801,
                57585: 29808,
                57586: 29795,
                57587: 29802,
                57588: 29814,
                57589: 29822,
                57590: 29835,
                57591: 29854,
                57592: 29863,
                57593: 29898,
                57594: 29903,
                57595: 29908,
                57596: 29681,
                57664: 29920,
                57665: 29923,
                57666: 29927,
                57667: 29929,
                57668: 29934,
                57669: 29938,
                57670: 29936,
                57671: 29937,
                57672: 29944,
                57673: 29943,
                57674: 29956,
                57675: 29955,
                57676: 29957,
                57677: 29964,
                57678: 29966,
                57679: 29965,
                57680: 29973,
                57681: 29971,
                57682: 29982,
                57683: 29990,
                57684: 29996,
                57685: 30012,
                57686: 30020,
                57687: 30029,
                57688: 30026,
                57689: 30025,
                57690: 30043,
                57691: 30022,
                57692: 30042,
                57693: 30057,
                57694: 30052,
                57695: 30055,
                57696: 30059,
                57697: 30061,
                57698: 30072,
                57699: 30070,
                57700: 30086,
                57701: 30087,
                57702: 30068,
                57703: 30090,
                57704: 30089,
                57705: 30082,
                57706: 30100,
                57707: 30106,
                57708: 30109,
                57709: 30117,
                57710: 30115,
                57711: 30146,
                57712: 30131,
                57713: 30147,
                57714: 30133,
                57715: 30141,
                57716: 30136,
                57717: 30140,
                57718: 30129,
                57719: 30157,
                57720: 30154,
                57721: 30162,
                57722: 30169,
                57723: 30179,
                57724: 30174,
                57725: 30206,
                57726: 30207,
                57728: 30204,
                57729: 30209,
                57730: 30192,
                57731: 30202,
                57732: 30194,
                57733: 30195,
                57734: 30219,
                57735: 30221,
                57736: 30217,
                57737: 30239,
                57738: 30247,
                57739: 30240,
                57740: 30241,
                57741: 30242,
                57742: 30244,
                57743: 30260,
                57744: 30256,
                57745: 30267,
                57746: 30279,
                57747: 30280,
                57748: 30278,
                57749: 30300,
                57750: 30296,
                57751: 30305,
                57752: 30306,
                57753: 30312,
                57754: 30313,
                57755: 30314,
                57756: 30311,
                57757: 30316,
                57758: 30320,
                57759: 30322,
                57760: 30326,
                57761: 30328,
                57762: 30332,
                57763: 30336,
                57764: 30339,
                57765: 30344,
                57766: 30347,
                57767: 30350,
                57768: 30358,
                57769: 30355,
                57770: 30361,
                57771: 30362,
                57772: 30384,
                57773: 30388,
                57774: 30392,
                57775: 30393,
                57776: 30394,
                57777: 30402,
                57778: 30413,
                57779: 30422,
                57780: 30418,
                57781: 30430,
                57782: 30433,
                57783: 30437,
                57784: 30439,
                57785: 30442,
                57786: 34351,
                57787: 30459,
                57788: 30472,
                57789: 30471,
                57790: 30468,
                57791: 30505,
                57792: 30500,
                57793: 30494,
                57794: 30501,
                57795: 30502,
                57796: 30491,
                57797: 30519,
                57798: 30520,
                57799: 30535,
                57800: 30554,
                57801: 30568,
                57802: 30571,
                57803: 30555,
                57804: 30565,
                57805: 30591,
                57806: 30590,
                57807: 30585,
                57808: 30606,
                57809: 30603,
                57810: 30609,
                57811: 30624,
                57812: 30622,
                57813: 30640,
                57814: 30646,
                57815: 30649,
                57816: 30655,
                57817: 30652,
                57818: 30653,
                57819: 30651,
                57820: 30663,
                57821: 30669,
                57822: 30679,
                57823: 30682,
                57824: 30684,
                57825: 30691,
                57826: 30702,
                57827: 30716,
                57828: 30732,
                57829: 30738,
                57830: 31014,
                57831: 30752,
                57832: 31018,
                57833: 30789,
                57834: 30862,
                57835: 30836,
                57836: 30854,
                57837: 30844,
                57838: 30874,
                57839: 30860,
                57840: 30883,
                57841: 30901,
                57842: 30890,
                57843: 30895,
                57844: 30929,
                57845: 30918,
                57846: 30923,
                57847: 30932,
                57848: 30910,
                57849: 30908,
                57850: 30917,
                57851: 30922,
                57852: 30956,
                57920: 30951,
                57921: 30938,
                57922: 30973,
                57923: 30964,
                57924: 30983,
                57925: 30994,
                57926: 30993,
                57927: 31001,
                57928: 31020,
                57929: 31019,
                57930: 31040,
                57931: 31072,
                57932: 31063,
                57933: 31071,
                57934: 31066,
                57935: 31061,
                57936: 31059,
                57937: 31098,
                57938: 31103,
                57939: 31114,
                57940: 31133,
                57941: 31143,
                57942: 40779,
                57943: 31146,
                57944: 31150,
                57945: 31155,
                57946: 31161,
                57947: 31162,
                57948: 31177,
                57949: 31189,
                57950: 31207,
                57951: 31212,
                57952: 31201,
                57953: 31203,
                57954: 31240,
                57955: 31245,
                57956: 31256,
                57957: 31257,
                57958: 31264,
                57959: 31263,
                57960: 31104,
                57961: 31281,
                57962: 31291,
                57963: 31294,
                57964: 31287,
                57965: 31299,
                57966: 31319,
                57967: 31305,
                57968: 31329,
                57969: 31330,
                57970: 31337,
                57971: 40861,
                57972: 31344,
                57973: 31353,
                57974: 31357,
                57975: 31368,
                57976: 31383,
                57977: 31381,
                57978: 31384,
                57979: 31382,
                57980: 31401,
                57981: 31432,
                57982: 31408,
                57984: 31414,
                57985: 31429,
                57986: 31428,
                57987: 31423,
                57988: 36995,
                57989: 31431,
                57990: 31434,
                57991: 31437,
                57992: 31439,
                57993: 31445,
                57994: 31443,
                57995: 31449,
                57996: 31450,
                57997: 31453,
                57998: 31457,
                57999: 31458,
                58e3: 31462,
                58001: 31469,
                58002: 31472,
                58003: 31490,
                58004: 31503,
                58005: 31498,
                58006: 31494,
                58007: 31539,
                58008: 31512,
                58009: 31513,
                58010: 31518,
                58011: 31541,
                58012: 31528,
                58013: 31542,
                58014: 31568,
                58015: 31610,
                58016: 31492,
                58017: 31565,
                58018: 31499,
                58019: 31564,
                58020: 31557,
                58021: 31605,
                58022: 31589,
                58023: 31604,
                58024: 31591,
                58025: 31600,
                58026: 31601,
                58027: 31596,
                58028: 31598,
                58029: 31645,
                58030: 31640,
                58031: 31647,
                58032: 31629,
                58033: 31644,
                58034: 31642,
                58035: 31627,
                58036: 31634,
                58037: 31631,
                58038: 31581,
                58039: 31641,
                58040: 31691,
                58041: 31681,
                58042: 31692,
                58043: 31695,
                58044: 31668,
                58045: 31686,
                58046: 31709,
                58047: 31721,
                58048: 31761,
                58049: 31764,
                58050: 31718,
                58051: 31717,
                58052: 31840,
                58053: 31744,
                58054: 31751,
                58055: 31763,
                58056: 31731,
                58057: 31735,
                58058: 31767,
                58059: 31757,
                58060: 31734,
                58061: 31779,
                58062: 31783,
                58063: 31786,
                58064: 31775,
                58065: 31799,
                58066: 31787,
                58067: 31805,
                58068: 31820,
                58069: 31811,
                58070: 31828,
                58071: 31823,
                58072: 31808,
                58073: 31824,
                58074: 31832,
                58075: 31839,
                58076: 31844,
                58077: 31830,
                58078: 31845,
                58079: 31852,
                58080: 31861,
                58081: 31875,
                58082: 31888,
                58083: 31908,
                58084: 31917,
                58085: 31906,
                58086: 31915,
                58087: 31905,
                58088: 31912,
                58089: 31923,
                58090: 31922,
                58091: 31921,
                58092: 31918,
                58093: 31929,
                58094: 31933,
                58095: 31936,
                58096: 31941,
                58097: 31938,
                58098: 31960,
                58099: 31954,
                58100: 31964,
                58101: 31970,
                58102: 39739,
                58103: 31983,
                58104: 31986,
                58105: 31988,
                58106: 31990,
                58107: 31994,
                58108: 32006,
                58176: 32002,
                58177: 32028,
                58178: 32021,
                58179: 32010,
                58180: 32069,
                58181: 32075,
                58182: 32046,
                58183: 32050,
                58184: 32063,
                58185: 32053,
                58186: 32070,
                58187: 32115,
                58188: 32086,
                58189: 32078,
                58190: 32114,
                58191: 32104,
                58192: 32110,
                58193: 32079,
                58194: 32099,
                58195: 32147,
                58196: 32137,
                58197: 32091,
                58198: 32143,
                58199: 32125,
                58200: 32155,
                58201: 32186,
                58202: 32174,
                58203: 32163,
                58204: 32181,
                58205: 32199,
                58206: 32189,
                58207: 32171,
                58208: 32317,
                58209: 32162,
                58210: 32175,
                58211: 32220,
                58212: 32184,
                58213: 32159,
                58214: 32176,
                58215: 32216,
                58216: 32221,
                58217: 32228,
                58218: 32222,
                58219: 32251,
                58220: 32242,
                58221: 32225,
                58222: 32261,
                58223: 32266,
                58224: 32291,
                58225: 32289,
                58226: 32274,
                58227: 32305,
                58228: 32287,
                58229: 32265,
                58230: 32267,
                58231: 32290,
                58232: 32326,
                58233: 32358,
                58234: 32315,
                58235: 32309,
                58236: 32313,
                58237: 32323,
                58238: 32311,
                58240: 32306,
                58241: 32314,
                58242: 32359,
                58243: 32349,
                58244: 32342,
                58245: 32350,
                58246: 32345,
                58247: 32346,
                58248: 32377,
                58249: 32362,
                58250: 32361,
                58251: 32380,
                58252: 32379,
                58253: 32387,
                58254: 32213,
                58255: 32381,
                58256: 36782,
                58257: 32383,
                58258: 32392,
                58259: 32393,
                58260: 32396,
                58261: 32402,
                58262: 32400,
                58263: 32403,
                58264: 32404,
                58265: 32406,
                58266: 32398,
                58267: 32411,
                58268: 32412,
                58269: 32568,
                58270: 32570,
                58271: 32581,
                58272: 32588,
                58273: 32589,
                58274: 32590,
                58275: 32592,
                58276: 32593,
                58277: 32597,
                58278: 32596,
                58279: 32600,
                58280: 32607,
                58281: 32608,
                58282: 32616,
                58283: 32617,
                58284: 32615,
                58285: 32632,
                58286: 32642,
                58287: 32646,
                58288: 32643,
                58289: 32648,
                58290: 32647,
                58291: 32652,
                58292: 32660,
                58293: 32670,
                58294: 32669,
                58295: 32666,
                58296: 32675,
                58297: 32687,
                58298: 32690,
                58299: 32697,
                58300: 32686,
                58301: 32694,
                58302: 32696,
                58303: 35697,
                58304: 32709,
                58305: 32710,
                58306: 32714,
                58307: 32725,
                58308: 32724,
                58309: 32737,
                58310: 32742,
                58311: 32745,
                58312: 32755,
                58313: 32761,
                58314: 39132,
                58315: 32774,
                58316: 32772,
                58317: 32779,
                58318: 32786,
                58319: 32792,
                58320: 32793,
                58321: 32796,
                58322: 32801,
                58323: 32808,
                58324: 32831,
                58325: 32827,
                58326: 32842,
                58327: 32838,
                58328: 32850,
                58329: 32856,
                58330: 32858,
                58331: 32863,
                58332: 32866,
                58333: 32872,
                58334: 32883,
                58335: 32882,
                58336: 32880,
                58337: 32886,
                58338: 32889,
                58339: 32893,
                58340: 32895,
                58341: 32900,
                58342: 32902,
                58343: 32901,
                58344: 32923,
                58345: 32915,
                58346: 32922,
                58347: 32941,
                58348: 20880,
                58349: 32940,
                58350: 32987,
                58351: 32997,
                58352: 32985,
                58353: 32989,
                58354: 32964,
                58355: 32986,
                58356: 32982,
                58357: 33033,
                58358: 33007,
                58359: 33009,
                58360: 33051,
                58361: 33065,
                58362: 33059,
                58363: 33071,
                58364: 33099,
                58432: 38539,
                58433: 33094,
                58434: 33086,
                58435: 33107,
                58436: 33105,
                58437: 33020,
                58438: 33137,
                58439: 33134,
                58440: 33125,
                58441: 33126,
                58442: 33140,
                58443: 33155,
                58444: 33160,
                58445: 33162,
                58446: 33152,
                58447: 33154,
                58448: 33184,
                58449: 33173,
                58450: 33188,
                58451: 33187,
                58452: 33119,
                58453: 33171,
                58454: 33193,
                58455: 33200,
                58456: 33205,
                58457: 33214,
                58458: 33208,
                58459: 33213,
                58460: 33216,
                58461: 33218,
                58462: 33210,
                58463: 33225,
                58464: 33229,
                58465: 33233,
                58466: 33241,
                58467: 33240,
                58468: 33224,
                58469: 33242,
                58470: 33247,
                58471: 33248,
                58472: 33255,
                58473: 33274,
                58474: 33275,
                58475: 33278,
                58476: 33281,
                58477: 33282,
                58478: 33285,
                58479: 33287,
                58480: 33290,
                58481: 33293,
                58482: 33296,
                58483: 33302,
                58484: 33321,
                58485: 33323,
                58486: 33336,
                58487: 33331,
                58488: 33344,
                58489: 33369,
                58490: 33368,
                58491: 33373,
                58492: 33370,
                58493: 33375,
                58494: 33380,
                58496: 33378,
                58497: 33384,
                58498: 33386,
                58499: 33387,
                58500: 33326,
                58501: 33393,
                58502: 33399,
                58503: 33400,
                58504: 33406,
                58505: 33421,
                58506: 33426,
                58507: 33451,
                58508: 33439,
                58509: 33467,
                58510: 33452,
                58511: 33505,
                58512: 33507,
                58513: 33503,
                58514: 33490,
                58515: 33524,
                58516: 33523,
                58517: 33530,
                58518: 33683,
                58519: 33539,
                58520: 33531,
                58521: 33529,
                58522: 33502,
                58523: 33542,
                58524: 33500,
                58525: 33545,
                58526: 33497,
                58527: 33589,
                58528: 33588,
                58529: 33558,
                58530: 33586,
                58531: 33585,
                58532: 33600,
                58533: 33593,
                58534: 33616,
                58535: 33605,
                58536: 33583,
                58537: 33579,
                58538: 33559,
                58539: 33560,
                58540: 33669,
                58541: 33690,
                58542: 33706,
                58543: 33695,
                58544: 33698,
                58545: 33686,
                58546: 33571,
                58547: 33678,
                58548: 33671,
                58549: 33674,
                58550: 33660,
                58551: 33717,
                58552: 33651,
                58553: 33653,
                58554: 33696,
                58555: 33673,
                58556: 33704,
                58557: 33780,
                58558: 33811,
                58559: 33771,
                58560: 33742,
                58561: 33789,
                58562: 33795,
                58563: 33752,
                58564: 33803,
                58565: 33729,
                58566: 33783,
                58567: 33799,
                58568: 33760,
                58569: 33778,
                58570: 33805,
                58571: 33826,
                58572: 33824,
                58573: 33725,
                58574: 33848,
                58575: 34054,
                58576: 33787,
                58577: 33901,
                58578: 33834,
                58579: 33852,
                58580: 34138,
                58581: 33924,
                58582: 33911,
                58583: 33899,
                58584: 33965,
                58585: 33902,
                58586: 33922,
                58587: 33897,
                58588: 33862,
                58589: 33836,
                58590: 33903,
                58591: 33913,
                58592: 33845,
                58593: 33994,
                58594: 33890,
                58595: 33977,
                58596: 33983,
                58597: 33951,
                58598: 34009,
                58599: 33997,
                58600: 33979,
                58601: 34010,
                58602: 34e3,
                58603: 33985,
                58604: 33990,
                58605: 34006,
                58606: 33953,
                58607: 34081,
                58608: 34047,
                58609: 34036,
                58610: 34071,
                58611: 34072,
                58612: 34092,
                58613: 34079,
                58614: 34069,
                58615: 34068,
                58616: 34044,
                58617: 34112,
                58618: 34147,
                58619: 34136,
                58620: 34120,
                58688: 34113,
                58689: 34306,
                58690: 34123,
                58691: 34133,
                58692: 34176,
                58693: 34212,
                58694: 34184,
                58695: 34193,
                58696: 34186,
                58697: 34216,
                58698: 34157,
                58699: 34196,
                58700: 34203,
                58701: 34282,
                58702: 34183,
                58703: 34204,
                58704: 34167,
                58705: 34174,
                58706: 34192,
                58707: 34249,
                58708: 34234,
                58709: 34255,
                58710: 34233,
                58711: 34256,
                58712: 34261,
                58713: 34269,
                58714: 34277,
                58715: 34268,
                58716: 34297,
                58717: 34314,
                58718: 34323,
                58719: 34315,
                58720: 34302,
                58721: 34298,
                58722: 34310,
                58723: 34338,
                58724: 34330,
                58725: 34352,
                58726: 34367,
                58727: 34381,
                58728: 20053,
                58729: 34388,
                58730: 34399,
                58731: 34407,
                58732: 34417,
                58733: 34451,
                58734: 34467,
                58735: 34473,
                58736: 34474,
                58737: 34443,
                58738: 34444,
                58739: 34486,
                58740: 34479,
                58741: 34500,
                58742: 34502,
                58743: 34480,
                58744: 34505,
                58745: 34851,
                58746: 34475,
                58747: 34516,
                58748: 34526,
                58749: 34537,
                58750: 34540,
                58752: 34527,
                58753: 34523,
                58754: 34543,
                58755: 34578,
                58756: 34566,
                58757: 34568,
                58758: 34560,
                58759: 34563,
                58760: 34555,
                58761: 34577,
                58762: 34569,
                58763: 34573,
                58764: 34553,
                58765: 34570,
                58766: 34612,
                58767: 34623,
                58768: 34615,
                58769: 34619,
                58770: 34597,
                58771: 34601,
                58772: 34586,
                58773: 34656,
                58774: 34655,
                58775: 34680,
                58776: 34636,
                58777: 34638,
                58778: 34676,
                58779: 34647,
                58780: 34664,
                58781: 34670,
                58782: 34649,
                58783: 34643,
                58784: 34659,
                58785: 34666,
                58786: 34821,
                58787: 34722,
                58788: 34719,
                58789: 34690,
                58790: 34735,
                58791: 34763,
                58792: 34749,
                58793: 34752,
                58794: 34768,
                58795: 38614,
                58796: 34731,
                58797: 34756,
                58798: 34739,
                58799: 34759,
                58800: 34758,
                58801: 34747,
                58802: 34799,
                58803: 34802,
                58804: 34784,
                58805: 34831,
                58806: 34829,
                58807: 34814,
                58808: 34806,
                58809: 34807,
                58810: 34830,
                58811: 34770,
                58812: 34833,
                58813: 34838,
                58814: 34837,
                58815: 34850,
                58816: 34849,
                58817: 34865,
                58818: 34870,
                58819: 34873,
                58820: 34855,
                58821: 34875,
                58822: 34884,
                58823: 34882,
                58824: 34898,
                58825: 34905,
                58826: 34910,
                58827: 34914,
                58828: 34923,
                58829: 34945,
                58830: 34942,
                58831: 34974,
                58832: 34933,
                58833: 34941,
                58834: 34997,
                58835: 34930,
                58836: 34946,
                58837: 34967,
                58838: 34962,
                58839: 34990,
                58840: 34969,
                58841: 34978,
                58842: 34957,
                58843: 34980,
                58844: 34992,
                58845: 35007,
                58846: 34993,
                58847: 35011,
                58848: 35012,
                58849: 35028,
                58850: 35032,
                58851: 35033,
                58852: 35037,
                58853: 35065,
                58854: 35074,
                58855: 35068,
                58856: 35060,
                58857: 35048,
                58858: 35058,
                58859: 35076,
                58860: 35084,
                58861: 35082,
                58862: 35091,
                58863: 35139,
                58864: 35102,
                58865: 35109,
                58866: 35114,
                58867: 35115,
                58868: 35137,
                58869: 35140,
                58870: 35131,
                58871: 35126,
                58872: 35128,
                58873: 35148,
                58874: 35101,
                58875: 35168,
                58876: 35166,
                58944: 35174,
                58945: 35172,
                58946: 35181,
                58947: 35178,
                58948: 35183,
                58949: 35188,
                58950: 35191,
                58951: 35198,
                58952: 35203,
                58953: 35208,
                58954: 35210,
                58955: 35219,
                58956: 35224,
                58957: 35233,
                58958: 35241,
                58959: 35238,
                58960: 35244,
                58961: 35247,
                58962: 35250,
                58963: 35258,
                58964: 35261,
                58965: 35263,
                58966: 35264,
                58967: 35290,
                58968: 35292,
                58969: 35293,
                58970: 35303,
                58971: 35316,
                58972: 35320,
                58973: 35331,
                58974: 35350,
                58975: 35344,
                58976: 35340,
                58977: 35355,
                58978: 35357,
                58979: 35365,
                58980: 35382,
                58981: 35393,
                58982: 35419,
                58983: 35410,
                58984: 35398,
                58985: 35400,
                58986: 35452,
                58987: 35437,
                58988: 35436,
                58989: 35426,
                58990: 35461,
                58991: 35458,
                58992: 35460,
                58993: 35496,
                58994: 35489,
                58995: 35473,
                58996: 35493,
                58997: 35494,
                58998: 35482,
                58999: 35491,
                59e3: 35524,
                59001: 35533,
                59002: 35522,
                59003: 35546,
                59004: 35563,
                59005: 35571,
                59006: 35559,
                59008: 35556,
                59009: 35569,
                59010: 35604,
                59011: 35552,
                59012: 35554,
                59013: 35575,
                59014: 35550,
                59015: 35547,
                59016: 35596,
                59017: 35591,
                59018: 35610,
                59019: 35553,
                59020: 35606,
                59021: 35600,
                59022: 35607,
                59023: 35616,
                59024: 35635,
                59025: 38827,
                59026: 35622,
                59027: 35627,
                59028: 35646,
                59029: 35624,
                59030: 35649,
                59031: 35660,
                59032: 35663,
                59033: 35662,
                59034: 35657,
                59035: 35670,
                59036: 35675,
                59037: 35674,
                59038: 35691,
                59039: 35679,
                59040: 35692,
                59041: 35695,
                59042: 35700,
                59043: 35709,
                59044: 35712,
                59045: 35724,
                59046: 35726,
                59047: 35730,
                59048: 35731,
                59049: 35734,
                59050: 35737,
                59051: 35738,
                59052: 35898,
                59053: 35905,
                59054: 35903,
                59055: 35912,
                59056: 35916,
                59057: 35918,
                59058: 35920,
                59059: 35925,
                59060: 35938,
                59061: 35948,
                59062: 35960,
                59063: 35962,
                59064: 35970,
                59065: 35977,
                59066: 35973,
                59067: 35978,
                59068: 35981,
                59069: 35982,
                59070: 35988,
                59071: 35964,
                59072: 35992,
                59073: 25117,
                59074: 36013,
                59075: 36010,
                59076: 36029,
                59077: 36018,
                59078: 36019,
                59079: 36014,
                59080: 36022,
                59081: 36040,
                59082: 36033,
                59083: 36068,
                59084: 36067,
                59085: 36058,
                59086: 36093,
                59087: 36090,
                59088: 36091,
                59089: 36100,
                59090: 36101,
                59091: 36106,
                59092: 36103,
                59093: 36111,
                59094: 36109,
                59095: 36112,
                59096: 40782,
                59097: 36115,
                59098: 36045,
                59099: 36116,
                59100: 36118,
                59101: 36199,
                59102: 36205,
                59103: 36209,
                59104: 36211,
                59105: 36225,
                59106: 36249,
                59107: 36290,
                59108: 36286,
                59109: 36282,
                59110: 36303,
                59111: 36314,
                59112: 36310,
                59113: 36300,
                59114: 36315,
                59115: 36299,
                59116: 36330,
                59117: 36331,
                59118: 36319,
                59119: 36323,
                59120: 36348,
                59121: 36360,
                59122: 36361,
                59123: 36351,
                59124: 36381,
                59125: 36382,
                59126: 36368,
                59127: 36383,
                59128: 36418,
                59129: 36405,
                59130: 36400,
                59131: 36404,
                59132: 36426,
                59200: 36423,
                59201: 36425,
                59202: 36428,
                59203: 36432,
                59204: 36424,
                59205: 36441,
                59206: 36452,
                59207: 36448,
                59208: 36394,
                59209: 36451,
                59210: 36437,
                59211: 36470,
                59212: 36466,
                59213: 36476,
                59214: 36481,
                59215: 36487,
                59216: 36485,
                59217: 36484,
                59218: 36491,
                59219: 36490,
                59220: 36499,
                59221: 36497,
                59222: 36500,
                59223: 36505,
                59224: 36522,
                59225: 36513,
                59226: 36524,
                59227: 36528,
                59228: 36550,
                59229: 36529,
                59230: 36542,
                59231: 36549,
                59232: 36552,
                59233: 36555,
                59234: 36571,
                59235: 36579,
                59236: 36604,
                59237: 36603,
                59238: 36587,
                59239: 36606,
                59240: 36618,
                59241: 36613,
                59242: 36629,
                59243: 36626,
                59244: 36633,
                59245: 36627,
                59246: 36636,
                59247: 36639,
                59248: 36635,
                59249: 36620,
                59250: 36646,
                59251: 36659,
                59252: 36667,
                59253: 36665,
                59254: 36677,
                59255: 36674,
                59256: 36670,
                59257: 36684,
                59258: 36681,
                59259: 36678,
                59260: 36686,
                59261: 36695,
                59262: 36700,
                59264: 36706,
                59265: 36707,
                59266: 36708,
                59267: 36764,
                59268: 36767,
                59269: 36771,
                59270: 36781,
                59271: 36783,
                59272: 36791,
                59273: 36826,
                59274: 36837,
                59275: 36834,
                59276: 36842,
                59277: 36847,
                59278: 36999,
                59279: 36852,
                59280: 36869,
                59281: 36857,
                59282: 36858,
                59283: 36881,
                59284: 36885,
                59285: 36897,
                59286: 36877,
                59287: 36894,
                59288: 36886,
                59289: 36875,
                59290: 36903,
                59291: 36918,
                59292: 36917,
                59293: 36921,
                59294: 36856,
                59295: 36943,
                59296: 36944,
                59297: 36945,
                59298: 36946,
                59299: 36878,
                59300: 36937,
                59301: 36926,
                59302: 36950,
                59303: 36952,
                59304: 36958,
                59305: 36968,
                59306: 36975,
                59307: 36982,
                59308: 38568,
                59309: 36978,
                59310: 36994,
                59311: 36989,
                59312: 36993,
                59313: 36992,
                59314: 37002,
                59315: 37001,
                59316: 37007,
                59317: 37032,
                59318: 37039,
                59319: 37041,
                59320: 37045,
                59321: 37090,
                59322: 37092,
                59323: 25160,
                59324: 37083,
                59325: 37122,
                59326: 37138,
                59327: 37145,
                59328: 37170,
                59329: 37168,
                59330: 37194,
                59331: 37206,
                59332: 37208,
                59333: 37219,
                59334: 37221,
                59335: 37225,
                59336: 37235,
                59337: 37234,
                59338: 37259,
                59339: 37257,
                59340: 37250,
                59341: 37282,
                59342: 37291,
                59343: 37295,
                59344: 37290,
                59345: 37301,
                59346: 37300,
                59347: 37306,
                59348: 37312,
                59349: 37313,
                59350: 37321,
                59351: 37323,
                59352: 37328,
                59353: 37334,
                59354: 37343,
                59355: 37345,
                59356: 37339,
                59357: 37372,
                59358: 37365,
                59359: 37366,
                59360: 37406,
                59361: 37375,
                59362: 37396,
                59363: 37420,
                59364: 37397,
                59365: 37393,
                59366: 37470,
                59367: 37463,
                59368: 37445,
                59369: 37449,
                59370: 37476,
                59371: 37448,
                59372: 37525,
                59373: 37439,
                59374: 37451,
                59375: 37456,
                59376: 37532,
                59377: 37526,
                59378: 37523,
                59379: 37531,
                59380: 37466,
                59381: 37583,
                59382: 37561,
                59383: 37559,
                59384: 37609,
                59385: 37647,
                59386: 37626,
                59387: 37700,
                59388: 37678,
                59456: 37657,
                59457: 37666,
                59458: 37658,
                59459: 37667,
                59460: 37690,
                59461: 37685,
                59462: 37691,
                59463: 37724,
                59464: 37728,
                59465: 37756,
                59466: 37742,
                59467: 37718,
                59468: 37808,
                59469: 37804,
                59470: 37805,
                59471: 37780,
                59472: 37817,
                59473: 37846,
                59474: 37847,
                59475: 37864,
                59476: 37861,
                59477: 37848,
                59478: 37827,
                59479: 37853,
                59480: 37840,
                59481: 37832,
                59482: 37860,
                59483: 37914,
                59484: 37908,
                59485: 37907,
                59486: 37891,
                59487: 37895,
                59488: 37904,
                59489: 37942,
                59490: 37931,
                59491: 37941,
                59492: 37921,
                59493: 37946,
                59494: 37953,
                59495: 37970,
                59496: 37956,
                59497: 37979,
                59498: 37984,
                59499: 37986,
                59500: 37982,
                59501: 37994,
                59502: 37417,
                59503: 38e3,
                59504: 38005,
                59505: 38007,
                59506: 38013,
                59507: 37978,
                59508: 38012,
                59509: 38014,
                59510: 38017,
                59511: 38015,
                59512: 38274,
                59513: 38279,
                59514: 38282,
                59515: 38292,
                59516: 38294,
                59517: 38296,
                59518: 38297,
                59520: 38304,
                59521: 38312,
                59522: 38311,
                59523: 38317,
                59524: 38332,
                59525: 38331,
                59526: 38329,
                59527: 38334,
                59528: 38346,
                59529: 28662,
                59530: 38339,
                59531: 38349,
                59532: 38348,
                59533: 38357,
                59534: 38356,
                59535: 38358,
                59536: 38364,
                59537: 38369,
                59538: 38373,
                59539: 38370,
                59540: 38433,
                59541: 38440,
                59542: 38446,
                59543: 38447,
                59544: 38466,
                59545: 38476,
                59546: 38479,
                59547: 38475,
                59548: 38519,
                59549: 38492,
                59550: 38494,
                59551: 38493,
                59552: 38495,
                59553: 38502,
                59554: 38514,
                59555: 38508,
                59556: 38541,
                59557: 38552,
                59558: 38549,
                59559: 38551,
                59560: 38570,
                59561: 38567,
                59562: 38577,
                59563: 38578,
                59564: 38576,
                59565: 38580,
                59566: 38582,
                59567: 38584,
                59568: 38585,
                59569: 38606,
                59570: 38603,
                59571: 38601,
                59572: 38605,
                59573: 35149,
                59574: 38620,
                59575: 38669,
                59576: 38613,
                59577: 38649,
                59578: 38660,
                59579: 38662,
                59580: 38664,
                59581: 38675,
                59582: 38670,
                59583: 38673,
                59584: 38671,
                59585: 38678,
                59586: 38681,
                59587: 38692,
                59588: 38698,
                59589: 38704,
                59590: 38713,
                59591: 38717,
                59592: 38718,
                59593: 38724,
                59594: 38726,
                59595: 38728,
                59596: 38722,
                59597: 38729,
                59598: 38748,
                59599: 38752,
                59600: 38756,
                59601: 38758,
                59602: 38760,
                59603: 21202,
                59604: 38763,
                59605: 38769,
                59606: 38777,
                59607: 38789,
                59608: 38780,
                59609: 38785,
                59610: 38778,
                59611: 38790,
                59612: 38795,
                59613: 38799,
                59614: 38800,
                59615: 38812,
                59616: 38824,
                59617: 38822,
                59618: 38819,
                59619: 38835,
                59620: 38836,
                59621: 38851,
                59622: 38854,
                59623: 38856,
                59624: 38859,
                59625: 38876,
                59626: 38893,
                59627: 40783,
                59628: 38898,
                59629: 31455,
                59630: 38902,
                59631: 38901,
                59632: 38927,
                59633: 38924,
                59634: 38968,
                59635: 38948,
                59636: 38945,
                59637: 38967,
                59638: 38973,
                59639: 38982,
                59640: 38991,
                59641: 38987,
                59642: 39019,
                59643: 39023,
                59644: 39024,
                59712: 39025,
                59713: 39028,
                59714: 39027,
                59715: 39082,
                59716: 39087,
                59717: 39089,
                59718: 39094,
                59719: 39108,
                59720: 39107,
                59721: 39110,
                59722: 39145,
                59723: 39147,
                59724: 39171,
                59725: 39177,
                59726: 39186,
                59727: 39188,
                59728: 39192,
                59729: 39201,
                59730: 39197,
                59731: 39198,
                59732: 39204,
                59733: 39200,
                59734: 39212,
                59735: 39214,
                59736: 39229,
                59737: 39230,
                59738: 39234,
                59739: 39241,
                59740: 39237,
                59741: 39248,
                59742: 39243,
                59743: 39249,
                59744: 39250,
                59745: 39244,
                59746: 39253,
                59747: 39319,
                59748: 39320,
                59749: 39333,
                59750: 39341,
                59751: 39342,
                59752: 39356,
                59753: 39391,
                59754: 39387,
                59755: 39389,
                59756: 39384,
                59757: 39377,
                59758: 39405,
                59759: 39406,
                59760: 39409,
                59761: 39410,
                59762: 39419,
                59763: 39416,
                59764: 39425,
                59765: 39439,
                59766: 39429,
                59767: 39394,
                59768: 39449,
                59769: 39467,
                59770: 39479,
                59771: 39493,
                59772: 39490,
                59773: 39488,
                59774: 39491,
                59776: 39486,
                59777: 39509,
                59778: 39501,
                59779: 39515,
                59780: 39511,
                59781: 39519,
                59782: 39522,
                59783: 39525,
                59784: 39524,
                59785: 39529,
                59786: 39531,
                59787: 39530,
                59788: 39597,
                59789: 39600,
                59790: 39612,
                59791: 39616,
                59792: 39631,
                59793: 39633,
                59794: 39635,
                59795: 39636,
                59796: 39646,
                59797: 39647,
                59798: 39650,
                59799: 39651,
                59800: 39654,
                59801: 39663,
                59802: 39659,
                59803: 39662,
                59804: 39668,
                59805: 39665,
                59806: 39671,
                59807: 39675,
                59808: 39686,
                59809: 39704,
                59810: 39706,
                59811: 39711,
                59812: 39714,
                59813: 39715,
                59814: 39717,
                59815: 39719,
                59816: 39720,
                59817: 39721,
                59818: 39722,
                59819: 39726,
                59820: 39727,
                59821: 39730,
                59822: 39748,
                59823: 39747,
                59824: 39759,
                59825: 39757,
                59826: 39758,
                59827: 39761,
                59828: 39768,
                59829: 39796,
                59830: 39827,
                59831: 39811,
                59832: 39825,
                59833: 39830,
                59834: 39831,
                59835: 39839,
                59836: 39840,
                59837: 39848,
                59838: 39860,
                59839: 39872,
                59840: 39882,
                59841: 39865,
                59842: 39878,
                59843: 39887,
                59844: 39889,
                59845: 39890,
                59846: 39907,
                59847: 39906,
                59848: 39908,
                59849: 39892,
                59850: 39905,
                59851: 39994,
                59852: 39922,
                59853: 39921,
                59854: 39920,
                59855: 39957,
                59856: 39956,
                59857: 39945,
                59858: 39955,
                59859: 39948,
                59860: 39942,
                59861: 39944,
                59862: 39954,
                59863: 39946,
                59864: 39940,
                59865: 39982,
                59866: 39963,
                59867: 39973,
                59868: 39972,
                59869: 39969,
                59870: 39984,
                59871: 40007,
                59872: 39986,
                59873: 40006,
                59874: 39998,
                59875: 40026,
                59876: 40032,
                59877: 40039,
                59878: 40054,
                59879: 40056,
                59880: 40167,
                59881: 40172,
                59882: 40176,
                59883: 40201,
                59884: 40200,
                59885: 40171,
                59886: 40195,
                59887: 40198,
                59888: 40234,
                59889: 40230,
                59890: 40367,
                59891: 40227,
                59892: 40223,
                59893: 40260,
                59894: 40213,
                59895: 40210,
                59896: 40257,
                59897: 40255,
                59898: 40254,
                59899: 40262,
                59900: 40264,
                59968: 40285,
                59969: 40286,
                59970: 40292,
                59971: 40273,
                59972: 40272,
                59973: 40281,
                59974: 40306,
                59975: 40329,
                59976: 40327,
                59977: 40363,
                59978: 40303,
                59979: 40314,
                59980: 40346,
                59981: 40356,
                59982: 40361,
                59983: 40370,
                59984: 40388,
                59985: 40385,
                59986: 40379,
                59987: 40376,
                59988: 40378,
                59989: 40390,
                59990: 40399,
                59991: 40386,
                59992: 40409,
                59993: 40403,
                59994: 40440,
                59995: 40422,
                59996: 40429,
                59997: 40431,
                59998: 40445,
                59999: 40474,
                6e4: 40475,
                60001: 40478,
                60002: 40565,
                60003: 40569,
                60004: 40573,
                60005: 40577,
                60006: 40584,
                60007: 40587,
                60008: 40588,
                60009: 40594,
                60010: 40597,
                60011: 40593,
                60012: 40605,
                60013: 40613,
                60014: 40617,
                60015: 40632,
                60016: 40618,
                60017: 40621,
                60018: 38753,
                60019: 40652,
                60020: 40654,
                60021: 40655,
                60022: 40656,
                60023: 40660,
                60024: 40668,
                60025: 40670,
                60026: 40669,
                60027: 40672,
                60028: 40677,
                60029: 40680,
                60030: 40687,
                60032: 40692,
                60033: 40694,
                60034: 40695,
                60035: 40697,
                60036: 40699,
                60037: 40700,
                60038: 40701,
                60039: 40711,
                60040: 40712,
                60041: 30391,
                60042: 40725,
                60043: 40737,
                60044: 40748,
                60045: 40766,
                60046: 40778,
                60047: 40786,
                60048: 40788,
                60049: 40803,
                60050: 40799,
                60051: 40800,
                60052: 40801,
                60053: 40806,
                60054: 40807,
                60055: 40812,
                60056: 40810,
                60057: 40823,
                60058: 40818,
                60059: 40822,
                60060: 40853,
                60061: 40860,
                60062: 40864,
                60063: 22575,
                60064: 27079,
                60065: 36953,
                60066: 29796,
                60067: 20956,
                60068: 29081
            }
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = i(1)
              , s = i(2);
            function a(f, d, h, x) {
                var y;
                d.degree() < h.degree() && (y = [h, d],
                d = y[0],
                h = y[1]);
                for (var m = d, E = h, g = f.zero, p = f.one; E.degree() >= x / 2; ) {
                    var v = m
                      , _ = g;
                    if (m = E,
                    g = p,
                    m.isZero())
                        return null;
                    E = v;
                    for (var b = f.zero, C = m.getCoefficient(m.degree()), w = f.inverse(C); E.degree() >= m.degree() && !E.isZero(); ) {
                        var T = E.degree() - m.degree()
                          , A = f.multiply(E.getCoefficient(E.degree()), w);
                        b = b.addOrSubtract(f.buildMonomial(T, A)),
                        E = E.addOrSubtract(m.multiplyByMonomial(T, A))
                    }
                    if (p = b.multiplyPoly(g).addOrSubtract(_),
                    E.degree() >= m.degree())
                        return null
                }
                var B = p.getCoefficient(0);
                if (B === 0)
                    return null;
                var S = f.inverse(B);
                return [p.multiply(S), E.multiply(S)]
            }
            function l(f, d) {
                var h = d.degree();
                if (h === 1)
                    return [d.getCoefficient(1)];
                for (var x = new Array(h), y = 0, m = 1; m < f.size && y < h; m++)
                    d.evaluateAt(m) === 0 && (x[y] = f.inverse(m),
                    y++);
                return y !== h ? null : x
            }
            function c(f, d, h) {
                for (var x = h.length, y = new Array(x), m = 0; m < x; m++) {
                    for (var E = f.inverse(h[m]), g = 1, p = 0; p < x; p++)
                        m !== p && (g = f.multiply(g, o.addOrSubtractGF(1, f.multiply(h[p], E))));
                    y[m] = f.multiply(d.evaluateAt(E), f.inverse(g)),
                    f.generatorBase !== 0 && (y[m] = f.multiply(y[m], E))
                }
                return y
            }
            function u(f, d) {
                var h = new Uint8ClampedArray(f.length);
                h.set(f);
                for (var x = new o.default(285,256,0), y = new s.default(x,h), m = new Uint8ClampedArray(d), E = !1, g = 0; g < d; g++) {
                    var p = y.evaluateAt(x.exp(g + x.generatorBase));
                    m[m.length - 1 - g] = p,
                    p !== 0 && (E = !0)
                }
                if (!E)
                    return h;
                var v = new s.default(x,m)
                  , _ = a(x, x.buildMonomial(d, 1), v, d);
                if (_ === null)
                    return null;
                var b = l(x, _[0]);
                if (b == null)
                    return null;
                for (var C = c(x, _[1], b), w = 0; w < b.length; w++) {
                    var T = h.length - 1 - x.log(b[w]);
                    if (T < 0)
                        return null;
                    h[T] = o.addOrSubtractGF(h[T], C[w])
                }
                return h
            }
            n.decode = u
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            }),
            n.VERSIONS = [{
                infoBits: null,
                versionNumber: 1,
                alignmentPatternCenters: [],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 7,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 19
                    }]
                }, {
                    ecCodewordsPerBlock: 10,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 16
                    }]
                }, {
                    ecCodewordsPerBlock: 13,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 13
                    }]
                }, {
                    ecCodewordsPerBlock: 17,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 9
                    }]
                }]
            }, {
                infoBits: null,
                versionNumber: 2,
                alignmentPatternCenters: [6, 18],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 10,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 34
                    }]
                }, {
                    ecCodewordsPerBlock: 16,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 28
                    }]
                }, {
                    ecCodewordsPerBlock: 22,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 22
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: null,
                versionNumber: 3,
                alignmentPatternCenters: [6, 22],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 15,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 55
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 44
                    }]
                }, {
                    ecCodewordsPerBlock: 18,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 17
                    }]
                }, {
                    ecCodewordsPerBlock: 22,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 13
                    }]
                }]
            }, {
                infoBits: null,
                versionNumber: 4,
                alignmentPatternCenters: [6, 26],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 20,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 80
                    }]
                }, {
                    ecCodewordsPerBlock: 18,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 32
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 24
                    }]
                }, {
                    ecCodewordsPerBlock: 16,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 9
                    }]
                }]
            }, {
                infoBits: null,
                versionNumber: 5,
                alignmentPatternCenters: [6, 30],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 108
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 43
                    }]
                }, {
                    ecCodewordsPerBlock: 18,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 16
                    }]
                }, {
                    ecCodewordsPerBlock: 22,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 11
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 12
                    }]
                }]
            }, {
                infoBits: null,
                versionNumber: 6,
                alignmentPatternCenters: [6, 34],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 18,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 68
                    }]
                }, {
                    ecCodewordsPerBlock: 16,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 27
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 19
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 15
                    }]
                }]
            }, {
                infoBits: 31892,
                versionNumber: 7,
                alignmentPatternCenters: [6, 22, 38],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 20,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 78
                    }]
                }, {
                    ecCodewordsPerBlock: 18,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 31
                    }]
                }, {
                    ecCodewordsPerBlock: 18,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 14
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 15
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 13
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 14
                    }]
                }]
            }, {
                infoBits: 34236,
                versionNumber: 8,
                alignmentPatternCenters: [6, 24, 42],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 97
                    }]
                }, {
                    ecCodewordsPerBlock: 22,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 38
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 39
                    }]
                }, {
                    ecCodewordsPerBlock: 22,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 18
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 19
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 14
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 15
                    }]
                }]
            }, {
                infoBits: 39577,
                versionNumber: 9,
                alignmentPatternCenters: [6, 26, 46],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 116
                    }]
                }, {
                    ecCodewordsPerBlock: 22,
                    ecBlocks: [{
                        numBlocks: 3,
                        dataCodewordsPerBlock: 36
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 37
                    }]
                }, {
                    ecCodewordsPerBlock: 20,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 16
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 17
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 12
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 13
                    }]
                }]
            }, {
                infoBits: 42195,
                versionNumber: 10,
                alignmentPatternCenters: [6, 28, 50],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 18,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 68
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 69
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 43
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 44
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 6,
                        dataCodewordsPerBlock: 19
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 20
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 6,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 48118,
                versionNumber: 11,
                alignmentPatternCenters: [6, 30, 54],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 20,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 81
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 50
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 51
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 22
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 23
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 3,
                        dataCodewordsPerBlock: 12
                    }, {
                        numBlocks: 8,
                        dataCodewordsPerBlock: 13
                    }]
                }]
            }, {
                infoBits: 51042,
                versionNumber: 12,
                alignmentPatternCenters: [6, 32, 58],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 92
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 93
                    }]
                }, {
                    ecCodewordsPerBlock: 22,
                    ecBlocks: [{
                        numBlocks: 6,
                        dataCodewordsPerBlock: 36
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 37
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 20
                    }, {
                        numBlocks: 6,
                        dataCodewordsPerBlock: 21
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 7,
                        dataCodewordsPerBlock: 14
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 15
                    }]
                }]
            }, {
                infoBits: 55367,
                versionNumber: 13,
                alignmentPatternCenters: [6, 34, 62],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 107
                    }]
                }, {
                    ecCodewordsPerBlock: 22,
                    ecBlocks: [{
                        numBlocks: 8,
                        dataCodewordsPerBlock: 37
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 38
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 8,
                        dataCodewordsPerBlock: 20
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 21
                    }]
                }, {
                    ecCodewordsPerBlock: 22,
                    ecBlocks: [{
                        numBlocks: 12,
                        dataCodewordsPerBlock: 11
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 12
                    }]
                }]
            }, {
                infoBits: 58893,
                versionNumber: 14,
                alignmentPatternCenters: [6, 26, 46, 66],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 3,
                        dataCodewordsPerBlock: 115
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 116
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 40
                    }, {
                        numBlocks: 5,
                        dataCodewordsPerBlock: 41
                    }]
                }, {
                    ecCodewordsPerBlock: 20,
                    ecBlocks: [{
                        numBlocks: 11,
                        dataCodewordsPerBlock: 16
                    }, {
                        numBlocks: 5,
                        dataCodewordsPerBlock: 17
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 11,
                        dataCodewordsPerBlock: 12
                    }, {
                        numBlocks: 5,
                        dataCodewordsPerBlock: 13
                    }]
                }]
            }, {
                infoBits: 63784,
                versionNumber: 15,
                alignmentPatternCenters: [6, 26, 48, 70],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 22,
                    ecBlocks: [{
                        numBlocks: 5,
                        dataCodewordsPerBlock: 87
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 88
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 5,
                        dataCodewordsPerBlock: 41
                    }, {
                        numBlocks: 5,
                        dataCodewordsPerBlock: 42
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 5,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 7,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 11,
                        dataCodewordsPerBlock: 12
                    }, {
                        numBlocks: 7,
                        dataCodewordsPerBlock: 13
                    }]
                }]
            }, {
                infoBits: 68472,
                versionNumber: 16,
                alignmentPatternCenters: [6, 26, 50, 74],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 5,
                        dataCodewordsPerBlock: 98
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 99
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 7,
                        dataCodewordsPerBlock: 45
                    }, {
                        numBlocks: 3,
                        dataCodewordsPerBlock: 46
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 15,
                        dataCodewordsPerBlock: 19
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 20
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 3,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 13,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 70749,
                versionNumber: 17,
                alignmentPatternCenters: [6, 30, 54, 78],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 107
                    }, {
                        numBlocks: 5,
                        dataCodewordsPerBlock: 108
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 10,
                        dataCodewordsPerBlock: 46
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 47
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 22
                    }, {
                        numBlocks: 15,
                        dataCodewordsPerBlock: 23
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 14
                    }, {
                        numBlocks: 17,
                        dataCodewordsPerBlock: 15
                    }]
                }]
            }, {
                infoBits: 76311,
                versionNumber: 18,
                alignmentPatternCenters: [6, 30, 56, 82],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 5,
                        dataCodewordsPerBlock: 120
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 121
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 9,
                        dataCodewordsPerBlock: 43
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 44
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 17,
                        dataCodewordsPerBlock: 22
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 23
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 14
                    }, {
                        numBlocks: 19,
                        dataCodewordsPerBlock: 15
                    }]
                }]
            }, {
                infoBits: 79154,
                versionNumber: 19,
                alignmentPatternCenters: [6, 30, 58, 86],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 3,
                        dataCodewordsPerBlock: 113
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 114
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 3,
                        dataCodewordsPerBlock: 44
                    }, {
                        numBlocks: 11,
                        dataCodewordsPerBlock: 45
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 17,
                        dataCodewordsPerBlock: 21
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 22
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 9,
                        dataCodewordsPerBlock: 13
                    }, {
                        numBlocks: 16,
                        dataCodewordsPerBlock: 14
                    }]
                }]
            }, {
                infoBits: 84390,
                versionNumber: 20,
                alignmentPatternCenters: [6, 34, 62, 90],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 3,
                        dataCodewordsPerBlock: 107
                    }, {
                        numBlocks: 5,
                        dataCodewordsPerBlock: 108
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 3,
                        dataCodewordsPerBlock: 41
                    }, {
                        numBlocks: 13,
                        dataCodewordsPerBlock: 42
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 15,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 5,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 15,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 10,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 87683,
                versionNumber: 21,
                alignmentPatternCenters: [6, 28, 50, 72, 94],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 116
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 117
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 17,
                        dataCodewordsPerBlock: 42
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 17,
                        dataCodewordsPerBlock: 22
                    }, {
                        numBlocks: 6,
                        dataCodewordsPerBlock: 23
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 19,
                        dataCodewordsPerBlock: 16
                    }, {
                        numBlocks: 6,
                        dataCodewordsPerBlock: 17
                    }]
                }]
            }, {
                infoBits: 92361,
                versionNumber: 22,
                alignmentPatternCenters: [6, 26, 50, 74, 98],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 111
                    }, {
                        numBlocks: 7,
                        dataCodewordsPerBlock: 112
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 17,
                        dataCodewordsPerBlock: 46
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 7,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 16,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 34,
                        dataCodewordsPerBlock: 13
                    }]
                }]
            }, {
                infoBits: 96236,
                versionNumber: 23,
                alignmentPatternCenters: [6, 30, 54, 74, 102],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 121
                    }, {
                        numBlocks: 5,
                        dataCodewordsPerBlock: 122
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 47
                    }, {
                        numBlocks: 14,
                        dataCodewordsPerBlock: 48
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 11,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 14,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 16,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 14,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 102084,
                versionNumber: 24,
                alignmentPatternCenters: [6, 28, 54, 80, 106],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 6,
                        dataCodewordsPerBlock: 117
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 118
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 6,
                        dataCodewordsPerBlock: 45
                    }, {
                        numBlocks: 14,
                        dataCodewordsPerBlock: 46
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 11,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 16,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 30,
                        dataCodewordsPerBlock: 16
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 17
                    }]
                }]
            }, {
                infoBits: 102881,
                versionNumber: 25,
                alignmentPatternCenters: [6, 32, 58, 84, 110],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 8,
                        dataCodewordsPerBlock: 106
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 107
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 8,
                        dataCodewordsPerBlock: 47
                    }, {
                        numBlocks: 13,
                        dataCodewordsPerBlock: 48
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 7,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 22,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 22,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 13,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 110507,
                versionNumber: 26,
                alignmentPatternCenters: [6, 30, 58, 86, 114],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 10,
                        dataCodewordsPerBlock: 114
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 115
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 19,
                        dataCodewordsPerBlock: 46
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 47
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 28,
                        dataCodewordsPerBlock: 22
                    }, {
                        numBlocks: 6,
                        dataCodewordsPerBlock: 23
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 33,
                        dataCodewordsPerBlock: 16
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 17
                    }]
                }]
            }, {
                infoBits: 110734,
                versionNumber: 27,
                alignmentPatternCenters: [6, 34, 62, 90, 118],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 8,
                        dataCodewordsPerBlock: 122
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 123
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 22,
                        dataCodewordsPerBlock: 45
                    }, {
                        numBlocks: 3,
                        dataCodewordsPerBlock: 46
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 8,
                        dataCodewordsPerBlock: 23
                    }, {
                        numBlocks: 26,
                        dataCodewordsPerBlock: 24
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 12,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 28,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 117786,
                versionNumber: 28,
                alignmentPatternCenters: [6, 26, 50, 74, 98, 122],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 3,
                        dataCodewordsPerBlock: 117
                    }, {
                        numBlocks: 10,
                        dataCodewordsPerBlock: 118
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 3,
                        dataCodewordsPerBlock: 45
                    }, {
                        numBlocks: 23,
                        dataCodewordsPerBlock: 46
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 31,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 11,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 31,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 119615,
                versionNumber: 29,
                alignmentPatternCenters: [6, 30, 54, 78, 102, 126],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 7,
                        dataCodewordsPerBlock: 116
                    }, {
                        numBlocks: 7,
                        dataCodewordsPerBlock: 117
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 21,
                        dataCodewordsPerBlock: 45
                    }, {
                        numBlocks: 7,
                        dataCodewordsPerBlock: 46
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 23
                    }, {
                        numBlocks: 37,
                        dataCodewordsPerBlock: 24
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 19,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 26,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 126325,
                versionNumber: 30,
                alignmentPatternCenters: [6, 26, 52, 78, 104, 130],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 5,
                        dataCodewordsPerBlock: 115
                    }, {
                        numBlocks: 10,
                        dataCodewordsPerBlock: 116
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 19,
                        dataCodewordsPerBlock: 47
                    }, {
                        numBlocks: 10,
                        dataCodewordsPerBlock: 48
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 15,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 25,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 23,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 25,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 127568,
                versionNumber: 31,
                alignmentPatternCenters: [6, 30, 56, 82, 108, 134],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 13,
                        dataCodewordsPerBlock: 115
                    }, {
                        numBlocks: 3,
                        dataCodewordsPerBlock: 116
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 46
                    }, {
                        numBlocks: 29,
                        dataCodewordsPerBlock: 47
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 42,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 23,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 28,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 133589,
                versionNumber: 32,
                alignmentPatternCenters: [6, 34, 60, 86, 112, 138],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 17,
                        dataCodewordsPerBlock: 115
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 10,
                        dataCodewordsPerBlock: 46
                    }, {
                        numBlocks: 23,
                        dataCodewordsPerBlock: 47
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 10,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 35,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 19,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 35,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 136944,
                versionNumber: 33,
                alignmentPatternCenters: [6, 30, 58, 86, 114, 142],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 17,
                        dataCodewordsPerBlock: 115
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 116
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 14,
                        dataCodewordsPerBlock: 46
                    }, {
                        numBlocks: 21,
                        dataCodewordsPerBlock: 47
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 29,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 19,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 11,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 46,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 141498,
                versionNumber: 34,
                alignmentPatternCenters: [6, 34, 62, 90, 118, 146],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 13,
                        dataCodewordsPerBlock: 115
                    }, {
                        numBlocks: 6,
                        dataCodewordsPerBlock: 116
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 14,
                        dataCodewordsPerBlock: 46
                    }, {
                        numBlocks: 23,
                        dataCodewordsPerBlock: 47
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 44,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 7,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 59,
                        dataCodewordsPerBlock: 16
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 17
                    }]
                }]
            }, {
                infoBits: 145311,
                versionNumber: 35,
                alignmentPatternCenters: [6, 30, 54, 78, 102, 126, 150],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 12,
                        dataCodewordsPerBlock: 121
                    }, {
                        numBlocks: 7,
                        dataCodewordsPerBlock: 122
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 12,
                        dataCodewordsPerBlock: 47
                    }, {
                        numBlocks: 26,
                        dataCodewordsPerBlock: 48
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 39,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 14,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 22,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 41,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 150283,
                versionNumber: 36,
                alignmentPatternCenters: [6, 24, 50, 76, 102, 128, 154],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 6,
                        dataCodewordsPerBlock: 121
                    }, {
                        numBlocks: 14,
                        dataCodewordsPerBlock: 122
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 6,
                        dataCodewordsPerBlock: 47
                    }, {
                        numBlocks: 34,
                        dataCodewordsPerBlock: 48
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 46,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 10,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 64,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 152622,
                versionNumber: 37,
                alignmentPatternCenters: [6, 28, 54, 80, 106, 132, 158],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 17,
                        dataCodewordsPerBlock: 122
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 123
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 29,
                        dataCodewordsPerBlock: 46
                    }, {
                        numBlocks: 14,
                        dataCodewordsPerBlock: 47
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 49,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 10,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 24,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 46,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 158308,
                versionNumber: 38,
                alignmentPatternCenters: [6, 32, 58, 84, 110, 136, 162],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 122
                    }, {
                        numBlocks: 18,
                        dataCodewordsPerBlock: 123
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 13,
                        dataCodewordsPerBlock: 46
                    }, {
                        numBlocks: 32,
                        dataCodewordsPerBlock: 47
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 48,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 14,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 42,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 32,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 161089,
                versionNumber: 39,
                alignmentPatternCenters: [6, 26, 54, 82, 110, 138, 166],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 20,
                        dataCodewordsPerBlock: 117
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 118
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 40,
                        dataCodewordsPerBlock: 47
                    }, {
                        numBlocks: 7,
                        dataCodewordsPerBlock: 48
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 43,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 22,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 10,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 67,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 167017,
                versionNumber: 40,
                alignmentPatternCenters: [6, 30, 58, 86, 114, 142, 170],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 19,
                        dataCodewordsPerBlock: 118
                    }, {
                        numBlocks: 6,
                        dataCodewordsPerBlock: 119
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 18,
                        dataCodewordsPerBlock: 47
                    }, {
                        numBlocks: 31,
                        dataCodewordsPerBlock: 48
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 34,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 34,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 20,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 61,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }]
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = i(0);
            function s(u, f, d, h) {
                var x = u.x - f.x + d.x - h.x
                  , y = u.y - f.y + d.y - h.y;
                if (x === 0 && y === 0)
                    return {
                        a11: f.x - u.x,
                        a12: f.y - u.y,
                        a13: 0,
                        a21: d.x - f.x,
                        a22: d.y - f.y,
                        a23: 0,
                        a31: u.x,
                        a32: u.y,
                        a33: 1
                    };
                var m = f.x - d.x
                  , E = h.x - d.x
                  , g = f.y - d.y
                  , p = h.y - d.y
                  , v = m * p - E * g
                  , _ = (x * p - E * y) / v
                  , b = (m * y - x * g) / v;
                return {
                    a11: f.x - u.x + _ * f.x,
                    a12: f.y - u.y + _ * f.y,
                    a13: _,
                    a21: h.x - u.x + b * h.x,
                    a22: h.y - u.y + b * h.y,
                    a23: b,
                    a31: u.x,
                    a32: u.y,
                    a33: 1
                }
            }
            function a(u, f, d, h) {
                var x = s(u, f, d, h);
                return {
                    a11: x.a22 * x.a33 - x.a23 * x.a32,
                    a12: x.a13 * x.a32 - x.a12 * x.a33,
                    a13: x.a12 * x.a23 - x.a13 * x.a22,
                    a21: x.a23 * x.a31 - x.a21 * x.a33,
                    a22: x.a11 * x.a33 - x.a13 * x.a31,
                    a23: x.a13 * x.a21 - x.a11 * x.a23,
                    a31: x.a21 * x.a32 - x.a22 * x.a31,
                    a32: x.a12 * x.a31 - x.a11 * x.a32,
                    a33: x.a11 * x.a22 - x.a12 * x.a21
                }
            }
            function l(u, f) {
                return {
                    a11: u.a11 * f.a11 + u.a21 * f.a12 + u.a31 * f.a13,
                    a12: u.a12 * f.a11 + u.a22 * f.a12 + u.a32 * f.a13,
                    a13: u.a13 * f.a11 + u.a23 * f.a12 + u.a33 * f.a13,
                    a21: u.a11 * f.a21 + u.a21 * f.a22 + u.a31 * f.a23,
                    a22: u.a12 * f.a21 + u.a22 * f.a22 + u.a32 * f.a23,
                    a23: u.a13 * f.a21 + u.a23 * f.a22 + u.a33 * f.a23,
                    a31: u.a11 * f.a31 + u.a21 * f.a32 + u.a31 * f.a33,
                    a32: u.a12 * f.a31 + u.a22 * f.a32 + u.a32 * f.a33,
                    a33: u.a13 * f.a31 + u.a23 * f.a32 + u.a33 * f.a33
                }
            }
            function c(u, f) {
                for (var d = a({
                    x: 3.5,
                    y: 3.5
                }, {
                    x: f.dimension - 3.5,
                    y: 3.5
                }, {
                    x: f.dimension - 6.5,
                    y: f.dimension - 6.5
                }, {
                    x: 3.5,
                    y: f.dimension - 3.5
                }), h = s(f.topLeft, f.topRight, f.alignmentPattern, f.bottomLeft), x = l(h, d), y = o.BitMatrix.createEmpty(f.dimension, f.dimension), m = function(b, C) {
                    var w = x.a13 * b + x.a23 * C + x.a33;
                    return {
                        x: (x.a11 * b + x.a21 * C + x.a31) / w,
                        y: (x.a12 * b + x.a22 * C + x.a32) / w
                    }
                }, E = 0; E < f.dimension; E++)
                    for (var g = 0; g < f.dimension; g++) {
                        var p = g + .5
                          , v = E + .5
                          , _ = m(p, v);
                        y.set(g, E, u.get(Math.floor(_.x), Math.floor(_.y)))
                    }
                return {
                    matrix: y,
                    mappingFunction: m
                }
            }
            n.extract = c
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = 4
              , s = .5
              , a = 1.5
              , l = function(p, v) {
                return Math.sqrt(Math.pow(v.x - p.x, 2) + Math.pow(v.y - p.y, 2))
            };
            function c(p) {
                return p.reduce(function(v, _) {
                    return v + _
                })
            }
            function u(p, v, _) {
                var b, C, w, T, A = l(p, v), B = l(v, _), S = l(p, _), D, F, R;
                return B >= A && B >= S ? (b = [v, p, _],
                D = b[0],
                F = b[1],
                R = b[2]) : S >= B && S >= A ? (C = [p, v, _],
                D = C[0],
                F = C[1],
                R = C[2]) : (w = [p, _, v],
                D = w[0],
                F = w[1],
                R = w[2]),
                (R.x - F.x) * (D.y - F.y) - (R.y - F.y) * (D.x - F.x) < 0 && (T = [R, D],
                D = T[0],
                R = T[1]),
                {
                    bottomLeft: D,
                    topLeft: F,
                    topRight: R
                }
            }
            function f(p, v, _, b) {
                var C = (c(h(p, _, b, 5)) / 7 + c(h(p, v, b, 5)) / 7 + c(h(_, p, b, 5)) / 7 + c(h(v, p, b, 5)) / 7) / 4;
                if (C < 1)
                    throw new Error("Invalid module size");
                var w = Math.round(l(p, v) / C)
                  , T = Math.round(l(p, _) / C)
                  , A = Math.floor((w + T) / 2) + 7;
                switch (A % 4) {
                case 0:
                    A++;
                    break;
                case 2:
                    A--;
                    break
                }
                return {
                    dimension: A,
                    moduleSize: C
                }
            }
            function d(p, v, _, b) {
                var C = [{
                    x: Math.floor(p.x),
                    y: Math.floor(p.y)
                }], w = Math.abs(v.y - p.y) > Math.abs(v.x - p.x), T, A, B, S;
                w ? (T = Math.floor(p.y),
                A = Math.floor(p.x),
                B = Math.floor(v.y),
                S = Math.floor(v.x)) : (T = Math.floor(p.x),
                A = Math.floor(p.y),
                B = Math.floor(v.x),
                S = Math.floor(v.y));
                for (var D = Math.abs(B - T), F = Math.abs(S - A), R = Math.floor(-D / 2), P = T < B ? 1 : -1, N = A < S ? 1 : -1, j = !0, K = T, oe = A; K !== B + P; K += P) {
                    var U = w ? oe : K
                      , $ = w ? K : oe;
                    if (_.get(U, $) !== j && (j = !j,
                    C.push({
                        x: U,
                        y: $
                    }),
                    C.length === b + 1))
                        break;
                    if (R += F,
                    R > 0) {
                        if (oe === S)
                            break;
                        oe += N,
                        R -= D
                    }
                }
                for (var V = [], W = 0; W < b; W++)
                    C[W] && C[W + 1] ? V.push(l(C[W], C[W + 1])) : V.push(0);
                return V
            }
            function h(p, v, _, b) {
                var C, w = v.y - p.y, T = v.x - p.x, A = d(p, v, _, Math.ceil(b / 2)), B = d(p, {
                    x: p.x - T,
                    y: p.y - w
                }, _, Math.ceil(b / 2)), S = A.shift() + B.shift() - 1;
                return (C = B.concat(S)).concat.apply(C, A)
            }
            function x(p, v) {
                var _ = c(p) / c(v)
                  , b = 0;
                return v.forEach(function(C, w) {
                    b += Math.pow(p[w] - C * _, 2)
                }),
                {
                    averageSize: _,
                    error: b
                }
            }
            function y(p, v, _) {
                try {
                    var b = h(p, {
                        x: -1,
                        y: p.y
                    }, _, v.length)
                      , C = h(p, {
                        x: p.x,
                        y: -1
                    }, _, v.length)
                      , w = {
                        x: Math.max(0, p.x - p.y) - 1,
                        y: Math.max(0, p.y - p.x) - 1
                    }
                      , T = h(p, w, _, v.length)
                      , A = {
                        x: Math.min(_.width, p.x + p.y) + 1,
                        y: Math.min(_.height, p.y + p.x) + 1
                    }
                      , B = h(p, A, _, v.length)
                      , S = x(b, v)
                      , D = x(C, v)
                      , F = x(T, v)
                      , R = x(B, v)
                      , P = Math.sqrt(S.error * S.error + D.error * D.error + F.error * F.error + R.error * R.error)
                      , N = (S.averageSize + D.averageSize + F.averageSize + R.averageSize) / 4
                      , j = (Math.pow(S.averageSize - N, 2) + Math.pow(D.averageSize - N, 2) + Math.pow(F.averageSize - N, 2) + Math.pow(R.averageSize - N, 2)) / N;
                    return P + j
                } catch {
                    return 1 / 0
                }
            }
            function m(p, v) {
                for (var _ = Math.round(v.x); p.get(_, Math.round(v.y)); )
                    _--;
                for (var b = Math.round(v.x); p.get(b, Math.round(v.y)); )
                    b++;
                for (var C = (_ + b) / 2, w = Math.round(v.y); p.get(Math.round(C), w); )
                    w--;
                for (var T = Math.round(v.y); p.get(Math.round(C), T); )
                    T++;
                var A = (w + T) / 2;
                return {
                    x: C,
                    y: A
                }
            }
            function E(p) {
                for (var v = [], _ = [], b = [], C = [], w = function(U) {
                    for (var $ = 0, V = !1, W = [0, 0, 0, 0, 0], H = function(G) {
                        var re = p.get(G, U);
                        if (re === V)
                            $++;
                        else {
                            W = [W[1], W[2], W[3], W[4], $],
                            $ = 1,
                            V = re;
                            var te = c(W) / 7
                              , he = Math.abs(W[0] - te) < te && Math.abs(W[1] - te) < te && Math.abs(W[2] - 3 * te) < 3 * te && Math.abs(W[3] - te) < te && Math.abs(W[4] - te) < te && !re
                              , xe = c(W.slice(-3)) / 3
                              , ve = Math.abs(W[2] - xe) < xe && Math.abs(W[3] - xe) < xe && Math.abs(W[4] - xe) < xe && re;
                            if (he) {
                                var I = G - W[3] - W[4]
                                  , z = I - W[2]
                                  , q = {
                                    startX: z,
                                    endX: I,
                                    y: U
                                }
                                  , ce = _.filter(function(L) {
                                    return z >= L.bottom.startX && z <= L.bottom.endX || I >= L.bottom.startX && z <= L.bottom.endX || z <= L.bottom.startX && I >= L.bottom.endX && W[2] / (L.bottom.endX - L.bottom.startX) < a && W[2] / (L.bottom.endX - L.bottom.startX) > s
                                });
                                ce.length > 0 ? ce[0].bottom = q : _.push({
                                    top: q,
                                    bottom: q
                                })
                            }
                            if (ve) {
                                var fe = G - W[4]
                                  , k = fe - W[3]
                                  , q = {
                                    startX: k,
                                    y: U,
                                    endX: fe
                                }
                                  , ce = C.filter(function(ee) {
                                    return k >= ee.bottom.startX && k <= ee.bottom.endX || fe >= ee.bottom.startX && k <= ee.bottom.endX || k <= ee.bottom.startX && fe >= ee.bottom.endX && W[2] / (ee.bottom.endX - ee.bottom.startX) < a && W[2] / (ee.bottom.endX - ee.bottom.startX) > s
                                });
                                ce.length > 0 ? ce[0].bottom = q : C.push({
                                    top: q,
                                    bottom: q
                                })
                            }
                        }
                    }, Q = -1; Q <= p.width; Q++)
                        H(Q);
                    v.push.apply(v, _.filter(function(G) {
                        return G.bottom.y !== U && G.bottom.y - G.top.y >= 2
                    })),
                    _ = _.filter(function(G) {
                        return G.bottom.y === U
                    }),
                    b.push.apply(b, C.filter(function(G) {
                        return G.bottom.y !== U
                    })),
                    C = C.filter(function(G) {
                        return G.bottom.y === U
                    })
                }, T = 0; T <= p.height; T++)
                    w(T);
                v.push.apply(v, _.filter(function(U) {
                    return U.bottom.y - U.top.y >= 2
                })),
                b.push.apply(b, C);
                var A = v.filter(function(U) {
                    return U.bottom.y - U.top.y >= 2
                }).map(function(U) {
                    var $ = (U.top.startX + U.top.endX + U.bottom.startX + U.bottom.endX) / 4
                      , V = (U.top.y + U.bottom.y + 1) / 2;
                    if (p.get(Math.round($), Math.round(V))) {
                        var W = [U.top.endX - U.top.startX, U.bottom.endX - U.bottom.startX, U.bottom.y - U.top.y + 1]
                          , H = c(W) / W.length
                          , Q = y({
                            x: Math.round($),
                            y: Math.round(V)
                        }, [1, 1, 3, 1, 1], p);
                        return {
                            score: Q,
                            x: $,
                            y: V,
                            size: H
                        }
                    }
                }).filter(function(U) {
                    return !!U
                }).sort(function(U, $) {
                    return U.score - $.score
                }).map(function(U, $, V) {
                    if ($ > o)
                        return null;
                    var W = V.filter(function(Q, G) {
                        return $ !== G
                    }).map(function(Q) {
                        return {
                            x: Q.x,
                            y: Q.y,
                            score: Q.score + Math.pow(Q.size - U.size, 2) / U.size,
                            size: Q.size
                        }
                    }).sort(function(Q, G) {
                        return Q.score - G.score
                    });
                    if (W.length < 2)
                        return null;
                    var H = U.score + W[0].score + W[1].score;
                    return {
                        points: [U].concat(W.slice(0, 2)),
                        score: H
                    }
                }).filter(function(U) {
                    return !!U
                }).sort(function(U, $) {
                    return U.score - $.score
                });
                if (A.length === 0)
                    return null;
                var B = u(A[0].points[0], A[0].points[1], A[0].points[2])
                  , S = B.topRight
                  , D = B.topLeft
                  , F = B.bottomLeft
                  , R = g(p, b, S, D, F)
                  , P = [];
                R && P.push({
                    alignmentPattern: {
                        x: R.alignmentPattern.x,
                        y: R.alignmentPattern.y
                    },
                    bottomLeft: {
                        x: F.x,
                        y: F.y
                    },
                    dimension: R.dimension,
                    topLeft: {
                        x: D.x,
                        y: D.y
                    },
                    topRight: {
                        x: S.x,
                        y: S.y
                    }
                });
                var N = m(p, S)
                  , j = m(p, D)
                  , K = m(p, F)
                  , oe = g(p, b, N, j, K);
                return oe && P.push({
                    alignmentPattern: {
                        x: oe.alignmentPattern.x,
                        y: oe.alignmentPattern.y
                    },
                    bottomLeft: {
                        x: K.x,
                        y: K.y
                    },
                    topLeft: {
                        x: j.x,
                        y: j.y
                    },
                    topRight: {
                        x: N.x,
                        y: N.y
                    },
                    dimension: oe.dimension
                }),
                P.length === 0 ? null : P
            }
            n.locate = E;
            function g(p, v, _, b, C) {
                var w, T, A;
                try {
                    w = f(b, _, C, p),
                    T = w.dimension,
                    A = w.moduleSize
                } catch {
                    return null
                }
                var B = {
                    x: _.x - b.x + C.x,
                    y: _.y - b.y + C.y
                }
                  , S = (l(b, C) + l(b, _)) / 2 / A
                  , D = 1 - 3 / S
                  , F = {
                    x: b.x + D * (B.x - b.x),
                    y: b.y + D * (B.y - b.y)
                }
                  , R = v.map(function(N) {
                    var j = (N.top.startX + N.top.endX + N.bottom.startX + N.bottom.endX) / 4
                      , K = (N.top.y + N.bottom.y + 1) / 2;
                    if (p.get(Math.floor(j), Math.floor(K))) {
                        var oe = [N.top.endX - N.top.startX, N.bottom.endX - N.bottom.startX, N.bottom.y - N.top.y + 1];
                        c(oe) / oe.length;
                        var U = y({
                            x: Math.floor(j),
                            y: Math.floor(K)
                        }, [1, 1, 1], p)
                          , $ = U + l({
                            x: j,
                            y: K
                        }, F);
                        return {
                            x: j,
                            y: K,
                            score: $
                        }
                    }
                }).filter(function(N) {
                    return !!N
                }).sort(function(N, j) {
                    return N.score - j.score
                })
                  , P = S >= 15 && R.length ? R[0] : F;
                return {
                    alignmentPattern: P,
                    dimension: T
                }
            }
        }
        ]).default
    })
}
)(bN);
var D3e = bN.exports;
const P5e = Vi(D3e);
class F3e extends D1 {
    constructor() {
        super(),
        this.handleVisibilityChange = () => {
            const e = {
                isActive: document.hidden !== !0
            };
            this.notifyListeners("appStateChange", e),
            document.hidden ? this.notifyListeners("pause", null) : this.notifyListeners("resume", null)
        }
        ,
        document.addEventListener("visibilitychange", this.handleVisibilityChange, !1)
    }
    exitApp() {
        throw this.unimplemented("Not implemented on web.")
    }
    async getInfo() {
        throw this.unimplemented("Not implemented on web.")
    }
    async getLaunchUrl() {
        return {
            url: ""
        }
    }
    async getState() {
        return {
            isActive: document.hidden !== !0
        }
    }
    async minimizeApp() {
        throw this.unimplemented("Not implemented on web.")
    }
    async toggleBackButtonHandler() {
        throw this.unimplemented("Not implemented on web.")
    }
}
const P3e = Object.freeze(Object.defineProperty({
    __proto__: null,
    AppWeb: F3e
}, Symbol.toStringTag, {
    value: "Module"
}));
var h5 = function() {
    return h5 = Object.assign || function(e) {
        for (var r, n = 1, i = arguments.length; n < i; n++) {
            r = arguments[n];
            for (var o in r)
                Object.prototype.hasOwnProperty.call(r, o) && (e[o] = r[o])
        }
        return e
    }
    ,
    h5.apply(this, arguments)
};
function I5e(t, e, r, n) {
    function i(o) {
        return o instanceof r ? o : new r(function(s) {
            s(o)
        }
        )
    }
    return new (r || (r = Promise))(function(o, s) {
        function a(u) {
            try {
                c(n.next(u))
            } catch (f) {
                s(f)
            }
        }
        function l(u) {
            try {
                c(n.throw(u))
            } catch (f) {
                s(f)
            }
        }
        function c(u) {
            u.done ? o(u.value) : i(u.value).then(a, l)
        }
        c((n = n.apply(t, e || [])).next())
    }
    )
}
function O5e(t, e) {
    var r = {
        label: 0,
        sent: function() {
            if (o[0] & 1)
                throw o[1];
            return o[1]
        },
        trys: [],
        ops: []
    }, n, i, o, s = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
    return s.next = a(0),
    s.throw = a(1),
    s.return = a(2),
    typeof Symbol == "function" && (s[Symbol.iterator] = function() {
        return this
    }
    ),
    s;
    function a(c) {
        return function(u) {
            return l([c, u])
        }
    }
    function l(c) {
        if (n)
            throw new TypeError("Generator is already executing.");
        for (; s && (s = 0,
        c[0] && (r = 0)),
        r; )
            try {
                if (n = 1,
                i && (o = c[0] & 2 ? i.return : c[0] ? i.throw || ((o = i.return) && o.call(i),
                0) : i.next) && !(o = o.call(i, c[1])).done)
                    return o;
                switch (i = 0,
                o && (c = [c[0] & 2, o.value]),
                c[0]) {
                case 0:
                case 1:
                    o = c;
                    break;
                case 4:
                    return r.label++,
                    {
                        value: c[1],
                        done: !1
                    };
                case 5:
                    r.label++,
                    i = c[1],
                    c = [0];
                    continue;
                case 7:
                    c = r.ops.pop(),
                    r.trys.pop();
                    continue;
                default:
                    if (o = r.trys,
                    !(o = o.length > 0 && o[o.length - 1]) && (c[0] === 6 || c[0] === 2)) {
                        r = 0;
                        continue
                    }
                    if (c[0] === 3 && (!o || c[1] > o[0] && c[1] < o[3])) {
                        r.label = c[1];
                        break
                    }
                    if (c[0] === 6 && r.label < o[1]) {
                        r.label = o[1],
                        o = c;
                        break
                    }
                    if (o && r.label < o[2]) {
                        r.label = o[2],
                        r.ops.push(c);
                        break
                    }
                    o[2] && r.ops.pop(),
                    r.trys.pop();
                    continue
                }
                c = e.call(t, r)
            } catch (u) {
                c = [6, u],
                i = 0
            } finally {
                n = o = 0
            }
        if (c[0] & 5)
            throw c[1];
        return {
            value: c[0] ? c[1] : void 0,
            done: !0
        }
    }
}
function k5e(t, e, r) {
    if (r || arguments.length === 2)
        for (var n = 0, i = e.length, o; n < i; n++)
            (o || !(n in e)) && (o || (o = Array.prototype.slice.call(e, 0, n)),
            o[n] = e[n]);
    return t.concat(o || Array.prototype.slice.call(e))
}
function I3e(t, e) {
    if (t.match(/^[a-z]+:\/\//i))
        return t;
    if (t.match(/^\/\//))
        return window.location.protocol + t;
    if (t.match(/^[a-z]+:/i))
        return t;
    const r = document.implementation.createHTMLDocument()
      , n = r.createElement("base")
      , i = r.createElement("a");
    return r.head.appendChild(n),
    r.body.appendChild(i),
    e && (n.href = e),
    i.href = t,
    i.href
}
const O3e = ( () => {
    let t = 0;
    const e = () => `0000${(Math.random() * 36 ** 4 << 0).toString(36)}`.slice(-4);
    return () => (t += 1,
    `u${e()}${t}`)
}
)();
function oa(t) {
    const e = [];
    for (let r = 0, n = t.length; r < n; r++)
        e.push(t[r]);
    return e
}
let mc = null;
function CN(t={}) {
    return mc || (t.includeStyleProperties ? (mc = t.includeStyleProperties,
    mc) : (mc = oa(window.getComputedStyle(document.documentElement)),
    mc))
}
function pp(t, e) {
    const n = (t.ownerDocument.defaultView || window).getComputedStyle(t).getPropertyValue(e);
    return n ? parseFloat(n.replace("px", "")) : 0
}
function k3e(t) {
    const e = pp(t, "border-left-width")
      , r = pp(t, "border-right-width");
    return t.clientWidth + e + r
}
function R3e(t) {
    const e = pp(t, "border-top-width")
      , r = pp(t, "border-bottom-width");
    return t.clientHeight + e + r
}
function WC(t, e={}) {
    const r = e.width || k3e(t)
      , n = e.height || R3e(t);
    return {
        width: r,
        height: n
    }
}
function M3e() {
    let t, e;
    try {
        e = process
    } catch {}
    const r = e && e.env ? e.env.devicePixelRatio : null;
    return r && (t = parseInt(r, 10),
    Number.isNaN(t) && (t = 1)),
    t || window.devicePixelRatio || 1
}
const Ln = 16384;
function N3e(t) {
    (t.width > Ln || t.height > Ln) && (t.width > Ln && t.height > Ln ? t.width > t.height ? (t.height *= Ln / t.width,
    t.width = Ln) : (t.width *= Ln / t.height,
    t.height = Ln) : t.width > Ln ? (t.height *= Ln / t.width,
    t.width = Ln) : (t.width *= Ln / t.height,
    t.height = Ln))
}
function L3e(t, e={}) {
    return t.toBlob ? new Promise(r => {
        t.toBlob(r, e.type ? e.type : "image/png", e.quality ? e.quality : 1)
    }
    ) : new Promise(r => {
        const n = window.atob(t.toDataURL(e.type ? e.type : void 0, e.quality ? e.quality : void 0).split(",")[1])
          , i = n.length
          , o = new Uint8Array(i);
        for (let s = 0; s < i; s += 1)
            o[s] = n.charCodeAt(s);
        r(new Blob([o],{
            type: e.type ? e.type : "image/png"
        }))
    }
    )
}
function gp(t) {
    return new Promise( (e, r) => {
        const n = new Image;
        n.onload = () => {
            n.decode().then( () => {
                requestAnimationFrame( () => e(n))
            }
            )
        }
        ,
        n.onerror = r,
        n.crossOrigin = "anonymous",
        n.decoding = "async",
        n.src = t
    }
    )
}
async function $3e(t) {
    return Promise.resolve().then( () => new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then(e => `data:image/svg+xml;charset=utf-8,${e}`)
}
async function U3e(t, e, r) {
    const n = "http://www.w3.org/2000/svg"
      , i = document.createElementNS(n, "svg")
      , o = document.createElementNS(n, "foreignObject");
    return i.setAttribute("width", `${e}`),
    i.setAttribute("height", `${r}`),
    i.setAttribute("viewBox", `0 0 ${e} ${r}`),
    o.setAttribute("width", "100%"),
    o.setAttribute("height", "100%"),
    o.setAttribute("x", "0"),
    o.setAttribute("y", "0"),
    o.setAttribute("externalResourcesRequired", "true"),
    i.appendChild(o),
    o.appendChild(t),
    $3e(i)
}
const In = (t, e) => {
    if (t instanceof e)
        return !0;
    const r = Object.getPrototypeOf(t);
    return r === null ? !1 : r.constructor.name === e.name || In(r, e)
}
;
function G3e(t) {
    const e = t.getPropertyValue("content");
    return `${t.cssText} content: '${e.replace(/'|"/g, "")}';`
}
function H3e(t, e) {
    return CN(e).map(r => {
        const n = t.getPropertyValue(r)
          , i = t.getPropertyPriority(r);
        return `${r}: ${n}${i ? " !important" : ""};`
    }
    ).join(" ")
}
function V3e(t, e, r, n) {
    const i = `.${t}:${e}`
      , o = r.cssText ? G3e(r) : H3e(r, n);
    return document.createTextNode(`${i}{${o}}`)
}
function x5(t, e, r, n) {
    const i = window.getComputedStyle(t, r)
      , o = i.getPropertyValue("content");
    if (o === "" || o === "none")
        return;
    const s = O3e();
    try {
        e.className = `${e.className} ${s}`
    } catch {
        return
    }
    const a = document.createElement("style");
    a.appendChild(V3e(s, r, i, n)),
    e.appendChild(a)
}
function z3e(t, e, r) {
    x5(t, e, ":before", r),
    x5(t, e, ":after", r)
}
const p5 = "application/font-woff"
  , g5 = "image/jpeg"
  , j3e = {
    woff: p5,
    woff2: p5,
    ttf: "application/font-truetype",
    eot: "application/vnd.ms-fontobject",
    png: "image/png",
    jpg: g5,
    jpeg: g5,
    gif: "image/gif",
    tiff: "image/tiff",
    svg: "image/svg+xml",
    webp: "image/webp"
};
function W3e(t) {
    const e = /\.([^./]*?)$/g.exec(t);
    return e ? e[1] : ""
}
function YC(t) {
    const e = W3e(t).toLowerCase();
    return j3e[e] || ""
}
function Y3e(t) {
    return t.split(/,/)[1]
}
function u_(t) {
    return t.search(/^(data:)/) !== -1
}
function AN(t, e) {
    return `data:${e};base64,${t}`
}
async function wN(t, e, r) {
    const n = await fetch(t, e);
    if (n.status === 404)
        throw new Error(`Resource "${n.url}" not found`);
    const i = await n.blob();
    return new Promise( (o, s) => {
        const a = new FileReader;
        a.onerror = s,
        a.onloadend = () => {
            try {
                o(r({
                    res: n,
                    result: a.result
                }))
            } catch (l) {
                s(l)
            }
        }
        ,
        a.readAsDataURL(i)
    }
    )
}
const Tv = {};
function X3e(t, e, r) {
    let n = t.replace(/\?.*/, "");
    return r && (n = t),
    /ttf|otf|eot|woff2?/i.test(n) && (n = n.replace(/.*\//, "")),
    e ? `[${e}]${n}` : n
}
async function XC(t, e, r) {
    const n = X3e(t, e, r.includeQueryParams);
    if (Tv[n] != null)
        return Tv[n];
    r.cacheBust && (t += (/\?/.test(t) ? "&" : "?") + new Date().getTime());
    let i;
    try {
        const o = await wN(t, r.fetchRequestInit, ({res: s, result: a}) => (e || (e = s.headers.get("Content-Type") || ""),
        Y3e(a)));
        i = AN(o, e)
    } catch (o) {
        i = r.imagePlaceholder || "";
        let s = `Failed to fetch resource: ${t}`;
        o && (s = typeof o == "string" ? o : o.message),
        s && console.warn(s)
    }
    return Tv[n] = i,
    i
}
async function K3e(t) {
    const e = t.toDataURL();
    return e === "data:," ? t.cloneNode(!1) : gp(e)
}
async function q3e(t, e) {
    if (t.currentSrc) {
        const o = document.createElement("canvas")
          , s = o.getContext("2d");
        o.width = t.clientWidth,
        o.height = t.clientHeight,
        s == null || s.drawImage(t, 0, 0, o.width, o.height);
        const a = o.toDataURL();
        return gp(a)
    }
    const r = t.poster
      , n = YC(r)
      , i = await XC(r, n, e);
    return gp(i)
}
async function Z3e(t, e) {
    var r;
    try {
        if (!((r = t == null ? void 0 : t.contentDocument) === null || r === void 0) && r.body)
            return await Y1(t.contentDocument.body, e, !0)
    } catch {}
    return t.cloneNode(!1)
}
async function J3e(t, e) {
    return In(t, HTMLCanvasElement) ? K3e(t) : In(t, HTMLVideoElement) ? q3e(t, e) : In(t, HTMLIFrameElement) ? Z3e(t, e) : t.cloneNode(BN(t))
}
const Q3e = t => t.tagName != null && t.tagName.toUpperCase() === "SLOT"
  , BN = t => t.tagName != null && t.tagName.toUpperCase() === "SVG";
async function e4e(t, e, r) {
    var n, i;
    if (BN(e))
        return e;
    let o = [];
    return Q3e(t) && t.assignedNodes ? o = oa(t.assignedNodes()) : In(t, HTMLIFrameElement) && (!((n = t.contentDocument) === null || n === void 0) && n.body) ? o = oa(t.contentDocument.body.childNodes) : o = oa(((i = t.shadowRoot) !== null && i !== void 0 ? i : t).childNodes),
    o.length === 0 || In(t, HTMLVideoElement) || await o.reduce( (s, a) => s.then( () => Y1(a, r)).then(l => {
        l && e.appendChild(l)
    }
    ), Promise.resolve()),
    e
}
function t4e(t, e, r) {
    const n = e.style;
    if (!n)
        return;
    const i = window.getComputedStyle(t);
    i.cssText ? (n.cssText = i.cssText,
    n.transformOrigin = i.transformOrigin) : CN(r).forEach(o => {
        let s = i.getPropertyValue(o);
        o === "font-size" && s.endsWith("px") && (s = `${Math.floor(parseFloat(s.substring(0, s.length - 2))) - .1}px`),
        In(t, HTMLIFrameElement) && o === "display" && s === "inline" && (s = "block"),
        o === "d" && e.getAttribute("d") && (s = `path(${e.getAttribute("d")})`),
        n.setProperty(o, s, i.getPropertyPriority(o))
    }
    )
}
function r4e(t, e) {
    In(t, HTMLTextAreaElement) && (e.innerHTML = t.value),
    In(t, HTMLInputElement) && e.setAttribute("value", t.value)
}
function n4e(t, e) {
    if (In(t, HTMLSelectElement)) {
        const r = e
          , n = Array.from(r.children).find(i => t.value === i.getAttribute("value"));
        n && n.setAttribute("selected", "")
    }
}
function i4e(t, e, r) {
    return In(e, Element) && (t4e(t, e, r),
    z3e(t, e, r),
    r4e(t, e),
    n4e(t, e)),
    e
}
async function o4e(t, e) {
    const r = t.querySelectorAll ? t.querySelectorAll("use") : [];
    if (r.length === 0)
        return t;
    const n = {};
    for (let o = 0; o < r.length; o++) {
        const a = r[o].getAttribute("xlink:href");
        if (a) {
            const l = t.querySelector(a)
              , c = document.querySelector(a);
            !l && c && !n[a] && (n[a] = await Y1(c, e, !0))
        }
    }
    const i = Object.values(n);
    if (i.length) {
        const o = "http://www.w3.org/1999/xhtml"
          , s = document.createElementNS(o, "svg");
        s.setAttribute("xmlns", o),
        s.style.position = "absolute",
        s.style.width = "0",
        s.style.height = "0",
        s.style.overflow = "hidden",
        s.style.display = "none";
        const a = document.createElementNS(o, "defs");
        s.appendChild(a);
        for (let l = 0; l < i.length; l++)
            a.appendChild(i[l]);
        t.appendChild(s)
    }
    return t
}
async function Y1(t, e, r) {
    return !r && e.filter && !e.filter(t) ? null : Promise.resolve(t).then(n => J3e(n, e)).then(n => e4e(t, n, e)).then(n => i4e(t, n, e)).then(n => o4e(n, e))
}
const SN = /url\((['"]?)([^'"]+?)\1\)/g
  , s4e = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g
  , a4e = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
function l4e(t) {
    const e = t.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
    return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`,"g")
}
function c4e(t) {
    const e = [];
    return t.replace(SN, (r, n, i) => (e.push(i),
    r)),
    e.filter(r => !u_(r))
}
async function u4e(t, e, r, n, i) {
    try {
        const o = r ? I3e(e, r) : e
          , s = YC(e);
        let a;
        if (i) {
            const l = await i(o);
            a = AN(l, s)
        } else
            a = await XC(o, s, n);
        return t.replace(l4e(e), `$1${a}$3`)
    } catch {}
    return t
}
function f4e(t, {preferredFontFormat: e}) {
    return e ? t.replace(a4e, r => {
        for (; ; ) {
            const [n,,i] = s4e.exec(r) || [];
            if (!i)
                return "";
            if (i === e)
                return `src: ${n};`
        }
    }
    ) : t
}
function TN(t) {
    return t.search(SN) !== -1
}
async function DN(t, e, r) {
    if (!TN(t))
        return t;
    const n = f4e(t, r);
    return c4e(n).reduce( (o, s) => o.then(a => u4e(a, s, e, r)), Promise.resolve(n))
}
async function vc(t, e, r) {
    var n;
    const i = (n = e.style) === null || n === void 0 ? void 0 : n.getPropertyValue(t);
    if (i) {
        const o = await DN(i, null, r);
        return e.style.setProperty(t, o, e.style.getPropertyPriority(t)),
        !0
    }
    return !1
}
async function d4e(t, e) {
    await vc("background", t, e) || await vc("background-image", t, e),
    await vc("mask", t, e) || await vc("-webkit-mask", t, e) || await vc("mask-image", t, e) || await vc("-webkit-mask-image", t, e)
}
async function h4e(t, e) {
    const r = In(t, HTMLImageElement);
    if (!(r && !u_(t.src)) && !(In(t, SVGImageElement) && !u_(t.href.baseVal)))
        return;
    const n = r ? t.src : t.href.baseVal
      , i = await XC(n, YC(n), e);
    await new Promise( (o, s) => {
        t.onload = o,
        t.onerror = e.onImageErrorHandler ? (...l) => {
            try {
                o(e.onImageErrorHandler(...l))
            } catch (c) {
                s(c)
            }
        }
        : s;
        const a = t;
        a.decode && (a.decode = o),
        a.loading === "lazy" && (a.loading = "eager"),
        r ? (t.srcset = "",
        t.src = i) : t.href.baseVal = i
    }
    )
}
async function x4e(t, e) {
    const n = oa(t.childNodes).map(i => FN(i, e));
    await Promise.all(n).then( () => t)
}
async function FN(t, e) {
    In(t, Element) && (await d4e(t, e),
    await h4e(t, e),
    await x4e(t, e))
}
function p4e(t, e) {
    const {style: r} = t;
    e.backgroundColor && (r.backgroundColor = e.backgroundColor),
    e.width && (r.width = `${e.width}px`),
    e.height && (r.height = `${e.height}px`);
    const n = e.style;
    return n != null && Object.keys(n).forEach(i => {
        r[i] = n[i]
    }
    ),
    t
}
const m5 = {};
async function v5(t) {
    let e = m5[t];
    if (e != null)
        return e;
    const n = await (await fetch(t)).text();
    return e = {
        url: t,
        cssText: n
    },
    m5[t] = e,
    e
}
async function y5(t, e) {
    let r = t.cssText;
    const n = /url\(["']?([^"')]+)["']?\)/g
      , o = (r.match(/url\([^)]+\)/g) || []).map(async s => {
        let a = s.replace(n, "$1");
        return a.startsWith("https://") || (a = new URL(a,t.url).href),
        wN(a, e.fetchRequestInit, ({result: l}) => (r = r.replace(s, `url(${l})`),
        [s, l]))
    }
    );
    return Promise.all(o).then( () => r)
}
function E5(t) {
    if (t == null)
        return [];
    const e = []
      , r = /(\/\*[\s\S]*?\*\/)/gi;
    let n = t.replace(r, "");
    const i = new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");
    for (; ; ) {
        const l = i.exec(n);
        if (l === null)
            break;
        e.push(l[0])
    }
    n = n.replace(i, "");
    const o = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi
      , s = "((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})"
      , a = new RegExp(s,"gi");
    for (; ; ) {
        let l = o.exec(n);
        if (l === null) {
            if (l = a.exec(n),
            l === null)
                break;
            o.lastIndex = a.lastIndex
        } else
            a.lastIndex = o.lastIndex;
        e.push(l[0])
    }
    return e
}
async function g4e(t, e) {
    const r = []
      , n = [];
    return t.forEach(i => {
        if ("cssRules"in i)
            try {
                oa(i.cssRules || []).forEach( (o, s) => {
                    if (o.type === CSSRule.IMPORT_RULE) {
                        let a = s + 1;
                        const l = o.href
                          , c = v5(l).then(u => y5(u, e)).then(u => E5(u).forEach(f => {
                            try {
                                i.insertRule(f, f.startsWith("@import") ? a += 1 : i.cssRules.length)
                            } catch (d) {
                                console.error("Error inserting rule from remote css", {
                                    rule: f,
                                    error: d
                                })
                            }
                        }
                        )).catch(u => {
                            console.error("Error loading remote css", u.toString())
                        }
                        );
                        n.push(c)
                    }
                }
                )
            } catch (o) {
                const s = t.find(a => a.href == null) || document.styleSheets[0];
                i.href != null && n.push(v5(i.href).then(a => y5(a, e)).then(a => E5(a).forEach(l => {
                    s.insertRule(l, s.cssRules.length)
                }
                )).catch(a => {
                    console.error("Error loading remote stylesheet", a)
                }
                )),
                console.error("Error inlining remote css file", o)
            }
    }
    ),
    Promise.all(n).then( () => (t.forEach(i => {
        if ("cssRules"in i)
            try {
                oa(i.cssRules || []).forEach(o => {
                    r.push(o)
                }
                )
            } catch (o) {
                console.error(`Error while reading CSS rules from ${i.href}`, o)
            }
    }
    ),
    r))
}
function m4e(t) {
    return t.filter(e => e.type === CSSRule.FONT_FACE_RULE).filter(e => TN(e.style.getPropertyValue("src")))
}
async function v4e(t, e) {
    if (t.ownerDocument == null)
        throw new Error("Provided element is not within a Document");
    const r = oa(t.ownerDocument.styleSheets)
      , n = await g4e(r, e);
    return m4e(n)
}
function PN(t) {
    return t.trim().replace(/["']/g, "")
}
function y4e(t) {
    const e = new Set;
    function r(n) {
        (n.style.fontFamily || getComputedStyle(n).fontFamily).split(",").forEach(o => {
            e.add(PN(o))
        }
        ),
        Array.from(n.children).forEach(o => {
            o instanceof HTMLElement && r(o)
        }
        )
    }
    return r(t),
    e
}
async function IN(t, e) {
    const r = await v4e(t, e)
      , n = y4e(t);
    return (await Promise.all(r.filter(o => n.has(PN(o.style.fontFamily))).map(o => {
        const s = o.parentStyleSheet ? o.parentStyleSheet.href : null;
        return DN(o.cssText, s, e)
    }
    ))).join(`
`)
}
async function E4e(t, e) {
    const r = e.fontEmbedCSS != null ? e.fontEmbedCSS : e.skipFonts ? null : await IN(t, e);
    if (r) {
        const n = document.createElement("style")
          , i = document.createTextNode(r);
        n.appendChild(i),
        t.firstChild ? t.insertBefore(n, t.firstChild) : t.appendChild(n)
    }
}
async function ON(t, e={}) {
    const {width: r, height: n} = WC(t, e)
      , i = await Y1(t, e, !0);
    return await E4e(i, e),
    await FN(i, e),
    p4e(i, e),
    await U3e(i, r, n)
}
async function Td(t, e={}) {
    const {width: r, height: n} = WC(t, e)
      , i = await ON(t, e)
      , o = await gp(i)
      , s = document.createElement("canvas")
      , a = s.getContext("2d")
      , l = e.pixelRatio || M3e()
      , c = e.canvasWidth || r
      , u = e.canvasHeight || n;
    return s.width = c * l,
    s.height = u * l,
    e.skipAutoScale || N3e(s),
    s.style.width = `${c}`,
    s.style.height = `${u}`,
    e.backgroundColor && (a.fillStyle = e.backgroundColor,
    a.fillRect(0, 0, s.width, s.height)),
    a.drawImage(o, 0, 0, s.width, s.height),
    s
}
async function _4e(t, e={}) {
    const {width: r, height: n} = WC(t, e);
    return (await Td(t, e)).getContext("2d").getImageData(0, 0, r, n).data
}
async function b4e(t, e={}) {
    return (await Td(t, e)).toDataURL()
}
async function C4e(t, e={}) {
    return (await Td(t, e)).toDataURL("image/jpeg", e.quality || 1)
}
async function A4e(t, e={}) {
    const r = await Td(t, e);
    return await L3e(r)
}
async function w4e(t, e={}) {
    return IN(t, e)
}
const R5e = Object.freeze(Object.defineProperty({
    __proto__: null,
    getFontEmbedCSS: w4e,
    toBlob: A4e,
    toCanvas: Td,
    toJpeg: C4e,
    toPixelData: _4e,
    toPng: b4e,
    toSvg: ON
}, Symbol.toStringTag, {
    value: "Module"
}));
export {me as $, It as A, ae as B, Ht as C, RS as D, Zn as E, U4e as F, be as G, k$ as H, DU as I, U_ as J, Nt as K, Sq as L, M$ as M, Op as N, xn as O, zL as P, O as Q, r5e as R, F4e as S, n5e as T, Vi as U, Xe as V, ys as W, _s as X, Fo as Y, xt as Z, I5e as _, O5e as a, zG as a$, n6e as a0, G6e as a1, R6e as a2, j6e as a3, H4e as a4, X6e as a5, xi as a6, M6e as a7, Cp as a8, Wle as a9, pB as aA, Rp as aB, d$ as aC, h$ as aD, D$ as aE, Ax as aF, K7 as aG, z7 as aH, FG as aI, D2e as aJ, e5e as aK, y5e as aL, L6e as aM, _5e as aN, E5e as aO, b5e as aP, C5e as aQ, koe as aR, T5e as aS, dr as aT, w0 as aU, $6e as aV, N6e as aW, D5e as aX, R$ as aY, K6e as aZ, en as a_, bh as aa, Rn as ab, Al as ac, a5e as ad, u5e as ae, W6e as af, u6e as ag, Le as ah, t5e as ai, Q6e as aj, f5e as ak, O6e as al, xF as am, d5e as an, kU as ao, Kf as ap, OU as aq, L$ as ar, S5e as as, z6e as at, $_ as au, D_ as av, J6e as aw, hi as ax, pi as ay, Xf as az, h5 as b, bs as b$, B5e as b0, w5e as b1, A5e as b2, U6e as b3, Ed as b4, aS as b5, cF as b6, _L as b7, fa as b8, ua as b9, Ot as bA, Y6e as bB, Ip as bC, st as bD, F5e as bE, Bee as bF, P5e as bG, N$ as bH, p5e as bI, h5e as bJ, Gse as bK, O4e as bL, X4e as bM, W4e as bN, g6e as bO, m6e as bP, a6e as bQ, l6e as bR, K4e as bS, qZ as bT, k4e as bU, R4e as bV, h6e as bW, i6e as bX, o6e as bY, Q4e as bZ, e6e as b_, k6e as ba, T3e as bb, er as bc, EL as bd, td as be, pZ as bf, rr as bg, j4e as bh, Fx as bi, f6e as bj, N4e as bk, L4e as bl, P$ as bm, E$ as bn, Hr as bo, s5e as bp, jx as bq, Gt as br, Y0e as bs, c5e as bt, Be as bu, l5e as bv, _6e as bw, Au as bx, Or as by, iy as bz, k5e as c, Z4e as c0, r6e as c1, J4e as c2, p6e as c3, y6e as c4, c6e as c5, z4e as c6, Wl as c7, mJ as c8, t6e as c9, v6e as ca, b6e as cb, q4e as cc, x6e as cd, Jp as ce, d6e as cf, sD as cg, E6e as ch, s6e as ci, dS as cj, B4e as ck, T4e as cl, q6e as cm, $l as cn, V6e as co, Z6e as cp, x5e as cq, g5e as cr, m5e as cs, v5e as ct, R5e as cu, A6e as d, w6e as e, B6e as f, S6e as g, T6e as h, D6e as i, F6e as j, P6e as k, I6e as l, C6e as m, ef as n, V4e as o, Ay as p, $4e as q, ie as r, Bq as s, iee as t, G4e as u, D4e as v, P4e as w, H6e as x, S4e as y, ob as z};
