import {
    a as Hx,
    b as Gx,
    c as qx,
    d as Xx,
    e as Kx,
    f as Yx,
    g as wm,
    h as Sm,
    i as l_,
    j as c_,
    k as u_,
    l as f_,
    m as Md,
    n as Cm
} from "./chunk-O776I53L.js";
import {
    a as h_
} from "./chunk-2G6MBRGW.js";
import {
    a as d_,
    b as p_,
    c as m_,
    d as g_,
    e as v_,
    f as x_,
    g as __,
    h as y_,
    i as b_
} from "./chunk-CRGY2FKE.js";
import {
    a as wx,
    b as Sx,
    c as Cx,
    d as Ax,
    e as Sd,
    f as Tx,
    g as Wx,
    h as jx,
    i as Ld,
    j as Jx,
    k as Qx,
    l as $x,
    m as e_,
    n as t_,
    o as r_,
    p as i_,
    q as n_,
    r as Rd
} from "./chunk-GBCJOPXR.js";
import {
    a as sx,
    b as Ux,
    c as Vx
} from "./chunk-HCDJBOU2.js";
import {
    c as Yu,
    u as Mx
} from "./chunk-SUCRLMBQ.js";
import {
    d as zx
} from "./chunk-MFQI6WA3.js";
import {
    c as Lx,
    d as Rx
} from "./chunk-3RVRTJK2.js";
import {
    a as Od
} from "./chunk-JLPDNABD.js";
import "./chunk-XF2CNCVA.js";
import {
    c as tx,
    e as rx,
    f as ix,
    j as lm
} from "./chunk-IIZSMBNO.js";
import {
    a as Nd,
    b as s_
} from "./chunk-VA6RAPJF.js";
import {
    a as a_,
    b as o_
} from "./chunk-ZLBVZLCB.js";
import {
    a as Zx
} from "./chunk-MMJF5WBO.js";
import "./chunk-AHAXH4Z3.js";
import {
    a as bx,
    b as Dx,
    c as kx,
    f as Fx,
    g as Ex,
    h as Cd,
    i as Px,
    k as Ix,
    m as Ox,
    n as _m,
    o as Td,
    p as Dd
} from "./chunk-2F2DP6Z5.js";
import {
    $ as Id,
    N as md,
    S as Fd,
    T as Ed,
    W as bm,
    X as Bx,
    Y as Tl,
    Z as w0,
    _ as Pd,
    a as hd,
    b as dd,
    c as pd,
    d as xl,
    f as Po,
    g as nx,
    h as fm,
    j as Ku,
    q as hm
} from "./chunk-LNCD4SA3.js";
import {
    Aa as _d,
    Ca as _0,
    Fa as y0,
    G as dm,
    Ga as yd,
    Ha as _x,
    Ia as yx,
    Ja as bd,
    Ka as es,
    L as lx,
    La as ja,
    N as cx,
    O as ux,
    Qa as Cl,
    R as pm,
    S as wl,
    T as Qo,
    Ta as Bs,
    W as mm,
    Y as fx,
    Ya as wd,
    Z as gm,
    aa as hx,
    b as gd,
    bb as xm,
    c as ax,
    d as ox,
    db as Al,
    e as vd,
    eb as Ad,
    fa as dx,
    fb as Nx,
    gb as ym,
    h as _l,
    hb as b0,
    ia as px,
    jb as kd,
    l as yl,
    la as mx,
    ma as gx,
    na as vx,
    oa as $o,
    qa as xx,
    ra as so,
    sa as x0,
    ta as xd,
    va as Ti,
    wa as Sl,
    xa as vm,
    z as bl
} from "./chunk-XPOKHL3M.js";
import {
    c as cm,
    d as um,
    f as qu,
    h as Xu
} from "./chunk-Z33DM23Z.js";
import "./chunk-GHJJ2Z4D.js";
import {
    B as Ms,
    j as $2,
    k as Wa,
    m as vl,
    n as Eo,
    r as vc,
    s as Jo,
    x as ex,
    y as ha
} from "./chunk-OYJWBUYU.js";
import {
    $b as mc,
    Ab as Q,
    Bb as ld,
    Cb as q2,
    Cc as Rs,
    Db as ju,
    Dc as sm,
    E as j2,
    Eb as Xn,
    Fb as X2,
    Fc as gc,
    Gb as Hu,
    Hc as hi,
    Jb as ge,
    K as H2,
    Kb as ve,
    Lb as St,
    Lc as fd,
    Mb as Xt,
    Nb as Kt,
    Ob as Ci,
    Pb as or,
    Pc as Rr,
    Qc as Fo,
    Sc as J2,
    Ta as nm,
    Tb as am,
    Tc as Q2,
    U as G2,
    Ua as sd,
    Ub as om,
    Vb as dt,
    Wb as cd,
    X as nd,
    Xb as ud,
    Y as gl,
    Ya as oe,
    Yb as nt,
    Z as dc,
    Zb as ee,
    _b as g0,
    ac as v0,
    bc as K2,
    ca as Ls,
    cb as li,
    cc as Or,
    dc as Oi,
    ec as Nt,
    f as M2,
    fc as Lt,
    g as B2,
    h as U2,
    ic as Br,
    jc as cr,
    ka as Ce,
    kc as Wi,
    la as Ae,
    lb as Sn,
    lc as Zi,
    m as z2,
    ma as ad,
    mb as pc,
    mc as Y2,
    na as Da,
    pb as za,
    pc as wr,
    qc as Sr,
    rb as Oe,
    rc as Tr,
    s as W2,
    sc as Yo,
    ta as Qr,
    tc as vr,
    ua as od,
    uc as ii,
    vc as Zo,
    w as Wu,
    wc as Z2,
    xc as Gu,
    ya as ko,
    zb as vt
} from "./chunk-SSI6PFOR.js";
import {
    a as Ge,
    b as ar,
    c as V2,
    e as Rt,
    f as Mt,
    g as Ar
} from "./chunk-JYUAQH2U.js";
import {
    a as Pi,
    b as m0,
    d as Ii,
    e as M3,
    f as B3,
    g as U3,
    h as R2
} from "./chunk-FFRAY7OK.js";

function ni(t) {
    "@babel/helpers - typeof";
    return ni = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(r) {
        return typeof r;
    } : function(r) {
        return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
    }, ni(t);
}
var D_ = Ii(() => {
    "use strict";
});

function Vd(t, r) {
    r || (r = {});
    var e = B_();
    e.p(t);
    var i = MC(t, r, r.dictionary ? 6 : 2, 4);
    return BC(i, r), U_(i, i.length - 4, e.d()), i;
}
var Io, Ha, Em, Pm, Im, k_, I_, O_, PC, Dm, N_, iU, F_, km, Us, $r, ef, xc, $r, $r, $r, $r, Ud, $r, IC, OC, L_, NC, Vs, Qu, Tm, Fm, E_, $u, R_, P_, LC, M_, RC, B_, MC, U_, BC, UC, VC, V_ = Ii(() => {
    "use strict";
    Io = Uint8Array, Ha = Uint16Array, Em = Int32Array, Pm = new Io([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0]), Im = new Io([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0]), k_ = new Io([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), I_ = function(t, r) {
        for (var e = new Ha(31), i = 0; i < 31; ++i) e[i] = r += 1 << t[i - 1];
        for (var n = new Em(e[30]), i = 1; i < 30; ++i)
            for (var a = e[i]; a < e[i + 1]; ++a) n[a] = a - e[i] << 5 | i;
        return {
            b: e,
            r: n
        };
    }, O_ = I_(Pm, 2), PC = O_.b, Dm = O_.r;
    PC[28] = 258, Dm[258] = 28;
    N_ = I_(Im, 0), iU = N_.b, F_ = N_.r, km = new Ha(32768);
    for ($r = 0; $r < 32768; ++$r) Us = ($r & 43690) >> 1 | ($r & 21845) << 1, Us = (Us & 52428) >> 2 | (Us & 13107) << 2, Us = (Us & 61680) >> 4 | (Us & 3855) << 4, km[$r] = ((Us & 65280) >> 8 | (Us & 255) << 8) >> 1;
    ef = function(t, r, e) {
        for (var i = t.length, n = 0, a = new Ha(r); n < i; ++n) t[n] && ++a[t[n] - 1];
        var o = new Ha(r);
        for (n = 1; n < r; ++n) o[n] = o[n - 1] + a[n - 1] << 1;
        var s;
        if (e) {
            s = new Ha(1 << r);
            var l = 15 - r;
            for (n = 0; n < i; ++n)
                if (t[n])
                    for (var c = n << 4 | t[n], u = r - t[n], h = o[t[n] - 1]++ << u, d = h | (1 << u) - 1; h <= d; ++h) s[km[h] >> l] = c;
        } else
            for (s = new Ha(i), n = 0; n < i; ++n) t[n] && (s[n] = km[o[t[n] - 1]++] >> 15 - t[n]);
        return s;
    }, xc = new Io(288);
    for ($r = 0; $r < 144; ++$r) xc[$r] = 8;
    for ($r = 144; $r < 256; ++$r) xc[$r] = 9;
    for ($r = 256; $r < 280; ++$r) xc[$r] = 7;
    for ($r = 280; $r < 288; ++$r) xc[$r] = 8;
    Ud = new Io(32);
    for ($r = 0; $r < 32; ++$r) Ud[$r] = 5;
    IC = ef(xc, 9, 0), OC = ef(Ud, 5, 0), L_ = function(t) {
        return (t + 7) / 8 | 0;
    }, NC = function(t, r, e) {
        return (r == null || r < 0) && (r = 0), (e == null || e > t.length) && (e = t.length), new Io(t.subarray(r, e));
    }, Vs = function(t, r, e) {
        e <<= r & 7;
        var i = r / 8 | 0;
        t[i] |= e, t[i + 1] |= e >> 8;
    }, Qu = function(t, r, e) {
        e <<= r & 7;
        var i = r / 8 | 0;
        t[i] |= e, t[i + 1] |= e >> 8, t[i + 2] |= e >> 16;
    }, Tm = function(t, r) {
        for (var e = [], i = 0; i < t.length; ++i) t[i] && e.push({
            s: i,
            f: t[i]
        });
        var n = e.length,
            a = e.slice();
        if (!n) return {
            t: M_,
            l: 0
        };
        if (n == 1) {
            var o = new Io(e[0].s + 1);
            return o[e[0].s] = 1, {
                t: o,
                l: 1
            };
        }
        e.sort(function(E, L) {
            return E.f - L.f;
        }), e.push({
            s: -1,
            f: 25001
        });
        var s = e[0],
            l = e[1],
            c = 0,
            u = 1,
            h = 2;
        for (e[0] = {
                s: -1,
                f: s.f + l.f,
                l: s,
                r: l
            }; u != n - 1;) s = e[e[c].f < e[h].f ? c++ : h++], l = e[c != u && e[c].f < e[h].f ? c++ : h++], e[u++] = {
            s: -1,
            f: s.f + l.f,
            l: s,
            r: l
        };
        for (var d = a[0].s, i = 1; i < n; ++i) a[i].s > d && (d = a[i].s);
        var f = new Ha(d + 1),
            m = Fm(e[u - 1], f, 0);
        if (m > r) {
            var i = 0,
                _ = 0,
                x = m - r,
                g = 1 << x;
            for (a.sort(function(L, P) {
                    return f[P.s] - f[L.s] || L.f - P.f;
                }); i < n; ++i) {
                var b = a[i].s;
                if (f[b] > r) _ += g - (1 << m - f[b]), f[b] = r;
                else break;
            }
            for (_ >>= x; _ > 0;) {
                var w = a[i].s;
                f[w] < r ? _ -= 1 << r - f[w]++ - 1 : ++i;
            }
            for (; i >= 0 && _; --i) {
                var T = a[i].s;
                f[T] == r && (--f[T], ++_);
            }
            m = r;
        }
        return {
            t: new Io(f),
            l: m
        };
    }, Fm = function(t, r, e) {
        return t.s == -1 ? Math.max(Fm(t.l, r, e + 1), Fm(t.r, r, e + 1)) : r[t.s] = e;
    }, E_ = function(t) {
        for (var r = t.length; r && !t[--r];);
        for (var e = new Ha(++r), i = 0, n = t[0], a = 1, o = function(l) {
                e[i++] = l;
            }, s = 1; s <= r; ++s)
            if (t[s] == n && s != r) ++a;
            else {
                if (!n && a > 2) {
                    for (; a > 138; a -= 138) o(32754);
                    a > 2 && (o(a > 10 ? a - 11 << 5 | 28690 : a - 3 << 5 | 12305), a = 0);
                } else if (a > 3) {
                    for (o(n), --a; a > 6; a -= 6) o(8304);
                    a > 2 && (o(a - 3 << 5 | 8208), a = 0);
                }
                for (; a--;) o(n);
                a = 1, n = t[s];
            }
        return {
            c: e.subarray(0, i),
            n: r
        };
    }, $u = function(t, r) {
        for (var e = 0, i = 0; i < r.length; ++i) e += t[i] * r[i];
        return e;
    }, R_ = function(t, r, e) {
        var i = e.length,
            n = L_(r + 2);
        t[n] = i & 255, t[n + 1] = i >> 8, t[n + 2] = t[n] ^ 255, t[n + 3] = t[n + 1] ^ 255;
        for (var a = 0; a < i; ++a) t[n + a + 4] = e[a];
        return (n + 4 + i) * 8;
    }, P_ = function(t, r, e, i, n, a, o, s, l, c, u) {
        Vs(r, u++, e), ++n[256];
        for (var h = Tm(n, 15), d = h.t, f = h.l, m = Tm(a, 15), _ = m.t, x = m.l, g = E_(d), b = g.c, w = g.n, T = E_(_), E = T.c, L = T.n, P = new Ha(19), k = 0; k < b.length; ++k) ++P[b[k] & 31];
        for (var k = 0; k < E.length; ++k) ++P[E[k] & 31];
        for (var A = Tm(P, 7), N = A.t, C = A.l, F = 19; F > 4 && !N[k_[F - 1]]; --F);
        var W = c + 5 << 3,
            I = $u(n, xc) + $u(a, Ud) + o,
            U = $u(n, d) + $u(a, _) + o + 14 + 3 * F + $u(P, N) + 2 * P[16] + 3 * P[17] + 7 * P[18];
        if (l >= 0 && W <= I && W <= U) return R_(r, u, t.subarray(l, l + c));
        var le, H, pe, _e;
        if (Vs(r, u, 1 + (U < I)), u += 2, U < I) {
            le = ef(d, f, 0), H = d, pe = ef(_, x, 0), _e = _;
            var Fe = ef(N, C, 0);
            Vs(r, u, w - 257), Vs(r, u + 5, L - 1), Vs(r, u + 10, F - 4), u += 14;
            for (var k = 0; k < F; ++k) Vs(r, u + 3 * k, N[k_[k]]);
            u += 3 * F;
            for (var Te = [b, E], O = 0; O < 2; ++O)
                for (var j = Te[O], k = 0; k < j.length; ++k) {
                    var X = j[k] & 31;
                    Vs(r, u, Fe[X]), u += N[X], X > 15 && (Vs(r, u, j[k] >> 5 & 127), u += j[k] >> 12);
                }
        } else le = IC, H = xc, pe = OC, _e = Ud;
        for (var k = 0; k < s; ++k) {
            var me = i[k];
            if (me > 255) {
                var X = me >> 18 & 31;
                Qu(r, u, le[X + 257]), u += H[X + 257], X > 7 && (Vs(r, u, me >> 23 & 31), u += Pm[X]);
                var xe = me & 31;
                Qu(r, u, pe[xe]), u += _e[xe], xe > 3 && (Qu(r, u, me >> 5 & 8191), u += Im[xe]);
            } else Qu(r, u, le[me]), u += H[me];
        }
        return Qu(r, u, le[256]), u + H[256];
    }, LC = new Em([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), M_ = new Io(0), RC = function(t, r, e, i, n, a) {
        var o = a.z || t.length,
            s = new Io(i + o + 5 * (1 + Math.ceil(o / 7e3)) + n),
            l = s.subarray(i, s.length - n),
            c = a.l,
            u = (a.r || 0) & 7;
        if (r) {
            u && (l[0] = a.r >> 3);
            for (var h = LC[r - 1], d = h >> 13, f = h & 8191, m = (1 << e) - 1, _ = a.p || new Ha(32768), x = a.h || new Ha(m + 1), g = Math.ceil(e / 3), b = 2 * g, w = function(Qe) {
                    return (t[Qe] ^ t[Qe + 1] << g ^ t[Qe + 2] << b) & m;
                }, T = new Em(25e3), E = new Ha(288), L = new Ha(32), P = 0, k = 0, A = a.i || 0, N = 0, C = a.w || 0, F = 0; A + 2 < o; ++A) {
                var W = w(A),
                    I = A & 32767,
                    U = x[W];
                if (_[I] = U, x[W] = I, C <= A) {
                    var le = o - A;
                    if ((P > 7e3 || N > 24576) && (le > 423 || !c)) {
                        u = P_(t, l, 0, T, E, L, k, N, F, A - F, u), N = P = k = 0, F = A;
                        for (var H = 0; H < 286; ++H) E[H] = 0;
                        for (var H = 0; H < 30; ++H) L[H] = 0;
                    }
                    var pe = 2,
                        _e = 0,
                        Fe = f,
                        Te = I - U & 32767;
                    if (le > 2 && W == w(A - Te))
                        for (var O = Math.min(d, le) - 1, j = Math.min(32767, A), X = Math.min(258, le); Te <= j && --Fe && I != U;) {
                            if (t[A + pe] == t[A + pe - Te]) {
                                for (var me = 0; me < X && t[A + me] == t[A + me - Te]; ++me);
                                if (me > pe) {
                                    if (pe = me, _e = Te, me > O) break;
                                    for (var xe = Math.min(Te, me - 2), be = 0, H = 0; H < xe; ++H) {
                                        var B = A - Te + H & 32767,
                                            ne = _[B],
                                            Z = B - ne & 32767;
                                        Z > be && (be = Z, U = B);
                                    }
                                }
                            }
                            I = U, U = _[I], Te += I - U & 32767;
                        }
                    if (_e) {
                        T[N++] = 268435456 | Dm[pe] << 18 | F_[_e];
                        var J = Dm[pe] & 31,
                            ye = F_[_e] & 31;
                        k += Pm[J] + Im[ye], ++E[257 + J], ++L[ye], C = A + pe, ++P;
                    } else T[N++] = t[A], ++E[t[A]];
                }
            }
            for (A = Math.max(A, C); A < o; ++A) T[N++] = t[A], ++E[t[A]];
            u = P_(t, l, c, T, E, L, k, N, F, A - F, u), c || (a.r = u & 7 | l[u / 8 | 0] << 3, u -= 7, a.h = x, a.p = _, a.i = A, a.w = C);
        } else {
            for (var A = a.w || 0; A < o + c; A += 65535) {
                var je = A + 65535;
                je >= o && (l[u / 8 | 0] = c, je = o), u = R_(l, u + 1, t.subarray(A, je));
            }
            a.i = o;
        }
        return NC(s, 0, i + L_(u) + n);
    }, B_ = function() {
        var t = 1,
            r = 0;
        return {
            p: function(e) {
                for (var i = t, n = r, a = e.length | 0, o = 0; o != a;) {
                    for (var s = Math.min(o + 2655, a); o < s; ++o) n += i += e[o];
                    i = (i & 65535) + 15 * (i >> 16), n = (n & 65535) + 15 * (n >> 16);
                }
                t = i, r = n;
            },
            d: function() {
                return t %= 65521, r %= 65521, (t & 255) << 24 | (t & 65280) << 8 | (r & 255) << 8 | r >> 8;
            }
        };
    }, MC = function(t, r, e, i, n) {
        if (!n && (n = {
                l: 1
            }, r.dictionary)) {
            var a = r.dictionary.subarray(-32768),
                o = new Io(a.length + t.length);
            o.set(a), o.set(t, a.length), t = o, n.w = a.length;
        }
        return RC(t, r.level == null ? 6 : r.level, r.mem == null ? n.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(t.length))) * 1.5) : 20 : 12 + r.mem, e, i, n);
    }, U_ = function(t, r, e) {
        for (; e; ++r) t[r] = e, e >>>= 8;
    }, BC = function(t, r) {
        var e = r.level,
            i = e == 0 ? 0 : e < 6 ? 1 : e == 9 ? 3 : 2;
        if (t[0] = 120, t[1] = i << 6 | (r.dictionary && 32), t[1] |= 31 - (t[0] << 8 | t[1]) % 31, r.dictionary) {
            var n = B_();
            n.p(r.dictionary), U_(t, 2, n.d());
        }
    };
    UC = typeof TextDecoder < "u" && new TextDecoder(), VC = 0;
    try {
        UC.decode(M_, {
            stream: !0
        }), VC = 1;
    } catch {}
});

function z_(t) {
    if (Array.isArray(t)) return t;
}
var W_ = Ii(() => {
    "use strict";
});

function j_(t, r) {
    var e = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
    if (e != null) {
        var i, n, a, o, s = [],
            l = !0,
            c = !1;
        try {
            if (a = (e = e.call(t)).next, r === 0) {
                if (Object(e) !== e) return;
                l = !1;
            } else
                for (; !(l = (i = a.call(e)).done) && (s.push(i.value), s.length !== r); l = !0);
        } catch (u) {
            c = !0, n = u;
        } finally {
            try {
                if (!l && e.return != null && (o = e.return(), Object(o) !== o)) return;
            } finally {
                if (c) throw n;
            }
        }
        return s;
    }
}
var H_ = Ii(() => {
    "use strict";
});

function Om(t, r) {
    (r == null || r > t.length) && (r = t.length);
    for (var e = 0, i = Array(r); e < r; e++) i[e] = t[e];
    return i;
}
var G_ = Ii(() => {
    "use strict";
});

function q_(t, r) {
    if (t) {
        if (typeof t == "string") return Om(t, r);
        var e = {}.toString.call(t).slice(8, -1);
        return e === "Object" && t.constructor && (e = t.constructor.name), e === "Map" || e === "Set" ? Array.from(t) : e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e) ? Om(t, r) : void 0;
    }
}
var X_ = Ii(() => {
    "use strict";
    G_();
});

function K_() {
    throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
var Y_ = Ii(() => {
    "use strict";
});

function Nm(t, r) {
    return z_(t) || j_(t, r) || q_(t, r) || K_();
}
var Z_ = Ii(() => {
    "use strict";
    W_();
    H_();
    X_();
    Y_();
});

function Lm(t, r = "utf8") {
    return new TextDecoder(r).decode(t);
}

function J_(t) {
    return zC.encode(t);
}
var zC, Q_ = Ii(() => {
    "use strict";
    zC = new TextEncoder();
});
var WC, jC, Rm, tf, Mm = Ii(() => {
    "use strict";
    Q_();
    WC = 1024 * 8, jC = (() => {
        let t = new Uint8Array(4),
            r = new Uint32Array(t.buffer);
        return !((r[0] = 1) & t[0]);
    })(), Rm = {
        int8: globalThis.Int8Array,
        uint8: globalThis.Uint8Array,
        int16: globalThis.Int16Array,
        uint16: globalThis.Uint16Array,
        int32: globalThis.Int32Array,
        uint32: globalThis.Uint32Array,
        uint64: globalThis.BigUint64Array,
        int64: globalThis.BigInt64Array,
        float32: globalThis.Float32Array,
        float64: globalThis.Float64Array
    }, tf = class t {
        buffer;
        byteLength;
        byteOffset;
        length;
        offset;
        lastWrittenByte;
        littleEndian;
        _data;
        _mark;
        _marks;
        constructor(r = WC, e = {}) {
            let i = !1;
            typeof r == "number" ? r = new ArrayBuffer(r) : (i = !0, this.lastWrittenByte = r.byteLength);
            let n = e.offset ? e.offset >>> 0 : 0,
                a = r.byteLength - n,
                o = n;
            (ArrayBuffer.isView(r) || r instanceof t) && (r.byteLength !== r.buffer.byteLength && (o = r.byteOffset + n), r = r.buffer), i ? this.lastWrittenByte = a : this.lastWrittenByte = 0, this.buffer = r, this.length = a, this.byteLength = a, this.byteOffset = o, this.offset = 0, this.littleEndian = !0, this._data = new DataView(this.buffer, o, a), this._mark = 0, this._marks = [];
        }
        available(r = 1) {
            return this.offset + r <= this.length;
        }
        isLittleEndian() {
            return this.littleEndian;
        }
        setLittleEndian() {
            return this.littleEndian = !0, this;
        }
        isBigEndian() {
            return !this.littleEndian;
        }
        setBigEndian() {
            return this.littleEndian = !1, this;
        }
        skip(r = 1) {
            return this.offset += r, this;
        }
        back(r = 1) {
            return this.offset -= r, this;
        }
        seek(r) {
            return this.offset = r, this;
        }
        mark() {
            return this._mark = this.offset, this;
        }
        reset() {
            return this.offset = this._mark, this;
        }
        pushMark() {
            return this._marks.push(this.offset), this;
        }
        popMark() {
            let r = this._marks.pop();
            if (r === void 0) throw new Error("Mark stack empty");
            return this.seek(r), this;
        }
        rewind() {
            return this.offset = 0, this;
        }
        ensureAvailable(r = 1) {
            if (!this.available(r)) {
                let i = (this.offset + r) * 2,
                    n = new Uint8Array(i);
                n.set(new Uint8Array(this.buffer)), this.buffer = n.buffer, this.length = i, this.byteLength = i, this._data = new DataView(this.buffer);
            }
            return this;
        }
        readBoolean() {
            return this.readUint8() !== 0;
        }
        readInt8() {
            return this._data.getInt8(this.offset++);
        }
        readUint8() {
            return this._data.getUint8(this.offset++);
        }
        readByte() {
            return this.readUint8();
        }
        readBytes(r = 1) {
            return this.readArray(r, "uint8");
        }
        readArray(r, e) {
            let i = Rm[e].BYTES_PER_ELEMENT * r,
                n = this.byteOffset + this.offset,
                a = this.buffer.slice(n, n + i);
            if (this.littleEndian === jC && e !== "uint8" && e !== "int8") {
                let s = new Uint8Array(this.buffer.slice(n, n + i));
                s.reverse();
                let l = new Rm[e](s.buffer);
                return this.offset += i, l.reverse(), l;
            }
            let o = new Rm[e](a);
            return this.offset += i, o;
        }
        readInt16() {
            let r = this._data.getInt16(this.offset, this.littleEndian);
            return this.offset += 2, r;
        }
        readUint16() {
            let r = this._data.getUint16(this.offset, this.littleEndian);
            return this.offset += 2, r;
        }
        readInt32() {
            let r = this._data.getInt32(this.offset, this.littleEndian);
            return this.offset += 4, r;
        }
        readUint32() {
            let r = this._data.getUint32(this.offset, this.littleEndian);
            return this.offset += 4, r;
        }
        readFloat32() {
            let r = this._data.getFloat32(this.offset, this.littleEndian);
            return this.offset += 4, r;
        }
        readFloat64() {
            let r = this._data.getFloat64(this.offset, this.littleEndian);
            return this.offset += 8, r;
        }
        readBigInt64() {
            let r = this._data.getBigInt64(this.offset, this.littleEndian);
            return this.offset += 8, r;
        }
        readBigUint64() {
            let r = this._data.getBigUint64(this.offset, this.littleEndian);
            return this.offset += 8, r;
        }
        readChar() {
            return String.fromCharCode(this.readInt8());
        }
        readChars(r = 1) {
            let e = "";
            for (let i = 0; i < r; i++) e += this.readChar();
            return e;
        }
        readUtf8(r = 1) {
            return Lm(this.readBytes(r));
        }
        decodeText(r = 1, e = "utf8") {
            return Lm(this.readBytes(r), e);
        }
        writeBoolean(r) {
            return this.writeUint8(r ? 255 : 0), this;
        }
        writeInt8(r) {
            return this.ensureAvailable(1), this._data.setInt8(this.offset++, r), this._updateLastWrittenByte(), this;
        }
        writeUint8(r) {
            return this.ensureAvailable(1), this._data.setUint8(this.offset++, r), this._updateLastWrittenByte(), this;
        }
        writeByte(r) {
            return this.writeUint8(r);
        }
        writeBytes(r) {
            this.ensureAvailable(r.length);
            for (let e = 0; e < r.length; e++) this._data.setUint8(this.offset++, r[e]);
            return this._updateLastWrittenByte(), this;
        }
        writeInt16(r) {
            return this.ensureAvailable(2), this._data.setInt16(this.offset, r, this.littleEndian), this.offset += 2, this._updateLastWrittenByte(), this;
        }
        writeUint16(r) {
            return this.ensureAvailable(2), this._data.setUint16(this.offset, r, this.littleEndian), this.offset += 2, this._updateLastWrittenByte(), this;
        }
        writeInt32(r) {
            return this.ensureAvailable(4), this._data.setInt32(this.offset, r, this.littleEndian), this.offset += 4, this._updateLastWrittenByte(), this;
        }
        writeUint32(r) {
            return this.ensureAvailable(4), this._data.setUint32(this.offset, r, this.littleEndian), this.offset += 4, this._updateLastWrittenByte(), this;
        }
        writeFloat32(r) {
            return this.ensureAvailable(4), this._data.setFloat32(this.offset, r, this.littleEndian), this.offset += 4, this._updateLastWrittenByte(), this;
        }
        writeFloat64(r) {
            return this.ensureAvailable(8), this._data.setFloat64(this.offset, r, this.littleEndian), this.offset += 8, this._updateLastWrittenByte(), this;
        }
        writeBigInt64(r) {
            return this.ensureAvailable(8), this._data.setBigInt64(this.offset, r, this.littleEndian), this.offset += 8, this._updateLastWrittenByte(), this;
        }
        writeBigUint64(r) {
            return this.ensureAvailable(8), this._data.setBigUint64(this.offset, r, this.littleEndian), this.offset += 8, this._updateLastWrittenByte(), this;
        }
        writeChar(r) {
            return this.writeUint8(r.charCodeAt(0));
        }
        writeChars(r) {
            for (let e = 0; e < r.length; e++) this.writeUint8(r.charCodeAt(e));
            return this;
        }
        writeUtf8(r) {
            return this.writeBytes(J_(r));
        }
        toArray() {
            return new Uint8Array(this.buffer, this.byteOffset, this.lastWrittenByte);
        }
        getWrittenByteLength() {
            return this.lastWrittenByte - this.byteOffset;
        }
        _updateLastWrittenByte() {
            this.offset > this.lastWrittenByte && (this.lastWrittenByte = this.offset);
        }
    };
});

function HC(t, r, e) {
    let i = t;
    for (let n = 0; n < e; n++) i = ey[(i ^ r[n]) & 255] ^ i >>> 8;
    return i;
}

function GC(t, r) {
    return (HC($_, t, r) ^ $_) >>> 0;
}

function Bm(t, r, e) {
    let i = t.readUint32(),
        n = GC(new Uint8Array(t.buffer, t.byteOffset + t.offset - r - 4, r), r);
    if (n !== i) throw new Error(`CRC mismatch for chunk ${e}. Expected ${i}, found ${n}`);
}
var ey, $_, zd = Ii(() => {
    "use strict";
    ey = [];
    for (let t = 0; t < 256; t++) {
        let r = t;
        for (let e = 0; e < 8; e++) r & 1 ? r = 3988292384 ^ r >>> 1 : r = r >>> 1;
        ey[t] = r;
    }
    $_ = 4294967295;
});

function Wd(t, r, e) {
    for (let i = 0; i < e; i++) r[i] = t[i];
}

function jd(t, r, e, i) {
    let n = 0;
    for (; n < i; n++) r[n] = t[n];
    for (; n < e; n++) r[n] = t[n] + r[n - i] & 255;
}

function Hd(t, r, e, i) {
    let n = 0;
    if (e.length === 0)
        for (; n < i; n++) r[n] = t[n];
    else
        for (; n < i; n++) r[n] = t[n] + e[n] & 255;
}

function Gd(t, r, e, i, n) {
    let a = 0;
    if (e.length === 0) {
        for (; a < n; a++) r[a] = t[a];
        for (; a < i; a++) r[a] = t[a] + (r[a - n] >> 1) & 255;
    } else {
        for (; a < n; a++) r[a] = t[a] + (e[a] >> 1) & 255;
        for (; a < i; a++) r[a] = t[a] + (r[a - n] + e[a] >> 1) & 255;
    }
}

function qd(t, r, e, i, n) {
    let a = 0;
    if (e.length === 0) {
        for (; a < n; a++) r[a] = t[a];
        for (; a < i; a++) r[a] = t[a] + r[a - n] & 255;
    } else {
        for (; a < n; a++) r[a] = t[a] + e[a] & 255;
        for (; a < i; a++) r[a] = t[a] + qC(r[a - n], e[a], e[a - n]) & 255;
    }
}

function qC(t, r, e) {
    let i = t + r - e,
        n = Math.abs(i - t),
        a = Math.abs(i - r),
        o = Math.abs(i - e);
    return n <= a && n <= o ? t : a <= o ? r : e;
}
var Um = Ii(() => {
    "use strict";
});

function ty(t, r, e, i, n, a) {
    switch (t) {
        case 0:
            Wd(r, e, n);
            break;
        case 1:
            jd(r, e, n, a);
            break;
        case 2:
            Hd(r, e, i, n);
            break;
        case 3:
            Gd(r, e, i, n, a);
            break;
        case 4:
            qd(r, e, i, n, a);
            break;
        default:
            throw new Error(`Unsupported filter: ${t}`);
    }
}
var ry = Ii(() => {
    "use strict";
    Um();
});

function iy(t) {
    let {
        data: r,
        width: e,
        height: i,
        channels: n,
        depth: a
    } = t, o = [{
        x: 0,
        y: 0,
        xStep: 8,
        yStep: 8
    }, {
        x: 4,
        y: 0,
        xStep: 8,
        yStep: 8
    }, {
        x: 0,
        y: 4,
        xStep: 4,
        yStep: 8
    }, {
        x: 2,
        y: 0,
        xStep: 4,
        yStep: 4
    }, {
        x: 0,
        y: 2,
        xStep: 2,
        yStep: 4
    }, {
        x: 1,
        y: 0,
        xStep: 2,
        yStep: 2
    }, {
        x: 0,
        y: 1,
        xStep: 1,
        yStep: 2
    }], s = Math.ceil(a / 8) * n, l = new Uint8Array(i * e * s), c = 0;
    for (let u = 0; u < 7; u++) {
        let h = o[u],
            d = Math.ceil((e - h.x) / h.xStep),
            f = Math.ceil((i - h.y) / h.yStep);
        if (d <= 0 || f <= 0) continue;
        let m = d * s,
            _ = new Uint8Array(m);
        for (let x = 0; x < f; x++) {
            let g = r[c++],
                b = r.subarray(c, c + m);
            c += m;
            let w = new Uint8Array(m);
            ty(g, b, w, _, m, s), _.set(w);
            for (let T = 0; T < d; T++) {
                let E = h.x + T * h.xStep,
                    L = h.y + x * h.yStep;
                if (!(E >= e || L >= i))
                    for (let P = 0; P < s; P++) l[(L * e + E) * s + P] = w[T * s + P];
            }
        }
    }
    if (a === 16) {
        let u = new Uint16Array(l.buffer);
        if (YC)
            for (let h = 0; h < u.length; h++) u[h] = ZC(u[h]);
        return u;
    } else return l;
}

function ZC(t) {
    return (t & 255) << 8 | t >> 8 & 255;
}
var XC, KC, YC, ny = Ii(() => {
    "use strict";
    ry();
    XC = new Uint16Array([255]), KC = new Uint8Array(XC.buffer), YC = KC[0] === 255;
});

function Vm(t) {
    let {
        data: r,
        width: e,
        height: i,
        channels: n,
        depth: a
    } = t, o = Math.ceil(a / 8) * n, s = Math.ceil(a / 8 * n * e), l = new Uint8Array(i * s), c = eA, u = 0, h, d;
    for (let f = 0; f < i; f++) {
        switch (h = r.subarray(u + 1, u + 1 + s), d = l.subarray(f * s, (f + 1) * s), r[u]) {
            case 0:
                Wd(h, d, s);
                break;
            case 1:
                jd(h, d, s, o);
                break;
            case 2:
                Hd(h, d, c, s);
                break;
            case 3:
                Gd(h, d, c, s, o);
                break;
            case 4:
                qd(h, d, c, s, o);
                break;
            default:
                throw new Error(`Unsupported filter: ${r[u]}`);
        }
        c = d, u += s + 1;
    }
    if (a === 16) {
        let f = new Uint16Array(l.buffer);
        if ($C)
            for (let m = 0; m < f.length; m++) f[m] = tA(f[m]);
        return f;
    } else return l;
}

function tA(t) {
    return (t & 255) << 8 | t >> 8 & 255;
}
var JC, QC, $C, eA, ay = Ii(() => {
    "use strict";
    Um();
    JC = new Uint16Array([255]), QC = new Uint8Array(JC.buffer), $C = QC[0] === 255, eA = new Uint8Array(0);
});

function zm(t) {
    if (!oy(t.readBytes(Xd.length))) throw new Error("wrong PNG signature");
}

function oy(t) {
    if (t.length < Xd.length) return !1;
    for (let r = 0; r < Xd.length; r++)
        if (t[r] !== Xd[r]) return !1;
    return !0;
}
var Xd, Kd = Ii(() => {
    "use strict";
    Xd = Uint8Array.of(137, 80, 78, 71, 13, 10, 26, 10);
});

function nA(t) {
    if (oA(t), t.length === 0 || t.length > 79) throw new Error("keyword length must be between 1 and 79");
}

function oA(t) {
    if (!aA.test(t)) throw new Error("invalid latin1 text");
}

function cy(t, r, e) {
    let i = Wm(r);
    t[i] = sA(r, e - i.length - 1);
}

function Wm(t) {
    for (t.mark(); t.readByte() !== iA;);
    let r = t.offset;
    t.reset();
    let e = ly.decode(t.readBytes(r - t.offset - 1));
    return t.skip(1), nA(e), e;
}

function sA(t, r) {
    return ly.decode(t.readBytes(r));
}
var sy, iA, ly, aA, jm = Ii(() => {
    "use strict";
    zd();
    sy = "tEXt", iA = 0, ly = new TextDecoder("latin1");
    aA = /^[\u0000-\u00FF]*$/;
});
var da, rf, Yd, nf, af, Zd, Hm = Ii(() => {
    "use strict";
    da = {
        UNKNOWN: -1,
        GREYSCALE: 0,
        TRUECOLOUR: 2,
        INDEXED_COLOUR: 3,
        GREYSCALE_ALPHA: 4,
        TRUECOLOUR_ALPHA: 6
    }, rf = {
        UNKNOWN: -1,
        DEFLATE: 0
    }, Yd = {
        UNKNOWN: -1,
        ADAPTIVE: 0
    }, nf = {
        UNKNOWN: -1,
        NO_INTERLACE: 0,
        ADAM7: 1
    }, af = {
        NONE: 0,
        BACKGROUND: 1,
        PREVIOUS: 2
    }, Zd = {
        SOURCE: 0,
        OVER: 1
    };
});

function lA(t) {
    if (t !== 1 && t !== 2 && t !== 4 && t !== 8 && t !== 16) throw new Error(`invalid bit depth: ${t}`);
    return t;
}
var Jd, uy = Ii(() => {
    "use strict";
    Mm();
    w0();
    zd();
    ny();
    ay();
    Kd();
    jm();
    Hm();
    Jd = class extends tf {
        _checkCrc;
        _inflator;
        _png;
        _apng;
        _end;
        _hasPalette;
        _palette;
        _hasTransparency;
        _transparency;
        _compressionMethod;
        _filterMethod;
        _interlaceMethod;
        _colorType;
        _isAnimated;
        _numberOfFrames;
        _numberOfPlays;
        _frames;
        _writingDataChunks;
        constructor(r, e = {}) {
            super(r);
            let {
                checkCrc: i = !1
            } = e;
            this._checkCrc = i, this._inflator = new bm(), this._png = {
                width: -1,
                height: -1,
                channels: -1,
                data: new Uint8Array(0),
                depth: 1,
                text: {}
            }, this._apng = {
                width: -1,
                height: -1,
                channels: -1,
                depth: 1,
                numberOfFrames: 1,
                numberOfPlays: 0,
                text: {},
                frames: []
            }, this._end = !1, this._hasPalette = !1, this._palette = [], this._hasTransparency = !1, this._transparency = new Uint16Array(0), this._compressionMethod = rf.UNKNOWN, this._filterMethod = Yd.UNKNOWN, this._interlaceMethod = nf.UNKNOWN, this._colorType = da.UNKNOWN, this._isAnimated = !1, this._numberOfFrames = 1, this._numberOfPlays = 0, this._frames = [], this._writingDataChunks = !1, this.setBigEndian();
        }
        decode() {
            for (zm(this); !this._end;) {
                let r = this.readUint32(),
                    e = this.readChars(4);
                this.decodeChunk(r, e);
            }
            return this.decodeImage(), this._png;
        }
        decodeApng() {
            for (zm(this); !this._end;) {
                let r = this.readUint32(),
                    e = this.readChars(4);
                this.decodeApngChunk(r, e);
            }
            return this.decodeApngImage(), this._apng;
        }
        decodeChunk(r, e) {
            let i = this.offset;
            switch (e) {
                case "IHDR":
                    this.decodeIHDR();
                    break;
                case "PLTE":
                    this.decodePLTE(r);
                    break;
                case "IDAT":
                    this.decodeIDAT(r);
                    break;
                case "IEND":
                    this._end = !0;
                    break;
                case "tRNS":
                    this.decodetRNS(r);
                    break;
                case "iCCP":
                    this.decodeiCCP(r);
                    break;
                case sy:
                    cy(this._png.text, this, r);
                    break;
                case "pHYs":
                    this.decodepHYs();
                    break;
                default:
                    this.skip(r);
                    break;
            }
            if (this.offset - i !== r) throw new Error(`Length mismatch while decoding chunk ${e}`);
            this._checkCrc ? Bm(this, r + 4, e) : this.skip(4);
        }
        decodeApngChunk(r, e) {
            let i = this.offset;
            switch (e !== "fdAT" && e !== "IDAT" && this._writingDataChunks && this.pushDataToFrame(), e) {
                case "acTL":
                    this.decodeACTL();
                    break;
                case "fcTL":
                    this.decodeFCTL();
                    break;
                case "fdAT":
                    this.decodeFDAT(r);
                    break;
                default:
                    this.decodeChunk(r, e), this.offset = i + r;
                    break;
            }
            if (this.offset - i !== r) throw new Error(`Length mismatch while decoding chunk ${e}`);
            this._checkCrc ? Bm(this, r + 4, e) : this.skip(4);
        }
        decodeIHDR() {
            let r = this._png;
            r.width = this.readUint32(), r.height = this.readUint32(), r.depth = lA(this.readUint8());
            let e = this.readUint8();
            this._colorType = e;
            let i;
            switch (e) {
                case da.GREYSCALE:
                    i = 1;
                    break;
                case da.TRUECOLOUR:
                    i = 3;
                    break;
                case da.INDEXED_COLOUR:
                    i = 1;
                    break;
                case da.GREYSCALE_ALPHA:
                    i = 2;
                    break;
                case da.TRUECOLOUR_ALPHA:
                    i = 4;
                    break;
                case da.UNKNOWN:
                default:
                    throw new Error(`Unknown color type: ${e}`);
            }
            if (this._png.channels = i, this._compressionMethod = this.readUint8(), this._compressionMethod !== rf.DEFLATE) throw new Error(`Unsupported compression method: ${this._compressionMethod}`);
            this._filterMethod = this.readUint8(), this._interlaceMethod = this.readUint8();
        }
        decodeACTL() {
            this._numberOfFrames = this.readUint32(), this._numberOfPlays = this.readUint32(), this._isAnimated = !0;
        }
        decodeFCTL() {
            let r = {
                sequenceNumber: this.readUint32(),
                width: this.readUint32(),
                height: this.readUint32(),
                xOffset: this.readUint32(),
                yOffset: this.readUint32(),
                delayNumber: this.readUint16(),
                delayDenominator: this.readUint16(),
                disposeOp: this.readUint8(),
                blendOp: this.readUint8(),
                data: new Uint8Array(0)
            };
            this._frames.push(r);
        }
        decodePLTE(r) {
            if (r % 3 !== 0) throw new RangeError(`PLTE field length must be a multiple of 3. Got ${r}`);
            let e = r / 3;
            this._hasPalette = !0;
            let i = [];
            this._palette = i;
            for (let n = 0; n < e; n++) i.push([this.readUint8(), this.readUint8(), this.readUint8()]);
        }
        decodeIDAT(r) {
            this._writingDataChunks = !0;
            let e = r,
                i = this.offset + this.byteOffset;
            if (this._inflator.push(new Uint8Array(this.buffer, i, e)), this._inflator.err) throw new Error(`Error while decompressing the data: ${this._inflator.err}`);
            this.skip(r);
        }
        decodeFDAT(r) {
            this._writingDataChunks = !0;
            let e = r,
                i = this.offset + this.byteOffset;
            if (i += 4, e -= 4, this._inflator.push(new Uint8Array(this.buffer, i, e)), this._inflator.err) throw new Error(`Error while decompressing the data: ${this._inflator.err}`);
            this.skip(r);
        }
        decodetRNS(r) {
            switch (this._colorType) {
                case da.GREYSCALE:
                case da.TRUECOLOUR:
                    {
                        if (r % 2 !== 0) throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${r}`);
                        if (r / 2 > this._png.width * this._png.height) throw new Error(`tRNS chunk contains more alpha values than there are pixels (${r/2} vs ${this._png.width*this._png.height})`);this._hasTransparency = !0,
                        this._transparency = new Uint16Array(r / 2);
                        for (let e = 0; e < r / 2; e++) this._transparency[e] = this.readUint16();
                        break;
                    }
                case da.INDEXED_COLOUR:
                    {
                        if (r > this._palette.length) throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${r} vs ${this._palette.length})`);
                        let e = 0;
                        for (; e < r; e++) {
                            let i = this.readByte();
                            this._palette[e].push(i);
                        }
                        for (; e < this._palette.length; e++) this._palette[e].push(255);
                        break;
                    }
                case da.UNKNOWN:
                case da.GREYSCALE_ALPHA:
                case da.TRUECOLOUR_ALPHA:
                default:
                    throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`);
            }
        }
        decodeiCCP(r) {
            let e = Wm(this),
                i = this.readUint8();
            if (i !== rf.DEFLATE) throw new Error(`Unsupported iCCP compression method: ${i}`);
            let n = this.readBytes(r - e.length - 2);
            this._png.iccEmbeddedProfile = {
                name: e,
                profile: Bx(n)
            };
        }
        decodepHYs() {
            let r = this.readUint32(),
                e = this.readUint32(),
                i = this.readByte();
            this._png.resolution = {
                x: r,
                y: e,
                unit: i
            };
        }
        decodeApngImage() {
            this._apng.width = this._png.width, this._apng.height = this._png.height, this._apng.channels = this._png.channels, this._apng.depth = this._png.depth, this._apng.numberOfFrames = this._numberOfFrames, this._apng.numberOfPlays = this._numberOfPlays, this._apng.text = this._png.text, this._apng.resolution = this._png.resolution;
            for (let r = 0; r < this._numberOfFrames; r++) {
                let e = {
                        sequenceNumber: this._frames[r].sequenceNumber,
                        delayNumber: this._frames[r].delayNumber,
                        delayDenominator: this._frames[r].delayDenominator,
                        data: this._apng.depth === 8 ? new Uint8Array(this._apng.width * this._apng.height * this._apng.channels) : new Uint16Array(this._apng.width * this._apng.height * this._apng.channels)
                    },
                    i = this._frames.at(r);
                if (i) {
                    if (i.data = Vm({
                            data: i.data,
                            width: i.width,
                            height: i.height,
                            channels: this._apng.channels,
                            depth: this._apng.depth
                        }), this._hasPalette && (this._apng.palette = this._palette), this._hasTransparency && (this._apng.transparency = this._transparency), r === 0 || i.xOffset === 0 && i.yOffset === 0 && i.width === this._png.width && i.height === this._png.height) e.data = i.data;
                    else {
                        let n = this._apng.frames.at(r - 1);
                        this.disposeFrame(i, n, e), this.addFrameDataToCanvas(e, i);
                    }
                    this._apng.frames.push(e);
                }
            }
            return this._apng;
        }
        disposeFrame(r, e, i) {
            switch (r.disposeOp) {
                case af.NONE:
                    break;
                case af.BACKGROUND:
                    for (let n = 0; n < this._png.height; n++)
                        for (let a = 0; a < this._png.width; a++) {
                            let o = (n * r.width + a) * this._png.channels;
                            for (let s = 0; s < this._png.channels; s++) i.data[o + s] = 0;
                        }
                    break;
                case af.PREVIOUS:
                    i.data.set(e.data);
                    break;
                default:
                    throw new Error("Unknown disposeOp");
            }
        }
        addFrameDataToCanvas(r, e) {
            let i = 1 << this._png.depth,
                n = (a, o) => {
                    let s = ((a + e.yOffset) * this._png.width + e.xOffset + o) * this._png.channels,
                        l = (a * e.width + o) * this._png.channels;
                    return {
                        index: s,
                        frameIndex: l
                    };
                };
            switch (e.blendOp) {
                case Zd.SOURCE:
                    for (let a = 0; a < e.height; a++)
                        for (let o = 0; o < e.width; o++) {
                            let {
                                index: s,
                                frameIndex: l
                            } = n(a, o);
                            for (let c = 0; c < this._png.channels; c++) r.data[s + c] = e.data[l + c];
                        }
                    break;
                case Zd.OVER:
                    for (let a = 0; a < e.height; a++)
                        for (let o = 0; o < e.width; o++) {
                            let {
                                index: s,
                                frameIndex: l
                            } = n(a, o);
                            for (let c = 0; c < this._png.channels; c++) {
                                let u = e.data[l + this._png.channels - 1] / i,
                                    h = c % (this._png.channels - 1) === 0 ? 1 : e.data[l + c],
                                    d = Math.floor(u * h + (1 - u) * r.data[s + c]);
                                r.data[s + c] += d;
                            }
                        }
                    break;
                default:
                    throw new Error("Unknown blendOp");
            }
        }
        decodeImage() {
            if (this._inflator.err) throw new Error(`Error while decompressing the data: ${this._inflator.err}`);
            let r = this._isAnimated ? (this._frames ? .at(0)).data : this._inflator.result;
            if (this._filterMethod !== Yd.ADAPTIVE) throw new Error(`Filter method ${this._filterMethod} not supported`);
            if (this._interlaceMethod === nf.NO_INTERLACE) this._png.data = Vm({
                data: r,
                width: this._png.width,
                height: this._png.height,
                channels: this._png.channels,
                depth: this._png.depth
            });
            else if (this._interlaceMethod === nf.ADAM7) this._png.data = iy({
                data: r,
                width: this._png.width,
                height: this._png.height,
                channels: this._png.channels,
                depth: this._png.depth
            });
            else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);
            this._hasPalette && (this._png.palette = this._palette), this._hasTransparency && (this._png.transparency = this._transparency);
        }
        pushDataToFrame() {
            let r = this._inflator.result,
                e = this._frames.at(-1);
            e ? e.data = r : this._frames.push({
                sequenceNumber: 0,
                width: this._png.width,
                height: this._png.height,
                xOffset: 0,
                yOffset: 0,
                delayNumber: 0,
                delayDenominator: 0,
                disposeOp: af.NONE,
                blendOp: Zd.SOURCE,
                data: r
            }), this._inflator = new bm(), this._writingDataChunks = !1;
        }
    };
});
var fy = Ii(() => {
    "use strict";
    Mm();
    w0();
    zd();
    Kd();
    jm();
    Hm();
});
var hy = Ii(() => {
    "use strict";
});
var dy = Ii(() => {
    "use strict";
});

function py(t, r) {
    return new Jd(t, r).decode();
}
var my = Ii(() => {
    "use strict";
    uy();
    fy();
    Kd();
    hy();
    dy();
});
var ng = {};
B3(ng, {
    AcroForm: () => wA,
    AcroFormAppearance: () => Dt,
    AcroFormButton: () => Cn,
    AcroFormCheckBox: () => lf,
    AcroFormChoiceField: () => bc,
    AcroFormComboBox: () => Sc,
    AcroFormEditBox: () => of ,
    AcroFormListBox: () => wc,
    AcroFormPasswordField: () => cf,
    AcroFormPushButton: () => sf,
    AcroFormRadioButton: () => Cc,
    AcroFormTextField: () => Pl,
    GState: () => uf,
    ShadingPattern: () => Fl,
    TilingPattern: () => yc,
    default: () => Bt,
    jsPDF: () => Bt
});

function Gm() {
    hr.console && typeof hr.console.log == "function" && hr.console.log.apply(hr.console, arguments);
}

function qm(t, r, e) {
    var i = new XMLHttpRequest();
    i.open("GET", t), i.responseType = "blob", i.onload = function() {
        _c(i.response, r, e);
    }, i.onerror = function() {
        xi.error("could not download file");
    }, i.send();
}

function gy(t) {
    var r = new XMLHttpRequest();
    r.open("HEAD", t, !1);
    try {
        r.send();
    } catch {}
    return r.status >= 200 && r.status <= 299;
}

function Qd(t) {
    try {
        t.dispatchEvent(new MouseEvent("click"));
    } catch {
        var r = document.createEvent("MouseEvents");
        r.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), t.dispatchEvent(r);
    }
}

function Vy(t) {
    var r;
    t = t || "", this.ok = !1, t.charAt(0) == "#" && (t = t.substr(1, 6)), t = {
        aliceblue: "f0f8ff",
        antiquewhite: "faebd7",
        aqua: "00ffff",
        aquamarine: "7fffd4",
        azure: "f0ffff",
        beige: "f5f5dc",
        bisque: "ffe4c4",
        black: "000000",
        blanchedalmond: "ffebcd",
        blue: "0000ff",
        blueviolet: "8a2be2",
        brown: "a52a2a",
        burlywood: "deb887",
        cadetblue: "5f9ea0",
        chartreuse: "7fff00",
        chocolate: "d2691e",
        coral: "ff7f50",
        cornflowerblue: "6495ed",
        cornsilk: "fff8dc",
        crimson: "dc143c",
        cyan: "00ffff",
        darkblue: "00008b",
        darkcyan: "008b8b",
        darkgoldenrod: "b8860b",
        darkgray: "a9a9a9",
        darkgreen: "006400",
        darkkhaki: "bdb76b",
        darkmagenta: "8b008b",
        darkolivegreen: "556b2f",
        darkorange: "ff8c00",
        darkorchid: "9932cc",
        darkred: "8b0000",
        darksalmon: "e9967a",
        darkseagreen: "8fbc8f",
        darkslateblue: "483d8b",
        darkslategray: "2f4f4f",
        darkturquoise: "00ced1",
        darkviolet: "9400d3",
        deeppink: "ff1493",
        deepskyblue: "00bfff",
        dimgray: "696969",
        dodgerblue: "1e90ff",
        feldspar: "d19275",
        firebrick: "b22222",
        floralwhite: "fffaf0",
        forestgreen: "228b22",
        fuchsia: "ff00ff",
        gainsboro: "dcdcdc",
        ghostwhite: "f8f8ff",
        gold: "ffd700",
        goldenrod: "daa520",
        gray: "808080",
        green: "008000",
        greenyellow: "adff2f",
        honeydew: "f0fff0",
        hotpink: "ff69b4",
        indianred: "cd5c5c",
        indigo: "4b0082",
        ivory: "fffff0",
        khaki: "f0e68c",
        lavender: "e6e6fa",
        lavenderblush: "fff0f5",
        lawngreen: "7cfc00",
        lemonchiffon: "fffacd",
        lightblue: "add8e6",
        lightcoral: "f08080",
        lightcyan: "e0ffff",
        lightgoldenrodyellow: "fafad2",
        lightgrey: "d3d3d3",
        lightgreen: "90ee90",
        lightpink: "ffb6c1",
        lightsalmon: "ffa07a",
        lightseagreen: "20b2aa",
        lightskyblue: "87cefa",
        lightslateblue: "8470ff",
        lightslategray: "778899",
        lightsteelblue: "b0c4de",
        lightyellow: "ffffe0",
        lime: "00ff00",
        limegreen: "32cd32",
        linen: "faf0e6",
        magenta: "ff00ff",
        maroon: "800000",
        mediumaquamarine: "66cdaa",
        mediumblue: "0000cd",
        mediumorchid: "ba55d3",
        mediumpurple: "9370d8",
        mediumseagreen: "3cb371",
        mediumslateblue: "7b68ee",
        mediumspringgreen: "00fa9a",
        mediumturquoise: "48d1cc",
        mediumvioletred: "c71585",
        midnightblue: "191970",
        mintcream: "f5fffa",
        mistyrose: "ffe4e1",
        moccasin: "ffe4b5",
        navajowhite: "ffdead",
        navy: "000080",
        oldlace: "fdf5e6",
        olive: "808000",
        olivedrab: "6b8e23",
        orange: "ffa500",
        orangered: "ff4500",
        orchid: "da70d6",
        palegoldenrod: "eee8aa",
        palegreen: "98fb98",
        paleturquoise: "afeeee",
        palevioletred: "d87093",
        papayawhip: "ffefd5",
        peachpuff: "ffdab9",
        peru: "cd853f",
        pink: "ffc0cb",
        plum: "dda0dd",
        powderblue: "b0e0e6",
        purple: "800080",
        red: "ff0000",
        rosybrown: "bc8f8f",
        royalblue: "4169e1",
        saddlebrown: "8b4513",
        salmon: "fa8072",
        sandybrown: "f4a460",
        seagreen: "2e8b57",
        seashell: "fff5ee",
        sienna: "a0522d",
        silver: "c0c0c0",
        skyblue: "87ceeb",
        slateblue: "6a5acd",
        slategray: "708090",
        snow: "fffafa",
        springgreen: "00ff7f",
        steelblue: "4682b4",
        tan: "d2b48c",
        teal: "008080",
        thistle: "d8bfd8",
        tomato: "ff6347",
        turquoise: "40e0d0",
        violet: "ee82ee",
        violetred: "d02090",
        wheat: "f5deb3",
        white: "ffffff",
        whitesmoke: "f5f5f5",
        yellow: "ffff00",
        yellowgreen: "9acd32"
    }[t = (t = t.replace(/ /g, "")).toLowerCase()] || t;
    for (var e = [{
            re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
            example: ["rgb(123, 234, 45)", "rgb(255,234,245)"],
            process: function(s) {
                return [parseInt(s[1]), parseInt(s[2]), parseInt(s[3])];
            }
        }, {
            re: /^(\w{2})(\w{2})(\w{2})$/,
            example: ["#00ff00", "336699"],
            process: function(s) {
                return [parseInt(s[1], 16), parseInt(s[2], 16), parseInt(s[3], 16)];
            }
        }, {
            re: /^(\w{1})(\w{1})(\w{1})$/,
            example: ["#fb0", "f0f"],
            process: function(s) {
                return [parseInt(s[1] + s[1], 16), parseInt(s[2] + s[2], 16), parseInt(s[3] + s[3], 16)];
            }
        }], i = 0; i < e.length; i++) {
        var n = e[i].re,
            a = e[i].process,
            o = n.exec(t);
        o && (r = a(o), this.r = r[0], this.g = r[1], this.b = r[2], this.ok = !0);
    }
    this.r = this.r < 0 || isNaN(this.r) ? 0 : this.r > 255 ? 255 : this.r, this.g = this.g < 0 || isNaN(this.g) ? 0 : this.g > 255 ? 255 : this.g, this.b = this.b < 0 || isNaN(this.b) ? 0 : this.b > 255 ? 255 : this.b, this.toRGB = function() {
        return "rgb(" + this.r + ", " + this.g + ", " + this.b + ")";
    }, this.toHex = function() {
        var s = this.r.toString(16),
            l = this.g.toString(16),
            c = this.b.toString(16);
        return s.length == 1 && (s = "0" + s), l.length == 1 && (l = "0" + l), c.length == 1 && (c = "0" + c), "#" + s + l + c;
    };
}

function Xm(t, r) {
    var e = t[0],
        i = t[1],
        n = t[2],
        a = t[3];
    e = Kn(e, i, n, a, r[0], 7, -680876936), a = Kn(a, e, i, n, r[1], 12, -389564586), n = Kn(n, a, e, i, r[2], 17, 606105819), i = Kn(i, n, a, e, r[3], 22, -1044525330), e = Kn(e, i, n, a, r[4], 7, -176418897), a = Kn(a, e, i, n, r[5], 12, 1200080426), n = Kn(n, a, e, i, r[6], 17, -1473231341), i = Kn(i, n, a, e, r[7], 22, -45705983), e = Kn(e, i, n, a, r[8], 7, 1770035416), a = Kn(a, e, i, n, r[9], 12, -1958414417), n = Kn(n, a, e, i, r[10], 17, -42063), i = Kn(i, n, a, e, r[11], 22, -1990404162), e = Kn(e, i, n, a, r[12], 7, 1804603682), a = Kn(a, e, i, n, r[13], 12, -40341101), n = Kn(n, a, e, i, r[14], 17, -1502002290), e = Yn(e, i = Kn(i, n, a, e, r[15], 22, 1236535329), n, a, r[1], 5, -165796510), a = Yn(a, e, i, n, r[6], 9, -1069501632), n = Yn(n, a, e, i, r[11], 14, 643717713), i = Yn(i, n, a, e, r[0], 20, -373897302), e = Yn(e, i, n, a, r[5], 5, -701558691), a = Yn(a, e, i, n, r[10], 9, 38016083), n = Yn(n, a, e, i, r[15], 14, -660478335), i = Yn(i, n, a, e, r[4], 20, -405537848), e = Yn(e, i, n, a, r[9], 5, 568446438), a = Yn(a, e, i, n, r[14], 9, -1019803690), n = Yn(n, a, e, i, r[3], 14, -187363961), i = Yn(i, n, a, e, r[8], 20, 1163531501), e = Yn(e, i, n, a, r[13], 5, -1444681467), a = Yn(a, e, i, n, r[2], 9, -51403784), n = Yn(n, a, e, i, r[7], 14, 1735328473), e = Zn(e, i = Yn(i, n, a, e, r[12], 20, -1926607734), n, a, r[5], 4, -378558), a = Zn(a, e, i, n, r[8], 11, -2022574463), n = Zn(n, a, e, i, r[11], 16, 1839030562), i = Zn(i, n, a, e, r[14], 23, -35309556), e = Zn(e, i, n, a, r[1], 4, -1530992060), a = Zn(a, e, i, n, r[4], 11, 1272893353), n = Zn(n, a, e, i, r[7], 16, -155497632), i = Zn(i, n, a, e, r[10], 23, -1094730640), e = Zn(e, i, n, a, r[13], 4, 681279174), a = Zn(a, e, i, n, r[0], 11, -358537222), n = Zn(n, a, e, i, r[3], 16, -722521979), i = Zn(i, n, a, e, r[6], 23, 76029189), e = Zn(e, i, n, a, r[9], 4, -640364487), a = Zn(a, e, i, n, r[12], 11, -421815835), n = Zn(n, a, e, i, r[15], 16, 530742520), e = Jn(e, i = Zn(i, n, a, e, r[2], 23, -995338651), n, a, r[0], 6, -198630844), a = Jn(a, e, i, n, r[7], 10, 1126891415), n = Jn(n, a, e, i, r[14], 15, -1416354905), i = Jn(i, n, a, e, r[5], 21, -57434055), e = Jn(e, i, n, a, r[12], 6, 1700485571), a = Jn(a, e, i, n, r[3], 10, -1894986606), n = Jn(n, a, e, i, r[10], 15, -1051523), i = Jn(i, n, a, e, r[1], 21, -2054922799), e = Jn(e, i, n, a, r[8], 6, 1873313359), a = Jn(a, e, i, n, r[15], 10, -30611744), n = Jn(n, a, e, i, r[6], 15, -1560198380), i = Jn(i, n, a, e, r[13], 21, 1309151649), e = Jn(e, i, n, a, r[4], 6, -145523070), a = Jn(a, e, i, n, r[11], 10, -1120210379), n = Jn(n, a, e, i, r[2], 15, 718787259), i = Jn(i, n, a, e, r[9], 21, -343485551), t[0] = El(e, t[0]), t[1] = El(i, t[1]), t[2] = El(n, t[2]), t[3] = El(a, t[3]);
}

function np(t, r, e, i, n, a) {
    return r = El(El(r, t), El(i, a)), El(r << n | r >>> 32 - n, e);
}

function Kn(t, r, e, i, n, a, o) {
    return np(r & e | ~r & i, t, r, n, a, o);
}

function Yn(t, r, e, i, n, a, o) {
    return np(r & i | e & ~i, t, r, n, a, o);
}

function Zn(t, r, e, i, n, a, o) {
    return np(r ^ e ^ i, t, r, n, a, o);
}

function Jn(t, r, e, i, n, a, o) {
    return np(e ^ (r | ~i), t, r, n, a, o);
}

function zy(t) {
    var r, e = t.length,
        i = [1732584193, -271733879, -1732584194, 271733878];
    for (r = 64; r <= t.length; r += 64) Xm(i, cA(t.substring(r - 64, r)));
    t = t.substring(r - 64);
    var n = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
    for (r = 0; r < t.length; r++) n[r >> 2] |= t.charCodeAt(r) << (r % 4 << 3);
    if (n[r >> 2] |= 128 << (r % 4 << 3), r > 55)
        for (Xm(i, n), r = 0; r < 16; r++) n[r] = 0;
    return n[14] = 8 * e, Xm(i, n), i;
}

function cA(t) {
    var r, e = [];
    for (r = 0; r < 64; r += 4) e[r >> 2] = t.charCodeAt(r) + (t.charCodeAt(r + 1) << 8) + (t.charCodeAt(r + 2) << 16) + (t.charCodeAt(r + 3) << 24);
    return e;
}

function uA(t) {
    for (var r = "", e = 0; e < 4; e++) r += xy[t >> 8 * e + 4 & 15] + xy[t >> 8 * e & 15];
    return r;
}

function fA(t) {
    return String.fromCharCode(255 & t, (65280 & t) >> 8, (16711680 & t) >> 16, (4278190080 & t) >> 24);
}

function $m(t) {
    return zy(t).map(fA).join("");
}

function El(t, r) {
    if (hA) {
        var e = (65535 & t) + (65535 & r);
        return (t >> 16) + (r >> 16) + (e >> 16) << 16 | 65535 & e;
    }
    return t + r & 4294967295;
}

function eg(t, r) {
    var e, i, n, a;
    if (t !== e) {
        for (var o = (n = t, a = 1 + (256 / t.length | 0), new Array(a + 1).join(n)), s = [], l = 0; l < 256; l++) s[l] = l;
        var c = 0;
        for (l = 0; l < 256; l++) {
            var u = s[l];
            c = (c + u + o.charCodeAt(l)) % 256, s[l] = s[c], s[c] = u;
        }
        e = t, i = s;
    } else s = i;
    var h = r.length,
        d = 0,
        f = 0,
        m = "";
    for (l = 0; l < h; l++) f = (f + (u = s[d = (d + 1) % 256])) % 256, s[d] = s[f], s[f] = u, o = s[(s[d] + s[f]) % 256], m += String.fromCharCode(r.charCodeAt(l) ^ o);
    return m;
}

function A0(t, r, e, i) {
    this.v = 1, this.r = 2;
    var n = 192;
    t.forEach(function(s) {
        if (_y.perm !== void 0) throw new Error("Invalid permission: " + s);
        n += _y[s];
    }), this.padding = "(\xBFN^Nu\x8AAd\0NV\xFF\xFA\b..\0\xB6\xD0h>\x80/\f\xA9\xFEdSiz";
    var a = (r + this.padding).substr(0, 32),
        o = (e + this.padding).substr(0, 32);
    this.O = this.processOwnerPassword(a, o), this.P = -(1 + (255 ^ n)), this.encryptionKey = $m(a + this.O + this.lsbFirstWord(this.P) + this.hexToBytes(i)).substr(0, 5), this.U = eg(this.encryptionKey, this.padding);
}

function T0(t) {
    if (/[^\u0000-\u00ff]/.test(t)) throw new Error("Invalid PDF Name Object: " + t + ", Only accept ASCII characters.");
    for (var r = "", e = t.length, i = 0; i < e; i++) {
        var n = t.charCodeAt(i);
        r += n < 33 || n === 35 || n === 37 || n === 40 || n === 41 || n === 47 || n === 60 || n === 62 || n === 91 || n === 93 || n === 123 || n === 125 || n > 126 ? "#" + ("0" + n.toString(16)).slice(-2) : t[i];
    }
    return r;
}

function yy(t) {
    if (ni(t) !== "object") throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");
    var r = {};
    this.subscribe = function(e, i, n) {
        if (n = n || !1, typeof e != "string" || typeof i != "function" || typeof n != "boolean") throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");
        r.hasOwnProperty(e) || (r[e] = {});
        var a = Math.random().toString(35);
        return r[e][a] = [i, !!n], a;
    }, this.unsubscribe = function(e) {
        for (var i in r)
            if (r[i][e]) return delete r[i][e], Object.keys(r[i]).length === 0 && delete r[i], !0;
        return !1;
    }, this.publish = function(e) {
        if (r.hasOwnProperty(e)) {
            var i = Array.prototype.slice.call(arguments, 1),
                n = [];
            for (var a in r[e]) {
                var o = r[e][a];
                try {
                    o[0].apply(t, i);
                } catch (s) {
                    hr.console && xi.error("jsPDF PubSub Error", s.message, s);
                }
                o[1] && n.push(a);
            }
            n.length && n.forEach(this.unsubscribe);
        }
    }, this.getTopics = function() {
        return r;
    };
}

function uf(t) {
    if (!(this instanceof uf)) return new uf(t);
    var r = "opacity,stroke-opacity".split(",");
    for (var e in t) t.hasOwnProperty(e) && r.indexOf(e) >= 0 && (this[e] = t[e]);
    this.id = "", this.objectNumber = -1;
}

function Wy(t, r) {
    this.gState = t, this.matrix = r, this.id = "", this.objectNumber = -1;
}

function Fl(t, r, e, i, n) {
    if (!(this instanceof Fl)) return new Fl(t, r, e, i, n);
    this.type = t === "axial" ? 2 : 3, this.coords = r, this.colors = e, Wy.call(this, i, n);
}

function yc(t, r, e, i, n) {
    if (!(this instanceof yc)) return new yc(t, r, e, i, n);
    this.boundingBox = t, this.xStep = r, this.yStep = e, this.stream = "", this.cloneIndex = 0, Wy.call(this, i, n);
}

function Bt(t) {
    var r, e = typeof arguments[0] == "string" ? arguments[0] : "p",
        i = arguments[1],
        n = arguments[2],
        a = arguments[3],
        o = [],
        s = 1,
        l = 16,
        c = "S",
        u = null;
    ni(t = t || {}) === "object" && (e = t.orientation, i = t.unit || i, n = t.format || n, a = t.compress || t.compressPdf || a, (u = t.encryption || null) !== null && (u.userPassword = u.userPassword || "", u.ownerPassword = u.ownerPassword || "", u.userPermissions = u.userPermissions || []), s = typeof t.userUnit == "number" ? Math.abs(t.userUnit) : 1, t.precision !== void 0 && (r = t.precision), t.floatPrecision !== void 0 && (l = t.floatPrecision), c = t.defaultPathOperation || "S"), o = t.filters || (a === !0 ? ["FlateEncode"] : o), i = i || "mm", e = ("" + (e || "P")).toLowerCase();
    var h = t.putOnlyUsedFonts || !1,
        d = {},
        f = {
            internal: {},
            __private__: {}
        };
    f.__private__.PubSub = yy;
    var m = "1.3",
        _ = f.__private__.getPdfVersion = function() {
            return m;
        };
    f.__private__.setPdfVersion = function(y) {
        m = y;
    };
    var x = {
        a0: [2383.94, 3370.39],
        a1: [1683.78, 2383.94],
        a2: [1190.55, 1683.78],
        a3: [841.89, 1190.55],
        a4: [595.28, 841.89],
        a5: [419.53, 595.28],
        a6: [297.64, 419.53],
        a7: [209.76, 297.64],
        a8: [147.4, 209.76],
        a9: [104.88, 147.4],
        a10: [73.7, 104.88],
        b0: [2834.65, 4008.19],
        b1: [2004.09, 2834.65],
        b2: [1417.32, 2004.09],
        b3: [1000.63, 1417.32],
        b4: [708.66, 1000.63],
        b5: [498.9, 708.66],
        b6: [354.33, 498.9],
        b7: [249.45, 354.33],
        b8: [175.75, 249.45],
        b9: [124.72, 175.75],
        b10: [87.87, 124.72],
        c0: [2599.37, 3676.54],
        c1: [1836.85, 2599.37],
        c2: [1298.27, 1836.85],
        c3: [918.43, 1298.27],
        c4: [649.13, 918.43],
        c5: [459.21, 649.13],
        c6: [323.15, 459.21],
        c7: [229.61, 323.15],
        c8: [161.57, 229.61],
        c9: [113.39, 161.57],
        c10: [79.37, 113.39],
        dl: [311.81, 623.62],
        letter: [612, 792],
        "government-letter": [576, 756],
        legal: [612, 1008],
        "junior-legal": [576, 360],
        ledger: [1224, 792],
        tabloid: [792, 1224],
        "credit-card": [153, 243]
    };
    f.__private__.getPageFormats = function() {
        return x;
    };
    var g = f.__private__.getPageFormat = function(y) {
        return x[y];
    };
    n = n || "a4";
    var b = "compat",
        w = "advanced",
        T = b;

    function E() {
        this.saveGraphicsState(), q(new Qt(fr, 0, 0, -fr, 0, ic() * fr).toString() + " cm"), this.setFontSize(this.getFontSize() / fr), c = "n", T = w;
    }

    function L() {
        this.restoreGraphicsState(), c = "S", T = b;
    }
    var P = f.__private__.combineFontStyleAndFontWeight = function(y, R) {
        if (y == "bold" && R == "normal" || y == "bold" && R == 400 || y == "normal" && R == "italic" || y == "bold" && R == "italic") throw new Error("Invalid Combination of fontweight and fontstyle");
        return R && (y = R == 400 || R === "normal" ? y === "italic" ? "italic" : "normal" : R != 700 && R !== "bold" || y !== "normal" ? (R == 700 ? "bold" : R) + "" + y : "bold"), y;
    };
    f.advancedAPI = function(y) {
        var R = T === b;
        return R && E.call(this), typeof y != "function" || (y(this), R && L.call(this)), this;
    }, f.compatAPI = function(y) {
        var R = T === w;
        return R && L.call(this), typeof y != "function" || (y(this), R && E.call(this)), this;
    }, f.isAdvancedAPI = function() {
        return T === w;
    };
    var k, A = function(y) {
            if (T !== w) throw new Error(y + " is only available in 'advanced' API mode. You need to call advancedAPI() first.");
        },
        N = f.roundToPrecision = f.__private__.roundToPrecision = function(y, R) {
            var he = r || R;
            if (isNaN(y) || isNaN(he)) throw new Error("Invalid argument passed to jsPDF.roundToPrecision");
            return y.toFixed(he).replace(/0+$/, "");
        };
    k = f.hpf = f.__private__.hpf = typeof l == "number" ? function(y) {
        if (isNaN(y)) throw new Error("Invalid argument passed to jsPDF.hpf");
        return N(y, l);
    } : l === "smart" ? function(y) {
        if (isNaN(y)) throw new Error("Invalid argument passed to jsPDF.hpf");
        return N(y, y > -1 && y < 1 ? 16 : 5);
    } : function(y) {
        if (isNaN(y)) throw new Error("Invalid argument passed to jsPDF.hpf");
        return N(y, 16);
    };
    var C = f.f2 = f.__private__.f2 = function(y) {
            if (isNaN(y)) throw new Error("Invalid argument passed to jsPDF.f2");
            return N(y, 2);
        },
        F = f.__private__.f3 = function(y) {
            if (isNaN(y)) throw new Error("Invalid argument passed to jsPDF.f3");
            return N(y, 3);
        },
        W = f.scale = f.__private__.scale = function(y) {
            if (isNaN(y)) throw new Error("Invalid argument passed to jsPDF.scale");
            return T === b ? y * fr : T === w ? y : void 0;
        },
        I = function(y) {
            return W(function(R) {
                return T === b ? ic() - R : T === w ? R : void 0;
            }(y));
        };
    f.__private__.setPrecision = f.setPrecision = function(y) {
        typeof parseInt(y, 10) == "number" && (r = parseInt(y, 10));
    };
    var U, le = "00000000000000000000000000000000",
        H = f.__private__.getFileId = function() {
            return le;
        },
        pe = f.__private__.setFileId = function(y) {
            return le = y !== void 0 && /^[a-fA-F0-9]{32}$/.test(y) ? y.toUpperCase() : le.split("").map(function() {
                return "ABCDEF0123456789".charAt(Math.floor(16 * Math.random()));
            }).join(""), u !== null && (vn = new A0(u.userPermissions, u.userPassword, u.ownerPassword, le)), le;
        };
    f.setFileId = function(y) {
        return pe(y), this;
    }, f.getFileId = function() {
        return H();
    };
    var _e = f.__private__.convertDateToPDFDate = function(y) {
            var R = y.getTimezoneOffset(),
                he = R < 0 ? "+" : "-",
                we = Math.floor(Math.abs(R / 60)),
                Ee = Math.abs(R % 60),
                Ke = [he, X(we), "'", X(Ee), "'"].join("");
            return ["D:", y.getFullYear(), X(y.getMonth() + 1), X(y.getDate()), X(y.getHours()), X(y.getMinutes()), X(y.getSeconds()), Ke].join("");
        },
        Fe = f.__private__.convertPDFDateToDate = function(y) {
            var R = parseInt(y.substr(2, 4), 10),
                he = parseInt(y.substr(6, 2), 10) - 1,
                we = parseInt(y.substr(8, 2), 10),
                Ee = parseInt(y.substr(10, 2), 10),
                Ke = parseInt(y.substr(12, 2), 10),
                et = parseInt(y.substr(14, 2), 10);
            return new Date(R, he, we, Ee, Ke, et, 0);
        },
        Te = f.__private__.setCreationDate = function(y) {
            var R;
            if (y === void 0 && (y = new Date()), y instanceof Date) R = _e(y);
            else {
                if (!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(y)) throw new Error("Invalid argument passed to jsPDF.setCreationDate");
                R = y;
            }
            return U = R;
        },
        O = f.__private__.getCreationDate = function(y) {
            var R = U;
            return y === "jsDate" && (R = Fe(U)), R;
        };
    f.setCreationDate = function(y) {
        return Te(y), this;
    }, f.getCreationDate = function(y) {
        return O(y);
    };
    var j, X = f.__private__.padd2 = function(y) {
            return ("0" + parseInt(y)).slice(-2);
        },
        me = f.__private__.padd2Hex = function(y) {
            return ("00" + (y = y.toString())).substr(y.length);
        },
        xe = 0,
        be = [],
        B = [],
        ne = 0,
        Z = [],
        J = [],
        ye = !1,
        je = B;
    f.__private__.setCustomOutputDestination = function(y) {
        ye = !0, je = y;
    };
    var Qe = function(y) {
        ye || (je = y);
    };
    f.__private__.resetCustomOutputDestination = function() {
        ye = !1, je = B;
    };
    var q = f.__private__.out = function(y) {
            return y = y.toString(), ne += y.length + 1, je.push(y), je;
        },
        ze = f.__private__.write = function(y) {
            return q(arguments.length === 1 ? y.toString() : Array.prototype.join.call(arguments, " "));
        },
        gt = f.__private__.getArrayBuffer = function(y) {
            for (var R = y.length, he = new ArrayBuffer(R), we = new Uint8Array(he); R--;) we[R] = y.charCodeAt(R);
            return he;
        },
        ft = [
            ["Helvetica", "helvetica", "normal", "WinAnsiEncoding"],
            ["Helvetica-Bold", "helvetica", "bold", "WinAnsiEncoding"],
            ["Helvetica-Oblique", "helvetica", "italic", "WinAnsiEncoding"],
            ["Helvetica-BoldOblique", "helvetica", "bolditalic", "WinAnsiEncoding"],
            ["Courier", "courier", "normal", "WinAnsiEncoding"],
            ["Courier-Bold", "courier", "bold", "WinAnsiEncoding"],
            ["Courier-Oblique", "courier", "italic", "WinAnsiEncoding"],
            ["Courier-BoldOblique", "courier", "bolditalic", "WinAnsiEncoding"],
            ["Times-Roman", "times", "normal", "WinAnsiEncoding"],
            ["Times-Bold", "times", "bold", "WinAnsiEncoding"],
            ["Times-Italic", "times", "italic", "WinAnsiEncoding"],
            ["Times-BoldItalic", "times", "bolditalic", "WinAnsiEncoding"],
            ["ZapfDingbats", "zapfdingbats", "normal", null],
            ["Symbol", "symbol", "normal", null]
        ];
    f.__private__.getStandardFonts = function() {
        return ft;
    };
    var Re = t.fontSize || 16;
    f.__private__.setFontSize = f.setFontSize = function(y) {
        return Re = T === w ? y / fr : y, this;
    };
    var pt, ct = f.__private__.getFontSize = f.getFontSize = function() {
            return T === b ? Re : Re * fr;
        },
        xt = t.R2L || !1;
    f.__private__.setR2L = f.setR2L = function(y) {
        return xt = y, this;
    }, f.__private__.getR2L = f.getR2L = function() {
        return xt;
    };
    var yt, Pe = f.__private__.setZoomMode = function(y) {
        if (/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(y)) pt = y;
        else if (isNaN(y)) {
            if ([void 0, null, "fullwidth", "fullheight", "fullpage", "original"].indexOf(y) === -1) throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "' + y + '" is not recognized.');
            pt = y;
        } else pt = parseInt(y, 10);
    };
    f.__private__.getZoomMode = function() {
        return pt;
    };
    var Je, er = f.__private__.setPageMode = function(y) {
        if ([void 0, null, "UseNone", "UseOutlines", "UseThumbs", "FullScreen"].indexOf(y) == -1) throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "' + y + '" is not recognized.');
        yt = y;
    };
    f.__private__.getPageMode = function() {
        return yt;
    };
    var ur = f.__private__.setLayoutMode = function(y) {
        if ([void 0, null, "continuous", "single", "twoleft", "tworight", "two"].indexOf(y) == -1) throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "' + y + '" is not recognized.');
        Je = y;
    };
    f.__private__.getLayoutMode = function() {
        return Je;
    }, f.__private__.setDisplayMode = f.setDisplayMode = function(y, R, he) {
        return Pe(y), ur(R), er(he), this;
    };
    var Gt = {
        title: "",
        subject: "",
        author: "",
        keywords: "",
        creator: ""
    };
    f.__private__.getDocumentProperty = function(y) {
        if (Object.keys(Gt).indexOf(y) === -1) throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");
        return Gt[y];
    }, f.__private__.getDocumentProperties = function() {
        return Gt;
    }, f.__private__.setDocumentProperties = f.setProperties = f.setDocumentProperties = function(y) {
        for (var R in Gt) Gt.hasOwnProperty(R) && y[R] && (Gt[R] = y[R]);
        return this;
    }, f.__private__.setDocumentProperty = function(y, R) {
        if (Object.keys(Gt).indexOf(y) === -1) throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");
        return Gt[y] = R;
    };
    var Ct, fr, kt, Zt, ir, lr = {},
        _r = {},
        Gr = [],
        Pt = {},
        Yr = {},
        Jt = {},
        dr = {},
        yi = null,
        Ir = 0,
        qt = [],
        Zr = new yy(f),
        _s = t.hotfixes || [],
        kn = {},
        _o = {},
        eo = [],
        Qt = function y(R, he, we, Ee, Ke, et) {
            if (!(this instanceof y)) return new y(R, he, we, Ee, Ke, et);
            isNaN(R) && (R = 1), isNaN(he) && (he = 0), isNaN(we) && (we = 0), isNaN(Ee) && (Ee = 1), isNaN(Ke) && (Ke = 0), isNaN(et) && (et = 0), this._matrix = [R, he, we, Ee, Ke, et];
        };
    Object.defineProperty(Qt.prototype, "sx", {
        get: function() {
            return this._matrix[0];
        },
        set: function(y) {
            this._matrix[0] = y;
        }
    }), Object.defineProperty(Qt.prototype, "shy", {
        get: function() {
            return this._matrix[1];
        },
        set: function(y) {
            this._matrix[1] = y;
        }
    }), Object.defineProperty(Qt.prototype, "shx", {
        get: function() {
            return this._matrix[2];
        },
        set: function(y) {
            this._matrix[2] = y;
        }
    }), Object.defineProperty(Qt.prototype, "sy", {
        get: function() {
            return this._matrix[3];
        },
        set: function(y) {
            this._matrix[3] = y;
        }
    }), Object.defineProperty(Qt.prototype, "tx", {
        get: function() {
            return this._matrix[4];
        },
        set: function(y) {
            this._matrix[4] = y;
        }
    }), Object.defineProperty(Qt.prototype, "ty", {
        get: function() {
            return this._matrix[5];
        },
        set: function(y) {
            this._matrix[5] = y;
        }
    }), Object.defineProperty(Qt.prototype, "a", {
        get: function() {
            return this._matrix[0];
        },
        set: function(y) {
            this._matrix[0] = y;
        }
    }), Object.defineProperty(Qt.prototype, "b", {
        get: function() {
            return this._matrix[1];
        },
        set: function(y) {
            this._matrix[1] = y;
        }
    }), Object.defineProperty(Qt.prototype, "c", {
        get: function() {
            return this._matrix[2];
        },
        set: function(y) {
            this._matrix[2] = y;
        }
    }), Object.defineProperty(Qt.prototype, "d", {
        get: function() {
            return this._matrix[3];
        },
        set: function(y) {
            this._matrix[3] = y;
        }
    }), Object.defineProperty(Qt.prototype, "e", {
        get: function() {
            return this._matrix[4];
        },
        set: function(y) {
            this._matrix[4] = y;
        }
    }), Object.defineProperty(Qt.prototype, "f", {
        get: function() {
            return this._matrix[5];
        },
        set: function(y) {
            this._matrix[5] = y;
        }
    }), Object.defineProperty(Qt.prototype, "rotation", {
        get: function() {
            return Math.atan2(this.shx, this.sx);
        }
    }), Object.defineProperty(Qt.prototype, "scaleX", {
        get: function() {
            return this.decompose().scale.sx;
        }
    }), Object.defineProperty(Qt.prototype, "scaleY", {
        get: function() {
            return this.decompose().scale.sy;
        }
    }), Object.defineProperty(Qt.prototype, "isIdentity", {
        get: function() {
            return this.sx === 1 && this.shy === 0 && this.shx === 0 && this.sy === 1 && this.tx === 0 && this.ty === 0;
        }
    }), Qt.prototype.join = function(y) {
        return [this.sx, this.shy, this.shx, this.sy, this.tx, this.ty].map(k).join(y);
    }, Qt.prototype.multiply = function(y) {
        var R = y.sx * this.sx + y.shy * this.shx,
            he = y.sx * this.shy + y.shy * this.sy,
            we = y.shx * this.sx + y.sy * this.shx,
            Ee = y.shx * this.shy + y.sy * this.sy,
            Ke = y.tx * this.sx + y.ty * this.shx + this.tx,
            et = y.tx * this.shy + y.ty * this.sy + this.ty;
        return new Qt(R, he, we, Ee, Ke, et);
    }, Qt.prototype.decompose = function() {
        var y = this.sx,
            R = this.shy,
            he = this.shx,
            we = this.sy,
            Ee = this.tx,
            Ke = this.ty,
            et = Math.sqrt(y * y + R * R),
            Ft = (y /= et) * he + (R /= et) * we;
        he -= y * Ft, we -= R * Ft;
        var Ut = Math.sqrt(he * he + we * we);
        return Ft /= Ut, y * (we /= Ut) < R * (he /= Ut) && (y = -y, R = -R, Ft = -Ft, et = -et), {
            scale: new Qt(et, 0, 0, Ut, 0, 0),
            translate: new Qt(1, 0, 0, 1, Ee, Ke),
            rotate: new Qt(y, R, -R, y, 0, 0),
            skew: new Qt(1, 0, Ft, 1, 0, 0)
        };
    }, Qt.prototype.toString = function(y) {
        return this.join(" ");
    }, Qt.prototype.inversed = function() {
        var y = this.sx,
            R = this.shy,
            he = this.shx,
            we = this.sy,
            Ee = this.tx,
            Ke = this.ty,
            et = 1 / (y * we - R * he),
            Ft = we * et,
            Ut = -R * et,
            pr = -he * et,
            Cr = y * et;
        return new Qt(Ft, Ut, pr, Cr, -Ft * Ee - pr * Ke, -Ut * Ee - Cr * Ke);
    }, Qt.prototype.applyToPoint = function(y) {
        var R = y.x * this.sx + y.y * this.shx + this.tx,
            he = y.x * this.shy + y.y * this.sy + this.ty;
        return new Cs(R, he);
    }, Qt.prototype.applyToRectangle = function(y) {
        var R = this.applyToPoint(y),
            he = this.applyToPoint(new Cs(y.x + y.w, y.y + y.h));
        return new wu(R.x, R.y, he.x - R.x, he.y - R.y);
    }, Qt.prototype.clone = function() {
        var y = this.sx,
            R = this.shy,
            he = this.shx,
            we = this.sy,
            Ee = this.tx,
            Ke = this.ty;
        return new Qt(y, R, he, we, Ee, Ke);
    }, f.Matrix = Qt;
    var yo = f.matrixMult = function(y, R) {
            return R.multiply(y);
        },
        bo = new Qt(1, 0, 0, 1, 0, 0);
    f.unitMatrix = f.identityMatrix = bo;
    var Gn = function(y, R) {
        if (!Yr[y]) {
            var he = (R instanceof Fl ? "Sh" : "P") + (Object.keys(Pt).length + 1).toString(10);
            R.id = he, Yr[y] = he, Pt[he] = R, Zr.publish("addPattern", R);
        }
    };
    f.ShadingPattern = Fl, f.TilingPattern = yc, f.addShadingPattern = function(y, R) {
        return A("addShadingPattern()"), Gn(y, R), this;
    }, f.beginTilingPattern = function(y) {
        A("beginTilingPattern()"), Su(y.boundingBox[0], y.boundingBox[1], y.boundingBox[2] - y.boundingBox[0], y.boundingBox[3] - y.boundingBox[1], y.matrix);
    }, f.endTilingPattern = function(y, R) {
        A("endTilingPattern()"), R.stream = J[j].join(`
`), Gn(y, R), Zr.publish("endTilingPattern", R), eo.pop().restore();
    };
    var Ca, Ei = f.__private__.newObject = function() {
            var y = rn();
            return V(y, !0), y;
        },
        rn = f.__private__.newObjectDeferred = function() {
            return xe++, be[xe] = function() {
                return ne;
            }, xe;
        },
        V = function(y, R) {
            return R = typeof R == "boolean" && R, be[y] = ne, R && q(y + " 0 obj"), y;
        },
        fe = f.__private__.newAdditionalObject = function() {
            var y = {
                objId: rn(),
                content: ""
            };
            return Z.push(y), y;
        },
        te = rn(),
        ae = rn(),
        se = f.__private__.decodeColorString = function(y) {
            var R = y.split(" ");
            if (R.length !== 2 || R[1] !== "g" && R[1] !== "G") R.length !== 5 || R[4] !== "k" && R[4] !== "K" || (R = [(1 - R[0]) * (1 - R[3]), (1 - R[1]) * (1 - R[3]), (1 - R[2]) * (1 - R[3]), "r"]);
            else {
                var he = parseFloat(R[0]);
                R = [he, he, he, "r"];
            }
            for (var we = "#", Ee = 0; Ee < 3; Ee++) we += ("0" + Math.floor(255 * parseFloat(R[Ee])).toString(16)).slice(-2);
            return we;
        },
        de = f.__private__.encodeColorString = function(y) {
            var R;
            typeof y == "string" && (y = {
                ch1: y
            });
            var he = y.ch1,
                we = y.ch2,
                Ee = y.ch3,
                Ke = y.ch4,
                et = y.pdfColorType === "draw" ? ["G", "RG", "K"] : ["g", "rg", "k"];
            if (typeof he == "string" && he.charAt(0) !== "#") {
                var Ft = new Vy(he);
                if (Ft.ok) he = Ft.toHex();
                else if (!/^\d*\.?\d*$/.test(he)) throw new Error('Invalid color "' + he + '" passed to jsPDF.encodeColorString.');
            }
            if (typeof he == "string" && /^#[0-9A-Fa-f]{3}$/.test(he) && (he = "#" + he[1] + he[1] + he[2] + he[2] + he[3] + he[3]), typeof he == "string" && /^#[0-9A-Fa-f]{6}$/.test(he)) {
                var Ut = parseInt(he.substr(1), 16);
                he = Ut >> 16 & 255, we = Ut >> 8 & 255, Ee = 255 & Ut;
            }
            if (we === void 0 || Ke === void 0 && he === we && we === Ee) R = typeof he == "string" ? he + " " + et[0] : y.precision === 2 ? C(he / 255) + " " + et[0] : F(he / 255) + " " + et[0];
            else if (Ke === void 0 || ni(Ke) === "object") {
                if (Ke && !isNaN(Ke.a) && Ke.a === 0) return ["1.", "1.", "1.", et[1]].join(" ");
                R = typeof he == "string" ? [he, we, Ee, et[1]].join(" ") : y.precision === 2 ? [C(he / 255), C(we / 255), C(Ee / 255), et[1]].join(" ") : [F(he / 255), F(we / 255), F(Ee / 255), et[1]].join(" ");
            } else R = typeof he == "string" ? [he, we, Ee, Ke, et[2]].join(" ") : y.precision === 2 ? [C(he), C(we), C(Ee), C(Ke), et[2]].join(" ") : [F(he), F(we), F(Ee), F(Ke), et[2]].join(" ");
            return R;
        },
        Ne = f.__private__.getFilters = function() {
            return o;
        },
        He = f.__private__.putStream = function(y) {
            var R = (y = y || {}).data || "",
                he = y.filters || Ne(),
                we = y.alreadyAppliedFilters || [],
                Ee = y.addLength1 || !1,
                Ke = R.length,
                et = y.objectId,
                Ft = function(xn) {
                    return xn;
                };
            if (u !== null && et === void 0) throw new Error("ObjectId must be passed to putStream for file encryption");
            u !== null && (Ft = vn.encryptor(et, 0));
            var Ut = {};
            he === !0 && (he = ["FlateEncode"]);
            var pr = y.additionalKeyValues || [],
                Cr = (Ut = Bt.API.processDataByFilters !== void 0 ? Bt.API.processDataByFilters(R, he) : {
                    data: R,
                    reverseChain: []
                }).reverseChain + (Array.isArray(we) ? we.join(" ") : we.toString());
            if (Ut.data.length !== 0 && (pr.push({
                    key: "Length",
                    value: Ut.data.length
                }), Ee === !0 && pr.push({
                    key: "Length1",
                    value: Ke
                })), Cr.length != 0)
                if (Cr.split("/").length - 1 == 1) pr.push({
                    key: "Filter",
                    value: Cr
                });
                else {
                    pr.push({
                        key: "Filter",
                        value: "[" + Cr + "]"
                    });
                    for (var qr = 0; qr < pr.length; qr += 1)
                        if (pr[qr].key === "DecodeParms") {
                            for (var Mi = [], on = 0; on < Ut.reverseChain.split("/").length - 1; on += 1) Mi.push("null");
                            Mi.push(pr[qr].value), pr[qr].value = "[" + Mi.join(" ") + "]";
                        }
                }
            q("<<");
            for (var wi = 0; wi < pr.length; wi++) q("/" + pr[wi].key + " " + pr[wi].value);
            q(">>"), Ut.data.length !== 0 && (q("stream"), q(Ft(Ut.data)), q("endstream"));
        },
        Me = f.__private__.putPage = function(y) {
            var R = y.number,
                he = y.data,
                we = y.objId,
                Ee = y.contentsObjId;
            V(we, !0), q("<</Type /Page"), q("/Parent " + y.rootDictionaryObjId + " 0 R"), q("/Resources " + y.resourceDictionaryObjId + " 0 R"), q("/MediaBox [" + parseFloat(k(y.mediaBox.bottomLeftX)) + " " + parseFloat(k(y.mediaBox.bottomLeftY)) + " " + k(y.mediaBox.topRightX) + " " + k(y.mediaBox.topRightY) + "]"), y.cropBox !== null && q("/CropBox [" + k(y.cropBox.bottomLeftX) + " " + k(y.cropBox.bottomLeftY) + " " + k(y.cropBox.topRightX) + " " + k(y.cropBox.topRightY) + "]"), y.bleedBox !== null && q("/BleedBox [" + k(y.bleedBox.bottomLeftX) + " " + k(y.bleedBox.bottomLeftY) + " " + k(y.bleedBox.topRightX) + " " + k(y.bleedBox.topRightY) + "]"), y.trimBox !== null && q("/TrimBox [" + k(y.trimBox.bottomLeftX) + " " + k(y.trimBox.bottomLeftY) + " " + k(y.trimBox.topRightX) + " " + k(y.trimBox.topRightY) + "]"), y.artBox !== null && q("/ArtBox [" + k(y.artBox.bottomLeftX) + " " + k(y.artBox.bottomLeftY) + " " + k(y.artBox.topRightX) + " " + k(y.artBox.topRightY) + "]"), typeof y.userUnit == "number" && y.userUnit !== 1 && q("/UserUnit " + y.userUnit), Zr.publish("putPage", {
                objId: we,
                pageContext: qt[R],
                pageNumber: R,
                page: he
            }), q("/Contents " + Ee + " 0 R"), q(">>"), q("endobj");
            var Ke = he.join(`
`);
            return T === w && (Ke += `
Q`), V(Ee, !0), He({
                data: Ke,
                filters: Ne(),
                objectId: Ee
            }), q("endobj"), we;
        },
        Le = f.__private__.putPages = function() {
            var y, R, he = [];
            for (y = 1; y <= Ir; y++) qt[y].objId = rn(), qt[y].contentsObjId = rn();
            for (y = 1; y <= Ir; y++) he.push(Me({
                number: y,
                data: J[y],
                objId: qt[y].objId,
                contentsObjId: qt[y].contentsObjId,
                mediaBox: qt[y].mediaBox,
                cropBox: qt[y].cropBox,
                bleedBox: qt[y].bleedBox,
                trimBox: qt[y].trimBox,
                artBox: qt[y].artBox,
                userUnit: qt[y].userUnit,
                rootDictionaryObjId: te,
                resourceDictionaryObjId: ae
            }));
            V(te, !0), q("<</Type /Pages");
            var we = "/Kids [";
            for (R = 0; R < Ir; R++) we += he[R] + " 0 R ";
            q(we + "]"), q("/Count " + Ir), q(">>"), q("endobj"), Zr.publish("postPutPages");
        },
        Be = function(y) {
            Zr.publish("putFont", {
                font: y,
                out: q,
                newObject: Ei,
                putStream: He
            }), y.isAlreadyPutted !== !0 && (y.objectNumber = Ei(), q("<<"), q("/Type /Font"), q("/BaseFont /" + T0(y.postScriptName)), q("/Subtype /Type1"), typeof y.encoding == "string" && q("/Encoding /" + y.encoding), q("/FirstChar 32"), q("/LastChar 255"), q(">>"), q("endobj"));
        },
        at = function(y) {
            y.objectNumber = Ei();
            var R = [];
            R.push({
                key: "Type",
                value: "/XObject"
            }), R.push({
                key: "Subtype",
                value: "/Form"
            }), R.push({
                key: "BBox",
                value: "[" + [k(y.x), k(y.y), k(y.x + y.width), k(y.y + y.height)].join(" ") + "]"
            }), R.push({
                key: "Matrix",
                value: "[" + y.matrix.toString() + "]"
            });
            var he = y.pages[1].join(`
`);
            He({
                data: he,
                additionalKeyValues: R,
                objectId: y.objectNumber
            }), q("endobj");
        },
        lt = function(y, R) {
            R || (R = 21);
            var he = Ei(),
                we = function(et, Ft) {
                    var Ut, pr = [],
                        Cr = 1 / (Ft - 1);
                    for (Ut = 0; Ut < 1; Ut += Cr) pr.push(Ut);
                    if (pr.push(1), et[0].offset != 0) {
                        var qr = {
                            offset: 0,
                            color: et[0].color
                        };
                        et.unshift(qr);
                    }
                    if (et[et.length - 1].offset != 1) {
                        var Mi = {
                            offset: 1,
                            color: et[et.length - 1].color
                        };
                        et.push(Mi);
                    }
                    for (var on = "", wi = 0, xn = 0; xn < pr.length; xn++) {
                        for (Ut = pr[xn]; Ut > et[wi + 1].offset;) wi++;
                        var sn = et[wi].offset,
                            Nn = (Ut - sn) / (et[wi + 1].offset - sn),
                            Ds = et[wi].color,
                            Co = et[wi + 1].color;
                        on += me(Math.round((1 - Nn) * Ds[0] + Nn * Co[0]).toString(16)) + me(Math.round((1 - Nn) * Ds[1] + Nn * Co[1]).toString(16)) + me(Math.round((1 - Nn) * Ds[2] + Nn * Co[2]).toString(16));
                    }
                    return on.trim();
                }(y.colors, R),
                Ee = [];
            Ee.push({
                key: "FunctionType",
                value: "0"
            }), Ee.push({
                key: "Domain",
                value: "[0.0 1.0]"
            }), Ee.push({
                key: "Size",
                value: "[" + R + "]"
            }), Ee.push({
                key: "BitsPerSample",
                value: "8"
            }), Ee.push({
                key: "Range",
                value: "[0.0 1.0 0.0 1.0 0.0 1.0]"
            }), Ee.push({
                key: "Decode",
                value: "[0.0 1.0 0.0 1.0 0.0 1.0]"
            }), He({
                data: we,
                additionalKeyValues: Ee,
                alreadyAppliedFilters: ["/ASCIIHexDecode"],
                objectId: he
            }), q("endobj"), y.objectNumber = Ei(), q("<< /ShadingType " + y.type), q("/ColorSpace /DeviceRGB");
            var Ke = "/Coords [" + k(parseFloat(y.coords[0])) + " " + k(parseFloat(y.coords[1])) + " ";
            y.type === 2 ? Ke += k(parseFloat(y.coords[2])) + " " + k(parseFloat(y.coords[3])) : Ke += k(parseFloat(y.coords[2])) + " " + k(parseFloat(y.coords[3])) + " " + k(parseFloat(y.coords[4])) + " " + k(parseFloat(y.coords[5])), q(Ke += "]"), y.matrix && q("/Matrix [" + y.matrix.toString() + "]"), q("/Function " + he + " 0 R"), q("/Extend [true true]"), q(">>"), q("endobj");
        },
        _t = function(y, R) {
            var he = rn(),
                we = Ei();
            R.push({
                resourcesOid: he,
                objectOid: we
            }), y.objectNumber = we;
            var Ee = [];
            Ee.push({
                key: "Type",
                value: "/Pattern"
            }), Ee.push({
                key: "PatternType",
                value: "1"
            }), Ee.push({
                key: "PaintType",
                value: "1"
            }), Ee.push({
                key: "TilingType",
                value: "1"
            }), Ee.push({
                key: "BBox",
                value: "[" + y.boundingBox.map(k).join(" ") + "]"
            }), Ee.push({
                key: "XStep",
                value: k(y.xStep)
            }), Ee.push({
                key: "YStep",
                value: k(y.yStep)
            }), Ee.push({
                key: "Resources",
                value: he + " 0 R"
            }), y.matrix && Ee.push({
                key: "Matrix",
                value: "[" + y.matrix.toString() + "]"
            }), He({
                data: y.stream,
                additionalKeyValues: Ee,
                objectId: y.objectNumber
            }), q("endobj");
        },
        ht = function(y) {
            for (var R in y.objectNumber = Ei(), q("<<"), y) switch (R) {
                case "opacity":
                    q("/ca " + C(y[R]));
                    break;
                case "stroke-opacity":
                    q("/CA " + C(y[R]));
            }
            q(">>"), q("endobj");
        },
        ot = function(y) {
            V(y.resourcesOid, !0), q("<<"), q("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),
                function() {
                    for (var R in q("/Font <<"), lr) lr.hasOwnProperty(R) && (h === !1 || h === !0 && d.hasOwnProperty(R)) && q("/" + R + " " + lr[R].objectNumber + " 0 R");
                    q(">>");
                }(),
                function() {
                    if (Object.keys(Pt).length > 0) {
                        for (var R in q("/Shading <<"), Pt) Pt.hasOwnProperty(R) && Pt[R] instanceof Fl && Pt[R].objectNumber >= 0 && q("/" + R + " " + Pt[R].objectNumber + " 0 R");
                        Zr.publish("putShadingPatternDict"), q(">>");
                    }
                }(),
                function(R) {
                    if (Object.keys(Pt).length > 0) {
                        for (var he in q("/Pattern <<"), Pt) Pt.hasOwnProperty(he) && Pt[he] instanceof f.TilingPattern && Pt[he].objectNumber >= 0 && Pt[he].objectNumber < R && q("/" + he + " " + Pt[he].objectNumber + " 0 R");
                        Zr.publish("putTilingPatternDict"), q(">>");
                    }
                }(y.objectOid),
                function() {
                    if (Object.keys(Jt).length > 0) {
                        var R;
                        for (R in q("/ExtGState <<"), Jt) Jt.hasOwnProperty(R) && Jt[R].objectNumber >= 0 && q("/" + R + " " + Jt[R].objectNumber + " 0 R");
                        Zr.publish("putGStateDict"), q(">>");
                    }
                }(),
                function() {
                    for (var R in q("/XObject <<"), kn) kn.hasOwnProperty(R) && kn[R].objectNumber >= 0 && q("/" + R + " " + kn[R].objectNumber + " 0 R");
                    Zr.publish("putXobjectDict"), q(">>");
                }(), q(">>"), q("endobj");
        },
        nr = function(y) {
            _r[y.fontName] = _r[y.fontName] || {}, _r[y.fontName][y.fontStyle] = y.id;
        },
        Jr = function(y, R, he, we, Ee) {
            var Ke = {
                id: "F" + (Object.keys(lr).length + 1).toString(10),
                postScriptName: y,
                fontName: R,
                fontStyle: he,
                encoding: we,
                isStandardFont: Ee || !1,
                metadata: {}
            };
            return Zr.publish("addFont", {
                font: Ke,
                instance: this
            }), lr[Ke.id] = Ke, nr(Ke), Ke.id;
        },
        mi = f.__private__.pdfEscape = f.pdfEscape = function(y, R) {
            return function(he, we) {
                var Ee, Ke, et, Ft, Ut, pr, Cr, qr, Mi;
                if (et = (we = we || {}).sourceEncoding || "Unicode", Ut = we.outputEncoding, (we.autoencode || Ut) && lr[Ct].metadata && lr[Ct].metadata[et] && lr[Ct].metadata[et].encoding && (Ft = lr[Ct].metadata[et].encoding, !Ut && lr[Ct].encoding && (Ut = lr[Ct].encoding), !Ut && Ft.codePages && (Ut = Ft.codePages[0]), typeof Ut == "string" && (Ut = Ft[Ut]), Ut)) {
                    for (Cr = !1, pr = [], Ee = 0, Ke = he.length; Ee < Ke; Ee++)(qr = Ut[he.charCodeAt(Ee)]) ? pr.push(String.fromCharCode(qr)) : pr.push(he[Ee]), pr[Ee].charCodeAt(0) >> 8 && (Cr = !0);
                    he = pr.join("");
                }
                for (Ee = he.length; Cr === void 0 && Ee !== 0;) he.charCodeAt(Ee - 1) >> 8 && (Cr = !0), Ee--;
                if (!Cr) return he;
                for (pr = we.noBOM ? [] : [254, 255], Ee = 0, Ke = he.length; Ee < Ke; Ee++) {
                    if ((Mi = (qr = he.charCodeAt(Ee)) >> 8) >> 8) throw new Error("Character at position " + Ee + " of string '" + he + "' exceeds 16bits. Cannot be encoded into UCS-2 BE");
                    pr.push(Mi), pr.push(qr - (Mi << 8));
                }
                return String.fromCharCode.apply(void 0, pr);
            }(y, R).replace(/\\/g, "\\\\").replace(/\(/g, "\\(").replace(/\)/g, "\\)");
        },
        bi = f.__private__.beginPage = function(y) {
            J[++Ir] = [], qt[Ir] = {
                objId: 0,
                contentsObjId: 0,
                userUnit: Number(s),
                artBox: null,
                bleedBox: null,
                cropBox: null,
                trimBox: null,
                mediaBox: {
                    bottomLeftX: 0,
                    bottomLeftY: 0,
                    topRightX: Number(y[0]),
                    topRightY: Number(y[1])
                }
            }, jo(Ir), Qe(J[j]);
        },
        Fn = function(y, R) {
            var he, we, Ee;
            switch (e = R || e, typeof y == "string" && (he = g(y.toLowerCase()), Array.isArray(he) && (we = he[0], Ee = he[1])), Array.isArray(y) && (we = y[0] * fr, Ee = y[1] * fr), isNaN(we) && (we = n[0], Ee = n[1]), (we > 14400 || Ee > 14400) && (xi.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"), we = Math.min(14400, we), Ee = Math.min(14400, Ee)), n = [we, Ee], e.substr(0, 1)) {
                case "l":
                    Ee > we && (n = [Ee, we]);
                    break;
                case "p":
                    we > Ee && (n = [Ee, we]);
            }
            bi(n), gr(xu), q(l0), yu !== 0 && q(yu + " J"), bu !== 0 && q(bu + " j"), Zr.publish("addPage", {
                pageNumber: Ir
            });
        },
        wo = function(y) {
            y > 0 && y <= Ir && (J.splice(y, 1), qt.splice(y, 1), Ir--, j > Ir && (j = Ir), this.setPage(j));
        },
        jo = function(y) {
            y > 0 && y <= Ir && (j = y);
        },
        to = f.__private__.getNumberOfPages = f.getNumberOfPages = function() {
            return J.length - 1;
        },
        el = function(y, R, he) {
            var we, Ee = void 0;
            return he = he || {}, y = y !== void 0 ? y : lr[Ct].fontName, R = R !== void 0 ? R : lr[Ct].fontStyle, we = y.toLowerCase(), _r[we] !== void 0 && _r[we][R] !== void 0 ? Ee = _r[we][R] : _r[y] !== void 0 && _r[y][R] !== void 0 ? Ee = _r[y][R] : he.disableWarning === !1 && xi.warn("Unable to look up font label for font '" + y + "', '" + R + "'. Refer to getFontList() for available fonts."), Ee || he.noFallback || (Ee = _r.times[R]) == null && (Ee = _r.times.normal), Ee;
        },
        nn = f.__private__.putInfo = function() {
            var y = Ei(),
                R = function(we) {
                    return we;
                };
            for (var he in u !== null && (R = vn.encryptor(y, 0)), q("<<"), q("/Producer (" + mi(R("jsPDF " + Bt.version)) + ")"), Gt) Gt.hasOwnProperty(he) && Gt[he] && q("/" + he.substr(0, 1).toUpperCase() + he.substr(1) + " (" + mi(R(Gt[he])) + ")");
            q("/CreationDate (" + mi(R(U)) + ")"), q(">>"), q("endobj");
        },
        a0 = f.__private__.putCatalog = function(y) {
            var R = (y = y || {}).rootDictionaryObjId || te;
            switch (Ei(), q("<<"), q("/Type /Catalog"), q("/Pages " + R + " 0 R"), pt || (pt = "fullwidth"), pt) {
                case "fullwidth":
                    q("/OpenAction [3 0 R /FitH null]");
                    break;
                case "fullheight":
                    q("/OpenAction [3 0 R /FitV null]");
                    break;
                case "fullpage":
                    q("/OpenAction [3 0 R /Fit]");
                    break;
                case "original":
                    q("/OpenAction [3 0 R /XYZ null null 1]");
                    break;
                default:
                    var he = "" + pt;
                    he.substr(he.length - 1) === "%" && (pt = parseInt(pt) / 100), typeof pt == "number" && q("/OpenAction [3 0 R /XYZ null null " + C(pt) + "]");
            }
            switch (Je || (Je = "continuous"), Je) {
                case "continuous":
                    q("/PageLayout /OneColumn");
                    break;
                case "single":
                    q("/PageLayout /SinglePage");
                    break;
                case "two":
                case "twoleft":
                    q("/PageLayout /TwoColumnLeft");
                    break;
                case "tworight":
                    q("/PageLayout /TwoColumnRight");
            }
            yt && q("/PageMode /" + yt), Zr.publish("putCatalog"), q(">>"), q("endobj");
        },
        D1 = f.__private__.putTrailer = function() {
            q("trailer"), q("<<"), q("/Size " + (xe + 1)), q("/Root " + xe + " 0 R"), q("/Info " + (xe - 1) + " 0 R"), u !== null && q("/Encrypt " + vn.oid + " 0 R"), q("/ID [ <" + le + "> <" + le + "> ]"), q(">>");
        },
        an = f.__private__.putHeader = function() {
            q("%PDF-" + m), q("%\xBA\xDF\xAC\xE0");
        },
        kh = f.__private__.putXRef = function() {
            var y = "0000000000";
            q("xref"), q("0 " + (xe + 1)), q("0000000000 65535 f ");
            for (var R = 1; R <= xe; R++) typeof be[R] == "function" ? q((y + be[R]()).slice(-10) + " 00000 n ") : be[R] !== void 0 ? q((y + be[R]).slice(-10) + " 00000 n ") : q("0000000000 00000 n ");
        },
        Ho = f.__private__.buildDocument = function() {
            var y;
            xe = 0, ne = 0, B = [], be = [], Z = [], te = rn(), ae = rn(), Qe(B), Zr.publish("buildDocument"), an(), Le(),
                function() {
                    Zr.publish("putAdditionalObjects");
                    for (var he = 0; he < Z.length; he++) {
                        var we = Z[he];
                        V(we.objId, !0), q(we.content), q("endobj");
                    }
                    Zr.publish("postPutAdditionalObjects");
                }(), y = [],
                function() {
                    for (var he in lr) lr.hasOwnProperty(he) && (h === !1 || h === !0 && d.hasOwnProperty(he)) && Be(lr[he]);
                }(),
                function() {
                    var he;
                    for (he in Jt) Jt.hasOwnProperty(he) && ht(Jt[he]);
                }(),
                function() {
                    for (var he in kn) kn.hasOwnProperty(he) && at(kn[he]);
                }(),
                function(he) {
                    var we;
                    for (we in Pt) Pt.hasOwnProperty(we) && (Pt[we] instanceof Fl ? lt(Pt[we]) : Pt[we] instanceof yc && _t(Pt[we], he));
                }(y), Zr.publish("putResources"), y.forEach(ot), ot({
                    resourcesOid: ae,
                    objectOid: Number.MAX_SAFE_INTEGER
                }), Zr.publish("postPutResources"), u !== null && (vn.oid = Ei(), q("<<"), q("/Filter /Standard"), q("/V " + vn.v), q("/R " + vn.r), q("/U <" + vn.toHexString(vn.U) + ">"), q("/O <" + vn.toHexString(vn.O) + ">"), q("/P " + vn.P), q(">>"), q("endobj")), nn(), a0();
            var R = ne;
            return kh(), D1(), q("startxref"), q("" + R), q("%%EOF"), Qe(J[j]), B.join(`
`);
        },
        o0 = f.__private__.getBlob = function(y) {
            return new Blob([gt(y)], {
                type: "application/pdf"
            });
        },
        Fh = f.output = f.__private__.output = (Ca = function(y, R) {
            switch (typeof(R = R || {}) == "string" ? R = {
                filename: R
            } : R.filename = R.filename || "generated.pdf", y) {
                case void 0:
                    return Ho();
                case "save":
                    f.save(R.filename);
                    break;
                case "arraybuffer":
                    return gt(Ho());
                case "blob":
                    return o0(Ho());
                case "bloburi":
                case "bloburl":
                    if (hr.URL !== void 0 && typeof hr.URL.createObjectURL == "function") return hr.URL && hr.URL.createObjectURL(o0(Ho())) || void 0;
                    xi.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");
                    break;
                case "datauristring":
                case "dataurlstring":
                    var he = "",
                        we = Ho();
                    try {
                        he = vy(we);
                    } catch {
                        he = vy(unescape(encodeURIComponent(we)));
                    }
                    return "data:application/pdf;filename=" + R.filename + ";base64," + he;
                case "pdfobjectnewwindow":
                    if (Object.prototype.toString.call(hr) === "[object Window]") {
                        var Ee = "https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",
                            Ke = ' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';
                        R.pdfObjectUrl && (Ee = R.pdfObjectUrl, Ke = "");
                        var et = '<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><script src="' + Ee + '"' + Ke + '><\/script><script >PDFObject.embed("' + this.output("dataurlstring") + '", ' + JSON.stringify(R) + ");<\/script></body></html>",
                            Ft = hr.open();
                        return Ft !== null && Ft.document.write(et), Ft;
                    }
                    throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");
                case "pdfjsnewwindow":
                    if (Object.prototype.toString.call(hr) === "[object Window]") {
                        var Ut = '<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><iframe id="pdfViewer" src="' + (R.pdfJsUrl || "examples/PDF.js/web/viewer.html") + "?file=&downloadName=" + R.filename + '" width="500px" height="400px" /></body></html>',
                            pr = hr.open();
                        if (pr !== null) {
                            pr.document.write(Ut);
                            var Cr = this;
                            pr.document.documentElement.querySelector("#pdfViewer").onload = function() {
                                pr.document.title = R.filename, pr.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(Cr.output("bloburl"));
                            };
                        }
                        return pr;
                    }
                    throw new Error("The option pdfjsnewwindow just works in a browser-environment.");
                case "dataurlnewwindow":
                    if (Object.prototype.toString.call(hr) !== "[object Window]") throw new Error("The option dataurlnewwindow just works in a browser-environment.");
                    var qr = '<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><iframe src="' + this.output("datauristring", R) + '"></iframe></body></html>',
                        Mi = hr.open();
                    if (Mi !== null && (Mi.document.write(qr), Mi.document.title = R.filename), Mi || typeof safari > "u") return Mi;
                    break;
                case "datauri":
                case "dataurl":
                    return hr.document.location.href = this.output("datauristring", R);
                default:
                    return null;
            }
        }, Ca.foo = function() {
            try {
                return Ca.apply(this, arguments);
            } catch (he) {
                var y = he.stack || "";
                ~y.indexOf(" at ") && (y = y.split(" at ")[1]);
                var R = "Error in function " + y.split(`
`)[0].split("<")[0] + ": " + he.message;
                if (!hr.console) throw new Error(R);
                hr.console.error(R, he), hr.alert && alert(R);
            }
        }, Ca.foo.bar = Ca, Ca.foo),
        ro = function(y) {
            return Array.isArray(_s) === !0 && _s.indexOf(y) > -1;
        };
    switch (i) {
        case "pt":
            fr = 1;
            break;
        case "mm":
            fr = 72 / 25.4;
            break;
        case "cm":
            fr = 72 / 2.54;
            break;
        case "in":
            fr = 72;
            break;
        case "px":
            fr = ro("px_scaling") == 1 ? .75 : 96 / 72;
            break;
        case "pc":
        case "em":
            fr = 12;
            break;
        case "ex":
            fr = 6;
            break;
        default:
            if (typeof i != "number") throw new Error("Invalid unit: " + i);
            fr = i;
    }
    var vn = null;
    Te(), pe();
    var ys = f.__private__.getPageInfo = f.getPageInfo = function(y) {
            if (isNaN(y) || y % 1 != 0) throw new Error("Invalid argument passed to jsPDF.getPageInfo");
            return {
                objId: qt[y].objId,
                pageNumber: y,
                pageContext: qt[y]
            };
        },
        Eh = f.__private__.getPageInfoByObjId = function(y) {
            if (isNaN(y) || y % 1 != 0) throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");
            for (var R in qt)
                if (qt[R].objId === y) break;
            return ys(R);
        },
        k1 = f.__private__.getCurrentPageInfo = f.getCurrentPageInfo = function() {
            return {
                objId: qt[j].objId,
                pageNumber: j,
                pageContext: qt[j]
            };
        };
    f.addPage = function() {
        return Fn.apply(this, arguments), this;
    }, f.setPage = function() {
        return jo.apply(this, arguments), Qe.call(this, J[j]), this;
    }, f.insertPage = function(y) {
        return this.addPage(), this.movePage(j, y), this;
    }, f.movePage = function(y, R) {
        var he, we;
        if (y > R) {
            he = J[y], we = qt[y];
            for (var Ee = y; Ee > R; Ee--) J[Ee] = J[Ee - 1], qt[Ee] = qt[Ee - 1];
            J[R] = he, qt[R] = we, this.setPage(R);
        } else if (y < R) {
            he = J[y], we = qt[y];
            for (var Ke = y; Ke < R; Ke++) J[Ke] = J[Ke + 1], qt[Ke] = qt[Ke + 1];
            J[R] = he, qt[R] = we, this.setPage(R);
        }
        return this;
    }, f.deletePage = function() {
        return wo.apply(this, arguments), this;
    }, f.__private__.text = f.text = function(y, R, he, we, Ee) {
        var Ke, et, Ft, Ut, pr, Cr, qr, Mi, on, wi = (we = we || {}).scope || this;
        if (typeof y == "number" && typeof R == "number" && (typeof he == "string" || Array.isArray(he))) {
            var xn = he;
            he = R, R = y, y = xn;
        }
        if (arguments[3] instanceof Qt == 0 ? (Ft = arguments[4], Ut = arguments[5], ni(qr = arguments[3]) === "object" && qr !== null || (typeof Ft == "string" && (Ut = Ft, Ft = null), typeof qr == "string" && (Ut = qr, qr = null), typeof qr == "number" && (Ft = qr, qr = null), we = {
                flags: qr,
                angle: Ft,
                align: Ut
            })) : (A("The transform parameter of text() with a Matrix value"), on = Ee), isNaN(R) || isNaN(he) || y == null) throw new Error("Invalid arguments passed to jsPDF.text");
        if (y.length === 0) return wi;
        var sn, Nn = "",
            Ds = typeof we.lineHeightFactor == "number" ? we.lineHeightFactor : ec,
            Co = wi.internal.scaleFactor;

        function ks(ri) {
            return ri = ri.split("	").join(Array(we.TabLen || 9).join(" ")), mi(ri, qr);
        }

        function Au(ri) {
            for (var gi, Xi = ri.concat(), _n = [], Ps = Xi.length; Ps--;) typeof(gi = Xi.shift()) == "string" ? _n.push(gi) : Array.isArray(ri) && (gi.length === 1 || gi[1] === void 0 && gi[2] === void 0) ? _n.push(gi[0]) : _n.push([gi[0], gi[1], gi[2]]);
            return _n;
        }

        function u0(ri, gi) {
            var Xi;
            if (typeof ri == "string") Xi = gi(ri)[0];
            else if (Array.isArray(ri)) {
                for (var _n, Ps, Lu = ri.concat(), d0 = [], zh = Lu.length; zh--;) typeof(_n = Lu.shift()) == "string" ? d0.push(gi(_n)[0]) : Array.isArray(_n) && typeof _n[0] == "string" && (Ps = gi(_n[0], _n[1], _n[2]), d0.push([Ps[0], Ps[1], Ps[2]]));
                Xi = d0;
            }
            return Xi;
        }
        var tl = !1,
            nc = !0;
        if (typeof y == "string") tl = !0;
        else if (Array.isArray(y)) {
            var ac = y.concat();
            et = [];
            for (var rl, Ln = ac.length; Ln--;)(typeof(rl = ac.shift()) != "string" || Array.isArray(rl) && typeof rl[0] != "string") && (nc = !1);
            tl = nc;
        }
        if (tl === !1) throw new Error('Type of text must be string or Array. "' + y + '" is not recognized.');
        typeof y == "string" && (y = y.match(/[\r?\n]/) ? y.split(/\r\n|\r|\n/g) : [y]);
        var oc = Re / wi.internal.scaleFactor,
            sc = oc * (Ds - 1);
        switch (we.baseline) {
            case "bottom":
                he -= sc;
                break;
            case "top":
                he += oc - sc;
                break;
            case "hanging":
                he += oc - 2 * sc;
                break;
            case "middle":
                he += oc / 2 - sc;
        }
        if ((Cr = we.maxWidth || 0) > 0 && (typeof y == "string" ? y = wi.splitTextToSize(y, Cr) : Object.prototype.toString.call(y) === "[object Array]" && (y = y.reduce(function(ri, gi) {
                return ri.concat(wi.splitTextToSize(gi, Cr));
            }, []))), Ke = {
                text: y,
                x: R,
                y: he,
                options: we,
                mutex: {
                    pdfEscape: mi,
                    activeFontKey: Ct,
                    fonts: lr,
                    activeFontSize: Re
                }
            }, Zr.publish("preProcessText", Ke), y = Ke.text, Ft = (we = Ke.options).angle, on instanceof Qt == 0 && Ft && typeof Ft == "number") {
            Ft *= Math.PI / 180, we.rotationDirection === 0 && (Ft = -Ft), T === w && (Ft = -Ft);
            var Tu = Math.cos(Ft),
                Du = Math.sin(Ft);
            on = new Qt(Tu, Du, -Du, Tu, 0, 0);
        } else Ft && Ft instanceof Qt && (on = Ft);
        T !== w || on || (on = bo), (pr = we.charSpace || Ss) !== void 0 && (Nn += k(W(pr)) + ` Tc
`, this.setCharSpace(this.getCharSpace() || 0)), (Mi = we.horizontalScale) !== void 0 && (Nn += k(100 * Mi) + ` Tz
`), we.lang;
        var la = -1,
            Fs = we.renderingMode !== void 0 ? we.renderingMode : we.stroke,
            f0 = wi.internal.getCurrentPageInfo().pageContext;
        switch (Fs) {
            case 0:
            case !1:
            case "fill":
                la = 0;
                break;
            case 1:
            case !0:
            case "stroke":
                la = 1;
                break;
            case 2:
            case "fillThenStroke":
                la = 2;
                break;
            case 3:
            case "invisible":
                la = 3;
                break;
            case 4:
            case "fillAndAddForClipping":
                la = 4;
                break;
            case 5:
            case "strokeAndAddPathForClipping":
                la = 5;
                break;
            case 6:
            case "fillThenStrokeAndAddToPathForClipping":
                la = 6;
                break;
            case 7:
            case "addToPathForClipping":
                la = 7;
        }
        var Uh = f0.usedRenderingMode !== void 0 ? f0.usedRenderingMode : -1;
        la !== -1 ? Nn += la + ` Tr
` : Uh !== -1 && (Nn += `0 Tr
`), la !== -1 && (f0.usedRenderingMode = la), Ut = we.align || "left";
        var io, lc = Re * Ds,
            ku = wi.internal.pageSize.getWidth(),
            Fu = lr[Ct];
        pr = we.charSpace || Ss, Cr = we.maxWidth || 0, qr = Object.assign({
            autoencode: !0,
            noBOM: !0
        }, we.flags);
        var il = [],
            cc = function(ri) {
                return wi.getStringUnitWidth(ri, {
                    font: Fu,
                    charSpace: pr,
                    fontSize: Re,
                    doKerning: !1
                }) * Re / Co;
            };
        if (Object.prototype.toString.call(y) === "[object Array]") {
            var Oa;
            et = Au(y), Ut !== "left" && (io = et.map(cc));
            var Na, nl = 0;
            if (Ut === "right") {
                R -= io[0], y = [], Ln = et.length;
                for (var Es = 0; Es < Ln; Es++) Es === 0 ? (Na = bs(R), Oa = ws(he)) : (Na = W(nl - io[Es]), Oa = -lc), y.push([et[Es], Na, Oa]), nl = io[Es];
            } else if (Ut === "center") {
                R -= io[0] / 2, y = [], Ln = et.length;
                for (var al = 0; al < Ln; al++) al === 0 ? (Na = bs(R), Oa = ws(he)) : (Na = W((nl - io[al]) / 2), Oa = -lc), y.push([et[al], Na, Oa]), nl = io[al];
            } else if (Ut === "left") {
                y = [], Ln = et.length;
                for (var Eu = 0; Eu < Ln; Eu++) y.push(et[Eu]);
            } else if (Ut === "justify" && Fu.encoding === "Identity-H") {
                y = [], Ln = et.length, Cr = Cr !== 0 ? Cr : ku;
                for (var h0 = 0, qi = 0; qi < Ln; qi++)
                    if (Oa = qi === 0 ? ws(he) : -lc, Na = qi === 0 ? bs(R) : h0, qi < Ln - 1) {
                        var Vh = W((Cr - io[qi]) / (et[qi].split(" ").length - 1)),
                            qo = et[qi].split(" ");
                        y.push([qo[0] + " ", Na, Oa]), h0 = 0;
                        for (var Xo = 1; Xo < qo.length; Xo++) {
                            var Pu = (cc(qo[Xo - 1] + " " + qo[Xo]) - cc(qo[Xo])) * Co + Vh;
                            Xo == qo.length - 1 ? y.push([qo[Xo], Pu, 0]) : y.push([qo[Xo] + " ", Pu, 0]), h0 -= Pu;
                        }
                    } else y.push([et[qi], Na, Oa]);
                y.push(["", h0, 0]);
            } else {
                if (Ut !== "justify") throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');
                for (y = [], Ln = et.length, Cr = Cr !== 0 ? Cr : ku, qi = 0; qi < Ln; qi++) {
                    Oa = qi === 0 ? ws(he) : -lc, Na = qi === 0 ? bs(R) : 0;
                    var Iu = et[qi].split(" ").length - 1,
                        Ou = Iu > 0 ? (Cr - io[qi]) / Iu : 0;
                    qi < Ln - 1 ? il.push(k(W(Ou))) : il.push(0), y.push([et[qi], Na, Oa]);
                }
            }
        }(typeof we.R2L == "boolean" ? we.R2L : xt) === !0 && (y = u0(y, function(ri, gi, Xi) {
            return [ri.split("").reverse().join(""), gi, Xi];
        })), Ke = {
            text: y,
            x: R,
            y: he,
            options: we,
            mutex: {
                pdfEscape: mi,
                activeFontKey: Ct,
                fonts: lr,
                activeFontSize: Re
            }
        }, Zr.publish("postProcessText", Ke), y = Ke.text, sn = Ke.mutex.isHex || !1;
        var Nu = lr[Ct].encoding;
        Nu !== "WinAnsiEncoding" && Nu !== "StandardEncoding" || (y = u0(y, function(ri, gi, Xi) {
            return [ks(ri), gi, Xi];
        })), et = Au(y), y = [];
        for (var ol, sl, ll, uc = Array.isArray(et[0]) ? 1 : 0, cl = "", fc = function(ri, gi, Xi) {
                var _n = "";
                return Xi instanceof Qt ? (Xi = typeof we.angle == "number" ? yo(Xi, new Qt(1, 0, 0, 1, ri, gi)) : yo(new Qt(1, 0, 0, 1, ri, gi), Xi), T === w && (Xi = yo(new Qt(1, 0, 0, -1, 0, 0), Xi)), _n = Xi.join(" ") + ` Tm
`) : _n = k(ri) + " " + k(gi) + ` Td
`, _n;
            }, no = 0; no < et.length; no++) {
            switch (cl = "", uc) {
                case 1:
                    ll = (sn ? "<" : "(") + et[no][0] + (sn ? ">" : ")"), ol = parseFloat(et[no][1]), sl = parseFloat(et[no][2]);
                    break;
                case 0:
                    ll = (sn ? "<" : "(") + et[no] + (sn ? ">" : ")"), ol = bs(R), sl = ws(he);
            }
            il !== void 0 && il[no] !== void 0 && (cl = il[no] + ` Tw
`), no === 0 ? y.push(cl + fc(ol, sl, on) + ll) : uc === 0 ? y.push(cl + ll) : uc === 1 && y.push(cl + fc(ol, sl, on) + ll);
        }
        y = uc === 0 ? y.join(` Tj
T* `) : y.join(` Tj
`), y += ` Tj
`;
        var Ko = `BT
/`;
        return Ko += Ct + " " + Re + ` Tf
`, Ko += k(Re * Ds) + ` TL
`, Ko += tc + `
`, Ko += Nn, Ko += y, q(Ko += "ET"), d[Ct] = !0, wi;
    };
    var F1 = f.__private__.clip = f.clip = function(y) {
        return q(y === "evenodd" ? "W*" : "W"), this;
    };
    f.clipEvenOdd = function() {
        return F1("evenodd");
    }, f.__private__.discardPath = f.discardPath = function() {
        return q("n"), this;
    };
    var Go = f.__private__.isValidStyle = function(y) {
        var R = !1;
        return [void 0, null, "S", "D", "F", "DF", "FD", "f", "f*", "B", "B*", "n"].indexOf(y) !== -1 && (R = !0), R;
    };
    f.__private__.setDefaultPathOperation = f.setDefaultPathOperation = function(y) {
        return Go(y) && (c = y), this;
    };
    var Ph = f.__private__.getStyle = f.getStyle = function(y) {
            var R = c;
            switch (y) {
                case "D":
                case "S":
                    R = "S";
                    break;
                case "F":
                    R = "f";
                    break;
                case "FD":
                case "DF":
                    R = "B";
                    break;
                case "f":
                case "f*":
                case "B":
                case "B*":
                    R = y;
            }
            return R;
        },
        Ih = f.close = function() {
            return q("h"), this;
        };
    f.stroke = function() {
        return q("S"), this;
    }, f.fill = function(y) {
        return s0("f", y), this;
    }, f.fillEvenOdd = function(y) {
        return s0("f*", y), this;
    }, f.fillStroke = function(y) {
        return s0("B", y), this;
    }, f.fillStrokeEvenOdd = function(y) {
        return s0("B*", y), this;
    };
    var s0 = function(y, R) {
            ni(R) === "object" ? P1(R, y) : q(y);
        },
        $l = function(y) {
            y === null || T === w && y === void 0 || (y = Ph(y), q(y));
        };

    function E1(y, R, he, we, Ee) {
        var Ke = new yc(R || this.boundingBox, he || this.xStep, we || this.yStep, this.gState, Ee || this.matrix);
        Ke.stream = this.stream;
        var et = y + "$$" + this.cloneIndex++ + "$$";
        return Gn(et, Ke), Ke;
    }
    var P1 = function(y, R) {
            var he = Yr[y.key],
                we = Pt[he];
            if (we instanceof Fl) q("q"), q(I1(R)), we.gState && f.setGState(we.gState), q(y.matrix.toString() + " cm"), q("/" + he + " sh"), q("Q");
            else if (we instanceof yc) {
                var Ee = new Qt(1, 0, 0, -1, 0, ic());
                y.matrix && (Ee = Ee.multiply(y.matrix || bo), he = E1.call(we, y.key, y.boundingBox, y.xStep, y.yStep, Ee).id), q("q"), q("/Pattern cs"), q("/" + he + " scn"), we.gState && f.setGState(we.gState), q(R), q("Q");
            }
        },
        I1 = function(y) {
            switch (y) {
                case "f":
                case "F":
                case "n":
                    return "W n";
                case "f*":
                    return "W* n";
                case "B":
                case "S":
                    return "W S";
                case "B*":
                    return "W* S";
            }
        },
        vu = f.moveTo = function(y, R) {
            return q(k(W(y)) + " " + k(I(R)) + " m"), this;
        },
        Oh = f.lineTo = function(y, R) {
            return q(k(W(y)) + " " + k(I(R)) + " l"), this;
        },
        So = f.curveTo = function(y, R, he, we, Ee, Ke) {
            return q([k(W(y)), k(I(R)), k(W(he)), k(I(we)), k(W(Ee)), k(I(Ke)), "c"].join(" ")), this;
        };
    f.__private__.line = f.line = function(y, R, he, we, Ee) {
        if (isNaN(y) || isNaN(R) || isNaN(he) || isNaN(we) || !Go(Ee)) throw new Error("Invalid arguments passed to jsPDF.line");
        return T === b ? this.lines([
            [he - y, we - R]
        ], y, R, [1, 1], Ee || "S") : this.lines([
            [he - y, we - R]
        ], y, R, [1, 1]).stroke();
    }, f.__private__.lines = f.lines = function(y, R, he, we, Ee, Ke) {
        var et, Ft, Ut, pr, Cr, qr, Mi, on, wi, xn, sn, Nn;
        if (typeof y == "number" && (Nn = he, he = R, R = y, y = Nn), we = we || [1, 1], Ke = Ke || !1, isNaN(R) || isNaN(he) || !Array.isArray(y) || !Array.isArray(we) || !Go(Ee) || typeof Ke != "boolean") throw new Error("Invalid arguments passed to jsPDF.lines");
        for (vu(R, he), et = we[0], Ft = we[1], pr = y.length, xn = R, sn = he, Ut = 0; Ut < pr; Ut++)(Cr = y[Ut]).length === 2 ? (xn = Cr[0] * et + xn, sn = Cr[1] * Ft + sn, Oh(xn, sn)) : (qr = Cr[0] * et + xn, Mi = Cr[1] * Ft + sn, on = Cr[2] * et + xn, wi = Cr[3] * Ft + sn, xn = Cr[4] * et + xn, sn = Cr[5] * Ft + sn, So(qr, Mi, on, wi, xn, sn));
        return Ke && Ih(), $l(Ee), this;
    }, f.path = function(y) {
        for (var R = 0; R < y.length; R++) {
            var he = y[R],
                we = he.c;
            switch (he.op) {
                case "m":
                    vu(we[0], we[1]);
                    break;
                case "l":
                    Oh(we[0], we[1]);
                    break;
                case "c":
                    So.apply(this, we);
                    break;
                case "h":
                    Ih();
            }
        }
        return this;
    }, f.__private__.rect = f.rect = function(y, R, he, we, Ee) {
        if (isNaN(y) || isNaN(R) || isNaN(he) || isNaN(we) || !Go(Ee)) throw new Error("Invalid arguments passed to jsPDF.rect");
        return T === b && (we = -we), q([k(W(y)), k(I(R)), k(W(he)), k(W(we)), "re"].join(" ")), $l(Ee), this;
    }, f.__private__.triangle = f.triangle = function(y, R, he, we, Ee, Ke, et) {
        if (isNaN(y) || isNaN(R) || isNaN(he) || isNaN(we) || isNaN(Ee) || isNaN(Ke) || !Go(et)) throw new Error("Invalid arguments passed to jsPDF.triangle");
        return this.lines([
            [he - y, we - R],
            [Ee - he, Ke - we],
            [y - Ee, R - Ke]
        ], y, R, [1, 1], et, !0), this;
    }, f.__private__.roundedRect = f.roundedRect = function(y, R, he, we, Ee, Ke, et) {
        if (isNaN(y) || isNaN(R) || isNaN(he) || isNaN(we) || isNaN(Ee) || isNaN(Ke) || !Go(et)) throw new Error("Invalid arguments passed to jsPDF.roundedRect");
        var Ft = 4 / 3 * (Math.SQRT2 - 1);
        return Ee = Math.min(Ee, .5 * he), Ke = Math.min(Ke, .5 * we), this.lines([
            [he - 2 * Ee, 0],
            [Ee * Ft, 0, Ee, Ke - Ke * Ft, Ee, Ke],
            [0, we - 2 * Ke],
            [0, Ke * Ft, -Ee * Ft, Ke, -Ee, Ke],
            [2 * Ee - he, 0],
            [-Ee * Ft, 0, -Ee, -Ke * Ft, -Ee, -Ke],
            [0, 2 * Ke - we],
            [0, -Ke * Ft, Ee * Ft, -Ke, Ee, -Ke]
        ], y + Ee, R, [1, 1], et, !0), this;
    }, f.__private__.ellipse = f.ellipse = function(y, R, he, we, Ee) {
        if (isNaN(y) || isNaN(R) || isNaN(he) || isNaN(we) || !Go(Ee)) throw new Error("Invalid arguments passed to jsPDF.ellipse");
        var Ke = 4 / 3 * (Math.SQRT2 - 1) * he,
            et = 4 / 3 * (Math.SQRT2 - 1) * we;
        return vu(y + he, R), So(y + he, R - et, y + Ke, R - we, y, R - we), So(y - Ke, R - we, y - he, R - et, y - he, R), So(y - he, R + et, y - Ke, R + we, y, R + we), So(y + Ke, R + we, y + he, R + et, y + he, R), $l(Ee), this;
    }, f.__private__.circle = f.circle = function(y, R, he, we) {
        if (isNaN(y) || isNaN(R) || isNaN(he) || !Go(we)) throw new Error("Invalid arguments passed to jsPDF.circle");
        return this.ellipse(y, R, he, he, we);
    }, f.setFont = function(y, R, he) {
        return he && (R = P(R, he)), Ct = el(y, R, {
            disableWarning: !1
        }), this;
    };
    var O1 = f.__private__.getFont = f.getFont = function() {
        return lr[el.apply(f, arguments)];
    };
    f.__private__.getFontList = f.getFontList = function() {
        var y, R, he = {};
        for (y in _r)
            if (_r.hasOwnProperty(y))
                for (R in he[y] = [], _r[y]) _r[y].hasOwnProperty(R) && he[y].push(R);
        return he;
    }, f.addFont = function(y, R, he, we, Ee) {
        var Ke = ["StandardEncoding", "MacRomanEncoding", "Identity-H", "WinAnsiEncoding"];
        return arguments[3] && Ke.indexOf(arguments[3]) !== -1 ? Ee = arguments[3] : arguments[3] && Ke.indexOf(arguments[3]) == -1 && (he = P(he, we)), Jr.call(this, y, R, he, Ee = Ee || "Identity-H");
    };
    var ec, xu = t.lineWidth || .200025,
        N1 = f.__private__.getLineWidth = f.getLineWidth = function() {
            return xu;
        },
        gr = f.__private__.setLineWidth = f.setLineWidth = function(y) {
            return xu = y, q(k(W(y)) + " w"), this;
        };
    f.__private__.setLineDash = Bt.API.setLineDash = Bt.API.setLineDashPattern = function(y, R) {
        if (y = y || [], R = R || 0, isNaN(R) || !Array.isArray(y)) throw new Error("Invalid arguments passed to jsPDF.setLineDash");
        return y = y.map(function(he) {
            return k(W(he));
        }).join(" "), R = k(W(R)), q("[" + y + "] " + R + " d"), this;
    };
    var L1 = f.__private__.getLineHeight = f.getLineHeight = function() {
        return Re * ec;
    };
    f.__private__.getLineHeight = f.getLineHeight = function() {
        return Re * ec;
    };
    var R1 = f.__private__.setLineHeightFactor = f.setLineHeightFactor = function(y) {
            return typeof(y = y || 1.15) == "number" && (ec = y), this;
        },
        M1 = f.__private__.getLineHeightFactor = f.getLineHeightFactor = function() {
            return ec;
        };
    R1(t.lineHeight);
    var bs = f.__private__.getHorizontalCoordinate = function(y) {
            return W(y);
        },
        ws = f.__private__.getVerticalCoordinate = function(y) {
            return T === w ? y : qt[j].mediaBox.topRightY - qt[j].mediaBox.bottomLeftY - W(y);
        },
        B1 = f.__private__.getHorizontalCoordinateString = f.getHorizontalCoordinateString = function(y) {
            return k(bs(y));
        },
        U1 = f.__private__.getVerticalCoordinateString = f.getVerticalCoordinateString = function(y) {
            return k(ws(y));
        },
        l0 = t.strokeColor || "0 G";
    f.__private__.getStrokeColor = f.getDrawColor = function() {
        return se(l0);
    }, f.__private__.setStrokeColor = f.setDrawColor = function(y, R, he, we) {
        return l0 = de({
            ch1: y,
            ch2: R,
            ch3: he,
            ch4: we,
            pdfColorType: "draw",
            precision: 2
        }), q(l0), this;
    };
    var _u = t.fillColor || "0 g";
    f.__private__.getFillColor = f.getFillColor = function() {
        return se(_u);
    }, f.__private__.setFillColor = f.setFillColor = function(y, R, he, we) {
        return _u = de({
            ch1: y,
            ch2: R,
            ch3: he,
            ch4: we,
            pdfColorType: "fill",
            precision: 2
        }), q(_u), this;
    };
    var tc = t.textColor || "0 g",
        V1 = f.__private__.getTextColor = f.getTextColor = function() {
            return se(tc);
        };
    f.__private__.setTextColor = f.setTextColor = function(y, R, he, we) {
        return tc = de({
            ch1: y,
            ch2: R,
            ch3: he,
            ch4: we,
            pdfColorType: "text",
            precision: 3
        }), this;
    };
    var Ss = t.charSpace,
        z1 = f.__private__.getCharSpace = f.getCharSpace = function() {
            return parseFloat(Ss || 0);
        };
    f.__private__.setCharSpace = f.setCharSpace = function(y) {
        if (isNaN(y)) throw new Error("Invalid argument passed to jsPDF.setCharSpace");
        return Ss = y, this;
    };
    var yu = 0;
    f.CapJoinStyles = {
        0: 0,
        butt: 0,
        but: 0,
        miter: 0,
        1: 1,
        round: 1,
        rounded: 1,
        circle: 1,
        2: 2,
        projecting: 2,
        project: 2,
        square: 2,
        bevel: 2
    }, f.__private__.setLineCap = f.setLineCap = function(y) {
        var R = f.CapJoinStyles[y];
        if (R === void 0) throw new Error("Line cap style of '" + y + "' is not recognized. See or extend .CapJoinStyles property for valid styles");
        return yu = R, q(R + " J"), this;
    };
    var bu = 0;
    f.__private__.setLineJoin = f.setLineJoin = function(y) {
        var R = f.CapJoinStyles[y];
        if (R === void 0) throw new Error("Line join style of '" + y + "' is not recognized. See or extend .CapJoinStyles property for valid styles");
        return bu = R, q(R + " j"), this;
    }, f.__private__.setLineMiterLimit = f.__private__.setMiterLimit = f.setLineMiterLimit = f.setMiterLimit = function(y) {
        if (y = y || 0, isNaN(y)) throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");
        return q(k(W(y)) + " M"), this;
    }, f.GState = uf, f.setGState = function(y) {
        (y = typeof y == "string" ? Jt[dr[y]] : Nh(null, y)).equals(yi) || (q("/" + y.id + " gs"), yi = y);
    };
    var Nh = function(y, R) {
        if (!y || !dr[y]) {
            var he = !1;
            for (var we in Jt)
                if (Jt.hasOwnProperty(we) && Jt[we].equals(R)) {
                    he = !0;
                    break;
                }
            if (he) R = Jt[we];
            else {
                var Ee = "GS" + (Object.keys(Jt).length + 1).toString(10);
                Jt[Ee] = R, R.id = Ee;
            }
            return y && (dr[y] = R.id), Zr.publish("addGState", R), R;
        }
    };
    f.addGState = function(y, R) {
        return Nh(y, R), this;
    }, f.saveGraphicsState = function() {
        return q("q"), Gr.push({
            key: Ct,
            size: Re,
            color: tc
        }), this;
    }, f.restoreGraphicsState = function() {
        q("Q");
        var y = Gr.pop();
        return Ct = y.key, Re = y.size, tc = y.color, yi = null, this;
    }, f.setCurrentTransformationMatrix = function(y) {
        return q(y.toString() + " cm"), this;
    }, f.comment = function(y) {
        return q("#" + y), this;
    };
    var Cs = function(y, R) {
            var he = y || 0;
            Object.defineProperty(this, "x", {
                enumerable: !0,
                get: function() {
                    return he;
                },
                set: function(Ke) {
                    isNaN(Ke) || (he = parseFloat(Ke));
                }
            });
            var we = R || 0;
            Object.defineProperty(this, "y", {
                enumerable: !0,
                get: function() {
                    return we;
                },
                set: function(Ke) {
                    isNaN(Ke) || (we = parseFloat(Ke));
                }
            });
            var Ee = "pt";
            return Object.defineProperty(this, "type", {
                enumerable: !0,
                get: function() {
                    return Ee;
                },
                set: function(Ke) {
                    Ee = Ke.toString();
                }
            }), this;
        },
        wu = function(y, R, he, we) {
            Cs.call(this, y, R), this.type = "rect";
            var Ee = he || 0;
            Object.defineProperty(this, "w", {
                enumerable: !0,
                get: function() {
                    return Ee;
                },
                set: function(et) {
                    isNaN(et) || (Ee = parseFloat(et));
                }
            });
            var Ke = we || 0;
            return Object.defineProperty(this, "h", {
                enumerable: !0,
                get: function() {
                    return Ke;
                },
                set: function(et) {
                    isNaN(et) || (Ke = parseFloat(et));
                }
            }), this;
        },
        c0 = function() {
            this.page = Ir, this.currentPage = j, this.pages = J.slice(0), this.pagesContext = qt.slice(0), this.x = kt, this.y = Zt, this.matrix = ir, this.width = Cu(j), this.height = Rh(j), this.outputDestination = je, this.id = "", this.objectNumber = -1;
        };
    c0.prototype.restore = function() {
        Ir = this.page, j = this.currentPage, qt = this.pagesContext, J = this.pages, kt = this.x, Zt = this.y, ir = this.matrix, Lh(j, this.width), As(j, this.height), je = this.outputDestination;
    };
    var Su = function(y, R, he, we, Ee) {
        eo.push(new c0()), Ir = j = 0, J = [], kt = y, Zt = R, ir = Ee, bi([he, we]);
    };
    for (var rc in f.beginFormObject = function(y, R, he, we, Ee) {
            return Su(y, R, he, we, Ee), this;
        }, f.endFormObject = function(y) {
            return function(R) {
                if (_o[R]) eo.pop().restore();
                else {
                    var he = new c0(),
                        we = "Xo" + (Object.keys(kn).length + 1).toString(10);
                    he.id = we, _o[R] = we, kn[we] = he, Zr.publish("addFormObject", he), eo.pop().restore();
                }
            }(y), this;
        }, f.doFormObject = function(y, R) {
            var he = kn[_o[y]];
            return q("q"), q(R.toString() + " cm"), q("/" + he.id + " Do"), q("Q"), this;
        }, f.getFormObject = function(y) {
            var R = kn[_o[y]];
            return {
                x: R.x,
                y: R.y,
                width: R.width,
                height: R.height,
                matrix: R.matrix
            };
        }, f.save = function(y, R) {
            return y = y || "generated.pdf", (R = R || {}).returnPromise = R.returnPromise || !1, R.returnPromise === !1 ? (_c(o0(Ho()), y), typeof _c.unload == "function" && hr.setTimeout && setTimeout(_c.unload, 911), this) : new Promise(function(he, we) {
                try {
                    var Ee = _c(o0(Ho()), y);
                    typeof _c.unload == "function" && hr.setTimeout && setTimeout(_c.unload, 911), he(Ee);
                } catch (Ke) {
                    we(Ke.message);
                }
            });
        }, Bt.API) Bt.API.hasOwnProperty(rc) && (rc === "events" && Bt.API.events.length ? function(y, R) {
        var he, we, Ee;
        for (Ee = R.length - 1; Ee !== -1; Ee--) he = R[Ee][0], we = R[Ee][1], y.subscribe.apply(y, [he].concat(typeof we == "function" ? [we] : we));
    }(Zr, Bt.API.events) : f[rc] = Bt.API[rc]);

    function Cu(y) {
        return qt[y].mediaBox.topRightX - qt[y].mediaBox.bottomLeftX;
    }

    function Lh(y, R) {
        qt[y].mediaBox.topRightX = R + qt[y].mediaBox.bottomLeftX;
    }

    function Rh(y) {
        return qt[y].mediaBox.topRightY - qt[y].mediaBox.bottomLeftY;
    }

    function As(y, R) {
        qt[y].mediaBox.topRightY = R + qt[y].mediaBox.bottomLeftY;
    }
    var Ts = f.getPageWidth = function(y) {
            return Cu(y = y || j) / fr;
        },
        Mh = f.setPageWidth = function(y, R) {
            Lh(y, R * fr);
        },
        ic = f.getPageHeight = function(y) {
            return Rh(y = y || j) / fr;
        },
        Bh = f.setPageHeight = function(y, R) {
            As(y, R * fr);
        };
    return f.internal = {
            pdfEscape: mi,
            getStyle: Ph,
            getFont: O1,
            getFontSize: ct,
            getCharSpace: z1,
            getTextColor: V1,
            getLineHeight: L1,
            getLineHeightFactor: M1,
            getLineWidth: N1,
            write: ze,
            getHorizontalCoordinate: bs,
            getVerticalCoordinate: ws,
            getCoordinateString: B1,
            getVerticalCoordinateString: U1,
            collections: {},
            newObject: Ei,
            newAdditionalObject: fe,
            newObjectDeferred: rn,
            newObjectDeferredBegin: V,
            getFilters: Ne,
            putStream: He,
            events: Zr,
            scaleFactor: fr,
            pageSize: {
                getWidth: function() {
                    return Ts(j);
                },
                setWidth: function(y) {
                    Mh(j, y);
                },
                getHeight: function() {
                    return ic(j);
                },
                setHeight: function(y) {
                    Bh(j, y);
                }
            },
            encryptionOptions: u,
            encryption: vn,
            getEncryptor: function(y) {
                return u !== null ? vn.encryptor(y, 0) : function(R) {
                    return R;
                };
            },
            output: Fh,
            getNumberOfPages: to,
            get pages() {
                return J;
            },
            out: q,
            f2: C,
            f3: F,
            getPageInfo: ys,
            getPageInfoByObjId: Eh,
            getCurrentPageInfo: k1,
            getPDFVersion: _,
            Point: Cs,
            Rectangle: wu,
            Matrix: Qt,
            hasHotfix: ro
        }, Object.defineProperty(f.internal.pageSize, "width", {
            get: function() {
                return Ts(j);
            },
            set: function(y) {
                Mh(j, y);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(f.internal.pageSize, "height", {
            get: function() {
                return ic(j);
            },
            set: function(y) {
                Bh(j, y);
            },
            enumerable: !0,
            configurable: !0
        }),
        function(y) {
            for (var R = 0, he = ft.length; R < he; R++) {
                var we = Jr.call(this, y[R][0], y[R][1], y[R][2], ft[R][3], !0);
                h === !1 && (d[we] = !0);
                var Ee = y[R][0].split("-");
                nr({
                    id: we,
                    fontName: Ee[0],
                    fontStyle: Ee[1] || ""
                });
            }
            Zr.publish("addFonts", {
                fonts: lr,
                dictionary: _r
            });
        }.call(f, ft), Ct = "F1", Fn(n, e), Zr.publish("initialized"), f;
}

function qy(t) {
    return t.reduce(function(r, e, i) {
        return r[e] = i, r;
    }, {});
}

function Ym(t) {
    var r = t.family.replace(/"|'/g, "").toLowerCase(),
        e = function(a) {
            return Xy[a = a || "normal"] ? a : "normal";
        }(t.style),
        i = function(a) {
            return a ? typeof a == "number" ? a >= 100 && a <= 900 && a % 100 == 0 ? a : 400 : /^\d00$/.test(a) ? parseInt(a) : a === "bold" ? 700 : 400 : 400;
        }(t.weight),
        n = function(a) {
            return typeof rg[a = a || "normal"] == "number" ? a : "normal";
        }(t.stretch);
    return {
        family: r,
        style: e,
        weight: i,
        stretch: n,
        src: t.src || [],
        ref: t.ref || {
            name: r,
            style: [n, e, i].join(" ")
        }
    };
}

function wy(t, r, e, i) {
    var n;
    for (n = e; n >= 0 && n < r.length; n += i)
        if (t[r[n]]) return t[r[n]];
    for (n = e; n >= 0 && n < r.length; n -= i)
        if (t[r[n]]) return t[r[n]];
}

function Cy(t) {
    return [t.stretch, t.style, t.weight, t.family].join(" ");
}

function Ay(t) {
    return t.trimLeft();
}

function AA(t, r) {
    for (var e = 0; e < t.length;) {
        if (t.charAt(e) === r) return [t.substring(0, e), t.substring(e + 1)];
        e += 1;
    }
    return null;
}

function TA(t) {
    var r = t.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);
    return r === null ? null : [r[0], t.substring(r[0].length)];
}

function Py(t, r, e, i, n) {
    var a = 4,
        o = Oy;
    switch (n) {
        case Bt.API.image_compression.FAST:
            a = 1, o = Iy;
            break;
        case Bt.API.image_compression.MEDIUM:
            a = 6, o = Ny;
            break;
        case Bt.API.image_compression.SLOW:
            a = 9, o = Ly;
    }
    t = function(l, c, u, h) {
        for (var d, f = l.length / c, m = new Uint8Array(l.length + f), _ = [DA, Iy, Oy, Ny, Ly], x = 0; x < f; x += 1) {
            var g = x * c,
                b = l.subarray(g, g + c);
            if (h) m.set(h(b, u, d), g + x);
            else {
                for (var w = _.length, T = [], E = 0; E < w; E += 1) T[E] = _[E](b, u, d);
                var L = FA(T.concat());
                m.set(T[L], g + x);
            }
            d = b;
        }
        return m;
    }(t, r, Math.ceil(e * i / 8), o);
    var s = Vd(t, {
        level: a
    });
    return Bt.API.__addimage__.arrayBufferToBinaryString(s);
}

function DA(t) {
    var r = Array.apply([], t);
    return r.unshift(0), r;
}

function Iy(t, r) {
    var e = t.length,
        i = [];
    i[0] = 1;
    for (var n = 0; n < e; n += 1) {
        var a = t[n - r] || 0;
        i[n + 1] = t[n] - a + 256 & 255;
    }
    return i;
}

function Oy(t, r, e) {
    var i = t.length,
        n = [];
    n[0] = 2;
    for (var a = 0; a < i; a += 1) {
        var o = e && e[a] || 0;
        n[a + 1] = t[a] - o + 256 & 255;
    }
    return n;
}

function Ny(t, r, e) {
    var i = t.length,
        n = [];
    n[0] = 3;
    for (var a = 0; a < i; a += 1) {
        var o = t[a - r] || 0,
            s = e && e[a] || 0;
        n[a + 1] = t[a] + 256 - (o + s >>> 1) & 255;
    }
    return n;
}

function Ly(t, r, e) {
    var i = t.length,
        n = [];
    n[0] = 4;
    for (var a = 0; a < i; a += 1) {
        var o = kA(t[a - r] || 0, e && e[a] || 0, e && e[a - r] || 0);
        n[a + 1] = t[a] - o + 256 & 255;
    }
    return n;
}

function kA(t, r, e) {
    if (t === r && r === e) return t;
    var i = Math.abs(r - e),
        n = Math.abs(t - e),
        a = Math.abs(t + r - e - e);
    return i <= n && i <= a ? t : n <= a ? r : e;
}

function FA(t) {
    var r = t.map(function(e) {
        return e.reduce(function(i, n) {
            return i + Math.abs(n);
        }, 0);
    });
    return r.indexOf(Math.min.apply(null, r));
}

function Jm(t, r, e) {
    var i = r * e,
        n = Math.floor(i / 8),
        a = 16 - (i - 8 * n + e),
        o = (1 << e) - 1;
    return Zy(t, n) >> a & o;
}

function Ry(t, r, e, i) {
    var n = e * i,
        a = Math.floor(n / 8),
        o = 16 - (n - 8 * a + i),
        s = (1 << i) - 1,
        l = (r & s) << o;
    (function(c, u, h) {
        if (u + 1 < c.byteLength) c.setUint16(u, h, !1);
        else {
            var d = h >> 8 & 255;
            c.setUint8(u, d);
        }
    })(t, a, Zy(t, a) & ~(s << o) & 65535 | l);
}

function Zy(t, r) {
    return r + 1 < t.byteLength ? t.getUint16(r, !1) : t.getUint8(r) << 8;
}

function EA(t) {
    var r = 0;
    if (t[r++] !== 71 || t[r++] !== 73 || t[r++] !== 70 || t[r++] !== 56 || (t[r++] + 1 & 253) != 56 || t[r++] !== 97) throw new Error("Invalid GIF 87a/89a header.");
    var e = t[r++] | t[r++] << 8,
        i = t[r++] | t[r++] << 8,
        n = t[r++],
        a = n >> 7,
        o = 1 << 1 + (7 & n);
    t[r++], t[r++];
    var s = null,
        l = null;
    a && (s = r, l = o, r += 3 * o);
    var c = !0,
        u = [],
        h = 0,
        d = null,
        f = 0,
        m = null;
    for (this.width = e, this.height = i; c && r < t.length;) switch (t[r++]) {
        case 33:
            switch (t[r++]) {
                case 255:
                    if (t[r] !== 11 || t[r + 1] == 78 && t[r + 2] == 69 && t[r + 3] == 84 && t[r + 4] == 83 && t[r + 5] == 67 && t[r + 6] == 65 && t[r + 7] == 80 && t[r + 8] == 69 && t[r + 9] == 50 && t[r + 10] == 46 && t[r + 11] == 48 && t[r + 12] == 3 && t[r + 13] == 1 && t[r + 16] == 0) r += 14, m = t[r++] | t[r++] << 8, r++;
                    else
                        for (r += 12;;) {
                            if (!((C = t[r++]) >= 0)) throw Error("Invalid block size");
                            if (C === 0) break;
                            r += C;
                        }
                    break;
                case 249:
                    if (t[r++] !== 4 || t[r + 4] !== 0) throw new Error("Invalid graphics extension block.");
                    var _ = t[r++];
                    h = t[r++] | t[r++] << 8, d = t[r++], 1 & _ || (d = null), f = _ >> 2 & 7, r++;
                    break;
                case 254:
                    for (;;) {
                        if (!((C = t[r++]) >= 0)) throw Error("Invalid block size");
                        if (C === 0) break;
                        r += C;
                    }
                    break;
                default:
                    throw new Error("Unknown graphic control label: 0x" + t[r - 1].toString(16));
            }
            break;
        case 44:
            var x = t[r++] | t[r++] << 8,
                g = t[r++] | t[r++] << 8,
                b = t[r++] | t[r++] << 8,
                w = t[r++] | t[r++] << 8,
                T = t[r++],
                E = T >> 6 & 1,
                L = 1 << 1 + (7 & T),
                P = s,
                k = l,
                A = !1;
            T >> 7 && (A = !0, P = r, k = L, r += 3 * L);
            var N = r;
            for (r++;;) {
                var C;
                if (!((C = t[r++]) >= 0)) throw Error("Invalid block size");
                if (C === 0) break;
                r += C;
            }
            u.push({
                x,
                y: g,
                width: b,
                height: w,
                has_local_palette: A,
                palette_offset: P,
                palette_size: k,
                data_offset: N,
                data_length: r - N,
                transparent_index: d,
                interlaced: !!E,
                delay: h,
                disposal: f
            });
            break;
        case 59:
            c = !1;
            break;
        default:
            throw new Error("Unknown gif block: 0x" + t[r - 1].toString(16));
    }
    this.numFrames = function() {
        return u.length;
    }, this.loopCount = function() {
        return m;
    }, this.frameInfo = function(F) {
        if (F < 0 || F >= u.length) throw new Error("Frame index out of range.");
        return u[F];
    }, this.decodeAndBlitFrameBGRA = function(F, W) {
        var I = this.frameInfo(F),
            U = I.width * I.height,
            le = new Uint8Array(U);
        My(t, I.data_offset, le, U);
        var H = I.palette_offset,
            pe = I.transparent_index;
        pe === null && (pe = 256);
        var _e = I.width,
            Fe = e - _e,
            Te = _e,
            O = 4 * (I.y * e + I.x),
            j = 4 * ((I.y + I.height) * e + I.x),
            X = O,
            me = 4 * Fe;
        I.interlaced === !0 && (me += 4 * e * 7);
        for (var xe = 8, be = 0, B = le.length; be < B; ++be) {
            var ne = le[be];
            if (Te === 0 && (Te = _e, (X += me) >= j && (me = 4 * Fe + 4 * e * (xe - 1), X = O + (_e + Fe) * (xe << 1), xe >>= 1)), ne === pe) X += 4;
            else {
                var Z = t[H + 3 * ne],
                    J = t[H + 3 * ne + 1],
                    ye = t[H + 3 * ne + 2];
                W[X++] = ye, W[X++] = J, W[X++] = Z, W[X++] = 255;
            }--Te;
        }
    }, this.decodeAndBlitFrameRGBA = function(F, W) {
        var I = this.frameInfo(F),
            U = I.width * I.height,
            le = new Uint8Array(U);
        My(t, I.data_offset, le, U);
        var H = I.palette_offset,
            pe = I.transparent_index;
        pe === null && (pe = 256);
        var _e = I.width,
            Fe = e - _e,
            Te = _e,
            O = 4 * (I.y * e + I.x),
            j = 4 * ((I.y + I.height) * e + I.x),
            X = O,
            me = 4 * Fe;
        I.interlaced === !0 && (me += 4 * e * 7);
        for (var xe = 8, be = 0, B = le.length; be < B; ++be) {
            var ne = le[be];
            if (Te === 0 && (Te = _e, (X += me) >= j && (me = 4 * Fe + 4 * e * (xe - 1), X = O + (_e + Fe) * (xe << 1), xe >>= 1)), ne === pe) X += 4;
            else {
                var Z = t[H + 3 * ne],
                    J = t[H + 3 * ne + 1],
                    ye = t[H + 3 * ne + 2];
                W[X++] = Z, W[X++] = J, W[X++] = ye, W[X++] = 255;
            }--Te;
        }
    };
}

function My(t, r, e, i) {
    for (var n = t[r++], a = 1 << n, o = a + 1, s = o + 1, l = n + 1, c = (1 << l) - 1, u = 0, h = 0, d = 0, f = t[r++], m = new Int32Array(4096), _ = null;;) {
        for (; u < 16 && f !== 0;) h |= t[r++] << u, u += 8, f === 1 ? f = t[r++] : --f;
        if (u < l) break;
        var x = h & c;
        if (h >>= l, u -= l, x !== a) {
            if (x === o) break;
            for (var g = x < s ? x : _, b = 0, w = g; w > a;) w = m[w] >> 8, ++b;
            var T = w;
            if (d + b + (g !== x ? 1 : 0) > i) return void xi.log("Warning, gif stream longer than expected.");
            e[d++] = T;
            var E = d += b;
            for (g !== x && (e[d++] = T), w = g; b--;) w = m[w], e[--E] = 255 & w, w >>= 8;
            _ !== null && s < 4096 && (m[s++] = _ << 8 | T, s >= c + 1 && l < 12 && (++l, c = c << 1 | 1)), _ = x;
        } else s = o + 1, c = (1 << (l = n + 1)) - 1, _ = null;
    }
    return d !== i && xi.log("Warning, gif stream shorter than expected."), e;
}

function Qm(t) {
    var r, e, i, n, a, o = Math.floor,
        s = new Array(64),
        l = new Array(64),
        c = new Array(64),
        u = new Array(64),
        h = new Array(65535),
        d = new Array(65535),
        f = new Array(64),
        m = new Array(64),
        _ = [],
        x = 0,
        g = 7,
        b = new Array(64),
        w = new Array(64),
        T = new Array(64),
        E = new Array(256),
        L = new Array(2048),
        P = [0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44, 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49, 57, 58, 62, 63],
        k = [0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0],
        A = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
        N = [0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125],
        C = [1, 2, 3, 0, 4, 17, 5, 18, 33, 49, 65, 6, 19, 81, 97, 7, 34, 113, 20, 50, 129, 145, 161, 8, 35, 66, 177, 193, 21, 82, 209, 240, 36, 51, 98, 114, 130, 9, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250],
        F = [0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0],
        W = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
        I = [0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119],
        U = [0, 1, 2, 3, 17, 4, 5, 33, 49, 6, 18, 65, 81, 7, 97, 113, 19, 34, 50, 129, 8, 20, 66, 145, 161, 177, 193, 9, 35, 51, 82, 240, 21, 98, 114, 209, 10, 22, 36, 52, 225, 37, 241, 23, 24, 25, 26, 38, 39, 40, 41, 42, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 130, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 226, 227, 228, 229, 230, 231, 232, 233, 234, 242, 243, 244, 245, 246, 247, 248, 249, 250];

    function le(O, j) {
        for (var X = 0, me = 0, xe = new Array(), be = 1; be <= 16; be++) {
            for (var B = 1; B <= O[be]; B++) xe[j[me]] = [], xe[j[me]][0] = X, xe[j[me]][1] = be, me++, X++;
            X *= 2;
        }
        return xe;
    }

    function H(O) {
        for (var j = O[0], X = O[1] - 1; X >= 0;) j & 1 << X && (x |= 1 << g), X--, --g < 0 && (x == 255 ? (pe(255), pe(0)) : pe(x), g = 7, x = 0);
    }

    function pe(O) {
        _.push(O);
    }

    function _e(O) {
        pe(O >> 8 & 255), pe(255 & O);
    }

    function Fe(O, j, X, me, xe) {
        for (var be, B = xe[0], ne = xe[240], Z = function(Re, pt) {
                var ct, xt, yt, Pe, Je, er, ur, Gt, Ct, fr, kt = 0;
                for (Ct = 0; Ct < 8; ++Ct) {
                    ct = Re[kt], xt = Re[kt + 1], yt = Re[kt + 2], Pe = Re[kt + 3], Je = Re[kt + 4], er = Re[kt + 5], ur = Re[kt + 6];
                    var Zt = ct + (Gt = Re[kt + 7]),
                        ir = ct - Gt,
                        lr = xt + ur,
                        _r = xt - ur,
                        Gr = yt + er,
                        Pt = yt - er,
                        Yr = Pe + Je,
                        Jt = Pe - Je,
                        dr = Zt + Yr,
                        yi = Zt - Yr,
                        Ir = lr + Gr,
                        qt = lr - Gr;
                    Re[kt] = dr + Ir, Re[kt + 4] = dr - Ir;
                    var Zr = .707106781 * (qt + yi);
                    Re[kt + 2] = yi + Zr, Re[kt + 6] = yi - Zr;
                    var _s = .382683433 * ((dr = Jt + Pt) - (qt = _r + ir)),
                        kn = .5411961 * dr + _s,
                        _o = 1.306562965 * qt + _s,
                        eo = .707106781 * (Ir = Pt + _r),
                        Qt = ir + eo,
                        yo = ir - eo;
                    Re[kt + 5] = yo + kn, Re[kt + 3] = yo - kn, Re[kt + 1] = Qt + _o, Re[kt + 7] = Qt - _o, kt += 8;
                }
                for (kt = 0, Ct = 0; Ct < 8; ++Ct) {
                    ct = Re[kt], xt = Re[kt + 8], yt = Re[kt + 16], Pe = Re[kt + 24], Je = Re[kt + 32], er = Re[kt + 40], ur = Re[kt + 48];
                    var bo = ct + (Gt = Re[kt + 56]),
                        Gn = ct - Gt,
                        Ca = xt + ur,
                        Ei = xt - ur,
                        rn = yt + er,
                        V = yt - er,
                        fe = Pe + Je,
                        te = Pe - Je,
                        ae = bo + fe,
                        se = bo - fe,
                        de = Ca + rn,
                        Ne = Ca - rn;
                    Re[kt] = ae + de, Re[kt + 32] = ae - de;
                    var He = .707106781 * (Ne + se);
                    Re[kt + 16] = se + He, Re[kt + 48] = se - He;
                    var Me = .382683433 * ((ae = te + V) - (Ne = Ei + Gn)),
                        Le = .5411961 * ae + Me,
                        Be = 1.306562965 * Ne + Me,
                        at = .707106781 * (de = V + Ei),
                        lt = Gn + at,
                        _t = Gn - at;
                    Re[kt + 40] = _t + Le, Re[kt + 24] = _t - Le, Re[kt + 8] = lt + Be, Re[kt + 56] = lt - Be, kt++;
                }
                for (Ct = 0; Ct < 64; ++Ct) fr = Re[Ct] * pt[Ct], f[Ct] = fr > 0 ? fr + .5 | 0 : fr - .5 | 0;
                return f;
            }(O, j), J = 0; J < 64; ++J) m[P[J]] = Z[J];
        var ye = m[0] - X;
        X = m[0], ye == 0 ? H(me[0]) : (H(me[d[be = 32767 + ye]]), H(h[be]));
        for (var je = 63; je > 0 && m[je] == 0;) je--;
        if (je == 0) return H(B), X;
        for (var Qe, q = 1; q <= je;) {
            for (var ze = q; m[q] == 0 && q <= je;) ++q;
            var gt = q - ze;
            if (gt >= 16) {
                Qe = gt >> 4;
                for (var ft = 1; ft <= Qe; ++ft) H(ne);
                gt &= 15;
            }
            be = 32767 + m[q], H(xe[(gt << 4) + d[be]]), H(h[be]), q++;
        }
        return je != 63 && H(B), X;
    }

    function Te(O) {
        O = Math.min(Math.max(O, 1), 100), a != O && (function(j) {
            for (var X = [16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, 14, 13, 16, 24, 40, 57, 69, 56, 14, 17, 22, 29, 51, 87, 80, 62, 18, 22, 37, 56, 68, 109, 103, 77, 24, 35, 55, 64, 81, 104, 113, 92, 49, 64, 78, 87, 103, 121, 120, 101, 72, 92, 95, 98, 112, 100, 103, 99], me = 0; me < 64; me++) {
                var xe = o((X[me] * j + 50) / 100);
                xe = Math.min(Math.max(xe, 1), 255), s[P[me]] = xe;
            }
            for (var be = [17, 18, 24, 47, 99, 99, 99, 99, 18, 21, 26, 66, 99, 99, 99, 99, 24, 26, 56, 99, 99, 99, 99, 99, 47, 66, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99], B = 0; B < 64; B++) {
                var ne = o((be[B] * j + 50) / 100);
                ne = Math.min(Math.max(ne, 1), 255), l[P[B]] = ne;
            }
            for (var Z = [1, 1.387039845, 1.306562965, 1.175875602, 1, .785694958, .5411961, .275899379], J = 0, ye = 0; ye < 8; ye++)
                for (var je = 0; je < 8; je++) c[J] = 1 / (s[P[J]] * Z[ye] * Z[je] * 8), u[J] = 1 / (l[P[J]] * Z[ye] * Z[je] * 8), J++;
        }(O < 50 ? Math.floor(5e3 / O) : Math.floor(200 - 2 * O)), a = O);
    }
    this.encode = function(O, j) {
            j && Te(j), _ = new Array(), x = 0, g = 7, _e(65496), _e(65504), _e(16), pe(74), pe(70), pe(73), pe(70), pe(0), pe(1), pe(1), pe(0), _e(1), _e(1), pe(0), pe(0),
                function() {
                    _e(65499), _e(132), pe(0);
                    for (var xt = 0; xt < 64; xt++) pe(s[xt]);
                    pe(1);
                    for (var yt = 0; yt < 64; yt++) pe(l[yt]);
                }(),
                function(xt, yt) {
                    _e(65472), _e(17), pe(8), _e(yt), _e(xt), pe(3), pe(1), pe(17), pe(0), pe(2), pe(17), pe(1), pe(3), pe(17), pe(1);
                }(O.width, O.height),
                function() {
                    _e(65476), _e(418), pe(0);
                    for (var xt = 0; xt < 16; xt++) pe(k[xt + 1]);
                    for (var yt = 0; yt <= 11; yt++) pe(A[yt]);
                    pe(16);
                    for (var Pe = 0; Pe < 16; Pe++) pe(N[Pe + 1]);
                    for (var Je = 0; Je <= 161; Je++) pe(C[Je]);
                    pe(1);
                    for (var er = 0; er < 16; er++) pe(F[er + 1]);
                    for (var ur = 0; ur <= 11; ur++) pe(W[ur]);
                    pe(17);
                    for (var Gt = 0; Gt < 16; Gt++) pe(I[Gt + 1]);
                    for (var Ct = 0; Ct <= 161; Ct++) pe(U[Ct]);
                }(), _e(65498), _e(12), pe(3), pe(1), pe(0), pe(2), pe(17), pe(3), pe(17), pe(0), pe(63), pe(0);
            var X = 0,
                me = 0,
                xe = 0;
            x = 0, g = 7, this.encode.displayName = "_encode_";
            for (var be, B, ne, Z, J, ye, je, Qe, q, ze = O.data, gt = O.width, ft = O.height, Re = 4 * gt, pt = 0; pt < ft;) {
                for (be = 0; be < Re;) {
                    for (J = Re * pt + be, je = -1, Qe = 0, q = 0; q < 64; q++) ye = J + (Qe = q >> 3) * Re + (je = 4 * (7 & q)), pt + Qe >= ft && (ye -= Re * (pt + 1 + Qe - ft)), be + je >= Re && (ye -= be + je - Re + 4), B = ze[ye++], ne = ze[ye++], Z = ze[ye++], b[q] = (L[B] + L[ne + 256 | 0] + L[Z + 512 | 0] >> 16) - 128, w[q] = (L[B + 768 | 0] + L[ne + 1024 | 0] + L[Z + 1280 | 0] >> 16) - 128, T[q] = (L[B + 1280 | 0] + L[ne + 1536 | 0] + L[Z + 1792 | 0] >> 16) - 128;
                    X = Fe(b, c, X, r, i), me = Fe(w, u, me, e, n), xe = Fe(T, u, xe, e, n), be += 32;
                }
                pt += 8;
            }
            if (g >= 0) {
                var ct = [];
                ct[1] = g + 1, ct[0] = (1 << g + 1) - 1, H(ct);
            }
            return _e(65497), new Uint8Array(_);
        }, t = t || 50,
        function() {
            for (var O = String.fromCharCode, j = 0; j < 256; j++) E[j] = O(j);
        }(), r = le(k, A), e = le(F, W), i = le(N, C), n = le(I, U),
        function() {
            for (var O = 1, j = 2, X = 1; X <= 15; X++) {
                for (var me = O; me < j; me++) d[32767 + me] = X, h[32767 + me] = [], h[32767 + me][1] = X, h[32767 + me][0] = me;
                for (var xe = -(j - 1); xe <= -O; xe++) d[32767 + xe] = X, h[32767 + xe] = [], h[32767 + xe][1] = X, h[32767 + xe][0] = j - 1 + xe;
                O <<= 1, j <<= 1;
            }
        }(),
        function() {
            for (var O = 0; O < 256; O++) L[O] = 19595 * O, L[O + 256 | 0] = 38470 * O, L[O + 512 | 0] = 7471 * O + 32768, L[O + 768 | 0] = -11059 * O, L[O + 1024 | 0] = -21709 * O, L[O + 1280 | 0] = 32768 * O + 8421375, L[O + 1536 | 0] = -27439 * O, L[O + 1792 | 0] = -5329 * O;
        }(), Te(t);
}

function Oo(t, r) {
    if (this.pos = 0, this.buffer = t, this.datav = new DataView(t.buffer), this.is_with_alpha = !!r, this.bottom_up = !0, this.flag = String.fromCharCode(this.buffer[0]) + String.fromCharCode(this.buffer[1]), this.pos += 2, ["BM", "BA", "CI", "CP", "IC", "PT"].indexOf(this.flag) === -1) throw new Error("Invalid BMP File");
    this.parseHeader(), this.parseBGR();
}

function By(t) {
    function r(A) {
        if (!A) throw Error("assert :P");
    }

    function e(A, N, C) {
        for (var F = 0; 4 > F; F++)
            if (A[N + F] != C.charCodeAt(F)) return !0;
        return !1;
    }

    function i(A, N, C, F, W) {
        for (var I = 0; I < W; I++) A[N + I] = C[F + I];
    }

    function n(A, N, C, F) {
        for (var W = 0; W < F; W++) A[N + W] = C;
    }

    function a(A) {
        return new Int32Array(A);
    }

    function o(A, N) {
        for (var C = [], F = 0; F < A; F++) C.push(new N());
        return C;
    }

    function s(A, N) {
        var C = [];
        return function F(W, I, U) {
            for (var le = U[I], H = 0; H < le && (W.push(U.length > I + 1 ? [] : new N()), !(U.length < I + 1)); H++) F(W[H], I + 1, U);
        }(C, 0, A), C;
    }
    var l = function() {
        var A = this;

        function N(p, v) {
            for (var S = 1 << v - 1 >>> 0; p & S;) S >>>= 1;
            return S ? (p & S - 1) + S : p;
        }

        function C(p, v, S, D, M) {
            r(!(D % S));
            do p[v + (D -= S)] = M; while (0 < D);
        }

        function F(p, v, S, D, M) {
            if (r(2328 >= M), 512 >= M) var z = a(512);
            else if ((z = a(M)) == null) return 0;
            return function(G, Y, re, ce, Se, We) {
                var ue, De, Ie = Y,
                    qe = 1 << re,
                    Ve = a(16),
                    Xe = a(16);
                for (r(Se != 0), r(ce != null), r(G != null), r(0 < re), De = 0; De < Se; ++De) {
                    if (15 < ce[De]) return 0;
                    ++Ve[ce[De]];
                }
                if (Ve[0] == Se) return 0;
                for (Xe[1] = 0, ue = 1; 15 > ue; ++ue) {
                    if (Ve[ue] > 1 << ue) return 0;
                    Xe[ue + 1] = Xe[ue] + Ve[ue];
                }
                for (De = 0; De < Se; ++De) ue = ce[De], 0 < ce[De] && (We[Xe[ue]++] = De);
                if (Xe[15] == 1) return (ce = new W()).g = 0, ce.value = We[0], C(G, Ie, 1, qe, ce), qe;
                var Ye, st = -1,
                    tt = qe - 1,
                    zt = 0,
                    Tt = 1,
                    Er = 1,
                    It = 1 << re;
                for (De = 0, ue = 1, Se = 2; ue <= re; ++ue, Se <<= 1) {
                    if (Tt += Er <<= 1, 0 > (Er -= Ve[ue])) return 0;
                    for (; 0 < Ve[ue]; --Ve[ue])(ce = new W()).g = ue, ce.value = We[De++], C(G, Ie + zt, Se, It, ce), zt = N(zt, ue);
                }
                for (ue = re + 1, Se = 2; 15 >= ue; ++ue, Se <<= 1) {
                    if (Tt += Er <<= 1, 0 > (Er -= Ve[ue])) return 0;
                    for (; 0 < Ve[ue]; --Ve[ue]) {
                        if (ce = new W(), (zt & tt) != st) {
                            for (Ie += It, Ye = 1 << (st = ue) - re; 15 > st && !(0 >= (Ye -= Ve[st]));) ++st, Ye <<= 1;
                            qe += It = 1 << (Ye = st - re), G[Y + (st = zt & tt)].g = Ye + re, G[Y + st].value = Ie - Y - st;
                        }
                        ce.g = ue - re, ce.value = We[De++], C(G, Ie + (zt >> re), Se, It, ce), zt = N(zt, ue);
                    }
                }
                return Tt != 2 * Xe[15] - 1 ? 0 : qe;
            }(p, v, S, D, M, z);
        }

        function W() {
            this.value = this.g = 0;
        }

        function I() {
            this.value = this.g = 0;
        }

        function U() {
            this.G = o(5, W), this.H = a(5), this.jc = this.Qb = this.qb = this.nd = 0, this.pd = o(cc, I);
        }

        function le(p, v, S, D) {
            r(p != null), r(v != null), r(2147483648 > D), p.Ca = 254, p.I = 0, p.b = -8, p.Ka = 0, p.oa = v, p.pa = S, p.Jd = v, p.Yc = S + D, p.Zc = 4 <= D ? S + D - 4 + 1 : S, B(p);
        }

        function H(p, v) {
            for (var S = 0; 0 < v--;) S |= Z(p, 128) << v;
            return S;
        }

        function pe(p, v) {
            var S = H(p, v);
            return ne(p) ? -S : S;
        }

        function _e(p, v, S, D) {
            var M, z = 0;
            for (r(p != null), r(v != null), r(4294967288 > D), p.Sb = D, p.Ra = 0, p.u = 0, p.h = 0, 4 < D && (D = 4), M = 0; M < D; ++M) z += v[S + M] << 8 * M;
            p.Ra = z, p.bb = D, p.oa = v, p.pa = S;
        }

        function Fe(p) {
            for (; 8 <= p.u && p.bb < p.Sb;) p.Ra >>>= 8, p.Ra += p.oa[p.pa + p.bb] << nl - 8 >>> 0, ++p.bb, p.u -= 8;
            me(p) && (p.h = 1, p.u = 0);
        }

        function Te(p, v) {
            if (r(0 <= v), !p.h && v <= Na) {
                var S = X(p) & Oa[v];
                return p.u += v, Fe(p), S;
            }
            return p.h = 1, p.u = 0;
        }

        function O() {
            this.b = this.Ca = this.I = 0, this.oa = [], this.pa = 0, this.Jd = [], this.Yc = 0, this.Zc = [], this.Ka = 0;
        }

        function j() {
            this.Ra = 0, this.oa = [], this.h = this.u = this.bb = this.Sb = this.pa = 0;
        }

        function X(p) {
            return p.Ra >>> (p.u & nl - 1) >>> 0;
        }

        function me(p) {
            return r(p.bb <= p.Sb), p.h || p.bb == p.Sb && p.u > nl;
        }

        function xe(p, v) {
            p.u = v, p.h = me(p);
        }

        function be(p) {
            p.u >= Es && (r(p.u >= Es), Fe(p));
        }

        function B(p) {
            r(p != null && p.oa != null), p.pa < p.Zc ? (p.I = (p.oa[p.pa++] | p.I << 8) >>> 0, p.b += 8) : (r(p != null && p.oa != null), p.pa < p.Yc ? (p.b += 8, p.I = p.oa[p.pa++] | p.I << 8) : p.Ka ? p.b = 0 : (p.I <<= 8, p.b += 8, p.Ka = 1));
        }

        function ne(p) {
            return H(p, 1);
        }

        function Z(p, v) {
            var S = p.Ca;
            0 > p.b && B(p);
            var D = p.b,
                M = S * v >>> 8,
                z = (p.I >>> D > M) + 0;
            for (z ? (S -= M, p.I -= M + 1 << D >>> 0) : S = M + 1, D = S, M = 0; 256 <= D;) M += 8, D >>= 8;
            return D = 7 ^ M + al[D], p.b -= D, p.Ca = (S << D) - 1, z;
        }

        function J(p, v, S) {
            p[v + 0] = S >> 24 & 255, p[v + 1] = S >> 16 & 255, p[v + 2] = S >> 8 & 255, p[v + 3] = 255 & S;
        }

        function ye(p, v) {
            return p[v + 0] | p[v + 1] << 8;
        }

        function je(p, v) {
            return ye(p, v) | p[v + 2] << 16;
        }

        function Qe(p, v) {
            return ye(p, v) | ye(p, v + 2) << 16;
        }

        function q(p, v) {
            var S = 1 << v;
            return r(p != null), r(0 < v), p.X = a(S), p.X == null ? 0 : (p.Mb = 32 - v, p.Xa = v, 1);
        }

        function ze(p, v) {
            r(p != null), r(v != null), r(p.Xa == v.Xa), i(v.X, 0, p.X, 0, 1 << v.Xa);
        }

        function gt() {
            this.X = [], this.Xa = this.Mb = 0;
        }

        function ft(p, v, S, D) {
            r(S != null), r(D != null);
            var M = S[0],
                z = D[0];
            return M == 0 && (M = (p * z + v / 2) / v), z == 0 && (z = (v * M + p / 2) / p), 0 >= M || 0 >= z ? 0 : (S[0] = M, D[0] = z, 1);
        }

        function Re(p, v) {
            return p + (1 << v) - 1 >>> v;
        }

        function pt(p, v) {
            return ((4278255360 & p) + (4278255360 & v) >>> 0 & 4278255360) + ((16711935 & p) + (16711935 & v) >>> 0 & 16711935) >>> 0;
        }

        function ct(p, v) {
            A[v] = function(S, D, M, z, G, Y, re) {
                var ce;
                for (ce = 0; ce < G; ++ce) {
                    var Se = A[p](Y[re + ce - 1], M, z + ce);
                    Y[re + ce] = pt(S[D + ce], Se);
                }
            };
        }

        function xt() {
            this.ud = this.hd = this.jd = 0;
        }

        function yt(p, v) {
            return ((4278124286 & (p ^ v)) >>> 1) + (p & v) >>> 0;
        }

        function Pe(p) {
            return 0 <= p && 256 > p ? p : 0 > p ? 0 : 255 < p ? 255 : void 0;
        }

        function Je(p, v) {
            return Pe(p + (p - v + .5 >> 1));
        }

        function er(p, v, S) {
            return Math.abs(v - S) - Math.abs(p - S);
        }

        function ur(p, v, S, D, M, z, G) {
            for (D = z[G - 1], S = 0; S < M; ++S) z[G + S] = D = pt(p[v + S], D);
        }

        function Gt(p, v, S, D, M) {
            var z;
            for (z = 0; z < S; ++z) {
                var G = p[v + z],
                    Y = G >> 8 & 255,
                    re = 16711935 & (re = (re = 16711935 & G) + ((Y << 16) + Y));
                D[M + z] = (4278255360 & G) + re >>> 0;
            }
        }

        function Ct(p, v) {
            v.jd = 255 & p, v.hd = p >> 8 & 255, v.ud = p >> 16 & 255;
        }

        function fr(p, v, S, D, M, z) {
            var G;
            for (G = 0; G < D; ++G) {
                var Y = v[S + G],
                    re = Y >>> 8,
                    ce = Y,
                    Se = 255 & (Se = (Se = Y >>> 16) + ((p.jd << 24 >> 24) * (re << 24 >> 24) >>> 5));
                ce = 255 & (ce = (ce += (p.hd << 24 >> 24) * (re << 24 >> 24) >>> 5) + ((p.ud << 24 >> 24) * (Se << 24 >> 24) >>> 5)), M[z + G] = (4278255360 & Y) + (Se << 16) + ce;
            }
        }

        function kt(p, v, S, D, M) {
            A[v] = function(z, G, Y, re, ce, Se, We, ue, De) {
                for (re = We; re < ue; ++re)
                    for (We = 0; We < De; ++We) ce[Se++] = M(Y[D(z[G++])]);
            }, A[p] = function(z, G, Y, re, ce, Se, We) {
                var ue = 8 >> z.b,
                    De = z.Ea,
                    Ie = z.K[0],
                    qe = z.w;
                if (8 > ue)
                    for (z = (1 << z.b) - 1, qe = (1 << ue) - 1; G < Y; ++G) {
                        var Ve, Xe = 0;
                        for (Ve = 0; Ve < De; ++Ve) Ve & z || (Xe = D(re[ce++])), Se[We++] = M(Ie[Xe & qe]), Xe >>= ue;
                    } else A["VP8LMapColor" + S](re, ce, Ie, qe, Se, We, G, Y, De);
            };
        }

        function Zt(p, v, S, D, M) {
            for (S = v + S; v < S;) {
                var z = p[v++];
                D[M++] = z >> 16 & 255, D[M++] = z >> 8 & 255, D[M++] = 255 & z;
            }
        }

        function ir(p, v, S, D, M) {
            for (S = v + S; v < S;) {
                var z = p[v++];
                D[M++] = z >> 16 & 255, D[M++] = z >> 8 & 255, D[M++] = 255 & z, D[M++] = z >> 24 & 255;
            }
        }

        function lr(p, v, S, D, M) {
            for (S = v + S; v < S;) {
                var z = (G = p[v++]) >> 16 & 240 | G >> 12 & 15,
                    G = 240 & G | G >> 28 & 15;
                D[M++] = z, D[M++] = G;
            }
        }

        function _r(p, v, S, D, M) {
            for (S = v + S; v < S;) {
                var z = (G = p[v++]) >> 16 & 248 | G >> 13 & 7,
                    G = G >> 5 & 224 | G >> 3 & 31;
                D[M++] = z, D[M++] = G;
            }
        }

        function Gr(p, v, S, D, M) {
            for (S = v + S; v < S;) {
                var z = p[v++];
                D[M++] = 255 & z, D[M++] = z >> 8 & 255, D[M++] = z >> 16 & 255;
            }
        }

        function Pt(p, v, S, D, M, z) {
            if (z == 0)
                for (S = v + S; v < S;) J(D, ((z = p[v++])[0] >> 24 | z[1] >> 8 & 65280 | z[2] << 8 & 16711680 | z[3] << 24) >>> 0), M += 32;
            else i(D, M, p, v, S);
        }

        function Yr(p, v) {
            A[v][0] = A[p + "0"], A[v][1] = A[p + "1"], A[v][2] = A[p + "2"], A[v][3] = A[p + "3"], A[v][4] = A[p + "4"], A[v][5] = A[p + "5"], A[v][6] = A[p + "6"], A[v][7] = A[p + "7"], A[v][8] = A[p + "8"], A[v][9] = A[p + "9"], A[v][10] = A[p + "10"], A[v][11] = A[p + "11"], A[v][12] = A[p + "12"], A[v][13] = A[p + "13"], A[v][14] = A[p + "0"], A[v][15] = A[p + "0"];
        }

        function Jt(p) {
            return p == H1 || p == G1 || p == Xh || p == q1;
        }

        function dr() {
            this.eb = [], this.size = this.A = this.fb = 0;
        }

        function yi() {
            this.y = [], this.f = [], this.ea = [], this.F = [], this.Tc = this.Ed = this.Cd = this.Fd = this.lb = this.Db = this.Ab = this.fa = this.J = this.W = this.N = this.O = 0;
        }

        function Ir() {
            this.Rd = this.height = this.width = this.S = 0, this.f = {}, this.f.RGBA = new dr(), this.f.kb = new yi(), this.sd = null;
        }

        function qt() {
            this.width = [0], this.height = [0], this.Pd = [0], this.Qd = [0], this.format = [0];
        }

        function Zr() {
            this.Id = this.fd = this.Md = this.hb = this.ib = this.da = this.bd = this.cd = this.j = this.v = this.Da = this.Sd = this.ob = 0;
        }

        function _s(p) {
            return alert("todo:WebPSamplerProcessPlane"), p.T;
        }

        function kn(p, v) {
            var S = p.T,
                D = v.ba.f.RGBA,
                M = D.eb,
                z = D.fb + p.ka * D.A,
                G = oo[v.ba.S],
                Y = p.y,
                re = p.O,
                ce = p.f,
                Se = p.N,
                We = p.ea,
                ue = p.W,
                De = v.cc,
                Ie = v.dc,
                qe = v.Mc,
                Ve = v.Nc,
                Xe = p.ka,
                Ye = p.ka + p.T,
                st = p.U,
                tt = st + 1 >> 1;
            for (Xe == 0 ? G(Y, re, null, null, ce, Se, We, ue, ce, Se, We, ue, M, z, null, null, st) : (G(v.ec, v.fc, Y, re, De, Ie, qe, Ve, ce, Se, We, ue, M, z - D.A, M, z, st), ++S); Xe + 2 < Ye; Xe += 2) De = ce, Ie = Se, qe = We, Ve = ue, Se += p.Rc, ue += p.Rc, z += 2 * D.A, G(Y, (re += 2 * p.fa) - p.fa, Y, re, De, Ie, qe, Ve, ce, Se, We, ue, M, z - D.A, M, z, st);
            return re += p.fa, p.j + Ye < p.o ? (i(v.ec, v.fc, Y, re, st), i(v.cc, v.dc, ce, Se, tt), i(v.Mc, v.Nc, We, ue, tt), S--) : 1 & Ye || G(Y, re, null, null, ce, Se, We, ue, ce, Se, We, ue, M, z + D.A, null, null, st), S;
        }

        function _o(p, v, S) {
            var D = p.F,
                M = [p.J];
            if (D != null) {
                var z = p.U,
                    G = v.ba.S,
                    Y = G == qh || G == Xh;
                v = v.ba.f.RGBA;
                var re = [0],
                    ce = p.ka;
                re[0] = p.T, p.Kb && (ce == 0 ? --re[0] : (--ce, M[0] -= p.width), p.j + p.ka + p.T == p.o && (re[0] = p.o - p.j - ce));
                var Se = v.eb;
                ce = v.fb + ce * v.A, p = a2(D, M[0], p.width, z, re, Se, ce + (Y ? 0 : 3), v.A), r(S == re), p && Jt(G) && Ru(Se, ce, Y, z, re, v.A);
            }
            return 0;
        }

        function eo(p) {
            var v = p.ma,
                S = v.ba.S,
                D = 11 > S,
                M = S == Hh || S == Gh || S == qh || S == j1 || S == 12 || Jt(S);
            if (v.memory = null, v.Ib = null, v.Jb = null, v.Nd = null, !ku(v.Oa, p, M ? 11 : 12)) return 0;
            if (M && Jt(S) && Au(), p.da) alert("todo:use_scaling");
            else {
                if (D) {
                    if (v.Ib = _s, p.Kb) {
                        if (S = p.U + 1 >> 1, v.memory = a(p.U + 2 * S), v.memory == null) return 0;
                        v.ec = v.memory, v.fc = 0, v.cc = v.ec, v.dc = v.fc + p.U, v.Mc = v.cc, v.Nc = v.dc + S, v.Ib = kn, Au();
                    }
                } else alert("todo:EmitYUV");
                M && (v.Jb = _o, D && Co());
            }
            if (D && !w2) {
                for (p = 0; 256 > p; ++p) x3[p] = 89858 * (p - 128) + Yh >> Kh, b3[p] = -22014 * (p - 128) + Yh, y3[p] = -45773 * (p - 128), _3[p] = 113618 * (p - 128) + Yh >> Kh;
                for (p = Bu; p < Y1; ++p) v = 76283 * (p - 16) + Yh >> Kh, w3[p - Bu] = nn(v, 255), S3[p - Bu] = nn(v + 8 >> 4, 15);
                w2 = 1;
            }
            return 1;
        }

        function Qt(p) {
            var v = p.ma,
                S = p.U,
                D = p.T;
            return r(!(1 & p.ka)), 0 >= S || 0 >= D ? 0 : (S = v.Ib(p, v), v.Jb != null && v.Jb(p, v, S), v.Dc += S, 1);
        }

        function yo(p) {
            p.ma.memory = null;
        }

        function bo(p, v, S, D) {
            return Te(p, 8) != 47 ? 0 : (v[0] = Te(p, 14) + 1, S[0] = Te(p, 14) + 1, D[0] = Te(p, 1), Te(p, 3) != 0 ? 0 : !p.h);
        }

        function Gn(p, v) {
            if (4 > p) return p + 1;
            var S = p - 2 >> 1;
            return (2 + (1 & p) << S) + Te(v, S) + 1;
        }

        function Ca(p, v) {
            return 120 < v ? v - 120 : 1 <= (S = ((S = n3[v - 1]) >> 4) * p + (8 - (15 & S))) ? S : 1;
            var S;
        }

        function Ei(p, v, S) {
            var D = X(S),
                M = p[v += 255 & D].g - 8;
            return 0 < M && (xe(S, S.u + 8), D = X(S), v += p[v].value, v += D & (1 << M) - 1), xe(S, S.u + p[v].g), p[v].value;
        }

        function rn(p, v, S) {
            return S.g += p.g, S.value += p.value << v >>> 0, r(8 >= S.g), p.g;
        }

        function V(p, v, S) {
            var D = p.xc;
            return r((v = D == 0 ? 0 : p.vc[p.md * (S >> D) + (v >> D)]) < p.Wb), p.Ya[v];
        }

        function fe(p, v, S, D) {
            var M = p.ab,
                z = p.c * v,
                G = p.C;
            v = G + v;
            var Y = S,
                re = D;
            for (D = p.Ta, S = p.Ua; 0 < M--;) {
                var ce = p.gc[M],
                    Se = G,
                    We = v,
                    ue = Y,
                    De = re,
                    Ie = (re = D, Y = S, ce.Ea);
                switch (r(Se < We), r(We <= ce.nc), ce.hc) {
                    case 2:
                        qi(ue, De, (We - Se) * Ie, re, Y);
                        break;
                    case 0:
                        var qe = Se,
                            Ve = We,
                            Xe = re,
                            Ye = Y,
                            st = (It = ce).Ea;
                        qe == 0 && (Eu(ue, De, null, null, 1, Xe, Ye), ur(ue, De + 1, 0, 0, st - 1, Xe, Ye + 1), De += st, Ye += st, ++qe);
                        for (var tt = 1 << It.b, zt = tt - 1, Tt = Re(st, It.b), Er = It.K, It = It.w + (qe >> It.b) * Tt; qe < Ve;) {
                            var zr = Er,
                                yn = It,
                                Pr = 1;
                            for (h0(ue, De, Xe, Ye - st, 1, Xe, Ye); Pr < st;) {
                                var Ot = (Pr & ~zt) + tt;
                                Ot > st && (Ot = st), (0, Iu[zr[yn++] >> 8 & 15])(ue, De + +Pr, Xe, Ye + Pr - st, Ot - Pr, Xe, Ye + Pr), Pr = Ot;
                            }
                            De += st, Ye += st, ++qe & zt || (It += Tt);
                        }
                        We != ce.nc && i(re, Y - Ie, re, Y + (We - Se - 1) * Ie, Ie);
                        break;
                    case 1:
                        for (Ie = ue, Ve = De, st = (ue = ce.Ea) - (Ye = ue & ~(Xe = (De = 1 << ce.b) - 1)), qe = Re(ue, ce.b), tt = ce.K, ce = ce.w + (Se >> ce.b) * qe; Se < We;) {
                            for (zt = tt, Tt = ce, Er = new xt(), It = Ve + Ye, zr = Ve + ue; Ve < It;) Ct(zt[Tt++], Er), Ou(Er, Ie, Ve, De, re, Y), Ve += De, Y += De;
                            Ve < zr && (Ct(zt[Tt++], Er), Ou(Er, Ie, Ve, st, re, Y), Ve += st, Y += st), ++Se & Xe || (ce += qe);
                        }
                        break;
                    case 3:
                        if (ue == re && De == Y && 0 < ce.b) {
                            for (Ve = re, ue = Ie = Y + (We - Se) * Ie - (Ye = (We - Se) * Re(ce.Ea, ce.b)), De = re, Xe = Y, qe = [], Ye = (st = Ye) - 1; 0 <= Ye; --Ye) qe[Ye] = De[Xe + Ye];
                            for (Ye = st - 1; 0 <= Ye; --Ye) Ve[ue + Ye] = qe[Ye];
                            Vh(ce, Se, We, re, Ie, re, Y);
                        } else Vh(ce, Se, We, ue, De, re, Y);
                }
                Y = D, re = S;
            }
            re != S && i(D, S, Y, re, z);
        }

        function te(p, v) {
            var S = p.V,
                D = p.Ba + p.c * p.C,
                M = v - p.C;
            if (r(v <= p.l.o), r(16 >= M), 0 < M) {
                var z = p.l,
                    G = p.Ta,
                    Y = p.Ua,
                    re = z.width;
                if (fe(p, M, S, D), M = Y = [Y], r((S = p.C) < (D = v)), r(z.v < z.va), D > z.o && (D = z.o), S < z.j) {
                    var ce = z.j - S;
                    S = z.j, M[0] += ce * re;
                }
                if (S >= D ? S = 0 : (M[0] += 4 * z.v, z.ka = S - z.j, z.U = z.va - z.v, z.T = D - S, S = 1), S) {
                    if (Y = Y[0], 11 > (S = p.ca).S) {
                        var Se = S.f.RGBA,
                            We = (D = S.S, M = z.U, z = z.T, ce = Se.eb, Se.A),
                            ue = z;
                        for (Se = Se.fb + p.Ma * Se.A; 0 < ue--;) {
                            var De = G,
                                Ie = Y,
                                qe = M,
                                Ve = ce,
                                Xe = Se;
                            switch (D) {
                                case jh:
                                    Nu(De, Ie, qe, Ve, Xe);
                                    break;
                                case Hh:
                                    ol(De, Ie, qe, Ve, Xe);
                                    break;
                                case H1:
                                    ol(De, Ie, qe, Ve, Xe), Ru(Ve, Xe, 0, qe, 1, 0);
                                    break;
                                case h2:
                                    uc(De, Ie, qe, Ve, Xe);
                                    break;
                                case Gh:
                                    Pt(De, Ie, qe, Ve, Xe, 1);
                                    break;
                                case G1:
                                    Pt(De, Ie, qe, Ve, Xe, 1), Ru(Ve, Xe, 0, qe, 1, 0);
                                    break;
                                case qh:
                                    Pt(De, Ie, qe, Ve, Xe, 0);
                                    break;
                                case Xh:
                                    Pt(De, Ie, qe, Ve, Xe, 0), Ru(Ve, Xe, 1, qe, 1, 0);
                                    break;
                                case j1:
                                    sl(De, Ie, qe, Ve, Xe);
                                    break;
                                case q1:
                                    sl(De, Ie, qe, Ve, Xe), n2(Ve, Xe, qe, 1, 0);
                                    break;
                                case d2:
                                    ll(De, Ie, qe, Ve, Xe);
                                    break;
                                default:
                                    r(0);
                            }
                            Y += re, Se += We;
                        }
                        p.Ma += z;
                    } else alert("todo:EmitRescaledRowsYUVA");
                    r(p.Ma <= S.height);
                }
            }
            p.C = v, r(p.C <= p.i);
        }

        function ae(p) {
            var v;
            if (0 < p.ua) return 0;
            for (v = 0; v < p.Wb; ++v) {
                var S = p.Ya[v].G,
                    D = p.Ya[v].H;
                if (0 < S[1][D[1] + 0].g || 0 < S[2][D[2] + 0].g || 0 < S[3][D[3] + 0].g) return 0;
            }
            return 1;
        }

        function se(p, v, S, D, M, z) {
            if (p.Z != 0) {
                var G = p.qd,
                    Y = p.rd;
                for (r(fl[p.Z] != null); v < S; ++v) fl[p.Z](G, Y, D, M, D, M, z), G = D, Y = M, M += z;
                p.qd = G, p.rd = Y;
            }
        }

        function de(p, v) {
            var S = p.l.ma,
                D = S.Z == 0 || S.Z == 1 ? p.l.j : p.C;
            if (D = p.C < D ? D : p.C, r(v <= p.l.o), v > D) {
                var M = p.l.width,
                    z = S.ca,
                    G = S.tb + M * D,
                    Y = p.V,
                    re = p.Ba + p.c * D,
                    ce = p.gc;
                r(p.ab == 1), r(ce[0].hc == 3), Xo(ce[0], D, v, Y, re, z, G), se(S, D, v, z, G, M);
            }
            p.C = p.Ma = v;
        }

        function Ne(p, v, S, D, M, z, G) {
            var Y = p.$ / D,
                re = p.$ % D,
                ce = p.m,
                Se = p.s,
                We = S + p.$,
                ue = We;
            M = S + D * M;
            var De = S + D * z,
                Ie = 280 + Se.ua,
                qe = p.Pb ? Y : 16777216,
                Ve = 0 < Se.ua ? Se.Wa : null,
                Xe = Se.wc,
                Ye = We < De ? V(Se, re, Y) : null;
            r(p.C < z), r(De <= M);
            var st = !1;
            e: for (;;) {
                for (; st || We < De;) {
                    var tt = 0;
                    if (Y >= qe) {
                        var zt = We - S;
                        r((qe = p).Pb), qe.wd = qe.m, qe.xd = zt, 0 < qe.s.ua && ze(qe.s.Wa, qe.s.vb), qe = Y + o3;
                    }
                    if (re & Xe || (Ye = V(Se, re, Y)), r(Ye != null), Ye.Qb && (v[We] = Ye.qb, st = !0), !st)
                        if (be(ce), Ye.jc) {
                            tt = ce, zt = v;
                            var Tt = We,
                                Er = Ye.pd[X(tt) & cc - 1];
                            r(Ye.jc), 256 > Er.g ? (xe(tt, tt.u + Er.g), zt[Tt] = Er.value, tt = 0) : (xe(tt, tt.u + Er.g - 256), r(256 <= Er.value), tt = Er.value), tt == 0 && (st = !0);
                        } else tt = Ei(Ye.G[0], Ye.H[0], ce);
                    if (ce.h) break;
                    if (st || 256 > tt) {
                        if (!st)
                            if (Ye.nd) v[We] = (Ye.qb | tt << 8) >>> 0;
                            else {
                                if (be(ce), st = Ei(Ye.G[1], Ye.H[1], ce), be(ce), zt = Ei(Ye.G[2], Ye.H[2], ce), Tt = Ei(Ye.G[3], Ye.H[3], ce), ce.h) break;
                                v[We] = (Tt << 24 | st << 16 | tt << 8 | zt) >>> 0;
                            }
                        if (st = !1, ++We, ++re >= D && (re = 0, ++Y, G != null && Y <= z && !(Y % 16) && G(p, Y), Ve != null))
                            for (; ue < We;) tt = v[ue++], Ve.X[(506832829 * tt & 4294967295) >>> Ve.Mb] = tt;
                    } else if (280 > tt) {
                        if (tt = Gn(tt - 256, ce), zt = Ei(Ye.G[4], Ye.H[4], ce), be(ce), zt = Ca(D, zt = Gn(zt, ce)), ce.h) break;
                        if (We - S < zt || M - We < tt) break e;
                        for (Tt = 0; Tt < tt; ++Tt) v[We + Tt] = v[We + Tt - zt];
                        for (We += tt, re += tt; re >= D;) re -= D, ++Y, G != null && Y <= z && !(Y % 16) && G(p, Y);
                        if (r(We <= M), re & Xe && (Ye = V(Se, re, Y)), Ve != null)
                            for (; ue < We;) tt = v[ue++], Ve.X[(506832829 * tt & 4294967295) >>> Ve.Mb] = tt;
                    } else {
                        if (!(tt < Ie)) break e;
                        for (st = tt - 280, r(Ve != null); ue < We;) tt = v[ue++], Ve.X[(506832829 * tt & 4294967295) >>> Ve.Mb] = tt;
                        tt = We, r(!(st >>> (zt = Ve).Xa)), v[tt] = zt.X[st], st = !0;
                    }
                    st || r(ce.h == me(ce));
                }
                if (p.Pb && ce.h && We < M) r(p.m.h), p.a = 5, p.m = p.wd, p.$ = p.xd, 0 < p.s.ua && ze(p.s.vb, p.s.Wa);
                else {
                    if (ce.h) break e;
                    G ? .(p, Y > z ? z : Y), p.a = 0, p.$ = We - S;
                }
                return 1;
            }
            return p.a = 3, 0;
        }

        function He(p) {
            r(p != null), p.vc = null, p.yc = null, p.Ya = null;
            var v = p.Wa;
            v != null && (v.X = null), p.vb = null, r(p != null);
        }

        function Me() {
            var p = new pr();
            return p == null ? null : (p.a = 0, p.xb = g2, Yr("Predictor", "VP8LPredictors"), Yr("Predictor", "VP8LPredictors_C"), Yr("PredictorAdd", "VP8LPredictorsAdd"), Yr("PredictorAdd", "VP8LPredictorsAdd_C"), qi = Gt, Ou = fr, Nu = Zt, ol = ir, sl = lr, ll = _r, uc = Gr, A.VP8LMapColor32b = qo, A.VP8LMapColor8b = Pu, p);
        }

        function Le(p, v, S, D, M) {
            var z = 1,
                G = [p],
                Y = [v],
                re = D.m,
                ce = D.s,
                Se = null,
                We = 0;
            e: for (;;) {
                if (S)
                    for (; z && Te(re, 1);) {
                        var ue = G,
                            De = Y,
                            Ie = D,
                            qe = 1,
                            Ve = Ie.m,
                            Xe = Ie.gc[Ie.ab],
                            Ye = Te(Ve, 2);
                        if (Ie.Oc & 1 << Ye) z = 0;
                        else {
                            switch (Ie.Oc |= 1 << Ye, Xe.hc = Ye, Xe.Ea = ue[0], Xe.nc = De[0], Xe.K = [null], ++Ie.ab, r(4 >= Ie.ab), Ye) {
                                case 0:
                                case 1:
                                    Xe.b = Te(Ve, 3) + 2, qe = Le(Re(Xe.Ea, Xe.b), Re(Xe.nc, Xe.b), 0, Ie, Xe.K), Xe.K = Xe.K[0];
                                    break;
                                case 3:
                                    var st, tt = Te(Ve, 8) + 1,
                                        zt = 16 < tt ? 0 : 4 < tt ? 1 : 2 < tt ? 2 : 3;
                                    if (ue[0] = Re(Xe.Ea, zt), Xe.b = zt, st = qe = Le(tt, 1, 0, Ie, Xe.K)) {
                                        var Tt, Er = tt,
                                            It = Xe,
                                            zr = 1 << (8 >> It.b),
                                            yn = a(zr);
                                        if (yn == null) st = 0;
                                        else {
                                            var Pr = It.K[0],
                                                Ot = It.w;
                                            for (yn[0] = It.K[0][0], Tt = 1; Tt < 1 * Er; ++Tt) yn[Tt] = pt(Pr[Ot + Tt], yn[Tt - 1]);
                                            for (; Tt < 4 * zr; ++Tt) yn[Tt] = 0;
                                            It.K[0] = null, It.K[0] = yn, st = 1;
                                        }
                                    }
                                    qe = st;
                                    break;
                                case 2:
                                    break;
                                default:
                                    r(0);
                            }
                            z = qe;
                        }
                    }
                if (G = G[0], Y = Y[0], z && Te(re, 1) && !(z = 1 <= (We = Te(re, 4)) && 11 >= We)) {
                    D.a = 3;
                    break e;
                }
                var mt;
                if (mt = z) t: {
                    var Ki, br, jr, Ai = D,
                        Rn = G,
                        ca = Y,
                        Vi = We,
                        qn = S,
                        ua = Ai.m,
                        bn = Ai.s,
                        Xr = [null],
                        oi = 1,
                        zi = 0,
                        si = a3[Vi];r: for (;;) {
                        if (qn && Te(ua, 1)) {
                            var Mn = Te(ua, 3) + 2,
                                To = Re(Rn, Mn),
                                Yi = Re(ca, Mn),
                                Aa = To * Yi;
                            if (!Le(To, Yi, 0, Ai, Xr)) break r;
                            for (Xr = Xr[0], bn.xc = Mn, Ki = 0; Ki < Aa; ++Ki) {
                                var vi = Xr[Ki] >> 8 & 65535;
                                Xr[Ki] = vi, vi >= oi && (oi = vi + 1);
                            }
                        }
                        if (ua.h) break r;
                        for (br = 0; 5 > br; ++br) {
                            var wn = p2[br];
                            !br && 0 < Vi && (wn += 1 << Vi), zi < wn && (zi = wn);
                        }
                        var Ra = o(oi * si, W),
                            fa = oi,
                            Ma = o(fa, U);
                        if (Ma == null) var Ba = null;
                        else r(65536 >= fa), Ba = Ma;
                        var Ta = a(zi);
                        if (Ba == null || Ta == null || Ra == null) {
                            Ai.a = 1;
                            break r;
                        }
                        var Ua = Ra;
                        for (Ki = jr = 0; Ki < oi; ++Ki) {
                            var Si = Ba[Ki],
                                Va = Si.G,
                                Do = Si.H,
                                hc = 0,
                                Os = 1,
                                Bn = 0;
                            for (br = 0; 5 > br; ++br) {
                                wn = p2[br], Va[br] = Ua, Do[br] = jr, !br && 0 < Vi && (wn += 1 << Vi);
                                n: {
                                    var Jh, Z1 = wn,
                                        Qh = Ai,
                                        Uu = Ta,
                                        T3 = Ua,
                                        D3 = jr,
                                        J1 = 0,
                                        hl = Qh.m,
                                        k3 = Te(hl, 1);
                                    if (n(Uu, 0, 0, Z1), k3) {
                                        var F3 = Te(hl, 1) + 1,
                                            E3 = Te(hl, 1),
                                            A2 = Te(hl, E3 == 0 ? 1 : 8);
                                        Uu[A2] = 1, F3 == 2 && (Uu[A2 = Te(hl, 8)] = 1);
                                        var $h = 1;
                                    } else {
                                        var T2 = a(19),
                                            D2 = Te(hl, 4) + 4;
                                        if (19 < D2) {
                                            Qh.a = 3;
                                            var ed = 0;
                                            break n;
                                        }
                                        for (Jh = 0; Jh < D2; ++Jh) T2[i3[Jh]] = Te(hl, 3);
                                        var Q1 = void 0,
                                            Vu = void 0,
                                            k2 = Qh,
                                            P3 = T2,
                                            td = Z1,
                                            F2 = Uu,
                                            $1 = 0,
                                            dl = k2.m,
                                            E2 = 8,
                                            P2 = o(128, W);
                                        i: for (; F(P2, 0, 7, P3, 19);) {
                                            if (Te(dl, 1)) {
                                                var I3 = 2 + 2 * Te(dl, 3);
                                                if ((Q1 = 2 + Te(dl, I3)) > td) break i;
                                            } else Q1 = td;
                                            for (Vu = 0; Vu < td && Q1--;) {
                                                be(dl);
                                                var I2 = P2[0 + (127 & X(dl))];
                                                xe(dl, dl.u + I2.g);
                                                var p0 = I2.value;
                                                if (16 > p0) F2[Vu++] = p0, p0 != 0 && (E2 = p0);
                                                else {
                                                    var O3 = p0 == 16,
                                                        O2 = p0 - 16,
                                                        N3 = t3[O2],
                                                        N2 = Te(dl, e3[O2]) + N3;
                                                    if (Vu + N2 > td) break i;
                                                    for (var L3 = O3 ? E2 : 0; 0 < N2--;) F2[Vu++] = L3;
                                                }
                                            }
                                            $1 = 1;
                                            break i;
                                        }
                                        $1 || (k2.a = 3), $h = $1;
                                    }($h = $h && !hl.h) && (J1 = F(T3, D3, 8, Uu, Z1)),
                                    $h && J1 != 0 ? ed = J1 : (Qh.a = 3, ed = 0);
                                }
                                if (ed == 0) break r;
                                if (Os && r3[br] == 1 && (Os = Ua[jr].g == 0), hc += Ua[jr].g, jr += ed, 3 >= br) {
                                    var zu, em = Ta[0];
                                    for (zu = 1; zu < wn; ++zu) Ta[zu] > em && (em = Ta[zu]);
                                    Bn += em;
                                }
                            }
                            if (Si.nd = Os, Si.Qb = 0, Os && (Si.qb = (Va[3][Do[3] + 0].value << 24 | Va[1][Do[1] + 0].value << 16 | Va[2][Do[2] + 0].value) >>> 0, hc == 0 && 256 > Va[0][Do[0] + 0].value && (Si.Qb = 1, Si.qb += Va[0][Do[0] + 0].value << 8)), Si.jc = !Si.Qb && 6 > Bn, Si.jc) {
                                var rd, Ns = Si;
                                for (rd = 0; rd < cc; ++rd) {
                                    var pl = rd,
                                        ml = Ns.pd[pl],
                                        id = Ns.G[0][Ns.H[0] + pl];
                                    256 <= id.value ? (ml.g = id.g + 256, ml.value = id.value) : (ml.g = 0, ml.value = 0, pl >>= rn(id, 8, ml), pl >>= rn(Ns.G[1][Ns.H[1] + pl], 16, ml), pl >>= rn(Ns.G[2][Ns.H[2] + pl], 0, ml), rn(Ns.G[3][Ns.H[3] + pl], 24, ml));
                                }
                            }
                        }
                        bn.vc = Xr, bn.Wb = oi, bn.Ya = Ba, bn.yc = Ra, mt = 1;
                        break t;
                    }
                    mt = 0;
                }
                if (!(z = mt)) {
                    D.a = 3;
                    break e;
                }
                if (0 < We) {
                    if (ce.ua = 1 << We, !q(ce.Wa, We)) {
                        D.a = 1, z = 0;
                        break e;
                    }
                } else ce.ua = 0;
                var tm = D,
                    L2 = G,
                    R3 = Y,
                    rm = tm.s,
                    im = rm.xc;
                if (tm.c = L2, tm.i = R3, rm.md = Re(L2, im), rm.wc = im == 0 ? -1 : (1 << im) - 1, S) {
                    D.xb = d3;
                    break e;
                }
                if ((Se = a(G * Y)) == null) {
                    D.a = 1, z = 0;
                    break e;
                }
                z = (z = Ne(D, Se, 0, G, Y, Y, null)) && !re.h;
                break e;
            }
            return z ? (M != null ? M[0] = Se : (r(Se == null), r(S)), D.$ = 0, S || He(ce)) : He(ce), z;
        }

        function Be(p, v) {
            var S = p.c * p.i,
                D = S + v + 16 * v;
            return r(p.c <= v), p.V = a(D), p.V == null ? (p.Ta = null, p.Ua = 0, p.a = 1, 0) : (p.Ta = p.V, p.Ua = p.Ba + S + v, 1);
        }

        function at(p, v) {
            var S = p.C,
                D = v - S,
                M = p.V,
                z = p.Ba + p.c * S;
            for (r(v <= p.l.o); 0 < D;) {
                var G = 16 < D ? 16 : D,
                    Y = p.l.ma,
                    re = p.l.width,
                    ce = re * G,
                    Se = Y.ca,
                    We = Y.tb + re * S,
                    ue = p.Ta,
                    De = p.Ua;
                fe(p, G, M, z), o2(ue, De, Se, We, ce), se(Y, S, S + G, Se, We, re), D -= G, M += G * p.c, S += G;
            }
            r(S == v), p.C = p.Ma = v;
        }

        function lt() {
            this.ub = this.yd = this.td = this.Rb = 0;
        }

        function _t() {
            this.Kd = this.Ld = this.Ud = this.Td = this.i = this.c = 0;
        }

        function ht() {
            this.Fb = this.Bb = this.Cb = 0, this.Zb = a(4), this.Lb = a(4);
        }

        function ot() {
            this.Yb = function() {
                var p = [];
                return function v(S, D, M) {
                    for (var z = M[D], G = 0; G < z && (S.push(M.length > D + 1 ? [] : 0), !(M.length < D + 1)); G++) v(S[G], D + 1, M);
                }(p, 0, [3, 11]), p;
            }();
        }

        function nr() {
            this.jb = a(3), this.Wc = s([4, 8], ot), this.Xc = s([4, 17], ot);
        }

        function Jr() {
            this.Pc = this.wb = this.Tb = this.zd = 0, this.vd = new a(4), this.od = new a(4);
        }

        function mi() {
            this.ld = this.La = this.dd = this.tc = 0;
        }

        function bi() {
            this.Na = this.la = 0;
        }

        function Fn() {
            this.Sc = [0, 0], this.Eb = [0, 0], this.Qc = [0, 0], this.ia = this.lc = 0;
        }

        function wo() {
            this.ad = a(384), this.Za = 0, this.Ob = a(16), this.$b = this.Ad = this.ia = this.Gc = this.Hc = this.Dd = 0;
        }

        function jo() {
            this.uc = this.M = this.Nb = 0, this.wa = Array(new mi()), this.Y = 0, this.ya = Array(new wo()), this.aa = 0, this.l = new a0();
        }

        function to() {
            this.y = a(16), this.f = a(8), this.ea = a(8);
        }

        function el() {
            this.cb = this.a = 0, this.sc = "", this.m = new O(), this.Od = new lt(), this.Kc = new _t(), this.ed = new Jr(), this.Qa = new ht(), this.Ic = this.$c = this.Aa = 0, this.D = new jo(), this.Xb = this.Va = this.Hb = this.zb = this.yb = this.Ub = this.za = 0, this.Jc = o(8, O), this.ia = 0, this.pb = o(4, Fn), this.Pa = new nr(), this.Bd = this.kc = 0, this.Ac = [], this.Bc = 0, this.zc = [0, 0, 0, 0], this.Gd = Array(new to()), this.Hd = 0, this.rb = Array(new bi()), this.sb = 0, this.wa = Array(new mi()), this.Y = 0, this.oc = [], this.pc = 0, this.sa = [], this.ta = 0, this.qa = [], this.ra = 0, this.Ha = [], this.B = this.R = this.Ia = 0, this.Ec = [], this.M = this.ja = this.Vb = this.Fc = 0, this.ya = Array(new wo()), this.L = this.aa = 0, this.gd = s([4, 2], mi), this.ga = null, this.Fa = [], this.Cc = this.qc = this.P = 0, this.Gb = [], this.Uc = 0, this.mb = [], this.nb = 0, this.rc = [], this.Ga = this.Vc = 0;
        }

        function nn(p, v) {
            return 0 > p ? 0 : p > v ? v : p;
        }

        function a0() {
            this.T = this.U = this.ka = this.height = this.width = 0, this.y = [], this.f = [], this.ea = [], this.Rc = this.fa = this.W = this.N = this.O = 0, this.ma = "void", this.put = "VP8IoPutHook", this.ac = "VP8IoSetupHook", this.bc = "VP8IoTeardownHook", this.ha = this.Kb = 0, this.data = [], this.hb = this.ib = this.da = this.o = this.j = this.va = this.v = this.Da = this.ob = this.w = 0, this.F = [], this.J = 0;
        }

        function D1() {
            var p = new el();
            return p != null && (p.a = 0, p.sc = "OK", p.cb = 0, p.Xb = 0, Mu || (Mu = o0)), p;
        }

        function an(p, v, S) {
            return p.a == 0 && (p.a = v, p.sc = S, p.cb = 0), 0;
        }

        function kh(p, v, S) {
            return 3 <= S && p[v + 0] == 157 && p[v + 1] == 1 && p[v + 2] == 42;
        }

        function Ho(p, v) {
            if (p == null) return 0;
            if (p.a = 0, p.sc = "OK", v == null) return an(p, 2, "null VP8Io passed to VP8GetHeaders()");
            var S = v.data,
                D = v.w,
                M = v.ha;
            if (4 > M) return an(p, 7, "Truncated header.");
            var z = S[D + 0] | S[D + 1] << 8 | S[D + 2] << 16,
                G = p.Od;
            if (G.Rb = !(1 & z), G.td = z >> 1 & 7, G.yd = z >> 4 & 1, G.ub = z >> 5, 3 < G.td) return an(p, 3, "Incorrect keyframe parameters.");
            if (!G.yd) return an(p, 4, "Frame not displayable.");
            D += 3, M -= 3;
            var Y = p.Kc;
            if (G.Rb) {
                if (7 > M) return an(p, 7, "cannot parse picture header");
                if (!kh(S, D, M)) return an(p, 3, "Bad code word");
                Y.c = 16383 & (S[D + 4] << 8 | S[D + 3]), Y.Td = S[D + 4] >> 6, Y.i = 16383 & (S[D + 6] << 8 | S[D + 5]), Y.Ud = S[D + 6] >> 6, D += 7, M -= 7, p.za = Y.c + 15 >> 4, p.Ub = Y.i + 15 >> 4, v.width = Y.c, v.height = Y.i, v.Da = 0, v.j = 0, v.v = 0, v.va = v.width, v.o = v.height, v.da = 0, v.ib = v.width, v.hb = v.height, v.U = v.width, v.T = v.height, n((z = p.Pa).jb, 0, 255, z.jb.length), r((z = p.Qa) != null), z.Cb = 0, z.Bb = 0, z.Fb = 1, n(z.Zb, 0, 0, z.Zb.length), n(z.Lb, 0, 0, z.Lb);
            }
            if (G.ub > M) return an(p, 7, "bad partition length");
            le(z = p.m, S, D, G.ub), D += G.ub, M -= G.ub, G.Rb && (Y.Ld = ne(z), Y.Kd = ne(z)), Y = p.Qa;
            var re, ce = p.Pa;
            if (r(z != null), r(Y != null), Y.Cb = ne(z), Y.Cb) {
                if (Y.Bb = ne(z), ne(z)) {
                    for (Y.Fb = ne(z), re = 0; 4 > re; ++re) Y.Zb[re] = ne(z) ? pe(z, 7) : 0;
                    for (re = 0; 4 > re; ++re) Y.Lb[re] = ne(z) ? pe(z, 6) : 0;
                }
                if (Y.Bb)
                    for (re = 0; 3 > re; ++re) ce.jb[re] = ne(z) ? H(z, 8) : 255;
            } else Y.Bb = 0;
            if (z.Ka) return an(p, 3, "cannot parse segment header");
            if ((Y = p.ed).zd = ne(z), Y.Tb = H(z, 6), Y.wb = H(z, 3), Y.Pc = ne(z), Y.Pc && ne(z)) {
                for (ce = 0; 4 > ce; ++ce) ne(z) && (Y.vd[ce] = pe(z, 6));
                for (ce = 0; 4 > ce; ++ce) ne(z) && (Y.od[ce] = pe(z, 6));
            }
            if (p.L = Y.Tb == 0 ? 0 : Y.zd ? 1 : 2, z.Ka) return an(p, 3, "cannot parse filter header");
            var Se = M;
            if (M = re = D, D = re + Se, Y = Se, p.Xb = (1 << H(p.m, 2)) - 1, Se < 3 * (ce = p.Xb)) S = 7;
            else {
                for (re += 3 * ce, Y -= 3 * ce, Se = 0; Se < ce; ++Se) {
                    var We = S[M + 0] | S[M + 1] << 8 | S[M + 2] << 16;
                    We > Y && (We = Y), le(p.Jc[+Se], S, re, We), re += We, Y -= We, M += 3;
                }
                le(p.Jc[+ce], S, re, Y), S = re < D ? 0 : 5;
            }
            if (S != 0) return an(p, S, "cannot parse partitions");
            for (S = H(re = p.m, 7), M = ne(re) ? pe(re, 4) : 0, D = ne(re) ? pe(re, 4) : 0, Y = ne(re) ? pe(re, 4) : 0, ce = ne(re) ? pe(re, 4) : 0, re = ne(re) ? pe(re, 4) : 0, Se = p.Qa, We = 0; 4 > We; ++We) {
                if (Se.Cb) {
                    var ue = Se.Zb[We];
                    Se.Fb || (ue += S);
                } else {
                    if (0 < We) {
                        p.pb[We] = p.pb[0];
                        continue;
                    }
                    ue = S;
                }
                var De = p.pb[We];
                De.Sc[0] = X1[nn(ue + M, 127)], De.Sc[1] = K1[nn(ue + 0, 127)], De.Eb[0] = 2 * X1[nn(ue + D, 127)], De.Eb[1] = 101581 * K1[nn(ue + Y, 127)] >> 16, 8 > De.Eb[1] && (De.Eb[1] = 8), De.Qc[0] = X1[nn(ue + ce, 117)], De.Qc[1] = K1[nn(ue + re, 127)], De.lc = ue + re;
            }
            if (!G.Rb) return an(p, 4, "Not a key frame.");
            for (ne(z), G = p.Pa, S = 0; 4 > S; ++S) {
                for (M = 0; 8 > M; ++M)
                    for (D = 0; 3 > D; ++D)
                        for (Y = 0; 11 > Y; ++Y) ce = Z(z, f3[S][M][D][Y]) ? H(z, 8) : c3[S][M][D][Y], G.Wc[S][M].Yb[D][Y] = ce;
                for (M = 0; 17 > M; ++M) G.Xc[S][M] = G.Wc[S][h3[M]];
            }
            return p.kc = ne(z), p.kc && (p.Bd = H(z, 8)), p.cb = 1;
        }

        function o0(p, v, S, D, M, z, G) {
            var Y = v[M].Yb[S];
            for (S = 0; 16 > M; ++M) {
                if (!Z(p, Y[S + 0])) return M;
                for (; !Z(p, Y[S + 1]);)
                    if (Y = v[++M].Yb[0], S = 0, M == 16) return 16;
                var re = v[M + 1].Yb;
                if (Z(p, Y[S + 2])) {
                    var ce = p,
                        Se = 0;
                    if (Z(ce, (ue = Y)[(We = S) + 3])) {
                        if (Z(ce, ue[We + 6])) {
                            for (Y = 0, We = 2 * (Se = Z(ce, ue[We + 8])) + (ue = Z(ce, ue[We + 9 + Se])), Se = 0, ue = s3[We]; ue[Y]; ++Y) Se += Se + Z(ce, ue[Y]);
                            Se += 3 + (8 << We);
                        } else Z(ce, ue[We + 7]) ? (Se = 7 + 2 * Z(ce, 165), Se += Z(ce, 145)) : Se = 5 + Z(ce, 159);
                    } else Se = Z(ce, ue[We + 4]) ? 3 + Z(ce, ue[We + 5]) : 2;
                    Y = re[2];
                } else Se = 1, Y = re[1];
                re = G + l3[M], 0 > (ce = p).b && B(ce);
                var We, ue = ce.b,
                    De = (We = ce.Ca >> 1) - (ce.I >> ue) >> 31;
                --ce.b, ce.Ca += De, ce.Ca |= 1, ce.I -= (We + 1 & De) << ue, z[re] = ((Se ^ De) - De) * D[(0 < M) + 0];
            }
            return 16;
        }

        function Fh(p) {
            var v = p.rb[p.sb - 1];
            v.la = 0, v.Na = 0, n(p.zc, 0, 0, p.zc.length), p.ja = 0;
        }

        function ro(p, v, S, D, M) {
            M = p[v + S + 32 * D] + (M >> 3), p[v + S + 32 * D] = -256 & M ? 0 > M ? 0 : 255 : M;
        }

        function vn(p, v, S, D, M, z) {
            ro(p, v, 0, S, D + M), ro(p, v, 1, S, D + z), ro(p, v, 2, S, D - z), ro(p, v, 3, S, D - M);
        }

        function ys(p) {
            return (20091 * p >> 16) + p;
        }

        function Eh(p, v, S, D) {
            var M, z = 0,
                G = a(16);
            for (M = 0; 4 > M; ++M) {
                var Y = p[v + 0] + p[v + 8],
                    re = p[v + 0] - p[v + 8],
                    ce = (35468 * p[v + 4] >> 16) - ys(p[v + 12]),
                    Se = ys(p[v + 4]) + (35468 * p[v + 12] >> 16);
                G[z + 0] = Y + Se, G[z + 1] = re + ce, G[z + 2] = re - ce, G[z + 3] = Y - Se, z += 4, v++;
            }
            for (M = z = 0; 4 > M; ++M) Y = (p = G[z + 0] + 4) + G[z + 8], re = p - G[z + 8], ce = (35468 * G[z + 4] >> 16) - ys(G[z + 12]), ro(S, D, 0, 0, Y + (Se = ys(G[z + 4]) + (35468 * G[z + 12] >> 16))), ro(S, D, 1, 0, re + ce), ro(S, D, 2, 0, re - ce), ro(S, D, 3, 0, Y - Se), z++, D += 32;
        }

        function k1(p, v, S, D) {
            var M = p[v + 0] + 4,
                z = 35468 * p[v + 4] >> 16,
                G = ys(p[v + 4]),
                Y = 35468 * p[v + 1] >> 16;
            vn(S, D, 0, M + G, p = ys(p[v + 1]), Y), vn(S, D, 1, M + z, p, Y), vn(S, D, 2, M - z, p, Y), vn(S, D, 3, M - G, p, Y);
        }

        function F1(p, v, S, D, M) {
            Eh(p, v, S, D), M && Eh(p, v + 16, S, D + 4);
        }

        function Go(p, v, S, D) {
            fc(p, v + 0, S, D, 1), fc(p, v + 32, S, D + 128, 1);
        }

        function Ph(p, v, S, D) {
            var M;
            for (p = p[v + 0] + 4, M = 0; 4 > M; ++M)
                for (v = 0; 4 > v; ++v) ro(S, D, v, M, p);
        }

        function Ih(p, v, S, D) {
            p[v + 0] && ri(p, v + 0, S, D), p[v + 16] && ri(p, v + 16, S, D + 4), p[v + 32] && ri(p, v + 32, S, D + 128), p[v + 48] && ri(p, v + 48, S, D + 128 + 4);
        }

        function s0(p, v, S, D) {
            var M, z = a(16);
            for (M = 0; 4 > M; ++M) {
                var G = p[v + 0 + M] + p[v + 12 + M],
                    Y = p[v + 4 + M] + p[v + 8 + M],
                    re = p[v + 4 + M] - p[v + 8 + M],
                    ce = p[v + 0 + M] - p[v + 12 + M];
                z[0 + M] = G + Y, z[8 + M] = G - Y, z[4 + M] = ce + re, z[12 + M] = ce - re;
            }
            for (M = 0; 4 > M; ++M) G = (p = z[0 + 4 * M] + 3) + z[3 + 4 * M], Y = z[1 + 4 * M] + z[2 + 4 * M], re = z[1 + 4 * M] - z[2 + 4 * M], ce = p - z[3 + 4 * M], S[D + 0] = G + Y >> 3, S[D + 16] = ce + re >> 3, S[D + 32] = G - Y >> 3, S[D + 48] = ce - re >> 3, D += 64;
        }

        function $l(p, v, S) {
            var D, M = v - 32,
                z = La,
                G = 255 - p[M - 1];
            for (D = 0; D < S; ++D) {
                var Y, re = z,
                    ce = G + p[v - 1];
                for (Y = 0; Y < S; ++Y) p[v + Y] = re[ce + p[M + Y]];
                v += 32;
            }
        }

        function E1(p, v) {
            $l(p, v, 4);
        }

        function P1(p, v) {
            $l(p, v, 8);
        }

        function I1(p, v) {
            $l(p, v, 16);
        }

        function vu(p, v) {
            var S;
            for (S = 0; 16 > S; ++S) i(p, v + 32 * S, p, v - 32, 16);
        }

        function Oh(p, v) {
            var S;
            for (S = 16; 0 < S; --S) n(p, v, p[v - 1], 16), v += 32;
        }

        function So(p, v, S) {
            var D;
            for (D = 0; 16 > D; ++D) n(v, S + 32 * D, p, 16);
        }

        function O1(p, v) {
            var S, D = 16;
            for (S = 0; 16 > S; ++S) D += p[v - 1 + 32 * S] + p[v + S - 32];
            So(D >> 5, p, v);
        }

        function ec(p, v) {
            var S, D = 8;
            for (S = 0; 16 > S; ++S) D += p[v - 1 + 32 * S];
            So(D >> 4, p, v);
        }

        function xu(p, v) {
            var S, D = 8;
            for (S = 0; 16 > S; ++S) D += p[v + S - 32];
            So(D >> 4, p, v);
        }

        function N1(p, v) {
            So(128, p, v);
        }

        function gr(p, v, S) {
            return p + 2 * v + S + 2 >> 2;
        }

        function L1(p, v) {
            var S, D = v - 32;
            for (D = new Uint8Array([gr(p[D - 1], p[D + 0], p[D + 1]), gr(p[D + 0], p[D + 1], p[D + 2]), gr(p[D + 1], p[D + 2], p[D + 3]), gr(p[D + 2], p[D + 3], p[D + 4])]), S = 0; 4 > S; ++S) i(p, v + 32 * S, D, 0, D.length);
        }

        function R1(p, v) {
            var S = p[v - 1],
                D = p[v - 1 + 32],
                M = p[v - 1 + 64],
                z = p[v - 1 + 96];
            J(p, v + 0, 16843009 * gr(p[v - 1 - 32], S, D)), J(p, v + 32, 16843009 * gr(S, D, M)), J(p, v + 64, 16843009 * gr(D, M, z)), J(p, v + 96, 16843009 * gr(M, z, z));
        }

        function M1(p, v) {
            var S, D = 4;
            for (S = 0; 4 > S; ++S) D += p[v + S - 32] + p[v - 1 + 32 * S];
            for (D >>= 3, S = 0; 4 > S; ++S) n(p, v + 32 * S, D, 4);
        }

        function bs(p, v) {
            var S = p[v - 1 + 0],
                D = p[v - 1 + 32],
                M = p[v - 1 + 64],
                z = p[v - 1 - 32],
                G = p[v + 0 - 32],
                Y = p[v + 1 - 32],
                re = p[v + 2 - 32],
                ce = p[v + 3 - 32];
            p[v + 0 + 96] = gr(D, M, p[v - 1 + 96]), p[v + 1 + 96] = p[v + 0 + 64] = gr(S, D, M), p[v + 2 + 96] = p[v + 1 + 64] = p[v + 0 + 32] = gr(z, S, D), p[v + 3 + 96] = p[v + 2 + 64] = p[v + 1 + 32] = p[v + 0 + 0] = gr(G, z, S), p[v + 3 + 64] = p[v + 2 + 32] = p[v + 1 + 0] = gr(Y, G, z), p[v + 3 + 32] = p[v + 2 + 0] = gr(re, Y, G), p[v + 3 + 0] = gr(ce, re, Y);
        }

        function ws(p, v) {
            var S = p[v + 1 - 32],
                D = p[v + 2 - 32],
                M = p[v + 3 - 32],
                z = p[v + 4 - 32],
                G = p[v + 5 - 32],
                Y = p[v + 6 - 32],
                re = p[v + 7 - 32];
            p[v + 0 + 0] = gr(p[v + 0 - 32], S, D), p[v + 1 + 0] = p[v + 0 + 32] = gr(S, D, M), p[v + 2 + 0] = p[v + 1 + 32] = p[v + 0 + 64] = gr(D, M, z), p[v + 3 + 0] = p[v + 2 + 32] = p[v + 1 + 64] = p[v + 0 + 96] = gr(M, z, G), p[v + 3 + 32] = p[v + 2 + 64] = p[v + 1 + 96] = gr(z, G, Y), p[v + 3 + 64] = p[v + 2 + 96] = gr(G, Y, re), p[v + 3 + 96] = gr(Y, re, re);
        }

        function B1(p, v) {
            var S = p[v - 1 + 0],
                D = p[v - 1 + 32],
                M = p[v - 1 + 64],
                z = p[v - 1 - 32],
                G = p[v + 0 - 32],
                Y = p[v + 1 - 32],
                re = p[v + 2 - 32],
                ce = p[v + 3 - 32];
            p[v + 0 + 0] = p[v + 1 + 64] = z + G + 1 >> 1, p[v + 1 + 0] = p[v + 2 + 64] = G + Y + 1 >> 1, p[v + 2 + 0] = p[v + 3 + 64] = Y + re + 1 >> 1, p[v + 3 + 0] = re + ce + 1 >> 1, p[v + 0 + 96] = gr(M, D, S), p[v + 0 + 64] = gr(D, S, z), p[v + 0 + 32] = p[v + 1 + 96] = gr(S, z, G), p[v + 1 + 32] = p[v + 2 + 96] = gr(z, G, Y), p[v + 2 + 32] = p[v + 3 + 96] = gr(G, Y, re), p[v + 3 + 32] = gr(Y, re, ce);
        }

        function U1(p, v) {
            var S = p[v + 0 - 32],
                D = p[v + 1 - 32],
                M = p[v + 2 - 32],
                z = p[v + 3 - 32],
                G = p[v + 4 - 32],
                Y = p[v + 5 - 32],
                re = p[v + 6 - 32],
                ce = p[v + 7 - 32];
            p[v + 0 + 0] = S + D + 1 >> 1, p[v + 1 + 0] = p[v + 0 + 64] = D + M + 1 >> 1, p[v + 2 + 0] = p[v + 1 + 64] = M + z + 1 >> 1, p[v + 3 + 0] = p[v + 2 + 64] = z + G + 1 >> 1, p[v + 0 + 32] = gr(S, D, M), p[v + 1 + 32] = p[v + 0 + 96] = gr(D, M, z), p[v + 2 + 32] = p[v + 1 + 96] = gr(M, z, G), p[v + 3 + 32] = p[v + 2 + 96] = gr(z, G, Y), p[v + 3 + 64] = gr(G, Y, re), p[v + 3 + 96] = gr(Y, re, ce);
        }

        function l0(p, v) {
            var S = p[v - 1 + 0],
                D = p[v - 1 + 32],
                M = p[v - 1 + 64],
                z = p[v - 1 + 96];
            p[v + 0 + 0] = S + D + 1 >> 1, p[v + 2 + 0] = p[v + 0 + 32] = D + M + 1 >> 1, p[v + 2 + 32] = p[v + 0 + 64] = M + z + 1 >> 1, p[v + 1 + 0] = gr(S, D, M), p[v + 3 + 0] = p[v + 1 + 32] = gr(D, M, z), p[v + 3 + 32] = p[v + 1 + 64] = gr(M, z, z), p[v + 3 + 64] = p[v + 2 + 64] = p[v + 0 + 96] = p[v + 1 + 96] = p[v + 2 + 96] = p[v + 3 + 96] = z;
        }

        function _u(p, v) {
            var S = p[v - 1 + 0],
                D = p[v - 1 + 32],
                M = p[v - 1 + 64],
                z = p[v - 1 + 96],
                G = p[v - 1 - 32],
                Y = p[v + 0 - 32],
                re = p[v + 1 - 32],
                ce = p[v + 2 - 32];
            p[v + 0 + 0] = p[v + 2 + 32] = S + G + 1 >> 1, p[v + 0 + 32] = p[v + 2 + 64] = D + S + 1 >> 1, p[v + 0 + 64] = p[v + 2 + 96] = M + D + 1 >> 1, p[v + 0 + 96] = z + M + 1 >> 1, p[v + 3 + 0] = gr(Y, re, ce), p[v + 2 + 0] = gr(G, Y, re), p[v + 1 + 0] = p[v + 3 + 32] = gr(S, G, Y), p[v + 1 + 32] = p[v + 3 + 64] = gr(D, S, G), p[v + 1 + 64] = p[v + 3 + 96] = gr(M, D, S), p[v + 1 + 96] = gr(z, M, D);
        }

        function tc(p, v) {
            var S;
            for (S = 0; 8 > S; ++S) i(p, v + 32 * S, p, v - 32, 8);
        }

        function V1(p, v) {
            var S;
            for (S = 0; 8 > S; ++S) n(p, v, p[v - 1], 8), v += 32;
        }

        function Ss(p, v, S) {
            var D;
            for (D = 0; 8 > D; ++D) n(v, S + 32 * D, p, 8);
        }

        function z1(p, v) {
            var S, D = 8;
            for (S = 0; 8 > S; ++S) D += p[v + S - 32] + p[v - 1 + 32 * S];
            Ss(D >> 4, p, v);
        }

        function yu(p, v) {
            var S, D = 4;
            for (S = 0; 8 > S; ++S) D += p[v + S - 32];
            Ss(D >> 3, p, v);
        }

        function bu(p, v) {
            var S, D = 4;
            for (S = 0; 8 > S; ++S) D += p[v - 1 + 32 * S];
            Ss(D >> 3, p, v);
        }

        function Nh(p, v) {
            Ss(128, p, v);
        }

        function Cs(p, v, S) {
            var D = p[v - S],
                M = p[v + 0],
                z = 3 * (M - D) + W1[1020 + p[v - 2 * S] - p[v + S]],
                G = Wh[112 + (z + 4 >> 3)];
            p[v - S] = La[255 + D + Wh[112 + (z + 3 >> 3)]], p[v + 0] = La[255 + M - G];
        }

        function wu(p, v, S, D) {
            var M = p[v + 0],
                z = p[v + S];
            return ao[255 + p[v - 2 * S] - p[v - S]] > D || ao[255 + z - M] > D;
        }

        function c0(p, v, S, D) {
            return 4 * ao[255 + p[v - S] - p[v + 0]] + ao[255 + p[v - 2 * S] - p[v + S]] <= D;
        }

        function Su(p, v, S, D, M) {
            var z = p[v - 3 * S],
                G = p[v - 2 * S],
                Y = p[v - S],
                re = p[v + 0],
                ce = p[v + S],
                Se = p[v + 2 * S],
                We = p[v + 3 * S];
            return 4 * ao[255 + Y - re] + ao[255 + G - ce] > D ? 0 : ao[255 + p[v - 4 * S] - z] <= M && ao[255 + z - G] <= M && ao[255 + G - Y] <= M && ao[255 + We - Se] <= M && ao[255 + Se - ce] <= M && ao[255 + ce - re] <= M;
        }

        function rc(p, v, S, D) {
            var M = 2 * D + 1;
            for (D = 0; 16 > D; ++D) c0(p, v + D, S, M) && Cs(p, v + D, S);
        }

        function Cu(p, v, S, D) {
            var M = 2 * D + 1;
            for (D = 0; 16 > D; ++D) c0(p, v + D * S, 1, M) && Cs(p, v + D * S, 1);
        }

        function Lh(p, v, S, D) {
            var M;
            for (M = 3; 0 < M; --M) rc(p, v += 4 * S, S, D);
        }

        function Rh(p, v, S, D) {
            var M;
            for (M = 3; 0 < M; --M) Cu(p, v += 4, S, D);
        }

        function As(p, v, S, D, M, z, G, Y) {
            for (z = 2 * z + 1; 0 < M--;) {
                if (Su(p, v, S, z, G))
                    if (wu(p, v, S, Y)) Cs(p, v, S);
                    else {
                        var re = p,
                            ce = v,
                            Se = S,
                            We = re[ce - 2 * Se],
                            ue = re[ce - Se],
                            De = re[ce + 0],
                            Ie = re[ce + Se],
                            qe = re[ce + 2 * Se],
                            Ve = 27 * (Ye = W1[1020 + 3 * (De - ue) + W1[1020 + We - Ie]]) + 63 >> 7,
                            Xe = 18 * Ye + 63 >> 7,
                            Ye = 9 * Ye + 63 >> 7;
                        re[ce - 3 * Se] = La[255 + re[ce - 3 * Se] + Ye], re[ce - 2 * Se] = La[255 + We + Xe], re[ce - Se] = La[255 + ue + Ve], re[ce + 0] = La[255 + De - Ve], re[ce + Se] = La[255 + Ie - Xe], re[ce + 2 * Se] = La[255 + qe - Ye];
                    }
                v += D;
            }
        }

        function Ts(p, v, S, D, M, z, G, Y) {
            for (z = 2 * z + 1; 0 < M--;) {
                if (Su(p, v, S, z, G))
                    if (wu(p, v, S, Y)) Cs(p, v, S);
                    else {
                        var re = p,
                            ce = v,
                            Se = S,
                            We = re[ce - Se],
                            ue = re[ce + 0],
                            De = re[ce + Se],
                            Ie = Wh[112 + (4 + (qe = 3 * (ue - We)) >> 3)],
                            qe = Wh[112 + (qe + 3 >> 3)],
                            Ve = Ie + 1 >> 1;
                        re[ce - 2 * Se] = La[255 + re[ce - 2 * Se] + Ve], re[ce - Se] = La[255 + We + qe], re[ce + 0] = La[255 + ue - Ie], re[ce + Se] = La[255 + De - Ve];
                    }
                v += D;
            }
        }

        function Mh(p, v, S, D, M, z) {
            As(p, v, S, 1, 16, D, M, z);
        }

        function ic(p, v, S, D, M, z) {
            As(p, v, 1, S, 16, D, M, z);
        }

        function Bh(p, v, S, D, M, z) {
            var G;
            for (G = 3; 0 < G; --G) Ts(p, v += 4 * S, S, 1, 16, D, M, z);
        }

        function y(p, v, S, D, M, z) {
            var G;
            for (G = 3; 0 < G; --G) Ts(p, v += 4, 1, S, 16, D, M, z);
        }

        function R(p, v, S, D, M, z, G, Y) {
            As(p, v, M, 1, 8, z, G, Y), As(S, D, M, 1, 8, z, G, Y);
        }

        function he(p, v, S, D, M, z, G, Y) {
            As(p, v, 1, M, 8, z, G, Y), As(S, D, 1, M, 8, z, G, Y);
        }

        function we(p, v, S, D, M, z, G, Y) {
            Ts(p, v + 4 * M, M, 1, 8, z, G, Y), Ts(S, D + 4 * M, M, 1, 8, z, G, Y);
        }

        function Ee(p, v, S, D, M, z, G, Y) {
            Ts(p, v + 4, 1, M, 8, z, G, Y), Ts(S, D + 4, 1, M, 8, z, G, Y);
        }

        function Ke() {
            this.ba = new Ir(), this.ec = [], this.cc = [], this.Mc = [], this.Dc = this.Nc = this.dc = this.fc = 0, this.Oa = new Zr(), this.memory = 0, this.Ib = "OutputFunc", this.Jb = "OutputAlphaFunc", this.Nd = "OutputRowFunc";
        }

        function et() {
            this.data = [], this.offset = this.kd = this.ha = this.w = 0, this.na = [], this.xa = this.gb = this.Ja = this.Sa = this.P = 0;
        }

        function Ft() {
            this.nc = this.Ea = this.b = this.hc = 0, this.K = [], this.w = 0;
        }

        function Ut() {
            this.ua = 0, this.Wa = new gt(), this.vb = new gt(), this.md = this.xc = this.wc = 0, this.vc = [], this.Wb = 0, this.Ya = new U(), this.yc = new W();
        }

        function pr() {
            this.xb = this.a = 0, this.l = new a0(), this.ca = new Ir(), this.V = [], this.Ba = 0, this.Ta = [], this.Ua = 0, this.m = new j(), this.Pb = 0, this.wd = new j(), this.Ma = this.$ = this.C = this.i = this.c = this.xd = 0, this.s = new Ut(), this.ab = 0, this.gc = o(4, Ft), this.Oc = 0;
        }

        function Cr() {
            this.Lc = this.Z = this.$a = this.i = this.c = 0, this.l = new a0(), this.ic = 0, this.ca = [], this.tb = 0, this.qd = null, this.rd = 0;
        }

        function qr(p, v, S, D, M, z, G) {
            for (p = p == null ? 0 : p[v + 0], v = 0; v < G; ++v) M[z + v] = p + S[D + v] & 255, p = M[z + v];
        }

        function Mi(p, v, S, D, M, z, G) {
            var Y;
            if (p == null) qr(null, null, S, D, M, z, G);
            else
                for (Y = 0; Y < G; ++Y) M[z + Y] = p[v + Y] + S[D + Y] & 255;
        }

        function on(p, v, S, D, M, z, G) {
            if (p == null) qr(null, null, S, D, M, z, G);
            else {
                var Y, re = p[v + 0],
                    ce = re,
                    Se = re;
                for (Y = 0; Y < G; ++Y) ce = Se + (re = p[v + Y]) - ce, Se = S[D + Y] + (-256 & ce ? 0 > ce ? 0 : 255 : ce) & 255, ce = re, M[z + Y] = Se;
            }
        }

        function wi(p, v, S, D) {
            var M = v.width,
                z = v.o;
            if (r(p != null && v != null), 0 > S || 0 >= D || S + D > z) return null;
            if (!p.Cc) {
                if (p.ga == null) {
                    var G;
                    if (p.ga = new Cr(), (G = p.ga == null) || (G = v.width * v.o, r(p.Gb.length == 0), p.Gb = a(G), p.Uc = 0, p.Gb == null ? G = 0 : (p.mb = p.Gb, p.nb = p.Uc, p.rc = null, G = 1), G = !G), !G) {
                        G = p.ga;
                        var Y = p.Fa,
                            re = p.P,
                            ce = p.qc,
                            Se = p.mb,
                            We = p.nb,
                            ue = re + 1,
                            De = ce - 1,
                            Ie = G.l;
                        if (r(Y != null && Se != null && v != null), fl[0] = null, fl[1] = qr, fl[2] = Mi, fl[3] = on, G.ca = Se, G.tb = We, G.c = v.width, G.i = v.height, r(0 < G.c && 0 < G.i), 1 >= ce) v = 0;
                        else if (G.$a = 3 & Y[re + 0], G.Z = Y[re + 0] >> 2 & 3, G.Lc = Y[re + 0] >> 4 & 3, re = Y[re + 0] >> 6 & 3, 0 > G.$a || 1 < G.$a || 4 <= G.Z || 1 < G.Lc || re) v = 0;
                        else if (Ie.put = Qt, Ie.ac = eo, Ie.bc = yo, Ie.ma = G, Ie.width = v.width, Ie.height = v.height, Ie.Da = v.Da, Ie.v = v.v, Ie.va = v.va, Ie.j = v.j, Ie.o = v.o, G.$a) e: {
                            r(G.$a == 1),
                            v = Me();t: for (;;) {
                                if (v == null) {
                                    v = 0;
                                    break e;
                                }
                                if (r(G != null), G.mc = v, v.c = G.c, v.i = G.i, v.l = G.l, v.l.ma = G, v.l.width = G.c, v.l.height = G.i, v.a = 0, _e(v.m, Y, ue, De), !Le(G.c, G.i, 1, v, null) || (v.ab == 1 && v.gc[0].hc == 3 && ae(v.s) ? (G.ic = 1, Y = v.c * v.i, v.Ta = null, v.Ua = 0, v.V = a(Y), v.Ba = 0, v.V == null ? (v.a = 1, v = 0) : v = 1) : (G.ic = 0, v = Be(v, G.c)), !v)) break t;
                                v = 1;
                                break e;
                            }
                            G.mc = null,
                            v = 0;
                        }
                        else v = De >= G.c * G.i;
                        G = !v;
                    }
                    if (G) return null;
                    p.ga.Lc != 1 ? p.Ga = 0 : D = z - S;
                }
                r(p.ga != null), r(S + D <= z);
                e: {
                    if (v = (Y = p.ga).c, z = Y.l.o, Y.$a == 0) {
                        if (ue = p.rc, De = p.Vc, Ie = p.Fa, re = p.P + 1 + S * v, ce = p.mb, Se = p.nb + S * v, r(re <= p.P + p.qc), Y.Z != 0)
                            for (r(fl[Y.Z] != null), G = 0; G < D; ++G) fl[Y.Z](ue, De, Ie, re, ce, Se, v), ue = ce, De = Se, Se += v, re += v;
                        else
                            for (G = 0; G < D; ++G) i(ce, Se, Ie, re, v), ue = ce, De = Se, Se += v, re += v;
                        p.rc = ue, p.Vc = De;
                    } else {
                        if (r(Y.mc != null), v = S + D, r((G = Y.mc) != null), r(v <= G.i), G.C >= v) v = 1;
                        else if (Y.ic || Co(), Y.ic) {
                            Y = G.V, ue = G.Ba, De = G.c;
                            var qe = G.i,
                                Ve = (Ie = 1, re = G.$ / De, ce = G.$ % De, Se = G.m, We = G.s, G.$),
                                Xe = De * qe,
                                Ye = De * v,
                                st = We.wc,
                                tt = Ve < Ye ? V(We, ce, re) : null;
                            r(Ve <= Xe), r(v <= qe), r(ae(We));
                            t: for (;;) {
                                for (; !Se.h && Ve < Ye;) {
                                    if (ce & st || (tt = V(We, ce, re)), r(tt != null), be(Se), 256 > (qe = Ei(tt.G[0], tt.H[0], Se))) Y[ue + Ve] = qe, ++Ve, ++ce >= De && (ce = 0, ++re <= v && !(re % 16) && de(G, re));
                                    else {
                                        if (!(280 > qe)) {
                                            Ie = 0;
                                            break t;
                                        }
                                        qe = Gn(qe - 256, Se);
                                        var zt, Tt = Ei(tt.G[4], tt.H[4], Se);
                                        if (be(Se), !(Ve >= (Tt = Ca(De, Tt = Gn(Tt, Se))) && Xe - Ve >= qe)) {
                                            Ie = 0;
                                            break t;
                                        }
                                        for (zt = 0; zt < qe; ++zt) Y[ue + Ve + zt] = Y[ue + Ve + zt - Tt];
                                        for (Ve += qe, ce += qe; ce >= De;) ce -= De, ++re <= v && !(re % 16) && de(G, re);
                                        Ve < Ye && ce & st && (tt = V(We, ce, re));
                                    }
                                    r(Se.h == me(Se));
                                }
                                de(G, re > v ? v : re);
                                break t;
                            }!Ie || Se.h && Ve < Xe ? (Ie = 0, G.a = Se.h ? 5 : 3) : G.$ = Ve, v = Ie;
                        } else v = Ne(G, G.V, G.Ba, G.c, G.i, v, at);
                        if (!v) {
                            D = 0;
                            break e;
                        }
                    }
                    S + D >= z && (p.Cc = 1),
                    D = 1;
                }
                if (!D) return null;
                if (p.Cc && ((D = p.ga) != null && (D.mc = null), p.ga = null, 0 < p.Ga)) return alert("todo:WebPDequantizeLevels"), null;
            }
            return p.nb + S * M;
        }

        function xn(p, v, S, D, M, z) {
            for (; 0 < M--;) {
                var G, Y = p,
                    re = v + (S ? 1 : 0),
                    ce = p,
                    Se = v + (S ? 0 : 3);
                for (G = 0; G < D; ++G) {
                    var We = ce[Se + 4 * G];
                    We != 255 && (We *= 32897, Y[re + 4 * G + 0] = Y[re + 4 * G + 0] * We >> 23, Y[re + 4 * G + 1] = Y[re + 4 * G + 1] * We >> 23, Y[re + 4 * G + 2] = Y[re + 4 * G + 2] * We >> 23);
                }
                v += z;
            }
        }

        function sn(p, v, S, D, M) {
            for (; 0 < D--;) {
                var z;
                for (z = 0; z < S; ++z) {
                    var G = p[v + 2 * z + 0],
                        Y = 15 & (ce = p[v + 2 * z + 1]),
                        re = 4369 * Y,
                        ce = (240 & ce | ce >> 4) * re >> 16;
                    p[v + 2 * z + 0] = (240 & G | G >> 4) * re >> 16 & 240 | (15 & G | G << 4) * re >> 16 >> 4 & 15, p[v + 2 * z + 1] = 240 & ce | Y;
                }
                v += M;
            }
        }

        function Nn(p, v, S, D, M, z, G, Y) {
            var re, ce, Se = 255;
            for (ce = 0; ce < M; ++ce) {
                for (re = 0; re < D; ++re) {
                    var We = p[v + re];
                    z[G + 4 * re] = We, Se &= We;
                }
                v += S, G += Y;
            }
            return Se != 255;
        }

        function Ds(p, v, S, D, M) {
            var z;
            for (z = 0; z < M; ++z) S[D + z] = p[v + z] >> 8;
        }

        function Co() {
            Ru = xn, n2 = sn, a2 = Nn, o2 = Ds;
        }

        function ks(p, v, S) {
            A[p] = function(D, M, z, G, Y, re, ce, Se, We, ue, De, Ie, qe, Ve, Xe, Ye, st) {
                var tt, zt = st - 1 >> 1,
                    Tt = Y[re + 0] | ce[Se + 0] << 16,
                    Er = We[ue + 0] | De[Ie + 0] << 16;
                r(D != null);
                var It = 3 * Tt + Er + 131074 >> 2;
                for (v(D[M + 0], 255 & It, It >> 16, qe, Ve), z != null && (It = 3 * Er + Tt + 131074 >> 2, v(z[G + 0], 255 & It, It >> 16, Xe, Ye)), tt = 1; tt <= zt; ++tt) {
                    var zr = Y[re + tt] | ce[Se + tt] << 16,
                        yn = We[ue + tt] | De[Ie + tt] << 16,
                        Pr = Tt + zr + Er + yn + 524296,
                        Ot = Pr + 2 * (zr + Er) >> 3;
                    It = Ot + Tt >> 1, Tt = (Pr = Pr + 2 * (Tt + yn) >> 3) + zr >> 1, v(D[M + 2 * tt - 1], 255 & It, It >> 16, qe, Ve + (2 * tt - 1) * S), v(D[M + 2 * tt - 0], 255 & Tt, Tt >> 16, qe, Ve + (2 * tt - 0) * S), z != null && (It = Pr + Er >> 1, Tt = Ot + yn >> 1, v(z[G + 2 * tt - 1], 255 & It, It >> 16, Xe, Ye + (2 * tt - 1) * S), v(z[G + 2 * tt + 0], 255 & Tt, Tt >> 16, Xe, Ye + (2 * tt + 0) * S)), Tt = zr, Er = yn;
                }
                1 & st || (It = 3 * Tt + Er + 131074 >> 2, v(D[M + st - 1], 255 & It, It >> 16, qe, Ve + (st - 1) * S), z != null && (It = 3 * Er + Tt + 131074 >> 2, v(z[G + st - 1], 255 & It, It >> 16, Xe, Ye + (st - 1) * S)));
            };
        }

        function Au() {
            oo[jh] = p3, oo[Hh] = v2, oo[h2] = m3, oo[Gh] = x2, oo[qh] = _2, oo[j1] = y2, oo[d2] = g3, oo[H1] = v2, oo[G1] = x2, oo[Xh] = _2, oo[q1] = y2;
        }

        function u0(p) {
            return p & ~v3 ? 0 > p ? 0 : 255 : p >> b2;
        }

        function tl(p, v) {
            return u0((19077 * p >> 8) + (26149 * v >> 8) - 14234);
        }

        function nc(p, v, S) {
            return u0((19077 * p >> 8) - (6419 * v >> 8) - (13320 * S >> 8) + 8708);
        }

        function ac(p, v) {
            return u0((19077 * p >> 8) + (33050 * v >> 8) - 17685);
        }

        function rl(p, v, S, D, M) {
            D[M + 0] = tl(p, S), D[M + 1] = nc(p, v, S), D[M + 2] = ac(p, v);
        }

        function Ln(p, v, S, D, M) {
            D[M + 0] = ac(p, v), D[M + 1] = nc(p, v, S), D[M + 2] = tl(p, S);
        }

        function oc(p, v, S, D, M) {
            var z = nc(p, v, S);
            v = z << 3 & 224 | ac(p, v) >> 3, D[M + 0] = 248 & tl(p, S) | z >> 5, D[M + 1] = v;
        }

        function sc(p, v, S, D, M) {
            var z = 240 & ac(p, v) | 15;
            D[M + 0] = 240 & tl(p, S) | nc(p, v, S) >> 4, D[M + 1] = z;
        }

        function Tu(p, v, S, D, M) {
            D[M + 0] = 255, rl(p, v, S, D, M + 1);
        }

        function Du(p, v, S, D, M) {
            Ln(p, v, S, D, M), D[M + 3] = 255;
        }

        function la(p, v, S, D, M) {
            rl(p, v, S, D, M), D[M + 3] = 255;
        }

        function Fs(p, v, S) {
            A[p] = function(D, M, z, G, Y, re, ce, Se, We) {
                for (var ue = Se + (-2 & We) * S; Se != ue;) v(D[M + 0], z[G + 0], Y[re + 0], ce, Se), v(D[M + 1], z[G + 0], Y[re + 0], ce, Se + S), M += 2, ++G, ++re, Se += 2 * S;
                1 & We && v(D[M + 0], z[G + 0], Y[re + 0], ce, Se);
            };
        }

        function f0(p, v, S) {
            return S == 0 ? p == 0 ? v == 0 ? 6 : 5 : v == 0 ? 4 : 0 : S;
        }

        function Uh(p, v, S, D, M) {
            switch (p >>> 30) {
                case 3:
                    fc(v, S, D, M, 0);
                    break;
                case 2:
                    no(v, S, D, M);
                    break;
                case 1:
                    ri(v, S, D, M);
            }
        }

        function io(p, v) {
            var S, D, M = v.M,
                z = v.Nb,
                G = p.oc,
                Y = p.pc + 40,
                re = p.oc,
                ce = p.pc + 584,
                Se = p.oc,
                We = p.pc + 600;
            for (S = 0; 16 > S; ++S) G[Y + 32 * S - 1] = 129;
            for (S = 0; 8 > S; ++S) re[ce + 32 * S - 1] = 129, Se[We + 32 * S - 1] = 129;
            for (0 < M ? G[Y - 1 - 32] = re[ce - 1 - 32] = Se[We - 1 - 32] = 129 : (n(G, Y - 32 - 1, 127, 21), n(re, ce - 32 - 1, 127, 9), n(Se, We - 32 - 1, 127, 9)), D = 0; D < p.za; ++D) {
                var ue = v.ya[v.aa + D];
                if (0 < D) {
                    for (S = -1; 16 > S; ++S) i(G, Y + 32 * S - 4, G, Y + 32 * S + 12, 4);
                    for (S = -1; 8 > S; ++S) i(re, ce + 32 * S - 4, re, ce + 32 * S + 4, 4), i(Se, We + 32 * S - 4, Se, We + 32 * S + 4, 4);
                }
                var De = p.Gd,
                    Ie = p.Hd + D,
                    qe = ue.ad,
                    Ve = ue.Hc;
                if (0 < M && (i(G, Y - 32, De[Ie].y, 0, 16), i(re, ce - 32, De[Ie].f, 0, 8), i(Se, We - 32, De[Ie].ea, 0, 8)), ue.Za) {
                    var Xe = G,
                        Ye = Y - 32 + 16;
                    for (0 < M && (D >= p.za - 1 ? n(Xe, Ye, De[Ie].y[15], 4) : i(Xe, Ye, De[Ie + 1].y, 0, 4)), S = 0; 4 > S; S++) Xe[Ye + 128 + S] = Xe[Ye + 256 + S] = Xe[Ye + 384 + S] = Xe[Ye + 0 + S];
                    for (S = 0; 16 > S; ++S, Ve <<= 2) Xe = G, Ye = Y + S2[S], Ao[ue.Ob[S]](Xe, Ye), Uh(Ve, qe, 16 * +S, Xe, Ye);
                } else if (Xe = f0(D, M, ue.Ob[0]), ul[Xe](G, Y), Ve != 0)
                    for (S = 0; 16 > S; ++S, Ve <<= 2) Uh(Ve, qe, 16 * +S, G, Y + S2[S]);
                for (S = ue.Gc, Xe = f0(D, M, ue.Dd), Is[Xe](re, ce), Is[Xe](Se, We), Ve = qe, Xe = re, Ye = ce, 255 & (ue = 0 | S) && (170 & ue ? Ko(Ve, 256, Xe, Ye) : gi(Ve, 256, Xe, Ye)), ue = Se, Ve = We, 255 & (S >>= 8) && (170 & S ? Ko(qe, 320, ue, Ve) : gi(qe, 320, ue, Ve)), M < p.Ub - 1 && (i(De[Ie].y, 0, G, Y + 480, 16), i(De[Ie].f, 0, re, ce + 224, 8), i(De[Ie].ea, 0, Se, We + 224, 8)), S = 8 * z * p.B, De = p.sa, Ie = p.ta + 16 * D + 16 * z * p.R, qe = p.qa, ue = p.ra + 8 * D + S, Ve = p.Ha, Xe = p.Ia + 8 * D + S, S = 0; 16 > S; ++S) i(De, Ie + S * p.R, G, Y + 32 * S, 16);
                for (S = 0; 8 > S; ++S) i(qe, ue + S * p.B, re, ce + 32 * S, 8), i(Ve, Xe + S * p.B, Se, We + 32 * S, 8);
            }
        }

        function lc(p, v, S, D, M, z, G, Y, re) {
            var ce = [0],
                Se = [0],
                We = 0,
                ue = re != null ? re.kd : 0,
                De = re ? ? new et();
            if (p == null || 12 > S) return 7;
            De.data = p, De.w = v, De.ha = S, v = [v], S = [S], De.gb = [De.gb];
            e: {
                var Ie = v,
                    qe = S,
                    Ve = De.gb;
                if (r(p != null), r(qe != null), r(Ve != null), Ve[0] = 0, 12 <= qe[0] && !e(p, Ie[0], "RIFF")) {
                    if (e(p, Ie[0] + 8, "WEBP")) {
                        Ve = 3;
                        break e;
                    }
                    var Xe = Qe(p, Ie[0] + 4);
                    if (12 > Xe || 4294967286 < Xe) {
                        Ve = 3;
                        break e;
                    }
                    if (ue && Xe > qe[0] - 8) {
                        Ve = 7;
                        break e;
                    }
                    Ve[0] = Xe, Ie[0] += 12, qe[0] -= 12;
                }
                Ve = 0;
            }
            if (Ve != 0) return Ve;
            for (Xe = 0 < De.gb[0], S = S[0];;) {
                e: {
                    var Ye = p;qe = v,
                    Ve = S;
                    var st = ce,
                        tt = Se,
                        zt = Ie = [0];
                    if ((It = We = [We])[0] = 0, 8 > Ve[0]) Ve = 7;
                    else {
                        if (!e(Ye, qe[0], "VP8X")) {
                            if (Qe(Ye, qe[0] + 4) != 10) {
                                Ve = 3;
                                break e;
                            }
                            if (18 > Ve[0]) {
                                Ve = 7;
                                break e;
                            }
                            var Tt = Qe(Ye, qe[0] + 8),
                                Er = 1 + je(Ye, qe[0] + 12);
                            if (2147483648 <= Er * (Ye = 1 + je(Ye, qe[0] + 15))) {
                                Ve = 3;
                                break e;
                            }
                            zt != null && (zt[0] = Tt), st != null && (st[0] = Er), tt != null && (tt[0] = Ye), qe[0] += 18, Ve[0] -= 18, It[0] = 1;
                        }
                        Ve = 0;
                    }
                }
                if (We = We[0], Ie = Ie[0], Ve != 0) return Ve;
                if (qe = !!(2 & Ie), !Xe && We) return 3;
                if (z != null && (z[0] = !!(16 & Ie)), G != null && (G[0] = qe), Y != null && (Y[0] = 0), G = ce[0], Ie = Se[0], We && qe && re == null) {
                    Ve = 0;
                    break;
                }
                if (4 > S) {
                    Ve = 7;
                    break;
                }
                if (Xe && We || !Xe && !We && !e(p, v[0], "ALPH")) {
                    S = [S], De.na = [De.na], De.P = [De.P], De.Sa = [De.Sa];
                    e: {
                        Tt = p,
                        Ve = v,
                        Xe = S;
                        var It = De.gb;st = De.na,
                        tt = De.P,
                        zt = De.Sa,
                        Er = 22,
                        r(Tt != null),
                        r(Xe != null),
                        Ye = Ve[0];
                        var zr = Xe[0];
                        for (r(st != null), r(zt != null), st[0] = null, tt[0] = null, zt[0] = 0;;) {
                            if (Ve[0] = Ye, Xe[0] = zr, 8 > zr) {
                                Ve = 7;
                                break e;
                            }
                            var yn = Qe(Tt, Ye + 4);
                            if (4294967286 < yn) {
                                Ve = 3;
                                break e;
                            }
                            var Pr = 8 + yn + 1 & -2;
                            if (Er += Pr, 0 < It && Er > It) {
                                Ve = 3;
                                break e;
                            }
                            if (!e(Tt, Ye, "VP8 ") || !e(Tt, Ye, "VP8L")) {
                                Ve = 0;
                                break e;
                            }
                            if (zr[0] < Pr) {
                                Ve = 7;
                                break e;
                            }
                            e(Tt, Ye, "ALPH") || (st[0] = Tt, tt[0] = Ye + 8, zt[0] = yn), Ye += Pr, zr -= Pr;
                        }
                    }
                    if (S = S[0], De.na = De.na[0], De.P = De.P[0], De.Sa = De.Sa[0], Ve != 0) break;
                }
                S = [S],
                De.Ja = [De.Ja],
                De.xa = [De.xa];e: if (It = p, Ve = v, Xe = S, st = De.gb[0], tt = De.Ja, zt = De.xa, Tt = Ve[0], Ye = !e(It, Tt, "VP8 "), Er = !e(It, Tt, "VP8L"), r(It != null), r(Xe != null), r(tt != null), r(zt != null), 8 > Xe[0]) Ve = 7;
                    else {
                        if (Ye || Er) {
                            if (It = Qe(It, Tt + 4), 12 <= st && It > st - 12) {
                                Ve = 3;
                                break e;
                            }
                            if (ue && It > Xe[0] - 8) {
                                Ve = 7;
                                break e;
                            }
                            tt[0] = It, Ve[0] += 8, Xe[0] -= 8, zt[0] = Er;
                        } else zt[0] = 5 <= Xe[0] && It[Tt + 0] == 47 && !(It[Tt + 4] >> 5), tt[0] = Xe[0];
                        Ve = 0;
                    }if (S = S[0], De.Ja = De.Ja[0], De.xa = De.xa[0], v = v[0], Ve != 0) break;
                if (4294967286 < De.Ja) return 3;
                if (Y == null || qe || (Y[0] = De.xa ? 2 : 1), G = [G], Ie = [Ie], De.xa) {
                    if (5 > S) {
                        Ve = 7;
                        break;
                    }
                    Y = G, ue = Ie, qe = z, p == null || 5 > S ? p = 0 : 5 <= S && p[v + 0] == 47 && !(p[v + 4] >> 5) ? (Xe = [0], It = [0], st = [0], _e(tt = new j(), p, v, S), bo(tt, Xe, It, st) ? (Y != null && (Y[0] = Xe[0]), ue != null && (ue[0] = It[0]), qe != null && (qe[0] = st[0]), p = 1) : p = 0) : p = 0;
                } else {
                    if (10 > S) {
                        Ve = 7;
                        break;
                    }
                    Y = Ie, p == null || 10 > S || !kh(p, v + 3, S - 3) ? p = 0 : (ue = p[v + 0] | p[v + 1] << 8 | p[v + 2] << 16, qe = 16383 & (p[v + 7] << 8 | p[v + 6]), p = 16383 & (p[v + 9] << 8 | p[v + 8]), 1 & ue || 3 < (ue >> 1 & 7) || !(ue >> 4 & 1) || ue >> 5 >= De.Ja || !qe || !p ? p = 0 : (G && (G[0] = qe), Y && (Y[0] = p), p = 1));
                }
                if (!p || (G = G[0], Ie = Ie[0], We && (ce[0] != G || Se[0] != Ie))) return 3;re != null && (re[0] = De, re.offset = v - re.w, r(4294967286 > v - re.w), r(re.offset == re.ha - S));
                break;
            }
            return Ve == 0 || Ve == 7 && We && re == null ? (z != null && (z[0] |= De.na != null && 0 < De.na.length), D != null && (D[0] = G), M != null && (M[0] = Ie), 0) : Ve;
        }

        function ku(p, v, S) {
            var D = v.width,
                M = v.height,
                z = 0,
                G = 0,
                Y = D,
                re = M;
            if (v.Da = p != null && 0 < p.Da, v.Da && (Y = p.cd, re = p.bd, z = p.v, G = p.j, 11 > S || (z &= -2, G &= -2), 0 > z || 0 > G || 0 >= Y || 0 >= re || z + Y > D || G + re > M)) return 0;
            if (v.v = z, v.j = G, v.va = z + Y, v.o = G + re, v.U = Y, v.T = re, v.da = p != null && 0 < p.da, v.da) {
                if (!ft(Y, re, S = [p.ib], z = [p.hb])) return 0;
                v.ib = S[0], v.hb = z[0];
            }
            return v.ob = p != null && p.ob, v.Kb = p == null || !p.Sd, v.da && (v.ob = v.ib < 3 * D / 4 && v.hb < 3 * M / 4, v.Kb = 0), 1;
        }

        function Fu(p) {
            if (p == null) return 2;
            if (11 > p.S) {
                var v = p.f.RGBA;
                v.fb += (p.height - 1) * v.A, v.A = -v.A;
            } else v = p.f.kb, p = p.height, v.O += (p - 1) * v.fa, v.fa = -v.fa, v.N += (p - 1 >> 1) * v.Ab, v.Ab = -v.Ab, v.W += (p - 1 >> 1) * v.Db, v.Db = -v.Db, v.F != null && (v.J += (p - 1) * v.lb, v.lb = -v.lb);
            return 0;
        }

        function il(p, v, S, D) {
            if (D == null || 0 >= p || 0 >= v) return 2;
            if (S != null) {
                if (S.Da) {
                    var M = S.cd,
                        z = S.bd,
                        G = -2 & S.v,
                        Y = -2 & S.j;
                    if (0 > G || 0 > Y || 0 >= M || 0 >= z || G + M > p || Y + z > v) return 2;
                    p = M, v = z;
                }
                if (S.da) {
                    if (!ft(p, v, M = [S.ib], z = [S.hb])) return 2;
                    p = M[0], v = z[0];
                }
            }
            D.width = p, D.height = v;
            e: {
                var re = D.width,
                    ce = D.height;
                if (p = D.S, 0 >= re || 0 >= ce || !(p >= jh && 13 > p)) p = 2;
                else {
                    if (0 >= D.Rd && D.sd == null) {
                        G = z = M = v = 0;
                        var Se = (Y = re * C2[p]) * ce;
                        if (11 > p || (z = (ce + 1) / 2 * (v = (re + 1) / 2), p == 12 && (G = (M = re) * ce)), (ce = a(Se + 2 * z + G)) == null) {
                            p = 1;
                            break e;
                        }
                        D.sd = ce, 11 > p ? ((re = D.f.RGBA).eb = ce, re.fb = 0, re.A = Y, re.size = Se) : ((re = D.f.kb).y = ce, re.O = 0, re.fa = Y, re.Fd = Se, re.f = ce, re.N = 0 + Se, re.Ab = v, re.Cd = z, re.ea = ce, re.W = 0 + Se + z, re.Db = v, re.Ed = z, p == 12 && (re.F = ce, re.J = 0 + Se + 2 * z), re.Tc = G, re.lb = M);
                    }
                    if (v = 1, M = D.S, z = D.width, G = D.height, M >= jh && 13 > M) {
                        if (11 > M) p = D.f.RGBA, v &= (Y = Math.abs(p.A)) * (G - 1) + z <= p.size, v &= Y >= z * C2[M], v &= p.eb != null;
                        else {
                            p = D.f.kb, Y = (z + 1) / 2, Se = (G + 1) / 2, re = Math.abs(p.fa), ce = Math.abs(p.Ab);
                            var We = Math.abs(p.Db),
                                ue = Math.abs(p.lb),
                                De = ue * (G - 1) + z;
                            v &= re * (G - 1) + z <= p.Fd, v &= ce * (Se - 1) + Y <= p.Cd, v = (v &= We * (Se - 1) + Y <= p.Ed) & re >= z & ce >= Y & We >= Y, v &= p.y != null, v &= p.f != null, v &= p.ea != null, M == 12 && (v &= ue >= z, v &= De <= p.Tc, v &= p.F != null);
                        }
                    } else v = 0;
                    p = v ? 0 : 2;
                }
            }
            return p != 0 || S != null && S.fd && (p = Fu(D)), p;
        }
        var cc = 64,
            Oa = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215],
            Na = 24,
            nl = 32,
            Es = 8,
            al = [0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7];
        ct("Predictor0", "PredictorAdd0"), A.Predictor0 = function() {
            return 4278190080;
        }, A.Predictor1 = function(p) {
            return p;
        }, A.Predictor2 = function(p, v, S) {
            return v[S + 0];
        }, A.Predictor3 = function(p, v, S) {
            return v[S + 1];
        }, A.Predictor4 = function(p, v, S) {
            return v[S - 1];
        }, A.Predictor5 = function(p, v, S) {
            return yt(yt(p, v[S + 1]), v[S + 0]);
        }, A.Predictor6 = function(p, v, S) {
            return yt(p, v[S - 1]);
        }, A.Predictor7 = function(p, v, S) {
            return yt(p, v[S + 0]);
        }, A.Predictor8 = function(p, v, S) {
            return yt(v[S - 1], v[S + 0]);
        }, A.Predictor9 = function(p, v, S) {
            return yt(v[S + 0], v[S + 1]);
        }, A.Predictor10 = function(p, v, S) {
            return yt(yt(p, v[S - 1]), yt(v[S + 0], v[S + 1]));
        }, A.Predictor11 = function(p, v, S) {
            var D = v[S + 0];
            return 0 >= er(D >> 24 & 255, p >> 24 & 255, (v = v[S - 1]) >> 24 & 255) + er(D >> 16 & 255, p >> 16 & 255, v >> 16 & 255) + er(D >> 8 & 255, p >> 8 & 255, v >> 8 & 255) + er(255 & D, 255 & p, 255 & v) ? D : p;
        }, A.Predictor12 = function(p, v, S) {
            var D = v[S + 0];
            return (Pe((p >> 24 & 255) + (D >> 24 & 255) - ((v = v[S - 1]) >> 24 & 255)) << 24 | Pe((p >> 16 & 255) + (D >> 16 & 255) - (v >> 16 & 255)) << 16 | Pe((p >> 8 & 255) + (D >> 8 & 255) - (v >> 8 & 255)) << 8 | Pe((255 & p) + (255 & D) - (255 & v))) >>> 0;
        }, A.Predictor13 = function(p, v, S) {
            var D = v[S - 1];
            return (Je((p = yt(p, v[S + 0])) >> 24 & 255, D >> 24 & 255) << 24 | Je(p >> 16 & 255, D >> 16 & 255) << 16 | Je(p >> 8 & 255, D >> 8 & 255) << 8 | Je(255 & p, 255 & D)) >>> 0;
        };
        var Eu = A.PredictorAdd0;
        A.PredictorAdd1 = ur, ct("Predictor2", "PredictorAdd2"), ct("Predictor3", "PredictorAdd3"), ct("Predictor4", "PredictorAdd4"), ct("Predictor5", "PredictorAdd5"), ct("Predictor6", "PredictorAdd6"), ct("Predictor7", "PredictorAdd7"), ct("Predictor8", "PredictorAdd8"), ct("Predictor9", "PredictorAdd9"), ct("Predictor10", "PredictorAdd10"), ct("Predictor11", "PredictorAdd11"), ct("Predictor12", "PredictorAdd12"), ct("Predictor13", "PredictorAdd13");
        var h0 = A.PredictorAdd2;
        kt("ColorIndexInverseTransform", "MapARGB", "32b", function(p) {
            return p >> 8 & 255;
        }, function(p) {
            return p;
        }), kt("VP8LColorIndexInverseTransformAlpha", "MapAlpha", "8b", function(p) {
            return p;
        }, function(p) {
            return p >> 8 & 255;
        });
        var qi, Vh = A.ColorIndexInverseTransform,
            qo = A.MapARGB,
            Xo = A.VP8LColorIndexInverseTransformAlpha,
            Pu = A.MapAlpha,
            Iu = A.VP8LPredictorsAdd = [];
        Iu.length = 16, (A.VP8LPredictors = []).length = 16, (A.VP8LPredictorsAdd_C = []).length = 16, (A.VP8LPredictors_C = []).length = 16;
        var Ou, Nu, ol, sl, ll, uc, cl, fc, no, Ko, ri, gi, Xi, _n, Ps, Lu, d0, zh, Qv, $v, e2, t2, r2, i2, Ru, n2, a2, o2, s2 = a(511),
            l2 = a(2041),
            c2 = a(225),
            u2 = a(767),
            f2 = 0,
            W1 = l2,
            Wh = c2,
            La = u2,
            ao = s2,
            jh = 0,
            Hh = 1,
            h2 = 2,
            Gh = 3,
            qh = 4,
            j1 = 5,
            d2 = 6,
            H1 = 7,
            G1 = 8,
            Xh = 9,
            q1 = 10,
            e3 = [2, 3, 7],
            t3 = [3, 3, 11],
            p2 = [280, 256, 256, 256, 40],
            r3 = [0, 1, 1, 1, 0],
            i3 = [17, 18, 0, 1, 2, 3, 4, 5, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
            n3 = [24, 7, 23, 25, 40, 6, 39, 41, 22, 26, 38, 42, 56, 5, 55, 57, 21, 27, 54, 58, 37, 43, 72, 4, 71, 73, 20, 28, 53, 59, 70, 74, 36, 44, 88, 69, 75, 52, 60, 3, 87, 89, 19, 29, 86, 90, 35, 45, 68, 76, 85, 91, 51, 61, 104, 2, 103, 105, 18, 30, 102, 106, 34, 46, 84, 92, 67, 77, 101, 107, 50, 62, 120, 1, 119, 121, 83, 93, 17, 31, 100, 108, 66, 78, 118, 122, 33, 47, 117, 123, 49, 63, 99, 109, 82, 94, 0, 116, 124, 65, 79, 16, 32, 98, 110, 48, 115, 125, 81, 95, 64, 114, 126, 97, 111, 80, 113, 127, 96, 112],
            a3 = [2954, 2956, 2958, 2962, 2970, 2986, 3018, 3082, 3212, 3468, 3980, 5004],
            o3 = 8,
            X1 = [4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 16, 17, 17, 18, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 25, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, 93, 95, 96, 98, 100, 101, 102, 104, 106, 108, 110, 112, 114, 116, 118, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 143, 145, 148, 151, 154, 157],
            K1 = [4, 5, 6, 7, 8, 9, 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, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 119, 122, 125, 128, 131, 134, 137, 140, 143, 146, 149, 152, 155, 158, 161, 164, 167, 170, 173, 177, 181, 185, 189, 193, 197, 201, 205, 209, 213, 217, 221, 225, 229, 234, 239, 245, 249, 254, 259, 264, 269, 274, 279, 284],
            Mu = null,
            s3 = [
                [173, 148, 140, 0],
                [176, 155, 140, 135, 0],
                [180, 157, 141, 134, 130, 0],
                [254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0]
            ],
            l3 = [0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15],
            m2 = [-0, 1, -1, 2, -2, 3, 4, 6, -3, 5, -4, -5, -6, 7, -7, 8, -8, -9],
            c3 = [
                [
                    [
                        [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],
                        [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],
                        [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]
                    ],
                    [
                        [253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128],
                        [189, 129, 242, 255, 227, 213, 255, 219, 128, 128, 128],
                        [106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128]
                    ],
                    [
                        [1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128],
                        [181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128],
                        [78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128]
                    ],
                    [
                        [1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128],
                        [184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128],
                        [77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128]
                    ],
                    [
                        [1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128],
                        [170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128],
                        [37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128]
                    ],
                    [
                        [1, 204, 254, 255, 245, 255, 128, 128, 128, 128, 128],
                        [207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128],
                        [102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128]
                    ],
                    [
                        [1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128],
                        [177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128],
                        [80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128]
                    ],
                    [
                        [1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],
                        [246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],
                        [255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]
                    ]
                ],
                [
                    [
                        [198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62],
                        [131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1],
                        [68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128]
                    ],
                    [
                        [1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128],
                        [184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128],
                        [81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128]
                    ],
                    [
                        [1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128],
                        [99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128],
                        [23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128]
                    ],
                    [
                        [1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128],
                        [109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128],
                        [44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128]
                    ],
                    [
                        [1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128],
                        [94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128],
                        [22, 100, 174, 245, 186, 161, 255, 199, 128, 128, 128]
                    ],
                    [
                        [1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128],
                        [124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128],
                        [35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128]
                    ],
                    [
                        [1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128],
                        [121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128],
                        [45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128]
                    ],
                    [
                        [1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128],
                        [203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128],
                        [137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128]
                    ]
                ],
                [
                    [
                        [253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128],
                        [175, 13, 224, 243, 193, 185, 249, 198, 255, 255, 128],
                        [73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128]
                    ],
                    [
                        [1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128],
                        [239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128],
                        [155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128]
                    ],
                    [
                        [1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128],
                        [201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128],
                        [69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128]
                    ],
                    [
                        [1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128],
                        [223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128],
                        [141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128]
                    ],
                    [
                        [1, 16, 248, 255, 255, 128, 128, 128, 128, 128, 128],
                        [190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128],
                        [149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]
                    ],
                    [
                        [1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128],
                        [247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128],
                        [240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128]
                    ],
                    [
                        [1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128],
                        [213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128],
                        [55, 93, 255, 128, 128, 128, 128, 128, 128, 128, 128]
                    ],
                    [
                        [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],
                        [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],
                        [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]
                    ]
                ],
                [
                    [
                        [202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255],
                        [126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128],
                        [61, 46, 138, 219, 151, 178, 240, 170, 255, 216, 128]
                    ],
                    [
                        [1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128],
                        [166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128],
                        [39, 77, 162, 232, 172, 180, 245, 178, 255, 255, 128]
                    ],
                    [
                        [1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128],
                        [124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128],
                        [24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128]
                    ],
                    [
                        [1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128],
                        [149, 150, 226, 252, 216, 205, 255, 171, 128, 128, 128],
                        [28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128]
                    ],
                    [
                        [1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128],
                        [123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128],
                        [20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128]
                    ],
                    [
                        [1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128],
                        [168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128],
                        [47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128]
                    ],
                    [
                        [1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128],
                        [141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128],
                        [42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128]
                    ],
                    [
                        [1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],
                        [244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],
                        [238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]
                    ]
                ]
            ],
            u3 = [
                [
                    [231, 120, 48, 89, 115, 113, 120, 152, 112],
                    [152, 179, 64, 126, 170, 118, 46, 70, 95],
                    [175, 69, 143, 80, 85, 82, 72, 155, 103],
                    [56, 58, 10, 171, 218, 189, 17, 13, 152],
                    [114, 26, 17, 163, 44, 195, 21, 10, 173],
                    [121, 24, 80, 195, 26, 62, 44, 64, 85],
                    [144, 71, 10, 38, 171, 213, 144, 34, 26],
                    [170, 46, 55, 19, 136, 160, 33, 206, 71],
                    [63, 20, 8, 114, 114, 208, 12, 9, 226],
                    [81, 40, 11, 96, 182, 84, 29, 16, 36]
                ],
                [
                    [134, 183, 89, 137, 98, 101, 106, 165, 148],
                    [72, 187, 100, 130, 157, 111, 32, 75, 80],
                    [66, 102, 167, 99, 74, 62, 40, 234, 128],
                    [41, 53, 9, 178, 241, 141, 26, 8, 107],
                    [74, 43, 26, 146, 73, 166, 49, 23, 157],
                    [65, 38, 105, 160, 51, 52, 31, 115, 128],
                    [104, 79, 12, 27, 217, 255, 87, 17, 7],
                    [87, 68, 71, 44, 114, 51, 15, 186, 23],
                    [47, 41, 14, 110, 182, 183, 21, 17, 194],
                    [66, 45, 25, 102, 197, 189, 23, 18, 22]
                ],
                [
                    [88, 88, 147, 150, 42, 46, 45, 196, 205],
                    [43, 97, 183, 117, 85, 38, 35, 179, 61],
                    [39, 53, 200, 87, 26, 21, 43, 232, 171],
                    [56, 34, 51, 104, 114, 102, 29, 93, 77],
                    [39, 28, 85, 171, 58, 165, 90, 98, 64],
                    [34, 22, 116, 206, 23, 34, 43, 166, 73],
                    [107, 54, 32, 26, 51, 1, 81, 43, 31],
                    [68, 25, 106, 22, 64, 171, 36, 225, 114],
                    [34, 19, 21, 102, 132, 188, 16, 76, 124],
                    [62, 18, 78, 95, 85, 57, 50, 48, 51]
                ],
                [
                    [193, 101, 35, 159, 215, 111, 89, 46, 111],
                    [60, 148, 31, 172, 219, 228, 21, 18, 111],
                    [112, 113, 77, 85, 179, 255, 38, 120, 114],
                    [40, 42, 1, 196, 245, 209, 10, 25, 109],
                    [88, 43, 29, 140, 166, 213, 37, 43, 154],
                    [61, 63, 30, 155, 67, 45, 68, 1, 209],
                    [100, 80, 8, 43, 154, 1, 51, 26, 71],
                    [142, 78, 78, 16, 255, 128, 34, 197, 171],
                    [41, 40, 5, 102, 211, 183, 4, 1, 221],
                    [51, 50, 17, 168, 209, 192, 23, 25, 82]
                ],
                [
                    [138, 31, 36, 171, 27, 166, 38, 44, 229],
                    [67, 87, 58, 169, 82, 115, 26, 59, 179],
                    [63, 59, 90, 180, 59, 166, 93, 73, 154],
                    [40, 40, 21, 116, 143, 209, 34, 39, 175],
                    [47, 15, 16, 183, 34, 223, 49, 45, 183],
                    [46, 17, 33, 183, 6, 98, 15, 32, 183],
                    [57, 46, 22, 24, 128, 1, 54, 17, 37],
                    [65, 32, 73, 115, 28, 128, 23, 128, 205],
                    [40, 3, 9, 115, 51, 192, 18, 6, 223],
                    [87, 37, 9, 115, 59, 77, 64, 21, 47]
                ],
                [
                    [104, 55, 44, 218, 9, 54, 53, 130, 226],
                    [64, 90, 70, 205, 40, 41, 23, 26, 57],
                    [54, 57, 112, 184, 5, 41, 38, 166, 213],
                    [30, 34, 26, 133, 152, 116, 10, 32, 134],
                    [39, 19, 53, 221, 26, 114, 32, 73, 255],
                    [31, 9, 65, 234, 2, 15, 1, 118, 73],
                    [75, 32, 12, 51, 192, 255, 160, 43, 51],
                    [88, 31, 35, 67, 102, 85, 55, 186, 85],
                    [56, 21, 23, 111, 59, 205, 45, 37, 192],
                    [55, 38, 70, 124, 73, 102, 1, 34, 98]
                ],
                [
                    [125, 98, 42, 88, 104, 85, 117, 175, 82],
                    [95, 84, 53, 89, 128, 100, 113, 101, 45],
                    [75, 79, 123, 47, 51, 128, 81, 171, 1],
                    [57, 17, 5, 71, 102, 57, 53, 41, 49],
                    [38, 33, 13, 121, 57, 73, 26, 1, 85],
                    [41, 10, 67, 138, 77, 110, 90, 47, 114],
                    [115, 21, 2, 10, 102, 255, 166, 23, 6],
                    [101, 29, 16, 10, 85, 128, 101, 196, 26],
                    [57, 18, 10, 102, 102, 213, 34, 20, 43],
                    [117, 20, 15, 36, 163, 128, 68, 1, 26]
                ],
                [
                    [102, 61, 71, 37, 34, 53, 31, 243, 192],
                    [69, 60, 71, 38, 73, 119, 28, 222, 37],
                    [68, 45, 128, 34, 1, 47, 11, 245, 171],
                    [62, 17, 19, 70, 146, 85, 55, 62, 70],
                    [37, 43, 37, 154, 100, 163, 85, 160, 1],
                    [63, 9, 92, 136, 28, 64, 32, 201, 85],
                    [75, 15, 9, 9, 64, 255, 184, 119, 16],
                    [86, 6, 28, 5, 64, 255, 25, 248, 1],
                    [56, 8, 17, 132, 137, 255, 55, 116, 128],
                    [58, 15, 20, 82, 135, 57, 26, 121, 40]
                ],
                [
                    [164, 50, 31, 137, 154, 133, 25, 35, 218],
                    [51, 103, 44, 131, 131, 123, 31, 6, 158],
                    [86, 40, 64, 135, 148, 224, 45, 183, 128],
                    [22, 26, 17, 131, 240, 154, 14, 1, 209],
                    [45, 16, 21, 91, 64, 222, 7, 1, 197],
                    [56, 21, 39, 155, 60, 138, 23, 102, 213],
                    [83, 12, 13, 54, 192, 255, 68, 47, 28],
                    [85, 26, 85, 85, 128, 128, 32, 146, 171],
                    [18, 11, 7, 63, 144, 171, 4, 4, 246],
                    [35, 27, 10, 146, 174, 171, 12, 26, 128]
                ],
                [
                    [190, 80, 35, 99, 180, 80, 126, 54, 45],
                    [85, 126, 47, 87, 176, 51, 41, 20, 32],
                    [101, 75, 128, 139, 118, 146, 116, 128, 85],
                    [56, 41, 15, 176, 236, 85, 37, 9, 62],
                    [71, 30, 17, 119, 118, 255, 17, 18, 138],
                    [101, 38, 60, 138, 55, 70, 43, 26, 142],
                    [146, 36, 19, 30, 171, 255, 97, 27, 20],
                    [138, 45, 61, 62, 219, 1, 81, 188, 64],
                    [32, 41, 20, 117, 151, 142, 20, 21, 163],
                    [112, 19, 12, 61, 195, 128, 48, 4, 24]
                ]
            ],
            f3 = [
                [
                    [
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255],
                        [249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255],
                        [234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],
                        [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255],
                        [239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],
                        [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],
                        [251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],
                        [251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],
                        [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255],
                        [250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255],
                        [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]
                    ]
                ],
                [
                    [
                        [217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255],
                        [234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255]
                    ],
                    [
                        [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],
                        [238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],
                        [249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],
                        [252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],
                        [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255],
                        [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]
                    ]
                ],
                [
                    [
                        [186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255],
                        [234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255],
                        [251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255]
                    ],
                    [
                        [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],
                        [236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],
                        [251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],
                        [254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]
                    ]
                ],
                [
                    [
                        [248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255],
                        [248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],
                        [246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],
                        [252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255],
                        [248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255],
                        [253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],
                        [245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],
                        [253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255],
                        [252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255],
                        [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]
                    ],
                    [
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
                        [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]
                    ]
                ]
            ],
            h3 = [0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 0],
            ul = [],
            Ao = [],
            Is = [],
            d3 = 1,
            g2 = 2,
            fl = [],
            oo = [];
        ks("UpsampleRgbLinePair", rl, 3), ks("UpsampleBgrLinePair", Ln, 3), ks("UpsampleRgbaLinePair", la, 4), ks("UpsampleBgraLinePair", Du, 4), ks("UpsampleArgbLinePair", Tu, 4), ks("UpsampleRgba4444LinePair", sc, 2), ks("UpsampleRgb565LinePair", oc, 2);
        var p3 = A.UpsampleRgbLinePair,
            m3 = A.UpsampleBgrLinePair,
            v2 = A.UpsampleRgbaLinePair,
            x2 = A.UpsampleBgraLinePair,
            _2 = A.UpsampleArgbLinePair,
            y2 = A.UpsampleRgba4444LinePair,
            g3 = A.UpsampleRgb565LinePair,
            Kh = 16,
            Yh = 1 << Kh - 1,
            Bu = -227,
            Y1 = 482,
            b2 = 6,
            v3 = (256 << b2) - 1,
            w2 = 0,
            x3 = a(256),
            _3 = a(256),
            y3 = a(256),
            b3 = a(256),
            w3 = a(Y1 - Bu),
            S3 = a(Y1 - Bu);
        Fs("YuvToRgbRow", rl, 3), Fs("YuvToBgrRow", Ln, 3), Fs("YuvToRgbaRow", la, 4), Fs("YuvToBgraRow", Du, 4), Fs("YuvToArgbRow", Tu, 4), Fs("YuvToRgba4444Row", sc, 2), Fs("YuvToRgb565Row", oc, 2);
        var S2 = [0, 4, 8, 12, 128, 132, 136, 140, 256, 260, 264, 268, 384, 388, 392, 396],
            Zh = [0, 2, 8],
            C3 = [8, 7, 6, 4, 4, 2, 2, 2, 1, 1, 1, 1],
            A3 = 1;
        this.WebPDecodeRGBA = function(p, v, S, D, M) {
            var z = Hh,
                G = new Ke(),
                Y = new Ir();
            G.ba = Y, Y.S = z, Y.width = [Y.width], Y.height = [Y.height];
            var re = Y.width,
                ce = Y.height,
                Se = new qt();
            if (Se == null || p == null) var We = 2;
            else r(Se != null), We = lc(p, v, S, Se.width, Se.height, Se.Pd, Se.Qd, Se.format, null);
            if (We != 0 ? re = 0 : (re != null && (re[0] = Se.width[0]), ce != null && (ce[0] = Se.height[0]), re = 1), re) {
                Y.width = Y.width[0], Y.height = Y.height[0], D != null && (D[0] = Y.width), M != null && (M[0] = Y.height);
                e: {
                    if (D = new a0(), (M = new et()).data = p, M.w = v, M.ha = S, M.kd = 1, v = [0], r(M != null), ((p = lc(M.data, M.w, M.ha, null, null, null, v, null, M)) == 0 || p == 7) && v[0] && (p = 4), (v = p) == 0) {
                        if (r(G != null), D.data = M.data, D.w = M.w + M.offset, D.ha = M.ha - M.offset, D.put = Qt, D.ac = eo, D.bc = yo, D.ma = G, M.xa) {
                            if ((p = Me()) == null) {
                                G = 1;
                                break e;
                            }
                            if (function(ue, De) {
                                    var Ie = [0],
                                        qe = [0],
                                        Ve = [0];
                                    t: for (;;) {
                                        if (ue == null) return 0;
                                        if (De == null) return ue.a = 2, 0;
                                        if (ue.l = De, ue.a = 0, _e(ue.m, De.data, De.w, De.ha), !bo(ue.m, Ie, qe, Ve)) {
                                            ue.a = 3;
                                            break t;
                                        }
                                        if (ue.xb = g2, De.width = Ie[0], De.height = qe[0], !Le(Ie[0], qe[0], 1, ue, null)) break t;
                                        return 1;
                                    }
                                    return r(ue.a != 0), 0;
                                }(p, D)) {
                                if (D = (v = il(D.width, D.height, G.Oa, G.ba)) == 0) {
                                    t: {
                                        D = p;r: for (;;) {
                                            if (D == null) {
                                                D = 0;
                                                break t;
                                            }
                                            if (r(D.s.yc != null), r(D.s.Ya != null), r(0 < D.s.Wb), r((S = D.l) != null), r((M = S.ma) != null), D.xb != 0) {
                                                if (D.ca = M.ba, D.tb = M.tb, r(D.ca != null), !ku(M.Oa, S, Gh)) {
                                                    D.a = 2;
                                                    break r;
                                                }
                                                if (!Be(D, S.width) || S.da) break r;
                                                if ((S.da || Jt(D.ca.S)) && Co(), 11 > D.ca.S || (alert("todo:WebPInitConvertARGBToYUV"), D.ca.f.kb.F != null && Co()), D.Pb && 0 < D.s.ua && D.s.vb.X == null && !q(D.s.vb, D.s.Wa.Xa)) {
                                                    D.a = 1;
                                                    break r;
                                                }
                                                D.xb = 0;
                                            }
                                            if (!Ne(D, D.V, D.Ba, D.c, D.i, S.o, te)) break r;
                                            M.Dc = D.Ma, D = 1;
                                            break t;
                                        }
                                        r(D.a != 0),
                                        D = 0;
                                    }
                                    D = !D;
                                }
                                D && (v = p.a);
                            } else v = p.a;
                        } else {
                            if ((p = new D1()) == null) {
                                G = 1;
                                break e;
                            }
                            if (p.Fa = M.na, p.P = M.P, p.qc = M.Sa, Ho(p, D)) {
                                if ((v = il(D.width, D.height, G.Oa, G.ba)) == 0) {
                                    if (p.Aa = 0, S = G.Oa, r((M = p) != null), S != null) {
                                        if (0 < (re = 0 > (re = S.Md) ? 0 : 100 < re ? 255 : 255 * re / 100)) {
                                            for (ce = Se = 0; 4 > ce; ++ce) 12 > (We = M.pb[ce]).lc && (We.ia = re * C3[0 > We.lc ? 0 : We.lc] >> 3), Se |= We.ia;
                                            Se && (alert("todo:VP8InitRandom"), M.ia = 1);
                                        }
                                        M.Ga = S.Id, 100 < M.Ga ? M.Ga = 100 : 0 > M.Ga && (M.Ga = 0);
                                    }(function(ue, De) {
                                        if (ue == null) return 0;
                                        if (De == null) return an(ue, 2, "NULL VP8Io parameter in VP8Decode().");
                                        if (!ue.cb && !Ho(ue, De)) return 0;
                                        if (r(ue.cb), De.ac == null || De.ac(De)) {
                                            De.ob && (ue.L = 0);
                                            var Ie = Zh[ue.L];
                                            if (ue.L == 2 ? (ue.yb = 0, ue.zb = 0) : (ue.yb = De.v - Ie >> 4, ue.zb = De.j - Ie >> 4, 0 > ue.yb && (ue.yb = 0), 0 > ue.zb && (ue.zb = 0)), ue.Va = De.o + 15 + Ie >> 4, ue.Hb = De.va + 15 + Ie >> 4, ue.Hb > ue.za && (ue.Hb = ue.za), ue.Va > ue.Ub && (ue.Va = ue.Ub), 0 < ue.L) {
                                                var qe = ue.ed;
                                                for (Ie = 0; 4 > Ie; ++Ie) {
                                                    var Ve;
                                                    if (ue.Qa.Cb) {
                                                        var Xe = ue.Qa.Lb[Ie];
                                                        ue.Qa.Fb || (Xe += qe.Tb);
                                                    } else Xe = qe.Tb;
                                                    for (Ve = 0; 1 >= Ve; ++Ve) {
                                                        var Ye = ue.gd[Ie][Ve],
                                                            st = Xe;
                                                        if (qe.Pc && (st += qe.vd[0], Ve && (st += qe.od[0])), 0 < (st = 0 > st ? 0 : 63 < st ? 63 : st)) {
                                                            var tt = st;
                                                            0 < qe.wb && (tt = 4 < qe.wb ? tt >> 2 : tt >> 1) > 9 - qe.wb && (tt = 9 - qe.wb), 1 > tt && (tt = 1), Ye.dd = tt, Ye.tc = 2 * st + tt, Ye.ld = 40 <= st ? 2 : 15 <= st ? 1 : 0;
                                                        } else Ye.tc = 0;
                                                        Ye.La = Ve;
                                                    }
                                                }
                                            }
                                            Ie = 0;
                                        } else an(ue, 6, "Frame setup failed"), Ie = ue.a;
                                        if (Ie = Ie == 0) {
                                            if (Ie) {
                                                ue.$c = 0, 0 < ue.Aa || (ue.Ic = A3);
                                                t: {
                                                    Ie = ue.Ic,
                                                    qe = 4 * (tt = ue.za);
                                                    var zt = 32 * tt,
                                                        Tt = tt + 1,
                                                        Er = 0 < ue.L ? tt * (0 < ue.Aa ? 2 : 1) : 0,
                                                        It = (ue.Aa == 2 ? 2 : 1) * tt;
                                                    if ((Ye = qe + 832 + (Ve = 3 * (16 * Ie + Zh[ue.L]) / 2 * zt) + (Xe = ue.Fa != null && 0 < ue.Fa.length ? ue.Kc.c * ue.Kc.i : 0)) != Ye) Ie = 0;
                                                    else {
                                                        if (Ye > ue.Vb) {
                                                            if (ue.Vb = 0, ue.Ec = a(Ye), ue.Fc = 0, ue.Ec == null) {
                                                                Ie = an(ue, 1, "no memory during frame initialization.");
                                                                break t;
                                                            }
                                                            ue.Vb = Ye;
                                                        }
                                                        Ye = ue.Ec, st = ue.Fc, ue.Ac = Ye, ue.Bc = st, st += qe, ue.Gd = o(zt, to), ue.Hd = 0, ue.rb = o(Tt + 1, bi), ue.sb = 1, ue.wa = Er ? o(Er, mi) : null, ue.Y = 0, ue.D.Nb = 0, ue.D.wa = ue.wa, ue.D.Y = ue.Y, 0 < ue.Aa && (ue.D.Y += tt), r(!0), ue.oc = Ye, ue.pc = st, st += 832, ue.ya = o(It, wo), ue.aa = 0, ue.D.ya = ue.ya, ue.D.aa = ue.aa, ue.Aa == 2 && (ue.D.aa += tt), ue.R = 16 * tt, ue.B = 8 * tt, tt = (zt = Zh[ue.L]) * ue.R, zt = zt / 2 * ue.B, ue.sa = Ye, ue.ta = st + tt, ue.qa = ue.sa, ue.ra = ue.ta + 16 * Ie * ue.R + zt, ue.Ha = ue.qa, ue.Ia = ue.ra + 8 * Ie * ue.B + zt, ue.$c = 0, st += Ve, ue.mb = Xe ? Ye : null, ue.nb = Xe ? st : null, r(st + Xe <= ue.Fc + ue.Vb), Fh(ue), n(ue.Ac, ue.Bc, 0, qe), Ie = 1;
                                                    }
                                                }
                                                if (Ie) {
                                                    if (De.ka = 0, De.y = ue.sa, De.O = ue.ta, De.f = ue.qa, De.N = ue.ra, De.ea = ue.Ha, De.Vd = ue.Ia, De.fa = ue.R, De.Rc = ue.B, De.F = null, De.J = 0, !f2) {
                                                        for (Ie = -255; 255 >= Ie; ++Ie) s2[255 + Ie] = 0 > Ie ? -Ie : Ie;
                                                        for (Ie = -1020; 1020 >= Ie; ++Ie) l2[1020 + Ie] = -128 > Ie ? -128 : 127 < Ie ? 127 : Ie;
                                                        for (Ie = -112; 112 >= Ie; ++Ie) c2[112 + Ie] = -16 > Ie ? -16 : 15 < Ie ? 15 : Ie;
                                                        for (Ie = -255; 510 >= Ie; ++Ie) u2[255 + Ie] = 0 > Ie ? 0 : 255 < Ie ? 255 : Ie;
                                                        f2 = 1;
                                                    }
                                                    cl = s0, fc = F1, Ko = Go, ri = Ph, gi = Ih, no = k1, Xi = Mh, _n = ic, Ps = R, Lu = he, d0 = Bh, zh = y, Qv = we, $v = Ee, e2 = rc, t2 = Cu, r2 = Lh, i2 = Rh, Ao[0] = M1, Ao[1] = E1, Ao[2] = L1, Ao[3] = R1, Ao[4] = bs, Ao[5] = B1, Ao[6] = ws, Ao[7] = U1, Ao[8] = _u, Ao[9] = l0, ul[0] = O1, ul[1] = I1, ul[2] = vu, ul[3] = Oh, ul[4] = ec, ul[5] = xu, ul[6] = N1, Is[0] = z1, Is[1] = P1, Is[2] = tc, Is[3] = V1, Is[4] = bu, Is[5] = yu, Is[6] = Nh, Ie = 1;
                                                } else Ie = 0;
                                            }
                                            Ie && (Ie = function(zr, yn) {
                                                for (zr.M = 0; zr.M < zr.Va; ++zr.M) {
                                                    var Pr, Ot = zr.Jc[zr.M & zr.Xb],
                                                        mt = zr.m,
                                                        Ki = zr;
                                                    for (Pr = 0; Pr < Ki.za; ++Pr) {
                                                        var br = mt,
                                                            jr = Ki,
                                                            Ai = jr.Ac,
                                                            Rn = jr.Bc + 4 * Pr,
                                                            ca = jr.zc,
                                                            Vi = jr.ya[jr.aa + Pr];
                                                        if (jr.Qa.Bb ? Vi.$b = Z(br, jr.Pa.jb[0]) ? 2 + Z(br, jr.Pa.jb[2]) : Z(br, jr.Pa.jb[1]) : Vi.$b = 0, jr.kc && (Vi.Ad = Z(br, jr.Bd)), Vi.Za = !Z(br, 145) + 0, Vi.Za) {
                                                            var qn = Vi.Ob,
                                                                ua = 0;
                                                            for (jr = 0; 4 > jr; ++jr) {
                                                                var bn, Xr = ca[0 + jr];
                                                                for (bn = 0; 4 > bn; ++bn) {
                                                                    Xr = u3[Ai[Rn + bn]][Xr];
                                                                    for (var oi = m2[Z(br, Xr[0])]; 0 < oi;) oi = m2[2 * oi + Z(br, Xr[oi])];
                                                                    Xr = -oi, Ai[Rn + bn] = Xr;
                                                                }
                                                                i(qn, ua, Ai, Rn, 4), ua += 4, ca[0 + jr] = Xr;
                                                            }
                                                        } else Xr = Z(br, 156) ? Z(br, 128) ? 1 : 3 : Z(br, 163) ? 2 : 0, Vi.Ob[0] = Xr, n(Ai, Rn, Xr, 4), n(ca, 0, Xr, 4);
                                                        Vi.Dd = Z(br, 142) ? Z(br, 114) ? Z(br, 183) ? 1 : 3 : 2 : 0;
                                                    }
                                                    if (Ki.m.Ka) return an(zr, 7, "Premature end-of-partition0 encountered.");
                                                    for (; zr.ja < zr.za; ++zr.ja) {
                                                        if (Ki = Ot, br = (mt = zr).rb[mt.sb - 1], Ai = mt.rb[mt.sb + mt.ja], Pr = mt.ya[mt.aa + mt.ja], Rn = mt.kc ? Pr.Ad : 0) br.la = Ai.la = 0, Pr.Za || (br.Na = Ai.Na = 0), Pr.Hc = 0, Pr.Gc = 0, Pr.ia = 0;
                                                        else {
                                                            var zi, si;
                                                            if (br = Ai, Ai = Ki, Rn = mt.Pa.Xc, ca = mt.ya[mt.aa + mt.ja], Vi = mt.pb[ca.$b], jr = ca.ad, qn = 0, ua = mt.rb[mt.sb - 1], Xr = bn = 0, n(jr, qn, 0, 384), ca.Za) var Mn = 0,
                                                                To = Rn[3];
                                                            else {
                                                                oi = a(16);
                                                                var Yi = br.Na + ua.Na;
                                                                if (Yi = Mu(Ai, Rn[1], Yi, Vi.Eb, 0, oi, 0), br.Na = ua.Na = (0 < Yi) + 0, 1 < Yi) cl(oi, 0, jr, qn);
                                                                else {
                                                                    var Aa = oi[0] + 3 >> 3;
                                                                    for (oi = 0; 256 > oi; oi += 16) jr[qn + oi] = Aa;
                                                                }
                                                                Mn = 1, To = Rn[0];
                                                            }
                                                            var vi = 15 & br.la,
                                                                wn = 15 & ua.la;
                                                            for (oi = 0; 4 > oi; ++oi) {
                                                                var Ra = 1 & wn;
                                                                for (Aa = si = 0; 4 > Aa; ++Aa) vi = vi >> 1 | (Ra = (Yi = Mu(Ai, To, Yi = Ra + (1 & vi), Vi.Sc, Mn, jr, qn)) > Mn) << 7, si = si << 2 | (3 < Yi ? 3 : 1 < Yi ? 2 : jr[qn + 0] != 0), qn += 16;
                                                                vi >>= 4, wn = wn >> 1 | Ra << 7, bn = (bn << 8 | si) >>> 0;
                                                            }
                                                            for (To = vi, Mn = wn >> 4, zi = 0; 4 > zi; zi += 2) {
                                                                for (si = 0, vi = br.la >> 4 + zi, wn = ua.la >> 4 + zi, oi = 0; 2 > oi; ++oi) {
                                                                    for (Ra = 1 & wn, Aa = 0; 2 > Aa; ++Aa) Yi = Ra + (1 & vi), vi = vi >> 1 | (Ra = 0 < (Yi = Mu(Ai, Rn[2], Yi, Vi.Qc, 0, jr, qn))) << 3, si = si << 2 | (3 < Yi ? 3 : 1 < Yi ? 2 : jr[qn + 0] != 0), qn += 16;
                                                                    vi >>= 2, wn = wn >> 1 | Ra << 5;
                                                                }
                                                                Xr |= si << 4 * zi, To |= vi << 4 << zi, Mn |= (240 & wn) << zi;
                                                            }
                                                            br.la = To, ua.la = Mn, ca.Hc = bn, ca.Gc = Xr, ca.ia = 43690 & Xr ? 0 : Vi.ia, Rn = !(bn | Xr);
                                                        }
                                                        if (0 < mt.L && (mt.wa[mt.Y + mt.ja] = mt.gd[Pr.$b][Pr.Za], mt.wa[mt.Y + mt.ja].La |= !Rn), Ki.Ka) return an(zr, 7, "Premature end-of-file encountered.");
                                                    }
                                                    if (Fh(zr), mt = yn, Ki = 1, Pr = (Ot = zr).D, br = 0 < Ot.L && Ot.M >= Ot.zb && Ot.M <= Ot.Va, Ot.Aa == 0) t: {
                                                        if (Pr.M = Ot.M, Pr.uc = br, io(Ot, Pr), Ki = 1, Pr = (si = Ot.D).Nb, br = (Xr = Zh[Ot.L]) * Ot.R, Ai = Xr / 2 * Ot.B, oi = 16 * Pr * Ot.R, Aa = 8 * Pr * Ot.B, Rn = Ot.sa, ca = Ot.ta - br + oi, Vi = Ot.qa, jr = Ot.ra - Ai + Aa, qn = Ot.Ha, ua = Ot.Ia - Ai + Aa, wn = (vi = si.M) == 0, bn = vi >= Ot.Va - 1, Ot.Aa == 2 && io(Ot, si), si.uc)
                                                            for (Ra = (Yi = Ot).D.M, r(Yi.D.uc), si = Yi.yb; si < Yi.Hb; ++si) {
                                                                Mn = si, To = Ra;
                                                                var fa = (Ma = (Bn = Yi).D).Nb;
                                                                zi = Bn.R;
                                                                var Ma = Ma.wa[Ma.Y + Mn],
                                                                    Ba = Bn.sa,
                                                                    Ta = Bn.ta + 16 * fa * zi + 16 * Mn,
                                                                    Ua = Ma.dd,
                                                                    Si = Ma.tc;
                                                                if (Si != 0)
                                                                    if (r(3 <= Si), Bn.L == 1) 0 < Mn && t2(Ba, Ta, zi, Si + 4), Ma.La && i2(Ba, Ta, zi, Si), 0 < To && e2(Ba, Ta, zi, Si + 4), Ma.La && r2(Ba, Ta, zi, Si);
                                                                    else {
                                                                        var Va = Bn.B,
                                                                            Do = Bn.qa,
                                                                            hc = Bn.ra + 8 * fa * Va + 8 * Mn,
                                                                            Os = Bn.Ha,
                                                                            Bn = Bn.Ia + 8 * fa * Va + 8 * Mn;
                                                                        fa = Ma.ld, 0 < Mn && (_n(Ba, Ta, zi, Si + 4, Ua, fa), Lu(Do, hc, Os, Bn, Va, Si + 4, Ua, fa)), Ma.La && (zh(Ba, Ta, zi, Si, Ua, fa), $v(Do, hc, Os, Bn, Va, Si, Ua, fa)), 0 < To && (Xi(Ba, Ta, zi, Si + 4, Ua, fa), Ps(Do, hc, Os, Bn, Va, Si + 4, Ua, fa)), Ma.La && (d0(Ba, Ta, zi, Si, Ua, fa), Qv(Do, hc, Os, Bn, Va, Si, Ua, fa));
                                                                    }
                                                            }
                                                        if (Ot.ia && alert("todo:DitherRow"), mt.put != null) {
                                                            if (si = 16 * vi, vi = 16 * (vi + 1), wn ? (mt.y = Ot.sa, mt.O = Ot.ta + oi, mt.f = Ot.qa, mt.N = Ot.ra + Aa, mt.ea = Ot.Ha, mt.W = Ot.Ia + Aa) : (si -= Xr, mt.y = Rn, mt.O = ca, mt.f = Vi, mt.N = jr, mt.ea = qn, mt.W = ua), bn || (vi -= Xr), vi > mt.o && (vi = mt.o), mt.F = null, mt.J = null, Ot.Fa != null && 0 < Ot.Fa.length && si < vi && (mt.J = wi(Ot, mt, si, vi - si), mt.F = Ot.mb, mt.F == null && mt.F.length == 0)) {
                                                                Ki = an(Ot, 3, "Could not decode alpha data.");
                                                                break t;
                                                            }
                                                            si < mt.j && (Xr = mt.j - si, si = mt.j, r(!(1 & Xr)), mt.O += Ot.R * Xr, mt.N += Ot.B * (Xr >> 1), mt.W += Ot.B * (Xr >> 1), mt.F != null && (mt.J += mt.width * Xr)), si < vi && (mt.O += mt.v, mt.N += mt.v >> 1, mt.W += mt.v >> 1, mt.F != null && (mt.J += mt.v), mt.ka = si - mt.j, mt.U = mt.va - mt.v, mt.T = vi - si, Ki = mt.put(mt));
                                                        }
                                                        Pr + 1 != Ot.Ic || bn || (i(Ot.sa, Ot.ta - br, Rn, ca + 16 * Ot.R, br), i(Ot.qa, Ot.ra - Ai, Vi, jr + 8 * Ot.B, Ai), i(Ot.Ha, Ot.Ia - Ai, qn, ua + 8 * Ot.B, Ai));
                                                    }
                                                    if (!Ki) return an(zr, 6, "Output aborted.");
                                                }
                                                return 1;
                                            }(ue, De)), De.bc != null && De.bc(De), Ie &= 1;
                                        }
                                        return Ie ? (ue.cb = 0, Ie) : 0;
                                    })(p, D) || (v = p.a);
                                }
                            } else v = p.a;
                        }
                        v == 0 && G.Oa != null && G.Oa.fd && (v = Fu(G.ba));
                    }
                    G = v;
                }
                z = G != 0 ? null : 11 > z ? Y.f.RGBA.eb : Y.f.kb.y;
            } else z = null;
            return z;
        };
        var C2 = [3, 4, 3, 4, 4, 2, 2, 4, 4, 4, 2, 1, 1];
    };

    function c(A, N) {
        for (var C = "", F = 0; F < 4; F++) C += String.fromCharCode(A[N++]);
        return C;
    }

    function u(A, N) {
        return A[N + 0] | A[N + 1] << 8;
    }

    function h(A, N) {
        return (A[N + 0] | A[N + 1] << 8 | A[N + 2] << 16) >>> 0;
    }

    function d(A, N) {
        return (A[N + 0] | A[N + 1] << 8 | A[N + 2] << 16 | A[N + 3] << 24) >>> 0;
    }
    new l();
    var f = [0],
        m = [0],
        _ = [],
        x = new l(),
        g = t,
        b = function(A, N) {
            var C = {},
                F = 0,
                W = !1,
                I = 0,
                U = 0;
            if (C.frames = [], ! function(O, j) {
                    for (var X = 0; X < 4; X++)
                        if (O[j + X] != "RIFF".charCodeAt(X)) return !0;
                    return !1;
                }(A, N)) {
                for (d(A, N += 4), N += 8; N < A.length;) {
                    var le = c(A, N),
                        H = d(A, N += 4);
                    N += 4;
                    var pe = H + (1 & H);
                    switch (le) {
                        case "VP8 ":
                        case "VP8L":
                            C.frames[F] === void 0 && (C.frames[F] = {}), (Te = C.frames[F]).src_off = W ? U : N - 8, Te.src_size = I + H + 8, F++, W && (W = !1, I = 0, U = 0);
                            break;
                        case "VP8X":
                            (Te = C.header = {}).feature_flags = A[N];
                            var _e = N + 4;
                            Te.canvas_width = 1 + h(A, _e), _e += 3, Te.canvas_height = 1 + h(A, _e), _e += 3;
                            break;
                        case "ALPH":
                            W = !0, I = pe + 8, U = N - 8;
                            break;
                        case "ANIM":
                            (Te = C.header).bgcolor = d(A, N), _e = N + 4, Te.loop_count = u(A, _e), _e += 2;
                            break;
                        case "ANMF":
                            var Fe, Te;
                            (Te = C.frames[F] = {}).offset_x = 2 * h(A, N), N += 3, Te.offset_y = 2 * h(A, N), N += 3, Te.width = 1 + h(A, N), N += 3, Te.height = 1 + h(A, N), N += 3, Te.duration = h(A, N), N += 3, Fe = A[N++], Te.dispose = 1 & Fe, Te.blend = Fe >> 1 & 1;
                    }
                    le != "ANMF" && (N += pe);
                }
                return C;
            }
        }(g, 0);
    b.response = g, b.rgbaoutput = !0, b.dataurl = !1;
    var w = b.header ? b.header : null,
        T = b.frames ? b.frames : null;
    if (w) {
        w.loop_counter = w.loop_count, f = [w.canvas_height], m = [w.canvas_width];
        for (var E = 0; E < T.length && T[E].blend != 0; E++);
    }
    var L = T[0],
        P = x.WebPDecodeRGBA(g, L.src_off, L.src_size, m, f);
    L.rgba = P, L.imgwidth = m[0], L.imgheight = f[0];
    for (var k = 0; k < m[0] * f[0] * 4; k++) _[k] = P[k];
    return this.width = m, this.height = f, this.data = _, this;
}
var hr, xi, _c, rp, vy, xy, hA, _y, ji, ig, Ac, S0, yr, kl, ka, by, ts, dA, pA, mA, Ji, Qi, $i, gA, vA, tg, $d, xA, _A, yA, jy, Km, rs, Hy, Gy, No, bc, wc, Sc, of , Cn, sf, Cc, ip, lf, Pl, cf, Dt, bA, wA, Xy, Ky, rg, Yy, SA, CA, Sy, ep, Ty, Dy, C0, tp, ky, Fy, Ey, Zm, Lo, Il, PA, IA, is, OA, Uy, Jy, NA, LA, RA, MA, BA, UA, VA, Qy, zA, WA, jA, HA, GA, ap = Ii(() => {
    "use strict";
    D_();
    V_();
    Z_();
    my();
    hr = function() {
        return typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : this;
    }();
    xi = {
        log: Gm,
        warn: function(t) {
            hr.console && (typeof hr.console.warn == "function" ? hr.console.warn.apply(hr.console, arguments) : Gm.call(null, arguments));
        },
        error: function(t) {
            hr.console && (typeof hr.console.error == "function" ? hr.console.error.apply(hr.console, arguments) : Gm(t));
        }
    };
    _c = hr.saveAs || ((typeof window > "u" ? "undefined" : ni(window)) !== "object" || window !== hr ? function() {} : typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype ? function(t, r, e) {
        var i = hr.URL || hr.webkitURL,
            n = document.createElement("a");
        r = r || t.name || "download", n.download = r, n.rel = "noopener", typeof t == "string" ? (n.href = t, n.origin !== location.origin ? gy(n.href) ? qm(t, r, e) : Qd(n, n.target = "_blank") : Qd(n)) : (n.href = i.createObjectURL(t), setTimeout(function() {
            i.revokeObjectURL(n.href);
        }, 4e4), setTimeout(function() {
            Qd(n);
        }, 0));
    } : "msSaveOrOpenBlob" in navigator ? function(t, r, e) {
        if (r = r || t.name || "download", typeof t == "string") {
            if (gy(t)) qm(t, r, e);
            else {
                var i = document.createElement("a");
                i.href = t, i.target = "_blank", setTimeout(function() {
                    Qd(i);
                });
            }
        } else navigator.msSaveOrOpenBlob(function(n, a) {
            return a === void 0 ? a = {
                autoBom: !1
            } : ni(a) !== "object" && (xi.warn("Deprecated: Expected third argument to be a object"), a = {
                autoBom: !a
            }), a.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(n.type) ? new Blob(["\uFEFF", n], {
                type: n.type
            }) : n;
        }(t, e), r);
    } : function(t, r, e, i) {
        if ((i = i || open("", "_blank")) && (i.document.title = i.document.body.innerText = "downloading..."), typeof t == "string") return qm(t, r, e);
        var n = t.type === "application/octet-stream",
            a = /constructor/i.test(hr.HTMLElement) || hr.safari,
            o = /CriOS\/[\d]+/.test(navigator.userAgent);
        if ((o || n && a) && (typeof FileReader > "u" ? "undefined" : ni(FileReader)) === "object") {
            var s = new FileReader();
            s.onloadend = function() {
                var u = s.result;
                u = o ? u : u.replace(/^data:[^;]*;/, "data:attachment/file;"), i ? i.location.href = u : location = u, i = null;
            }, s.readAsDataURL(t);
        } else {
            var l = hr.URL || hr.webkitURL,
                c = l.createObjectURL(t);
            i ? i.location = c : location.href = c, i = null, setTimeout(function() {
                l.revokeObjectURL(c);
            }, 4e4);
        }
    });
    rp = hr.atob.bind(hr), vy = hr.btoa.bind(hr);
    xy = "0123456789abcdef".split("");
    hA = function(t) {
        for (var r = 0; r < t.length; r++) t[r] = uA(t[r]);
        return t.join("");
    }(zy("hello")) != "5d41402abc4b2a76b9719d911017c592";
    _y = {
        print: 4,
        modify: 8,
        copy: 16,
        "annot-forms": 32
    };
    A0.prototype.lsbFirstWord = function(t) {
        return String.fromCharCode(255 & t, t >> 8 & 255, t >> 16 & 255, t >> 24 & 255);
    }, A0.prototype.toHexString = function(t) {
        return t.split("").map(function(r) {
            return ("0" + (255 & r.charCodeAt(0)).toString(16)).slice(-2);
        }).join("");
    }, A0.prototype.hexToBytes = function(t) {
        for (var r = [], e = 0; e < t.length; e += 2) r.push(String.fromCharCode(parseInt(t.substr(e, 2), 16)));
        return r.join("");
    }, A0.prototype.processOwnerPassword = function(t, r) {
        return eg($m(r).substr(0, 5), t);
    }, A0.prototype.encryptor = function(t, r) {
        var e = $m(this.encryptionKey + String.fromCharCode(255 & t, t >> 8 & 255, t >> 16 & 255, 255 & r, r >> 8 & 255)).substr(0, 10);
        return function(i) {
            return eg(e, i);
        };
    }, uf.prototype.equals = function(t) {
        var r, e = "id,objectNumber,equals";
        if (!t || ni(t) !== ni(this)) return !1;
        var i = 0;
        for (r in this)
            if (!(e.indexOf(r) >= 0)) {
                if (this.hasOwnProperty(r) && !t.hasOwnProperty(r) || this[r] !== t[r]) return !1;
                i++;
            }
        for (r in t) t.hasOwnProperty(r) && e.indexOf(r) < 0 && i--;
        return i === 0;
    }, Bt.API = {
        events: []
    }, Bt.version = "3.0.4";
    ji = Bt.API, ig = 1, Ac = function(t) {
        return t.replace(/\\/g, "\\\\").replace(/\(/g, "\\(").replace(/\)/g, "\\)");
    }, S0 = function(t) {
        return t.replace(/\\\\/g, "\\").replace(/\\\(/g, "(").replace(/\\\)/g, ")");
    }, yr = function(t) {
        return t.toFixed(2);
    }, kl = function(t) {
        return t.toFixed(5);
    };
    ji.__acroform__ = {};
    ka = function(t, r) {
        t.prototype = Object.create(r.prototype), t.prototype.constructor = t;
    }, by = function(t) {
        return t * ig;
    }, ts = function(t) {
        var r = new Hy(),
            e = Dt.internal.getHeight(t) || 0,
            i = Dt.internal.getWidth(t) || 0;
        return r.BBox = [0, 0, Number(yr(i)), Number(yr(e))], r;
    }, dA = ji.__acroform__.setBit = function(t, r) {
        if (t = t || 0, r = r || 0, isNaN(t) || isNaN(r)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");
        return t | 1 << r;
    }, pA = ji.__acroform__.clearBit = function(t, r) {
        if (t = t || 0, r = r || 0, isNaN(t) || isNaN(r)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");
        return t & ~(1 << r);
    }, mA = ji.__acroform__.getBit = function(t, r) {
        if (isNaN(t) || isNaN(r)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");
        return t & 1 << r ? 1 : 0;
    }, Ji = ji.__acroform__.getBitForPdf = function(t, r) {
        if (isNaN(t) || isNaN(r)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");
        return mA(t, r - 1);
    }, Qi = ji.__acroform__.setBitForPdf = function(t, r) {
        if (isNaN(t) || isNaN(r)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");
        return dA(t, r - 1);
    }, $i = ji.__acroform__.clearBitForPdf = function(t, r) {
        if (isNaN(t) || isNaN(r)) throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");
        return pA(t, r - 1);
    }, gA = ji.__acroform__.calculateCoordinates = function(t, r) {
        var e = r.internal.getHorizontalCoordinate,
            i = r.internal.getVerticalCoordinate,
            n = t[0],
            a = t[1],
            o = t[2],
            s = t[3],
            l = {};
        return l.lowerLeft_X = e(n) || 0, l.lowerLeft_Y = i(a + s) || 0, l.upperRight_X = e(n + o) || 0, l.upperRight_Y = i(a) || 0, [Number(yr(l.lowerLeft_X)), Number(yr(l.lowerLeft_Y)), Number(yr(l.upperRight_X)), Number(yr(l.upperRight_Y))];
    }, vA = function(t) {
        if (t.appearanceStreamContent) return t.appearanceStreamContent;
        if (t.V || t.DV) {
            var r = [],
                e = t._V || t.DV,
                i = tg(t, e),
                n = t.scope.internal.getFont(t.fontName, t.fontStyle).id;
            r.push("/Tx BMC"), r.push("q"), r.push("BT"), r.push(t.scope.__private__.encodeColorString(t.color)), r.push("/" + n + " " + yr(i.fontSize) + " Tf"), r.push("1 0 0 1 0 0 Tm"), r.push(i.text), r.push("ET"), r.push("Q"), r.push("EMC");
            var a = ts(t);
            return a.scope = t.scope, a.stream = r.join(`
`), a;
        }
    }, tg = function(t, r) {
        var e = t.fontSize === 0 ? t.maxFontSize : t.fontSize,
            i = {
                text: "",
                fontSize: ""
            },
            n = (r = (r = r.substr(0, 1) == "(" ? r.substr(1) : r).substr(r.length - 1) == ")" ? r.substr(0, r.length - 1) : r).split(" ");
        n = t.multiline ? n.map(function(C) {
            return C.split(`
`);
        }) : n.map(function(C) {
            return [C];
        });
        var a = e,
            o = Dt.internal.getHeight(t) || 0;
        o = o < 0 ? -o : o;
        var s = Dt.internal.getWidth(t) || 0;
        s = s < 0 ? -s : s;
        var l = function(C, F, W) {
            if (C + 1 < n.length) {
                var I = F + " " + n[C + 1][0];
                return $d(I, t, W).width <= s - 4;
            }
            return !1;
        };
        a++;
        e: for (; a > 0;) {
            r = "", a--;
            var c, u, h = $d("3", t, a).height,
                d = t.multiline ? o - a : (o - h) / 2,
                f = d += 2,
                m = 0,
                _ = 0,
                x = 0;
            if (a <= 0) {
                r = `(...) Tj
`, r += "% Width of Text: " + $d(r, t, a = 12).width + ", FieldWidth:" + s + `
`;
                break;
            }
            for (var g = "", b = 0, w = 0; w < n.length; w++)
                if (n.hasOwnProperty(w)) {
                    var T = !1;
                    if (n[w].length !== 1 && x !== n[w].length - 1) {
                        if ((h + 2) * (b + 2) + 2 > o) continue e;
                        g += n[w][x], T = !0, _ = w, w--;
                    } else {
                        g = (g += n[w][x] + " ").substr(g.length - 1) == " " ? g.substr(0, g.length - 1) : g;
                        var E = parseInt(w),
                            L = l(E, g, a),
                            P = w >= n.length - 1;
                        if (L && !P) {
                            g += " ", x = 0;
                            continue;
                        }
                        if (L || P) {
                            if (P) _ = E;
                            else if (t.multiline && (h + 2) * (b + 2) + 2 > o) continue e;
                        } else {
                            if (!t.multiline || (h + 2) * (b + 2) + 2 > o) continue e;
                            _ = E;
                        }
                    }
                    for (var k = "", A = m; A <= _; A++) {
                        var N = n[A];
                        if (t.multiline) {
                            if (A === _) {
                                k += N[x] + " ", x = (x + 1) % N.length;
                                continue;
                            }
                            if (A === m) {
                                k += N[N.length - 1] + " ";
                                continue;
                            }
                        }
                        k += N[0] + " ";
                    }
                    switch (k = k.substr(k.length - 1) == " " ? k.substr(0, k.length - 1) : k, u = $d(k, t, a).width, t.textAlign) {
                        case "right":
                            c = s - u - 2;
                            break;
                        case "center":
                            c = (s - u) / 2;
                            break;
                        default:
                            c = 2;
                    }
                    r += yr(c) + " " + yr(f) + ` Td
`, r += "(" + Ac(k) + `) Tj
`, r += -yr(c) + ` 0 Td
`, f = -(a + 2), u = 0, m = T ? _ : _ + 1, b++, g = "";
                }
            break;
        }
        return i.text = r, i.fontSize = a, i;
    }, $d = function(t, r, e) {
        var i = r.scope.internal.getFont(r.fontName, r.fontStyle),
            n = r.scope.getStringUnitWidth(t, {
                font: i,
                fontSize: parseFloat(e),
                charSpace: 0
            }) * parseFloat(e);
        return {
            height: r.scope.getStringUnitWidth("3", {
                font: i,
                fontSize: parseFloat(e),
                charSpace: 0
            }) * parseFloat(e) * 1.5,
            width: n
        };
    }, xA = {
        fields: [],
        xForms: [],
        acroFormDictionaryRoot: null,
        printedOut: !1,
        internal: null,
        isInitialized: !1
    }, _A = function(t, r) {
        var e = {
            type: "reference",
            object: t
        };
        r.internal.getPageInfo(t.page).pageContext.annotations.find(function(i) {
            return i.type === e.type && i.object === e.object;
        }) === void 0 && r.internal.getPageInfo(t.page).pageContext.annotations.push(e);
    }, yA = function(t, r) {
        if (r.scope = t, t.internal !== void 0 && (t.internal.acroformPlugin === void 0 || t.internal.acroformPlugin.isInitialized === !1)) {
            if (No.FieldNum = 0, t.internal.acroformPlugin = JSON.parse(JSON.stringify(xA)), t.internal.acroformPlugin.acroFormDictionaryRoot) throw new Error("Exception while creating AcroformDictionary");
            ig = t.internal.scaleFactor, t.internal.acroformPlugin.acroFormDictionaryRoot = new Gy(), t.internal.acroformPlugin.acroFormDictionaryRoot.scope = t, t.internal.acroformPlugin.acroFormDictionaryRoot._eventID = t.internal.events.subscribe("postPutResources", function() {
                (function(e) {
                    e.internal.events.unsubscribe(e.internal.acroformPlugin.acroFormDictionaryRoot._eventID), delete e.internal.acroformPlugin.acroFormDictionaryRoot._eventID, e.internal.acroformPlugin.printedOut = !0;
                })(t);
            }), t.internal.events.subscribe("buildDocument", function() {
                (function(e) {
                    e.internal.acroformPlugin.acroFormDictionaryRoot.objId = void 0;
                    var i = e.internal.acroformPlugin.acroFormDictionaryRoot.Fields;
                    for (var n in i)
                        if (i.hasOwnProperty(n)) {
                            var a = i[n];
                            a.objId = void 0, a.hasAnnotation && _A(a, e);
                        }
                })(t);
            }), t.internal.events.subscribe("putCatalog", function() {
                (function(e) {
                    if (e.internal.acroformPlugin.acroFormDictionaryRoot === void 0) throw new Error("putCatalogCallback: Root missing.");
                    e.internal.write("/AcroForm " + e.internal.acroformPlugin.acroFormDictionaryRoot.objId + " 0 R");
                })(t);
            }), t.internal.events.subscribe("postPutPages", function(e) {
                (function(i, n) {
                    var a = !i;
                    for (var o in i || (n.internal.newObjectDeferredBegin(n.internal.acroformPlugin.acroFormDictionaryRoot.objId, !0), n.internal.acroformPlugin.acroFormDictionaryRoot.putStream()), i = i || n.internal.acroformPlugin.acroFormDictionaryRoot.Kids)
                        if (i.hasOwnProperty(o)) {
                            var s = i[o],
                                l = [],
                                c = s.Rect;
                            if (s.Rect && (s.Rect = gA(s.Rect, n)), n.internal.newObjectDeferredBegin(s.objId, !0), s.DA = Dt.createDefaultAppearanceStream(s), ni(s) === "object" && typeof s.getKeyValueListForStream == "function" && (l = s.getKeyValueListForStream()), s.Rect = c, s.hasAppearanceStream && !s.appearanceStreamContent) {
                                var u = vA(s);
                                l.push({
                                    key: "AP",
                                    value: "<</N " + u + ">>"
                                }), n.internal.acroformPlugin.xForms.push(u);
                            }
                            if (s.appearanceStreamContent) {
                                var h = "";
                                for (var d in s.appearanceStreamContent)
                                    if (s.appearanceStreamContent.hasOwnProperty(d)) {
                                        var f = s.appearanceStreamContent[d];
                                        if (h += "/" + d + " ", h += "<<", Object.keys(f).length >= 1 || Array.isArray(f)) {
                                            for (var o in f)
                                                if (f.hasOwnProperty(o)) {
                                                    var m = f[o];
                                                    typeof m == "function" && (m = m.call(n, s)), h += "/" + o + " " + m + " ", n.internal.acroformPlugin.xForms.indexOf(m) >= 0 || n.internal.acroformPlugin.xForms.push(m);
                                                }
                                        } else typeof(m = f) == "function" && (m = m.call(n, s)), h += "/" + o + " " + m, n.internal.acroformPlugin.xForms.indexOf(m) >= 0 || n.internal.acroformPlugin.xForms.push(m);
                                        h += ">>";
                                    }
                                l.push({
                                    key: "AP",
                                    value: `<<
` + h + ">>"
                                });
                            }
                            n.internal.putStream({
                                additionalKeyValues: l,
                                objectId: s.objId
                            }), n.internal.out("endobj");
                        }
                    a && function(_, x) {
                        for (var g in _)
                            if (_.hasOwnProperty(g)) {
                                var b = g,
                                    w = _[g];
                                x.internal.newObjectDeferredBegin(w.objId, !0), ni(w) === "object" && typeof w.putStream == "function" && w.putStream(), delete _[b];
                            }
                    }(n.internal.acroformPlugin.xForms, n);
                })(e, t);
            }), t.internal.acroformPlugin.isInitialized = !0;
        }
    }, jy = ji.__acroform__.arrayToPdfArray = function(t, r, e) {
        var i = function(o) {
            return o;
        };
        if (Array.isArray(t)) {
            for (var n = "[", a = 0; a < t.length; a++) switch (a !== 0 && (n += " "), ni(t[a])) {
                case "boolean":
                case "number":
                case "object":
                    n += t[a].toString();
                    break;
                case "string":
                    t[a].substr(0, 1) !== "/" ? (r !== void 0 && e && (i = e.internal.getEncryptor(r)), n += "(" + Ac(i(t[a].toString())) + ")") : n += t[a].toString();
            }
            return n + "]";
        }
        throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray");
    }, Km = function(t, r, e) {
        var i = function(n) {
            return n;
        };
        return r !== void 0 && e && (i = e.internal.getEncryptor(r)), (t = t || "").toString(), "(" + Ac(i(t)) + ")";
    }, rs = function() {
        this._objId = void 0, this._scope = void 0, Object.defineProperty(this, "objId", {
            get: function() {
                if (this._objId === void 0) {
                    if (this.scope === void 0) return;
                    this._objId = this.scope.internal.newObjectDeferred();
                }
                return this._objId;
            },
            set: function(t) {
                this._objId = t;
            }
        }), Object.defineProperty(this, "scope", {
            value: this._scope,
            writable: !0
        });
    };
    rs.prototype.toString = function() {
        return this.objId + " 0 R";
    }, rs.prototype.putStream = function() {
        var t = this.getKeyValueListForStream();
        this.scope.internal.putStream({
            data: this.stream,
            additionalKeyValues: t,
            objectId: this.objId
        }), this.scope.internal.out("endobj");
    }, rs.prototype.getKeyValueListForStream = function() {
        var t = [],
            r = Object.getOwnPropertyNames(this).filter(function(a) {
                return a != "content" && a != "appearanceStreamContent" && a != "scope" && a != "objId" && a.substring(0, 1) != "_";
            });
        for (var e in r)
            if (Object.getOwnPropertyDescriptor(this, r[e]).configurable === !1) {
                var i = r[e],
                    n = this[i];
                n && (Array.isArray(n) ? t.push({
                    key: i,
                    value: jy(n, this.objId, this.scope)
                }) : n instanceof rs ? (n.scope = this.scope, t.push({
                    key: i,
                    value: n.objId + " 0 R"
                })) : typeof n != "function" && t.push({
                    key: i,
                    value: n
                }));
            }
        return t;
    };
    Hy = function() {
        rs.call(this), Object.defineProperty(this, "Type", {
            value: "/XObject",
            configurable: !1,
            writable: !0
        }), Object.defineProperty(this, "Subtype", {
            value: "/Form",
            configurable: !1,
            writable: !0
        }), Object.defineProperty(this, "FormType", {
            value: 1,
            configurable: !1,
            writable: !0
        });
        var t, r = [];
        Object.defineProperty(this, "BBox", {
            configurable: !1,
            get: function() {
                return r;
            },
            set: function(e) {
                r = e;
            }
        }), Object.defineProperty(this, "Resources", {
            value: "2 0 R",
            configurable: !1,
            writable: !0
        }), Object.defineProperty(this, "stream", {
            enumerable: !1,
            configurable: !0,
            set: function(e) {
                t = e.trim();
            },
            get: function() {
                return t || null;
            }
        });
    };
    ka(Hy, rs);
    Gy = function() {
        rs.call(this);
        var t, r = [];
        Object.defineProperty(this, "Kids", {
            enumerable: !1,
            configurable: !0,
            get: function() {
                return r.length > 0 ? r : void 0;
            }
        }), Object.defineProperty(this, "Fields", {
            enumerable: !1,
            configurable: !1,
            get: function() {
                return r;
            }
        }), Object.defineProperty(this, "DA", {
            enumerable: !1,
            configurable: !1,
            get: function() {
                if (t) {
                    var e = function(i) {
                        return i;
                    };
                    return this.scope && (e = this.scope.internal.getEncryptor(this.objId)), "(" + Ac(e(t)) + ")";
                }
            },
            set: function(e) {
                t = e;
            }
        });
    };
    ka(Gy, rs);
    No = function t() {
        rs.call(this);
        var r = 4;
        Object.defineProperty(this, "F", {
            enumerable: !1,
            configurable: !1,
            get: function() {
                return r;
            },
            set: function(g) {
                if (isNaN(g)) throw new Error('Invalid value "' + g + '" for attribute F supplied.');
                r = g;
            }
        }), Object.defineProperty(this, "showWhenPrinted", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !!Ji(r, 3);
            },
            set: function(g) {
                g ? this.F = Qi(r, 3) : this.F = $i(r, 3);
            }
        });
        var e = 0;
        Object.defineProperty(this, "Ff", {
            enumerable: !1,
            configurable: !1,
            get: function() {
                return e;
            },
            set: function(g) {
                if (isNaN(g)) throw new Error('Invalid value "' + g + '" for attribute Ff supplied.');
                e = g;
            }
        });
        var i = [];
        Object.defineProperty(this, "Rect", {
            enumerable: !1,
            configurable: !1,
            get: function() {
                if (i.length !== 0) return i;
            },
            set: function(g) {
                i = g !== void 0 ? g : [];
            }
        }), Object.defineProperty(this, "x", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !i || isNaN(i[0]) ? 0 : i[0];
            },
            set: function(g) {
                i[0] = g;
            }
        }), Object.defineProperty(this, "y", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !i || isNaN(i[1]) ? 0 : i[1];
            },
            set: function(g) {
                i[1] = g;
            }
        }), Object.defineProperty(this, "width", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !i || isNaN(i[2]) ? 0 : i[2];
            },
            set: function(g) {
                i[2] = g;
            }
        }), Object.defineProperty(this, "height", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !i || isNaN(i[3]) ? 0 : i[3];
            },
            set: function(g) {
                i[3] = g;
            }
        });
        var n = "";
        Object.defineProperty(this, "FT", {
            enumerable: !0,
            configurable: !1,
            get: function() {
                return n;
            },
            set: function(g) {
                switch (g) {
                    case "/Btn":
                    case "/Tx":
                    case "/Ch":
                    case "/Sig":
                        n = g;
                        break;
                    default:
                        throw new Error('Invalid value "' + g + '" for attribute FT supplied.');
                }
            }
        });
        var a = null;
        Object.defineProperty(this, "T", {
            enumerable: !0,
            configurable: !1,
            get: function() {
                if (!a || a.length < 1) {
                    if (this instanceof ip) return;
                    a = "FieldObject" + t.FieldNum++;
                }
                var g = function(b) {
                    return b;
                };
                return this.scope && (g = this.scope.internal.getEncryptor(this.objId)), "(" + Ac(g(a)) + ")";
            },
            set: function(g) {
                a = g.toString();
            }
        }), Object.defineProperty(this, "fieldName", {
            configurable: !0,
            enumerable: !0,
            get: function() {
                return a;
            },
            set: function(g) {
                a = g;
            }
        });
        var o = "helvetica";
        Object.defineProperty(this, "fontName", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return o;
            },
            set: function(g) {
                o = g;
            }
        });
        var s = "normal";
        Object.defineProperty(this, "fontStyle", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return s;
            },
            set: function(g) {
                s = g;
            }
        });
        var l = 0;
        Object.defineProperty(this, "fontSize", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return l;
            },
            set: function(g) {
                l = g;
            }
        });
        var c = void 0;
        Object.defineProperty(this, "maxFontSize", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return c === void 0 ? 50 / ig : c;
            },
            set: function(g) {
                c = g;
            }
        });
        var u = "black";
        Object.defineProperty(this, "color", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return u;
            },
            set: function(g) {
                u = g;
            }
        });
        var h = "/F1 0 Tf 0 g";
        Object.defineProperty(this, "DA", {
            enumerable: !0,
            configurable: !1,
            get: function() {
                if (!(!h || this instanceof ip || this instanceof Pl)) return Km(h, this.objId, this.scope);
            },
            set: function(g) {
                g = g.toString(), h = g;
            }
        });
        var d = null;
        Object.defineProperty(this, "DV", {
            enumerable: !1,
            configurable: !1,
            get: function() {
                if (d) return this instanceof Cn == 0 ? Km(d, this.objId, this.scope) : d;
            },
            set: function(g) {
                g = g.toString(), d = this instanceof Cn == 0 ? g.substr(0, 1) === "(" ? S0(g.substr(1, g.length - 2)) : S0(g) : g;
            }
        }), Object.defineProperty(this, "defaultValue", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return this instanceof Cn == 1 ? S0(d.substr(1, d.length - 1)) : d;
            },
            set: function(g) {
                g = g.toString(), d = this instanceof Cn == 1 ? "/" + g : g;
            }
        });
        var f = null;
        Object.defineProperty(this, "_V", {
            enumerable: !1,
            configurable: !1,
            get: function() {
                if (f) return f;
            },
            set: function(g) {
                this.V = g;
            }
        }), Object.defineProperty(this, "V", {
            enumerable: !1,
            configurable: !1,
            get: function() {
                if (f) return this instanceof Cn == 0 ? Km(f, this.objId, this.scope) : f;
            },
            set: function(g) {
                g = g.toString(), f = this instanceof Cn == 0 ? g.substr(0, 1) === "(" ? S0(g.substr(1, g.length - 2)) : S0(g) : g;
            }
        }), Object.defineProperty(this, "value", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return this instanceof Cn == 1 ? S0(f.substr(1, f.length - 1)) : f;
            },
            set: function(g) {
                g = g.toString(), f = this instanceof Cn == 1 ? "/" + g : g;
            }
        }), Object.defineProperty(this, "hasAnnotation", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return this.Rect;
            }
        }), Object.defineProperty(this, "Type", {
            enumerable: !0,
            configurable: !1,
            get: function() {
                return this.hasAnnotation ? "/Annot" : null;
            }
        }), Object.defineProperty(this, "Subtype", {
            enumerable: !0,
            configurable: !1,
            get: function() {
                return this.hasAnnotation ? "/Widget" : null;
            }
        });
        var m, _ = !1;
        Object.defineProperty(this, "hasAppearanceStream", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return _;
            },
            set: function(g) {
                g = !!g, _ = g;
            }
        }), Object.defineProperty(this, "page", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                if (m) return m;
            },
            set: function(g) {
                m = g;
            }
        }), Object.defineProperty(this, "readOnly", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !!Ji(this.Ff, 1);
            },
            set: function(g) {
                g ? this.Ff = Qi(this.Ff, 1) : this.Ff = $i(this.Ff, 1);
            }
        }), Object.defineProperty(this, "required", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !!Ji(this.Ff, 2);
            },
            set: function(g) {
                g ? this.Ff = Qi(this.Ff, 2) : this.Ff = $i(this.Ff, 2);
            }
        }), Object.defineProperty(this, "noExport", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !!Ji(this.Ff, 3);
            },
            set: function(g) {
                g ? this.Ff = Qi(this.Ff, 3) : this.Ff = $i(this.Ff, 3);
            }
        });
        var x = null;
        Object.defineProperty(this, "Q", {
            enumerable: !0,
            configurable: !1,
            get: function() {
                if (x !== null) return x;
            },
            set: function(g) {
                if ([0, 1, 2].indexOf(g) === -1) throw new Error('Invalid value "' + g + '" for attribute Q supplied.');
                x = g;
            }
        }), Object.defineProperty(this, "textAlign", {
            get: function() {
                var g;
                switch (x) {
                    case 0:
                    default:
                        g = "left";
                        break;
                    case 1:
                        g = "center";
                        break;
                    case 2:
                        g = "right";
                }
                return g;
            },
            configurable: !0,
            enumerable: !0,
            set: function(g) {
                switch (g) {
                    case "right":
                    case 2:
                        x = 2;
                        break;
                    case "center":
                    case 1:
                        x = 1;
                        break;
                    default:
                        x = 0;
                }
            }
        });
    };
    ka(No, rs);
    bc = function() {
        No.call(this), this.FT = "/Ch", this.V = "()", this.fontName = "zapfdingbats";
        var t = 0;
        Object.defineProperty(this, "TI", {
            enumerable: !0,
            configurable: !1,
            get: function() {
                return t;
            },
            set: function(e) {
                t = e;
            }
        }), Object.defineProperty(this, "topIndex", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return t;
            },
            set: function(e) {
                t = e;
            }
        });
        var r = [];
        Object.defineProperty(this, "Opt", {
            enumerable: !0,
            configurable: !1,
            get: function() {
                return jy(r, this.objId, this.scope);
            },
            set: function(e) {
                var i, n;
                n = [], typeof(i = e) == "string" && (n = function(a, o, s) {
                    s || (s = 1);
                    for (var l, c = []; l = o.exec(a);) c.push(l[s]);
                    return c;
                }(i, /\((.*?)\)/g)), r = n;
            }
        }), this.getOptions = function() {
            return r;
        }, this.setOptions = function(e) {
            r = e, this.sort && r.sort();
        }, this.addOption = function(e) {
            e = (e = e || "").toString(), r.push(e), this.sort && r.sort();
        }, this.removeOption = function(e, i) {
            for (i = i || !1, e = (e = e || "").toString(); r.indexOf(e) !== -1 && (r.splice(r.indexOf(e), 1), i !== !1););
        }, Object.defineProperty(this, "combo", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !!Ji(this.Ff, 18);
            },
            set: function(e) {
                e ? this.Ff = Qi(this.Ff, 18) : this.Ff = $i(this.Ff, 18);
            }
        }), Object.defineProperty(this, "edit", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !!Ji(this.Ff, 19);
            },
            set: function(e) {
                this.combo === !0 && (e ? this.Ff = Qi(this.Ff, 19) : this.Ff = $i(this.Ff, 19));
            }
        }), Object.defineProperty(this, "sort", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !!Ji(this.Ff, 20);
            },
            set: function(e) {
                e ? (this.Ff = Qi(this.Ff, 20), r.sort()) : this.Ff = $i(this.Ff, 20);
            }
        }), Object.defineProperty(this, "multiSelect", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !!Ji(this.Ff, 22);
            },
            set: function(e) {
                e ? this.Ff = Qi(this.Ff, 22) : this.Ff = $i(this.Ff, 22);
            }
        }), Object.defineProperty(this, "doNotSpellCheck", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !!Ji(this.Ff, 23);
            },
            set: function(e) {
                e ? this.Ff = Qi(this.Ff, 23) : this.Ff = $i(this.Ff, 23);
            }
        }), Object.defineProperty(this, "commitOnSelChange", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !!Ji(this.Ff, 27);
            },
            set: function(e) {
                e ? this.Ff = Qi(this.Ff, 27) : this.Ff = $i(this.Ff, 27);
            }
        }), this.hasAppearanceStream = !1;
    };
    ka(bc, No);
    wc = function() {
        bc.call(this), this.fontName = "helvetica", this.combo = !1;
    };
    ka(wc, bc);
    Sc = function() {
        wc.call(this), this.combo = !0;
    };
    ka(Sc, wc); of = function() {
        Sc.call(this), this.edit = !0;
    };
    ka( of , Sc);
    Cn = function() {
        No.call(this), this.FT = "/Btn", Object.defineProperty(this, "noToggleToOff", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !!Ji(this.Ff, 15);
            },
            set: function(e) {
                e ? this.Ff = Qi(this.Ff, 15) : this.Ff = $i(this.Ff, 15);
            }
        }), Object.defineProperty(this, "radio", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !!Ji(this.Ff, 16);
            },
            set: function(e) {
                e ? this.Ff = Qi(this.Ff, 16) : this.Ff = $i(this.Ff, 16);
            }
        }), Object.defineProperty(this, "pushButton", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !!Ji(this.Ff, 17);
            },
            set: function(e) {
                e ? this.Ff = Qi(this.Ff, 17) : this.Ff = $i(this.Ff, 17);
            }
        }), Object.defineProperty(this, "radioIsUnison", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !!Ji(this.Ff, 26);
            },
            set: function(e) {
                e ? this.Ff = Qi(this.Ff, 26) : this.Ff = $i(this.Ff, 26);
            }
        });
        var t, r = {};
        Object.defineProperty(this, "MK", {
            enumerable: !1,
            configurable: !1,
            get: function() {
                var e = function(a) {
                    return a;
                };
                if (this.scope && (e = this.scope.internal.getEncryptor(this.objId)), Object.keys(r).length !== 0) {
                    var i, n = [];
                    for (i in n.push("<<"), r) n.push("/" + i + " (" + Ac(e(r[i])) + ")");
                    return n.push(">>"), n.join(`
`);
                }
            },
            set: function(e) {
                ni(e) === "object" && (r = e);
            }
        }), Object.defineProperty(this, "caption", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return r.CA || "";
            },
            set: function(e) {
                typeof e == "string" && (r.CA = e);
            }
        }), Object.defineProperty(this, "AS", {
            enumerable: !1,
            configurable: !1,
            get: function() {
                return t;
            },
            set: function(e) {
                t = e;
            }
        }), Object.defineProperty(this, "appearanceState", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return t.substr(1, t.length - 1);
            },
            set: function(e) {
                t = "/" + e;
            }
        });
    };
    ka(Cn, No);
    sf = function() {
        Cn.call(this), this.pushButton = !0;
    };
    ka(sf, Cn);
    Cc = function() {
        Cn.call(this), this.radio = !0, this.pushButton = !1;
        var t = [];
        Object.defineProperty(this, "Kids", {
            enumerable: !0,
            configurable: !1,
            get: function() {
                return t;
            },
            set: function(r) {
                t = r !== void 0 ? r : [];
            }
        });
    };
    ka(Cc, Cn);
    ip = function() {
        var t, r;
        No.call(this), Object.defineProperty(this, "Parent", {
            enumerable: !1,
            configurable: !1,
            get: function() {
                return t;
            },
            set: function(n) {
                t = n;
            }
        }), Object.defineProperty(this, "optionName", {
            enumerable: !1,
            configurable: !0,
            get: function() {
                return r;
            },
            set: function(n) {
                r = n;
            }
        });
        var e, i = {};
        Object.defineProperty(this, "MK", {
            enumerable: !1,
            configurable: !1,
            get: function() {
                var n = function(s) {
                    return s;
                };
                this.scope && (n = this.scope.internal.getEncryptor(this.objId));
                var a, o = [];
                for (a in o.push("<<"), i) o.push("/" + a + " (" + Ac(n(i[a])) + ")");
                return o.push(">>"), o.join(`
`);
            },
            set: function(n) {
                ni(n) === "object" && (i = n);
            }
        }), Object.defineProperty(this, "caption", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return i.CA || "";
            },
            set: function(n) {
                typeof n == "string" && (i.CA = n);
            }
        }), Object.defineProperty(this, "AS", {
            enumerable: !1,
            configurable: !1,
            get: function() {
                return e;
            },
            set: function(n) {
                e = n;
            }
        }), Object.defineProperty(this, "appearanceState", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return e.substr(1, e.length - 1);
            },
            set: function(n) {
                e = "/" + n;
            }
        }), this.caption = "l", this.appearanceState = "Off", this._AppearanceType = Dt.RadioButton.Circle, this.appearanceStreamContent = this._AppearanceType.createAppearanceStream(this.optionName);
    };
    ka(ip, No), Cc.prototype.setAppearance = function(t) {
        if (!("createAppearanceStream" in t) || !("getCA" in t)) throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");
        for (var r in this.Kids)
            if (this.Kids.hasOwnProperty(r)) {
                var e = this.Kids[r];
                e.appearanceStreamContent = t.createAppearanceStream(e.optionName), e.caption = t.getCA();
            }
    }, Cc.prototype.createOption = function(t) {
        var r = new ip();
        return r.Parent = this, r.optionName = t, this.Kids.push(r), bA.call(this.scope, r), r;
    };
    lf = function() {
        Cn.call(this), this.fontName = "zapfdingbats", this.caption = "3", this.appearanceState = "On", this.value = "On", this.textAlign = "center", this.appearanceStreamContent = Dt.CheckBox.createAppearanceStream();
    };
    ka(lf, Cn);
    Pl = function() {
        No.call(this), this.FT = "/Tx", Object.defineProperty(this, "multiline", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !!Ji(this.Ff, 13);
            },
            set: function(r) {
                r ? this.Ff = Qi(this.Ff, 13) : this.Ff = $i(this.Ff, 13);
            }
        }), Object.defineProperty(this, "fileSelect", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !!Ji(this.Ff, 21);
            },
            set: function(r) {
                r ? this.Ff = Qi(this.Ff, 21) : this.Ff = $i(this.Ff, 21);
            }
        }), Object.defineProperty(this, "doNotSpellCheck", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !!Ji(this.Ff, 23);
            },
            set: function(r) {
                r ? this.Ff = Qi(this.Ff, 23) : this.Ff = $i(this.Ff, 23);
            }
        }), Object.defineProperty(this, "doNotScroll", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !!Ji(this.Ff, 24);
            },
            set: function(r) {
                r ? this.Ff = Qi(this.Ff, 24) : this.Ff = $i(this.Ff, 24);
            }
        }), Object.defineProperty(this, "comb", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !!Ji(this.Ff, 25);
            },
            set: function(r) {
                r ? this.Ff = Qi(this.Ff, 25) : this.Ff = $i(this.Ff, 25);
            }
        }), Object.defineProperty(this, "richText", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !!Ji(this.Ff, 26);
            },
            set: function(r) {
                r ? this.Ff = Qi(this.Ff, 26) : this.Ff = $i(this.Ff, 26);
            }
        });
        var t = null;
        Object.defineProperty(this, "MaxLen", {
            enumerable: !0,
            configurable: !1,
            get: function() {
                return t;
            },
            set: function(r) {
                t = r;
            }
        }), Object.defineProperty(this, "maxLength", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return t;
            },
            set: function(r) {
                Number.isInteger(r) && (t = r);
            }
        }), Object.defineProperty(this, "hasAppearanceStream", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return this.V || this.DV;
            }
        });
    };
    ka(Pl, No);
    cf = function() {
        Pl.call(this), Object.defineProperty(this, "password", {
            enumerable: !0,
            configurable: !0,
            get: function() {
                return !!Ji(this.Ff, 14);
            },
            set: function(t) {
                t ? this.Ff = Qi(this.Ff, 14) : this.Ff = $i(this.Ff, 14);
            }
        }), this.password = !0;
    };
    ka(cf, Pl);
    Dt = {
        CheckBox: {
            createAppearanceStream: function() {
                return {
                    N: {
                        On: Dt.CheckBox.YesNormal
                    },
                    D: {
                        On: Dt.CheckBox.YesPushDown,
                        Off: Dt.CheckBox.OffPushDown
                    }
                };
            },
            YesPushDown: function(t) {
                var r = ts(t);
                r.scope = t.scope;
                var e = [],
                    i = t.scope.internal.getFont(t.fontName, t.fontStyle).id,
                    n = t.scope.__private__.encodeColorString(t.color),
                    a = tg(t, t.caption);
                return e.push("0.749023 g"), e.push("0 0 " + yr(Dt.internal.getWidth(t)) + " " + yr(Dt.internal.getHeight(t)) + " re"), e.push("f"), e.push("BMC"), e.push("q"), e.push("0 0 1 rg"), e.push("/" + i + " " + yr(a.fontSize) + " Tf " + n), e.push("BT"), e.push(a.text), e.push("ET"), e.push("Q"), e.push("EMC"), r.stream = e.join(`
`), r;
            },
            YesNormal: function(t) {
                var r = ts(t);
                r.scope = t.scope;
                var e = t.scope.internal.getFont(t.fontName, t.fontStyle).id,
                    i = t.scope.__private__.encodeColorString(t.color),
                    n = [],
                    a = Dt.internal.getHeight(t),
                    o = Dt.internal.getWidth(t),
                    s = tg(t, t.caption);
                return n.push("1 g"), n.push("0 0 " + yr(o) + " " + yr(a) + " re"), n.push("f"), n.push("q"), n.push("0 0 1 rg"), n.push("0 0 " + yr(o - 1) + " " + yr(a - 1) + " re"), n.push("W"), n.push("n"), n.push("0 g"), n.push("BT"), n.push("/" + e + " " + yr(s.fontSize) + " Tf " + i), n.push(s.text), n.push("ET"), n.push("Q"), r.stream = n.join(`
`), r;
            },
            OffPushDown: function(t) {
                var r = ts(t);
                r.scope = t.scope;
                var e = [];
                return e.push("0.749023 g"), e.push("0 0 " + yr(Dt.internal.getWidth(t)) + " " + yr(Dt.internal.getHeight(t)) + " re"), e.push("f"), r.stream = e.join(`
`), r;
            }
        },
        RadioButton: {
            Circle: {
                createAppearanceStream: function(t) {
                    var r = {
                        D: {
                            Off: Dt.RadioButton.Circle.OffPushDown
                        },
                        N: {}
                    };
                    return r.N[t] = Dt.RadioButton.Circle.YesNormal, r.D[t] = Dt.RadioButton.Circle.YesPushDown, r;
                },
                getCA: function() {
                    return "l";
                },
                YesNormal: function(t) {
                    var r = ts(t);
                    r.scope = t.scope;
                    var e = [],
                        i = Dt.internal.getWidth(t) <= Dt.internal.getHeight(t) ? Dt.internal.getWidth(t) / 4 : Dt.internal.getHeight(t) / 4;
                    i = Number((.9 * i).toFixed(5));
                    var n = Dt.internal.Bezier_C,
                        a = Number((i * n).toFixed(5));
                    return e.push("q"), e.push("1 0 0 1 " + kl(Dt.internal.getWidth(t) / 2) + " " + kl(Dt.internal.getHeight(t) / 2) + " cm"), e.push(i + " 0 m"), e.push(i + " " + a + " " + a + " " + i + " 0 " + i + " c"), e.push("-" + a + " " + i + " -" + i + " " + a + " -" + i + " 0 c"), e.push("-" + i + " -" + a + " -" + a + " -" + i + " 0 -" + i + " c"), e.push(a + " -" + i + " " + i + " -" + a + " " + i + " 0 c"), e.push("f"), e.push("Q"), r.stream = e.join(`
`), r;
                },
                YesPushDown: function(t) {
                    var r = ts(t);
                    r.scope = t.scope;
                    var e = [],
                        i = Dt.internal.getWidth(t) <= Dt.internal.getHeight(t) ? Dt.internal.getWidth(t) / 4 : Dt.internal.getHeight(t) / 4;
                    i = Number((.9 * i).toFixed(5));
                    var n = Number((2 * i).toFixed(5)),
                        a = Number((n * Dt.internal.Bezier_C).toFixed(5)),
                        o = Number((i * Dt.internal.Bezier_C).toFixed(5));
                    return e.push("0.749023 g"), e.push("q"), e.push("1 0 0 1 " + kl(Dt.internal.getWidth(t) / 2) + " " + kl(Dt.internal.getHeight(t) / 2) + " cm"), e.push(n + " 0 m"), e.push(n + " " + a + " " + a + " " + n + " 0 " + n + " c"), e.push("-" + a + " " + n + " -" + n + " " + a + " -" + n + " 0 c"), e.push("-" + n + " -" + a + " -" + a + " -" + n + " 0 -" + n + " c"), e.push(a + " -" + n + " " + n + " -" + a + " " + n + " 0 c"), e.push("f"), e.push("Q"), e.push("0 g"), e.push("q"), e.push("1 0 0 1 " + kl(Dt.internal.getWidth(t) / 2) + " " + kl(Dt.internal.getHeight(t) / 2) + " cm"), e.push(i + " 0 m"), e.push(i + " " + o + " " + o + " " + i + " 0 " + i + " c"), e.push("-" + o + " " + i + " -" + i + " " + o + " -" + i + " 0 c"), e.push("-" + i + " -" + o + " -" + o + " -" + i + " 0 -" + i + " c"), e.push(o + " -" + i + " " + i + " -" + o + " " + i + " 0 c"), e.push("f"), e.push("Q"), r.stream = e.join(`
`), r;
                },
                OffPushDown: function(t) {
                    var r = ts(t);
                    r.scope = t.scope;
                    var e = [],
                        i = Dt.internal.getWidth(t) <= Dt.internal.getHeight(t) ? Dt.internal.getWidth(t) / 4 : Dt.internal.getHeight(t) / 4;
                    i = Number((.9 * i).toFixed(5));
                    var n = Number((2 * i).toFixed(5)),
                        a = Number((n * Dt.internal.Bezier_C).toFixed(5));
                    return e.push("0.749023 g"), e.push("q"), e.push("1 0 0 1 " + kl(Dt.internal.getWidth(t) / 2) + " " + kl(Dt.internal.getHeight(t) / 2) + " cm"), e.push(n + " 0 m"), e.push(n + " " + a + " " + a + " " + n + " 0 " + n + " c"), e.push("-" + a + " " + n + " -" + n + " " + a + " -" + n + " 0 c"), e.push("-" + n + " -" + a + " -" + a + " -" + n + " 0 -" + n + " c"), e.push(a + " -" + n + " " + n + " -" + a + " " + n + " 0 c"), e.push("f"), e.push("Q"), r.stream = e.join(`
`), r;
                }
            },
            Cross: {
                createAppearanceStream: function(t) {
                    var r = {
                        D: {
                            Off: Dt.RadioButton.Cross.OffPushDown
                        },
                        N: {}
                    };
                    return r.N[t] = Dt.RadioButton.Cross.YesNormal, r.D[t] = Dt.RadioButton.Cross.YesPushDown, r;
                },
                getCA: function() {
                    return "8";
                },
                YesNormal: function(t) {
                    var r = ts(t);
                    r.scope = t.scope;
                    var e = [],
                        i = Dt.internal.calculateCross(t);
                    return e.push("q"), e.push("1 1 " + yr(Dt.internal.getWidth(t) - 2) + " " + yr(Dt.internal.getHeight(t) - 2) + " re"), e.push("W"), e.push("n"), e.push(yr(i.x1.x) + " " + yr(i.x1.y) + " m"), e.push(yr(i.x2.x) + " " + yr(i.x2.y) + " l"), e.push(yr(i.x4.x) + " " + yr(i.x4.y) + " m"), e.push(yr(i.x3.x) + " " + yr(i.x3.y) + " l"), e.push("s"), e.push("Q"), r.stream = e.join(`
`), r;
                },
                YesPushDown: function(t) {
                    var r = ts(t);
                    r.scope = t.scope;
                    var e = Dt.internal.calculateCross(t),
                        i = [];
                    return i.push("0.749023 g"), i.push("0 0 " + yr(Dt.internal.getWidth(t)) + " " + yr(Dt.internal.getHeight(t)) + " re"), i.push("f"), i.push("q"), i.push("1 1 " + yr(Dt.internal.getWidth(t) - 2) + " " + yr(Dt.internal.getHeight(t) - 2) + " re"), i.push("W"), i.push("n"), i.push(yr(e.x1.x) + " " + yr(e.x1.y) + " m"), i.push(yr(e.x2.x) + " " + yr(e.x2.y) + " l"), i.push(yr(e.x4.x) + " " + yr(e.x4.y) + " m"), i.push(yr(e.x3.x) + " " + yr(e.x3.y) + " l"), i.push("s"), i.push("Q"), r.stream = i.join(`
`), r;
                },
                OffPushDown: function(t) {
                    var r = ts(t);
                    r.scope = t.scope;
                    var e = [];
                    return e.push("0.749023 g"), e.push("0 0 " + yr(Dt.internal.getWidth(t)) + " " + yr(Dt.internal.getHeight(t)) + " re"), e.push("f"), r.stream = e.join(`
`), r;
                }
            }
        },
        createDefaultAppearanceStream: function(t) {
            var r = t.scope.internal.getFont(t.fontName, t.fontStyle).id,
                e = t.scope.__private__.encodeColorString(t.color);
            return "/" + r + " " + t.fontSize + " Tf " + e;
        }
    };
    Dt.internal = {
        Bezier_C: .551915024494,
        calculateCross: function(t) {
            var r = Dt.internal.getWidth(t),
                e = Dt.internal.getHeight(t),
                i = Math.min(r, e);
            return {
                x1: {
                    x: (r - i) / 2,
                    y: (e - i) / 2 + i
                },
                x2: {
                    x: (r - i) / 2 + i,
                    y: (e - i) / 2
                },
                x3: {
                    x: (r - i) / 2,
                    y: (e - i) / 2
                },
                x4: {
                    x: (r - i) / 2 + i,
                    y: (e - i) / 2 + i
                }
            };
        }
    }, Dt.internal.getWidth = function(t) {
        var r = 0;
        return ni(t) === "object" && (r = by(t.Rect[2])), r;
    }, Dt.internal.getHeight = function(t) {
        var r = 0;
        return ni(t) === "object" && (r = by(t.Rect[3])), r;
    };
    bA = ji.addField = function(t) {
        if (yA(this, t), !(t instanceof No)) throw new Error("Invalid argument passed to jsPDF.addField.");
        var r;
        return (r = t).scope.internal.acroformPlugin.printedOut && (r.scope.internal.acroformPlugin.printedOut = !1, r.scope.internal.acroformPlugin.acroFormDictionaryRoot = null), r.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(r), t.page = t.scope.internal.getCurrentPageInfo().pageNumber, this;
    };
    ji.AcroFormChoiceField = bc, ji.AcroFormListBox = wc, ji.AcroFormComboBox = Sc, ji.AcroFormEditBox = of , ji.AcroFormButton = Cn, ji.AcroFormPushButton = sf, ji.AcroFormRadioButton = Cc, ji.AcroFormCheckBox = lf, ji.AcroFormTextField = Pl, ji.AcroFormPasswordField = cf, ji.AcroFormAppearance = Dt, ji.AcroForm = {
        ChoiceField: bc,
        ListBox: wc,
        ComboBox: Sc,
        EditBox: of ,
        Button: Cn,
        PushButton: sf,
        RadioButton: Cc,
        CheckBox: lf,
        TextField: Pl,
        PasswordField: cf,
        Appearance: Dt
    }, Bt.AcroForm = {
        ChoiceField: bc,
        ListBox: wc,
        ComboBox: Sc,
        EditBox: of ,
        Button: Cn,
        PushButton: sf,
        RadioButton: Cc,
        CheckBox: lf,
        TextField: Pl,
        PasswordField: cf,
        Appearance: Dt
    };
    wA = Bt.AcroForm;
    (function(t) {
        var r = "addImage_";
        t.__addimage__ = {};
        var e = "UNKNOWN",
            i = {
                PNG: [
                    [137, 80, 78, 71]
                ],
                TIFF: [
                    [77, 77, 0, 42],
                    [73, 73, 42, 0]
                ],
                JPEG: [
                    [255, 216, 255, 224, void 0, void 0, 74, 70, 73, 70, 0],
                    [255, 216, 255, 225, void 0, void 0, 69, 120, 105, 102, 0, 0],
                    [255, 216, 255, 219],
                    [255, 216, 255, 238]
                ],
                JPEG2000: [
                    [0, 0, 0, 12, 106, 80, 32, 32]
                ],
                GIF87a: [
                    [71, 73, 70, 56, 55, 97]
                ],
                GIF89a: [
                    [71, 73, 70, 56, 57, 97]
                ],
                WEBP: [
                    [82, 73, 70, 70, void 0, void 0, void 0, void 0, 87, 69, 66, 80]
                ],
                BMP: [
                    [66, 77],
                    [66, 65],
                    [67, 73],
                    [67, 80],
                    [73, 67],
                    [80, 84]
                ]
            },
            n = t.__addimage__.getImageFileTypeByImageData = function(C, F) {
                var W, I, U, le, H, pe = e;
                if ((F = F || e) === "RGBA" || C.data !== void 0 && C.data instanceof Uint8ClampedArray && "height" in C && "width" in C) return "RGBA";
                if (L(C))
                    for (H in i)
                        for (U = i[H], W = 0; W < U.length; W += 1) {
                            for (le = !0, I = 0; I < U[W].length; I += 1)
                                if (U[W][I] !== void 0 && U[W][I] !== C[I]) {
                                    le = !1;
                                    break;
                                }
                            if (le === !0) {
                                pe = H;
                                break;
                            }
                        } else
                            for (H in i)
                                for (U = i[H], W = 0; W < U.length; W += 1) {
                                    for (le = !0, I = 0; I < U[W].length; I += 1)
                                        if (U[W][I] !== void 0 && U[W][I] !== C.charCodeAt(I)) {
                                            le = !1;
                                            break;
                                        }
                                    if (le === !0) {
                                        pe = H;
                                        break;
                                    }
                                }
                return pe === e && F !== e && (pe = F), pe;
            },
            a = function C(F) {
                for (var W = this.internal.write, I = this.internal.putStream, U = (0, this.internal.getFilters)(); U.indexOf("FlateEncode") !== -1;) U.splice(U.indexOf("FlateEncode"), 1);
                F.objectId = this.internal.newObject();
                var le = [];
                if (le.push({
                        key: "Type",
                        value: "/XObject"
                    }), le.push({
                        key: "Subtype",
                        value: "/Image"
                    }), le.push({
                        key: "Width",
                        value: F.width
                    }), le.push({
                        key: "Height",
                        value: F.height
                    }), F.colorSpace === g.INDEXED ? le.push({
                        key: "ColorSpace",
                        value: "[/Indexed /DeviceRGB " + (F.palette.length / 3 - 1) + " " + ("sMask" in F && F.sMask !== void 0 ? F.objectId + 2 : F.objectId + 1) + " 0 R]"
                    }) : (le.push({
                        key: "ColorSpace",
                        value: "/" + F.colorSpace
                    }), F.colorSpace === g.DEVICE_CMYK && le.push({
                        key: "Decode",
                        value: "[1 0 1 0 1 0 1 0]"
                    })), le.push({
                        key: "BitsPerComponent",
                        value: F.bitsPerComponent
                    }), "decodeParameters" in F && F.decodeParameters !== void 0 && le.push({
                        key: "DecodeParms",
                        value: "<<" + F.decodeParameters + ">>"
                    }), "transparency" in F && Array.isArray(F.transparency) && F.transparency.length > 0) {
                    for (var H = "", pe = 0, _e = F.transparency.length; pe < _e; pe++) H += F.transparency[pe] + " " + F.transparency[pe] + " ";
                    le.push({
                        key: "Mask",
                        value: "[" + H + "]"
                    });
                }
                F.sMask !== void 0 && le.push({
                    key: "SMask",
                    value: F.objectId + 1 + " 0 R"
                });
                var Fe = F.filter !== void 0 ? ["/" + F.filter] : void 0;
                if (I({
                        data: F.data,
                        additionalKeyValues: le,
                        alreadyAppliedFilters: Fe,
                        objectId: F.objectId
                    }), W("endobj"), "sMask" in F && F.sMask !== void 0) {
                    var Te, O = (Te = F.sMaskBitsPerComponent) !== null && Te !== void 0 ? Te : F.bitsPerComponent,
                        j = {
                            width: F.width,
                            height: F.height,
                            colorSpace: "DeviceGray",
                            bitsPerComponent: O,
                            data: F.sMask
                        };
                    "filter" in F && (j.decodeParameters = "/Predictor ".concat(F.predictor, " /Colors 1 /BitsPerComponent ").concat(O, " /Columns ").concat(F.width), j.filter = F.filter), C.call(this, j);
                }
                if (F.colorSpace === g.INDEXED) {
                    var X = this.internal.newObject();
                    I({
                        data: k(new Uint8Array(F.palette)),
                        objectId: X
                    }), W("endobj");
                }
            },
            o = function() {
                var C = this.internal.collections[r + "images"];
                for (var F in C) a.call(this, C[F]);
            },
            s = function() {
                var C, F = this.internal.collections[r + "images"],
                    W = this.internal.write;
                for (var I in F) W("/I" + (C = F[I]).index, C.objectId, "0", "R");
            },
            l = function() {
                this.internal.collections[r + "images"] || (this.internal.collections[r + "images"] = {}, this.internal.events.subscribe("putResources", o), this.internal.events.subscribe("putXobjectDict", s));
            },
            c = function() {
                var C = this.internal.collections[r + "images"];
                return l.call(this), C;
            },
            u = function() {
                return Object.keys(this.internal.collections[r + "images"]).length;
            },
            h = function(C) {
                return typeof t["process" + C.toUpperCase()] == "function";
            },
            d = function(C) {
                return ni(C) === "object" && C.nodeType === 1;
            },
            f = function(C, F) {
                if (C.nodeName === "IMG" && C.hasAttribute("src")) {
                    var W = "" + C.getAttribute("src");
                    if (W.indexOf("data:image/") === 0) return rp(unescape(W).split("base64,").pop());
                    var I = t.loadFile(W, !0);
                    if (I !== void 0) return I;
                }
                if (C.nodeName === "CANVAS") {
                    if (C.width === 0 || C.height === 0) throw new Error("Given canvas must have data. Canvas width: " + C.width + ", height: " + C.height);
                    var U;
                    switch (F) {
                        case "PNG":
                            U = "image/png";
                            break;
                        case "WEBP":
                            U = "image/webp";
                            break;
                        default:
                            U = "image/jpeg";
                    }
                    return rp(C.toDataURL(U, 1).split("base64,").pop());
                }
            },
            m = function(C) {
                var F = this.internal.collections[r + "images"];
                if (F) {
                    for (var W in F)
                        if (C === F[W].alias) return F[W];
                }
            },
            _ = function(C, F, W) {
                return C || F || (C = -96, F = -96), C < 0 && (C = -1 * W.width * 72 / C / this.internal.scaleFactor), F < 0 && (F = -1 * W.height * 72 / F / this.internal.scaleFactor), C === 0 && (C = F * W.width / W.height), F === 0 && (F = C * W.height / W.width), [C, F];
            },
            x = function(C, F, W, I, U, le) {
                var H = _.call(this, W, I, U),
                    pe = this.internal.getCoordinateString,
                    _e = this.internal.getVerticalCoordinateString,
                    Fe = c.call(this);
                if (W = H[0], I = H[1], Fe[U.index] = U, le) {
                    le *= Math.PI / 180;
                    var Te = Math.cos(le),
                        O = Math.sin(le),
                        j = function(me) {
                            return me.toFixed(4);
                        },
                        X = [j(Te), j(O), j(-1 * O), j(Te), 0, 0, "cm"];
                }
                this.internal.write("q"), le ? (this.internal.write([1, "0", "0", 1, pe(C), _e(F + I), "cm"].join(" ")), this.internal.write(X.join(" ")), this.internal.write([pe(W), "0", "0", pe(I), "0", "0", "cm"].join(" "))) : this.internal.write([pe(W), "0", "0", pe(I), pe(C), _e(F + I), "cm"].join(" ")), this.isAdvancedAPI() && this.internal.write([1, 0, 0, -1, 0, 0, "cm"].join(" ")), this.internal.write("/I" + U.index + " Do"), this.internal.write("Q");
            },
            g = t.color_spaces = {
                DEVICE_RGB: "DeviceRGB",
                DEVICE_GRAY: "DeviceGray",
                DEVICE_CMYK: "DeviceCMYK",
                CAL_GREY: "CalGray",
                CAL_RGB: "CalRGB",
                LAB: "Lab",
                ICC_BASED: "ICCBased",
                INDEXED: "Indexed",
                PATTERN: "Pattern",
                SEPARATION: "Separation",
                DEVICE_N: "DeviceN"
            };
        t.decode = {
            DCT_DECODE: "DCTDecode",
            FLATE_DECODE: "FlateDecode",
            LZW_DECODE: "LZWDecode",
            JPX_DECODE: "JPXDecode",
            JBIG2_DECODE: "JBIG2Decode",
            ASCII85_DECODE: "ASCII85Decode",
            ASCII_HEX_DECODE: "ASCIIHexDecode",
            RUN_LENGTH_DECODE: "RunLengthDecode",
            CCITT_FAX_DECODE: "CCITTFaxDecode"
        };
        var b = t.image_compression = {
                NONE: "NONE",
                FAST: "FAST",
                MEDIUM: "MEDIUM",
                SLOW: "SLOW"
            },
            w = t.__addimage__.sHashCode = function(C) {
                var F, W, I = 0;
                if (typeof C == "string")
                    for (W = C.length, F = 0; F < W; F++) I = (I << 5) - I + C.charCodeAt(F), I |= 0;
                else if (L(C))
                    for (W = C.byteLength / 2, F = 0; F < W; F++) I = (I << 5) - I + C[F], I |= 0;
                return I;
            },
            T = t.__addimage__.validateStringAsBase64 = function(C) {
                (C = C || "").toString().trim();
                var F = !0;
                return C.length === 0 && (F = !1), C.length % 4 != 0 && (F = !1), /^[A-Za-z0-9+/]+$/.test(C.substr(0, C.length - 2)) === !1 && (F = !1), /^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(C.substr(-2)) === !1 && (F = !1), F;
            },
            E = t.__addimage__.extractImageFromDataUrl = function(C) {
                if (C == null || !(C = C.trim()).startsWith("data:")) return null;
                var F = C.indexOf(",");
                return F < 0 ? null : C.substring(0, F).trim().endsWith("base64") ? C.substring(F + 1) : null;
            };
        t.__addimage__.isArrayBuffer = function(C) {
            return C instanceof ArrayBuffer;
        };
        var L = t.__addimage__.isArrayBufferView = function(C) {
                return C instanceof Int8Array || C instanceof Uint8Array || C instanceof Uint8ClampedArray || C instanceof Int16Array || C instanceof Uint16Array || C instanceof Int32Array || C instanceof Uint32Array || C instanceof Float32Array || C instanceof Float64Array;
            },
            P = t.__addimage__.binaryStringToUint8Array = function(C) {
                for (var F = C.length, W = new Uint8Array(F), I = 0; I < F; I++) W[I] = C.charCodeAt(I);
                return W;
            },
            k = t.__addimage__.arrayBufferToBinaryString = function(C) {
                for (var F = "", W = L(C) ? C : new Uint8Array(C), I = 0; I < W.length; I += 8192) F += String.fromCharCode.apply(null, W.subarray(I, I + 8192));
                return F;
            };
        t.addImage = function() {
            var C, F, W, I, U, le, H, pe, _e;
            if (typeof arguments[1] == "number" ? (F = e, W = arguments[1], I = arguments[2], U = arguments[3], le = arguments[4], H = arguments[5], pe = arguments[6], _e = arguments[7]) : (F = arguments[1], W = arguments[2], I = arguments[3], U = arguments[4], le = arguments[5], H = arguments[6], pe = arguments[7], _e = arguments[8]), ni(C = arguments[0]) === "object" && !d(C) && "imageData" in C) {
                var Fe = C;
                C = Fe.imageData, F = Fe.format || F || e, W = Fe.x || W || 0, I = Fe.y || I || 0, U = Fe.w || Fe.width || U, le = Fe.h || Fe.height || le, H = Fe.alias || H, pe = Fe.compression || pe, _e = Fe.rotation || Fe.angle || _e;
            }
            var Te = this.internal.getFilters();
            if (pe === void 0 && Te.indexOf("FlateEncode") !== -1 && (pe = "SLOW"), isNaN(W) || isNaN(I)) throw new Error("Invalid coordinates passed to jsPDF.addImage");
            l.call(this);
            var O = A.call(this, C, F, H, pe);
            return x.call(this, W, I, U, le, O, _e), this;
        };
        var A = function(C, F, W, I) {
                var U, le, H;
                if (typeof C == "string" && n(C) === e) {
                    C = unescape(C);
                    var pe = N(C, !1);
                    (pe !== "" || (pe = t.loadFile(C, !0)) !== void 0) && (C = pe);
                }
                if (d(C) && (C = f(C, F)), F = n(C, F), !h(F)) throw new Error("addImage does not support files of type '" + F + "', please ensure that a plugin for '" + F + "' support is added.");
                if (((H = W) == null || H.length === 0) && (W = function(_e) {
                        return typeof _e == "string" || L(_e) ? w(_e) : L(_e.data) ? w(_e.data) : null;
                    }(C)), (U = m.call(this, W)) || (C instanceof Uint8Array || F === "RGBA" || (le = C, C = P(C)), U = this["process" + F.toUpperCase()](C, u.call(this), W, function(_e) {
                        return _e && typeof _e == "string" && (_e = _e.toUpperCase()), _e in t.image_compression ? _e : b.NONE;
                    }(I), le)), !U) throw new Error("An unknown error occurred whilst processing the image.");
                return U;
            },
            N = t.__addimage__.convertBase64ToBinaryString = function(C, F) {
                F = typeof F != "boolean" || F;
                var W, I = "";
                if (typeof C == "string") {
                    var U;
                    W = (U = E(C)) !== null && U !== void 0 ? U : C;
                    try {
                        I = rp(W);
                    } catch (le) {
                        if (F) throw T(W) ? new Error("atob-Error in jsPDF.convertBase64ToBinaryString " + le.message) : new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ");
                    }
                }
                return I;
            };
        t.getImageProperties = function(C) {
            var F, W, I = "";
            if (d(C) && (C = f(C)), typeof C == "string" && n(C) === e && ((I = N(C, !1)) === "" && (I = t.loadFile(C) || ""), C = I), W = n(C), !h(W)) throw new Error("addImage does not support files of type '" + W + "', please ensure that a plugin for '" + W + "' support is added.");
            if (C instanceof Uint8Array || (C = P(C)), !(F = this["process" + W.toUpperCase()](C))) throw new Error("An unknown error occurred whilst processing the image");
            return F.fileType = W, F;
        };
    })(Bt.API),
    function(t) {
        var r = function(e) {
            if (e !== void 0 && e != "") return !0;
        };
        Bt.API.events.push(["addPage", function(e) {
            this.internal.getPageInfo(e.pageNumber).pageContext.annotations = [];
        }]), t.events.push(["putPage", function(e) {
            for (var i, n, a, o = this.internal.getCoordinateString, s = this.internal.getVerticalCoordinateString, l = this.internal.getPageInfoByObjId(e.objId), c = e.pageContext.annotations, u = !1, h = 0; h < c.length && !u; h++) switch ((i = c[h]).type) {
                case "link":
                    (r(i.options.url) || r(i.options.pageNumber)) && (u = !0);
                    break;
                case "reference":
                case "text":
                case "freetext":
                    u = !0;
            }
            if (u != 0) {
                this.internal.write("/Annots [");
                for (var d = 0; d < c.length; d++) {
                    i = c[d];
                    var f = this.internal.pdfEscape,
                        m = this.internal.getEncryptor(e.objId);
                    switch (i.type) {
                        case "reference":
                            this.internal.write(" " + i.object.objId + " 0 R ");
                            break;
                        case "text":
                            var _ = this.internal.newAdditionalObject(),
                                x = this.internal.newAdditionalObject(),
                                g = this.internal.getEncryptor(_.objId),
                                b = i.title || "Note";
                            a = "<</Type /Annot /Subtype /Text " + (n = "/Rect [" + o(i.bounds.x) + " " + s(i.bounds.y + i.bounds.h) + " " + o(i.bounds.x + i.bounds.w) + " " + s(i.bounds.y) + "] ") + "/Contents (" + f(g(i.contents)) + ")", a += " /Popup " + x.objId + " 0 R", a += " /P " + l.objId + " 0 R", a += " /T (" + f(g(b)) + ") >>", _.content = a;
                            var w = _.objId + " 0 R";
                            a = "<</Type /Annot /Subtype /Popup " + (n = "/Rect [" + o(i.bounds.x + 30) + " " + s(i.bounds.y + i.bounds.h) + " " + o(i.bounds.x + i.bounds.w + 30) + " " + s(i.bounds.y) + "] ") + " /Parent " + w, i.open && (a += " /Open true"), a += " >>", x.content = a, this.internal.write(_.objId, "0 R", x.objId, "0 R");
                            break;
                        case "freetext":
                            n = "/Rect [" + o(i.bounds.x) + " " + s(i.bounds.y) + " " + o(i.bounds.x + i.bounds.w) + " " + s(i.bounds.y + i.bounds.h) + "] ";
                            var T = i.color || "#000000";
                            a = "<</Type /Annot /Subtype /FreeText " + n + "/Contents (" + f(m(i.contents)) + ")", a += " /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#" + T + ")", a += " /Border [0 0 0]", a += " >>", this.internal.write(a);
                            break;
                        case "link":
                            if (i.options.name) {
                                var E = this.annotations._nameMap[i.options.name];
                                i.options.pageNumber = E.page, i.options.top = E.y;
                            } else i.options.top || (i.options.top = 0);
                            if (n = "/Rect [" + i.finalBounds.x + " " + i.finalBounds.y + " " + i.finalBounds.w + " " + i.finalBounds.h + "] ", a = "", i.options.url) a = "<</Type /Annot /Subtype /Link " + n + "/Border [0 0 0] /A <</S /URI /URI (" + f(m(i.options.url)) + ") >>";
                            else if (i.options.pageNumber) switch (a = "<</Type /Annot /Subtype /Link " + n + "/Border [0 0 0] /Dest [" + this.internal.getPageInfo(i.options.pageNumber).objId + " 0 R", i.options.magFactor = i.options.magFactor || "XYZ", i.options.magFactor) {
                                case "Fit":
                                    a += " /Fit]";
                                    break;
                                case "FitH":
                                    a += " /FitH " + i.options.top + "]";
                                    break;
                                case "FitV":
                                    i.options.left = i.options.left || 0, a += " /FitV " + i.options.left + "]";
                                    break;
                                default:
                                    var L = s(i.options.top);
                                    i.options.left = i.options.left || 0, i.options.zoom === void 0 && (i.options.zoom = 0), a += " /XYZ " + i.options.left + " " + L + " " + i.options.zoom + "]";
                            }
                            a != "" && (a += " >>", this.internal.write(a));
                    }
                }
                this.internal.write("]");
            }
        }]), t.createAnnotation = function(e) {
            var i = this.internal.getCurrentPageInfo();
            switch (e.type) {
                case "link":
                    this.link(e.bounds.x, e.bounds.y, e.bounds.w, e.bounds.h, e);
                    break;
                case "text":
                case "freetext":
                    i.pageContext.annotations.push(e);
            }
        }, t.link = function(e, i, n, a, o) {
            var s = this.internal.getCurrentPageInfo(),
                l = this.internal.getCoordinateString,
                c = this.internal.getVerticalCoordinateString;
            s.pageContext.annotations.push({
                finalBounds: {
                    x: l(e),
                    y: c(i),
                    w: l(e + n),
                    h: c(i + a)
                },
                options: o,
                type: "link"
            });
        }, t.textWithLink = function(e, i, n, a) {
            var o, s, l = this.getTextWidth(e),
                c = this.internal.getLineHeight() / this.internal.scaleFactor;
            if (a.maxWidth !== void 0) {
                s = a.maxWidth;
                var u = this.splitTextToSize(e, s).length;
                o = Math.ceil(c * u);
            } else s = l, o = c;
            return this.text(e, i, n, a), n += .2 * c, a.align === "center" && (i -= l / 2), a.align === "right" && (i -= l), this.link(i, n - c, s, o, a), l;
        }, t.getTextWidth = function(e) {
            var i = this.internal.getFontSize();
            return this.getStringUnitWidth(e) * i / this.internal.scaleFactor;
        };
    }(Bt.API),
    function(t) {
        var r = {
                1569: [65152],
                1570: [65153, 65154],
                1571: [65155, 65156],
                1572: [65157, 65158],
                1573: [65159, 65160],
                1574: [65161, 65162, 65163, 65164],
                1575: [65165, 65166],
                1576: [65167, 65168, 65169, 65170],
                1577: [65171, 65172],
                1578: [65173, 65174, 65175, 65176],
                1579: [65177, 65178, 65179, 65180],
                1580: [65181, 65182, 65183, 65184],
                1581: [65185, 65186, 65187, 65188],
                1582: [65189, 65190, 65191, 65192],
                1583: [65193, 65194],
                1584: [65195, 65196],
                1585: [65197, 65198],
                1586: [65199, 65200],
                1587: [65201, 65202, 65203, 65204],
                1588: [65205, 65206, 65207, 65208],
                1589: [65209, 65210, 65211, 65212],
                1590: [65213, 65214, 65215, 65216],
                1591: [65217, 65218, 65219, 65220],
                1592: [65221, 65222, 65223, 65224],
                1593: [65225, 65226, 65227, 65228],
                1594: [65229, 65230, 65231, 65232],
                1601: [65233, 65234, 65235, 65236],
                1602: [65237, 65238, 65239, 65240],
                1603: [65241, 65242, 65243, 65244],
                1604: [65245, 65246, 65247, 65248],
                1605: [65249, 65250, 65251, 65252],
                1606: [65253, 65254, 65255, 65256],
                1607: [65257, 65258, 65259, 65260],
                1608: [65261, 65262],
                1609: [65263, 65264, 64488, 64489],
                1610: [65265, 65266, 65267, 65268],
                1649: [64336, 64337],
                1655: [64477],
                1657: [64358, 64359, 64360, 64361],
                1658: [64350, 64351, 64352, 64353],
                1659: [64338, 64339, 64340, 64341],
                1662: [64342, 64343, 64344, 64345],
                1663: [64354, 64355, 64356, 64357],
                1664: [64346, 64347, 64348, 64349],
                1667: [64374, 64375, 64376, 64377],
                1668: [64370, 64371, 64372, 64373],
                1670: [64378, 64379, 64380, 64381],
                1671: [64382, 64383, 64384, 64385],
                1672: [64392, 64393],
                1676: [64388, 64389],
                1677: [64386, 64387],
                1678: [64390, 64391],
                1681: [64396, 64397],
                1688: [64394, 64395],
                1700: [64362, 64363, 64364, 64365],
                1702: [64366, 64367, 64368, 64369],
                1705: [64398, 64399, 64400, 64401],
                1709: [64467, 64468, 64469, 64470],
                1711: [64402, 64403, 64404, 64405],
                1713: [64410, 64411, 64412, 64413],
                1715: [64406, 64407, 64408, 64409],
                1722: [64414, 64415],
                1723: [64416, 64417, 64418, 64419],
                1726: [64426, 64427, 64428, 64429],
                1728: [64420, 64421],
                1729: [64422, 64423, 64424, 64425],
                1733: [64480, 64481],
                1734: [64473, 64474],
                1735: [64471, 64472],
                1736: [64475, 64476],
                1737: [64482, 64483],
                1739: [64478, 64479],
                1740: [64508, 64509, 64510, 64511],
                1744: [64484, 64485, 64486, 64487],
                1746: [64430, 64431],
                1747: [64432, 64433]
            },
            e = {
                65247: {
                    65154: 65269,
                    65156: 65271,
                    65160: 65273,
                    65166: 65275
                },
                65248: {
                    65154: 65270,
                    65156: 65272,
                    65160: 65274,
                    65166: 65276
                },
                65165: {
                    65247: {
                        65248: {
                            65258: 65010
                        }
                    }
                },
                1617: {
                    1612: 64606,
                    1613: 64607,
                    1614: 64608,
                    1615: 64609,
                    1616: 64610
                }
            },
            i = {
                1612: 64606,
                1613: 64607,
                1614: 64608,
                1615: 64609,
                1616: 64610
            },
            n = [1570, 1571, 1573, 1575];
        t.__arabicParser__ = {};
        var a = t.__arabicParser__.isInArabicSubstitutionA = function(_) {
                return r[_.charCodeAt(0)] !== void 0;
            },
            o = t.__arabicParser__.isArabicLetter = function(_) {
                return typeof _ == "string" && /^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(_);
            },
            s = t.__arabicParser__.isArabicEndLetter = function(_) {
                return o(_) && a(_) && r[_.charCodeAt(0)].length <= 2;
            },
            l = t.__arabicParser__.isArabicAlfLetter = function(_) {
                return o(_) && n.indexOf(_.charCodeAt(0)) >= 0;
            };
        t.__arabicParser__.arabicLetterHasIsolatedForm = function(_) {
            return o(_) && a(_) && r[_.charCodeAt(0)].length >= 1;
        };
        var c = t.__arabicParser__.arabicLetterHasFinalForm = function(_) {
            return o(_) && a(_) && r[_.charCodeAt(0)].length >= 2;
        };
        t.__arabicParser__.arabicLetterHasInitialForm = function(_) {
            return o(_) && a(_) && r[_.charCodeAt(0)].length >= 3;
        };
        var u = t.__arabicParser__.arabicLetterHasMedialForm = function(_) {
                return o(_) && a(_) && r[_.charCodeAt(0)].length == 4;
            },
            h = t.__arabicParser__.resolveLigatures = function(_) {
                var x = 0,
                    g = e,
                    b = "",
                    w = 0;
                for (x = 0; x < _.length; x += 1) g[_.charCodeAt(x)] !== void 0 ? (w++, typeof(g = g[_.charCodeAt(x)]) == "number" && (b += String.fromCharCode(g), g = e, w = 0), x === _.length - 1 && (g = e, b += _.charAt(x - (w - 1)), x -= w - 1, w = 0)) : (g = e, b += _.charAt(x - w), x -= w, w = 0);
                return b;
            };
        t.__arabicParser__.isArabicDiacritic = function(_) {
            return _ !== void 0 && i[_.charCodeAt(0)] !== void 0;
        };
        var d = t.__arabicParser__.getCorrectForm = function(_, x, g) {
                return o(_) ? a(_) === !1 ? -1 : !c(_) || !o(x) && !o(g) || !o(g) && s(x) || s(_) && !o(x) || s(_) && l(x) || s(_) && s(x) ? 0 : u(_) && o(x) && !s(x) && o(g) && c(g) ? 3 : s(_) || !o(g) ? 1 : 2 : -1;
            },
            f = function(_) {
                var x = 0,
                    g = 0,
                    b = 0,
                    w = "",
                    T = "",
                    E = "",
                    L = (_ = _ || "").split("\\s+"),
                    P = [];
                for (x = 0; x < L.length; x += 1) {
                    for (P.push(""), g = 0; g < L[x].length; g += 1) w = L[x][g], T = L[x][g - 1], E = L[x][g + 1], o(w) ? (b = d(w, T, E), P[x] += b !== -1 ? String.fromCharCode(r[w.charCodeAt(0)][b]) : w) : P[x] += w;
                    P[x] = h(P[x]);
                }
                return P.join(" ");
            },
            m = t.__arabicParser__.processArabic = t.processArabic = function() {
                var _, x = typeof arguments[0] == "string" ? arguments[0] : arguments[0].text,
                    g = [];
                if (Array.isArray(x)) {
                    var b = 0;
                    for (g = [], b = 0; b < x.length; b += 1) Array.isArray(x[b]) ? g.push([f(x[b][0]), x[b][1], x[b][2]]) : g.push([f(x[b])]);
                    _ = g;
                } else _ = f(x);
                return typeof arguments[0] == "string" ? _ : (arguments[0].text = _, arguments[0]);
            };
        t.events.push(["preProcessText", m]);
    }(Bt.API), Bt.API.autoPrint = function(t) {
            var r;
            return (t = t || {}).variant = t.variant || "non-conform", t.variant === "javascript" ? this.addJS("print({});") : (this.internal.events.subscribe("postPutResources", function() {
                r = this.internal.newObject(), this.internal.out("<<"), this.internal.out("/S /Named"), this.internal.out("/Type /Action"), this.internal.out("/N /Print"), this.internal.out(">>"), this.internal.out("endobj");
            }), this.internal.events.subscribe("putCatalog", function() {
                this.internal.out("/OpenAction " + r + " 0 R");
            })), this;
        },
        function(t) {
            var r = function() {
                var e = void 0;
                Object.defineProperty(this, "pdf", {
                    get: function() {
                        return e;
                    },
                    set: function(s) {
                        e = s;
                    }
                });
                var i = 150;
                Object.defineProperty(this, "width", {
                    get: function() {
                        return i;
                    },
                    set: function(s) {
                        i = isNaN(s) || Number.isInteger(s) === !1 || s < 0 ? 150 : s, this.getContext("2d").pageWrapXEnabled && (this.getContext("2d").pageWrapX = i + 1);
                    }
                });
                var n = 300;
                Object.defineProperty(this, "height", {
                    get: function() {
                        return n;
                    },
                    set: function(s) {
                        n = isNaN(s) || Number.isInteger(s) === !1 || s < 0 ? 300 : s, this.getContext("2d").pageWrapYEnabled && (this.getContext("2d").pageWrapY = n + 1);
                    }
                });
                var a = [];
                Object.defineProperty(this, "childNodes", {
                    get: function() {
                        return a;
                    },
                    set: function(s) {
                        a = s;
                    }
                });
                var o = {};
                Object.defineProperty(this, "style", {
                    get: function() {
                        return o;
                    },
                    set: function(s) {
                        o = s;
                    }
                }), Object.defineProperty(this, "parentNode", {});
            };
            r.prototype.getContext = function(e, i) {
                var n;
                if ((e = e || "2d") !== "2d") return null;
                for (n in i) this.pdf.context2d.hasOwnProperty(n) && (this.pdf.context2d[n] = i[n]);
                return this.pdf.context2d._canvas = this, this.pdf.context2d;
            }, r.prototype.toDataURL = function() {
                throw new Error("toDataURL is not implemented.");
            }, t.events.push(["initialized", function() {
                this.canvas = new r(), this.canvas.pdf = this;
            }]);
        }(Bt.API),
        function(t) {
            var r = {
                    left: 0,
                    top: 0,
                    bottom: 0,
                    right: 0
                },
                e = !1,
                i = function() {
                    this.internal.__cell__ === void 0 && (this.internal.__cell__ = {}, this.internal.__cell__.padding = 3, this.internal.__cell__.headerFunction = void 0, this.internal.__cell__.margins = Object.assign({}, r), this.internal.__cell__.margins.width = this.getPageWidth(), n.call(this));
                },
                n = function() {
                    this.internal.__cell__.lastCell = new a(), this.internal.__cell__.pages = 1;
                },
                a = function() {
                    var l = arguments[0];
                    Object.defineProperty(this, "x", {
                        enumerable: !0,
                        get: function() {
                            return l;
                        },
                        set: function(_) {
                            l = _;
                        }
                    });
                    var c = arguments[1];
                    Object.defineProperty(this, "y", {
                        enumerable: !0,
                        get: function() {
                            return c;
                        },
                        set: function(_) {
                            c = _;
                        }
                    });
                    var u = arguments[2];
                    Object.defineProperty(this, "width", {
                        enumerable: !0,
                        get: function() {
                            return u;
                        },
                        set: function(_) {
                            u = _;
                        }
                    });
                    var h = arguments[3];
                    Object.defineProperty(this, "height", {
                        enumerable: !0,
                        get: function() {
                            return h;
                        },
                        set: function(_) {
                            h = _;
                        }
                    });
                    var d = arguments[4];
                    Object.defineProperty(this, "text", {
                        enumerable: !0,
                        get: function() {
                            return d;
                        },
                        set: function(_) {
                            d = _;
                        }
                    });
                    var f = arguments[5];
                    Object.defineProperty(this, "lineNumber", {
                        enumerable: !0,
                        get: function() {
                            return f;
                        },
                        set: function(_) {
                            f = _;
                        }
                    });
                    var m = arguments[6];
                    return Object.defineProperty(this, "align", {
                        enumerable: !0,
                        get: function() {
                            return m;
                        },
                        set: function(_) {
                            m = _;
                        }
                    }), this;
                };
            a.prototype.clone = function() {
                return new a(this.x, this.y, this.width, this.height, this.text, this.lineNumber, this.align);
            }, a.prototype.toArray = function() {
                return [this.x, this.y, this.width, this.height, this.text, this.lineNumber, this.align];
            }, t.setHeaderFunction = function(l) {
                return i.call(this), this.internal.__cell__.headerFunction = typeof l == "function" ? l : void 0, this;
            }, t.getTextDimensions = function(l, c) {
                i.call(this);
                var u = (c = c || {}).fontSize || this.getFontSize(),
                    h = c.font || this.getFont(),
                    d = c.scaleFactor || this.internal.scaleFactor,
                    f = 0,
                    m = 0,
                    _ = 0,
                    x = this;
                if (!Array.isArray(l) && typeof l != "string") {
                    if (typeof l != "number") throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");
                    l = String(l);
                }
                var g = c.maxWidth;
                g > 0 ? typeof l == "string" ? l = this.splitTextToSize(l, g) : Object.prototype.toString.call(l) === "[object Array]" && (l = l.reduce(function(w, T) {
                    return w.concat(x.splitTextToSize(T, g));
                }, [])) : l = Array.isArray(l) ? l : [l];
                for (var b = 0; b < l.length; b++) f < (_ = this.getStringUnitWidth(l[b], {
                    font: h
                }) * u) && (f = _);
                return f !== 0 && (m = l.length), {
                    w: f /= d,
                    h: Math.max((m * u * this.getLineHeightFactor() - u * (this.getLineHeightFactor() - 1)) / d, 0)
                };
            }, t.cellAddPage = function() {
                i.call(this), this.addPage();
                var l = this.internal.__cell__.margins || r;
                return this.internal.__cell__.lastCell = new a(l.left, l.top, void 0, void 0), this.internal.__cell__.pages += 1, this;
            };
            var o = t.cell = function() {
                var l;
                l = arguments[0] instanceof a ? arguments[0] : new a(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6]), i.call(this);
                var c = this.internal.__cell__.lastCell,
                    u = this.internal.__cell__.padding,
                    h = this.internal.__cell__.margins || r,
                    d = this.internal.__cell__.tableHeaderRow,
                    f = this.internal.__cell__.printHeaders;
                return c.lineNumber !== void 0 && (c.lineNumber === l.lineNumber ? (l.x = (c.x || 0) + (c.width || 0), l.y = c.y || 0) : c.y + c.height + l.height + h.bottom > this.getPageHeight() ? (this.cellAddPage(), l.y = h.top, f && d && (this.printHeaderRow(l.lineNumber, !0), l.y += d[0].height)) : l.y = c.y + c.height || l.y), l.text[0] !== void 0 && (this.rect(l.x, l.y, l.width, l.height, e === !0 ? "FD" : void 0), l.align === "right" ? this.text(l.text, l.x + l.width - u, l.y + u, {
                    align: "right",
                    baseline: "top"
                }) : l.align === "center" ? this.text(l.text, l.x + l.width / 2, l.y + u, {
                    align: "center",
                    baseline: "top",
                    maxWidth: l.width - u - u
                }) : this.text(l.text, l.x + u, l.y + u, {
                    align: "left",
                    baseline: "top",
                    maxWidth: l.width - u - u
                })), this.internal.__cell__.lastCell = l, this;
            };
            t.table = function(l, c, u, h, d) {
                if (i.call(this), !u) throw new Error("No data for PDF table.");
                var f, m, _, x, g = [],
                    b = [],
                    w = [],
                    T = {},
                    E = {},
                    L = [],
                    P = [],
                    k = (d = d || {}).autoSize || !1,
                    A = d.printHeaders !== !1,
                    N = d.css && d.css["font-size"] !== void 0 ? 16 * d.css["font-size"] : d.fontSize || 12,
                    C = d.margins || Object.assign({
                        width: this.getPageWidth()
                    }, r),
                    F = typeof d.padding == "number" ? d.padding : 3,
                    W = d.headerBackgroundColor || "#c8c8c8",
                    I = d.headerTextColor || "#000";
                if (n.call(this), this.internal.__cell__.printHeaders = A, this.internal.__cell__.margins = C, this.internal.__cell__.table_font_size = N, this.internal.__cell__.padding = F, this.internal.__cell__.headerBackgroundColor = W, this.internal.__cell__.headerTextColor = I, this.setFontSize(N), h == null) b = g = Object.keys(u[0]), w = g.map(function() {
                    return "left";
                });
                else if (Array.isArray(h) && ni(h[0]) === "object")
                    for (g = h.map(function(Fe) {
                            return Fe.name;
                        }), b = h.map(function(Fe) {
                            return Fe.prompt || Fe.name || "";
                        }), w = h.map(function(Fe) {
                            return Fe.align || "left";
                        }), f = 0; f < h.length; f += 1) E[h[f].name] = .7499990551181103 * h[f].width;
                else Array.isArray(h) && typeof h[0] == "string" && (b = g = h, w = g.map(function() {
                    return "left";
                }));
                if (k || Array.isArray(h) && typeof h[0] == "string")
                    for (f = 0; f < g.length; f += 1) {
                        for (T[x = g[f]] = u.map(function(Fe) {
                                return Fe[x];
                            }), this.setFont(void 0, "bold"), L.push(this.getTextDimensions(b[f], {
                                fontSize: this.internal.__cell__.table_font_size,
                                scaleFactor: this.internal.scaleFactor
                            }).w), m = T[x], this.setFont(void 0, "normal"), _ = 0; _ < m.length; _ += 1) L.push(this.getTextDimensions(m[_], {
                            fontSize: this.internal.__cell__.table_font_size,
                            scaleFactor: this.internal.scaleFactor
                        }).w);
                        E[x] = Math.max.apply(null, L) + F + F, L = [];
                    }
                if (A) {
                    var U = {};
                    for (f = 0; f < g.length; f += 1) U[g[f]] = {}, U[g[f]].text = b[f], U[g[f]].align = w[f];
                    var le = s.call(this, U, E);
                    P = g.map(function(Fe) {
                        return new a(l, c, E[Fe], le, U[Fe].text, void 0, U[Fe].align);
                    }), this.setTableHeaderRow(P), this.printHeaderRow(1, !1);
                }
                var H = h.reduce(function(Fe, Te) {
                    return Fe[Te.name] = Te.align, Fe;
                }, {});
                for (f = 0; f < u.length; f += 1) {
                    "rowStart" in d && d.rowStart instanceof Function && d.rowStart({
                        row: f,
                        data: u[f]
                    }, this);
                    var pe = s.call(this, u[f], E);
                    for (_ = 0; _ < g.length; _ += 1) {
                        var _e = u[f][g[_]];
                        "cellStart" in d && d.cellStart instanceof Function && d.cellStart({
                            row: f,
                            col: _,
                            data: _e
                        }, this), o.call(this, new a(l, c, E[g[_]], pe, _e, f + 2, H[g[_]]));
                    }
                }
                return this.internal.__cell__.table_x = l, this.internal.__cell__.table_y = c, this;
            };
            var s = function(l, c) {
                var u = this.internal.__cell__.padding,
                    h = this.internal.__cell__.table_font_size,
                    d = this.internal.scaleFactor;
                return Object.keys(l).map(function(f) {
                    var m = l[f];
                    return this.splitTextToSize(m.hasOwnProperty("text") ? m.text : m, c[f] - u - u);
                }, this).map(function(f) {
                    return this.getLineHeightFactor() * f.length * h / d + u + u;
                }, this).reduce(function(f, m) {
                    return Math.max(f, m);
                }, 0);
            };
            t.setTableHeaderRow = function(l) {
                i.call(this), this.internal.__cell__.tableHeaderRow = l;
            }, t.printHeaderRow = function(l, c) {
                if (i.call(this), !this.internal.__cell__.tableHeaderRow) throw new Error("Property tableHeaderRow does not exist.");
                var u;
                if (e = !0, typeof this.internal.__cell__.headerFunction == "function") {
                    var h = this.internal.__cell__.headerFunction(this, this.internal.__cell__.pages);
                    this.internal.__cell__.lastCell = new a(h[0], h[1], h[2], h[3], void 0, -1);
                }
                this.setFont(void 0, "bold");
                for (var d = [], f = 0; f < this.internal.__cell__.tableHeaderRow.length; f += 1) {
                    u = this.internal.__cell__.tableHeaderRow[f].clone(), c && (u.y = this.internal.__cell__.margins.top || 0, d.push(u)), u.lineNumber = l;
                    var m = this.getTextColor();
                    this.setTextColor(this.internal.__cell__.headerTextColor), this.setFillColor(this.internal.__cell__.headerBackgroundColor), o.call(this, u), this.setTextColor(m);
                }
                d.length > 0 && this.setTableHeaderRow(d), this.setFont(void 0, "normal"), e = !1;
            };
        }(Bt.API);
    Xy = {
        italic: ["italic", "oblique", "normal"],
        oblique: ["oblique", "italic", "normal"],
        normal: ["normal", "oblique", "italic"]
    }, Ky = ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded"], rg = qy(Ky), Yy = [100, 200, 300, 400, 500, 600, 700, 800, 900], SA = qy(Yy);
    CA = {
        "sans-serif": "helvetica",
        fixed: "courier",
        monospace: "courier",
        terminal: "courier",
        cursive: "times",
        fantasy: "times",
        serif: "times"
    }, Sy = {
        caption: "times",
        icon: "times",
        menu: "times",
        "message-box": "times",
        "small-caption": "times",
        "status-bar": "times"
    };
    Zm = ["times"];
    (function(t) {
        var r, e, i, n, a, o, s, l, c, u = function(O) {
            return O = O || {}, this.isStrokeTransparent = O.isStrokeTransparent || !1, this.strokeOpacity = O.strokeOpacity || 1, this.strokeStyle = O.strokeStyle || "#000000", this.fillStyle = O.fillStyle || "#000000", this.isFillTransparent = O.isFillTransparent || !1, this.fillOpacity = O.fillOpacity || 1, this.font = O.font || "10px sans-serif", this.textBaseline = O.textBaseline || "alphabetic", this.textAlign = O.textAlign || "left", this.lineWidth = O.lineWidth || 1, this.lineJoin = O.lineJoin || "miter", this.lineCap = O.lineCap || "butt", this.path = O.path || [], this.transform = O.transform !== void 0 ? O.transform.clone() : new l(), this.globalCompositeOperation = O.globalCompositeOperation || "normal", this.globalAlpha = O.globalAlpha || 1, this.clip_path = O.clip_path || [], this.currentPoint = O.currentPoint || new o(), this.miterLimit = O.miterLimit || 10, this.lastPoint = O.lastPoint || new o(), this.lineDashOffset = O.lineDashOffset || 0, this.lineDash = O.lineDash || [], this.margin = O.margin || [0, 0, 0, 0], this.prevPageLastElemOffset = O.prevPageLastElemOffset || 0, this.ignoreClearRect = typeof O.ignoreClearRect != "boolean" || O.ignoreClearRect, this;
        };
        t.events.push(["initialized", function() {
            this.context2d = new h(this), r = this.internal.f2, e = this.internal.getCoordinateString, i = this.internal.getVerticalCoordinateString, n = this.internal.getHorizontalCoordinate, a = this.internal.getVerticalCoordinate, o = this.internal.Point, s = this.internal.Rectangle, l = this.internal.Matrix, c = new u();
        }]);
        var h = function(O) {
            Object.defineProperty(this, "canvas", {
                get: function() {
                    return {
                        parentNode: !1,
                        style: !1
                    };
                }
            });
            var j = O;
            Object.defineProperty(this, "pdf", {
                get: function() {
                    return j;
                }
            });
            var X = !1;
            Object.defineProperty(this, "pageWrapXEnabled", {
                get: function() {
                    return X;
                },
                set: function(q) {
                    X = !!q;
                }
            });
            var me = !1;
            Object.defineProperty(this, "pageWrapYEnabled", {
                get: function() {
                    return me;
                },
                set: function(q) {
                    me = !!q;
                }
            });
            var xe = 0;
            Object.defineProperty(this, "posX", {
                get: function() {
                    return xe;
                },
                set: function(q) {
                    isNaN(q) || (xe = q);
                }
            });
            var be = 0;
            Object.defineProperty(this, "posY", {
                get: function() {
                    return be;
                },
                set: function(q) {
                    isNaN(q) || (be = q);
                }
            }), Object.defineProperty(this, "margin", {
                get: function() {
                    return c.margin;
                },
                set: function(q) {
                    var ze;
                    typeof q == "number" ? ze = [q, q, q, q] : ((ze = new Array(4))[0] = q[0], ze[1] = q.length >= 2 ? q[1] : ze[0], ze[2] = q.length >= 3 ? q[2] : ze[0], ze[3] = q.length >= 4 ? q[3] : ze[1]), c.margin = ze;
                }
            });
            var B = !1;
            Object.defineProperty(this, "autoPaging", {
                get: function() {
                    return B;
                },
                set: function(q) {
                    B = q;
                }
            });
            var ne = 0;
            Object.defineProperty(this, "lastBreak", {
                get: function() {
                    return ne;
                },
                set: function(q) {
                    ne = q;
                }
            });
            var Z = [];
            Object.defineProperty(this, "pageBreaks", {
                get: function() {
                    return Z;
                },
                set: function(q) {
                    Z = q;
                }
            }), Object.defineProperty(this, "ctx", {
                get: function() {
                    return c;
                },
                set: function(q) {
                    q instanceof u && (c = q);
                }
            }), Object.defineProperty(this, "path", {
                get: function() {
                    return c.path;
                },
                set: function(q) {
                    c.path = q;
                }
            });
            var J = [];
            Object.defineProperty(this, "ctxStack", {
                get: function() {
                    return J;
                },
                set: function(q) {
                    J = q;
                }
            }), Object.defineProperty(this, "fillStyle", {
                get: function() {
                    return this.ctx.fillStyle;
                },
                set: function(q) {
                    var ze;
                    ze = d(q), this.ctx.fillStyle = ze.style, this.ctx.isFillTransparent = ze.a === 0, this.ctx.fillOpacity = ze.a, this.pdf.setFillColor(ze.r, ze.g, ze.b, {
                        a: ze.a
                    }), this.pdf.setTextColor(ze.r, ze.g, ze.b, {
                        a: ze.a
                    });
                }
            }), Object.defineProperty(this, "strokeStyle", {
                get: function() {
                    return this.ctx.strokeStyle;
                },
                set: function(q) {
                    var ze = d(q);
                    this.ctx.strokeStyle = ze.style, this.ctx.isStrokeTransparent = ze.a === 0, this.ctx.strokeOpacity = ze.a, ze.a === 0 ? this.pdf.setDrawColor(255, 255, 255) : (ze.a, this.pdf.setDrawColor(ze.r, ze.g, ze.b));
                }
            }), Object.defineProperty(this, "lineCap", {
                get: function() {
                    return this.ctx.lineCap;
                },
                set: function(q) {
                    ["butt", "round", "square"].indexOf(q) !== -1 && (this.ctx.lineCap = q, this.pdf.setLineCap(q));
                }
            }), Object.defineProperty(this, "lineWidth", {
                get: function() {
                    return this.ctx.lineWidth;
                },
                set: function(q) {
                    isNaN(q) || (this.ctx.lineWidth = q, this.pdf.setLineWidth(q));
                }
            }), Object.defineProperty(this, "lineJoin", {
                get: function() {
                    return this.ctx.lineJoin;
                },
                set: function(q) {
                    ["bevel", "round", "miter"].indexOf(q) !== -1 && (this.ctx.lineJoin = q, this.pdf.setLineJoin(q));
                }
            }), Object.defineProperty(this, "miterLimit", {
                get: function() {
                    return this.ctx.miterLimit;
                },
                set: function(q) {
                    isNaN(q) || (this.ctx.miterLimit = q, this.pdf.setMiterLimit(q));
                }
            }), Object.defineProperty(this, "textBaseline", {
                get: function() {
                    return this.ctx.textBaseline;
                },
                set: function(q) {
                    this.ctx.textBaseline = q;
                }
            }), Object.defineProperty(this, "textAlign", {
                get: function() {
                    return this.ctx.textAlign;
                },
                set: function(q) {
                    ["right", "end", "center", "left", "start"].indexOf(q) !== -1 && (this.ctx.textAlign = q);
                }
            });
            var ye = null,
                je = null,
                Qe = null;
            Object.defineProperty(this, "fontFaces", {
                get: function() {
                    return Qe;
                },
                set: function(q) {
                    ye = null, je = null, Qe = q;
                }
            }), Object.defineProperty(this, "font", {
                get: function() {
                    return this.ctx.font;
                },
                set: function(q) {
                    var ze;
                    if (this.ctx.font = q, (ze = /^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(q)) !== null) {
                        var gt = ze[1];
                        ze[2];
                        var ft = ze[3],
                            Re = ze[4];
                        ze[5];
                        var pt = ze[6],
                            ct = /^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(Re)[2];
                        Re = Math.floor(ct === "px" ? parseFloat(Re) * this.pdf.internal.scaleFactor : ct === "em" ? parseFloat(Re) * this.pdf.getFontSize() : parseFloat(Re) * this.pdf.internal.scaleFactor), this.pdf.setFontSize(Re);
                        var xt = function(kt) {
                            var Zt, ir, lr = [],
                                _r = kt.trim();
                            if (_r === "") return Zm;
                            if (_r in Sy) return [Sy[_r]];
                            for (; _r !== "";) {
                                switch (ir = null, Zt = (_r = Ay(_r)).charAt(0)) {
                                    case '"':
                                    case "'":
                                        ir = AA(_r.substring(1), Zt);
                                        break;
                                    default:
                                        ir = TA(_r);
                                }
                                if (ir === null || (lr.push(ir[0]), (_r = Ay(ir[1])) !== "" && _r.charAt(0) !== ",")) return Zm;
                                _r = _r.replace(/^,/, "");
                            }
                            return lr;
                        }(pt);
                        if (this.fontFaces) {
                            var yt = function(kt, Zt) {
                                    var ir = kt.getFontList(),
                                        lr = JSON.stringify(ir);
                                    if (ye === null || je !== lr) {
                                        var _r = function(Gr) {
                                            var Pt = [];
                                            return Object.keys(Gr).forEach(function(Yr) {
                                                Gr[Yr].forEach(function(Jt) {
                                                    var dr = null;
                                                    switch (Jt) {
                                                        case "bold":
                                                            dr = {
                                                                family: Yr,
                                                                weight: "bold"
                                                            };
                                                            break;
                                                        case "italic":
                                                            dr = {
                                                                family: Yr,
                                                                style: "italic"
                                                            };
                                                            break;
                                                        case "bolditalic":
                                                            dr = {
                                                                family: Yr,
                                                                weight: "bold",
                                                                style: "italic"
                                                            };
                                                            break;
                                                        case "":
                                                        case "normal":
                                                            dr = {
                                                                family: Yr
                                                            };
                                                    }
                                                    dr !== null && (dr.ref = {
                                                        name: Yr,
                                                        style: Jt
                                                    }, Pt.push(dr));
                                                });
                                            }), Pt;
                                        }(ir);
                                        ye = function(Gr) {
                                            for (var Pt = {}, Yr = 0; Yr < Gr.length; ++Yr) {
                                                var Jt = Ym(Gr[Yr]),
                                                    dr = Jt.family,
                                                    yi = Jt.stretch,
                                                    Ir = Jt.style,
                                                    qt = Jt.weight;
                                                Pt[dr] = Pt[dr] || {}, Pt[dr][yi] = Pt[dr][yi] || {}, Pt[dr][yi][Ir] = Pt[dr][yi][Ir] || {}, Pt[dr][yi][Ir][qt] = Jt;
                                            }
                                            return Pt;
                                        }(_r.concat(Zt)), je = lr;
                                    }
                                    return ye;
                                }(this.pdf, this.fontFaces),
                                Pe = xt.map(function(kt) {
                                    return {
                                        family: kt,
                                        stretch: "normal",
                                        weight: ft,
                                        style: gt
                                    };
                                }),
                                Je = function(kt, Zt, ir) {
                                    for (var lr = (ir = ir || {}).defaultFontFamily || "times", _r = Object.assign({}, CA, ir.genericFontFamilies || {}), Gr = null, Pt = null, Yr = 0; Yr < Zt.length; ++Yr)
                                        if (_r[(Gr = Ym(Zt[Yr])).family] && (Gr.family = _r[Gr.family]), kt.hasOwnProperty(Gr.family)) {
                                            Pt = kt[Gr.family];
                                            break;
                                        }
                                    if (!(Pt = Pt || kt[lr])) throw new Error("Could not find a font-family for the rule '" + Cy(Gr) + "' and default family '" + lr + "'.");
                                    if (Pt = function(Jt, dr) {
                                            if (dr[Jt]) return dr[Jt];
                                            var yi = rg[Jt],
                                                Ir = yi <= rg.normal ? -1 : 1,
                                                qt = wy(dr, Ky, yi, Ir);
                                            if (!qt) throw new Error("Could not find a matching font-stretch value for " + Jt);
                                            return qt;
                                        }(Gr.stretch, Pt), Pt = function(Jt, dr) {
                                            if (dr[Jt]) return dr[Jt];
                                            for (var yi = Xy[Jt], Ir = 0; Ir < yi.length; ++Ir)
                                                if (dr[yi[Ir]]) return dr[yi[Ir]];
                                            throw new Error("Could not find a matching font-style for " + Jt);
                                        }(Gr.style, Pt), !(Pt = function(Jt, dr) {
                                            if (dr[Jt]) return dr[Jt];
                                            if (Jt === 400 && dr[500]) return dr[500];
                                            if (Jt === 500 && dr[400]) return dr[400];
                                            var yi = SA[Jt],
                                                Ir = wy(dr, Yy, yi, Jt < 400 ? -1 : 1);
                                            if (!Ir) throw new Error("Could not find a matching font-weight for value " + Jt);
                                            return Ir;
                                        }(Gr.weight, Pt))) throw new Error("Failed to resolve a font for the rule '" + Cy(Gr) + "'.");
                                    return Pt;
                                }(yt, Pe);
                            this.pdf.setFont(Je.ref.name, Je.ref.style);
                        } else {
                            var er = "";
                            (ft === "bold" || parseInt(ft, 10) >= 700 || gt === "bold") && (er = "bold"), gt === "italic" && (er += "italic"), er.length === 0 && (er = "normal");
                            for (var ur = "", Gt = {
                                    arial: "Helvetica",
                                    Arial: "Helvetica",
                                    verdana: "Helvetica",
                                    Verdana: "Helvetica",
                                    helvetica: "Helvetica",
                                    Helvetica: "Helvetica",
                                    "sans-serif": "Helvetica",
                                    fixed: "Courier",
                                    monospace: "Courier",
                                    terminal: "Courier",
                                    cursive: "Times",
                                    fantasy: "Times",
                                    serif: "Times"
                                }, Ct = 0; Ct < xt.length; Ct++) {
                                if (this.pdf.internal.getFont(xt[Ct], er, {
                                        noFallback: !0,
                                        disableWarning: !0
                                    }) !== void 0) {
                                    ur = xt[Ct];
                                    break;
                                }
                                if (er === "bolditalic" && this.pdf.internal.getFont(xt[Ct], "bold", {
                                        noFallback: !0,
                                        disableWarning: !0
                                    }) !== void 0) ur = xt[Ct], er = "bold";
                                else if (this.pdf.internal.getFont(xt[Ct], "normal", {
                                        noFallback: !0,
                                        disableWarning: !0
                                    }) !== void 0) {
                                    ur = xt[Ct], er = "normal";
                                    break;
                                }
                            }
                            if (ur === "") {
                                for (var fr = 0; fr < xt.length; fr++)
                                    if (Gt[xt[fr]]) {
                                        ur = Gt[xt[fr]];
                                        break;
                                    }
                            }
                            ur = ur === "" ? "Times" : ur, this.pdf.setFont(ur, er);
                        }
                    }
                }
            }), Object.defineProperty(this, "globalCompositeOperation", {
                get: function() {
                    return this.ctx.globalCompositeOperation;
                },
                set: function(q) {
                    this.ctx.globalCompositeOperation = q;
                }
            }), Object.defineProperty(this, "globalAlpha", {
                get: function() {
                    return this.ctx.globalAlpha;
                },
                set: function(q) {
                    this.ctx.globalAlpha = q;
                }
            }), Object.defineProperty(this, "lineDashOffset", {
                get: function() {
                    return this.ctx.lineDashOffset;
                },
                set: function(q) {
                    this.ctx.lineDashOffset = q, Te.call(this);
                }
            }), Object.defineProperty(this, "lineDash", {
                get: function() {
                    return this.ctx.lineDash;
                },
                set: function(q) {
                    this.ctx.lineDash = q, Te.call(this);
                }
            }), Object.defineProperty(this, "ignoreClearRect", {
                get: function() {
                    return this.ctx.ignoreClearRect;
                },
                set: function(q) {
                    this.ctx.ignoreClearRect = !!q;
                }
            });
        };
        h.prototype.setLineDash = function(O) {
            this.lineDash = O;
        }, h.prototype.getLineDash = function() {
            return this.lineDash.length % 2 ? this.lineDash.concat(this.lineDash) : this.lineDash.slice();
        }, h.prototype.fill = function() {
            T.call(this, "fill", !1);
        }, h.prototype.stroke = function() {
            T.call(this, "stroke", !1);
        }, h.prototype.beginPath = function() {
            this.path = [{
                type: "begin"
            }];
        }, h.prototype.moveTo = function(O, j) {
            if (isNaN(O) || isNaN(j)) throw xi.error("jsPDF.context2d.moveTo: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.moveTo");
            var X = this.ctx.transform.applyToPoint(new o(O, j));
            this.path.push({
                type: "mt",
                x: X.x,
                y: X.y
            }), this.ctx.lastPoint = new o(O, j);
        }, h.prototype.closePath = function() {
            var O = new o(0, 0),
                j = 0;
            for (j = this.path.length - 1; j !== -1; j--)
                if (this.path[j].type === "begin" && ni(this.path[j + 1]) === "object" && typeof this.path[j + 1].x == "number") {
                    O = new o(this.path[j + 1].x, this.path[j + 1].y);
                    break;
                }
            this.path.push({
                type: "close"
            }), this.ctx.lastPoint = new o(O.x, O.y);
        }, h.prototype.lineTo = function(O, j) {
            if (isNaN(O) || isNaN(j)) throw xi.error("jsPDF.context2d.lineTo: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.lineTo");
            var X = this.ctx.transform.applyToPoint(new o(O, j));
            this.path.push({
                type: "lt",
                x: X.x,
                y: X.y
            }), this.ctx.lastPoint = new o(X.x, X.y);
        }, h.prototype.clip = function() {
            this.ctx.clip_path = JSON.parse(JSON.stringify(this.path)), T.call(this, null, !0);
        }, h.prototype.quadraticCurveTo = function(O, j, X, me) {
            if (isNaN(X) || isNaN(me) || isNaN(O) || isNaN(j)) throw xi.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");
            var xe = this.ctx.transform.applyToPoint(new o(X, me)),
                be = this.ctx.transform.applyToPoint(new o(O, j));
            this.path.push({
                type: "qct",
                x1: be.x,
                y1: be.y,
                x: xe.x,
                y: xe.y
            }), this.ctx.lastPoint = new o(xe.x, xe.y);
        }, h.prototype.bezierCurveTo = function(O, j, X, me, xe, be) {
            if (isNaN(xe) || isNaN(be) || isNaN(O) || isNaN(j) || isNaN(X) || isNaN(me)) throw xi.error("jsPDF.context2d.bezierCurveTo: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");
            var B = this.ctx.transform.applyToPoint(new o(xe, be)),
                ne = this.ctx.transform.applyToPoint(new o(O, j)),
                Z = this.ctx.transform.applyToPoint(new o(X, me));
            this.path.push({
                type: "bct",
                x1: ne.x,
                y1: ne.y,
                x2: Z.x,
                y2: Z.y,
                x: B.x,
                y: B.y
            }), this.ctx.lastPoint = new o(B.x, B.y);
        }, h.prototype.arc = function(O, j, X, me, xe, be) {
            if (isNaN(O) || isNaN(j) || isNaN(X) || isNaN(me) || isNaN(xe)) throw xi.error("jsPDF.context2d.arc: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.arc");
            if (be = !!be, !this.ctx.transform.isIdentity) {
                var B = this.ctx.transform.applyToPoint(new o(O, j));
                O = B.x, j = B.y;
                var ne = this.ctx.transform.applyToPoint(new o(0, X)),
                    Z = this.ctx.transform.applyToPoint(new o(0, 0));
                X = Math.sqrt(Math.pow(ne.x - Z.x, 2) + Math.pow(ne.y - Z.y, 2));
            }
            Math.abs(xe - me) >= 2 * Math.PI && (me = 0, xe = 2 * Math.PI), this.path.push({
                type: "arc",
                x: O,
                y: j,
                radius: X,
                startAngle: me,
                endAngle: xe,
                counterclockwise: be
            });
        }, h.prototype.arcTo = function(O, j, X, me, xe) {
            throw new Error("arcTo not implemented.");
        }, h.prototype.rect = function(O, j, X, me) {
            if (isNaN(O) || isNaN(j) || isNaN(X) || isNaN(me)) throw xi.error("jsPDF.context2d.rect: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.rect");
            this.moveTo(O, j), this.lineTo(O + X, j), this.lineTo(O + X, j + me), this.lineTo(O, j + me), this.lineTo(O, j), this.lineTo(O + X, j), this.lineTo(O, j);
        }, h.prototype.fillRect = function(O, j, X, me) {
            if (isNaN(O) || isNaN(j) || isNaN(X) || isNaN(me)) throw xi.error("jsPDF.context2d.fillRect: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.fillRect");
            if (!f.call(this)) {
                var xe = {};
                this.lineCap !== "butt" && (xe.lineCap = this.lineCap, this.lineCap = "butt"), this.lineJoin !== "miter" && (xe.lineJoin = this.lineJoin, this.lineJoin = "miter"), this.beginPath(), this.rect(O, j, X, me), this.fill(), xe.hasOwnProperty("lineCap") && (this.lineCap = xe.lineCap), xe.hasOwnProperty("lineJoin") && (this.lineJoin = xe.lineJoin);
            }
        }, h.prototype.strokeRect = function(O, j, X, me) {
            if (isNaN(O) || isNaN(j) || isNaN(X) || isNaN(me)) throw xi.error("jsPDF.context2d.strokeRect: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");
            m.call(this) || (this.beginPath(), this.rect(O, j, X, me), this.stroke());
        }, h.prototype.clearRect = function(O, j, X, me) {
            if (isNaN(O) || isNaN(j) || isNaN(X) || isNaN(me)) throw xi.error("jsPDF.context2d.clearRect: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.clearRect");
            this.ignoreClearRect || (this.fillStyle = "#ffffff", this.fillRect(O, j, X, me));
        }, h.prototype.save = function(O) {
            O = typeof O != "boolean" || O;
            for (var j = this.pdf.internal.getCurrentPageInfo().pageNumber, X = 0; X < this.pdf.internal.getNumberOfPages(); X++) this.pdf.setPage(X + 1), this.pdf.internal.out("q");
            if (this.pdf.setPage(j), O) {
                this.ctx.fontSize = this.pdf.internal.getFontSize();
                var me = new u(this.ctx);
                this.ctxStack.push(this.ctx), this.ctx = me;
            }
        }, h.prototype.restore = function(O) {
            O = typeof O != "boolean" || O;
            for (var j = this.pdf.internal.getCurrentPageInfo().pageNumber, X = 0; X < this.pdf.internal.getNumberOfPages(); X++) this.pdf.setPage(X + 1), this.pdf.internal.out("Q");
            this.pdf.setPage(j), O && this.ctxStack.length !== 0 && (this.ctx = this.ctxStack.pop(), this.fillStyle = this.ctx.fillStyle, this.strokeStyle = this.ctx.strokeStyle, this.font = this.ctx.font, this.lineCap = this.ctx.lineCap, this.lineWidth = this.ctx.lineWidth, this.lineJoin = this.ctx.lineJoin, this.lineDash = this.ctx.lineDash, this.lineDashOffset = this.ctx.lineDashOffset);
        }, h.prototype.toDataURL = function() {
            throw new Error("toDataUrl not implemented.");
        };
        var d = function(O) {
                var j, X, me, xe;
                if (O.isCanvasGradient === !0 && (O = O.getColor()), !O) return {
                    r: 0,
                    g: 0,
                    b: 0,
                    a: 0,
                    style: O
                };
                if (/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(O)) j = 0, X = 0, me = 0, xe = 0;
                else {
                    var be = /rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(O);
                    if (be !== null) j = parseInt(be[1]), X = parseInt(be[2]), me = parseInt(be[3]), xe = 1;
                    else if ((be = /rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(O)) !== null) j = parseInt(be[1]), X = parseInt(be[2]), me = parseInt(be[3]), xe = parseFloat(be[4]);
                    else {
                        if (xe = 1, typeof O == "string" && O.charAt(0) !== "#") {
                            var B = new Vy(O);
                            O = B.ok ? B.toHex() : "#000000";
                        }
                        O.length === 4 ? (j = O.substring(1, 2), j += j, X = O.substring(2, 3), X += X, me = O.substring(3, 4), me += me) : (j = O.substring(1, 3), X = O.substring(3, 5), me = O.substring(5, 7)), j = parseInt(j, 16), X = parseInt(X, 16), me = parseInt(me, 16);
                    }
                }
                return {
                    r: j,
                    g: X,
                    b: me,
                    a: xe,
                    style: O
                };
            },
            f = function() {
                return this.ctx.isFillTransparent || this.globalAlpha == 0;
            },
            m = function() {
                return !!(this.ctx.isStrokeTransparent || this.globalAlpha == 0);
            };
        h.prototype.fillText = function(O, j, X, me) {
            if (isNaN(j) || isNaN(X) || typeof O != "string") throw xi.error("jsPDF.context2d.fillText: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.fillText");
            if (me = isNaN(me) ? void 0 : me, !f.call(this)) {
                var xe = pe(this.ctx.transform.rotation),
                    be = this.ctx.transform.scaleX;
                F.call(this, {
                    text: O,
                    x: j,
                    y: X,
                    scale: be,
                    angle: xe,
                    align: this.textAlign,
                    maxWidth: me
                });
            }
        }, h.prototype.strokeText = function(O, j, X, me) {
            if (isNaN(j) || isNaN(X) || typeof O != "string") throw xi.error("jsPDF.context2d.strokeText: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.strokeText");
            if (!m.call(this)) {
                me = isNaN(me) ? void 0 : me;
                var xe = pe(this.ctx.transform.rotation),
                    be = this.ctx.transform.scaleX;
                F.call(this, {
                    text: O,
                    x: j,
                    y: X,
                    scale: be,
                    renderingMode: "stroke",
                    angle: xe,
                    align: this.textAlign,
                    maxWidth: me
                });
            }
        }, h.prototype.measureText = function(O) {
            if (typeof O != "string") throw xi.error("jsPDF.context2d.measureText: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.measureText");
            var j = this.pdf,
                X = this.pdf.internal.scaleFactor,
                me = j.internal.getFontSize(),
                xe = j.getStringUnitWidth(O) * me / j.internal.scaleFactor;
            return new function(be) {
                var B = (be = be || {}).width || 0;
                return Object.defineProperty(this, "width", {
                    get: function() {
                        return B;
                    }
                }), this;
            }({
                width: xe *= Math.round(96 * X / 72 * 1e4) / 1e4
            });
        }, h.prototype.scale = function(O, j) {
            if (isNaN(O) || isNaN(j)) throw xi.error("jsPDF.context2d.scale: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.scale");
            var X = new l(O, 0, 0, j, 0, 0);
            this.ctx.transform = this.ctx.transform.multiply(X);
        }, h.prototype.rotate = function(O) {
            if (isNaN(O)) throw xi.error("jsPDF.context2d.rotate: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.rotate");
            var j = new l(Math.cos(O), Math.sin(O), -Math.sin(O), Math.cos(O), 0, 0);
            this.ctx.transform = this.ctx.transform.multiply(j);
        }, h.prototype.translate = function(O, j) {
            if (isNaN(O) || isNaN(j)) throw xi.error("jsPDF.context2d.translate: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.translate");
            var X = new l(1, 0, 0, 1, O, j);
            this.ctx.transform = this.ctx.transform.multiply(X);
        }, h.prototype.transform = function(O, j, X, me, xe, be) {
            if (isNaN(O) || isNaN(j) || isNaN(X) || isNaN(me) || isNaN(xe) || isNaN(be)) throw xi.error("jsPDF.context2d.transform: Invalid arguments", arguments), new Error("Invalid arguments passed to jsPDF.context2d.transform");
            var B = new l(O, j, X, me, xe, be);
            this.ctx.transform = this.ctx.transform.multiply(B);
        }, h.prototype.setTransform = function(O, j, X, me, xe, be) {
            O = isNaN(O) ? 1 : O, j = isNaN(j) ? 0 : j, X = isNaN(X) ? 0 : X, me = isNaN(me) ? 1 : me, xe = isNaN(xe) ? 0 : xe, be = isNaN(be) ? 0 : be, this.ctx.transform = new l(O, j, X, me, xe, be);
        };
        var _ = function() {
            return this.margin[0] > 0 || this.margin[1] > 0 || this.margin[2] > 0 || this.margin[3] > 0;
        };
        h.prototype.drawImage = function(O, j, X, me, xe, be, B, ne, Z) {
            var J = this.pdf.getImageProperties(O),
                ye = 1,
                je = 1,
                Qe = 1,
                q = 1;
            me !== void 0 && ne !== void 0 && (Qe = ne / me, q = Z / xe, ye = J.width / me * ne / me, je = J.height / xe * Z / xe), be === void 0 && (be = j, B = X, j = 0, X = 0), me !== void 0 && ne === void 0 && (ne = me, Z = xe), me === void 0 && ne === void 0 && (ne = J.width, Z = J.height);
            var ze = this.ctx.transform.decompose(),
                gt = pe(ze.rotate.shx),
                ft = new l(),
                Re = (ft = (ft = (ft = ft.multiply(ze.translate)).multiply(ze.skew)).multiply(ze.scale)).applyToRectangle(new s(be - j * Qe, B - X * q, me * ye, xe * je));
            if (this.autoPaging) {
                for (var pt, ct = x.call(this, Re), xt = [], yt = 0; yt < ct.length; yt += 1) xt.indexOf(ct[yt]) === -1 && xt.push(ct[yt]);
                w(xt);
                for (var Pe = xt[0], Je = xt[xt.length - 1], er = Pe; er < Je + 1; er++) {
                    this.pdf.setPage(er);
                    var ur = this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1],
                        Gt = er === 1 ? this.posY + this.margin[0] : this.margin[0],
                        Ct = this.pdf.internal.pageSize.height - this.posY - this.margin[0] - this.margin[2],
                        fr = this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2],
                        kt = er === 1 ? 0 : Ct + (er - 2) * fr;
                    if (this.ctx.clip_path.length !== 0) {
                        var Zt = this.path;
                        pt = JSON.parse(JSON.stringify(this.ctx.clip_path)), this.path = b(pt, this.posX + this.margin[3], -kt + Gt + this.ctx.prevPageLastElemOffset), E.call(this, "fill", !0), this.path = Zt;
                    }
                    var ir = JSON.parse(JSON.stringify(Re));
                    ir = b([ir], this.posX + this.margin[3], -kt + Gt + this.ctx.prevPageLastElemOffset)[0];
                    var lr = (er > Pe || er < Je) && _.call(this);
                    lr && (this.pdf.saveGraphicsState(), this.pdf.rect(this.margin[3], this.margin[0], ur, fr, null).clip().discardPath()), this.pdf.addImage(O, "JPEG", ir.x, ir.y, ir.w, ir.h, null, null, gt), lr && this.pdf.restoreGraphicsState();
                }
            } else this.pdf.addImage(O, "JPEG", Re.x, Re.y, Re.w, Re.h, null, null, gt);
        };
        var x = function(O, j, X) {
                var me = [];
                j = j || this.pdf.internal.pageSize.width, X = X || this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];
                var xe = this.posY + this.ctx.prevPageLastElemOffset;
                switch (O.type) {
                    default:
                        case "mt":
                        case "lt":
                        me.push(Math.floor((O.y + xe) / X) + 1);
                    break;
                    case "arc":
                            me.push(Math.floor((O.y + xe - O.radius) / X) + 1),
                        me.push(Math.floor((O.y + xe + O.radius) / X) + 1);
                        break;
                    case "qct":
                            var be = _e(this.ctx.lastPoint.x, this.ctx.lastPoint.y, O.x1, O.y1, O.x, O.y);me.push(Math.floor((be.y + xe) / X) + 1),
                        me.push(Math.floor((be.y + be.h + xe) / X) + 1);
                        break;
                    case "bct":
                            var B = Fe(this.ctx.lastPoint.x, this.ctx.lastPoint.y, O.x1, O.y1, O.x2, O.y2, O.x, O.y);me.push(Math.floor((B.y + xe) / X) + 1),
                        me.push(Math.floor((B.y + B.h + xe) / X) + 1);
                        break;
                    case "rect":
                            me.push(Math.floor((O.y + xe) / X) + 1),
                        me.push(Math.floor((O.y + O.h + xe) / X) + 1);
                }
                for (var ne = 0; ne < me.length; ne += 1)
                    for (; this.pdf.internal.getNumberOfPages() < me[ne];) g.call(this);
                return me;
            },
            g = function() {
                var O = this.fillStyle,
                    j = this.strokeStyle,
                    X = this.font,
                    me = this.lineCap,
                    xe = this.lineWidth,
                    be = this.lineJoin;
                this.pdf.addPage(), this.fillStyle = O, this.strokeStyle = j, this.font = X, this.lineCap = me, this.lineWidth = xe, this.lineJoin = be;
            },
            b = function(O, j, X) {
                for (var me = 0; me < O.length; me++) switch (O[me].type) {
                    case "bct":
                        O[me].x2 += j, O[me].y2 += X;
                    case "qct":
                        O[me].x1 += j, O[me].y1 += X;
                    default:
                        O[me].x += j, O[me].y += X;
                }
                return O;
            },
            w = function(O) {
                return O.sort(function(j, X) {
                    return j - X;
                });
            },
            T = function(O, j) {
                var X = this.fillStyle,
                    me = this.strokeStyle,
                    xe = this.lineCap,
                    be = this.lineWidth,
                    B = Math.abs(be * this.ctx.transform.scaleX),
                    ne = this.lineJoin;
                if (this.autoPaging) {
                    for (var Z, J, ye = JSON.parse(JSON.stringify(this.path)), je = JSON.parse(JSON.stringify(this.path)), Qe = [], q = 0; q < je.length; q++)
                        if (je[q].x !== void 0)
                            for (var ze = x.call(this, je[q]), gt = 0; gt < ze.length; gt += 1) Qe.indexOf(ze[gt]) === -1 && Qe.push(ze[gt]);
                    for (var ft = 0; ft < Qe.length; ft++)
                        for (; this.pdf.internal.getNumberOfPages() < Qe[ft];) g.call(this);
                    w(Qe);
                    for (var Re = Qe[0], pt = Qe[Qe.length - 1], ct = Re; ct < pt + 1; ct++) {
                        this.pdf.setPage(ct), this.fillStyle = X, this.strokeStyle = me, this.lineCap = xe, this.lineWidth = B, this.lineJoin = ne;
                        var xt = this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1],
                            yt = ct === 1 ? this.posY + this.margin[0] : this.margin[0],
                            Pe = this.pdf.internal.pageSize.height - this.posY - this.margin[0] - this.margin[2],
                            Je = this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2],
                            er = ct === 1 ? 0 : Pe + (ct - 2) * Je;
                        if (this.ctx.clip_path.length !== 0) {
                            var ur = this.path;
                            Z = JSON.parse(JSON.stringify(this.ctx.clip_path)), this.path = b(Z, this.posX + this.margin[3], -er + yt + this.ctx.prevPageLastElemOffset), E.call(this, O, !0), this.path = ur;
                        }
                        if (J = JSON.parse(JSON.stringify(ye)), this.path = b(J, this.posX + this.margin[3], -er + yt + this.ctx.prevPageLastElemOffset), j === !1 || ct === 0) {
                            var Gt = (ct > Re || ct < pt) && _.call(this);
                            Gt && (this.pdf.saveGraphicsState(), this.pdf.rect(this.margin[3], this.margin[0], xt, Je, null).clip().discardPath()), E.call(this, O, j), Gt && this.pdf.restoreGraphicsState();
                        }
                        this.lineWidth = be;
                    }
                    this.path = ye;
                } else this.lineWidth = B, E.call(this, O, j), this.lineWidth = be;
            },
            E = function(O, j) {
                if ((O !== "stroke" || j || !m.call(this)) && (O === "stroke" || j || !f.call(this))) {
                    for (var X, me, xe = [], be = this.path, B = 0; B < be.length; B++) {
                        var ne = be[B];
                        switch (ne.type) {
                            case "begin":
                                xe.push({
                                    begin: !0
                                });
                                break;
                            case "close":
                                xe.push({
                                    close: !0
                                });
                                break;
                            case "mt":
                                xe.push({
                                    start: ne,
                                    deltas: [],
                                    abs: []
                                });
                                break;
                            case "lt":
                                var Z = xe.length;
                                if (be[B - 1] && !isNaN(be[B - 1].x) && (X = [ne.x - be[B - 1].x, ne.y - be[B - 1].y], Z > 0)) {
                                    for (; Z >= 0; Z--)
                                        if (xe[Z - 1].close !== !0 && xe[Z - 1].begin !== !0) {
                                            xe[Z - 1].deltas.push(X), xe[Z - 1].abs.push(ne);
                                            break;
                                        }
                                }
                                break;
                            case "bct":
                                X = [ne.x1 - be[B - 1].x, ne.y1 - be[B - 1].y, ne.x2 - be[B - 1].x, ne.y2 - be[B - 1].y, ne.x - be[B - 1].x, ne.y - be[B - 1].y], xe[xe.length - 1].deltas.push(X);
                                break;
                            case "qct":
                                var J = be[B - 1].x + 2 / 3 * (ne.x1 - be[B - 1].x),
                                    ye = be[B - 1].y + 2 / 3 * (ne.y1 - be[B - 1].y),
                                    je = ne.x + 2 / 3 * (ne.x1 - ne.x),
                                    Qe = ne.y + 2 / 3 * (ne.y1 - ne.y),
                                    q = ne.x,
                                    ze = ne.y;
                                X = [J - be[B - 1].x, ye - be[B - 1].y, je - be[B - 1].x, Qe - be[B - 1].y, q - be[B - 1].x, ze - be[B - 1].y], xe[xe.length - 1].deltas.push(X);
                                break;
                            case "arc":
                                xe.push({
                                    deltas: [],
                                    abs: [],
                                    arc: !0
                                }), Array.isArray(xe[xe.length - 1].abs) && xe[xe.length - 1].abs.push(ne);
                        }
                    }
                    me = j ? null : O === "stroke" ? "stroke" : "fill";
                    for (var gt = !1, ft = 0; ft < xe.length; ft++)
                        if (xe[ft].arc)
                            for (var Re = xe[ft].abs, pt = 0; pt < Re.length; pt++) {
                                var ct = Re[pt];
                                ct.type === "arc" ? k.call(this, ct.x, ct.y, ct.radius, ct.startAngle, ct.endAngle, ct.counterclockwise, void 0, j, !gt) : W.call(this, ct.x, ct.y), gt = !0;
                            } else if (xe[ft].close === !0) this.pdf.internal.out("h"), gt = !1;
                            else if (xe[ft].begin !== !0) {
                        var xt = xe[ft].start.x,
                            yt = xe[ft].start.y;
                        I.call(this, xe[ft].deltas, xt, yt), gt = !0;
                    }
                    me && A.call(this, me), j && N.call(this);
                }
            },
            L = function(O) {
                var j = this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor,
                    X = j * (this.pdf.internal.getLineHeightFactor() - 1);
                switch (this.ctx.textBaseline) {
                    case "bottom":
                        return O - X;
                    case "top":
                        return O + j - X;
                    case "hanging":
                        return O + j - 2 * X;
                    case "middle":
                        return O + j / 2 - X;
                    default:
                        return O;
                }
            },
            P = function(O) {
                return O + this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor * (this.pdf.internal.getLineHeightFactor() - 1);
            };
        h.prototype.createLinearGradient = function() {
            var O = function() {};
            return O.colorStops = [], O.addColorStop = function(j, X) {
                this.colorStops.push([j, X]);
            }, O.getColor = function() {
                return this.colorStops.length === 0 ? "#000000" : this.colorStops[0][1];
            }, O.isCanvasGradient = !0, O;
        }, h.prototype.createPattern = function() {
            return this.createLinearGradient();
        }, h.prototype.createRadialGradient = function() {
            return this.createLinearGradient();
        };
        var k = function(O, j, X, me, xe, be, B, ne, Z) {
                for (var J = le.call(this, X, me, xe, be), ye = 0; ye < J.length; ye++) {
                    var je = J[ye];
                    ye === 0 && (Z ? C.call(this, je.x1 + O, je.y1 + j) : W.call(this, je.x1 + O, je.y1 + j)), U.call(this, O, j, je.x2, je.y2, je.x3, je.y3, je.x4, je.y4);
                }
                ne ? N.call(this) : A.call(this, B);
            },
            A = function(O) {
                switch (O) {
                    case "stroke":
                        this.pdf.internal.out("S");
                        break;
                    case "fill":
                        this.pdf.internal.out("f");
                }
            },
            N = function() {
                this.pdf.clip(), this.pdf.discardPath();
            },
            C = function(O, j) {
                this.pdf.internal.out(e(O) + " " + i(j) + " m");
            },
            F = function(O) {
                var j;
                switch (O.align) {
                    case "right":
                    case "end":
                        j = "right";
                        break;
                    case "center":
                        j = "center";
                        break;
                    default:
                        j = "left";
                }
                var X, me, xe, be = this.pdf.getTextDimensions(O.text),
                    B = L.call(this, O.y),
                    ne = P.call(this, B) - be.h,
                    Z = this.ctx.transform.applyToPoint(new o(O.x, B));
                if (this.autoPaging) {
                    var J = this.ctx.transform.decompose(),
                        ye = new l();
                    ye = (ye = (ye = ye.multiply(J.translate)).multiply(J.skew)).multiply(J.scale);
                    for (var je = this.ctx.transform.applyToRectangle(new s(O.x, B, be.w, be.h)), Qe = ye.applyToRectangle(new s(O.x, ne, be.w, be.h)), q = x.call(this, Qe), ze = [], gt = 0; gt < q.length; gt += 1) ze.indexOf(q[gt]) === -1 && ze.push(q[gt]);
                    w(ze);
                    for (var ft = ze[0], Re = ze[ze.length - 1], pt = ft; pt < Re + 1; pt++) {
                        this.pdf.setPage(pt);
                        var ct = pt === 1 ? this.posY + this.margin[0] : this.margin[0],
                            xt = this.pdf.internal.pageSize.height - this.posY - this.margin[0] - this.margin[2],
                            yt = this.pdf.internal.pageSize.height - this.margin[2],
                            Pe = yt - this.margin[0],
                            Je = this.pdf.internal.pageSize.width - this.margin[1],
                            er = Je - this.margin[3],
                            ur = pt === 1 ? 0 : xt + (pt - 2) * Pe;
                        if (this.ctx.clip_path.length !== 0) {
                            var Gt = this.path;
                            X = JSON.parse(JSON.stringify(this.ctx.clip_path)), this.path = b(X, this.posX + this.margin[3], -1 * ur + ct), E.call(this, "fill", !0), this.path = Gt;
                        }
                        var Ct = b([JSON.parse(JSON.stringify(Qe))], this.posX + this.margin[3], -ur + ct + this.ctx.prevPageLastElemOffset)[0];
                        O.scale >= .01 && (me = this.pdf.internal.getFontSize(), this.pdf.setFontSize(me * O.scale), xe = this.lineWidth, this.lineWidth = xe * O.scale);
                        var fr = this.autoPaging !== "text";
                        if (fr || Ct.y + Ct.h <= yt) {
                            if (fr || Ct.y >= ct && Ct.x <= Je) {
                                var kt = fr ? O.text : this.pdf.splitTextToSize(O.text, O.maxWidth || Je - Ct.x)[0],
                                    Zt = b([JSON.parse(JSON.stringify(je))], this.posX + this.margin[3], -ur + ct + this.ctx.prevPageLastElemOffset)[0],
                                    ir = fr && (pt > ft || pt < Re) && _.call(this);
                                ir && (this.pdf.saveGraphicsState(), this.pdf.rect(this.margin[3], this.margin[0], er, Pe, null).clip().discardPath()), this.pdf.text(kt, Zt.x, Zt.y, {
                                    angle: O.angle,
                                    align: j,
                                    renderingMode: O.renderingMode
                                }), ir && this.pdf.restoreGraphicsState();
                            }
                        } else Ct.y < yt && (this.ctx.prevPageLastElemOffset += yt - Ct.y);
                        O.scale >= .01 && (this.pdf.setFontSize(me), this.lineWidth = xe);
                    }
                } else O.scale >= .01 && (me = this.pdf.internal.getFontSize(), this.pdf.setFontSize(me * O.scale), xe = this.lineWidth, this.lineWidth = xe * O.scale), this.pdf.text(O.text, Z.x + this.posX, Z.y + this.posY, {
                    angle: O.angle,
                    align: j,
                    renderingMode: O.renderingMode,
                    maxWidth: O.maxWidth
                }), O.scale >= .01 && (this.pdf.setFontSize(me), this.lineWidth = xe);
            },
            W = function(O, j, X, me) {
                X = X || 0, me = me || 0, this.pdf.internal.out(e(O + X) + " " + i(j + me) + " l");
            },
            I = function(O, j, X) {
                return this.pdf.lines(O, j, X, null, null);
            },
            U = function(O, j, X, me, xe, be, B, ne) {
                this.pdf.internal.out([r(n(X + O)), r(a(me + j)), r(n(xe + O)), r(a(be + j)), r(n(B + O)), r(a(ne + j)), "c"].join(" "));
            },
            le = function(O, j, X, me) {
                for (var xe = 2 * Math.PI, be = Math.PI / 2; j > X;) j -= xe;
                var B = Math.abs(X - j);
                B < xe && me && (B = xe - B);
                for (var ne = [], Z = me ? -1 : 1, J = j; B > 1e-5;) {
                    var ye = J + Z * Math.min(B, be);
                    ne.push(H.call(this, O, J, ye)), B -= Math.abs(ye - J), J = ye;
                }
                return ne;
            },
            H = function(O, j, X) {
                var me = (X - j) / 2,
                    xe = O * Math.cos(me),
                    be = O * Math.sin(me),
                    B = xe,
                    ne = -be,
                    Z = B * B + ne * ne,
                    J = Z + B * xe + ne * be,
                    ye = 4 / 3 * (Math.sqrt(2 * Z * J) - J) / (B * be - ne * xe),
                    je = B - ye * ne,
                    Qe = ne + ye * B,
                    q = je,
                    ze = -Qe,
                    gt = me + j,
                    ft = Math.cos(gt),
                    Re = Math.sin(gt);
                return {
                    x1: O * Math.cos(j),
                    y1: O * Math.sin(j),
                    x2: je * ft - Qe * Re,
                    y2: je * Re + Qe * ft,
                    x3: q * ft - ze * Re,
                    y3: q * Re + ze * ft,
                    x4: O * Math.cos(X),
                    y4: O * Math.sin(X)
                };
            },
            pe = function(O) {
                return 180 * O / Math.PI;
            },
            _e = function(O, j, X, me, xe, be) {
                var B = O + .5 * (X - O),
                    ne = j + .5 * (me - j),
                    Z = xe + .5 * (X - xe),
                    J = be + .5 * (me - be),
                    ye = Math.min(O, xe, B, Z),
                    je = Math.max(O, xe, B, Z),
                    Qe = Math.min(j, be, ne, J),
                    q = Math.max(j, be, ne, J);
                return new s(ye, Qe, je - ye, q - Qe);
            },
            Fe = function(O, j, X, me, xe, be, B, ne) {
                var Z, J, ye, je, Qe, q, ze, gt, ft, Re, pt, ct, xt, yt, Pe = X - O,
                    Je = me - j,
                    er = xe - X,
                    ur = be - me,
                    Gt = B - xe,
                    Ct = ne - be;
                for (J = 0; J < 41; J++) ft = (ze = (ye = O + (Z = J / 40) * Pe) + Z * ((Qe = X + Z * er) - ye)) + Z * (Qe + Z * (xe + Z * Gt - Qe) - ze), Re = (gt = (je = j + Z * Je) + Z * ((q = me + Z * ur) - je)) + Z * (q + Z * (be + Z * Ct - q) - gt), J == 0 ? (pt = ft, ct = Re, xt = ft, yt = Re) : (pt = Math.min(pt, ft), ct = Math.min(ct, Re), xt = Math.max(xt, ft), yt = Math.max(yt, Re));
                return new s(Math.round(pt), Math.round(ct), Math.round(xt - pt), Math.round(yt - ct));
            },
            Te = function() {
                if (this.prevLineDash || this.ctx.lineDash.length || this.ctx.lineDashOffset) {
                    var O, j, X = (O = this.ctx.lineDash, j = this.ctx.lineDashOffset, JSON.stringify({
                        lineDash: O,
                        lineDashOffset: j
                    }));
                    this.prevLineDash !== X && (this.pdf.setLineDash(this.ctx.lineDash, this.ctx.lineDashOffset), this.prevLineDash = X);
                }
            };
    })(Bt.API),
    function(t) {
        var r = function(o) {
                var s, l, c, u, h, d, f, m, _, x;
                for (/[^\x00-\xFF]/.test(o), l = [], c = 0, u = (o += s = "\0\0\0\0".slice(o.length % 4 || 4)).length; u > c; c += 4)(h = (o.charCodeAt(c) << 24) + (o.charCodeAt(c + 1) << 16) + (o.charCodeAt(c + 2) << 8) + o.charCodeAt(c + 3)) !== 0 ? (d = (h = ((h = ((h = ((h = (h - (x = h % 85)) / 85) - (_ = h % 85)) / 85) - (m = h % 85)) / 85) - (f = h % 85)) / 85) % 85, l.push(d + 33, f + 33, m + 33, _ + 33, x + 33)) : l.push(122);
                return function(g, b) {
                    for (var w = b; w > 0; w--) g.pop();
                }(l, s.length), String.fromCharCode.apply(String, l) + "~>";
            },
            e = function(o) {
                var s, l, c, u, h, d = String,
                    f = "length",
                    m = 255,
                    _ = "charCodeAt",
                    x = "slice",
                    g = "replace";
                for (o[x](-2), o = o[x](0, -2)[g](/\s/g, "")[g]("z", "!!!!!"), c = [], u = 0, h = (o += s = "uuuuu" [x](o[f] % 5 || 5))[f]; h > u; u += 5) l = 52200625 * (o[_](u) - 33) + 614125 * (o[_](u + 1) - 33) + 7225 * (o[_](u + 2) - 33) + 85 * (o[_](u + 3) - 33) + (o[_](u + 4) - 33), c.push(m & l >> 24, m & l >> 16, m & l >> 8, m & l);
                return function(b, w) {
                    for (var T = w; T > 0; T--) b.pop();
                }(c, s[f]), d.fromCharCode.apply(d, c);
            },
            i = function(o) {
                return o.split("").map(function(s) {
                    return ("0" + s.charCodeAt().toString(16)).slice(-2);
                }).join("") + ">";
            },
            n = function(o) {
                var s = new RegExp(/^([0-9A-Fa-f]{2})+$/);
                if ((o = o.replace(/\s/g, "")).indexOf(">") !== -1 && (o = o.substr(0, o.indexOf(">"))), o.length % 2 && (o += "0"), s.test(o) === !1) return "";
                for (var l = "", c = 0; c < o.length; c += 2) l += String.fromCharCode("0x" + (o[c] + o[c + 1]));
                return l;
            },
            a = function(o) {
                for (var s = new Uint8Array(o.length), l = o.length; l--;) s[l] = o.charCodeAt(l);
                return (s = Vd(s)).reduce(function(c, u) {
                    return c + String.fromCharCode(u);
                }, "");
            };
        t.processDataByFilters = function(o, s) {
            var l = 0,
                c = o || "",
                u = [];
            for (typeof(s = s || []) == "string" && (s = [s]), l = 0; l < s.length; l += 1) switch (s[l]) {
                case "ASCII85Decode":
                case "/ASCII85Decode":
                    c = e(c), u.push("/ASCII85Encode");
                    break;
                case "ASCII85Encode":
                case "/ASCII85Encode":
                    c = r(c), u.push("/ASCII85Decode");
                    break;
                case "ASCIIHexDecode":
                case "/ASCIIHexDecode":
                    c = n(c), u.push("/ASCIIHexEncode");
                    break;
                case "ASCIIHexEncode":
                case "/ASCIIHexEncode":
                    c = i(c), u.push("/ASCIIHexDecode");
                    break;
                case "FlateEncode":
                case "/FlateEncode":
                    c = a(c), u.push("/FlateDecode");
                    break;
                default:
                    throw new Error('The filter: "' + s[l] + '" is not implemented');
            }
            return {
                data: c,
                reverseChain: u.reverse().join(" ")
            };
        };
    }(Bt.API),
    function(t) {
        t.loadFile = function(r, e, i) {
            return function(n, a, o) {
                a = a !== !1, o = typeof o == "function" ? o : function() {};
                var s = void 0;
                try {
                    s = function(l, c, u) {
                        var h = new XMLHttpRequest(),
                            d = 0,
                            f = function(m) {
                                var _ = m.length,
                                    x = [],
                                    g = String.fromCharCode;
                                for (d = 0; d < _; d += 1) x.push(g(255 & m.charCodeAt(d)));
                                return x.join("");
                            };
                        if (h.open("GET", l, !c), h.overrideMimeType("text/plain; charset=x-user-defined"), c === !1 && (h.onload = function() {
                                h.status === 200 ? u(f(this.responseText)) : u(void 0);
                            }), h.send(null), c && h.status === 200) return f(h.responseText);
                    }(n, a, o);
                } catch {}
                return s;
            }(r, e, i);
        }, t.loadImageFile = t.loadFile;
    }(Bt.API),
    function(t) {
        function r() {
            return (hr.html2canvas ? Promise.resolve(hr.html2canvas) : import ("./chunk-K3KMTFQE.js")).catch(function(s) {
                return Promise.reject(new Error("Could not load html2canvas: " + s));
            }).then(function(s) {
                return s.default ? s.default : s;
            });
        }

        function e() {
            return (hr.DOMPurify ? Promise.resolve(hr.DOMPurify) : import ("./chunk-4Z3TVKZQ.js")).catch(function(s) {
                return Promise.reject(new Error("Could not load dompurify: " + s));
            }).then(function(s) {
                return s.default ? s.default : s;
            });
        }
        var i = function(s) {
                var l = ni(s);
                return l === "undefined" ? "undefined" : l === "string" || s instanceof String ? "string" : l === "number" || s instanceof Number ? "number" : l === "function" || s instanceof Function ? "function" : s && s.constructor === Array ? "array" : s && s.nodeType === 1 ? "element" : l === "object" ? "object" : "unknown";
            },
            n = function(s, l) {
                var c = document.createElement(s);
                for (var u in l.className && (c.className = l.className), l.innerHTML && l.dompurify && (c.innerHTML = l.dompurify.sanitize(l.innerHTML)), l.style) c.style[u] = l.style[u];
                return c;
            },
            a = function s(l, c) {
                for (var u = l.nodeType === 3 ? document.createTextNode(l.nodeValue) : l.cloneNode(!1), h = l.firstChild; h; h = h.nextSibling) c !== !0 && h.nodeType === 1 && h.nodeName === "SCRIPT" || u.appendChild(s(h, c));
                return l.nodeType === 1 && (l.nodeName === "CANVAS" ? (u.width = l.width, u.height = l.height, u.getContext("2d").drawImage(l, 0, 0)) : l.nodeName !== "TEXTAREA" && l.nodeName !== "SELECT" || (u.value = l.value), u.addEventListener("load", function() {
                    u.scrollTop = l.scrollTop, u.scrollLeft = l.scrollLeft;
                }, !0)), u;
            },
            o = function s(l) {
                var c = Object.assign(s.convert(Promise.resolve()), JSON.parse(JSON.stringify(s.template))),
                    u = s.convert(Promise.resolve(), c);
                return (u = u.setProgress(1, s, 1, [s])).set(l);
            };
        (o.prototype = Object.create(Promise.prototype)).constructor = o, o.convert = function(s, l) {
            return s.__proto__ = l || o.prototype, s;
        }, o.template = {
            prop: {
                src: null,
                container: null,
                overlay: null,
                canvas: null,
                img: null,
                pdf: null,
                pageSize: null,
                callback: function() {}
            },
            progress: {
                val: 0,
                state: null,
                n: 0,
                stack: []
            },
            opt: {
                filename: "file.pdf",
                margin: [0, 0, 0, 0],
                enableLinks: !0,
                x: 0,
                y: 0,
                html2canvas: {},
                jsPDF: {},
                backgroundColor: "transparent"
            }
        }, o.prototype.from = function(s, l) {
            return this.then(function() {
                switch (l = l || function(c) {
                    switch (i(c)) {
                        case "string":
                            return "string";
                        case "element":
                            return c.nodeName.toLowerCase() === "canvas" ? "canvas" : "element";
                        default:
                            return "unknown";
                    }
                }(s), l) {
                    case "string":
                        return this.then(e).then(function(c) {
                            return this.set({
                                src: n("div", {
                                    innerHTML: s,
                                    dompurify: c
                                })
                            });
                        });
                    case "element":
                        return this.set({
                            src: s
                        });
                    case "canvas":
                        return this.set({
                            canvas: s
                        });
                    case "img":
                        return this.set({
                            img: s
                        });
                    default:
                        return this.error("Unknown source type.");
                }
            });
        }, o.prototype.to = function(s) {
            switch (s) {
                case "container":
                    return this.toContainer();
                case "canvas":
                    return this.toCanvas();
                case "img":
                    return this.toImg();
                case "pdf":
                    return this.toPdf();
                default:
                    return this.error("Invalid target.");
            }
        }, o.prototype.toContainer = function() {
            return this.thenList([function() {
                return this.prop.src || this.error("Cannot duplicate - no source HTML.");
            }, function() {
                return this.prop.pageSize || this.setPageSize();
            }]).then(function() {
                var s = {
                        position: "relative",
                        display: "inline-block",
                        width: (typeof this.opt.width != "number" || isNaN(this.opt.width) || typeof this.opt.windowWidth != "number" || isNaN(this.opt.windowWidth) ? Math.max(this.prop.src.clientWidth, this.prop.src.scrollWidth, this.prop.src.offsetWidth) : this.opt.windowWidth) + "px",
                        left: 0,
                        right: 0,
                        top: 0,
                        margin: "auto",
                        backgroundColor: this.opt.backgroundColor
                    },
                    l = a(this.prop.src, this.opt.html2canvas.javascriptEnabled);
                l.tagName === "BODY" && (s.height = Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight) + "px"), this.prop.overlay = n("div", {
                    className: "html2pdf__overlay",
                    style: {
                        position: "fixed",
                        overflow: "hidden",
                        zIndex: 1e3,
                        left: "-100000px",
                        right: 0,
                        bottom: 0,
                        top: 0
                    }
                }), this.prop.container = n("div", {
                    className: "html2pdf__container",
                    style: s
                }), this.prop.container.appendChild(l), this.prop.container.firstChild.appendChild(n("div", {
                    style: {
                        clear: "both",
                        border: "0 none transparent",
                        margin: 0,
                        padding: 0,
                        height: 0
                    }
                })), this.prop.container.style.float = "none", this.prop.overlay.appendChild(this.prop.container), document.body.appendChild(this.prop.overlay), this.prop.container.firstChild.style.position = "relative", this.prop.container.height = Math.max(this.prop.container.firstChild.clientHeight, this.prop.container.firstChild.scrollHeight, this.prop.container.firstChild.offsetHeight) + "px";
            });
        }, o.prototype.toCanvas = function() {
            var s = [function() {
                return document.body.contains(this.prop.container) || this.toContainer();
            }];
            return this.thenList(s).then(r).then(function(l) {
                var c = Object.assign({}, this.opt.html2canvas);
                return delete c.onrendered, l(this.prop.container, c);
            }).then(function(l) {
                (this.opt.html2canvas.onrendered || function() {})(l), this.prop.canvas = l, document.body.removeChild(this.prop.overlay);
            });
        }, o.prototype.toContext2d = function() {
            var s = [function() {
                return document.body.contains(this.prop.container) || this.toContainer();
            }];
            return this.thenList(s).then(r).then(function(l) {
                var c = this.opt.jsPDF,
                    u = this.opt.fontFaces,
                    h = typeof this.opt.width != "number" || isNaN(this.opt.width) || typeof this.opt.windowWidth != "number" || isNaN(this.opt.windowWidth) ? 1 : this.opt.width / this.opt.windowWidth,
                    d = Object.assign({
                        async: !0,
                        allowTaint: !0,
                        scale: h,
                        scrollX: this.opt.scrollX || 0,
                        scrollY: this.opt.scrollY || 0,
                        backgroundColor: "#ffffff",
                        imageTimeout: 15e3,
                        logging: !0,
                        proxy: null,
                        removeContainer: !0,
                        foreignObjectRendering: !1,
                        useCORS: !1
                    }, this.opt.html2canvas);
                if (delete d.onrendered, c.context2d.autoPaging = this.opt.autoPaging === void 0 || this.opt.autoPaging, c.context2d.posX = this.opt.x, c.context2d.posY = this.opt.y, c.context2d.margin = this.opt.margin, c.context2d.fontFaces = u, u)
                    for (var f = 0; f < u.length; ++f) {
                        var m = u[f],
                            _ = m.src.find(function(x) {
                                return x.format === "truetype";
                            });
                        _ && c.addFont(_.url, m.ref.name, m.ref.style);
                    }
                return d.windowHeight = d.windowHeight || 0, d.windowHeight = d.windowHeight == 0 ? Math.max(this.prop.container.clientHeight, this.prop.container.scrollHeight, this.prop.container.offsetHeight) : d.windowHeight, c.context2d.save(!0), l(this.prop.container, d);
            }).then(function(l) {
                this.opt.jsPDF.context2d.restore(!0), (this.opt.html2canvas.onrendered || function() {})(l), this.prop.canvas = l, document.body.removeChild(this.prop.overlay);
            });
        }, o.prototype.toImg = function() {
            return this.thenList([function() {
                return this.prop.canvas || this.toCanvas();
            }]).then(function() {
                var s = this.prop.canvas.toDataURL("image/" + this.opt.image.type, this.opt.image.quality);
                this.prop.img = document.createElement("img"), this.prop.img.src = s;
            });
        }, o.prototype.toPdf = function() {
            return this.thenList([function() {
                return this.toContext2d();
            }]).then(function() {
                this.prop.pdf = this.prop.pdf || this.opt.jsPDF;
            });
        }, o.prototype.output = function(s, l, c) {
            return (c = c || "pdf").toLowerCase() === "img" || c.toLowerCase() === "image" ? this.outputImg(s, l) : this.outputPdf(s, l);
        }, o.prototype.outputPdf = function(s, l) {
            return this.thenList([function() {
                return this.prop.pdf || this.toPdf();
            }]).then(function() {
                return this.prop.pdf.output(s, l);
            });
        }, o.prototype.outputImg = function(s) {
            return this.thenList([function() {
                return this.prop.img || this.toImg();
            }]).then(function() {
                switch (s) {
                    case void 0:
                    case "img":
                        return this.prop.img;
                    case "datauristring":
                    case "dataurlstring":
                        return this.prop.img.src;
                    case "datauri":
                    case "dataurl":
                        return document.location.href = this.prop.img.src;
                    default:
                        throw 'Image output type "' + s + '" is not supported.';
                }
            });
        }, o.prototype.save = function(s) {
            return this.thenList([function() {
                return this.prop.pdf || this.toPdf();
            }]).set(s ? {
                filename: s
            } : null).then(function() {
                this.prop.pdf.save(this.opt.filename);
            });
        }, o.prototype.doCallback = function() {
            return this.thenList([function() {
                return this.prop.pdf || this.toPdf();
            }]).then(function() {
                this.prop.callback(this.prop.pdf);
            });
        }, o.prototype.set = function(s) {
            if (i(s) !== "object") return this;
            var l = Object.keys(s || {}).map(function(c) {
                if (c in o.template.prop) return function() {
                    this.prop[c] = s[c];
                };
                switch (c) {
                    case "margin":
                        return this.setMargin.bind(this, s.margin);
                    case "jsPDF":
                        return function() {
                            return this.opt.jsPDF = s.jsPDF, this.setPageSize();
                        };
                    case "pageSize":
                        return this.setPageSize.bind(this, s.pageSize);
                    default:
                        return function() {
                            this.opt[c] = s[c];
                        };
                }
            }, this);
            return this.then(function() {
                return this.thenList(l);
            });
        }, o.prototype.get = function(s, l) {
            return this.then(function() {
                var c = s in o.template.prop ? this.prop[s] : this.opt[s];
                return l ? l(c) : c;
            });
        }, o.prototype.setMargin = function(s) {
            return this.then(function() {
                switch (i(s)) {
                    case "number":
                        s = [s, s, s, s];
                    case "array":
                        if (s.length === 2 && (s = [s[0], s[1], s[0], s[1]]), s.length === 4) break;
                    default:
                        return this.error("Invalid margin array.");
                }
                this.opt.margin = s;
            }).then(this.setPageSize);
        }, o.prototype.setPageSize = function(s) {
            function l(c, u) {
                return Math.floor(c * u / 72 * 96);
            }
            return this.then(function() {
                (s = s || Bt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner") || (s.inner = {
                    width: s.width - this.opt.margin[1] - this.opt.margin[3],
                    height: s.height - this.opt.margin[0] - this.opt.margin[2]
                }, s.inner.px = {
                    width: l(s.inner.width, s.k),
                    height: l(s.inner.height, s.k)
                }, s.inner.ratio = s.inner.height / s.inner.width), this.prop.pageSize = s;
            });
        }, o.prototype.setProgress = function(s, l, c, u) {
            return s != null && (this.progress.val = s), l != null && (this.progress.state = l), c != null && (this.progress.n = c), u != null && (this.progress.stack = u), this.progress.ratio = this.progress.val / this.progress.state, this;
        }, o.prototype.updateProgress = function(s, l, c, u) {
            return this.setProgress(s ? this.progress.val + s : null, l || null, c ? this.progress.n + c : null, u ? this.progress.stack.concat(u) : null);
        }, o.prototype.then = function(s, l) {
            var c = this;
            return this.thenCore(s, l, function(u, h) {
                return c.updateProgress(null, null, 1, [u]), Promise.prototype.then.call(this, function(d) {
                    return c.updateProgress(null, u), d;
                }).then(u, h).then(function(d) {
                    return c.updateProgress(1), d;
                });
            });
        }, o.prototype.thenCore = function(s, l, c) {
            c = c || Promise.prototype.then;
            var u = this;
            s && (s = s.bind(u)), l && (l = l.bind(u));
            var h = Promise.toString().indexOf("[native code]") !== -1 && Promise.name === "Promise" ? u : o.convert(Object.assign({}, u), Promise.prototype),
                d = c.call(h, s, l);
            return o.convert(d, u.__proto__);
        }, o.prototype.thenExternal = function(s, l) {
            return Promise.prototype.then.call(this, s, l);
        }, o.prototype.thenList = function(s) {
            var l = this;
            return s.forEach(function(c) {
                l = l.thenCore(c);
            }), l;
        }, o.prototype.catch = function(s) {
            s && (s = s.bind(this));
            var l = Promise.prototype.catch.call(this, s);
            return o.convert(l, this);
        }, o.prototype.catchExternal = function(s) {
            return Promise.prototype.catch.call(this, s);
        }, o.prototype.error = function(s) {
            return this.then(function() {
                throw new Error(s);
            });
        }, o.prototype.using = o.prototype.set, o.prototype.saveAs = o.prototype.save, o.prototype.export = o.prototype.output, o.prototype.run = o.prototype.then, Bt.getPageSize = function(s, l, c) {
            if (ni(s) === "object") {
                var u = s;
                s = u.orientation, l = u.unit || l, c = u.format || c;
            }
            l = l || "mm", c = c || "a4", s = ("" + (s || "P")).toLowerCase();
            var h, d = ("" + c).toLowerCase(),
                f = {
                    a0: [2383.94, 3370.39],
                    a1: [1683.78, 2383.94],
                    a2: [1190.55, 1683.78],
                    a3: [841.89, 1190.55],
                    a4: [595.28, 841.89],
                    a5: [419.53, 595.28],
                    a6: [297.64, 419.53],
                    a7: [209.76, 297.64],
                    a8: [147.4, 209.76],
                    a9: [104.88, 147.4],
                    a10: [73.7, 104.88],
                    b0: [2834.65, 4008.19],
                    b1: [2004.09, 2834.65],
                    b2: [1417.32, 2004.09],
                    b3: [1000.63, 1417.32],
                    b4: [708.66, 1000.63],
                    b5: [498.9, 708.66],
                    b6: [354.33, 498.9],
                    b7: [249.45, 354.33],
                    b8: [175.75, 249.45],
                    b9: [124.72, 175.75],
                    b10: [87.87, 124.72],
                    c0: [2599.37, 3676.54],
                    c1: [1836.85, 2599.37],
                    c2: [1298.27, 1836.85],
                    c3: [918.43, 1298.27],
                    c4: [649.13, 918.43],
                    c5: [459.21, 649.13],
                    c6: [323.15, 459.21],
                    c7: [229.61, 323.15],
                    c8: [161.57, 229.61],
                    c9: [113.39, 161.57],
                    c10: [79.37, 113.39],
                    dl: [311.81, 623.62],
                    letter: [612, 792],
                    "government-letter": [576, 756],
                    legal: [612, 1008],
                    "junior-legal": [576, 360],
                    ledger: [1224, 792],
                    tabloid: [792, 1224],
                    "credit-card": [153, 243]
                };
            switch (l) {
                case "pt":
                    h = 1;
                    break;
                case "mm":
                    h = 72 / 25.4;
                    break;
                case "cm":
                    h = 72 / 2.54;
                    break;
                case "in":
                    h = 72;
                    break;
                case "px":
                    h = .75;
                    break;
                case "pc":
                case "em":
                    h = 12;
                    break;
                case "ex":
                    h = 6;
                    break;
                default:
                    throw "Invalid unit: " + l;
            }
            var m, _ = 0,
                x = 0;
            if (f.hasOwnProperty(d)) _ = f[d][1] / h, x = f[d][0] / h;
            else try {
                _ = c[1], x = c[0];
            } catch {
                throw new Error("Invalid format: " + c);
            }
            if (s === "p" || s === "portrait") s = "p", x > _ && (m = x, x = _, _ = m);
            else {
                if (s !== "l" && s !== "landscape") throw "Invalid orientation: " + s;
                s = "l", _ > x && (m = x, x = _, _ = m);
            }
            return {
                width: x,
                height: _,
                unit: l,
                k: h,
                orientation: s
            };
        }, t.html = function(s, l) {
            (l = l || {}).callback = l.callback || function() {}, l.html2canvas = l.html2canvas || {}, l.html2canvas.canvas = l.html2canvas.canvas || this.canvas, l.jsPDF = l.jsPDF || this, l.fontFaces = l.fontFaces ? l.fontFaces.map(Ym) : null;
            var c = new o(l);
            return l.worker ? c : c.from(s).doCallback();
        };
    }(Bt.API), Bt.API.addJS = function(t) {
            return Dy = t, this.internal.events.subscribe("postPutResources", function() {
                ep = this.internal.newObject(), this.internal.out("<<"), this.internal.out("/Names [(EmbeddedJS) " + (ep + 1) + " 0 R]"), this.internal.out(">>"), this.internal.out("endobj"), Ty = this.internal.newObject(), this.internal.out("<<"), this.internal.out("/S /JavaScript"), this.internal.out("/JS (" + Dy + ")"), this.internal.out(">>"), this.internal.out("endobj");
            }), this.internal.events.subscribe("putCatalog", function() {
                ep !== void 0 && Ty !== void 0 && this.internal.out("/Names <</JavaScript " + ep + " 0 R>>");
            }), this;
        },
        function(t) {
            var r;
            t.events.push(["postPutResources", function() {
                var e = this,
                    i = /^(\d+) 0 obj$/;
                if (this.outline.root.children.length > 0)
                    for (var n = e.outline.render().split(/\r\n/), a = 0; a < n.length; a++) {
                        var o = n[a],
                            s = i.exec(o);
                        if (s != null) {
                            var l = s[1];
                            e.internal.newObjectDeferredBegin(l, !1);
                        }
                        e.internal.write(o);
                    }
                if (this.outline.createNamedDestinations) {
                    var c = this.internal.pages.length,
                        u = [];
                    for (a = 0; a < c; a++) {
                        var h = e.internal.newObject();
                        u.push(h);
                        var d = e.internal.getPageInfo(a + 1);
                        e.internal.write("<< /D[" + d.objId + " 0 R /XYZ null null null]>> endobj");
                    }
                    var f = e.internal.newObject();
                    for (e.internal.write("<< /Names [ "), a = 0; a < u.length; a++) e.internal.write("(page_" + (a + 1) + ")" + u[a] + " 0 R");
                    e.internal.write(" ] >>", "endobj"), r = e.internal.newObject(), e.internal.write("<< /Dests " + f + " 0 R"), e.internal.write(">>", "endobj");
                }
            }]), t.events.push(["putCatalog", function() {
                var e = this;
                e.outline.root.children.length > 0 && (e.internal.write("/Outlines", this.outline.makeRef(this.outline.root)), this.outline.createNamedDestinations && e.internal.write("/Names " + r + " 0 R"));
            }]), t.events.push(["initialized", function() {
                var e = this;
                e.outline = {
                    createNamedDestinations: !1,
                    root: {
                        children: []
                    }
                }, e.outline.add = function(i, n, a) {
                    var o = {
                        title: n,
                        options: a,
                        children: []
                    };
                    return i == null && (i = this.root), i.children.push(o), o;
                }, e.outline.render = function() {
                    return this.ctx = {}, this.ctx.val = "", this.ctx.pdf = e, this.genIds_r(this.root), this.renderRoot(this.root), this.renderItems(this.root), this.ctx.val;
                }, e.outline.genIds_r = function(i) {
                    i.id = e.internal.newObjectDeferred();
                    for (var n = 0; n < i.children.length; n++) this.genIds_r(i.children[n]);
                }, e.outline.renderRoot = function(i) {
                    this.objStart(i), this.line("/Type /Outlines"), i.children.length > 0 && (this.line("/First " + this.makeRef(i.children[0])), this.line("/Last " + this.makeRef(i.children[i.children.length - 1]))), this.line("/Count " + this.count_r({
                        count: 0
                    }, i)), this.objEnd();
                }, e.outline.renderItems = function(i) {
                    for (var n = this.ctx.pdf.internal.getVerticalCoordinateString, a = 0; a < i.children.length; a++) {
                        var o = i.children[a];
                        this.objStart(o), this.line("/Title " + this.makeString(o.title)), this.line("/Parent " + this.makeRef(i)), a > 0 && this.line("/Prev " + this.makeRef(i.children[a - 1])), a < i.children.length - 1 && this.line("/Next " + this.makeRef(i.children[a + 1])), o.children.length > 0 && (this.line("/First " + this.makeRef(o.children[0])), this.line("/Last " + this.makeRef(o.children[o.children.length - 1])));
                        var s = this.count = this.count_r({
                            count: 0
                        }, o);
                        if (s > 0 && this.line("/Count " + s), o.options && o.options.pageNumber) {
                            var l = e.internal.getPageInfo(o.options.pageNumber);
                            this.line("/Dest [" + l.objId + " 0 R /XYZ 0 " + n(0) + " 0]");
                        }
                        this.objEnd();
                    }
                    for (var c = 0; c < i.children.length; c++) this.renderItems(i.children[c]);
                }, e.outline.line = function(i) {
                    this.ctx.val += i + `\r
`;
                }, e.outline.makeRef = function(i) {
                    return i.id + " 0 R";
                }, e.outline.makeString = function(i) {
                    return "(" + e.internal.pdfEscape(i) + ")";
                }, e.outline.objStart = function(i) {
                    this.ctx.val += `\r
` + i.id + ` 0 obj\r
<<\r
`;
                }, e.outline.objEnd = function() {
                    this.ctx.val += `>> \r
endobj\r
`;
                }, e.outline.count_r = function(i, n) {
                    for (var a = 0; a < n.children.length; a++) i.count++, this.count_r(i, n.children[a]);
                    return i.count;
                };
            }]);
        }(Bt.API),
        function(t) {
            var r = [192, 193, 194, 195, 196, 197, 198, 199];
            t.processJPEG = function(e, i, n, a, o, s) {
                var l, c = this.decode.DCT_DECODE,
                    u = null;
                if (typeof e == "string" || this.__addimage__.isArrayBuffer(e) || this.__addimage__.isArrayBufferView(e)) {
                    switch (e = o || e, e = this.__addimage__.isArrayBuffer(e) ? new Uint8Array(e) : e, l = function(h) {
                        for (var d, f = 256 * h.charCodeAt(4) + h.charCodeAt(5), m = h.length, _ = {
                                width: 0,
                                height: 0,
                                numcomponents: 1
                            }, x = 4; x < m; x += 2) {
                            if (x += f, r.indexOf(h.charCodeAt(x + 1)) !== -1) {
                                d = 256 * h.charCodeAt(x + 5) + h.charCodeAt(x + 6), _ = {
                                    width: 256 * h.charCodeAt(x + 7) + h.charCodeAt(x + 8),
                                    height: d,
                                    numcomponents: h.charCodeAt(x + 9)
                                };
                                break;
                            }
                            f = 256 * h.charCodeAt(x + 2) + h.charCodeAt(x + 3);
                        }
                        return _;
                    }(e = this.__addimage__.isArrayBufferView(e) ? this.__addimage__.arrayBufferToBinaryString(e) : e), l.numcomponents) {
                        case 1:
                            s = this.color_spaces.DEVICE_GRAY;
                            break;
                        case 4:
                            s = this.color_spaces.DEVICE_CMYK;
                            break;
                        case 3:
                            s = this.color_spaces.DEVICE_RGB;
                    }
                    u = {
                        data: e,
                        width: l.width,
                        height: l.height,
                        colorSpace: s,
                        bitsPerComponent: 8,
                        filter: c,
                        index: i,
                        alias: n
                    };
                }
                return u;
            };
        }(Bt.API), Bt.API.processPNG = function(t, r, e, i) {
            if (this.__addimage__.isArrayBuffer(t) && (t = new Uint8Array(t)), this.__addimage__.isArrayBufferView(t)) {
                var n, a = py(t, {
                        checkCrc: !0
                    }),
                    o = a.width,
                    s = a.height,
                    l = a.channels,
                    c = a.palette,
                    u = a.depth;
                n = c && l === 1 ? function(k) {
                    for (var A = k.width, N = k.height, C = k.data, F = k.palette, W = k.depth, I = !1, U = [], le = [], H = void 0, pe = !1, _e = 0, Fe = 0; Fe < F.length; Fe++) {
                        var Te = Nm(F[Fe], 4),
                            O = Te[0],
                            j = Te[1],
                            X = Te[2],
                            me = Te[3];
                        U.push(O, j, X), me != null && (me === 0 ? (_e++, le.length < 1 && le.push(Fe)) : me < 255 && (pe = !0));
                    }
                    if (pe || _e > 1) {
                        I = !0, le = void 0;
                        var xe = A * N;
                        H = new Uint8Array(xe);
                        for (var be = new DataView(C.buffer), B = 0; B < xe; B++) {
                            var ne = Jm(be, B, W),
                                Z = Nm(F[ne], 4)[3];
                            H[B] = Z;
                        }
                    } else _e === 0 && (le = void 0);
                    return {
                        colorSpace: "Indexed",
                        colorsPerPixel: 1,
                        sMaskBitsPerComponent: I ? 8 : void 0,
                        colorBytes: C,
                        alphaBytes: H,
                        needSMask: I,
                        palette: U,
                        mask: le
                    };
                }(a) : l === 2 || l === 4 ? function(k) {
                    for (var A = k.data, N = k.width, C = k.height, F = k.channels, W = k.depth, I = F === 2 ? "DeviceGray" : "DeviceRGB", U = F - 1, le = N * C, H = U, pe = le * H, _e = 1 * le, Fe = Math.ceil(pe * W / 8), Te = Math.ceil(_e * W / 8), O = new Uint8Array(Fe), j = new Uint8Array(Te), X = new DataView(A.buffer), me = new DataView(O.buffer), xe = new DataView(j.buffer), be = !1, B = 0; B < le; B++) {
                        for (var ne = B * F, Z = 0; Z < H; Z++) Ry(me, Jm(X, ne + Z, W), B * H + Z, W);
                        var J = Jm(X, ne + H, W);
                        J < (1 << W) - 1 && (be = !0), Ry(xe, J, 1 * B, W);
                    }
                    return {
                        colorSpace: I,
                        colorsPerPixel: U,
                        sMaskBitsPerComponent: be ? W : void 0,
                        colorBytes: O,
                        alphaBytes: j,
                        needSMask: be
                    };
                }(a) : function(k) {
                    var A = k.data,
                        N = k.channels === 1 ? "DeviceGray" : "DeviceRGB";
                    return {
                        colorSpace: N,
                        colorsPerPixel: N === "DeviceGray" ? 1 : 3,
                        colorBytes: A instanceof Uint16Array ? function(C) {
                            for (var F = C.length, W = new Uint8Array(2 * F), I = new DataView(W.buffer, W.byteOffset, W.byteLength), U = 0; U < F; U++) I.setUint16(2 * U, C[U], !1);
                            return W;
                        }(A) : A,
                        needSMask: !1
                    };
                }(a);
                var h, d, f, m = n,
                    _ = m.colorSpace,
                    x = m.colorsPerPixel,
                    g = m.sMaskBitsPerComponent,
                    b = m.colorBytes,
                    w = m.alphaBytes,
                    T = m.needSMask,
                    E = m.palette,
                    L = m.mask,
                    P = null;
                return i !== Bt.API.image_compression.NONE && typeof Vd == "function" ? (P = function(k) {
                    var A;
                    switch (k) {
                        case Bt.API.image_compression.FAST:
                            A = 11;
                            break;
                        case Bt.API.image_compression.MEDIUM:
                            A = 13;
                            break;
                        case Bt.API.image_compression.SLOW:
                            A = 14;
                            break;
                        default:
                            A = 12;
                    }
                    return A;
                }(i), h = this.decode.FLATE_DECODE, d = "/Predictor ".concat(P, " /Colors ").concat(x, " /BitsPerComponent ").concat(u, " /Columns ").concat(o), t = Py(b, Math.ceil(o * x * u / 8), x, u, i), T && (f = Py(w, Math.ceil(o * g / 8), 1, g, i))) : (h = void 0, d = void 0, t = b, T && (f = w)), (this.__addimage__.isArrayBuffer(t) || this.__addimage__.isArrayBufferView(t)) && (t = this.__addimage__.arrayBufferToBinaryString(t)), (f && this.__addimage__.isArrayBuffer(f) || this.__addimage__.isArrayBufferView(f)) && (f = this.__addimage__.arrayBufferToBinaryString(f)), {
                    alias: e,
                    data: t,
                    index: r,
                    filter: h,
                    decodeParameters: d,
                    transparency: L,
                    palette: E,
                    sMask: f,
                    predictor: P,
                    width: o,
                    height: s,
                    bitsPerComponent: u,
                    sMaskBitsPerComponent: g,
                    colorSpace: _
                };
            }
        },
        function(t) {
            t.processGIF89A = function(r, e, i, n) {
                var a = new EA(r),
                    o = a.width,
                    s = a.height,
                    l = [];
                a.decodeAndBlitFrameRGBA(0, l);
                var c = {
                        data: l,
                        width: o,
                        height: s
                    },
                    u = new Qm(100).encode(c, 100);
                return t.processJPEG.call(this, u, e, i, n);
            }, t.processGIF87A = t.processGIF89A;
        }(Bt.API), Oo.prototype.parseHeader = function() {
            if (this.fileSize = this.datav.getUint32(this.pos, !0), this.pos += 4, this.reserved = this.datav.getUint32(this.pos, !0), this.pos += 4, this.offset = this.datav.getUint32(this.pos, !0), this.pos += 4, this.headerSize = this.datav.getUint32(this.pos, !0), this.pos += 4, this.width = this.datav.getUint32(this.pos, !0), this.pos += 4, this.height = this.datav.getInt32(this.pos, !0), this.pos += 4, this.planes = this.datav.getUint16(this.pos, !0), this.pos += 2, this.bitPP = this.datav.getUint16(this.pos, !0), this.pos += 2, this.compress = this.datav.getUint32(this.pos, !0), this.pos += 4, this.rawSize = this.datav.getUint32(this.pos, !0), this.pos += 4, this.hr = this.datav.getUint32(this.pos, !0), this.pos += 4, this.vr = this.datav.getUint32(this.pos, !0), this.pos += 4, this.colors = this.datav.getUint32(this.pos, !0), this.pos += 4, this.importantColors = this.datav.getUint32(this.pos, !0), this.pos += 4, this.bitPP === 16 && this.is_with_alpha && (this.bitPP = 15), this.bitPP < 15) {
                var t = this.colors === 0 ? 1 << this.bitPP : this.colors;
                this.palette = new Array(t);
                for (var r = 0; r < t; r++) {
                    var e = this.datav.getUint8(this.pos++, !0),
                        i = this.datav.getUint8(this.pos++, !0),
                        n = this.datav.getUint8(this.pos++, !0),
                        a = this.datav.getUint8(this.pos++, !0);
                    this.palette[r] = {
                        red: n,
                        green: i,
                        blue: e,
                        quad: a
                    };
                }
            }
            this.height < 0 && (this.height *= -1, this.bottom_up = !1);
        }, Oo.prototype.parseBGR = function() {
            this.pos = this.offset;
            try {
                var t = "bit" + this.bitPP,
                    r = this.width * this.height * 4;
                this.data = new Uint8Array(r), this[t]();
            } catch (e) {
                xi.log("bit decode error:" + e);
            }
        }, Oo.prototype.bit1 = function() {
            var t, r = Math.ceil(this.width / 8),
                e = r % 4;
            for (t = this.height - 1; t >= 0; t--) {
                for (var i = this.bottom_up ? t : this.height - 1 - t, n = 0; n < r; n++)
                    for (var a = this.datav.getUint8(this.pos++, !0), o = i * this.width * 4 + 8 * n * 4, s = 0; s < 8 && 8 * n + s < this.width; s++) {
                        var l = this.palette[a >> 7 - s & 1];
                        this.data[o + 4 * s] = l.blue, this.data[o + 4 * s + 1] = l.green, this.data[o + 4 * s + 2] = l.red, this.data[o + 4 * s + 3] = 255;
                    }
                e !== 0 && (this.pos += 4 - e);
            }
        }, Oo.prototype.bit4 = function() {
            for (var t = Math.ceil(this.width / 2), r = t % 4, e = this.height - 1; e >= 0; e--) {
                for (var i = this.bottom_up ? e : this.height - 1 - e, n = 0; n < t; n++) {
                    var a = this.datav.getUint8(this.pos++, !0),
                        o = i * this.width * 4 + 2 * n * 4,
                        s = a >> 4,
                        l = 15 & a,
                        c = this.palette[s];
                    if (this.data[o] = c.blue, this.data[o + 1] = c.green, this.data[o + 2] = c.red, this.data[o + 3] = 255, 2 * n + 1 >= this.width) break;
                    c = this.palette[l], this.data[o + 4] = c.blue, this.data[o + 4 + 1] = c.green, this.data[o + 4 + 2] = c.red, this.data[o + 4 + 3] = 255;
                }
                r !== 0 && (this.pos += 4 - r);
            }
        }, Oo.prototype.bit8 = function() {
            for (var t = this.width % 4, r = this.height - 1; r >= 0; r--) {
                for (var e = this.bottom_up ? r : this.height - 1 - r, i = 0; i < this.width; i++) {
                    var n = this.datav.getUint8(this.pos++, !0),
                        a = e * this.width * 4 + 4 * i;
                    if (n < this.palette.length) {
                        var o = this.palette[n];
                        this.data[a] = o.red, this.data[a + 1] = o.green, this.data[a + 2] = o.blue, this.data[a + 3] = 255;
                    } else this.data[a] = 255, this.data[a + 1] = 255, this.data[a + 2] = 255, this.data[a + 3] = 255;
                }
                t !== 0 && (this.pos += 4 - t);
            }
        }, Oo.prototype.bit15 = function() {
            for (var t = this.width % 3, r = parseInt("11111", 2), e = this.height - 1; e >= 0; e--) {
                for (var i = this.bottom_up ? e : this.height - 1 - e, n = 0; n < this.width; n++) {
                    var a = this.datav.getUint16(this.pos, !0);
                    this.pos += 2;
                    var o = (a & r) / r * 255 | 0,
                        s = (a >> 5 & r) / r * 255 | 0,
                        l = (a >> 10 & r) / r * 255 | 0,
                        c = a >> 15 ? 255 : 0,
                        u = i * this.width * 4 + 4 * n;
                    this.data[u] = l, this.data[u + 1] = s, this.data[u + 2] = o, this.data[u + 3] = c;
                }
                this.pos += t;
            }
        }, Oo.prototype.bit16 = function() {
            for (var t = this.width % 3, r = parseInt("11111", 2), e = parseInt("111111", 2), i = this.height - 1; i >= 0; i--) {
                for (var n = this.bottom_up ? i : this.height - 1 - i, a = 0; a < this.width; a++) {
                    var o = this.datav.getUint16(this.pos, !0);
                    this.pos += 2;
                    var s = (o & r) / r * 255 | 0,
                        l = (o >> 5 & e) / e * 255 | 0,
                        c = (o >> 11) / r * 255 | 0,
                        u = n * this.width * 4 + 4 * a;
                    this.data[u] = c, this.data[u + 1] = l, this.data[u + 2] = s, this.data[u + 3] = 255;
                }
                this.pos += t;
            }
        }, Oo.prototype.bit24 = function() {
            for (var t = this.height - 1; t >= 0; t--) {
                for (var r = this.bottom_up ? t : this.height - 1 - t, e = 0; e < this.width; e++) {
                    var i = this.datav.getUint8(this.pos++, !0),
                        n = this.datav.getUint8(this.pos++, !0),
                        a = this.datav.getUint8(this.pos++, !0),
                        o = r * this.width * 4 + 4 * e;
                    this.data[o] = a, this.data[o + 1] = n, this.data[o + 2] = i, this.data[o + 3] = 255;
                }
                this.pos += this.width % 4;
            }
        }, Oo.prototype.bit32 = function() {
            for (var t = this.height - 1; t >= 0; t--)
                for (var r = this.bottom_up ? t : this.height - 1 - t, e = 0; e < this.width; e++) {
                    var i = this.datav.getUint8(this.pos++, !0),
                        n = this.datav.getUint8(this.pos++, !0),
                        a = this.datav.getUint8(this.pos++, !0),
                        o = this.datav.getUint8(this.pos++, !0),
                        s = r * this.width * 4 + 4 * e;
                    this.data[s] = a, this.data[s + 1] = n, this.data[s + 2] = i, this.data[s + 3] = o;
                }
        }, Oo.prototype.getData = function() {
            return this.data;
        },
        function(t) {
            t.processBMP = function(r, e, i, n) {
                var a = new Oo(r, !1),
                    o = a.width,
                    s = a.height,
                    l = {
                        data: a.getData(),
                        width: o,
                        height: s
                    },
                    c = new Qm(100).encode(l, 100);
                return t.processJPEG.call(this, c, e, i, n);
            };
        }(Bt.API), By.prototype.getData = function() {
            return this.data;
        },
        function(t) {
            t.processWEBP = function(r, e, i, n) {
                var a = new By(r),
                    o = a.width,
                    s = a.height,
                    l = {
                        data: a.getData(),
                        width: o,
                        height: s
                    },
                    c = new Qm(100).encode(l, 100);
                return t.processJPEG.call(this, c, e, i, n);
            };
        }(Bt.API), Bt.API.processRGBA = function(t, r, e) {
            for (var i = t.data, n = i.length, a = new Uint8Array(n / 4 * 3), o = new Uint8Array(n / 4), s = 0, l = 0, c = 0; c < n; c += 4) {
                var u = i[c],
                    h = i[c + 1],
                    d = i[c + 2],
                    f = i[c + 3];
                a[s++] = u, a[s++] = h, a[s++] = d, o[l++] = f;
            }
            var m = this.__addimage__.arrayBufferToBinaryString(a);
            return {
                alpha: this.__addimage__.arrayBufferToBinaryString(o),
                data: m,
                index: r,
                alias: e,
                colorSpace: "DeviceRGB",
                bitsPerComponent: 8,
                width: t.width,
                height: t.height
            };
        }, Bt.API.setLanguage = function(t) {
            return this.internal.languageSettings === void 0 && (this.internal.languageSettings = {}, this.internal.languageSettings.isSubscribed = !1), {
                af: "Afrikaans",
                sq: "Albanian",
                ar: "Arabic (Standard)",
                "ar-DZ": "Arabic (Algeria)",
                "ar-BH": "Arabic (Bahrain)",
                "ar-EG": "Arabic (Egypt)",
                "ar-IQ": "Arabic (Iraq)",
                "ar-JO": "Arabic (Jordan)",
                "ar-KW": "Arabic (Kuwait)",
                "ar-LB": "Arabic (Lebanon)",
                "ar-LY": "Arabic (Libya)",
                "ar-MA": "Arabic (Morocco)",
                "ar-OM": "Arabic (Oman)",
                "ar-QA": "Arabic (Qatar)",
                "ar-SA": "Arabic (Saudi Arabia)",
                "ar-SY": "Arabic (Syria)",
                "ar-TN": "Arabic (Tunisia)",
                "ar-AE": "Arabic (U.A.E.)",
                "ar-YE": "Arabic (Yemen)",
                an: "Aragonese",
                hy: "Armenian",
                as: "Assamese",
                ast: "Asturian",
                az: "Azerbaijani",
                eu: "Basque",
                be: "Belarusian",
                bn: "Bengali",
                bs: "Bosnian",
                br: "Breton",
                bg: "Bulgarian",
                my: "Burmese",
                ca: "Catalan",
                ch: "Chamorro",
                ce: "Chechen",
                zh: "Chinese",
                "zh-HK": "Chinese (Hong Kong)",
                "zh-CN": "Chinese (PRC)",
                "zh-SG": "Chinese (Singapore)",
                "zh-TW": "Chinese (Taiwan)",
                cv: "Chuvash",
                co: "Corsican",
                cr: "Cree",
                hr: "Croatian",
                cs: "Czech",
                da: "Danish",
                nl: "Dutch (Standard)",
                "nl-BE": "Dutch (Belgian)",
                en: "English",
                "en-AU": "English (Australia)",
                "en-BZ": "English (Belize)",
                "en-CA": "English (Canada)",
                "en-IE": "English (Ireland)",
                "en-JM": "English (Jamaica)",
                "en-NZ": "English (New Zealand)",
                "en-PH": "English (Philippines)",
                "en-ZA": "English (South Africa)",
                "en-TT": "English (Trinidad & Tobago)",
                "en-GB": "English (United Kingdom)",
                "en-US": "English (United States)",
                "en-ZW": "English (Zimbabwe)",
                eo: "Esperanto",
                et: "Estonian",
                fo: "Faeroese",
                fj: "Fijian",
                fi: "Finnish",
                fr: "French (Standard)",
                "fr-BE": "French (Belgium)",
                "fr-CA": "French (Canada)",
                "fr-FR": "French (France)",
                "fr-LU": "French (Luxembourg)",
                "fr-MC": "French (Monaco)",
                "fr-CH": "French (Switzerland)",
                fy: "Frisian",
                fur: "Friulian",
                gd: "Gaelic (Scots)",
                "gd-IE": "Gaelic (Irish)",
                gl: "Galacian",
                ka: "Georgian",
                de: "German (Standard)",
                "de-AT": "German (Austria)",
                "de-DE": "German (Germany)",
                "de-LI": "German (Liechtenstein)",
                "de-LU": "German (Luxembourg)",
                "de-CH": "German (Switzerland)",
                el: "Greek",
                gu: "Gujurati",
                ht: "Haitian",
                he: "Hebrew",
                hi: "Hindi",
                hu: "Hungarian",
                is: "Icelandic",
                id: "Indonesian",
                iu: "Inuktitut",
                ga: "Irish",
                it: "Italian (Standard)",
                "it-CH": "Italian (Switzerland)",
                ja: "Japanese",
                kn: "Kannada",
                ks: "Kashmiri",
                kk: "Kazakh",
                km: "Khmer",
                ky: "Kirghiz",
                tlh: "Klingon",
                ko: "Korean",
                "ko-KP": "Korean (North Korea)",
                "ko-KR": "Korean (South Korea)",
                la: "Latin",
                lv: "Latvian",
                lt: "Lithuanian",
                lb: "Luxembourgish",
                mk: "North Macedonia",
                ms: "Malay",
                ml: "Malayalam",
                mt: "Maltese",
                mi: "Maori",
                mr: "Marathi",
                mo: "Moldavian",
                nv: "Navajo",
                ng: "Ndonga",
                ne: "Nepali",
                no: "Norwegian",
                nb: "Norwegian (Bokmal)",
                nn: "Norwegian (Nynorsk)",
                oc: "Occitan",
                or: "Oriya",
                om: "Oromo",
                fa: "Persian",
                "fa-IR": "Persian/Iran",
                pl: "Polish",
                pt: "Portuguese",
                "pt-BR": "Portuguese (Brazil)",
                pa: "Punjabi",
                "pa-IN": "Punjabi (India)",
                "pa-PK": "Punjabi (Pakistan)",
                qu: "Quechua",
                rm: "Rhaeto-Romanic",
                ro: "Romanian",
                "ro-MO": "Romanian (Moldavia)",
                ru: "Russian",
                "ru-MO": "Russian (Moldavia)",
                sz: "Sami (Lappish)",
                sg: "Sango",
                sa: "Sanskrit",
                sc: "Sardinian",
                sd: "Sindhi",
                si: "Singhalese",
                sr: "Serbian",
                sk: "Slovak",
                sl: "Slovenian",
                so: "Somani",
                sb: "Sorbian",
                es: "Spanish",
                "es-AR": "Spanish (Argentina)",
                "es-BO": "Spanish (Bolivia)",
                "es-CL": "Spanish (Chile)",
                "es-CO": "Spanish (Colombia)",
                "es-CR": "Spanish (Costa Rica)",
                "es-DO": "Spanish (Dominican Republic)",
                "es-EC": "Spanish (Ecuador)",
                "es-SV": "Spanish (El Salvador)",
                "es-GT": "Spanish (Guatemala)",
                "es-HN": "Spanish (Honduras)",
                "es-MX": "Spanish (Mexico)",
                "es-NI": "Spanish (Nicaragua)",
                "es-PA": "Spanish (Panama)",
                "es-PY": "Spanish (Paraguay)",
                "es-PE": "Spanish (Peru)",
                "es-PR": "Spanish (Puerto Rico)",
                "es-ES": "Spanish (Spain)",
                "es-UY": "Spanish (Uruguay)",
                "es-VE": "Spanish (Venezuela)",
                sx: "Sutu",
                sw: "Swahili",
                sv: "Swedish",
                "sv-FI": "Swedish (Finland)",
                "sv-SV": "Swedish (Sweden)",
                ta: "Tamil",
                tt: "Tatar",
                te: "Teluga",
                th: "Thai",
                tig: "Tigre",
                ts: "Tsonga",
                tn: "Tswana",
                tr: "Turkish",
                tk: "Turkmen",
                uk: "Ukrainian",
                hsb: "Upper Sorbian",
                ur: "Urdu",
                ve: "Venda",
                vi: "Vietnamese",
                vo: "Volapuk",
                wa: "Walloon",
                cy: "Welsh",
                xh: "Xhosa",
                ji: "Yiddish",
                zu: "Zulu"
            }[t] !== void 0 && (this.internal.languageSettings.languageCode = t, this.internal.languageSettings.isSubscribed === !1 && (this.internal.events.subscribe("putCatalog", function() {
                this.internal.write("/Lang (" + this.internal.languageSettings.languageCode + ")");
            }), this.internal.languageSettings.isSubscribed = !0)), this;
        }, C0 = Bt.API, tp = C0.getCharWidthsArray = function(t, r) {
            var e, i, n = (r = r || {}).font || this.internal.getFont(),
                a = r.fontSize || this.internal.getFontSize(),
                o = r.charSpace || this.internal.getCharSpace(),
                s = r.widths ? r.widths : n.metadata.Unicode.widths,
                l = s.fof ? s.fof : 1,
                c = r.kerning ? r.kerning : n.metadata.Unicode.kerning,
                u = c.fof ? c.fof : 1,
                h = r.doKerning !== !1,
                d = 0,
                f = t.length,
                m = 0,
                _ = s[0] || l,
                x = [];
            for (e = 0; e < f; e++) i = t.charCodeAt(e), typeof n.metadata.widthOfString == "function" ? x.push((n.metadata.widthOfGlyph(n.metadata.characterToGlyph(i)) + o * (1e3 / a) || 0) / 1e3) : (d = h && ni(c[i]) === "object" && !isNaN(parseInt(c[i][m], 10)) ? c[i][m] / u : 0, x.push((s[i] || _) / l + d)), m = i;
            return x;
        }, ky = C0.getStringUnitWidth = function(t, r) {
            var e = (r = r || {}).fontSize || this.internal.getFontSize(),
                i = r.font || this.internal.getFont(),
                n = r.charSpace || this.internal.getCharSpace();
            return C0.processArabic && (t = C0.processArabic(t)), typeof i.metadata.widthOfString == "function" ? i.metadata.widthOfString(t, e, n) / e : tp.apply(this, arguments).reduce(function(a, o) {
                return a + o;
            }, 0);
        }, Fy = function(t, r, e, i) {
            for (var n = [], a = 0, o = t.length, s = 0; a !== o && s + r[a] < e;) s += r[a], a++;
            n.push(t.slice(0, a));
            var l = a;
            for (s = 0; a !== o;) s + r[a] > i && (n.push(t.slice(l, a)), s = 0, l = a), s += r[a], a++;
            return l !== a && n.push(t.slice(l, a)), n;
        }, Ey = function(t, r, e) {
            e || (e = {});
            var i, n, a, o, s, l, c, u = [],
                h = [u],
                d = e.textIndent || 0,
                f = 0,
                m = 0,
                _ = t.split(" "),
                x = tp.apply(this, [" ", e])[0];
            if (l = e.lineIndent === -1 ? _[0].length + 2 : e.lineIndent || 0) {
                var g = Array(l).join(" "),
                    b = [];
                _.map(function(T) {
                    (T = T.split(/\s*\n/)).length > 1 ? b = b.concat(T.map(function(E, L) {
                        return (L && E.length ? `
` : "") + E;
                    })) : b.push(T[0]);
                }), _ = b, l = ky.apply(this, [g, e]);
            }
            for (a = 0, o = _.length; a < o; a++) {
                var w = 0;
                if (i = _[a], l && i[0] == `
` && (i = i.substr(1), w = 1), d + f + (m = (n = tp.apply(this, [i, e])).reduce(function(T, E) {
                        return T + E;
                    }, 0)) > r || w) {
                    if (m > r) {
                        for (s = Fy.apply(this, [i, n, r - (d + f), r]), u.push(s.shift()), u = [s.pop()]; s.length;) h.push([s.shift()]);
                        m = n.slice(i.length - (u[0] ? u[0].length : 0)).reduce(function(T, E) {
                            return T + E;
                        }, 0);
                    } else u = [i];
                    h.push(u), d = m + l, f = x;
                } else u.push(i), d += f + m, f = x;
            }
            return c = l ? function(T, E) {
                return (E ? g : "") + T.join(" ");
            } : function(T) {
                return T.join(" ");
            }, h.map(c);
        }, C0.splitTextToSize = function(t, r, e) {
            var i, n = (e = e || {}).fontSize || this.internal.getFontSize(),
                a = function(u) {
                    if (u.widths && u.kerning) return {
                        widths: u.widths,
                        kerning: u.kerning
                    };
                    var h = this.internal.getFont(u.fontName, u.fontStyle),
                        d = "Unicode";
                    return h.metadata[d] ? {
                        widths: h.metadata[d].widths || {
                            0: 1
                        },
                        kerning: h.metadata[d].kerning || {}
                    } : {
                        font: h.metadata,
                        fontSize: this.internal.getFontSize(),
                        charSpace: this.internal.getCharSpace()
                    };
                }.call(this, e);
            i = Array.isArray(t) ? t : String(t).split(/\r?\n/);
            var o = 1 * this.internal.scaleFactor * r / n;
            a.textIndent = e.textIndent ? 1 * e.textIndent * this.internal.scaleFactor / n : 0, a.lineIndent = e.lineIndent;
            var s, l, c = [];
            for (s = 0, l = i.length; s < l; s++) c = c.concat(Ey.apply(this, [i[s], o, a]));
            return c;
        },
        function(t) {
            t.__fontmetrics__ = t.__fontmetrics__ || {};
            for (var r = "0123456789abcdef", e = "klmnopqrstuvwxyz", i = {}, n = {}, a = 0; a < 16; a++) i[e[a]] = r[a], n[r[a]] = e[a];
            var o = function(d) {
                    return "0x" + parseInt(d, 10).toString(16);
                },
                s = t.__fontmetrics__.compress = function(d) {
                    var f, m, _, x, g = ["{"];
                    for (var b in d) {
                        if (f = d[b], isNaN(parseInt(b, 10)) ? m = "'" + b + "'" : (b = parseInt(b, 10), m = (m = o(b).slice(2)).slice(0, -1) + n[m.slice(-1)]), typeof f == "number") f < 0 ? (_ = o(f).slice(3), x = "-") : (_ = o(f).slice(2), x = ""), _ = x + _.slice(0, -1) + n[_.slice(-1)];
                        else {
                            if (ni(f) !== "object") throw new Error("Don't know what to do with value type " + ni(f) + ".");
                            _ = s(f);
                        }
                        g.push(m + _);
                    }
                    return g.push("}"), g.join("");
                },
                l = t.__fontmetrics__.uncompress = function(d) {
                    if (typeof d != "string") throw new Error("Invalid argument passed to uncompress.");
                    for (var f, m, _, x, g = {}, b = 1, w = g, T = [], E = "", L = "", P = d.length - 1, k = 1; k < P; k += 1)(x = d[k]) == "'" ? f ? (_ = f.join(""), f = void 0) : f = [] : f ? f.push(x) : x == "{" ? (T.push([w, _]), w = {}, _ = void 0) : x == "}" ? ((m = T.pop())[0][m[1]] = w, _ = void 0, w = m[0]) : x == "-" ? b = -1 : _ === void 0 ? i.hasOwnProperty(x) ? (E += i[x], _ = parseInt(E, 16) * b, b = 1, E = "") : E += x : i.hasOwnProperty(x) ? (L += i[x], w[_] = parseInt(L, 16) * b, b = 1, _ = void 0, L = "") : L += x;
                    return g;
                },
                c = {
                    codePages: ["WinAnsiEncoding"],
                    WinAnsiEncoding: l("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")
                },
                u = {
                    Unicode: {
                        Courier: c,
                        "Courier-Bold": c,
                        "Courier-BoldOblique": c,
                        "Courier-Oblique": c,
                        Helvetica: c,
                        "Helvetica-Bold": c,
                        "Helvetica-BoldOblique": c,
                        "Helvetica-Oblique": c,
                        "Times-Roman": c,
                        "Times-Bold": c,
                        "Times-BoldItalic": c,
                        "Times-Italic": c
                    }
                },
                h = {
                    Unicode: {
                        "Courier-Oblique": l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),
                        "Times-BoldItalic": l("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),
                        "Helvetica-Bold": l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),
                        Courier: l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),
                        "Courier-BoldOblique": l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),
                        "Times-Bold": l("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),
                        Symbol: l("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),
                        Helvetica: l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),
                        "Helvetica-BoldOblique": l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),
                        ZapfDingbats: l("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),
                        "Courier-Bold": l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),
                        "Times-Italic": l("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),
                        "Times-Roman": l("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),
                        "Helvetica-Oblique": l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")
                    }
                };
            t.events.push(["addFont", function(d) {
                var f = d.font,
                    m = h.Unicode[f.postScriptName];
                m && (f.metadata.Unicode = {}, f.metadata.Unicode.widths = m.widths, f.metadata.Unicode.kerning = m.kerning);
                var _ = u.Unicode[f.postScriptName];
                _ && (f.metadata.Unicode.encoding = _, f.encoding = _.codePages[0]);
            }]);
        }(Bt.API),
        function(t) {
            var r = function(e) {
                for (var i = e.length, n = new Uint8Array(i), a = 0; a < i; a++) n[a] = e.charCodeAt(a);
                return n;
            };
            t.API.events.push(["addFont", function(e) {
                var i = void 0,
                    n = e.font,
                    a = e.instance;
                if (!n.isStandardFont) {
                    if (a === void 0) throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('" + n.postScriptName + "').");
                    if (typeof(i = a.existsFileInVFS(n.postScriptName) === !1 ? a.loadFile(n.postScriptName) : a.getFileFromVFS(n.postScriptName)) != "string") throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('" + n.postScriptName + "').");
                    (function(o, s) {
                        s = /^\x00\x01\x00\x00/.test(s) ? r(s) : r(rp(s)), o.metadata = t.API.TTFFont.open(s), o.metadata.Unicode = o.metadata.Unicode || {
                            encoding: {},
                            kerning: {},
                            widths: []
                        }, o.metadata.glyIdsUsed = [0];
                    })(n, i);
                }
            }]);
        }(Bt), Bt.API.addSvgAsImage = function(t, r, e, i, n, a, o, s) {
            if (isNaN(r) || isNaN(e)) throw xi.error("jsPDF.addSvgAsImage: Invalid coordinates", arguments), new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");
            if (isNaN(i) || isNaN(n)) throw xi.error("jsPDF.addSvgAsImage: Invalid measurements", arguments), new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");
            var l = document.createElement("canvas");
            l.width = i, l.height = n;
            var c = l.getContext("2d");
            c.fillStyle = "#fff", c.fillRect(0, 0, l.width, l.height);
            var u = {
                    ignoreMouse: !0,
                    ignoreAnimation: !0,
                    ignoreDimensions: !0
                },
                h = this;
            return (hr.canvg ? Promise.resolve(hr.canvg) : import ("./chunk-EIYUC4QR.js")).catch(function(d) {
                return Promise.reject(new Error("Could not load canvg: " + d));
            }).then(function(d) {
                return d.default ? d.default : d;
            }).then(function(d) {
                return d.fromString(c, t, u);
            }, function() {
                return Promise.reject(new Error("Could not load canvg."));
            }).then(function(d) {
                return d.render(u);
            }).then(function() {
                h.addImage(l.toDataURL("image/jpeg", 1), r, e, i, n, o, s);
            });
        }, Bt.API.putTotalPages = function(t) {
            var r, e = 0;
            parseInt(this.internal.getFont().id.substr(1), 10) < 15 ? (r = new RegExp(t, "g"), e = this.internal.getNumberOfPages()) : (r = new RegExp(this.pdfEscape16(t, this.internal.getFont()), "g"), e = this.pdfEscape16(this.internal.getNumberOfPages() + "", this.internal.getFont()));
            for (var i = 1; i <= this.internal.getNumberOfPages(); i++)
                for (var n = 0; n < this.internal.pages[i].length; n++) this.internal.pages[i][n] = this.internal.pages[i][n].replace(r, e);
            return this;
        }, Bt.API.viewerPreferences = function(t, r) {
            var e;
            t = t || {}, r = r || !1;
            var i, n, a, o = {
                    HideToolbar: {
                        defaultValue: !1,
                        value: !1,
                        type: "boolean",
                        explicitSet: !1,
                        valueSet: [!0, !1],
                        pdfVersion: 1.3
                    },
                    HideMenubar: {
                        defaultValue: !1,
                        value: !1,
                        type: "boolean",
                        explicitSet: !1,
                        valueSet: [!0, !1],
                        pdfVersion: 1.3
                    },
                    HideWindowUI: {
                        defaultValue: !1,
                        value: !1,
                        type: "boolean",
                        explicitSet: !1,
                        valueSet: [!0, !1],
                        pdfVersion: 1.3
                    },
                    FitWindow: {
                        defaultValue: !1,
                        value: !1,
                        type: "boolean",
                        explicitSet: !1,
                        valueSet: [!0, !1],
                        pdfVersion: 1.3
                    },
                    CenterWindow: {
                        defaultValue: !1,
                        value: !1,
                        type: "boolean",
                        explicitSet: !1,
                        valueSet: [!0, !1],
                        pdfVersion: 1.3
                    },
                    DisplayDocTitle: {
                        defaultValue: !1,
                        value: !1,
                        type: "boolean",
                        explicitSet: !1,
                        valueSet: [!0, !1],
                        pdfVersion: 1.4
                    },
                    NonFullScreenPageMode: {
                        defaultValue: "UseNone",
                        value: "UseNone",
                        type: "name",
                        explicitSet: !1,
                        valueSet: ["UseNone", "UseOutlines", "UseThumbs", "UseOC"],
                        pdfVersion: 1.3
                    },
                    Direction: {
                        defaultValue: "L2R",
                        value: "L2R",
                        type: "name",
                        explicitSet: !1,
                        valueSet: ["L2R", "R2L"],
                        pdfVersion: 1.3
                    },
                    ViewArea: {
                        defaultValue: "CropBox",
                        value: "CropBox",
                        type: "name",
                        explicitSet: !1,
                        valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"],
                        pdfVersion: 1.4
                    },
                    ViewClip: {
                        defaultValue: "CropBox",
                        value: "CropBox",
                        type: "name",
                        explicitSet: !1,
                        valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"],
                        pdfVersion: 1.4
                    },
                    PrintArea: {
                        defaultValue: "CropBox",
                        value: "CropBox",
                        type: "name",
                        explicitSet: !1,
                        valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"],
                        pdfVersion: 1.4
                    },
                    PrintClip: {
                        defaultValue: "CropBox",
                        value: "CropBox",
                        type: "name",
                        explicitSet: !1,
                        valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"],
                        pdfVersion: 1.4
                    },
                    PrintScaling: {
                        defaultValue: "AppDefault",
                        value: "AppDefault",
                        type: "name",
                        explicitSet: !1,
                        valueSet: ["AppDefault", "None"],
                        pdfVersion: 1.6
                    },
                    Duplex: {
                        defaultValue: "",
                        value: "none",
                        type: "name",
                        explicitSet: !1,
                        valueSet: ["Simplex", "DuplexFlipShortEdge", "DuplexFlipLongEdge", "none"],
                        pdfVersion: 1.7
                    },
                    PickTrayByPDFSize: {
                        defaultValue: !1,
                        value: !1,
                        type: "boolean",
                        explicitSet: !1,
                        valueSet: [!0, !1],
                        pdfVersion: 1.7
                    },
                    PrintPageRange: {
                        defaultValue: "",
                        value: "",
                        type: "array",
                        explicitSet: !1,
                        valueSet: null,
                        pdfVersion: 1.7
                    },
                    NumCopies: {
                        defaultValue: 1,
                        value: 1,
                        type: "integer",
                        explicitSet: !1,
                        valueSet: null,
                        pdfVersion: 1.7
                    }
                },
                s = Object.keys(o),
                l = [],
                c = 0,
                u = 0,
                h = 0;

            function d(m, _) {
                var x, g = !1;
                for (x = 0; x < m.length; x += 1) m[x] === _ && (g = !0);
                return g;
            }
            if (this.internal.viewerpreferences === void 0 && (this.internal.viewerpreferences = {}, this.internal.viewerpreferences.configuration = JSON.parse(JSON.stringify(o)), this.internal.viewerpreferences.isSubscribed = !1), e = this.internal.viewerpreferences.configuration, t === "reset" || r === !0) {
                var f = s.length;
                for (h = 0; h < f; h += 1) e[s[h]].value = e[s[h]].defaultValue, e[s[h]].explicitSet = !1;
            }
            if (ni(t) === "object") {
                for (n in t)
                    if (a = t[n], d(s, n) && a !== void 0) {
                        if (e[n].type === "boolean" && typeof a == "boolean") e[n].value = a;
                        else if (e[n].type === "name" && d(e[n].valueSet, a)) e[n].value = a;
                        else if (e[n].type === "integer" && Number.isInteger(a)) e[n].value = a;
                        else if (e[n].type === "array") {
                            for (c = 0; c < a.length; c += 1)
                                if (i = !0, a[c].length === 1 && typeof a[c][0] == "number") l.push(String(a[c] - 1));
                                else if (a[c].length > 1) {
                                for (u = 0; u < a[c].length; u += 1) typeof a[c][u] != "number" && (i = !1);
                                i === !0 && l.push([a[c][0] - 1, a[c][1] - 1].join(" "));
                            }
                            e[n].value = "[" + l.join(" ") + "]";
                        } else e[n].value = e[n].defaultValue;
                        e[n].explicitSet = !0;
                    }
            }
            return this.internal.viewerpreferences.isSubscribed === !1 && (this.internal.events.subscribe("putCatalog", function() {
                var m, _ = [];
                for (m in e) e[m].explicitSet === !0 && (e[m].type === "name" ? _.push("/" + m + " /" + e[m].value) : _.push("/" + m + " " + e[m].value));
                _.length !== 0 && this.internal.write(`/ViewerPreferences
<<
` + _.join(`
`) + `
>>`);
            }), this.internal.viewerpreferences.isSubscribed = !0), this.internal.viewerpreferences.configuration = e, this;
        },
        function(t) {
            var r = function() {
                    var i = '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="' + this.internal.__metadata__.namespaceuri + '"><jspdf:metadata>',
                        n = unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),
                        a = unescape(encodeURIComponent(i)),
                        o = unescape(encodeURIComponent(this.internal.__metadata__.metadata)),
                        s = unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),
                        l = unescape(encodeURIComponent("</x:xmpmeta>")),
                        c = a.length + o.length + s.length + n.length + l.length;
                    this.internal.__metadata__.metadata_object_number = this.internal.newObject(), this.internal.write("<< /Type /Metadata /Subtype /XML /Length " + c + " >>"), this.internal.write("stream"), this.internal.write(n + a + o + s + l), this.internal.write("endstream"), this.internal.write("endobj");
                },
                e = function() {
                    this.internal.__metadata__.metadata_object_number && this.internal.write("/Metadata " + this.internal.__metadata__.metadata_object_number + " 0 R");
                };
            t.addMetadata = function(i, n) {
                return this.internal.__metadata__ === void 0 && (this.internal.__metadata__ = {
                    metadata: i,
                    namespaceuri: n || "http://jspdf.default.namespaceuri/"
                }, this.internal.events.subscribe("putCatalog", e), this.internal.events.subscribe("postPutResources", r)), this;
            };
        }(Bt.API),
        function(t) {
            var r = t.API,
                e = r.pdfEscape16 = function(a, o) {
                    for (var s, l = o.metadata.Unicode.widths, c = ["", "0", "00", "000", "0000"], u = [""], h = 0, d = a.length; h < d; ++h) {
                        if (s = o.metadata.characterToGlyph(a.charCodeAt(h)), o.metadata.glyIdsUsed.push(s), o.metadata.toUnicode[s] = a.charCodeAt(h), l.indexOf(s) == -1 && (l.push(s), l.push([parseInt(o.metadata.widthOfGlyph(s), 10)])), s == "0") return u.join("");
                        s = s.toString(16), u.push(c[4 - s.length], s);
                    }
                    return u.join("");
                },
                i = function(a) {
                    var o, s, l, c, u, h, d;
                    for (u = `/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo <<
  /Registry (Adobe)
  /Ordering (UCS)
  /Supplement 0
>> def
/CMapName /Adobe-Identity-UCS def
/CMapType 2 def
1 begincodespacerange
<0000><ffff>
endcodespacerange`, l = [], h = 0, d = (s = Object.keys(a).sort(function(f, m) {
                            return f - m;
                        })).length; h < d; h++) o = s[h], l.length >= 100 && (u += `
` + l.length + ` beginbfchar
` + l.join(`
`) + `
endbfchar`, l = []), a[o] !== void 0 && a[o] !== null && typeof a[o].toString == "function" && (c = ("0000" + a[o].toString(16)).slice(-4), o = ("0000" + (+o).toString(16)).slice(-4), l.push("<" + o + "><" + c + ">"));
                    return l.length && (u += `
` + l.length + ` beginbfchar
` + l.join(`
`) + `
endbfchar
`), u + `endcmap
CMapName currentdict /CMap defineresource pop
end
end`;
                };
            r.events.push(["putFont", function(a) {
                (function(o) {
                    var s = o.font,
                        l = o.out,
                        c = o.newObject,
                        u = o.putStream;
                    if (s.metadata instanceof t.API.TTFFont && s.encoding === "Identity-H") {
                        for (var h = s.metadata.Unicode.widths, d = s.metadata.subset.encode(s.metadata.glyIdsUsed, 1), f = "", m = 0; m < d.length; m++) f += String.fromCharCode(d[m]);
                        var _ = c();
                        u({
                            data: f,
                            addLength1: !0,
                            objectId: _
                        }), l("endobj");
                        var x = c();
                        u({
                            data: i(s.metadata.toUnicode),
                            addLength1: !0,
                            objectId: x
                        }), l("endobj");
                        var g = c();
                        l("<<"), l("/Type /FontDescriptor"), l("/FontName /" + T0(s.fontName)), l("/FontFile2 " + _ + " 0 R"), l("/FontBBox " + t.API.PDFObject.convert(s.metadata.bbox)), l("/Flags " + s.metadata.flags), l("/StemV " + s.metadata.stemV), l("/ItalicAngle " + s.metadata.italicAngle), l("/Ascent " + s.metadata.ascender), l("/Descent " + s.metadata.decender), l("/CapHeight " + s.metadata.capHeight), l(">>"), l("endobj");
                        var b = c();
                        l("<<"), l("/Type /Font"), l("/BaseFont /" + T0(s.fontName)), l("/FontDescriptor " + g + " 0 R"), l("/W " + t.API.PDFObject.convert(h)), l("/CIDToGIDMap /Identity"), l("/DW 1000"), l("/Subtype /CIDFontType2"), l("/CIDSystemInfo"), l("<<"), l("/Supplement 0"), l("/Registry (Adobe)"), l("/Ordering (" + s.encoding + ")"), l(">>"), l(">>"), l("endobj"), s.objectNumber = c(), l("<<"), l("/Type /Font"), l("/Subtype /Type0"), l("/ToUnicode " + x + " 0 R"), l("/BaseFont /" + T0(s.fontName)), l("/Encoding /" + s.encoding), l("/DescendantFonts [" + b + " 0 R]"), l(">>"), l("endobj"), s.isAlreadyPutted = !0;
                    }
                })(a);
            }]), r.events.push(["putFont", function(a) {
                (function(o) {
                    var s = o.font,
                        l = o.out,
                        c = o.newObject,
                        u = o.putStream;
                    if (s.metadata instanceof t.API.TTFFont && s.encoding === "WinAnsiEncoding") {
                        for (var h = s.metadata.rawData, d = "", f = 0; f < h.length; f++) d += String.fromCharCode(h[f]);
                        var m = c();
                        u({
                            data: d,
                            addLength1: !0,
                            objectId: m
                        }), l("endobj");
                        var _ = c();
                        u({
                            data: i(s.metadata.toUnicode),
                            addLength1: !0,
                            objectId: _
                        }), l("endobj");
                        var x = c();
                        l("<<"), l("/Descent " + s.metadata.decender), l("/CapHeight " + s.metadata.capHeight), l("/StemV " + s.metadata.stemV), l("/Type /FontDescriptor"), l("/FontFile2 " + m + " 0 R"), l("/Flags 96"), l("/FontBBox " + t.API.PDFObject.convert(s.metadata.bbox)), l("/FontName /" + T0(s.fontName)), l("/ItalicAngle " + s.metadata.italicAngle), l("/Ascent " + s.metadata.ascender), l(">>"), l("endobj"), s.objectNumber = c();
                        for (var g = 0; g < s.metadata.hmtx.widths.length; g++) s.metadata.hmtx.widths[g] = parseInt(s.metadata.hmtx.widths[g] * (1e3 / s.metadata.head.unitsPerEm));
                        l("<</Subtype/TrueType/Type/Font/ToUnicode " + _ + " 0 R/BaseFont/" + T0(s.fontName) + "/FontDescriptor " + x + " 0 R/Encoding/" + s.encoding + " /FirstChar 29 /LastChar 255 /Widths " + t.API.PDFObject.convert(s.metadata.hmtx.widths) + ">>"), l("endobj"), s.isAlreadyPutted = !0;
                    }
                })(a);
            }]);
            var n = function(a) {
                var o, s = a.text || "",
                    l = a.x,
                    c = a.y,
                    u = a.options || {},
                    h = a.mutex || {},
                    d = h.pdfEscape,
                    f = h.activeFontKey,
                    m = h.fonts,
                    _ = f,
                    x = "",
                    g = 0,
                    b = "",
                    w = m[_].encoding;
                if (m[_].encoding !== "Identity-H") return {
                    text: s,
                    x: l,
                    y: c,
                    options: u,
                    mutex: h
                };
                for (b = s, _ = f, Array.isArray(s) && (b = s[0]), g = 0; g < b.length; g += 1) m[_].metadata.hasOwnProperty("cmap") && (o = m[_].metadata.cmap.unicode.codeMap[b[g].charCodeAt(0)]), o || b[g].charCodeAt(0) < 256 && m[_].metadata.hasOwnProperty("Unicode") ? x += b[g] : x += "";
                var T = "";
                return parseInt(_.slice(1)) < 14 || w === "WinAnsiEncoding" ? T = d(x, _).split("").map(function(E) {
                    return E.charCodeAt(0).toString(16);
                }).join("") : w === "Identity-H" && (T = e(x, m[_])), h.isHex = !0, {
                    text: T,
                    x: l,
                    y: c,
                    options: u,
                    mutex: h
                };
            };
            r.events.push(["postProcessText", function(a) {
                var o = a.text || "",
                    s = [],
                    l = {
                        text: o,
                        x: a.x,
                        y: a.y,
                        options: a.options,
                        mutex: a.mutex
                    };
                if (Array.isArray(o)) {
                    var c = 0;
                    for (c = 0; c < o.length; c += 1) Array.isArray(o[c]) && o[c].length === 3 ? s.push([n(Object.assign({}, l, {
                        text: o[c][0]
                    })).text, o[c][1], o[c][2]]) : s.push(n(Object.assign({}, l, {
                        text: o[c]
                    })).text);
                    a.text = s;
                } else a.text = n(Object.assign({}, l, {
                    text: o
                })).text;
            }]);
        }(Bt),
        function(t) {
            var r = function() {
                return this.internal.vFS === void 0 && (this.internal.vFS = {}), !0;
            };
            t.existsFileInVFS = function(e) {
                return r.call(this), this.internal.vFS[e] !== void 0;
            }, t.addFileToVFS = function(e, i) {
                return r.call(this), this.internal.vFS[e] = i, this;
            }, t.getFileFromVFS = function(e) {
                return r.call(this), this.internal.vFS[e] !== void 0 ? this.internal.vFS[e] : null;
            };
        }(Bt.API),
        function(t) {
            t.__bidiEngine__ = t.prototype.__bidiEngine__ = function(i) {
                var n, a, o, s, l, c, u, h = r,
                    d = [
                        [0, 3, 0, 1, 0, 0, 0],
                        [0, 3, 0, 1, 2, 2, 0],
                        [0, 3, 0, 17, 2, 0, 1],
                        [0, 3, 5, 5, 4, 1, 0],
                        [0, 3, 21, 21, 4, 0, 1],
                        [0, 3, 5, 5, 4, 2, 0]
                    ],
                    f = [
                        [2, 0, 1, 1, 0, 1, 0],
                        [2, 0, 1, 1, 0, 2, 0],
                        [2, 0, 2, 1, 3, 2, 0],
                        [2, 0, 2, 33, 3, 1, 1]
                    ],
                    m = {
                        L: 0,
                        R: 1,
                        EN: 2,
                        AN: 3,
                        N: 4,
                        B: 5,
                        S: 6
                    },
                    _ = {
                        0: 0,
                        5: 1,
                        6: 2,
                        7: 3,
                        32: 4,
                        251: 5,
                        254: 6,
                        255: 7
                    },
                    x = ["(", ")", "(", "<", ">", "<", "[", "]", "[", "{", "}", "{", "\xAB", "\xBB", "\xAB", "\u2039", "\u203A", "\u2039", "\u2045", "\u2046", "\u2045", "\u207D", "\u207E", "\u207D", "\u208D", "\u208E", "\u208D", "\u2264", "\u2265", "\u2264", "\u2329", "\u232A", "\u2329", "\uFE59", "\uFE5A", "\uFE59", "\uFE5B", "\uFE5C", "\uFE5B", "\uFE5D", "\uFE5E", "\uFE5D", "\uFE64", "\uFE65", "\uFE64"],
                    g = new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),
                    b = !1,
                    w = 0;
                this.__bidiEngine__ = {};
                var T = function(C) {
                        var F = C.charCodeAt(),
                            W = F >> 8,
                            I = _[W];
                        return I !== void 0 ? h[256 * I + (255 & F)] : W === 252 || W === 253 ? "AL" : g.test(W) ? "L" : W === 8 ? "R" : "N";
                    },
                    E = function(C) {
                        for (var F, W = 0; W < C.length; W++) {
                            if ((F = T(C.charAt(W))) === "L") return !1;
                            if (F === "R") return !0;
                        }
                        return !1;
                    },
                    L = function(C, F, W, I) {
                        var U, le, H, pe, _e = F[I];
                        switch (_e) {
                            case "L":
                            case "R":
                            case "LRE":
                            case "RLE":
                            case "LRO":
                            case "RLO":
                            case "PDF":
                                b = !1;
                                break;
                            case "N":
                            case "AN":
                                break;
                            case "EN":
                                b && (_e = "AN");
                                break;
                            case "AL":
                                b = !0, _e = "R";
                                break;
                            case "WS":
                            case "BN":
                                _e = "N";
                                break;
                            case "CS":
                                I < 1 || I + 1 >= F.length || (U = W[I - 1]) !== "EN" && U !== "AN" || (le = F[I + 1]) !== "EN" && le !== "AN" ? _e = "N" : b && (le = "AN"), _e = le === U ? le : "N";
                                break;
                            case "ES":
                                _e = (U = I > 0 ? W[I - 1] : "B") === "EN" && I + 1 < F.length && F[I + 1] === "EN" ? "EN" : "N";
                                break;
                            case "ET":
                                if (I > 0 && W[I - 1] === "EN") {
                                    _e = "EN";
                                    break;
                                }
                                if (b) {
                                    _e = "N";
                                    break;
                                }
                                for (H = I + 1, pe = F.length; H < pe && F[H] === "ET";) H++;
                                _e = H < pe && F[H] === "EN" ? "EN" : "N";
                                break;
                            case "NSM":
                                if (o && !s) {
                                    for (pe = F.length, H = I + 1; H < pe && F[H] === "NSM";) H++;
                                    if (H < pe) {
                                        var Fe = C[I],
                                            Te = Fe >= 1425 && Fe <= 2303 || Fe === 64286;
                                        if (U = F[H], Te && (U === "R" || U === "AL")) {
                                            _e = "R";
                                            break;
                                        }
                                    }
                                }
                                _e = I < 1 || (U = F[I - 1]) === "B" ? "N" : W[I - 1];
                                break;
                            case "B":
                                b = !1, n = !0, _e = w;
                                break;
                            case "S":
                                a = !0, _e = "N";
                        }
                        return _e;
                    },
                    P = function(C, F, W) {
                        var I = C.split("");
                        return W && k(I, W, {
                            hiLevel: w
                        }), I.reverse(), F && F.reverse(), I.join("");
                    },
                    k = function(C, F, W) {
                        var I, U, le, H, pe, _e = -1,
                            Fe = C.length,
                            Te = 0,
                            O = [],
                            j = w ? f : d,
                            X = [];
                        for (b = !1, n = !1, a = !1, U = 0; U < Fe; U++) X[U] = T(C[U]);
                        for (le = 0; le < Fe; le++) {
                            if (pe = Te, O[le] = L(C, X, O, le), I = 240 & (Te = j[pe][m[O[le]]]), Te &= 15, F[le] = H = j[Te][5], I > 0)
                                if (I === 16) {
                                    for (U = _e; U < le; U++) F[U] = 1;
                                    _e = -1;
                                } else _e = -1;
                            if (j[Te][6]) _e === -1 && (_e = le);
                            else if (_e > -1) {
                                for (U = _e; U < le; U++) F[U] = H;
                                _e = -1;
                            }
                            X[le] === "B" && (F[le] = 0), W.hiLevel |= H;
                        }
                        a && function(me, xe, be) {
                            for (var B = 0; B < be; B++)
                                if (me[B] === "S") {
                                    xe[B] = w;
                                    for (var ne = B - 1; ne >= 0 && me[ne] === "WS"; ne--) xe[ne] = w;
                                }
                        }(X, F, Fe);
                    },
                    A = function(C, F, W, I, U) {
                        if (!(U.hiLevel < C)) {
                            if (C === 1 && w === 1 && !n) return F.reverse(), void(W && W.reverse());
                            for (var le, H, pe, _e, Fe = F.length, Te = 0; Te < Fe;) {
                                if (I[Te] >= C) {
                                    for (pe = Te + 1; pe < Fe && I[pe] >= C;) pe++;
                                    for (_e = Te, H = pe - 1; _e < H; _e++, H--) le = F[_e], F[_e] = F[H], F[H] = le, W && (le = W[_e], W[_e] = W[H], W[H] = le);
                                    Te = pe;
                                }
                                Te++;
                            }
                        }
                    },
                    N = function(C, F, W) {
                        var I = C.split(""),
                            U = {
                                hiLevel: w
                            };
                        return W || (W = []), k(I, W, U),
                            function(le, H, pe) {
                                if (pe.hiLevel !== 0 && u)
                                    for (var _e, Fe = 0; Fe < le.length; Fe++) H[Fe] === 1 && (_e = x.indexOf(le[Fe])) >= 0 && (le[Fe] = x[_e + 1]);
                            }(I, W, U), A(2, I, F, W, U), A(1, I, F, W, U), I.join("");
                    };
                return this.__bidiEngine__.doBidiReorder = function(C, F, W) {
                    if (function(U, le) {
                            if (le)
                                for (var H = 0; H < U.length; H++) le[H] = H;
                            s === void 0 && (s = E(U)), c === void 0 && (c = E(U));
                        }(C, F), o || !l || c) {
                        if (o && l && s ^ c) w = s ? 1 : 0, C = P(C, F, W);
                        else if (!o && l && c) w = s ? 1 : 0, C = N(C, F, W), C = P(C, F);
                        else if (!o || s || l || c) {
                            if (o && !l && s ^ c) C = P(C, F), s ? (w = 0, C = N(C, F, W)) : (w = 1, C = N(C, F, W), C = P(C, F));
                            else if (o && s && !l && c) w = 1, C = N(C, F, W), C = P(C, F);
                            else if (!o && !l && s ^ c) {
                                var I = u;
                                s ? (w = 1, C = N(C, F, W), w = 0, u = !1, C = N(C, F, W), u = I) : (w = 0, C = N(C, F, W), C = P(C, F), w = 1, u = !1, C = N(C, F, W), u = I, C = P(C, F));
                            }
                        } else w = 0, C = N(C, F, W);
                    } else w = s ? 1 : 0, C = N(C, F, W);
                    return C;
                }, this.__bidiEngine__.setOptions = function(C) {
                    C && (o = C.isInputVisual, l = C.isOutputVisual, s = C.isInputRtl, c = C.isOutputRtl, u = C.isSymmetricSwapping);
                }, this.__bidiEngine__.setOptions(i), this.__bidiEngine__;
            };
            var r = ["BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "S", "B", "S", "WS", "B", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "B", "B", "B", "S", "WS", "N", "N", "ET", "ET", "ET", "N", "N", "N", "N", "N", "ES", "CS", "ES", "CS", "CS", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "CS", "N", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "N", "N", "N", "BN", "BN", "BN", "BN", "BN", "BN", "B", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "CS", "N", "ET", "ET", "ET", "ET", "N", "N", "N", "N", "L", "N", "N", "BN", "N", "N", "ET", "ET", "EN", "EN", "N", "L", "N", "N", "N", "EN", "L", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "N", "L", "L", "L", "L", "L", "L", "L", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "L", "N", "N", "N", "N", "N", "ET", "N", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "R", "NSM", "R", "NSM", "NSM", "R", "NSM", "NSM", "R", "NSM", "N", "N", "N", "N", "N", "N", "N", "N", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "N", "N", "N", "N", "N", "R", "R", "R", "R", "R", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "AN", "AN", "AN", "AN", "AN", "AN", "N", "N", "AL", "ET", "ET", "AL", "CS", "AL", "N", "N", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AL", "AL", "N", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "ET", "AN", "AN", "AL", "AL", "AL", "NSM", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AN", "N", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AL", "AL", "NSM", "NSM", "N", "NSM", "NSM", "NSM", "NSM", "AL", "AL", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "N", "AL", "AL", "NSM", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "N", "N", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AL", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "R", "R", "N", "N", "N", "N", "R", "N", "N", "N", "N", "N", "WS", "WS", "WS", "WS", "WS", "WS", "WS", "WS", "WS", "WS", "WS", "BN", "BN", "BN", "L", "R", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "WS", "B", "LRE", "RLE", "PDF", "LRO", "RLO", "CS", "ET", "ET", "ET", "ET", "ET", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "CS", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "WS", "BN", "BN", "BN", "BN", "BN", "N", "LRI", "RLI", "FSI", "PDI", "BN", "BN", "BN", "BN", "BN", "BN", "EN", "L", "N", "N", "EN", "EN", "EN", "EN", "EN", "EN", "ES", "ES", "N", "N", "N", "L", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "ES", "ES", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "N", "N", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "ET", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "N", "N", "N", "N", "N", "R", "NSM", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "ES", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "N", "R", "R", "R", "R", "R", "N", "R", "N", "R", "R", "N", "R", "R", "N", "R", "R", "R", "R", "R", "R", "R", "R", "R", "R", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "CS", "N", "CS", "N", "N", "CS", "N", "N", "N", "N", "N", "N", "N", "N", "N", "ET", "N", "N", "ES", "ES", "N", "N", "N", "N", "N", "ET", "ET", "N", "N", "N", "N", "N", "AL", "AL", "AL", "AL", "AL", "N", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "N", "N", "BN", "N", "N", "N", "ET", "ET", "ET", "N", "N", "N", "N", "N", "ES", "CS", "ES", "CS", "CS", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "CS", "N", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "N", "N", "N", "L", "L", "L", "L", "L", "L", "N", "N", "L", "L", "L", "L", "L", "L", "N", "N", "L", "L", "L", "L", "L", "L", "N", "N", "L", "L", "L", "N", "N", "N", "ET", "ET", "N", "N", "N", "ET", "ET", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N", "N"],
                e = new t.__bidiEngine__({
                    isInputVisual: !0
                });
            t.API.events.push(["postProcessText", function(i) {
                var n = i.text;
                i.x, i.y;
                var a = i.options || {};
                i.mutex, a.lang;
                var o = [];
                if (a.isInputVisual = typeof a.isInputVisual != "boolean" || a.isInputVisual, e.setOptions(a), Object.prototype.toString.call(n) === "[object Array]") {
                    var s = 0;
                    for (o = [], s = 0; s < n.length; s += 1) Object.prototype.toString.call(n[s]) === "[object Array]" ? o.push([e.doBidiReorder(n[s][0]), n[s][1], n[s][2]]) : o.push([e.doBidiReorder(n[s])]);
                    i.text = o;
                } else i.text = e.doBidiReorder(n);
                e.setOptions({
                    isInputVisual: !0
                });
            }]);
        }(Bt), Bt.API.TTFFont = function() {
            function t(r) {
                var e;
                if (this.rawData = r, e = this.contents = new Il(r), this.contents.pos = 4, e.readString(4) === "ttcf") throw new Error("TTCF not supported.");
                e.pos = 0, this.parse(), this.subset = new GA(this), this.registerTTF();
            }
            return t.open = function(r) {
                return new t(r);
            }, t.prototype.parse = function() {
                return this.directory = new PA(this.contents), this.head = new OA(this), this.name = new BA(this), this.cmap = new Jy(this), this.toUnicode = {}, this.hhea = new NA(this), this.maxp = new UA(this), this.hmtx = new VA(this), this.post = new RA(this), this.os2 = new LA(this), this.loca = new HA(this), this.glyf = new zA(this), this.ascender = this.os2.exists && this.os2.ascender || this.hhea.ascender, this.decender = this.os2.exists && this.os2.decender || this.hhea.decender, this.lineGap = this.os2.exists && this.os2.lineGap || this.hhea.lineGap, this.bbox = [this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax];
            }, t.prototype.registerTTF = function() {
                var r, e, i, n, a;
                if (this.scaleFactor = 1e3 / this.head.unitsPerEm, this.bbox = function() {
                        var o, s, l, c;
                        for (c = [], o = 0, s = (l = this.bbox).length; o < s; o++) r = l[o], c.push(Math.round(r * this.scaleFactor));
                        return c;
                    }.call(this), this.stemV = 0, this.post.exists ? (i = 255 & (n = this.post.italic_angle), 32768 & (e = n >> 16) && (e = -(1 + (65535 ^ e))), this.italicAngle = +(e + "." + i)) : this.italicAngle = 0, this.ascender = Math.round(this.ascender * this.scaleFactor), this.decender = Math.round(this.decender * this.scaleFactor), this.lineGap = Math.round(this.lineGap * this.scaleFactor), this.capHeight = this.os2.exists && this.os2.capHeight || this.ascender, this.xHeight = this.os2.exists && this.os2.xHeight || 0, this.familyClass = (this.os2.exists && this.os2.familyClass || 0) >> 8, this.isSerif = (a = this.familyClass) === 1 || a === 2 || a === 3 || a === 4 || a === 5 || a === 7, this.isScript = this.familyClass === 10, this.flags = 0, this.post.isFixedPitch && (this.flags |= 1), this.isSerif && (this.flags |= 2), this.isScript && (this.flags |= 8), this.italicAngle !== 0 && (this.flags |= 64), this.flags |= 32, !this.cmap.unicode) throw new Error("No unicode cmap for font");
            }, t.prototype.characterToGlyph = function(r) {
                var e;
                return ((e = this.cmap.unicode) != null ? e.codeMap[r] : void 0) || 0;
            }, t.prototype.widthOfGlyph = function(r) {
                var e;
                return e = 1e3 / this.head.unitsPerEm, this.hmtx.forGlyph(r).advance * e;
            }, t.prototype.widthOfString = function(r, e, i) {
                var n, a, o, s;
                for (o = 0, a = 0, s = (r = "" + r).length; 0 <= s ? a < s : a > s; a = 0 <= s ? ++a : --a) n = r.charCodeAt(a), o += this.widthOfGlyph(this.characterToGlyph(n)) + i * (1e3 / e) || 0;
                return o * (e / 1e3);
            }, t.prototype.lineHeight = function(r, e) {
                var i;
                return e == null && (e = !1), i = e ? this.lineGap : 0, (this.ascender + i - this.decender) / 1e3 * r;
            }, t;
        }();
    Il = function() {
        function t(r) {
            this.data = r ? ? [], this.pos = 0, this.length = this.data.length;
        }
        return t.prototype.readByte = function() {
            return this.data[this.pos++];
        }, t.prototype.writeByte = function(r) {
            return this.data[this.pos++] = r;
        }, t.prototype.readUInt32 = function() {
            return 16777216 * this.readByte() + (this.readByte() << 16) + (this.readByte() << 8) + this.readByte();
        }, t.prototype.writeUInt32 = function(r) {
            return this.writeByte(r >>> 24 & 255), this.writeByte(r >> 16 & 255), this.writeByte(r >> 8 & 255), this.writeByte(255 & r);
        }, t.prototype.readInt32 = function() {
            var r;
            return (r = this.readUInt32()) >= 2147483648 ? r - 4294967296 : r;
        }, t.prototype.writeInt32 = function(r) {
            return r < 0 && (r += 4294967296), this.writeUInt32(r);
        }, t.prototype.readUInt16 = function() {
            return this.readByte() << 8 | this.readByte();
        }, t.prototype.writeUInt16 = function(r) {
            return this.writeByte(r >> 8 & 255), this.writeByte(255 & r);
        }, t.prototype.readInt16 = function() {
            var r;
            return (r = this.readUInt16()) >= 32768 ? r - 65536 : r;
        }, t.prototype.writeInt16 = function(r) {
            return r < 0 && (r += 65536), this.writeUInt16(r);
        }, t.prototype.readString = function(r) {
            var e, i;
            for (i = [], e = 0; 0 <= r ? e < r : e > r; e = 0 <= r ? ++e : --e) i[e] = String.fromCharCode(this.readByte());
            return i.join("");
        }, t.prototype.writeString = function(r) {
            var e, i, n;
            for (n = [], e = 0, i = r.length; 0 <= i ? e < i : e > i; e = 0 <= i ? ++e : --e) n.push(this.writeByte(r.charCodeAt(e)));
            return n;
        }, t.prototype.readShort = function() {
            return this.readInt16();
        }, t.prototype.writeShort = function(r) {
            return this.writeInt16(r);
        }, t.prototype.readLongLong = function() {
            var r, e, i, n, a, o, s, l;
            return r = this.readByte(), e = this.readByte(), i = this.readByte(), n = this.readByte(), a = this.readByte(), o = this.readByte(), s = this.readByte(), l = this.readByte(), 128 & r ? -1 * (72057594037927940 * (255 ^ r) + 281474976710656 * (255 ^ e) + 1099511627776 * (255 ^ i) + 4294967296 * (255 ^ n) + 16777216 * (255 ^ a) + 65536 * (255 ^ o) + 256 * (255 ^ s) + (255 ^ l) + 1) : 72057594037927940 * r + 281474976710656 * e + 1099511627776 * i + 4294967296 * n + 16777216 * a + 65536 * o + 256 * s + l;
        }, t.prototype.writeLongLong = function(r) {
            var e, i;
            return e = Math.floor(r / 4294967296), i = 4294967295 & r, this.writeByte(e >> 24 & 255), this.writeByte(e >> 16 & 255), this.writeByte(e >> 8 & 255), this.writeByte(255 & e), this.writeByte(i >> 24 & 255), this.writeByte(i >> 16 & 255), this.writeByte(i >> 8 & 255), this.writeByte(255 & i);
        }, t.prototype.readInt = function() {
            return this.readInt32();
        }, t.prototype.writeInt = function(r) {
            return this.writeInt32(r);
        }, t.prototype.read = function(r) {
            var e, i;
            for (e = [], i = 0; 0 <= r ? i < r : i > r; i = 0 <= r ? ++i : --i) e.push(this.readByte());
            return e;
        }, t.prototype.write = function(r) {
            var e, i, n, a;
            for (a = [], i = 0, n = r.length; i < n; i++) e = r[i], a.push(this.writeByte(e));
            return a;
        }, t;
    }(), PA = function() {
        var t;

        function r(e) {
            var i, n, a;
            for (this.scalarType = e.readInt(), this.tableCount = e.readShort(), this.searchRange = e.readShort(), this.entrySelector = e.readShort(), this.rangeShift = e.readShort(), this.tables = {}, n = 0, a = this.tableCount; 0 <= a ? n < a : n > a; n = 0 <= a ? ++n : --n) i = {
                tag: e.readString(4),
                checksum: e.readInt(),
                offset: e.readInt(),
                length: e.readInt()
            }, this.tables[i.tag] = i;
        }
        return r.prototype.encode = function(e) {
            var i, n, a, o, s, l, c, u, h, d, f, m, _;
            for (_ in f = Object.keys(e).length, l = Math.log(2), h = 16 * Math.floor(Math.log(f) / l), o = Math.floor(h / l), u = 16 * f - h, (n = new Il()).writeInt(this.scalarType), n.writeShort(f), n.writeShort(h), n.writeShort(o), n.writeShort(u), a = 16 * f, c = n.pos + a, s = null, m = [], e)
                for (d = e[_], n.writeString(_), n.writeInt(t(d)), n.writeInt(c), n.writeInt(d.length), m = m.concat(d), _ === "head" && (s = c), c += d.length; c % 4;) m.push(0), c++;
            return n.write(m), i = 2981146554 - t(n.data), n.pos = s + 8, n.writeUInt32(i), n.data;
        }, t = function(e) {
            var i, n, a, o;
            for (e = Qy.call(e); e.length % 4;) e.push(0);
            for (a = new Il(e), n = 0, i = 0, o = e.length; i < o; i = i += 4) n += a.readUInt32();
            return 4294967295 & n;
        }, r;
    }(), IA = {}.hasOwnProperty, is = function(t, r) {
        for (var e in r) IA.call(r, e) && (t[e] = r[e]);

        function i() {
            this.constructor = t;
        }
        return i.prototype = r.prototype, t.prototype = new i(), t.__super__ = r.prototype, t;
    };
    Lo = function() {
        function t(r) {
            var e;
            this.file = r, e = this.file.directory.tables[this.tag], this.exists = !!e, e && (this.offset = e.offset, this.length = e.length, this.parse(this.file.contents));
        }
        return t.prototype.parse = function() {}, t.prototype.encode = function() {}, t.prototype.raw = function() {
            return this.exists ? (this.file.contents.pos = this.offset, this.file.contents.read(this.length)) : null;
        }, t;
    }();
    OA = function() {
        function t() {
            return t.__super__.constructor.apply(this, arguments);
        }
        return is(t, Lo), t.prototype.tag = "head", t.prototype.parse = function(r) {
            return r.pos = this.offset, this.version = r.readInt(), this.revision = r.readInt(), this.checkSumAdjustment = r.readInt(), this.magicNumber = r.readInt(), this.flags = r.readShort(), this.unitsPerEm = r.readShort(), this.created = r.readLongLong(), this.modified = r.readLongLong(), this.xMin = r.readShort(), this.yMin = r.readShort(), this.xMax = r.readShort(), this.yMax = r.readShort(), this.macStyle = r.readShort(), this.lowestRecPPEM = r.readShort(), this.fontDirectionHint = r.readShort(), this.indexToLocFormat = r.readShort(), this.glyphDataFormat = r.readShort();
        }, t.prototype.encode = function(r) {
            var e;
            return (e = new Il()).writeInt(this.version), e.writeInt(this.revision), e.writeInt(this.checkSumAdjustment), e.writeInt(this.magicNumber), e.writeShort(this.flags), e.writeShort(this.unitsPerEm), e.writeLongLong(this.created), e.writeLongLong(this.modified), e.writeShort(this.xMin), e.writeShort(this.yMin), e.writeShort(this.xMax), e.writeShort(this.yMax), e.writeShort(this.macStyle), e.writeShort(this.lowestRecPPEM), e.writeShort(this.fontDirectionHint), e.writeShort(r), e.writeShort(this.glyphDataFormat), e.data;
        }, t;
    }(), Uy = function() {
        function t(r, e) {
            var i, n, a, o, s, l, c, u, h, d, f, m, _, x, g, b, w;
            switch (this.platformID = r.readUInt16(), this.encodingID = r.readShort(), this.offset = e + r.readInt(), h = r.pos, r.pos = this.offset, this.format = r.readUInt16(), this.length = r.readUInt16(), this.language = r.readUInt16(), this.isUnicode = this.platformID === 3 && this.encodingID === 1 && this.format === 4 || this.platformID === 0 && this.format === 4, this.codeMap = {}, this.format) {
                case 0:
                    for (l = 0; l < 256; ++l) this.codeMap[l] = r.readByte();
                    break;
                case 4:
                    for (f = r.readUInt16(), d = f / 2, r.pos += 6, a = function() {
                            var T, E;
                            for (E = [], l = T = 0; 0 <= d ? T < d : T > d; l = 0 <= d ? ++T : --T) E.push(r.readUInt16());
                            return E;
                        }(), r.pos += 2, _ = function() {
                            var T, E;
                            for (E = [], l = T = 0; 0 <= d ? T < d : T > d; l = 0 <= d ? ++T : --T) E.push(r.readUInt16());
                            return E;
                        }(), c = function() {
                            var T, E;
                            for (E = [], l = T = 0; 0 <= d ? T < d : T > d; l = 0 <= d ? ++T : --T) E.push(r.readUInt16());
                            return E;
                        }(), u = function() {
                            var T, E;
                            for (E = [], l = T = 0; 0 <= d ? T < d : T > d; l = 0 <= d ? ++T : --T) E.push(r.readUInt16());
                            return E;
                        }(), n = (this.length - r.pos + this.offset) / 2, s = function() {
                            var T, E;
                            for (E = [], l = T = 0; 0 <= n ? T < n : T > n; l = 0 <= n ? ++T : --T) E.push(r.readUInt16());
                            return E;
                        }(), l = g = 0, w = a.length; g < w; l = ++g)
                        for (x = a[l], i = b = m = _[l]; m <= x ? b <= x : b >= x; i = m <= x ? ++b : --b) u[l] === 0 ? o = i + c[l] : (o = s[u[l] / 2 + (i - m) - (d - l)] || 0) !== 0 && (o += c[l]), this.codeMap[i] = 65535 & o;
            }
            r.pos = h;
        }
        return t.encode = function(r, e) {
            var i, n, a, o, s, l, c, u, h, d, f, m, _, x, g, b, w, T, E, L, P, k, A, N, C, F, W, I, U, le, H, pe, _e, Fe, Te, O, j, X, me, xe, be, B, ne, Z, J, ye;
            switch (I = new Il(), o = Object.keys(r).sort(function(je, Qe) {
                return je - Qe;
            }), e) {
                case "macroman":
                    for (_ = 0, x = function() {
                            var je = [];
                            for (m = 0; m < 256; ++m) je.push(0);
                            return je;
                        }(), b = {
                            0: 0
                        }, a = {}, U = 0, _e = o.length; U < _e; U++) b[ne = r[n = o[U]]] == null && (b[ne] = ++_), a[n] = {
                        old: r[n],
                        new: b[r[n]]
                    }, x[n] = b[r[n]];
                    return I.writeUInt16(1), I.writeUInt16(0), I.writeUInt32(12), I.writeUInt16(0), I.writeUInt16(262), I.writeUInt16(0), I.write(x), {
                        charMap: a,
                        subtable: I.data,
                        maxGlyphID: _ + 1
                    };
                case "unicode":
                    for (F = [], h = [], w = 0, b = {}, i = {}, g = c = null, le = 0, Fe = o.length; le < Fe; le++) b[E = r[n = o[le]]] == null && (b[E] = ++w), i[n] = {
                        old: E,
                        new: b[E]
                    }, s = b[E] - n, g != null && s === c || (g && h.push(g), F.push(n), c = s), g = n;
                    for (g && h.push(g), h.push(65535), F.push(65535), N = 2 * (A = F.length), k = 2 * Math.pow(Math.log(A) / Math.LN2, 2), d = Math.log(k / 2) / Math.LN2, P = 2 * A - k, l = [], L = [], f = [], m = H = 0, Te = F.length; H < Te; m = ++H) {
                        if (C = F[m], u = h[m], C === 65535) {
                            l.push(0), L.push(0);
                            break;
                        }
                        if (C - (W = i[C].new) >= 32768)
                            for (l.push(0), L.push(2 * (f.length + A - m)), n = pe = C; C <= u ? pe <= u : pe >= u; n = C <= u ? ++pe : --pe) f.push(i[n].new);
                        else l.push(W - C), L.push(0);
                    }
                    for (I.writeUInt16(3), I.writeUInt16(1), I.writeUInt32(12), I.writeUInt16(4), I.writeUInt16(16 + 8 * A + 2 * f.length), I.writeUInt16(0), I.writeUInt16(N), I.writeUInt16(k), I.writeUInt16(d), I.writeUInt16(P), be = 0, O = h.length; be < O; be++) n = h[be], I.writeUInt16(n);
                    for (I.writeUInt16(0), B = 0, j = F.length; B < j; B++) n = F[B], I.writeUInt16(n);
                    for (Z = 0, X = l.length; Z < X; Z++) s = l[Z], I.writeUInt16(s);
                    for (J = 0, me = L.length; J < me; J++) T = L[J], I.writeUInt16(T);
                    for (ye = 0, xe = f.length; ye < xe; ye++) _ = f[ye], I.writeUInt16(_);
                    return {
                        charMap: i,
                        subtable: I.data,
                        maxGlyphID: w + 1
                    };
            }
        }, t;
    }(), Jy = function() {
        function t() {
            return t.__super__.constructor.apply(this, arguments);
        }
        return is(t, Lo), t.prototype.tag = "cmap", t.prototype.parse = function(r) {
            var e, i, n;
            for (r.pos = this.offset, this.version = r.readUInt16(), n = r.readUInt16(), this.tables = [], this.unicode = null, i = 0; 0 <= n ? i < n : i > n; i = 0 <= n ? ++i : --i) e = new Uy(r, this.offset), this.tables.push(e), e.isUnicode && this.unicode == null && (this.unicode = e);
            return !0;
        }, t.encode = function(r, e) {
            var i, n;
            return e == null && (e = "macroman"), i = Uy.encode(r, e), (n = new Il()).writeUInt16(0), n.writeUInt16(1), i.table = n.data.concat(i.subtable), i;
        }, t;
    }(), NA = function() {
        function t() {
            return t.__super__.constructor.apply(this, arguments);
        }
        return is(t, Lo), t.prototype.tag = "hhea", t.prototype.parse = function(r) {
            return r.pos = this.offset, this.version = r.readInt(), this.ascender = r.readShort(), this.decender = r.readShort(), this.lineGap = r.readShort(), this.advanceWidthMax = r.readShort(), this.minLeftSideBearing = r.readShort(), this.minRightSideBearing = r.readShort(), this.xMaxExtent = r.readShort(), this.caretSlopeRise = r.readShort(), this.caretSlopeRun = r.readShort(), this.caretOffset = r.readShort(), r.pos += 8, this.metricDataFormat = r.readShort(), this.numberOfMetrics = r.readUInt16();
        }, t;
    }(), LA = function() {
        function t() {
            return t.__super__.constructor.apply(this, arguments);
        }
        return is(t, Lo), t.prototype.tag = "OS/2", t.prototype.parse = function(r) {
            if (r.pos = this.offset, this.version = r.readUInt16(), this.averageCharWidth = r.readShort(), this.weightClass = r.readUInt16(), this.widthClass = r.readUInt16(), this.type = r.readShort(), this.ySubscriptXSize = r.readShort(), this.ySubscriptYSize = r.readShort(), this.ySubscriptXOffset = r.readShort(), this.ySubscriptYOffset = r.readShort(), this.ySuperscriptXSize = r.readShort(), this.ySuperscriptYSize = r.readShort(), this.ySuperscriptXOffset = r.readShort(), this.ySuperscriptYOffset = r.readShort(), this.yStrikeoutSize = r.readShort(), this.yStrikeoutPosition = r.readShort(), this.familyClass = r.readShort(), this.panose = function() {
                    var e, i;
                    for (i = [], e = 0; e < 10; ++e) i.push(r.readByte());
                    return i;
                }(), this.charRange = function() {
                    var e, i;
                    for (i = [], e = 0; e < 4; ++e) i.push(r.readInt());
                    return i;
                }(), this.vendorID = r.readString(4), this.selection = r.readShort(), this.firstCharIndex = r.readShort(), this.lastCharIndex = r.readShort(), this.version > 0 && (this.ascent = r.readShort(), this.descent = r.readShort(), this.lineGap = r.readShort(), this.winAscent = r.readShort(), this.winDescent = r.readShort(), this.codePageRange = function() {
                    var e, i;
                    for (i = [], e = 0; e < 2; e = ++e) i.push(r.readInt());
                    return i;
                }(), this.version > 1)) return this.xHeight = r.readShort(), this.capHeight = r.readShort(), this.defaultChar = r.readShort(), this.breakChar = r.readShort(), this.maxContext = r.readShort();
        }, t;
    }(), RA = function() {
        function t() {
            return t.__super__.constructor.apply(this, arguments);
        }
        return is(t, Lo), t.prototype.tag = "post", t.prototype.parse = function(r) {
            var e, i, n;
            switch (r.pos = this.offset, this.format = r.readInt(), this.italicAngle = r.readInt(), this.underlinePosition = r.readShort(), this.underlineThickness = r.readShort(), this.isFixedPitch = r.readInt(), this.minMemType42 = r.readInt(), this.maxMemType42 = r.readInt(), this.minMemType1 = r.readInt(), this.maxMemType1 = r.readInt(), this.format) {
                case 65536:
                case 196608:
                    break;
                case 131072:
                    var a;
                    for (i = r.readUInt16(), this.glyphNameIndex = [], a = 0; 0 <= i ? a < i : a > i; a = 0 <= i ? ++a : --a) this.glyphNameIndex.push(r.readUInt16());
                    for (this.names = [], n = []; r.pos < this.offset + this.length;) e = r.readByte(), n.push(this.names.push(r.readString(e)));
                    return n;
                case 151552:
                    return i = r.readUInt16(), this.offsets = r.read(i);
                case 262144:
                    return this.map = function() {
                        var o, s, l;
                        for (l = [], a = o = 0, s = this.file.maxp.numGlyphs; 0 <= s ? o < s : o > s; a = 0 <= s ? ++o : --o) l.push(r.readUInt32());
                        return l;
                    }.call(this);
            }
        }, t;
    }(), MA = function(t, r) {
        this.raw = t, this.length = t.length, this.platformID = r.platformID, this.encodingID = r.encodingID, this.languageID = r.languageID;
    }, BA = function() {
        function t() {
            return t.__super__.constructor.apply(this, arguments);
        }
        return is(t, Lo), t.prototype.tag = "name", t.prototype.parse = function(r) {
            var e, i, n, a, o, s, l, c, u, h, d;
            for (r.pos = this.offset, r.readShort(), e = r.readShort(), s = r.readShort(), i = [], a = 0; 0 <= e ? a < e : a > e; a = 0 <= e ? ++a : --a) i.push({
                platformID: r.readShort(),
                encodingID: r.readShort(),
                languageID: r.readShort(),
                nameID: r.readShort(),
                length: r.readShort(),
                offset: this.offset + s + r.readShort()
            });
            for (l = {}, a = u = 0, h = i.length; u < h; a = ++u) n = i[a], r.pos = n.offset, c = r.readString(n.length), o = new MA(c, n), l[d = n.nameID] == null && (l[d] = []), l[n.nameID].push(o);
            this.strings = l, this.copyright = l[0], this.fontFamily = l[1], this.fontSubfamily = l[2], this.uniqueSubfamily = l[3], this.fontName = l[4], this.version = l[5];
            try {
                this.postscriptName = l[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g, "");
            } catch {
                this.postscriptName = l[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g, "");
            }
            return this.trademark = l[7], this.manufacturer = l[8], this.designer = l[9], this.description = l[10], this.vendorUrl = l[11], this.designerUrl = l[12], this.license = l[13], this.licenseUrl = l[14], this.preferredFamily = l[15], this.preferredSubfamily = l[17], this.compatibleFull = l[18], this.sampleText = l[19];
        }, t;
    }(), UA = function() {
        function t() {
            return t.__super__.constructor.apply(this, arguments);
        }
        return is(t, Lo), t.prototype.tag = "maxp", t.prototype.parse = function(r) {
            return r.pos = this.offset, this.version = r.readInt(), this.numGlyphs = r.readUInt16(), this.maxPoints = r.readUInt16(), this.maxContours = r.readUInt16(), this.maxCompositePoints = r.readUInt16(), this.maxComponentContours = r.readUInt16(), this.maxZones = r.readUInt16(), this.maxTwilightPoints = r.readUInt16(), this.maxStorage = r.readUInt16(), this.maxFunctionDefs = r.readUInt16(), this.maxInstructionDefs = r.readUInt16(), this.maxStackElements = r.readUInt16(), this.maxSizeOfInstructions = r.readUInt16(), this.maxComponentElements = r.readUInt16(), this.maxComponentDepth = r.readUInt16();
        }, t;
    }(), VA = function() {
        function t() {
            return t.__super__.constructor.apply(this, arguments);
        }
        return is(t, Lo), t.prototype.tag = "hmtx", t.prototype.parse = function(r) {
            var e, i, n, a, o, s, l;
            for (r.pos = this.offset, this.metrics = [], e = 0, s = this.file.hhea.numberOfMetrics; 0 <= s ? e < s : e > s; e = 0 <= s ? ++e : --e) this.metrics.push({
                advance: r.readUInt16(),
                lsb: r.readInt16()
            });
            for (n = this.file.maxp.numGlyphs - this.file.hhea.numberOfMetrics, this.leftSideBearings = function() {
                    var c, u;
                    for (u = [], e = c = 0; 0 <= n ? c < n : c > n; e = 0 <= n ? ++c : --c) u.push(r.readInt16());
                    return u;
                }(), this.widths = function() {
                    var c, u, h, d;
                    for (d = [], c = 0, u = (h = this.metrics).length; c < u; c++) a = h[c], d.push(a.advance);
                    return d;
                }.call(this), i = this.widths[this.widths.length - 1], l = [], e = o = 0; 0 <= n ? o < n : o > n; e = 0 <= n ? ++o : --o) l.push(this.widths.push(i));
            return l;
        }, t.prototype.forGlyph = function(r) {
            return r in this.metrics ? this.metrics[r] : {
                advance: this.metrics[this.metrics.length - 1].advance,
                lsb: this.leftSideBearings[r - this.metrics.length]
            };
        }, t;
    }(), Qy = [].slice, zA = function() {
        function t() {
            return t.__super__.constructor.apply(this, arguments);
        }
        return is(t, Lo), t.prototype.tag = "glyf", t.prototype.parse = function() {
            return this.cache = {};
        }, t.prototype.glyphFor = function(r) {
            var e, i, n, a, o, s, l, c, u, h;
            return r in this.cache ? this.cache[r] : (a = this.file.loca, e = this.file.contents, i = a.indexOf(r), (n = a.lengthOf(r)) === 0 ? this.cache[r] = null : (e.pos = this.offset + i, o = (s = new Il(e.read(n))).readShort(), c = s.readShort(), h = s.readShort(), l = s.readShort(), u = s.readShort(), this.cache[r] = o === -1 ? new jA(s, c, h, l, u) : new WA(s, o, c, h, l, u), this.cache[r]));
        }, t.prototype.encode = function(r, e, i) {
            var n, a, o, s, l;
            for (o = [], a = [], s = 0, l = e.length; s < l; s++) n = r[e[s]], a.push(o.length), n && (o = o.concat(n.encode(i)));
            return a.push(o.length), {
                table: o,
                offsets: a
            };
        }, t;
    }(), WA = function() {
        function t(r, e, i, n, a, o) {
            this.raw = r, this.numberOfContours = e, this.xMin = i, this.yMin = n, this.xMax = a, this.yMax = o, this.compound = !1;
        }
        return t.prototype.encode = function() {
            return this.raw.data;
        }, t;
    }(), jA = function() {
        function t(r, e, i, n, a) {
            var o, s;
            for (this.raw = r, this.xMin = e, this.yMin = i, this.xMax = n, this.yMax = a, this.compound = !0, this.glyphIDs = [], this.glyphOffsets = [], o = this.raw; s = o.readShort(), this.glyphOffsets.push(o.pos), this.glyphIDs.push(o.readUInt16()), 32 & s;) o.pos += 1 & s ? 4 : 2, 128 & s ? o.pos += 8 : 64 & s ? o.pos += 4 : 8 & s && (o.pos += 2);
        }
        return t.prototype.encode = function() {
            var r, e, i;
            for (e = new Il(Qy.call(this.raw.data)), r = 0, i = this.glyphIDs.length; r < i; ++r) e.pos = this.glyphOffsets[r];
            return e.data;
        }, t;
    }(), HA = function() {
        function t() {
            return t.__super__.constructor.apply(this, arguments);
        }
        return is(t, Lo), t.prototype.tag = "loca", t.prototype.parse = function(r) {
            var e, i;
            return r.pos = this.offset, e = this.file.head.indexToLocFormat, this.offsets = e === 0 ? function() {
                var n, a;
                for (a = [], i = 0, n = this.length; i < n; i += 2) a.push(2 * r.readUInt16());
                return a;
            }.call(this) : function() {
                var n, a;
                for (a = [], i = 0, n = this.length; i < n; i += 4) a.push(r.readUInt32());
                return a;
            }.call(this);
        }, t.prototype.indexOf = function(r) {
            return this.offsets[r];
        }, t.prototype.lengthOf = function(r) {
            return this.offsets[r + 1] - this.offsets[r];
        }, t.prototype.encode = function(r, e) {
            for (var i = new Uint32Array(this.offsets.length), n = 0, a = 0, o = 0; o < i.length; ++o)
                if (i[o] = n, a < e.length && e[a] == o) {
                    ++a, i[o] = n;
                    var s = this.offsets[o],
                        l = this.offsets[o + 1] - s;
                    l > 0 && (n += l);
                }
            for (var c = new Array(4 * i.length), u = 0; u < i.length; ++u) c[4 * u + 3] = 255 & i[u], c[4 * u + 2] = (65280 & i[u]) >> 8, c[4 * u + 1] = (16711680 & i[u]) >> 16, c[4 * u] = (4278190080 & i[u]) >> 24;
            return c;
        }, t;
    }(), GA = function() {
        function t(r) {
            this.font = r, this.subset = {}, this.unicodes = {}, this.next = 33;
        }
        return t.prototype.generateCmap = function() {
            var r, e, i, n, a;
            for (e in n = this.font.cmap.tables[0].codeMap, r = {}, a = this.subset) i = a[e], r[e] = n[i];
            return r;
        }, t.prototype.glyphsFor = function(r) {
            var e, i, n, a, o, s, l;
            for (n = {}, o = 0, s = r.length; o < s; o++) n[a = r[o]] = this.font.glyf.glyphFor(a);
            for (a in e = [], n)(i = n[a]) != null && i.compound && e.push.apply(e, i.glyphIDs);
            if (e.length > 0)
                for (a in l = this.glyphsFor(e)) i = l[a], n[a] = i;
            return n;
        }, t.prototype.encode = function(r, e) {
            var i, n, a, o, s, l, c, u, h, d, f, m, _, x, g;
            for (n in i = Jy.encode(this.generateCmap(), "unicode"), o = this.glyphsFor(r), f = {
                    0: 0
                }, g = i.charMap) f[(l = g[n]).old] = l.new;
            for (m in d = i.maxGlyphID, o) m in f || (f[m] = d++);
            return u = function(b) {
                var w, T;
                for (w in T = {}, b) T[b[w]] = w;
                return T;
            }(f), h = Object.keys(u).sort(function(b, w) {
                return b - w;
            }), _ = function() {
                var b, w, T;
                for (T = [], b = 0, w = h.length; b < w; b++) s = h[b], T.push(u[s]);
                return T;
            }(), a = this.font.glyf.encode(o, _, f), c = this.font.loca.encode(a.offsets, _), x = {
                cmap: this.font.cmap.raw(),
                glyf: a.table,
                loca: c,
                hmtx: this.font.hmtx.raw(),
                hhea: this.font.hhea.raw(),
                maxp: this.font.maxp.raw(),
                post: this.font.post.raw(),
                name: this.font.name.raw(),
                head: this.font.head.encode(e)
            }, this.font.os2.exists && (x["OS/2"] = this.font.os2.raw()), this.font.directory.encode(x);
        }, t;
    }();
    Bt.API.PDFObject = function() {
        var t;

        function r() {}
        return t = function(e, i) {
            return (Array(i + 1).join("0") + e).slice(-i);
        }, r.convert = function(e) {
            var i, n, a, o;
            if (Array.isArray(e)) return "[" + function() {
                var s, l, c;
                for (c = [], s = 0, l = e.length; s < l; s++) i = e[s], c.push(r.convert(i));
                return c;
            }().join(" ") + "]";
            if (typeof e == "string") return "/" + e;
            if (e ? .isString) return "(" + e + ")";
            if (e instanceof Date) return "(D:" + t(e.getUTCFullYear(), 4) + t(e.getUTCMonth(), 2) + t(e.getUTCDate(), 2) + t(e.getUTCHours(), 2) + t(e.getUTCMinutes(), 2) + t(e.getUTCSeconds(), 2) + "Z)";
            if ({}.toString.call(e) === "[object Object]") {
                for (n in a = ["<<"], e) o = e[n], a.push("/" + n + " " + r.convert(o));
                return a.push(">>"), a.join(`
`);
            }
            return "" + e;
        }, r;
    }();
});
var $y = M3((Tc, ag) => {
    "use strict";
    (function(r, e) {
        if (typeof Tc == "object" && typeof ag == "object") ag.exports = e(function() {
            try {
                return ap(), R2(ng);
            } catch {}
        }());
        else if (typeof define == "function" && define.amd) define(["jspdf"], e);
        else {
            var i = e(typeof Tc == "object" ? function() {
                try {
                    return ap(), R2(ng);
                } catch {}
            }() : r.jspdf);
            for (var n in i)(typeof Tc == "object" ? Tc : r)[n] = i[n];
        }
    })(typeof globalThis < "u" ? globalThis : typeof Tc < "u" ? Tc : typeof window < "u" ? window : typeof self < "u" ? self : global, function(t) {
        return function() {
            "use strict";
            var r = {
                    172: function(a, o) {
                        var s = this && this.__extends || function() {
                            var u = function(h, d) {
                                return u = Object.setPrototypeOf || {
                                    __proto__: []
                                }
                                instanceof Array && function(f, m) {
                                    f.__proto__ = m;
                                } || function(f, m) {
                                    for (var _ in m) Object.prototype.hasOwnProperty.call(m, _) && (f[_] = m[_]);
                                }, u(h, d);
                            };
                            return function(h, d) {
                                if (typeof d != "function" && d !== null) throw new TypeError("Class extends value " + String(d) + " is not a constructor or null");
                                u(h, d);

                                function f() {
                                    this.constructor = h;
                                }
                                h.prototype = d === null ? Object.create(d) : (f.prototype = d.prototype, new f());
                            };
                        }();
                        Object.defineProperty(o, "__esModule", {
                            value: !0
                        }), o.CellHookData = o.HookData = void 0;
                        var l = function() {
                            function u(h, d, f) {
                                this.table = d, this.pageNumber = d.pageNumber, this.pageCount = this.pageNumber, this.settings = d.settings, this.cursor = f, this.doc = h.getDocument();
                            }
                            return u;
                        }();
                        o.HookData = l;
                        var c = function(u) {
                            s(h, u);

                            function h(d, f, m, _, x, g) {
                                var b = u.call(this, d, f, g) || this;
                                return b.cell = m, b.row = _, b.column = x, b.section = _.section, b;
                            }
                            return h;
                        }(l);
                        o.CellHookData = c;
                    },
                    340: function(a, o, s) {
                        Object.defineProperty(o, "__esModule", {
                            value: !0
                        });
                        var l = s(4),
                            c = s(136),
                            u = s(744),
                            h = s(776),
                            d = s(664),
                            f = s(972);

                        function m(_) {
                            _.API.autoTable = function() {
                                for (var x = [], g = 0; g < arguments.length; g++) x[g] = arguments[g];
                                var b;
                                x.length === 1 ? b = x[0] : (console.error("Use of deprecated autoTable initiation"), b = x[2] || {}, b.columns = x[0], b.body = x[1]);
                                var w = (0, h.parseInput)(this, b),
                                    T = (0, f.createTable)(this, w);
                                return (0, d.drawTable)(this, T), this;
                            }, _.API.lastAutoTable = !1, _.API.previousAutoTable = !1, _.API.autoTable.previous = !1, _.API.autoTableText = function(x, g, b, w) {
                                (0, c.default)(x, g, b, w, this);
                            }, _.API.autoTableSetDefaults = function(x) {
                                return u.DocHandler.setDefaults(x, this), this;
                            }, _.autoTableSetDefaults = function(x, g) {
                                u.DocHandler.setDefaults(x, g);
                            }, _.API.autoTableHtmlToJson = function(x, g) {
                                var b;
                                if (g === void 0 && (g = !1), typeof window > "u") return console.error("Cannot run autoTableHtmlToJson in non browser environment"), null;
                                var w = new u.DocHandler(this),
                                    T = (0, l.parseHtml)(w, x, window, g, !1),
                                    E = T.head,
                                    L = T.body,
                                    P = ((b = E[0]) === null || b === void 0 ? void 0 : b.map(function(k) {
                                        return k.content;
                                    })) || [];
                                return {
                                    columns: P,
                                    rows: L,
                                    data: L
                                };
                            }, _.API.autoTableEndPosY = function() {
                                console.error("Use of deprecated function: autoTableEndPosY. Use doc.lastAutoTable.finalY instead.");
                                var x = this.lastAutoTable;
                                return x && x.finalY ? x.finalY : 0;
                            }, _.API.autoTableAddPageContent = function(x) {
                                return console.error("Use of deprecated function: autoTableAddPageContent. Use jsPDF.autoTableSetDefaults({didDrawPage: () => {}}) instead."), _.API.autoTable.globalDefaults || (_.API.autoTable.globalDefaults = {}), _.API.autoTable.globalDefaults.addPageContent = x, this;
                            }, _.API.autoTableAddPage = function() {
                                return console.error("Use of deprecated function: autoTableAddPage. Use doc.addPage()"), this.addPage(), this;
                            };
                        }
                        o.default = m;
                    },
                    136: function(a, o) {
                        Object.defineProperty(o, "__esModule", {
                            value: !0
                        });

                        function s(l, c, u, h, d) {
                            h = h || {};
                            var f = 1.15,
                                m = d.internal.scaleFactor,
                                _ = d.internal.getFontSize() / m,
                                x = d.getLineHeightFactor ? d.getLineHeightFactor() : f,
                                g = _ * x,
                                b = /\r\n|\r|\n/g,
                                w = "",
                                T = 1;
                            if ((h.valign === "middle" || h.valign === "bottom" || h.halign === "center" || h.halign === "right") && (w = typeof l == "string" ? l.split(b) : l, T = w.length || 1), u += _ * (2 - f), h.valign === "middle" ? u -= T / 2 * g : h.valign === "bottom" && (u -= T * g), h.halign === "center" || h.halign === "right") {
                                var E = _;
                                if (h.halign === "center" && (E *= .5), w && T >= 1) {
                                    for (var L = 0; L < w.length; L++) d.text(w[L], c - d.getStringUnitWidth(w[L]) * E, u), u += g;
                                    return d;
                                }
                                c -= d.getStringUnitWidth(l) * E;
                            }
                            return h.halign === "justify" ? d.text(l, c, u, {
                                maxWidth: h.maxWidth || 100,
                                align: "justify"
                            }) : d.text(l, c, u), d;
                        }
                        o.default = s;
                    },
                    420: function(a, o) {
                        Object.defineProperty(o, "__esModule", {
                            value: !0
                        }), o.getPageAvailableWidth = o.parseSpacing = o.getFillStyle = o.addTableBorder = o.getStringWidth = void 0;

                        function s(d, f, m) {
                            m.applyStyles(f, !0);
                            var _ = Array.isArray(d) ? d : [d],
                                x = _.map(function(g) {
                                    return m.getTextWidth(g);
                                }).reduce(function(g, b) {
                                    return Math.max(g, b);
                                }, 0);
                            return x;
                        }
                        o.getStringWidth = s;

                        function l(d, f, m, _) {
                            var x = f.settings.tableLineWidth,
                                g = f.settings.tableLineColor;
                            d.applyStyles({
                                lineWidth: x,
                                lineColor: g
                            });
                            var b = c(x, !1);
                            b && d.rect(m.x, m.y, f.getWidth(d.pageSize().width), _.y - m.y, b);
                        }
                        o.addTableBorder = l;

                        function c(d, f) {
                            var m = d > 0,
                                _ = f || f === 0;
                            return m && _ ? "DF" : m ? "S" : _ ? "F" : null;
                        }
                        o.getFillStyle = c;

                        function u(d, f) {
                            var m, _, x, g;
                            if (d = d || f, Array.isArray(d)) {
                                if (d.length >= 4) return {
                                    top: d[0],
                                    right: d[1],
                                    bottom: d[2],
                                    left: d[3]
                                };
                                if (d.length === 3) return {
                                    top: d[0],
                                    right: d[1],
                                    bottom: d[2],
                                    left: d[1]
                                };
                                if (d.length === 2) return {
                                    top: d[0],
                                    right: d[1],
                                    bottom: d[0],
                                    left: d[1]
                                };
                                d.length === 1 ? d = d[0] : d = f;
                            }
                            return typeof d == "object" ? (typeof d.vertical == "number" && (d.top = d.vertical, d.bottom = d.vertical), typeof d.horizontal == "number" && (d.right = d.horizontal, d.left = d.horizontal), {
                                left: (m = d.left) !== null && m !== void 0 ? m : f,
                                top: (_ = d.top) !== null && _ !== void 0 ? _ : f,
                                right: (x = d.right) !== null && x !== void 0 ? x : f,
                                bottom: (g = d.bottom) !== null && g !== void 0 ? g : f
                            }) : (typeof d != "number" && (d = f), {
                                top: d,
                                right: d,
                                bottom: d,
                                left: d
                            });
                        }
                        o.parseSpacing = u;

                        function h(d, f) {
                            var m = u(f.settings.margin, 0);
                            return d.pageSize().width - (m.left + m.right);
                        }
                        o.getPageAvailableWidth = h;
                    },
                    796: function(a, o) {
                        var s = this && this.__extends || function() {
                            var h = function(d, f) {
                                return h = Object.setPrototypeOf || {
                                    __proto__: []
                                }
                                instanceof Array && function(m, _) {
                                    m.__proto__ = _;
                                } || function(m, _) {
                                    for (var x in _) Object.prototype.hasOwnProperty.call(_, x) && (m[x] = _[x]);
                                }, h(d, f);
                            };
                            return function(d, f) {
                                if (typeof f != "function" && f !== null) throw new TypeError("Class extends value " + String(f) + " is not a constructor or null");
                                h(d, f);

                                function m() {
                                    this.constructor = d;
                                }
                                d.prototype = f === null ? Object.create(f) : (m.prototype = f.prototype, new m());
                            };
                        }();
                        Object.defineProperty(o, "__esModule", {
                            value: !0
                        }), o.getTheme = o.defaultStyles = o.HtmlRowInput = void 0;
                        var l = function(h) {
                            s(d, h);

                            function d(f) {
                                var m = h.call(this) || this;
                                return m._element = f, m;
                            }
                            return d;
                        }(Array);
                        o.HtmlRowInput = l;

                        function c(h) {
                            return {
                                font: "helvetica",
                                fontStyle: "normal",
                                overflow: "linebreak",
                                fillColor: !1,
                                textColor: 20,
                                halign: "left",
                                valign: "top",
                                fontSize: 10,
                                cellPadding: 5 / h,
                                lineColor: 200,
                                lineWidth: 0,
                                cellWidth: "auto",
                                minCellHeight: 0,
                                minCellWidth: 0
                            };
                        }
                        o.defaultStyles = c;

                        function u(h) {
                            var d = {
                                striped: {
                                    table: {
                                        fillColor: 255,
                                        textColor: 80,
                                        fontStyle: "normal"
                                    },
                                    head: {
                                        textColor: 255,
                                        fillColor: [41, 128, 185],
                                        fontStyle: "bold"
                                    },
                                    body: {},
                                    foot: {
                                        textColor: 255,
                                        fillColor: [41, 128, 185],
                                        fontStyle: "bold"
                                    },
                                    alternateRow: {
                                        fillColor: 245
                                    }
                                },
                                grid: {
                                    table: {
                                        fillColor: 255,
                                        textColor: 80,
                                        fontStyle: "normal",
                                        lineWidth: .1
                                    },
                                    head: {
                                        textColor: 255,
                                        fillColor: [26, 188, 156],
                                        fontStyle: "bold",
                                        lineWidth: 0
                                    },
                                    body: {},
                                    foot: {
                                        textColor: 255,
                                        fillColor: [26, 188, 156],
                                        fontStyle: "bold",
                                        lineWidth: 0
                                    },
                                    alternateRow: {}
                                },
                                plain: {
                                    head: {
                                        fontStyle: "bold"
                                    },
                                    foot: {
                                        fontStyle: "bold"
                                    }
                                }
                            };
                            return d[h];
                        }
                        o.getTheme = u;
                    },
                    903: function(a, o, s) {
                        Object.defineProperty(o, "__esModule", {
                            value: !0
                        }), o.parseCss = void 0;
                        var l = s(420);

                        function c(m, _, x, g, b) {
                            var w = {},
                                T = 1.3333333333333333,
                                E = h(_, function(H) {
                                    return b.getComputedStyle(H).backgroundColor;
                                });
                            E != null && (w.fillColor = E);
                            var L = h(_, function(H) {
                                return b.getComputedStyle(H).color;
                            });
                            L != null && (w.textColor = L);
                            var P = f(g, x);
                            P && (w.cellPadding = P);
                            var k = "borderTopColor",
                                A = T * x,
                                N = g.borderTopWidth;
                            if (g.borderBottomWidth === N && g.borderRightWidth === N && g.borderLeftWidth === N) {
                                var C = (parseFloat(N) || 0) / A;
                                C && (w.lineWidth = C);
                            } else w.lineWidth = {
                                top: (parseFloat(g.borderTopWidth) || 0) / A,
                                right: (parseFloat(g.borderRightWidth) || 0) / A,
                                bottom: (parseFloat(g.borderBottomWidth) || 0) / A,
                                left: (parseFloat(g.borderLeftWidth) || 0) / A
                            }, w.lineWidth.top || (w.lineWidth.right ? k = "borderRightColor" : w.lineWidth.bottom ? k = "borderBottomColor" : w.lineWidth.left && (k = "borderLeftColor"));
                            var F = h(_, function(H) {
                                return b.getComputedStyle(H)[k];
                            });
                            F != null && (w.lineColor = F);
                            var W = ["left", "right", "center", "justify"];
                            W.indexOf(g.textAlign) !== -1 && (w.halign = g.textAlign), W = ["middle", "bottom", "top"], W.indexOf(g.verticalAlign) !== -1 && (w.valign = g.verticalAlign);
                            var I = parseInt(g.fontSize || "");
                            isNaN(I) || (w.fontSize = I / T);
                            var U = u(g);
                            U && (w.fontStyle = U);
                            var le = (g.fontFamily || "").toLowerCase();
                            return m.indexOf(le) !== -1 && (w.font = le), w;
                        }
                        o.parseCss = c;

                        function u(m) {
                            var _ = "";
                            return (m.fontWeight === "bold" || m.fontWeight === "bolder" || parseInt(m.fontWeight) >= 700) && (_ = "bold"), (m.fontStyle === "italic" || m.fontStyle === "oblique") && (_ += "italic"), _;
                        }

                        function h(m, _) {
                            var x = d(m, _);
                            if (!x) return null;
                            var g = x.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);
                            if (!g || !Array.isArray(g)) return null;
                            var b = [parseInt(g[1]), parseInt(g[2]), parseInt(g[3])],
                                w = parseInt(g[4]);
                            return w === 0 || isNaN(b[0]) || isNaN(b[1]) || isNaN(b[2]) ? null : b;
                        }

                        function d(m, _) {
                            var x = _(m);
                            return x === "rgba(0, 0, 0, 0)" || x === "transparent" || x === "initial" || x === "inherit" ? m.parentElement == null ? null : d(m.parentElement, _) : x;
                        }

                        function f(m, _) {
                            var x = [m.paddingTop, m.paddingRight, m.paddingBottom, m.paddingLeft],
                                g = 96 / (72 / _),
                                b = (parseInt(m.lineHeight) - parseInt(m.fontSize)) / _ / 2,
                                w = x.map(function(E) {
                                    return parseInt(E || "0") / g;
                                }),
                                T = (0, l.parseSpacing)(w, 0);
                            return b > T.top && (T.top = b), b > T.bottom && (T.bottom = b), T;
                        }
                    },
                    744: function(a, o) {
                        Object.defineProperty(o, "__esModule", {
                            value: !0
                        }), o.DocHandler = void 0;
                        var s = {},
                            l = function() {
                                function c(u) {
                                    this.jsPDFDocument = u, this.userStyles = {
                                        textColor: u.getTextColor ? this.jsPDFDocument.getTextColor() : 0,
                                        fontSize: u.internal.getFontSize(),
                                        fontStyle: u.internal.getFont().fontStyle,
                                        font: u.internal.getFont().fontName,
                                        lineWidth: u.getLineWidth ? this.jsPDFDocument.getLineWidth() : 0,
                                        lineColor: u.getDrawColor ? this.jsPDFDocument.getDrawColor() : 0
                                    };
                                }
                                return c.setDefaults = function(u, h) {
                                    h === void 0 && (h = null), h ? h.__autoTableDocumentDefaults = u : s = u;
                                }, c.unifyColor = function(u) {
                                    return Array.isArray(u) ? u : typeof u == "number" ? [u, u, u] : typeof u == "string" ? [u] : null;
                                }, c.prototype.applyStyles = function(u, h) {
                                    var d, f, m;
                                    h === void 0 && (h = !1), u.fontStyle && this.jsPDFDocument.setFontStyle && this.jsPDFDocument.setFontStyle(u.fontStyle);
                                    var _ = this.jsPDFDocument.internal.getFont(),
                                        x = _.fontStyle,
                                        g = _.fontName;
                                    if (u.font && (g = u.font), u.fontStyle) {
                                        x = u.fontStyle;
                                        var b = this.getFontList()[g];
                                        b && b.indexOf(x) === -1 && (this.jsPDFDocument.setFontStyle && this.jsPDFDocument.setFontStyle(b[0]), x = b[0]);
                                    }
                                    if (this.jsPDFDocument.setFont(g, x), u.fontSize && this.jsPDFDocument.setFontSize(u.fontSize), !h) {
                                        var w = c.unifyColor(u.fillColor);
                                        w && (d = this.jsPDFDocument).setFillColor.apply(d, w), w = c.unifyColor(u.textColor), w && (f = this.jsPDFDocument).setTextColor.apply(f, w), w = c.unifyColor(u.lineColor), w && (m = this.jsPDFDocument).setDrawColor.apply(m, w), typeof u.lineWidth == "number" && this.jsPDFDocument.setLineWidth(u.lineWidth);
                                    }
                                }, c.prototype.splitTextToSize = function(u, h, d) {
                                    return this.jsPDFDocument.splitTextToSize(u, h, d);
                                }, c.prototype.rect = function(u, h, d, f, m) {
                                    return this.jsPDFDocument.rect(u, h, d, f, m);
                                }, c.prototype.getLastAutoTable = function() {
                                    return this.jsPDFDocument.lastAutoTable || null;
                                }, c.prototype.getTextWidth = function(u) {
                                    return this.jsPDFDocument.getTextWidth(u);
                                }, c.prototype.getDocument = function() {
                                    return this.jsPDFDocument;
                                }, c.prototype.setPage = function(u) {
                                    this.jsPDFDocument.setPage(u);
                                }, c.prototype.addPage = function() {
                                    return this.jsPDFDocument.addPage();
                                }, c.prototype.getFontList = function() {
                                    return this.jsPDFDocument.getFontList();
                                }, c.prototype.getGlobalOptions = function() {
                                    return s || {};
                                }, c.prototype.getDocumentOptions = function() {
                                    return this.jsPDFDocument.__autoTableDocumentDefaults || {};
                                }, c.prototype.pageSize = function() {
                                    var u = this.jsPDFDocument.internal.pageSize;
                                    return u.width == null && (u = {
                                        width: u.getWidth(),
                                        height: u.getHeight()
                                    }), u;
                                }, c.prototype.scaleFactor = function() {
                                    return this.jsPDFDocument.internal.scaleFactor;
                                }, c.prototype.getLineHeightFactor = function() {
                                    var u = this.jsPDFDocument;
                                    return u.getLineHeightFactor ? u.getLineHeightFactor() : 1.15;
                                }, c.prototype.getLineHeight = function(u) {
                                    return u / this.scaleFactor() * this.getLineHeightFactor();
                                }, c.prototype.pageNumber = function() {
                                    var u = this.jsPDFDocument.internal.getCurrentPageInfo();
                                    return u ? u.pageNumber : this.jsPDFDocument.internal.getNumberOfPages();
                                }, c;
                            }();
                        o.DocHandler = l;
                    },
                    4: function(a, o, s) {
                        Object.defineProperty(o, "__esModule", {
                            value: !0
                        }), o.parseHtml = void 0;
                        var l = s(903),
                            c = s(796);

                        function u(f, m, _, x, g) {
                            var b, w;
                            x === void 0 && (x = !1), g === void 0 && (g = !1);
                            var T;
                            typeof m == "string" ? T = _.document.querySelector(m) : T = m;
                            var E = Object.keys(f.getFontList()),
                                L = f.scaleFactor(),
                                P = [],
                                k = [],
                                A = [];
                            if (!T) return console.error("Html table could not be found with input: ", m), {
                                head: P,
                                body: k,
                                foot: A
                            };
                            for (var N = 0; N < T.rows.length; N++) {
                                var C = T.rows[N],
                                    F = (w = (b = C ? .parentElement) === null || b === void 0 ? void 0 : b.tagName) === null || w === void 0 ? void 0 : w.toLowerCase(),
                                    W = h(E, L, _, C, x, g);
                                W && (F === "thead" ? P.push(W) : F === "tfoot" ? A.push(W) : k.push(W));
                            }
                            return {
                                head: P,
                                body: k,
                                foot: A
                            };
                        }
                        o.parseHtml = u;

                        function h(f, m, _, x, g, b) {
                            for (var w = new c.HtmlRowInput(x), T = 0; T < x.cells.length; T++) {
                                var E = x.cells[T],
                                    L = _.getComputedStyle(E);
                                if (g || L.display !== "none") {
                                    var P = void 0;
                                    b && (P = (0, l.parseCss)(f, E, m, L, _)), w.push({
                                        rowSpan: E.rowSpan,
                                        colSpan: E.colSpan,
                                        styles: P,
                                        _element: E,
                                        content: d(E)
                                    });
                                }
                            }
                            var k = _.getComputedStyle(x);
                            if (w.length > 0 && (g || k.display !== "none")) return w;
                        }

                        function d(f) {
                            var m = f.cloneNode(!0);
                            return m.innerHTML = m.innerHTML.replace(/\n/g, "").replace(/ +/g, " "), m.innerHTML = m.innerHTML.split(/<br.*?>/).map(function(_) {
                                return _.trim();
                            }).join(`
`), m.innerText || m.textContent || "";
                        }
                    },
                    776: function(a, o, s) {
                        Object.defineProperty(o, "__esModule", {
                            value: !0
                        }), o.parseInput = void 0;
                        var l = s(4),
                            c = s(356),
                            u = s(420),
                            h = s(744),
                            d = s(792);

                        function f(T, E) {
                            var L = new h.DocHandler(T),
                                P = L.getDocumentOptions(),
                                k = L.getGlobalOptions();
                            (0, d.default)(L, k, P, E);
                            var A = (0, c.assign)({}, k, P, E),
                                N;
                            typeof window < "u" && (N = window);
                            var C = m(k, P, E),
                                F = _(k, P, E),
                                W = x(L, A),
                                I = b(L, A, N);
                            return {
                                id: E.tableId,
                                content: I,
                                hooks: F,
                                styles: C,
                                settings: W
                            };
                        }
                        o.parseInput = f;

                        function m(T, E, L) {
                            for (var P = {
                                    styles: {},
                                    headStyles: {},
                                    bodyStyles: {},
                                    footStyles: {},
                                    alternateRowStyles: {},
                                    columnStyles: {}
                                }, k = function(F) {
                                    if (F === "columnStyles") {
                                        var W = T[F],
                                            I = E[F],
                                            U = L[F];
                                        P.columnStyles = (0, c.assign)({}, W, I, U);
                                    } else {
                                        var le = [T, E, L],
                                            H = le.map(function(pe) {
                                                return pe[F] || {};
                                            });
                                        P[F] = (0, c.assign)({}, H[0], H[1], H[2]);
                                    }
                                }, A = 0, N = Object.keys(P); A < N.length; A++) {
                                var C = N[A];
                                k(C);
                            }
                            return P;
                        }

                        function _(T, E, L) {
                            for (var P = [T, E, L], k = {
                                    didParseCell: [],
                                    willDrawCell: [],
                                    didDrawCell: [],
                                    willDrawPage: [],
                                    didDrawPage: []
                                }, A = 0, N = P; A < N.length; A++) {
                                var C = N[A];
                                C.didParseCell && k.didParseCell.push(C.didParseCell), C.willDrawCell && k.willDrawCell.push(C.willDrawCell), C.didDrawCell && k.didDrawCell.push(C.didDrawCell), C.willDrawPage && k.willDrawPage.push(C.willDrawPage), C.didDrawPage && k.didDrawPage.push(C.didDrawPage);
                            }
                            return k;
                        }

                        function x(T, E) {
                            var L, P, k, A, N, C, F, W, I, U, le, H, pe = (0, u.parseSpacing)(E.margin, 40 / T.scaleFactor()),
                                _e = (L = g(T, E.startY)) !== null && L !== void 0 ? L : pe.top,
                                Fe;
                            E.showFoot === !0 ? Fe = "everyPage" : E.showFoot === !1 ? Fe = "never" : Fe = (P = E.showFoot) !== null && P !== void 0 ? P : "everyPage";
                            var Te;
                            E.showHead === !0 ? Te = "everyPage" : E.showHead === !1 ? Te = "never" : Te = (k = E.showHead) !== null && k !== void 0 ? k : "everyPage";
                            var O = (A = E.useCss) !== null && A !== void 0 ? A : !1,
                                j = E.theme || (O ? "plain" : "striped"),
                                X = !!E.horizontalPageBreak,
                                me = (N = E.horizontalPageBreakRepeat) !== null && N !== void 0 ? N : null;
                            return {
                                includeHiddenHtml: (C = E.includeHiddenHtml) !== null && C !== void 0 ? C : !1,
                                useCss: O,
                                theme: j,
                                startY: _e,
                                margin: pe,
                                pageBreak: (F = E.pageBreak) !== null && F !== void 0 ? F : "auto",
                                rowPageBreak: (W = E.rowPageBreak) !== null && W !== void 0 ? W : "auto",
                                tableWidth: (I = E.tableWidth) !== null && I !== void 0 ? I : "auto",
                                showHead: Te,
                                showFoot: Fe,
                                tableLineWidth: (U = E.tableLineWidth) !== null && U !== void 0 ? U : 0,
                                tableLineColor: (le = E.tableLineColor) !== null && le !== void 0 ? le : 200,
                                horizontalPageBreak: X,
                                horizontalPageBreakRepeat: me,
                                horizontalPageBreakBehaviour: (H = E.horizontalPageBreakBehaviour) !== null && H !== void 0 ? H : "afterAllRows"
                            };
                        }

                        function g(T, E) {
                            var L = T.getLastAutoTable(),
                                P = T.scaleFactor(),
                                k = T.pageNumber(),
                                A = !1;
                            if (L && L.startPageNumber) {
                                var N = L.startPageNumber + L.pageNumber - 1;
                                A = N === k;
                            }
                            return typeof E == "number" ? E : (E == null || E === !1) && A && L ? .finalY != null ? L.finalY + 20 / P : null;
                        }

                        function b(T, E, L) {
                            var P = E.head || [],
                                k = E.body || [],
                                A = E.foot || [];
                            if (E.html) {
                                var N = E.includeHiddenHtml;
                                if (L) {
                                    var C = (0, l.parseHtml)(T, E.html, L, N, E.useCss) || {};
                                    P = C.head || P, k = C.body || P, A = C.foot || P;
                                } else console.error("Cannot parse html in non browser environment");
                            }
                            var F = E.columns || w(P, k, A);
                            return {
                                columns: F,
                                head: P,
                                body: k,
                                foot: A
                            };
                        }

                        function w(T, E, L) {
                            var P = T[0] || E[0] || L[0] || [],
                                k = [];
                            return Object.keys(P).filter(function(A) {
                                return A !== "_element";
                            }).forEach(function(A) {
                                var N = 1,
                                    C;
                                Array.isArray(P) ? C = P[parseInt(A)] : C = P[A], typeof C == "object" && !Array.isArray(C) && (N = C ? .colSpan || 1);
                                for (var F = 0; F < N; F++) {
                                    var W = void 0;
                                    Array.isArray(P) ? W = k.length : W = A + (F > 0 ? "_".concat(F) : "");
                                    var I = {
                                        dataKey: W
                                    };
                                    k.push(I);
                                }
                            }), k;
                        }
                    },
                    792: function(a, o) {
                        Object.defineProperty(o, "__esModule", {
                            value: !0
                        });

                        function s(c, u, h, d) {
                            for (var f = function(g) {
                                    g && typeof g != "object" && console.error("The options parameter should be of type object, is: " + typeof g), typeof g.extendWidth < "u" && (g.tableWidth = g.extendWidth ? "auto" : "wrap", console.error("Use of deprecated option: extendWidth, use tableWidth instead.")), typeof g.margins < "u" && (typeof g.margin > "u" && (g.margin = g.margins), console.error("Use of deprecated option: margins, use margin instead.")), g.startY && typeof g.startY != "number" && (console.error("Invalid value for startY option", g.startY), delete g.startY), !g.didDrawPage && (g.afterPageContent || g.beforePageContent || g.afterPageAdd) && (console.error("The afterPageContent, beforePageContent and afterPageAdd hooks are deprecated. Use didDrawPage instead"), g.didDrawPage = function(A) {
                                        c.applyStyles(c.userStyles), g.beforePageContent && g.beforePageContent(A), c.applyStyles(c.userStyles), g.afterPageContent && g.afterPageContent(A), c.applyStyles(c.userStyles), g.afterPageAdd && A.pageNumber > 1 && A.afterPageAdd(A), c.applyStyles(c.userStyles);
                                    }), ["createdHeaderCell", "drawHeaderRow", "drawRow", "drawHeaderCell"].forEach(function(A) {
                                        g[A] && console.error('The "'.concat(A, '" hook has changed in version 3.0, check the changelog for how to migrate.'));
                                    }), [
                                        ["showFoot", "showFooter"],
                                        ["showHead", "showHeader"],
                                        ["didDrawPage", "addPageContent"],
                                        ["didParseCell", "createdCell"],
                                        ["headStyles", "headerStyles"]
                                    ].forEach(function(A) {
                                        var N = A[0],
                                            C = A[1];
                                        g[C] && (console.error("Use of deprecated option ".concat(C, ". Use ").concat(N, " instead")), g[N] = g[C]);
                                    }), [
                                        ["padding", "cellPadding"],
                                        ["lineHeight", "rowHeight"], "fontSize", "overflow"
                                    ].forEach(function(A) {
                                        var N = typeof A == "string" ? A : A[0],
                                            C = typeof A == "string" ? A : A[1];
                                        typeof g[N] < "u" && (typeof g.styles[C] > "u" && (g.styles[C] = g[N]), console.error("Use of deprecated option: " + N + ", use the style " + C + " instead."));
                                    });
                                    for (var b = 0, w = ["styles", "bodyStyles", "headStyles", "footStyles"]; b < w.length; b++) {
                                        var T = w[b];
                                        l(g[T] || {});
                                    }
                                    for (var E = g.columnStyles || {}, L = 0, P = Object.keys(E); L < P.length; L++) {
                                        var k = P[L];
                                        l(E[k] || {});
                                    }
                                }, m = 0, _ = [u, h, d]; m < _.length; m++) {
                                var x = _[m];
                                f(x);
                            }
                        }
                        o.default = s;

                        function l(c) {
                            c.rowHeight ? (console.error("Use of deprecated style rowHeight. It is renamed to minCellHeight."), c.minCellHeight || (c.minCellHeight = c.rowHeight)) : c.columnWidth && (console.error("Use of deprecated style columnWidth. It is renamed to cellWidth."), c.cellWidth || (c.cellWidth = c.columnWidth));
                        }
                    },
                    260: function(a, o, s) {
                        Object.defineProperty(o, "__esModule", {
                            value: !0
                        }), o.Column = o.Cell = o.Row = o.Table = void 0;
                        var l = s(796),
                            c = s(172),
                            u = s(420),
                            h = function() {
                                function _(x, g) {
                                    this.pageNumber = 1, this.pageCount = 1, this.id = x.id, this.settings = x.settings, this.styles = x.styles, this.hooks = x.hooks, this.columns = g.columns, this.head = g.head, this.body = g.body, this.foot = g.foot;
                                }
                                return _.prototype.getHeadHeight = function(x) {
                                    return this.head.reduce(function(g, b) {
                                        return g + b.getMaxCellHeight(x);
                                    }, 0);
                                }, _.prototype.getFootHeight = function(x) {
                                    return this.foot.reduce(function(g, b) {
                                        return g + b.getMaxCellHeight(x);
                                    }, 0);
                                }, _.prototype.allRows = function() {
                                    return this.head.concat(this.body).concat(this.foot);
                                }, _.prototype.callCellHooks = function(x, g, b, w, T, E) {
                                    for (var L = 0, P = g; L < P.length; L++) {
                                        var k = P[L],
                                            A = new c.CellHookData(x, this, b, w, T, E),
                                            N = k(A) === !1;
                                        if (b.text = Array.isArray(b.text) ? b.text : [b.text], N) return !1;
                                    }
                                    return !0;
                                }, _.prototype.callEndPageHooks = function(x, g) {
                                    x.applyStyles(x.userStyles);
                                    for (var b = 0, w = this.hooks.didDrawPage; b < w.length; b++) {
                                        var T = w[b];
                                        T(new c.HookData(x, this, g));
                                    }
                                }, _.prototype.callWillDrawPageHooks = function(x, g) {
                                    for (var b = 0, w = this.hooks.willDrawPage; b < w.length; b++) {
                                        var T = w[b];
                                        T(new c.HookData(x, this, g));
                                    }
                                }, _.prototype.getWidth = function(x) {
                                    if (typeof this.settings.tableWidth == "number") return this.settings.tableWidth;
                                    if (this.settings.tableWidth === "wrap") {
                                        var g = this.columns.reduce(function(w, T) {
                                            return w + T.wrappedWidth;
                                        }, 0);
                                        return g;
                                    } else {
                                        var b = this.settings.margin;
                                        return x - b.left - b.right;
                                    }
                                }, _;
                            }();
                        o.Table = h;
                        var d = function() {
                            function _(x, g, b, w, T) {
                                T === void 0 && (T = !1), this.height = 0, this.raw = x, x instanceof l.HtmlRowInput && (this.raw = x._element, this.element = x._element), this.index = g, this.section = b, this.cells = w, this.spansMultiplePages = T;
                            }
                            return _.prototype.getMaxCellHeight = function(x) {
                                var g = this;
                                return x.reduce(function(b, w) {
                                    var T;
                                    return Math.max(b, ((T = g.cells[w.index]) === null || T === void 0 ? void 0 : T.height) || 0);
                                }, 0);
                            }, _.prototype.hasRowSpan = function(x) {
                                var g = this;
                                return x.filter(function(b) {
                                    var w = g.cells[b.index];
                                    return w ? w.rowSpan > 1 : !1;
                                }).length > 0;
                            }, _.prototype.canEntireRowFit = function(x, g) {
                                return this.getMaxCellHeight(g) <= x;
                            }, _.prototype.getMinimumRowHeight = function(x, g) {
                                var b = this;
                                return x.reduce(function(w, T) {
                                    var E = b.cells[T.index];
                                    if (!E) return 0;
                                    var L = g.getLineHeight(E.styles.fontSize),
                                        P = E.padding("vertical"),
                                        k = P + L;
                                    return k > w ? k : w;
                                }, 0);
                            }, _;
                        }();
                        o.Row = d;
                        var f = function() {
                            function _(x, g, b) {
                                var w, T;
                                this.contentHeight = 0, this.contentWidth = 0, this.wrappedWidth = 0, this.minReadableWidth = 0, this.minWidth = 0, this.width = 0, this.height = 0, this.x = 0, this.y = 0, this.styles = g, this.section = b, this.raw = x;
                                var E = x;
                                x != null && typeof x == "object" && !Array.isArray(x) ? (this.rowSpan = x.rowSpan || 1, this.colSpan = x.colSpan || 1, E = (T = (w = x.content) !== null && w !== void 0 ? w : x.title) !== null && T !== void 0 ? T : x, x._element && (this.raw = x._element)) : (this.rowSpan = 1, this.colSpan = 1);
                                var L = E != null ? "" + E : "",
                                    P = /\r\n|\r|\n/g;
                                this.text = L.split(P);
                            }
                            return _.prototype.getTextPos = function() {
                                var x;
                                if (this.styles.valign === "top") x = this.y + this.padding("top");
                                else if (this.styles.valign === "bottom") x = this.y + this.height - this.padding("bottom");
                                else {
                                    var g = this.height - this.padding("vertical");
                                    x = this.y + g / 2 + this.padding("top");
                                }
                                var b;
                                if (this.styles.halign === "right") b = this.x + this.width - this.padding("right");
                                else if (this.styles.halign === "center") {
                                    var w = this.width - this.padding("horizontal");
                                    b = this.x + w / 2 + this.padding("left");
                                } else b = this.x + this.padding("left");
                                return {
                                    x: b,
                                    y: x
                                };
                            }, _.prototype.getContentHeight = function(x, g) {
                                g === void 0 && (g = 1.15);
                                var b = Array.isArray(this.text) ? this.text.length : 1,
                                    w = this.styles.fontSize / x * g,
                                    T = b * w + this.padding("vertical");
                                return Math.max(T, this.styles.minCellHeight);
                            }, _.prototype.padding = function(x) {
                                var g = (0, u.parseSpacing)(this.styles.cellPadding, 0);
                                return x === "vertical" ? g.top + g.bottom : x === "horizontal" ? g.left + g.right : g[x];
                            }, _;
                        }();
                        o.Cell = f;
                        var m = function() {
                            function _(x, g, b) {
                                this.wrappedWidth = 0, this.minReadableWidth = 0, this.minWidth = 0, this.width = 0, this.dataKey = x, this.raw = g, this.index = b;
                            }
                            return _.prototype.getMaxCustomCellWidth = function(x) {
                                for (var g = 0, b = 0, w = x.allRows(); b < w.length; b++) {
                                    var T = w[b],
                                        E = T.cells[this.index];
                                    E && typeof E.styles.cellWidth == "number" && (g = Math.max(g, E.styles.cellWidth));
                                }
                                return g;
                            }, _;
                        }();
                        o.Column = m;
                    },
                    356: function(a, o) {
                        Object.defineProperty(o, "__esModule", {
                            value: !0
                        }), o.assign = void 0;

                        function s(l, c, u, h, d) {
                            if (l == null) throw new TypeError("Cannot convert undefined or null to object");
                            for (var f = Object(l), m = 1; m < arguments.length; m++) {
                                var _ = arguments[m];
                                if (_ != null)
                                    for (var x in _) Object.prototype.hasOwnProperty.call(_, x) && (f[x] = _[x]);
                            }
                            return f;
                        }
                        o.assign = s;
                    },
                    972: function(a, o, s) {
                        Object.defineProperty(o, "__esModule", {
                            value: !0
                        }), o.createTable = void 0;
                        var l = s(744),
                            c = s(260),
                            u = s(324),
                            h = s(796),
                            d = s(356);

                        function f(T, E) {
                            var L = new l.DocHandler(T),
                                P = m(E, L.scaleFactor()),
                                k = new c.Table(E, P);
                            return (0, u.calculateWidths)(L, k), L.applyStyles(L.userStyles), k;
                        }
                        o.createTable = f;

                        function m(T, E) {
                            var L = T.content,
                                P = b(L.columns);
                            if (L.head.length === 0) {
                                var k = x(P, "head");
                                k && L.head.push(k);
                            }
                            if (L.foot.length === 0) {
                                var k = x(P, "foot");
                                k && L.foot.push(k);
                            }
                            var A = T.settings.theme,
                                N = T.styles;
                            return {
                                columns: P,
                                head: _("head", L.head, P, N, A, E),
                                body: _("body", L.body, P, N, A, E),
                                foot: _("foot", L.foot, P, N, A, E)
                            };
                        }

                        function _(T, E, L, P, k, A) {
                            var N = {},
                                C = E.map(function(F, W) {
                                    for (var I = 0, U = {}, le = 0, H = 0, pe = 0, _e = L; pe < _e.length; pe++) {
                                        var Fe = _e[pe];
                                        if (N[Fe.index] == null || N[Fe.index].left === 0) {
                                            if (H === 0) {
                                                var Te = void 0;
                                                Array.isArray(F) ? Te = F[Fe.index - le - I] : Te = F[Fe.dataKey];
                                                var O = {};
                                                typeof Te == "object" && !Array.isArray(Te) && (O = Te ? .styles || {});
                                                var j = w(T, Fe, W, k, P, A, O),
                                                    X = new c.Cell(Te, j, T);
                                                U[Fe.dataKey] = X, U[Fe.index] = X, H = X.colSpan - 1, N[Fe.index] = {
                                                    left: X.rowSpan - 1,
                                                    times: H
                                                };
                                            } else H--, le++;
                                        } else N[Fe.index].left--, H = N[Fe.index].times, I++;
                                    }
                                    return new c.Row(F, W, T, U);
                                });
                            return C;
                        }

                        function x(T, E) {
                            var L = {};
                            return T.forEach(function(P) {
                                if (P.raw != null) {
                                    var k = g(E, P.raw);
                                    k != null && (L[P.dataKey] = k);
                                }
                            }), Object.keys(L).length > 0 ? L : null;
                        }

                        function g(T, E) {
                            if (T === "head") {
                                if (typeof E == "object") return E.header || E.title || null;
                                if (typeof E == "string" || typeof E == "number") return E;
                            } else if (T === "foot" && typeof E == "object") return E.footer;
                            return null;
                        }

                        function b(T) {
                            return T.map(function(E, L) {
                                var P, k, A;
                                return typeof E == "object" ? A = (k = (P = E.dataKey) !== null && P !== void 0 ? P : E.key) !== null && k !== void 0 ? k : L : A = L, new c.Column(A, E, L);
                            });
                        }

                        function w(T, E, L, P, k, A, N) {
                            var C = (0, h.getTheme)(P),
                                F;
                            T === "head" ? F = k.headStyles : T === "body" ? F = k.bodyStyles : T === "foot" && (F = k.footStyles);
                            var W = (0, d.assign)({}, C.table, C[T], k.styles, F),
                                I = k.columnStyles[E.dataKey] || k.columnStyles[E.index] || {},
                                U = T === "body" ? I : {},
                                le = T === "body" && L % 2 === 0 ? (0, d.assign)({}, C.alternateRow, k.alternateRowStyles) : {},
                                H = (0, h.defaultStyles)(A),
                                pe = (0, d.assign)({}, H, W, le, U);
                            return (0, d.assign)(pe, N);
                        }
                    },
                    664: function(a, o, s) {
                        Object.defineProperty(o, "__esModule", {
                            value: !0
                        }), o.addPage = o.drawTable = void 0;
                        var l = s(420),
                            c = s(260),
                            u = s(744),
                            h = s(356),
                            d = s(136),
                            f = s(224);

                        function m(I, U) {
                            var le = U.settings,
                                H = le.startY,
                                pe = le.margin,
                                _e = {
                                    x: pe.left,
                                    y: H
                                },
                                Fe = U.getHeadHeight(U.columns) + U.getFootHeight(U.columns),
                                Te = H + pe.bottom + Fe;
                            if (le.pageBreak === "avoid") {
                                var O = U.body,
                                    j = O.reduce(function(xe, be) {
                                        return xe + be.height;
                                    }, 0);
                                Te += j;
                            }
                            var X = new u.DocHandler(I);
                            (le.pageBreak === "always" || le.startY != null && Te > X.pageSize().height) && (W(X), _e.y = pe.top), U.callWillDrawPageHooks(X, _e);
                            var me = (0, h.assign)({}, _e);
                            U.startPageNumber = X.pageNumber(), le.horizontalPageBreak ? _(X, U, me, _e) : (X.applyStyles(X.userStyles), (le.showHead === "firstPage" || le.showHead === "everyPage") && U.head.forEach(function(xe) {
                                return k(X, U, xe, _e, U.columns);
                            }), X.applyStyles(X.userStyles), U.body.forEach(function(xe, be) {
                                var B = be === U.body.length - 1;
                                P(X, U, xe, B, me, _e, U.columns);
                            }), X.applyStyles(X.userStyles), (le.showFoot === "lastPage" || le.showFoot === "everyPage") && U.foot.forEach(function(xe) {
                                return k(X, U, xe, _e, U.columns);
                            })), (0, l.addTableBorder)(X, U, me, _e), U.callEndPageHooks(X, _e), U.finalY = _e.y, I.lastAutoTable = U, I.previousAutoTable = U, I.autoTable && (I.autoTable.previous = U), X.applyStyles(X.userStyles);
                        }
                        o.drawTable = m;

                        function _(I, U, le, H) {
                            var pe = (0, f.calculateAllColumnsCanFitInPage)(I, U),
                                _e = U.settings;
                            if (_e.horizontalPageBreakBehaviour === "afterAllRows") pe.forEach(function(j, X) {
                                I.applyStyles(I.userStyles), X > 0 ? F(I, U, le, H, j.columns, !0) : x(I, U, H, j.columns), g(I, U, le, H, j.columns), w(I, U, H, j.columns);
                            });
                            else
                                for (var Fe = -1, Te = pe[0], O = function() {
                                        var j = Fe;
                                        if (Te) {
                                            I.applyStyles(I.userStyles);
                                            var X = Te.columns;
                                            Fe >= 0 ? F(I, U, le, H, X, !0) : x(I, U, H, X), j = b(I, U, Fe + 1, H, X), w(I, U, H, X);
                                        }
                                        var me = j - Fe;
                                        pe.slice(1).forEach(function(xe) {
                                            I.applyStyles(I.userStyles), F(I, U, le, H, xe.columns, !0), b(I, U, Fe + 1, H, xe.columns, me), w(I, U, H, xe.columns);
                                        }), Fe = j;
                                    }; Fe < U.body.length - 1;) O();
                        }

                        function x(I, U, le, H) {
                            var pe = U.settings;
                            I.applyStyles(I.userStyles), (pe.showHead === "firstPage" || pe.showHead === "everyPage") && U.head.forEach(function(_e) {
                                return k(I, U, _e, le, H);
                            });
                        }

                        function g(I, U, le, H, pe) {
                            I.applyStyles(I.userStyles), U.body.forEach(function(_e, Fe) {
                                var Te = Fe === U.body.length - 1;
                                P(I, U, _e, Te, le, H, pe);
                            });
                        }

                        function b(I, U, le, H, pe, _e) {
                            I.applyStyles(I.userStyles), _e = _e ? ? U.body.length;
                            var Fe = Math.min(le + _e, U.body.length),
                                Te = -1;
                            return U.body.slice(le, Fe).forEach(function(O, j) {
                                var X = le + j === U.body.length - 1,
                                    me = C(I, U, X, H);
                                O.canEntireRowFit(me, pe) && (k(I, U, O, H, pe), Te = le + j);
                            }), Te;
                        }

                        function w(I, U, le, H) {
                            var pe = U.settings;
                            I.applyStyles(I.userStyles), (pe.showFoot === "lastPage" || pe.showFoot === "everyPage") && U.foot.forEach(function(_e) {
                                return k(I, U, _e, le, H);
                            });
                        }

                        function T(I, U, le) {
                            var H = le.getLineHeight(I.styles.fontSize),
                                pe = I.padding("vertical"),
                                _e = Math.floor((U - pe) / H);
                            return Math.max(0, _e);
                        }

                        function E(I, U, le, H) {
                            var pe = {};
                            I.spansMultiplePages = !0, I.height = 0;
                            for (var _e = 0, Fe = 0, Te = le.columns; Fe < Te.length; Fe++) {
                                var O = Te[Fe],
                                    j = I.cells[O.index];
                                if (j) {
                                    Array.isArray(j.text) || (j.text = [j.text]);
                                    var X = new c.Cell(j.raw, j.styles, j.section);
                                    X = (0, h.assign)(X, j), X.text = [];
                                    var me = T(j, U, H);
                                    j.text.length > me && (X.text = j.text.splice(me, j.text.length));
                                    var xe = H.scaleFactor(),
                                        be = H.getLineHeightFactor();
                                    j.contentHeight = j.getContentHeight(xe, be), j.contentHeight >= U && (j.contentHeight = U, X.styles.minCellHeight -= U), j.contentHeight > I.height && (I.height = j.contentHeight), X.contentHeight = X.getContentHeight(xe, be), X.contentHeight > _e && (_e = X.contentHeight), pe[O.index] = X;
                                }
                            }
                            var B = new c.Row(I.raw, -1, I.section, pe, !0);
                            B.height = _e;
                            for (var ne = 0, Z = le.columns; ne < Z.length; ne++) {
                                var O = Z[ne],
                                    X = B.cells[O.index];
                                X && (X.height = B.height);
                                var j = I.cells[O.index];
                                j && (j.height = I.height);
                            }
                            return B;
                        }

                        function L(I, U, le, H) {
                            var pe = I.pageSize().height,
                                _e = H.settings.margin,
                                Fe = _e.top + _e.bottom,
                                Te = pe - Fe;
                            U.section === "body" && (Te -= H.getHeadHeight(H.columns) + H.getFootHeight(H.columns));
                            var O = U.getMinimumRowHeight(H.columns, I),
                                j = O < le;
                            if (O > Te) return console.error("Will not be able to print row ".concat(U.index, " correctly since it's minimum height is larger than page height")), !0;
                            if (!j) return !1;
                            var X = U.hasRowSpan(H.columns),
                                me = U.getMaxCellHeight(H.columns) > Te;
                            return me ? (X && console.error("The content of row ".concat(U.index, " will not be drawn correctly since drawing rows with a height larger than the page height and has cells with rowspans is not supported.")), !0) : !(X || H.settings.rowPageBreak === "avoid");
                        }

                        function P(I, U, le, H, pe, _e, Fe) {
                            var Te = C(I, U, H, _e);
                            if (le.canEntireRowFit(Te, Fe)) k(I, U, le, _e, Fe);
                            else if (L(I, le, Te, U)) {
                                var O = E(le, Te, U, I);
                                k(I, U, le, _e, Fe), F(I, U, pe, _e, Fe), P(I, U, O, H, pe, _e, Fe);
                            } else F(I, U, pe, _e, Fe), P(I, U, le, H, pe, _e, Fe);
                        }

                        function k(I, U, le, H, pe) {
                            H.x = U.settings.margin.left;
                            for (var _e = 0, Fe = pe; _e < Fe.length; _e++) {
                                var Te = Fe[_e],
                                    O = le.cells[Te.index];
                                if (!O) {
                                    H.x += Te.width;
                                    continue;
                                }
                                I.applyStyles(O.styles), O.x = H.x, O.y = H.y;
                                var j = U.callCellHooks(I, U.hooks.willDrawCell, O, le, Te, H);
                                if (j === !1) {
                                    H.x += Te.width;
                                    continue;
                                }
                                A(I, O, H);
                                var X = O.getTextPos();
                                (0, d.default)(O.text, X.x, X.y, {
                                    halign: O.styles.halign,
                                    valign: O.styles.valign,
                                    maxWidth: Math.ceil(O.width - O.padding("left") - O.padding("right"))
                                }, I.getDocument()), U.callCellHooks(I, U.hooks.didDrawCell, O, le, Te, H), H.x += Te.width;
                            }
                            H.y += le.height;
                        }

                        function A(I, U, le) {
                            var H = U.styles;
                            if (I.getDocument().setFillColor(I.getDocument().getFillColor()), typeof H.lineWidth == "number") {
                                var pe = (0, l.getFillStyle)(H.lineWidth, H.fillColor);
                                pe && I.rect(U.x, le.y, U.width, U.height, pe);
                            } else typeof H.lineWidth == "object" && (H.fillColor && I.rect(U.x, le.y, U.width, U.height, "F"), N(I, U, le, H.lineWidth));
                        }

                        function N(I, U, le, H) {
                            var pe, _e, Fe, Te;
                            H.top && (pe = le.x, _e = le.y, Fe = le.x + U.width, Te = le.y, H.right && (Fe += .5 * H.right), H.left && (pe -= .5 * H.left), O(H.top, pe, _e, Fe, Te)), H.bottom && (pe = le.x, _e = le.y + U.height, Fe = le.x + U.width, Te = le.y + U.height, H.right && (Fe += .5 * H.right), H.left && (pe -= .5 * H.left), O(H.bottom, pe, _e, Fe, Te)), H.left && (pe = le.x, _e = le.y, Fe = le.x, Te = le.y + U.height, H.top && (_e -= .5 * H.top), H.bottom && (Te += .5 * H.bottom), O(H.left, pe, _e, Fe, Te)), H.right && (pe = le.x + U.width, _e = le.y, Fe = le.x + U.width, Te = le.y + U.height, H.top && (_e -= .5 * H.top), H.bottom && (Te += .5 * H.bottom), O(H.right, pe, _e, Fe, Te));

                            function O(j, X, me, xe, be) {
                                I.getDocument().setLineWidth(j), I.getDocument().line(X, me, xe, be, "S");
                            }
                        }

                        function C(I, U, le, H) {
                            var pe = U.settings.margin.bottom,
                                _e = U.settings.showFoot;
                            return (_e === "everyPage" || _e === "lastPage" && le) && (pe += U.getFootHeight(U.columns)), I.pageSize().height - H.y - pe;
                        }

                        function F(I, U, le, H, pe, _e) {
                            pe === void 0 && (pe = []), _e === void 0 && (_e = !1), I.applyStyles(I.userStyles), U.settings.showFoot === "everyPage" && !_e && U.foot.forEach(function(Te) {
                                return k(I, U, Te, H, pe);
                            }), U.callEndPageHooks(I, H);
                            var Fe = U.settings.margin;
                            (0, l.addTableBorder)(I, U, le, H), W(I), U.pageNumber++, U.pageCount++, H.x = Fe.left, H.y = Fe.top, le.y = Fe.top, U.callWillDrawPageHooks(I, H), U.settings.showHead === "everyPage" && (U.head.forEach(function(Te) {
                                return k(I, U, Te, H, pe);
                            }), I.applyStyles(I.userStyles));
                        }
                        o.addPage = F;

                        function W(I) {
                            var U = I.pageNumber();
                            I.setPage(U + 1);
                            var le = I.pageNumber();
                            return le === U ? (I.addPage(), !0) : !1;
                        }
                    },
                    224: function(a, o, s) {
                        Object.defineProperty(o, "__esModule", {
                            value: !0
                        }), o.calculateAllColumnsCanFitInPage = void 0;
                        var l = s(420);

                        function c(h, d, f) {
                            var m;
                            f === void 0 && (f = {});
                            var _ = (0, l.getPageAvailableWidth)(h, d),
                                x = new Map(),
                                g = [],
                                b = [],
                                w = [];
                            d.settings.horizontalPageBreakRepeat, Array.isArray(d.settings.horizontalPageBreakRepeat) ? w = d.settings.horizontalPageBreakRepeat : (typeof d.settings.horizontalPageBreakRepeat == "string" || typeof d.settings.horizontalPageBreakRepeat == "number") && (w = [d.settings.horizontalPageBreakRepeat]), w.forEach(function(P) {
                                var k = d.columns.find(function(A) {
                                    return A.dataKey === P || A.index === P;
                                });
                                k && !x.has(k.index) && (x.set(k.index, !0), g.push(k.index), b.push(d.columns[k.index]), _ -= k.wrappedWidth);
                            });
                            for (var T = !0, E = (m = f ? .start) !== null && m !== void 0 ? m : 0; E < d.columns.length;) {
                                if (x.has(E)) {
                                    E++;
                                    continue;
                                }
                                var L = d.columns[E].wrappedWidth;
                                if (T || _ >= L) T = !1, g.push(E), b.push(d.columns[E]), _ -= L;
                                else break;
                                E++;
                            }
                            return {
                                colIndexes: g,
                                columns: b,
                                lastIndex: E - 1
                            };
                        }

                        function u(h, d) {
                            for (var f = [], m = 0; m < d.columns.length; m++) {
                                var _ = c(h, d, {
                                    start: m
                                });
                                _.columns.length && (f.push(_), m = _.lastIndex);
                            }
                            return f;
                        }
                        o.calculateAllColumnsCanFitInPage = u;
                    },
                    324: function(a, o, s) {
                        Object.defineProperty(o, "__esModule", {
                            value: !0
                        }), o.ellipsize = o.resizeColumns = o.calculateWidths = void 0;
                        var l = s(420);

                        function c(g, b) {
                            u(g, b);
                            var w = [],
                                T = 0;
                            b.columns.forEach(function(L) {
                                var P = L.getMaxCustomCellWidth(b);
                                P ? L.width = P : (L.width = L.wrappedWidth, w.push(L)), T += L.width;
                            });
                            var E = b.getWidth(g.pageSize().width) - T;
                            E && (E = h(w, E, function(L) {
                                return Math.max(L.minReadableWidth, L.minWidth);
                            })), E && (E = h(w, E, function(L) {
                                return L.minWidth;
                            })), E = Math.abs(E), !b.settings.horizontalPageBreak && E > .1 / g.scaleFactor() && (E = E < 1 ? E : Math.round(E), console.warn("Of the table content, ".concat(E, " units width could not fit page"))), f(b), m(b, g), d(b);
                        }
                        o.calculateWidths = c;

                        function u(g, b) {
                            var w = g.scaleFactor(),
                                T = b.settings.horizontalPageBreak,
                                E = (0, l.getPageAvailableWidth)(g, b);
                            b.allRows().forEach(function(L) {
                                for (var P = 0, k = b.columns; P < k.length; P++) {
                                    var A = k[P],
                                        N = L.cells[A.index];
                                    if (N) {
                                        var C = b.hooks.didParseCell;
                                        b.callCellHooks(g, C, N, L, A, null);
                                        var F = N.padding("horizontal");
                                        N.contentWidth = (0, l.getStringWidth)(N.text, N.styles, g) + F;
                                        var W = (0, l.getStringWidth)(N.text.join(" ").split(/[^\S\u00A0]+/), N.styles, g);
                                        if (N.minReadableWidth = W + N.padding("horizontal"), typeof N.styles.cellWidth == "number") N.minWidth = N.styles.cellWidth, N.wrappedWidth = N.styles.cellWidth;
                                        else if (N.styles.cellWidth === "wrap" || T === !0) N.contentWidth > E ? (N.minWidth = E, N.wrappedWidth = E) : (N.minWidth = N.contentWidth, N.wrappedWidth = N.contentWidth);
                                        else {
                                            var I = 10 / w;
                                            N.minWidth = N.styles.minCellWidth || I, N.wrappedWidth = N.contentWidth, N.minWidth > N.wrappedWidth && (N.wrappedWidth = N.minWidth);
                                        }
                                    }
                                }
                            }), b.allRows().forEach(function(L) {
                                for (var P = 0, k = b.columns; P < k.length; P++) {
                                    var A = k[P],
                                        N = L.cells[A.index];
                                    if (N && N.colSpan === 1) A.wrappedWidth = Math.max(A.wrappedWidth, N.wrappedWidth), A.minWidth = Math.max(A.minWidth, N.minWidth), A.minReadableWidth = Math.max(A.minReadableWidth, N.minReadableWidth);
                                    else {
                                        var C = b.styles.columnStyles[A.dataKey] || b.styles.columnStyles[A.index] || {},
                                            F = C.cellWidth || C.minCellWidth;
                                        F && typeof F == "number" && (A.minWidth = F, A.wrappedWidth = F);
                                    }
                                    N && (N.colSpan > 1 && !A.minWidth && (A.minWidth = N.minWidth), N.colSpan > 1 && !A.wrappedWidth && (A.wrappedWidth = N.minWidth));
                                }
                            });
                        }

                        function h(g, b, w) {
                            for (var T = b, E = g.reduce(function(I, U) {
                                    return I + U.wrappedWidth;
                                }, 0), L = 0; L < g.length; L++) {
                                var P = g[L],
                                    k = P.wrappedWidth / E,
                                    A = T * k,
                                    N = P.width + A,
                                    C = w(P),
                                    F = N < C ? C : N;
                                b -= F - P.width, P.width = F;
                            }
                            if (b = Math.round(b * 1e10) / 1e10, b) {
                                var W = g.filter(function(I) {
                                    return b < 0 ? I.width > w(I) : !0;
                                });
                                W.length && (b = h(W, b, w));
                            }
                            return b;
                        }
                        o.resizeColumns = h;

                        function d(g) {
                            for (var b = {}, w = 1, T = g.allRows(), E = 0; E < T.length; E++)
                                for (var L = T[E], P = 0, k = g.columns; P < k.length; P++) {
                                    var A = k[P],
                                        N = b[A.index];
                                    if (w > 1) w--, delete L.cells[A.index];
                                    else if (N) N.cell.height += L.height, w = N.cell.colSpan, delete L.cells[A.index], N.left--, N.left <= 1 && delete b[A.index];
                                    else {
                                        var C = L.cells[A.index];
                                        if (!C) continue;
                                        if (C.height = L.height, C.rowSpan > 1) {
                                            var F = T.length - E,
                                                W = C.rowSpan > F ? F : C.rowSpan;
                                            b[A.index] = {
                                                cell: C,
                                                left: W,
                                                row: L
                                            };
                                        }
                                    }
                                }
                        }

                        function f(g) {
                            for (var b = g.allRows(), w = 0; w < b.length; w++)
                                for (var T = b[w], E = null, L = 0, P = 0, k = 0; k < g.columns.length; k++) {
                                    var A = g.columns[k];
                                    if (P -= 1, P > 1 && g.columns[k + 1]) L += A.width, delete T.cells[A.index];
                                    else if (E) {
                                        var N = E;
                                        delete T.cells[A.index], E = null, N.width = A.width + L;
                                    } else {
                                        var N = T.cells[A.index];
                                        if (!N) continue;
                                        if (P = N.colSpan, L = 0, N.colSpan > 1) {
                                            E = N, L += A.width;
                                            continue;
                                        }
                                        N.width = A.width + L;
                                    }
                                }
                        }

                        function m(g, b) {
                            for (var w = {
                                    count: 0,
                                    height: 0
                                }, T = 0, E = g.allRows(); T < E.length; T++) {
                                for (var L = E[T], P = 0, k = g.columns; P < k.length; P++) {
                                    var A = k[P],
                                        N = L.cells[A.index];
                                    if (N) {
                                        b.applyStyles(N.styles, !0);
                                        var C = N.width - N.padding("horizontal");
                                        if (N.styles.overflow === "linebreak") N.text = b.splitTextToSize(N.text, C + 1 / b.scaleFactor(), {
                                            fontSize: N.styles.fontSize
                                        });
                                        else if (N.styles.overflow === "ellipsize") N.text = _(N.text, C, N.styles, b, "...");
                                        else if (N.styles.overflow === "hidden") N.text = _(N.text, C, N.styles, b, "");
                                        else if (typeof N.styles.overflow == "function") {
                                            var F = N.styles.overflow(N.text, C);
                                            typeof F == "string" ? N.text = [F] : N.text = F;
                                        }
                                        N.contentHeight = N.getContentHeight(b.scaleFactor(), b.getLineHeightFactor());
                                        var W = N.contentHeight / N.rowSpan;
                                        N.rowSpan > 1 && w.count * w.height < W * N.rowSpan ? w = {
                                            height: W,
                                            count: N.rowSpan
                                        } : w && w.count > 0 && w.height > W && (W = w.height), W > L.height && (L.height = W);
                                    }
                                }
                                w.count--;
                            }
                        }

                        function _(g, b, w, T, E) {
                            return g.map(function(L) {
                                return x(L, b, w, T, E);
                            });
                        }
                        o.ellipsize = _;

                        function x(g, b, w, T, E) {
                            var L = 1e4 * T.scaleFactor();
                            if (b = Math.ceil(b * L) / L, b >= (0, l.getStringWidth)(g, w, T)) return g;
                            for (; b < (0, l.getStringWidth)(g + E, w, T) && !(g.length <= 1);) g = g.substring(0, g.length - 1);
                            return g.trim() + E;
                        }
                    },
                    964: function(a) {
                        if (typeof t > "u") {
                            var o = new Error("Cannot find module 'undefined'");
                            throw o.code = "MODULE_NOT_FOUND", o;
                        }
                        a.exports = t;
                    }
                },
                e = {};

            function i(a) {
                var o = e[a];
                if (o !== void 0) return o.exports;
                var s = e[a] = {
                    exports: {}
                };
                return r[a].call(s.exports, s, s.exports, i), s.exports;
            }
            var n = {};
            return function() {
                var a = n;
                Object.defineProperty(a, "__esModule", {
                    value: !0
                }), a.Cell = a.Column = a.Row = a.Table = a.CellHookData = a.__drawTable = a.__createTable = a.applyPlugin = void 0;
                var o = i(340),
                    s = i(776),
                    l = i(664),
                    c = i(972),
                    u = i(260);
                Object.defineProperty(a, "Table", {
                    enumerable: !0,
                    get: function() {
                        return u.Table;
                    }
                });
                var h = i(172);
                Object.defineProperty(a, "CellHookData", {
                    enumerable: !0,
                    get: function() {
                        return h.CellHookData;
                    }
                });
                var d = i(260);
                Object.defineProperty(a, "Cell", {
                    enumerable: !0,
                    get: function() {
                        return d.Cell;
                    }
                }), Object.defineProperty(a, "Column", {
                    enumerable: !0,
                    get: function() {
                        return d.Column;
                    }
                }), Object.defineProperty(a, "Row", {
                    enumerable: !0,
                    get: function() {
                        return d.Row;
                    }
                });

                function f(b) {
                    (0, o.default)(b);
                }
                a.applyPlugin = f;

                function m(b, w) {
                    var T = (0, s.parseInput)(b, w),
                        E = (0, c.createTable)(b, T);
                    (0, l.drawTable)(b, E);
                }

                function _(b, w) {
                    var T = (0, s.parseInput)(b, w);
                    return (0, c.createTable)(b, T);
                }
                a.__createTable = _;

                function x(b, w) {
                    (0, l.drawTable)(b, w);
                }
                a.__drawTable = x;
                try {
                    var g = i(964);
                    g.jsPDF && (g = g.jsPDF), f(g);
                } catch {}
                a.default = m;
            }(), n;
        }();
    });
});
var w_ = (() => {
    class t extends wd {
        static ɵfac = (() => {
            let e;
            return function(n) {
                return (e || (e = Da(t)))(n || t);
            };
        })();
        static ɵcmp = Sn({
            type: t,
            selectors: [
                ["AngleDoubleDownIcon"]
            ],
            features: [za],
            decls: 2,
            vars: 5,
            consts: [
                ["width", "14", "height", "14", "viewBox", "0 0 14 14", "fill", "none", "xmlns", "http://www.w3.org/2000/svg"],
                ["fill-rule", "evenodd", "clip-rule", "evenodd", "d", "M6.70786 6.59831C6.80043 6.63674 6.89974 6.65629 6.99997 6.65581C7.19621 6.64081 7.37877 6.54953 7.50853 6.40153L11.0685 2.8416C11.1364 2.69925 11.1586 2.53932 11.132 2.38384C11.1053 2.22837 11.0311 2.08498 10.9195 1.97343C10.808 1.86188 10.6646 1.78766 10.5091 1.76099C10.3536 1.73431 10.1937 1.75649 10.0513 1.82448L6.99997 4.87585L3.9486 1.82448C3.80625 1.75649 3.64632 1.73431 3.49084 1.76099C3.33536 1.78766 3.19197 1.86188 3.08043 1.97343C2.96888 2.08498 2.89466 2.22837 2.86798 2.38384C2.84131 2.53932 2.86349 2.69925 2.93147 2.8416L6.46089 6.43205C6.53132 6.50336 6.61528 6.55989 6.70786 6.59831ZM6.70786 12.1925C6.80043 12.2309 6.89974 12.2505 6.99997 12.25C7.10241 12.2465 7.20306 12.2222 7.29575 12.1785C7.38845 12.1348 7.47124 12.0726 7.53905 11.9957L11.0685 8.46629C11.1614 8.32292 11.2036 8.15249 11.1881 7.98233C11.1727 7.81216 11.1005 7.6521 10.9833 7.52781C10.866 7.40353 10.7104 7.3222 10.5415 7.29688C10.3725 7.27155 10.1999 7.30369 10.0513 7.38814L6.99997 10.4395L3.9486 7.38814C3.80006 7.30369 3.62747 7.27155 3.45849 7.29688C3.28951 7.3222 3.13393 7.40353 3.01667 7.52781C2.89942 7.6521 2.82729 7.81216 2.81184 7.98233C2.79639 8.15249 2.83852 8.32292 2.93148 8.46629L6.4609 12.0262C6.53133 12.0975 6.61529 12.1541 6.70786 12.1925Z", "fill", "currentColor"]
            ],
            template: function(i, n) {
                i & 1 && (ad(), ge(0, "svg", 0), St(1, "path", 1), ve()), i & 2 && (Xn(n.getClassNames()), vt("aria-label", n.ariaLabel)("aria-hidden", n.ariaHidden)("role", n.role));
            },
            encapsulation: 2
        });
    }
    return t;
})();
var S_ = (() => {
    class t extends wd {
        static ɵfac = (() => {
            let e;
            return function(n) {
                return (e || (e = Da(t)))(n || t);
            };
        })();
        static ɵcmp = Sn({
            type: t,
            selectors: [
                ["AngleDoubleUpIcon"]
            ],
            features: [za],
            decls: 2,
            vars: 5,
            consts: [
                ["width", "14", "height", "14", "viewBox", "0 0 14 14", "fill", "none", "xmlns", "http://www.w3.org/2000/svg"],
                ["fill-rule", "evenodd", "clip-rule", "evenodd", "d", "M10.1504 6.67719C10.2417 6.71508 10.3396 6.73436 10.4385 6.73389C10.6338 6.74289 10.8249 6.67441 10.97 6.54334C11.1109 6.4023 11.19 6.21112 11.19 6.01178C11.19 5.81245 11.1109 5.62127 10.97 5.48023L7.45977 1.96998C7.31873 1.82912 7.12755 1.75 6.92821 1.75C6.72888 1.75 6.5377 1.82912 6.39666 1.96998L2.9165 5.45014C2.83353 5.58905 2.79755 5.751 2.81392 5.91196C2.83028 6.07293 2.89811 6.22433 3.00734 6.34369C3.11656 6.46306 3.26137 6.54402 3.42025 6.57456C3.57914 6.60511 3.74364 6.5836 3.88934 6.51325L6.89813 3.50446L9.90691 6.51325C9.97636 6.58357 10.0592 6.6393 10.1504 6.67719ZM9.93702 11.9993C10.065 12.1452 10.245 12.2352 10.4385 12.25C10.632 12.2352 10.812 12.1452 10.9399 11.9993C11.0633 11.8614 11.1315 11.6828 11.1315 11.4978C11.1315 11.3128 11.0633 11.1342 10.9399 10.9963L7.48987 7.48609C7.34883 7.34523 7.15765 7.26611 6.95832 7.26611C6.75899 7.26611 6.5678 7.34523 6.42677 7.48609L2.91652 10.9963C2.84948 11.1367 2.82761 11.2944 2.85391 11.4477C2.88022 11.601 2.9534 11.7424 3.06339 11.8524C3.17338 11.9624 3.31477 12.0356 3.46808 12.0619C3.62139 12.0882 3.77908 12.0663 3.91945 11.9993L6.92823 8.99048L9.93702 11.9993Z", "fill", "currentColor"]
            ],
            template: function(i, n) {
                i & 1 && (ad(), ge(0, "svg", 0), St(1, "path", 1), ve()), i & 2 && (Xn(n.getClassNames()), vt("aria-label", n.ariaLabel)("aria-hidden", n.ariaHidden)("role", n.role));
            },
            encapsulation: 2
        });
    }
    return t;
})();
var z3 = ["sublist"],
    W3 = (t, r) => ({
        "p-contextmenu-submenu": t,
        "p-contextmenu-root-list": r
    }),
    j3 = () => ({
        "p-contextmenu-item-link": !0
    }),
    A_ = () => ({
        class: "p-contextmenu-submenu-icon"
    }),
    H3 = () => ({
        exact: !1
    }),
    G3 = t => ({
        "p-contextmenu-item-link": !0,
        "p-disabled": t
    }),
    q3 = t => ({
        $implicit: t
    });

function X3(t, r) {
    if (t & 1 && St(0, "li", 8), t & 2) {
        let e = ee().$implicit,
            i = ee(2);
        ju(i.getItemProp(e, "style")), Q("ngClass", i.getSeparatorItemClass(e)), vt("id", i.getItemId(e))("data-pc-section", "separator");
    }
}

function K3(t, r) {
    if (t & 1 && St(0, "span", 19), t & 2) {
        let e = ee(4).$implicit,
            i = ee(2);
        Q("ngClass", i.getItemProp(e, "icon"))("ngStyle", i.getItemProp(e, "iconStyle")), vt("data-pc-section", "icon")("aria-hidden", !0)("tabindex", -1);
    }
}

function Y3(t, r) {
    if (t & 1 && (ge(0, "span", 20), cr(1), ve()), t & 2) {
        let e = ee(4).$implicit,
            i = ee(2);
        vt("data-pc-section", "label"), oe(), Zi(" ", i.getItemLabel(e), " ");
    }
}

function Z3(t, r) {
    if (t & 1 && St(0, "span", 21), t & 2) {
        let e = ee(4).$implicit,
            i = ee(2);
        Q("innerHTML", i.getItemLabel(e), nm), vt("data-pc-section", "label");
    }
}

function J3(t, r) {
    if (t & 1 && St(0, "p-badge", 22), t & 2) {
        let e = ee(4).$implicit,
            i = ee(2);
        Q("styleClass", i.getItemProp(e, "badgeStyleClass"))("value", i.getItemProp(e, "badge"));
    }
}

function Q3(t, r) {
    t & 1 && St(0, "AngleRightIcon"), t & 2 && (Xn("p-contextmenu-submenu-icon"), vt("data-pc-section", "submenuicon")("aria-hidden", !0));
}

function $3(t, r) {}

function eC(t, r) {
    t & 1 && Oe(0, $3, 0, 0, "ng-template", 25), t & 2 && Q("data-pc-section", "submenuicon")("aria-hidden", !0);
}

function tC(t, r) {
    if (t & 1 && (Xt(0), Oe(1, Q3, 1, 4, "AngleRightIcon", 23)(2, eC, 1, 2, null, 24), Kt()), t & 2) {
        let e = ee(6);
        oe(), Q("ngIf", !e.contextMenu.submenuIconTemplate && !e.contextMenu._submenuIconTemplate), oe(), Q("ngTemplateOutlet", e.contextMenu.submenuIconTemplate || e.contextMenu._submenuIconTemplate)("ngTemplateOutletContext", vr(3, A_));
    }
}

function rC(t, r) {
    if (t & 1 && (ge(0, "a", 15), Oe(1, K3, 1, 5, "span", 16)(2, Y3, 2, 2, "span", 17)(3, Z3, 1, 2, "ng-template", null, 2, hi)(5, J3, 1, 2, "p-badge", 18)(6, tC, 3, 4, "ng-container", 11), ve()), t & 2) {
        let e = Br(4),
            i = ee(3).$implicit,
            n = ee(2);
        Q("target", n.getItemProp(i, "target"))("ngClass", vr(12, j3)), vt("href", n.getItemProp(i, "url"), sd)("aria-hidden", !0)("data-automationid", n.getItemProp(i, "automationId"))("data-pc-section", "action")("tabindex", -1), oe(), Q("ngIf", n.getItemProp(i, "icon")), oe(), Q("ngIf", n.getItemProp(i, "escape"))("ngIfElse", e), oe(3), Q("ngIf", n.getItemProp(i, "badge")), oe(), Q("ngIf", n.isItemGroup(i));
    }
}

function iC(t, r) {
    if (t & 1 && St(0, "span", 19), t & 2) {
        let e = ee(4).$implicit,
            i = ee(2);
        Q("ngClass", i.getItemProp(e, "icon"))("ngStyle", i.getItemProp(e, "iconStyle")), vt("data-pc-section", "icon")("aria-hidden", !0)("tabindex", -1);
    }
}

function nC(t, r) {
    if (t & 1 && (ge(0, "span", 20), cr(1), ve()), t & 2) {
        let e = ee(4).$implicit,
            i = ee(2);
        vt("data-pc-section", "label"), oe(), Zi(" ", i.getItemLabel(e), " ");
    }
}

function aC(t, r) {
    if (t & 1 && St(0, "span", 21), t & 2) {
        let e = ee(4).$implicit,
            i = ee(2);
        Q("innerHTML", i.getItemLabel(e), nm), vt("data-pc-section", "label");
    }
}

function oC(t, r) {
    if (t & 1 && St(0, "p-badge", 22), t & 2) {
        let e = ee(4).$implicit,
            i = ee(2);
        Q("styleClass", i.getItemProp(e, "badgeStyleClass"))("value", i.getItemProp(e, "badge"));
    }
}

function sC(t, r) {
    t & 1 && St(0, "AngleRightIcon"), t & 2 && (Xn("p-contextmenu-submenu-icon"), vt("data-pc-section", "submenuicon")("aria-hidden", !0));
}

function lC(t, r) {}

function cC(t, r) {
    t & 1 && Oe(0, lC, 0, 0, "ng-template", 25), t & 2 && Q("data-pc-section", "submenuicon")("aria-hidden", !0);
}

function uC(t, r) {
    if (t & 1 && (Xt(0), Oe(1, sC, 1, 4, "AngleRightIcon", 23)(2, cC, 1, 2, null, 24), Kt()), t & 2) {
        let e = ee(6);
        oe(), Q("ngIf", !e.contextMenu.submenuIconTemplate && !e.contextMenu._submenuIconTemplate), oe(), Q("ngTemplateOutlet", !e.contextMenu.submenuIconTemplate || !e.contextMenu._submenuIconTemplate)("ngTemplateOutletContext", vr(3, A_));
    }
}

function fC(t, r) {
    if (t & 1 && (ge(0, "a", 26), Oe(1, iC, 1, 5, "span", 16)(2, nC, 2, 2, "span", 17)(3, aC, 1, 2, "ng-template", null, 2, hi)(5, oC, 1, 2, "p-badge", 18)(6, uC, 3, 4, "ng-container", 11), ve()), t & 2) {
        let e = Br(4),
            i = ee(3).$implicit,
            n = ee(2);
        Q("routerLink", n.getItemProp(i, "routerLink"))("queryParams", n.getItemProp(i, "queryParams"))("routerLinkActiveOptions", n.getItemProp(i, "routerLinkActiveOptions") || vr(20, H3))("target", n.getItemProp(i, "target"))("ngClass", ii(21, G3, n.getItemProp(i, "disabled")))("fragment", n.getItemProp(i, "fragment"))("queryParamsHandling", n.getItemProp(i, "queryParamsHandling"))("preserveFragment", n.getItemProp(i, "preserveFragment"))("skipLocationChange", n.getItemProp(i, "skipLocationChange"))("replaceUrl", n.getItemProp(i, "replaceUrl"))("state", n.getItemProp(i, "state")), vt("data-automationid", n.getItemProp(i, "automationId"))("tabindex", -1)("aria-hidden", !0)("data-pc-section", "action"), oe(), Q("ngIf", n.getItemProp(i, "icon")), oe(), Q("ngIf", n.getItemProp(i, "escape"))("ngIfElse", e), oe(3), Q("ngIf", n.getItemProp(i, "badge")), oe(), Q("ngIf", n.isItemGroup(i));
    }
}

function hC(t, r) {
    if (t & 1 && (Xt(0), Oe(1, rC, 7, 13, "a", 13)(2, fC, 7, 23, "a", 14), Kt()), t & 2) {
        let e = ee(2).$implicit,
            i = ee(2);
        oe(), Q("ngIf", !i.getItemProp(e, "routerLink")), oe(), Q("ngIf", i.getItemProp(e, "routerLink"));
    }
}

function dC(t, r) {}

function pC(t, r) {
    t & 1 && Oe(0, dC, 0, 0, "ng-template");
}

function mC(t, r) {
    if (t & 1 && (Xt(0), Oe(1, pC, 1, 0, null, 24), Kt()), t & 2) {
        let e = ee(2).$implicit,
            i = ee(2);
        oe(), Q("ngTemplateOutlet", i.itemTemplate)("ngTemplateOutletContext", ii(2, q3, e.item));
    }
}

function gC(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "p-contextmenu-sub", 27), nt("itemClick", function(n) {
            Ce(e);
            let a = ee(4);
            return Ae(a.itemClick.emit(n));
        })("itemMouseEnter", function(n) {
            Ce(e);
            let a = ee(4);
            return Ae(a.onItemMouseEnter(n));
        }), ve();
    }
    if (t & 2) {
        let e = ee(2).$implicit,
            i = ee(2);
        Q("items", e.items)("itemTemplate", i.itemTemplate)("menuId", i.menuId)("visible", i.isItemActive(e) && i.isItemGroup(e))("activeItemPath", i.activeItemPath)("focusedItemId", i.focusedItemId)("level", i.level + 1);
    }
}

function vC(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "li", 9, 1)(2, "div", 10), nt("click", function(n) {
            Ce(e);
            let a = ee().$implicit,
                o = ee(2);
            return Ae(o.onItemClick(n, a));
        })("mouseenter", function(n) {
            Ce(e);
            let a = ee().$implicit,
                o = ee(2);
            return Ae(o.onItemMouseEnter({
                $event: n,
                processedItem: a
            }));
        }), Oe(3, hC, 3, 2, "ng-container", 11)(4, mC, 2, 4, "ng-container", 11), ve(), Oe(5, gC, 1, 7, "p-contextmenu-sub", 12), ve();
    }
    if (t & 2) {
        let e = ee(),
            i = e.$implicit,
            n = e.index,
            a = ee(2);
        Xn(a.getItemProp(i, "styleClass")), Q("ngStyle", a.getItemProp(i, "style"))("ngClass", a.getItemClass(i))("tooltipOptions", a.getItemProp(i, "tooltipOptions")), vt("id", a.getItemId(i))("data-pc-section", "menuitem")("data-p-highlight", a.isItemActive(i))("data-p-focused", a.isItemFocused(i))("data-p-disabled", a.isItemDisabled(i))("aria-label", a.getItemLabel(i))("aria-disabled", a.isItemDisabled(i) || void 0)("aria-haspopup", a.isItemGroup(i) && !a.getItemProp(i, "to") ? "menu" : void 0)("aria-expanded", a.isItemGroup(i) ? a.isItemActive(i) : void 0)("aria-level", a.level + 1)("aria-setsize", a.getAriaSetSize())("aria-posinset", a.getAriaPosInset(n)), oe(2), vt("data-pc-section", "content"), oe(), Q("ngIf", !a.itemTemplate), oe(), Q("ngIf", a.itemTemplate), oe(), Q("ngIf", a.isItemVisible(i) && a.isItemGroup(i));
    }
}

function xC(t, r) {
    if (t & 1 && Oe(0, X3, 1, 5, "li", 6)(1, vC, 6, 21, "li", 7), t & 2) {
        let e = r.$implicit,
            i = ee(2);
        Q("ngIf", i.isItemVisible(e) && i.getItemProp(e, "separator")), oe(), Q("ngIf", i.isItemVisible(e) && !i.getItemProp(e, "separator"));
    }
}

function _C(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "ul", 4, 0), nt("@overlayAnimation.start", function(n) {
            Ce(e);
            let a = Br(1),
                o = ee();
            return Ae(o.onEnter(n, a));
        })("keydown", function(n) {
            Ce(e);
            let a = ee();
            return Ae(a.menuKeydown.emit(n));
        })("focus", function(n) {
            Ce(e);
            let a = ee();
            return Ae(a.menuFocus.emit(n));
        })("blur", function(n) {
            Ce(e);
            let a = ee();
            return Ae(a.menuBlur.emit(n));
        }), Oe(2, xC, 2, 2, "ng-template", 5), ve();
    }
    if (t & 2) {
        let e = ee();
        Q("ngClass", Zo(10, W3, !e.root, e.root))("@overlayAnimation", e.visible)("tabindex", e.tabindex), vt("id", e.menuId + "_list")("aria-label", e.ariaLabel)("aria-labelledBy", e.ariaLabelledBy)("aria-activedescendant", e.focusedItemId)("aria-orientation", "vertical")("data-pc-section", "menu"), oe(2), Q("ngForOf", e.items);
    }
}
var yC = ["item"],
    bC = ["submenuicon"],
    wC = ["rootmenu"],
    SC = ["container"],
    CC = t => ({
        "p-contextmenu p-component": !0,
        "p-contextmenu-mobile": t
    }),
    AC = () => ({
        value: "visible"
    });

function TC(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "div", 3, 0), nt("@overlayAnimation.start", function(n) {
            Ce(e);
            let a = ee();
            return Ae(a.onOverlayAnimationStart(n));
        })("@overlayAnimation.done", function(n) {
            Ce(e);
            let a = ee();
            return Ae(a.onOverlayAnimationEnd(n));
        }), ge(2, "p-contextmenu-sub", 4, 1), nt("itemClick", function(n) {
            Ce(e);
            let a = ee();
            return Ae(a.onItemClick(n));
        })("menuFocus", function(n) {
            Ce(e);
            let a = ee();
            return Ae(a.onMenuFocus(n));
        })("menuBlur", function(n) {
            Ce(e);
            let a = ee();
            return Ae(a.onMenuBlur(n));
        })("menuKeydown", function(n) {
            Ce(e);
            let a = ee();
            return Ae(a.onKeyDown(n));
        })("itemMouseEnter", function(n) {
            Ce(e);
            let a = ee();
            return Ae(a.onItemMouseEnter(n));
        }), ve()();
    }
    if (t & 2) {
        let e = ee();
        Xn(e.styleClass), Q("ngClass", ii(20, CC, e.queryMatches))("ngStyle", e.style)("@overlayAnimation", vr(22, AC)), vt("data-pc-section", "root")("data-pc-name", "contextmenu")("id", e.id), oe(2), Q("root", !0)("items", e.processedItems)("itemTemplate", e.itemTemplate || e._itemTemplate)("menuId", e.id)("tabindex", e.disabled ? -1 : e.tabindex)("ariaLabel", e.ariaLabel)("ariaLabelledBy", e.ariaLabelledBy)("baseZIndex", e.baseZIndex)("autoZIndex", e.autoZIndex)("visible", e.submenuVisible())("focusedItemId", e.focused ? e.focusedItemId : void 0)("activeItemPath", e.activeItemPath());
    }
}
var DC = ({
        dt: t
    }) => `
.p-contextmenu {
    position: absolute;
    background: ${t("contextmenu.background")};
    color: ${t("contextmenu.color")};
    border: 1px solid ${t("contextmenu.border.color")};
    border-radius: ${t("contextmenu.border.radius")};
    box-shadow: ${t("contextmenu.shadow")};
    min-width: 12.5rem;
}

.p-contextmenu-root-list,
.p-contextmenu-submenu {
    margin: 0;
    padding: ${t("contextmenu.list.padding")};
    list-style: none;
    outline: 0 none;
    display: flex;
    flex-direction: column;
    gap: ${t("contextmenu.list.gap")};
}

.p-contextmenu-submenu {
    position: absolute;
    display: flex;
    flex-direction: column;
    min-width: 100%;
    z-index: 1;
    background: ${t("contextmenu.background")};
    color: ${t("contextmenu.color")};
    border: 1px solid ${t("contextmenu.border.color")};
    border-radius: ${t("contextmenu.border.radius")};
    box-shadow: ${t("contextmenu.shadow")};
}

.p-contextmenu-item {
    position: relative;
}

.p-contextmenu-item-content {
    transition: background ${t("contextmenu.transition.duration")}, color ${t("contextmenu.transition.duration")};
    border-radius: ${t("contextmenu.item.border.radius")};
    color: ${t("contextmenu.item.color")};
}

.p-contextmenu-item-link {
    cursor: pointer;
    display: flex;
    align-items: center;
    text-decoration: none;
    overflow: hidden;
    position: relative;
    color: inherit;
    padding: ${t("contextmenu.item.padding")};
    gap: ${t("contextmenu.item.gap")};
    user-select: none;
}

.p-contextmenu-item-label {
    line-height: 1;
}

.p-contextmenu-item-icon {
    color: ${t("contextmenu.item.icon.color")};
}

.p-contextmenu-submenu-icon {
    color: ${t("contextmenu.submenu.icon.color")};
    margin-left: auto;
    font-size: ${t("contextmenu.submenu.icon.size")};
    width: ${t("contextmenu.submenu.icon.size")};
    height: ${t("contextmenu.submenu.icon.size")};
}

.p-contextmenu-submenu-icon:dir(rtl) {
    margin-left: 0;
    margin-right: auto;
}

.p-contextmenu-item.p-focus > .p-contextmenu-item-content {
    color: ${t("contextmenu.item.focus.color")};
    background: ${t("contextmenu.item.focus.background")};
}

.p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-item-icon {
    color: ${t("contextmenu.item.icon.focus.color")};
}

.p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
    color: ${t("contextmenu.submenu.icon.focus.color")};
}

.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover {
    color: ${t("contextmenu.item.focus.color")};
    background: ${t("contextmenu.item.focus.background")};
}

.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover .p-contextmenu-item-icon {
    color: ${t("contextmenu.item.icon.focus.color")};
}

.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover .p-contextmenu-submenu-icon {
    color: ${t("contextmenu.submenu.icon.focus.color")};
}

.p-contextmenu-item-active > .p-contextmenu-item-content {
    color: ${t("contextmenu.item.active.color")};
    background: ${t("contextmenu.item.active.background")};
}

.p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-item-icon {
    color: ${t("contextmenu.item.icon.active.color")};
}

.p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
    color: ${t("contextmenu.submenu.icon.active.color")};
}

.p-contextmenu-separator {
    border-top: 1px solid  ${t("contextmenu.separator.border.color")};
}

.p-contextmenu-enter-from,
.p-contextmenu-leave-active {
    opacity: 0;
}

.p-contextmenu-enter-active {
    transition: opacity 250ms;
}

.p-contextmenu-mobile .p-contextmenu-submenu {
    position: static;
    box-shadow: none;
    border: 0 none;
    padding-left: ${t("tieredmenu.submenu.mobile.indent")};
    padding-right: 0;
}

.p-contextmenu-mobile .p-contextmenu-submenu-icon {
    transition: transform 0.2s;
    transform: rotate(90deg);
}

.p-contextmenu-mobile .p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
    transform: rotate(-90deg);
}

/* For PrimeNG */
.p-contextmenu-submenu-icon.p-iconwrapper {
    margin-left: auto;
}

.p-contextmenu-submenu-icon.p-iconwrapper:dir(rtl) {
    margin-left: 0;
    margin-right: auto;
}
`,
    kC = {
        root: "p-contextmenu p-component",
        rootList: "p-contextmenu-root-list",
        item: ({
            instance: t,
            processedItem: r
        }) => ["p-contextmenu-item", {
            "p-contextmenu-item-active": t.isItemActive(r),
            "p-focus": t.isItemFocused(r),
            "p-disabled": t.isItemDisabled(r)
        }],
        itemContent: "p-contextmenu-item-content",
        itemLink: "p-contextmenu-item-link",
        itemIcon: "p-contextmenu-item-icon",
        itemLabel: "p-contextmenu-item-label",
        submenuIcon: "p-contextmenu-submenu-icon",
        submenu: "p-contextmenu-submenu",
        separator: "p-contextmenu-separator"
    },
    C_ = (() => {
        class t extends Cl {
            name = "contextmenu";
            theme = DC;
            classes = kC;
            static ɵfac = (() => {
                let e;
                return function(n) {
                    return (e || (e = Da(t)))(n || t);
                };
            })();
            static ɵprov = gl({
                token: t,
                factory: t.ɵfac
            });
        }
        return t;
    })();
var FC = (() => {
        class t extends Bs {
            contextMenu;
            visible = !1;
            items;
            itemTemplate;
            root = !1;
            autoZIndex = !0;
            baseZIndex = 0;
            popup;
            menuId;
            ariaLabel;
            ariaLabelledBy;
            level = 0;
            focusedItemId;
            activeItemPath;
            tabindex = 0;
            itemClick = new Qr();
            itemMouseEnter = new Qr();
            menuFocus = new Qr();
            menuBlur = new Qr();
            menuKeydown = new Qr();
            sublistViewChild;
            constructor(e) {
                super(), this.contextMenu = e;
            }
            getItemProp(e, i, n = null) {
                return e && e.item ? vm(e.item[i], n) : void 0;
            }
            getItemId(e) {
                return e.item && e.item ? .id ? e.item.id : `${this.menuId}_${e.key}`;
            }
            getItemKey(e) {
                return this.getItemId(e);
            }
            getItemClass(e) {
                return m0(Pi({}, this.getItemProp(e, "class")), {
                    "p-contextmenu-item": !0,
                    "p-contextmenu-item-active": this.isItemActive(e),
                    "p-focus": this.isItemFocused(e),
                    "p-disabled": this.isItemDisabled(e)
                });
            }
            getItemLabel(e) {
                return this.getItemProp(e, "label");
            }
            getSeparatorItemClass(e) {
                return m0(Pi({}, this.getItemProp(e, "class")), {
                    "p-contextmenu-separator": !0
                });
            }
            getAriaSetSize() {
                return this.items.filter(e => this.isItemVisible(e) && !this.getItemProp(e, "separator")).length;
            }
            getAriaPosInset(e) {
                return e - this.items.slice(0, e).filter(i => this.isItemVisible(i) && this.getItemProp(i, "separator")).length + 1;
            }
            isItemVisible(e) {
                return this.getItemProp(e, "visible") !== !1;
            }
            isItemActive(e) {
                if (this.activeItemPath) return this.activeItemPath.some(i => i.key === e.key);
            }
            isItemDisabled(e) {
                return this.getItemProp(e, "disabled");
            }
            isItemFocused(e) {
                return this.focusedItemId === this.getItemId(e);
            }
            isItemGroup(e) {
                return so(e.items);
            }
            onItemMouseEnter(e) {
                let {
                    event: i,
                    processedItem: n
                } = e;
                this.itemMouseEnter.emit({
                    originalEvent: i,
                    processedItem: n
                });
            }
            onItemClick(e, i) {
                this.getItemProp(i, "command", {
                    originalEvent: e,
                    item: i.item
                }), this.itemClick.emit({
                    originalEvent: e,
                    processedItem: i,
                    isFocus: !0
                });
            }
            onEnter(e, i) {
                if (e.fromState === "void" && e.toState) {
                    let n = e.element;
                    this.position(n);
                }
            }
            position(e) {
                let i = e.parentElement.parentElement,
                    n = hx(e.parentElement.parentElement),
                    a = dm(),
                    o = e.offsetParent ? e.offsetWidth : gm(e),
                    s = lx(i.children[0]);
                e.style.top = "0px", parseInt(n.left, 10) + s + o > a.width - ux() ? e.style.left = -1 * o + "px" : e.style.left = s + "px";
            }
            static ɵfac = function(i) {
                return new(i || t)(li(nd(() => Bd)));
            };
            static ɵcmp = Sn({
                type: t,
                selectors: [
                    ["p-contextMenuSub"],
                    ["p-contextmenu-sub"]
                ],
                viewQuery: function(i, n) {
                    if (i & 1 && Oi(z3, 5), i & 2) {
                        let a;
                        Nt(a = Lt()) && (n.sublistViewChild = a.first);
                    }
                },
                inputs: {
                    visible: [2, "visible", "visible", Rr],
                    items: "items",
                    itemTemplate: "itemTemplate",
                    root: [2, "root", "root", Rr],
                    autoZIndex: [2, "autoZIndex", "autoZIndex", Rr],
                    baseZIndex: [2, "baseZIndex", "baseZIndex", Fo],
                    popup: [2, "popup", "popup", Rr],
                    menuId: "menuId",
                    ariaLabel: "ariaLabel",
                    ariaLabelledBy: "ariaLabelledBy",
                    level: [2, "level", "level", Fo],
                    focusedItemId: "focusedItemId",
                    activeItemPath: "activeItemPath",
                    tabindex: [2, "tabindex", "tabindex", Fo]
                },
                outputs: {
                    itemClick: "itemClick",
                    itemMouseEnter: "itemMouseEnter",
                    menuFocus: "menuFocus",
                    menuBlur: "menuBlur",
                    menuKeydown: "menuKeydown"
                },
                features: [za],
                decls: 1,
                vars: 1,
                consts: [
                    ["sublist", ""],
                    ["listItem", ""],
                    ["htmlLabel", ""],
                    ["role", "menu", 3, "ngClass", "tabindex", "keydown", "focus", "blur", 4, "ngIf"],
                    ["role", "menu", 3, "keydown", "focus", "blur", "ngClass", "tabindex"],
                    ["ngFor", "", 3, "ngForOf"],
                    ["role", "separator", 3, "style", "ngClass", 4, "ngIf"],
                    ["role", "menuitem", "pTooltip", "", 3, "ngStyle", "ngClass", "class", "tooltipOptions", 4, "ngIf"],
                    ["role", "separator", 3, "ngClass"],
                    ["role", "menuitem", "pTooltip", "", 3, "ngStyle", "ngClass", "tooltipOptions"],
                    [1, "p-contextmenu-item-content", 3, "click", "mouseenter"],
                    [4, "ngIf"],
                    [3, "items", "itemTemplate", "menuId", "visible", "activeItemPath", "focusedItemId", "level", "itemClick", "itemMouseEnter", 4, "ngIf"],
                    ["pRipple", "", 3, "target", "ngClass", 4, "ngIf"],
                    ["pRipple", "", 3, "routerLink", "queryParams", "routerLinkActiveOptions", "target", "ngClass", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", 4, "ngIf"],
                    ["pRipple", "", 3, "target", "ngClass"],
                    ["class", "p-contextmenu-item-icon", 3, "ngClass", "ngStyle", 4, "ngIf"],
                    ["class", "p-contextmenu-item-label", 4, "ngIf", "ngIfElse"],
                    [3, "styleClass", "value", 4, "ngIf"],
                    [1, "p-contextmenu-item-icon", 3, "ngClass", "ngStyle"],
                    [1, "p-contextmenu-item-label"],
                    [1, "p-contextmenu-item-label", 3, "innerHTML"],
                    [3, "styleClass", "value"],
                    [3, "class", 4, "ngIf"],
                    [4, "ngTemplateOutlet", "ngTemplateOutletContext"],
                    [3, "data-pc-section", "aria-hidden"],
                    ["pRipple", "", 3, "routerLink", "queryParams", "routerLinkActiveOptions", "target", "ngClass", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state"],
                    [3, "itemClick", "itemMouseEnter", "items", "itemTemplate", "menuId", "visible", "activeItemPath", "focusedItemId", "level"]
                ],
                template: function(i, n) {
                    i & 1 && Oe(0, _C, 3, 13, "ul", 3), i & 2 && Q("ngIf", n.root ? !0 : n.visible);
                },
                dependencies: [t, ha, Wa, vl, Eo, Jo, vc, lm, ix, Al, _m, Ox, Sd, ym, Nx, ja],
                encapsulation: 2,
                data: {
                    animation: [cm("overlayAnimation", [Xu(":enter", [qu({
                        opacity: 0
                    })]), Xu(":leave", [qu({
                        opacity: 0
                    })])])]
                }
            });
        }
        return t;
    })(),
    Bd = (() => {
        class t extends Bs {
            overlayService;
            set model(e) {
                this._model = e, this._processedItems = this.createProcessedItems(this._model || []);
            }
            get model() {
                return this._model;
            }
            triggerEvent = "contextmenu";
            target;
            global;
            style;
            styleClass;
            appendTo;
            autoZIndex = !0;
            baseZIndex = 0;
            id;
            breakpoint = "960px";
            ariaLabel;
            ariaLabelledBy;
            pressDelay = 500;
            onShow = new Qr();
            onHide = new Qr();
            rootmenu;
            containerViewChild;
            container;
            outsideClickListener;
            resizeListener;
            triggerEventListener;
            documentClickListener;
            documentTriggerListener;
            touchEndListener;
            pageX;
            pageY;
            visible = ko(!1);
            relativeAlign;
            window;
            focused = !1;
            activeItemPath = ko([]);
            focusedItemInfo = ko({
                index: -1,
                level: 0,
                parentKey: "",
                item: null
            });
            submenuVisible = ko(!1);
            searchValue = "";
            searchTimeout;
            _processedItems;
            _model;
            pressTimer;
            matchMediaListener;
            query;
            queryMatches;
            _componentStyle = Ls(C_);
            get visibleItems() {
                let e = this.activeItemPath().find(i => i.key === this.focusedItemInfo().parentKey);
                return e ? e.items : this.processedItems;
            }
            get processedItems() {
                return (!this._processedItems || !this._processedItems.length) && (this._processedItems = this.createProcessedItems(this.model || [])), this._processedItems;
            }
            get focusedItemId() {
                let e = this.focusedItemInfo();
                return e.item && e.item ? .id ? e.item.id : e.index !== -1 ? `${this.id}${so(e.parentKey)?"_"+e.parentKey:""}_${e.index}` : null;
            }
            constructor(e) {
                super(), this.overlayService = e, Q2(() => {
                    let i = this.activeItemPath();
                    so(i) ? this.bindGlobalListeners() : this.visible() || this.unbindGlobalListeners();
                });
            }
            ngOnInit() {
                super.ngOnInit(), this.id = this.id || _0("pn_id_"), this.bindMatchMediaListener(), this.bindTriggerEventListener();
            }
            isMobile() {
                return px() || dx();
            }
            bindTriggerEventListener() {
                Ms(this.platformId) && (this.triggerEventListener || (this.isMobile() ? this.global ? (this.triggerEventListener = this.renderer.listen(this.document, "touchstart", this.onTouchStart.bind(this)), this.touchEndListener = this.renderer.listen(this.document, "touchend", this.onTouchEnd.bind(this))) : this.target && (this.triggerEventListener = this.renderer.listen(this.target, "touchstart", this.onTouchStart.bind(this)), this.touchEndListener = this.renderer.listen(this.target, "touchend", this.onTouchEnd.bind(this))) : this.global ? this.triggerEventListener = this.renderer.listen(this.document, this.triggerEvent, e => {
                    this.show(e);
                }) : this.target && (this.triggerEventListener = this.renderer.listen(this.target, this.triggerEvent, e => {
                    this.show(e);
                }))));
            }
            bindGlobalListeners() {
                if (Ms(this.platformId)) {
                    if (!this.documentClickListener) {
                        let e = this.el ? this.el.nativeElement.ownerDocument : "document";
                        this.documentClickListener = this.renderer.listen(e, "click", i => {
                            this.containerViewChild.nativeElement.offsetParent && this.isOutsideClicked(i) && !i.ctrlKey && i.button !== 2 && this.triggerEvent !== "click" && this.hide();
                        }), this.documentTriggerListener = this.renderer.listen(e, this.triggerEvent, i => {
                            this.containerViewChild.nativeElement.offsetParent && this.isOutsideClicked(i) && this.hide();
                        });
                    }
                    this.resizeListener || (this.resizeListener = this.renderer.listen(this.document.defaultView, "resize", e => {
                        this.hide();
                    }));
                }
            }
            itemTemplate;
            submenuIconTemplate;
            templates;
            _submenuIconTemplate;
            _itemTemplate;
            ngAfterContentInit() {
                this.templates ? .forEach(e => {
                    switch (e.getType()) {
                        case "submenuicon":
                            this._submenuIconTemplate = e.template;
                            break;
                        case "item":
                            this._itemTemplate = e.template;
                            break;
                        default:
                            this._itemTemplate = e.template;
                            break;
                    }
                });
            }
            createProcessedItems(e, i = 0, n = {}, a = "") {
                let o = [];
                return e && e.forEach((s, l) => {
                    let c = (a !== "" ? a + "_" : "") + l,
                        u = {
                            item: s,
                            index: l,
                            level: i,
                            key: c,
                            parent: n,
                            parentKey: a
                        };
                    u.items = this.createProcessedItems(s.items, i + 1, u, c), o.push(u);
                }), o;
            }
            bindMatchMediaListener() {
                if (Ms(this.platformId) && !this.matchMediaListener) {
                    let e = window.matchMedia(`(max-width: ${this.breakpoint})`);
                    this.query = e, this.queryMatches = e.matches, this.matchMediaListener = () => {
                        this.queryMatches = e.matches;
                    }, e.addEventListener("change", this.matchMediaListener);
                }
            }
            unbindMatchMediaListener() {
                this.matchMediaListener && (this.query.removeEventListener("change", this.matchMediaListener), this.matchMediaListener = null);
            }
            getItemProp(e, i) {
                return e ? vm(e[i]) : void 0;
            }
            getProccessedItemLabel(e) {
                return e ? this.getItemLabel(e.item) : void 0;
            }
            getItemLabel(e) {
                return this.getItemProp(e, "label");
            }
            isProcessedItemGroup(e) {
                return e && so(e.items);
            }
            isSelected(e) {
                return this.activeItemPath().some(i => i.key === e.key);
            }
            isValidSelectedItem(e) {
                return this.isValidItem(e) && this.isSelected(e);
            }
            isValidItem(e) {
                return !!e && !this.isItemDisabled(e.item) && !this.isItemSeparator(e.item);
            }
            isItemDisabled(e) {
                return this.getItemProp(e, "disabled");
            }
            isItemSeparator(e) {
                return this.getItemProp(e, "separator");
            }
            isItemMatched(e) {
                return this.isValidItem(e) && this.getProccessedItemLabel(e).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase());
            }
            isProccessedItemGroup(e) {
                return e && so(e.items);
            }
            onItemClick(e) {
                let {
                    processedItem: i
                } = e, n = this.isProcessedItemGroup(i);
                if (this.isSelected(i)) {
                    let {
                        index: o,
                        key: s,
                        level: l,
                        parentKey: c,
                        item: u
                    } = i;
                    this.activeItemPath.set(this.activeItemPath().filter(h => s !== h.key && s.startsWith(h.key))), this.focusedItemInfo.set({
                        index: o,
                        level: l,
                        parentKey: c,
                        item: u
                    }), Qo(this.rootmenu.sublistViewChild.nativeElement);
                } else n ? this.onItemChange(e) : this.hide();
            }
            onItemMouseEnter(e) {
                this.onItemChange(e, "hover");
            }
            onKeyDown(e) {
                let i = e.metaKey || e.ctrlKey;
                switch (e.code) {
                    case "ArrowDown":
                        this.onArrowDownKey(e);
                        break;
                    case "ArrowUp":
                        this.onArrowUpKey(e);
                        break;
                    case "ArrowLeft":
                        this.onArrowLeftKey(e);
                        break;
                    case "ArrowRight":
                        this.onArrowRightKey(e);
                        break;
                    case "Home":
                        this.onHomeKey(e);
                        break;
                    case "End":
                        this.onEndKey(e);
                        break;
                    case "Space":
                        this.onSpaceKey(e);
                        break;
                    case "Enter":
                        this.onEnterKey(e);
                        break;
                    case "Escape":
                        this.onEscapeKey(e);
                        break;
                    case "Tab":
                        this.onTabKey(e);
                        break;
                    case "PageDown":
                    case "PageUp":
                    case "Backspace":
                    case "ShiftLeft":
                    case "ShiftRight":
                        break;
                    default:
                        !i && _d(e.key) && this.searchItems(e, e.key);
                        break;
                }
            }
            onArrowDownKey(e) {
                let i = this.focusedItemInfo().index !== -1 ? this.findNextItemIndex(this.focusedItemInfo().index) : this.findFirstFocusedItemIndex();
                this.changeFocusedItemIndex(e, i), e.preventDefault();
            }
            onArrowRightKey(e) {
                let i = this.visibleItems[this.focusedItemInfo().index];
                this.isProccessedItemGroup(i) && (this.onItemChange({
                    originalEvent: e,
                    processedItem: i
                }), this.focusedItemInfo.set({
                    index: -1,
                    parentKey: i.key,
                    item: i.item
                }), this.searchValue = "", this.onArrowDownKey(e)), e.preventDefault();
            }
            onArrowUpKey(e) {
                if (e.altKey) {
                    if (this.focusedItemInfo().index !== -1) {
                        let i = this.visibleItems[this.focusedItemInfo().index];
                        !this.isProccessedItemGroup(i) && this.onItemChange({
                            originalEvent: e,
                            processedItem: i
                        });
                    }
                    this.hide(), e.preventDefault();
                } else {
                    let i = this.focusedItemInfo().index !== -1 ? this.findPrevItemIndex(this.focusedItemInfo().index) : this.findLastFocusedItemIndex();
                    this.changeFocusedItemIndex(e, i), e.preventDefault();
                }
            }
            onArrowLeftKey(e) {
                let i = this.visibleItems[this.focusedItemInfo().index],
                    n = this.activeItemPath().find(s => s.key === i.parentKey);
                $o(i.parent) || (this.focusedItemInfo.set({
                    index: -1,
                    parentKey: n ? n.parentKey : "",
                    item: i.item
                }), this.searchValue = "", this.onArrowDownKey(e));
                let o = this.activeItemPath().filter(s => s.parentKey !== this.focusedItemInfo().parentKey);
                this.activeItemPath.set(o), e.preventDefault();
            }
            onHomeKey(e) {
                this.changeFocusedItemIndex(e, this.findFirstItemIndex()), e.preventDefault();
            }
            onEndKey(e) {
                this.changeFocusedItemIndex(e, this.findLastItemIndex()), e.preventDefault();
            }
            onSpaceKey(e) {
                this.onEnterKey(e);
            }
            onEscapeKey(e) {
                this.hide();
                let i = this.findVisibleItem(this.findFirstFocusedItemIndex()),
                    n = this.focusedItemInfo();
                this.focusedItemInfo.set(m0(Pi({}, n), {
                    index: this.findFirstFocusedItemIndex(),
                    item: i.item
                })), e.preventDefault();
            }
            onTabKey(e) {
                if (this.focusedItemInfo().index !== -1) {
                    let i = this.visibleItems[this.focusedItemInfo().index];
                    !this.isProccessedItemGroup(i) && this.onItemChange({
                        originalEvent: e,
                        processedItem: i
                    });
                }
                this.hide();
            }
            onEnterKey(e) {
                if (this.focusedItemInfo().index !== -1) {
                    let i = wl(this.rootmenu.el.nativeElement, `li[id="${`${this.focusedItemId}`}"]`),
                        n = i && wl(i, 'a[data-pc-section="action"]');
                    n ? n.click() : i && i.click();
                    let a = this.visibleItems[this.focusedItemInfo().index];
                    if (!this.isProccessedItemGroup(a)) {
                        let s = this.focusedItemInfo();
                        this.focusedItemInfo.set(m0(Pi({}, s), {
                            index: this.findFirstFocusedItemIndex()
                        }));
                    }
                }
                e.preventDefault();
            }
            onItemChange(e, i) {
                let {
                    processedItem: n,
                    isFocus: a
                } = e;
                if ($o(n)) return;
                let {
                    index: o,
                    key: s,
                    level: l,
                    parentKey: c,
                    items: u
                } = n, h = so(u), d = this.activeItemPath().filter(f => f.parentKey !== c && f.parentKey !== s);
                h && (d.push(n), this.submenuVisible.set(!0)), this.focusedItemInfo.set({
                    index: o,
                    level: l,
                    parentKey: c,
                    item: n.item
                }), a && Qo(this.rootmenu.sublistViewChild.nativeElement), !(i === "hover" && this.queryMatches) && this.activeItemPath.set(d);
            }
            onMenuFocus(e) {
                this.focused = !0;
                let i = this.focusedItemInfo().index !== -1 ? this.focusedItemInfo() : {
                    index: -1,
                    level: 0,
                    parentKey: "",
                    item: null
                };
                this.focusedItemInfo.set(i);
            }
            onMenuBlur(e) {
                this.focused = !1, this.focusedItemInfo.set({
                    index: -1,
                    level: 0,
                    parentKey: "",
                    item: null
                }), this.searchValue = "";
            }
            onOverlayAnimationStart(e) {
                switch (e.toState) {
                    case "visible":
                        this.container = e.element, this.position(), this.moveOnTop(), this.appendOverlay(), this.bindGlobalListeners(), Qo(this.rootmenu.sublistViewChild.nativeElement);
                        break;
                }
            }
            onOverlayAnimationEnd(e) {
                switch (e.toState) {
                    case "void":
                        this.onOverlayHide();
                        break;
                }
            }
            appendOverlay() {
                this.appendTo && (this.appendTo === "body" ? this.renderer.appendChild(this.document.body, this.containerViewChild.nativeElement) : cx(this.appendTo, this.containerViewChild.nativeElement));
            }
            moveOnTop() {
                this.autoZIndex && this.containerViewChild && xm.set("menu", this.containerViewChild.nativeElement, this.baseZIndex + this.config.zIndex.menu);
            }
            onOverlayHide() {
                this.unbindGlobalListeners(), this.cd.destroyed || (this.target = null), this.container && this.autoZIndex && xm.clear(this.container), this.container = null;
            }
            onTouchStart(e) {
                this.pressTimer = setTimeout(() => {
                    this.show(e);
                }, this.pressDelay);
            }
            onTouchEnd() {
                clearTimeout(this.pressTimer);
            }
            hide() {
                this.visible.set(!1), this.onHide.emit(), this.activeItemPath.set([]), this.focusedItemInfo.set({
                    index: -1,
                    level: 0,
                    parentKey: "",
                    item: null
                });
            }
            toggle(e) {
                this.visible() ? this.hide() : this.show(e);
            }
            show(e) {
                this.activeItemPath.set([]), this.focusedItemInfo.set({
                    index: -1,
                    level: 0,
                    parentKey: "",
                    item: null
                }), this.pageX = e.pageX, this.pageY = e.pageY, this.onShow.emit(), this.visible() ? this.position() : this.visible.set(!0), e.stopPropagation(), e.preventDefault();
            }
            position() {
                let e = this.pageX + 1,
                    i = this.pageY + 1,
                    n = this.containerViewChild.nativeElement.offsetParent ? this.containerViewChild.nativeElement.offsetWidth : gm(this.containerViewChild.nativeElement),
                    a = this.containerViewChild.nativeElement.offsetParent ? this.containerViewChild.nativeElement.offsetHeight : fx(this.containerViewChild.nativeElement),
                    o = dm();
                e + n - this.document.scrollingElement.scrollLeft > o.width && (e -= n), i + a - this.document.scrollingElement.scrollTop > o.height && (i -= a), e < this.document.scrollingElement.scrollLeft && (e = this.document.scrollingElement.scrollLeft), i < this.document.scrollingElement.scrollTop && (i = this.document.scrollingElement.scrollTop), this.containerViewChild.nativeElement.style.left = e + "px", this.containerViewChild.nativeElement.style.top = i + "px";
            }
            searchItems(e, i) {
                this.searchValue = (this.searchValue || "") + i;
                let n = -1,
                    a = !1;
                return this.focusedItemInfo().index !== -1 ? (n = this.visibleItems.slice(this.focusedItemInfo().index).findIndex(o => this.isItemMatched(o)), n = n === -1 ? this.visibleItems.slice(0, this.focusedItemInfo().index).findIndex(o => this.isItemMatched(o)) : n + this.focusedItemInfo().index) : n = this.visibleItems.findIndex(o => this.isItemMatched(o)), n !== -1 && (a = !0), n === -1 && this.focusedItemInfo().index === -1 && (n = this.findFirstFocusedItemIndex()), n !== -1 && this.changeFocusedItemIndex(e, n), this.searchTimeout && clearTimeout(this.searchTimeout), this.searchTimeout = setTimeout(() => {
                    this.searchValue = "", this.searchTimeout = null;
                }, 500), a;
            }
            findVisibleItem(e) {
                return so(this.visibleItems) ? this.visibleItems[e] : null;
            }
            findLastFocusedItemIndex() {
                let e = this.findSelectedItemIndex();
                return e < 0 ? this.findLastItemIndex() : e;
            }
            findLastItemIndex() {
                return Sl(this.visibleItems, e => this.isValidItem(e));
            }
            findPrevItemIndex(e) {
                let i = e > 0 ? Sl(this.visibleItems.slice(0, e), n => this.isValidItem(n)) : -1;
                return i > -1 ? i : e;
            }
            findNextItemIndex(e) {
                let i = e < this.visibleItems.length - 1 ? this.visibleItems.slice(e + 1).findIndex(n => this.isValidItem(n)) : -1;
                return i > -1 ? i + e + 1 : e;
            }
            findFirstFocusedItemIndex() {
                let e = this.findSelectedItemIndex();
                return e < 0 ? this.findFirstItemIndex() : e;
            }
            findFirstItemIndex() {
                return this.visibleItems.findIndex(e => this.isValidItem(e));
            }
            findSelectedItemIndex() {
                return this.visibleItems.findIndex(e => this.isValidSelectedItem(e));
            }
            changeFocusedItemIndex(e, i) {
                let n = this.findVisibleItem(i),
                    a = this.focusedItemInfo();
                a.index !== i && (this.focusedItemInfo.set(m0(Pi({}, a), {
                    index: i,
                    item: n.item
                })), this.scrollInView());
            }
            scrollInView(e = -1) {
                let i = e !== -1 ? `${this.id}_${e}` : this.focusedItemId,
                    n = wl(this.rootmenu.el.nativeElement, `li[id="${i}"]`);
                n && n.scrollIntoView && n.scrollIntoView({
                    block: "nearest",
                    inline: "nearest"
                });
            }
            bindResizeListener() {
                Ms(this.platformId) && (this.resizeListener || (this.resizeListener = this.renderer.listen(this.document.defaultView, "resize", e => {
                    this.hide();
                })));
            }
            isOutsideClicked(e) {
                return !(this.containerViewChild.nativeElement.isSameNode(e.target) || this.containerViewChild.nativeElement.contains(e.target));
            }
            unbindResizeListener() {
                this.resizeListener && (this.resizeListener(), this.resizeListener = null);
            }
            unbindGlobalListeners() {
                this.documentClickListener && (this.documentClickListener(), this.documentClickListener = null), this.documentTriggerListener && (this.documentTriggerListener(), this.documentTriggerListener = null), this.resizeListener && (this.resizeListener(), this.resizeListener = null), this.touchEndListener && (this.touchEndListener(), this.touchEndListener = null);
            }
            unbindTriggerEventListener() {
                this.triggerEventListener && (this.triggerEventListener(), this.triggerEventListener = null);
            }
            removeAppendedElements() {
                this.appendTo && this.containerViewChild && (this.appendTo === "body" ? this.renderer.removeChild(this.document.body, this.containerViewChild.nativeElement) : mx(this.containerViewChild.nativeElement, this.appendTo));
            }
            ngOnDestroy() {
                this.unbindGlobalListeners(), this.unbindTriggerEventListener(), this.unbindMatchMediaListener(), this.removeAppendedElements(), super.ngOnDestroy();
            }
            static ɵfac = function(i) {
                return new(i || t)(li(_x));
            };
            static ɵcmp = Sn({
                type: t,
                selectors: [
                    ["p-contextMenu"],
                    ["p-contextmenu"],
                    ["p-context-menu"]
                ],
                contentQueries: function(i, n, a) {
                    if (i & 1 && (Or(a, yC, 4), Or(a, bC, 4), Or(a, es, 4)), i & 2) {
                        let o;
                        Nt(o = Lt()) && (n.itemTemplate = o.first), Nt(o = Lt()) && (n.submenuIconTemplate = o.first), Nt(o = Lt()) && (n.templates = o);
                    }
                },
                viewQuery: function(i, n) {
                    if (i & 1 && (Oi(wC, 5), Oi(SC, 5)), i & 2) {
                        let a;
                        Nt(a = Lt()) && (n.rootmenu = a.first), Nt(a = Lt()) && (n.containerViewChild = a.first);
                    }
                },
                inputs: {
                    model: "model",
                    triggerEvent: "triggerEvent",
                    target: "target",
                    global: [2, "global", "global", Rr],
                    style: "style",
                    styleClass: "styleClass",
                    appendTo: "appendTo",
                    autoZIndex: [2, "autoZIndex", "autoZIndex", Rr],
                    baseZIndex: [2, "baseZIndex", "baseZIndex", Fo],
                    id: "id",
                    breakpoint: "breakpoint",
                    ariaLabel: "ariaLabel",
                    ariaLabelledBy: "ariaLabelledBy",
                    pressDelay: [2, "pressDelay", "pressDelay", Fo]
                },
                outputs: {
                    onShow: "onShow",
                    onHide: "onHide"
                },
                features: [Yo([C_]), za],
                decls: 1,
                vars: 1,
                consts: [
                    ["container", ""],
                    ["rootmenu", ""],
                    [3, "ngClass", "class", "ngStyle", 4, "ngIf"],
                    [3, "ngClass", "ngStyle"],
                    [3, "itemClick", "menuFocus", "menuBlur", "menuKeydown", "itemMouseEnter", "root", "items", "itemTemplate", "menuId", "tabindex", "ariaLabel", "ariaLabelledBy", "baseZIndex", "autoZIndex", "visible", "focusedItemId", "activeItemPath"]
                ],
                template: function(i, n) {
                    i & 1 && Oe(0, TC, 4, 23, "div", 2), i & 2 && Q("ngIf", n.visible());
                },
                dependencies: [ha, Wa, Eo, vc, FC, lm, _m, ym, ja],
                encapsulation: 2,
                data: {
                    animation: [cm("overlayAnimation", [Xu(":enter", [qu({
                        opacity: 0
                    }), um("250ms")]), Xu(":leave", [um(".1s linear", qu({
                        opacity: 0
                    }))])])]
                },
                changeDetection: 0
            });
        }
        return t;
    })(),
    T_ = (() => {
        class t {
            static ɵfac = function(i) {
                return new(i || t)();
            };
            static ɵmod = pc({
                type: t
            });
            static ɵinj = dc({
                imports: [Bd, ja, ja]
            });
        }
        return t;
    })();
var Ju = class {
    constructor(r = "") {
        this.statuscode = "", this.packagepin = "", this.shipmentpin = "", this.piecetotalcount = 0, this.productcode = "", this.receiverprovincestate = "", this.receivercity = "", this.receiverpostalzipcode = "", this.receivername = "", this.shipmenttype = "", this.weightvalue = 0, this.shipperpostalzipcode = "", this.shipperaccount = "", this.shipmentid = "", this.dataquality = "", this.weightunit = "", this.consolidatedshipmentpin = "", this.note = "", this.shippercompanyname = "", this.shippername = "", this.shipperstreetaddress1 = "", this.shipperstreetaddress2 = "", this.shipperstreetaddress3 = "", this.shippercity = "", this.shipperprovincestate = "", this.shippercountrycode = "", this.receivercompanyname = "", this.receiveraddress1 = "", this.receiveraddress2 = "", this.receiveraddress3 = "", this.receivercountrycode = "", this.packagedeliveryname = "", this.attentionreason = "", this.transitdays = 0, this.returnshipment = "", this.holdforpickuplocationid = "", this.lasteventaddress1 = "", this.lasteventaddress2 = "", this.lasteventcity = "", this.lasteventcode = "", this.lasteventcountrycode = "", this.lasteventlat = "", this.lasteventlong = "", this.lasteventpin = "", this.lasteventpostalzipcode = "", this.lasteventprovincestate = "", this.lasteventreasoncode = "", this.lasteventtimezone = "", this.packagestatuscode = "ATT", this.packagestatussubcode = "", this.packagestatuscodedisplayvalue = "", this.packageweightdeclaredunit = "", this.packageweightdeclaredvalue = 0, this.packageweightestimatedunit = "", this.packageweightestimatedvalue = 0, this.lineofbusiness = "", this.isLeadPin = !1, this.isChildPin = !1, this.isStatusDifferent = !1, this.children = [], this.pchChainOfSignature = "", this.pchDangerousGoods = "", this.pchDeclaredValue = "", this.pchDgClassification = "", this.pchDgMode = "", this.pchExpressCheque = "", this.pchExpressChequeMop = "", this.pchHealthcare = "", this.pchHoldPickup = "", this.pchOsnr = "", this.pchResSigDom = "", this.pchResSigIntl = "", this.pchSaturdayDelivery = "", this.pchSaturdayPickup = "", this.pchSpecialHandling = "", this.referencevalue1 = "", this.referencevalue2 = "", this.referencevalue3 = "", this.referencevalue4 = "", this.referencevalue5 = "", this.packagereferencevalue = "", this.lastScanEventReasonCode = "", this.pickupDate = "", this.pickupTime = "", this.terminalname = "", this.payeraccount = "", this.xreference = "", this.packagepin = r;
    }
};
var sie = U3($y());
var xf = {};
xf.version = "0.20.3";
var Ka = 1200,
    B0 = 1252,
    Kr, qA = [874, 932, 936, 949, 950, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1e4],
    XA = {
        0: 1252,
        1: 65001,
        2: 65001,
        77: 1e4,
        128: 932,
        129: 949,
        130: 1361,
        134: 936,
        136: 950,
        161: 1253,
        162: 1254,
        163: 1258,
        177: 1255,
        178: 1256,
        186: 1257,
        204: 1251,
        222: 874,
        238: 1250,
        255: 1252,
        69: 6969
    },
    Kb = function(t) {
        qA.indexOf(t) != -1 && (B0 = XA[0] = t);
    };

function KA() {
    Kb(1252);
}
var _f = function(t) {
    Ka = t, Kb(t);
};

function YA() {
    _f(1200), KA();
}

function ZA(t) {
    for (var r = [], e = 0; e < t.length >> 1; ++e) r[e] = String.fromCharCode(t.charCodeAt(2 * e + 1) + (t.charCodeAt(2 * e) << 8));
    return r.join("");
}
var op = function(r) {
        return String.fromCharCode(r);
    },
    eb = function(r) {
        return String.fromCharCode(r);
    };
var ls = null,
    tb = !0,
    ta = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";

function mp(t) {
    for (var r = "", e = 0, i = 0, n = 0, a = 0, o = 0, s = 0, l = 0, c = 0; c < t.length;) e = t.charCodeAt(c++), a = e >> 2, i = t.charCodeAt(c++), o = (e & 3) << 4 | i >> 4, n = t.charCodeAt(c++), s = (i & 15) << 2 | n >> 6, l = n & 63, isNaN(i) ? s = l = 64 : isNaN(n) && (l = 64), r += ta.charAt(a) + ta.charAt(o) + ta.charAt(s) + ta.charAt(l);
    return r;
}

function JA(t) {
    for (var r = "", e = 0, i = 0, n = 0, a = 0, o = 0, s = 0, l = 0, c = 0; c < t.length;) e = t.charCodeAt(c++), e > 255 && (e = 95), a = e >> 2, i = t.charCodeAt(c++), i > 255 && (i = 95), o = (e & 3) << 4 | i >> 4, n = t.charCodeAt(c++), n > 255 && (n = 95), s = (i & 15) << 2 | n >> 6, l = n & 63, isNaN(i) ? s = l = 64 : isNaN(n) && (l = 64), r += ta.charAt(a) + ta.charAt(o) + ta.charAt(s) + ta.charAt(l);
    return r;
}

function QA(t) {
    for (var r = "", e = 0, i = 0, n = 0, a = 0, o = 0, s = 0, l = 0, c = 0; c < t.length;) e = t[c++], a = e >> 2, i = t[c++], o = (e & 3) << 4 | i >> 4, n = t[c++], s = (i & 15) << 2 | n >> 6, l = n & 63, isNaN(i) ? s = l = 64 : isNaN(n) && (l = 64), r += ta.charAt(a) + ta.charAt(o) + ta.charAt(s) + ta.charAt(l);
    return r;
}

function Nl(t) {
    var r = "",
        e = 0,
        i = 0,
        n = 0,
        a = 0,
        o = 0,
        s = 0,
        l = 0;
    if (t.slice(0, 5) == "data:") {
        var c = t.slice(0, 1024).indexOf(";base64,");
        c > -1 && (t = t.slice(c + 8));
    }
    t = t.replace(/[^\w\+\/\=]/g, "");
    for (var c = 0; c < t.length;) a = ta.indexOf(t.charAt(c++)), o = ta.indexOf(t.charAt(c++)), e = a << 2 | o >> 4, r += String.fromCharCode(e), s = ta.indexOf(t.charAt(c++)), i = (o & 15) << 4 | s >> 2, s !== 64 && (r += String.fromCharCode(i)), l = ta.indexOf(t.charAt(c++)), n = (s & 3) << 6 | l, l !== 64 && (r += String.fromCharCode(n));
    return r;
}
var ti = function() {
        return typeof Buffer < "u" && typeof process < "u" && typeof process.versions < "u" && !!process.versions.node;
    }(),
    fs = function() {
        if (typeof Buffer < "u") {
            var t = !Buffer.from;
            if (!t) try {
                Buffer.from("foo", "utf8");
            } catch {
                t = !0;
            }
            return t ? function(r, e) {
                return e ? new Buffer(r, e) : new Buffer(r);
            } : Buffer.from.bind(Buffer);
        }
        return function() {};
    }(),
    yf = function() {
        if (typeof Buffer > "u") return !1;
        var t = fs([65, 0]);
        if (!t) return !1;
        var r = t.toString("utf16le");
        return r.length == 1;
    }();

function Ec(t) {
    return ti ? Buffer.alloc ? Buffer.alloc(t) : new Buffer(t) : typeof Uint8Array < "u" ? new Uint8Array(t) : new Array(t);
}

function rb(t) {
    return ti ? Buffer.allocUnsafe ? Buffer.allocUnsafe(t) : new Buffer(t) : typeof Uint8Array < "u" ? new Uint8Array(t) : new Array(t);
}
var qa = function(r) {
    return ti ? fs(r, "binary") : r.split("").map(function(e) {
        return e.charCodeAt(0) & 255;
    });
};

function Ip(t) {
    if (typeof ArrayBuffer > "u") return qa(t);
    for (var r = new ArrayBuffer(t.length), e = new Uint8Array(r), i = 0; i != t.length; ++i) e[i] = t.charCodeAt(i) & 255;
    return r;
}

function Pc(t) {
    if (Array.isArray(t)) return t.map(function(i) {
        return String.fromCharCode(i);
    }).join("");
    for (var r = [], e = 0; e < t.length; ++e) r[e] = String.fromCharCode(t[e]);
    return r.join("");
}

function $A(t) {
    if (typeof Uint8Array > "u") throw new Error("Unsupported");
    return new Uint8Array(t);
}
var un = ti ? function(t) {
    return Buffer.concat(t.map(function(r) {
        return Buffer.isBuffer(r) ? r : fs(r);
    }));
} : function(t) {
    if (typeof Uint8Array < "u") {
        var r = 0,
            e = 0;
        for (r = 0; r < t.length; ++r) e += t[r].length;
        var i = new Uint8Array(e),
            n = 0;
        for (r = 0, e = 0; r < t.length; e += n, ++r) n = t[r].length, t[r] instanceof Uint8Array ? i.set(t[r], e) : typeof t[r] == "string" ? i.set(new Uint8Array(qa(t[r])), e) : i.set(new Uint8Array(t[r]), e);
        return i;
    }
    return [].concat.apply([], t.map(function(a) {
        return Array.isArray(a) ? a : [].slice.call(a);
    }));
};

function eT(t) {
    for (var r = [], e = 0, i = t.length + 250, n = Ec(t.length + 255), a = 0; a < t.length; ++a) {
        var o = t.charCodeAt(a);
        if (o < 128) n[e++] = o;
        else if (o < 2048) n[e++] = 192 | o >> 6 & 31, n[e++] = 128 | o & 63;
        else if (o >= 55296 && o < 57344) {
            o = (o & 1023) + 64;
            var s = t.charCodeAt(++a) & 1023;
            n[e++] = 240 | o >> 8 & 7, n[e++] = 128 | o >> 2 & 63, n[e++] = 128 | s >> 6 & 15 | (o & 3) << 4, n[e++] = 128 | s & 63;
        } else n[e++] = 224 | o >> 12 & 15, n[e++] = 128 | o >> 6 & 63, n[e++] = 128 | o & 63;
        e > i && (r.push(n.slice(0, e)), e = 0, n = Ec(65535), i = 65530);
    }
    return r.push(n.slice(0, e)), un(r);
}
var E0 = /\u0000/g,
    sp = /[\u0001-\u0006]/g;

function P0(t) {
    for (var r = "", e = t.length - 1; e >= 0;) r += t.charAt(e--);
    return r;
}

function Mo(t, r) {
    var e = "" + t;
    return e.length >= r ? e : Ni("0", r - e.length) + e;
}

function Dg(t, r) {
    var e = "" + t;
    return e.length >= r ? e : Ni(" ", r - e.length) + e;
}

function gp(t, r) {
    var e = "" + t;
    return e.length >= r ? e : e + Ni(" ", r - e.length);
}

function tT(t, r) {
    var e = "" + Math.round(t);
    return e.length >= r ? e : Ni("0", r - e.length) + e;
}

function rT(t, r) {
    var e = "" + t;
    return e.length >= r ? e : Ni("0", r - e.length) + e;
}
var ib = Math.pow(2, 32);

function D0(t, r) {
    if (t > ib || t < -ib) return tT(t, r);
    var e = Math.round(t);
    return rT(e, r);
}

function vp(t, r) {
    return r = r || 0, t.length >= 7 + r && (t.charCodeAt(r) | 32) === 103 && (t.charCodeAt(r + 1) | 32) === 101 && (t.charCodeAt(r + 2) | 32) === 110 && (t.charCodeAt(r + 3) | 32) === 101 && (t.charCodeAt(r + 4) | 32) === 114 && (t.charCodeAt(r + 5) | 32) === 97 && (t.charCodeAt(r + 6) | 32) === 108;
}
var nb = [
        ["Sun", "Sunday"],
        ["Mon", "Monday"],
        ["Tue", "Tuesday"],
        ["Wed", "Wednesday"],
        ["Thu", "Thursday"],
        ["Fri", "Friday"],
        ["Sat", "Saturday"]
    ],
    og = [
        ["J", "Jan", "January"],
        ["F", "Feb", "February"],
        ["M", "Mar", "March"],
        ["A", "Apr", "April"],
        ["M", "May", "May"],
        ["J", "Jun", "June"],
        ["J", "Jul", "July"],
        ["A", "Aug", "August"],
        ["S", "Sep", "September"],
        ["O", "Oct", "October"],
        ["N", "Nov", "November"],
        ["D", "Dec", "December"]
    ];

function iT(t) {
    return t || (t = {}), t[0] = "General", t[1] = "0", t[2] = "0.00", t[3] = "#,##0", t[4] = "#,##0.00", t[9] = "0%", t[10] = "0.00%", t[11] = "0.00E+00", t[12] = "# ?/?", t[13] = "# ??/??", t[14] = "m/d/yy", t[15] = "d-mmm-yy", t[16] = "d-mmm", t[17] = "mmm-yy", t[18] = "h:mm AM/PM", t[19] = "h:mm:ss AM/PM", t[20] = "h:mm", t[21] = "h:mm:ss", t[22] = "m/d/yy h:mm", t[37] = "#,##0 ;(#,##0)", t[38] = "#,##0 ;[Red](#,##0)", t[39] = "#,##0.00;(#,##0.00)", t[40] = "#,##0.00;[Red](#,##0.00)", t[45] = "mm:ss", t[46] = "[h]:mm:ss", t[47] = "mmss.0", t[48] = "##0.0E+0", t[49] = "@", t[56] = '"\u4E0A\u5348/\u4E0B\u5348 "hh"\u6642"mm"\u5206"ss"\u79D2 "', t;
}
var Di = {
        0: "General",
        1: "0",
        2: "0.00",
        3: "#,##0",
        4: "#,##0.00",
        9: "0%",
        10: "0.00%",
        11: "0.00E+00",
        12: "# ?/?",
        13: "# ??/??",
        14: "m/d/yy",
        15: "d-mmm-yy",
        16: "d-mmm",
        17: "mmm-yy",
        18: "h:mm AM/PM",
        19: "h:mm:ss AM/PM",
        20: "h:mm",
        21: "h:mm:ss",
        22: "m/d/yy h:mm",
        37: "#,##0 ;(#,##0)",
        38: "#,##0 ;[Red](#,##0)",
        39: "#,##0.00;(#,##0.00)",
        40: "#,##0.00;[Red](#,##0.00)",
        45: "mm:ss",
        46: "[h]:mm:ss",
        47: "mmss.0",
        48: "##0.0E+0",
        49: "@",
        56: '"\u4E0A\u5348/\u4E0B\u5348 "hh"\u6642"mm"\u5206"ss"\u79D2 "'
    },
    ab = {
        5: 37,
        6: 38,
        7: 39,
        8: 40,
        23: 0,
        24: 0,
        25: 0,
        26: 0,
        27: 14,
        28: 14,
        29: 14,
        30: 14,
        31: 14,
        50: 14,
        51: 14,
        52: 14,
        53: 14,
        54: 14,
        55: 14,
        56: 14,
        57: 14,
        58: 14,
        59: 1,
        60: 2,
        61: 3,
        62: 4,
        67: 9,
        68: 10,
        69: 12,
        70: 13,
        71: 14,
        72: 14,
        73: 15,
        74: 16,
        75: 17,
        76: 20,
        77: 21,
        78: 22,
        79: 45,
        80: 46,
        81: 47,
        82: 0
    },
    nT = {
        5: '"$"#,##0_);\\("$"#,##0\\)',
        63: '"$"#,##0_);\\("$"#,##0\\)',
        6: '"$"#,##0_);[Red]\\("$"#,##0\\)',
        64: '"$"#,##0_);[Red]\\("$"#,##0\\)',
        7: '"$"#,##0.00_);\\("$"#,##0.00\\)',
        65: '"$"#,##0.00_);\\("$"#,##0.00\\)',
        8: '"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',
        66: '"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',
        41: '_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',
        42: '_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',
        43: '_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',
        44: '_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'
    };

function xp(t, r, e) {
    for (var i = t < 0 ? -1 : 1, n = t * i, a = 0, o = 1, s = 0, l = 1, c = 0, u = 0, h = Math.floor(n); c < r && (h = Math.floor(n), s = h * o + a, u = h * c + l, !(n - h < 5e-8));) n = 1 / (n - h), a = o, o = s, l = c, c = u;
    if (u > r && (c > r ? (u = l, s = a) : (u = c, s = o)), !e) return [0, i * s, u];
    var d = Math.floor(i * s / u);
    return [d, i * s - d * u, u];
}

function aT(t) {
    var r = t.toPrecision(16);
    if (r.indexOf("e") > -1) {
        var e = r.slice(0, r.indexOf("e"));
        return e = e.indexOf(".") > -1 ? e.slice(0, e.slice(0, 2) == "0." ? 17 : 16) : e.slice(0, 15) + Ni("0", e.length - 15), e + r.slice(r.indexOf("e"));
    }
    var i = r.indexOf(".") > -1 ? r.slice(0, r.slice(0, 2) == "0." ? 17 : 16) : r.slice(0, 15) + Ni("0", r.length - 15);
    return Number(i);
}

function k0(t, r, e) {
    if (t > 2958465 || t < 0) return null;
    t = aT(t);
    var i = t | 0,
        n = Math.floor(86400 * (t - i)),
        a = 0,
        o = [],
        s = {
            D: i,
            T: n,
            u: 86400 * (t - i) - n,
            y: 0,
            m: 0,
            d: 0,
            H: 0,
            M: 0,
            S: 0,
            q: 0
        };
    if (Math.abs(s.u) < 1e-6 && (s.u = 0), r && r.date1904 && (i += 1462), s.u > .9999 && (s.u = 0, ++n == 86400 && (s.T = n = 0, ++i, ++s.D)), i === 60) o = e ? [1317, 10, 29] : [1900, 2, 29], a = 3;
    else if (i === 0) o = e ? [1317, 8, 29] : [1900, 1, 0], a = 6;
    else {
        i > 60 && --i;
        var l = new Date(1900, 0, 1);
        l.setDate(l.getDate() + i - 1), o = [l.getFullYear(), l.getMonth() + 1, l.getDate()], a = l.getDay(), i < 60 && (a = (a + 6) % 7), e && (a = uT(l, o));
    }
    return s.y = o[0], s.m = o[1], s.d = o[2], s.S = n % 60, n = Math.floor(n / 60), s.M = n % 60, n = Math.floor(n / 60), s.H = n, s.q = a, s;
}

function kg(t) {
    return t.indexOf(".") == -1 ? t : t.replace(/(?:\.0*|(\.\d*[1-9])0+)$/, "$1");
}

function oT(t) {
    return t.indexOf("E") == -1 ? t : t.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/, "$1E").replace(/(E[+-])(\d)$/, "$10$2");
}

function sT(t) {
    var r = t < 0 ? 12 : 11,
        e = kg(t.toFixed(12));
    return e.length <= r || (e = t.toPrecision(10), e.length <= r) ? e : t.toExponential(5);
}

function lT(t) {
    var r = kg(t.toFixed(11));
    return r.length > (t < 0 ? 12 : 11) || r === "0" || r === "-0" ? t.toPrecision(6) : r;
}

function cT(t) {
    if (!isFinite(t)) return isNaN(t) ? "#NUM!" : "#DIV/0!";
    var r = Math.floor(Math.log(Math.abs(t)) * Math.LOG10E),
        e;
    return r >= -4 && r <= -1 ? e = t.toPrecision(10 + r) : Math.abs(r) <= 9 ? e = sT(t) : r === 10 ? e = t.toFixed(10).substr(0, 12) : e = lT(t), kg(oT(e.toUpperCase()));
}

function yg(t, r) {
    switch (typeof t) {
        case "string":
            return t;
        case "boolean":
            return t ? "TRUE" : "FALSE";
        case "number":
            return (t | 0) === t ? t.toString(10) : cT(t);
        case "undefined":
            return "";
        case "object":
            if (t == null) return "";
            if (t instanceof Date) return qs(14, Wn(t, r && r.date1904), r);
    }
    throw new Error("unsupported value in General format: " + t);
}

function uT(t, r) {
    r[0] -= 581;
    var e = t.getDay();
    return t < 60 && (e = (e + 6) % 7), e;
}

function fT(t, r, e, i) {
    var n = "",
        a = 0,
        o = 0,
        s = e.y,
        l, c = 0;
    switch (t) {
        case 98:
            s = e.y + 543;
        case 121:
            switch (r.length) {
                case 1:
                case 2:
                    l = s % 100, c = 2;
                    break;
                default:
                    l = s % 1e4, c = 4;
                    break;
            }
            break;
        case 109:
            switch (r.length) {
                case 1:
                case 2:
                    l = e.m, c = r.length;
                    break;
                case 3:
                    return og[e.m - 1][1];
                case 5:
                    return og[e.m - 1][0];
                default:
                    return og[e.m - 1][2];
            }
            break;
        case 100:
            switch (r.length) {
                case 1:
                case 2:
                    l = e.d, c = r.length;
                    break;
                case 3:
                    return nb[e.q][0];
                default:
                    return nb[e.q][1];
            }
            break;
        case 104:
            switch (r.length) {
                case 1:
                case 2:
                    l = 1 + (e.H + 11) % 12, c = r.length;
                    break;
                default:
                    throw "bad hour format: " + r;
            }
            break;
        case 72:
            switch (r.length) {
                case 1:
                case 2:
                    l = e.H, c = r.length;
                    break;
                default:
                    throw "bad hour format: " + r;
            }
            break;
        case 77:
            switch (r.length) {
                case 1:
                case 2:
                    l = e.M, c = r.length;
                    break;
                default:
                    throw "bad minute format: " + r;
            }
            break;
        case 115:
            if (r != "s" && r != "ss" && r != ".0" && r != ".00" && r != ".000") throw "bad second format: " + r;
            return e.u === 0 && (r == "s" || r == "ss") ? Mo(e.S, r.length) : (i >= 2 ? o = i === 3 ? 1e3 : 100 : o = i === 1 ? 10 : 1, a = Math.round(o * (e.S + e.u)), a >= 60 * o && (a = 0), r === "s" ? a === 0 ? "0" : "" + a / o : (n = Mo(a, 2 + i), r === "ss" ? n.substr(0, 2) : "." + n.substr(2, r.length - 1)));
        case 90:
            switch (r) {
                case "[h]":
                case "[hh]":
                    l = e.D * 24 + e.H;
                    break;
                case "[m]":
                case "[mm]":
                    l = (e.D * 24 + e.H) * 60 + e.M;
                    break;
                case "[s]":
                case "[ss]":
                    l = ((e.D * 24 + e.H) * 60 + e.M) * 60 + (i == 0 ? Math.round(e.S + e.u) : e.S);
                    break;
                default:
                    throw "bad abstime format: " + r;
            }
            c = r.length === 3 ? 1 : 2;
            break;
        case 101:
            l = s, c = 1;
            break;
    }
    var u = c > 0 ? Mo(l, c) : "";
    return u;
}

function Ol(t) {
    var r = 3;
    if (t.length <= r) return t;
    for (var e = t.length % r, i = t.substr(0, e); e != t.length; e += r) i += (i.length > 0 ? "," : "") + t.substr(e, r);
    return i;
}
var Yb = /%/g;

function hT(t, r, e) {
    var i = r.replace(Yb, ""),
        n = r.length - i.length;
    return js(t, i, e * Math.pow(10, 2 * n)) + Ni("%", n);
}

function dT(t, r, e) {
    for (var i = r.length - 1; r.charCodeAt(i - 1) === 44;) --i;
    return js(t, r.substr(0, i), e / Math.pow(10, 3 * (r.length - i)));
}

function Zb(t, r) {
    var e, i = t.indexOf("E") - t.indexOf(".") - 1;
    if (t.match(/^#+0.0E\+0$/)) {
        if (r == 0) return "0.0E+0";
        if (r < 0) return "-" + Zb(t, -r);
        var n = t.indexOf(".");
        n === -1 && (n = t.indexOf("E"));
        var a = Math.floor(Math.log(r) * Math.LOG10E) % n;
        if (a < 0 && (a += n), e = (r / Math.pow(10, a)).toPrecision(i + 1 + (n + a) % n), e.indexOf("e") === -1) {
            var o = Math.floor(Math.log(r) * Math.LOG10E);
            for (e.indexOf(".") === -1 ? e = e.charAt(0) + "." + e.substr(1) + "E+" + (o - e.length + a) : e += "E+" + (o - a); e.substr(0, 2) === "0.";) e = e.charAt(0) + e.substr(2, n) + "." + e.substr(2 + n), e = e.replace(/^0+([1-9])/, "$1").replace(/^0+\./, "0.");
            e = e.replace(/\+-/, "-");
        }
        e = e.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/, function(s, l, c, u) {
            return l + c + u.substr(0, (n + a) % n) + "." + u.substr(a) + "E";
        });
    } else e = r.toExponential(i);
    return t.match(/E\+00$/) && e.match(/e[+-]\d$/) && (e = e.substr(0, e.length - 1) + "0" + e.charAt(e.length - 1)), t.match(/E\-/) && e.match(/e\+/) && (e = e.replace(/e\+/, "e")), e.replace("e", "E");
}
var Jb = /# (\?+)( ?)\/( ?)(\d+)/;

function pT(t, r, e) {
    var i = parseInt(t[4], 10),
        n = Math.round(r * i),
        a = Math.floor(n / i),
        o = n - a * i,
        s = i;
    return e + (a === 0 ? "" : "" + a) + " " + (o === 0 ? Ni(" ", t[1].length + 1 + t[4].length) : Dg(o, t[1].length) + t[2] + "/" + t[3] + Mo(s, t[4].length));
}

function mT(t, r, e) {
    return e + (r === 0 ? "" : "" + r) + Ni(" ", t[1].length + 2 + t[4].length);
}
var Qb = /^#*0*\.([0#]+)/,
    $b = /\)[^)]*[0#]/,
    ew = /\(###\) ###\\?-####/;

function ma(t) {
    for (var r = "", e, i = 0; i != t.length; ++i) switch (e = t.charCodeAt(i)) {
        case 35:
            break;
        case 63:
            r += " ";
            break;
        case 48:
            r += "0";
            break;
        default:
            r += String.fromCharCode(e);
    }
    return r;
}

function ob(t, r) {
    var e = Math.pow(10, r);
    return "" + Math.round(t * e) / e;
}

function sb(t, r) {
    var e = t - Math.floor(t),
        i = Math.pow(10, r);
    return r < ("" + Math.round(e * i)).length ? 0 : Math.round(e * i);
}

function gT(t, r) {
    return r < ("" + Math.round((t - Math.floor(t)) * Math.pow(10, r))).length ? 1 : 0;
}

function vT(t) {
    return t < 2147483647 && t > -2147483648 ? "" + (t >= 0 ? t | 0 : t - 1 | 0) : "" + Math.floor(t);
}

function lo(t, r, e) {
    if (t.charCodeAt(0) === 40 && !r.match($b)) {
        var i = r.replace(/\( */, "").replace(/ \)/, "").replace(/\)/, "");
        return e >= 0 ? lo("n", i, e) : "(" + lo("n", i, -e) + ")";
    }
    if (r.charCodeAt(r.length - 1) === 44) return dT(t, r, e);
    if (r.indexOf("%") !== -1) return hT(t, r, e);
    if (r.indexOf("E") !== -1) return Zb(r, e);
    if (r.charCodeAt(0) === 36) return "$" + lo(t, r.substr(r.charAt(1) == " " ? 2 : 1), e);
    var n, a, o, s, l = Math.abs(e),
        c = e < 0 ? "-" : "";
    if (r.match(/^00+$/)) return c + D0(l, r.length);
    if (r.match(/^[#?]+$/)) return n = D0(e, 0), n === "0" && (n = ""), n.length > r.length ? n : ma(r.substr(0, r.length - n.length)) + n;
    if (a = r.match(Jb)) return pT(a, l, c);
    if (r.match(/^#+0+$/)) return c + D0(l, r.length - r.indexOf("0"));
    if (a = r.match(Qb)) return n = ob(e, a[1].length).replace(/^([^\.]+)$/, "$1." + ma(a[1])).replace(/\.$/, "." + ma(a[1])).replace(/\.(\d*)$/, function(m, _) {
        return "." + _ + Ni("0", ma(a[1]).length - _.length);
    }), r.indexOf("0.") !== -1 ? n : n.replace(/^0\./, ".");
    if (r = r.replace(/^#+([0.])/, "$1"), a = r.match(/^(0*)\.(#*)$/)) return c + ob(l, a[2].length).replace(/\.(\d*[1-9])0*$/, ".$1").replace(/^(-?\d*)$/, "$1.").replace(/^0\./, a[1].length ? "0." : ".");
    if (a = r.match(/^#{1,3},##0(\.?)$/)) return c + Ol(D0(l, 0));
    if (a = r.match(/^#,##0\.([#0]*0)$/)) return e < 0 ? "-" + lo(t, r, -e) : Ol("" + (Math.floor(e) + gT(e, a[1].length))) + "." + Mo(sb(e, a[1].length), a[1].length);
    if (a = r.match(/^#,#*,#0/)) return lo(t, r.replace(/^#,#*,/, ""), e);
    if (a = r.match(/^([0#]+)(\\?-([0#]+))+$/)) return n = P0(lo(t, r.replace(/[\\-]/g, ""), e)), o = 0, P0(P0(r.replace(/\\/g, "")).replace(/[0#]/g, function(m) {
        return o < n.length ? n.charAt(o++) : m === "0" ? "0" : "";
    }));
    if (r.match(ew)) return n = lo(t, "##########", e), "(" + n.substr(0, 3) + ") " + n.substr(3, 3) + "-" + n.substr(6);
    var u = "";
    if (a = r.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/)) return o = Math.min(a[4].length, 7), s = xp(l, Math.pow(10, o) - 1, !1), n = "" + c, u = js("n", a[1], s[1]), u.charAt(u.length - 1) == " " && (u = u.substr(0, u.length - 1) + "0"), n += u + a[2] + "/" + a[3], u = gp(s[2], o), u.length < a[4].length && (u = ma(a[4].substr(a[4].length - u.length)) + u), n += u, n;
    if (a = r.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/)) return o = Math.min(Math.max(a[1].length, a[4].length), 7), s = xp(l, Math.pow(10, o) - 1, !0), c + (s[0] || (s[1] ? "" : "0")) + " " + (s[1] ? Dg(s[1], o) + a[2] + "/" + a[3] + gp(s[2], o) : Ni(" ", 2 * o + 1 + a[2].length + a[3].length));
    if (a = r.match(/^[#0?]+$/)) return n = D0(e, 0), r.length <= n.length ? n : ma(r.substr(0, r.length - n.length)) + n;
    if (a = r.match(/^([#0?]+)\.([#0]+)$/)) {
        n = "" + e.toFixed(Math.min(a[2].length, 10)).replace(/([^0])0+$/, "$1"), o = n.indexOf(".");
        var h = r.indexOf(".") - o,
            d = r.length - n.length - h;
        return ma(r.substr(0, h) + n + r.substr(r.length - d));
    }
    if (a = r.match(/^00,000\.([#0]*0)$/)) return o = sb(e, a[1].length), e < 0 ? "-" + lo(t, r, -e) : Ol(vT(e)).replace(/^\d,\d{3}$/, "0$&").replace(/^\d*$/, function(m) {
        return "00," + (m.length < 3 ? Mo(0, 3 - m.length) : "") + m;
    }) + "." + Mo(o, a[1].length);
    switch (r) {
        case "###,##0.00":
            return lo(t, "#,##0.00", e);
        case "###,###":
        case "##,###":
        case "#,###":
            var f = Ol(D0(l, 0));
            return f !== "0" ? c + f : "";
        case "###,###.00":
            return lo(t, "###,##0.00", e).replace(/^0\./, ".");
        case "#,###.00":
            return lo(t, "#,##0.00", e).replace(/^0\./, ".");
        default:
    }
    throw new Error("unsupported format |" + r + "|");
}

function xT(t, r, e) {
    for (var i = r.length - 1; r.charCodeAt(i - 1) === 44;) --i;
    return js(t, r.substr(0, i), e / Math.pow(10, 3 * (r.length - i)));
}

function _T(t, r, e) {
    var i = r.replace(Yb, ""),
        n = r.length - i.length;
    return js(t, i, e * Math.pow(10, 2 * n)) + Ni("%", n);
}

function tw(t, r) {
    var e, i = t.indexOf("E") - t.indexOf(".") - 1;
    if (t.match(/^#+0.0E\+0$/)) {
        if (r == 0) return "0.0E+0";
        if (r < 0) return "-" + tw(t, -r);
        var n = t.indexOf(".");
        n === -1 && (n = t.indexOf("E"));
        var a = Math.floor(Math.log(r) * Math.LOG10E) % n;
        if (a < 0 && (a += n), e = (r / Math.pow(10, a)).toPrecision(i + 1 + (n + a) % n), !e.match(/[Ee]/)) {
            var o = Math.floor(Math.log(r) * Math.LOG10E);
            e.indexOf(".") === -1 ? e = e.charAt(0) + "." + e.substr(1) + "E+" + (o - e.length + a) : e += "E+" + (o - a), e = e.replace(/\+-/, "-");
        }
        e = e.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/, function(s, l, c, u) {
            return l + c + u.substr(0, (n + a) % n) + "." + u.substr(a) + "E";
        });
    } else e = r.toExponential(i);
    return t.match(/E\+00$/) && e.match(/e[+-]\d$/) && (e = e.substr(0, e.length - 1) + "0" + e.charAt(e.length - 1)), t.match(/E\-/) && e.match(/e\+/) && (e = e.replace(/e\+/, "e")), e.replace("e", "E");
}

function ns(t, r, e) {
    if (t.charCodeAt(0) === 40 && !r.match($b)) {
        var i = r.replace(/\( */, "").replace(/ \)/, "").replace(/\)/, "");
        return e >= 0 ? ns("n", i, e) : "(" + ns("n", i, -e) + ")";
    }
    if (r.charCodeAt(r.length - 1) === 44) return xT(t, r, e);
    if (r.indexOf("%") !== -1) return _T(t, r, e);
    if (r.indexOf("E") !== -1) return tw(r, e);
    if (r.charCodeAt(0) === 36) return "$" + ns(t, r.substr(r.charAt(1) == " " ? 2 : 1), e);
    var n, a, o, s, l = Math.abs(e),
        c = e < 0 ? "-" : "";
    if (r.match(/^00+$/)) return c + Mo(l, r.length);
    if (r.match(/^[#?]+$/)) return n = "" + e, e === 0 && (n = ""), n.length > r.length ? n : ma(r.substr(0, r.length - n.length)) + n;
    if (a = r.match(Jb)) return mT(a, l, c);
    if (r.match(/^#+0+$/)) return c + Mo(l, r.length - r.indexOf("0"));
    if (a = r.match(Qb)) return n = ("" + e).replace(/^([^\.]+)$/, "$1." + ma(a[1])).replace(/\.$/, "." + ma(a[1])), n = n.replace(/\.(\d*)$/, function(m, _) {
        return "." + _ + Ni("0", ma(a[1]).length - _.length);
    }), r.indexOf("0.") !== -1 ? n : n.replace(/^0\./, ".");
    if (r = r.replace(/^#+([0.])/, "$1"), a = r.match(/^(0*)\.(#*)$/)) return c + ("" + l).replace(/\.(\d*[1-9])0*$/, ".$1").replace(/^(-?\d*)$/, "$1.").replace(/^0\./, a[1].length ? "0." : ".");
    if (a = r.match(/^#{1,3},##0(\.?)$/)) return c + Ol("" + l);
    if (a = r.match(/^#,##0\.([#0]*0)$/)) return e < 0 ? "-" + ns(t, r, -e) : Ol("" + e) + "." + Ni("0", a[1].length);
    if (a = r.match(/^#,#*,#0/)) return ns(t, r.replace(/^#,#*,/, ""), e);
    if (a = r.match(/^([0#]+)(\\?-([0#]+))+$/)) return n = P0(ns(t, r.replace(/[\\-]/g, ""), e)), o = 0, P0(P0(r.replace(/\\/g, "")).replace(/[0#]/g, function(m) {
        return o < n.length ? n.charAt(o++) : m === "0" ? "0" : "";
    }));
    if (r.match(ew)) return n = ns(t, "##########", e), "(" + n.substr(0, 3) + ") " + n.substr(3, 3) + "-" + n.substr(6);
    var u = "";
    if (a = r.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/)) return o = Math.min(a[4].length, 7), s = xp(l, Math.pow(10, o) - 1, !1), n = "" + c, u = js("n", a[1], s[1]), u.charAt(u.length - 1) == " " && (u = u.substr(0, u.length - 1) + "0"), n += u + a[2] + "/" + a[3], u = gp(s[2], o), u.length < a[4].length && (u = ma(a[4].substr(a[4].length - u.length)) + u), n += u, n;
    if (a = r.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/)) return o = Math.min(Math.max(a[1].length, a[4].length), 7), s = xp(l, Math.pow(10, o) - 1, !0), c + (s[0] || (s[1] ? "" : "0")) + " " + (s[1] ? Dg(s[1], o) + a[2] + "/" + a[3] + gp(s[2], o) : Ni(" ", 2 * o + 1 + a[2].length + a[3].length));
    if (a = r.match(/^[#0?]+$/)) return n = "" + e, r.length <= n.length ? n : ma(r.substr(0, r.length - n.length)) + n;
    if (a = r.match(/^([#0]+)\.([#0]+)$/)) {
        n = "" + e.toFixed(Math.min(a[2].length, 10)).replace(/([^0])0+$/, "$1"), o = n.indexOf(".");
        var h = r.indexOf(".") - o,
            d = r.length - n.length - h;
        return ma(r.substr(0, h) + n + r.substr(r.length - d));
    }
    if (a = r.match(/^00,000\.([#0]*0)$/)) return e < 0 ? "-" + ns(t, r, -e) : Ol("" + e).replace(/^\d,\d{3}$/, "0$&").replace(/^\d*$/, function(m) {
        return "00," + (m.length < 3 ? Mo(0, 3 - m.length) : "") + m;
    }) + "." + Mo(0, a[1].length);
    switch (r) {
        case "###,###":
        case "##,###":
        case "#,###":
            var f = Ol("" + l);
            return f !== "0" ? c + f : "";
        default:
            if (r.match(/\.[0#?]*$/)) return ns(t, r.slice(0, r.lastIndexOf(".")), e) + ma(r.slice(r.lastIndexOf(".")));
    }
    throw new Error("unsupported format |" + r + "|");
}

function js(t, r, e) {
    return (e | 0) === e ? ns(t, r, e) : lo(t, r, e);
}

function yT(t) {
    for (var r = [], e = !1, i = 0, n = 0; i < t.length; ++i) switch (t.charCodeAt(i)) {
        case 34:
            e = !e;
            break;
        case 95:
        case 42:
        case 92:
            ++i;
            break;
        case 59:
            r[r.length] = t.substr(n, i - n), n = i + 1;
    }
    if (r[r.length] = t.substr(n), e === !0) throw new Error("Format |" + t + "| unterminated string ");
    return r;
}
var rw = /\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;

function Ic(t) {
    for (var r = 0, e = "", i = ""; r < t.length;) switch (e = t.charAt(r)) {
        case "G":
            vp(t, r) && (r += 6), r++;
            break;
        case '"':
            for (; t.charCodeAt(++r) !== 34 && r < t.length;);
            ++r;
            break;
        case "\\":
            r += 2;
            break;
        case "_":
            r += 2;
            break;
        case "@":
            ++r;
            break;
        case "B":
        case "b":
            if (t.charAt(r + 1) === "1" || t.charAt(r + 1) === "2") return !0;
        case "M":
        case "D":
        case "Y":
        case "H":
        case "S":
        case "E":
        case "m":
        case "d":
        case "y":
        case "h":
        case "s":
        case "e":
        case "g":
            return !0;
        case "A":
        case "a":
        case "\u4E0A":
            if (t.substr(r, 3).toUpperCase() === "A/P" || t.substr(r, 5).toUpperCase() === "AM/PM" || t.substr(r, 5).toUpperCase() === "\u4E0A\u5348/\u4E0B\u5348") return !0;
            ++r;
            break;
        case "[":
            for (i = e; t.charAt(r++) !== "]" && r < t.length;) i += t.charAt(r);
            if (i.match(rw)) return !0;
            break;
        case ".":
        case "0":
        case "#":
            for (; r < t.length && ("0#?.,E+-%".indexOf(e = t.charAt(++r)) > -1 || e == "\\" && t.charAt(r + 1) == "-" && "0#".indexOf(t.charAt(r + 2)) > -1););
            break;
        case "?":
            for (; t.charAt(++r) === e;);
            break;
        case "*":
            ++r, (t.charAt(r) == " " || t.charAt(r) == "*") && ++r;
            break;
        case "(":
        case ")":
            ++r;
            break;
        case "1":
        case "2":
        case "3":
        case "4":
        case "5":
        case "6":
        case "7":
        case "8":
        case "9":
            for (; r < t.length && "0123456789".indexOf(t.charAt(++r)) > -1;);
            break;
        case " ":
            ++r;
            break;
        default:
            ++r;
            break;
    }
    return !1;
}

function bT(t, r, e, i) {
    for (var n = [], a = "", o = 0, s = "", l = "t", c, u, h, d = "H"; o < t.length;) switch (s = t.charAt(o)) {
        case "G":
            if (!vp(t, o)) throw new Error("unrecognized character " + s + " in " + t);
            n[n.length] = {
                t: "G",
                v: "General"
            }, o += 7;
            break;
        case '"':
            for (a = "";
                (h = t.charCodeAt(++o)) !== 34 && o < t.length;) a += String.fromCharCode(h);
            n[n.length] = {
                t: "t",
                v: a
            }, ++o;
            break;
        case "\\":
            var f = t.charAt(++o),
                m = f === "(" || f === ")" ? f : "t";
            n[n.length] = {
                t: m,
                v: f
            }, ++o;
            break;
        case "_":
            n[n.length] = {
                t: "t",
                v: " "
            }, o += 2;
            break;
        case "@":
            n[n.length] = {
                t: "T",
                v: r
            }, ++o;
            break;
        case "B":
        case "b":
            if (t.charAt(o + 1) === "1" || t.charAt(o + 1) === "2") {
                if (c == null && (c = k0(r, e, t.charAt(o + 1) === "2"), c == null)) return "";
                n[n.length] = {
                    t: "X",
                    v: t.substr(o, 2)
                }, l = s, o += 2;
                break;
            }
        case "M":
        case "D":
        case "Y":
        case "H":
        case "S":
        case "E":
            s = s.toLowerCase();
        case "m":
        case "d":
        case "y":
        case "h":
        case "s":
        case "e":
        case "g":
            if (r < 0 || c == null && (c = k0(r, e), c == null)) return "";
            for (a = s; ++o < t.length && t.charAt(o).toLowerCase() === s;) a += s;
            s === "m" && l.toLowerCase() === "h" && (s = "M"), s === "h" && (s = d), n[n.length] = {
                t: s,
                v: a
            }, l = s;
            break;
        case "A":
        case "a":
        case "\u4E0A":
            var _ = {
                t: s,
                v: s
            };
            if (c == null && (c = k0(r, e)), t.substr(o, 3).toUpperCase() === "A/P" ? (c != null && (_.v = c.H >= 12 ? t.charAt(o + 2) : s), _.t = "T", d = "h", o += 3) : t.substr(o, 5).toUpperCase() === "AM/PM" ? (c != null && (_.v = c.H >= 12 ? "PM" : "AM"), _.t = "T", o += 5, d = "h") : t.substr(o, 5).toUpperCase() === "\u4E0A\u5348/\u4E0B\u5348" ? (c != null && (_.v = c.H >= 12 ? "\u4E0B\u5348" : "\u4E0A\u5348"), _.t = "T", o += 5, d = "h") : (_.t = "t", ++o), c == null && _.t === "T") return "";
            n[n.length] = _, l = s;
            break;
        case "[":
            for (a = s; t.charAt(o++) !== "]" && o < t.length;) a += t.charAt(o);
            if (a.slice(-1) !== "]") throw 'unterminated "[" block: |' + a + "|";
            if (a.match(rw)) {
                if (c == null && (c = k0(r, e), c == null)) return "";
                n[n.length] = {
                    t: "Z",
                    v: a.toLowerCase()
                }, l = a.charAt(1);
            } else a.indexOf("$") > -1 && (a = (a.match(/\$([^-\[\]]*)/) || [])[1] || "$", Ic(t) || (n[n.length] = {
                t: "t",
                v: a
            }));
            break;
        case ".":
            if (c != null) {
                for (a = s; ++o < t.length && (s = t.charAt(o)) === "0";) a += s;
                n[n.length] = {
                    t: "s",
                    v: a
                };
                break;
            }
        case "0":
        case "#":
            for (a = s; ++o < t.length && "0#?.,E+-%".indexOf(s = t.charAt(o)) > -1;) a += s;
            n[n.length] = {
                t: "n",
                v: a
            };
            break;
        case "?":
            for (a = s; t.charAt(++o) === s;) a += s;
            n[n.length] = {
                t: s,
                v: a
            }, l = s;
            break;
        case "*":
            ++o, (t.charAt(o) == " " || t.charAt(o) == "*") && ++o;
            break;
        case "(":
        case ")":
            n[n.length] = {
                t: i === 1 ? "t" : s,
                v: s
            }, ++o;
            break;
        case "1":
        case "2":
        case "3":
        case "4":
        case "5":
        case "6":
        case "7":
        case "8":
        case "9":
            for (a = s; o < t.length && "0123456789".indexOf(t.charAt(++o)) > -1;) a += t.charAt(o);
            n[n.length] = {
                t: "D",
                v: a
            };
            break;
        case " ":
            n[n.length] = {
                t: s,
                v: s
            }, ++o;
            break;
        case "$":
            n[n.length] = {
                t: "t",
                v: "$"
            }, ++o;
            break;
        default:
            if (",$-+/():!^&'~{}<>=\u20ACacfijklopqrtuvwxzP".indexOf(s) === -1) throw new Error("unrecognized character " + s + " in " + t);
            n[n.length] = {
                t: "t",
                v: s
            }, ++o;
            break;
    }
    var x = 0,
        g = 0,
        b;
    for (o = n.length - 1, l = "t"; o >= 0; --o) switch (n[o].t) {
        case "h":
        case "H":
            n[o].t = d, l = "h", x < 1 && (x = 1);
            break;
        case "s":
            (b = n[o].v.match(/\.0+$/)) && (g = Math.max(g, b[0].length - 1), x = 4), x < 3 && (x = 3);
        case "d":
        case "y":
        case "e":
            l = n[o].t;
            break;
        case "M":
            l = n[o].t, x < 2 && (x = 2);
            break;
        case "m":
            l === "s" && (n[o].t = "M", x < 2 && (x = 2));
            break;
        case "X":
            break;
        case "Z":
            x < 1 && n[o].v.match(/[Hh]/) && (x = 1), x < 2 && n[o].v.match(/[Mm]/) && (x = 2), x < 3 && n[o].v.match(/[Ss]/) && (x = 3);
    }
    var w;
    switch (x) {
        case 0:
            break;
        case 1:
        case 2:
        case 3:
            c.u >= .5 && (c.u = 0, ++c.S), c.S >= 60 && (c.S = 0, ++c.M), c.M >= 60 && (c.M = 0, ++c.H), c.H >= 24 && (c.H = 0, ++c.D, w = k0(c.D), w.u = c.u, w.S = c.S, w.M = c.M, w.H = c.H, c = w);
            break;
        case 4:
            switch (g) {
                case 1:
                    c.u = Math.round(c.u * 10) / 10;
                    break;
                case 2:
                    c.u = Math.round(c.u * 100) / 100;
                    break;
                case 3:
                    c.u = Math.round(c.u * 1e3) / 1e3;
                    break;
            }
            c.u >= 1 && (c.u = 0, ++c.S), c.S >= 60 && (c.S = 0, ++c.M), c.M >= 60 && (c.M = 0, ++c.H), c.H >= 24 && (c.H = 0, ++c.D, w = k0(c.D), w.u = c.u, w.S = c.S, w.M = c.M, w.H = c.H, c = w);
            break;
    }
    var T = "",
        E;
    for (o = 0; o < n.length; ++o) switch (n[o].t) {
        case "t":
        case "T":
        case " ":
        case "D":
            break;
        case "X":
            n[o].v = "", n[o].t = ";";
            break;
        case "d":
        case "m":
        case "y":
        case "h":
        case "H":
        case "M":
        case "s":
        case "e":
        case "b":
        case "Z":
            n[o].v = fT(n[o].t.charCodeAt(0), n[o].v, c, g), n[o].t = "t";
            break;
        case "n":
        case "?":
            for (E = o + 1; n[E] != null && ((s = n[E].t) === "?" || s === "D" || (s === " " || s === "t") && n[E + 1] != null && (n[E + 1].t === "?" || n[E + 1].t === "t" && n[E + 1].v === "/") || n[o].t === "(" && (s === " " || s === "n" || s === ")") || s === "t" && (n[E].v === "/" || n[E].v === " " && n[E + 1] != null && n[E + 1].t == "?"));) n[o].v += n[E].v, n[E] = {
                v: "",
                t: ";"
            }, ++E;
            T += n[o].v, o = E - 1;
            break;
        case "G":
            n[o].t = "t", n[o].v = yg(r, e);
            break;
    }
    var L = "",
        P, k;
    if (T.length > 0) {
        T.charCodeAt(0) == 40 ? (P = r < 0 && T.charCodeAt(0) === 45 ? -r : r, k = js("n", T, P)) : (P = r < 0 && i > 1 ? -r : r, k = js("n", T, P), P < 0 && n[0] && n[0].t == "t" && (k = k.substr(1), n[0].v = "-" + n[0].v)), E = k.length - 1;
        var A = n.length;
        for (o = 0; o < n.length; ++o)
            if (n[o] != null && n[o].t != "t" && n[o].v.indexOf(".") > -1) {
                A = o;
                break;
            }
        var N = n.length;
        if (A === n.length && k.indexOf("E") === -1) {
            for (o = n.length - 1; o >= 0; --o) n[o] == null || "n?".indexOf(n[o].t) === -1 || (E >= n[o].v.length - 1 ? (E -= n[o].v.length, n[o].v = k.substr(E + 1, n[o].v.length)) : E < 0 ? n[o].v = "" : (n[o].v = k.substr(0, E + 1), E = -1), n[o].t = "t", N = o);
            E >= 0 && N < n.length && (n[N].v = k.substr(0, E + 1) + n[N].v);
        } else if (A !== n.length && k.indexOf("E") === -1) {
            for (E = k.indexOf(".") - 1, o = A; o >= 0; --o)
                if (!(n[o] == null || "n?".indexOf(n[o].t) === -1)) {
                    for (u = n[o].v.indexOf(".") > -1 && o === A ? n[o].v.indexOf(".") - 1 : n[o].v.length - 1, L = n[o].v.substr(u + 1); u >= 0; --u) E >= 0 && (n[o].v.charAt(u) === "0" || n[o].v.charAt(u) === "#") && (L = k.charAt(E--) + L);
                    n[o].v = L, n[o].t = "t", N = o;
                }
            for (E >= 0 && N < n.length && (n[N].v = k.substr(0, E + 1) + n[N].v), E = k.indexOf(".") + 1, o = A; o < n.length; ++o)
                if (!(n[o] == null || "n?(".indexOf(n[o].t) === -1 && o !== A)) {
                    for (u = n[o].v.indexOf(".") > -1 && o === A ? n[o].v.indexOf(".") + 1 : 0, L = n[o].v.substr(0, u); u < n[o].v.length; ++u) E < k.length && (L += k.charAt(E++));
                    n[o].v = L, n[o].t = "t", N = o;
                }
        }
    }
    for (o = 0; o < n.length; ++o) n[o] != null && "n?".indexOf(n[o].t) > -1 && (P = i > 1 && r < 0 && o > 0 && n[o - 1].v === "-" ? -r : r, n[o].v = js(n[o].t, n[o].v, P), n[o].t = "t");
    var C = "";
    for (o = 0; o !== n.length; ++o) n[o] != null && (C += n[o].v);
    return C;
}
var lb = /\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;

function cb(t, r) {
    if (r == null) return !1;
    var e = parseFloat(r[2]);
    switch (r[1]) {
        case "=":
            if (t == e) return !0;
            break;
        case ">":
            if (t > e) return !0;
            break;
        case "<":
            if (t < e) return !0;
            break;
        case "<>":
            if (t != e) return !0;
            break;
        case ">=":
            if (t >= e) return !0;
            break;
        case "<=":
            if (t <= e) return !0;
            break;
    }
    return !1;
}

function wT(t, r) {
    var e = yT(t),
        i = e.length,
        n = e[i - 1].indexOf("@");
    if (i < 4 && n > -1 && --i, e.length > 4) throw new Error("cannot find right format for |" + e.join("|") + "|");
    if (typeof r != "number") return [4, e.length === 4 || n > -1 ? e[e.length - 1] : "@"];
    switch (typeof r == "number" && !isFinite(r) && (r = 0), e.length) {
        case 1:
            e = n > -1 ? ["General", "General", "General", e[0]] : [e[0], e[0], e[0], "@"];
            break;
        case 2:
            e = n > -1 ? [e[0], e[0], e[0], e[1]] : [e[0], e[1], e[0], "@"];
            break;
        case 3:
            e = n > -1 ? [e[0], e[1], e[0], e[2]] : [e[0], e[1], e[2], "@"];
            break;
        case 4:
            break;
    }
    var a = r > 0 ? e[0] : r < 0 ? e[1] : e[2];
    if (e[0].indexOf("[") === -1 && e[1].indexOf("[") === -1) return [i, a];
    if (e[0].match(/\[[=<>]/) != null || e[1].match(/\[[=<>]/) != null) {
        var o = e[0].match(lb),
            s = e[1].match(lb);
        return cb(r, o) ? [i, e[0]] : cb(r, s) ? [i, e[1]] : [i, e[o != null && s != null ? 2 : 1]];
    }
    return [i, a];
}

function qs(t, r, e) {
    e == null && (e = {});
    var i = "";
    switch (typeof t) {
        case "string":
            t == "m/d/yy" && e.dateNF ? i = e.dateNF : i = t;
            break;
        case "number":
            t == 14 && e.dateNF ? i = e.dateNF : i = (e.table != null ? e.table : Di)[t], i == null && (i = e.table && e.table[ab[t]] || Di[ab[t]]), i == null && (i = nT[t] || "General");
            break;
    }
    if (vp(i, 0)) return yg(r, e);
    r instanceof Date && (r = Wn(r, e.date1904));
    var n = wT(i, r);
    if (vp(n[1])) return yg(r, e);
    if (r === !0) r = "TRUE";
    else if (r === !1) r = "FALSE";
    else {
        if (r === "" || r == null) return "";
        if (isNaN(r) && n[1].indexOf("0") > -1) return "#NUM!";
        if (!isFinite(r) && n[1].indexOf("0") > -1) return "#DIV/0!";
    }
    return bT(n[1], r, e, n[0]);
}

function iw(t, r) {
    if (typeof r != "number") {
        r = +r || -1;
        for (var e = 0; e < 392; ++e) {
            if (Di[e] == null) {
                r < 0 && (r = e);
                continue;
            }
            if (Di[e] == t) {
                r = e;
                break;
            }
        }
        r < 0 && (r = 391);
    }
    return Di[r] = t, r;
}

function Op(t) {
    for (var r = 0; r != 392; ++r) t[r] !== void 0 && iw(t[r], r);
}

function Np() {
    Di = iT();
}
var _p = /[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;

function ST(t) {
    var r = typeof t == "number" ? Di[t] : t;
    return r = r.replace(_p, "(\\d+)"), _p.lastIndex = 0, new RegExp("^" + r + "$");
}

function CT(t, r, e) {
    var i = -1,
        n = -1,
        a = -1,
        o = -1,
        s = -1,
        l = -1;
    (r.match(_p) || []).forEach(function(h, d) {
        var f = parseInt(e[d + 1], 10);
        switch (h.toLowerCase().charAt(0)) {
            case "y":
                i = f;
                break;
            case "d":
                a = f;
                break;
            case "h":
                o = f;
                break;
            case "s":
                l = f;
                break;
            case "m":
                o >= 0 ? s = f : n = f;
                break;
        }
    }), _p.lastIndex = 0, l >= 0 && s == -1 && n >= 0 && (s = n, n = -1);
    var c = ("" + (i >= 0 ? i : new Date().getFullYear())).slice(-4) + "-" + ("00" + (n >= 1 ? n : 1)).slice(-2) + "-" + ("00" + (a >= 1 ? a : 1)).slice(-2);
    c.length == 7 && (c = "0" + c), c.length == 8 && (c = "20" + c);
    var u = ("00" + (o >= 0 ? o : 0)).slice(-2) + ":" + ("00" + (s >= 0 ? s : 0)).slice(-2) + ":" + ("00" + (l >= 0 ? l : 0)).slice(-2);
    return o == -1 && s == -1 && l == -1 ? c : i == -1 && n == -1 && a == -1 ? u : c + "T" + u;
}
var AT = {
    "d.m": "d\\.m"
};

function TT(t, r) {
    return iw(AT[t] || t, r);
}
var ub = function() {
        var t = {};
        t.version = "1.2.0";

        function r() {
            for (var P = 0, k = new Array(256), A = 0; A != 256; ++A) P = A, P = P & 1 ? -306674912 ^ P >>> 1 : P >>> 1, P = P & 1 ? -306674912 ^ P >>> 1 : P >>> 1, P = P & 1 ? -306674912 ^ P >>> 1 : P >>> 1, P = P & 1 ? -306674912 ^ P >>> 1 : P >>> 1, P = P & 1 ? -306674912 ^ P >>> 1 : P >>> 1, P = P & 1 ? -306674912 ^ P >>> 1 : P >>> 1, P = P & 1 ? -306674912 ^ P >>> 1 : P >>> 1, P = P & 1 ? -306674912 ^ P >>> 1 : P >>> 1, k[A] = P;
            return typeof Int32Array < "u" ? new Int32Array(k) : k;
        }
        var e = r();

        function i(P) {
            var k = 0,
                A = 0,
                N = 0,
                C = typeof Int32Array < "u" ? new Int32Array(4096) : new Array(4096);
            for (N = 0; N != 256; ++N) C[N] = P[N];
            for (N = 0; N != 256; ++N)
                for (A = P[N], k = 256 + N; k < 4096; k += 256) A = C[k] = A >>> 8 ^ P[A & 255];
            var F = [];
            for (N = 1; N != 16; ++N) F[N - 1] = typeof Int32Array < "u" && typeof C.subarray == "function" ? C.subarray(N * 256, N * 256 + 256) : C.slice(N * 256, N * 256 + 256);
            return F;
        }
        var n = i(e),
            a = n[0],
            o = n[1],
            s = n[2],
            l = n[3],
            c = n[4],
            u = n[5],
            h = n[6],
            d = n[7],
            f = n[8],
            m = n[9],
            _ = n[10],
            x = n[11],
            g = n[12],
            b = n[13],
            w = n[14];

        function T(P, k) {
            for (var A = k ^ -1, N = 0, C = P.length; N < C;) A = A >>> 8 ^ e[(A ^ P.charCodeAt(N++)) & 255];
            return ~A;
        }

        function E(P, k) {
            for (var A = k ^ -1, N = P.length - 15, C = 0; C < N;) A = w[P[C++] ^ A & 255] ^ b[P[C++] ^ A >> 8 & 255] ^ g[P[C++] ^ A >> 16 & 255] ^ x[P[C++] ^ A >>> 24] ^ _[P[C++]] ^ m[P[C++]] ^ f[P[C++]] ^ d[P[C++]] ^ h[P[C++]] ^ u[P[C++]] ^ c[P[C++]] ^ l[P[C++]] ^ s[P[C++]] ^ o[P[C++]] ^ a[P[C++]] ^ e[P[C++]];
            for (N += 15; C < N;) A = A >>> 8 ^ e[(A ^ P[C++]) & 255];
            return ~A;
        }

        function L(P, k) {
            for (var A = k ^ -1, N = 0, C = P.length, F = 0, W = 0; N < C;) F = P.charCodeAt(N++), F < 128 ? A = A >>> 8 ^ e[(A ^ F) & 255] : F < 2048 ? (A = A >>> 8 ^ e[(A ^ (192 | F >> 6 & 31)) & 255], A = A >>> 8 ^ e[(A ^ (128 | F & 63)) & 255]) : F >= 55296 && F < 57344 ? (F = (F & 1023) + 64, W = P.charCodeAt(N++) & 1023, A = A >>> 8 ^ e[(A ^ (240 | F >> 8 & 7)) & 255], A = A >>> 8 ^ e[(A ^ (128 | F >> 2 & 63)) & 255], A = A >>> 8 ^ e[(A ^ (128 | W >> 6 & 15 | (F & 3) << 4)) & 255], A = A >>> 8 ^ e[(A ^ (128 | W & 63)) & 255]) : (A = A >>> 8 ^ e[(A ^ (224 | F >> 12 & 15)) & 255], A = A >>> 8 ^ e[(A ^ (128 | F >> 6 & 63)) & 255], A = A >>> 8 ^ e[(A ^ (128 | F & 63)) & 255]);
            return ~A;
        }
        return t.table = e, t.bstr = T, t.buf = E, t.str = L, t;
    }(),
    _i = function() {
        var r = {};
        r.version = "1.2.2";

        function e(V, fe) {
            for (var te = V.split("/"), ae = fe.split("/"), se = 0, de = 0, Ne = Math.min(te.length, ae.length); se < Ne; ++se) {
                if (de = te[se].length - ae[se].length) return de;
                if (te[se] != ae[se]) return te[se] < ae[se] ? -1 : 1;
            }
            return te.length - ae.length;
        }

        function i(V) {
            if (V.charAt(V.length - 1) == "/") return V.slice(0, -1).indexOf("/") === -1 ? V : i(V.slice(0, -1));
            var fe = V.lastIndexOf("/");
            return fe === -1 ? V : V.slice(0, fe + 1);
        }

        function n(V) {
            if (V.charAt(V.length - 1) == "/") return n(V.slice(0, -1));
            var fe = V.lastIndexOf("/");
            return fe === -1 ? V : V.slice(fe + 1);
        }

        function a(V, fe) {
            typeof fe == "string" && (fe = new Date(fe));
            var te = fe.getHours();
            te = te << 6 | fe.getMinutes(), te = te << 5 | fe.getSeconds() >>> 1, V.write_shift(2, te);
            var ae = fe.getFullYear() - 1980;
            ae = ae << 4 | fe.getMonth() + 1, ae = ae << 5 | fe.getDate(), V.write_shift(2, ae);
        }

        function o(V) {
            var fe = V.read_shift(2) & 65535,
                te = V.read_shift(2) & 65535,
                ae = new Date(),
                se = te & 31;
            te >>>= 5;
            var de = te & 15;
            te >>>= 4, ae.setMilliseconds(0), ae.setFullYear(te + 1980), ae.setMonth(de - 1), ae.setDate(se);
            var Ne = fe & 31;
            fe >>>= 5;
            var He = fe & 63;
            return fe >>>= 6, ae.setHours(fe), ae.setMinutes(He), ae.setSeconds(Ne << 1), ae;
        }

        function s(V) {
            ga(V, 0);
            for (var fe = {}, te = 0; V.l <= V.length - 4;) {
                var ae = V.read_shift(2),
                    se = V.read_shift(2),
                    de = V.l + se,
                    Ne = {};
                switch (ae) {
                    case 21589:
                        te = V.read_shift(1), te & 1 && (Ne.mtime = V.read_shift(4)), se > 5 && (te & 2 && (Ne.atime = V.read_shift(4)), te & 4 && (Ne.ctime = V.read_shift(4))), Ne.mtime && (Ne.mt = new Date(Ne.mtime * 1e3));
                        break;
                    case 1:
                        {
                            var He = V.read_shift(4),
                                Me = V.read_shift(4);Ne.usz = Me * Math.pow(2, 32) + He,
                            He = V.read_shift(4),
                            Me = V.read_shift(4),
                            Ne.csz = Me * Math.pow(2, 32) + He;
                        }
                        break;
                }
                V.l = de, fe[ae] = Ne;
            }
            return fe;
        }
        var l;

        function c() {
            return l || (l = hf);
        }

        function u(V, fe) {
            if (V[0] == 80 && V[1] == 75) return dr(V, fe);
            if ((V[0] | 32) == 109 && (V[1] | 32) == 105) return Qt(V, fe);
            if (V.length < 512) throw new Error("CFB file size " + V.length + " < 512");
            var te = 3,
                ae = 512,
                se = 0,
                de = 0,
                Ne = 0,
                He = 0,
                Me = 0,
                Le = [],
                Be = V.slice(0, 512);
            ga(Be, 0);
            var at = h(Be);
            switch (te = at[0], te) {
                case 3:
                    ae = 512;
                    break;
                case 4:
                    ae = 4096;
                    break;
                case 0:
                    if (at[1] == 0) return dr(V, fe);
                default:
                    throw new Error("Major Version: Expected 3 or 4 saw " + te);
            }
            ae !== 512 && (Be = V.slice(0, ae), ga(Be, 28));
            var lt = V.slice(0, ae);
            d(Be, te);
            var _t = Be.read_shift(4, "i");
            if (te === 3 && _t !== 0) throw new Error("# Directory Sectors: Expected 0 saw " + _t);
            Be.l += 4, Ne = Be.read_shift(4, "i"), Be.l += 4, Be.chk("00100000", "Mini Stream Cutoff Size: "), He = Be.read_shift(4, "i"), se = Be.read_shift(4, "i"), Me = Be.read_shift(4, "i"), de = Be.read_shift(4, "i");
            for (var ht = -1, ot = 0; ot < 109 && (ht = Be.read_shift(4, "i"), !(ht < 0)); ++ot) Le[ot] = ht;
            var nr = f(V, ae);
            x(Me, de, nr, ae, Le);
            var Jr = b(nr, Ne, Le, ae);
            Ne < Jr.length && (Jr[Ne].name = "!Directory"), se > 0 && He !== W && (Jr[He].name = "!MiniFAT"), Jr[Le[0]].name = "!FAT", Jr.fat_addrs = Le, Jr.ssz = ae;
            var mi = {},
                bi = [],
                Fn = [],
                wo = [];
            w(Ne, Jr, nr, bi, se, mi, Fn, He), m(Fn, wo, bi), bi.shift();
            var jo = {
                FileIndex: Fn,
                FullPaths: wo
            };
            return fe && fe.raw && (jo.raw = {
                header: lt,
                sectors: nr
            }), jo;
        }

        function h(V) {
            if (V[V.l] == 80 && V[V.l + 1] == 75) return [0, 0];
            V.chk(I, "Header Signature: "), V.l += 16;
            var fe = V.read_shift(2, "u");
            return [V.read_shift(2, "u"), fe];
        }

        function d(V, fe) {
            var te = 9;
            switch (V.l += 2, te = V.read_shift(2)) {
                case 9:
                    if (fe != 3) throw new Error("Sector Shift: Expected 9 saw " + te);
                    break;
                case 12:
                    if (fe != 4) throw new Error("Sector Shift: Expected 12 saw " + te);
                    break;
                default:
                    throw new Error("Sector Shift: Expected 9 or 12 saw " + te);
            }
            V.chk("0600", "Mini Sector Shift: "), V.chk("000000000000", "Reserved: ");
        }

        function f(V, fe) {
            for (var te = Math.ceil(V.length / fe) - 1, ae = [], se = 1; se < te; ++se) ae[se - 1] = V.slice(se * fe, (se + 1) * fe);
            return ae[te - 1] = V.slice(te * fe), ae;
        }

        function m(V, fe, te) {
            for (var ae = 0, se = 0, de = 0, Ne = 0, He = 0, Me = te.length, Le = [], Be = []; ae < Me; ++ae) Le[ae] = Be[ae] = ae, fe[ae] = te[ae];
            for (; He < Be.length; ++He) ae = Be[He], se = V[ae].L, de = V[ae].R, Ne = V[ae].C, Le[ae] === ae && (se !== -1 && Le[se] !== se && (Le[ae] = Le[se]), de !== -1 && Le[de] !== de && (Le[ae] = Le[de])), Ne !== -1 && (Le[Ne] = ae), se !== -1 && ae != Le[ae] && (Le[se] = Le[ae], Be.lastIndexOf(se) < He && Be.push(se)), de !== -1 && ae != Le[ae] && (Le[de] = Le[ae], Be.lastIndexOf(de) < He && Be.push(de));
            for (ae = 1; ae < Me; ++ae) Le[ae] === ae && (de !== -1 && Le[de] !== de ? Le[ae] = Le[de] : se !== -1 && Le[se] !== se && (Le[ae] = Le[se]));
            for (ae = 1; ae < Me; ++ae)
                if (V[ae].type !== 0) {
                    if (He = ae, He != Le[He])
                        do He = Le[He], fe[ae] = fe[He] + "/" + fe[ae]; while (He !== 0 && Le[He] !== -1 && He != Le[He]);
                    Le[ae] = -1;
                }
            for (fe[0] += "/", ae = 1; ae < Me; ++ae) V[ae].type !== 2 && (fe[ae] += "/");
        }

        function _(V, fe, te) {
            for (var ae = V.start, se = V.size, de = [], Ne = ae; te && se > 0 && Ne >= 0;) de.push(fe.slice(Ne * F, Ne * F + F)), se -= F, Ne = kc(te, Ne * 4);
            return de.length === 0 ? Ue(0) : un(de).slice(0, V.size);
        }

        function x(V, fe, te, ae, se) {
            var de = W;
            if (V === W) {
                if (fe !== 0) throw new Error("DIFAT chain shorter than expected");
            } else if (V !== -1) {
                var Ne = te[V],
                    He = (ae >>> 2) - 1;
                if (!Ne) return;
                for (var Me = 0; Me < He && (de = kc(Ne, Me * 4)) !== W; ++Me) se.push(de);
                fe >= 1 && x(kc(Ne, ae - 4), fe - 1, te, ae, se);
            }
        }

        function g(V, fe, te, ae, se) {
            var de = [],
                Ne = [];
            se || (se = []);
            var He = ae - 1,
                Me = 0,
                Le = 0;
            for (Me = fe; Me >= 0;) {
                se[Me] = !0, de[de.length] = Me, Ne.push(V[Me]);
                var Be = te[Math.floor(Me * 4 / ae)];
                if (Le = Me * 4 & He, ae < 4 + Le) throw new Error("FAT boundary crossed: " + Me + " 4 " + ae);
                if (!V[Be]) break;
                Me = kc(V[Be], Le);
            }
            return {
                nodes: de,
                data: vb([Ne])
            };
        }

        function b(V, fe, te, ae) {
            var se = V.length,
                de = [],
                Ne = [],
                He = [],
                Me = [],
                Le = ae - 1,
                Be = 0,
                at = 0,
                lt = 0,
                _t = 0;
            for (Be = 0; Be < se; ++Be)
                if (He = [], lt = Be + fe, lt >= se && (lt -= se), !Ne[lt]) {
                    Me = [];
                    var ht = [];
                    for (at = lt; at >= 0;) {
                        ht[at] = !0, Ne[at] = !0, He[He.length] = at, Me.push(V[at]);
                        var ot = te[Math.floor(at * 4 / ae)];
                        if (_t = at * 4 & Le, ae < 4 + _t) throw new Error("FAT boundary crossed: " + at + " 4 " + ae);
                        if (!V[ot] || (at = kc(V[ot], _t), ht[at])) break;
                    }
                    de[lt] = {
                        nodes: He,
                        data: vb([Me])
                    };
                }
            return de;
        }

        function w(V, fe, te, ae, se, de, Ne, He) {
            for (var Me = 0, Le = ae.length ? 2 : 0, Be = fe[V].data, at = 0, lt = 0, _t; at < Be.length; at += 128) {
                var ht = Be.slice(at, at + 128);
                ga(ht, 64), lt = ht.read_shift(2), _t = Mp(ht, 0, lt - Le), ae.push(_t);
                var ot = {
                        name: _t,
                        type: ht.read_shift(1),
                        color: ht.read_shift(1),
                        L: ht.read_shift(4, "i"),
                        R: ht.read_shift(4, "i"),
                        C: ht.read_shift(4, "i"),
                        clsid: ht.read_shift(16),
                        state: ht.read_shift(4, "i"),
                        start: 0,
                        size: 0
                    },
                    nr = ht.read_shift(2) + ht.read_shift(2) + ht.read_shift(2) + ht.read_shift(2);
                nr !== 0 && (ot.ct = T(ht, ht.l - 8));
                var Jr = ht.read_shift(2) + ht.read_shift(2) + ht.read_shift(2) + ht.read_shift(2);
                Jr !== 0 && (ot.mt = T(ht, ht.l - 8)), ot.start = ht.read_shift(4, "i"), ot.size = ht.read_shift(4, "i"), ot.size < 0 && ot.start < 0 && (ot.size = ot.type = 0, ot.start = W, ot.name = ""), ot.type === 5 ? (Me = ot.start, se > 0 && Me !== W && (fe[Me].name = "!StreamData")) : ot.size >= 4096 ? (ot.storage = "fat", fe[ot.start] === void 0 && (fe[ot.start] = g(te, ot.start, fe.fat_addrs, fe.ssz)), fe[ot.start].name = ot.name, ot.content = fe[ot.start].data.slice(0, ot.size)) : (ot.storage = "minifat", ot.size < 0 ? ot.size = 0 : Me !== W && ot.start !== W && fe[Me] && (ot.content = _(ot, fe[Me].data, (fe[He] || {}).data))), ot.content && ga(ot.content, 0), de[_t] = ot, Ne.push(ot);
            }
        }

        function T(V, fe) {
            return new Date((En(V, fe + 4) / 1e7 * Math.pow(2, 32) + En(V, fe) / 1e7 - 11644473600) * 1e3);
        }

        function E(V, fe) {
            return c(), u(l.readFileSync(V), fe);
        }

        function L(V, fe) {
            var te = fe && fe.type;
            switch (te || ti && Buffer.isBuffer(V) && (te = "buffer"), te || "base64") {
                case "file":
                    return E(V, fe);
                case "base64":
                    return u(qa(Nl(V)), fe);
                case "binary":
                    return u(qa(V), fe);
            }
            return u(V, fe);
        }

        function P(V, fe) {
            var te = fe || {},
                ae = te.root || "Root Entry";
            if (V.FullPaths || (V.FullPaths = []), V.FileIndex || (V.FileIndex = []), V.FullPaths.length !== V.FileIndex.length) throw new Error("inconsistent CFB structure");
            V.FullPaths.length === 0 && (V.FullPaths[0] = ae + "/", V.FileIndex[0] = {
                name: ae,
                type: 5
            }), te.CLSID && (V.FileIndex[0].clsid = te.CLSID), k(V);
        }

        function k(V) {
            var fe = "Sh33tJ5";
            if (!_i.find(V, "/" + fe)) {
                var te = Ue(4);
                te[0] = 55, te[1] = te[3] = 50, te[2] = 54, V.FileIndex.push({
                    name: fe,
                    type: 2,
                    content: te,
                    size: 4,
                    L: 69,
                    R: 69,
                    C: 69
                }), V.FullPaths.push(V.FullPaths[0] + fe), A(V);
            }
        }

        function A(V, fe) {
            P(V);
            for (var te = !1, ae = !1, se = V.FullPaths.length - 1; se >= 0; --se) {
                var de = V.FileIndex[se];
                switch (de.type) {
                    case 0:
                        ae ? te = !0 : (V.FileIndex.pop(), V.FullPaths.pop());
                        break;
                    case 1:
                    case 2:
                    case 5:
                        ae = !0, isNaN(de.R * de.L * de.C) && (te = !0), de.R > -1 && de.L > -1 && de.R == de.L && (te = !0);
                        break;
                    default:
                        te = !0;
                        break;
                }
            }
            if (!(!te && !fe)) {
                var Ne = new Date(1987, 1, 19),
                    He = 0,
                    Me = Object.create ? Object.create(null) : {},
                    Le = [];
                for (se = 0; se < V.FullPaths.length; ++se) Me[V.FullPaths[se]] = !0, V.FileIndex[se].type !== 0 && Le.push([V.FullPaths[se], V.FileIndex[se]]);
                for (se = 0; se < Le.length; ++se) {
                    var Be = i(Le[se][0]);
                    for (ae = Me[Be]; !ae;) {
                        for (; i(Be) && !Me[i(Be)];) Be = i(Be);
                        Le.push([Be, {
                            name: n(Be).replace("/", ""),
                            type: 1,
                            clsid: le,
                            ct: Ne,
                            mt: Ne,
                            content: null
                        }]), Me[Be] = !0, Be = i(Le[se][0]), ae = Me[Be];
                    }
                }
                for (Le.sort(function(_t, ht) {
                        return e(_t[0], ht[0]);
                    }), V.FullPaths = [], V.FileIndex = [], se = 0; se < Le.length; ++se) V.FullPaths[se] = Le[se][0], V.FileIndex[se] = Le[se][1];
                for (se = 0; se < Le.length; ++se) {
                    var at = V.FileIndex[se],
                        lt = V.FullPaths[se];
                    if (at.name = n(lt).replace("/", ""), at.L = at.R = at.C = -(at.color = 1), at.size = at.content ? at.content.length : 0, at.start = 0, at.clsid = at.clsid || le, se === 0) at.C = Le.length > 1 ? 1 : -1, at.size = 0, at.type = 5;
                    else if (lt.slice(-1) == "/") {
                        for (He = se + 1; He < Le.length && i(V.FullPaths[He]) != lt; ++He);
                        for (at.C = He >= Le.length ? -1 : He, He = se + 1; He < Le.length && i(V.FullPaths[He]) != i(lt); ++He);
                        at.R = He >= Le.length ? -1 : He, at.type = 1;
                    } else i(V.FullPaths[se + 1] || "") == i(lt) && (at.R = se + 1), at.type = 2;
                }
            }
        }

        function N(V, fe) {
            var te = fe || {};
            if (te.fileType == "mad") return yo(V, te);
            switch (A(V), te.fileType) {
                case "zip":
                    return Ir(V, te);
            }
            var ae = function(_t) {
                    for (var ht = 0, ot = 0, nr = 0; nr < _t.FileIndex.length; ++nr) {
                        var Jr = _t.FileIndex[nr];
                        if (Jr.content) {
                            var mi = Jr.content.length;
                            mi > 0 && (mi < 4096 ? ht += mi + 63 >> 6 : ot += mi + 511 >> 9);
                        }
                    }
                    for (var bi = _t.FullPaths.length + 3 >> 2, Fn = ht + 7 >> 3, wo = ht + 127 >> 7, jo = Fn + ot + bi + wo, to = jo + 127 >> 7, el = to <= 109 ? 0 : Math.ceil((to - 109) / 127); jo + to + el + 127 >> 7 > to;) el = ++to <= 109 ? 0 : Math.ceil((to - 109) / 127);
                    var nn = [1, el, to, wo, bi, ot, ht, 0];
                    return _t.FileIndex[0].size = ht << 6, nn[7] = (_t.FileIndex[0].start = nn[0] + nn[1] + nn[2] + nn[3] + nn[4] + nn[5]) + (nn[6] + 7 >> 3), nn;
                }(V),
                se = Ue(ae[7] << 9),
                de = 0,
                Ne = 0; {
                for (de = 0; de < 8; ++de) se.write_shift(1, U[de]);
                for (de = 0; de < 8; ++de) se.write_shift(2, 0);
                for (se.write_shift(2, 62), se.write_shift(2, 3), se.write_shift(2, 65534), se.write_shift(2, 9), se.write_shift(2, 6), de = 0; de < 3; ++de) se.write_shift(2, 0);
                for (se.write_shift(4, 0), se.write_shift(4, ae[2]), se.write_shift(4, ae[0] + ae[1] + ae[2] + ae[3] - 1), se.write_shift(4, 0), se.write_shift(4, 4096), se.write_shift(4, ae[3] ? ae[0] + ae[1] + ae[2] - 1 : W), se.write_shift(4, ae[3]), se.write_shift(-4, ae[1] ? ae[0] - 1 : W), se.write_shift(4, ae[1]), de = 0; de < 109; ++de) se.write_shift(-4, de < ae[2] ? ae[1] + de : -1);
            }
            if (ae[1])
                for (Ne = 0; Ne < ae[1]; ++Ne) {
                    for (; de < 236 + Ne * 127; ++de) se.write_shift(-4, de < ae[2] ? ae[1] + de : -1);
                    se.write_shift(-4, Ne === ae[1] - 1 ? W : Ne + 1);
                }
            var He = function(_t) {
                for (Ne += _t; de < Ne - 1; ++de) se.write_shift(-4, de + 1);
                _t && (++de, se.write_shift(-4, W));
            };
            for (Ne = de = 0, Ne += ae[1]; de < Ne; ++de) se.write_shift(-4, H.DIFSECT);
            for (Ne += ae[2]; de < Ne; ++de) se.write_shift(-4, H.FATSECT);
            He(ae[3]), He(ae[4]);
            for (var Me = 0, Le = 0, Be = V.FileIndex[0]; Me < V.FileIndex.length; ++Me) Be = V.FileIndex[Me], Be.content && (Le = Be.content.length, !(Le < 4096) && (Be.start = Ne, He(Le + 511 >> 9)));
            for (He(ae[6] + 7 >> 3); se.l & 511;) se.write_shift(-4, H.ENDOFCHAIN);
            for (Ne = de = 0, Me = 0; Me < V.FileIndex.length; ++Me) Be = V.FileIndex[Me], Be.content && (Le = Be.content.length, !(!Le || Le >= 4096) && (Be.start = Ne, He(Le + 63 >> 6)));
            for (; se.l & 511;) se.write_shift(-4, H.ENDOFCHAIN);
            for (de = 0; de < ae[4] << 2; ++de) {
                var at = V.FullPaths[de];
                if (!at || at.length === 0) {
                    for (Me = 0; Me < 17; ++Me) se.write_shift(4, 0);
                    for (Me = 0; Me < 3; ++Me) se.write_shift(4, -1);
                    for (Me = 0; Me < 12; ++Me) se.write_shift(4, 0);
                    continue;
                }
                Be = V.FileIndex[de], de === 0 && (Be.start = Be.size ? Be.start - 1 : W);
                var lt = de === 0 && te.root || Be.name;
                if (lt.length > 31 && (console.error("Name " + lt + " will be truncated to " + lt.slice(0, 31)), lt = lt.slice(0, 31)), Le = 2 * (lt.length + 1), se.write_shift(64, lt, "utf16le"), se.write_shift(2, Le), se.write_shift(1, Be.type), se.write_shift(1, Be.color), se.write_shift(-4, Be.L), se.write_shift(-4, Be.R), se.write_shift(-4, Be.C), Be.clsid) se.write_shift(16, Be.clsid, "hex");
                else
                    for (Me = 0; Me < 4; ++Me) se.write_shift(4, 0);
                se.write_shift(4, Be.state || 0), se.write_shift(4, 0), se.write_shift(4, 0), se.write_shift(4, 0), se.write_shift(4, 0), se.write_shift(4, Be.start), se.write_shift(4, Be.size), se.write_shift(4, 0);
            }
            for (de = 1; de < V.FileIndex.length; ++de)
                if (Be = V.FileIndex[de], Be.size >= 4096)
                    if (se.l = Be.start + 1 << 9, ti && Buffer.isBuffer(Be.content)) Be.content.copy(se, se.l, 0, Be.size), se.l += Be.size + 511 & -512;
                    else {
                        for (Me = 0; Me < Be.size; ++Me) se.write_shift(1, Be.content[Me]);
                        for (; Me & 511; ++Me) se.write_shift(1, 0);
                    }
            for (de = 1; de < V.FileIndex.length; ++de)
                if (Be = V.FileIndex[de], Be.size > 0 && Be.size < 4096)
                    if (ti && Buffer.isBuffer(Be.content)) Be.content.copy(se, se.l, 0, Be.size), se.l += Be.size + 63 & -64;
                    else {
                        for (Me = 0; Me < Be.size; ++Me) se.write_shift(1, Be.content[Me]);
                        for (; Me & 63; ++Me) se.write_shift(1, 0);
                    }
            if (ti) se.l = se.length;
            else
                for (; se.l < se.length;) se.write_shift(1, 0);
            return se;
        }

        function C(V, fe) {
            var te = V.FullPaths.map(function(Me) {
                    return Me.toUpperCase();
                }),
                ae = te.map(function(Me) {
                    var Le = Me.split("/");
                    return Le[Le.length - (Me.slice(-1) == "/" ? 2 : 1)];
                }),
                se = !1;
            fe.charCodeAt(0) === 47 ? (se = !0, fe = te[0].slice(0, -1) + fe) : se = fe.indexOf("/") !== -1;
            var de = fe.toUpperCase(),
                Ne = se === !0 ? te.indexOf(de) : ae.indexOf(de);
            if (Ne !== -1) return V.FileIndex[Ne];
            var He = !de.match(sp);
            for (de = de.replace(E0, ""), He && (de = de.replace(sp, "!")), Ne = 0; Ne < te.length; ++Ne)
                if ((He ? te[Ne].replace(sp, "!") : te[Ne]).replace(E0, "") == de || (He ? ae[Ne].replace(sp, "!") : ae[Ne]).replace(E0, "") == de) return V.FileIndex[Ne];
            return null;
        }
        var F = 64,
            W = -2,
            I = "d0cf11e0a1b11ae1",
            U = [208, 207, 17, 224, 161, 177, 26, 225],
            le = "00000000000000000000000000000000",
            H = {
                MAXREGSECT: -6,
                DIFSECT: -4,
                FATSECT: -3,
                ENDOFCHAIN: W,
                FREESECT: -1,
                HEADER_SIGNATURE: I,
                HEADER_MINOR_VERSION: "3e00",
                MAXREGSID: -6,
                NOSTREAM: -1,
                HEADER_CLSID: le,
                EntryTypes: ["unknown", "storage", "stream", "lockbytes", "property", "root"]
            };

        function pe(V, fe, te) {
            c();
            var ae = N(V, te);
            l.writeFileSync(fe, ae);
        }

        function _e(V) {
            for (var fe = new Array(V.length), te = 0; te < V.length; ++te) fe[te] = String.fromCharCode(V[te]);
            return fe.join("");
        }

        function Fe(V, fe) {
            var te = N(V, fe);
            switch (fe && fe.type || "buffer") {
                case "file":
                    return c(), l.writeFileSync(fe.filename, te), te;
                case "binary":
                    return typeof te == "string" ? te : _e(te);
                case "base64":
                    return mp(typeof te == "string" ? te : _e(te));
                case "buffer":
                    if (ti) return Buffer.isBuffer(te) ? te : fs(te);
                case "array":
                    return typeof te == "string" ? qa(te) : te;
            }
            return te;
        }
        var Te;

        function O(V) {
            try {
                var fe = V.InflateRaw,
                    te = new fe();
                if (te._processChunk(new Uint8Array([3, 0]), te._finishFlushFlag), te.bytesRead) Te = V;
                else throw new Error("zlib does not expose bytesRead");
            } catch (ae) {
                console.error("cannot use native zlib: " + (ae.message || ae));
            }
        }

        function j(V, fe) {
            if (!Te) return Yr(V, fe);
            var te = Te.InflateRaw,
                ae = new te(),
                se = ae._processChunk(V.slice(V.l), ae._finishFlushFlag);
            return V.l += ae.bytesRead, se;
        }

        function X(V) {
            return Te ? Te.deflateRawSync(V) : fr(V);
        }
        var me = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15],
            xe = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258],
            be = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577];

        function B(V) {
            var fe = (V << 1 | V << 11) & 139536 | (V << 5 | V << 15) & 558144;
            return (fe >> 16 | fe >> 8 | fe) & 255;
        }
        for (var ne = typeof Uint8Array < "u", Z = ne ? new Uint8Array(256) : [], J = 0; J < 256; ++J) Z[J] = B(J);

        function ye(V, fe) {
            var te = Z[V & 255];
            return fe <= 8 ? te >>> 8 - fe : (te = te << 8 | Z[V >> 8 & 255], fe <= 16 ? te >>> 16 - fe : (te = te << 8 | Z[V >> 16 & 255], te >>> 24 - fe));
        }

        function je(V, fe) {
            var te = fe & 7,
                ae = fe >>> 3;
            return (V[ae] | (te <= 6 ? 0 : V[ae + 1] << 8)) >>> te & 3;
        }

        function Qe(V, fe) {
            var te = fe & 7,
                ae = fe >>> 3;
            return (V[ae] | (te <= 5 ? 0 : V[ae + 1] << 8)) >>> te & 7;
        }

        function q(V, fe) {
            var te = fe & 7,
                ae = fe >>> 3;
            return (V[ae] | (te <= 4 ? 0 : V[ae + 1] << 8)) >>> te & 15;
        }

        function ze(V, fe) {
            var te = fe & 7,
                ae = fe >>> 3;
            return (V[ae] | (te <= 3 ? 0 : V[ae + 1] << 8)) >>> te & 31;
        }

        function gt(V, fe) {
            var te = fe & 7,
                ae = fe >>> 3;
            return (V[ae] | (te <= 1 ? 0 : V[ae + 1] << 8)) >>> te & 127;
        }

        function ft(V, fe, te) {
            var ae = fe & 7,
                se = fe >>> 3,
                de = (1 << te) - 1,
                Ne = V[se] >>> ae;
            return te < 8 - ae || (Ne |= V[se + 1] << 8 - ae, te < 16 - ae) || (Ne |= V[se + 2] << 16 - ae, te < 24 - ae) || (Ne |= V[se + 3] << 24 - ae), Ne & de;
        }

        function Re(V, fe, te) {
            var ae = fe & 7,
                se = fe >>> 3;
            return ae <= 5 ? V[se] |= (te & 7) << ae : (V[se] |= te << ae & 255, V[se + 1] = (te & 7) >> 8 - ae), fe + 3;
        }

        function pt(V, fe, te) {
            var ae = fe & 7,
                se = fe >>> 3;
            return te = (te & 1) << ae, V[se] |= te, fe + 1;
        }

        function ct(V, fe, te) {
            var ae = fe & 7,
                se = fe >>> 3;
            return te <<= ae, V[se] |= te & 255, te >>>= 8, V[se + 1] = te, fe + 8;
        }

        function xt(V, fe, te) {
            var ae = fe & 7,
                se = fe >>> 3;
            return te <<= ae, V[se] |= te & 255, te >>>= 8, V[se + 1] = te & 255, V[se + 2] = te >>> 8, fe + 16;
        }

        function yt(V, fe) {
            var te = V.length,
                ae = 2 * te > fe ? 2 * te : fe + 5,
                se = 0;
            if (te >= fe) return V;
            if (ti) {
                var de = rb(ae);
                if (V.copy) V.copy(de);
                else
                    for (; se < V.length; ++se) de[se] = V[se];
                return de;
            } else if (ne) {
                var Ne = new Uint8Array(ae);
                if (Ne.set) Ne.set(V);
                else
                    for (; se < te; ++se) Ne[se] = V[se];
                return Ne;
            }
            return V.length = ae, V;
        }

        function Pe(V) {
            for (var fe = new Array(V), te = 0; te < V; ++te) fe[te] = 0;
            return fe;
        }

        function Je(V, fe, te) {
            var ae = 1,
                se = 0,
                de = 0,
                Ne = 0,
                He = 0,
                Me = V.length,
                Le = ne ? new Uint16Array(32) : Pe(32);
            for (de = 0; de < 32; ++de) Le[de] = 0;
            for (de = Me; de < te; ++de) V[de] = 0;
            Me = V.length;
            var Be = ne ? new Uint16Array(Me) : Pe(Me);
            for (de = 0; de < Me; ++de) Le[se = V[de]]++, ae < se && (ae = se), Be[de] = 0;
            for (Le[0] = 0, de = 1; de <= ae; ++de) Le[de + 16] = He = He + Le[de - 1] << 1;
            for (de = 0; de < Me; ++de) He = V[de], He != 0 && (Be[de] = Le[He + 16]++);
            var at = 0;
            for (de = 0; de < Me; ++de)
                if (at = V[de], at != 0)
                    for (He = ye(Be[de], ae) >> ae - at, Ne = (1 << ae + 4 - at) - 1; Ne >= 0; --Ne) fe[He | Ne << at] = at & 15 | de << 4;
            return ae;
        }
        var er = ne ? new Uint16Array(512) : Pe(512),
            ur = ne ? new Uint16Array(32) : Pe(32);
        if (!ne) {
            for (var Gt = 0; Gt < 512; ++Gt) er[Gt] = 0;
            for (Gt = 0; Gt < 32; ++Gt) ur[Gt] = 0;
        }(function() {
            for (var V = [], fe = 0; fe < 32; fe++) V.push(5);
            Je(V, ur, 32);
            var te = [];
            for (fe = 0; fe <= 143; fe++) te.push(8);
            for (; fe <= 255; fe++) te.push(9);
            for (; fe <= 279; fe++) te.push(7);
            for (; fe <= 287; fe++) te.push(8);
            Je(te, er, 288);
        })();
        var Ct = function() {
            for (var fe = ne ? new Uint8Array(32768) : [], te = 0, ae = 0; te < be.length - 1; ++te)
                for (; ae < be[te + 1]; ++ae) fe[ae] = te;
            for (; ae < 32768; ++ae) fe[ae] = 29;
            var se = ne ? new Uint8Array(259) : [];
            for (te = 0, ae = 0; te < xe.length - 1; ++te)
                for (; ae < xe[te + 1]; ++ae) se[ae] = te;

            function de(He, Me) {
                for (var Le = 0; Le < He.length;) {
                    var Be = Math.min(65535, He.length - Le),
                        at = Le + Be == He.length;
                    for (Me.write_shift(1, +at), Me.write_shift(2, Be), Me.write_shift(2, ~Be & 65535); Be-- > 0;) Me[Me.l++] = He[Le++];
                }
                return Me.l;
            }

            function Ne(He, Me) {
                for (var Le = 0, Be = 0, at = ne ? new Uint16Array(32768) : []; Be < He.length;) {
                    var lt = Math.min(65535, He.length - Be);
                    if (lt < 10) {
                        for (Le = Re(Me, Le, +(Be + lt == He.length)), Le & 7 && (Le += 8 - (Le & 7)), Me.l = Le / 8 | 0, Me.write_shift(2, lt), Me.write_shift(2, ~lt & 65535); lt-- > 0;) Me[Me.l++] = He[Be++];
                        Le = Me.l * 8;
                        continue;
                    }
                    Le = Re(Me, Le, +(Be + lt == He.length) + 2);
                    for (var _t = 0; lt-- > 0;) {
                        var ht = He[Be];
                        _t = (_t << 5 ^ ht) & 32767;
                        var ot = -1,
                            nr = 0;
                        if ((ot = at[_t]) && (ot |= Be & -32768, ot > Be && (ot -= 32768), ot < Be))
                            for (; He[ot + nr] == He[Be + nr] && nr < 250;) ++nr;
                        if (nr > 2) {
                            ht = se[nr], ht <= 22 ? Le = ct(Me, Le, Z[ht + 1] >> 1) - 1 : (ct(Me, Le, 3), Le += 5, ct(Me, Le, Z[ht - 23] >> 5), Le += 3);
                            var Jr = ht < 8 ? 0 : ht - 4 >> 2;
                            Jr > 0 && (xt(Me, Le, nr - xe[ht]), Le += Jr), ht = fe[Be - ot], Le = ct(Me, Le, Z[ht] >> 3), Le -= 3;
                            var mi = ht < 4 ? 0 : ht - 2 >> 1;
                            mi > 0 && (xt(Me, Le, Be - ot - be[ht]), Le += mi);
                            for (var bi = 0; bi < nr; ++bi) at[_t] = Be & 32767, _t = (_t << 5 ^ He[Be]) & 32767, ++Be;
                            lt -= nr - 1;
                        } else ht <= 143 ? ht = ht + 48 : Le = pt(Me, Le, 1), Le = ct(Me, Le, Z[ht]), at[_t] = Be & 32767, ++Be;
                    }
                    Le = ct(Me, Le, 0) - 1;
                }
                return Me.l = (Le + 7) / 8 | 0, Me.l;
            }
            return function(Me, Le) {
                return Me.length < 8 ? de(Me, Le) : Ne(Me, Le);
            };
        }();

        function fr(V) {
            var fe = Ue(50 + Math.floor(V.length * 1.1)),
                te = Ct(V, fe);
            return fe.slice(0, te);
        }
        var kt = ne ? new Uint16Array(32768) : Pe(32768),
            Zt = ne ? new Uint16Array(32768) : Pe(32768),
            ir = ne ? new Uint16Array(128) : Pe(128),
            lr = 1,
            _r = 1;

        function Gr(V, fe) {
            var te = ze(V, fe) + 257;
            fe += 5;
            var ae = ze(V, fe) + 1;
            fe += 5;
            var se = q(V, fe) + 4;
            fe += 4;
            for (var de = 0, Ne = ne ? new Uint8Array(19) : Pe(19), He = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], Me = 1, Le = ne ? new Uint8Array(8) : Pe(8), Be = ne ? new Uint8Array(8) : Pe(8), at = Ne.length, lt = 0; lt < se; ++lt) Ne[me[lt]] = de = Qe(V, fe), Me < de && (Me = de), Le[de]++, fe += 3;
            var _t = 0;
            for (Le[0] = 0, lt = 1; lt <= Me; ++lt) Be[lt] = _t = _t + Le[lt - 1] << 1;
            for (lt = 0; lt < at; ++lt)(_t = Ne[lt]) != 0 && (He[lt] = Be[_t]++);
            var ht = 0;
            for (lt = 0; lt < at; ++lt)
                if (ht = Ne[lt], ht != 0) {
                    _t = Z[He[lt]] >> 8 - ht;
                    for (var ot = (1 << 7 - ht) - 1; ot >= 0; --ot) ir[_t | ot << ht] = ht & 7 | lt << 3;
                }
            var nr = [];
            for (Me = 1; nr.length < te + ae;) switch (_t = ir[gt(V, fe)], fe += _t & 7, _t >>>= 3) {
                case 16:
                    for (de = 3 + je(V, fe), fe += 2, _t = nr[nr.length - 1]; de-- > 0;) nr.push(_t);
                    break;
                case 17:
                    for (de = 3 + Qe(V, fe), fe += 3; de-- > 0;) nr.push(0);
                    break;
                case 18:
                    for (de = 11 + gt(V, fe), fe += 7; de-- > 0;) nr.push(0);
                    break;
                default:
                    nr.push(_t), Me < _t && (Me = _t);
                    break;
            }
            var Jr = nr.slice(0, te),
                mi = nr.slice(te);
            for (lt = te; lt < 286; ++lt) Jr[lt] = 0;
            for (lt = ae; lt < 30; ++lt) mi[lt] = 0;
            return lr = Je(Jr, kt, 286), _r = Je(mi, Zt, 30), fe;
        }

        function Pt(V, fe) {
            if (V[0] == 3 && !(V[1] & 3)) return [Ec(fe), 2];
            for (var te = 0, ae = 0, se = rb(fe || 1 << 18), de = 0, Ne = se.length >>> 0, He = 0, Me = 0;
                (ae & 1) == 0;) {
                if (ae = Qe(V, te), te += 3, ae >>> 1) ae >> 1 == 1 ? (He = 9, Me = 5) : (te = Gr(V, te), He = lr, Me = _r);
                else {
                    te & 7 && (te += 8 - (te & 7));
                    var Le = V[te >>> 3] | V[(te >>> 3) + 1] << 8;
                    if (te += 32, Le > 0)
                        for (!fe && Ne < de + Le && (se = yt(se, de + Le), Ne = se.length); Le-- > 0;) se[de++] = V[te >>> 3], te += 8;
                    continue;
                }
                for (;;) {
                    !fe && Ne < de + 32767 && (se = yt(se, de + 32767), Ne = se.length);
                    var Be = ft(V, te, He),
                        at = ae >>> 1 == 1 ? er[Be] : kt[Be];
                    if (te += at & 15, at >>>= 4, (at >>> 8 & 255) === 0) se[de++] = at;
                    else {
                        if (at == 256) break;
                        at -= 257;
                        var lt = at < 8 ? 0 : at - 4 >> 2;
                        lt > 5 && (lt = 0);
                        var _t = de + xe[at];
                        lt > 0 && (_t += ft(V, te, lt), te += lt), Be = ft(V, te, Me), at = ae >>> 1 == 1 ? ur[Be] : Zt[Be], te += at & 15, at >>>= 4;
                        var ht = at < 4 ? 0 : at - 2 >> 1,
                            ot = be[at];
                        for (ht > 0 && (ot += ft(V, te, ht), te += ht), !fe && Ne < _t && (se = yt(se, _t + 100), Ne = se.length); de < _t;) se[de] = se[de - ot], ++de;
                    }
                }
            }
            return fe ? [se, te + 7 >>> 3] : [se.slice(0, de), te + 7 >>> 3];
        }

        function Yr(V, fe) {
            var te = V.slice(V.l || 0),
                ae = Pt(te, fe);
            return V.l += ae[1], ae[0];
        }

        function Jt(V, fe) {
            if (V) typeof console < "u" && console.error(fe);
            else throw new Error(fe);
        }

        function dr(V, fe) {
            var te = V;
            ga(te, 0);
            var ae = [],
                se = [],
                de = {
                    FileIndex: ae,
                    FullPaths: se
                };
            P(de, {
                root: fe.root
            });
            for (var Ne = te.length - 4;
                (te[Ne] != 80 || te[Ne + 1] != 75 || te[Ne + 2] != 5 || te[Ne + 3] != 6) && Ne >= 0;) --Ne;
            te.l = Ne + 4, te.l += 4;
            var He = te.read_shift(2);
            te.l += 6;
            var Me = te.read_shift(4);
            for (te.l = Me, Ne = 0; Ne < He; ++Ne) {
                te.l += 20;
                var Le = te.read_shift(4),
                    Be = te.read_shift(4),
                    at = te.read_shift(2),
                    lt = te.read_shift(2),
                    _t = te.read_shift(2);
                te.l += 8;
                var ht = te.read_shift(4),
                    ot = s(te.slice(te.l + at, te.l + at + lt));
                te.l += at + lt + _t;
                var nr = te.l;
                te.l = ht + 4, ot && ot[1] && ((ot[1] || {}).usz && (Be = ot[1].usz), (ot[1] || {}).csz && (Le = ot[1].csz)), yi(te, Le, Be, de, ot), te.l = nr;
            }
            return de;
        }

        function yi(V, fe, te, ae, se) {
            V.l += 2;
            var de = V.read_shift(2),
                Ne = V.read_shift(2),
                He = o(V);
            if (de & 8257) throw new Error("Unsupported ZIP encryption");
            for (var Me = V.read_shift(4), Le = V.read_shift(4), Be = V.read_shift(4), at = V.read_shift(2), lt = V.read_shift(2), _t = "", ht = 0; ht < at; ++ht) _t += String.fromCharCode(V[V.l++]);
            if (lt) {
                var ot = s(V.slice(V.l, V.l + lt));
                (ot[21589] || {}).mt && (He = ot[21589].mt), (ot[1] || {}).usz && (Be = ot[1].usz), (ot[1] || {}).csz && (Le = ot[1].csz), se && ((se[21589] || {}).mt && (He = se[21589].mt), (se[1] || {}).usz && (Be = se[1].usz), (se[1] || {}).csz && (Le = se[1].csz));
            }
            V.l += lt;
            var nr = V.slice(V.l, V.l + Le);
            switch (Ne) {
                case 8:
                    nr = j(V, Be);
                    break;
                case 0:
                    V.l += Le;
                    break;
                default:
                    throw new Error("Unsupported ZIP Compression method " + Ne);
            }
            var Jr = !1;
            de & 8 && (Me = V.read_shift(4), Me == 134695760 && (Me = V.read_shift(4), Jr = !0), Le = V.read_shift(4), Be = V.read_shift(4)), Le != fe && Jt(Jr, "Bad compressed size: " + fe + " != " + Le), Be != te && Jt(Jr, "Bad uncompressed size: " + te + " != " + Be), Gn(ae, _t, nr, {
                unsafe: !0,
                mt: He
            });
        }

        function Ir(V, fe) {
            var te = fe || {},
                ae = [],
                se = [],
                de = Ue(1),
                Ne = te.compression ? 8 : 0,
                He = 0,
                Me = !1;
            Me && (He |= 8);
            var Le = 0,
                Be = 0,
                at = 0,
                lt = 0,
                _t = V.FullPaths[0],
                ht = _t,
                ot = V.FileIndex[0],
                nr = [],
                Jr = 0;
            for (Le = 1; Le < V.FullPaths.length; ++Le)
                if (ht = V.FullPaths[Le].slice(_t.length), ot = V.FileIndex[Le], !(!ot.size || !ot.content || Array.isArray(ot.content) && ot.content.length == 0 || ht == "Sh33tJ5")) {
                    var mi = at,
                        bi = Ue(ht.length);
                    for (Be = 0; Be < ht.length; ++Be) bi.write_shift(1, ht.charCodeAt(Be) & 127);
                    bi = bi.slice(0, bi.l), nr[lt] = typeof ot.content == "string" ? ub.bstr(ot.content, 0) : ub.buf(ot.content, 0);
                    var Fn = typeof ot.content == "string" ? qa(ot.content) : ot.content;
                    Ne == 8 && (Fn = X(Fn)), de = Ue(30), de.write_shift(4, 67324752), de.write_shift(2, 20), de.write_shift(2, He), de.write_shift(2, Ne), ot.mt ? a(de, ot.mt) : de.write_shift(4, 0), de.write_shift(-4, He & 8 ? 0 : nr[lt]), de.write_shift(4, He & 8 ? 0 : Fn.length), de.write_shift(4, He & 8 ? 0 : ot.content.length), de.write_shift(2, bi.length), de.write_shift(2, 0), at += de.length, ae.push(de), at += bi.length, ae.push(bi), at += Fn.length, ae.push(Fn), He & 8 && (de = Ue(12), de.write_shift(-4, nr[lt]), de.write_shift(4, Fn.length), de.write_shift(4, ot.content.length), at += de.l, ae.push(de)), de = Ue(46), de.write_shift(4, 33639248), de.write_shift(2, 0), de.write_shift(2, 20), de.write_shift(2, He), de.write_shift(2, Ne), de.write_shift(4, 0), de.write_shift(-4, nr[lt]), de.write_shift(4, Fn.length), de.write_shift(4, ot.content.length), de.write_shift(2, bi.length), de.write_shift(2, 0), de.write_shift(2, 0), de.write_shift(2, 0), de.write_shift(2, 0), de.write_shift(4, 0), de.write_shift(4, mi), Jr += de.l, se.push(de), Jr += bi.length, se.push(bi), ++lt;
                }
            return de = Ue(22), de.write_shift(4, 101010256), de.write_shift(2, 0), de.write_shift(2, 0), de.write_shift(2, lt), de.write_shift(2, lt), de.write_shift(4, Jr), de.write_shift(4, at), de.write_shift(2, 0), un([un(ae), un(se), de]);
        }
        var qt = {
            htm: "text/html",
            xml: "text/xml",
            gif: "image/gif",
            jpg: "image/jpeg",
            png: "image/png",
            mso: "application/x-mso",
            thmx: "application/vnd.ms-officetheme",
            sh33tj5: "application/octet-stream"
        };

        function Zr(V, fe) {
            if (V.ctype) return V.ctype;
            var te = V.name || "",
                ae = te.match(/\.([^\.]+)$/);
            return ae && qt[ae[1]] || fe && (ae = (te = fe).match(/[\.\\]([^\.\\])+$/), ae && qt[ae[1]]) ? qt[ae[1]] : "application/octet-stream";
        }

        function _s(V) {
            for (var fe = mp(V), te = [], ae = 0; ae < fe.length; ae += 76) te.push(fe.slice(ae, ae + 76));
            return te.join(`\r
`) + `\r
`;
        }

        function kn(V) {
            var fe = V.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g, function(Le) {
                var Be = Le.charCodeAt(0).toString(16).toUpperCase();
                return "=" + (Be.length == 1 ? "0" + Be : Be);
            });
            fe = fe.replace(/ $/mg, "=20").replace(/\t$/mg, "=09"), fe.charAt(0) == `
` && (fe = "=0D" + fe.slice(1)), fe = fe.replace(/\r(?!\n)/mg, "=0D").replace(/\n\n/mg, `
=0A`).replace(/([^\r\n])\n/mg, "$1=0A");
            for (var te = [], ae = fe.split(`\r
`), se = 0; se < ae.length; ++se) {
                var de = ae[se];
                if (de.length == 0) {
                    te.push("");
                    continue;
                }
                for (var Ne = 0; Ne < de.length;) {
                    var He = 76,
                        Me = de.slice(Ne, Ne + He);
                    Me.charAt(He - 1) == "=" ? He-- : Me.charAt(He - 2) == "=" ? He -= 2 : Me.charAt(He - 3) == "=" && (He -= 3), Me = de.slice(Ne, Ne + He), Ne += He, Ne < de.length && (Me += "="), te.push(Me);
                }
            }
            return te.join(`\r
`);
        }

        function _o(V) {
            for (var fe = [], te = 0; te < V.length; ++te) {
                for (var ae = V[te]; te <= V.length && ae.charAt(ae.length - 1) == "=";) ae = ae.slice(0, ae.length - 1) + V[++te];
                fe.push(ae);
            }
            for (var se = 0; se < fe.length; ++se) fe[se] = fe[se].replace(/[=][0-9A-Fa-f]{2}/g, function(de) {
                return String.fromCharCode(parseInt(de.slice(1), 16));
            });
            return qa(fe.join(`\r
`));
        }

        function eo(V, fe, te) {
            for (var ae = "", se = "", de = "", Ne, He = 0; He < 10; ++He) {
                var Me = fe[He];
                if (!Me || Me.match(/^\s*$/)) break;
                var Le = Me.match(/^([^:]*?):\s*([^\s].*)$/);
                if (Le) switch (Le[1].toLowerCase()) {
                    case "content-location":
                        ae = Le[2].trim();
                        break;
                    case "content-type":
                        de = Le[2].trim();
                        break;
                    case "content-transfer-encoding":
                        se = Le[2].trim();
                        break;
                }
            }
            switch (++He, se.toLowerCase()) {
                case "base64":
                    Ne = qa(Nl(fe.slice(He).join("")));
                    break;
                case "quoted-printable":
                    Ne = _o(fe.slice(He));
                    break;
                default:
                    throw new Error("Unsupported Content-Transfer-Encoding " + se);
            }
            var Be = Gn(V, ae.slice(te.length), Ne, {
                unsafe: !0
            });
            de && (Be.ctype = de);
        }

        function Qt(V, fe) {
            if (_e(V.slice(0, 13)).toLowerCase() != "mime-version:") throw new Error("Unsupported MAD header");
            var te = fe && fe.root || "",
                ae = (ti && Buffer.isBuffer(V) ? V.toString("binary") : _e(V)).split(`\r
`),
                se = 0,
                de = "";
            for (se = 0; se < ae.length; ++se)
                if (de = ae[se], !!/^Content-Location:/i.test(de) && (de = de.slice(de.indexOf("file")), te || (te = de.slice(0, de.lastIndexOf("/") + 1)), de.slice(0, te.length) != te))
                    for (; te.length > 0 && (te = te.slice(0, te.length - 1), te = te.slice(0, te.lastIndexOf("/") + 1), de.slice(0, te.length) != te););
            var Ne = (ae[1] || "").match(/boundary="(.*?)"/);
            if (!Ne) throw new Error("MAD cannot find boundary");
            var He = "--" + (Ne[1] || ""),
                Me = [],
                Le = [],
                Be = {
                    FileIndex: Me,
                    FullPaths: Le
                };
            P(Be);
            var at, lt = 0;
            for (se = 0; se < ae.length; ++se) {
                var _t = ae[se];
                _t !== He && _t !== He + "--" || (lt++ && eo(Be, ae.slice(at, se), te), at = se);
            }
            return Be;
        }

        function yo(V, fe) {
            var te = fe || {},
                ae = te.boundary || "SheetJS";
            ae = "------=" + ae;
            for (var se = ["MIME-Version: 1.0", 'Content-Type: multipart/related; boundary="' + ae.slice(2) + '"', "", "", ""], de = V.FullPaths[0], Ne = de, He = V.FileIndex[0], Me = 1; Me < V.FullPaths.length; ++Me)
                if (Ne = V.FullPaths[Me].slice(de.length), He = V.FileIndex[Me], !(!He.size || !He.content || Ne == "Sh33tJ5")) {
                    Ne = Ne.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g, function(nr) {
                        return "_x" + nr.charCodeAt(0).toString(16) + "_";
                    }).replace(/[\u0080-\uFFFF]/g, function(nr) {
                        return "_u" + nr.charCodeAt(0).toString(16) + "_";
                    });
                    for (var Le = He.content, Be = ti && Buffer.isBuffer(Le) ? Le.toString("binary") : _e(Le), at = 0, lt = Math.min(1024, Be.length), _t = 0, ht = 0; ht <= lt; ++ht)(_t = Be.charCodeAt(ht)) >= 32 && _t < 128 && ++at;
                    var ot = at >= lt * 4 / 5;
                    se.push(ae), se.push("Content-Location: " + (te.root || "file:///C:/SheetJS/") + Ne), se.push("Content-Transfer-Encoding: " + (ot ? "quoted-printable" : "base64")), se.push("Content-Type: " + Zr(He, Ne)), se.push(""), se.push(ot ? kn(Be) : _s(Be));
                }
            return se.push(ae + `--\r
`), se.join(`\r
`);
        }

        function bo(V) {
            var fe = {};
            return P(fe, V), fe;
        }

        function Gn(V, fe, te, ae) {
            var se = ae && ae.unsafe;
            se || P(V);
            var de = !se && _i.find(V, fe);
            if (!de) {
                var Ne = V.FullPaths[0];
                fe.slice(0, Ne.length) == Ne ? Ne = fe : (Ne.slice(-1) != "/" && (Ne += "/"), Ne = (Ne + fe).replace("//", "/")), de = {
                    name: n(fe),
                    type: 2
                }, V.FileIndex.push(de), V.FullPaths.push(Ne), se || _i.utils.cfb_gc(V);
            }
            return de.content = te, de.size = te ? te.length : 0, ae && (ae.CLSID && (de.clsid = ae.CLSID), ae.mt && (de.mt = ae.mt), ae.ct && (de.ct = ae.ct)), de;
        }

        function Ca(V, fe) {
            P(V);
            var te = _i.find(V, fe);
            if (te) {
                for (var ae = 0; ae < V.FileIndex.length; ++ae)
                    if (V.FileIndex[ae] == te) return V.FileIndex.splice(ae, 1), V.FullPaths.splice(ae, 1), !0;
            }
            return !1;
        }

        function Ei(V, fe, te) {
            P(V);
            var ae = _i.find(V, fe);
            if (ae) {
                for (var se = 0; se < V.FileIndex.length; ++se)
                    if (V.FileIndex[se] == ae) return V.FileIndex[se].name = n(te), V.FullPaths[se] = te, !0;
            }
            return !1;
        }

        function rn(V) {
            A(V, !0);
        }
        return r.find = C, r.read = L, r.parse = u, r.write = Fe, r.writeFile = pe, r.utils = {
            cfb_new: bo,
            cfb_add: Gn,
            cfb_del: Ca,
            cfb_mov: Ei,
            cfb_gc: rn,
            ReadShift: pf,
            CheckField: mw,
            prep_blob: ga,
            bconcat: un,
            use_zlib: O,
            _deflateRaw: fr,
            _inflateRaw: Yr,
            consts: H
        }, r;
    }(),
    hf;

function fb(t) {
    return typeof t == "string" ? Ip(t) : Array.isArray(t) ? $A(t) : t;
}

function Df(t, r, e) {
    if (typeof hf < "u" && hf.writeFileSync) return e ? hf.writeFileSync(t, r, e) : hf.writeFileSync(t, r);
    if (typeof Deno < "u") {
        if (e && typeof r == "string") switch (e) {
            case "utf8":
                r = new TextEncoder(e).encode(r);
                break;
            case "binary":
                r = Ip(r);
                break;
            default:
                throw new Error("Unsupported encoding " + e);
        }
        return Deno.writeFileSync(t, r);
    }
    var i = e == "utf8" ? Ws(r) : r;
    if (typeof IE_SaveFile < "u") return IE_SaveFile(i, t);
    if (typeof Blob < "u") {
        var n = new Blob([fb(i)], {
            type: "application/octet-stream"
        });
        if (typeof navigator < "u" && navigator.msSaveBlob) return navigator.msSaveBlob(n, t);
        if (typeof saveAs < "u") return saveAs(n, t);
        if (typeof URL < "u" && typeof document < "u" && document.createElement && URL.createObjectURL) {
            var a = URL.createObjectURL(n);
            if (typeof chrome == "object" && typeof(chrome.downloads || {}).download == "function") return URL.revokeObjectURL && typeof setTimeout < "u" && setTimeout(function() {
                URL.revokeObjectURL(a);
            }, 6e4), chrome.downloads.download({
                url: a,
                filename: t,
                saveAs: !0
            });
            var o = document.createElement("a");
            if (o.download != null) return o.download = t, o.href = a, document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL && typeof setTimeout < "u" && setTimeout(function() {
                URL.revokeObjectURL(a);
            }, 6e4), a;
        } else if (typeof URL < "u" && !URL.createObjectURL && typeof chrome == "object") {
            var s = "data:application/octet-stream;base64," + QA(new Uint8Array(fb(i)));
            return chrome.downloads.download({
                url: s,
                filename: t,
                saveAs: !0
            });
        }
    }
    if (typeof $ < "u" && typeof File < "u" && typeof Folder < "u") try {
        var l = File(t);
        return l.open("w"), l.encoding = "binary", Array.isArray(r) && (r = Pc(r)), l.write(r), l.close(), r;
    } catch (c) {
        if (!c.message || c.message.indexOf("onstruct") == -1) throw c;
    }
    throw new Error("cannot save file " + t);
}

function fn(t) {
    for (var r = Object.keys(t), e = [], i = 0; i < r.length; ++i) Object.prototype.hasOwnProperty.call(t, r[i]) && e.push(r[i]);
    return e;
}

function hb(t, r) {
    for (var e = [], i = fn(t), n = 0; n !== i.length; ++n) e[t[i[n]][r]] == null && (e[t[i[n]][r]] = i[n]);
    return e;
}

function Fg(t) {
    for (var r = [], e = fn(t), i = 0; i !== e.length; ++i) r[t[e[i]]] = e[i];
    return r;
}

function Lp(t) {
    for (var r = [], e = fn(t), i = 0; i !== e.length; ++i) r[t[e[i]]] = parseInt(e[i], 10);
    return r;
}

function DT(t) {
    for (var r = [], e = fn(t), i = 0; i !== e.length; ++i) r[t[e[i]]] == null && (r[t[e[i]]] = []), r[t[e[i]]].push(e[i]);
    return r;
}
var nw = Date.UTC(1899, 11, 30, 0, 0, 0),
    kT = Date.UTC(1899, 11, 31, 0, 0, 0),
    FT = Date.UTC(1904, 0, 1, 0, 0, 0);

function Wn(t, r) {
    var e = t.getTime(),
        i = (e - nw) / (24 * 60 * 60 * 1e3);
    return r ? (i -= 1462, i < -1402 ? i - 1 : i) : i < 60 ? i - 1 : i;
}

function I0(t) {
    if (t >= 60 && t < 61) return t;
    var r = new Date();
    return r.setTime((t > 60 ? t : t + 1) * 24 * 60 * 60 * 1e3 + nw), r;
}
var ET = /^(\d+):(\d+)(:\d+)?(\.\d+)?$/,
    PT = /^(\d+)-(\d+)-(\d+)$/,
    aw = /^(\d+)-(\d+)-(\d+)[T ](\d+):(\d+)(:\d+)?(\.\d+)?$/;

function Ea(t, r) {
    if (t instanceof Date) return t;
    var e = t.match(ET);
    if (e) return new Date((r ? FT : kT) + ((parseInt(e[1], 10) * 60 + parseInt(e[2], 10)) * 60 + (e[3] ? parseInt(e[3].slice(1), 10) : 0)) * 1e3 + (e[4] ? parseInt((e[4] + "000").slice(1, 4), 10) : 0));
    if (e = t.match(PT), e) return new Date(Date.UTC(+e[1], +e[2] - 1, +e[3], 0, 0, 0, 0));
    if (e = t.match(aw), e) return new Date(Date.UTC(+e[1], +e[2] - 1, +e[3], +e[4], +e[5], e[6] && parseInt(e[6].slice(1), 10) || 0, e[7] && parseInt((e[7] + "0000").slice(1, 4), 10) || 0));
    var i = new Date(t);
    return i;
}

function Eg(t, r) {
    if (ti && Buffer.isBuffer(t)) {
        if (r && yf) {
            if (t[0] == 255 && t[1] == 254) return Ws(t.slice(2).toString("utf16le"));
            if (t[1] == 254 && t[2] == 255) return Ws(ZA(t.slice(2).toString("binary")));
        }
        return t.toString("binary");
    }
    if (typeof TextDecoder < "u") try {
        if (r) {
            if (t[0] == 255 && t[1] == 254) return Ws(new TextDecoder("utf-16le").decode(t.slice(2)));
            if (t[0] == 254 && t[1] == 255) return Ws(new TextDecoder("utf-16be").decode(t.slice(2)));
        }
        var e = {
            "\u20AC": "\x80",
            "\u201A": "\x82",
            ƒ: "\x83",
            "\u201E": "\x84",
            "\u2026": "\x85",
            "\u2020": "\x86",
            "\u2021": "\x87",
            "\u02C6": "\x88",
            "\u2030": "\x89",
            Š: "\x8A",
            "\u2039": "\x8B",
            Œ: "\x8C",
            Ž: "\x8E",
            "\u2018": "\x91",
            "\u2019": "\x92",
            "\u201C": "\x93",
            "\u201D": "\x94",
            "\u2022": "\x95",
            "\u2013": "\x96",
            "\u2014": "\x97",
            "\u02DC": "\x98",
            "\u2122": "\x99",
            š: "\x9A",
            "\u203A": "\x9B",
            œ: "\x9C",
            ž: "\x9E",
            Ÿ: "\x9F"
        };
        return Array.isArray(t) && (t = new Uint8Array(t)), new TextDecoder("latin1").decode(t).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g, function(a) {
            return e[a] || a;
        });
    } catch {}
    var i = [],
        n = 0;
    try {
        for (n = 0; n < t.length - 65536; n += 65536) i.push(String.fromCharCode.apply(0, t.slice(n, n + 65536)));
        i.push(String.fromCharCode.apply(0, t.slice(n)));
    } catch {
        try {
            for (; n < t.length - 16384; n += 16384) i.push(String.fromCharCode.apply(0, t.slice(n, n + 16384)));
            i.push(String.fromCharCode.apply(0, t.slice(n)));
        } catch {
            for (; n != t.length; ++n) i.push(String.fromCharCode(t[n]));
        }
    }
    return i.join("");
}

function na(t) {
    if (typeof JSON < "u" && !Array.isArray(t)) return JSON.parse(JSON.stringify(t));
    if (typeof t != "object" || t == null) return t;
    if (t instanceof Date) return new Date(t.getTime());
    var r = {};
    for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && (r[e] = na(t[e]));
    return r;
}

function Ni(t, r) {
    for (var e = ""; e.length < r;) e += t;
    return e;
}

function Hs(t) {
    var r = Number(t);
    if (!isNaN(r)) return isFinite(r) ? r : NaN;
    if (!/\d/.test(t)) return r;
    var e = 1,
        i = t.replace(/([\d]),([\d])/g, "$1$2").replace(/[$]/g, "").replace(/[%]/g, function() {
            return e *= 100, "";
        });
    return !isNaN(r = Number(i)) || (i = i.replace(/[(]([^()]*)[)]/, function(n, a) {
        return e = -e, a;
    }), !isNaN(r = Number(i))) ? r / e : r;
}
var IT = /^(0?\d|1[0-2])(?:|:([0-5]?\d)(?:|(\.\d+)(?:|:([0-5]?\d))|:([0-5]?\d)(|\.\d+)))\s+([ap])m?$/,
    OT = /^([01]?\d|2[0-3])(?:|:([0-5]?\d)(?:|(\.\d+)(?:|:([0-5]?\d))|:([0-5]?\d)(|\.\d+)))$/,
    NT = /^(\d+)-(\d+)-(\d+)[T ](\d+):(\d+)(:\d+)(\.\d+)?[Z]?$/,
    LT = new Date("6/9/69 00:00 UTC").valueOf() == -177984e5;

function RT(t) {
    return t[2] ? t[3] ? t[4] ? new Date(Date.UTC(1899, 11, 31, +t[1] % 12 + (t[7] == "p" ? 12 : 0), +t[2], +t[4], parseFloat(t[3]) * 1e3)) : new Date(Date.UTC(1899, 11, 31, t[7] == "p" ? 12 : 0, +t[1], +t[2], parseFloat(t[3]) * 1e3)) : t[5] ? new Date(Date.UTC(1899, 11, 31, +t[1] % 12 + (t[7] == "p" ? 12 : 0), +t[2], +t[5], t[6] ? parseFloat(t[6]) * 1e3 : 0)) : new Date(Date.UTC(1899, 11, 31, +t[1] % 12 + (t[7] == "p" ? 12 : 0), +t[2], 0, 0)) : new Date(Date.UTC(1899, 11, 31, +t[1] % 12 + (t[7] == "p" ? 12 : 0), 0, 0, 0));
}

function MT(t) {
    return t[2] ? t[3] ? t[4] ? new Date(Date.UTC(1899, 11, 31, +t[1], +t[2], +t[4], parseFloat(t[3]) * 1e3)) : new Date(Date.UTC(1899, 11, 31, 0, +t[1], +t[2], parseFloat(t[3]) * 1e3)) : t[5] ? new Date(Date.UTC(1899, 11, 31, +t[1], +t[2], +t[5], t[6] ? parseFloat(t[6]) * 1e3 : 0)) : new Date(Date.UTC(1899, 11, 31, +t[1], +t[2], 0, 0)) : new Date(Date.UTC(1899, 11, 31, +t[1], 0, 0, 0));
}
var BT = ["january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"];

function yp(t) {
    if (NT.test(t)) return t.indexOf("Z") == -1 ? Rp(new Date(t)) : new Date(t);
    var r = t.toLowerCase(),
        e = r.replace(/\s+/g, " ").trim(),
        i = e.match(IT);
    if (i) return RT(i);
    if (i = e.match(OT), i) return MT(i);
    if (i = e.match(aw), i) return new Date(Date.UTC(+i[1], +i[2] - 1, +i[3], +i[4], +i[5], i[6] && parseInt(i[6].slice(1), 10) || 0, i[7] && parseInt((i[7] + "0000").slice(1, 4), 10) || 0));
    var n = new Date(LT && t.indexOf("UTC") == -1 ? t + " UTC" : t),
        a = new Date(NaN),
        o = n.getYear(),
        s = n.getMonth(),
        l = n.getDate();
    if (isNaN(l)) return a;
    if (r.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)) {
        if (r = r.replace(/[^a-z]/g, "").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/, ""), r.length > 3 && BT.indexOf(r) == -1) return a;
    } else if (r.replace(/[ap]m?/, "").match(/[a-z]/)) return a;
    return o < 0 || o > 8099 || t.match(/[^-0-9:,\/\\\ ]/) ? a : n;
}

function U0(t) {
    return new Date(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate(), t.getUTCHours(), t.getUTCMinutes(), t.getUTCSeconds(), t.getUTCMilliseconds());
}

function Rp(t) {
    return new Date(Date.UTC(t.getFullYear(), t.getMonth(), t.getDate(), t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds()));
}

function Dr(t, r, e) {
    if (t.FullPaths) {
        if (Array.isArray(e) && typeof e[0] == "string" && (e = e.join("")), typeof e == "string") {
            var i;
            return ti ? i = fs(e) : i = eT(e), _i.utils.cfb_add(t, r, i);
        }
        _i.utils.cfb_add(t, r, e);
    } else t.file(r, e);
}

function Pg() {
    return _i.utils.cfb_new();
}
var dn = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
`;
var UT = {
        "&quot;": '"',
        "&apos;": "'",
        "&gt;": ">",
        "&lt;": "<",
        "&amp;": "&"
    },
    Ig = Fg(UT);
var Og = /[&<>'"]/g,
    VT = /[\u0000-\u0008\u000b-\u001f\uFFFE-\uFFFF]/g;

function kr(t) {
    var r = t + "";
    return r.replace(Og, function(e) {
        return Ig[e];
    }).replace(VT, function(e) {
        return "_x" + ("000" + e.charCodeAt(0).toString(16)).slice(-4) + "_";
    });
}

function db(t) {
    return kr(t).replace(/ /g, "_x0020_");
}
var ow = /[\u0000-\u001f]/g;

function sg(t) {
    var r = t + "";
    return r.replace(Og, function(e) {
        return Ig[e];
    }).replace(/\n/g, "<br/>").replace(ow, function(e) {
        return "&#x" + ("000" + e.charCodeAt(0).toString(16)).slice(-4) + ";";
    });
}

function zT(t) {
    var r = t + "";
    return r.replace(Og, function(e) {
        return Ig[e];
    }).replace(ow, function(e) {
        return "&#x" + e.charCodeAt(0).toString(16).toUpperCase() + ";";
    });
}

function WT(t) {
    return t.replace(/(\r\n|[\r\n])/g, "&#10;");
}

function jT(t) {
    switch (t) {
        case 1:
        case !0:
        case "1":
        case "true":
            return !0;
        case 0:
        case !1:
        case "0":
        case "false":
            return !1;
    }
    return !1;
}

function lg(t) {
    for (var r = "", e = 0, i = 0, n = 0, a = 0, o = 0, s = 0; e < t.length;) {
        if (i = t.charCodeAt(e++), i < 128) {
            r += String.fromCharCode(i);
            continue;
        }
        if (n = t.charCodeAt(e++), i > 191 && i < 224) {
            o = (i & 31) << 6, o |= n & 63, r += String.fromCharCode(o);
            continue;
        }
        if (a = t.charCodeAt(e++), i < 240) {
            r += String.fromCharCode((i & 15) << 12 | (n & 63) << 6 | a & 63);
            continue;
        }
        o = t.charCodeAt(e++), s = ((i & 7) << 18 | (n & 63) << 12 | (a & 63) << 6 | o & 63) - 65536, r += String.fromCharCode(55296 + (s >>> 10 & 1023)), r += String.fromCharCode(56320 + (s & 1023));
    }
    return r;
}

function pb(t) {
    var r = Ec(2 * t.length),
        e, i, n = 1,
        a = 0,
        o = 0,
        s;
    for (i = 0; i < t.length; i += n) n = 1, (s = t.charCodeAt(i)) < 128 ? e = s : s < 224 ? (e = (s & 31) * 64 + (t.charCodeAt(i + 1) & 63), n = 2) : s < 240 ? (e = (s & 15) * 4096 + (t.charCodeAt(i + 1) & 63) * 64 + (t.charCodeAt(i + 2) & 63), n = 3) : (n = 4, e = (s & 7) * 262144 + (t.charCodeAt(i + 1) & 63) * 4096 + (t.charCodeAt(i + 2) & 63) * 64 + (t.charCodeAt(i + 3) & 63), e -= 65536, o = 55296 + (e >>> 10 & 1023), e = 56320 + (e & 1023)), o !== 0 && (r[a++] = o & 255, r[a++] = o >>> 8, o = 0), r[a++] = e % 256, r[a++] = e >>> 8;
    return r.slice(0, a).toString("ucs2");
}

function mb(t) {
    return fs(t, "binary").toString("utf8");
}
var lp = "foo bar baz\xE2\x98\x83\xF0\x9F\x8D\xA3",
    O0 = ti && (mb(lp) == lg(lp) && mb || pb(lp) == lg(lp) && pb) || lg,
    Ws = ti ? function(t) {
        return fs(t, "utf8").toString("binary");
    } : function(t) {
        for (var r = [], e = 0, i = 0, n = 0; e < t.length;) switch (i = t.charCodeAt(e++), !0) {
            case i < 128:
                r.push(String.fromCharCode(i));
                break;
            case i < 2048:
                r.push(String.fromCharCode(192 + (i >> 6))), r.push(String.fromCharCode(128 + (i & 63)));
                break;
            case i >= 55296 && i < 57344:
                i -= 55296, n = t.charCodeAt(e++) - 56320 + (i << 10), r.push(String.fromCharCode(240 + (n >> 18 & 7))), r.push(String.fromCharCode(144 + (n >> 12 & 63))), r.push(String.fromCharCode(128 + (n >> 6 & 63))), r.push(String.fromCharCode(128 + (n & 63)));
                break;
            default:
                r.push(String.fromCharCode(224 + (i >> 12))), r.push(String.fromCharCode(128 + (i >> 6 & 63))), r.push(String.fromCharCode(128 + (i & 63)));
        }
        return r.join("");
    },
    HT = function() {
        var t = [
            ["nbsp", " "],
            ["middot", "\xB7"],
            ["quot", '"'],
            ["apos", "'"],
            ["gt", ">"],
            ["lt", "<"],
            ["amp", "&"]
        ].map(function(r) {
            return [new RegExp("&" + r[0] + ";", "ig"), r[1]];
        });
        return function(e) {
            for (var i = e.replace(/^[\t\n\r ]+/, "").replace(/(^|[^\t\n\r ])[\t\n\r ]+$/, "$1").replace(/>\s+/g, ">").replace(/\b\s+</g, "<").replace(/[\t\n\r ]+/g, " ").replace(/<\s*[bB][rR]\s*\/?>/g, `
`).replace(/<[^<>]*>/g, ""), n = 0; n < t.length; ++n) i = i.replace(t[n][0], t[n][1]);
            return i;
        };
    }();
var sw = /(^\s|\s$|\n)/;

function Vn(t, r) {
    return "<" + t + (r.match(sw) ? ' xml:space="preserve"' : "") + ">" + r + "</" + t + ">";
}

function bf(t) {
    return fn(t).map(function(r) {
        return " " + r + '="' + t[r] + '"';
    }).join("");
}

function ut(t, r, e) {
    return "<" + t + (e != null ? bf(e) : "") + (r != null ? (r.match(sw) ? ' xml:space="preserve"' : "") + ">" + r + "</" + t : "/") + ">";
}

function bg(t, r) {
    try {
        return t.toISOString().replace(/\.\d*/, "");
    } catch (e) {
        if (r) throw e;
    }
    return "";
}

function GT(t, r) {
    switch (typeof t) {
        case "string":
            var e = ut("vt:lpwstr", kr(t));
            return r && (e = e.replace(/&quot;/g, "_x0022_")), e;
        case "number":
            return ut((t | 0) == t ? "vt:i4" : "vt:r8", kr(String(t)));
        case "boolean":
            return ut("vt:bool", t ? "true" : "false");
    }
    if (t instanceof Date) return ut("vt:filetime", bg(t));
    throw new Error("Unable to serialize " + t);
}
var Pn = {
        CORE_PROPS: "http://schemas.openxmlformats.org/package/2006/metadata/core-properties",
        CUST_PROPS: "http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",
        EXT_PROPS: "http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",
        CT: "http://schemas.openxmlformats.org/package/2006/content-types",
        RELS: "http://schemas.openxmlformats.org/package/2006/relationships",
        TCMNT: "http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",
        dc: "http://purl.org/dc/elements/1.1/",
        dcterms: "http://purl.org/dc/terms/",
        dcmitype: "http://purl.org/dc/dcmitype/",
        mx: "http://schemas.microsoft.com/office/mac/excel/2008/main",
        r: "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
        sjs: "http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties",
        vt: "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",
        xsi: "http://www.w3.org/2001/XMLSchema-instance",
        xsd: "http://www.w3.org/2001/XMLSchema"
    },
    z0 = ["http://schemas.openxmlformats.org/spreadsheetml/2006/main", "http://purl.oclc.org/ooxml/spreadsheetml/main", "http://schemas.microsoft.com/office/excel/2006/main", "http://schemas.microsoft.com/office/excel/2006/2"],
    Xa = {
        o: "urn:schemas-microsoft-com:office:office",
        x: "urn:schemas-microsoft-com:office:excel",
        ss: "urn:schemas-microsoft-com:office:spreadsheet",
        dt: "uuid:C2F41010-65B3-11d1-A29F-00AA00C14882",
        mv: "http://macVmlSchemaUri",
        v: "urn:schemas-microsoft-com:vml",
        html: "http://www.w3.org/TR/REC-html40"
    };

function qT(t, r) {
    for (var e = 1 - 2 * (t[r + 7] >>> 7), i = ((t[r + 7] & 127) << 4) + (t[r + 6] >>> 4 & 15), n = t[r + 6] & 15, a = 5; a >= 0; --a) n = n * 256 + t[r + a];
    return i == 2047 ? n == 0 ? e * (1 / 0) : NaN : (i == 0 ? i = -1022 : (i -= 1023, n += Math.pow(2, 52)), e * Math.pow(2, i - 52) * n);
}

function XT(t, r, e) {
    var i = (r < 0 || 1 / r == -1 / 0 ? 1 : 0) << 7,
        n = 0,
        a = 0,
        o = i ? -r : r;
    isFinite(o) ? o == 0 ? n = a = 0 : (n = Math.floor(Math.log(o) / Math.LN2), a = o * Math.pow(2, 52 - n), n <= -1023 && (!isFinite(a) || a < Math.pow(2, 52)) ? n = -1022 : (a -= Math.pow(2, 52), n += 1023)) : (n = 2047, a = isNaN(r) ? 26985 : 0);
    for (var s = 0; s <= 5; ++s, a /= 256) t[e + s] = a & 255;
    t[e + 6] = (n & 15) << 4 | a & 15, t[e + 7] = n >> 4 | i;
}
var gb = function(t) {
        for (var r = [], e = 10240, i = 0; i < t[0].length; ++i)
            if (t[0][i])
                for (var n = 0, a = t[0][i].length; n < a; n += e) r.push.apply(r, t[0][i].slice(n, n + e));
        return r;
    },
    vb = ti ? function(t) {
        return t[0].length > 0 && Buffer.isBuffer(t[0][0]) ? Buffer.concat(t[0].map(function(r) {
            return Buffer.isBuffer(r) ? r : fs(r);
        })) : gb(t);
    } : gb,
    xb = function(t, r, e) {
        for (var i = [], n = r; n < e; n += 2) i.push(String.fromCharCode(df(t, n)));
        return i.join("").replace(E0, "");
    },
    Mp = ti ? function(t, r, e) {
        return !Buffer.isBuffer(t) || !yf ? xb(t, r, e) : t.toString("utf16le", r, e).replace(E0, "");
    } : xb,
    _b = function(t, r, e) {
        for (var i = [], n = r; n < r + e; ++n) i.push(("0" + t[n].toString(16)).slice(-2));
        return i.join("");
    },
    lw = ti ? function(t, r, e) {
        return Buffer.isBuffer(t) ? t.toString("hex", r, r + e) : _b(t, r, e);
    } : _b,
    yb = function(t, r, e) {
        for (var i = [], n = r; n < e; n++) i.push(String.fromCharCode(F0(t, n)));
        return i.join("");
    },
    W0 = ti ? function(r, e, i) {
        return Buffer.isBuffer(r) ? r.toString("utf8", e, i) : yb(r, e, i);
    } : yb,
    cw = function(t, r) {
        var e = En(t, r);
        return e > 0 ? W0(t, r + 4, r + 4 + e - 1) : "";
    },
    Ng = cw,
    uw = function(t, r) {
        var e = En(t, r);
        return e > 0 ? W0(t, r + 4, r + 4 + e - 1) : "";
    },
    Lg = uw,
    fw = function(t, r) {
        var e = 2 * En(t, r);
        return e > 0 ? W0(t, r + 4, r + 4 + e - 1) : "";
    },
    Rg = fw,
    hw = function(r, e) {
        var i = En(r, e);
        return i > 0 ? Mp(r, e + 4, e + 4 + i) : "";
    },
    Mg = hw,
    dw = function(t, r) {
        var e = En(t, r);
        return e > 0 ? W0(t, r + 4, r + 4 + e) : "";
    },
    Bg = dw,
    pw = function(t, r) {
        return qT(t, r);
    },
    bp = pw,
    Ug = function(r) {
        return Array.isArray(r) || typeof Uint8Array < "u" && r instanceof Uint8Array;
    };
ti && (Ng = function(r, e) {
    if (!Buffer.isBuffer(r)) return cw(r, e);
    var i = r.readUInt32LE(e);
    return i > 0 ? r.toString("utf8", e + 4, e + 4 + i - 1) : "";
}, Lg = function(r, e) {
    if (!Buffer.isBuffer(r)) return uw(r, e);
    var i = r.readUInt32LE(e);
    return i > 0 ? r.toString("utf8", e + 4, e + 4 + i - 1) : "";
}, Rg = function(r, e) {
    if (!Buffer.isBuffer(r) || !yf) return fw(r, e);
    var i = 2 * r.readUInt32LE(e);
    return r.toString("utf16le", e + 4, e + 4 + i - 1);
}, Mg = function(r, e) {
    if (!Buffer.isBuffer(r) || !yf) return hw(r, e);
    var i = r.readUInt32LE(e);
    return r.toString("utf16le", e + 4, e + 4 + i);
}, Bg = function(r, e) {
    if (!Buffer.isBuffer(r)) return dw(r, e);
    var i = r.readUInt32LE(e);
    return r.toString("utf8", e + 4, e + 4 + i);
}, bp = function(r, e) {
    return Buffer.isBuffer(r) ? r.readDoubleLE(e) : pw(r, e);
}, Ug = function(r) {
    return Buffer.isBuffer(r) || Array.isArray(r) || typeof Uint8Array < "u" && r instanceof Uint8Array;
});

function KT() {
    Mp = function(t, r, e) {
        return Kr.utils.decode(1200, t.slice(r, e)).replace(E0, "");
    }, W0 = function(t, r, e) {
        return Kr.utils.decode(65001, t.slice(r, e));
    }, Ng = function(t, r) {
        var e = En(t, r);
        return e > 0 ? Kr.utils.decode(B0, t.slice(r + 4, r + 4 + e - 1)) : "";
    }, Lg = function(t, r) {
        var e = En(t, r);
        return e > 0 ? Kr.utils.decode(Ka, t.slice(r + 4, r + 4 + e - 1)) : "";
    }, Rg = function(t, r) {
        var e = 2 * En(t, r);
        return e > 0 ? Kr.utils.decode(1200, t.slice(r + 4, r + 4 + e - 1)) : "";
    }, Mg = function(t, r) {
        var e = En(t, r);
        return e > 0 ? Kr.utils.decode(1200, t.slice(r + 4, r + 4 + e)) : "";
    }, Bg = function(t, r) {
        var e = En(t, r);
        return e > 0 ? Kr.utils.decode(65001, t.slice(r + 4, r + 4 + e)) : "";
    };
}
typeof Kr < "u" && KT();
var F0 = function(t, r) {
        return t[r];
    },
    df = function(t, r) {
        return t[r + 1] * 256 + t[r];
    },
    YT = function(t, r) {
        var e = t[r + 1] * 256 + t[r];
        return e < 32768 ? e : (65535 - e + 1) * -1;
    },
    En = function(t, r) {
        return t[r + 3] * (1 << 24) + (t[r + 2] << 16) + (t[r + 1] << 8) + t[r];
    },
    kc = function(t, r) {
        return t[r + 3] << 24 | t[r + 2] << 16 | t[r + 1] << 8 | t[r];
    },
    ZT = function(t, r) {
        return t[r] << 24 | t[r + 1] << 16 | t[r + 2] << 8 | t[r + 3];
    };

function pf(t, r) {
    var e = "",
        i, n, a = [],
        o, s, l, c;
    switch (r) {
        case "dbcs":
            if (c = this.l, ti && Buffer.isBuffer(this) && yf) e = this.slice(this.l, this.l + 2 * t).toString("utf16le");
            else
                for (l = 0; l < t; ++l) e += String.fromCharCode(df(this, c)), c += 2;
            t *= 2;
            break;
        case "utf8":
            e = W0(this, this.l, this.l + t);
            break;
        case "utf16le":
            t *= 2, e = Mp(this, this.l, this.l + t);
            break;
        case "wstr":
            if (typeof Kr < "u") e = Kr.utils.decode(Ka, this.slice(this.l, this.l + 2 * t));
            else return pf.call(this, t, "dbcs");
            t = 2 * t;
            break;
        case "lpstr-ansi":
            e = Ng(this, this.l), t = 4 + En(this, this.l);
            break;
        case "lpstr-cp":
            e = Lg(this, this.l), t = 4 + En(this, this.l);
            break;
        case "lpwstr":
            e = Rg(this, this.l), t = 4 + 2 * En(this, this.l);
            break;
        case "lpp4":
            t = 4 + En(this, this.l), e = Mg(this, this.l), t & 2 && (t += 2);
            break;
        case "8lpp4":
            t = 4 + En(this, this.l), e = Bg(this, this.l), t & 3 && (t += 4 - (t & 3));
            break;
        case "cstr":
            for (t = 0, e = "";
                (o = F0(this, this.l + t++)) !== 0;) a.push(op(o));
            e = a.join("");
            break;
        case "_wstr":
            for (t = 0, e = "";
                (o = df(this, this.l + t)) !== 0;) a.push(op(o)), t += 2;
            t += 2, e = a.join("");
            break;
        case "dbcs-cont":
            for (e = "", c = this.l, l = 0; l < t; ++l) {
                if (this.lens && this.lens.indexOf(c) !== -1) return o = F0(this, c), this.l = c + 1, s = pf.call(this, t - l, o ? "dbcs-cont" : "sbcs-cont"), a.join("") + s;
                a.push(op(df(this, c))), c += 2;
            }
            e = a.join(""), t *= 2;
            break;
        case "cpstr":
            if (typeof Kr < "u") {
                e = Kr.utils.decode(Ka, this.slice(this.l, this.l + t));
                break;
            }
        case "sbcs-cont":
            for (e = "", c = this.l, l = 0; l != t; ++l) {
                if (this.lens && this.lens.indexOf(c) !== -1) return o = F0(this, c), this.l = c + 1, s = pf.call(this, t - l, o ? "dbcs-cont" : "sbcs-cont"), a.join("") + s;
                a.push(op(F0(this, c))), c += 1;
            }
            e = a.join("");
            break;
        default:
            switch (t) {
                case 1:
                    return i = F0(this, this.l), this.l++, i;
                case 2:
                    return i = (r === "i" ? YT : df)(this, this.l), this.l += 2, i;
                case 4:
                case -4:
                    return r === "i" || (this[this.l + 3] & 128) === 0 ? (i = (t > 0 ? kc : ZT)(this, this.l), this.l += 4, i) : (n = En(this, this.l), this.l += 4, n);
                case 8:
                case -8:
                    if (r === "f") return t == 8 ? n = bp(this, this.l) : n = bp([this[this.l + 7], this[this.l + 6], this[this.l + 5], this[this.l + 4], this[this.l + 3], this[this.l + 2], this[this.l + 1], this[this.l + 0]], 0), this.l += 8, n;
                    t = 8;
                case 16:
                    e = lw(this, this.l, t);
                    break;
            }
    }
    return this.l += t, e;
}
var JT = function(t, r, e) {
        t[e] = r & 255, t[e + 1] = r >>> 8 & 255, t[e + 2] = r >>> 16 & 255, t[e + 3] = r >>> 24 & 255;
    },
    QT = function(t, r, e) {
        t[e] = r & 255, t[e + 1] = r >> 8 & 255, t[e + 2] = r >> 16 & 255, t[e + 3] = r >> 24 & 255;
    },
    $T = function(t, r, e) {
        t[e] = r & 255, t[e + 1] = r >>> 8 & 255;
    };

function eD(t, r, e) {
    var i = 0,
        n = 0;
    if (e === "dbcs") {
        for (n = 0; n != r.length; ++n) $T(this, r.charCodeAt(n), this.l + 2 * n);
        i = 2 * r.length;
    } else if (e === "sbcs" || e == "cpstr") {
        if (typeof Kr < "u" && B0 == 874) {
            for (n = 0; n != r.length; ++n) {
                var a = Kr.utils.encode(B0, r.charAt(n));
                this[this.l + n] = a[0];
            }
            i = r.length;
        } else if (typeof Kr < "u" && e == "cpstr") {
            if (a = Kr.utils.encode(Ka, r), a.length == r.length)
                for (n = 0; n < r.length; ++n) a[n] == 0 && r.charCodeAt(n) != 0 && (a[n] = 95);
            if (a.length == 2 * r.length)
                for (n = 0; n < r.length; ++n) a[2 * n] == 0 && a[2 * n + 1] == 0 && r.charCodeAt(n) != 0 && (a[2 * n] = 95);
            for (n = 0; n < a.length; ++n) this[this.l + n] = a[n];
            i = a.length;
        } else {
            for (r = r.replace(/[^\x00-\x7F]/g, "_"), n = 0; n != r.length; ++n) this[this.l + n] = r.charCodeAt(n) & 255;
            i = r.length;
        }
    } else if (e === "hex") {
        for (; n < t; ++n) this[this.l++] = parseInt(r.slice(2 * n, 2 * n + 2), 16) || 0;
        return this;
    } else if (e === "utf16le") {
        var o = Math.min(this.l + t, this.length);
        for (n = 0; n < Math.min(r.length, t); ++n) {
            var s = r.charCodeAt(n);
            this[this.l++] = s & 255, this[this.l++] = s >> 8;
        }
        for (; this.l < o;) this[this.l++] = 0;
        return this;
    } else switch (t) {
        case 1:
            i = 1, this[this.l] = r & 255;
            break;
        case 2:
            i = 2, this[this.l] = r & 255, r >>>= 8, this[this.l + 1] = r & 255;
            break;
        case 3:
            i = 3, this[this.l] = r & 255, r >>>= 8, this[this.l + 1] = r & 255, r >>>= 8, this[this.l + 2] = r & 255;
            break;
        case 4:
            i = 4, JT(this, r, this.l);
            break;
        case 8:
            if (i = 8, e === "f") {
                XT(this, r, this.l);
                break;
            }
        case 16:
            break;
        case -4:
            i = 4, QT(this, r, this.l);
            break;
    }
    return this.l += i, this;
}

function mw(t, r) {
    var e = lw(this, this.l, t.length >> 1);
    if (e !== t) throw new Error(r + "Expected " + t + " saw " + e);
    this.l += t.length >> 1;
}

function ga(t, r) {
    t.l = r, t.read_shift = pf, t.chk = mw, t.write_shift = eD;
}

function us(t, r) {
    t.l += r;
}

function Ue(t) {
    var r = Ec(t);
    return ga(r, 0), r;
}

function ra() {
    var t = [],
        r = ti ? 16384 : 2048,
        e = ti && typeof Ue(r).copy == "function",
        i = function(h) {
            var d = Ue(h);
            return ga(d, 0), d;
        },
        n = i(r),
        a = function() {
            n && (n.l && (n.length > n.l && (n = n.slice(0, n.l), n.l = n.length), n.length > 0 && t.push(n)), n = null);
        },
        o = function(h) {
            return n && h < n.length - n.l ? n : (a(), n = i(Math.max(h + 1, r)));
        },
        s = function() {
            return a(), un(t);
        },
        l = function() {
            return a(), t;
        },
        c = function(h) {
            a(), n = h, n.l == null && (n.l = n.length), o(r);
        };
    return {
        next: o,
        push: c,
        end: s,
        _bufs: t,
        end2: l
    };
}

function Ze(t, r, e, i) {
    var n = +r,
        a;
    if (!isNaN(n)) {
        i || (i = sP[n].p || (e || []).length || 0), a = 1 + (n >= 128 ? 1 : 0) + 1, i >= 128 && ++a, i >= 16384 && ++a, i >= 2097152 && ++a;
        var o = t.next(a);
        n <= 127 ? o.write_shift(1, n) : (o.write_shift(1, (n & 127) + 128), o.write_shift(1, n >> 7));
        for (var s = 0; s != 4; ++s)
            if (i >= 128) o.write_shift(1, (i & 127) + 128), i >>= 7;
            else {
                o.write_shift(1, i);
                break;
            }
        i > 0 && Ug(e) && t.push(e);
    }
}

function mf(t, r, e) {
    var i = na(t);
    if (r.s ? (i.cRel && (i.c += r.s.c), i.rRel && (i.r += r.s.r)) : (i.cRel && (i.c += r.c), i.rRel && (i.r += r.r)), !e || e.biff < 12) {
        for (; i.c >= 256;) i.c -= 256;
        for (; i.r >= 65536;) i.r -= 65536;
    }
    return i;
}

function bb(t, r, e) {
    var i = na(t);
    return i.s = mf(i.s, r.s, e), i.e = mf(i.e, r.s, e), i;
}

function gf(t, r) {
    if (t.cRel && t.c < 0)
        for (t = na(t); t.c < 0;) t.c += r > 8 ? 16384 : 256;
    if (t.rRel && t.r < 0)
        for (t = na(t); t.r < 0;) t.r += r > 8 ? 1048576 : r > 5 ? 65536 : 16384;
    var e = Bi(t);
    return !t.cRel && t.cRel != null && (e = iD(e)), !t.rRel && t.rRel != null && (e = tD(e)), e;
}

function cg(t, r) {
    return t.s.r == 0 && !t.s.rRel && t.e.r == (r.biff >= 12 ? 1048575 : r.biff >= 8 ? 65536 : 16384) && !t.e.rRel ? (t.s.cRel ? "" : "$") + ui(t.s.c) + ":" + (t.e.cRel ? "" : "$") + ui(t.e.c) : t.s.c == 0 && !t.s.cRel && t.e.c == (r.biff >= 12 ? 16383 : 255) && !t.e.cRel ? (t.s.rRel ? "" : "$") + di(t.s.r) + ":" + (t.e.rRel ? "" : "$") + di(t.e.r) : gf(t.s, r.biff) + ":" + gf(t.e, r.biff);
}

function Vg(t) {
    return parseInt(rD(t), 10) - 1;
}

function di(t) {
    return "" + (t + 1);
}

function tD(t) {
    return t.replace(/([A-Z]|^)(\d+)$/, "$1$$$2");
}

function rD(t) {
    return t.replace(/\$(\d+)$/, "$1");
}

function zg(t) {
    for (var r = nD(t), e = 0, i = 0; i !== r.length; ++i) e = 26 * e + r.charCodeAt(i) - 64;
    return e - 1;
}

function ui(t) {
    if (t < 0) throw new Error("invalid column " + t);
    var r = "";
    for (++t; t; t = Math.floor((t - 1) / 26)) r = String.fromCharCode((t - 1) % 26 + 65) + r;
    return r;
}

function iD(t) {
    return t.replace(/^([A-Z])/, "$$$1");
}

function nD(t) {
    return t.replace(/^\$([A-Z])/, "$1");
}

function aD(t) {
    return t.replace(/(\$?[A-Z]*)(\$?\d*)/, "$1,$2").split(",");
}

function Li(t) {
    for (var r = 0, e = 0, i = 0; i < t.length; ++i) {
        var n = t.charCodeAt(i);
        n >= 48 && n <= 57 ? r = 10 * r + (n - 48) : n >= 65 && n <= 90 && (e = 26 * e + (n - 64));
    }
    return {
        c: e - 1,
        r: r - 1
    };
}

function Bi(t) {
    for (var r = t.c + 1, e = ""; r; r = (r - 1) / 26 | 0) e = String.fromCharCode((r - 1) % 26 + 65) + e;
    return e + (t.r + 1);
}

function zn(t) {
    var r = t.indexOf(":");
    return r == -1 ? {
        s: Li(t),
        e: Li(t)
    } : {
        s: Li(t.slice(0, r)),
        e: Li(t.slice(r + 1))
    };
}

function hn(t, r) {
    return typeof r > "u" || typeof r == "number" ? hn(t.s, t.e) : (typeof t != "string" && (t = Bi(t)), typeof r != "string" && (r = Bi(r)), t == r ? t : t + ":" + r);
}

function wf(t) {
    var r = zn(t);
    return "$" + ui(r.s.c) + "$" + di(r.s.r) + ":$" + ui(r.e.c) + "$" + di(r.e.r);
}

function Sf(t, r) {
    if (!t && !(r && r.biff <= 5 && r.biff >= 2)) throw new Error("empty sheet name");
    return /[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(t) ? "'" + t.replace(/'/g, "''") + "'" : t;
}

function ki(t) {
    var r = {
            s: {
                c: 0,
                r: 0
            },
            e: {
                c: 0,
                r: 0
            }
        },
        e = 0,
        i = 0,
        n = 0,
        a = t.length;
    for (e = 0; i < a && !((n = t.charCodeAt(i) - 64) < 1 || n > 26); ++i) e = 26 * e + n;
    for (r.s.c = --e, e = 0; i < a && !((n = t.charCodeAt(i) - 48) < 0 || n > 9); ++i) e = 10 * e + n;
    if (r.s.r = --e, i === a || n != 10) return r.e.c = r.s.c, r.e.r = r.s.r, r;
    for (++i, e = 0; i != a && !((n = t.charCodeAt(i) - 64) < 1 || n > 26); ++i) e = 26 * e + n;
    for (r.e.c = --e, e = 0; i != a && !((n = t.charCodeAt(i) - 48) < 0 || n > 9); ++i) e = 10 * e + n;
    return r.e.r = --e, r;
}

function wb(t, r) {
    var e = t.t == "d" && r instanceof Date;
    if (t.z != null) try {
        return t.w = qs(t.z, e ? Wn(r) : r);
    } catch {}
    try {
        return t.w = qs((t.XF || {}).numFmtId || (e ? 14 : 0), e ? Wn(r) : r);
    } catch {
        return "" + r;
    }
}

function Xs(t, r, e) {
    return t == null || t.t == null || t.t == "z" ? "" : t.w !== void 0 ? t.w : (t.t == "d" && !t.z && e && e.dateNF && (t.z = e.dateNF), t.t == "e" ? xa[t.v] || t.v : r == null ? wb(t, t.v) : wb(t, r));
}

function j0(t, r) {
    var e = r && r.sheet ? r.sheet : "Sheet1",
        i = {};
    return i[e] = t, {
        SheetNames: [e],
        Sheets: i
    };
}

function oD(t) {
    var r = {},
        e = t || {};
    return e.dense && (r["!data"] = []), r;
}

function gw(t, r, e) {
    var i = e || {},
        n = t ? t["!data"] != null : i.dense;
    ls != null && n == null && (n = ls);
    var a = t || (n ? {
        "!data": []
    } : {});
    n && !a["!data"] && (a["!data"] = []);
    var o = 0,
        s = 0;
    if (a && i.origin != null)
        if (typeof i.origin == "number") o = i.origin;
        else {
            var l = typeof i.origin == "string" ? Li(i.origin) : i.origin;
            o = l.r, s = l.c;
        }
    var c = {
        s: {
            c: 1e7,
            r: 1e7
        },
        e: {
            c: 0,
            r: 0
        }
    };
    if (a["!ref"]) {
        var u = ki(a["!ref"]);
        c.s.c = u.s.c, c.s.r = u.s.r, c.e.c = Math.max(c.e.c, u.e.c), c.e.r = Math.max(c.e.r, u.e.r), o == -1 && (c.e.r = o = a["!ref"] ? u.e.r + 1 : 0);
    } else c.s.c = c.e.c = c.s.r = c.e.r = 0;
    for (var h = [], d = !1, f = 0; f != r.length; ++f)
        if (r[f]) {
            if (!Array.isArray(r[f])) throw new Error("aoa_to_sheet expects an array of arrays");
            var m = o + f;
            n && (a["!data"][m] || (a["!data"][m] = []), h = a["!data"][m]);
            for (var _ = r[f], x = 0; x != _.length; ++x)
                if (!(typeof _[x] > "u")) {
                    var g = {
                            v: _[x],
                            t: ""
                        },
                        b = s + x;
                    if (c.s.r > m && (c.s.r = m), c.s.c > b && (c.s.c = b), c.e.r < m && (c.e.r = m), c.e.c < b && (c.e.c = b), d = !0, _[x] && typeof _[x] == "object" && !Array.isArray(_[x]) && !(_[x] instanceof Date)) g = _[x];
                    else if (Array.isArray(g.v) && (g.f = _[x][1], g.v = g.v[0]), g.v === null) {
                        if (g.f) g.t = "n";
                        else if (i.nullError) g.t = "e", g.v = 0;
                        else if (i.sheetStubs) g.t = "z";
                        else continue;
                    } else typeof g.v == "number" ? isFinite(g.v) ? g.t = "n" : isNaN(g.v) ? (g.t = "e", g.v = 15) : (g.t = "e", g.v = 7) : typeof g.v == "boolean" ? g.t = "b" : g.v instanceof Date ? (g.z = i.dateNF || Di[14], i.UTC || (g.v = Rp(g.v)), i.cellDates ? (g.t = "d", g.w = qs(g.z, Wn(g.v, i.date1904))) : (g.t = "n", g.v = Wn(g.v, i.date1904), g.w = qs(g.z, g.v))) : g.t = "s";
                    if (n) h[b] && h[b].z && (g.z = h[b].z), h[b] = g;
                    else {
                        var w = ui(b) + (m + 1);
                        a[w] && a[w].z && (g.z = a[w].z), a[w] = g;
                    }
                }
        }
    return d && c.s.c < 104e5 && (a["!ref"] = hn(c)), a;
}

function H0(t, r) {
    return gw(null, t, r);
}

function sD(t) {
    return t.read_shift(4, "i");
}

function Bo(t, r) {
    return r || (r = Ue(4)), r.write_shift(4, t), r;
}

function ia(t) {
    var r = t.read_shift(4);
    return r === 0 ? "" : t.read_shift(r, "dbcs");
}

function An(t, r) {
    var e = !1;
    return r == null && (e = !0, r = Ue(4 + 2 * t.length)), r.write_shift(4, t.length), t.length > 0 && r.write_shift(0, t, "dbcs"), e ? r.slice(0, r.l) : r;
}

function lD(t) {
    return {
        ich: t.read_shift(2),
        ifnt: t.read_shift(2)
    };
}

function cD(t, r) {
    return r || (r = Ue(4)), r.write_shift(2, t.ich || 0), r.write_shift(2, t.ifnt || 0), r;
}

function Wg(t, r) {
    var e = t.l,
        i = t.read_shift(1),
        n = ia(t),
        a = [],
        o = {
            t: n,
            h: n
        };
    if ((i & 1) !== 0) {
        for (var s = t.read_shift(4), l = 0; l != s; ++l) a.push(lD(t));
        o.r = a;
    } else o.r = [{
        ich: 0,
        ifnt: 0
    }];
    return t.l = e + r, o;
}

function uD(t, r) {
    var e = !1;
    return r == null && (e = !0, r = Ue(15 + 4 * t.t.length)), r.write_shift(1, 0), An(t.t, r), e ? r.slice(0, r.l) : r;
}
var fD = Wg;

function hD(t, r) {
    var e = !1;
    return r == null && (e = !0, r = Ue(23 + 4 * t.t.length)), r.write_shift(1, 1), An(t.t, r), r.write_shift(4, 1), cD({
        ich: 0,
        ifnt: 0
    }, r), e ? r.slice(0, r.l) : r;
}

function fo(t) {
    var r = t.read_shift(4),
        e = t.read_shift(2);
    return e += t.read_shift(1) << 16, t.l++, {
        c: r,
        iStyleRef: e
    };
}

function Lc(t, r) {
    return r == null && (r = Ue(8)), r.write_shift(-4, t.c), r.write_shift(3, t.iStyleRef || t.s), r.write_shift(1, 0), r;
}

function Rc(t) {
    var r = t.read_shift(2);
    return r += t.read_shift(1) << 16, t.l++, {
        c: -1,
        iStyleRef: r
    };
}

function Mc(t, r) {
    return r == null && (r = Ue(4)), r.write_shift(3, t.iStyleRef || t.s), r.write_shift(1, 0), r;
}
var dD = ia,
    vw = An;

function Bp(t) {
    var r = t.read_shift(4);
    return r === 0 || r === 4294967295 ? "" : t.read_shift(r, "dbcs");
}

function Cf(t, r) {
    var e = !1;
    return r == null && (e = !0, r = Ue(127)), r.write_shift(4, t.length > 0 ? t.length : 4294967295), t.length > 0 && r.write_shift(0, t, "dbcs"), e ? r.slice(0, r.l) : r;
}
var pD = ia,
    wg = Bp,
    jg = Cf;

function Hg(t) {
    var r = t.slice(t.l, t.l + 4),
        e = r[0] & 1,
        i = r[0] & 2;
    t.l += 4;
    var n = i === 0 ? bp([0, 0, 0, 0, r[0] & 252, r[1], r[2], r[3]], 0) : kc(r, 0) >> 2;
    return e ? n / 100 : n;
}

function xw(t, r) {
    r == null && (r = Ue(4));
    var e = 0,
        i = 0,
        n = t * 100;
    if (t == (t | 0) && t >= -(1 << 29) && t < 1 << 29 ? i = 1 : n == (n | 0) && n >= -(1 << 29) && n < 1 << 29 && (i = 1, e = 1), i) r.write_shift(-4, ((e ? n : t) << 2) + (e + 2));
    else throw new Error("unsupported RkNumber " + t);
}

function _w(t) {
    var r = {
        s: {},
        e: {}
    };
    return r.s.r = t.read_shift(4), r.e.r = t.read_shift(4), r.s.c = t.read_shift(4), r.e.c = t.read_shift(4), r;
}

function mD(t, r) {
    return r || (r = Ue(16)), r.write_shift(4, t.s.r), r.write_shift(4, t.e.r), r.write_shift(4, t.s.c), r.write_shift(4, t.e.c), r;
}
var Bc = _w,
    G0 = mD;

function q0(t) {
    if (t.length - t.l < 8) throw "XLS Xnum Buffer underflow";
    return t.read_shift(8, "f");
}

function Oc(t, r) {
    return (r || Ue(8)).write_shift(8, t, "f");
}

function gD(t) {
    var r = {},
        e = t.read_shift(1),
        i = e >>> 1,
        n = t.read_shift(1),
        a = t.read_shift(2, "i"),
        o = t.read_shift(1),
        s = t.read_shift(1),
        l = t.read_shift(1);
    switch (t.l++, i) {
        case 0:
            r.auto = 1;
            break;
        case 1:
            r.index = n;
            var c = AD[n];
            c && (r.rgb = Nb(c));
            break;
        case 2:
            r.rgb = Nb([o, s, l]);
            break;
        case 3:
            r.theme = n;
            break;
    }
    return a != 0 && (r.tint = a > 0 ? a / 32767 : a / 32768), r;
}

function wp(t, r) {
    if (r || (r = Ue(8)), !t || t.auto) return r.write_shift(4, 0), r.write_shift(4, 0), r;
    t.index != null ? (r.write_shift(1, 2), r.write_shift(1, t.index)) : t.theme != null ? (r.write_shift(1, 6), r.write_shift(1, t.theme)) : (r.write_shift(1, 5), r.write_shift(1, 0));
    var e = t.tint || 0;
    if (e > 0 ? e *= 32767 : e < 0 && (e *= 32768), r.write_shift(2, e), !t.rgb || t.theme != null) r.write_shift(2, 0), r.write_shift(1, 0), r.write_shift(1, 0);
    else {
        var i = t.rgb || "FFFFFF";
        typeof i == "number" && (i = ("000000" + i.toString(16)).slice(-6)), r.write_shift(1, parseInt(i.slice(0, 2), 16)), r.write_shift(1, parseInt(i.slice(2, 4), 16)), r.write_shift(1, parseInt(i.slice(4, 6), 16)), r.write_shift(1, 255);
    }
    return r;
}

function vD(t) {
    var r = t.read_shift(1);
    t.l++;
    var e = {
        fBold: r & 1,
        fItalic: r & 2,
        fUnderline: r & 4,
        fStrikeout: r & 8,
        fOutline: r & 16,
        fShadow: r & 32,
        fCondense: r & 64,
        fExtend: r & 128
    };
    return e;
}

function xD(t, r) {
    r || (r = Ue(2));
    var e = (t.italic ? 2 : 0) | (t.strike ? 8 : 0) | (t.outline ? 16 : 0) | (t.shadow ? 32 : 0) | (t.condense ? 64 : 0) | (t.extend ? 128 : 0);
    return r.write_shift(1, e), r.write_shift(1, 0), r;
}
var yw = 2,
    Ga = 3,
    cp = 11;
var Sp = 19,
    up = 64,
    _D = 65,
    yD = 71,
    bD = 4108,
    wD = 4126,
    Un = 80;
var Sb = {
        1: {
            n: "CodePage",
            t: yw
        },
        2: {
            n: "Category",
            t: Un
        },
        3: {
            n: "PresentationFormat",
            t: Un
        },
        4: {
            n: "ByteCount",
            t: Ga
        },
        5: {
            n: "LineCount",
            t: Ga
        },
        6: {
            n: "ParagraphCount",
            t: Ga
        },
        7: {
            n: "SlideCount",
            t: Ga
        },
        8: {
            n: "NoteCount",
            t: Ga
        },
        9: {
            n: "HiddenCount",
            t: Ga
        },
        10: {
            n: "MultimediaClipCount",
            t: Ga
        },
        11: {
            n: "ScaleCrop",
            t: cp
        },
        12: {
            n: "HeadingPairs",
            t: bD
        },
        13: {
            n: "TitlesOfParts",
            t: wD
        },
        14: {
            n: "Manager",
            t: Un
        },
        15: {
            n: "Company",
            t: Un
        },
        16: {
            n: "LinksUpToDate",
            t: cp
        },
        17: {
            n: "CharacterCount",
            t: Ga
        },
        19: {
            n: "SharedDoc",
            t: cp
        },
        22: {
            n: "HyperlinksChanged",
            t: cp
        },
        23: {
            n: "AppVersion",
            t: Ga,
            p: "version"
        },
        24: {
            n: "DigSig",
            t: _D
        },
        26: {
            n: "ContentType",
            t: Un
        },
        27: {
            n: "ContentStatus",
            t: Un
        },
        28: {
            n: "Language",
            t: Un
        },
        29: {
            n: "Version",
            t: Un
        },
        255: {},
        2147483648: {
            n: "Locale",
            t: Sp
        },
        2147483651: {
            n: "Behavior",
            t: Sp
        },
        1919054434: {}
    },
    Cb = {
        1: {
            n: "CodePage",
            t: yw
        },
        2: {
            n: "Title",
            t: Un
        },
        3: {
            n: "Subject",
            t: Un
        },
        4: {
            n: "Author",
            t: Un
        },
        5: {
            n: "Keywords",
            t: Un
        },
        6: {
            n: "Comments",
            t: Un
        },
        7: {
            n: "Template",
            t: Un
        },
        8: {
            n: "LastAuthor",
            t: Un
        },
        9: {
            n: "RevNumber",
            t: Un
        },
        10: {
            n: "EditTime",
            t: up
        },
        11: {
            n: "LastPrinted",
            t: up
        },
        12: {
            n: "CreatedDate",
            t: up
        },
        13: {
            n: "ModifiedDate",
            t: up
        },
        14: {
            n: "PageCount",
            t: Ga
        },
        15: {
            n: "WordCount",
            t: Ga
        },
        16: {
            n: "CharCount",
            t: Ga
        },
        17: {
            n: "Thumbnail",
            t: yD
        },
        18: {
            n: "Application",
            t: Un
        },
        19: {
            n: "DocSecurity",
            t: Ga
        },
        255: {},
        2147483648: {
            n: "Locale",
            t: Sp
        },
        2147483651: {
            n: "Behavior",
            t: Sp
        },
        1919054434: {}
    };

function SD(t) {
    return t.map(function(r) {
        return [r >> 16 & 255, r >> 8 & 255, r & 255];
    });
}
var CD = SD([0, 16777215, 16711680, 65280, 255, 16776960, 16711935, 65535, 0, 16777215, 16711680, 65280, 255, 16776960, 16711935, 65535, 8388608, 32768, 128, 8421376, 8388736, 32896, 12632256, 8421504, 10066431, 10040166, 16777164, 13434879, 6684774, 16744576, 26316, 13421823, 128, 16711935, 16776960, 65535, 8388736, 8388608, 32896, 255, 52479, 13434879, 13434828, 16777113, 10079487, 16751052, 13408767, 16764057, 3368703, 3394764, 10079232, 16763904, 16750848, 16737792, 6710937, 9868950, 13158, 3381606, 13056, 3355392, 10040064, 10040166, 3355545, 3355443, 0, 16777215, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),
    AD = na(CD),
    xa = {
        0: "#NULL!",
        7: "#DIV/0!",
        15: "#VALUE!",
        23: "#REF!",
        29: "#NAME?",
        36: "#NUM!",
        42: "#N/A",
        43: "#GETTING_DATA",
        255: "#WTF?"
    },
    cs = {
        "#NULL!": 0,
        "#DIV/0!": 7,
        "#VALUE!": 15,
        "#REF!": 23,
        "#NAME?": 29,
        "#NUM!": 36,
        "#N/A": 42,
        "#GETTING_DATA": 43,
        "#WTF?": 255
    },
    TD = ["_xlnm.Consolidate_Area", "_xlnm.Auto_Open", "_xlnm.Auto_Close", "_xlnm.Extract", "_xlnm.Database", "_xlnm.Criteria", "_xlnm.Print_Area", "_xlnm.Print_Titles", "_xlnm.Recorder", "_xlnm.Data_Form", "_xlnm.Auto_Activate", "_xlnm.Auto_Deactivate", "_xlnm.Sheet_Title", "_xlnm._FilterDatabase"],
    DD = {
        "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": "workbooks",
        "application/vnd.ms-excel.sheet.macroEnabled.main+xml": "workbooks",
        "application/vnd.ms-excel.sheet.binary.macroEnabled.main": "workbooks",
        "application/vnd.ms-excel.addin.macroEnabled.main+xml": "workbooks",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": "workbooks",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": "sheets",
        "application/vnd.ms-excel.worksheet": "sheets",
        "application/vnd.ms-excel.binIndexWs": "TODO",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": "charts",
        "application/vnd.ms-excel.chartsheet": "charts",
        "application/vnd.ms-excel.macrosheet+xml": "macros",
        "application/vnd.ms-excel.macrosheet": "macros",
        "application/vnd.ms-excel.intlmacrosheet": "TODO",
        "application/vnd.ms-excel.binIndexMs": "TODO",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": "dialogs",
        "application/vnd.ms-excel.dialogsheet": "dialogs",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml": "strs",
        "application/vnd.ms-excel.sharedStrings": "strs",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": "styles",
        "application/vnd.ms-excel.styles": "styles",
        "application/vnd.openxmlformats-package.core-properties+xml": "coreprops",
        "application/vnd.openxmlformats-officedocument.custom-properties+xml": "custprops",
        "application/vnd.openxmlformats-officedocument.extended-properties+xml": "extprops",
        "application/vnd.openxmlformats-officedocument.customXmlProperties+xml": "TODO",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty": "TODO",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": "comments",
        "application/vnd.ms-excel.comments": "comments",
        "application/vnd.ms-excel.threadedcomments+xml": "threadedcomments",
        "application/vnd.ms-excel.person+xml": "people",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml": "metadata",
        "application/vnd.ms-excel.sheetMetadata": "metadata",
        "application/vnd.ms-excel.pivotTable": "TODO",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml": "TODO",
        "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": "TODO",
        "application/vnd.ms-office.chartcolorstyle+xml": "TODO",
        "application/vnd.ms-office.chartstyle+xml": "TODO",
        "application/vnd.ms-office.chartex+xml": "TODO",
        "application/vnd.ms-excel.calcChain": "calcchains",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml": "calcchains",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings": "TODO",
        "application/vnd.ms-office.activeX": "TODO",
        "application/vnd.ms-office.activeX+xml": "TODO",
        "application/vnd.ms-excel.attachedToolbars": "TODO",
        "application/vnd.ms-excel.connections": "TODO",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": "TODO",
        "application/vnd.ms-excel.externalLink": "links",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml": "links",
        "application/vnd.ms-excel.pivotCacheDefinition": "TODO",
        "application/vnd.ms-excel.pivotCacheRecords": "TODO",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml": "TODO",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml": "TODO",
        "application/vnd.ms-excel.queryTable": "TODO",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml": "TODO",
        "application/vnd.ms-excel.userNames": "TODO",
        "application/vnd.ms-excel.revisionHeaders": "TODO",
        "application/vnd.ms-excel.revisionLog": "TODO",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml": "TODO",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml": "TODO",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml": "TODO",
        "application/vnd.ms-excel.tableSingleCells": "TODO",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml": "TODO",
        "application/vnd.ms-excel.slicer": "TODO",
        "application/vnd.ms-excel.slicerCache": "TODO",
        "application/vnd.ms-excel.slicer+xml": "TODO",
        "application/vnd.ms-excel.slicerCache+xml": "TODO",
        "application/vnd.ms-excel.wsSortMap": "TODO",
        "application/vnd.ms-excel.table": "TODO",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": "TODO",
        "application/vnd.openxmlformats-officedocument.theme+xml": "themes",
        "application/vnd.openxmlformats-officedocument.themeOverride+xml": "TODO",
        "application/vnd.ms-excel.Timeline+xml": "TODO",
        "application/vnd.ms-excel.TimelineCache+xml": "TODO",
        "application/vnd.ms-office.vbaProject": "vba",
        "application/vnd.ms-office.vbaProjectSignature": "TODO",
        "application/vnd.ms-office.volatileDependencies": "TODO",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml": "TODO",
        "application/vnd.ms-excel.controlproperties+xml": "TODO",
        "application/vnd.openxmlformats-officedocument.model+data": "TODO",
        "application/vnd.ms-excel.Survey+xml": "TODO",
        "application/vnd.openxmlformats-officedocument.drawing+xml": "drawings",
        "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": "TODO",
        "application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml": "TODO",
        "application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml": "TODO",
        "application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml": "TODO",
        "application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml": "TODO",
        "application/vnd.openxmlformats-officedocument.vmlDrawing": "TODO",
        "application/vnd.openxmlformats-package.relationships+xml": "rels",
        "application/vnd.openxmlformats-officedocument.oleObject": "TODO",
        "image/png": "TODO",
        sheet: "js"
    },
    fp = {
        workbooks: {
            xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",
            xlsm: "application/vnd.ms-excel.sheet.macroEnabled.main+xml",
            xlsb: "application/vnd.ms-excel.sheet.binary.macroEnabled.main",
            xlam: "application/vnd.ms-excel.addin.macroEnabled.main+xml",
            xltx: "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"
        },
        strs: {
            xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",
            xlsb: "application/vnd.ms-excel.sharedStrings"
        },
        comments: {
            xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",
            xlsb: "application/vnd.ms-excel.comments"
        },
        sheets: {
            xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",
            xlsb: "application/vnd.ms-excel.worksheet"
        },
        charts: {
            xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml",
            xlsb: "application/vnd.ms-excel.chartsheet"
        },
        dialogs: {
            xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml",
            xlsb: "application/vnd.ms-excel.dialogsheet"
        },
        macros: {
            xlsx: "application/vnd.ms-excel.macrosheet+xml",
            xlsb: "application/vnd.ms-excel.macrosheet"
        },
        metadata: {
            xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",
            xlsb: "application/vnd.ms-excel.sheetMetadata"
        },
        styles: {
            xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",
            xlsb: "application/vnd.ms-excel.styles"
        }
    };

function bw() {
    return {
        workbooks: [],
        sheets: [],
        charts: [],
        dialogs: [],
        macros: [],
        rels: [],
        strs: [],
        comments: [],
        threadedcomments: [],
        links: [],
        coreprops: [],
        extprops: [],
        custprops: [],
        themes: [],
        styles: [],
        calcchains: [],
        vba: [],
        drawings: [],
        metadata: [],
        people: [],
        TODO: [],
        xmlns: ""
    };
}

function ww(t, r, e) {
    var i = DT(DD),
        n = [],
        a;
    e || (n[n.length] = dn, n[n.length] = ut("Types", null, {
        xmlns: Pn.CT,
        "xmlns:xsd": Pn.xsd,
        "xmlns:xsi": Pn.xsi
    }), n = n.concat([
        ["xml", "application/xml"],
        ["bin", "application/vnd.ms-excel.sheet.binary.macroEnabled.main"],
        ["vml", "application/vnd.openxmlformats-officedocument.vmlDrawing"],
        ["data", "application/vnd.openxmlformats-officedocument.model+data"],
        ["bmp", "image/bmp"],
        ["png", "image/png"],
        ["gif", "image/gif"],
        ["emf", "image/x-emf"],
        ["wmf", "image/x-wmf"],
        ["jpg", "image/jpeg"],
        ["jpeg", "image/jpeg"],
        ["tif", "image/tiff"],
        ["tiff", "image/tiff"],
        ["pdf", "application/pdf"],
        ["rels", "application/vnd.openxmlformats-package.relationships+xml"]
    ].map(function(c) {
        return ut("Default", null, {
            Extension: c[0],
            ContentType: c[1]
        });
    })));
    var o = function(c) {
            t[c] && t[c].length > 0 && (a = t[c][0], n[n.length] = ut("Override", null, {
                PartName: (a[0] == "/" ? "" : "/") + a,
                ContentType: fp[c][r.bookType] || fp[c].xlsx
            }));
        },
        s = function(c) {
            (t[c] || []).forEach(function(u) {
                n[n.length] = ut("Override", null, {
                    PartName: (u[0] == "/" ? "" : "/") + u,
                    ContentType: fp[c][r.bookType] || fp[c].xlsx
                });
            });
        },
        l = function(c) {
            (t[c] || []).forEach(function(u) {
                n[n.length] = ut("Override", null, {
                    PartName: (u[0] == "/" ? "" : "/") + u,
                    ContentType: i[c][0]
                });
            });
        };
    return o("workbooks"), s("sheets"), s("charts"), l("themes"), ["strs", "styles"].forEach(o), ["coreprops", "extprops", "custprops"].forEach(l), l("vba"), l("comments"), l("threadedcomments"), l("drawings"), s("metadata"), l("people"), !e && n.length > 2 && (n[n.length] = "</Types>", n[1] = n[1].replace("/>", ">")), n.join("");
}
var Hr = {
    WB: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",
    SHEET: "http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",
    HLINK: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",
    VML: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",
    XPATH: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",
    XMISS: "http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",
    XLINK: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",
    CXML: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",
    CXMLP: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",
    CMNT: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",
    CORE_PROPS: "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",
    EXT_PROPS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",
    CUST_PROPS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",
    SST: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",
    STY: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",
    THEME: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",
    CHART: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",
    CHARTEX: "http://schemas.microsoft.com/office/2014/relationships/chartEx",
    CS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",
    WS: ["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet", "http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],
    DS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",
    MS: "http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",
    IMG: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",
    DRAW: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",
    XLMETA: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",
    TCMNT: "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",
    PEOPLE: "http://schemas.microsoft.com/office/2017/10/relationships/person",
    CONN: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/connections",
    VBA: "http://schemas.microsoft.com/office/2006/relationships/vbaProject"
};

function Sw(t) {
    var r = t.lastIndexOf("/");
    return t.slice(0, r + 1) + "_rels/" + t.slice(r + 1) + ".rels";
}

function N0(t) {
    var r = [dn, ut("Relationships", null, {
        xmlns: Pn.RELS
    })];
    return fn(t["!id"]).forEach(function(e) {
        r[r.length] = ut("Relationship", null, t["!id"][e]);
    }), r.length > 2 && (r[r.length] = "</Relationships>", r[1] = r[1].replace("/>", ">")), r.join("");
}

function ei(t, r, e, i, n, a) {
    if (n || (n = {}), t["!id"] || (t["!id"] = {}), t["!idx"] || (t["!idx"] = 1), r < 0)
        for (r = t["!idx"]; t["!id"]["rId" + r]; ++r);
    if (t["!idx"] = r + 1, n.Id = "rId" + r, n.Type = i, n.Target = e, a ? n.TargetMode = a : [Hr.HLINK, Hr.XPATH, Hr.XMISS].indexOf(n.Type) > -1 && (n.TargetMode = "External"), t["!id"][n.Id]) throw new Error("Cannot rewrite rId " + r);
    return t["!id"][n.Id] = n, t[("/" + n.Target).replace("//", "/")] = n, r;
}

function kD(t) {
    var r = [dn];
    r.push(`<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0" manifest:version="1.2">
`), r.push(`  <manifest:file-entry manifest:full-path="/" manifest:version="1.2" manifest:media-type="application/vnd.oasis.opendocument.spreadsheet"/>
`);
    for (var e = 0; e < t.length; ++e) r.push('  <manifest:file-entry manifest:full-path="' + t[e][0] + '" manifest:media-type="' + t[e][1] + `"/>
`);
    return r.push("</manifest:manifest>"), r.join("");
}

function Ab(t, r, e) {
    return ['  <rdf:Description rdf:about="' + t + `">
`, '    <rdf:type rdf:resource="http://docs.oasis-open.org/ns/office/1.2/meta/' + (e || "odf") + "#" + r + `"/>
`, `  </rdf:Description>
`].join("");
}

function FD(t, r) {
    return ['  <rdf:Description rdf:about="' + t + `">
`, '    <ns0:hasPart xmlns:ns0="http://docs.oasis-open.org/ns/office/1.2/meta/pkg#" rdf:resource="' + r + `"/>
`, `  </rdf:Description>
`].join("");
}

function ED(t) {
    var r = [dn];
    r.push(`<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
`);
    for (var e = 0; e != t.length; ++e) r.push(Ab(t[e][0], t[e][1])), r.push(FD("", t[e][0]));
    return r.push(Ab("", "Document", "pkg")), r.push("</rdf:RDF>"), r.join("");
}

function Cw(t, r) {
    return '<office:document-meta xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xlink="http://www.w3.org/1999/xlink" office:version="1.2"><office:meta><meta:generator>SheetJS ' + xf.version + "</meta:generator></office:meta></office:document-meta>";
}
var Fc = [
    ["cp:category", "Category"],
    ["cp:contentStatus", "ContentStatus"],
    ["cp:keywords", "Keywords"],
    ["cp:lastModifiedBy", "LastAuthor"],
    ["cp:lastPrinted", "LastPrinted"],
    ["cp:revision", "RevNumber"],
    ["cp:version", "Version"],
    ["dc:creator", "Author"],
    ["dc:description", "Comments"],
    ["dc:identifier", "Identifier"],
    ["dc:language", "Language"],
    ["dc:subject", "Subject"],
    ["dc:title", "Title"],
    ["dcterms:created", "CreatedDate", "date"],
    ["dcterms:modified", "ModifiedDate", "date"]
];

function ug(t, r, e, i, n) {
    n[t] != null || r == null || r === "" || (n[t] = r, r = kr(r), i[i.length] = e ? ut(t, r, e) : Vn(t, r));
}

function Aw(t, r) {
    var e = r || {},
        i = [dn, ut("cp:coreProperties", null, {
            "xmlns:cp": Pn.CORE_PROPS,
            "xmlns:dc": Pn.dc,
            "xmlns:dcterms": Pn.dcterms,
            "xmlns:dcmitype": Pn.dcmitype,
            "xmlns:xsi": Pn.xsi
        })],
        n = {};
    if (!t && !e.Props) return i.join("");
    t && (t.CreatedDate != null && ug("dcterms:created", typeof t.CreatedDate == "string" ? t.CreatedDate : bg(t.CreatedDate, e.WTF), {
        "xsi:type": "dcterms:W3CDTF"
    }, i, n), t.ModifiedDate != null && ug("dcterms:modified", typeof t.ModifiedDate == "string" ? t.ModifiedDate : bg(t.ModifiedDate, e.WTF), {
        "xsi:type": "dcterms:W3CDTF"
    }, i, n));
    for (var a = 0; a != Fc.length; ++a) {
        var o = Fc[a],
            s = e.Props && e.Props[o[1]] != null ? e.Props[o[1]] : t ? t[o[1]] : null;
        s === !0 ? s = "1" : s === !1 ? s = "0" : typeof s == "number" && (s = String(s)), s != null && ug(o[0], s, null, i, n);
    }
    return i.length > 2 && (i[i.length] = "</cp:coreProperties>", i[1] = i[1].replace("/>", ">")), i.join("");
}
var L0 = [
        ["Application", "Application", "string"],
        ["AppVersion", "AppVersion", "string"],
        ["Company", "Company", "string"],
        ["DocSecurity", "DocSecurity", "string"],
        ["Manager", "Manager", "string"],
        ["HyperlinksChanged", "HyperlinksChanged", "bool"],
        ["SharedDoc", "SharedDoc", "bool"],
        ["LinksUpToDate", "LinksUpToDate", "bool"],
        ["ScaleCrop", "ScaleCrop", "bool"],
        ["HeadingPairs", "HeadingPairs", "raw"],
        ["TitlesOfParts", "TitlesOfParts", "raw"]
    ],
    Tw = ["Worksheets", "SheetNames", "NamedRanges", "DefinedNames", "Chartsheets", "ChartNames"];

function Dw(t) {
    var r = [],
        e = ut;
    return t || (t = {}), t.Application = "SheetJS", r[r.length] = dn, r[r.length] = ut("Properties", null, {
        xmlns: Pn.EXT_PROPS,
        "xmlns:vt": Pn.vt
    }), L0.forEach(function(i) {
        if (t[i[1]] !== void 0) {
            var n;
            switch (i[2]) {
                case "string":
                    n = kr(String(t[i[1]]));
                    break;
                case "bool":
                    n = t[i[1]] ? "true" : "false";
                    break;
            }
            n !== void 0 && (r[r.length] = e(i[0], n));
        }
    }), r[r.length] = e("HeadingPairs", e("vt:vector", e("vt:variant", "<vt:lpstr>Worksheets</vt:lpstr>") + e("vt:variant", e("vt:i4", String(t.Worksheets))), {
        size: 2,
        baseType: "variant"
    })), r[r.length] = e("TitlesOfParts", e("vt:vector", t.SheetNames.map(function(i) {
        return "<vt:lpstr>" + kr(i) + "</vt:lpstr>";
    }).join(""), {
        size: t.Worksheets,
        baseType: "lpstr"
    })), r.length > 2 && (r[r.length] = "</Properties>", r[1] = r[1].replace("/>", ">")), r.join("");
}

function kw(t) {
    var r = [dn, ut("Properties", null, {
        xmlns: Pn.CUST_PROPS,
        "xmlns:vt": Pn.vt
    })];
    if (!t) return r.join("");
    var e = 1;
    return fn(t).forEach(function(n) {
        ++e, r[r.length] = ut("property", GT(t[n], !0), {
            fmtid: "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",
            pid: e,
            name: kr(n)
        });
    }), r.length > 2 && (r[r.length] = "</Properties>", r[1] = r[1].replace("/>", ">")), r.join("");
}
var Tb = {
    Title: "Title",
    Subject: "Subject",
    Author: "Author",
    Keywords: "Keywords",
    Comments: "Description",
    LastAuthor: "LastAuthor",
    RevNumber: "Revision",
    Application: "AppName",
    LastPrinted: "LastPrinted",
    CreatedDate: "Created",
    ModifiedDate: "LastSaved",
    Category: "Category",
    Manager: "Manager",
    Company: "Company",
    AppVersion: "Version",
    ContentStatus: "ContentStatus",
    Identifier: "Identifier",
    Language: "Language"
};

function PD(t, r) {
    var e = [];
    return fn(Tb).map(function(i) {
        for (var n = 0; n < Fc.length; ++n)
            if (Fc[n][1] == i) return Fc[n];
        for (n = 0; n < L0.length; ++n)
            if (L0[n][1] == i) return L0[n];
        throw i;
    }).forEach(function(i) {
        if (t[i[1]] != null) {
            var n = r && r.Props && r.Props[i[1]] != null ? r.Props[i[1]] : t[i[1]];
            switch (i[2]) {
                case "date":
                    n = new Date(n).toISOString().replace(/\.\d*Z/, "Z");
                    break;
            }
            typeof n == "number" ? n = String(n) : n === !0 || n === !1 ? n = n ? "1" : "0" : n instanceof Date && (n = new Date(n).toISOString().replace(/\.\d*Z/, "")), e.push(Vn(Tb[i[1]] || i[1], n));
        }
    }), ut("DocumentProperties", e.join(""), {
        xmlns: Xa.o
    });
}

function ID(t, r) {
    var e = ["Worksheets", "SheetNames"],
        i = "CustomDocumentProperties",
        n = [];
    return t && fn(t).forEach(function(a) {
        if (Object.prototype.hasOwnProperty.call(t, a)) {
            for (var o = 0; o < Fc.length; ++o)
                if (a == Fc[o][1]) return;
            for (o = 0; o < L0.length; ++o)
                if (a == L0[o][1]) return;
            for (o = 0; o < e.length; ++o)
                if (a == e[o]) return;
            var s = t[a],
                l = "string";
            typeof s == "number" ? (l = "float", s = String(s)) : s === !0 || s === !1 ? (l = "boolean", s = s ? "1" : "0") : s = String(s), n.push(ut(db(a), s, {
                "dt:dt": l
            }));
        }
    }), r && fn(r).forEach(function(a) {
        if (Object.prototype.hasOwnProperty.call(r, a) && !(t && Object.prototype.hasOwnProperty.call(t, a))) {
            var o = r[a],
                s = "string";
            typeof o == "number" ? (s = "float", o = String(o)) : o === !0 || o === !1 ? (s = "boolean", o = o ? "1" : "0") : o instanceof Date ? (s = "dateTime.tz", o = o.toISOString()) : o = String(o), n.push(ut(db(a), o, {
                "dt:dt": s
            }));
        }
    }), "<" + i + ' xmlns="' + Xa.o + '">' + n.join("") + "</" + i + ">";
}

function OD(t) {
    var r = typeof t == "string" ? new Date(Date.parse(t)) : t,
        e = r.getTime() / 1e3 + 11644473600,
        i = e % Math.pow(2, 32),
        n = (e - i) / Math.pow(2, 32);
    i *= 1e7, n *= 1e7;
    var a = i / Math.pow(2, 32) | 0;
    a > 0 && (i = i % Math.pow(2, 32), n += a);
    var o = Ue(8);
    return o.write_shift(4, i), o.write_shift(4, n), o;
}

function Db(t, r) {
    var e = Ue(4),
        i = Ue(4);
    switch (e.write_shift(4, t == 80 ? 31 : t), t) {
        case 3:
            i.write_shift(-4, r);
            break;
        case 5:
            i = Ue(8), i.write_shift(8, r, "f");
            break;
        case 11:
            i.write_shift(4, r ? 1 : 0);
            break;
        case 64:
            i = OD(r);
            break;
        case 31:
        case 80:
            for (i = Ue(4 + 2 * (r.length + 1) + (r.length % 2 ? 0 : 2)), i.write_shift(4, r.length + 1), i.write_shift(0, r, "dbcs"); i.l != i.length;) i.write_shift(1, 0);
            break;
        default:
            throw new Error("TypedPropertyValue unrecognized type " + t + " " + r);
    }
    return un([e, i]);
}
var Fw = ["CodePage", "Thumbnail", "_PID_LINKBASE", "_PID_HLINKS", "SystemIdentifier", "FMTID"];

function ND(t) {
    switch (typeof t) {
        case "boolean":
            return 11;
        case "number":
            return (t | 0) == t ? 3 : 5;
        case "string":
            return 31;
        case "object":
            if (t instanceof Date) return 64;
            break;
    }
    return -1;
}

function kb(t, r, e) {
    var i = Ue(8),
        n = [],
        a = [],
        o = 8,
        s = 0,
        l = Ue(8),
        c = Ue(8);
    if (l.write_shift(4, 2), l.write_shift(4, 1200), c.write_shift(4, 1), a.push(l), n.push(c), o += 8 + l.length, !r) {
        c = Ue(8), c.write_shift(4, 0), n.unshift(c);
        var u = [Ue(4)];
        for (u[0].write_shift(4, t.length), s = 0; s < t.length; ++s) {
            var h = t[s][0];
            for (l = Ue(8 + 2 * (h.length + 1) + (h.length % 2 ? 0 : 2)), l.write_shift(4, s + 2), l.write_shift(4, h.length + 1), l.write_shift(0, h, "dbcs"); l.l != l.length;) l.write_shift(1, 0);
            u.push(l);
        }
        l = un(u), a.unshift(l), o += 8 + l.length;
    }
    for (s = 0; s < t.length; ++s)
        if (!(r && !r[t[s][0]]) && !(Fw.indexOf(t[s][0]) > -1 || Tw.indexOf(t[s][0]) > -1) && t[s][1] != null) {
            var d = t[s][1],
                f = 0;
            if (r) {
                f = +r[t[s][0]];
                var m = e[f];
                if (m.p == "version" && typeof d == "string") {
                    var _ = d.split(".");
                    d = (+_[0] << 16) + (+_[1] || 0);
                }
                l = Db(m.t, d);
            } else {
                var x = ND(d);
                x == -1 && (x = 31, d = String(d)), l = Db(x, d);
            }
            a.push(l), c = Ue(8), c.write_shift(4, r ? f : 2 + s), n.push(c), o += 8 + l.length;
        }
    var g = 8 * (a.length + 1);
    for (s = 0; s < a.length; ++s) n[s].write_shift(4, g), g += a[s].length;
    return i.write_shift(4, o), i.write_shift(4, a.length), un([i].concat(n).concat(a));
}

function Fb(t, r, e, i, n, a) {
    var o = Ue(n ? 68 : 48),
        s = [o];
    o.write_shift(2, 65534), o.write_shift(2, 0), o.write_shift(4, 842412599), o.write_shift(16, _i.utils.consts.HEADER_CLSID, "hex"), o.write_shift(4, n ? 2 : 1), o.write_shift(16, r, "hex"), o.write_shift(4, n ? 68 : 48);
    var l = kb(t, e, i);
    if (s.push(l), n) {
        var c = kb(n, null, null);
        o.write_shift(16, a, "hex"), o.write_shift(4, 68 + l.length), s.push(c);
    }
    return un(s);
}

function LD(t, r) {
    r || (r = Ue(t));
    for (var e = 0; e < t; ++e) r.write_shift(1, 0);
    return r;
}

function RD(t, r) {
    return t.read_shift(r) === 1;
}

function ea(t, r) {
    return r || (r = Ue(2)), r.write_shift(2, +!!t), r;
}

function pp(t) {
    return t.read_shift(2, "u");
}

function uo(t, r) {
    return r || (r = Ue(2)), r.write_shift(2, t), r;
}

function Ew(t, r, e) {
    return e || (e = Ue(2)), e.write_shift(1, r == "e" ? +t : +!!t), e.write_shift(1, r == "e" ? 1 : 0), e;
}

function Pw(t, r, e) {
    var i = t.read_shift(e && e.biff >= 12 ? 2 : 1),
        n = "sbcs-cont",
        a = Ka;
    if (e && e.biff >= 8 && (Ka = 1200), !e || e.biff == 8) {
        var o = t.read_shift(1);
        o && (n = "dbcs-cont");
    } else e.biff == 12 && (n = "wstr");
    e.biff >= 2 && e.biff <= 5 && (n = "cpstr");
    var s = i ? t.read_shift(i, n) : "";
    return Ka = a, s;
}

function MD(t) {
    var r = t.t || "",
        e = 1,
        i = Ue(3 + (e > 1 ? 2 : 0));
    i.write_shift(2, r.length), i.write_shift(1, (e > 1 ? 8 : 0) | 1), e > 1 && i.write_shift(2, e);
    var n = Ue(2 * r.length);
    n.write_shift(2 * r.length, r, "utf16le");
    var a = [i, n];
    return un(a);
}

function BD(t, r, e) {
    var i;
    if (e) {
        if (e.biff >= 2 && e.biff <= 5) return t.read_shift(r, "cpstr");
        if (e.biff >= 12) return t.read_shift(r, "dbcs-cont");
    }
    var n = t.read_shift(1);
    return n === 0 ? i = t.read_shift(r, "sbcs-cont") : i = t.read_shift(r, "dbcs-cont"), i;
}

function UD(t, r, e) {
    var i = t.read_shift(e && e.biff == 2 ? 1 : 2);
    return i === 0 ? (t.l++, "") : BD(t, i, e);
}

function VD(t, r, e) {
    if (e.biff > 5) return UD(t, r, e);
    var i = t.read_shift(1);
    return i === 0 ? (t.l++, "") : t.read_shift(i, e.biff <= 4 || !t.lens ? "cpstr" : "sbcs-cont");
}

function Iw(t, r, e) {
    return e || (e = Ue(3 + 2 * t.length)), e.write_shift(2, t.length), e.write_shift(1, 1), e.write_shift(31, t, "utf16le"), e;
}

function Eb(t, r) {
    r || (r = Ue(6 + t.length * 2)), r.write_shift(4, 1 + t.length);
    for (var e = 0; e < t.length; ++e) r.write_shift(2, t.charCodeAt(e));
    return r.write_shift(2, 0), r;
}

function zD(t) {
    var r = Ue(512),
        e = 0,
        i = t.Target;
    i.slice(0, 7) == "file://" && (i = i.slice(7));
    var n = i.indexOf("#"),
        a = n > -1 ? 31 : 23;
    switch (i.charAt(0)) {
        case "#":
            a = 28;
            break;
        case ".":
            a &= -3;
            break;
    }
    r.write_shift(4, 2), r.write_shift(4, a);
    var o = [8, 6815827, 6619237, 4849780, 83];
    for (e = 0; e < o.length; ++e) r.write_shift(4, o[e]);
    if (a == 28) i = i.slice(1), Eb(i, r);
    else if (a & 2) {
        for (o = "e0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "), e = 0; e < o.length; ++e) r.write_shift(1, parseInt(o[e], 16));
        var s = n > -1 ? i.slice(0, n) : i;
        for (r.write_shift(4, 2 * (s.length + 1)), e = 0; e < s.length; ++e) r.write_shift(2, s.charCodeAt(e));
        r.write_shift(2, 0), a & 8 && Eb(n > -1 ? i.slice(n + 1) : "", r);
    } else {
        for (o = "03 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46".split(" "), e = 0; e < o.length; ++e) r.write_shift(1, parseInt(o[e], 16));
        for (var l = 0; i.slice(l * 3, l * 3 + 3) == "../" || i.slice(l * 3, l * 3 + 3) == "..\\";) ++l;
        for (r.write_shift(2, l), r.write_shift(4, i.length - 3 * l + 1), e = 0; e < i.length - 3 * l; ++e) r.write_shift(1, i.charCodeAt(e + 3 * l) & 255);
        for (r.write_shift(1, 0), r.write_shift(2, 65535), r.write_shift(2, 57005), e = 0; e < 6; ++e) r.write_shift(4, 0);
    }
    return r.slice(0, r.l);
}

function Nc(t, r, e, i) {
    return i || (i = Ue(6)), i.write_shift(2, t), i.write_shift(2, r), i.write_shift(2, e || 0), i;
}

function WD(t, r, e) {
    var i = e.biff > 8 ? 4 : 2,
        n = t.read_shift(i),
        a = t.read_shift(i, "i"),
        o = t.read_shift(i, "i");
    return [n, a, o];
}

function jD(t) {
    var r = t.read_shift(2),
        e = t.read_shift(2),
        i = t.read_shift(2),
        n = t.read_shift(2);
    return {
        s: {
            c: i,
            r
        },
        e: {
            c: n,
            r: e
        }
    };
}

function Ow(t, r) {
    return r || (r = Ue(8)), r.write_shift(2, t.s.r), r.write_shift(2, t.e.r), r.write_shift(2, t.s.c), r.write_shift(2, t.e.c), r;
}

function Gg(t, r, e) {
    var i = 1536,
        n = 16;
    switch (e.bookType) {
        case "biff8":
            break;
        case "biff5":
            i = 1280, n = 8;
            break;
        case "biff4":
            i = 4, n = 6;
            break;
        case "biff3":
            i = 3, n = 6;
            break;
        case "biff2":
            i = 2, n = 4;
            break;
        case "xla":
            break;
        default:
            throw new Error("unsupported BIFF version");
    }
    var a = Ue(n);
    return a.write_shift(2, i), a.write_shift(2, r), n > 4 && a.write_shift(2, 29282), n > 6 && a.write_shift(2, 1997), n > 8 && (a.write_shift(2, 49161), a.write_shift(2, 1), a.write_shift(2, 1798), a.write_shift(2, 0)), a;
}

function HD(t, r) {
    var e = !r || r.biff == 8,
        i = Ue(e ? 112 : 54);
    for (i.write_shift(r.biff == 8 ? 2 : 1, 7), e && i.write_shift(1, 0), i.write_shift(4, 859007059), i.write_shift(4, 5458548 | (e ? 0 : 536870912)); i.l < i.length;) i.write_shift(1, e ? 0 : 32);
    return i;
}

function GD(t, r) {
    var e = !r || r.biff >= 8 ? 2 : 1,
        i = Ue(8 + e * t.name.length);
    i.write_shift(4, t.pos), i.write_shift(1, t.hs || 0), i.write_shift(1, t.dt), i.write_shift(1, t.name.length), r.biff >= 8 && i.write_shift(1, 1), i.write_shift(e * t.name.length, t.name, r.biff < 8 ? "sbcs" : "utf16le");
    var n = i.slice(0, i.l);
    return n.l = i.l, n;
}

function qD(t, r) {
    var e = Ue(8);
    e.write_shift(4, t.Count), e.write_shift(4, t.Unique);
    for (var i = [], n = 0; n < t.length; ++n) i[n] = MD(t[n], r);
    var a = un([e].concat(i));
    return a.parts = [e.length].concat(i.map(function(o) {
        return o.length;
    })), a;
}

function XD() {
    var t = Ue(18);
    return t.write_shift(2, 0), t.write_shift(2, 0), t.write_shift(2, 29280), t.write_shift(2, 17600), t.write_shift(2, 56), t.write_shift(2, 0), t.write_shift(2, 0), t.write_shift(2, 1), t.write_shift(2, 500), t;
}

function KD(t) {
    var r = Ue(18),
        e = 1718;
    return t && t.RTL && (e |= 64), r.write_shift(2, e), r.write_shift(4, 0), r.write_shift(4, 64), r.write_shift(4, 0), r.write_shift(4, 0), r;
}

function YD(t, r) {
    var e = t.name || "Arial",
        i = r && r.biff == 5,
        n = i ? 15 + e.length : 16 + 2 * e.length,
        a = Ue(n);
    return a.write_shift(2, (t.sz || 12) * 20), a.write_shift(4, 0), a.write_shift(2, 400), a.write_shift(4, 0), a.write_shift(2, 0), a.write_shift(1, e.length), i || a.write_shift(1, 1), a.write_shift((i ? 1 : 2) * e.length, e, i ? "sbcs" : "utf16le"), a;
}

function ZD(t, r, e, i) {
    var n = Ue(10);
    return Nc(t, r, i, n), n.write_shift(4, e), n;
}

function JD(t, r, e, i, n) {
    var a = !n || n.biff == 8,
        o = Ue(8 + +a + (1 + a) * e.length);
    return Nc(t, r, i, o), o.write_shift(2, e.length), a && o.write_shift(1, 1), o.write_shift((1 + a) * e.length, e, a ? "utf16le" : "sbcs"), o;
}

function QD(t, r, e, i) {
    var n = e && e.biff == 5;
    i || (i = Ue(n ? 3 + r.length : 5 + 2 * r.length)), i.write_shift(2, t), i.write_shift(n ? 1 : 2, r.length), n || i.write_shift(1, 1), i.write_shift((n ? 1 : 2) * r.length, r, n ? "sbcs" : "utf16le");
    var a = i.length > i.l ? i.slice(0, i.l) : i;
    return a.l == null && (a.l = a.length), a;
}

function $D(t) {
    var r = Ue(1 + t.length);
    return r.write_shift(1, t.length), r.write_shift(t.length, t, "sbcs"), r;
}

function ek(t) {
    var r = Ue(3 + t.length);
    return r.l += 2, r.write_shift(1, t.length), r.write_shift(t.length, t, "sbcs"), r;
}

function tk(t, r) {
    var e = r.biff == 8 || !r.biff ? 4 : 2,
        i = Ue(2 * e + 6);
    return i.write_shift(e, t.s.r), i.write_shift(e, t.e.r + 1), i.write_shift(2, t.s.c), i.write_shift(2, t.e.c + 1), i.write_shift(2, 0), i;
}

function Pb(t, r, e, i) {
    var n = e && e.biff == 5;
    i || (i = Ue(n ? 16 : 20)), i.write_shift(2, 0), t.style ? (i.write_shift(2, t.numFmtId || 0), i.write_shift(2, 65524)) : (i.write_shift(2, t.numFmtId || 0), i.write_shift(2, r << 4));
    var a = 0;
    return t.numFmtId > 0 && n && (a |= 1024), i.write_shift(4, a), i.write_shift(4, 0), n || i.write_shift(4, 0), i.write_shift(2, 0), i;
}

function rk(t) {
    var r = Ue(4);
    return r.l += 2, r.write_shift(1, t.numFmtId), r.l++, r;
}

function Nw(t) {
    var r = Ue(12);
    return r.l++, r.write_shift(1, t.numFmtId), r.l += 10, r;
}
var ik = Nw;

function nk(t) {
    var r = Ue(8);
    return r.write_shift(4, 0), r.write_shift(2, t[0] ? t[0] + 1 : 0), r.write_shift(2, t[1] ? t[1] + 1 : 0), r;
}

function fg(t, r, e, i, n, a) {
    var o = Ue(8);
    return Nc(t, r, i, o), Ew(e, a, o), o;
}

function ak(t, r, e, i) {
    var n = Ue(14);
    return Nc(t, r, i, n), Oc(e, n), n;
}

function ok(t, r, e) {
    if (e.biff < 8 || !(e.biff > 8) && r == t[t.l] + (t[t.l + 1] == 3 ? 1 : 0) + 1) return Ib(t, r, e);
    for (var i = [], n = t.l + r, a = t.read_shift(e.biff > 8 ? 4 : 2); a-- !== 0;) i.push(WD(t, e.biff > 8 ? 12 : 6, e));
    if (t.l != n) throw new Error("Bad ExternSheet: " + t.l + " != " + n);
    return i;
}

function Ib(t, r, e) {
    t[t.l + 1] == 3 && t[t.l]++;
    var i = Pw(t, r, e);
    return i.charCodeAt(0) == 3 ? i.slice(1) : i;
}

function hg(t, r, e, i) {
    var n = Ue(6 + (i || t.length));
    return n.write_shift(2, r), n.write_shift(2, e), n.write_shift(2, i || t.length), n.write_shift(t.length, t, "sbcs"), n;
}

function sk(t) {
    var r = Ue(2 + t.length * 8);
    r.write_shift(2, t.length);
    for (var e = 0; e < t.length; ++e) Ow(t[e], r);
    return r;
}

function lk(t) {
    var r = Ue(24),
        e = Li(t[0]);
    r.write_shift(2, e.r), r.write_shift(2, e.r), r.write_shift(2, e.c), r.write_shift(2, e.c);
    for (var i = "d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "), n = 0; n < 16; ++n) r.write_shift(1, parseInt(i[n], 16));
    return un([r, zD(t[1])]);
}

function ck(t) {
    var r = t[1].Tooltip,
        e = Ue(10 + 2 * (r.length + 1));
    e.write_shift(2, 2048);
    var i = Li(t[0]);
    e.write_shift(2, i.r), e.write_shift(2, i.r), e.write_shift(2, i.c), e.write_shift(2, i.c);
    for (var n = 0; n < r.length; ++n) e.write_shift(2, r.charCodeAt(n));
    return e.write_shift(2, 0), e;
}

function uk(t) {
    return t || (t = Ue(4)), t.write_shift(2, 1), t.write_shift(2, 1), t;
}

function fk(t, r, e) {
    if (!e.cellStyles) return us(t, r);
    var i = e && e.biff >= 12 ? 4 : 2,
        n = t.read_shift(i),
        a = t.read_shift(i),
        o = t.read_shift(i),
        s = t.read_shift(i),
        l = t.read_shift(2);
    i == 2 && (t.l += 2);
    var c = {
        s: n,
        e: a,
        w: o,
        ixfe: s,
        flags: l
    };
    return (e.biff >= 5 || !e.biff) && (c.level = l >> 8 & 7), c;
}

function hk(t, r) {
    var e = Ue(12);
    e.write_shift(2, r), e.write_shift(2, r), e.write_shift(2, t.width * 256), e.write_shift(2, 0);
    var i = 0;
    return t.hidden && (i |= 1), e.write_shift(1, i), i = t.level || 0, e.write_shift(1, i), e.write_shift(2, 0), e;
}

function dk(t) {
    for (var r = Ue(2 * t), e = 0; e < t; ++e) r.write_shift(2, e + 1);
    return r;
}

function kf(t, r, e, i, n) {
    return t || (t = Ue(7)), t.write_shift(2, r), t.write_shift(2, e), t.write_shift(1, i || 0), t.write_shift(1, n || 0), t.write_shift(1, 0), t;
}

function pk(t, r, e, i, n) {
    var a = Ue(15);
    return kf(a, t, r, i || 0, n || 0), a.write_shift(8, e, "f"), a;
}

function mk(t, r, e, i, n) {
    var a = Ue(9);
    return kf(a, t, r, i || 0, n || 0), a.write_shift(2, e), a;
}
var gk = function() {
        var t = {
                1: 437,
                2: 850,
                3: 1252,
                4: 1e4,
                100: 852,
                101: 866,
                102: 865,
                103: 861,
                104: 895,
                105: 620,
                106: 737,
                107: 857,
                120: 950,
                121: 949,
                122: 936,
                123: 932,
                124: 874,
                125: 1255,
                126: 1256,
                150: 10007,
                151: 10029,
                152: 10006,
                200: 1250,
                201: 1251,
                202: 1254,
                203: 1253,
                0: 20127,
                8: 865,
                9: 437,
                10: 850,
                11: 437,
                13: 437,
                14: 850,
                15: 437,
                16: 850,
                17: 437,
                18: 850,
                19: 932,
                20: 850,
                21: 437,
                22: 850,
                23: 865,
                24: 437,
                25: 437,
                26: 850,
                27: 437,
                28: 863,
                29: 850,
                31: 852,
                34: 852,
                35: 852,
                36: 860,
                37: 850,
                38: 866,
                55: 850,
                64: 852,
                77: 936,
                78: 949,
                79: 950,
                80: 874,
                87: 1252,
                88: 1252,
                89: 1252,
                108: 863,
                134: 737,
                135: 852,
                136: 857,
                204: 1257,
                255: 16969
            },
            r = Fg({
                1: 437,
                2: 850,
                3: 1252,
                4: 1e4,
                100: 852,
                101: 866,
                102: 865,
                103: 861,
                104: 895,
                105: 620,
                106: 737,
                107: 857,
                120: 950,
                121: 949,
                122: 936,
                123: 932,
                124: 874,
                125: 1255,
                126: 1256,
                150: 10007,
                151: 10029,
                152: 10006,
                200: 1250,
                201: 1251,
                202: 1254,
                203: 1253,
                0: 20127
            });

        function e(s, l) {
            var c = [],
                u = Ec(1);
            switch (l.type) {
                case "base64":
                    u = qa(Nl(s));
                    break;
                case "binary":
                    u = qa(s);
                    break;
                case "buffer":
                case "array":
                    u = s;
                    break;
            }
            ga(u, 0);
            var h = u.read_shift(1),
                d = !!(h & 136),
                f = !1,
                m = !1;
            switch (h) {
                case 2:
                    break;
                case 3:
                    break;
                case 48:
                    f = !0, d = !0;
                    break;
                case 49:
                    f = !0, d = !0;
                    break;
                case 131:
                    break;
                case 139:
                    break;
                case 140:
                    m = !0;
                    break;
                case 245:
                    break;
                default:
                    throw new Error("DBF Unsupported Version: " + h.toString(16));
            }
            var _ = 0,
                x = 521;
            h == 2 && (_ = u.read_shift(2)), u.l += 3, h != 2 && (_ = u.read_shift(4)), _ > 1048576 && (_ = 1e6), h != 2 && (x = u.read_shift(2));
            var g = u.read_shift(2),
                b = l.codepage || 1252;
            h != 2 && (u.l += 16, u.read_shift(1), u[u.l] !== 0 && (b = t[u[u.l]]), u.l += 1, u.l += 2), m && (u.l += 36);
            for (var w = [], T = {}, E = Math.min(u.length, h == 2 ? 521 : x - 10 - (f ? 264 : 0)), L = m ? 32 : 11; u.l < E && u[u.l] != 13;) switch (T = {}, T.name = (typeof Kr < "u" ? Kr.utils.decode(b, u.slice(u.l, u.l + L)) : Pc(u.slice(u.l, u.l + L))).replace(/[\u0000\r\n][\S\s]*$/g, ""), u.l += L, T.type = String.fromCharCode(u.read_shift(1)), h != 2 && !m && (T.offset = u.read_shift(4)), T.len = u.read_shift(1), h == 2 && (T.offset = u.read_shift(2)), T.dec = u.read_shift(1), T.name.length && w.push(T), h != 2 && (u.l += m ? 13 : 14), T.type) {
                case "B":
                    (!f || T.len != 8) && l.WTF && console.log("Skipping " + T.name + ":" + T.type);
                    break;
                case "G":
                case "P":
                    l.WTF && console.log("Skipping " + T.name + ":" + T.type);
                    break;
                case "+":
                case "0":
                case "@":
                case "C":
                case "D":
                case "F":
                case "I":
                case "L":
                case "M":
                case "N":
                case "O":
                case "T":
                case "Y":
                    break;
                default:
                    throw new Error("Unknown Field Type: " + T.type);
            }
            if (u[u.l] !== 13 && (u.l = x - 1), u.read_shift(1) !== 13) throw new Error("DBF Terminator not found " + u.l + " " + u[u.l]);
            u.l = x;
            var P = 0,
                k = 0;
            for (c[0] = [], k = 0; k != w.length; ++k) c[0][k] = w[k].name;
            for (; _-- > 0;) {
                if (u[u.l] === 42) {
                    u.l += g;
                    continue;
                }
                for (++u.l, c[++P] = [], k = 0, k = 0; k != w.length; ++k) {
                    var A = u.slice(u.l, u.l + w[k].len);
                    u.l += w[k].len, ga(A, 0);
                    var N = typeof Kr < "u" ? Kr.utils.decode(b, A) : Pc(A);
                    switch (w[k].type) {
                        case "C":
                            N.trim().length && (c[P][k] = N.replace(/([^\s])\s+$/, "$1"));
                            break;
                        case "D":
                            N.length === 8 ? (c[P][k] = new Date(Date.UTC(+N.slice(0, 4), +N.slice(4, 6) - 1, +N.slice(6, 8), 0, 0, 0, 0)), l && l.UTC || (c[P][k] = U0(c[P][k]))) : c[P][k] = N;
                            break;
                        case "F":
                            c[P][k] = parseFloat(N.trim());
                            break;
                        case "+":
                        case "I":
                            c[P][k] = m ? A.read_shift(-4, "i") ^ 2147483648 : A.read_shift(4, "i");
                            break;
                        case "L":
                            switch (N.trim().toUpperCase()) {
                                case "Y":
                                case "T":
                                    c[P][k] = !0;
                                    break;
                                case "N":
                                case "F":
                                    c[P][k] = !1;
                                    break;
                                case "":
                                case "\0":
                                case "?":
                                    break;
                                default:
                                    throw new Error("DBF Unrecognized L:|" + N + "|");
                            }
                            break;
                        case "M":
                            if (!d) throw new Error("DBF Unexpected MEMO for type " + h.toString(16));
                            c[P][k] = "##MEMO##" + (m ? parseInt(N.trim(), 10) : A.read_shift(4));
                            break;
                        case "N":
                            N = N.replace(/\u0000/g, "").trim(), N && N != "." && (c[P][k] = +N || 0);
                            break;
                        case "@":
                            c[P][k] = new Date(A.read_shift(-8, "f") - 621356832e5);
                            break;
                        case "T":
                            {
                                var C = A.read_shift(4),
                                    F = A.read_shift(4);
                                if (C == 0 && F == 0) break;c[P][k] = new Date((C - 2440588) * 864e5 + F),
                                l && l.UTC || (c[P][k] = U0(c[P][k]));
                            }
                            break;
                        case "Y":
                            c[P][k] = A.read_shift(4, "i") / 1e4 + A.read_shift(4, "i") / 1e4 * Math.pow(2, 32);
                            break;
                        case "O":
                            c[P][k] = -A.read_shift(-8, "f");
                            break;
                        case "B":
                            if (f && w[k].len == 8) {
                                c[P][k] = A.read_shift(8, "f");
                                break;
                            }
                        case "G":
                        case "P":
                            A.l += w[k].len;
                            break;
                        case "0":
                            if (w[k].name === "_NullFlags") break;
                        default:
                            throw new Error("DBF Unsupported data type " + w[k].type);
                    }
                }
            }
            if (h != 2 && u.l < u.length && u[u.l++] != 26) throw new Error("DBF EOF Marker missing " + (u.l - 1) + " of " + u.length + " " + u[u.l - 1].toString(16));
            return l && l.sheetRows && (c = c.slice(0, l.sheetRows)), l.DBF = w, c;
        }

        function i(s, l) {
            var c = l || {};
            c.dateNF || (c.dateNF = "yyyymmdd");
            var u = H0(e(s, c), c);
            return u["!cols"] = c.DBF.map(function(h) {
                return {
                    wch: h.len,
                    DBF: h
                };
            }), delete c.DBF, u;
        }

        function n(s, l) {
            try {
                var c = j0(i(s, l), l);
                return c.bookType = "dbf", c;
            } catch (u) {
                if (l && l.WTF) throw u;
            }
            return {
                SheetNames: [],
                Sheets: {}
            };
        }
        var a = {
            B: 8,
            C: 250,
            L: 1,
            D: 8,
            "?": 0,
            "": 0
        };

        function o(s, l) {
            if (!s["!ref"]) throw new Error("Cannot export empty sheet to DBF");
            var c = l || {},
                u = Ka;
            if (+c.codepage >= 0 && _f(+c.codepage), c.type == "string") throw new Error("Cannot write DBF to JS string");
            var h = ra(),
                d = Tg(s, {
                    header: 1,
                    raw: !0,
                    cellDates: !0
                }),
                f = d[0],
                m = d.slice(1),
                _ = s["!cols"] || [],
                x = 0,
                g = 0,
                b = 0,
                w = 1;
            for (x = 0; x < f.length; ++x) {
                if (((_[x] || {}).DBF || {}).name) {
                    f[x] = _[x].DBF.name, ++b;
                    continue;
                }
                if (f[x] != null) {
                    if (++b, typeof f[x] == "number" && (f[x] = f[x].toString(10)), typeof f[x] != "string") throw new Error("DBF Invalid column name " + f[x] + " |" + typeof f[x] + "|");
                    if (f.indexOf(f[x]) !== x) {
                        for (g = 0; g < 1024; ++g)
                            if (f.indexOf(f[x] + "_" + g) == -1) {
                                f[x] += "_" + g;
                                break;
                            }
                    }
                }
            }
            var T = ki(s["!ref"]),
                E = [],
                L = [],
                P = [];
            for (x = 0; x <= T.e.c - T.s.c; ++x) {
                var k = "",
                    A = "",
                    N = 0,
                    C = [];
                for (g = 0; g < m.length; ++g) m[g][x] != null && C.push(m[g][x]);
                if (C.length == 0 || f[x] == null) {
                    E[x] = "?";
                    continue;
                }
                for (g = 0; g < C.length; ++g) {
                    switch (typeof C[g]) {
                        case "number":
                            A = "B";
                            break;
                        case "string":
                            A = "C";
                            break;
                        case "boolean":
                            A = "L";
                            break;
                        case "object":
                            A = C[g] instanceof Date ? "D" : "C";
                            break;
                        default:
                            A = "C";
                    }
                    N = Math.max(N, (typeof Kr < "u" && typeof C[g] == "string" ? Kr.utils.encode(B0, C[g]) : String(C[g])).length), k = k && k != A ? "C" : A;
                }
                N > 250 && (N = 250), A = ((_[x] || {}).DBF || {}).type, A == "C" && _[x].DBF.len > N && (N = _[x].DBF.len), k == "B" && A == "N" && (k = "N", P[x] = _[x].DBF.dec, N = _[x].DBF.len), L[x] = k == "C" || A == "N" ? N : a[k] || 0, w += L[x], E[x] = k;
            }
            var F = h.next(32);
            for (F.write_shift(4, 318902576), F.write_shift(4, m.length), F.write_shift(2, 296 + 32 * b), F.write_shift(2, w), x = 0; x < 4; ++x) F.write_shift(4, 0);
            var W = +r[Ka] || 3;
            for (F.write_shift(4, 0 | W << 8), t[W] != +c.codepage && (c.codepage && console.error("DBF Unsupported codepage " + Ka + ", using 1252"), Ka = 1252), x = 0, g = 0; x < f.length; ++x)
                if (f[x] != null) {
                    var I = h.next(32),
                        U = (f[x].slice(-10) + "\0\0\0\0\0\0\0\0\0\0\0").slice(0, 11);
                    I.write_shift(1, U, "sbcs"), I.write_shift(1, E[x] == "?" ? "C" : E[x], "sbcs"), I.write_shift(4, g), I.write_shift(1, L[x] || a[E[x]] || 0), I.write_shift(1, P[x] || 0), I.write_shift(1, 2), I.write_shift(4, 0), I.write_shift(1, 0), I.write_shift(4, 0), I.write_shift(4, 0), g += L[x] || a[E[x]] || 0;
                }
            var le = h.next(264);
            for (le.write_shift(4, 13), x = 0; x < 65; ++x) le.write_shift(4, 0);
            for (x = 0; x < m.length; ++x) {
                var H = h.next(w);
                for (H.write_shift(1, 0), g = 0; g < f.length; ++g)
                    if (f[g] != null) switch (E[g]) {
                        case "L":
                            H.write_shift(1, m[x][g] == null ? 63 : m[x][g] ? 84 : 70);
                            break;
                        case "B":
                            H.write_shift(8, m[x][g] || 0, "f");
                            break;
                        case "N":
                            var pe = "0";
                            for (typeof m[x][g] == "number" && (pe = m[x][g].toFixed(P[g] || 0)), pe.length > L[g] && (pe = pe.slice(0, L[g])), b = 0; b < L[g] - pe.length; ++b) H.write_shift(1, 32);
                            H.write_shift(1, pe, "sbcs");
                            break;
                        case "D":
                            m[x][g] ? (H.write_shift(4, ("0000" + m[x][g].getFullYear()).slice(-4), "sbcs"), H.write_shift(2, ("00" + (m[x][g].getMonth() + 1)).slice(-2), "sbcs"), H.write_shift(2, ("00" + m[x][g].getDate()).slice(-2), "sbcs")) : H.write_shift(8, "00000000", "sbcs");
                            break;
                        case "C":
                            var _e = H.l,
                                Fe = String(m[x][g] != null ? m[x][g] : "").slice(0, L[g]);
                            for (H.write_shift(1, Fe, "cpstr"), _e += L[g] - H.l, b = 0; b < _e; ++b) H.write_shift(1, 32);
                            break;
                    }
            }
            return Ka = u, h.next(1).write_shift(1, 26), h.end();
        }
        return {
            to_workbook: n,
            to_sheet: i,
            from_sheet: o
        };
    }(),
    vk = function() {
        var t = {
                AA: "\xC0",
                BA: "\xC1",
                CA: "\xC2",
                DA: 195,
                HA: "\xC4",
                JA: 197,
                AE: "\xC8",
                BE: "\xC9",
                CE: "\xCA",
                HE: "\xCB",
                AI: "\xCC",
                BI: "\xCD",
                CI: "\xCE",
                HI: "\xCF",
                AO: "\xD2",
                BO: "\xD3",
                CO: "\xD4",
                DO: 213,
                HO: "\xD6",
                AU: "\xD9",
                BU: "\xDA",
                CU: "\xDB",
                HU: "\xDC",
                Aa: "\xE0",
                Ba: "\xE1",
                Ca: "\xE2",
                Da: 227,
                Ha: "\xE4",
                Ja: 229,
                Ae: "\xE8",
                Be: "\xE9",
                Ce: "\xEA",
                He: "\xEB",
                Ai: "\xEC",
                Bi: "\xED",
                Ci: "\xEE",
                Hi: "\xEF",
                Ao: "\xF2",
                Bo: "\xF3",
                Co: "\xF4",
                Do: 245,
                Ho: "\xF6",
                Au: "\xF9",
                Bu: "\xFA",
                Cu: "\xFB",
                Hu: "\xFC",
                KC: "\xC7",
                Kc: "\xE7",
                q: "\xE6",
                z: "\u0153",
                a: "\xC6",
                j: "\u0152",
                DN: 209,
                Dn: 241,
                Hy: 255,
                S: 169,
                c: 170,
                R: 174,
                "B ": 180,
                0: 176,
                1: 177,
                2: 178,
                3: 179,
                5: 181,
                6: 182,
                7: 183,
                Q: 185,
                k: 186,
                b: 208,
                i: 216,
                l: 222,
                s: 240,
                y: 248,
                "!": 161,
                '"': 162,
                "#": 163,
                "(": 164,
                "%": 165,
                "'": 167,
                "H ": 168,
                "+": 171,
                ";": 187,
                "<": 188,
                "=": 189,
                ">": 190,
                "?": 191,
                "{": 223
            },
            r = new RegExp("\x1BN(" + fn(t).join("|").replace(/\|\|\|/, "|\\||").replace(/([?()+])/g, "\\$1").replace("{", "\\{") + "|\\|)", "gm");
        try {
            r = new RegExp("\x1BN(" + fn(t).join("|").replace(/\|\|\|/, "|\\||").replace(/([?()+])/g, "\\$1") + "|\\|)", "gm");
        } catch {}
        var e = function(f, m) {
                var _ = t[m];
                return typeof _ == "number" ? eb(_) : _;
            },
            i = function(f, m, _) {
                var x = m.charCodeAt(0) - 32 << 4 | _.charCodeAt(0) - 48;
                return x == 59 ? f : eb(x);
            };
        t["|"] = 254;
        var n = function(f) {
            return f.replace(/\n/g, "\x1B :").replace(/\r/g, "\x1B =");
        };

        function a(f, m) {
            switch (m.type) {
                case "base64":
                    return o(Nl(f), m);
                case "binary":
                    return o(f, m);
                case "buffer":
                    return o(ti && Buffer.isBuffer(f) ? f.toString("binary") : Pc(f), m);
                case "array":
                    return o(Eg(f), m);
            }
            throw new Error("Unrecognized type " + m.type);
        }

        function o(f, m) {
            var _ = f.split(/[\n\r]+/),
                x = -1,
                g = -1,
                b = 0,
                w = 0,
                T = [],
                E = [],
                L = null,
                P = {},
                k = [],
                A = [],
                N = [],
                C = 0,
                F, W = {
                    Workbook: {
                        WBProps: {},
                        Names: []
                    }
                };
            for (+m.codepage >= 0 && _f(+m.codepage); b !== _.length; ++b) {
                C = 0;
                var I = _[b].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g, i).replace(r, e),
                    U = I.replace(/;;/g, "\0").split(";").map(function(J) {
                        return J.replace(/\u0000/g, ";");
                    }),
                    le = U[0],
                    H;
                if (I.length > 0) switch (le) {
                    case "ID":
                        break;
                    case "E":
                        break;
                    case "B":
                        break;
                    case "O":
                        for (w = 1; w < U.length; ++w) switch (U[w].charAt(0)) {
                            case "V":
                                {
                                    var pe = parseInt(U[w].slice(1), 10);pe >= 1 && pe <= 4 && (W.Workbook.WBProps.date1904 = !0);
                                }
                                break;
                        }
                        break;
                    case "W":
                        break;
                    case "P":
                        switch (U[1].charAt(0)) {
                            case "P":
                                E.push(I.slice(3).replace(/;;/g, ";"));
                                break;
                        }
                        break;
                    case "NN":
                        {
                            var _e = {
                                Sheet: 0
                            };
                            for (w = 1; w < U.length; ++w) switch (U[w].charAt(0)) {
                                case "N":
                                    _e.Name = U[w].slice(1);
                                    break;
                                case "E":
                                    _e.Ref = (m && m.sheet || "Sheet1") + "!" + Mb(U[w].slice(1));
                                    break;
                            }
                            W.Workbook.Names.push(_e);
                        }
                        break;
                    case "C":
                        var Fe = !1,
                            Te = !1,
                            O = !1,
                            j = !1,
                            X = -1,
                            me = -1,
                            xe = "",
                            be = "z",
                            B = "";
                        for (w = 1; w < U.length; ++w) switch (U[w].charAt(0)) {
                            case "A":
                                B = U[w].slice(1);
                                break;
                            case "X":
                                g = parseInt(U[w].slice(1), 10) - 1, Te = !0;
                                break;
                            case "Y":
                                for (x = parseInt(U[w].slice(1), 10) - 1, Te || (g = 0), F = T.length; F <= x; ++F) T[F] = [];
                                break;
                            case "K":
                                H = U[w].slice(1), H.charAt(0) === '"' ? (H = H.slice(1, H.length - 1), be = "s") : H === "TRUE" || H === "FALSE" ? (H = H === "TRUE", be = "b") : H.charAt(0) == "#" && cs[H] != null ? (be = "e", H = cs[H]) : isNaN(Hs(H)) || (H = Hs(H), be = "n", L !== null && Ic(L) && m.cellDates && (H = I0(W.Workbook.WBProps.date1904 ? H + 1462 : H), be = typeof H == "number" ? "n" : "d")), typeof Kr < "u" && typeof H == "string" && (m || {}).type != "string" && (m || {}).codepage && (H = Kr.utils.decode(m.codepage, H)), Fe = !0;
                                break;
                            case "E":
                                j = !0, xe = Mb(U[w].slice(1), {
                                    r: x,
                                    c: g
                                });
                                break;
                            case "S":
                                O = !0;
                                break;
                            case "G":
                                break;
                            case "R":
                                X = parseInt(U[w].slice(1), 10) - 1;
                                break;
                            case "C":
                                me = parseInt(U[w].slice(1), 10) - 1;
                                break;
                            default:
                                if (m && m.WTF) throw new Error("SYLK bad record " + I);
                        }
                        if (Fe && (T[x][g] ? (T[x][g].t = be, T[x][g].v = H) : T[x][g] = {
                                t: be,
                                v: H
                            }, L && (T[x][g].z = L), m.cellText !== !1 && L && (T[x][g].w = qs(T[x][g].z, T[x][g].v, {
                                date1904: W.Workbook.WBProps.date1904
                            })), L = null), O) {
                            if (j) throw new Error("SYLK shared formula cannot have own formula");
                            var ne = X > -1 && T[X][me];
                            if (!ne || !ne[1]) throw new Error("SYLK shared formula cannot find base");
                            xe = x8(ne[1], {
                                r: x - X,
                                c: g - me
                            });
                        }
                        xe && (T[x][g] ? T[x][g].f = xe : T[x][g] = {
                            t: "n",
                            f: xe
                        }), B && (T[x][g] || (T[x][g] = {
                            t: "z"
                        }), T[x][g].c = [{
                            a: "SheetJSYLK",
                            t: B
                        }]);
                        break;
                    case "F":
                        var Z = 0;
                        for (w = 1; w < U.length; ++w) switch (U[w].charAt(0)) {
                            case "X":
                                g = parseInt(U[w].slice(1), 10) - 1, ++Z;
                                break;
                            case "Y":
                                for (x = parseInt(U[w].slice(1), 10) - 1, F = T.length; F <= x; ++F) T[F] = [];
                                break;
                            case "M":
                                C = parseInt(U[w].slice(1), 10) / 20;
                                break;
                            case "F":
                                break;
                            case "G":
                                break;
                            case "P":
                                L = E[parseInt(U[w].slice(1), 10)];
                                break;
                            case "S":
                                break;
                            case "D":
                                break;
                            case "N":
                                break;
                            case "W":
                                for (N = U[w].slice(1).split(" "), F = parseInt(N[0], 10); F <= parseInt(N[1], 10); ++F) C = parseInt(N[2], 10), A[F - 1] = C === 0 ? {
                                    hidden: !0
                                } : {
                                    wch: C
                                };
                                break;
                            case "C":
                                g = parseInt(U[w].slice(1), 10) - 1, A[g] || (A[g] = {});
                                break;
                            case "R":
                                x = parseInt(U[w].slice(1), 10) - 1, k[x] || (k[x] = {}), C > 0 ? (k[x].hpt = C, k[x].hpx = Bw(C)) : C === 0 && (k[x].hidden = !0);
                                break;
                            default:
                                if (m && m.WTF) throw new Error("SYLK bad record " + I);
                        }
                        Z < 1 && (L = null);
                        break;
                    default:
                        if (m && m.WTF) throw new Error("SYLK bad record " + I);
                }
            }
            return k.length > 0 && (P["!rows"] = k), A.length > 0 && (P["!cols"] = A), A.forEach(function(J) {
                qg(J);
            }), m && m.sheetRows && (T = T.slice(0, m.sheetRows)), [T, P, W];
        }

        function s(f, m) {
            var _ = a(f, m),
                x = _[0],
                g = _[1],
                b = _[2],
                w = na(m);
            w.date1904 = (((b || {}).Workbook || {}).WBProps || {}).date1904;
            var T = H0(x, w);
            fn(g).forEach(function(L) {
                T[L] = g[L];
            });
            var E = j0(T, m);
            return fn(b).forEach(function(L) {
                E[L] = b[L];
            }), E.bookType = "sylk", E;
        }

        function l(f, m, _, x, g, b) {
            var w = "C;Y" + (_ + 1) + ";X" + (x + 1) + ";K";
            switch (f.t) {
                case "n":
                    w += isFinite(f.v) ? f.v || 0 : xa[isNaN(f.v) ? 36 : 7], f.f && !f.F && (w += ";E" + Vp(f.f, {
                        r: _,
                        c: x
                    }));
                    break;
                case "b":
                    w += f.v ? "TRUE" : "FALSE";
                    break;
                case "e":
                    w += f.w || xa[f.v] || f.v;
                    break;
                case "d":
                    w += Wn(Ea(f.v, b), b);
                    break;
                case "s":
                    w += '"' + (f.v == null ? "" : String(f.v)).replace(/"/g, "").replace(/;/g, ";;") + '"';
                    break;
            }
            return w;
        }

        function c(f, m, _) {
            var x = "C;Y" + (m + 1) + ";X" + (_ + 1) + ";A";
            return x += n(f.map(function(g) {
                return g.t;
            }).join("")), x;
        }

        function u(f, m) {
            m.forEach(function(_, x) {
                var g = "F;W" + (x + 1) + " " + (x + 1) + " ";
                _.hidden ? g += "0" : (typeof _.width == "number" && !_.wpx && (_.wpx = Cp(_.width)), typeof _.wpx == "number" && !_.wch && (_.wch = Ap(_.wpx)), typeof _.wch == "number" && (g += Math.round(_.wch))), g.charAt(g.length - 1) != " " && f.push(g);
            });
        }

        function h(f, m) {
            m.forEach(function(_, x) {
                var g = "F;";
                _.hidden ? g += "M0;" : _.hpt ? g += "M" + 20 * _.hpt + ";" : _.hpx && (g += "M" + 20 * Tp(_.hpx) + ";"), g.length > 2 && f.push(g + "R" + (x + 1));
            });
        }

        function d(f, m, _) {
            m || (m = {}), m._formats = ["General"];
            var x = ["ID;PSheetJS;N;E"],
                g = [],
                b = ki(f["!ref"] || "A1"),
                w, T = f["!data"] != null,
                E = `\r
`,
                L = (((_ || {}).Workbook || {}).WBProps || {}).date1904,
                P = "General";
            x.push("P;PGeneral");
            var k = b.s.r,
                A = b.s.c,
                N = [];
            if (f["!ref"]) {
                for (k = b.s.r; k <= b.e.r; ++k)
                    if (!(T && !f["!data"][k])) {
                        for (N = [], A = b.s.c; A <= b.e.c; ++A) w = T ? f["!data"][k][A] : f[ui(A) + di(k)], !(!w || !w.c) && N.push(c(w.c, k, A));
                        N.length && g.push(N.join(E));
                    }
            }
            if (f["!ref"]) {
                for (k = b.s.r; k <= b.e.r; ++k)
                    if (!(T && !f["!data"][k])) {
                        for (N = [], A = b.s.c; A <= b.e.c; ++A)
                            if (w = T ? f["!data"][k][A] : f[ui(A) + di(k)], !(!w || w.v == null && (!w.f || w.F))) {
                                if ((w.z || (w.t == "d" ? Di[14] : "General")) != P) {
                                    var C = m._formats.indexOf(w.z);
                                    C == -1 && (m._formats.push(w.z), C = m._formats.length - 1, x.push("P;P" + w.z.replace(/;/g, ";;"))), N.push("F;P" + C + ";Y" + (k + 1) + ";X" + (A + 1));
                                }
                                N.push(l(w, f, k, A, m, L));
                            }
                        g.push(N.join(E));
                    }
            }
            return x.push("F;P0;DG0G8;M255"), f["!cols"] && u(x, f["!cols"]), f["!rows"] && h(x, f["!rows"]), f["!ref"] && x.push("B;Y" + (b.e.r - b.s.r + 1) + ";X" + (b.e.c - b.s.c + 1) + ";D" + [b.s.c, b.s.r, b.e.c, b.e.r].join(" ")), x.push("O;L;D;B" + (L ? ";V4" : "") + ";K47;G100 0.001"), delete m._formats, x.join(E) + E + g.join(E) + E + "E" + E;
        }
        return {
            to_workbook: s,
            from_sheet: d
        };
    }(),
    xk = function() {
        function t(s, l) {
            switch (l.type) {
                case "base64":
                    return r(Nl(s), l);
                case "binary":
                    return r(s, l);
                case "buffer":
                    return r(ti && Buffer.isBuffer(s) ? s.toString("binary") : Pc(s), l);
                case "array":
                    return r(Eg(s), l);
            }
            throw new Error("Unrecognized type " + l.type);
        }

        function r(s, l) {
            for (var c = s.split(`
`), u = -1, h = -1, d = 0, f = []; d !== c.length; ++d) {
                if (c[d].trim() === "BOT") {
                    f[++u] = [], h = 0;
                    continue;
                }
                if (!(u < 0)) {
                    var m = c[d].trim().split(","),
                        _ = m[0],
                        x = m[1];
                    ++d;
                    for (var g = c[d] || "";
                        (g.match(/["]/g) || []).length & 1 && d < c.length - 1;) g += `
` + c[++d];
                    switch (g = g.trim(), +_) {
                        case -1:
                            if (g === "BOT") {
                                f[++u] = [], h = 0;
                                continue;
                            } else if (g !== "EOD") throw new Error("Unrecognized DIF special command " + g);
                            break;
                        case 0:
                            g === "TRUE" ? f[u][h] = !0 : g === "FALSE" ? f[u][h] = !1 : isNaN(Hs(x)) ? isNaN(yp(x).getDate()) ? f[u][h] = x : (f[u][h] = Ea(x), l && l.UTC || (f[u][h] = U0(f[u][h]))) : f[u][h] = Hs(x), ++h;
                            break;
                        case 1:
                            g = g.slice(1, g.length - 1), g = g.replace(/""/g, '"'), tb && g && g.match(/^=".*"$/) && (g = g.slice(2, -1)), f[u][h++] = g !== "" ? g : null;
                            break;
                    }
                    if (g === "EOD") break;
                }
            }
            return l && l.sheetRows && (f = f.slice(0, l.sheetRows)), f;
        }

        function e(s, l) {
            return H0(t(s, l), l);
        }

        function i(s, l) {
            var c = j0(e(s, l), l);
            return c.bookType = "dif", c;
        }

        function n(s, l) {
            return "0," + String(s) + `\r
` + l;
        }

        function a(s) {
            return `1,0\r
"` + s.replace(/"/g, '""') + '"';
        }

        function o(s) {
            var l = tb;
            if (!s["!ref"]) throw new Error("Cannot export empty sheet to DIF");
            for (var c = ki(s["!ref"]), u = s["!data"] != null, h = [`TABLE\r
0,1\r
"sheetjs"\r
`, `VECTORS\r
0,` + (c.e.r - c.s.r + 1) + `\r
""\r
`, `TUPLES\r
0,` + (c.e.c - c.s.c + 1) + `\r
""\r
`, `DATA\r
0,0\r
""\r
`], d = c.s.r; d <= c.e.r; ++d) {
                for (var f = u ? s["!data"][d] : [], m = `-1,0\r
BOT\r
`, _ = c.s.c; _ <= c.e.c; ++_) {
                    var x = u ? f && f[_] : s[Bi({
                        r: d,
                        c: _
                    })];
                    if (x == null) {
                        m += `1,0\r
""\r
`;
                        continue;
                    }
                    switch (x.t) {
                        case "n":
                            l ? x.w != null ? m += "0," + x.w + `\r
V` : x.v != null ? m += n(x.v, "V") : x.f != null && !x.F ? m += a("=" + x.f) : m += `1,0\r
""` : x.v == null ? m += `1,0\r
""` : m += n(x.v, "V");
                            break;
                        case "b":
                            m += x.v ? n(1, "TRUE") : n(0, "FALSE");
                            break;
                        case "s":
                            m += a(!l || isNaN(+x.v) ? x.v : '="' + x.v + '"');
                            break;
                        case "d":
                            x.w || (x.w = qs(x.z || Di[14], Wn(Ea(x.v)))), l ? m += n(x.w, "V") : m += a(x.w);
                            break;
                        default:
                            m += `1,0\r
""`;
                    }
                    m += `\r
`;
                }
                h.push(m);
            }
            return h.join("") + `-1,0\r
EOD`;
        }
        return {
            to_workbook: i,
            to_sheet: e,
            from_sheet: o
        };
    }(),
    Lw = function() {
        function t(h) {
            return h.replace(/\\b/g, "\\").replace(/\\c/g, ":").replace(/\\n/g, `
`);
        }

        function r(h) {
            return h.replace(/\\/g, "\\b").replace(/:/g, "\\c").replace(/\n/g, "\\n");
        }

        function e(h, d) {
            for (var f = h.split(`
`), m = -1, _ = -1, x = 0, g = []; x !== f.length; ++x) {
                var b = f[x].trim().split(":");
                if (b[0] === "cell") {
                    var w = Li(b[1]);
                    if (g.length <= w.r)
                        for (m = g.length; m <= w.r; ++m) g[m] || (g[m] = []);
                    switch (m = w.r, _ = w.c, b[2]) {
                        case "t":
                            g[m][_] = t(b[3]);
                            break;
                        case "v":
                            g[m][_] = +b[3];
                            break;
                        case "vtf":
                            var T = b[b.length - 1];
                        case "vtc":
                            switch (b[3]) {
                                case "nl":
                                    g[m][_] = !!+b[4];
                                    break;
                                default:
                                    g[m][_] = b[b.length - 1].charAt(0) == "#" ? {
                                        t: "e",
                                        v: cs[b[b.length - 1]]
                                    } : +b[4];
                                    break;
                            }
                            b[2] == "vtf" && (g[m][_] = [g[m][_], T]);
                    }
                }
            }
            return d && d.sheetRows && (g = g.slice(0, d.sheetRows)), g;
        }

        function i(h, d) {
            return H0(e(h, d), d);
        }

        function n(h, d) {
            return j0(i(h, d), d);
        }
        var a = ["socialcalc:version:1.5", "MIME-Version: 1.0", "Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave"].join(`
`),
            o = ["--SocialCalcSpreadsheetControlSave", "Content-type: text/plain; charset=UTF-8"].join(`
`) + `
`,
            s = ["# SocialCalc Spreadsheet Control Save", "part:sheet"].join(`
`),
            l = "--SocialCalcSpreadsheetControlSave--";

        function c(h) {
            if (!h || !h["!ref"]) return "";
            for (var d = [], f = [], m, _ = "", x = zn(h["!ref"]), g = h["!data"] != null, b = x.s.r; b <= x.e.r; ++b)
                for (var w = x.s.c; w <= x.e.c; ++w)
                    if (_ = Bi({
                            r: b,
                            c: w
                        }), m = g ? (h["!data"][b] || [])[w] : h[_], !(!m || m.v == null || m.t === "z")) {
                        switch (f = ["cell", _, "t"], m.t) {
                            case "s":
                                f.push(r(m.v));
                                break;
                            case "b":
                                f[2] = "vt" + (m.f ? "f" : "c"), f[3] = "nl", f[4] = m.v ? "1" : "0", f[5] = r(m.f || (m.v ? "TRUE" : "FALSE"));
                                break;
                            case "d":
                                var T = Wn(Ea(m.v));
                                f[2] = "vtc", f[3] = "nd", f[4] = "" + T, f[5] = m.w || qs(m.z || Di[14], T);
                                break;
                            case "n":
                                isFinite(m.v) ? m.f ? (f[2] = "vtf", f[3] = "n", f[4] = m.v, f[5] = r(m.f)) : (f[2] = "v", f[3] = m.v) : (f[2] = "vt" + (m.f ? "f" : "c"), f[3] = "e" + xa[isNaN(m.v) ? 36 : 7], f[4] = "0", f[5] = m.f || f[3].slice(1), f[6] = "e", f[7] = f[3].slice(1));
                                break;
                            case "e":
                                continue;
                        }
                        d.push(f.join(":"));
                    }
            return d.push("sheet:c:" + (x.e.c - x.s.c + 1) + ":r:" + (x.e.r - x.s.r + 1) + ":tvf:1"), d.push("valueformat:1:text-wiki"), d.join(`
`);
        }

        function u(h) {
            return [a, o, s, o, c(h), l].join(`
`);
        }
        return {
            to_workbook: n,
            to_sheet: i,
            from_sheet: u
        };
    }(),
    _k = function() {
        function t(u, h, d, f, m) {
            m.raw ? h[d][f] = u : u === "" || (u === "TRUE" ? h[d][f] = !0 : u === "FALSE" ? h[d][f] = !1 : isNaN(Hs(u)) ? isNaN(yp(u).getDate()) ? u.charCodeAt(0) == 35 && cs[u] != null ? h[d][f] = {
                t: "e",
                v: cs[u],
                w: u
            } : h[d][f] = u : h[d][f] = Ea(u) : h[d][f] = Hs(u));
        }

        function r(u, h) {
            var d = h || {},
                f = [];
            if (!u || u.length === 0) return f;
            for (var m = u.split(/[\r\n]/), _ = m.length - 1; _ >= 0 && m[_].length === 0;) --_;
            for (var x = 10, g = 0, b = 0; b <= _; ++b) g = m[b].indexOf(" "), g == -1 ? g = m[b].length : g++, x = Math.max(x, g);
            for (b = 0; b <= _; ++b) {
                f[b] = [];
                var w = 0;
                for (t(m[b].slice(0, x).trim(), f, b, w, d), w = 1; w <= (m[b].length - x) / 10 + 1; ++w) t(m[b].slice(x + (w - 1) * 10, x + w * 10).trim(), f, b, w, d);
            }
            return d.sheetRows && (f = f.slice(0, d.sheetRows)), f;
        }
        var e = {
                44: ",",
                9: "	",
                59: ";",
                124: "|"
            },
            i = {
                44: 3,
                9: 2,
                59: 1,
                124: 0
            };

        function n(u) {
            for (var h = {}, d = !1, f = 0, m = 0; f < u.length; ++f)(m = u.charCodeAt(f)) == 34 ? d = !d : !d && m in e && (h[m] = (h[m] || 0) + 1);
            m = [];
            for (f in h) Object.prototype.hasOwnProperty.call(h, f) && m.push([h[f], f]);
            if (!m.length) {
                h = i;
                for (f in h) Object.prototype.hasOwnProperty.call(h, f) && m.push([h[f], f]);
            }
            return m.sort(function(_, x) {
                return _[0] - x[0] || i[_[1]] - i[x[1]];
            }), e[m.pop()[1]] || 44;
        }

        function a(u, h) {
            var d = h || {},
                f = "";
            ls != null && d.dense == null && (d.dense = ls);
            var m = {};
            d.dense && (m["!data"] = []);
            var _ = {
                s: {
                    c: 0,
                    r: 0
                },
                e: {
                    c: 0,
                    r: 0
                }
            };
            u.slice(0, 4) == "sep=" ? u.charCodeAt(5) == 13 && u.charCodeAt(6) == 10 ? (f = u.charAt(4), u = u.slice(7)) : u.charCodeAt(5) == 13 || u.charCodeAt(5) == 10 ? (f = u.charAt(4), u = u.slice(6)) : f = n(u.slice(0, 1024)) : d && d.FS ? f = d.FS : f = n(u.slice(0, 1024));
            var x = 0,
                g = 0,
                b = 0,
                w = 0,
                T = 0,
                E = f.charCodeAt(0),
                L = !1,
                P = 0,
                k = u.charCodeAt(0),
                A = d.dateNF != null ? ST(d.dateNF) : null;

            function N() {
                var C = u.slice(w, T);
                C.slice(-1) == "\r" && (C = C.slice(0, -1));
                var F = {};
                if (C.charAt(0) == '"' && C.charAt(C.length - 1) == '"' && (C = C.slice(1, -1).replace(/""/g, '"')), d.cellText !== !1 && (F.w = C), C.length === 0) F.t = "z";
                else if (d.raw) F.t = "s", F.v = C;
                else if (C.trim().length === 0) F.t = "s", F.v = C;
                else if (C.charCodeAt(0) == 61) C.charCodeAt(1) == 34 && C.charCodeAt(C.length - 1) == 34 ? (F.t = "s", F.v = C.slice(2, -1).replace(/""/g, '"')) : _8(C) ? (F.t = "s", F.f = C.slice(1), F.v = C) : (F.t = "s", F.v = C);
                else if (C == "TRUE") F.t = "b", F.v = !0;
                else if (C == "FALSE") F.t = "b", F.v = !1;
                else if (!isNaN(b = Hs(C))) F.t = "n", F.v = b;
                else if (!isNaN((b = yp(C)).getDate()) || A && C.match(A)) {
                    if (F.z = d.dateNF || Di[14], A && C.match(A)) {
                        var W = CT(C, d.dateNF, C.match(A) || []);
                        b = Ea(W), d && d.UTC === !1 && (b = U0(b));
                    } else d && d.UTC === !1 ? b = U0(b) : d.cellText !== !1 && d.dateNF && (F.w = qs(F.z, b));
                    d.cellDates ? (F.t = "d", F.v = b) : (F.t = "n", F.v = Wn(b)), d.cellNF || delete F.z;
                } else C.charCodeAt(0) == 35 && cs[C] != null ? (F.t = "e", F.w = C, F.v = cs[C]) : (F.t = "s", F.v = C);
                if (F.t == "z" || (d.dense ? (m["!data"][x] || (m["!data"][x] = []), m["!data"][x][g] = F) : m[Bi({
                        c: g,
                        r: x
                    })] = F), w = T + 1, k = u.charCodeAt(w), _.e.c < g && (_.e.c = g), _.e.r < x && (_.e.r = x), P == E) ++g;
                else if (g = 0, ++x, d.sheetRows && d.sheetRows <= x) return !0;
            }
            e: for (; T < u.length; ++T) switch (P = u.charCodeAt(T)) {
                case 34:
                    k === 34 && (L = !L);
                    break;
                case 13:
                    if (L) break;
                    u.charCodeAt(T + 1) == 10 && ++T;
                case E:
                case 10:
                    if (!L && N()) break e;
                    break;
                default:
                    break;
            }
            return T - w > 0 && N(), m["!ref"] = hn(_), m;
        }

        function o(u, h) {
            return !(h && h.PRN) || h.FS || u.slice(0, 4) == "sep=" || u.indexOf("	") >= 0 || u.indexOf(",") >= 0 || u.indexOf(";") >= 0 ? a(u, h) : H0(r(u, h), h);
        }

        function s(u, h) {
            var d = "",
                f = h.type == "string" ? [0, 0, 0, 0] : qP(u, h);
            switch (h.type) {
                case "base64":
                    d = Nl(u);
                    break;
                case "binary":
                    d = u;
                    break;
                case "buffer":
                    h.codepage == 65001 ? d = u.toString("utf8") : h.codepage && typeof Kr < "u" ? d = Kr.utils.decode(h.codepage, u) : d = ti && Buffer.isBuffer(u) ? u.toString("binary") : Pc(u);
                    break;
                case "array":
                    d = Eg(u);
                    break;
                case "string":
                    d = u;
                    break;
                default:
                    throw new Error("Unrecognized type " + h.type);
            }
            return f[0] == 239 && f[1] == 187 && f[2] == 191 ? d = O0(d.slice(3)) : h.type != "string" && h.type != "buffer" && h.codepage == 65001 ? d = O0(d) : h.type == "binary" && typeof Kr < "u" && h.codepage && (d = Kr.utils.decode(h.codepage, Kr.utils.encode(28591, d))), d.slice(0, 19) == "socialcalc:version:" ? Lw.to_sheet(h.type == "string" ? d : O0(d), h) : o(d, h);
        }

        function l(u, h) {
            return j0(s(u, h), h);
        }

        function c(u) {
            var h = [];
            if (!u["!ref"]) return "";
            for (var d = ki(u["!ref"]), f, m = u["!data"] != null, _ = d.s.r; _ <= d.e.r; ++_) {
                for (var x = [], g = d.s.c; g <= d.e.c; ++g) {
                    var b = Bi({
                        r: _,
                        c: g
                    });
                    if (f = m ? (u["!data"][_] || [])[g] : u[b], !f || f.v == null) {
                        x.push("          ");
                        continue;
                    }
                    for (var w = (f.w || (Xs(f), f.w) || "").slice(0, 10); w.length < 10;) w += " ";
                    x.push(w + (g === 0 ? " " : ""));
                }
                h.push(x.join(""));
            }
            return h.join(`
`);
        }
        return {
            to_workbook: l,
            to_sheet: s,
            from_sheet: c
        };
    }();
var Ob = function() {
    function t(B, ne, Z) {
        if (B) {
            ga(B, B.l || 0);
            for (var J = Z.Enum || j; B.l < B.length;) {
                var ye = B.read_shift(2),
                    je = J[ye] || J[65535],
                    Qe = B.read_shift(2),
                    q = B.l + Qe,
                    ze = je.f && je.f(B, Qe, Z);
                if (B.l = q, ne(ze, je, ye)) return;
            }
        }
    }

    function r(B, ne) {
        switch (ne.type) {
            case "base64":
                return i(qa(Nl(B)), ne);
            case "binary":
                return i(qa(B), ne);
            case "buffer":
            case "array":
                return i(B, ne);
        }
        throw "Unsupported type " + ne.type;
    }
    var e = ["mmmm", "dd-mmm-yyyy", "dd-mmm", "mmm-yyyy", "@", "mm/dd", "hh:mm:ss AM/PM", "hh:mm AM/PM", "mm/dd/yyyy", "mm/dd", "hh:mm:ss", "hh:mm"];

    function i(B, ne) {
        if (!B) return B;
        var Z = ne || {};
        ls != null && Z.dense == null && (Z.dense = ls);
        var J = {},
            ye = "Sheet1",
            je = "",
            Qe = 0,
            q = {},
            ze = [],
            gt = [],
            ft = [];
        Z.dense && (ft = J["!data"] = []);
        var Re = {
                s: {
                    r: 0,
                    c: 0
                },
                e: {
                    r: 0,
                    c: 0
                }
            },
            pt = Z.sheetRows || 0,
            ct = {};
        if (B[4] == 81 && B[5] == 80 && B[6] == 87) return be(B, ne);
        if (B[2] == 0 && (B[3] == 8 || B[3] == 9) && B.length >= 16 && B[14] == 5 && B[15] === 108) throw new Error("Unsupported Works 3 for Mac file");
        if (B[2] == 2) Z.Enum = j, t(B, function(Je, er, ur) {
            switch (ur) {
                case 0:
                    Z.vers = Je, Je >= 4096 && (Z.qpro = !0);
                    break;
                case 255:
                    Z.vers = Je, Z.works = !0;
                    break;
                case 6:
                    Re = Je;
                    break;
                case 204:
                    Je && (je = Je);
                    break;
                case 222:
                    je = Je;
                    break;
                case 15:
                case 51:
                    (!Z.qpro && !Z.works || ur == 51) && Je[1].v.charCodeAt(0) < 48 && (Je[1].v = Je[1].v.slice(1)), (Z.works || Z.works2) && (Je[1].v = Je[1].v.replace(/\r\n/g, `
`));
                case 13:
                case 14:
                case 16:
                    (Je[2] & 112) == 112 && (Je[2] & 15) > 1 && (Je[2] & 15) < 15 && (Je[1].z = Z.dateNF || e[(Je[2] & 15) - 1] || Di[14], Z.cellDates && (Je[1].v = I0(Je[1].v), Je[1].t = typeof Je[1].v == "number" ? "n" : "d")), Z.qpro && Je[3] > Qe && (J["!ref"] = hn(Re), q[ye] = J, ze.push(ye), J = {}, Z.dense && (ft = J["!data"] = []), Re = {
                        s: {
                            r: 0,
                            c: 0
                        },
                        e: {
                            r: 0,
                            c: 0
                        }
                    }, Qe = Je[3], ye = je || "Sheet" + (Qe + 1), je = "");
                    var Gt = Z.dense ? (ft[Je[0].r] || [])[Je[0].c] : J[Bi(Je[0])];
                    if (Gt) {
                        Gt.t = Je[1].t, Gt.v = Je[1].v, Je[1].z != null && (Gt.z = Je[1].z), Je[1].f != null && (Gt.f = Je[1].f), ct = Gt;
                        break;
                    }
                    Z.dense ? (ft[Je[0].r] || (ft[Je[0].r] = []), ft[Je[0].r][Je[0].c] = Je[1]) : J[Bi(Je[0])] = Je[1], ct = Je[1];
                    break;
                case 21509:
                    Z.works2 = !0;
                    break;
                case 21506:
                    Je == 5281 && (ct.z = "hh:mm:ss", Z.cellDates && ct.t == "n" && (ct.v = I0(ct.v), ct.t = typeof ct.v == "number" ? "n" : "d"));
                    break;
            }
        }, Z);
        else if (B[2] == 26 || B[2] == 14) Z.Enum = X, B[2] == 14 && (Z.qpro = !0, B.l = 0), t(B, function(Je, er, ur) {
            switch (ur) {
                case 204:
                    ye = Je;
                    break;
                case 22:
                    Je[1].v.charCodeAt(0) < 48 && (Je[1].v = Je[1].v.slice(1)), Je[1].v = Je[1].v.replace(/\x0F./g, function(Gt) {
                        return String.fromCharCode(Gt.charCodeAt(1) - 32);
                    }).replace(/\r\n/g, `
`);
                case 23:
                case 24:
                case 25:
                case 37:
                case 39:
                case 40:
                    if (Je[3] > Qe && (J["!ref"] = hn(Re), q[ye] = J, ze.push(ye), J = {}, Z.dense && (ft = J["!data"] = []), Re = {
                            s: {
                                r: 0,
                                c: 0
                            },
                            e: {
                                r: 0,
                                c: 0
                            }
                        }, Qe = Je[3], ye = "Sheet" + (Qe + 1)), pt > 0 && Je[0].r >= pt) break;
                    Z.dense ? (ft[Je[0].r] || (ft[Je[0].r] = []), ft[Je[0].r][Je[0].c] = Je[1]) : J[Bi(Je[0])] = Je[1], Re.e.c < Je[0].c && (Re.e.c = Je[0].c), Re.e.r < Je[0].r && (Re.e.r = Je[0].r);
                    break;
                case 27:
                    Je[14e3] && (gt[Je[14e3][0]] = Je[14e3][1]);
                    break;
                case 1537:
                    gt[Je[0]] = Je[1], Je[0] == Qe && (ye = Je[1]);
                    break;
                default:
                    break;
            }
        }, Z);
        else throw new Error("Unrecognized LOTUS BOF " + B[2]);
        if (J["!ref"] = hn(Re), q[je || ye] = J, ze.push(je || ye), !gt.length) return {
            SheetNames: ze,
            Sheets: q
        };
        for (var xt = {}, yt = [], Pe = 0; Pe < gt.length; ++Pe) q[ze[Pe]] ? (yt.push(gt[Pe] || ze[Pe]), xt[gt[Pe]] = q[gt[Pe]] || q[ze[Pe]]) : (yt.push(gt[Pe]), xt[gt[Pe]] = {
            "!ref": "A1"
        });
        return {
            SheetNames: yt,
            Sheets: xt
        };
    }

    function n(B, ne) {
        var Z = ne || {};
        if (+Z.codepage >= 0 && _f(+Z.codepage), Z.type == "string") throw new Error("Cannot write WK1 to JS string");
        var J = ra();
        if (!B["!ref"]) throw new Error("Cannot export empty sheet to WK1");
        var ye = ki(B["!ref"]),
            je = B["!data"] != null,
            Qe = [];
        $e(J, 0, o(1030)), $e(J, 6, c(ye));
        for (var q = Math.min(ye.e.r, 8191), ze = ye.s.c; ze <= ye.e.c; ++ze) Qe[ze] = ui(ze);
        for (var gt = ye.s.r; gt <= q; ++gt) {
            var ft = di(gt);
            for (ze = ye.s.c; ze <= ye.e.c; ++ze) {
                var Re = je ? (B["!data"][gt] || [])[ze] : B[Qe[ze] + ft];
                if (!(!Re || Re.t == "z")) switch (Re.t) {
                    case "n":
                        (Re.v | 0) == Re.v && Re.v >= -32768 && Re.v <= 32767 ? $e(J, 13, x(gt, ze, Re)) : $e(J, 14, b(gt, ze, Re));
                        break;
                    case "d":
                        var pt = Wn(Re.v);
                        (pt | 0) == pt && pt >= -32768 && pt <= 32767 ? $e(J, 13, x(gt, ze, {
                            t: "n",
                            v: pt,
                            z: Re.z || Di[14]
                        })) : $e(J, 14, b(gt, ze, {
                            t: "n",
                            v: pt,
                            z: Re.z || Di[14]
                        }));
                        break;
                    default:
                        var ct = Xs(Re);
                        $e(J, 15, f(gt, ze, ct.slice(0, 239)));
                }
            }
        }
        return $e(J, 1), J.end();
    }

    function a(B, ne) {
        var Z = ne || {};
        if (+Z.codepage >= 0 && _f(+Z.codepage), Z.type == "string") throw new Error("Cannot write WK3 to JS string");
        var J = ra();
        $e(J, 0, s(B));
        for (var ye = 0, je = 0; ye < B.SheetNames.length; ++ye)(B.Sheets[B.SheetNames[ye]] || {})["!ref"] && $e(J, 27, O(B.SheetNames[ye], je++));
        var Qe = 0;
        for (ye = 0; ye < B.SheetNames.length; ++ye) {
            var q = B.Sheets[B.SheetNames[ye]];
            if (!(!q || !q["!ref"])) {
                for (var ze = ki(q["!ref"]), gt = q["!data"] != null, ft = [], Re = Math.min(ze.e.r, 8191), pt = ze.s.r; pt <= Re; ++pt)
                    for (var ct = di(pt), xt = ze.s.c; xt <= ze.e.c; ++xt) {
                        pt === ze.s.r && (ft[xt] = ui(xt));
                        var yt = ft[xt] + ct,
                            Pe = gt ? (q["!data"][pt] || [])[xt] : q[yt];
                        if (!(!Pe || Pe.t == "z"))
                            if (Pe.t == "n") $e(J, 23, W(pt, xt, Qe, Pe.v));
                            else {
                                var Je = Xs(Pe);
                                $e(J, 22, N(pt, xt, Qe, Je.slice(0, 239)));
                            }
                    }++Qe;
            }
        }
        return $e(J, 1), J.end();
    }

    function o(B) {
        var ne = Ue(2);
        return ne.write_shift(2, B), ne;
    }

    function s(B) {
        var ne = Ue(26);
        ne.write_shift(2, 4096), ne.write_shift(2, 4), ne.write_shift(4, 0);
        for (var Z = 0, J = 0, ye = 0, je = 0; je < B.SheetNames.length; ++je) {
            var Qe = B.SheetNames[je],
                q = B.Sheets[Qe];
            if (!(!q || !q["!ref"])) {
                ++ye;
                var ze = zn(q["!ref"]);
                Z < ze.e.r && (Z = ze.e.r), J < ze.e.c && (J = ze.e.c);
            }
        }
        return Z > 8191 && (Z = 8191), ne.write_shift(2, Z), ne.write_shift(1, ye), ne.write_shift(1, J), ne.write_shift(2, 0), ne.write_shift(2, 0), ne.write_shift(1, 1), ne.write_shift(1, 2), ne.write_shift(4, 0), ne.write_shift(4, 0), ne;
    }

    function l(B, ne, Z) {
        var J = {
            s: {
                c: 0,
                r: 0
            },
            e: {
                c: 0,
                r: 0
            }
        };
        return ne == 8 && Z.qpro ? (J.s.c = B.read_shift(1), B.l++, J.s.r = B.read_shift(2), J.e.c = B.read_shift(1), B.l++, J.e.r = B.read_shift(2), J) : (J.s.c = B.read_shift(2), J.s.r = B.read_shift(2), ne == 12 && Z.qpro && (B.l += 2), J.e.c = B.read_shift(2), J.e.r = B.read_shift(2), ne == 12 && Z.qpro && (B.l += 2), J.s.c == 65535 && (J.s.c = J.e.c = J.s.r = J.e.r = 0), J);
    }

    function c(B) {
        var ne = Ue(8);
        return ne.write_shift(2, B.s.c), ne.write_shift(2, B.s.r), ne.write_shift(2, B.e.c), ne.write_shift(2, B.e.r), ne;
    }

    function u(B, ne, Z) {
        var J = [{
            c: 0,
            r: 0
        }, {
            t: "n",
            v: 0
        }, 0, 0];
        return Z.qpro && Z.vers != 20768 ? (J[0].c = B.read_shift(1), J[3] = B.read_shift(1), J[0].r = B.read_shift(2), B.l += 2) : Z.works ? (J[0].c = B.read_shift(2), J[0].r = B.read_shift(2), J[2] = B.read_shift(2)) : (J[2] = B.read_shift(1), J[0].c = B.read_shift(2), J[0].r = B.read_shift(2)), J;
    }

    function h(B) {
        return B.z && Ic(B.z) ? 240 | (e.indexOf(B.z) + 1 || 2) : 255;
    }

    function d(B, ne, Z) {
        var J = B.l + ne,
            ye = u(B, ne, Z);
        if (ye[1].t = "s", (Z.vers & 65534) == 20768) {
            B.l++;
            var je = B.read_shift(1);
            return ye[1].v = B.read_shift(je, "utf8"), ye;
        }
        return Z.qpro && B.l++, ye[1].v = B.read_shift(J - B.l, "cstr"), ye;
    }

    function f(B, ne, Z) {
        var J = Ue(7 + Z.length);
        J.write_shift(1, 255), J.write_shift(2, ne), J.write_shift(2, B), J.write_shift(1, 39);
        for (var ye = 0; ye < J.length; ++ye) {
            var je = Z.charCodeAt(ye);
            J.write_shift(1, je >= 128 ? 95 : je);
        }
        return J.write_shift(1, 0), J;
    }

    function m(B, ne, Z) {
        var J = B.l + ne,
            ye = u(B, ne, Z);
        if (ye[1].t = "s", Z.vers == 20768) {
            var je = B.read_shift(1);
            return ye[1].v = B.read_shift(je, "utf8"), ye;
        }
        return ye[1].v = B.read_shift(J - B.l, "cstr"), ye;
    }

    function _(B, ne, Z) {
        var J = u(B, ne, Z);
        return J[1].v = B.read_shift(2, "i"), J;
    }

    function x(B, ne, Z) {
        var J = Ue(7);
        return J.write_shift(1, h(Z)), J.write_shift(2, ne), J.write_shift(2, B), J.write_shift(2, Z.v, "i"), J;
    }

    function g(B, ne, Z) {
        var J = u(B, ne, Z);
        return J[1].v = B.read_shift(8, "f"), J;
    }

    function b(B, ne, Z) {
        var J = Ue(13);
        return J.write_shift(1, h(Z)), J.write_shift(2, ne), J.write_shift(2, B), J.write_shift(8, Z.v, "f"), J;
    }

    function w(B, ne, Z) {
        var J = B.l + ne,
            ye = u(B, ne, Z);
        if (ye[1].v = B.read_shift(8, "f"), Z.qpro) B.l = J;
        else {
            var je = B.read_shift(2);
            P(B.slice(B.l, B.l + je), ye), B.l += je;
        }
        return ye;
    }

    function T(B, ne, Z) {
        var J = ne & 32768;
        return ne &= -32769, ne = (J ? B : 0) + (ne >= 8192 ? ne - 16384 : ne), (J ? "" : "$") + (Z ? ui(ne) : di(ne));
    }
    var E = {
            31: ["NA", 0],
            33: ["ABS", 1],
            34: ["TRUNC", 1],
            35: ["SQRT", 1],
            36: ["LOG", 1],
            37: ["LN", 1],
            38: ["PI", 0],
            39: ["SIN", 1],
            40: ["COS", 1],
            41: ["TAN", 1],
            42: ["ATAN2", 2],
            43: ["ATAN", 1],
            44: ["ASIN", 1],
            45: ["ACOS", 1],
            46: ["EXP", 1],
            47: ["MOD", 2],
            49: ["ISNA", 1],
            50: ["ISERR", 1],
            51: ["FALSE", 0],
            52: ["TRUE", 0],
            53: ["RAND", 0],
            54: ["DATE", 3],
            63: ["ROUND", 2],
            64: ["TIME", 3],
            68: ["ISNUMBER", 1],
            69: ["ISTEXT", 1],
            70: ["LEN", 1],
            71: ["VALUE", 1],
            73: ["MID", 3],
            74: ["CHAR", 1],
            80: ["SUM", 69],
            81: ["AVERAGEA", 69],
            82: ["COUNTA", 69],
            83: ["MINA", 69],
            84: ["MAXA", 69],
            102: ["UPPER", 1],
            103: ["LOWER", 1],
            107: ["PROPER", 1],
            109: ["TRIM", 1],
            111: ["T", 1]
        },
        L = ["", "", "", "", "", "", "", "", "", "+", "-", "*", "/", "^", "=", "<>", "<=", ">=", "<", ">", "", "", "", "", "&", "", "", "", "", "", "", ""];

    function P(B, ne) {
        ga(B, 0);
        for (var Z = [], J = 0, ye = "", je = "", Qe = "", q = ""; B.l < B.length;) {
            var ze = B[B.l++];
            switch (ze) {
                case 0:
                    Z.push(B.read_shift(8, "f"));
                    break;
                case 1:
                    je = T(ne[0].c, B.read_shift(2), !0), ye = T(ne[0].r, B.read_shift(2), !1), Z.push(je + ye);
                    break;
                case 2:
                    {
                        var gt = T(ne[0].c, B.read_shift(2), !0),
                            ft = T(ne[0].r, B.read_shift(2), !1);je = T(ne[0].c, B.read_shift(2), !0),
                        ye = T(ne[0].r, B.read_shift(2), !1),
                        Z.push(gt + ft + ":" + je + ye);
                    }
                    break;
                case 3:
                    if (B.l < B.length) {
                        console.error("WK1 premature formula end");
                        return;
                    }
                    break;
                case 4:
                    Z.push("(" + Z.pop() + ")");
                    break;
                case 5:
                    Z.push(B.read_shift(2));
                    break;
                case 6:
                    {
                        for (var Re = ""; ze = B[B.l++];) Re += String.fromCharCode(ze);Z.push('"' + Re.replace(/"/g, '""') + '"');
                    }
                    break;
                case 8:
                    Z.push("-" + Z.pop());
                    break;
                case 23:
                    Z.push("+" + Z.pop());
                    break;
                case 22:
                    Z.push("NOT(" + Z.pop() + ")");
                    break;
                case 20:
                case 21:
                    q = Z.pop(), Qe = Z.pop(), Z.push(["AND", "OR"][ze - 20] + "(" + Qe + "," + q + ")");
                    break;
                default:
                    if (ze < 32 && L[ze]) q = Z.pop(), Qe = Z.pop(), Z.push(Qe + L[ze] + q);
                    else if (E[ze]) {
                        if (J = E[ze][1], J == 69 && (J = B[B.l++]), J > Z.length) {
                            console.error("WK1 bad formula parse 0x" + ze.toString(16) + ":|" + Z.join("|") + "|");
                            return;
                        }
                        var pt = Z.slice(-J);
                        Z.length -= J, Z.push(E[ze][0] + "(" + pt.join(",") + ")");
                    } else return ze <= 7 ? console.error("WK1 invalid opcode " + ze.toString(16)) : ze <= 24 ? console.error("WK1 unsupported op " + ze.toString(16)) : ze <= 30 ? console.error("WK1 invalid opcode " + ze.toString(16)) : ze <= 115 ? console.error("WK1 unsupported function opcode " + ze.toString(16)) : console.error("WK1 unrecognized opcode " + ze.toString(16));
            }
        }
        Z.length == 1 ? ne[1].f = "" + Z[0] : console.error("WK1 bad formula parse |" + Z.join("|") + "|");
    }

    function k(B) {
        var ne = [{
            c: 0,
            r: 0
        }, {
            t: "n",
            v: 0
        }, 0];
        return ne[0].r = B.read_shift(2), ne[3] = B[B.l++], ne[0].c = B[B.l++], ne;
    }

    function A(B, ne) {
        var Z = k(B, ne);
        return Z[1].t = "s", Z[1].v = B.read_shift(ne - 4, "cstr"), Z;
    }

    function N(B, ne, Z, J) {
        var ye = Ue(6 + J.length);
        ye.write_shift(2, B), ye.write_shift(1, Z), ye.write_shift(1, ne), ye.write_shift(1, 39);
        for (var je = 0; je < J.length; ++je) {
            var Qe = J.charCodeAt(je);
            ye.write_shift(1, Qe >= 128 ? 95 : Qe);
        }
        return ye.write_shift(1, 0), ye;
    }

    function C(B, ne) {
        var Z = k(B, ne);
        Z[1].v = B.read_shift(2);
        var J = Z[1].v >> 1;
        if (Z[1].v & 1) switch (J & 7) {
            case 0:
                J = (J >> 3) * 5e3;
                break;
            case 1:
                J = (J >> 3) * 500;
                break;
            case 2:
                J = (J >> 3) / 20;
                break;
            case 3:
                J = (J >> 3) / 200;
                break;
            case 4:
                J = (J >> 3) / 2e3;
                break;
            case 5:
                J = (J >> 3) / 2e4;
                break;
            case 6:
                J = (J >> 3) / 16;
                break;
            case 7:
                J = (J >> 3) / 64;
                break;
        }
        return Z[1].v = J, Z;
    }

    function F(B, ne) {
        var Z = k(B, ne),
            J = B.read_shift(4),
            ye = B.read_shift(4),
            je = B.read_shift(2);
        if (je == 65535) return J === 0 && ye === 3221225472 ? (Z[1].t = "e", Z[1].v = 15) : J === 0 && ye === 3489660928 ? (Z[1].t = "e", Z[1].v = 42) : Z[1].v = 0, Z;
        var Qe = je & 32768;
        return je = (je & 32767) - 16446, Z[1].v = (1 - Qe * 2) * (ye * Math.pow(2, je + 32) + J * Math.pow(2, je)), Z;
    }

    function W(B, ne, Z, J) {
        var ye = Ue(14);
        if (ye.write_shift(2, B), ye.write_shift(1, Z), ye.write_shift(1, ne), J == 0) return ye.write_shift(4, 0), ye.write_shift(4, 0), ye.write_shift(2, 65535), ye;
        var je = 0,
            Qe = 0,
            q = 0,
            ze = 0;
        return J < 0 && (je = 1, J = -J), Qe = Math.log2(J) | 0, J /= Math.pow(2, Qe - 31), ze = J >>> 0, (ze & 2147483648) == 0 && (J /= 2, ++Qe, ze = J >>> 0), J -= ze, ze |= 2147483648, ze >>>= 0, J *= Math.pow(2, 32), q = J >>> 0, ye.write_shift(4, q), ye.write_shift(4, ze), Qe += 16383 + (je ? 32768 : 0), ye.write_shift(2, Qe), ye;
    }

    function I(B, ne) {
        var Z = F(B, 14);
        return B.l += ne - 14, Z;
    }

    function U(B, ne) {
        var Z = k(B, ne),
            J = B.read_shift(4);
        return Z[1].v = J >> 6, Z;
    }

    function le(B, ne) {
        var Z = k(B, ne),
            J = B.read_shift(8, "f");
        return Z[1].v = J, Z;
    }

    function H(B, ne) {
        var Z = le(B, 12);
        return B.l += ne - 12, Z;
    }

    function pe(B, ne) {
        return B[B.l + ne - 1] == 0 ? B.read_shift(ne, "cstr") : "";
    }

    function _e(B, ne) {
        var Z = B[B.l++];
        Z > ne - 1 && (Z = ne - 1);
        for (var J = ""; J.length < Z;) J += String.fromCharCode(B[B.l++]);
        return J;
    }

    function Fe(B, ne, Z) {
        if (!(!Z.qpro || ne < 21)) {
            var J = B.read_shift(1);
            B.l += 17, B.l += 1, B.l += 2;
            var ye = B.read_shift(ne - 21, "cstr");
            return [J, ye];
        }
    }

    function Te(B, ne) {
        for (var Z = {}, J = B.l + ne; B.l < J;) {
            var ye = B.read_shift(2);
            if (ye == 14e3) {
                for (Z[ye] = [0, ""], Z[ye][0] = B.read_shift(2); B[B.l];) Z[ye][1] += String.fromCharCode(B[B.l]), B.l++;
                B.l++;
            }
        }
        return Z;
    }

    function O(B, ne) {
        var Z = Ue(5 + B.length);
        Z.write_shift(2, 14e3), Z.write_shift(2, ne);
        for (var J = 0; J < B.length; ++J) {
            var ye = B.charCodeAt(J);
            Z[Z.l++] = ye > 127 ? 95 : ye;
        }
        return Z[Z.l++] = 0, Z;
    }
    var j = {
            0: {
                n: "BOF",
                f: pp
            },
            1: {
                n: "EOF"
            },
            2: {
                n: "CALCMODE"
            },
            3: {
                n: "CALCORDER"
            },
            4: {
                n: "SPLIT"
            },
            5: {
                n: "SYNC"
            },
            6: {
                n: "RANGE",
                f: l
            },
            7: {
                n: "WINDOW1"
            },
            8: {
                n: "COLW1"
            },
            9: {
                n: "WINTWO"
            },
            10: {
                n: "COLW2"
            },
            11: {
                n: "NAME"
            },
            12: {
                n: "BLANK"
            },
            13: {
                n: "INTEGER",
                f: _
            },
            14: {
                n: "NUMBER",
                f: g
            },
            15: {
                n: "LABEL",
                f: d
            },
            16: {
                n: "FORMULA",
                f: w
            },
            24: {
                n: "TABLE"
            },
            25: {
                n: "ORANGE"
            },
            26: {
                n: "PRANGE"
            },
            27: {
                n: "SRANGE"
            },
            28: {
                n: "FRANGE"
            },
            29: {
                n: "KRANGE1"
            },
            32: {
                n: "HRANGE"
            },
            35: {
                n: "KRANGE2"
            },
            36: {
                n: "PROTEC"
            },
            37: {
                n: "FOOTER"
            },
            38: {
                n: "HEADER"
            },
            39: {
                n: "SETUP"
            },
            40: {
                n: "MARGINS"
            },
            41: {
                n: "LABELFMT"
            },
            42: {
                n: "TITLES"
            },
            43: {
                n: "SHEETJS"
            },
            45: {
                n: "GRAPH"
            },
            46: {
                n: "NGRAPH"
            },
            47: {
                n: "CALCCOUNT"
            },
            48: {
                n: "UNFORMATTED"
            },
            49: {
                n: "CURSORW12"
            },
            50: {
                n: "WINDOW"
            },
            51: {
                n: "STRING",
                f: m
            },
            55: {
                n: "PASSWORD"
            },
            56: {
                n: "LOCKED"
            },
            60: {
                n: "QUERY"
            },
            61: {
                n: "QUERYNAME"
            },
            62: {
                n: "PRINT"
            },
            63: {
                n: "PRINTNAME"
            },
            64: {
                n: "GRAPH2"
            },
            65: {
                n: "GRAPHNAME"
            },
            66: {
                n: "ZOOM"
            },
            67: {
                n: "SYMSPLIT"
            },
            68: {
                n: "NSROWS"
            },
            69: {
                n: "NSCOLS"
            },
            70: {
                n: "RULER"
            },
            71: {
                n: "NNAME"
            },
            72: {
                n: "ACOMM"
            },
            73: {
                n: "AMACRO"
            },
            74: {
                n: "PARSE"
            },
            102: {
                n: "PRANGES??"
            },
            103: {
                n: "RRANGES??"
            },
            104: {
                n: "FNAME??"
            },
            105: {
                n: "MRANGES??"
            },
            204: {
                n: "SHEETNAMECS",
                f: pe
            },
            222: {
                n: "SHEETNAMELP",
                f: _e
            },
            255: {
                n: "BOF",
                f: pp
            },
            21506: {
                n: "WKSNF",
                f: pp
            },
            65535: {
                n: ""
            }
        },
        X = {
            0: {
                n: "BOF"
            },
            1: {
                n: "EOF"
            },
            2: {
                n: "PASSWORD"
            },
            3: {
                n: "CALCSET"
            },
            4: {
                n: "WINDOWSET"
            },
            5: {
                n: "SHEETCELLPTR"
            },
            6: {
                n: "SHEETLAYOUT"
            },
            7: {
                n: "COLUMNWIDTH"
            },
            8: {
                n: "HIDDENCOLUMN"
            },
            9: {
                n: "USERRANGE"
            },
            10: {
                n: "SYSTEMRANGE"
            },
            11: {
                n: "ZEROFORCE"
            },
            12: {
                n: "SORTKEYDIR"
            },
            13: {
                n: "FILESEAL"
            },
            14: {
                n: "DATAFILLNUMS"
            },
            15: {
                n: "PRINTMAIN"
            },
            16: {
                n: "PRINTSTRING"
            },
            17: {
                n: "GRAPHMAIN"
            },
            18: {
                n: "GRAPHSTRING"
            },
            19: {
                n: "??"
            },
            20: {
                n: "ERRCELL"
            },
            21: {
                n: "NACELL"
            },
            22: {
                n: "LABEL16",
                f: A
            },
            23: {
                n: "NUMBER17",
                f: F
            },
            24: {
                n: "NUMBER18",
                f: C
            },
            25: {
                n: "FORMULA19",
                f: I
            },
            26: {
                n: "FORMULA1A"
            },
            27: {
                n: "XFORMAT",
                f: Te
            },
            28: {
                n: "DTLABELMISC"
            },
            29: {
                n: "DTLABELCELL"
            },
            30: {
                n: "GRAPHWINDOW"
            },
            31: {
                n: "CPA"
            },
            32: {
                n: "LPLAUTO"
            },
            33: {
                n: "QUERY"
            },
            34: {
                n: "HIDDENSHEET"
            },
            35: {
                n: "??"
            },
            37: {
                n: "NUMBER25",
                f: U
            },
            38: {
                n: "??"
            },
            39: {
                n: "NUMBER27",
                f: le
            },
            40: {
                n: "FORMULA28",
                f: H
            },
            142: {
                n: "??"
            },
            147: {
                n: "??"
            },
            150: {
                n: "??"
            },
            151: {
                n: "??"
            },
            152: {
                n: "??"
            },
            153: {
                n: "??"
            },
            154: {
                n: "??"
            },
            155: {
                n: "??"
            },
            156: {
                n: "??"
            },
            163: {
                n: "??"
            },
            174: {
                n: "??"
            },
            175: {
                n: "??"
            },
            176: {
                n: "??"
            },
            177: {
                n: "??"
            },
            184: {
                n: "??"
            },
            185: {
                n: "??"
            },
            186: {
                n: "??"
            },
            187: {
                n: "??"
            },
            188: {
                n: "??"
            },
            195: {
                n: "??"
            },
            201: {
                n: "??"
            },
            204: {
                n: "SHEETNAMECS",
                f: pe
            },
            205: {
                n: "??"
            },
            206: {
                n: "??"
            },
            207: {
                n: "??"
            },
            208: {
                n: "??"
            },
            256: {
                n: "??"
            },
            259: {
                n: "??"
            },
            260: {
                n: "??"
            },
            261: {
                n: "??"
            },
            262: {
                n: "??"
            },
            263: {
                n: "??"
            },
            265: {
                n: "??"
            },
            266: {
                n: "??"
            },
            267: {
                n: "??"
            },
            268: {
                n: "??"
            },
            270: {
                n: "??"
            },
            271: {
                n: "??"
            },
            384: {
                n: "??"
            },
            389: {
                n: "??"
            },
            390: {
                n: "??"
            },
            393: {
                n: "??"
            },
            396: {
                n: "??"
            },
            512: {
                n: "??"
            },
            514: {
                n: "??"
            },
            513: {
                n: "??"
            },
            516: {
                n: "??"
            },
            517: {
                n: "??"
            },
            640: {
                n: "??"
            },
            641: {
                n: "??"
            },
            642: {
                n: "??"
            },
            643: {
                n: "??"
            },
            644: {
                n: "??"
            },
            645: {
                n: "??"
            },
            646: {
                n: "??"
            },
            647: {
                n: "??"
            },
            648: {
                n: "??"
            },
            658: {
                n: "??"
            },
            659: {
                n: "??"
            },
            660: {
                n: "??"
            },
            661: {
                n: "??"
            },
            662: {
                n: "??"
            },
            665: {
                n: "??"
            },
            666: {
                n: "??"
            },
            768: {
                n: "??"
            },
            772: {
                n: "??"
            },
            1537: {
                n: "SHEETINFOQP",
                f: Fe
            },
            1600: {
                n: "??"
            },
            1602: {
                n: "??"
            },
            1793: {
                n: "??"
            },
            1794: {
                n: "??"
            },
            1795: {
                n: "??"
            },
            1796: {
                n: "??"
            },
            1920: {
                n: "??"
            },
            2048: {
                n: "??"
            },
            2049: {
                n: "??"
            },
            2052: {
                n: "??"
            },
            2688: {
                n: "??"
            },
            10998: {
                n: "??"
            },
            12849: {
                n: "??"
            },
            28233: {
                n: "??"
            },
            28484: {
                n: "??"
            },
            65535: {
                n: ""
            }
        },
        me = {
            5: "dd-mmm-yy",
            6: "dd-mmm",
            7: "mmm-yy",
            8: "mm/dd/yy",
            10: "hh:mm:ss AM/PM",
            11: "hh:mm AM/PM",
            14: "dd-mmm-yyyy",
            15: "mmm-yyyy",
            34: "0.00",
            50: "0.00;[Red]0.00",
            66: "0.00;(0.00)",
            82: "0.00;[Red](0.00)",
            162: '"$"#,##0.00;\\("$"#,##0.00\\)',
            288: "0%",
            304: "0E+00",
            320: "# ?/?"
        };

    function xe(B) {
        var ne = B.read_shift(2),
            Z = B.read_shift(1);
        if (Z != 0) throw "unsupported QPW string type " + Z.toString(16);
        return B.read_shift(ne, "sbcs-cont");
    }

    function be(B, ne) {
        ga(B, 0);
        var Z = ne || {};
        ls != null && Z.dense == null && (Z.dense = ls);
        var J = {};
        Z.dense && (J["!data"] = []);
        var ye = [],
            je = "",
            Qe = [],
            q = {
                s: {
                    r: -1,
                    c: -1
                },
                e: {
                    r: -1,
                    c: -1
                }
            },
            ze = 0,
            gt = 0,
            ft = 0,
            Re = 0,
            pt = {
                SheetNames: [],
                Sheets: {}
            },
            ct = [];
        e: for (; B.l < B.length;) {
            var xt = B.read_shift(2),
                yt = B.read_shift(2),
                Pe = B.slice(B.l, B.l + yt);
            switch (ga(Pe, 0), xt) {
                case 1:
                    if (Pe.read_shift(4) != 962023505) throw "Bad QPW9 BOF!";
                    break;
                case 2:
                    break e;
                case 8:
                    break;
                case 10:
                    for (var Je = Pe.read_shift(4), er = (Pe.length - Pe.l) / Je | 0, ur = 0; ur < Je; ++ur) {
                        var Gt = Pe.l + er,
                            Ct = {};
                        Pe.l += 2, Ct.numFmtId = Pe.read_shift(2), me[Ct.numFmtId] && (Ct.z = me[Ct.numFmtId]), Pe.l = Gt, ct.push(Ct);
                    }
                    break;
                case 1025:
                    break;
                case 1026:
                    break;
                case 1031:
                    for (Pe.l += 12; Pe.l < Pe.length;) ze = Pe.read_shift(2), gt = Pe.read_shift(1), ye.push(Pe.read_shift(ze, "cstr"));
                    break;
                case 1032:
                    break;
                case 1537:
                    {
                        var fr = Pe.read_shift(2);J = {},
                        Z.dense && (J["!data"] = []),
                        q.s.c = Pe.read_shift(2),
                        q.e.c = Pe.read_shift(2),
                        q.s.r = Pe.read_shift(4),
                        q.e.r = Pe.read_shift(4),
                        Pe.l += 4,
                        Pe.l + 2 < Pe.length && (ze = Pe.read_shift(2), gt = Pe.read_shift(1), je = ze == 0 ? "" : Pe.read_shift(ze, "cstr")),
                        je || (je = ui(fr));
                    }
                    break;
                case 1538:
                    {
                        if (q.s.c > 255 || q.s.r > 999999) break;q.e.c < q.s.c && (q.e.c = q.s.c),
                        q.e.r < q.s.r && (q.e.r = q.s.r),
                        J["!ref"] = hn(q),
                        Jg(pt, J, je);
                    }
                    break;
                case 2561:
                    ft = Pe.read_shift(2), q.e.c < ft && (q.e.c = ft), q.s.c > ft && (q.s.c = ft), Re = Pe.read_shift(4), q.s.r > Re && (q.s.r = Re), Re = Pe.read_shift(4), q.e.r < Re && (q.e.r = Re);
                    break;
                case 3073:
                    {
                        Re = Pe.read_shift(4),
                        ze = Pe.read_shift(4),
                        q.s.r > Re && (q.s.r = Re),
                        q.e.r < Re + ze - 1 && (q.e.r = Re + ze - 1);
                        for (var kt = ui(ft); Pe.l < Pe.length;) {
                            var Zt = {
                                    t: "z"
                                },
                                ir = Pe.read_shift(1),
                                lr = -1;
                            ir & 128 && (lr = Pe.read_shift(2));
                            var _r = ir & 64 ? Pe.read_shift(2) - 1 : 0;
                            switch (ir & 31) {
                                case 0:
                                    break;
                                case 1:
                                    break;
                                case 2:
                                    Zt = {
                                        t: "n",
                                        v: Pe.read_shift(2)
                                    };
                                    break;
                                case 3:
                                    Zt = {
                                        t: "n",
                                        v: Pe.read_shift(2, "i")
                                    };
                                    break;
                                case 4:
                                    Zt = {
                                        t: "n",
                                        v: Hg(Pe)
                                    };
                                    break;
                                case 5:
                                    Zt = {
                                        t: "n",
                                        v: Pe.read_shift(8, "f")
                                    };
                                    break;
                                case 7:
                                    Zt = {
                                        t: "s",
                                        v: ye[gt = Pe.read_shift(4) - 1]
                                    };
                                    break;
                                case 8:
                                    Zt = {
                                        t: "n",
                                        v: Pe.read_shift(8, "f")
                                    }, Pe.l += 2, Pe.l += 4, isNaN(Zt.v) && (Zt = {
                                        t: "e",
                                        v: 15
                                    });
                                    break;
                                default:
                                    throw "Unrecognized QPW cell type " + (ir & 31);
                            }
                            lr != -1 && (ct[lr - 1] || {}).z && (Zt.z = ct[lr - 1].z);
                            var Gr = 0;
                            if (ir & 32) switch (ir & 31) {
                                case 2:
                                    Gr = Pe.read_shift(2);
                                    break;
                                case 3:
                                    Gr = Pe.read_shift(2, "i");
                                    break;
                                case 7:
                                    Gr = Pe.read_shift(2);
                                    break;
                                default:
                                    throw "Unsupported delta for QPW cell type " + (ir & 31);
                            }
                            if (!(!Z.sheetStubs && Zt.t == "z")) {
                                var Pt = na(Zt);
                                Zt.t == "n" && Zt.z && Ic(Zt.z) && Z.cellDates && (Pt.v = I0(Zt.v), Pt.t = typeof Pt.v == "number" ? "n" : "d"), J["!data"] != null ? (J["!data"][Re] || (J["!data"][Re] = []), J["!data"][Re][ft] = Pt) : J[kt + di(Re)] = Pt;
                            }
                            for (++Re, --ze; _r-- > 0 && ze >= 0;) {
                                if (ir & 32) switch (ir & 31) {
                                    case 2:
                                        Zt = {
                                            t: "n",
                                            v: Zt.v + Gr & 65535
                                        };
                                        break;
                                    case 3:
                                        Zt = {
                                            t: "n",
                                            v: Zt.v + Gr & 65535
                                        }, Zt.v > 32767 && (Zt.v -= 65536);
                                        break;
                                    case 7:
                                        Zt = {
                                            t: "s",
                                            v: ye[gt = gt + Gr >>> 0]
                                        };
                                        break;
                                    default:
                                        throw "Cannot apply delta for QPW cell type " + (ir & 31);
                                } else switch (ir & 31) {
                                    case 1:
                                        Zt = {
                                            t: "z"
                                        };
                                        break;
                                    case 2:
                                        Zt = {
                                            t: "n",
                                            v: Pe.read_shift(2)
                                        };
                                        break;
                                    case 7:
                                        Zt = {
                                            t: "s",
                                            v: ye[gt = Pe.read_shift(4) - 1]
                                        };
                                        break;
                                    default:
                                        throw "Cannot apply repeat for QPW cell type " + (ir & 31);
                                }
                                lr != -1, !Z.sheetStubs && Zt.t == "z" || (J["!data"] != null ? (J["!data"][Re] || (J["!data"][Re] = []), J["!data"][Re][ft] = Zt) : J[kt + di(Re)] = Zt), ++Re, --ze;
                            }
                        }
                    }
                    break;
                case 3074:
                    {
                        ft = Pe.read_shift(2),
                        Re = Pe.read_shift(4);
                        var Yr = xe(Pe);J["!data"] != null ? (J["!data"][Re] || (J["!data"][Re] = []), J["!data"][Re][ft] = {
                            t: "s",
                            v: Yr
                        }) : J[ui(ft) + di(Re)] = {
                            t: "s",
                            v: Yr
                        };
                    }
                    break;
                default:
                    break;
            }
            B.l += yt;
        }
        return pt;
    }
    return {
        sheet_to_wk1: n,
        book_to_wk3: a,
        to_workbook: r
    };
}();
var yk = /^\s|\s$|[\t\n\r]/;

function bk(t, r) {
    if (!r.bookSST) return "";
    var e = [dn];
    e[e.length] = ut("sst", null, {
        xmlns: z0[0],
        count: t.Count,
        uniqueCount: t.Unique
    });
    for (var i = 0; i != t.length; ++i)
        if (t[i] != null) {
            var n = t[i],
                a = "<si>";
            n.r ? a += n.r : (a += "<t", n.t || (n.t = ""), typeof n.t != "string" && (n.t = String(n.t)), n.t.match(yk) && (a += ' xml:space="preserve"'), a += ">" + kr(n.t) + "</t>"), a += "</si>", e[e.length] = a;
        }
    return e.length > 2 && (e[e.length] = "</sst>", e[1] = e[1].replace("/>", ">")), e.join("");
}

function wk(t) {
    return [t.read_shift(4), t.read_shift(4)];
}

function Sk(t, r) {
    return r || (r = Ue(8)), r.write_shift(4, t.Count), r.write_shift(4, t.Unique), r;
}
var Ck = uD;

function Ak(t) {
    var r = ra();
    Ze(r, 159, Sk(t));
    for (var e = 0; e < t.length; ++e) Ze(r, 19, Ck(t[e]));
    return Ze(r, 160), r.end();
}

function Tk(t) {
    if (typeof Kr < "u") return Kr.utils.encode(B0, t);
    for (var r = [], e = t.split(""), i = 0; i < e.length; ++i) r[i] = e[i].charCodeAt(0);
    return r;
}

function Rw(t) {
    var r = 0,
        e, i = Tk(t),
        n = i.length + 1,
        a, o, s, l, c;
    for (e = Ec(n), e[0] = i.length, a = 1; a != n; ++a) e[a] = i[a - 1];
    for (a = n - 1; a >= 0; --a) o = e[a], s = (r & 16384) === 0 ? 0 : 1, l = r << 1 & 32767, c = s | l, r = c ^ o;
    return r ^ 52811;
}

function Dk(t, r) {
    var e = ["{\\rtf1\\ansi"];
    if (!t["!ref"]) return e[0] + "}";
    for (var i = ki(t["!ref"]), n, a = t["!data"] != null, o = [], s = i.s.r; s <= i.e.r; ++s) {
        e.push("\\trowd\\trautofit1");
        for (var l = i.s.c; l <= i.e.c; ++l) e.push("\\cellx" + (l + 1));
        for (e.push("\\pard\\intbl"), a && (o = t["!data"][s] || []), l = i.s.c; l <= i.e.c; ++l) {
            var c = Bi({
                r: s,
                c: l
            });
            if (n = a ? o[l] : t[c], !n || n.v == null && (!n.f || n.F)) {
                e.push(" \\cell");
                continue;
            }
            e.push(" " + (n.w || (Xs(n), n.w) || "").replace(/[\r\n]/g, "\\par ")), e.push("\\cell");
        }
        e.push("\\pard\\intbl\\row");
    }
    return e.join("") + "}";
}

function Nb(t) {
    for (var r = 0, e = 1; r != 3; ++r) e = e * 256 + (t[r] > 255 ? 255 : t[r] < 0 ? 0 : t[r]);
    return e.toString(16).toUpperCase().slice(1);
}
var kk = 6;
var Gs = kk;

function Cp(t) {
    return Math.floor((t + Math.round(128 / Gs) / 256) * Gs);
}

function Ap(t) {
    return Math.floor((t - 5) / Gs * 100 + .5) / 100;
}

function Sg(t) {
    return Math.round((t * Gs + 5) / Gs * 256) / 256;
}

function qg(t) {
    t.width ? (t.wpx = Cp(t.width), t.wch = Ap(t.wpx), t.MDW = Gs) : t.wpx ? (t.wch = Ap(t.wpx), t.width = Sg(t.wch), t.MDW = Gs) : typeof t.wch == "number" && (t.width = Sg(t.wch), t.wpx = Cp(t.width), t.MDW = Gs), t.customWidth && delete t.customWidth;
}
var Fk = 96,
    Mw = Fk;

function Tp(t) {
    return t * 96 / Mw;
}

function Bw(t) {
    return t * Mw / 96;
}

function Ek(t) {
    var r = ["<numFmts>"];
    return [
        [5, 8],
        [23, 26],
        [41, 44],
        [50, 392]
    ].forEach(function(e) {
        for (var i = e[0]; i <= e[1]; ++i) t[i] != null && (r[r.length] = ut("numFmt", null, {
            numFmtId: i,
            formatCode: kr(t[i])
        }));
    }), r.length === 1 ? "" : (r[r.length] = "</numFmts>", r[0] = ut("numFmts", null, {
        count: r.length - 2
    }).replace("/>", ">"), r.join(""));
}

function Pk(t) {
    var r = [];
    return r[r.length] = ut("cellXfs", null), t.forEach(function(e) {
        r[r.length] = ut("xf", null, e);
    }), r[r.length] = "</cellXfs>", r.length === 2 ? "" : (r[0] = ut("cellXfs", null, {
        count: r.length - 2
    }).replace("/>", ">"), r.join(""));
}

function Ik(t, r) {
    var e = [dn, ut("styleSheet", null, {
            xmlns: z0[0],
            "xmlns:vt": Pn.vt
        })],
        i;
    return t.SSF && (i = Ek(t.SSF)) != null && (e[e.length] = i), e[e.length] = '<fonts count="1"><font><sz val="12"/><color theme="1"/><name val="Calibri"/><family val="2"/><scheme val="minor"/></font></fonts>', e[e.length] = '<fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills>', e[e.length] = '<borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders>', e[e.length] = '<cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>', (i = Pk(r.cellXfs)) && (e[e.length] = i), e[e.length] = '<cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>', e[e.length] = '<dxfs count="0"/>', e[e.length] = '<tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleMedium4"/>', e.length > 2 && (e[e.length] = "</styleSheet>", e[1] = e[1].replace("/>", ">")), e.join("");
}

function Ok(t, r) {
    var e = t.read_shift(2),
        i = ia(t, r - 2);
    return [e, i];
}

function Nk(t, r, e) {
    e || (e = Ue(6 + 4 * r.length)), e.write_shift(2, t), An(r, e);
    var i = e.length > e.l ? e.slice(0, e.l) : e;
    return e.l == null && (e.l = e.length), i;
}

function Lk(t, r, e) {
    var i = {};
    i.sz = t.read_shift(2) / 20;
    var n = vD(t, 2, e);
    n.fItalic && (i.italic = 1), n.fCondense && (i.condense = 1), n.fExtend && (i.extend = 1), n.fShadow && (i.shadow = 1), n.fOutline && (i.outline = 1), n.fStrikeout && (i.strike = 1);
    var a = t.read_shift(2);
    switch (a === 700 && (i.bold = 1), t.read_shift(2)) {
        case 1:
            i.vertAlign = "superscript";
            break;
        case 2:
            i.vertAlign = "subscript";
            break;
    }
    var o = t.read_shift(1);
    o != 0 && (i.underline = o);
    var s = t.read_shift(1);
    s > 0 && (i.family = s);
    var l = t.read_shift(1);
    switch (l > 0 && (i.charset = l), t.l++, i.color = gD(t, 8), t.read_shift(1)) {
        case 1:
            i.scheme = "major";
            break;
        case 2:
            i.scheme = "minor";
            break;
    }
    return i.name = ia(t, r - 21), i;
}

function Rk(t, r) {
    r || (r = Ue(25 + 4 * 32)), r.write_shift(2, t.sz * 20), xD(t, r), r.write_shift(2, t.bold ? 700 : 400);
    var e = 0;
    t.vertAlign == "superscript" ? e = 1 : t.vertAlign == "subscript" && (e = 2), r.write_shift(2, e), r.write_shift(1, t.underline || 0), r.write_shift(1, t.family || 0), r.write_shift(1, t.charset || 0), r.write_shift(1, 0), wp(t.color, r);
    var i = 0;
    return t.scheme == "major" && (i = 1), t.scheme == "minor" && (i = 2), r.write_shift(1, i), An(t.name, r), r.length > r.l ? r.slice(0, r.l) : r;
}
var Mk = ["none", "solid", "mediumGray", "darkGray", "lightGray", "darkHorizontal", "darkVertical", "darkDown", "darkUp", "darkGrid", "darkTrellis", "lightHorizontal", "lightVertical", "lightDown", "lightUp", "lightGrid", "lightTrellis", "gray125", "gray0625"],
    dg, Bk = us;

function Lb(t, r) {
    r || (r = Ue(4 * 3 + 8 * 7 + 16 * 1)), dg || (dg = Fg(Mk));
    var e = dg[t.patternType];
    e == null && (e = 40), r.write_shift(4, e);
    var i = 0;
    if (e != 40)
        for (wp({
                auto: 1
            }, r), wp({
                auto: 1
            }, r); i < 12; ++i) r.write_shift(4, 0);
    else {
        for (; i < 4; ++i) r.write_shift(4, 0);
        for (; i < 12; ++i) r.write_shift(4, 0);
    }
    return r.length > r.l ? r.slice(0, r.l) : r;
}

function Uk(t, r) {
    var e = t.l + r,
        i = t.read_shift(2),
        n = t.read_shift(2);
    return t.l = e, {
        ixfe: i,
        numFmtId: n
    };
}

function Uw(t, r, e) {
    e || (e = Ue(16)), e.write_shift(2, r || 0), e.write_shift(2, t.numFmtId || 0), e.write_shift(2, 0), e.write_shift(2, 0), e.write_shift(2, 0), e.write_shift(1, 0), e.write_shift(1, 0);
    var i = 0;
    return e.write_shift(1, i), e.write_shift(1, 0), e.write_shift(1, 0), e.write_shift(1, 0), e;
}

function ff(t, r) {
    return r || (r = Ue(10)), r.write_shift(1, 0), r.write_shift(1, 0), r.write_shift(4, 0), r.write_shift(4, 0), r;
}
var Vk = us;

function zk(t, r) {
    return r || (r = Ue(51)), r.write_shift(1, 0), ff(null, r), ff(null, r), ff(null, r), ff(null, r), ff(null, r), r.length > r.l ? r.slice(0, r.l) : r;
}

function Wk(t, r) {
    return r || (r = Ue(12 + 4 * 10)), r.write_shift(4, t.xfId), r.write_shift(2, 1), r.write_shift(1, +t.builtinId), r.write_shift(1, 0), Cf(t.name || "", r), r.length > r.l ? r.slice(0, r.l) : r;
}

function jk(t, r, e) {
    var i = Ue(2052);
    return i.write_shift(4, t), Cf(r, i), Cf(e, i), i.length > i.l ? i.slice(0, i.l) : i;
}

function Hk(t, r) {
    if (r) {
        var e = 0;
        [
            [5, 8],
            [23, 26],
            [41, 44],
            [50, 392]
        ].forEach(function(i) {
            for (var n = i[0]; n <= i[1]; ++n) r[n] != null && ++e;
        }), e != 0 && (Ze(t, 615, Bo(e)), [
            [5, 8],
            [23, 26],
            [41, 44],
            [50, 392]
        ].forEach(function(i) {
            for (var n = i[0]; n <= i[1]; ++n) r[n] != null && Ze(t, 44, Nk(n, r[n]));
        }), Ze(t, 616));
    }
}

function Gk(t) {
    var r = 1;
    r != 0 && (Ze(t, 611, Bo(r)), Ze(t, 43, Rk({
        sz: 12,
        color: {
            theme: 1
        },
        name: "Calibri",
        family: 2,
        scheme: "minor"
    })), Ze(t, 612));
}

function qk(t) {
    var r = 2;
    r != 0 && (Ze(t, 603, Bo(r)), Ze(t, 45, Lb({
        patternType: "none"
    })), Ze(t, 45, Lb({
        patternType: "gray125"
    })), Ze(t, 604));
}

function Xk(t) {
    var r = 1;
    r != 0 && (Ze(t, 613, Bo(r)), Ze(t, 46, zk({})), Ze(t, 614));
}

function Kk(t) {
    var r = 1;
    Ze(t, 626, Bo(r)), Ze(t, 47, Uw({
        numFmtId: 0,
        fontId: 0,
        fillId: 0,
        borderId: 0
    }, 65535)), Ze(t, 627);
}

function Yk(t, r) {
    Ze(t, 617, Bo(r.length)), r.forEach(function(e) {
        Ze(t, 47, Uw(e, 0));
    }), Ze(t, 618);
}

function Zk(t) {
    var r = 1;
    Ze(t, 619, Bo(r)), Ze(t, 48, Wk({
        xfId: 0,
        builtinId: 0,
        name: "Normal"
    })), Ze(t, 620);
}

function Jk(t) {
    var r = 0;
    Ze(t, 505, Bo(r)), Ze(t, 506);
}

function Qk(t) {
    var r = 0;
    Ze(t, 508, jk(r, "TableStyleMedium9", "PivotStyleMedium4")), Ze(t, 509);
}

function $k(t, r) {
    var e = ra();
    return Ze(e, 278), Hk(e, t.SSF), Gk(e, t), qk(e, t), Xk(e, t), Kk(e, t), Yk(e, r.cellXfs), Zk(e, t), Jk(e, t), Qk(e, t), Ze(e, 279), e.end();
}

function Vw(t, r) {
    if (r && r.themeXLSX) return r.themeXLSX;
    if (t && typeof t.raw == "string") return t.raw;
    var e = [dn];
    return e[e.length] = '<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">', e[e.length] = "<a:themeElements>", e[e.length] = '<a:clrScheme name="Office">', e[e.length] = '<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>', e[e.length] = '<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>', e[e.length] = '<a:dk2><a:srgbClr val="1F497D"/></a:dk2>', e[e.length] = '<a:lt2><a:srgbClr val="EEECE1"/></a:lt2>', e[e.length] = '<a:accent1><a:srgbClr val="4F81BD"/></a:accent1>', e[e.length] = '<a:accent2><a:srgbClr val="C0504D"/></a:accent2>', e[e.length] = '<a:accent3><a:srgbClr val="9BBB59"/></a:accent3>', e[e.length] = '<a:accent4><a:srgbClr val="8064A2"/></a:accent4>', e[e.length] = '<a:accent5><a:srgbClr val="4BACC6"/></a:accent5>', e[e.length] = '<a:accent6><a:srgbClr val="F79646"/></a:accent6>', e[e.length] = '<a:hlink><a:srgbClr val="0000FF"/></a:hlink>', e[e.length] = '<a:folHlink><a:srgbClr val="800080"/></a:folHlink>', e[e.length] = "</a:clrScheme>", e[e.length] = '<a:fontScheme name="Office">', e[e.length] = "<a:majorFont>", e[e.length] = '<a:latin typeface="Cambria"/>', e[e.length] = '<a:ea typeface=""/>', e[e.length] = '<a:cs typeface=""/>', e[e.length] = '<a:font script="Jpan" typeface="\uFF2D\uFF33 \uFF30\u30B4\u30B7\u30C3\u30AF"/>', e[e.length] = '<a:font script="Hang" typeface="\uB9D1\uC740 \uACE0\uB515"/>', e[e.length] = '<a:font script="Hans" typeface="\u5B8B\u4F53"/>', e[e.length] = '<a:font script="Hant" typeface="\u65B0\u7D30\u660E\u9AD4"/>', e[e.length] = '<a:font script="Arab" typeface="Times New Roman"/>', e[e.length] = '<a:font script="Hebr" typeface="Times New Roman"/>', e[e.length] = '<a:font script="Thai" typeface="Tahoma"/>', e[e.length] = '<a:font script="Ethi" typeface="Nyala"/>', e[e.length] = '<a:font script="Beng" typeface="Vrinda"/>', e[e.length] = '<a:font script="Gujr" typeface="Shruti"/>', e[e.length] = '<a:font script="Khmr" typeface="MoolBoran"/>', e[e.length] = '<a:font script="Knda" typeface="Tunga"/>', e[e.length] = '<a:font script="Guru" typeface="Raavi"/>', e[e.length] = '<a:font script="Cans" typeface="Euphemia"/>', e[e.length] = '<a:font script="Cher" typeface="Plantagenet Cherokee"/>', e[e.length] = '<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>', e[e.length] = '<a:font script="Tibt" typeface="Microsoft Himalaya"/>', e[e.length] = '<a:font script="Thaa" typeface="MV Boli"/>', e[e.length] = '<a:font script="Deva" typeface="Mangal"/>', e[e.length] = '<a:font script="Telu" typeface="Gautami"/>', e[e.length] = '<a:font script="Taml" typeface="Latha"/>', e[e.length] = '<a:font script="Syrc" typeface="Estrangelo Edessa"/>', e[e.length] = '<a:font script="Orya" typeface="Kalinga"/>', e[e.length] = '<a:font script="Mlym" typeface="Kartika"/>', e[e.length] = '<a:font script="Laoo" typeface="DokChampa"/>', e[e.length] = '<a:font script="Sinh" typeface="Iskoola Pota"/>', e[e.length] = '<a:font script="Mong" typeface="Mongolian Baiti"/>', e[e.length] = '<a:font script="Viet" typeface="Times New Roman"/>', e[e.length] = '<a:font script="Uigh" typeface="Microsoft Uighur"/>', e[e.length] = '<a:font script="Geor" typeface="Sylfaen"/>', e[e.length] = "</a:majorFont>", e[e.length] = "<a:minorFont>", e[e.length] = '<a:latin typeface="Calibri"/>', e[e.length] = '<a:ea typeface=""/>', e[e.length] = '<a:cs typeface=""/>', e[e.length] = '<a:font script="Jpan" typeface="\uFF2D\uFF33 \uFF30\u30B4\u30B7\u30C3\u30AF"/>', e[e.length] = '<a:font script="Hang" typeface="\uB9D1\uC740 \uACE0\uB515"/>', e[e.length] = '<a:font script="Hans" typeface="\u5B8B\u4F53"/>', e[e.length] = '<a:font script="Hant" typeface="\u65B0\u7D30\u660E\u9AD4"/>', e[e.length] = '<a:font script="Arab" typeface="Arial"/>', e[e.length] = '<a:font script="Hebr" typeface="Arial"/>', e[e.length] = '<a:font script="Thai" typeface="Tahoma"/>', e[e.length] = '<a:font script="Ethi" typeface="Nyala"/>', e[e.length] = '<a:font script="Beng" typeface="Vrinda"/>', e[e.length] = '<a:font script="Gujr" typeface="Shruti"/>', e[e.length] = '<a:font script="Khmr" typeface="DaunPenh"/>', e[e.length] = '<a:font script="Knda" typeface="Tunga"/>', e[e.length] = '<a:font script="Guru" typeface="Raavi"/>', e[e.length] = '<a:font script="Cans" typeface="Euphemia"/>', e[e.length] = '<a:font script="Cher" typeface="Plantagenet Cherokee"/>', e[e.length] = '<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>', e[e.length] = '<a:font script="Tibt" typeface="Microsoft Himalaya"/>', e[e.length] = '<a:font script="Thaa" typeface="MV Boli"/>', e[e.length] = '<a:font script="Deva" typeface="Mangal"/>', e[e.length] = '<a:font script="Telu" typeface="Gautami"/>', e[e.length] = '<a:font script="Taml" typeface="Latha"/>', e[e.length] = '<a:font script="Syrc" typeface="Estrangelo Edessa"/>', e[e.length] = '<a:font script="Orya" typeface="Kalinga"/>', e[e.length] = '<a:font script="Mlym" typeface="Kartika"/>', e[e.length] = '<a:font script="Laoo" typeface="DokChampa"/>', e[e.length] = '<a:font script="Sinh" typeface="Iskoola Pota"/>', e[e.length] = '<a:font script="Mong" typeface="Mongolian Baiti"/>', e[e.length] = '<a:font script="Viet" typeface="Arial"/>', e[e.length] = '<a:font script="Uigh" typeface="Microsoft Uighur"/>', e[e.length] = '<a:font script="Geor" typeface="Sylfaen"/>', e[e.length] = "</a:minorFont>", e[e.length] = "</a:fontScheme>", e[e.length] = '<a:fmtScheme name="Office">', e[e.length] = "<a:fillStyleLst>", e[e.length] = '<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>', e[e.length] = '<a:gradFill rotWithShape="1">', e[e.length] = "<a:gsLst>", e[e.length] = '<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs>', e[e.length] = '<a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs>', e[e.length] = '<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs>', e[e.length] = "</a:gsLst>", e[e.length] = '<a:lin ang="16200000" scaled="1"/>', e[e.length] = "</a:gradFill>", e[e.length] = '<a:gradFill rotWithShape="1">', e[e.length] = "<a:gsLst>", e[e.length] = '<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="100000"/><a:shade val="100000"/><a:satMod val="130000"/></a:schemeClr></a:gs>', e[e.length] = '<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="50000"/><a:shade val="100000"/><a:satMod val="350000"/></a:schemeClr></a:gs>', e[e.length] = "</a:gsLst>", e[e.length] = '<a:lin ang="16200000" scaled="0"/>', e[e.length] = "</a:gradFill>", e[e.length] = "</a:fillStyleLst>", e[e.length] = "<a:lnStyleLst>", e[e.length] = '<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln>', e[e.length] = '<a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>', e[e.length] = '<a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>', e[e.length] = "</a:lnStyleLst>", e[e.length] = "<a:effectStyleLst>", e[e.length] = "<a:effectStyle>", e[e.length] = "<a:effectLst>", e[e.length] = '<a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw>', e[e.length] = "</a:effectLst>", e[e.length] = "</a:effectStyle>", e[e.length] = "<a:effectStyle>", e[e.length] = "<a:effectLst>", e[e.length] = '<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>', e[e.length] = "</a:effectLst>", e[e.length] = "</a:effectStyle>", e[e.length] = "<a:effectStyle>", e[e.length] = "<a:effectLst>", e[e.length] = '<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>', e[e.length] = "</a:effectLst>", e[e.length] = '<a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d>', e[e.length] = '<a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d>', e[e.length] = "</a:effectStyle>", e[e.length] = "</a:effectStyleLst>", e[e.length] = "<a:bgFillStyleLst>", e[e.length] = '<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>', e[e.length] = '<a:gradFill rotWithShape="1">', e[e.length] = "<a:gsLst>", e[e.length] = '<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs>', e[e.length] = '<a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs>', e[e.length] = '<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs>', e[e.length] = "</a:gsLst>", e[e.length] = '<a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path>', e[e.length] = "</a:gradFill>", e[e.length] = '<a:gradFill rotWithShape="1">', e[e.length] = "<a:gsLst>", e[e.length] = '<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs>', e[e.length] = '<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs>', e[e.length] = "</a:gsLst>", e[e.length] = '<a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path>', e[e.length] = "</a:gradFill>", e[e.length] = "</a:bgFillStyleLst>", e[e.length] = "</a:fmtScheme>", e[e.length] = "</a:themeElements>", e[e.length] = "<a:objectDefaults>", e[e.length] = "<a:spDef>", e[e.length] = '<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="1"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="3"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="2"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="lt1"/></a:fontRef></a:style>', e[e.length] = "</a:spDef>", e[e.length] = "<a:lnDef>", e[e.length] = '<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style>', e[e.length] = "</a:lnDef>", e[e.length] = "</a:objectDefaults>", e[e.length] = "<a:extraClrSchemeLst/>", e[e.length] = "</a:theme>", e.join("");
}

function e8(t, r) {
    return {
        flags: t.read_shift(4),
        version: t.read_shift(4),
        name: ia(t, r - 8)
    };
}

function t8(t) {
    var r = Ue(12 + 2 * t.name.length);
    return r.write_shift(4, t.flags), r.write_shift(4, t.version), An(t.name, r), r.slice(0, r.l);
}

function r8(t) {
    for (var r = [], e = t.read_shift(4); e-- > 0;) r.push([t.read_shift(4), t.read_shift(4)]);
    return r;
}

function i8(t) {
    var r = Ue(4 + 8 * t.length);
    r.write_shift(4, t.length);
    for (var e = 0; e < t.length; ++e) r.write_shift(4, t[e][0]), r.write_shift(4, t[e][1]);
    return r;
}

function n8(t, r) {
    var e = Ue(8 + 2 * r.length);
    return e.write_shift(4, t), An(r, e), e.slice(0, e.l);
}

function a8(t) {
    return t.l += 4, t.read_shift(4) != 0;
}

function o8(t, r) {
    var e = Ue(8);
    return e.write_shift(4, t), e.write_shift(4, r ? 1 : 0), e;
}

function s8() {
    var t = ra();
    return Ze(t, 332), Ze(t, 334, Bo(1)), Ze(t, 335, t8({
        name: "XLDAPR",
        version: 12e4,
        flags: 3496657072
    })), Ze(t, 336), Ze(t, 339, n8(1, "XLDAPR")), Ze(t, 52), Ze(t, 35, Bo(514)), Ze(t, 4096, Bo(0)), Ze(t, 4097, uo(1)), Ze(t, 36), Ze(t, 53), Ze(t, 340), Ze(t, 337, o8(1, !0)), Ze(t, 51, i8([
        [1, 0]
    ])), Ze(t, 338), Ze(t, 333), t.end();
}

function l8() {
    var t = [dn];
    return t.push(`<metadata xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:xlrd="http://schemas.microsoft.com/office/spreadsheetml/2017/richdata" xmlns:xda="http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray">
  <metadataTypes count="1">
    <metadataType name="XLDAPR" minSupportedVersion="120000" copy="1" pasteAll="1" pasteValues="1" merge="1" splitFirst="1" rowColShift="1" clearFormats="1" clearComments="1" assign="1" coerce="1" cellMeta="1"/>
  </metadataTypes>
  <futureMetadata name="XLDAPR" count="1">
    <bk>
      <extLst>
        <ext uri="{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}">
          <xda:dynamicArrayProperties fDynamic="1" fCollapsed="0"/>
        </ext>
      </extLst>
    </bk>
  </futureMetadata>
  <cellMetadata count="1">
    <bk>
      <rc t="1" v="0"/>
    </bk>
  </cellMetadata>
</metadata>`), t.join("");
}

function c8(t) {
    var r = {};
    r.i = t.read_shift(4);
    var e = {};
    e.r = t.read_shift(4), e.c = t.read_shift(4), r.r = Bi(e);
    var i = t.read_shift(1);
    return i & 2 && (r.l = "1"), i & 8 && (r.a = "1"), r;
}

function zw(t, r, e) {
    var i = [21600, 21600],
        n = ["m0,0l0", i[1], i[0], i[1], i[0], "0xe"].join(","),
        a = [ut("xml", null, {
            "xmlns:v": Xa.v,
            "xmlns:o": Xa.o,
            "xmlns:x": Xa.x,
            "xmlns:mv": Xa.mv
        }).replace(/\/>/, ">"), ut("o:shapelayout", ut("o:idmap", null, {
            "v:ext": "edit",
            data: t
        }), {
            "v:ext": "edit"
        })],
        o = 65536 * t,
        s = r || [];
    return s.length > 0 && a.push(ut("v:shapetype", [ut("v:stroke", null, {
        joinstyle: "miter"
    }), ut("v:path", null, {
        gradientshapeok: "t",
        "o:connecttype": "rect"
    })].join(""), {
        id: "_x0000_t202",
        coordsize: i.join(","),
        "o:spt": 202,
        path: n
    })), s.forEach(function(l) {
        ++o, a.push(u8(l, o));
    }), a.push("</xml>"), a.join("");
}

function u8(t, r, e) {
    var i = Li(t[0]),
        n = {
            color2: "#BEFF82",
            type: "gradient"
        };
    n.type == "gradient" && (n.angle = "-180");
    var a = n.type == "gradient" ? ut("o:fill", null, {
            type: "gradientUnscaled",
            "v:ext": "view"
        }) : null,
        o = ut("v:fill", a, n),
        s = {
            on: "t",
            obscured: "t"
        };
    return ["<v:shape" + bf({
        id: "_x0000_s" + r,
        type: "#_x0000_t202",
        style: "position:absolute; margin-left:80pt;margin-top:5pt;width:104pt;height:64pt;z-index:10" + (t[1].hidden ? ";visibility:hidden" : ""),
        fillcolor: "#ECFAD4",
        strokecolor: "#edeaa1"
    }) + ">", o, ut("v:shadow", null, s), ut("v:path", null, {
        "o:connecttype": "none"
    }), '<v:textbox><div style="text-align:left"></div></v:textbox>', '<x:ClientData ObjectType="Note">', "<x:MoveWithCells/>", "<x:SizeWithCells/>", Vn("x:Anchor", [i.c + 1, 0, i.r + 1, 0, i.c + 3, 20, i.r + 5, 20].join(",")), Vn("x:AutoFill", "False"), Vn("x:Row", String(i.r)), Vn("x:Column", String(i.c)), t[1].hidden ? "" : "<x:Visible/>", "</x:ClientData>", "</v:shape>"].join("");
}

function f8(t) {
    var r = [dn, ut("comments", null, {
            xmlns: z0[0]
        })],
        e = [];
    return r.push("<authors>"), t.forEach(function(i) {
        i[1].forEach(function(n) {
            var a = kr(n.a);
            e.indexOf(a) == -1 && (e.push(a), r.push("<author>" + a + "</author>")), n.T && n.ID && e.indexOf("tc=" + n.ID) == -1 && (e.push("tc=" + n.ID), r.push("<author>tc=" + n.ID + "</author>"));
        });
    }), e.length == 0 && (e.push("SheetJ5"), r.push("<author>SheetJ5</author>")), r.push("</authors>"), r.push("<commentList>"), t.forEach(function(i) {
        var n = 0,
            a = [],
            o = 0;
        if (i[1][0] && i[1][0].T && i[1][0].ID && (n = e.indexOf("tc=" + i[1][0].ID)), i[1].forEach(function(c) {
                c.a && (n = e.indexOf(kr(c.a))), c.T && ++o, a.push(c.t == null ? "" : kr(c.t));
            }), o === 0) i[1].forEach(function(c) {
            r.push('<comment ref="' + i[0] + '" authorId="' + e.indexOf(kr(c.a)) + '"><text>'), r.push(Vn("t", c.t == null ? "" : kr(c.t))), r.push("</text></comment>");
        });
        else {
            i[1][0] && i[1][0].T && i[1][0].ID && (n = e.indexOf("tc=" + i[1][0].ID)), r.push('<comment ref="' + i[0] + '" authorId="' + n + '"><text>');
            for (var s = `Comment:
    ` + a[0] + `
`, l = 1; l < a.length; ++l) s += `Reply:
    ` + a[l] + `
`;
            r.push(Vn("t", kr(s))), r.push("</text></comment>");
        }
    }), r.push("</commentList>"), r.length > 2 && (r[r.length] = "</comments>", r[1] = r[1].replace("/>", ">")), r.join("");
}

function Ww(t, r, e) {
    var i = [dn, ut("ThreadedComments", null, {
        xmlns: Pn.TCMNT
    }).replace(/[\/]>/, ">")];
    return t.forEach(function(n) {
        var a = "";
        (n[1] || []).forEach(function(o, s) {
            if (!o.T) {
                delete o.ID;
                return;
            }
            o.a && r.indexOf(o.a) == -1 && r.push(o.a);
            var l = {
                ref: n[0],
                id: "{54EE7951-7262-4200-6969-" + ("000000000000" + e.tcid++).slice(-12) + "}"
            };
            s == 0 ? a = l.id : l.parentId = a, o.ID = l.id, o.a && (l.personId = "{54EE7950-7262-4200-6969-" + ("000000000000" + r.indexOf(o.a)).slice(-12) + "}"), i.push(ut("threadedComment", Vn("text", o.t || ""), l));
        });
    }), i.push("</ThreadedComments>"), i.join("");
}

function jw(t) {
    var r = [dn, ut("personList", null, {
        xmlns: Pn.TCMNT,
        "xmlns:x": z0[0]
    }).replace(/[\/]>/, ">")];
    return t.forEach(function(e, i) {
        r.push(ut("person", null, {
            displayName: e,
            id: "{54EE7950-7262-4200-6969-" + ("000000000000" + i).slice(-12) + "}",
            userId: e,
            providerId: "None"
        }));
    }), r.push("</personList>"), r.join("");
}

function h8(t) {
    var r = {};
    r.iauthor = t.read_shift(4);
    var e = Bc(t, 16);
    return r.rfx = e.s, r.ref = Bi(e.s), t.l += 16, r;
}

function d8(t, r) {
    return r == null && (r = Ue(36)), r.write_shift(4, t[1].iauthor), G0(t[0], r), r.write_shift(4, 0), r.write_shift(4, 0), r.write_shift(4, 0), r.write_shift(4, 0), r;
}
var p8 = ia;

function Rb(t) {
    return An(t.slice(0, 54));
}

function m8(t) {
    var r = ra(),
        e = [];
    return Ze(r, 628), Ze(r, 630), t.forEach(function(i) {
        i[1].forEach(function(n) {
            e.indexOf(n.a) > -1 || (e.push(n.a.slice(0, 54)), Ze(r, 632, Rb(n.a)), n.T && n.ID && e.indexOf("tc=" + n.ID) == -1 && (e.push("tc=" + n.ID), Ze(r, 632, Rb("tc=" + n.ID))));
        });
    }), Ze(r, 631), Ze(r, 633), t.forEach(function(i) {
        i[1].forEach(function(n) {
            var a = -1;
            n.ID && (a = e.indexOf("tc=" + n.ID)), a == -1 && i[1][0].T && i[1][0].ID && (a = e.indexOf("tc=" + i[1][0].ID)), a == -1 && (a = e.indexOf(n.a)), n.iauthor = a;
            var o = {
                s: Li(i[0]),
                e: Li(i[0])
            };
            Ze(r, 635, d8([o, n])), n.t && n.t.length > 0 && Ze(r, 637, hD(n)), Ze(r, 636), delete n.iauthor;
        });
    }), Ze(r, 634), Ze(r, 629), r.end();
}

function g8(t, r) {
    r.FullPaths.forEach(function(e, i) {
        if (i != 0) {
            var n = e.replace(/^[\/]*[^\/]*[\/]/, "/_VBA_PROJECT_CUR/");
            n.slice(-1) !== "/" && _i.utils.cfb_add(t, n, r.FileIndex[i].content);
        }
    });
}
var v8 = ["xlsb", "xlsm", "xlam", "biff8", "xla"];
var Mb = function() {
        var t = /(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,
            r = {
                r: 0,
                c: 0
            };

        function e(i, n, a, o) {
            var s = !1,
                l = !1;
            a.length == 0 ? l = !0 : a.charAt(0) == "[" && (l = !0, a = a.slice(1, -1)), o.length == 0 ? s = !0 : o.charAt(0) == "[" && (s = !0, o = o.slice(1, -1));
            var c = a.length > 0 ? parseInt(a, 10) | 0 : 0,
                u = o.length > 0 ? parseInt(o, 10) | 0 : 0;
            return s ? u += r.c : --u, l ? c += r.r : --c, n + (s ? "" : "$") + ui(u) + (l ? "" : "$") + di(c);
        }
        return function(n, a) {
            return r = a, n.replace(t, e);
        };
    }(),
    Up = /(^|[^._A-Z0-9])(\$?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])(\$?)(\d{1,7})(?![_.\(A-Za-z0-9])/g;
try {
    Up = /(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g;
} catch {}
var Vp = function() {
    return function(r, e) {
        return r.replace(Up, function(i, n, a, o, s, l) {
            var c = zg(o) - (a ? 0 : e.c),
                u = Vg(l) - (s ? 0 : e.r),
                h = s == "$" ? u + 1 : u == 0 ? "" : "[" + u + "]",
                d = a == "$" ? c + 1 : c == 0 ? "" : "[" + c + "]";
            return n + "R" + h + "C" + d;
        });
    };
}();

function x8(t, r) {
    return t.replace(Up, function(e, i, n, a, o, s) {
        return i + (n == "$" ? n + a : ui(zg(a) + r.c)) + (o == "$" ? o + s : di(Vg(s) + r.r));
    });
}

function _8(t) {
    return t.length != 1;
}

function ln(t) {
    t.l += 1;
}

function Ll(t, r) {
    var e = t.read_shift(r == 1 ? 1 : 2);
    return [e & 16383, e >> 14 & 1, e >> 15 & 1];
}

function Hw(t, r, e) {
    var i = 2;
    if (e) {
        if (e.biff >= 2 && e.biff <= 5) return Gw(t, r, e);
        e.biff == 12 && (i = 4);
    }
    var n = t.read_shift(i),
        a = t.read_shift(i),
        o = Ll(t, 2),
        s = Ll(t, 2);
    return {
        s: {
            r: n,
            c: o[0],
            cRel: o[1],
            rRel: o[2]
        },
        e: {
            r: a,
            c: s[0],
            cRel: s[1],
            rRel: s[2]
        }
    };
}

function Gw(t) {
    var r = Ll(t, 2),
        e = Ll(t, 2),
        i = t.read_shift(1),
        n = t.read_shift(1);
    return {
        s: {
            r: r[0],
            c: i,
            cRel: r[1],
            rRel: r[2]
        },
        e: {
            r: e[0],
            c: n,
            cRel: e[1],
            rRel: e[2]
        }
    };
}

function y8(t, r, e) {
    if (e.biff < 8) return Gw(t, r, e);
    var i = t.read_shift(e.biff == 12 ? 4 : 2),
        n = t.read_shift(e.biff == 12 ? 4 : 2),
        a = Ll(t, 2),
        o = Ll(t, 2);
    return {
        s: {
            r: i,
            c: a[0],
            cRel: a[1],
            rRel: a[2]
        },
        e: {
            r: n,
            c: o[0],
            cRel: o[1],
            rRel: o[2]
        }
    };
}

function qw(t, r, e) {
    if (e && e.biff >= 2 && e.biff <= 5) return b8(t, r, e);
    var i = t.read_shift(e && e.biff == 12 ? 4 : 2),
        n = Ll(t, 2);
    return {
        r: i,
        c: n[0],
        cRel: n[1],
        rRel: n[2]
    };
}

function b8(t) {
    var r = Ll(t, 2),
        e = t.read_shift(1);
    return {
        r: r[0],
        c: e,
        cRel: r[1],
        rRel: r[2]
    };
}

function w8(t) {
    var r = t.read_shift(2),
        e = t.read_shift(2);
    return {
        r,
        c: e & 255,
        fQuoted: !!(e & 16384),
        cRel: e >> 15,
        rRel: e >> 15
    };
}

function S8(t, r, e) {
    var i = e && e.biff ? e.biff : 8;
    if (i >= 2 && i <= 5) return C8(t, r, e);
    var n = t.read_shift(i >= 12 ? 4 : 2),
        a = t.read_shift(2),
        o = (a & 16384) >> 14,
        s = (a & 32768) >> 15;
    if (a &= 16383, s == 1)
        for (; n > 524287;) n -= 1048576;
    if (o == 1)
        for (; a > 8191;) a = a - 16384;
    return {
        r: n,
        c: a,
        cRel: o,
        rRel: s
    };
}

function C8(t) {
    var r = t.read_shift(2),
        e = t.read_shift(1),
        i = (r & 32768) >> 15,
        n = (r & 16384) >> 14;
    return r &= 16383, i == 1 && r >= 8192 && (r = r - 16384), n == 1 && e >= 128 && (e = e - 256), {
        r,
        c: e,
        cRel: n,
        rRel: i
    };
}

function A8(t, r, e) {
    var i = (t[t.l++] & 96) >> 5,
        n = Hw(t, e.biff >= 2 && e.biff <= 5 ? 6 : 8, e);
    return [i, n];
}

function T8(t, r, e) {
    var i = (t[t.l++] & 96) >> 5,
        n = t.read_shift(2, "i"),
        a = 8;
    if (e) switch (e.biff) {
        case 5:
            t.l += 12, a = 6;
            break;
        case 12:
            a = 12;
            break;
    }
    var o = Hw(t, a, e);
    return [i, n, o];
}

function D8(t, r, e) {
    var i = (t[t.l++] & 96) >> 5;
    return t.l += e && e.biff > 8 ? 12 : e.biff < 8 ? 6 : 8, [i];
}

function k8(t, r, e) {
    var i = (t[t.l++] & 96) >> 5,
        n = t.read_shift(2),
        a = 8;
    if (e) switch (e.biff) {
        case 5:
            t.l += 12, a = 6;
            break;
        case 12:
            a = 12;
            break;
    }
    return t.l += a, [i, n];
}

function F8(t, r, e) {
    var i = (t[t.l++] & 96) >> 5,
        n = y8(t, r - 1, e);
    return [i, n];
}

function E8(t, r, e) {
    var i = (t[t.l++] & 96) >> 5;
    return t.l += e.biff == 2 ? 6 : e.biff == 12 ? 14 : 7, [i];
}

function Bb(t) {
    var r = t[t.l + 1] & 1,
        e = 1;
    return t.l += 4, [r, e];
}

function P8(t, r, e) {
    t.l += 2;
    for (var i = t.read_shift(e && e.biff == 2 ? 1 : 2), n = [], a = 0; a <= i; ++a) n.push(t.read_shift(e && e.biff == 2 ? 1 : 2));
    return n;
}

function I8(t, r, e) {
    var i = t[t.l + 1] & 255 ? 1 : 0;
    return t.l += 2, [i, t.read_shift(e && e.biff == 2 ? 1 : 2)];
}

function O8(t, r, e) {
    var i = t[t.l + 1] & 255 ? 1 : 0;
    return t.l += 2, [i, t.read_shift(e && e.biff == 2 ? 1 : 2)];
}

function N8(t) {
    var r = t[t.l + 1] & 255 ? 1 : 0;
    return t.l += 2, [r, t.read_shift(2)];
}

function L8(t, r, e) {
    var i = t[t.l + 1] & 255 ? 1 : 0;
    return t.l += e && e.biff == 2 ? 3 : 4, [i];
}

function Xw(t) {
    var r = t.read_shift(1),
        e = t.read_shift(1);
    return [r, e];
}

function R8(t) {
    return t.read_shift(2), Xw(t, 2);
}

function M8(t) {
    return t.read_shift(2), Xw(t, 2);
}

function B8(t, r, e) {
    var i = (t[t.l] & 96) >> 5;
    t.l += 1;
    var n = qw(t, 0, e);
    return [i, n];
}

function U8(t, r, e) {
    var i = (t[t.l] & 96) >> 5;
    t.l += 1;
    var n = S8(t, 0, e);
    return [i, n];
}

function V8(t, r, e) {
    var i = (t[t.l] & 96) >> 5;
    t.l += 1;
    var n = t.read_shift(2);
    e && e.biff == 5 && (t.l += 12);
    var a = qw(t, 0, e);
    return [i, n, a];
}

function z8(t, r, e) {
    var i = (t[t.l] & 96) >> 5;
    t.l += 1;
    var n = t.read_shift(e && e.biff <= 3 ? 1 : 2);
    return [QF[n], Zw[n], i];
}

function W8(t, r, e) {
    var i = t[t.l++],
        n = t.read_shift(1),
        a = e && e.biff <= 3 ? [i == 88 ? -1 : 0, t.read_shift(1)] : j8(t);
    return [n, (a[0] === 0 ? Zw : JF)[a[1]]];
}

function j8(t) {
    return [t[t.l + 1] >> 7, t.read_shift(2) & 32767];
}

function H8(t, r, e) {
    t.l += e && e.biff == 2 ? 3 : 4;
}

function G8(t, r, e) {
    if (t.l++, e && e.biff == 12) return [t.read_shift(4, "i"), 0];
    var i = t.read_shift(2),
        n = t.read_shift(e && e.biff == 2 ? 1 : 2);
    return [i, n];
}

function q8(t) {
    return t.l++, xa[t.read_shift(1)];
}

function X8(t) {
    return t.l++, t.read_shift(2);
}

function K8(t) {
    return t.l++, t.read_shift(1) !== 0;
}

function Y8(t) {
    return t.l++, q0(t, 8);
}

function Z8(t, r, e) {
    return t.l++, Pw(t, r - 1, e);
}

function J8(t, r) {
    var e = [t.read_shift(1)];
    if (r == 12) switch (e[0]) {
        case 2:
            e[0] = 4;
            break;
        case 4:
            e[0] = 16;
            break;
        case 0:
            e[0] = 1;
            break;
        case 1:
            e[0] = 2;
            break;
    }
    switch (e[0]) {
        case 4:
            e[1] = RD(t, 1) ? "TRUE" : "FALSE", r != 12 && (t.l += 7);
            break;
        case 37:
        case 16:
            e[1] = xa[t[t.l]], t.l += r == 12 ? 4 : 8;
            break;
        case 0:
            t.l += 8;
            break;
        case 1:
            e[1] = q0(t, 8);
            break;
        case 2:
            e[1] = VD(t, 0, {
                biff: r > 0 && r < 8 ? 2 : r
            });
            break;
        default:
            throw new Error("Bad SerAr: " + e[0]);
    }
    return e;
}

function Q8(t, r, e) {
    for (var i = t.read_shift(e.biff == 12 ? 4 : 2), n = [], a = 0; a != i; ++a) n.push((e.biff == 12 ? Bc : jD)(t, 8));
    return n;
}

function $8(t, r, e) {
    var i = 0,
        n = 0;
    e.biff == 12 ? (i = t.read_shift(4), n = t.read_shift(4)) : (n = 1 + t.read_shift(1), i = 1 + t.read_shift(2)), e.biff >= 2 && e.biff < 8 && (--i, --n == 0 && (n = 256));
    for (var a = 0, o = []; a != i && (o[a] = []); ++a)
        for (var s = 0; s != n; ++s) o[a][s] = J8(t, e.biff);
    return o;
}

function eF(t, r, e) {
    var i = t.read_shift(1) >>> 5 & 3,
        n = !e || e.biff >= 8 ? 4 : 2,
        a = t.read_shift(n);
    switch (e.biff) {
        case 2:
            t.l += 5;
            break;
        case 3:
        case 4:
            t.l += 8;
            break;
        case 5:
            t.l += 12;
            break;
    }
    return [i, 0, a];
}

function tF(t, r, e) {
    if (e.biff == 5) return rF(t, r, e);
    var i = t.read_shift(1) >>> 5 & 3,
        n = t.read_shift(2),
        a = t.read_shift(4);
    return [i, n, a];
}

function rF(t) {
    var r = t.read_shift(1) >>> 5 & 3,
        e = t.read_shift(2, "i");
    t.l += 8;
    var i = t.read_shift(2);
    return t.l += 12, [r, e, i];
}

function iF(t, r, e) {
    var i = t.read_shift(1) >>> 5 & 3;
    t.l += e && e.biff == 2 ? 3 : 4;
    var n = t.read_shift(e && e.biff == 2 ? 1 : 2);
    return [i, n];
}

function nF(t, r, e) {
    var i = t.read_shift(1) >>> 5 & 3,
        n = t.read_shift(e && e.biff == 2 ? 1 : 2);
    return [i, n];
}

function aF(t, r, e) {
    var i = t.read_shift(1) >>> 5 & 3;
    return t.l += 4, e.biff < 8 && t.l--, e.biff == 12 && (t.l += 2), [i];
}

function oF(t, r, e) {
    var i = (t[t.l++] & 96) >> 5,
        n = t.read_shift(2),
        a = 4;
    if (e) switch (e.biff) {
        case 5:
            a = 15;
            break;
        case 12:
            a = 6;
            break;
    }
    return t.l += a, [i, n];
}
var sF = us,
    lF = us,
    cF = us;

function Ff(t, r, e) {
    return t.l += 2, [w8(t, 4, e)];
}

function Xg(t) {
    return t.l += 6, [];
}
var uF = Ff,
    fF = Xg,
    hF = Xg,
    dF = Ff;

function Kw(t) {
    return t.l += 2, [pp(t), t.read_shift(2) & 1];
}
var pF = Ff,
    mF = Kw,
    gF = Xg,
    vF = Ff,
    xF = Ff,
    _F = ["Data", "All", "Headers", "??", "?Data2", "??", "?DataHeaders", "??", "Totals", "??", "??", "??", "?DataTotals", "??", "??", "??", "?Current"];

function yF(t) {
    t.l += 2;
    var r = t.read_shift(2),
        e = t.read_shift(2),
        i = t.read_shift(4),
        n = t.read_shift(2),
        a = t.read_shift(2),
        o = _F[e >> 2 & 31];
    return {
        ixti: r,
        coltype: e & 3,
        rt: o,
        idx: i,
        c: n,
        C: a
    };
}

function bF(t) {
    return t.l += 2, [t.read_shift(4)];
}

function wF(t, r, e) {
    return t.l += 5, t.l += 2, t.l += e.biff == 2 ? 1 : 4, ["PTGSHEET"];
}

function SF(t, r, e) {
    return t.l += e.biff == 2 ? 4 : 5, ["PTGENDSHEET"];
}

function CF(t) {
    var r = t.read_shift(1) >>> 5 & 3,
        e = t.read_shift(2);
    return [r, e];
}

function AF(t) {
    var r = t.read_shift(1) >>> 5 & 3,
        e = t.read_shift(2);
    return [r, e];
}

function TF(t) {
    return t.l += 4, [0, 0];
}
var Ub = {
        1: {
            n: "PtgExp",
            f: G8
        },
        2: {
            n: "PtgTbl",
            f: cF
        },
        3: {
            n: "PtgAdd",
            f: ln
        },
        4: {
            n: "PtgSub",
            f: ln
        },
        5: {
            n: "PtgMul",
            f: ln
        },
        6: {
            n: "PtgDiv",
            f: ln
        },
        7: {
            n: "PtgPower",
            f: ln
        },
        8: {
            n: "PtgConcat",
            f: ln
        },
        9: {
            n: "PtgLt",
            f: ln
        },
        10: {
            n: "PtgLe",
            f: ln
        },
        11: {
            n: "PtgEq",
            f: ln
        },
        12: {
            n: "PtgGe",
            f: ln
        },
        13: {
            n: "PtgGt",
            f: ln
        },
        14: {
            n: "PtgNe",
            f: ln
        },
        15: {
            n: "PtgIsect",
            f: ln
        },
        16: {
            n: "PtgUnion",
            f: ln
        },
        17: {
            n: "PtgRange",
            f: ln
        },
        18: {
            n: "PtgUplus",
            f: ln
        },
        19: {
            n: "PtgUminus",
            f: ln
        },
        20: {
            n: "PtgPercent",
            f: ln
        },
        21: {
            n: "PtgParen",
            f: ln
        },
        22: {
            n: "PtgMissArg",
            f: ln
        },
        23: {
            n: "PtgStr",
            f: Z8
        },
        26: {
            n: "PtgSheet",
            f: wF
        },
        27: {
            n: "PtgEndSheet",
            f: SF
        },
        28: {
            n: "PtgErr",
            f: q8
        },
        29: {
            n: "PtgBool",
            f: K8
        },
        30: {
            n: "PtgInt",
            f: X8
        },
        31: {
            n: "PtgNum",
            f: Y8
        },
        32: {
            n: "PtgArray",
            f: E8
        },
        33: {
            n: "PtgFunc",
            f: z8
        },
        34: {
            n: "PtgFuncVar",
            f: W8
        },
        35: {
            n: "PtgName",
            f: eF
        },
        36: {
            n: "PtgRef",
            f: B8
        },
        37: {
            n: "PtgArea",
            f: A8
        },
        38: {
            n: "PtgMemArea",
            f: iF
        },
        39: {
            n: "PtgMemErr",
            f: sF
        },
        40: {
            n: "PtgMemNoMem",
            f: lF
        },
        41: {
            n: "PtgMemFunc",
            f: nF
        },
        42: {
            n: "PtgRefErr",
            f: aF
        },
        43: {
            n: "PtgAreaErr",
            f: D8
        },
        44: {
            n: "PtgRefN",
            f: U8
        },
        45: {
            n: "PtgAreaN",
            f: F8
        },
        46: {
            n: "PtgMemAreaN",
            f: CF
        },
        47: {
            n: "PtgMemNoMemN",
            f: AF
        },
        57: {
            n: "PtgNameX",
            f: tF
        },
        58: {
            n: "PtgRef3d",
            f: V8
        },
        59: {
            n: "PtgArea3d",
            f: T8
        },
        60: {
            n: "PtgRefErr3d",
            f: oF
        },
        61: {
            n: "PtgAreaErr3d",
            f: k8
        },
        255: {}
    },
    DF = {
        64: 32,
        96: 32,
        65: 33,
        97: 33,
        66: 34,
        98: 34,
        67: 35,
        99: 35,
        68: 36,
        100: 36,
        69: 37,
        101: 37,
        70: 38,
        102: 38,
        71: 39,
        103: 39,
        72: 40,
        104: 40,
        73: 41,
        105: 41,
        74: 42,
        106: 42,
        75: 43,
        107: 43,
        76: 44,
        108: 44,
        77: 45,
        109: 45,
        78: 46,
        110: 46,
        79: 47,
        111: 47,
        88: 34,
        120: 34,
        89: 57,
        121: 57,
        90: 58,
        122: 58,
        91: 59,
        123: 59,
        92: 60,
        124: 60,
        93: 61,
        125: 61
    },
    kF = {
        1: {
            n: "PtgElfLel",
            f: Kw
        },
        2: {
            n: "PtgElfRw",
            f: vF
        },
        3: {
            n: "PtgElfCol",
            f: uF
        },
        6: {
            n: "PtgElfRwV",
            f: xF
        },
        7: {
            n: "PtgElfColV",
            f: dF
        },
        10: {
            n: "PtgElfRadical",
            f: pF
        },
        11: {
            n: "PtgElfRadicalS",
            f: gF
        },
        13: {
            n: "PtgElfColS",
            f: fF
        },
        15: {
            n: "PtgElfColSV",
            f: hF
        },
        16: {
            n: "PtgElfRadicalLel",
            f: mF
        },
        25: {
            n: "PtgList",
            f: yF
        },
        29: {
            n: "PtgSxName",
            f: bF
        },
        255: {}
    },
    FF = {
        0: {
            n: "PtgAttrNoop",
            f: TF
        },
        1: {
            n: "PtgAttrSemi",
            f: L8
        },
        2: {
            n: "PtgAttrIf",
            f: O8
        },
        4: {
            n: "PtgAttrChoose",
            f: P8
        },
        8: {
            n: "PtgAttrGoto",
            f: I8
        },
        16: {
            n: "PtgAttrSum",
            f: H8
        },
        32: {
            n: "PtgAttrBaxcel",
            f: Bb
        },
        33: {
            n: "PtgAttrBaxcel",
            f: Bb
        },
        64: {
            n: "PtgAttrSpace",
            f: R8
        },
        65: {
            n: "PtgAttrSpaceSemi",
            f: M8
        },
        128: {
            n: "PtgAttrIfError",
            f: N8
        },
        255: {}
    };

function EF(t, r, e, i) {
    if (i.biff < 8) return us(t, r);
    for (var n = t.l + r, a = [], o = 0; o !== e.length; ++o) switch (e[o][0]) {
        case "PtgArray":
            e[o][1] = $8(t, 0, i), a.push(e[o][1]);
            break;
        case "PtgMemArea":
            e[o][2] = Q8(t, e[o][1], i), a.push(e[o][2]);
            break;
        case "PtgExp":
            i && i.biff == 12 && (e[o][1][1] = t.read_shift(4), a.push(e[o][1]));
            break;
        case "PtgList":
        case "PtgElfRadicalS":
        case "PtgElfColS":
        case "PtgElfColSV":
            throw "Unsupported " + e[o][0];
        default:
            break;
    }
    return r = n - t.l, r !== 0 && a.push(us(t, r)), a;
}

function PF(t, r, e) {
    for (var i = t.l + r, n, a, o = []; i != t.l;) r = i - t.l, a = t[t.l], n = Ub[a] || Ub[DF[a]], (a === 24 || a === 25) && (n = (a === 24 ? kF : FF)[t[t.l + 1]]), !n || !n.f ? us(t, r) : o.push([n.n, n.f(t, r, e)]);
    return o;
}

function IF(t) {
    for (var r = [], e = 0; e < t.length; ++e) {
        for (var i = t[e], n = [], a = 0; a < i.length; ++a) {
            var o = i[a];
            if (o) switch (o[0]) {
                case 2:
                    n.push('"' + o[1].replace(/"/g, '""') + '"');
                    break;
                default:
                    n.push(o[1]);
            } else n.push("");
        }
        r.push(n.join(","));
    }
    return r.join(";");
}
var OF = {
    PtgAdd: "+",
    PtgConcat: "&",
    PtgDiv: "/",
    PtgEq: "=",
    PtgGe: ">=",
    PtgGt: ">",
    PtgLe: "<=",
    PtgLt: "<",
    PtgMul: "*",
    PtgNe: "<>",
    PtgPower: "^",
    PtgSub: "-"
};

function NF(t, r) {
    var e = t.lastIndexOf("!"),
        i = r.lastIndexOf("!");
    return e == -1 && i == -1 ? t + ":" + r : e > 0 && i > 0 && t.slice(0, e).toLowerCase() == r.slice(0, i).toLowerCase() ? t + ":" + r.slice(i + 1) : (console.error("Cannot hydrate range", t, r), t + ":" + r);
}

function Yw(t, r, e) {
    if (!t) return "SH33TJSERR0";
    if (e.biff > 8 && (!t.XTI || !t.XTI[r])) return t.SheetNames[r];
    if (!t.XTI) return "SH33TJSERR6";
    var i = t.XTI[r];
    if (e.biff < 8) return r > 1e4 && (r -= 65536), r < 0 && (r = -r), r == 0 ? "" : t.XTI[r - 1];
    if (!i) return "SH33TJSERR1";
    var n = "";
    if (e.biff > 8) switch (t[i[0]][0]) {
        case 357:
            return n = i[1] == -1 ? "#REF" : t.SheetNames[i[1]], i[1] == i[2] ? n : n + ":" + t.SheetNames[i[2]];
        case 358:
            return e.SID != null ? t.SheetNames[e.SID] : "SH33TJSSAME" + t[i[0]][0];
        case 355:
        default:
            return "SH33TJSSRC" + t[i[0]][0];
    }
    switch (t[i[0]][0][0]) {
        case 1025:
            return n = i[1] == -1 ? "#REF" : t.SheetNames[i[1]] || "SH33TJSERR3", i[1] == i[2] ? n : n + ":" + t.SheetNames[i[2]];
        case 14849:
            return t[i[0]].slice(1).map(function(a) {
                return a.Name;
            }).join(";;");
        default:
            return t[i[0]][0][3] ? (n = i[1] == -1 ? "#REF" : t[i[0]][0][3][i[1]] || "SH33TJSERR4", i[1] == i[2] ? n : n + ":" + t[i[0]][0][3][i[2]]) : "SH33TJSERR2";
    }
}

function Vb(t, r, e) {
    var i = Yw(t, r, e);
    return i == "#REF" ? i : Sf(i, e);
}

function V0(t, r, e, i, n) {
    var a = n && n.biff || 8,
        o = {
            s: {
                c: 0,
                r: 0
            },
            e: {
                c: 0,
                r: 0
            }
        },
        s = [],
        l, c, u, h = 0,
        d = 0,
        f, m = "";
    if (!t[0] || !t[0][0]) return "";
    for (var _ = -1, x = "", g = 0, b = t[0].length; g < b; ++g) {
        var w = t[0][g];
        switch (w[0]) {
            case "PtgUminus":
                s.push("-" + s.pop());
                break;
            case "PtgUplus":
                s.push("+" + s.pop());
                break;
            case "PtgPercent":
                s.push(s.pop() + "%");
                break;
            case "PtgAdd":
            case "PtgConcat":
            case "PtgDiv":
            case "PtgEq":
            case "PtgGe":
            case "PtgGt":
            case "PtgLe":
            case "PtgLt":
            case "PtgMul":
            case "PtgNe":
            case "PtgPower":
            case "PtgSub":
                if (l = s.pop(), c = s.pop(), _ >= 0) {
                    switch (t[0][_][1][0]) {
                        case 0:
                            x = Ni(" ", t[0][_][1][1]);
                            break;
                        case 1:
                            x = Ni("\r", t[0][_][1][1]);
                            break;
                        default:
                            if (x = "", n.WTF) throw new Error("Unexpected PtgAttrSpaceType " + t[0][_][1][0]);
                    }
                    c = c + x, _ = -1;
                }
                s.push(c + OF[w[0]] + l);
                break;
            case "PtgIsect":
                l = s.pop(), c = s.pop(), s.push(c + " " + l);
                break;
            case "PtgUnion":
                l = s.pop(), c = s.pop(), s.push(c + "," + l);
                break;
            case "PtgRange":
                l = s.pop(), c = s.pop(), s.push(NF(c, l));
                break;
            case "PtgAttrChoose":
                break;
            case "PtgAttrGoto":
                break;
            case "PtgAttrIf":
                break;
            case "PtgAttrIfError":
                break;
            case "PtgRef":
                u = mf(w[1][1], o, n), s.push(gf(u, a));
                break;
            case "PtgRefN":
                u = e ? mf(w[1][1], e, n) : w[1][1], s.push(gf(u, a));
                break;
            case "PtgRef3d":
                h = w[1][1], u = mf(w[1][2], o, n), m = Vb(i, h, n);
                var T = m;
                s.push(m + "!" + gf(u, a));
                break;
            case "PtgFunc":
            case "PtgFuncVar":
                var E = w[1][0],
                    L = w[1][1];
                E || (E = 0), E &= 127;
                var P = E == 0 ? [] : s.slice(-E);
                s.length -= E, L === "User" && (L = P.shift()), s.push(L + "(" + P.join(",") + ")");
                break;
            case "PtgBool":
                s.push(w[1] ? "TRUE" : "FALSE");
                break;
            case "PtgInt":
                s.push(w[1]);
                break;
            case "PtgNum":
                s.push(String(w[1]));
                break;
            case "PtgStr":
                s.push('"' + w[1].replace(/"/g, '""') + '"');
                break;
            case "PtgErr":
                s.push(w[1]);
                break;
            case "PtgAreaN":
                f = bb(w[1][1], e ? {
                    s: e
                } : o, n), s.push(cg(f, n));
                break;
            case "PtgArea":
                f = bb(w[1][1], o, n), s.push(cg(f, n));
                break;
            case "PtgArea3d":
                h = w[1][1], f = w[1][2], m = Vb(i, h, n), s.push(m + "!" + cg(f, n));
                break;
            case "PtgAttrSum":
                s.push("SUM(" + s.pop() + ")");
                break;
            case "PtgAttrBaxcel":
            case "PtgAttrSemi":
                break;
            case "PtgName":
                d = w[1][2];
                var k = (i.names || [])[d - 1] || (i[0] || [])[d],
                    A = k ? k.Name : "SH33TJSNAME" + String(d);
                A && A.slice(0, 6) == "_xlfn." && !n.xlfn && (A = A.slice(6)), s.push(A);
                break;
            case "PtgNameX":
                var N = w[1][1];
                d = w[1][2];
                var C;
                if (n.biff <= 5) N < 0 && (N = -N), i[N] && (C = i[N][d]);
                else {
                    var F = "";
                    if (((i[N] || [])[0] || [])[0] == 14849 || (((i[N] || [])[0] || [])[0] == 1025 ? i[N][d] && i[N][d].itab > 0 && (F = i.SheetNames[i[N][d].itab - 1] + "!") : F = i.SheetNames[d - 1] + "!"), i[N] && i[N][d]) F += i[N][d].Name;
                    else if (i[0] && i[0][d]) F += i[0][d].Name;
                    else {
                        var W = (Yw(i, N, n) || "").split(";;");
                        W[d - 1] ? F = W[d - 1] : F += "SH33TJSERRX";
                    }
                    s.push(F);
                    break;
                }
                C || (C = {
                    Name: "SH33TJSERRY"
                }), s.push(C.Name);
                break;
            case "PtgParen":
                var I = "(",
                    U = ")";
                if (_ >= 0) {
                    switch (x = "", t[0][_][1][0]) {
                        case 2:
                            I = Ni(" ", t[0][_][1][1]) + I;
                            break;
                        case 3:
                            I = Ni("\r", t[0][_][1][1]) + I;
                            break;
                        case 4:
                            U = Ni(" ", t[0][_][1][1]) + U;
                            break;
                        case 5:
                            U = Ni("\r", t[0][_][1][1]) + U;
                            break;
                        default:
                            if (n.WTF) throw new Error("Unexpected PtgAttrSpaceType " + t[0][_][1][0]);
                    }
                    _ = -1;
                }
                s.push(I + s.pop() + U);
                break;
            case "PtgRefErr":
                s.push("#REF!");
                break;
            case "PtgRefErr3d":
                s.push("#REF!");
                break;
            case "PtgExp":
                u = {
                    c: w[1][1],
                    r: w[1][0]
                };
                var le = {
                    c: e.c,
                    r: e.r
                };
                if (i.sharedf[Bi(u)]) {
                    var H = i.sharedf[Bi(u)];
                    s.push(V0(H, o, le, i, n));
                } else {
                    var pe = !1;
                    for (l = 0; l != i.arrayf.length; ++l)
                        if (c = i.arrayf[l], !(u.c < c[0].s.c || u.c > c[0].e.c) && !(u.r < c[0].s.r || u.r > c[0].e.r)) {
                            s.push(V0(c[1], o, le, i, n)), pe = !0;
                            break;
                        }
                    pe || s.push(w[1]);
                }
                break;
            case "PtgArray":
                s.push("{" + IF(w[1]) + "}");
                break;
            case "PtgMemArea":
                break;
            case "PtgAttrSpace":
            case "PtgAttrSpaceSemi":
                _ = g;
                break;
            case "PtgTbl":
                break;
            case "PtgMemErr":
                break;
            case "PtgMissArg":
                s.push("");
                break;
            case "PtgAreaErr":
                s.push("#REF!");
                break;
            case "PtgAreaErr3d":
                s.push("#REF!");
                break;
            case "PtgList":
                s.push("Table" + w[1].idx + "[#" + w[1].rt + "]");
                break;
            case "PtgMemAreaN":
            case "PtgMemNoMemN":
            case "PtgAttrNoop":
            case "PtgSheet":
            case "PtgEndSheet":
                break;
            case "PtgMemFunc":
                break;
            case "PtgMemNoMem":
                break;
            case "PtgElfCol":
            case "PtgElfColS":
            case "PtgElfColSV":
            case "PtgElfColV":
            case "PtgElfLel":
            case "PtgElfRadical":
            case "PtgElfRadicalLel":
            case "PtgElfRadicalS":
            case "PtgElfRw":
            case "PtgElfRwV":
                throw new Error("Unsupported ELFs");
            case "PtgSxName":
                throw new Error("Unrecognized Formula Token: " + String(w));
            default:
                throw new Error("Unrecognized Formula Token: " + String(w));
        }
        var _e = ["PtgAttrSpace", "PtgAttrSpaceSemi", "PtgAttrGoto"];
        if (n.biff != 3 && _ >= 0 && _e.indexOf(t[0][g][0]) == -1) {
            w = t[0][_];
            var Fe = !0;
            switch (w[1][0]) {
                case 4:
                    Fe = !1;
                case 0:
                    x = Ni(" ", w[1][1]);
                    break;
                case 5:
                    Fe = !1;
                case 1:
                    x = Ni("\r", w[1][1]);
                    break;
                default:
                    if (x = "", n.WTF) throw new Error("Unexpected PtgAttrSpaceType " + w[1][0]);
            }
            s.push((Fe ? x : "") + s.pop() + (Fe ? "" : x)), _ = -1;
        }
    }
    if (s.length > 1 && n.WTF) throw new Error("bad formula stack");
    return s[0] == "TRUE" ? !0 : s[0] == "FALSE" ? !1 : s[0];
}

function LF(t) {
    if (t == null) {
        var r = Ue(8);
        return r.write_shift(1, 3), r.write_shift(1, 0), r.write_shift(2, 0), r.write_shift(2, 0), r.write_shift(2, 65535), r;
    } else if (typeof t == "number") return Oc(t);
    return Oc(0);
}

function RF(t, r, e, i, n) {
    var a = Nc(r, e, n),
        o = LF(t.v),
        s = Ue(6),
        l = 33;
    s.write_shift(2, l), s.write_shift(4, 0);
    for (var c = Ue(t.bf.length), u = 0; u < t.bf.length; ++u) c[u] = t.bf[u];
    var h = un([a, o, s, c]);
    return h;
}

function zp(t, r, e) {
    var i = t.read_shift(4),
        n = PF(t, i, e),
        a = t.read_shift(4),
        o = a > 0 ? EF(t, a, n, e) : null;
    return [n, o];
}
var MF = zp,
    Wp = zp,
    BF = zp,
    UF = zp;

function zb(t) {
    if ((t | 0) == t && t < Math.pow(2, 16) && t >= 0) {
        var r = Ue(11);
        return r.write_shift(4, 3), r.write_shift(1, 30), r.write_shift(2, t), r.write_shift(4, 0), r;
    }
    var e = Ue(17);
    return e.write_shift(4, 11), e.write_shift(1, 31), e.write_shift(8, t), e.write_shift(4, 0), e;
}

function VF(t) {
    var r = Ue(10);
    return r.write_shift(4, 2), r.write_shift(1, 28), r.write_shift(1, t), r.write_shift(4, 0), r;
}

function zF(t) {
    var r = Ue(10);
    return r.write_shift(4, 2), r.write_shift(1, 29), r.write_shift(1, t ? 1 : 0), r.write_shift(4, 0), r;
}

function WF(t) {
    var r = Ue(7);
    r.write_shift(4, 3 + 2 * t.length), r.write_shift(1, 23), r.write_shift(2, t.length);
    var e = Ue(2 * t.length);
    e.write_shift(2 * t.length, t, "utf16le");
    var i = Ue(4);
    return i.write_shift(4, 0), un([r, e, i]);
}

function jF(t) {
    var r = Li(t),
        e = Ue(15);
    return e.write_shift(4, 7), e.write_shift(1, 36), e.write_shift(4, r.r), e.write_shift(2, r.c | (t.charAt(0) == "$" ? 0 : 1) << 14 | (t.match(/\$\d/) ? 0 : 1) << 15), e.write_shift(4, 0), e;
}

function HF(t, r) {
    var e = t.lastIndexOf("!"),
        i = t.slice(0, e);
    t = t.slice(e + 1);
    var n = Li(t);
    i.charAt(0) == "'" && (i = i.slice(1, -1).replace(/''/g, "'"));
    var a = Ue(17);
    return a.write_shift(4, 9), a.write_shift(1, 58), a.write_shift(2, 2 + r.SheetNames.map(function(o) {
        return o.toLowerCase();
    }).indexOf(i.toLowerCase())), a.write_shift(4, n.r), a.write_shift(2, n.c | (t.charAt(0) == "$" ? 0 : 1) << 14 | (t.match(/\$\d/) ? 0 : 1) << 15), a.write_shift(4, 0), a;
}

function GF(t, r) {
    var e = t.lastIndexOf("!"),
        i = t.slice(0, e);
    t = t.slice(e + 1), i.charAt(0) == "'" && (i = i.slice(1, -1).replace(/''/g, "'"));
    var n = Ue(17);
    return n.write_shift(4, 9), n.write_shift(1, 60), n.write_shift(2, 2 + r.SheetNames.map(function(a) {
        return a.toLowerCase();
    }).indexOf(i.toLowerCase())), n.write_shift(4, 0), n.write_shift(2, 0), n.write_shift(4, 0), n;
}

function qF(t) {
    var r = t.split(":"),
        e = r[0],
        i = Ue(23);
    i.write_shift(4, 15), e = r[0];
    var n = Li(e);
    return i.write_shift(1, 36), i.write_shift(4, n.r), i.write_shift(2, n.c | (e.charAt(0) == "$" ? 0 : 1) << 14 | (e.match(/\$\d/) ? 0 : 1) << 15), i.write_shift(4, 0), e = r[1], n = Li(e), i.write_shift(1, 36), i.write_shift(4, n.r), i.write_shift(2, n.c | (e.charAt(0) == "$" ? 0 : 1) << 14 | (e.match(/\$\d/) ? 0 : 1) << 15), i.write_shift(4, 0), i.write_shift(1, 17), i.write_shift(4, 0), i;
}

function XF(t, r) {
    var e = t.lastIndexOf("!"),
        i = t.slice(0, e);
    t = t.slice(e + 1), i.charAt(0) == "'" && (i = i.slice(1, -1).replace(/''/g, "'"));
    var n = t.split(":"),
        a = Ue(27);
    a.write_shift(4, 19);
    var o = n[0],
        s = Li(o);
    return a.write_shift(1, 58), a.write_shift(2, 2 + r.SheetNames.map(function(l) {
        return l.toLowerCase();
    }).indexOf(i.toLowerCase())), a.write_shift(4, s.r), a.write_shift(2, s.c | (o.charAt(0) == "$" ? 0 : 1) << 14 | (o.match(/\$\d/) ? 0 : 1) << 15), o = n[1], s = Li(o), a.write_shift(1, 58), a.write_shift(2, 2 + r.SheetNames.map(function(l) {
        return l.toLowerCase();
    }).indexOf(i.toLowerCase())), a.write_shift(4, s.r), a.write_shift(2, s.c | (o.charAt(0) == "$" ? 0 : 1) << 14 | (o.match(/\$\d/) ? 0 : 1) << 15), a.write_shift(1, 17), a.write_shift(4, 0), a;
}

function KF(t, r) {
    var e = t.lastIndexOf("!"),
        i = t.slice(0, e);
    t = t.slice(e + 1), i.charAt(0) == "'" && (i = i.slice(1, -1).replace(/''/g, "'"));
    var n = zn(t),
        a = Ue(23);
    return a.write_shift(4, 15), a.write_shift(1, 59), a.write_shift(2, 2 + r.SheetNames.map(function(o) {
        return o.toLowerCase();
    }).indexOf(i.toLowerCase())), a.write_shift(4, n.s.r), a.write_shift(4, n.e.r), a.write_shift(2, n.s.c), a.write_shift(2, n.e.c), a.write_shift(4, 0), a;
}

function YF(t, r) {
    if (typeof t == "number") return zb(t);
    if (typeof t == "boolean") return zF(t);
    if (/^#(DIV\/0!|GETTING_DATA|N\/A|NAME\?|NULL!|NUM!|REF!|VALUE!)$/.test(t)) return VF(+cs[t]);
    if (t.match(/^\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/)) return jF(t);
    if (t.match(/^\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/)) return qF(t);
    if (t.match(/^#REF!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/)) return KF(t, r);
    if (t.match(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/)) return HF(t, r);
    if (t.match(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/)) return XF(t, r);
    if (/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!#REF!$/.test(t)) return GF(t, r);
    if (/^".*"$/.test(t)) return WF(t);
    if (/^[+-]\d+$/.test(t)) return zb(parseInt(t, 10));
    throw "Formula |" + t + "| not supported for XLSB";
}
var ZF = YF,
    JF = {
        0: "BEEP",
        1: "OPEN",
        2: "OPEN.LINKS",
        3: "CLOSE.ALL",
        4: "SAVE",
        5: "SAVE.AS",
        6: "FILE.DELETE",
        7: "PAGE.SETUP",
        8: "PRINT",
        9: "PRINTER.SETUP",
        10: "QUIT",
        11: "NEW.WINDOW",
        12: "ARRANGE.ALL",
        13: "WINDOW.SIZE",
        14: "WINDOW.MOVE",
        15: "FULL",
        16: "CLOSE",
        17: "RUN",
        22: "SET.PRINT.AREA",
        23: "SET.PRINT.TITLES",
        24: "SET.PAGE.BREAK",
        25: "REMOVE.PAGE.BREAK",
        26: "FONT",
        27: "DISPLAY",
        28: "PROTECT.DOCUMENT",
        29: "PRECISION",
        30: "A1.R1C1",
        31: "CALCULATE.NOW",
        32: "CALCULATION",
        34: "DATA.FIND",
        35: "EXTRACT",
        36: "DATA.DELETE",
        37: "SET.DATABASE",
        38: "SET.CRITERIA",
        39: "SORT",
        40: "DATA.SERIES",
        41: "TABLE",
        42: "FORMAT.NUMBER",
        43: "ALIGNMENT",
        44: "STYLE",
        45: "BORDER",
        46: "CELL.PROTECTION",
        47: "COLUMN.WIDTH",
        48: "UNDO",
        49: "CUT",
        50: "COPY",
        51: "PASTE",
        52: "CLEAR",
        53: "PASTE.SPECIAL",
        54: "EDIT.DELETE",
        55: "INSERT",
        56: "FILL.RIGHT",
        57: "FILL.DOWN",
        61: "DEFINE.NAME",
        62: "CREATE.NAMES",
        63: "FORMULA.GOTO",
        64: "FORMULA.FIND",
        65: "SELECT.LAST.CELL",
        66: "SHOW.ACTIVE.CELL",
        67: "GALLERY.AREA",
        68: "GALLERY.BAR",
        69: "GALLERY.COLUMN",
        70: "GALLERY.LINE",
        71: "GALLERY.PIE",
        72: "GALLERY.SCATTER",
        73: "COMBINATION",
        74: "PREFERRED",
        75: "ADD.OVERLAY",
        76: "GRIDLINES",
        77: "SET.PREFERRED",
        78: "AXES",
        79: "LEGEND",
        80: "ATTACH.TEXT",
        81: "ADD.ARROW",
        82: "SELECT.CHART",
        83: "SELECT.PLOT.AREA",
        84: "PATTERNS",
        85: "MAIN.CHART",
        86: "OVERLAY",
        87: "SCALE",
        88: "FORMAT.LEGEND",
        89: "FORMAT.TEXT",
        90: "EDIT.REPEAT",
        91: "PARSE",
        92: "JUSTIFY",
        93: "HIDE",
        94: "UNHIDE",
        95: "WORKSPACE",
        96: "FORMULA",
        97: "FORMULA.FILL",
        98: "FORMULA.ARRAY",
        99: "DATA.FIND.NEXT",
        100: "DATA.FIND.PREV",
        101: "FORMULA.FIND.NEXT",
        102: "FORMULA.FIND.PREV",
        103: "ACTIVATE",
        104: "ACTIVATE.NEXT",
        105: "ACTIVATE.PREV",
        106: "UNLOCKED.NEXT",
        107: "UNLOCKED.PREV",
        108: "COPY.PICTURE",
        109: "SELECT",
        110: "DELETE.NAME",
        111: "DELETE.FORMAT",
        112: "VLINE",
        113: "HLINE",
        114: "VPAGE",
        115: "HPAGE",
        116: "VSCROLL",
        117: "HSCROLL",
        118: "ALERT",
        119: "NEW",
        120: "CANCEL.COPY",
        121: "SHOW.CLIPBOARD",
        122: "MESSAGE",
        124: "PASTE.LINK",
        125: "APP.ACTIVATE",
        126: "DELETE.ARROW",
        127: "ROW.HEIGHT",
        128: "FORMAT.MOVE",
        129: "FORMAT.SIZE",
        130: "FORMULA.REPLACE",
        131: "SEND.KEYS",
        132: "SELECT.SPECIAL",
        133: "APPLY.NAMES",
        134: "REPLACE.FONT",
        135: "FREEZE.PANES",
        136: "SHOW.INFO",
        137: "SPLIT",
        138: "ON.WINDOW",
        139: "ON.DATA",
        140: "DISABLE.INPUT",
        142: "OUTLINE",
        143: "LIST.NAMES",
        144: "FILE.CLOSE",
        145: "SAVE.WORKBOOK",
        146: "DATA.FORM",
        147: "COPY.CHART",
        148: "ON.TIME",
        149: "WAIT",
        150: "FORMAT.FONT",
        151: "FILL.UP",
        152: "FILL.LEFT",
        153: "DELETE.OVERLAY",
        155: "SHORT.MENUS",
        159: "SET.UPDATE.STATUS",
        161: "COLOR.PALETTE",
        162: "DELETE.STYLE",
        163: "WINDOW.RESTORE",
        164: "WINDOW.MAXIMIZE",
        166: "CHANGE.LINK",
        167: "CALCULATE.DOCUMENT",
        168: "ON.KEY",
        169: "APP.RESTORE",
        170: "APP.MOVE",
        171: "APP.SIZE",
        172: "APP.MINIMIZE",
        173: "APP.MAXIMIZE",
        174: "BRING.TO.FRONT",
        175: "SEND.TO.BACK",
        185: "MAIN.CHART.TYPE",
        186: "OVERLAY.CHART.TYPE",
        187: "SELECT.END",
        188: "OPEN.MAIL",
        189: "SEND.MAIL",
        190: "STANDARD.FONT",
        191: "CONSOLIDATE",
        192: "SORT.SPECIAL",
        193: "GALLERY.3D.AREA",
        194: "GALLERY.3D.COLUMN",
        195: "GALLERY.3D.LINE",
        196: "GALLERY.3D.PIE",
        197: "VIEW.3D",
        198: "GOAL.SEEK",
        199: "WORKGROUP",
        200: "FILL.GROUP",
        201: "UPDATE.LINK",
        202: "PROMOTE",
        203: "DEMOTE",
        204: "SHOW.DETAIL",
        206: "UNGROUP",
        207: "OBJECT.PROPERTIES",
        208: "SAVE.NEW.OBJECT",
        209: "SHARE",
        210: "SHARE.NAME",
        211: "DUPLICATE",
        212: "APPLY.STYLE",
        213: "ASSIGN.TO.OBJECT",
        214: "OBJECT.PROTECTION",
        215: "HIDE.OBJECT",
        216: "SET.EXTRACT",
        217: "CREATE.PUBLISHER",
        218: "SUBSCRIBE.TO",
        219: "ATTRIBUTES",
        220: "SHOW.TOOLBAR",
        222: "PRINT.PREVIEW",
        223: "EDIT.COLOR",
        224: "SHOW.LEVELS",
        225: "FORMAT.MAIN",
        226: "FORMAT.OVERLAY",
        227: "ON.RECALC",
        228: "EDIT.SERIES",
        229: "DEFINE.STYLE",
        240: "LINE.PRINT",
        243: "ENTER.DATA",
        249: "GALLERY.RADAR",
        250: "MERGE.STYLES",
        251: "EDITION.OPTIONS",
        252: "PASTE.PICTURE",
        253: "PASTE.PICTURE.LINK",
        254: "SPELLING",
        256: "ZOOM",
        259: "INSERT.OBJECT",
        260: "WINDOW.MINIMIZE",
        265: "SOUND.NOTE",
        266: "SOUND.PLAY",
        267: "FORMAT.SHAPE",
        268: "EXTEND.POLYGON",
        269: "FORMAT.AUTO",
        272: "GALLERY.3D.BAR",
        273: "GALLERY.3D.SURFACE",
        274: "FILL.AUTO",
        276: "CUSTOMIZE.TOOLBAR",
        277: "ADD.TOOL",
        278: "EDIT.OBJECT",
        279: "ON.DOUBLECLICK",
        280: "ON.ENTRY",
        281: "WORKBOOK.ADD",
        282: "WORKBOOK.MOVE",
        283: "WORKBOOK.COPY",
        284: "WORKBOOK.OPTIONS",
        285: "SAVE.WORKSPACE",
        288: "CHART.WIZARD",
        289: "DELETE.TOOL",
        290: "MOVE.TOOL",
        291: "WORKBOOK.SELECT",
        292: "WORKBOOK.ACTIVATE",
        293: "ASSIGN.TO.TOOL",
        295: "COPY.TOOL",
        296: "RESET.TOOL",
        297: "CONSTRAIN.NUMERIC",
        298: "PASTE.TOOL",
        302: "WORKBOOK.NEW",
        305: "SCENARIO.CELLS",
        306: "SCENARIO.DELETE",
        307: "SCENARIO.ADD",
        308: "SCENARIO.EDIT",
        309: "SCENARIO.SHOW",
        310: "SCENARIO.SHOW.NEXT",
        311: "SCENARIO.SUMMARY",
        312: "PIVOT.TABLE.WIZARD",
        313: "PIVOT.FIELD.PROPERTIES",
        314: "PIVOT.FIELD",
        315: "PIVOT.ITEM",
        316: "PIVOT.ADD.FIELDS",
        318: "OPTIONS.CALCULATION",
        319: "OPTIONS.EDIT",
        320: "OPTIONS.VIEW",
        321: "ADDIN.MANAGER",
        322: "MENU.EDITOR",
        323: "ATTACH.TOOLBARS",
        324: "VBAActivate",
        325: "OPTIONS.CHART",
        328: "VBA.INSERT.FILE",
        330: "VBA.PROCEDURE.DEFINITION",
        336: "ROUTING.SLIP",
        338: "ROUTE.DOCUMENT",
        339: "MAIL.LOGON",
        342: "INSERT.PICTURE",
        343: "EDIT.TOOL",
        344: "GALLERY.DOUGHNUT",
        350: "CHART.TREND",
        352: "PIVOT.ITEM.PROPERTIES",
        354: "WORKBOOK.INSERT",
        355: "OPTIONS.TRANSITION",
        356: "OPTIONS.GENERAL",
        370: "FILTER.ADVANCED",
        373: "MAIL.ADD.MAILER",
        374: "MAIL.DELETE.MAILER",
        375: "MAIL.REPLY",
        376: "MAIL.REPLY.ALL",
        377: "MAIL.FORWARD",
        378: "MAIL.NEXT.LETTER",
        379: "DATA.LABEL",
        380: "INSERT.TITLE",
        381: "FONT.PROPERTIES",
        382: "MACRO.OPTIONS",
        383: "WORKBOOK.HIDE",
        384: "WORKBOOK.UNHIDE",
        385: "WORKBOOK.DELETE",
        386: "WORKBOOK.NAME",
        388: "GALLERY.CUSTOM",
        390: "ADD.CHART.AUTOFORMAT",
        391: "DELETE.CHART.AUTOFORMAT",
        392: "CHART.ADD.DATA",
        393: "AUTO.OUTLINE",
        394: "TAB.ORDER",
        395: "SHOW.DIALOG",
        396: "SELECT.ALL",
        397: "UNGROUP.SHEETS",
        398: "SUBTOTAL.CREATE",
        399: "SUBTOTAL.REMOVE",
        400: "RENAME.OBJECT",
        412: "WORKBOOK.SCROLL",
        413: "WORKBOOK.NEXT",
        414: "WORKBOOK.PREV",
        415: "WORKBOOK.TAB.SPLIT",
        416: "FULL.SCREEN",
        417: "WORKBOOK.PROTECT",
        420: "SCROLLBAR.PROPERTIES",
        421: "PIVOT.SHOW.PAGES",
        422: "TEXT.TO.COLUMNS",
        423: "FORMAT.CHARTTYPE",
        424: "LINK.FORMAT",
        425: "TRACER.DISPLAY",
        430: "TRACER.NAVIGATE",
        431: "TRACER.CLEAR",
        432: "TRACER.ERROR",
        433: "PIVOT.FIELD.GROUP",
        434: "PIVOT.FIELD.UNGROUP",
        435: "CHECKBOX.PROPERTIES",
        436: "LABEL.PROPERTIES",
        437: "LISTBOX.PROPERTIES",
        438: "EDITBOX.PROPERTIES",
        439: "PIVOT.REFRESH",
        440: "LINK.COMBO",
        441: "OPEN.TEXT",
        442: "HIDE.DIALOG",
        443: "SET.DIALOG.FOCUS",
        444: "ENABLE.OBJECT",
        445: "PUSHBUTTON.PROPERTIES",
        446: "SET.DIALOG.DEFAULT",
        447: "FILTER",
        448: "FILTER.SHOW.ALL",
        449: "CLEAR.OUTLINE",
        450: "FUNCTION.WIZARD",
        451: "ADD.LIST.ITEM",
        452: "SET.LIST.ITEM",
        453: "REMOVE.LIST.ITEM",
        454: "SELECT.LIST.ITEM",
        455: "SET.CONTROL.VALUE",
        456: "SAVE.COPY.AS",
        458: "OPTIONS.LISTS.ADD",
        459: "OPTIONS.LISTS.DELETE",
        460: "SERIES.AXES",
        461: "SERIES.X",
        462: "SERIES.Y",
        463: "ERRORBAR.X",
        464: "ERRORBAR.Y",
        465: "FORMAT.CHART",
        466: "SERIES.ORDER",
        467: "MAIL.LOGOFF",
        468: "CLEAR.ROUTING.SLIP",
        469: "APP.ACTIVATE.MICROSOFT",
        470: "MAIL.EDIT.MAILER",
        471: "ON.SHEET",
        472: "STANDARD.WIDTH",
        473: "SCENARIO.MERGE",
        474: "SUMMARY.INFO",
        475: "FIND.FILE",
        476: "ACTIVE.CELL.FONT",
        477: "ENABLE.TIPWIZARD",
        478: "VBA.MAKE.ADDIN",
        480: "INSERTDATATABLE",
        481: "WORKGROUP.OPTIONS",
        482: "MAIL.SEND.MAILER",
        485: "AUTOCORRECT",
        489: "POST.DOCUMENT",
        491: "PICKLIST",
        493: "VIEW.SHOW",
        494: "VIEW.DEFINE",
        495: "VIEW.DELETE",
        509: "SHEET.BACKGROUND",
        510: "INSERT.MAP.OBJECT",
        511: "OPTIONS.MENONO",
        517: "MSOCHECKS",
        518: "NORMAL",
        519: "LAYOUT",
        520: "RM.PRINT.AREA",
        521: "CLEAR.PRINT.AREA",
        522: "ADD.PRINT.AREA",
        523: "MOVE.BRK",
        545: "HIDECURR.NOTE",
        546: "HIDEALL.NOTES",
        547: "DELETE.NOTE",
        548: "TRAVERSE.NOTES",
        549: "ACTIVATE.NOTES",
        620: "PROTECT.REVISIONS",
        621: "UNPROTECT.REVISIONS",
        647: "OPTIONS.ME",
        653: "WEB.PUBLISH",
        667: "NEWWEBQUERY",
        673: "PIVOT.TABLE.CHART",
        753: "OPTIONS.SAVE",
        755: "OPTIONS.SPELL",
        808: "HIDEALL.INKANNOTS"
    },
    Zw = {
        0: "COUNT",
        1: "IF",
        2: "ISNA",
        3: "ISERROR",
        4: "SUM",
        5: "AVERAGE",
        6: "MIN",
        7: "MAX",
        8: "ROW",
        9: "COLUMN",
        10: "NA",
        11: "NPV",
        12: "STDEV",
        13: "DOLLAR",
        14: "FIXED",
        15: "SIN",
        16: "COS",
        17: "TAN",
        18: "ATAN",
        19: "PI",
        20: "SQRT",
        21: "EXP",
        22: "LN",
        23: "LOG10",
        24: "ABS",
        25: "INT",
        26: "SIGN",
        27: "ROUND",
        28: "LOOKUP",
        29: "INDEX",
        30: "REPT",
        31: "MID",
        32: "LEN",
        33: "VALUE",
        34: "TRUE",
        35: "FALSE",
        36: "AND",
        37: "OR",
        38: "NOT",
        39: "MOD",
        40: "DCOUNT",
        41: "DSUM",
        42: "DAVERAGE",
        43: "DMIN",
        44: "DMAX",
        45: "DSTDEV",
        46: "VAR",
        47: "DVAR",
        48: "TEXT",
        49: "LINEST",
        50: "TREND",
        51: "LOGEST",
        52: "GROWTH",
        53: "GOTO",
        54: "HALT",
        55: "RETURN",
        56: "PV",
        57: "FV",
        58: "NPER",
        59: "PMT",
        60: "RATE",
        61: "MIRR",
        62: "IRR",
        63: "RAND",
        64: "MATCH",
        65: "DATE",
        66: "TIME",
        67: "DAY",
        68: "MONTH",
        69: "YEAR",
        70: "WEEKDAY",
        71: "HOUR",
        72: "MINUTE",
        73: "SECOND",
        74: "NOW",
        75: "AREAS",
        76: "ROWS",
        77: "COLUMNS",
        78: "OFFSET",
        79: "ABSREF",
        80: "RELREF",
        81: "ARGUMENT",
        82: "SEARCH",
        83: "TRANSPOSE",
        84: "ERROR",
        85: "STEP",
        86: "TYPE",
        87: "ECHO",
        88: "SET.NAME",
        89: "CALLER",
        90: "DEREF",
        91: "WINDOWS",
        92: "SERIES",
        93: "DOCUMENTS",
        94: "ACTIVE.CELL",
        95: "SELECTION",
        96: "RESULT",
        97: "ATAN2",
        98: "ASIN",
        99: "ACOS",
        100: "CHOOSE",
        101: "HLOOKUP",
        102: "VLOOKUP",
        103: "LINKS",
        104: "INPUT",
        105: "ISREF",
        106: "GET.FORMULA",
        107: "GET.NAME",
        108: "SET.VALUE",
        109: "LOG",
        110: "EXEC",
        111: "CHAR",
        112: "LOWER",
        113: "UPPER",
        114: "PROPER",
        115: "LEFT",
        116: "RIGHT",
        117: "EXACT",
        118: "TRIM",
        119: "REPLACE",
        120: "SUBSTITUTE",
        121: "CODE",
        122: "NAMES",
        123: "DIRECTORY",
        124: "FIND",
        125: "CELL",
        126: "ISERR",
        127: "ISTEXT",
        128: "ISNUMBER",
        129: "ISBLANK",
        130: "T",
        131: "N",
        132: "FOPEN",
        133: "FCLOSE",
        134: "FSIZE",
        135: "FREADLN",
        136: "FREAD",
        137: "FWRITELN",
        138: "FWRITE",
        139: "FPOS",
        140: "DATEVALUE",
        141: "TIMEVALUE",
        142: "SLN",
        143: "SYD",
        144: "DDB",
        145: "GET.DEF",
        146: "REFTEXT",
        147: "TEXTREF",
        148: "INDIRECT",
        149: "REGISTER",
        150: "CALL",
        151: "ADD.BAR",
        152: "ADD.MENU",
        153: "ADD.COMMAND",
        154: "ENABLE.COMMAND",
        155: "CHECK.COMMAND",
        156: "RENAME.COMMAND",
        157: "SHOW.BAR",
        158: "DELETE.MENU",
        159: "DELETE.COMMAND",
        160: "GET.CHART.ITEM",
        161: "DIALOG.BOX",
        162: "CLEAN",
        163: "MDETERM",
        164: "MINVERSE",
        165: "MMULT",
        166: "FILES",
        167: "IPMT",
        168: "PPMT",
        169: "COUNTA",
        170: "CANCEL.KEY",
        171: "FOR",
        172: "WHILE",
        173: "BREAK",
        174: "NEXT",
        175: "INITIATE",
        176: "REQUEST",
        177: "POKE",
        178: "EXECUTE",
        179: "TERMINATE",
        180: "RESTART",
        181: "HELP",
        182: "GET.BAR",
        183: "PRODUCT",
        184: "FACT",
        185: "GET.CELL",
        186: "GET.WORKSPACE",
        187: "GET.WINDOW",
        188: "GET.DOCUMENT",
        189: "DPRODUCT",
        190: "ISNONTEXT",
        191: "GET.NOTE",
        192: "NOTE",
        193: "STDEVP",
        194: "VARP",
        195: "DSTDEVP",
        196: "DVARP",
        197: "TRUNC",
        198: "ISLOGICAL",
        199: "DCOUNTA",
        200: "DELETE.BAR",
        201: "UNREGISTER",
        204: "USDOLLAR",
        205: "FINDB",
        206: "SEARCHB",
        207: "REPLACEB",
        208: "LEFTB",
        209: "RIGHTB",
        210: "MIDB",
        211: "LENB",
        212: "ROUNDUP",
        213: "ROUNDDOWN",
        214: "ASC",
        215: "DBCS",
        216: "RANK",
        219: "ADDRESS",
        220: "DAYS360",
        221: "TODAY",
        222: "VDB",
        223: "ELSE",
        224: "ELSE.IF",
        225: "END.IF",
        226: "FOR.CELL",
        227: "MEDIAN",
        228: "SUMPRODUCT",
        229: "SINH",
        230: "COSH",
        231: "TANH",
        232: "ASINH",
        233: "ACOSH",
        234: "ATANH",
        235: "DGET",
        236: "CREATE.OBJECT",
        237: "VOLATILE",
        238: "LAST.ERROR",
        239: "CUSTOM.UNDO",
        240: "CUSTOM.REPEAT",
        241: "FORMULA.CONVERT",
        242: "GET.LINK.INFO",
        243: "TEXT.BOX",
        244: "INFO",
        245: "GROUP",
        246: "GET.OBJECT",
        247: "DB",
        248: "PAUSE",
        251: "RESUME",
        252: "FREQUENCY",
        253: "ADD.TOOLBAR",
        254: "DELETE.TOOLBAR",
        255: "User",
        256: "RESET.TOOLBAR",
        257: "EVALUATE",
        258: "GET.TOOLBAR",
        259: "GET.TOOL",
        260: "SPELLING.CHECK",
        261: "ERROR.TYPE",
        262: "APP.TITLE",
        263: "WINDOW.TITLE",
        264: "SAVE.TOOLBAR",
        265: "ENABLE.TOOL",
        266: "PRESS.TOOL",
        267: "REGISTER.ID",
        268: "GET.WORKBOOK",
        269: "AVEDEV",
        270: "BETADIST",
        271: "GAMMALN",
        272: "BETAINV",
        273: "BINOMDIST",
        274: "CHIDIST",
        275: "CHIINV",
        276: "COMBIN",
        277: "CONFIDENCE",
        278: "CRITBINOM",
        279: "EVEN",
        280: "EXPONDIST",
        281: "FDIST",
        282: "FINV",
        283: "FISHER",
        284: "FISHERINV",
        285: "FLOOR",
        286: "GAMMADIST",
        287: "GAMMAINV",
        288: "CEILING",
        289: "HYPGEOMDIST",
        290: "LOGNORMDIST",
        291: "LOGINV",
        292: "NEGBINOMDIST",
        293: "NORMDIST",
        294: "NORMSDIST",
        295: "NORMINV",
        296: "NORMSINV",
        297: "STANDARDIZE",
        298: "ODD",
        299: "PERMUT",
        300: "POISSON",
        301: "TDIST",
        302: "WEIBULL",
        303: "SUMXMY2",
        304: "SUMX2MY2",
        305: "SUMX2PY2",
        306: "CHITEST",
        307: "CORREL",
        308: "COVAR",
        309: "FORECAST",
        310: "FTEST",
        311: "INTERCEPT",
        312: "PEARSON",
        313: "RSQ",
        314: "STEYX",
        315: "SLOPE",
        316: "TTEST",
        317: "PROB",
        318: "DEVSQ",
        319: "GEOMEAN",
        320: "HARMEAN",
        321: "SUMSQ",
        322: "KURT",
        323: "SKEW",
        324: "ZTEST",
        325: "LARGE",
        326: "SMALL",
        327: "QUARTILE",
        328: "PERCENTILE",
        329: "PERCENTRANK",
        330: "MODE",
        331: "TRIMMEAN",
        332: "TINV",
        334: "MOVIE.COMMAND",
        335: "GET.MOVIE",
        336: "CONCATENATE",
        337: "POWER",
        338: "PIVOT.ADD.DATA",
        339: "GET.PIVOT.TABLE",
        340: "GET.PIVOT.FIELD",
        341: "GET.PIVOT.ITEM",
        342: "RADIANS",
        343: "DEGREES",
        344: "SUBTOTAL",
        345: "SUMIF",
        346: "COUNTIF",
        347: "COUNTBLANK",
        348: "SCENARIO.GET",
        349: "OPTIONS.LISTS.GET",
        350: "ISPMT",
        351: "DATEDIF",
        352: "DATESTRING",
        353: "NUMBERSTRING",
        354: "ROMAN",
        355: "OPEN.DIALOG",
        356: "SAVE.DIALOG",
        357: "VIEW.GET",
        358: "GETPIVOTDATA",
        359: "HYPERLINK",
        360: "PHONETIC",
        361: "AVERAGEA",
        362: "MAXA",
        363: "MINA",
        364: "STDEVPA",
        365: "VARPA",
        366: "STDEVA",
        367: "VARA",
        368: "BAHTTEXT",
        369: "THAIDAYOFWEEK",
        370: "THAIDIGIT",
        371: "THAIMONTHOFYEAR",
        372: "THAINUMSOUND",
        373: "THAINUMSTRING",
        374: "THAISTRINGLENGTH",
        375: "ISTHAIDIGIT",
        376: "ROUNDBAHTDOWN",
        377: "ROUNDBAHTUP",
        378: "THAIYEAR",
        379: "RTD",
        380: "CUBEVALUE",
        381: "CUBEMEMBER",
        382: "CUBEMEMBERPROPERTY",
        383: "CUBERANKEDMEMBER",
        384: "HEX2BIN",
        385: "HEX2DEC",
        386: "HEX2OCT",
        387: "DEC2BIN",
        388: "DEC2HEX",
        389: "DEC2OCT",
        390: "OCT2BIN",
        391: "OCT2HEX",
        392: "OCT2DEC",
        393: "BIN2DEC",
        394: "BIN2OCT",
        395: "BIN2HEX",
        396: "IMSUB",
        397: "IMDIV",
        398: "IMPOWER",
        399: "IMABS",
        400: "IMSQRT",
        401: "IMLN",
        402: "IMLOG2",
        403: "IMLOG10",
        404: "IMSIN",
        405: "IMCOS",
        406: "IMEXP",
        407: "IMARGUMENT",
        408: "IMCONJUGATE",
        409: "IMAGINARY",
        410: "IMREAL",
        411: "COMPLEX",
        412: "IMSUM",
        413: "IMPRODUCT",
        414: "SERIESSUM",
        415: "FACTDOUBLE",
        416: "SQRTPI",
        417: "QUOTIENT",
        418: "DELTA",
        419: "GESTEP",
        420: "ISEVEN",
        421: "ISODD",
        422: "MROUND",
        423: "ERF",
        424: "ERFC",
        425: "BESSELJ",
        426: "BESSELK",
        427: "BESSELY",
        428: "BESSELI",
        429: "XIRR",
        430: "XNPV",
        431: "PRICEMAT",
        432: "YIELDMAT",
        433: "INTRATE",
        434: "RECEIVED",
        435: "DISC",
        436: "PRICEDISC",
        437: "YIELDDISC",
        438: "TBILLEQ",
        439: "TBILLPRICE",
        440: "TBILLYIELD",
        441: "PRICE",
        442: "YIELD",
        443: "DOLLARDE",
        444: "DOLLARFR",
        445: "NOMINAL",
        446: "EFFECT",
        447: "CUMPRINC",
        448: "CUMIPMT",
        449: "EDATE",
        450: "EOMONTH",
        451: "YEARFRAC",
        452: "COUPDAYBS",
        453: "COUPDAYS",
        454: "COUPDAYSNC",
        455: "COUPNCD",
        456: "COUPNUM",
        457: "COUPPCD",
        458: "DURATION",
        459: "MDURATION",
        460: "ODDLPRICE",
        461: "ODDLYIELD",
        462: "ODDFPRICE",
        463: "ODDFYIELD",
        464: "RANDBETWEEN",
        465: "WEEKNUM",
        466: "AMORDEGRC",
        467: "AMORLINC",
        468: "CONVERT",
        724: "SHEETJS",
        469: "ACCRINT",
        470: "ACCRINTM",
        471: "WORKDAY",
        472: "NETWORKDAYS",
        473: "GCD",
        474: "MULTINOMIAL",
        475: "LCM",
        476: "FVSCHEDULE",
        477: "CUBEKPIMEMBER",
        478: "CUBESET",
        479: "CUBESETCOUNT",
        480: "IFERROR",
        481: "COUNTIFS",
        482: "SUMIFS",
        483: "AVERAGEIF",
        484: "AVERAGEIFS"
    },
    QF = {
        2: 1,
        3: 1,
        10: 0,
        15: 1,
        16: 1,
        17: 1,
        18: 1,
        19: 0,
        20: 1,
        21: 1,
        22: 1,
        23: 1,
        24: 1,
        25: 1,
        26: 1,
        27: 2,
        30: 2,
        31: 3,
        32: 1,
        33: 1,
        34: 0,
        35: 0,
        38: 1,
        39: 2,
        40: 3,
        41: 3,
        42: 3,
        43: 3,
        44: 3,
        45: 3,
        47: 3,
        48: 2,
        53: 1,
        61: 3,
        63: 0,
        65: 3,
        66: 3,
        67: 1,
        68: 1,
        69: 1,
        70: 1,
        71: 1,
        72: 1,
        73: 1,
        74: 0,
        75: 1,
        76: 1,
        77: 1,
        79: 2,
        80: 2,
        83: 1,
        85: 0,
        86: 1,
        89: 0,
        90: 1,
        94: 0,
        95: 0,
        97: 2,
        98: 1,
        99: 1,
        101: 3,
        102: 3,
        105: 1,
        106: 1,
        108: 2,
        111: 1,
        112: 1,
        113: 1,
        114: 1,
        117: 2,
        118: 1,
        119: 4,
        121: 1,
        126: 1,
        127: 1,
        128: 1,
        129: 1,
        130: 1,
        131: 1,
        133: 1,
        134: 1,
        135: 1,
        136: 2,
        137: 2,
        138: 2,
        140: 1,
        141: 1,
        142: 3,
        143: 4,
        144: 4,
        161: 1,
        162: 1,
        163: 1,
        164: 1,
        165: 2,
        172: 1,
        175: 2,
        176: 2,
        177: 3,
        178: 2,
        179: 1,
        184: 1,
        186: 1,
        189: 3,
        190: 1,
        195: 3,
        196: 3,
        197: 1,
        198: 1,
        199: 3,
        201: 1,
        207: 4,
        210: 3,
        211: 1,
        212: 2,
        213: 2,
        214: 1,
        215: 1,
        225: 0,
        229: 1,
        230: 1,
        231: 1,
        232: 1,
        233: 1,
        234: 1,
        235: 3,
        244: 1,
        247: 4,
        252: 2,
        257: 1,
        261: 1,
        271: 1,
        273: 4,
        274: 2,
        275: 2,
        276: 2,
        277: 3,
        278: 3,
        279: 1,
        280: 3,
        281: 3,
        282: 3,
        283: 1,
        284: 1,
        285: 2,
        286: 4,
        287: 3,
        288: 2,
        289: 4,
        290: 3,
        291: 3,
        292: 3,
        293: 4,
        294: 1,
        295: 3,
        296: 1,
        297: 3,
        298: 1,
        299: 2,
        300: 3,
        301: 3,
        302: 4,
        303: 2,
        304: 2,
        305: 2,
        306: 2,
        307: 2,
        308: 2,
        309: 3,
        310: 2,
        311: 2,
        312: 2,
        313: 2,
        314: 2,
        315: 2,
        316: 4,
        325: 2,
        326: 2,
        327: 2,
        328: 2,
        331: 2,
        332: 2,
        337: 2,
        342: 1,
        343: 1,
        346: 2,
        347: 1,
        350: 4,
        351: 3,
        352: 1,
        353: 2,
        360: 1,
        368: 1,
        369: 1,
        370: 1,
        371: 1,
        372: 1,
        373: 1,
        374: 1,
        375: 1,
        376: 1,
        377: 1,
        378: 1,
        382: 3,
        385: 1,
        392: 1,
        393: 1,
        396: 2,
        397: 2,
        398: 2,
        399: 1,
        400: 1,
        401: 1,
        402: 1,
        403: 1,
        404: 1,
        405: 1,
        406: 1,
        407: 1,
        408: 1,
        409: 1,
        410: 1,
        414: 4,
        415: 1,
        416: 1,
        417: 2,
        420: 1,
        421: 1,
        422: 2,
        424: 1,
        425: 2,
        426: 2,
        427: 2,
        428: 2,
        430: 3,
        438: 3,
        439: 3,
        440: 3,
        443: 2,
        444: 2,
        445: 2,
        446: 2,
        447: 6,
        448: 6,
        449: 2,
        450: 2,
        464: 2,
        468: 3,
        476: 2,
        479: 1,
        480: 2,
        65535: 0
    };

function $F(t) {
    var r = "of:=" + t.replace(Up, "$1[.$2$3$4$5]").replace(/\]:\[/g, ":");
    return r.replace(/;/g, "|").replace(/,/g, ";");
}

function Jw(t) {
    return t.replace(/!/, ".").replace(/:/, ":.");
}
var vf = typeof Map < "u";

function Kg(t, r, e) {
    var i = 0,
        n = t.length;
    if (e) {
        if (vf ? e.has(r) : Object.prototype.hasOwnProperty.call(e, r)) {
            for (var a = vf ? e.get(r) : e[r]; i < a.length; ++i)
                if (t[a[i]].t === r) return t.Count++, a[i];
        }
    } else
        for (; i < n; ++i)
            if (t[i].t === r) return t.Count++, i;
    return t[n] = {
        t: r
    }, t.Count++, t.Unique++, e && (vf ? (e.has(r) || e.set(r, []), e.get(r).push(n)) : (Object.prototype.hasOwnProperty.call(e, r) || (e[r] = []), e[r].push(n))), n;
}

function jp(t, r) {
    var e = {
            min: t + 1,
            max: t + 1
        },
        i = -1;
    return r.MDW && (Gs = r.MDW), r.width != null ? e.customWidth = 1 : r.wpx != null ? i = Ap(r.wpx) : r.wch != null && (i = r.wch), i > -1 ? (e.width = Sg(i), e.customWidth = 1) : r.width != null && (e.width = r.width), r.hidden && (e.hidden = !0), r.level != null && (e.outlineLevel = e.level = r.level), e;
}

function Qw(t, r) {
    if (t) {
        var e = [.7, .7, .75, .75, .3, .3];
        r == "xlml" && (e = [1, 1, 1, 1, .5, .5]), t.left == null && (t.left = e[0]), t.right == null && (t.right = e[1]), t.top == null && (t.top = e[2]), t.bottom == null && (t.bottom = e[3]), t.header == null && (t.header = e[4]), t.footer == null && (t.footer = e[5]);
    }
}

function Ml(t, r, e) {
    var i = e.revssf[r.z != null ? r.z : "General"],
        n = 60,
        a = t.length;
    if (i == null && e.ssf) {
        for (; n < 392; ++n)
            if (e.ssf[n] == null) {
                TT(r.z, n), e.ssf[n] = r.z, e.revssf[r.z] = i = n;
                break;
            }
    }
    for (n = 0; n != a; ++n)
        if (t[n].numFmtId === i) return n;
    return t[a] = {
        numFmtId: i,
        fontId: 0,
        fillId: 0,
        borderId: 0,
        xfId: 0,
        applyNumberFormat: 1
    }, a;
}

function e6(t, r, e) {
    if (t && t["!ref"]) {
        var i = ki(t["!ref"]);
        if (i.e.c < i.s.c || i.e.r < i.s.r) throw new Error("Bad range (" + e + "): " + t["!ref"]);
    }
}

function t6(t) {
    if (t.length === 0) return "";
    for (var r = '<mergeCells count="' + t.length + '">', e = 0; e != t.length; ++e) r += '<mergeCell ref="' + hn(t[e]) + '"/>';
    return r + "</mergeCells>";
}

function r6(t, r, e, i, n) {
    var a = !1,
        o = {},
        s = null;
    if (i.bookType !== "xlsx" && r.vbaraw) {
        var l = r.SheetNames[e];
        try {
            r.Workbook && (l = r.Workbook.Sheets[e].CodeName || l);
        } catch {}
        a = !0, o.codeName = Ws(kr(l));
    }
    if (t && t["!outline"]) {
        var c = {
            summaryBelow: 1,
            summaryRight: 1
        };
        t["!outline"].above && (c.summaryBelow = 0), t["!outline"].left && (c.summaryRight = 0), s = (s || "") + ut("outlinePr", null, c);
    }!a && !s || (n[n.length] = ut("sheetPr", s, o));
}
var i6 = ["objects", "scenarios", "selectLockedCells", "selectUnlockedCells"],
    n6 = ["formatColumns", "formatRows", "formatCells", "insertColumns", "insertRows", "insertHyperlinks", "deleteColumns", "deleteRows", "sort", "autoFilter", "pivotTables"];

function a6(t) {
    var r = {
        sheet: 1
    };
    return i6.forEach(function(e) {
        t[e] != null && t[e] && (r[e] = "1");
    }), n6.forEach(function(e) {
        t[e] != null && !t[e] && (r[e] = "0");
    }), t.password && (r.password = Rw(t.password).toString(16).toUpperCase()), ut("sheetProtection", null, r);
}

function o6(t) {
    return Qw(t), ut("pageMargins", null, t);
}

function s6(t, r) {
    for (var e = ["<cols>"], i, n = 0; n != r.length; ++n)(i = r[n]) && (e[e.length] = ut("col", null, jp(n, i)));
    return e[e.length] = "</cols>", e.join("");
}

function l6(t, r, e, i) {
    var n = typeof t.ref == "string" ? t.ref : hn(t.ref);
    e.Workbook || (e.Workbook = {
        Sheets: []
    }), e.Workbook.Names || (e.Workbook.Names = []);
    var a = e.Workbook.Names,
        o = zn(n);
    o.s.r == o.e.r && (o.e.r = zn(r["!ref"]).e.r, n = hn(o));
    for (var s = 0; s < a.length; ++s) {
        var l = a[s];
        if (l.Name == "_xlnm._FilterDatabase" && l.Sheet == i) {
            l.Ref = Sf(e.SheetNames[i]) + "!" + wf(n);
            break;
        }
    }
    return s == a.length && a.push({
        Name: "_xlnm._FilterDatabase",
        Sheet: i,
        Ref: "'" + e.SheetNames[i] + "'!" + n
    }), ut("autoFilter", null, {
        ref: n
    });
}

function c6(t, r, e, i) {
    var n = {
        workbookViewId: "0"
    };
    return (((i || {}).Workbook || {}).Views || [])[0] && (n.rightToLeft = i.Workbook.Views[0].RTL ? "1" : "0"), ut("sheetViews", ut("sheetView", null, n), {});
}

function u6(t, r, e, i, n, a, o) {
    if (t.c && e["!comments"].push([r, t.c]), (t.v === void 0 || t.t === "z" && !(i || {}).sheetStubs) && typeof t.f != "string" && typeof t.z > "u") return "";
    var s = "",
        l = t.t,
        c = t.v;
    if (t.t !== "z") switch (t.t) {
        case "b":
            s = t.v ? "1" : "0";
            break;
        case "n":
            isNaN(t.v) ? (t.t = "e", s = xa[t.v = 36]) : isFinite(t.v) ? s = "" + t.v : (t.t = "e", s = xa[t.v = 7]);
            break;
        case "e":
            s = xa[t.v];
            break;
        case "d":
            if (i && i.cellDates) {
                var u = Ea(t.v, o);
                s = u.toISOString(), u.getUTCFullYear() < 1900 && (s = s.slice(s.indexOf("T") + 1).replace("Z", ""));
            } else t = na(t), t.t = "n", s = "" + (t.v = Wn(Ea(t.v, o), o));
            typeof t.z > "u" && (t.z = Di[14]);
            break;
        default:
            s = t.v;
            break;
    }
    var h = t.t == "z" || t.v == null ? "" : Vn("v", kr(s)),
        d = {
            r
        },
        f = Ml(i.cellXfs, t, i);
    switch (f !== 0 && (d.s = f), t.t) {
        case "n":
            break;
        case "d":
            d.t = "d";
            break;
        case "b":
            d.t = "b";
            break;
        case "e":
            d.t = "e";
            break;
        case "z":
            break;
        default:
            if (t.v == null) {
                delete t.t;
                break;
            }
            if (t.v.length > 32767) throw new Error("Text length must not exceed 32767 characters");
            if (i && i.bookSST) {
                h = Vn("v", "" + Kg(i.Strings, t.v, i.revStrings)), d.t = "s";
                break;
            } else d.t = "str";
            break;
    }
    if (t.t != l && (t.t = l, t.v = c), typeof t.f == "string" && t.f) {
        var m = t.F && t.F.slice(0, r.length) == r ? {
            t: "array",
            ref: t.F
        } : null;
        h = ut("f", kr(t.f), m) + (t.v != null ? h : "");
    }
    return t.l && (t.l.display = kr(s), e["!links"].push([r, t.l])), t.D && (d.cm = 1), ut("c", h, d);
}

function f6(t, r, e, i) {
    var n = [],
        a = [],
        o = ki(t["!ref"]),
        s = "",
        l, c = "",
        u = [],
        h = 0,
        d = 0,
        f = t["!rows"],
        m = t["!data"] != null,
        _ = m ? t["!data"] : [],
        x = {
            r: c
        },
        g, b = -1,
        w = (((i || {}).Workbook || {}).WBProps || {}).date1904;
    for (d = o.s.c; d <= o.e.c; ++d) u[d] = ui(d);
    for (h = o.s.r; h <= o.e.r; ++h) {
        a = [], c = di(h);
        var T = m ? _[h] : [];
        for (d = o.s.c; d <= o.e.c; ++d) {
            l = u[d] + c;
            var E = m ? T[d] : t[l];
            E !== void 0 && (s = u6(E, l, t, r, e, i, w)) != null && a.push(s);
        }(a.length > 0 || f && f[h]) && (x = {
            r: c
        }, f && f[h] && (g = f[h], g.hidden && (x.hidden = 1), b = -1, g.hpx ? b = Tp(g.hpx) : g.hpt && (b = g.hpt), b > -1 && (x.ht = b, x.customHeight = 1), g.level && (x.outlineLevel = g.level)), n[n.length] = ut("row", a.join(""), x));
    }
    if (f)
        for (; h < f.length; ++h) f && f[h] && (x = {
            r: h + 1
        }, g = f[h], g.hidden && (x.hidden = 1), b = -1, g.hpx ? b = Tp(g.hpx) : g.hpt && (b = g.hpt), b > -1 && (x.ht = b, x.customHeight = 1), g.level && (x.outlineLevel = g.level), n[n.length] = ut("row", "", x));
    return n.join("");
}

function h6(t, r, e, i) {
    var n = [dn, ut("worksheet", null, {
            xmlns: z0[0],
            "xmlns:r": Pn.r
        })],
        a = e.SheetNames[t],
        o = 0,
        s = "",
        l = e.Sheets[a];
    l == null && (l = {});
    var c = l["!ref"] || "A1",
        u = ki(c);
    if (u.e.c > 16383 || u.e.r > 1048575) {
        if (r.WTF) throw new Error("Range " + c + " exceeds format limit A1:XFD1048576");
        u.e.c = Math.min(u.e.c, 16383), u.e.r = Math.min(u.e.c, 1048575), c = hn(u);
    }
    i || (i = {}), l["!comments"] = [];
    var h = [];
    r6(l, e, t, r, n), n[n.length] = ut("dimension", null, {
        ref: c
    }), n[n.length] = c6(l, r, t, e), r.sheetFormat && (n[n.length] = ut("sheetFormatPr", null, {
        defaultRowHeight: r.sheetFormat.defaultRowHeight || "16",
        baseColWidth: r.sheetFormat.baseColWidth || "10",
        outlineLevelRow: r.sheetFormat.outlineLevelRow || "7"
    })), l["!cols"] != null && l["!cols"].length > 0 && (n[n.length] = s6(l, l["!cols"])), n[o = n.length] = "<sheetData/>", l["!links"] = [], l["!ref"] != null && (s = f6(l, r, t, e, i), s.length > 0 && (n[n.length] = s)), n.length > o + 1 && (n[n.length] = "</sheetData>", n[o] = n[o].replace("/>", ">")), l["!protect"] && (n[n.length] = a6(l["!protect"])), l["!autofilter"] != null && (n[n.length] = l6(l["!autofilter"], l, e, t)), l["!merges"] != null && l["!merges"].length > 0 && (n[n.length] = t6(l["!merges"]));
    var d = -1,
        f, m = -1;
    return l["!links"].length > 0 && (n[n.length] = "<hyperlinks>", l["!links"].forEach(function(_) {
        _[1].Target && (f = {
            ref: _[0]
        }, _[1].Target.charAt(0) != "#" && (m = ei(i, -1, kr(_[1].Target).replace(/#[\s\S]*$/, ""), Hr.HLINK), f["r:id"] = "rId" + m), (d = _[1].Target.indexOf("#")) > -1 && (f.location = kr(_[1].Target.slice(d + 1))), _[1].Tooltip && (f.tooltip = kr(_[1].Tooltip)), f.display = _[1].display, n[n.length] = ut("hyperlink", null, f));
    }), n[n.length] = "</hyperlinks>"), delete l["!links"], l["!margins"] != null && (n[n.length] = o6(l["!margins"])), (!r || r.ignoreEC || r.ignoreEC == null) && (n[n.length] = Vn("ignoredErrors", ut("ignoredError", null, {
        numberStoredAsText: 1,
        sqref: c
    }))), h.length > 0 && (m = ei(i, -1, "../drawings/drawing" + (t + 1) + ".xml", Hr.DRAW), n[n.length] = ut("drawing", null, {
        "r:id": "rId" + m
    }), l["!drawing"] = h), l["!comments"].length > 0 && (m = ei(i, -1, "../drawings/vmlDrawing" + (t + 1) + ".vml", Hr.VML), n[n.length] = ut("legacyDrawing", null, {
        "r:id": "rId" + m
    }), l["!legacy"] = m), n.length > 1 && (n[n.length] = "</worksheet>", n[1] = n[1].replace("/>", ">")), n.join("");
}

function d6(t, r) {
    var e = {},
        i = t.l + r;
    e.r = t.read_shift(4), t.l += 4;
    var n = t.read_shift(2);
    t.l += 1;
    var a = t.read_shift(1);
    return t.l = i, a & 7 && (e.level = a & 7), a & 16 && (e.hidden = !0), a & 32 && (e.hpt = n / 20), e;
}

function p6(t, r, e) {
    var i = Ue(145),
        n = (e["!rows"] || [])[t] || {};
    i.write_shift(4, t), i.write_shift(4, 0);
    var a = 320;
    n.hpx ? a = Tp(n.hpx) * 20 : n.hpt && (a = n.hpt * 20), i.write_shift(2, a), i.write_shift(1, 0);
    var o = 0;
    n.level && (o |= n.level), n.hidden && (o |= 16), (n.hpx || n.hpt) && (o |= 32), i.write_shift(1, o), i.write_shift(1, 0);
    var s = 0,
        l = i.l;
    i.l += 4;
    for (var c = {
            r: t,
            c: 0
        }, u = e["!data"] != null, h = 0; h < 16; ++h)
        if (!(r.s.c > h + 1 << 10 || r.e.c < h << 10)) {
            for (var d = -1, f = -1, m = h << 10; m < h + 1 << 10; ++m) {
                c.c = m;
                var _ = u ? (e["!data"][c.r] || [])[c.c] : e[Bi(c)];
                _ && (d < 0 && (d = m), f = m);
            }
            d < 0 || (++s, i.write_shift(4, d), i.write_shift(4, f));
        }
    var x = i.l;
    return i.l = l, i.write_shift(4, s), i.l = x, i.length > i.l ? i.slice(0, i.l) : i;
}

function m6(t, r, e, i) {
    var n = p6(i, e, r);
    (n.length > 17 || (r["!rows"] || [])[i]) && Ze(t, 0, n);
}
var g6 = Bc,
    v6 = G0;

function x6() {}

function _6(t, r) {
    var e = {},
        i = t[t.l];
    return ++t.l, e.above = !(i & 64), e.left = !(i & 128), t.l += 18, e.name = dD(t, r - 19), e;
}

function y6(t, r, e) {
    e == null && (e = Ue(84 + 4 * t.length));
    var i = 192;
    r && (r.above && (i &= -65), r.left && (i &= -129)), e.write_shift(1, i);
    for (var n = 1; n < 3; ++n) e.write_shift(1, 0);
    return wp({
        auto: 1
    }, e), e.write_shift(-4, -1), e.write_shift(-4, -1), vw(t, e), e.slice(0, e.l);
}

function b6(t) {
    var r = fo(t);
    return [r];
}

function w6(t, r, e) {
    return e == null && (e = Ue(8)), Lc(r, e);
}

function S6(t) {
    var r = Rc(t);
    return [r];
}

function C6(t, r, e) {
    return e == null && (e = Ue(4)), Mc(r, e);
}

function A6(t) {
    var r = fo(t),
        e = t.read_shift(1);
    return [r, e, "b"];
}

function T6(t, r, e) {
    return e == null && (e = Ue(9)), Lc(r, e), e.write_shift(1, t.v ? 1 : 0), e;
}

function D6(t) {
    var r = Rc(t),
        e = t.read_shift(1);
    return [r, e, "b"];
}

function k6(t, r, e) {
    return e == null && (e = Ue(5)), Mc(r, e), e.write_shift(1, t.v ? 1 : 0), e;
}

function F6(t) {
    var r = fo(t),
        e = t.read_shift(1);
    return [r, e, "e"];
}

function pg(t, r, e) {
    return e == null && (e = Ue(9)), Lc(r, e), e.write_shift(1, t.v), e;
}

function E6(t) {
    var r = Rc(t),
        e = t.read_shift(1);
    return [r, e, "e"];
}

function mg(t, r, e) {
    return e == null && (e = Ue(8)), Mc(r, e), e.write_shift(1, t.v), e.write_shift(2, 0), e.write_shift(1, 0), e;
}

function P6(t) {
    var r = fo(t),
        e = t.read_shift(4);
    return [r, e, "s"];
}

function I6(t, r, e) {
    return e == null && (e = Ue(12)), Lc(r, e), e.write_shift(4, r.v), e;
}

function O6(t) {
    var r = Rc(t),
        e = t.read_shift(4);
    return [r, e, "s"];
}

function N6(t, r, e) {
    return e == null && (e = Ue(8)), Mc(r, e), e.write_shift(4, r.v), e;
}

function L6(t) {
    var r = fo(t),
        e = q0(t);
    return [r, e, "n"];
}

function R6(t, r, e) {
    return e == null && (e = Ue(16)), Lc(r, e), Oc(t.v, e), e;
}

function M6(t) {
    var r = Rc(t),
        e = q0(t);
    return [r, e, "n"];
}

function B6(t, r, e) {
    return e == null && (e = Ue(12)), Mc(r, e), Oc(t.v, e), e;
}

function U6(t) {
    var r = fo(t),
        e = Hg(t);
    return [r, e, "n"];
}

function V6(t, r, e) {
    return e == null && (e = Ue(12)), Lc(r, e), xw(t.v, e), e;
}

function z6(t) {
    var r = Rc(t),
        e = Hg(t);
    return [r, e, "n"];
}

function W6(t, r, e) {
    return e == null && (e = Ue(8)), Mc(r, e), xw(t.v, e), e;
}

function j6(t) {
    var r = fo(t),
        e = Wg(t);
    return [r, e, "is"];
}

function H6(t) {
    var r = fo(t),
        e = ia(t);
    return [r, e, "str"];
}

function G6(t, r, e) {
    var i = t.v == null ? "" : String(t.v);
    return e == null && (e = Ue(12 + 4 * t.v.length)), Lc(r, e), An(i, e), e.length > e.l ? e.slice(0, e.l) : e;
}

function q6(t) {
    var r = Rc(t),
        e = ia(t);
    return [r, e, "str"];
}

function X6(t, r, e) {
    var i = t.v == null ? "" : String(t.v);
    return e == null && (e = Ue(8 + 4 * i.length)), Mc(r, e), An(i, e), e.length > e.l ? e.slice(0, e.l) : e;
}

function K6(t, r, e) {
    var i = t.l + r,
        n = fo(t);
    n.r = e["!row"];
    var a = t.read_shift(1),
        o = [n, a, "b"];
    if (e.cellFormula) {
        t.l += 2;
        var s = Wp(t, i - t.l, e);
        o[3] = V0(s, null, n, e.supbooks, e);
    } else t.l = i;
    return o;
}

function Y6(t, r, e) {
    var i = t.l + r,
        n = fo(t);
    n.r = e["!row"];
    var a = t.read_shift(1),
        o = [n, a, "e"];
    if (e.cellFormula) {
        t.l += 2;
        var s = Wp(t, i - t.l, e);
        o[3] = V0(s, null, n, e.supbooks, e);
    } else t.l = i;
    return o;
}

function Z6(t, r, e) {
    var i = t.l + r,
        n = fo(t);
    n.r = e["!row"];
    var a = q0(t),
        o = [n, a, "n"];
    if (e.cellFormula) {
        t.l += 2;
        var s = Wp(t, i - t.l, e);
        o[3] = V0(s, null, n, e.supbooks, e);
    } else t.l = i;
    return o;
}

function J6(t, r, e) {
    var i = t.l + r,
        n = fo(t);
    n.r = e["!row"];
    var a = ia(t),
        o = [n, a, "str"];
    if (e.cellFormula) {
        t.l += 2;
        var s = Wp(t, i - t.l, e);
        o[3] = V0(s, null, n, e.supbooks, e);
    } else t.l = i;
    return o;
}
var Q6 = Bc,
    $6 = G0;

function eE(t, r) {
    return r == null && (r = Ue(4)), r.write_shift(4, t), r;
}

function tE(t, r) {
    var e = t.l + r,
        i = Bc(t, 16),
        n = Bp(t),
        a = ia(t),
        o = ia(t),
        s = ia(t);
    t.l = e;
    var l = {
        rfx: i,
        relId: n,
        loc: a,
        display: s
    };
    return o && (l.Tooltip = o), l;
}

function rE(t, r) {
    var e = Ue(50 + 4 * (t[1].Target.length + (t[1].Tooltip || "").length));
    G0({
        s: Li(t[0]),
        e: Li(t[0])
    }, e), jg("rId" + r, e);
    var i = t[1].Target.indexOf("#"),
        n = i == -1 ? "" : t[1].Target.slice(i + 1);
    return An(n || "", e), An(t[1].Tooltip || "", e), An("", e), e.slice(0, e.l);
}

function iE() {}

function nE(t, r, e) {
    var i = t.l + r,
        n = _w(t, 16),
        a = t.read_shift(1),
        o = [n];
    if (o[2] = a, e.cellFormula) {
        var s = MF(t, i - t.l, e);
        o[1] = s;
    } else t.l = i;
    return o;
}

function aE(t, r, e) {
    var i = t.l + r,
        n = Bc(t, 16),
        a = [n];
    if (e.cellFormula) {
        var o = UF(t, i - t.l, e);
        a[1] = o, t.l = i;
    } else t.l = i;
    return a;
}

function oE(t, r, e) {
    e == null && (e = Ue(18));
    var i = jp(t, r);
    e.write_shift(-4, t), e.write_shift(-4, t), e.write_shift(4, (i.width || 10) * 256), e.write_shift(4, 0);
    var n = 0;
    return r.hidden && (n |= 1), typeof i.width == "number" && (n |= 2), r.level && (n |= r.level << 8), e.write_shift(2, n), e;
}
var $w = ["left", "right", "top", "bottom", "header", "footer"];

function sE(t) {
    var r = {};
    return $w.forEach(function(e) {
        r[e] = q0(t, 8);
    }), r;
}

function lE(t, r) {
    return r == null && (r = Ue(6 * 8)), Qw(t), $w.forEach(function(e) {
        Oc(t[e], r);
    }), r;
}

function cE(t) {
    var r = t.read_shift(2);
    return t.l += 28, {
        RTL: r & 32
    };
}

function uE(t, r, e) {
    e == null && (e = Ue(30));
    var i = 924;
    return (((r || {}).Views || [])[0] || {}).RTL && (i |= 32), e.write_shift(2, i), e.write_shift(4, 0), e.write_shift(4, 0), e.write_shift(4, 0), e.write_shift(1, 0), e.write_shift(1, 0), e.write_shift(2, 0), e.write_shift(2, 100), e.write_shift(2, 0), e.write_shift(2, 0), e.write_shift(2, 0), e.write_shift(4, 0), e;
}

function fE(t) {
    var r = Ue(24);
    return r.write_shift(4, 4), r.write_shift(4, 1), G0(t, r), r;
}

function hE(t, r) {
    return r == null && (r = Ue(16 * 4 + 2)), r.write_shift(2, t.password ? Rw(t.password) : 0), r.write_shift(4, 1), [
        ["objects", !1],
        ["scenarios", !1],
        ["formatCells", !0],
        ["formatColumns", !0],
        ["formatRows", !0],
        ["insertColumns", !0],
        ["insertRows", !0],
        ["insertHyperlinks", !0],
        ["deleteColumns", !0],
        ["deleteRows", !0],
        ["selectLockedCells", !1],
        ["sort", !0],
        ["autoFilter", !0],
        ["pivotTables", !0],
        ["selectUnlockedCells", !1]
    ].forEach(function(e) {
        e[1] ? r.write_shift(4, t[e[0]] != null && !t[e[0]] ? 1 : 0) : r.write_shift(4, t[e[0]] != null && t[e[0]] ? 0 : 1);
    }), r;
}

function dE() {}

function pE() {}

function mE(t, r, e, i, n, a, o, s) {
    var l = {
        r: e,
        c: i
    };
    if (r.c && a["!comments"].push([Bi(l), r.c]), r.v === void 0) return !1;
    var c = "";
    switch (r.t) {
        case "b":
            c = r.v ? "1" : "0";
            break;
        case "d":
            r = na(r), r.z = r.z || Di[14], r.v = Wn(Ea(r.v, s), s), r.t = "n";
            break;
        case "n":
        case "e":
            c = "" + r.v;
            break;
        default:
            c = r.v;
            break;
    }
    switch (l.s = Ml(n.cellXfs, r, n), r.l && a["!links"].push([Bi(l), r.l]), r.t) {
        case "s":
        case "str":
            return n.bookSST ? (c = Kg(n.Strings, r.v == null ? "" : String(r.v), n.revStrings), l.t = "s", l.v = c, o ? Ze(t, 18, N6(r, l)) : Ze(t, 7, I6(r, l))) : (l.t = "str", o ? Ze(t, 17, X6(r, l)) : Ze(t, 6, G6(r, l))), !0;
        case "n":
            return r.v == (r.v | 0) && r.v > -1e3 && r.v < 1e3 ? o ? Ze(t, 13, W6(r, l)) : Ze(t, 2, V6(r, l)) : isFinite(r.v) ? o ? Ze(t, 16, B6(r, l)) : Ze(t, 5, R6(r, l)) : (l.t = "e", isNaN(r.v) ? o ? Ze(t, 14, mg({
                t: "e",
                v: 36
            }, l)) : Ze(t, 3, pg({
                t: "e",
                v: 36
            }, l)) : o ? Ze(t, 14, mg({
                t: "e",
                v: 7
            }, l)) : Ze(t, 3, pg({
                t: "e",
                v: 7
            }, l))), !0;
        case "b":
            return l.t = "b", o ? Ze(t, 15, k6(r, l)) : Ze(t, 4, T6(r, l)), !0;
        case "e":
            return l.t = "e", o ? Ze(t, 14, mg(r, l)) : Ze(t, 3, pg(r, l)), !0;
    }
    return o ? Ze(t, 12, C6(r, l)) : Ze(t, 1, w6(r, l)), !0;
}

function gE(t, r, e, i, n) {
    var a = ki(r["!ref"] || "A1"),
        o = "",
        s = [],
        l = (((n || {}).Workbook || {}).WBProps || {}).date1904;
    Ze(t, 145);
    var c = r["!data"] != null,
        u = c ? r["!data"][a.s.r] : [],
        h = a.e.r;
    r["!rows"] && (h = Math.max(a.e.r, r["!rows"].length - 1));
    for (var d = a.s.r; d <= h; ++d)
        if (o = di(d), c && (u = r["!data"][d]), m6(t, r, a, d), !(c && !u)) {
            var f = !1;
            if (d <= a.e.r)
                for (var m = a.s.c; m <= a.e.c; ++m) {
                    d === a.s.r && (s[m] = ui(m));
                    var _ = c ? u[m] : r[s[m] + o];
                    if (!_) {
                        f = !1;
                        continue;
                    }
                    f = mE(t, _, d, m, i, r, f, l);
                }
        }
    Ze(t, 146);
}

function vE(t, r) {
    !r || !r["!merges"] || (Ze(t, 177, eE(r["!merges"].length)), r["!merges"].forEach(function(e) {
        Ze(t, 176, $6(e));
    }), Ze(t, 178));
}

function xE(t, r) {
    !r || !r["!cols"] || (Ze(t, 390), r["!cols"].forEach(function(e, i) {
        e && Ze(t, 60, oE(i, e));
    }), Ze(t, 391));
}

function _E(t, r) {
    !r || !r["!ref"] || (Ze(t, 648), Ze(t, 649, fE(ki(r["!ref"]))), Ze(t, 650));
}

function yE(t, r, e) {
    r["!links"].forEach(function(i) {
        if (i[1].Target) {
            var n = ei(e, -1, i[1].Target.replace(/#[\s\S]*$/, ""), Hr.HLINK);
            Ze(t, 494, rE(i, n));
        }
    }), delete r["!links"];
}

function bE(t, r, e, i) {
    if (r["!comments"].length > 0) {
        var n = ei(i, -1, "../drawings/vmlDrawing" + (e + 1) + ".vml", Hr.VML);
        Ze(t, 551, jg("rId" + n)), r["!legacy"] = n;
    }
}

function wE(t, r, e, i) {
    if (r["!autofilter"]) {
        var n = r["!autofilter"],
            a = typeof n.ref == "string" ? n.ref : hn(n.ref);
        e.Workbook || (e.Workbook = {
            Sheets: []
        }), e.Workbook.Names || (e.Workbook.Names = []);
        var o = e.Workbook.Names,
            s = zn(a);
        s.s.r == s.e.r && (s.e.r = zn(r["!ref"]).e.r, a = hn(s));
        for (var l = 0; l < o.length; ++l) {
            var c = o[l];
            if (c.Name == "_xlnm._FilterDatabase" && c.Sheet == i) {
                c.Ref = Sf(e.SheetNames[i]) + "!" + wf(a);
                break;
            }
        }
        l == o.length && o.push({
            Name: "_xlnm._FilterDatabase",
            Sheet: i,
            Ref: Sf(e.SheetNames[i]) + "!" + wf(a)
        }), Ze(t, 161, G0(ki(a))), Ze(t, 162);
    }
}

function SE(t, r, e) {
    Ze(t, 133), Ze(t, 137, uE(r, e)), Ze(t, 138), Ze(t, 134);
}

function CE(t, r) {
    r["!protect"] && Ze(t, 535, hE(r["!protect"]));
}

function AE(t, r, e, i) {
    var n = ra(),
        a = e.SheetNames[t],
        o = e.Sheets[a] || {},
        s = a;
    try {
        e && e.Workbook && (s = e.Workbook.Sheets[t].CodeName || s);
    } catch {}
    var l = ki(o["!ref"] || "A1");
    if (l.e.c > 16383 || l.e.r > 1048575) {
        if (r.WTF) throw new Error("Range " + (o["!ref"] || "A1") + " exceeds format limit A1:XFD1048576");
        l.e.c = Math.min(l.e.c, 16383), l.e.r = Math.min(l.e.c, 1048575);
    }
    return o["!links"] = [], o["!comments"] = [], Ze(n, 129), (e.vbaraw || o["!outline"]) && Ze(n, 147, y6(s, o["!outline"])), Ze(n, 148, v6(l)), SE(n, o, e.Workbook), xE(n, o, t, r, e), gE(n, o, t, r, e), CE(n, o), wE(n, o, e, t), vE(n, o), yE(n, o, i), o["!margins"] && Ze(n, 476, lE(o["!margins"])), (!r || r.ignoreEC || r.ignoreEC == null) && _E(n, o), bE(n, o, t, i), Ze(n, 130), n.end();
}

function TE(t, r) {
    t.l += 10;
    var e = ia(t, r - 10);
    return {
        name: e
    };
}
var DE = [
    ["allowRefreshQuery", !1, "bool"],
    ["autoCompressPictures", !0, "bool"],
    ["backupFile", !1, "bool"],
    ["checkCompatibility", !1, "bool"],
    ["CodeName", ""],
    ["date1904", !1, "bool"],
    ["defaultThemeVersion", 0, "int"],
    ["filterPrivacy", !1, "bool"],
    ["hidePivotFieldList", !1, "bool"],
    ["promptedSolutions", !1, "bool"],
    ["publishItems", !1, "bool"],
    ["refreshAllConnections", !1, "bool"],
    ["saveExternalLinkValues", !0, "bool"],
    ["showBorderUnselectedTables", !0, "bool"],
    ["showInkAnnotation", !0, "bool"],
    ["showObjects", "all"],
    ["showPivotChartFilter", !1, "bool"],
    ["updateLinks", "userSet"]
];

function kE(t) {
    return !t.Workbook || !t.Workbook.WBProps ? "false" : jT(t.Workbook.WBProps.date1904) ? "true" : "false";
}
var FE = ":][*?/\\".split("");

function e5(t, r) {
    try {
        if (t == "") throw new Error("Sheet name cannot be blank");
        if (t.length > 31) throw new Error("Sheet name cannot exceed 31 chars");
        if (t.charCodeAt(0) == 39 || t.charCodeAt(t.length - 1) == 39) throw new Error("Sheet name cannot start or end with apostrophe (')");
        if (t.toLowerCase() == "history") throw new Error("Sheet name cannot be 'History'");
        FE.forEach(function(e) {
            if (t.indexOf(e) != -1) throw new Error("Sheet name cannot contain : \\ / ? * [ ]");
        });
    } catch (e) {
        if (r) return !1;
        throw e;
    }
    return !0;
}

function EE(t, r, e) {
    t.forEach(function(i, n) {
        e5(i);
        for (var a = 0; a < n; ++a)
            if (i == t[a]) throw new Error("Duplicate Sheet Name: " + i);
        if (e) {
            var o = r && r[n] && r[n].CodeName || i;
            if (o.charCodeAt(0) == 95 && o.length > 22) throw new Error("Bad Code Name: Worksheet" + o);
        }
    });
}

function PE(t) {
    if (!t || !t.SheetNames || !t.Sheets) throw new Error("Invalid Workbook");
    if (!t.SheetNames.length) throw new Error("Workbook is empty");
    var r = t.Workbook && t.Workbook.Sheets || [];
    EE(t.SheetNames, r, !!t.vbaraw);
    for (var e = 0; e < t.SheetNames.length; ++e) e6(t.Sheets[t.SheetNames[e]], t.SheetNames[e], e);
    t.SheetNames.forEach(function(i, n) {
        var a = t.Sheets[i];
        if (!(!a || !a["!autofilter"])) {
            var o;
            t.Workbook || (t.Workbook = {}), t.Workbook.Names || (t.Workbook.Names = []), t.Workbook.Names.forEach(function(l) {
                l.Name == "_xlnm._FilterDatabase" && l.Sheet == n && (o = l);
            });
            var s = Sf(i) + "!" + wf(a["!autofilter"].ref);
            o ? o.Ref = s : t.Workbook.Names.push({
                Name: "_xlnm._FilterDatabase",
                Sheet: n,
                Ref: s
            });
        }
    });
}

function IE(t) {
    var r = [dn];
    r[r.length] = ut("workbook", null, {
        xmlns: z0[0],
        "xmlns:r": Pn.r
    });
    var e = t.Workbook && (t.Workbook.Names || []).length > 0,
        i = {
            codeName: "ThisWorkbook"
        };
    t.Workbook && t.Workbook.WBProps && (DE.forEach(function(s) {
        t.Workbook.WBProps[s[0]] != null && t.Workbook.WBProps[s[0]] != s[1] && (i[s[0]] = t.Workbook.WBProps[s[0]]);
    }), t.Workbook.WBProps.CodeName && (i.codeName = t.Workbook.WBProps.CodeName, delete i.CodeName)), r[r.length] = ut("workbookPr", null, i);
    var n = t.Workbook && t.Workbook.Sheets || [],
        a = 0;
    if (n && n[0] && n[0].Hidden) {
        for (r[r.length] = "<bookViews>", a = 0; a != t.SheetNames.length && !(!n[a] || !n[a].Hidden); ++a);
        a == t.SheetNames.length && (a = 0), r[r.length] = '<workbookView firstSheet="' + a + '" activeTab="' + a + '"/>', r[r.length] = "</bookViews>";
    }
    for (r[r.length] = "<sheets>", a = 0; a != t.SheetNames.length; ++a) {
        var o = {
            name: kr(t.SheetNames[a].slice(0, 31))
        };
        if (o.sheetId = "" + (a + 1), o["r:id"] = "rId" + (a + 1), n[a]) switch (n[a].Hidden) {
            case 1:
                o.state = "hidden";
                break;
            case 2:
                o.state = "veryHidden";
                break;
        }
        r[r.length] = ut("sheet", null, o);
    }
    return r[r.length] = "</sheets>", e && (r[r.length] = "<definedNames>", t.Workbook && t.Workbook.Names && t.Workbook.Names.forEach(function(s) {
        var l = {
            name: s.Name
        };
        s.Comment && (l.comment = s.Comment), s.Sheet != null && (l.localSheetId = "" + s.Sheet), s.Hidden && (l.hidden = "1"), s.Ref && (r[r.length] = ut("definedName", kr(s.Ref), l));
    }), r[r.length] = "</definedNames>"), r.length > 2 && (r[r.length] = "</workbook>", r[1] = r[1].replace("/>", ">")), r.join("");
}

function OE(t, r) {
    var e = {};
    return e.Hidden = t.read_shift(4), e.iTabID = t.read_shift(4), e.strRelID = wg(t, r - 8), e.name = ia(t), e;
}

function NE(t, r) {
    return r || (r = Ue(127)), r.write_shift(4, t.Hidden), r.write_shift(4, t.iTabID), jg(t.strRelID, r), An(t.name.slice(0, 31), r), r.length > r.l ? r.slice(0, r.l) : r;
}

function LE(t, r) {
    var e = {},
        i = t.read_shift(4);
    e.defaultThemeVersion = t.read_shift(4);
    var n = r > 8 ? ia(t) : "";
    return n.length > 0 && (e.CodeName = n), e.autoCompressPictures = !!(i & 65536), e.backupFile = !!(i & 64), e.checkCompatibility = !!(i & 4096), e.date1904 = !!(i & 1), e.filterPrivacy = !!(i & 8), e.hidePivotFieldList = !!(i & 1024), e.promptedSolutions = !!(i & 16), e.publishItems = !!(i & 2048), e.refreshAllConnections = !!(i & 262144), e.saveExternalLinkValues = !!(i & 128), e.showBorderUnselectedTables = !!(i & 4), e.showInkAnnotation = !!(i & 32), e.showObjects = ["all", "placeholders", "none"][i >> 13 & 3], e.showPivotChartFilter = !!(i & 32768), e.updateLinks = ["userSet", "never", "always"][i >> 8 & 3], e;
}

function RE(t, r) {
    r || (r = Ue(72));
    var e = 0;
    return t && (t.date1904 && (e |= 1), t.filterPrivacy && (e |= 8)), r.write_shift(4, e), r.write_shift(4, 0), vw(t && t.CodeName || "ThisWorkbook", r), r.slice(0, r.l);
}

function ME(t, r, e) {
    var i = t.l + r,
        n = t.read_shift(4);
    t.l += 1;
    var a = t.read_shift(4),
        o = pD(t),
        s, l = "";
    try {
        s = BF(t, 0, e);
        try {
            l = Bp(t);
        } catch {}
    } catch {
        console.error("Could not parse defined name " + o);
    }
    n & 32 && (o = "_xlnm." + o), t.l = i;
    var c = {
        Name: o,
        Ptg: s,
        Flags: n
    };
    return a < 268435455 && (c.Sheet = a), l && (c.Comment = l), c;
}

function BE(t, r) {
    var e = Ue(9),
        i = 0,
        n = t.Name;
    TD.indexOf(n) > -1 && (i |= 32, n = n.slice(6)), e.write_shift(4, i), e.write_shift(1, 0), e.write_shift(4, t.Sheet == null ? 4294967295 : t.Sheet);
    var a = [e, An(n), ZF(t.Ref, r)];
    if (t.Comment) a.push(Cf(t.Comment));
    else {
        var o = Ue(4);
        o.write_shift(4, 4294967295), a.push(o);
    }
    return un(a);
}

function UE(t, r) {
    Ze(t, 143);
    for (var e = 0; e != r.SheetNames.length; ++e) {
        var i = r.Workbook && r.Workbook.Sheets && r.Workbook.Sheets[e] && r.Workbook.Sheets[e].Hidden || 0,
            n = {
                Hidden: i,
                iTabID: e + 1,
                strRelID: "rId" + (e + 1),
                name: r.SheetNames[e]
            };
        Ze(t, 156, NE(n));
    }
    Ze(t, 144);
}

function VE(t, r) {
    r || (r = Ue(127));
    for (var e = 0; e != 4; ++e) r.write_shift(4, 0);
    return An("SheetJS", r), An(xf.version, r), An(xf.version, r), An("7262", r), r.length > r.l ? r.slice(0, r.l) : r;
}

function zE(t, r) {
    r || (r = Ue(29)), r.write_shift(-4, 0), r.write_shift(-4, 460), r.write_shift(4, 28800), r.write_shift(4, 17600), r.write_shift(4, 500), r.write_shift(4, t), r.write_shift(4, t);
    var e = 120;
    return r.write_shift(1, e), r.length > r.l ? r.slice(0, r.l) : r;
}

function WE(t, r) {
    if (!(!r.Workbook || !r.Workbook.Sheets)) {
        for (var e = r.Workbook.Sheets, i = 0, n = -1, a = -1; i < e.length; ++i) !e[i] || !e[i].Hidden && n == -1 ? n = i : e[i].Hidden == 1 && a == -1 && (a = i);
        a > n || (Ze(t, 135), Ze(t, 158, zE(n)), Ze(t, 136));
    }
}

function jE(t, r) {
    !r.Workbook || !r.Workbook.Names || r.Workbook.Names.forEach(function(e) {
        try {
            if (e.Flags & 14) return;
            Ze(t, 39, BE(e, r));
        } catch {
            console.error("Could not serialize defined name " + JSON.stringify(e));
        }
    });
}

function HE(t) {
    var r = t.SheetNames.length,
        e = Ue(12 * r + 28);
    e.write_shift(4, r + 2), e.write_shift(4, 0), e.write_shift(4, -2), e.write_shift(4, -2), e.write_shift(4, 0), e.write_shift(4, -1), e.write_shift(4, -1);
    for (var i = 0; i < r; ++i) e.write_shift(4, 0), e.write_shift(4, i), e.write_shift(4, i);
    return e;
}

function GE(t, r) {
    Ze(t, 353), Ze(t, 357), Ze(t, 362, HE(r, 0)), Ze(t, 354);
}

function qE(t, r) {
    var e = ra();
    return Ze(e, 131), Ze(e, 128, VE()), Ze(e, 153, RE(t.Workbook && t.Workbook.WBProps || null)), WE(e, t, r), UE(e, t, r), GE(e, t), (t.Workbook || {}).Names && jE(e, t), Ze(e, 132), e.end();
}

function XE(t, r) {
    var e = [];
    return t.Props && e.push(PD(t.Props, r)), t.Custprops && e.push(ID(t.Props, t.Custprops, r)), e.join("");
}

function KE(t) {
    return (((t || {}).Workbook || {}).WBProps || {}).date1904 ? '<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"><Date1904/></ExcelWorkbook>' : "";
}

function YE(t, r) {
    var e = ['<Style ss:ID="Default" ss:Name="Normal"><NumberFormat/></Style>'];
    return r.cellXfs.forEach(function(i, n) {
        var a = [];
        a.push(ut("NumberFormat", null, {
            "ss:Format": kr(Di[i.numFmtId])
        }));
        var o = {
            "ss:ID": "s" + (21 + n)
        };
        e.push(ut("Style", a.join(""), o));
    }), ut("Styles", e.join(""));
}

function t5(t) {
    return ut("NamedRange", null, {
        "ss:Name": t.Name.slice(0, 6) == "_xlnm." ? t.Name.slice(6) : t.Name,
        "ss:RefersTo": "=" + Vp(t.Ref, {
            r: 0,
            c: 0
        })
    });
}

function ZE(t) {
    if (!((t || {}).Workbook || {}).Names) return "";
    for (var r = t.Workbook.Names, e = [], i = 0; i < r.length; ++i) {
        var n = r[i];
        n.Sheet == null && (n.Name.match(/^_xlfn\./) || e.push(t5(n)));
    }
    return ut("Names", e.join(""));
}

function JE(t, r, e, i) {
    if (!t || !((i || {}).Workbook || {}).Names) return "";
    for (var n = i.Workbook.Names, a = [], o = 0; o < n.length; ++o) {
        var s = n[o];
        s.Sheet == e && (s.Name.match(/^_xlfn\./) || a.push(t5(s)));
    }
    return a.join("");
}

function QE(t, r, e, i) {
    if (!t) return "";
    var n = [];
    if (t["!margins"] && (n.push("<PageSetup>"), t["!margins"].header && n.push(ut("Header", null, {
            "x:Margin": t["!margins"].header
        })), t["!margins"].footer && n.push(ut("Footer", null, {
            "x:Margin": t["!margins"].footer
        })), n.push(ut("PageMargins", null, {
            "x:Bottom": t["!margins"].bottom || "0.75",
            "x:Left": t["!margins"].left || "0.7",
            "x:Right": t["!margins"].right || "0.7",
            "x:Top": t["!margins"].top || "0.75"
        })), n.push("</PageSetup>")), i && i.Workbook && i.Workbook.Sheets && i.Workbook.Sheets[e])
        if (i.Workbook.Sheets[e].Hidden) n.push(ut("Visible", i.Workbook.Sheets[e].Hidden == 1 ? "SheetHidden" : "SheetVeryHidden", {}));
        else {
            for (var a = 0; a < e && !(i.Workbook.Sheets[a] && !i.Workbook.Sheets[a].Hidden); ++a);
            a == e && n.push("<Selected/>");
        }
    return ((((i || {}).Workbook || {}).Views || [])[0] || {}).RTL && n.push("<DisplayRightToLeft/>"), t["!protect"] && (n.push(Vn("ProtectContents", "True")), t["!protect"].objects && n.push(Vn("ProtectObjects", "True")), t["!protect"].scenarios && n.push(Vn("ProtectScenarios", "True")), t["!protect"].selectLockedCells != null && !t["!protect"].selectLockedCells ? n.push(Vn("EnableSelection", "NoSelection")) : t["!protect"].selectUnlockedCells != null && !t["!protect"].selectUnlockedCells && n.push(Vn("EnableSelection", "UnlockedCells")), [
        ["formatCells", "AllowFormatCells"],
        ["formatColumns", "AllowSizeCols"],
        ["formatRows", "AllowSizeRows"],
        ["insertColumns", "AllowInsertCols"],
        ["insertRows", "AllowInsertRows"],
        ["insertHyperlinks", "AllowInsertHyperlinks"],
        ["deleteColumns", "AllowDeleteCols"],
        ["deleteRows", "AllowDeleteRows"],
        ["sort", "AllowSort"],
        ["autoFilter", "AllowFilter"],
        ["pivotTables", "AllowUsePivotTables"]
    ].forEach(function(o) {
        t["!protect"][o[0]] && n.push("<" + o[1] + "/>");
    })), n.length == 0 ? "" : ut("WorksheetOptions", n.join(""), {
        xmlns: Xa.x
    });
}

function $E(t) {
    return t.map(function(r) {
        var e = WT(r.t || ""),
            i = ut("ss:Data", e, {
                xmlns: "http://www.w3.org/TR/REC-html40"
            }),
            n = {};
        return r.a && (n["ss:Author"] = r.a), t.hidden || (n["ss:ShowAlways"] = "1"), ut("Comment", i, n);
    }).join("");
}

function eP(t, r, e, i, n, a, o) {
    if (!t || t.v == null && t.f == null) return "";
    var s = {};
    if (t.f && (s["ss:Formula"] = "=" + kr(Vp(t.f, o))), t.F && t.F.slice(0, r.length) == r) {
        var l = Li(t.F.slice(r.length + 1));
        s["ss:ArrayRange"] = "RC:R" + (l.r == o.r ? "" : "[" + (l.r - o.r) + "]") + "C" + (l.c == o.c ? "" : "[" + (l.c - o.c) + "]");
    }
    if (t.l && t.l.Target && (s["ss:HRef"] = kr(t.l.Target), t.l.Tooltip && (s["x:HRefScreenTip"] = kr(t.l.Tooltip))), e["!merges"])
        for (var c = e["!merges"], u = 0; u != c.length; ++u) c[u].s.c != o.c || c[u].s.r != o.r || (c[u].e.c > c[u].s.c && (s["ss:MergeAcross"] = c[u].e.c - c[u].s.c), c[u].e.r > c[u].s.r && (s["ss:MergeDown"] = c[u].e.r - c[u].s.r));
    var h = "",
        d = "";
    switch (t.t) {
        case "z":
            if (!i.sheetStubs) return "";
            break;
        case "n":
            isFinite(t.v) ? (h = "Number", d = String(t.v)) : (h = "Error", d = xa[isNaN(t.v) ? 36 : 7]);
            break;
        case "b":
            h = "Boolean", d = t.v ? "1" : "0";
            break;
        case "e":
            h = "Error", d = xa[t.v];
            break;
        case "d":
            h = "DateTime", d = new Date(t.v).toISOString(), t.z == null && (t.z = t.z || Di[14]);
            break;
        case "s":
            h = "String", d = zT(t.v || "");
            break;
    }
    var f = Ml(i.cellXfs, t, i);
    s["ss:StyleID"] = "s" + (21 + f), s["ss:Index"] = o.c + 1;
    var m = t.v != null ? d : "",
        _ = t.t == "z" ? "" : '<Data ss:Type="' + h + '">' + m + "</Data>";
    return (t.c || []).length > 0 && (_ += $E(t.c)), ut("Cell", _, s);
}

function tP(t, r) {
    var e = '<Row ss:Index="' + (t + 1) + '"';
    return r && (r.hpt && !r.hpx && (r.hpx = Bw(r.hpt)), r.hpx && (e += ' ss:AutoFitHeight="0" ss:Height="' + r.hpx + '"'), r.hidden && (e += ' ss:Hidden="1"')), e + ">";
}

function rP(t, r, e, i) {
    if (!t["!ref"]) return "";
    var n = ki(t["!ref"]),
        a = t["!merges"] || [],
        o = 0,
        s = [];
    t["!cols"] && t["!cols"].forEach(function(x, g) {
        qg(x);
        var b = !!x.width,
            w = jp(g, x),
            T = {
                "ss:Index": g + 1
            };
        b && (T["ss:Width"] = Cp(w.width)), x.hidden && (T["ss:Hidden"] = "1"), s.push(ut("Column", null, T));
    });
    for (var l = t["!data"] != null, c = {
            r: 0,
            c: 0
        }, u = n.s.r; u <= n.e.r; ++u) {
        var h = [tP(u, (t["!rows"] || [])[u])];
        c.r = u;
        for (var d = n.s.c; d <= n.e.c; ++d) {
            c.c = d;
            var f = !1;
            for (o = 0; o != a.length; ++o)
                if (!(a[o].s.c > d) && !(a[o].s.r > u) && !(a[o].e.c < d) && !(a[o].e.r < u)) {
                    (a[o].s.c != d || a[o].s.r != u) && (f = !0);
                    break;
                }
            if (!f) {
                var m = ui(d) + di(u),
                    _ = l ? (t["!data"][u] || [])[d] : t[m];
                h.push(eP(_, m, t, r, e, i, c));
            }
        }
        h.push("</Row>"), h.length > 2 && s.push(h.join(""));
    }
    return s.join("");
}

function iP(t, r, e) {
    var i = [],
        n = e.SheetNames[t],
        a = e.Sheets[n],
        o = a ? JE(a, r, t, e) : "";
    return o.length > 0 && i.push("<Names>" + o + "</Names>"), o = a ? rP(a, r, t, e) : "", o.length > 0 && i.push("<Table>" + o + "</Table>"), i.push(QE(a, r, t, e)), a && a["!autofilter"] && i.push('<AutoFilter x:Range="' + Vp(wf(a["!autofilter"].ref), {
        r: 0,
        c: 0
    }) + '" xmlns="urn:schemas-microsoft-com:office:excel"></AutoFilter>'), i.join("");
}

function nP(t, r) {
    r || (r = {}), t.SSF || (t.SSF = na(Di)), t.SSF && (Np(), Op(t.SSF), r.revssf = Lp(t.SSF), r.revssf[t.SSF[65535]] = 0, r.ssf = t.SSF, r.cellXfs = [], Ml(r.cellXfs, {}, {
        revssf: {
            General: 0
        }
    }));
    var e = [];
    e.push(XE(t, r)), e.push(KE(t, r)), e.push(""), e.push(ZE(t, r));
    for (var i = 0; i < t.SheetNames.length; ++i) e.push(ut("Worksheet", iP(i, r, t), {
        "ss:Name": kr(t.SheetNames[i])
    }));
    return e[2] = YE(t, r), dn + ut("Workbook", e.join(""), {
        xmlns: Xa.ss,
        "xmlns:o": Xa.o,
        "xmlns:x": Xa.x,
        "xmlns:ss": Xa.ss,
        "xmlns:dt": Xa.dt,
        "xmlns:html": Xa.html
    });
}
var gg = {
    SI: "e0859ff2f94f6810ab9108002b27b3d9",
    DSI: "02d5cdd59c2e1b10939708002b2cf9ae",
    UDI: "05d5cdd59c2e1b10939708002b2cf9ae"
};

function aP(t, r) {
    var e = [],
        i = [],
        n = [],
        a = 0,
        o, s = hb(Sb, "n"),
        l = hb(Cb, "n");
    if (t.Props)
        for (o = fn(t.Props), a = 0; a < o.length; ++a)(Object.prototype.hasOwnProperty.call(s, o[a]) ? e : Object.prototype.hasOwnProperty.call(l, o[a]) ? i : n).push([o[a], t.Props[o[a]]]);
    if (t.Custprops)
        for (o = fn(t.Custprops), a = 0; a < o.length; ++a) Object.prototype.hasOwnProperty.call(t.Props || {}, o[a]) || (Object.prototype.hasOwnProperty.call(s, o[a]) ? e : Object.prototype.hasOwnProperty.call(l, o[a]) ? i : n).push([o[a], t.Custprops[o[a]]]);
    var c = [];
    for (a = 0; a < n.length; ++a) Fw.indexOf(n[a][0]) > -1 || Tw.indexOf(n[a][0]) > -1 || n[a][1] != null && c.push(n[a]);
    i.length && _i.utils.cfb_add(r, "/SummaryInformation", Fb(i, gg.SI, l, Cb)), (e.length || c.length) && _i.utils.cfb_add(r, "/DocumentSummaryInformation", Fb(e, gg.DSI, s, Sb, c.length ? c : null, gg.UDI));
}

function oP(t, r) {
    var e = r || {},
        i = _i.utils.cfb_new({
            root: "R"
        }),
        n = "/Workbook";
    switch (e.bookType || "xls") {
        case "xls":
            e.bookType = "biff8";
        case "xla":
            e.bookType || (e.bookType = "xla");
        case "biff8":
            n = "/Workbook", e.biff = 8;
            break;
        case "biff5":
            n = "/Book", e.biff = 5;
            break;
        default:
            throw new Error("invalid type " + e.bookType + " for XLS CFB");
    }
    return _i.utils.cfb_add(i, n, i5(t, e)), e.biff == 8 && (t.Props || t.Custprops) && aP(t, i), e.biff == 8 && t.vbaraw && g8(i, _i.read(t.vbaraw, {
        type: typeof t.vbaraw == "string" ? "binary" : "buffer"
    })), i;
}
var sP = {
    0: {
        f: d6
    },
    1: {
        f: b6
    },
    2: {
        f: U6
    },
    3: {
        f: F6
    },
    4: {
        f: A6
    },
    5: {
        f: L6
    },
    6: {
        f: H6
    },
    7: {
        f: P6
    },
    8: {
        f: J6
    },
    9: {
        f: Z6
    },
    10: {
        f: K6
    },
    11: {
        f: Y6
    },
    12: {
        f: S6
    },
    13: {
        f: z6
    },
    14: {
        f: E6
    },
    15: {
        f: D6
    },
    16: {
        f: M6
    },
    17: {
        f: q6
    },
    18: {
        f: O6
    },
    19: {
        f: Wg
    },
    20: {},
    21: {},
    22: {},
    23: {},
    24: {},
    25: {},
    26: {},
    27: {},
    28: {},
    29: {},
    30: {},
    31: {},
    32: {},
    33: {},
    34: {},
    35: {
        T: 1
    },
    36: {
        T: -1
    },
    37: {
        T: 1
    },
    38: {
        T: -1
    },
    39: {
        f: ME
    },
    40: {},
    42: {},
    43: {
        f: Lk
    },
    44: {
        f: Ok
    },
    45: {
        f: Bk
    },
    46: {
        f: Vk
    },
    47: {
        f: Uk
    },
    48: {},
    49: {
        f: sD
    },
    50: {},
    51: {
        f: r8
    },
    52: {
        T: 1
    },
    53: {
        T: -1
    },
    54: {
        T: 1
    },
    55: {
        T: -1
    },
    56: {
        T: 1
    },
    57: {
        T: -1
    },
    58: {},
    59: {},
    60: {
        f: fk
    },
    62: {
        f: j6
    },
    63: {
        f: c8
    },
    64: {
        f: dE
    },
    65: {},
    66: {},
    67: {},
    68: {},
    69: {},
    70: {},
    128: {},
    129: {
        T: 1
    },
    130: {
        T: -1
    },
    131: {
        T: 1,
        f: us,
        p: 0
    },
    132: {
        T: -1
    },
    133: {
        T: 1
    },
    134: {
        T: -1
    },
    135: {
        T: 1
    },
    136: {
        T: -1
    },
    137: {
        T: 1,
        f: cE
    },
    138: {
        T: -1
    },
    139: {
        T: 1
    },
    140: {
        T: -1
    },
    141: {
        T: 1
    },
    142: {
        T: -1
    },
    143: {
        T: 1
    },
    144: {
        T: -1
    },
    145: {
        T: 1
    },
    146: {
        T: -1
    },
    147: {
        f: _6
    },
    148: {
        f: g6,
        p: 16
    },
    151: {
        f: iE
    },
    152: {},
    153: {
        f: LE
    },
    154: {},
    155: {},
    156: {
        f: OE
    },
    157: {},
    158: {},
    159: {
        T: 1,
        f: wk
    },
    160: {
        T: -1
    },
    161: {
        T: 1,
        f: Bc
    },
    162: {
        T: -1
    },
    163: {
        T: 1
    },
    164: {
        T: -1
    },
    165: {
        T: 1
    },
    166: {
        T: -1
    },
    167: {},
    168: {},
    169: {},
    170: {},
    171: {},
    172: {
        T: 1
    },
    173: {
        T: -1
    },
    174: {},
    175: {},
    176: {
        f: Q6
    },
    177: {
        T: 1
    },
    178: {
        T: -1
    },
    179: {
        T: 1
    },
    180: {
        T: -1
    },
    181: {
        T: 1
    },
    182: {
        T: -1
    },
    183: {
        T: 1
    },
    184: {
        T: -1
    },
    185: {
        T: 1
    },
    186: {
        T: -1
    },
    187: {
        T: 1
    },
    188: {
        T: -1
    },
    189: {
        T: 1
    },
    190: {
        T: -1
    },
    191: {
        T: 1
    },
    192: {
        T: -1
    },
    193: {
        T: 1
    },
    194: {
        T: -1
    },
    195: {
        T: 1
    },
    196: {
        T: -1
    },
    197: {
        T: 1
    },
    198: {
        T: -1
    },
    199: {
        T: 1
    },
    200: {
        T: -1
    },
    201: {
        T: 1
    },
    202: {
        T: -1
    },
    203: {
        T: 1
    },
    204: {
        T: -1
    },
    205: {
        T: 1
    },
    206: {
        T: -1
    },
    207: {
        T: 1
    },
    208: {
        T: -1
    },
    209: {
        T: 1
    },
    210: {
        T: -1
    },
    211: {
        T: 1
    },
    212: {
        T: -1
    },
    213: {
        T: 1
    },
    214: {
        T: -1
    },
    215: {
        T: 1
    },
    216: {
        T: -1
    },
    217: {
        T: 1
    },
    218: {
        T: -1
    },
    219: {
        T: 1
    },
    220: {
        T: -1
    },
    221: {
        T: 1
    },
    222: {
        T: -1
    },
    223: {
        T: 1
    },
    224: {
        T: -1
    },
    225: {
        T: 1
    },
    226: {
        T: -1
    },
    227: {
        T: 1
    },
    228: {
        T: -1
    },
    229: {
        T: 1
    },
    230: {
        T: -1
    },
    231: {
        T: 1
    },
    232: {
        T: -1
    },
    233: {
        T: 1
    },
    234: {
        T: -1
    },
    235: {
        T: 1
    },
    236: {
        T: -1
    },
    237: {
        T: 1
    },
    238: {
        T: -1
    },
    239: {
        T: 1
    },
    240: {
        T: -1
    },
    241: {
        T: 1
    },
    242: {
        T: -1
    },
    243: {
        T: 1
    },
    244: {
        T: -1
    },
    245: {
        T: 1
    },
    246: {
        T: -1
    },
    247: {
        T: 1
    },
    248: {
        T: -1
    },
    249: {
        T: 1
    },
    250: {
        T: -1
    },
    251: {
        T: 1
    },
    252: {
        T: -1
    },
    253: {
        T: 1
    },
    254: {
        T: -1
    },
    255: {
        T: 1
    },
    256: {
        T: -1
    },
    257: {
        T: 1
    },
    258: {
        T: -1
    },
    259: {
        T: 1
    },
    260: {
        T: -1
    },
    261: {
        T: 1
    },
    262: {
        T: -1
    },
    263: {
        T: 1
    },
    264: {
        T: -1
    },
    265: {
        T: 1
    },
    266: {
        T: -1
    },
    267: {
        T: 1
    },
    268: {
        T: -1
    },
    269: {
        T: 1
    },
    270: {
        T: -1
    },
    271: {
        T: 1
    },
    272: {
        T: -1
    },
    273: {
        T: 1
    },
    274: {
        T: -1
    },
    275: {
        T: 1
    },
    276: {
        T: -1
    },
    277: {},
    278: {
        T: 1
    },
    279: {
        T: -1
    },
    280: {
        T: 1
    },
    281: {
        T: -1
    },
    282: {
        T: 1
    },
    283: {
        T: 1
    },
    284: {
        T: -1
    },
    285: {
        T: 1
    },
    286: {
        T: -1
    },
    287: {
        T: 1
    },
    288: {
        T: -1
    },
    289: {
        T: 1
    },
    290: {
        T: -1
    },
    291: {
        T: 1
    },
    292: {
        T: -1
    },
    293: {
        T: 1
    },
    294: {
        T: -1
    },
    295: {
        T: 1
    },
    296: {
        T: -1
    },
    297: {
        T: 1
    },
    298: {
        T: -1
    },
    299: {
        T: 1
    },
    300: {
        T: -1
    },
    301: {
        T: 1
    },
    302: {
        T: -1
    },
    303: {
        T: 1
    },
    304: {
        T: -1
    },
    305: {
        T: 1
    },
    306: {
        T: -1
    },
    307: {
        T: 1
    },
    308: {
        T: -1
    },
    309: {
        T: 1
    },
    310: {
        T: -1
    },
    311: {
        T: 1
    },
    312: {
        T: -1
    },
    313: {
        T: -1
    },
    314: {
        T: 1
    },
    315: {
        T: -1
    },
    316: {
        T: 1
    },
    317: {
        T: -1
    },
    318: {
        T: 1
    },
    319: {
        T: -1
    },
    320: {
        T: 1
    },
    321: {
        T: -1
    },
    322: {
        T: 1
    },
    323: {
        T: -1
    },
    324: {
        T: 1
    },
    325: {
        T: -1
    },
    326: {
        T: 1
    },
    327: {
        T: -1
    },
    328: {
        T: 1
    },
    329: {
        T: -1
    },
    330: {
        T: 1
    },
    331: {
        T: -1
    },
    332: {
        T: 1
    },
    333: {
        T: -1
    },
    334: {
        T: 1
    },
    335: {
        f: e8
    },
    336: {
        T: -1
    },
    337: {
        f: a8,
        T: 1
    },
    338: {
        T: -1
    },
    339: {
        T: 1
    },
    340: {
        T: -1
    },
    341: {
        T: 1
    },
    342: {
        T: -1
    },
    343: {
        T: 1
    },
    344: {
        T: -1
    },
    345: {
        T: 1
    },
    346: {
        T: -1
    },
    347: {
        T: 1
    },
    348: {
        T: -1
    },
    349: {
        T: 1
    },
    350: {
        T: -1
    },
    351: {},
    352: {},
    353: {
        T: 1
    },
    354: {
        T: -1
    },
    355: {
        f: wg
    },
    357: {},
    358: {},
    359: {},
    360: {
        T: 1
    },
    361: {},
    362: {
        f: ok
    },
    363: {},
    364: {},
    366: {},
    367: {},
    368: {},
    369: {},
    370: {},
    371: {},
    372: {
        T: 1
    },
    373: {
        T: -1
    },
    374: {
        T: 1
    },
    375: {
        T: -1
    },
    376: {
        T: 1
    },
    377: {
        T: -1
    },
    378: {
        T: 1
    },
    379: {
        T: -1
    },
    380: {
        T: 1
    },
    381: {
        T: -1
    },
    382: {
        T: 1
    },
    383: {
        T: -1
    },
    384: {
        T: 1
    },
    385: {
        T: -1
    },
    386: {
        T: 1
    },
    387: {
        T: -1
    },
    388: {
        T: 1
    },
    389: {
        T: -1
    },
    390: {
        T: 1
    },
    391: {
        T: -1
    },
    392: {
        T: 1
    },
    393: {
        T: -1
    },
    394: {
        T: 1
    },
    395: {
        T: -1
    },
    396: {},
    397: {},
    398: {},
    399: {},
    400: {},
    401: {
        T: 1
    },
    403: {},
    404: {},
    405: {},
    406: {},
    407: {},
    408: {},
    409: {},
    410: {},
    411: {},
    412: {},
    413: {},
    414: {},
    415: {},
    416: {},
    417: {},
    418: {},
    419: {},
    420: {},
    421: {},
    422: {
        T: 1
    },
    423: {
        T: 1
    },
    424: {
        T: -1
    },
    425: {
        T: -1
    },
    426: {
        f: nE
    },
    427: {
        f: aE
    },
    428: {},
    429: {
        T: 1
    },
    430: {
        T: -1
    },
    431: {
        T: 1
    },
    432: {
        T: -1
    },
    433: {
        T: 1
    },
    434: {
        T: -1
    },
    435: {
        T: 1
    },
    436: {
        T: -1
    },
    437: {
        T: 1
    },
    438: {
        T: -1
    },
    439: {
        T: 1
    },
    440: {
        T: -1
    },
    441: {
        T: 1
    },
    442: {
        T: -1
    },
    443: {
        T: 1
    },
    444: {
        T: -1
    },
    445: {
        T: 1
    },
    446: {
        T: -1
    },
    447: {
        T: 1
    },
    448: {
        T: -1
    },
    449: {
        T: 1
    },
    450: {
        T: -1
    },
    451: {
        T: 1
    },
    452: {
        T: -1
    },
    453: {
        T: 1
    },
    454: {
        T: -1
    },
    455: {
        T: 1
    },
    456: {
        T: -1
    },
    457: {
        T: 1
    },
    458: {
        T: -1
    },
    459: {
        T: 1
    },
    460: {
        T: -1
    },
    461: {
        T: 1
    },
    462: {
        T: -1
    },
    463: {
        T: 1
    },
    464: {
        T: -1
    },
    465: {
        T: 1
    },
    466: {
        T: -1
    },
    467: {
        T: 1
    },
    468: {
        T: -1
    },
    469: {
        T: 1
    },
    470: {
        T: -1
    },
    471: {},
    472: {},
    473: {
        T: 1
    },
    474: {
        T: -1
    },
    475: {},
    476: {
        f: sE
    },
    477: {},
    478: {},
    479: {
        T: 1
    },
    480: {
        T: -1
    },
    481: {
        T: 1
    },
    482: {
        T: -1
    },
    483: {
        T: 1
    },
    484: {
        T: -1
    },
    485: {
        f: x6
    },
    486: {
        T: 1
    },
    487: {
        T: -1
    },
    488: {
        T: 1
    },
    489: {
        T: -1
    },
    490: {
        T: 1
    },
    491: {
        T: -1
    },
    492: {
        T: 1
    },
    493: {
        T: -1
    },
    494: {
        f: tE
    },
    495: {
        T: 1
    },
    496: {
        T: -1
    },
    497: {
        T: 1
    },
    498: {
        T: -1
    },
    499: {},
    500: {
        T: 1
    },
    501: {
        T: -1
    },
    502: {
        T: 1
    },
    503: {
        T: -1
    },
    504: {},
    505: {
        T: 1
    },
    506: {
        T: -1
    },
    507: {},
    508: {
        T: 1
    },
    509: {
        T: -1
    },
    510: {
        T: 1
    },
    511: {
        T: -1
    },
    512: {},
    513: {},
    514: {
        T: 1
    },
    515: {
        T: -1
    },
    516: {
        T: 1
    },
    517: {
        T: -1
    },
    518: {
        T: 1
    },
    519: {
        T: -1
    },
    520: {
        T: 1
    },
    521: {
        T: -1
    },
    522: {},
    523: {},
    524: {},
    525: {},
    526: {},
    527: {},
    528: {
        T: 1
    },
    529: {
        T: -1
    },
    530: {
        T: 1
    },
    531: {
        T: -1
    },
    532: {
        T: 1
    },
    533: {
        T: -1
    },
    534: {},
    535: {},
    536: {},
    537: {},
    538: {
        T: 1
    },
    539: {
        T: -1
    },
    540: {
        T: 1
    },
    541: {
        T: -1
    },
    542: {
        T: 1
    },
    548: {},
    549: {},
    550: {
        f: wg
    },
    551: {
        f: Bp
    },
    552: {},
    553: {},
    554: {
        T: 1
    },
    555: {
        T: -1
    },
    556: {
        T: 1
    },
    557: {
        T: -1
    },
    558: {
        T: 1
    },
    559: {
        T: -1
    },
    560: {
        T: 1
    },
    561: {
        T: -1
    },
    562: {},
    564: {},
    565: {
        T: 1
    },
    566: {
        T: -1
    },
    569: {
        T: 1
    },
    570: {
        T: -1
    },
    572: {},
    573: {
        T: 1
    },
    574: {
        T: -1
    },
    577: {},
    578: {},
    579: {},
    580: {},
    581: {},
    582: {},
    583: {},
    584: {},
    585: {},
    586: {},
    587: {},
    588: {
        T: -1
    },
    589: {},
    590: {
        T: 1
    },
    591: {
        T: -1
    },
    592: {
        T: 1
    },
    593: {
        T: -1
    },
    594: {
        T: 1
    },
    595: {
        T: -1
    },
    596: {},
    597: {
        T: 1
    },
    598: {
        T: -1
    },
    599: {
        T: 1
    },
    600: {
        T: -1
    },
    601: {
        T: 1
    },
    602: {
        T: -1
    },
    603: {
        T: 1
    },
    604: {
        T: -1
    },
    605: {
        T: 1
    },
    606: {
        T: -1
    },
    607: {},
    608: {
        T: 1
    },
    609: {
        T: -1
    },
    610: {},
    611: {
        T: 1
    },
    612: {
        T: -1
    },
    613: {
        T: 1
    },
    614: {
        T: -1
    },
    615: {
        T: 1
    },
    616: {
        T: -1
    },
    617: {
        T: 1
    },
    618: {
        T: -1
    },
    619: {
        T: 1
    },
    620: {
        T: -1
    },
    625: {},
    626: {
        T: 1
    },
    627: {
        T: -1
    },
    628: {
        T: 1
    },
    629: {
        T: -1
    },
    630: {
        T: 1
    },
    631: {
        T: -1
    },
    632: {
        f: p8
    },
    633: {
        T: 1
    },
    634: {
        T: -1
    },
    635: {
        T: 1,
        f: h8
    },
    636: {
        T: -1
    },
    637: {
        f: fD
    },
    638: {
        T: 1
    },
    639: {},
    640: {
        T: -1
    },
    641: {
        T: 1
    },
    642: {
        T: -1
    },
    643: {
        T: 1
    },
    644: {},
    645: {
        T: -1
    },
    646: {
        T: 1
    },
    648: {
        T: 1
    },
    649: {},
    650: {
        T: -1
    },
    651: {
        f: TE
    },
    652: {},
    653: {
        T: 1
    },
    654: {
        T: -1
    },
    655: {
        T: 1
    },
    656: {
        T: -1
    },
    657: {
        T: 1
    },
    658: {
        T: -1
    },
    659: {},
    660: {
        T: 1
    },
    661: {},
    662: {
        T: -1
    },
    663: {},
    664: {
        T: 1
    },
    665: {},
    666: {
        T: -1
    },
    667: {},
    668: {},
    669: {},
    671: {
        T: 1
    },
    672: {
        T: -1
    },
    673: {
        T: 1
    },
    674: {
        T: -1
    },
    675: {},
    676: {},
    677: {},
    678: {},
    679: {},
    680: {},
    681: {},
    1024: {},
    1025: {},
    1026: {
        T: 1
    },
    1027: {
        T: -1
    },
    1028: {
        T: 1
    },
    1029: {
        T: -1
    },
    1030: {},
    1031: {
        T: 1
    },
    1032: {
        T: -1
    },
    1033: {
        T: 1
    },
    1034: {
        T: -1
    },
    1035: {},
    1036: {},
    1037: {},
    1038: {
        T: 1
    },
    1039: {
        T: -1
    },
    1040: {},
    1041: {
        T: 1
    },
    1042: {
        T: -1
    },
    1043: {},
    1044: {},
    1045: {},
    1046: {
        T: 1
    },
    1047: {
        T: -1
    },
    1048: {
        T: 1
    },
    1049: {
        T: -1
    },
    1050: {},
    1051: {
        T: 1
    },
    1052: {
        T: 1
    },
    1053: {
        f: pE
    },
    1054: {
        T: 1
    },
    1055: {},
    1056: {
        T: 1
    },
    1057: {
        T: -1
    },
    1058: {
        T: 1
    },
    1059: {
        T: -1
    },
    1061: {},
    1062: {
        T: 1
    },
    1063: {
        T: -1
    },
    1064: {
        T: 1
    },
    1065: {
        T: -1
    },
    1066: {
        T: 1
    },
    1067: {
        T: -1
    },
    1068: {
        T: 1
    },
    1069: {
        T: -1
    },
    1070: {
        T: 1
    },
    1071: {
        T: -1
    },
    1072: {
        T: 1
    },
    1073: {
        T: -1
    },
    1075: {
        T: 1
    },
    1076: {
        T: -1
    },
    1077: {
        T: 1
    },
    1078: {
        T: -1
    },
    1079: {
        T: 1
    },
    1080: {
        T: -1
    },
    1081: {
        T: 1
    },
    1082: {
        T: -1
    },
    1083: {
        T: 1
    },
    1084: {
        T: -1
    },
    1085: {},
    1086: {
        T: 1
    },
    1087: {
        T: -1
    },
    1088: {
        T: 1
    },
    1089: {
        T: -1
    },
    1090: {
        T: 1
    },
    1091: {
        T: -1
    },
    1092: {
        T: 1
    },
    1093: {
        T: -1
    },
    1094: {
        T: 1
    },
    1095: {
        T: -1
    },
    1096: {},
    1097: {
        T: 1
    },
    1098: {},
    1099: {
        T: -1
    },
    1100: {
        T: 1
    },
    1101: {
        T: -1
    },
    1102: {},
    1103: {},
    1104: {},
    1105: {},
    1111: {},
    1112: {},
    1113: {
        T: 1
    },
    1114: {
        T: -1
    },
    1115: {
        T: 1
    },
    1116: {
        T: -1
    },
    1117: {},
    1118: {
        T: 1
    },
    1119: {
        T: -1
    },
    1120: {
        T: 1
    },
    1121: {
        T: -1
    },
    1122: {
        T: 1
    },
    1123: {
        T: -1
    },
    1124: {
        T: 1
    },
    1125: {
        T: -1
    },
    1126: {},
    1128: {
        T: 1
    },
    1129: {
        T: -1
    },
    1130: {},
    1131: {
        T: 1
    },
    1132: {
        T: -1
    },
    1133: {
        T: 1
    },
    1134: {
        T: -1
    },
    1135: {
        T: 1
    },
    1136: {
        T: -1
    },
    1137: {
        T: 1
    },
    1138: {
        T: -1
    },
    1139: {
        T: 1
    },
    1140: {
        T: -1
    },
    1141: {},
    1142: {
        T: 1
    },
    1143: {
        T: -1
    },
    1144: {
        T: 1
    },
    1145: {
        T: -1
    },
    1146: {},
    1147: {
        T: 1
    },
    1148: {
        T: -1
    },
    1149: {
        T: 1
    },
    1150: {
        T: -1
    },
    1152: {
        T: 1
    },
    1153: {
        T: -1
    },
    1154: {
        T: -1
    },
    1155: {
        T: -1
    },
    1156: {
        T: -1
    },
    1157: {
        T: 1
    },
    1158: {
        T: -1
    },
    1159: {
        T: 1
    },
    1160: {
        T: -1
    },
    1161: {
        T: 1
    },
    1162: {
        T: -1
    },
    1163: {
        T: 1
    },
    1164: {
        T: -1
    },
    1165: {
        T: 1
    },
    1166: {
        T: -1
    },
    1167: {
        T: 1
    },
    1168: {
        T: -1
    },
    1169: {
        T: 1
    },
    1170: {
        T: -1
    },
    1171: {},
    1172: {
        T: 1
    },
    1173: {
        T: -1
    },
    1177: {},
    1178: {
        T: 1
    },
    1180: {},
    1181: {},
    1182: {},
    2048: {
        T: 1
    },
    2049: {
        T: -1
    },
    2050: {},
    2051: {
        T: 1
    },
    2052: {
        T: -1
    },
    2053: {},
    2054: {},
    2055: {
        T: 1
    },
    2056: {
        T: -1
    },
    2057: {
        T: 1
    },
    2058: {
        T: -1
    },
    2060: {},
    2067: {},
    2068: {
        T: 1
    },
    2069: {
        T: -1
    },
    2070: {},
    2071: {},
    2072: {
        T: 1
    },
    2073: {
        T: -1
    },
    2075: {},
    2076: {},
    2077: {
        T: 1
    },
    2078: {
        T: -1
    },
    2079: {},
    2080: {
        T: 1
    },
    2081: {
        T: -1
    },
    2082: {},
    2083: {
        T: 1
    },
    2084: {
        T: -1
    },
    2085: {
        T: 1
    },
    2086: {
        T: -1
    },
    2087: {
        T: 1
    },
    2088: {
        T: -1
    },
    2089: {
        T: 1
    },
    2090: {
        T: -1
    },
    2091: {},
    2092: {},
    2093: {
        T: 1
    },
    2094: {
        T: -1
    },
    2095: {},
    2096: {
        T: 1
    },
    2097: {
        T: -1
    },
    2098: {
        T: 1
    },
    2099: {
        T: -1
    },
    2100: {
        T: 1
    },
    2101: {
        T: -1
    },
    2102: {},
    2103: {
        T: 1
    },
    2104: {
        T: -1
    },
    2105: {},
    2106: {
        T: 1
    },
    2107: {
        T: -1
    },
    2108: {},
    2109: {
        T: 1
    },
    2110: {
        T: -1
    },
    2111: {
        T: 1
    },
    2112: {
        T: -1
    },
    2113: {
        T: 1
    },
    2114: {
        T: -1
    },
    2115: {},
    2116: {},
    2117: {},
    2118: {
        T: 1
    },
    2119: {
        T: -1
    },
    2120: {},
    2121: {
        T: 1
    },
    2122: {
        T: -1
    },
    2123: {
        T: 1
    },
    2124: {
        T: -1
    },
    2125: {},
    2126: {
        T: 1
    },
    2127: {
        T: -1
    },
    2128: {},
    2129: {
        T: 1
    },
    2130: {
        T: -1
    },
    2131: {
        T: 1
    },
    2132: {
        T: -1
    },
    2133: {
        T: 1
    },
    2134: {},
    2135: {},
    2136: {},
    2137: {
        T: 1
    },
    2138: {
        T: -1
    },
    2139: {
        T: 1
    },
    2140: {
        T: -1
    },
    2141: {},
    3072: {},
    3073: {},
    4096: {
        T: 1
    },
    4097: {
        T: -1
    },
    5002: {
        T: 1
    },
    5003: {
        T: -1
    },
    5081: {
        T: 1
    },
    5082: {
        T: -1
    },
    5083: {},
    5084: {
        T: 1
    },
    5085: {
        T: -1
    },
    5086: {
        T: 1
    },
    5087: {
        T: -1
    },
    5088: {},
    5089: {},
    5090: {},
    5092: {
        T: 1
    },
    5093: {
        T: -1
    },
    5094: {},
    5095: {
        T: 1
    },
    5096: {
        T: -1
    },
    5097: {},
    5099: {},
    65535: {
        n: ""
    }
};

function $e(t, r, e, i) {
    var n = r;
    if (!isNaN(n)) {
        var a = i || (e || []).length || 0,
            o = t.next(4);
        o.write_shift(2, n), o.write_shift(2, a), a > 0 && Ug(e) && t.push(e);
    }
}

function lP(t, r, e, i) {
    var n = i || (e || []).length || 0;
    if (n <= 8224) return $e(t, r, e, n);
    var a = r;
    if (!isNaN(a)) {
        for (var o = e.parts || [], s = 0, l = 0, c = 0; c + (o[s] || 8224) <= 8224;) c += o[s] || 8224, s++;
        var u = t.next(4);
        for (u.write_shift(2, a), u.write_shift(2, c), t.push(e.slice(l, l + c)), l += c; l < n;) {
            for (u = t.next(4), u.write_shift(2, 60), c = 0; c + (o[s] || 8224) <= 8224;) c += o[s] || 8224, s++;
            u.write_shift(2, c), t.push(e.slice(l, l + c)), l += c;
        }
    }
}

function vg(t, r, e, i) {
    var n = Ue(9);
    return kf(n, t, r), Ew(e, i || "b", n), n;
}

function cP(t, r, e) {
    var i = Ue(8 + 2 * e.length);
    return kf(i, t, r), i.write_shift(1, e.length), i.write_shift(e.length, e, "sbcs"), i.l < i.length ? i.slice(0, i.l) : i;
}

function r5(t, r) {
    r.forEach(function(e) {
        var i = e[0].map(function(a) {
            return a.t;
        }).join("");
        if (i.length <= 2048) return $e(t, 28, hg(i, e[1], e[2]));
        $e(t, 28, hg(i.slice(0, 2048), e[1], e[2], i.length));
        for (var n = 2048; n < i.length; n += 2048) $e(t, 28, hg(i.slice(n, Math.min(n + 2048, i.length)), -1, -1, Math.min(2048, i.length - n)));
    });
}

function uP(t, r, e, i, n, a) {
    var o = 0;
    r.z != null && (o = n._BIFF2FmtTable.indexOf(r.z), o == -1 && (n._BIFF2FmtTable.push(r.z), o = n._BIFF2FmtTable.length - 1));
    var s = 0;
    if (r.z != null) {
        for (; s < n.cellXfs.length && n.cellXfs[s].numFmtId != o; ++s);
        s == n.cellXfs.length && n.cellXfs.push({
            numFmtId: o
        });
    }
    if (r.v != null) switch (r.t) {
        case "d":
        case "n":
            var l = r.t == "d" ? Wn(Ea(r.v, a), a) : r.v;
            n.biff == 2 && l == (l | 0) && l >= 0 && l < 65536 ? $e(t, 2, mk(e, i, l, s, o)) : isNaN(l) ? $e(t, 5, vg(e, i, 36, "e")) : isFinite(l) ? $e(t, 3, pk(e, i, l, s, o)) : $e(t, 5, vg(e, i, 7, "e"));
            return;
        case "b":
        case "e":
            $e(t, 5, vg(e, i, r.v, r.t));
            return;
        case "s":
        case "str":
            $e(t, 4, cP(e, i, r.v == null ? "" : String(r.v).slice(0, 255)));
            return;
    }
    $e(t, 1, kf(null, e, i));
}

function fP(t, r, e, i, n) {
    var a = r["!data"] != null,
        o = ki(r["!ref"] || "A1"),
        s = "",
        l = [];
    if (o.e.c > 255 || o.e.r > 16383) {
        if (i.WTF) throw new Error("Range " + (r["!ref"] || "A1") + " exceeds format limit A1:IV16384");
        o.e.c = Math.min(o.e.c, 255), o.e.r = Math.min(o.e.r, 16383);
    }
    for (var c = (((n || {}).Workbook || {}).WBProps || {}).date1904, u = [], h = [], d = o.s.c; d <= o.e.c; ++d) l[d] = ui(d);
    for (var f = o.s.r; f <= o.e.r; ++f)
        for (a && (u = r["!data"][f] || []), s = di(f), d = o.s.c; d <= o.e.c; ++d) {
            var m = a ? u[d] : r[l[d] + s];
            m && (uP(t, m, f, d, i, c), m.c && h.push([m.c, f, d]));
        }
    r5(t, h);
}

function hP(t, r) {
    for (var e = r || {}, i = ra(), n = 0, a = 0; a < t.SheetNames.length; ++a) t.SheetNames[a] == e.sheet && (n = a);
    if (n == 0 && e.sheet && t.SheetNames[0] != e.sheet) throw new Error("Sheet not found: " + e.sheet);
    $e(i, e.biff == 4 ? 1033 : e.biff == 3 ? 521 : 9, Gg(t, 16, e)), ((t.Workbook || {}).WBProps || {}).date1904 && $e(i, 34, ea(!0)), e.cellXfs = [{
        numFmtId: 0
    }], e._BIFF2FmtTable = ["General"], e._Fonts = [];
    var o = ra();
    return fP(o, t.Sheets[t.SheetNames[n]], n, e, t), e._BIFF2FmtTable.forEach(function(s) {
        e.biff <= 3 ? $e(i, 30, $D(s)) : $e(i, 1054, ek(s));
    }), e.cellXfs.forEach(function(s) {
        switch (e.biff) {
            case 2:
                $e(i, 67, rk(s));
                break;
            case 3:
                $e(i, 579, Nw(s));
                break;
            case 4:
                $e(i, 1091, ik(s));
                break;
        }
    }), delete e._BIFF2FmtTable, delete e.cellXfs, delete e._Fonts, i.push(o.end()), $e(i, 10), i.end();
}
var Ro = 1,
    co = [];

function dP() {
    var t = Ue(82 + 8 * co.length);
    t.write_shift(2, 15), t.write_shift(2, 61440), t.write_shift(4, 74 + 8 * co.length); {
        t.write_shift(2, 0), t.write_shift(2, 61446), t.write_shift(4, 16 + 8 * co.length); {
            t.write_shift(4, Ro), t.write_shift(4, co.length + 1);
            for (var r = 0, e = 0; e < co.length; ++e) r += co[e] && co[e][1] || 0;
            t.write_shift(4, r), t.write_shift(4, co.length);
        }
        co.forEach(function(i) {
            t.write_shift(4, i[0]), t.write_shift(4, i[2]);
        });
    }
    return t.write_shift(2, 51), t.write_shift(2, 61451), t.write_shift(4, 18), t.write_shift(2, 191), t.write_shift(4, 524296), t.write_shift(2, 385), t.write_shift(4, 134217793), t.write_shift(2, 448), t.write_shift(4, 134217792), t.write_shift(2, 64), t.write_shift(2, 61726), t.write_shift(4, 16), t.write_shift(4, 134217741), t.write_shift(4, 134217740), t.write_shift(4, 134217751), t.write_shift(4, 268435703), t;
}

function pP(t, r) {
    var e = [],
        i = 0,
        n = ra(),
        a = Ro,
        o;
    r.forEach(function(l, c) {
        var u = "",
            h = l[0].map(function(w) {
                return w.a && !u && (u = w.a), w.t;
            }).join("");
        ++Ro; {
            var d = Ue(150);
            d.write_shift(2, 15), d.write_shift(2, 61444), d.write_shift(4, 150), d.write_shift(2, 3234), d.write_shift(2, 61450), d.write_shift(4, 8), d.write_shift(4, Ro), d.write_shift(4, 2560), d.write_shift(2, 227), d.write_shift(2, 61451), d.write_shift(4, 84), d.write_shift(2, 128), d.write_shift(4, 0), d.write_shift(2, 139), d.write_shift(4, 2), d.write_shift(2, 191), d.write_shift(4, 524296), d.write_shift(2, 344), d.l += 4, d.write_shift(2, 385), d.write_shift(4, 134217808), d.write_shift(2, 387), d.write_shift(4, 134217808), d.write_shift(2, 389), d.write_shift(4, 268435700), d.write_shift(2, 447), d.write_shift(4, 1048592), d.write_shift(2, 448), d.write_shift(4, 134217809), d.write_shift(2, 451), d.write_shift(4, 268435700), d.write_shift(2, 513), d.write_shift(4, 134217809), d.write_shift(2, 515), d.write_shift(4, 268435700), d.write_shift(2, 575), d.write_shift(4, 196609), d.write_shift(2, 959), d.write_shift(4, 131072 | (l[0].hidden ? 2 : 0)), d.l += 2, d.write_shift(2, 61456), d.write_shift(4, 18), d.write_shift(2, 3), d.write_shift(2, l[2] + 2), d.l += 2, d.write_shift(2, l[1] + 1), d.l += 2, d.write_shift(2, l[2] + 4), d.l += 2, d.write_shift(2, l[1] + 5), d.l += 2, d.l += 2, d.write_shift(2, 61457), d.l += 4, d.l = 150, c == 0 ? o = d : $e(n, 236, d);
        }
        i += 150; {
            var f = Ue(52);
            f.write_shift(2, 21), f.write_shift(2, 18), f.write_shift(2, 25), f.write_shift(2, Ro), f.write_shift(2, 0), f.l = 22, f.write_shift(2, 13), f.write_shift(2, 22), f.write_shift(4, 1651663474), f.write_shift(4, 2503426821), f.write_shift(4, 2150634280), f.write_shift(4, 1768515844 + Ro * 256), f.write_shift(2, 0), f.write_shift(4, 0), f.l += 4, $e(n, 93, f);
        } {
            var m = Ue(8);
            m.l += 2, m.write_shift(2, 61453), m.l += 4, $e(n, 236, m);
        }
        i += 8; {
            var _ = Ue(18);
            _.write_shift(2, 18), _.l += 8, _.write_shift(2, h.length), _.write_shift(2, 16), _.l += 4, $e(n, 438, _); {
                var x = Ue(1 + h.length);
                x.write_shift(1, 0), x.write_shift(h.length, h, "sbcs"), $e(n, 60, x);
            } {
                var g = Ue(16);
                g.l += 8, g.write_shift(2, h.length), g.l += 6, $e(n, 60, g);
            }
        } {
            var b = Ue(12 + u.length);
            b.write_shift(2, l[1]), b.write_shift(2, l[2]), b.write_shift(2, 0 | (l[0].hidden ? 0 : 2)), b.write_shift(2, Ro), b.write_shift(2, u.length), b.write_shift(1, 0), b.write_shift(u.length, u, "sbcs"), b.l++, e.push(b);
        }
    }); {
        var s = Ue(80);
        s.write_shift(2, 15), s.write_shift(2, 61442), s.write_shift(4, i + s.length - 8), s.write_shift(2, 16), s.write_shift(2, 61448), s.write_shift(4, 8), s.write_shift(4, r.length + 1), s.write_shift(4, Ro), s.write_shift(2, 15), s.write_shift(2, 61443), s.write_shift(4, i + 48), s.write_shift(2, 15), s.write_shift(2, 61444), s.write_shift(4, 40), s.write_shift(2, 1), s.write_shift(2, 61449), s.write_shift(4, 16), s.l += 16, s.write_shift(2, 2), s.write_shift(2, 61450), s.write_shift(4, 8), s.write_shift(4, a), s.write_shift(4, 5), $e(t, 236, o ? un([s, o]) : s);
    }
    t.push(n.end()), e.forEach(function(l) {
        $e(t, 28, l);
    }), co.push([a, r.length + 1, Ro]), ++Ro;
}

function mP(t, r, e) {
    $e(t, 49, YD({
        sz: 12,
        color: {
            theme: 1
        },
        name: "Arial",
        family: 2,
        scheme: "minor"
    }, e));
}

function gP(t, r, e) {
    r && [
        [5, 8],
        [23, 26],
        [41, 44],
        [50, 392]
    ].forEach(function(i) {
        for (var n = i[0]; n <= i[1]; ++n) r[n] != null && $e(t, 1054, QD(n, r[n], e));
    });
}

function vP(t, r) {
    var e = Ue(19);
    e.write_shift(4, 2151), e.write_shift(4, 0), e.write_shift(4, 0), e.write_shift(2, 3), e.write_shift(1, 1), e.write_shift(4, 0), $e(t, 2151, e), e = Ue(39), e.write_shift(4, 2152), e.write_shift(4, 0), e.write_shift(4, 0), e.write_shift(2, 3), e.write_shift(1, 0), e.write_shift(4, 0), e.write_shift(2, 1), e.write_shift(4, 4), e.write_shift(2, 0), Ow(ki(r["!ref"] || "A1"), e), e.write_shift(4, 4), $e(t, 2152, e);
}

function xP(t, r) {
    for (var e = 0; e < 16; ++e) $e(t, 224, Pb({
        numFmtId: 0,
        style: !0
    }, 0, r));
    r.cellXfs.forEach(function(i) {
        $e(t, 224, Pb(i, 0, r));
    });
}

function _P(t, r) {
    for (var e = 0; e < r["!links"].length; ++e) {
        var i = r["!links"][e];
        $e(t, 440, lk(i)), i[1].Tooltip && $e(t, 2048, ck(i));
    }
    delete r["!links"];
}

function yP(t, r) {
    if (r) {
        var e = 0;
        r.forEach(function(i, n) {
            ++e <= 256 && i && $e(t, 125, hk(jp(n, i), n));
        });
    }
}

function bP(t, r, e, i, n, a) {
    var o = 16 + Ml(n.cellXfs, r, n);
    if (r.v == null && !r.bf) {
        $e(t, 513, Nc(e, i, o));
        return;
    }
    if (r.bf) $e(t, 6, RF(r, e, i, n, o));
    else switch (r.t) {
        case "d":
        case "n":
            var s = r.t == "d" ? Wn(Ea(r.v, a), a) : r.v;
            isNaN(s) ? $e(t, 517, fg(e, i, 36, o, n, "e")) : isFinite(s) ? $e(t, 515, ak(e, i, s, o, n)) : $e(t, 517, fg(e, i, 7, o, n, "e"));
            break;
        case "b":
        case "e":
            $e(t, 517, fg(e, i, r.v, o, n, r.t));
            break;
        case "s":
        case "str":
            if (n.bookSST) {
                var l = Kg(n.Strings, r.v == null ? "" : String(r.v), n.revStrings);
                $e(t, 253, ZD(e, i, l, o, n));
            } else $e(t, 516, JD(e, i, (r.v == null ? "" : String(r.v)).slice(0, 255), o, n));
            break;
        default:
            $e(t, 513, Nc(e, i, o));
    }
}

function wP(t, r, e) {
    var i = ra(),
        n = e.SheetNames[t],
        a = e.Sheets[n] || {},
        o = (e || {}).Workbook || {},
        s = (o.Sheets || [])[t] || {},
        l = a["!data"] != null,
        c = r.biff == 8,
        u, h = "",
        d = [],
        f = ki(a["!ref"] || "A1"),
        m = c ? 65536 : 16384;
    if (f.e.c > 255 || f.e.r >= m) {
        if (r.WTF) throw new Error("Range " + (a["!ref"] || "A1") + " exceeds format limit A1:IV" + m);
        f.e.c = Math.min(f.e.c, 255), f.e.r = Math.min(f.e.r, m - 1);
    }
    $e(i, 2057, Gg(e, 16, r)), $e(i, 13, uo(1)), $e(i, 12, uo(100)), $e(i, 15, ea(!0)), $e(i, 17, ea(!1)), $e(i, 16, Oc(.001)), $e(i, 95, ea(!0)), $e(i, 42, ea(!1)), $e(i, 43, ea(!1)), $e(i, 130, uo(1)), $e(i, 128, nk([0, 0])), $e(i, 131, ea(!1)), $e(i, 132, ea(!1)), c && yP(i, a["!cols"]), $e(i, 512, tk(f, r));
    var _ = (((e || {}).Workbook || {}).WBProps || {}).date1904;
    c && (a["!links"] = []);
    for (var x = f.s.c; x <= f.e.c; ++x) d[x] = ui(x);
    for (var g = [], b = [], w = f.s.r; w <= f.e.r; ++w)
        for (l && (b = a["!data"][w] || []), h = di(w), x = f.s.c; x <= f.e.c; ++x) {
            var T = l ? b[x] : a[d[x] + h];
            T && (bP(i, T, w, x, r, _), c && T.l && a["!links"].push([d[x] + h, T.l]), T.c && g.push([T.c, w, x]));
        }
    var E = s.CodeName || s.name || n;
    return c ? pP(i, g) : r5(i, g), c && $e(i, 574, KD((o.Views || [])[0])), c && (a["!merges"] || []).length && $e(i, 229, sk(a["!merges"])), c && _P(i, a), $e(i, 442, Iw(E, r)), c && vP(i, a), $e(i, 10), i.end();
}

function SP(t, r, e) {
    var i = ra(),
        n = (t || {}).Workbook || {},
        a = n.Sheets || [],
        o = n.WBProps || {},
        s = e.biff == 8,
        l = e.biff == 5;
    if ($e(i, 2057, Gg(t, 5, e)), e.bookType == "xla" && $e(i, 135), $e(i, 225, s ? uo(1200) : null), $e(i, 193, LD(2)), l && $e(i, 191), l && $e(i, 192), $e(i, 226), $e(i, 92, HD("SheetJS", e)), $e(i, 66, uo(s ? 1200 : 1252)), s && $e(i, 353, uo(0)), s && $e(i, 448), $e(i, 317, dk(t.SheetNames.length)), s && t.vbaraw && $e(i, 211), s && t.vbaraw) {
        var c = o.CodeName || "ThisWorkbook";
        $e(i, 442, Iw(c, e));
    }
    $e(i, 156, uo(17)), $e(i, 25, ea(!1)), $e(i, 18, ea(!1)), $e(i, 19, uo(0)), s && $e(i, 431, ea(!1)), s && $e(i, 444, uo(0)), $e(i, 61, XD(e)), $e(i, 64, ea(!1)), $e(i, 141, uo(0)), $e(i, 34, ea(kE(t) == "true")), $e(i, 14, ea(!0)), s && $e(i, 439, ea(!1)), $e(i, 218, uo(0)), mP(i, t, e), gP(i, t.SSF, e), xP(i, e), s && $e(i, 352, ea(!1));
    var u = i.end(),
        h = ra();
    s && $e(h, 140, uk()), s && co.length && $e(h, 235, dP()), s && e.Strings && lP(h, 252, qD(e.Strings, e)), $e(h, 10);
    var d = h.end(),
        f = ra(),
        m = 0,
        _ = 0;
    for (_ = 0; _ < t.SheetNames.length; ++_) m += (s ? 12 : 11) + (s ? 2 : 1) * t.SheetNames[_].length;
    var x = u.length + m + d.length;
    for (_ = 0; _ < t.SheetNames.length; ++_) {
        var g = a[_] || {};
        $e(f, 133, GD({
            pos: x,
            hs: g.Hidden || 0,
            dt: 0,
            name: t.SheetNames[_]
        }, e)), x += r[_].length;
    }
    var b = f.end();
    if (m != b.length) throw new Error("BS8 " + m + " != " + b.length);
    var w = [];
    return u.length && w.push(u), b.length && w.push(b), d.length && w.push(d), un(w);
}

function CP(t, r) {
    var e = r || {},
        i = [];
    t && !t.SSF && (t.SSF = na(Di)), t && t.SSF && (Np(), Op(t.SSF), e.revssf = Lp(t.SSF), e.revssf[t.SSF[65535]] = 0, e.ssf = t.SSF), Ro = 1, co = [], e.Strings = [], e.Strings.Count = 0, e.Strings.Unique = 0, Yg(e), e.cellXfs = [], Ml(e.cellXfs, {}, {
        revssf: {
            General: 0
        }
    }), t.Props || (t.Props = {});
    for (var n = 0; n < t.SheetNames.length; ++n) i[i.length] = wP(n, e, t);
    return i.unshift(SP(t, i, e)), un(i);
}

function i5(t, r) {
    for (var e = 0; e <= t.SheetNames.length; ++e) {
        var i = t.Sheets[t.SheetNames[e]];
        if (!(!i || !i["!ref"])) {
            var n = zn(i["!ref"]);
            n.e.c > 255 && typeof console < "u" && console.error && console.error("Worksheet '" + t.SheetNames[e] + "' extends beyond column IV (255).  Data may be lost."), n.e.r > 65535 && typeof console < "u" && console.error && console.error("Worksheet '" + t.SheetNames[e] + "' extends beyond row 65536.  Data may be lost.");
        }
    }
    var a = r || {};
    switch (a.biff || 2) {
        case 8:
        case 5:
            return CP(t, r);
        case 4:
        case 3:
        case 2:
            return hP(t, r);
    }
    throw new Error("invalid type " + a.bookType + " for BIFF");
}

function AP(t, r, e, i) {
    for (var n = t["!merges"] || [], a = [], o = {}, s = t["!data"] != null, l = r.s.c; l <= r.e.c; ++l) {
        for (var c = 0, u = 0, h = 0; h < n.length; ++h)
            if (!(n[h].s.r > e || n[h].s.c > l) && !(n[h].e.r < e || n[h].e.c < l)) {
                if (n[h].s.r < e || n[h].s.c < l) {
                    c = -1;
                    break;
                }
                c = n[h].e.r - n[h].s.r + 1, u = n[h].e.c - n[h].s.c + 1;
                break;
            }
        if (!(c < 0)) {
            var d = ui(l) + di(e),
                f = s ? (t["!data"][e] || [])[l] : t[d];
            f && f.t == "n" && f.v != null && !isFinite(f.v) && (isNaN(f.v) ? f = {
                t: "e",
                v: 36,
                w: xa[36]
            } : f = {
                t: "e",
                v: 7,
                w: xa[7]
            });
            var m = f && f.v != null && (f.h || sg(f.w || (Xs(f), f.w) || "")) || "";
            o = {}, c > 1 && (o.rowspan = c), u > 1 && (o.colspan = u), i.editable ? m = '<span contenteditable="true">' + m + "</span>" : f && (o["data-t"] = f && f.t || "z", f.v != null && (o["data-v"] = sg(f.v instanceof Date ? f.v.toISOString() : f.v)), f.z != null && (o["data-z"] = f.z), f.l && (f.l.Target || "#").charAt(0) != "#" && (m = '<a href="' + sg(f.l.Target) + '">' + m + "</a>")), o.id = (i.id || "sjs") + "-" + d, a.push(ut("td", m, o));
        }
    }
    var _ = "<tr>";
    return _ + a.join("") + "</tr>";
}
var TP = '<html><head><meta charset="utf-8"/><title>SheetJS Table Export</title></head><body>',
    DP = "</body></html>";

function kP(t, r, e) {
    var i = [];
    return i.join("") + "<table" + (e && e.id ? ' id="' + e.id + '"' : "") + ">";
}

function n5(t, r) {
    var e = r || {},
        i = e.header != null ? e.header : TP,
        n = e.footer != null ? e.footer : DP,
        a = [i],
        o = zn(t["!ref"] || "A1");
    if (a.push(kP(t, o, e)), t["!ref"])
        for (var s = o.s.r; s <= o.e.r; ++s) a.push(AP(t, o, s, e));
    return a.push("</table>" + n), a.join("");
}

function a5(t, r, e) {
    var i = r.rows;
    if (!i) throw "Unsupported origin when " + r.tagName + " is not a TABLE";
    var n = e || {},
        a = t["!data"] != null,
        o = 0,
        s = 0;
    if (n.origin != null)
        if (typeof n.origin == "number") o = n.origin;
        else {
            var l = typeof n.origin == "string" ? Li(n.origin) : n.origin;
            o = l.r, s = l.c;
        }
    var c = Math.min(n.sheetRows || 1e7, i.length),
        u = {
            s: {
                r: 0,
                c: 0
            },
            e: {
                r: o,
                c: s
            }
        };
    if (t["!ref"]) {
        var h = zn(t["!ref"]);
        u.s.r = Math.min(u.s.r, h.s.r), u.s.c = Math.min(u.s.c, h.s.c), u.e.r = Math.max(u.e.r, h.e.r), u.e.c = Math.max(u.e.c, h.e.c), o == -1 && (u.e.r = o = h.e.r + 1);
    }
    var d = [],
        f = 0,
        m = t["!rows"] || (t["!rows"] = []),
        _ = 0,
        x = 0,
        g = 0,
        b = 0,
        w = 0,
        T = 0;
    for (t["!cols"] || (t["!cols"] = []); _ < i.length && x < c; ++_) {
        var E = i[_];
        if (Wb(E)) {
            if (n.display) continue;
            m[x] = {
                hidden: !0
            };
        }
        var L = E.cells;
        for (g = b = 0; g < L.length; ++g) {
            var P = L[g];
            if (!(n.display && Wb(P))) {
                var k = P.hasAttribute("data-v") ? P.getAttribute("data-v") : P.hasAttribute("v") ? P.getAttribute("v") : HT(P.innerHTML),
                    A = P.getAttribute("data-z") || P.getAttribute("z");
                for (f = 0; f < d.length; ++f) {
                    var N = d[f];
                    N.s.c == b + s && N.s.r < x + o && x + o <= N.e.r && (b = N.e.c + 1 - s, f = -1);
                }
                T = +P.getAttribute("colspan") || 1, ((w = +P.getAttribute("rowspan") || 1) > 1 || T > 1) && d.push({
                    s: {
                        r: x + o,
                        c: b + s
                    },
                    e: {
                        r: x + o + (w || 1) - 1,
                        c: b + s + (T || 1) - 1
                    }
                });
                var C = {
                        t: "s",
                        v: k
                    },
                    F = P.getAttribute("data-t") || P.getAttribute("t") || "";
                k != null && (k.length == 0 ? C.t = F || "z" : n.raw || k.trim().length == 0 || F == "s" || (F == "e" && xa[+k] ? C = {
                    t: "e",
                    v: +k,
                    w: xa[+k]
                } : k === "TRUE" ? C = {
                    t: "b",
                    v: !0
                } : k === "FALSE" ? C = {
                    t: "b",
                    v: !1
                } : isNaN(Hs(k)) ? isNaN(yp(k).getDate()) ? k.charCodeAt(0) == 35 && cs[k] != null && (C = {
                    t: "e",
                    v: cs[k],
                    w: k
                }) : (C = {
                    t: "d",
                    v: Ea(k)
                }, n.UTC && (C.v = Rp(C.v)), n.cellDates || (C = {
                    t: "n",
                    v: Wn(C.v)
                }), C.z = n.dateNF || Di[14]) : C = {
                    t: "n",
                    v: Hs(k)
                })), C.z === void 0 && A != null && (C.z = A);
                var W = "",
                    I = P.getElementsByTagName("A");
                if (I && I.length)
                    for (var U = 0; U < I.length && !(I[U].hasAttribute("href") && (W = I[U].getAttribute("href"), W.charAt(0) != "#")); ++U);
                W && W.charAt(0) != "#" && W.slice(0, 11).toLowerCase() != "javascript:" && (C.l = {
                    Target: W
                }), a ? (t["!data"][x + o] || (t["!data"][x + o] = []), t["!data"][x + o][b + s] = C) : t[Bi({
                    c: b + s,
                    r: x + o
                })] = C, u.e.c < b + s && (u.e.c = b + s), b += T;
            }
        }++x;
    }
    return d.length && (t["!merges"] = (t["!merges"] || []).concat(d)), u.e.r = Math.max(u.e.r, x - 1 + o), t["!ref"] = hn(u), x >= c && (t["!fullref"] = hn((u.e.r = i.length - _ + x - 1 + o, u))), t;
}

function o5(t, r) {
    var e = r || {},
        i = {};
    return e.dense && (i["!data"] = []), a5(i, t, r);
}

function FP(t, r) {
    var e = j0(o5(t, r), r);
    return e;
}

function Wb(t) {
    var r = "",
        e = EP(t);
    return e && (r = e(t).getPropertyValue("display")), r || (r = t.style && t.style.display), r === "none";
}

function EP(t) {
    return t.ownerDocument.defaultView && typeof t.ownerDocument.defaultView.getComputedStyle == "function" ? t.ownerDocument.defaultView.getComputedStyle : typeof getComputedStyle == "function" ? getComputedStyle : null;
}
var PP = function() {
    var t = ["<office:master-styles>", '<style:master-page style:name="mp1" style:page-layout-name="mp1">', "<style:header/>", '<style:header-left style:display="false"/>', "<style:footer/>", '<style:footer-left style:display="false"/>', "</style:master-page>", "</office:master-styles>"].join(""),
        r = "<office:document-styles " + bf({
            "xmlns:office": "urn:oasis:names:tc:opendocument:xmlns:office:1.0",
            "xmlns:table": "urn:oasis:names:tc:opendocument:xmlns:table:1.0",
            "xmlns:style": "urn:oasis:names:tc:opendocument:xmlns:style:1.0",
            "xmlns:text": "urn:oasis:names:tc:opendocument:xmlns:text:1.0",
            "xmlns:draw": "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0",
            "xmlns:fo": "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0",
            "xmlns:xlink": "http://www.w3.org/1999/xlink",
            "xmlns:dc": "http://purl.org/dc/elements/1.1/",
            "xmlns:number": "urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0",
            "xmlns:svg": "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0",
            "xmlns:of": "urn:oasis:names:tc:opendocument:xmlns:of:1.2",
            "office:version": "1.2"
        }) + ">" + t + "</office:document-styles>";
    return function() {
        return dn + r;
    };
}();

function IP(t, r) {
    var e = "number",
        i = "",
        n = {
            "style:name": r
        },
        a = "",
        o = 0;
    t = t.replace(/"[$]"/g, "$");
    e: {
        if (t.indexOf(";") > -1 && (console.error("Unsupported ODS Style Map exported.  Using first branch of " + t), t = t.slice(0, t.indexOf(";"))), t == "@") {
            e = "text", i = "<number:text-content/>";
            break e;
        }
        if (t.indexOf(/\$/) > -1 && (e = "currency"), t[o] == '"') {
            for (a = ""; t[++o] != '"' || t[++o] == '"';) a += t[o];
            --o, t[o + 1] == "*" ? (o++, i += "<number:fill-character>" + kr(a.replace(/""/g, '"')) + "</number:fill-character>") : i += "<number:text>" + kr(a.replace(/""/g, '"')) + "</number:text>", t = t.slice(o + 1), o = 0;
        }
        var s = t.match(/# (\?+)\/(\?+)/);
        if (s) {
            i += ut("number:fraction", null, {
                "number:min-integer-digits": 0,
                "number:min-numerator-digits": s[1].length,
                "number:max-denominator-value": Math.max(+s[1].replace(/./g, "9"), +s[2].replace(/./g, "9"))
            });
            break e;
        }
        if (s = t.match(/# (\?+)\/(\d+)/)) {
            i += ut("number:fraction", null, {
                "number:min-integer-digits": 0,
                "number:min-numerator-digits": s[1].length,
                "number:denominator-value": +s[2]
            });
            break e;
        }
        if (s = t.match(/\b(\d+)(|\.\d+)%/)) {
            e = "percentage", i += ut("number:number", null, {
                "number:decimal-places": s[2] && s.length - 1 || 0,
                "number:min-decimal-places": s[2] && s.length - 1 || 0,
                "number:min-integer-digits": s[1].length
            }) + "<number:text>%</number:text>";
            break e;
        }
        var l = !1;
        if (["y", "m", "d"].indexOf(t[0]) > -1) {
            e = "date";
            t: for (; o < t.length; ++o) switch (a = t[o].toLowerCase()) {
                case "h":
                case "s":
                    l = !0, --o;
                    break t;
                case "m":
                    r: for (var c = o + 1; c < t.length; ++c) switch (t[c]) {
                        case "y":
                        case "d":
                            break r;
                        case "h":
                        case "s":
                            l = !0, --o;
                            break t;
                    }
                case "y":
                case "d":
                    for (;
                        (t[++o] || "").toLowerCase() == a[0];) a += a[0];
                    switch (--o, a) {
                        case "y":
                        case "yy":
                            i += "<number:year/>";
                            break;
                        case "yyy":
                        case "yyyy":
                            i += '<number:year number:style="long"/>';
                            break;
                        case "mmmmm":
                            console.error("ODS has no equivalent of format |mmmmm|");
                        case "m":
                        case "mm":
                        case "mmm":
                        case "mmmm":
                            i += '<number:month number:style="' + (a.length % 2 ? "short" : "long") + '" number:textual="' + (a.length >= 3 ? "true" : "false") + '"/>';
                            break;
                        case "d":
                        case "dd":
                            i += '<number:day number:style="' + (a.length % 2 ? "short" : "long") + '"/>';
                            break;
                        case "ddd":
                        case "dddd":
                            i += '<number:day-of-week number:style="' + (a.length % 2 ? "short" : "long") + '"/>';
                            break;
                    }
                    break;
                case '"':
                    for (; t[++o] != '"' || t[++o] == '"';) a += t[o];
                    --o, i += "<number:text>" + kr(a.slice(1).replace(/""/g, '"')) + "</number:text>";
                    break;
                case "\\":
                    a = t[++o], i += "<number:text>" + kr(a) + "</number:text>";
                    break;
                case "/":
                case ":":
                    i += "<number:text>" + kr(a) + "</number:text>";
                    break;
                default:
                    console.error("unrecognized character " + a + " in ODF format " + t);
            }
            if (!l) break e;
            t = t.slice(o + 1), o = 0;
        }
        if (t.match(/^\[?[hms]/)) {
            for (e == "number" && (e = "time"), t.match(/\[/) && (t = t.replace(/[\[\]]/g, ""), n["number:truncate-on-overflow"] = "false"); o < t.length; ++o) switch (a = t[o].toLowerCase()) {
                case "h":
                case "m":
                case "s":
                    for (;
                        (t[++o] || "").toLowerCase() == a[0];) a += a[0];
                    switch (--o, a) {
                        case "h":
                        case "hh":
                            i += '<number:hours number:style="' + (a.length % 2 ? "short" : "long") + '"/>';
                            break;
                        case "m":
                        case "mm":
                            i += '<number:minutes number:style="' + (a.length % 2 ? "short" : "long") + '"/>';
                            break;
                        case "s":
                        case "ss":
                            if (t[o + 1] == ".")
                                do a += t[o + 1], ++o; while (t[o + 1] == "0");
                            i += '<number:seconds number:style="' + (a.match("ss") ? "long" : "short") + '"' + (a.match(/\./) ? ' number:decimal-places="' + (a.match(/0+/) || [""])[0].length + '"' : "") + "/>";
                            break;
                    }
                    break;
                case '"':
                    for (; t[++o] != '"' || t[++o] == '"';) a += t[o];
                    --o, i += "<number:text>" + kr(a.slice(1).replace(/""/g, '"')) + "</number:text>";
                    break;
                case "/":
                case ":":
                    i += "<number:text>" + kr(a) + "</number:text>";
                    break;
                case "a":
                    if (t.slice(o, o + 3).toLowerCase() == "a/p") {
                        i += "<number:am-pm/>", o += 2;
                        break;
                    }
                    if (t.slice(o, o + 5).toLowerCase() == "am/pm") {
                        i += "<number:am-pm/>", o += 4;
                        break;
                    }
                default:
                    console.error("unrecognized character " + a + " in ODF format " + t);
            }
            break e;
        }
        if (t.indexOf(/\$/) > -1 && (e = "currency"), t[0] == "$" && (i += '<number:currency-symbol number:language="en" number:country="US">$</number:currency-symbol>', t = t.slice(1), o = 0), o = 0, t[o] == '"') {
            for (; t[++o] != '"' || t[++o] == '"';) a += t[o];
            --o, t[o + 1] == "*" ? (o++, i += "<number:fill-character>" + kr(a.replace(/""/g, '"')) + "</number:fill-character>") : i += "<number:text>" + kr(a.replace(/""/g, '"')) + "</number:text>", t = t.slice(o + 1), o = 0;
        }
        var u = t.match(/([#0][0#,]*)(\.[0#]*|)(E[+]?0*|)/i);
        if (!u || !u[0]) console.error("Could not find numeric part of " + t);
        else {
            var h = u[1].replace(/,/g, "");
            i += "<number:" + (u[3] ? "scientific-" : "") + 'number number:min-integer-digits="' + (h.indexOf("0") == -1 ? "0" : h.length - h.indexOf("0")) + '"' + (u[0].indexOf(",") > -1 ? ' number:grouping="true"' : "") + (u[2] && ' number:decimal-places="' + (u[2].length - 1) + '"' || ' number:decimal-places="0"') + (u[3] && u[3].indexOf("+") > -1 ? ' number:forced-exponent-sign="true"' : "") + (u[3] ? ' number:min-exponent-digits="' + u[3].match(/0+/)[0].length + '"' : "") + "></number:" + (u[3] ? "scientific-" : "") + "number>", o = u.index + u[0].length;
        }
        if (t[o] == '"') {
            for (a = ""; t[++o] != '"' || t[++o] == '"';) a += t[o];
            --o, i += "<number:text>" + kr(a.replace(/""/g, '"')) + "</number:text>";
        }
    }
    return i ? ut("number:" + e + "-style", i, n) : (console.error("Could not generate ODS number format for |" + t + "|"), "");
}

function jb(t, r, e) {
    for (var i = [], n = 0; n < t.length; ++n) {
        var a = t[n];
        a && a.Sheet == (e == -1 ? null : e) && i.push(a);
    }
    return i.length ? `      <table:named-expressions>
` + i.map(function(o) {
        var s = (e == -1 ? "$" : "") + Jw(o.Ref);
        return "        " + ut("table:named-range", null, {
            "table:name": o.Name,
            "table:cell-range-address": s,
            "table:base-cell-address": s.replace(/[\.][^\.]*$/, ".$A$1")
        });
    }).join(`
`) + `
      </table:named-expressions>
` : "";
}
var Hb = function() {
    var t = function(n, a) {
            return kr(n).replace(/  +/g, function(o) {
                return '<text:s text:c="' + o.length + '"/>';
            }).replace(/\t/g, "<text:tab/>").replace(/\n/g, a ? "<text:line-break/>" : "</text:p><text:p>").replace(/^ /, "<text:s/>").replace(/ $/, "<text:s/>");
        },
        r = `          <table:table-cell />
`,
        e = function(n, a, o, s, l, c) {
            var u = [];
            u.push('      <table:table table:name="' + kr(a.SheetNames[o]) + `" table:style-name="ta1">
`);
            var h = 0,
                d = 0,
                f = zn(n["!ref"] || "A1"),
                m = n["!merges"] || [],
                _ = 0,
                x = n["!data"] != null;
            if (n["!cols"])
                for (d = 0; d <= f.e.c; ++d) u.push("        <table:table-column" + (n["!cols"][d] ? ' table:style-name="co' + n["!cols"][d].ods + '"' : "") + `></table:table-column>
`);
            var g = "",
                b = n["!rows"] || [];
            for (h = 0; h < f.s.r; ++h) g = b[h] ? ' table:style-name="ro' + b[h].ods + '"' : "", u.push("        <table:table-row" + g + `></table:table-row>
`);
            for (; h <= f.e.r; ++h) {
                for (g = b[h] ? ' table:style-name="ro' + b[h].ods + '"' : "", u.push("        <table:table-row" + g + `>
`), d = 0; d < f.s.c; ++d) u.push(r);
                for (; d <= f.e.c; ++d) {
                    var w = !1,
                        T = {},
                        E = "";
                    for (_ = 0; _ != m.length; ++_)
                        if (!(m[_].s.c > d) && !(m[_].s.r > h) && !(m[_].e.c < d) && !(m[_].e.r < h)) {
                            (m[_].s.c != d || m[_].s.r != h) && (w = !0), T["table:number-columns-spanned"] = m[_].e.c - m[_].s.c + 1, T["table:number-rows-spanned"] = m[_].e.r - m[_].s.r + 1;
                            break;
                        }
                    if (w) {
                        u.push(`          <table:covered-table-cell/>
`);
                        continue;
                    }
                    var L = Bi({
                            r: h,
                            c: d
                        }),
                        P = x ? (n["!data"][h] || [])[d] : n[L];
                    if (P && P.f && (T["table:formula"] = kr($F(P.f)), P.F && P.F.slice(0, L.length) == L)) {
                        var k = zn(P.F);
                        T["table:number-matrix-columns-spanned"] = k.e.c - k.s.c + 1, T["table:number-matrix-rows-spanned"] = k.e.r - k.s.r + 1;
                    }
                    if (!P) {
                        u.push(r);
                        continue;
                    }
                    switch (P.t) {
                        case "b":
                            E = P.v ? "TRUE" : "FALSE", T["office:value-type"] = "boolean", T["office:boolean-value"] = P.v ? "true" : "false";
                            break;
                        case "n":
                            isFinite(P.v) ? (E = P.w || String(P.v || 0), T["office:value-type"] = "float", T["office:value"] = P.v || 0) : (isNaN(P.v) ? (E = "#NUM!", T["table:formula"] = "of:=#NUM!") : (E = "#DIV/0!", T["table:formula"] = "of:=" + (P.v < 0 ? "-" : "") + "1/0"), T["office:string-value"] = "", T["office:value-type"] = "string", T["calcext:value-type"] = "error");
                            break;
                        case "s":
                        case "str":
                            E = P.v == null ? "" : P.v, T["office:value-type"] = "string";
                            break;
                        case "d":
                            E = P.w || Ea(P.v, c).toISOString(), T["office:value-type"] = "date", T["office:date-value"] = Ea(P.v, c).toISOString(), T["table:style-name"] = "ce1";
                            break;
                        default:
                            u.push(r);
                            continue;
                    }
                    var A = t(E);
                    if (P.l && P.l.Target) {
                        var N = P.l.Target;
                        N = N.charAt(0) == "#" ? "#" + Jw(N.slice(1)) : N, N.charAt(0) != "#" && !N.match(/^\w+:/) && (N = "../" + N), A = ut("text:a", A, {
                            "xlink:href": N.replace(/&/g, "&amp;")
                        });
                    }
                    l[P.z] && (T["table:style-name"] = "ce" + l[P.z].slice(1));
                    var C = ut("text:p", A, {});
                    if (P.c) {
                        for (var F = "", W = "", I = {}, U = 0; U < P.c.length; ++U) !F && P.c[U].a && (F = P.c[U].a), W += "<text:p>" + t(P.c[U].t) + "</text:p>";
                        P.c.hidden || (I["office:display"] = !0), C = ut("office:annotation", W, I) + C;
                    }
                    u.push("          " + ut("table:table-cell", C, T) + `
`);
                }
                u.push(`        </table:table-row>
`);
            }
            return (a.Workbook || {}).Names && u.push(jb(a.Workbook.Names, a.SheetNames, o)), u.push(`      </table:table>
`), u.join("");
        },
        i = function(n, a) {
            n.push(` <office:automatic-styles>
`);
            var o = 0;
            a.SheetNames.map(function(u) {
                return a.Sheets[u];
            }).forEach(function(u) {
                if (u && u["!cols"]) {
                    for (var h = 0; h < u["!cols"].length; ++h)
                        if (u["!cols"][h]) {
                            var d = u["!cols"][h];
                            if (d.width == null && d.wpx == null && d.wch == null) continue;
                            qg(d), d.ods = o;
                            var f = u["!cols"][h].wpx + "px";
                            n.push('  <style:style style:name="co' + o + `" style:family="table-column">
`), n.push('   <style:table-column-properties fo:break-before="auto" style:column-width="' + f + `"/>
`), n.push(`  </style:style>
`), ++o;
                        }
                }
            });
            var s = 0;
            a.SheetNames.map(function(u) {
                return a.Sheets[u];
            }).forEach(function(u) {
                if (u && u["!rows"]) {
                    for (var h = 0; h < u["!rows"].length; ++h)
                        if (u["!rows"][h]) {
                            u["!rows"][h].ods = s;
                            var d = u["!rows"][h].hpx + "px";
                            n.push('  <style:style style:name="ro' + s + `" style:family="table-row">
`), n.push('   <style:table-row-properties fo:break-before="auto" style:row-height="' + d + `"/>
`), n.push(`  </style:style>
`), ++s;
                        }
                }
            }), n.push(`  <style:style style:name="ta1" style:family="table" style:master-page-name="mp1">
`), n.push(`   <style:table-properties table:display="true" style:writing-mode="lr-tb"/>
`), n.push(`  </style:style>
`), n.push(`  <number:date-style style:name="N37" number:automatic-order="true">
`), n.push(`   <number:month number:style="long"/>
`), n.push(`   <number:text>/</number:text>
`), n.push(`   <number:day number:style="long"/>
`), n.push(`   <number:text>/</number:text>
`), n.push(`   <number:year/>
`), n.push(`  </number:date-style>
`);
            var l = {},
                c = 69;
            return a.SheetNames.map(function(u) {
                return a.Sheets[u];
            }).forEach(function(u) {
                if (u) {
                    var h = u["!data"] != null;
                    if (u["!ref"])
                        for (var d = zn(u["!ref"]), f = 0; f <= d.e.r; ++f)
                            for (var m = 0; m <= d.e.c; ++m) {
                                var _ = h ? (u["!data"][f] || [])[m] : u[Bi({
                                    r: f,
                                    c: m
                                })];
                                if (!(!_ || !_.z || _.z.toLowerCase() == "general") && !l[_.z]) {
                                    var x = IP(_.z, "N" + c);
                                    x && (l[_.z] = "N" + c, ++c, n.push(x + `
`));
                                }
                            }
                }
            }), n.push(`  <style:style style:name="ce1" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N37"/>
`), fn(l).forEach(function(u) {
                n.push('<style:style style:name="ce' + l[u].slice(1) + '" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="' + l[u] + `"/>
`);
            }), n.push(` </office:automatic-styles>
`), l;
        };
    return function(a, o) {
        var s = [dn],
            l = bf({
                "xmlns:office": "urn:oasis:names:tc:opendocument:xmlns:office:1.0",
                "xmlns:table": "urn:oasis:names:tc:opendocument:xmlns:table:1.0",
                "xmlns:style": "urn:oasis:names:tc:opendocument:xmlns:style:1.0",
                "xmlns:text": "urn:oasis:names:tc:opendocument:xmlns:text:1.0",
                "xmlns:draw": "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0",
                "xmlns:fo": "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0",
                "xmlns:xlink": "http://www.w3.org/1999/xlink",
                "xmlns:dc": "http://purl.org/dc/elements/1.1/",
                "xmlns:meta": "urn:oasis:names:tc:opendocument:xmlns:meta:1.0",
                "xmlns:number": "urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0",
                "xmlns:presentation": "urn:oasis:names:tc:opendocument:xmlns:presentation:1.0",
                "xmlns:svg": "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0",
                "xmlns:chart": "urn:oasis:names:tc:opendocument:xmlns:chart:1.0",
                "xmlns:dr3d": "urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0",
                "xmlns:math": "http://www.w3.org/1998/Math/MathML",
                "xmlns:form": "urn:oasis:names:tc:opendocument:xmlns:form:1.0",
                "xmlns:script": "urn:oasis:names:tc:opendocument:xmlns:script:1.0",
                "xmlns:ooo": "http://openoffice.org/2004/office",
                "xmlns:ooow": "http://openoffice.org/2004/writer",
                "xmlns:oooc": "http://openoffice.org/2004/calc",
                "xmlns:dom": "http://www.w3.org/2001/xml-events",
                "xmlns:xforms": "http://www.w3.org/2002/xforms",
                "xmlns:xsd": "http://www.w3.org/2001/XMLSchema",
                "xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
                "xmlns:sheet": "urn:oasis:names:tc:opendocument:sh33tjs:1.0",
                "xmlns:rpt": "http://openoffice.org/2005/report",
                "xmlns:of": "urn:oasis:names:tc:opendocument:xmlns:of:1.2",
                "xmlns:xhtml": "http://www.w3.org/1999/xhtml",
                "xmlns:grddl": "http://www.w3.org/2003/g/data-view#",
                "xmlns:tableooo": "http://openoffice.org/2009/table",
                "xmlns:drawooo": "http://openoffice.org/2010/draw",
                "xmlns:calcext": "urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0",
                "xmlns:loext": "urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0",
                "xmlns:field": "urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0",
                "xmlns:formx": "urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0",
                "xmlns:css3t": "http://www.w3.org/TR/css3-text/",
                "office:version": "1.2"
            }),
            c = bf({
                "xmlns:config": "urn:oasis:names:tc:opendocument:xmlns:config:1.0",
                "office:mimetype": "application/vnd.oasis.opendocument.spreadsheet"
            });
        o.bookType == "fods" ? (s.push("<office:document" + l + c + `>
`), s.push(Cw().replace(/<office:document-meta[^<>]*?>/, "").replace(/<\/office:document-meta>/, "") + `
`)) : s.push("<office:document-content" + l + `>
`);
        var u = i(s, a);
        s.push(`  <office:body>
`), s.push(`    <office:spreadsheet>
`), ((a.Workbook || {}).WBProps || {}).date1904 && s.push(`      <table:calculation-settings table:case-sensitive="false" table:search-criteria-must-apply-to-whole-cell="true" table:use-wildcards="true" table:use-regular-expressions="false" table:automatic-find-labels="false">
        <table:null-date table:date-value="1904-01-01"/>
      </table:calculation-settings>
`);
        for (var h = 0; h != a.SheetNames.length; ++h) s.push(e(a.Sheets[a.SheetNames[h]], a, h, o, u, ((a.Workbook || {}).WBProps || {}).date1904));
        return (a.Workbook || {}).Names && s.push(jb(a.Workbook.Names, a.SheetNames, -1)), s.push(`    </office:spreadsheet>
`), s.push(`  </office:body>
`), o.bookType == "fods" ? s.push("</office:document>") : s.push("</office:document-content>"), s.join("");
    };
}();

function s5(t, r) {
    if (r.bookType == "fods") return Hb(t, r);
    var e = Pg(),
        i = "",
        n = [],
        a = [];
    return i = "mimetype", Dr(e, i, "application/vnd.oasis.opendocument.spreadsheet"), i = "content.xml", Dr(e, i, Hb(t, r)), n.push([i, "text/xml"]), a.push([i, "ContentFile"]), i = "styles.xml", Dr(e, i, PP(t, r)), n.push([i, "text/xml"]), a.push([i, "StylesFile"]), i = "meta.xml", Dr(e, i, dn + Cw()), n.push([i, "text/xml"]), a.push([i, "MetadataFile"]), i = "manifest.rdf", Dr(e, i, ED(a)), n.push([i, "application/rdf+xml"]), i = "META-INF/manifest.xml", Dr(e, i, kD(n)), e;
}
var va = function() {
    try {
        return typeof Uint8Array > "u" || typeof Uint8Array.prototype.subarray > "u" ? "slice" : typeof Buffer < "u" ? typeof Buffer.prototype.subarray > "u" ? "slice" : (typeof Buffer.from == "function" ? Buffer.from([72, 62]) : new Buffer([72, 62])) instanceof Uint8Array ? "subarray" : "slice" : "subarray";
    } catch {
        return "slice";
    }
}();

function Dp(t) {
    return new DataView(t.buffer, t.byteOffset, t.byteLength);
}

function Af(t) {
    return typeof TextDecoder < "u" ? new TextDecoder().decode(t) : O0(Pc(t));
}

function pa(t) {
    return typeof TextEncoder < "u" ? new TextEncoder().encode(t) : qa(Ws(t));
}

function Rl(t) {
    for (var r = 0, e = 0; e < t.length; ++e) r += t[e].length;
    var i = new Uint8Array(r),
        n = 0;
    for (e = 0; e < t.length; ++e) {
        var a = t[e],
            o = a.length;
        if (o < 250)
            for (var s = 0; s < o; ++s) i[n++] = a[s];
        else i.set(a, n), n += o;
    }
    return i;
}

function OP(t, r, e) {
    var i = Math.floor(e == 0 ? 0 : Math.LOG10E * Math.log(Math.abs(e))) + 6176 - 16,
        n = e / Math.pow(10, i - 6176);
    t[r + 15] |= i >> 7, t[r + 14] |= (i & 127) << 1;
    for (var a = 0; n >= 1; ++a, n /= 256) t[r + a] = n & 255;
    t[r + 15] |= e >= 0 ? 0 : 128;
}

function Tf(t, r) {
    var e = r.l,
        i = t[e] & 127;
    e: if (t[e++] >= 128 && (i |= (t[e] & 127) << 7, t[e++] < 128 || (i |= (t[e] & 127) << 14, t[e++] < 128) || (i |= (t[e] & 127) << 21, t[e++] < 128) || (i += (t[e] & 127) * Math.pow(2, 28), ++e, t[e++] < 128) || (i += (t[e] & 127) * Math.pow(2, 35), ++e, t[e++] < 128) || (i += (t[e] & 127) * Math.pow(2, 42), ++e, t[e++] < 128))) break e;
    return r.l = e, i;
}

function Et(t) {
    var r = new Uint8Array(7);
    r[0] = t & 127;
    var e = 1;
    e: if (t > 127) {
        if (r[e - 1] |= 128, r[e] = t >> 7 & 127, ++e, t <= 16383 || (r[e - 1] |= 128, r[e] = t >> 14 & 127, ++e, t <= 2097151) || (r[e - 1] |= 128, r[e] = t >> 21 & 127, ++e, t <= 268435455) || (r[e - 1] |= 128, r[e] = t / 256 >>> 21 & 127, ++e, t <= 34359738367) || (r[e - 1] |= 128, r[e] = t / 65536 >>> 21 & 127, ++e, t <= 4398046511103)) break e;
        r[e - 1] |= 128, r[e] = t / 16777216 >>> 21 & 127, ++e;
    }
    return r[va](0, e);
}

function l5(t) {
    for (var r = {
            l: 0
        }, e = []; r.l < t.length;) e.push(Tf(t, r));
    return e;
}

function c5(t) {
    return Rl(t.map(function(r) {
        return Et(r);
    }));
}

function Ya(t) {
    var r = 0,
        e = t[r] & 127;
    return t[r++] < 128 || (e |= (t[r] & 127) << 7, t[r++] < 128) || (e |= (t[r] & 127) << 14, t[r++] < 128) || (e |= (t[r] & 127) << 21, t[r++] < 128) || (e |= (t[r] & 15) << 28), e;
}

function Yt(t) {
    for (var r = [], e = {
            l: 0
        }; e.l < t.length;) {
        var i = e.l,
            n = Tf(t, e),
            a = n & 7;
        n = n / 8 | 0;
        var o, s = e.l;
        switch (a) {
            case 0:
                {
                    for (; t[s++] >= 128;);o = t[va](e.l, s),
                    e.l = s;
                }
                break;
            case 1:
                o = t[va](s, s + 8), e.l = s + 8;
                break;
            case 2:
                {
                    var l = Tf(t, e);o = t[va](e.l, e.l + l),
                    e.l += l;
                }
                break;
            case 5:
                o = t[va](s, s + 4), e.l = s + 4;
                break;
            default:
                throw new Error("PB Type ".concat(a, " for Field ").concat(n, " at offset ").concat(i));
        }
        var c = {
            data: o,
            type: a
        };
        r[n] == null && (r[n] = []), r[n].push(c);
    }
    return r;
}

function Vt(t) {
    var r = [];
    return t.forEach(function(e, i) {
        i != 0 && e.forEach(function(n) {
            n.data && (r.push(Et(i * 8 + n.type)), n.type == 2 && r.push(Et(n.data.length)), r.push(n.data));
        });
    }), Rl(r);
}

function kp(t, r) {
    return t ? .map(function(e) {
        return r(e.data);
    }) || [];
}

function Fp(t) {
    for (var r, e = [], i = {
            l: 0
        }; i.l < t.length;) {
        var n = Tf(t, i),
            a = Yt(t[va](i.l, i.l + n));
        i.l += n;
        var o = {
            id: Ya(a[1][0].data),
            messages: []
        };
        a[2].forEach(function(s) {
            var l = Yt(s.data),
                c = Ya(l[3][0].data);
            o.messages.push({
                meta: l,
                data: t[va](i.l, i.l + c)
            }), i.l += c;
        }), (r = a[3]) != null && r[0] && (o.merge = Ya(a[3][0].data) >>> 0 > 0), e.push(o);
    }
    return e;
}

function R0(t) {
    var r = [];
    return t.forEach(function(e) {
        var i = [
            [],
            [{
                data: Et(e.id),
                type: 0
            }],
            []
        ];
        e.merge != null && (i[3] = [{
            data: Et(+!!e.merge),
            type: 0
        }]);
        var n = [];
        e.messages.forEach(function(o) {
            n.push(o.data), o.meta[3] = [{
                type: 0,
                data: Et(o.data.length)
            }], i[2].push({
                data: Vt(o.meta),
                type: 2
            });
        });
        var a = Vt(i);
        r.push(Et(a.length)), r.push(a), n.forEach(function(o) {
            return r.push(o);
        });
    }), Rl(r);
}

function NP(t, r) {
    if (t != 0) throw new Error("Unexpected Snappy chunk type ".concat(t));
    for (var e = {
            l: 0
        }, i = Tf(r, e), n = [], a = e.l; a < r.length;) {
        var o = r[a] & 3;
        if (o == 0) {
            var s = r[a++] >> 2;
            if (s < 60) ++s;
            else {
                var l = s - 59;
                s = r[a], l > 1 && (s |= r[a + 1] << 8), l > 2 && (s |= r[a + 2] << 16), l > 3 && (s |= r[a + 3] << 24), s >>>= 0, s++, a += l;
            }
            n.push(r[va](a, a + s)), a += s;
            continue;
        } else {
            var c = 0,
                u = 0;
            if (o == 1 ? (u = (r[a] >> 2 & 7) + 4, c = (r[a++] & 224) << 3, c |= r[a++]) : (u = (r[a++] >> 2) + 1, o == 2 ? (c = r[a] | r[a + 1] << 8, a += 2) : (c = (r[a] | r[a + 1] << 8 | r[a + 2] << 16 | r[a + 3] << 24) >>> 0, a += 4)), c == 0) throw new Error("Invalid offset 0");
            for (var h = n.length - 1, d = c; h >= 0 && d >= n[h].length;) d -= n[h].length, --h;
            if (h < 0)
                if (d == 0) d = n[h = 0].length;
                else throw new Error("Invalid offset beyond length");
            if (u < d) n.push(n[h][va](n[h].length - d, n[h].length - d + u));
            else {
                for (d > 0 && (n.push(n[h][va](n[h].length - d)), u -= d), ++h; u >= n[h].length;) n.push(n[h]), u -= n[h].length, ++h;
                u && n.push(n[h][va](0, u));
            }
            n.length > 25 && (n = [Rl(n)]);
        }
    }
    for (var f = 0, m = 0; m < n.length; ++m) f += n[m].length;
    if (f != i) throw new Error("Unexpected length: ".concat(f, " != ").concat(i));
    return n;
}

function Ep(t) {
    Array.isArray(t) && (t = new Uint8Array(t));
    for (var r = [], e = 0; e < t.length;) {
        var i = t[e++],
            n = t[e] | t[e + 1] << 8 | t[e + 2] << 16;
        e += 3, r.push.apply(r, NP(i, t[va](e, e + n))), e += n;
    }
    if (e !== t.length) throw new Error("data is not a valid framed stream!");
    return r.length == 1 ? r[0] : Rl(r);
}

function M0(t) {
    for (var r = [], e = 0; e < t.length;) {
        var i = Math.min(t.length - e, 268435455),
            n = new Uint8Array(4);
        r.push(n);
        var a = Et(i),
            o = a.length;
        r.push(a), i <= 60 ? (o++, r.push(new Uint8Array([i - 1 << 2]))) : i <= 256 ? (o += 2, r.push(new Uint8Array([240, i - 1 & 255]))) : i <= 65536 ? (o += 3, r.push(new Uint8Array([244, i - 1 & 255, i - 1 >> 8 & 255]))) : i <= 16777216 ? (o += 4, r.push(new Uint8Array([248, i - 1 & 255, i - 1 >> 8 & 255, i - 1 >> 16 & 255]))) : i <= 4294967296 && (o += 5, r.push(new Uint8Array([252, i - 1 & 255, i - 1 >> 8 & 255, i - 1 >> 16 & 255, i - 1 >>> 24 & 255]))), r.push(t[va](e, e + i)), o += i, n[0] = 0, n[1] = o & 255, n[2] = o >> 8 & 255, n[3] = o >> 16 & 255, e += i;
    }
    return Rl(r);
}

function xg(t, r) {
    var e = new Uint8Array(32),
        i = Dp(e),
        n = 12,
        a = 0;
    switch (e[0] = 5, t.t) {
        case "n":
            if (t.z && Ic(t.z)) {
                e[1] = 5, i.setFloat64(n, (I0(t.v + 1462).getTime() - Date.UTC(2001, 0, 1)) / 1e3, !0), a |= 4, n += 8;
                break;
            } else e[1] = 2, OP(e, n, t.v), a |= 1, n += 16;
            break;
        case "b":
            e[1] = 6, i.setFloat64(n, t.v ? 1 : 0, !0), a |= 2, n += 8;
            break;
        case "s":
            {
                var o = t.v == null ? "" : String(t.v);
                if (t.l) {
                    var s = r.rsst.findIndex(function(c) {
                        var u;
                        return c.v == o && c.l == ((u = t.l) == null ? void 0 : u.Target);
                    });
                    s == -1 && (r.rsst[s = r.rsst.length] = {
                        v: o,
                        l: t.l.Target
                    }), e[1] = 9, i.setUint32(n, s, !0), a |= 16, n += 4;
                } else {
                    var l = r.sst.indexOf(o);
                    l == -1 && (r.sst[l = r.sst.length] = o), e[1] = 3, i.setUint32(n, l, !0), a |= 8, n += 4;
                }
            }
            break;
        case "d":
            e[1] = 5, i.setFloat64(n, (t.v.getTime() - Date.UTC(2001, 0, 1)) / 1e3, !0), a |= 4, n += 8;
            break;
        case "z":
            e[1] = 0;
            break;
        default:
            throw "unsupported cell type " + t.t;
    }
    return t.c && (r.cmnt.push(LP(t.c)), i.setUint32(n, r.cmnt.length - 1, !0), a |= 524288, n += 4), i.setUint32(8, a, !0), e[va](0, n);
}

function _g(t, r) {
    var e = new Uint8Array(32),
        i = Dp(e),
        n = 12,
        a = 0,
        o = "";
    switch (e[0] = 4, t.t) {
        case "n":
            break;
        case "b":
            break;
        case "s":
            if (o = t.v == null ? "" : String(t.v), t.l) {
                var s = r.rsst.findIndex(function(c) {
                    var u;
                    return c.v == o && c.l == ((u = t.l) == null ? void 0 : u.Target);
                });
                s == -1 && (r.rsst[s = r.rsst.length] = {
                    v: o,
                    l: t.l.Target
                }), e[1] = 9, i.setUint32(n, s, !0), a |= 512, n += 4;
            }
            break;
        case "d":
            break;
        case "e":
            break;
        case "z":
            break;
        default:
            throw "unsupported cell type " + t.t;
    }
    switch (t.c && (i.setUint32(n, r.cmnt.length - 1, !0), a |= 4096, n += 4), t.t) {
        case "n":
            e[1] = 2, i.setFloat64(n, t.v, !0), a |= 32, n += 8;
            break;
        case "b":
            e[1] = 6, i.setFloat64(n, t.v ? 1 : 0, !0), a |= 32, n += 8;
            break;
        case "s":
            if (o = t.v == null ? "" : String(t.v), !t.l) {
                var l = r.sst.indexOf(o);
                l == -1 && (r.sst[l = r.sst.length] = o), e[1] = 3, i.setUint32(n, l, !0), a |= 16, n += 4;
            }
            break;
        case "d":
            e[1] = 5, i.setFloat64(n, (t.v.getTime() - Date.UTC(2001, 0, 1)) / 1e3, !0), a |= 64, n += 8;
            break;
        case "z":
            e[1] = 0;
            break;
        default:
            throw "unsupported cell type " + t.t;
    }
    return i.setUint32(8, a, !0), e[va](0, n);
}

function cn(t) {
    var r = Yt(t);
    return Ya(r[1][0].data);
}

function $n(t) {
    return Vt([
        [],
        [{
            type: 0,
            data: Et(t)
        }]
    ]);
}

function Qn(t, r) {
    var e, i = (e = t.messages[0].meta[5]) != null && e[0] ? l5(t.messages[0].meta[5][0].data) : [],
        n = i.indexOf(r);
    n == -1 && (i.push(r), t.messages[0].meta[5] = [{
        type: 2,
        data: c5(i)
    }]);
}

function zs(t, r) {
    var e, i = (e = t.messages[0].meta[5]) != null && e[0] ? l5(t.messages[0].meta[5][0].data) : [];
    t.messages[0].meta[5] = [{
        type: 2,
        data: c5(i.filter(function(n) {
            return n != r;
        }))
    }];
}

function LP(t) {
    for (var r = {
            a: "",
            t: "",
            replies: []
        }, e = 0; e < t.length; ++e) e == 0 ? (r.a = t[e].a, r.t = t[e].t) : r.replies.push({
        a: t[e].a,
        t: t[e].t
    });
    return r;
}

function RP(t, r, e) {
    var i, n, a, o = [
        [],
        [{
            type: 0,
            data: Et(0)
        }],
        [{
            type: 0,
            data: Et(0)
        }],
        [{
            type: 2,
            data: new Uint8Array([])
        }],
        [{
            type: 2,
            data: new Uint8Array(Array.from({
                length: 510
            }, function() {
                return 255;
            }))
        }],
        [{
            type: 0,
            data: Et(5)
        }],
        [{
            type: 2,
            data: new Uint8Array([])
        }],
        [{
            type: 2,
            data: new Uint8Array(Array.from({
                length: 510
            }, function() {
                return 255;
            }))
        }],
        [{
            type: 0,
            data: Et(1)
        }]
    ];
    if (!((i = o[6]) != null && i[0]) || !((n = o[7]) != null && n[0])) throw "Mutation only works on post-BNC storages!";
    var s = 0;
    if (o[7][0].data.length < 2 * t.length) {
        var l = new Uint8Array(2 * t.length);
        l.set(o[7][0].data), o[7][0].data = l;
    }
    if (o[4][0].data.length < 2 * t.length) {
        var c = new Uint8Array(2 * t.length);
        c.set(o[4][0].data), o[4][0].data = c;
    }
    for (var u = Dp(o[7][0].data), h = 0, d = [], f = Dp(o[4][0].data), m = 0, _ = [], x = e ? 4 : 1, g = 0; g < t.length; ++g) {
        if (t[g] == null || t[g].t == "z" && !((a = t[g].c) != null && a.length) || t[g].t == "e") {
            u.setUint16(g * 2, 65535, !0), f.setUint16(g * 2, 65535);
            continue;
        }
        u.setUint16(g * 2, h / x, !0), f.setUint16(g * 2, m / x, !0);
        var b, w;
        switch (t[g].t) {
            case "d":
                if (t[g].v instanceof Date) {
                    b = xg(t[g], r), w = _g(t[g], r);
                    break;
                }
                b = xg(t[g], r), w = _g(t[g], r);
                break;
            case "s":
            case "n":
            case "b":
            case "z":
                b = xg(t[g], r), w = _g(t[g], r);
                break;
            default:
                throw new Error("Unsupported value " + t[g]);
        }
        d.push(b), h += b.length, _.push(w), m += w.length, ++s;
    }
    for (o[2][0].data = Et(s), o[5][0].data = Et(5); g < o[7][0].data.length / 2; ++g) u.setUint16(g * 2, 65535, !0), f.setUint16(g * 2, 65535, !0);
    return o[6][0].data = Rl(d), o[3][0].data = Rl(_), o[8] = [{
        type: 0,
        data: Et(e ? 1 : 0)
    }], o;
}

function Cg(t, r) {
    return {
        meta: [
            [],
            [{
                type: 0,
                data: Et(t)
            }]
        ],
        data: r
    };
}

function os(t, r) {
    r.last || (r.last = 927262);
    for (var e = r.last; e < 2e6; ++e)
        if (!r[e]) return r[r.last = e] = t, e;
    throw new Error("Too many messages");
}

function MP(t) {
    var r = {},
        e = [];
    return t.FileIndex.map(function(i, n) {
        return [i, t.FullPaths[n]];
    }).forEach(function(i) {
        var n = i[0],
            a = i[1];
        n.type == 2 && n.name.match(/\.iwa/) && n.content[0] == 0 && Fp(Ep(n.content)).forEach(function(o) {
            e.push(o.id), r[o.id] = {
                deps: [],
                location: a,
                type: Ya(o.messages[0].meta[1][0].data)
            };
        });
    }), t.FileIndex.forEach(function(i) {
        i.name.match(/\.iwa/) && i.content[0] == 0 && Fp(Ep(i.content)).forEach(function(n) {
            n.messages.forEach(function(a) {
                [5, 6].forEach(function(o) {
                    a.meta[o] && a.meta[o].forEach(function(s) {
                        r[n.id].deps.push(Ya(s.data));
                    });
                });
            });
        });
    }), r;
}

function hp(t, r, e) {
    return Vt([
        [],
        [{
            type: 0,
            data: Et(1)
        }],
        [],
        [{
            type: 5,
            data: new Uint8Array(Float32Array.from([t / 255]).buffer)
        }],
        [{
            type: 5,
            data: new Uint8Array(Float32Array.from([r / 255]).buffer)
        }],
        [{
            type: 5,
            data: new Uint8Array(Float32Array.from([e / 255]).buffer)
        }],
        [{
            type: 5,
            data: new Uint8Array(Float32Array.from([1]).buffer)
        }],
        [],
        [],
        [],
        [],
        [],
        [{
            type: 0,
            data: Et(1)
        }]
    ]);
}

function Gb(t) {
    switch (t) {
        case 0:
            return hp(99, 222, 171);
        case 1:
            return hp(162, 197, 240);
        case 2:
            return hp(255, 189, 189);
    }
    return hp(Math.random() * 255, Math.random() * 255, Math.random() * 255);
}

function BP(t, r) {
    if (!r || !r.numbers) throw new Error("Must pass a `numbers` option -- check the README");
    var e = _i.read(r.numbers, {
            type: "base64"
        }),
        i = MP(e),
        n = ss(e, i, 1);
    if (n == null) throw "Could not find message ".concat(1, " in Numbers template");
    var a = kp(Yt(n.messages[0].data)[1], cn);
    if (a.length > 1) throw new Error("Template NUMBERS file must have exactly one sheet");
    return t.SheetNames.forEach(function(o, s) {
        s >= 1 && (VP(e, i, s + 1), n = ss(e, i, 1), a = kp(Yt(n.messages[0].data)[1], cn)), zP(e, i, t.Sheets[o], o, s, a[s]);
    }), e;
}

function ci(t, r, e, i) {
    var n = _i.find(t, r[e].location);
    if (!n) throw "Could not find ".concat(r[e].location, " in Numbers template");
    var a = Fp(Ep(n.content)),
        o = a.find(function(s) {
            return s.id == e;
        });
    i(o, a), n.content = M0(R0(a)), n.size = n.content.length;
}

function ss(t, r, e) {
    var i = _i.find(t, r[e].location);
    if (!i) throw "Could not find ".concat(r[e].location, " in Numbers template");
    var n = Fp(Ep(i.content)),
        a = n.find(function(o) {
            return o.id == e;
        });
    return a;
}

function Ag(t, r, e) {
    t[3].push({
        type: 2,
        data: Vt([
            [],
            [{
                type: 0,
                data: Et(r)
            }],
            [{
                type: 2,
                data: pa(e.replace(/-[\s\S]*$/, ""))
            }],
            [{
                type: 2,
                data: pa(e)
            }],
            [{
                type: 2,
                data: new Uint8Array([2, 0, 0])
            }],
            [{
                type: 2,
                data: new Uint8Array([2, 0, 0])
            }],
            [],
            [],
            [],
            [],
            [{
                type: 0,
                data: Et(0)
            }],
            [],
            [{
                type: 0,
                data: Et(0)
            }]
        ])
    }), t[1] = [{
        type: 0,
        data: Et(Math.max(r + 1, Ya(t[1][0].data)))
    }];
}

function Dc(t, r, e, i, n, a) {
    a || (a = os({
        deps: [],
        location: "",
        type: r
    }, n));
    var o = "".concat(i, "-").concat(a, ".iwa");
    n[a].location = "Root Entry" + o, _i.utils.cfb_add(t, o, M0(R0([{
        id: a,
        messages: [Cg(r, Vt(e))]
    }])));
    var s = o.replace(/^[\/]/, "").replace(/^Index\//, "").replace(/\.iwa$/, "");
    return ci(t, n, 2, function(l) {
        var c = Yt(l.messages[0].data);
        Ag(c, a || 0, s), l.messages[0].data = Vt(c);
    }), a;
}

function Fa(t, r, e, i) {
    var n = r[e].location.replace(/^Root Entry\//, "").replace(/^Index\//, "").replace(/\.iwa$/, ""),
        a = t[3].findIndex(function(s) {
            var l, c, u = Yt(s.data);
            return (l = u[3]) != null && l[0] ? Af(u[3][0].data) == n : !!((c = u[2]) != null && c[0] && Af(u[2][0].data) == n);
        }),
        o = Yt(t[3][a].data);
    o[6] || (o[6] = []), (Array.isArray(i) ? i : [i]).forEach(function(s) {
        o[6].push({
            type: 2,
            data: Vt([
                [],
                [{
                    type: 0,
                    data: Et(s)
                }]
            ])
        });
    }), t[3][a].data = Vt(o);
}

function UP(t, r, e, i) {
    var n = r[e].location.replace(/^Root Entry\//, "").replace(/^Index\//, "").replace(/\.iwa$/, ""),
        a = t[3].findIndex(function(s) {
            var l, c, u = Yt(s.data);
            return (l = u[3]) != null && l[0] ? Af(u[3][0].data) == n : !!((c = u[2]) != null && c[0] && Af(u[2][0].data) == n);
        }),
        o = Yt(t[3][a].data);
    o[6] || (o[6] = []), o[6] = o[6].filter(function(s) {
        return Ya(Yt(s.data)[1][0].data) != i;
    }), t[3][a].data = Vt(o);
}

function VP(t, r, e) {
    var i = -1,
        n = -1,
        a = {};
    ci(t, r, 1, function(l, c) {
        var u = Yt(l.messages[0].data);
        i = cn(Yt(l.messages[0].data)[1][0].data), n = os({
            deps: [1],
            location: r[i].location,
            type: 2
        }, r), a[i] = n, Qn(l, n), u[1].push({
            type: 2,
            data: $n(n)
        });
        var h = ss(t, r, i);
        h.id = n, r[1].location == r[n].location ? c.push(h) : ci(t, r, n, function(d, f) {
            return f.push(h);
        }), l.messages[0].data = Vt(u);
    });
    var o = -1;
    ci(t, r, n, function(l, c) {
        for (var u = Yt(l.messages[0].data), h = 3; h <= 69; ++h) delete u[h];
        var d = kp(u[2], cn);
        d.forEach(function(m) {
            return zs(l, m);
        }), o = os({
            deps: [n],
            location: r[d[0]].location,
            type: r[d[0]].type
        }, r), Qn(l, o), a[d[0]] = o, u[2] = [{
            type: 2,
            data: $n(o)
        }];
        var f = ss(t, r, d[0]);
        f.id = o, r[d[0]].location == r[n].location ? c.push(f) : (ci(t, r, 2, function(m) {
            var _ = Yt(m.messages[0].data);
            Fa(_, r, n, o), m.messages[0].data = Vt(_);
        }), ci(t, r, o, function(m, _) {
            return _.push(f);
        })), l.messages[0].data = Vt(u);
    });
    var s = -1;
    ci(t, r, o, function(l, c) {
        for (var u = Yt(l.messages[0].data), h = Yt(u[1][0].data), d = 3; d <= 69; ++d) delete h[d];
        var f = cn(h[2][0].data);
        h[2][0].data = $n(a[f]), u[1][0].data = Vt(h);
        var m = cn(u[2][0].data);
        zs(l, m), s = os({
            deps: [o],
            location: r[m].location,
            type: r[m].type
        }, r), Qn(l, s), a[m] = s, u[2][0].data = $n(s);
        var _ = ss(t, r, m);
        _.id = s, r[o].location == r[s].location ? c.push(_) : ci(t, r, s, function(x, g) {
            return g.push(_);
        }), l.messages[0].data = Vt(u);
    }), ci(t, r, s, function(l, c) {
        var u, h, d = Yt(l.messages[0].data),
            f = Af(d[1][0].data),
            m = f.replace(/-[A-Z0-9]*/, "-".concat(("0000" + e.toString(16)).slice(-4)));
        if (d[1][0].data = pa(m), [12, 13, 29, 31, 32, 33, 39, 44, 47, 81, 82, 84].forEach(function(E) {
                return delete d[E];
            }), d[45]) {
            var _ = Yt(d[45][0].data),
                x = cn(_[1][0].data);
            zs(l, x), delete d[45];
        }
        if (d[70]) {
            var g = Yt(d[70][0].data);
            (u = g[2]) == null || u.forEach(function(E) {
                var L = Yt(E.data);
                [2, 3].map(function(P) {
                    return L[P][0];
                }).forEach(function(P) {
                    var k = Yt(P.data);
                    if (k[8]) {
                        var A = cn(k[8][0].data);
                        zs(l, A);
                    }
                });
            }), delete d[70];
        }[46, 30, 34, 35, 36, 38, 48, 49, 60, 61, 62, 63, 64, 71, 72, 73, 74, 75, 85, 86, 87, 88, 89].forEach(function(E) {
            if (d[E]) {
                var L = cn(d[E][0].data);
                delete d[E], zs(l, L);
            }
        });
        var b = Yt(d[4][0].data); {
            [2, 4, 5, 6, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22].forEach(function(E) {
                var L;
                if ((L = b[E]) != null && L[0]) {
                    var P = cn(b[E][0].data),
                        k = os({
                            deps: [s],
                            location: r[P].location,
                            type: r[P].type
                        }, r);
                    zs(l, P), Qn(l, k), a[P] = k;
                    var A = ss(t, r, P);
                    if (A.id = k, r[P].location == r[s].location) c.push(A);
                    else {
                        r[k].location = r[P].location.replace(P.toString(), k.toString()), r[k].location == r[P].location && (r[k].location = r[k].location.replace(/\.iwa/, "-".concat(k, ".iwa"))), _i.utils.cfb_add(t, r[k].location, M0(R0([A])));
                        var N = r[k].location.replace(/^Root Entry\//, "").replace(/^Index\//, "").replace(/\.iwa$/, "");
                        ci(t, r, 2, function(C) {
                            var F = Yt(C.messages[0].data);
                            Ag(F, k, N), Fa(F, r, s, k), C.messages[0].data = Vt(F);
                        });
                    }
                    b[E][0].data = $n(k);
                }
            });
            var w = Yt(b[1][0].data);
            (h = w[2]) == null || h.forEach(function(E) {
                var L = cn(E.data),
                    P = os({
                        deps: [s],
                        location: r[L].location,
                        type: r[L].type
                    }, r);
                zs(l, L), Qn(l, P), a[L] = P;
                var k = ss(t, r, L);
                if (k.id = P, r[L].location == r[s].location) c.push(k);
                else {
                    r[P].location = r[L].location.replace(L.toString(), P.toString()), r[P].location == r[L].location && (r[P].location = r[P].location.replace(/\.iwa/, "-".concat(P, ".iwa"))), _i.utils.cfb_add(t, r[P].location, M0(R0([k])));
                    var A = r[P].location.replace(/^Root Entry\//, "").replace(/^Index\//, "").replace(/\.iwa$/, "");
                    ci(t, r, 2, function(N) {
                        var C = Yt(N.messages[0].data);
                        Ag(C, P, A), Fa(C, r, s, P), N.messages[0].data = Vt(C);
                    });
                }
                E.data = $n(P);
            }), b[1][0].data = Vt(w);
            var T = Yt(b[3][0].data);
            T[1].forEach(function(E) {
                var L = Yt(E.data),
                    P = cn(L[2][0].data),
                    k = a[P];
                if (!a[P]) {
                    k = os({
                        deps: [s],
                        location: "",
                        type: r[P].type
                    }, r), r[k].location = "Root Entry/Index/Tables/Tile-".concat(k, ".iwa"), a[P] = k;
                    var A = ss(t, r, P);
                    A.id = k, zs(l, P), Qn(l, k), _i.utils.cfb_add(t, "/Index/Tables/Tile-".concat(k, ".iwa"), M0(R0([A]))), ci(t, r, 2, function(N) {
                        var C = Yt(N.messages[0].data);
                        C[3].push({
                            type: 2,
                            data: Vt([
                                [],
                                [{
                                    type: 0,
                                    data: Et(k)
                                }],
                                [{
                                    type: 2,
                                    data: pa("Tables/Tile")
                                }],
                                [{
                                    type: 2,
                                    data: pa("Tables/Tile-".concat(k))
                                }],
                                [{
                                    type: 2,
                                    data: new Uint8Array([2, 0, 0])
                                }],
                                [{
                                    type: 2,
                                    data: new Uint8Array([2, 0, 0])
                                }],
                                [],
                                [],
                                [],
                                [],
                                [{
                                    type: 0,
                                    data: Et(0)
                                }],
                                [],
                                [{
                                    type: 0,
                                    data: Et(0)
                                }]
                            ])
                        }), C[1] = [{
                            type: 0,
                            data: Et(Math.max(k + 1, Ya(C[1][0].data)))
                        }], Fa(C, r, s, k), N.messages[0].data = Vt(C);
                    });
                }
                L[2][0].data = $n(k), E.data = Vt(L);
            }), b[3][0].data = Vt(T);
        }
        d[4][0].data = Vt(b), l.messages[0].data = Vt(d);
    });
}

function zP(t, r, e, i, n, a) {
    var o = [];
    ci(t, r, a, function(c) {
        var u = Yt(c.messages[0].data);
        u[1] = [{
            type: 2,
            data: pa(i)
        }], o = kp(u[2], cn), c.messages[0].data = Vt(u);
    });
    var s = ss(t, r, o[0]),
        l = cn(Yt(s.messages[0].data)[2][0].data);
    ci(t, r, l, function(c, u) {
        return WP(t, r, e, c, u, l);
    });
}
var qb = !0;

function WP(t, r, e, i, n, a) {
    if (!e["!ref"]) throw new Error("Cannot export empty sheet to NUMBERS");
    var o = zn(e["!ref"]);
    o.s.r = o.s.c = 0;
    var s = !1;
    o.e.c > 999 && (s = !0, o.e.c = 999), o.e.r > 999999 && (s = !0, o.e.r = 999999), s && console.error("Truncating to ".concat(hn(o)));
    var l = [];
    if (e["!data"]) l = e["!data"];
    else {
        for (var c = [], u = 0; u <= o.e.c; ++u) c[u] = ui(u);
        for (var h = 0; h <= o.e.r; ++h) {
            l[h] = [];
            var d = "" + (h + 1);
            for (u = 0; u <= o.e.c; ++u) {
                var f = e[c[u] + d];
                f && (l[h][u] = f);
            }
        }
    }
    var m = {
            cmnt: [{
                a: "~54ee77S~",
                t: "... the people who are crazy enough to think they can change the world, are the ones who do."
            }],
            ferr: [],
            fmla: [],
            nfmt: [],
            ofmt: [],
            rsst: [{
                v: "~54ee77S~",
                l: "https://sheetjs.com/"
            }],
            sst: ["~Sh33tJ5~"]
        },
        _ = Yt(i.messages[0].data); {
        _[6][0].data = Et(o.e.r + 1), _[7][0].data = Et(o.e.c + 1), delete _[46];
        var x = Yt(_[4][0].data); {
            var g = cn(Yt(x[1][0].data)[2][0].data);
            ci(t, r, g, function(O, j) {
                var X, me = Yt(O.messages[0].data);
                if ((X = me ? .[2]) != null && X[0])
                    for (var xe = 0; xe < l.length; ++xe) {
                        var be = Yt(me[2][0].data);
                        be[1][0].data = Et(xe), be[4][0].data = Et(l[xe].length), me[2][xe] = {
                            type: me[2][0].type,
                            data: Vt(be)
                        };
                    }
                O.messages[0].data = Vt(me);
            });
            var b = cn(x[2][0].data);
            ci(t, r, b, function(O, j) {
                for (var X = Yt(O.messages[0].data), me = 0; me <= o.e.c; ++me) {
                    var xe = Yt(X[2][0].data);
                    xe[1][0].data = Et(me), xe[4][0].data = Et(o.e.r + 1), X[2][me] = {
                        type: X[2][0].type,
                        data: Vt(xe)
                    };
                }
                O.messages[0].data = Vt(X);
            });
            var w = Yt(x[9][0].data);
            w[1] = [];
            var T = Yt(x[3][0].data); {
                var E = 256;
                T[2] = [{
                    type: 0,
                    data: Et(E)
                }];
                var L = cn(Yt(T[1][0].data)[2][0].data),
                    P = function() {
                        var O = ss(t, r, 2),
                            j = Yt(O.messages[0].data),
                            X = j[3].filter(function(me) {
                                return Ya(Yt(me.data)[1][0].data) == L;
                            });
                        return X ? .length ? Ya(Yt(X[0].data)[12][0].data) : 0;
                    }();
                _i.utils.cfb_del(t, r[L].location), ci(t, r, 2, function(O) {
                    var j = Yt(O.messages[0].data);
                    j[3] = j[3].filter(function(X) {
                        return Ya(Yt(X.data)[1][0].data) != L;
                    }), UP(j, r, a, L), O.messages[0].data = Vt(j);
                }), zs(i, L), T[1] = [];
                for (var k = Math.ceil((o.e.r + 1) / E), A = 0; A < k; ++A) {
                    var N = os({
                        deps: [],
                        location: "",
                        type: 6002
                    }, r);
                    r[N].location = "Root Entry/Index/Tables/Tile-".concat(N, ".iwa");
                    for (var C = [
                            [],
                            [{
                                type: 0,
                                data: Et(0)
                            }],
                            [{
                                type: 0,
                                data: Et(Math.min(o.e.r + 1, (A + 1) * E))
                            }],
                            [{
                                type: 0,
                                data: Et(0)
                            }],
                            [{
                                type: 0,
                                data: Et(Math.min((A + 1) * E, o.e.r + 1) - A * E)
                            }],
                            [],
                            [{
                                type: 0,
                                data: Et(5)
                            }],
                            [{
                                type: 0,
                                data: Et(1)
                            }],
                            [{
                                type: 0,
                                data: Et(qb ? 1 : 0)
                            }]
                        ], F = A * E; F <= Math.min(o.e.r, (A + 1) * E - 1); ++F) {
                        var W = RP(l[F], m, qb);
                        W[1][0].data = Et(F - A * E), C[5].push({
                            data: Vt(W),
                            type: 2
                        });
                    }
                    T[1].push({
                        type: 2,
                        data: Vt([
                            [],
                            [{
                                type: 0,
                                data: Et(A)
                            }],
                            [{
                                type: 2,
                                data: $n(N)
                            }]
                        ])
                    });
                    var I = {
                            id: N,
                            messages: [Cg(6002, Vt(C))]
                        },
                        U = M0(R0([I]));
                    _i.utils.cfb_add(t, "/Index/Tables/Tile-".concat(N, ".iwa"), U), ci(t, r, 2, function(O) {
                        var j = Yt(O.messages[0].data);
                        j[3].push({
                            type: 2,
                            data: Vt([
                                [],
                                [{
                                    type: 0,
                                    data: Et(N)
                                }],
                                [{
                                    type: 2,
                                    data: pa("Tables/Tile")
                                }],
                                [{
                                    type: 2,
                                    data: pa("Tables/Tile-".concat(N))
                                }],
                                [{
                                    type: 2,
                                    data: new Uint8Array([2, 0, 0])
                                }],
                                [{
                                    type: 2,
                                    data: new Uint8Array([2, 0, 0])
                                }],
                                [],
                                [],
                                [],
                                [],
                                [{
                                    type: 0,
                                    data: Et(0)
                                }],
                                [],
                                [{
                                    type: 0,
                                    data: Et(P)
                                }]
                            ])
                        }), j[1] = [{
                            type: 0,
                            data: Et(Math.max(N + 1, Ya(j[1][0].data)))
                        }], Fa(j, r, a, N), O.messages[0].data = Vt(j);
                    }), Qn(i, N), w[1].push({
                        type: 2,
                        data: Vt([
                            [],
                            [{
                                type: 0,
                                data: Et(A * E)
                            }],
                            [{
                                type: 0,
                                data: Et(A)
                            }]
                        ])
                    });
                }
            }
            if (x[3][0].data = Vt(T), x[9][0].data = Vt(w), x[10] = [{
                    type: 2,
                    data: new Uint8Array([])
                }], e["!merges"]) {
                var le = os({
                    type: 6144,
                    deps: [a],
                    location: r[a].location
                }, r);
                n.push({
                    id: le,
                    messages: [Cg(6144, Vt([
                        [], e["!merges"].map(function(O) {
                            return {
                                type: 2,
                                data: Vt([
                                    [],
                                    [{
                                        type: 2,
                                        data: Vt([
                                            [],
                                            [{
                                                type: 5,
                                                data: new Uint8Array(new Uint16Array([O.s.r, O.s.c]).buffer)
                                            }]
                                        ])
                                    }],
                                    [{
                                        type: 2,
                                        data: Vt([
                                            [],
                                            [{
                                                type: 5,
                                                data: new Uint8Array(new Uint16Array([O.e.r - O.s.r + 1, O.e.c - O.s.c + 1]).buffer)
                                            }]
                                        ])
                                    }]
                                ])
                            };
                        })
                    ]))]
                }), x[13] = [{
                    type: 2,
                    data: $n(le)
                }], ci(t, r, 2, function(O) {
                    var j = Yt(O.messages[0].data);
                    Fa(j, r, a, le), O.messages[0].data = Vt(j);
                }), Qn(i, le);
            } else delete x[13];
            var H = cn(x[4][0].data);
            ci(t, r, H, function(O) {
                var j = Yt(O.messages[0].data);
                j[3] = [], m.sst.forEach(function(X, me) {
                    me != 0 && j[3].push({
                        type: 2,
                        data: Vt([
                            [],
                            [{
                                type: 0,
                                data: Et(me)
                            }],
                            [{
                                type: 0,
                                data: Et(1)
                            }],
                            [{
                                type: 2,
                                data: pa(X)
                            }]
                        ])
                    });
                }), O.messages[0].data = Vt(j);
            });
            var pe = cn(x[17][0].data);
            if (ci(t, r, pe, function(O) {
                    var j = Yt(O.messages[0].data);
                    j[3] = [];
                    var X = [904980, 903835, 903815, 903845];
                    m.rsst.forEach(function(me, xe) {
                        if (xe != 0) {
                            var be = [
                                [],
                                [{
                                    type: 0,
                                    data: new Uint8Array([5])
                                }],
                                [],
                                [{
                                    type: 2,
                                    data: pa(me.v)
                                }]
                            ];
                            be[10] = [{
                                type: 0,
                                data: new Uint8Array([1])
                            }], be[19] = [{
                                type: 2,
                                data: new Uint8Array([10, 6, 8, 0, 18, 2, 101, 110])
                            }], be[5] = [{
                                type: 2,
                                data: new Uint8Array([10, 8, 8, 0, 18, 4, 8, 155, 149, 55])
                            }], be[2] = [{
                                type: 2,
                                data: new Uint8Array([8, 148, 158, 55])
                            }], be[6] = [{
                                type: 2,
                                data: new Uint8Array([10, 6, 8, 0, 16, 0, 24, 0])
                            }], be[7] = [{
                                type: 2,
                                data: new Uint8Array([10, 8, 8, 0, 18, 4, 8, 135, 149, 55])
                            }], be[8] = [{
                                type: 2,
                                data: new Uint8Array([10, 8, 8, 0, 18, 4, 8, 165, 149, 55])
                            }], be[14] = [{
                                type: 2,
                                data: new Uint8Array([10, 6, 8, 0, 16, 0, 24, 0])
                            }], be[24] = [{
                                type: 2,
                                data: new Uint8Array([10, 6, 8, 0, 16, 0, 24, 0])
                            }];
                            var B = os({
                                    deps: [],
                                    location: "",
                                    type: 2001
                                }, r),
                                ne = [];
                            if (me.l) {
                                var Z = Dc(t, 2032, [
                                    [],
                                    [],
                                    [{
                                        type: 2,
                                        data: pa(me.l)
                                    }]
                                ], "/Index/Tables/DataList", r);
                                be[11] = [];
                                var J = [
                                    [],
                                    []
                                ];
                                J[1] || (J[1] = []), J[1].push({
                                    type: 2,
                                    data: Vt([
                                        [],
                                        [{
                                            type: 0,
                                            data: Et(0)
                                        }],
                                        [{
                                            type: 2,
                                            data: $n(Z)
                                        }]
                                    ])
                                }), be[11][0] = {
                                    type: 2,
                                    data: Vt(J)
                                }, ne.push(Z);
                            }
                            Dc(t, 2001, be, "/Index/Tables/DataList", r, B), ci(t, r, B, function(je) {
                                X.forEach(function(Qe) {
                                    return Qn(je, Qe);
                                }), ne.forEach(function(Qe) {
                                    return Qn(je, Qe);
                                });
                            });
                            var ye = Dc(t, 6218, [
                                [],
                                [{
                                    type: 2,
                                    data: $n(B)
                                }],
                                [],
                                [{
                                    type: 2,
                                    data: new Uint8Array([13, 255, 255, 255, 0, 18, 10, 16, 255, 255, 1, 24, 255, 255, 255, 255, 7])
                                }]
                            ], "/Index/Tables/DataList", r);
                            ci(t, r, ye, function(je) {
                                return Qn(je, B);
                            }), j[3].push({
                                type: 2,
                                data: Vt([
                                    [],
                                    [{
                                        type: 0,
                                        data: Et(xe)
                                    }],
                                    [{
                                        type: 0,
                                        data: Et(1)
                                    }],
                                    [],
                                    [],
                                    [],
                                    [],
                                    [],
                                    [],
                                    [{
                                        type: 2,
                                        data: $n(ye)
                                    }]
                                ])
                            }), Qn(O, ye), ci(t, r, 2, function(je) {
                                var Qe = Yt(je.messages[0].data);
                                Fa(Qe, r, pe, ye), Fa(Qe, r, ye, B), Fa(Qe, r, B, ne), Fa(Qe, r, B, X), je.messages[0].data = Vt(Qe);
                            });
                        }
                    }), O.messages[0].data = Vt(j);
                }), m.cmnt.length > 1) {
                var _e = cn(x[19][0].data),
                    Fe = {},
                    Te = 0;
                ci(t, r, _e, function(O) {
                    var j = Yt(O.messages[0].data);
                    j[3] = [], m.cmnt.forEach(function(X, me) {
                        if (me != 0) {
                            var xe = [];
                            X.replies && X.replies.forEach(function(ne) {
                                Fe[ne.a || ""] || (Fe[ne.a || ""] = Dc(t, 212, [
                                    [],
                                    [{
                                        type: 2,
                                        data: pa(ne.a || "")
                                    }],
                                    [{
                                        type: 2,
                                        data: Gb(++Te)
                                    }],
                                    [],
                                    [{
                                        type: 0,
                                        data: Et(0)
                                    }]
                                ], "/Index/Tables/DataList", r));
                                var Z = Fe[ne.a || ""],
                                    J = Dc(t, 3056, [
                                        [],
                                        [{
                                            type: 2,
                                            data: pa(ne.t || "")
                                        }],
                                        [{
                                            type: 2,
                                            data: Vt([
                                                [],
                                                [{
                                                    type: 1,
                                                    data: new Uint8Array([0, 0, 0, 128, 116, 109, 182, 65])
                                                }]
                                            ])
                                        }],
                                        [{
                                            type: 2,
                                            data: $n(Z)
                                        }]
                                    ], "/Index/Tables/DataList", r);
                                ci(t, r, J, function(ye) {
                                    return Qn(ye, Z);
                                }), xe.push(J), ci(t, r, 2, function(ye) {
                                    var je = Yt(ye.messages[0].data);
                                    Fa(je, r, J, Z), ye.messages[0].data = Vt(je);
                                });
                            }), Fe[X.a || ""] || (Fe[X.a || ""] = Dc(t, 212, [
                                [],
                                [{
                                    type: 2,
                                    data: pa(X.a || "")
                                }],
                                [{
                                    type: 2,
                                    data: Gb(++Te)
                                }],
                                [],
                                [{
                                    type: 0,
                                    data: Et(0)
                                }]
                            ], "/Index/Tables/DataList", r));
                            var be = Fe[X.a || ""],
                                B = Dc(t, 3056, [
                                    [],
                                    [{
                                        type: 2,
                                        data: pa(X.t || "")
                                    }],
                                    [{
                                        type: 2,
                                        data: Vt([
                                            [],
                                            [{
                                                type: 1,
                                                data: new Uint8Array([0, 0, 0, 128, 116, 109, 182, 65])
                                            }]
                                        ])
                                    }],
                                    [{
                                        type: 2,
                                        data: $n(be)
                                    }], xe.map(function(ne) {
                                        return {
                                            type: 2,
                                            data: $n(ne)
                                        };
                                    }), [{
                                        type: 2,
                                        data: Vt([
                                            [],
                                            [{
                                                type: 0,
                                                data: Et(me)
                                            }],
                                            [{
                                                type: 0,
                                                data: Et(0)
                                            }]
                                        ])
                                    }]
                                ], "/Index/Tables/DataList", r);
                            ci(t, r, B, function(ne) {
                                Qn(ne, be), xe.forEach(function(Z) {
                                    return Qn(ne, Z);
                                });
                            }), j[3].push({
                                type: 2,
                                data: Vt([
                                    [],
                                    [{
                                        type: 0,
                                        data: Et(me)
                                    }],
                                    [{
                                        type: 0,
                                        data: Et(1)
                                    }],
                                    [],
                                    [],
                                    [],
                                    [],
                                    [],
                                    [],
                                    [],
                                    [{
                                        type: 2,
                                        data: $n(B)
                                    }]
                                ])
                            }), Qn(O, B), ci(t, r, 2, function(ne) {
                                var Z = Yt(ne.messages[0].data);
                                Fa(Z, r, _e, B), Fa(Z, r, B, be), xe.length && Fa(Z, r, B, xe), ne.messages[0].data = Vt(Z);
                            });
                        }
                    }), j[2][0].data = Et(m.cmnt.length + 1), O.messages[0].data = Vt(j);
                });
            }
        }
        _[4][0].data = Vt(x);
    }
    i.messages[0].data = Vt(_);
}

function jP(t) {
    return function(e) {
        for (var i = 0; i != t.length; ++i) {
            var n = t[i];
            e[n[0]] === void 0 && (e[n[0]] = n[1]), n[2] === "n" && (e[n[0]] = Number(e[n[0]]));
        }
    };
}

function Yg(t) {
    jP([
        ["cellDates", !1],
        ["bookSST", !1],
        ["bookType", "xlsx"],
        ["compression", !1],
        ["WTF", !1]
    ])(t);
}

function HP(t, r) {
    t && !t.SSF && (t.SSF = na(Di)), t && t.SSF && (Np(), Op(t.SSF), r.revssf = Lp(t.SSF), r.revssf[t.SSF[65535]] = 0, r.ssf = t.SSF), r.rels = {}, r.wbrels = {}, r.Strings = [], r.Strings.Count = 0, r.Strings.Unique = 0, vf ? r.revStrings = new Map() : (r.revStrings = {}, r.revStrings.foo = [], delete r.revStrings.foo);
    var e = "bin",
        i = !0,
        n = bw();
    Yg(r = r || {});
    var a = Pg(),
        o = "",
        s = 0;
    if (r.cellXfs = [], Ml(r.cellXfs, {}, {
            revssf: {
                General: 0
            }
        }), t.Props || (t.Props = {}), o = "docProps/core.xml", Dr(a, o, Aw(t.Props, r)), n.coreprops.push(o), ei(r.rels, 2, o, Hr.CORE_PROPS), o = "docProps/app.xml", !(t.Props && t.Props.SheetNames))
        if (!t.Workbook || !t.Workbook.Sheets) t.Props.SheetNames = t.SheetNames;
        else {
            for (var l = [], c = 0; c < t.SheetNames.length; ++c)(t.Workbook.Sheets[c] || {}).Hidden != 2 && l.push(t.SheetNames[c]);
            t.Props.SheetNames = l;
        }
    t.Props.Worksheets = t.Props.SheetNames.length, Dr(a, o, Dw(t.Props, r)), n.extprops.push(o), ei(r.rels, 3, o, Hr.EXT_PROPS), t.Custprops !== t.Props && fn(t.Custprops || {}).length > 0 && (o = "docProps/custom.xml", Dr(a, o, kw(t.Custprops, r)), n.custprops.push(o), ei(r.rels, 4, o, Hr.CUST_PROPS));
    var u = ["SheetJ5"];
    for (r.tcid = 0, s = 1; s <= t.SheetNames.length; ++s) {
        var h = {
                "!id": {}
            },
            d = t.Sheets[t.SheetNames[s - 1]],
            f = (d || {})["!type"] || "sheet";
        switch (f) {
            case "chart":
            default:
                o = "xl/worksheets/sheet" + s + "." + e, Dr(a, o, AE(s - 1, r, t, h)), n.sheets.push(o), ei(r.wbrels, -1, "worksheets/sheet" + s + "." + e, Hr.WS[0]);
        }
        if (d) {
            var m = d["!comments"],
                _ = !1,
                x = "";
            if (m && m.length > 0) {
                var g = !1;
                m.forEach(function(w) {
                    w[1].forEach(function(T) {
                        T.T == !0 && (g = !0);
                    });
                }), g && (x = "xl/threadedComments/threadedComment" + s + ".xml", Dr(a, x, Ww(m, u, r)), n.threadedcomments.push(x), ei(h, -1, "../threadedComments/threadedComment" + s + ".xml", Hr.TCMNT)), x = "xl/comments" + s + "." + e, Dr(a, x, m8(m, r)), n.comments.push(x), ei(h, -1, "../comments" + s + "." + e, Hr.CMNT), _ = !0;
            }
            d["!legacy"] && _ && Dr(a, "xl/drawings/vmlDrawing" + s + ".vml", zw(s, d["!comments"])), delete d["!comments"], delete d["!legacy"];
        }
        h["!id"].rId1 && Dr(a, Sw(o), N0(h));
    }
    r.Strings != null && r.Strings.length > 0 && (o = "xl/sharedStrings." + e, Dr(a, o, Ak(r.Strings, r)), n.strs.push(o), ei(r.wbrels, -1, "sharedStrings." + e, Hr.SST)), o = "xl/workbook." + e, Dr(a, o, qE(t, r)), n.workbooks.push(o), ei(r.rels, 1, o, Hr.WB), o = "xl/theme/theme1.xml";
    var b = Vw(t.Themes, r);
    return Dr(a, o, b), n.themes.push(o), ei(r.wbrels, -1, "theme/theme1.xml", Hr.THEME), o = "xl/styles." + e, Dr(a, o, $k(t, r)), n.styles.push(o), ei(r.wbrels, -1, "styles." + e, Hr.STY), t.vbaraw && i && (o = "xl/vbaProject.bin", Dr(a, o, t.vbaraw), n.vba.push(o), ei(r.wbrels, -1, "vbaProject.bin", Hr.VBA)), o = "xl/metadata." + e, Dr(a, o, s8()), n.metadata.push(o), ei(r.wbrels, -1, "metadata." + e, Hr.XLMETA), u.length > 1 && (o = "xl/persons/person.xml", Dr(a, o, jw(u, r)), n.people.push(o), ei(r.wbrels, -1, "persons/person.xml", Hr.PEOPLE)), Dr(a, "[Content_Types].xml", ww(n, r)), Dr(a, "_rels/.rels", N0(r.rels)), Dr(a, "xl/_rels/workbook." + e + ".rels", N0(r.wbrels)), delete r.revssf, delete r.ssf, a;
}

function GP(t, r) {
    t && !t.SSF && (t.SSF = na(Di)), t && t.SSF && (Np(), Op(t.SSF), r.revssf = Lp(t.SSF), r.revssf[t.SSF[65535]] = 0, r.ssf = t.SSF), r.rels = {}, r.wbrels = {}, r.Strings = [], r.Strings.Count = 0, r.Strings.Unique = 0, vf ? r.revStrings = new Map() : (r.revStrings = {}, r.revStrings.foo = [], delete r.revStrings.foo);
    var e = "xml",
        i = v8.indexOf(r.bookType) > -1,
        n = bw();
    Yg(r = r || {});
    var a = Pg(),
        o = "",
        s = 0;
    if (r.cellXfs = [], Ml(r.cellXfs, {}, {
            revssf: {
                General: 0
            }
        }), t.Props || (t.Props = {}), o = "docProps/core.xml", Dr(a, o, Aw(t.Props, r)), n.coreprops.push(o), ei(r.rels, 2, o, Hr.CORE_PROPS), o = "docProps/app.xml", !(t.Props && t.Props.SheetNames))
        if (!t.Workbook || !t.Workbook.Sheets) t.Props.SheetNames = t.SheetNames;
        else {
            for (var l = [], c = 0; c < t.SheetNames.length; ++c)(t.Workbook.Sheets[c] || {}).Hidden != 2 && l.push(t.SheetNames[c]);
            t.Props.SheetNames = l;
        }
    t.Props.Worksheets = t.Props.SheetNames.length, Dr(a, o, Dw(t.Props, r)), n.extprops.push(o), ei(r.rels, 3, o, Hr.EXT_PROPS), t.Custprops !== t.Props && fn(t.Custprops || {}).length > 0 && (o = "docProps/custom.xml", Dr(a, o, kw(t.Custprops, r)), n.custprops.push(o), ei(r.rels, 4, o, Hr.CUST_PROPS));
    var u = ["SheetJ5"];
    for (r.tcid = 0, s = 1; s <= t.SheetNames.length; ++s) {
        var h = {
                "!id": {}
            },
            d = t.Sheets[t.SheetNames[s - 1]],
            f = (d || {})["!type"] || "sheet";
        switch (f) {
            case "chart":
            default:
                o = "xl/worksheets/sheet" + s + "." + e, Dr(a, o, h6(s - 1, r, t, h)), n.sheets.push(o), ei(r.wbrels, -1, "worksheets/sheet" + s + "." + e, Hr.WS[0]);
        }
        if (d) {
            var m = d["!comments"],
                _ = !1,
                x = "";
            if (m && m.length > 0) {
                var g = !1;
                m.forEach(function(b) {
                    b[1].forEach(function(w) {
                        w.T == !0 && (g = !0);
                    });
                }), g && (x = "xl/threadedComments/threadedComment" + s + ".xml", Dr(a, x, Ww(m, u, r)), n.threadedcomments.push(x), ei(h, -1, "../threadedComments/threadedComment" + s + ".xml", Hr.TCMNT)), x = "xl/comments" + s + "." + e, Dr(a, x, f8(m, r)), n.comments.push(x), ei(h, -1, "../comments" + s + "." + e, Hr.CMNT), _ = !0;
            }
            d["!legacy"] && _ && Dr(a, "xl/drawings/vmlDrawing" + s + ".vml", zw(s, d["!comments"])), delete d["!comments"], delete d["!legacy"];
        }
        h["!id"].rId1 && Dr(a, Sw(o), N0(h));
    }
    return r.Strings != null && r.Strings.length > 0 && (o = "xl/sharedStrings." + e, Dr(a, o, bk(r.Strings, r)), n.strs.push(o), ei(r.wbrels, -1, "sharedStrings." + e, Hr.SST)), o = "xl/workbook." + e, Dr(a, o, IE(t, r)), n.workbooks.push(o), ei(r.rels, 1, o, Hr.WB), o = "xl/theme/theme1.xml", Dr(a, o, Vw(t.Themes, r)), n.themes.push(o), ei(r.wbrels, -1, "theme/theme1.xml", Hr.THEME), o = "xl/styles." + e, Dr(a, o, Ik(t, r)), n.styles.push(o), ei(r.wbrels, -1, "styles." + e, Hr.STY), t.vbaraw && i && (o = "xl/vbaProject.bin", Dr(a, o, t.vbaraw), n.vba.push(o), ei(r.wbrels, -1, "vbaProject.bin", Hr.VBA)), o = "xl/metadata." + e, Dr(a, o, l8()), n.metadata.push(o), ei(r.wbrels, -1, "metadata." + e, Hr.XLMETA), u.length > 1 && (o = "xl/persons/person.xml", Dr(a, o, jw(u, r)), n.people.push(o), ei(r.wbrels, -1, "persons/person.xml", Hr.PEOPLE)), Dr(a, "[Content_Types].xml", ww(n, r)), Dr(a, "_rels/.rels", N0(r.rels)), Dr(a, "xl/_rels/workbook." + e + ".rels", N0(r.wbrels)), delete r.revssf, delete r.ssf, a;
}

function qP(t, r) {
    var e = "";
    switch ((r || {}).type || "base64") {
        case "buffer":
            return [t[0], t[1], t[2], t[3], t[4], t[5], t[6], t[7]];
        case "base64":
            e = Nl(t.slice(0, 12));
            break;
        case "binary":
            e = t;
            break;
        case "array":
            return [t[0], t[1], t[2], t[3], t[4], t[5], t[6], t[7]];
        default:
            throw new Error("Unrecognized type " + (r && r.type || "undefined"));
    }
    return [e.charCodeAt(0), e.charCodeAt(1), e.charCodeAt(2), e.charCodeAt(3), e.charCodeAt(4), e.charCodeAt(5), e.charCodeAt(6), e.charCodeAt(7)];
}

function u5(t, r) {
    switch (r.type) {
        case "base64":
        case "binary":
            break;
        case "buffer":
        case "array":
            r.type = "";
            break;
        case "file":
            return Df(r.file, _i.write(t, {
                type: ti ? "buffer" : ""
            }));
        case "string":
            throw new Error("'string' output type invalid for '" + r.bookType + "' files");
        default:
            throw new Error("Unrecognized type " + r.type);
    }
    return _i.write(t, r);
}

function XP(t, r) {
    switch (r.bookType) {
        case "ods":
            return s5(t, r);
        case "numbers":
            return BP(t, r);
        case "xlsb":
            return HP(t, r);
        default:
            return GP(t, r);
    }
}

function KP(t, r) {
    var e = na(r || {}),
        i = XP(t, e);
    return YP(i, e);
}

function YP(t, r) {
    var e = {},
        i = ti ? "nodebuffer" : typeof Uint8Array < "u" ? "array" : "string";
    if (r.compression && (e.compression = "DEFLATE"), r.password) e.type = i;
    else switch (r.type) {
        case "base64":
            e.type = "base64";
            break;
        case "binary":
            e.type = "string";
            break;
        case "string":
            throw new Error("'string' output type invalid for '" + r.bookType + "' files");
        case "buffer":
        case "file":
            e.type = i;
            break;
        default:
            throw new Error("Unrecognized type " + r.type);
    }
    var n = t.FullPaths ? _i.write(t, {
        fileType: "zip",
        type: {
            nodebuffer: "buffer",
            string: "binary"
        }[e.type] || e.type,
        compression: !!r.compression
    }) : t.generate(e);
    if (typeof Deno < "u" && typeof n == "string") {
        if (r.type == "binary" || r.type == "base64") return n;
        n = new Uint8Array(Ip(n));
    }
    return r.password && typeof encrypt_agile < "u" ? u5(encrypt_agile(n, r.password), r) : r.type === "file" ? Df(r.file, n) : r.type == "string" ? O0(n) : n;
}

function ZP(t, r) {
    var e = r || {},
        i = oP(t, e);
    return u5(i, e);
}

function as(t, r, e) {
    e || (e = "");
    var i = e + t;
    switch (r.type) {
        case "base64":
            return mp(Ws(i));
        case "binary":
            return Ws(i);
        case "string":
            return t;
        case "file":
            return Df(r.file, i, "utf8");
        case "buffer":
            return ti ? fs(i, "utf8") : typeof TextEncoder < "u" ? new TextEncoder().encode(i) : as(i, {
                type: "binary"
            }).split("").map(function(n) {
                return n.charCodeAt(0);
            });
    }
    throw new Error("Unrecognized type " + r.type);
}

function JP(t, r) {
    switch (r.type) {
        case "base64":
            return JA(t);
        case "binary":
            return t;
        case "string":
            return t;
        case "file":
            return Df(r.file, t, "binary");
        case "buffer":
            return ti ? fs(t, "binary") : t.split("").map(function(e) {
                return e.charCodeAt(0);
            });
    }
    throw new Error("Unrecognized type " + r.type);
}

function dp(t, r) {
    switch (r.type) {
        case "string":
        case "base64":
        case "binary":
            for (var e = "", i = 0; i < t.length; ++i) e += String.fromCharCode(t[i]);
            return r.type == "base64" ? mp(e) : r.type == "string" ? O0(e) : e;
        case "file":
            return Df(r.file, t);
        case "buffer":
            return t;
        default:
            throw new Error("Unrecognized type " + r.type);
    }
}

function f5(t, r) {
    YA(), PE(t);
    var e = na(r || {});
    if (e.cellStyles && (e.cellNF = !0, e.sheetStubs = !0), e.type == "array") {
        e.type = "binary";
        var i = f5(t, e);
        return e.type = "array", Ip(i);
    }
    var n = 0;
    if (e.sheet && (typeof e.sheet == "number" ? n = e.sheet : n = t.SheetNames.indexOf(e.sheet), !t.SheetNames[n])) throw new Error("Sheet not found: " + e.sheet + " : " + typeof e.sheet);
    switch (e.bookType || "xlsb") {
        case "xml":
        case "xlml":
            return as(nP(t, e), e);
        case "slk":
        case "sylk":
            return as(vk.from_sheet(t.Sheets[t.SheetNames[n]], e, t), e);
        case "htm":
        case "html":
            return as(n5(t.Sheets[t.SheetNames[n]], e), e);
        case "txt":
            return JP(d5(t.Sheets[t.SheetNames[n]], e), e);
        case "csv":
            return as(Zg(t.Sheets[t.SheetNames[n]], e), e, "\uFEFF");
        case "dif":
            return as(xk.from_sheet(t.Sheets[t.SheetNames[n]], e), e);
        case "dbf":
            return dp(gk.from_sheet(t.Sheets[t.SheetNames[n]], e), e);
        case "prn":
            return as(_k.from_sheet(t.Sheets[t.SheetNames[n]], e), e);
        case "rtf":
            return as(Dk(t.Sheets[t.SheetNames[n]], e), e);
        case "eth":
            return as(Lw.from_sheet(t.Sheets[t.SheetNames[n]], e), e);
        case "fods":
            return as(s5(t, e), e);
        case "wk1":
            return dp(Ob.sheet_to_wk1(t.Sheets[t.SheetNames[n]], e), e);
        case "wk3":
            return dp(Ob.book_to_wk3(t, e), e);
        case "biff2":
            e.biff || (e.biff = 2);
        case "biff3":
            e.biff || (e.biff = 3);
        case "biff4":
            return e.biff || (e.biff = 4), dp(i5(t, e), e);
        case "biff5":
            e.biff || (e.biff = 5);
        case "biff8":
        case "xla":
        case "xls":
            return e.biff || (e.biff = 8), ZP(t, e);
        case "xlsx":
        case "xlsm":
        case "xlam":
        case "xlsb":
        case "numbers":
        case "ods":
            return KP(t, e);
        default:
            throw new Error("Unrecognized bookType |" + e.bookType + "|");
    }
}

function QP(t) {
    if (!t.bookType) {
        var r = {
                xls: "biff8",
                htm: "html",
                slk: "sylk",
                socialcalc: "eth",
                Sh33tJS: "WTF"
            },
            e = t.file.slice(t.file.lastIndexOf(".")).toLowerCase();
        e.match(/^\.[a-z]+$/) && (t.bookType = e.slice(1)), t.bookType = r[t.bookType] || t.bookType;
    }
}

function h5(t, r, e) {
    var i = e || {};
    return i.type = "file", i.file = r, QP(i), f5(t, i);
}

function $P(t, r, e, i, n, a, o) {
    var s = di(e),
        l = o.defval,
        c = o.raw || !Object.prototype.hasOwnProperty.call(o, "raw"),
        u = !0,
        h = t["!data"] != null,
        d = n === 1 ? [] : {};
    if (n !== 1)
        if (Object.defineProperty) try {
            Object.defineProperty(d, "__rowNum__", {
                value: e,
                enumerable: !1
            });
        } catch {
            d.__rowNum__ = e;
        } else d.__rowNum__ = e;
    if (!h || t["!data"][e])
        for (var f = r.s.c; f <= r.e.c; ++f) {
            var m = h ? (t["!data"][e] || [])[f] : t[i[f] + s];
            if (m == null || m.t === void 0) {
                if (l === void 0) continue;
                a[f] != null && (d[a[f]] = l);
                continue;
            }
            var _ = m.v;
            switch (m.t) {
                case "z":
                    if (_ == null) break;
                    continue;
                case "e":
                    _ = _ == 0 ? null : void 0;
                    break;
                case "s":
                case "b":
                case "n":
                    if (!m.z || !Ic(m.z) || (_ = I0(_), typeof _ == "number")) break;
                case "d":
                    o && (o.UTC || o.raw === !1) || (_ = U0(new Date(_)));
                    break;
                default:
                    throw new Error("unrecognized type " + m.t);
            }
            if (a[f] != null) {
                if (_ == null) {
                    if (m.t == "e" && _ === null) d[a[f]] = null;
                    else if (l !== void 0) d[a[f]] = l;
                    else if (c && _ === null) d[a[f]] = null;
                    else continue;
                } else d[a[f]] = (m.t === "n" && typeof o.rawNumbers == "boolean" ? o.rawNumbers : c) ? _ : Xs(m, _, o);
                _ != null && (u = !1);
            }
        }
    return {
        row: d,
        isempty: u
    };
}

function Tg(t, r) {
    if (t == null || t["!ref"] == null) return [];
    var e = {
            t: "n",
            v: 0
        },
        i = 0,
        n = 1,
        a = [],
        o = 0,
        s = "",
        l = {
            s: {
                r: 0,
                c: 0
            },
            e: {
                r: 0,
                c: 0
            }
        },
        c = r || {},
        u = c.range != null ? c.range : t["!ref"];
    switch (c.header === 1 ? i = 1 : c.header === "A" ? i = 2 : Array.isArray(c.header) ? i = 3 : c.header == null && (i = 0), typeof u) {
        case "string":
            l = ki(u);
            break;
        case "number":
            l = ki(t["!ref"]), l.s.r = u;
            break;
        default:
            l = u;
    }
    i > 0 && (n = 0);
    var h = di(l.s.r),
        d = [],
        f = [],
        m = 0,
        _ = 0,
        x = t["!data"] != null,
        g = l.s.r,
        b = 0,
        w = {};
    x && !t["!data"][g] && (t["!data"][g] = []);
    var T = c.skipHidden && t["!cols"] || [],
        E = c.skipHidden && t["!rows"] || [];
    for (b = l.s.c; b <= l.e.c; ++b)
        if (!(T[b] || {}).hidden) switch (d[b] = ui(b), e = x ? t["!data"][g][b] : t[d[b] + h], i) {
            case 1:
                a[b] = b - l.s.c;
                break;
            case 2:
                a[b] = d[b];
                break;
            case 3:
                a[b] = c.header[b - l.s.c];
                break;
            default:
                if (e == null && (e = {
                        w: "__EMPTY",
                        t: "s"
                    }), s = o = Xs(e, null, c), _ = w[o] || 0, !_) w[o] = 1;
                else {
                    do s = o + "_" + _++; while (w[s]);
                    w[o] = _, w[s] = 1;
                }
                a[b] = s;
        }
    for (g = l.s.r + n; g <= l.e.r; ++g)
        if (!(E[g] || {}).hidden) {
            var L = $P(t, l, g, d, i, a, c);
            (L.isempty === !1 || (i === 1 ? c.blankrows !== !1 : c.blankrows)) && (f[m++] = L.row);
        }
    return f.length = m, f;
}
var Xb = /"/g;

function eI(t, r, e, i, n, a, o, s, l) {
    for (var c = !0, u = [], h = "", d = di(e), f = t["!data"] != null, m = f && t["!data"][e] || [], _ = r.s.c; _ <= r.e.c; ++_)
        if (i[_]) {
            var x = f ? m[_] : t[i[_] + d];
            if (x == null) h = "";
            else if (x.v != null) {
                c = !1, h = "" + (l.rawNumbers && x.t == "n" ? x.v : Xs(x, null, l));
                for (var g = 0, b = 0; g !== h.length; ++g)
                    if ((b = h.charCodeAt(g)) === n || b === a || b === 34 || l.forceQuotes) {
                        h = '"' + h.replace(Xb, '""') + '"';
                        break;
                    }
                h == "ID" && s == 0 && u.length == 0 && (h = '"ID"');
            } else x.f != null && !x.F ? (c = !1, h = "=" + x.f, h.indexOf(",") >= 0 && (h = '"' + h.replace(Xb, '""') + '"')) : h = "";
            u.push(h);
        }
    if (l.strip)
        for (; u[u.length - 1] === "";) --u.length;
    return l.blankrows === !1 && c ? null : u.join(o);
}

function Zg(t, r) {
    var e = [],
        i = r ? ? {};
    if (t == null || t["!ref"] == null) return "";
    for (var n = ki(t["!ref"]), a = i.FS !== void 0 ? i.FS : ",", o = a.charCodeAt(0), s = i.RS !== void 0 ? i.RS : `
`, l = s.charCodeAt(0), c = "", u = [], h = i.skipHidden && t["!cols"] || [], d = i.skipHidden && t["!rows"] || [], f = n.s.c; f <= n.e.c; ++f)(h[f] || {}).hidden || (u[f] = ui(f));
    for (var m = 0, _ = n.s.r; _ <= n.e.r; ++_)(d[_] || {}).hidden || (c = eI(t, n, _, u, o, l, a, m, i), c != null && (c || i.blankrows !== !1) && e.push((m++ ? s : "") + c));
    return e.join("");
}

function d5(t, r) {
    r || (r = {}), r.FS = "	", r.RS = `
`;
    var e = Zg(t, r);
    if (typeof Kr > "u" || r.type == "string") return e;
    var i = Kr.utils.encode(1200, e, "str");
    return "\xFF\xFE" + i;
}

function tI(t, r) {
    var e = "",
        i, n = "";
    if (t == null || t["!ref"] == null) return [];
    var a = ki(t["!ref"]),
        o = "",
        s = [],
        l, c = [],
        u = t["!data"] != null;
    for (l = a.s.c; l <= a.e.c; ++l) s[l] = ui(l);
    for (var h = a.s.r; h <= a.e.r; ++h)
        for (o = di(h), l = a.s.c; l <= a.e.c; ++l)
            if (e = s[l] + o, i = u ? (t["!data"][h] || [])[l] : t[e], n = "", i !== void 0) {
                if (i.F != null) {
                    if (e = i.F, !i.f) continue;
                    n = i.f, e.indexOf(":") == -1 && (e = e + ":" + e);
                }
                if (i.f != null) n = i.f;
                else {
                    if (r && r.values === !1) continue;
                    if (i.t == "z") continue;
                    if (i.t == "n" && i.v != null) n = "" + i.v;
                    else if (i.t == "b") n = i.v ? "TRUE" : "FALSE";
                    else if (i.w !== void 0) n = "'" + i.w;
                    else {
                        if (i.v === void 0) continue;
                        i.t == "s" ? n = "'" + i.v : n = "" + i.v;
                    }
                }
                c[c.length] = e + "=" + n;
            }
    return c;
}

function p5(t, r, e) {
    var i = e || {},
        n = t ? t["!data"] != null : i.dense;
    ls != null && n == null && (n = ls);
    var a = +!i.skipHeader,
        o = t || {};
    !t && n && (o["!data"] = []);
    var s = 0,
        l = 0;
    if (o && i.origin != null)
        if (typeof i.origin == "number") s = i.origin;
        else {
            var c = typeof i.origin == "string" ? Li(i.origin) : i.origin;
            s = c.r, l = c.c;
        }
    var u = {
        s: {
            c: 0,
            r: 0
        },
        e: {
            c: l,
            r: s + r.length - 1 + a
        }
    };
    if (o["!ref"]) {
        var h = ki(o["!ref"]);
        u.e.c = Math.max(u.e.c, h.e.c), u.e.r = Math.max(u.e.r, h.e.r), s == -1 && (s = h.e.r + 1, u.e.r = s + r.length - 1 + a);
    } else s == -1 && (s = 0, u.e.r = r.length - 1 + a);
    var d = i.header || [],
        f = 0,
        m = [];
    r.forEach(function(x, g) {
        n && !o["!data"][s + g + a] && (o["!data"][s + g + a] = []), n && (m = o["!data"][s + g + a]), fn(x).forEach(function(b) {
            (f = d.indexOf(b)) == -1 && (d[f = d.length] = b);
            var w = x[b],
                T = "z",
                E = "",
                L = n ? "" : ui(l + f) + di(s + g + a),
                P = n ? m[l + f] : o[L];
            w && typeof w == "object" && !(w instanceof Date) ? n ? m[l + f] = w : o[L] = w : (typeof w == "number" ? T = "n" : typeof w == "boolean" ? T = "b" : typeof w == "string" ? T = "s" : w instanceof Date ? (T = "d", i.UTC || (w = Rp(w)), i.cellDates || (T = "n", w = Wn(w)), E = P != null && P.z && Ic(P.z) ? P.z : i.dateNF || Di[14]) : w === null && i.nullError && (T = "e", w = 0), P ? (P.t = T, P.v = w, delete P.w, delete P.R, E && (P.z = E)) : n ? m[l + f] = P = {
                t: T,
                v: w
            } : o[L] = P = {
                t: T,
                v: w
            }, E && (P.z = E));
        });
    }), u.e.c = Math.max(u.e.c, l + d.length - 1);
    var _ = di(s);
    if (n && !o["!data"][s] && (o["!data"][s] = []), a)
        for (f = 0; f < d.length; ++f) n ? o["!data"][s][f + l] = {
            t: "s",
            v: d[f]
        } : o[ui(f + l) + _] = {
            t: "s",
            v: d[f]
        };
    return o["!ref"] = hn(u), o;
}

function rI(t, r) {
    return p5(null, t, r);
}

function Pp(t, r, e) {
    if (typeof r == "string") {
        if (t["!data"] != null) {
            var i = Li(r);
            return t["!data"][i.r] || (t["!data"][i.r] = []), t["!data"][i.r][i.c] || (t["!data"][i.r][i.c] = {
                t: "z"
            });
        }
        return t[r] || (t[r] = {
            t: "z"
        });
    }
    return typeof r != "number" ? Pp(t, Bi(r)) : Pp(t, ui(e || 0) + di(r));
}

function iI(t, r) {
    if (typeof r == "number") {
        if (r >= 0 && t.SheetNames.length > r) return r;
        throw new Error("Cannot find sheet # " + r);
    } else if (typeof r == "string") {
        var e = t.SheetNames.indexOf(r);
        if (e > -1) return e;
        throw new Error("Cannot find sheet name |" + r + "|");
    } else throw new Error("Cannot find sheet |" + r + "|");
}

function nI(t, r) {
    var e = {
        SheetNames: [],
        Sheets: {}
    };
    return t && Jg(e, t, r || "Sheet1"), e;
}

function Jg(t, r, e, i) {
    var n = 1;
    if (!e)
        for (; n <= 65535 && t.SheetNames.indexOf(e = "Sheet" + n) != -1; ++n, e = void 0);
    if (!e || t.SheetNames.length >= 65535) throw new Error("Too many worksheets");
    if (i && t.SheetNames.indexOf(e) >= 0 && e.length < 32) {
        var a = e.match(/\d+$/);
        n = a && +a[0] || 0;
        var o = a && e.slice(0, a.index) || e;
        for (++n; n <= 65535 && t.SheetNames.indexOf(e = o + n) != -1; ++n);
    }
    if (e5(e), t.SheetNames.indexOf(e) >= 0) throw new Error("Worksheet with name |" + e + "| already exists!");
    return t.SheetNames.push(e), t.Sheets[e] = r, e;
}

function aI(t, r, e) {
    t.Workbook || (t.Workbook = {}), t.Workbook.Sheets || (t.Workbook.Sheets = []);
    var i = iI(t, r);
    switch (t.Workbook.Sheets[i] || (t.Workbook.Sheets[i] = {}), e) {
        case 0:
        case 1:
        case 2:
            break;
        default:
            throw new Error("Bad sheet visibility setting " + e);
    }
    t.Workbook.Sheets[i].Hidden = e;
}

function oI(t, r) {
    return t.z = r, t;
}

function m5(t, r, e) {
    return r ? (t.l = {
        Target: r
    }, e && (t.l.Tooltip = e)) : delete t.l, t;
}

function sI(t, r, e) {
    return m5(t, "#" + r, e);
}

function lI(t, r, e) {
    t.c || (t.c = []), t.c.push({
        t: r,
        a: e || "SheetJS"
    });
}

function cI(t, r, e, i) {
    for (var n = typeof r != "string" ? r : ki(r), a = typeof r == "string" ? r : hn(r), o = n.s.r; o <= n.e.r; ++o)
        for (var s = n.s.c; s <= n.e.c; ++s) {
            var l = Pp(t, o, s);
            l.t = "n", l.F = a, delete l.v, o == n.s.r && s == n.s.c && (l.f = e, i && (l.D = !0));
        }
    var c = zn(t["!ref"]);
    return c.s.r > n.s.r && (c.s.r = n.s.r), c.s.c > n.s.c && (c.s.c = n.s.c), c.e.r < n.e.r && (c.e.r = n.e.r), c.e.c < n.e.c && (c.e.c = n.e.c), t["!ref"] = hn(c), t;
}
var Ef = {
    encode_col: ui,
    encode_row: di,
    encode_cell: Bi,
    encode_range: hn,
    decode_col: zg,
    decode_row: Vg,
    split_cell: aD,
    decode_cell: Li,
    decode_range: zn,
    format_cell: Xs,
    sheet_new: oD,
    sheet_add_aoa: gw,
    sheet_add_json: p5,
    sheet_add_dom: a5,
    aoa_to_sheet: H0,
    json_to_sheet: rI,
    table_to_sheet: o5,
    table_to_book: FP,
    sheet_to_csv: Zg,
    sheet_to_txt: d5,
    sheet_to_json: Tg,
    sheet_to_html: n5,
    sheet_to_formulae: tI,
    sheet_to_row_object_array: Tg,
    sheet_get_cell: Pp,
    book_new: nI,
    book_append_sheet: Jg,
    book_set_sheet_visibility: aI,
    cell_set_number_format: oI,
    cell_set_hyperlink: m5,
    cell_set_internal_link: sI,
    cell_add_comment: lI,
    sheet_set_array_formula: cI,
    consts: {
        SHEET_VISIBLE: 0,
        SHEET_HIDDEN: 1,
        SHEET_VERY_HIDDEN: 2
    }
};
var fV = xf.version;
ap();
var X0 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
    If = new Uint8Array(256);
for (Pf = 0; Pf < X0.length; Pf++) If[X0.charCodeAt(Pf)] = Pf;
var Pf, v5 = function(t) {
        for (var r = "", e = t.length, i = 0; i < e; i += 3) r += X0[t[i] >> 2], r += X0[(t[i] & 3) << 4 | t[i + 1] >> 4], r += X0[(t[i + 1] & 15) << 2 | t[i + 2] >> 6], r += X0[t[i + 2] & 63];
        return e % 3 === 2 ? r = r.substring(0, r.length - 1) + "=" : e % 3 === 1 && (r = r.substring(0, r.length - 2) + "=="), r;
    },
    g5 = function(t) {
        var r = t.length * .75,
            e = t.length,
            i, n = 0,
            a, o, s, l;
        t[t.length - 1] === "=" && (r--, t[t.length - 2] === "=" && r--);
        var c = new Uint8Array(r);
        for (i = 0; i < e; i += 4) a = If[t.charCodeAt(i)], o = If[t.charCodeAt(i + 1)], s = If[t.charCodeAt(i + 2)], l = If[t.charCodeAt(i + 3)], c[n++] = a << 2 | o >> 4, c[n++] = (o & 15) << 4 | s >> 2, c[n++] = (s & 3) << 6 | l & 63;
        return c;
    },
    fI = /^(data)?:?([\w\/\+]+)?;?(charset=[\w-]+|base64)?.*,/i,
    x5 = function(t) {
        var r = t.trim(),
            e = r.substring(0, 100),
            i = e.match(fI);
        if (!i) return g5(r);
        var n = i[0],
            a = r.substring(n.length);
        return g5(a);
    };
var rr = function(t) {
        return t.charCodeAt(0);
    },
    _5 = function(t) {
        return t.codePointAt(0);
    },
    Ks = function(t, r) {
        return Ja(t.toString(16), r, "0").toUpperCase();
    },
    Bl = function(t) {
        return Ks(t, 2);
    },
    Za = function(t) {
        return String.fromCharCode(t);
    },
    y5 = function(t) {
        return Za(parseInt(t, 16));
    },
    Ja = function(t, r, e) {
        for (var i = "", n = 0, a = r - t.length; n < a; n++) i += e;
        return i + t;
    },
    pi = function(t, r, e) {
        for (var i = t.length, n = 0; n < i; n++) r[e++] = t.charCodeAt(n);
        return i;
    };
var hI = function(t) {
        return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
    },
    Uc = function(t) {
        return t.replace(/\t|\u0085|\u2028|\u2029/g, "    ").replace(/[\b\v]/g, "");
    },
    dI = ["\\n", "\\f", "\\r", "\\u000B"];
var b5 = function(t) {
        return /^[\n\f\r\u000B]$/.test(t);
    },
    Hp = function(t) {
        return t.split(/[\n\f\r\u000B]/);
    },
    Qg = function(t) {
        return t.replace(/[\n\f\r\u000B]/g, " ");
    },
    $g = function(t, r) {
        var e = t.charCodeAt(r),
            i, n = r + 1,
            a = 1;
        return e >= 55296 && e <= 56319 && t.length > n && (i = t.charCodeAt(n), i >= 56320 && i <= 57343 && (a = 2)), [t.slice(r, r + a), a];
    },
    w5 = function(t) {
        for (var r = [], e = 0, i = t.length; e < i;) {
            var n = $g(t, e),
                a = n[0],
                o = n[1];
            r.push(a), e += o;
        }
        return r;
    },
    pI = function(t) {
        for (var r = dI.join("|"), e = ["$"], i = 0, n = t.length; i < n; i++) {
            var a = t[i];
            if (b5(a)) throw new TypeError("`wordBreak` must not include " + r);
            e.push(a === "" ? "." : hI(a));
        }
        var o = e.join("|");
        return new RegExp("(" + r + ")|((.*?)(" + o + "))", "gm");
    },
    S5 = function(t, r, e, i) {
        for (var n = pI(r), a = Uc(t).match(n), o = "", s = 0, l = [], c = function() {
                o !== "" && l.push(o), o = "", s = 0;
            }, u = 0, h = a.length; u < h; u++) {
            var d = a[u];
            if (b5(d)) c();
            else {
                var f = i(d);
                s + f > e && c(), o += d, s += f;
            }
        }
        return c(), l;
    },
    mI = /^D:(\d\d\d\d)(\d\d)?(\d\d)?(\d\d)?(\d\d)?(\d\d)?([+\-Z])?(\d\d)?'?(\d\d)?'?$/,
    Gp = function(t) {
        var r = t.match(mI);
        if (r) {
            var e = r[1],
                i = r[2],
                n = i === void 0 ? "01" : i,
                a = r[3],
                o = a === void 0 ? "01" : a,
                s = r[4],
                l = s === void 0 ? "00" : s,
                c = r[5],
                u = c === void 0 ? "00" : c,
                h = r[6],
                d = h === void 0 ? "00" : h,
                f = r[7],
                m = f === void 0 ? "Z" : f,
                _ = r[8],
                x = _ === void 0 ? "00" : _,
                g = r[9],
                b = g === void 0 ? "00" : g,
                w = m === "Z" ? "Z" : "" + m + x + ":" + b,
                T = new Date(e + "-" + n + "-" + o + "T" + l + ":" + u + ":" + d + w);
            return T;
        }
    },
    Of = function(t, r) {
        for (var e, i = 0, n; i < t.length;) {
            var a = t.substring(i).match(r);
            if (!a) return {
                match: n,
                pos: i
            };
            n = a, i += ((e = a.index) !== null && e !== void 0 ? e : 0) + a[0].length;
        }
        return {
            match: n,
            pos: i
        };
    };
var K0 = function(t) {
        return t[t.length - 1];
    },
    qp = function(t) {
        if (t instanceof Uint8Array) return t;
        for (var r = t.length, e = new Uint8Array(r), i = 0; i < r; i++) e[i] = t.charCodeAt(i);
        return e;
    },
    C5 = function() {
        for (var t = [], r = 0; r < arguments.length; r++) t[r] = arguments[r];
        for (var e = t.length, i = [], n = 0; n < e; n++) {
            var a = t[n];
            i[n] = a instanceof Uint8Array ? a : qp(a);
        }
        for (var o = 0, n = 0; n < e; n++) o += t[n].length;
        for (var s = new Uint8Array(o), l = 0, c = 0; c < e; c++)
            for (var u = i[c], h = 0, d = u.length; h < d; h++) s[l++] = u[h];
        return s;
    },
    A5 = function(t) {
        for (var r = 0, e = 0, i = t.length; e < i; e++) r += t[e].length;
        for (var n = new Uint8Array(r), a = 0, e = 0, i = t.length; e < i; e++) {
            var o = t[e];
            n.set(o, a), a += o.length;
        }
        return n;
    },
    Xp = function(t) {
        for (var r = "", e = 0, i = t.length; e < i; e++) r += Za(t[e]);
        return r;
    },
    T5 = function(t, r) {
        return t.id - r.id;
    },
    D5 = function(t, r) {
        for (var e = [], i = 0, n = t.length; i < n; i++) {
            var a = t[i],
                o = t[i - 1];
            (i === 0 || r(a) !== r(o)) && e.push(a);
        }
        return e;
    },
    Vc = function(t) {
        for (var r = t.length, e = 0, i = Math.floor(r / 2); e < i; e++) {
            var n = e,
                a = r - e - 1,
                o = t[e];
            t[n] = t[a], t[a] = o;
        }
        return t;
    },
    k5 = function(t) {
        for (var r = 0, e = 0, i = t.length; e < i; e++) r += t[e];
        return r;
    },
    F5 = function(t, r) {
        for (var e = new Array(r - t), i = 0, n = e.length; i < n; i++) e[i] = t + i;
        return e;
    },
    E5 = function(t, r) {
        for (var e = new Array(r.length), i = 0, n = r.length; i < n; i++) e[i] = t[r[i]];
        return e;
    },
    P5 = function(t) {
        return t instanceof Uint8Array || t instanceof ArrayBuffer || typeof t == "string";
    },
    Y0 = function(t) {
        if (typeof t == "string") return x5(t);
        if (t instanceof ArrayBuffer) return new Uint8Array(t);
        if (t instanceof Uint8Array) return t;
        throw new TypeError("`input` must be one of `string | ArrayBuffer | Uint8Array`");
    };
var hs = function() {
    return new Promise(function(t) {
        setTimeout(function() {
            return t();
        }, 0);
    });
};
var N5 = function(t, r) {
        r === void 0 && (r = !0);
        var e = [];
        r && e.push(65279);
        for (var i = 0, n = t.length; i < n;) {
            var a = t.codePointAt(i);
            if (a < 65536) e.push(a), i += 1;
            else if (a < 1114112) e.push(ev(a), tv(a)), i += 2;
            else throw new Error("Invalid code point: 0x" + Bl(a));
        }
        return new Uint16Array(e);
    },
    L5 = function(t) {
        return t >= 0 && t <= 65535;
    },
    R5 = function(t) {
        return t >= 65536 && t <= 1114111;
    },
    ev = function(t) {
        return Math.floor((t - 65536) / 1024) + 55296;
    },
    tv = function(t) {
        return (t - 65536) % 1024 + 56320;
    },
    zc = function(t) {
        return t.BigEndian = "BigEndian", t.LittleEndian = "LittleEndian", t;
    }(zc || {}),
    Nf = "\uFFFD".codePointAt(0),
    Kp = function(t, r) {
        if (r === void 0 && (r = !0), t.length <= 1) return String.fromCodePoint(Nf);
        for (var e = r ? vI(t) : zc.BigEndian, i = r ? 2 : 0, n = []; t.length - i >= 2;) {
            var a = O5(t[i++], t[i++], e);
            if (gI(a)) {
                if (t.length - i < 2) n.push(Nf);
                else {
                    var o = O5(t[i++], t[i++], e);
                    I5(o) ? n.push(a, o) : n.push(Nf);
                }
            } else I5(a) ? (i += 2, n.push(Nf)) : n.push(a);
        }
        return i < t.length && n.push(Nf), String.fromCodePoint.apply(String, n);
    },
    gI = function(t) {
        return t >= 55296 && t <= 56319;
    },
    I5 = function(t) {
        return t >= 56320 && t <= 57343;
    },
    O5 = function(t, r, e) {
        if (e === zc.LittleEndian) return r << 8 | t;
        if (e === zc.BigEndian) return t << 8 | r;
        throw new Error("Invalid byteOrder: " + e);
    },
    vI = function(t) {
        return M5(t) ? zc.BigEndian : B5(t) ? zc.LittleEndian : zc.BigEndian;
    },
    M5 = function(t) {
        return t[0] === 254 && t[1] === 255;
    },
    B5 = function(t) {
        return t[0] === 255 && t[1] === 254;
    },
    Yp = function(t) {
        return M5(t) || B5(t);
    };
var U5 = function(t) {
        var r = String(t);
        if (Math.abs(t) < 1) {
            var e = parseInt(t.toString().split("e-")[1]);
            if (e) {
                var i = t < 0;
                i && (t *= -1), t *= Math.pow(10, e - 1), r = "0." + new Array(e).join("0") + t.toString().substring(2), i && (r = "-" + r);
            }
        } else {
            var e = parseInt(t.toString().split("+")[1]);
            e > 20 && (e -= 20, t /= Math.pow(10, e), r = t.toString() + new Array(e + 1).join("0"));
        }
        return r;
    },
    Lf = function(t) {
        return Math.ceil(t.toString(2).length / 8);
    },
    Wc = function(t) {
        for (var r = new Uint8Array(Lf(t)), e = 1; e <= r.length; e++) r[e - 1] = t >> (r.length - e) * 8;
        return r;
    };
var jc = function(t) {
    throw new Error(t);
};
w0();
var V5 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
    Mf = new Uint8Array(256);
for (Rf = 0; Rf < V5.length; Rf++) Mf[V5.charCodeAt(Rf)] = Rf;
var Rf, xI = function(t) {
        var r = t.length * .75,
            e = t.length,
            i, n = 0,
            a, o, s, l;
        t[t.length - 1] === "=" && (r--, t[t.length - 2] === "=" && r--);
        var c = new Uint8Array(r);
        for (i = 0; i < e; i += 4) a = Mf[t.charCodeAt(i)], o = Mf[t.charCodeAt(i + 1)], s = Mf[t.charCodeAt(i + 2)], l = Mf[t.charCodeAt(i + 3)], c[n++] = a << 2 | o >> 4, c[n++] = (o & 15) << 4 | s >> 2, c[n++] = (s & 3) << 6 | l & 63;
        return c;
    },
    _I = function(t) {
        for (var r = "", e = 0; e < t.length; e++) r += String.fromCharCode(t[e]);
        return r;
    },
    Zp = function(t) {
        return _I(Tl.inflate(xI(t)));
    },
    z5 = function(t, r, e) {
        for (var i = "", n = 0, a = r - t.length; n < a; n++) i += e;
        return i + t;
    };
var W5 = "eJyFWdtyGjkQ/RVqnnar8Bb4lpg3jEnCxgEvGDtxKg9iphm01oyILrZxKv++mrGd3az6KC8UnNa0+nrUGr5lI11VVLtskF198FaU1Dns9w9OOkf7/ePDrJu90bWbiorCgpH2RpLZO9WqaCReqZ8lnReJqKTa/SwL8DXJctPs9Lxs4oSS+bAuVVjXC7/tG/lAxYV0+SYbOOOpm402wojckVlQ8+T4wVFdUDHXlaifrTs91Q/Z4PNeMLu7t3/U6746POm+7vW/dLNlWGuUrOlCW+mkrrPBXr/X+4/gciPz25qszQbhyeyKjG2XZb3ewR+9Xi/sMdVO5k+ebHemcaHzW/57p3/y+qQbPk967We//TxoP191hoVeUWexs44q25nUuTZbbYSj4o9OZ6hUZ97osZ05WTJ3AQ37jMOqQtblIt9QG7lWycKJuhCmeJGGhSOxffccyqPj/W728eXX4cFJNxvavAmRyQbH++HnGf34vdc/etXNFq54d50NXh+2X6/C137v+CnQH8gZmYdQfP6WXX8MCppQTYMlditCBL53/wfTQ65EFeNfvQ6erlQsqX21akJc1rGs0EoJE+NbMnlToZFAVEFkQ3iABW2uGH3CUK1ojUTgMWEbjfaWeUp5G6N5aCwRw5vddkOM98EVqRlPrBJ2E8OPZHSM6prJkrtnVrqNIWbtOjQrg8o7Zq2VDwxId5x3xMe0lpzBuVaa0WGpkkCkmgaON/3qBVODpaHQiIybXz3ZliTi3DO2D2PoNIZGMXQWQ+MYehNDb2PoXQxNYujPGHofQ+cx9CGGpjE0i6GLGPorhuYxtIihyxhaxtBVDF3H0McY+hRDNzG0CqfQLTmeNlZBBvr0+TnIKbmUuTS5Z1jUN6xtw8nBtEjLb7wxDOesmB5j+JfpIIYLmIZiWC6GZAz9HUMMvTItzESL6VqG9rZMKGOI4QaGXpjY+xi6i6H7GGKYdMeQPl9foBBW3GHark9Vo5OqgEd9oe+ZOPOnc3NcqmZgiUuomehYnt1xZ8daaSPZ8wBoyb0Jx3jOBLBtGyvbiRNOLXw0Sy+DpNKAAhpxq/gXYhD6NdMda6bwwyTH0kwhypI70p5wdhR7Gjia3JEhpvfDLCRKI7YcqYXJnxgv/g3vSthEhNNSEKIfCQByUkpurWQaNXjqNtqjSfHp0OdLOwSAG31E7h03uLRMvlbEtDPoq0rkhqvhlSFu40I7kfP9VoRLFrH+G7YLcypCQLkJ1delML5SwjPb6DIMmQxL54L1gyq+YIfMyKNNsQ4zHj8UnoMDdoZwfoMqkJxX7A6Cj3czWzLdqcC+GuGM9tCa4RobSp5J2gTnk0D5CVA0Pp1RAqn7hC0o5J3kqvkTsGyY6gwBHlqmHtqBh2x77UI9QimVS75PljgMAjXDEljn0QNjvMlZIAju/pF0NH95VcFshSgnB3Ug+LhMkwYoVKOAUS+T2kZIG2DVcYInLXDTQkKUYHelH6kuGcEcbPE26aRPNklKOEQpNcCQHPp6k4jc5UYbRtkM7T4HcVsAvADWLtEGnq/M9t2G9e2Aw8xEM1CCQ4QDWq28cnKrmDHTAwcvgYNh1HJSqEKumdvVDlPDFOwjU8UyTpZZ4tTBohzYUSMaRAmdggBNgKLmzVsYGLjXbyujb6lm70CGSmnB1PsWJHuSYhQfupq/ioxBTRngkEaRuQEP3ICIPb/kAq/Axo6ZUEaQFFSStxwa/eDpiARDND4kqhIE+BG1Btp7hjKCjh6UKYt2xk7MkmMJ8PCMlGNy5XiSdvc6wYjYtIp5pSGBRTo9Z45R6Asw4bQ8HgrYhEJmTFsk6pWvyPfJOj4HiXNGFFQJw1hOCVaYgChNUOGcA6tD0DZCMSdDczMBDa5TFVWDqWn5i/yB+BByqARcGhx6ziqXVD4Ii2TqZmnLi8AS3L8dGqRoBIzwkM0LmXNpOAOKTNKbKciPBvg8XdZJ6RDoHEKO5meuGdDzmOiQMTrt0d63SVfAIDBJtgIwwaUvN7ps8l1r7v0I5lKPRUEV+rcqfaHlDvJH4FSdVBVCjk8IiXp87Jv/Ib90s/dk6gshTfPv8Zfv/wDUfBK2";
var j5 = "eJyFWdtyGjkQ/RVqnnarcAo7vuE3jEnCxgEvGDtxKg9iRgxaa0ZEF9s4lX/fnrGdTVZ9lBcKTmvU96PW8C0bmqqStc9OsqsPwYlSdnaPDvb6naP+3v5+1s3emNpPRCVpwdAEq6TdOTW6mC61+hpksyBo/euCTrOg89MKUSm9/XUNwddSletGcbOcfo+90Cof1KWmdTu7e4S4N+pBFhfK5+vsxNsgu9lwLazIvbRz2Tw7evCyLmQxM5Won809PTUP2cnnnYOj7s7eQa97fNjvHvd2v3SzBS21WtXywjjllakbRb3eT4LLtcpva+lcdkJPZlfSunZZ1uu9ftXr9UjFxHiVP7my2drGh84f+Z+d3f5xv0uf/V77udt+vm4/jzqDwixlZ751XlauM65zYzfGCi+LV53OQOvOrNnHdWbSSXtHKOkZ0apC1eU8X8s2dO0mcy/qQtjiRUoLh2Lz7jmWB4cUto8vv/Zf97vZwOVNhGx2crhHP8/kj987uxShbO6Ld9fZyfF++/WKvu72Dp/i/EF6q3IKxedv2fVH2qAJ1YQscRtBEfje/R8sH3Itqhj/Ggx5utSxpA7VsglxWceywmgtbIxvpM2bio0EoiKRo/AAC9pcMfsJK2stV0gEHhOu2dHdMk/p4GI0p0YTMbzebtaS8Z5cUYbxxGnh1jH8KK2JUVMzWfL3zEq/tpJZu6JuZVB1x6x16oEB5R3nneRjWivO4Nxow+zhZKWASDcNHCv9GgRTg6WV1IiMm8ReriWJOPeM7YMYOo2hYQydxdAoht7E0NsYehdD4xj6K4bex9B5DH2IoUkMTWPoIob+jqFZDM1j6DKGFjF0FUPXMfQxhj7F0E0MLekQupWep40lyUCfPj8HOSVXKlc2DwyLhoa1HZ0cTIu0/MYbw3DOkukxhn+ZDmK4gGkohuViSMXQPzHE0CvTwky0mK5laG/DhDKGGG5g6IWJfYihuxi6jyGGSbcM6fP1BQphyR2m7fpUNXqlC3jUF+aeiTN/OjfHpW4GlriEmoGO5dktd3astLGKPQ/ALnmwdIznTADbtnGqHTnh1MJHswyKJJUBFNCI241/IwahXzHdsWIKnyY5lmYKUZbckfaEs6PY08DR5E5ayfQ+zUKitGLDkRpdASTjxX/hXQqXiHBaCkL0IwFALrVWG6eYRiVP/doENCk+Hfp8aVMAuNFH5MFzg0vL5CstmXYGfVWJ3HI1vLSSU1wYL3K+3wq6ZUnWf8t2YS4LCig3oYa6FDZUWgRGjSlpyGRYOhesH7LiC3bAjDzGFiua8fih8BwcsFOE8woqIrmgWQ2Cj3czWzLdqYFeg3Bmd2pNusVSyTNJG+N8SlB+AhRNSGdUgtR9whYU6k5x1fwJWDZIdYYADy1SD23BQ669dqEekaktF3yfLHAYBGqGBbAuoAdGWMkZEQR3/0g6mr+8qmBUIcrJQR0IPi6TpAEa1Shg1MvkbkO0G2DVUYInHXDTQUJUQLs2j7IuGcEMqHibdDIkmyQlHKCUWmBIDn29SUTucm0ss9kUaZ+BuM0BXgBrF0hB4CuzfbfhQjvgMDPRFJTgAOGAVqugvdpoZswMwMFL4CCNWl4JXagVc7vaYmqYAD0qVSyjZJklTh0syoEdNaJBlNAJCNAYbNS8eaOBgXv9trTmVtbsHcjKUjkw9b4FyR6nGCVQV/NXkRGoKQscMigyN+CBGxCx55dc4BXYyDMTyhCSgk7ylkejHzwdkWCAxodEVYIAP6LWQLqnKCPo6EGZckgzdmKaHEuAh2dSeyZXnidpf28SjIhNq5hXGgpYZNJz5giFvgATTsvjVMCWCpkxbZ6oV74i3yfr+BwkzltRyEpYxnKZYIUxiNIYFc45sJqCthaaORmamwlocJOqqBpMTYvf5A/ERyKHSsCl5NBzVrmk8kGYJ1M3TVteEEtw/3YYkKIhMCJANi9UzqXhDGxkk95MQH4MwGfpsk5KB2DPAeRofuaagn0eEx0yQqc90n2bdAUMAuNkKwATfPpyY8om37Xh3o9gLg1YRFuhf6vSF1ruIH8ETtXJrSjk+IRQqMdHofkf8ks3ey9tfSGUbf49/vL9XxrnGMA=";
var H5 = "eJyFWVtT2zgU/isZP+3OhE5Iy/UtDaHNFhI2IdDS4UGxFUeLbKW6AKHT/77Hhnbb1fnUFw98x9K5fzpyvmZDU1Wy9tlxdnUenChlZ3e//+awc7B32D/Kutmpqf1EVJJeGJpglbQ706VWX4JshEHrX4Wdn4SiUnr7q5jga6nKdaPvXBYqVISMvdAqH9Slpjd3dvuEuFP1KIsL5fN1duxtkN1suBZW5F7auWxWjx69rAtZzEwl6hc73741j9nx553+QXenv9frHr456h729m672YJetVrV8sI45ZWpG0W93k+Cy7XK72rpXHZMK7MraV37WtbrvX7V6/VIxcR4lT87s9naxovOH/mfnd2jw6MuPY967XO3ffbb5+v2edAZFGYpO/Ot87JynXGdG7sxVnhZvOp0Blp3Zs1urjOTTtp7QknbiN4qVF3O87VsQ9huMveiLoQtvkvpxaHYvH+J6d4+Be/j9//e9Pe72cDlTZxsdrzfP+pmJ/LH/zu7ewfdbO6L99e0crf98+rlzybY59JblVM8Pn/Nrj/S+iZeEzLEbQSF4Vv3f7B8zLWoYvxLMOToUseSOlTLJs5lHcsKo7WwMb6RNm/qNRKIikSOogMsaBPG7CesrLVcIRFYJlyzo7tjVungYjSnNhMxvN5u1pLxnlxRhvHEaeHWMfwkrYlRUzNZ8g/Mm35tJfPuipqWQdU9865Tjwwo7znvJB/TWnEG50YbZg8nKwVEuuniWOmXIJgaLK2kPmTcJBJzLVPEuWdsH8TQ2xgaxtBJDI1i6DSG3sXQ+xgax9BfMfQhhs5i6DyGJjE0jaGLGPo7hmYxNI+hyxhaxNBVDF3H0McY+hRDNzG0pJPoTnqeNpYkA336sg5ySq5UrmweGBYNDWk7OjiYFmn5jTeG4Zwl02MM/zIdxHAB01AMy8WQiqF/YoihV6aFmWgxXcvQ3oYJZQwx3MDQCxP7EEP3MfQQQwyTbhnS5+sLFMKSO0zb91PV6JUu4FFfmAcmzvzp3ByXuplX4hJqpjqWZ7fc2bHSxir2PAC75MHSMZ4zAWzbxql27oRTCx/NMiiSVAZQQCNuN/6NGIR+xXTHiil8GuRYmilEWXJH2jPOjmLPA0eTO2kl0/s0C4nSig1HanQJkIwX/4V3KVwiwmkpCNGPBAC51FptnGIalTz1axPQpPh86POlTQHgRh+RB88NLi2Tr7Rk2hn0VSVyy9Xw0kpOcWG8yPl+K+iyJVn/LduFOV3GaOBmuDvUpbCh0iIwakxJQybD0rlg/ZAVX7ADZuQxtljRjMcPhWfggJ0inFdQEckFzWoQfLyb2ZLpTg30GoQzu1Nr0lWWSp5J2hjnU4LyE6BoQjqjEqTuE7agUPeKq+ZPwLJBqjMEWLRILdqCRa69dqEekaktF3yfLHAYBGqGBbAuoAUjrOSECIK7fyQdzb9/r2BUIcrJQR0IPi6TpAEa1Shg1MvkbkO0G2DVUYInHXDTQUJUQLs2T7IuGcEMqHiXdDIkmyQlHKCUWmBIDn29SUTucm0ss9kUaZ+BuM0BXgBrF0hB4Cuz/bbhQjvgMDPRFJTgAOGAVqugvdpoZswMwMFL4CCNWl4JXagVc7vaYmqYAD0qVSyjZJklTh0syoEdNaJBlNAJCNAYbNR8eaOBgfv8trTmTtbsHcjKUjkw9b4DyR6nGCVQV/NXkRGoKQscMigyN2DBDYjYy0cu8Als5JkJZQhJQSd5y6PRD56OSDBA40OiKkGAn1BrIN1TlBF09KBMOaQZOzFNjiXAwxOpPZMrz5O0fzAJRsSmVcwnDQUsMuk5c4RCX4AJp+VxKmBLhcyYNk/UK1+RH5J1fAYS560oZCUsY7lMsMIYRGmMCucMWE1BWwvNnAzNzQQ0uElVVA2mpsVv8gfiI5FDJeBScuglq1xS+SDMk6mbpi0viCW4XzsMSNEQGBEgmxcq59JwAjaySW8mID8G4LN0WSelA7DnAHI0P3NNwT5PiQ4ZodMe6b5LugIGgXGyFYAJPn25MWWT79pw30cwlwYsoq3Qr1XpCy13kD8Bp+rkVhRyfEIo1OOj0PwOedvNPkhbXwhlm1+Pb7/9C/NFF2U=";
var G5 = "eJyFWdtSGzkQ/RXXPO1WmZSBEAJvjnESb8AmGENCKg+ypj3Wohk5ugAmlX9fzUCyW6s+ysuUfVqXvh61Zr4XI1PX1PjiuLg6C05U1Ns/Ojx42TsYHB4eFf3irWn8VNQUB4xMsIpsCwatU1DUSm8T+JpUtW7XP6NShToiEy+0ksOm0nHkIP53b9UDlefKy3Vx7G2gfjFaCyukJzundu74wVNTUnlhatE8a/XmjXkojr/s7O33d/YOBv3D3YP+68HB136xiEOtVg2dG6e8Mk1xvLM7GPxHcLlW8rYh54rjOLO4Iuu6YcVgsP9iMBjELabGK/lkymZrWxt6f8g/e7tHr4/68Xk06J673XOve+53z8PesDRL6s23zlPtepNGGrsxVngqX/R6Q617F+1qrndBjuxdRONu4ziqVE01l2vqHNgtMveiKYUtf0rjwJHYvH/26MGrvX7x6ee/l3uv+sXQydZPtjh+tXfUL07o1/+d3YPDfjH35fvrOHO3+3n1/LN19hl5q2T0x5fvxfWnOL/11zQq4jYiuuFH/38wPUgt6hT/Fkw0dKlTSRPqZevnqkllpdFa2BTfkJVtdiYCUUeRi94BGnQBY9YTlhpNKyQC04RrV3S3zCwdXIrKWFQihdfbzZoY66MpyjCWOC3cOoUfyZoUNQ0TJX/PjPRrS8zYVSxZBlV3zFinHhiQ7jjriPdpoziFpdGGWcNRrYBIt1WcbvotCCYHK0uxDhkzvwVyHVOksWd0H6bQmxQapdBJCo1T6G0KvUuh9yk0SaG/UuhDCp2m0FkKTVNolkLnKfQxhS5SaJ5Clym0SKGrFLpOoU8p9DmFblJoGU+iW/I8bSyjDNTp8zzIKVIpqawMDIuGlrRdPDiYEun4jVeG4ZwlU2MM/zIVxHABU1AMy6WQSqG/U4ihV6aEGW8xVcvQ3oZxZQox3MDQC+P7kEJ3KXSfQgyTbhnS5/MLJMKSO0y78bls9EqX8KgvzT3jZ/50bo9L3fYraQq1XR3Ls1vu7FhpYxV7HoBVZLDxGJeMA7uycarrOmHXwnuzCipKagMooBV3C/9GDFy/YqpjxSR+bORYmilFVXFH2hPOtmJPDUcbO7LE1H7shURlxYYjtdj6E2PFv+5dCpfxcF4KXPQrAEBOWquNU0yhRkv92gTUKT4d+nxqRwdwrY+QwXONS8fkK01MOYO6qoW0XA4vLXEbl8YLyddbGa9axNpv2SqU8SoWG26Gu0NTCRtqLQKzjalik8mwtBSsHVTzCTtkWh5jy1Xs8fim8BQcsDOE8xvUkeSCZncQvL/b3pKpTg32NQhnVo+lGa+yMeWZoE1wPAmknwBJE/IRJRC6z1iDUt0pLps/A82GucoQYNIiN2kLJrnu2oVqhHJLLvg6WWA3CFQMC6BdQBPGeJOTSBDc/SNrqPz5voLZClGOBHkgeL9MswpolKOAUS+zq43QaoBVxxmedMBMBwlRgd21eaSmYgQXYIt3WSNDtkhywiEKqQWKSGjrTcZzl2tjmcVmaPcL4Lc5wEug7QJtEPjM7N5tuNA1OExPNAMpOEQ4oNU6aK82mmkzAzDwEhgYWy2vhC7VirldbTE1TME+Kpcs42yaZU4dLJJAjwbRIAroFDhoAhZq37zFhoF7/ba05pYa9g5kqVIOdL3vQLAnOUYJsar5q8gY5JQFBhnkmRsw4QZ47PklF3gFNvZMhzKCpKCzvOVR6wdPRyQYovYhk5XAwY+oNNDeMxQRdPSgSDm0MzZilm1LgIUnpD0TK8+TtL83GUbEqtXMKw0FNDL5PnOMXF+CDqfj8ZjANiYyo9o8k698Rn7I5vEpCJy3oqRaWEZzyrDCBHhpghLnFGgdnbYWmjkZ2psJKHCTy6gGdE2L38QP+IeQQRXg0mjQc1S5oPJOmGdDN8trXkaW4L52GBCiEVAiQDYvleTCcAIWsllrpiA+BuAX+bTOSodgzSHkaL7nmoF1HjMVMkanPdr7NmsKaAQm2VIAKvj85cZUbbwbw70fwVwasCguhb5W5S+03EH+CIxqsktFl+MTQqEaH4f2O+TXfvGBbHMulG2/Hn/98Q/b2xEO";
var q5 = " ";
var X5 = " ";
var K5 = " ";
var Y5 = " ";
var Z5 = " ";
var J5 = " ";
var Q5 = " ";
var $5 = " ";
var eS = "eJx9WFlv2zgQ/iuGnnYBt5DkS85bmk13g27SoEkPbNEHWqIlIhSpklSuov99R7JIkSLtFyGZjxzN8c0h/4oueF1jpqKz6Mt1K1GJZ4s4S+PZYrvdbqJ59J4zdYNqDAfuXuodp52spdSToZrQl6n0KyZl1Sm/xgVpa5BcKURJfs5KCgdj+F++J8+4uCUqr6IzJVo8jy4qJFCusLjD3d27BucE0cGYd+/4c3T2/U2SxfM36XYxT+JtDI8k/jGPPrMCC0oYvuWSKMJZdPYmiWMLuK9I/sCwlNHZCuRfsJD9sSiOk7dxnMFbbrgieefGBW9eROfA7I/8z1myzVbz7rnpn9vuCW/unpvZecF3eHb3IhWu5eyK5Vw0XCCFi7ezc0pnvRo5E1hi8QhCeM0lHCoIK+/yCvdR67zrfd2THPA7VfzzNTrbpv2fX+BPeH8fm2usBMnBg++/oq/forO08+QGNMgGgeG/5wfxYrE4iPFzTlFt5JtkkLeMPIL/EFoNreJBE2vrXReako3YcqvVEXCTKWJdzPS7Gizyjk/mZZvsAKC66d7FCgMtF4NC2eaVqpDyLW+QwIzi/TGoD6tvPQL7BJEPNVKVb39DW2mkJnY5FALyD9eEhU6DL4SPrqTaS0mRrHyDXrHgvpQz7AvVU+CkqgQOnN3zVgSkkFVfKslzQIgfMfPFOBxWRiyDjcs5p5wFIoFr4kImprQrP59WP1ubiVpcCgxlNLq5XC4PwM8Wy77EvSs5ZyU0EpuFaXqAzmlTjVlerzcH8TuskH/4oiLj0WQQ/oWpdXadJAfxZSOJ7exmPfD01lYSD8K/kU0288JLS7Mh+hW337dINCPA5MRX8QE1jXU8Wx/E/6J6V4zyLBtCdd36Km4Cso+QTOG4N6T5dvRusxxsu6/scK5Wgw2fKovZ20HxHSnrQDjv0WjEejvw7/MkxmMD6ZQkvnEfa1xayperg/ibZfN2kN1K4lvxHw4lZAfD6QErpy1lOt2QF4H3XATa8HDP7VnrVWY6SoNZQfKWokBRt90Ak7mt2GACwTVE8bNPE+Tw3VTIzkmQqRuLqsvtUGaFw3cTcjzJxSod3tjYSnQgS4fvpgyc8KaDZuLwXR8FtYlv8YPD9rHBuGxfbQYG1q1vL2v9+3zC9nF0EF+BqoLBFBbbjRfSYbsJprLYboxtpx1Fj23esXoMhqlx7rB9uR2OPxP/aCMDmX61/Vhm8cha7HA91bzbWUR1z0/m8tLUKSyJ1qWNHqeXrTUf16lb76Or6XIzTmWFA4mHyeLOkUS3+H23UpJQPAnbE0bUS2CSUi6IdWM13Mhpu/OlBUE1t/YbA1QYCeWLYVsrRh+SeDm0RCQEf9pxa3Xpds4RcpJhqNVDbXPkzqTpOJcK/mT1VO17gUtn57C3J3cpMlUucW77Px3hRwZ83VJFGvriJ6YRHJboLmnWPUNXWAC7FbQg+/0IrjUL4RMFBxhYkEdSBLxiXB0xD8TkEZorywPXoP0I/jxhXGzWKEoJUFgeiTvs3srq2eO9Hq2Aeq92S9eDIgeYwIeawKoVY+KyVOumuBmpY0r+CgrgQVn7ohl9n6aIoc4TJjB0lEDWvmaGa05ETrGfPRd3lm1jI64b9SKtBJlbhAFTgEhuqWoUvlhCFdwRBW613cNWqnGYyDAdj+OQfdnugpBWHUa14jAKbbN2tlDrfR6mXUT9p7F3peyGvHNBb0UCl933GHgmyN6Hc/0R6+KZxiG7Ba6ReJjg6RiAos0DpTRsHWNz1s284Mr58DI+UF52N8B7vyIGzP4+nGJcWLXiNMtiR0/0S0BPtExAj3ZNwE42zh11e6duTZS/YlZaK6DebfrkOsb4aURMnsqiA+viHpPowDrwsoX1y6moRTZ20cMXtmpOgFYf8sGd8kFrRw4ptuCQagu2lJvwmpXEUu2DNSlOoEf12vY4aXOZkG6WY8OC4hzrwHRcjVhWepjd4KdYKK7jrx5H89WjRxPWoycydlS3jZ/I2VS/G9yp9gB6PG1T1aY4YAp3LfPHPPqABbtFRHS/jf34/T82FAfb";
var tS = "eJxtmNtu20YQhl+F4FULyMGeD7pz3AY1ChtG7NpFA18w1NomIlECSRcxgrx7SVk7+wOdG8H5OJydf2Z2d5gf9cV+t0v9VK/r+6vXsXlOlbHe28paq229qj/t++m62aXZ4J/m8PRb1z9/baZxefK63Z6eXN5dVMvTCh83u277xr/6kLrnl2XNq7TpXnczuZyabdee98/b2VzM/x4/dd/T5qab2pd6PQ2vaVVfvDRD005puE3Lu7eH1HbN9hTjx4/77/X6y5lcnUmjVzHIVVDicVX/1W/SsO36dLMfu6nb9/X6TAoBD+5euvZbn8axXtuZ36dhPJrVQqgPQoh5hev91LWLkIv94W1Ygq9+aX+tZAx2tfz64284/sblN/rqfLP/mqrbt3FKu7G67Nv9cNgPzZQ2H6rz7bb6vLgZq89pTMO/M/xfEqturJpqSM/d7GJIm2oamk3aNcO3av80O5xh3yyKmm1193ZIT02bqovTKjP+MAf++7zsZvZ3276kYyWWXB0z99S18/PbafPHQ71W4fjn/fxnFO+ZvkrT0LVzTr78qB/+nk38bHM9exgP8zr1z9U7jt6840YW5uSJKcZOCaBBnKgm5mU8MVNYyMwWFvO7Ukagkmgg6sDWQ5yFFqjzUrLEaQ3BEmiwNsMSaZS0vgWfOkPHWQowNeTUc0kumnxZvsgPxlGai6VTGUqAVCTQ6QkWnc77DKEiLktSUBJKqHIQZ86d8gCpHYoiEzMsb1ubYy8vW50DChB5ZhGqrijD0EqUIeiaEHIfCg5Kpuu0ApiToaGPSY0uaQsyr65L2oKi1yFt1PLaQ3lzfXTgXodGoJYzglndSLDMPg1sTPJpQJHJigw0QrGERqD9YhyTOgONQDUyuF1zaxuokc/BW2ztXCMrGZ9WMW1oQZHIXWNBkSCfRZEL5BMUiZw6CzVSFCfUSGZFNjIldoKDkonTKQiJIGzWmFd3BizJJ9SINoLDriOfUCOZS+zg+KGD1qGiLNMLxtJD1/ns00ON6EzyUCM6vbxhoBKaqbG3DFQCNiL1iHccBPV0DHhQH/JW8EW90dkyFKGywCJU0WkVSvSGeiSUODWFFD0HYdPQVoiRgfPMA+/nnRgiAyNYSjpWNQcNSMrtFCUH4ZIRpSCWocFCSuhCEY6hoUClc0WC52BJlCYYLQdhN+hygRRRlo5BKRRLS6oihSqh+ZzzRGG1Mo4Iz1LoP0qsxDGFzk0JE42ji0jCPejomJKCuwil4m5CiRMEUMVSzVLDUstSx1Juc0oVWMpqY295qVltmtWmWW2a1aZZbZrVplltmtWmWW2G1WZYbYbVZlhthtVmWG2G1WZYbYbVZlhtltVmWW2W1WZZbZbVZlltltVmWW2W1QYjQCh7E2aAQHeGhCFgPoNoy8KNb2wxBhmGKBxoUZXlLGsLI6AsftEDHV0wIURVbANLcTKlGGBIKPOAxCmhePCKUwFzAmpDFRQvjA9R06Hq8TONvshgKDCuRAZTXigUxjxNFfKRo3CLhnIJBMFRvMZpqpNBMlQJzGT5WFQMVQI/AikPMIhEU1aDjqJvQwmjSHB05cC9jbYwc5UtAHNLhDw41ha+lEqF4JaH3gmB61SYcqInxTDmQK8v08vjqv4zDf1N0w3Lf4A8/vwPpfK11w==";
var NI = {
        Courier: G5,
        "Courier-Bold": W5,
        "Courier-Oblique": H5,
        "Courier-BoldOblique": j5,
        Helvetica: Y5,
        "Helvetica-Bold": q5,
        "Helvetica-Oblique": K5,
        "Helvetica-BoldOblique": X5,
        "Times-Roman": $5,
        "Times-Bold": Z5,
        "Times-Italic": Q5,
        "Times-BoldItalic": J5,
        Symbol: eS,
        ZapfDingbats: tS
    },
    Z0 = function(t) {
        return t.Courier = "Courier", t.CourierBold = "Courier-Bold", t.CourierOblique = "Courier-Oblique", t.CourierBoldOblique = "Courier-BoldOblique", t.Helvetica = "Helvetica", t.HelveticaBold = "Helvetica-Bold", t.HelveticaOblique = "Helvetica-Oblique", t.HelveticaBoldOblique = "Helvetica-BoldOblique", t.TimesRoman = "Times-Roman", t.TimesRomanBold = "Times-Bold", t.TimesRomanItalic = "Times-Italic", t.TimesRomanBoldItalic = "Times-BoldItalic", t.Symbol = "Symbol", t.ZapfDingbats = "ZapfDingbats", t;
    }(Z0 || {}),
    rS = {},
    iS = function() {
        function t() {
            var r = this;
            this.getWidthOfGlyph = function(e) {
                return r.CharWidths[e];
            }, this.getXAxisKerningForPair = function(e, i) {
                return (r.KernPairXAmounts[e] || {})[i];
            };
        }
        return t.load = function(r) {
            var e = rS[r];
            if (e) return e;
            var i = Zp(NI[r]),
                n = Object.assign(new t(), JSON.parse(i));
            return n.CharWidths = n.CharMetrics.reduce(function(a, o) {
                return a[o.N] = o.WX, a;
            }, {}), n.KernPairXAmounts = n.KernPairs.reduce(function(a, o) {
                var s = o[0],
                    l = o[1],
                    c = o[2];
                return a[s] || (a[s] = {}), a[s][l] = c, a;
            }, {}), rS[r] = n, n;
        }, t;
    }();
var nS = " ";
var RI = Zp(nS),
    rv = JSON.parse(RI),
    iv = function() {
        function t(r, e) {
            var i = this;
            this.canEncodeUnicodeCodePoint = function(n) {
                return n in i.unicodeMappings;
            }, this.encodeUnicodeCodePoint = function(n) {
                var a = i.unicodeMappings[n];
                if (!a) {
                    var o = String.fromCharCode(n),
                        s = "0x" + z5(n.toString(16), 4, "0"),
                        l = i.name + ' cannot encode "' + o + '" (' + s + ")";
                    throw new Error(l);
                }
                return {
                    code: a[0],
                    name: a[1]
                };
            }, this.name = r, this.supportedCodePoints = Object.keys(e).map(Number).sort(function(n, a) {
                return n - a;
            }), this.unicodeMappings = e;
        }
        return t;
    }(),
    Bf = {
        Symbol: new iv("Symbol", rv.symbol),
        ZapfDingbats: new iv("ZapfDingbats", rv.zapfdingbats),
        WinAnsi: new iv("WinAnsi", rv.win1252)
    };
var Uf = function(t) {
        return Object.keys(t).map(function(r) {
            return t[r];
        });
    },
    MI = Uf(Z0),
    nv = function(t) {
        return MI.includes(t);
    },
    Vf = function(t, r) {
        return t.x === r.x && t.y === r.y && t.width === r.width && t.height === r.height;
    };
var Tn = function(t) {
        return "`" + t + "`";
    },
    BI = function(t) {
        return "'" + t + "'";
    },
    aS = function(t) {
        var r = typeof t;
        return r === "string" ? BI(t) : r === "undefined" ? Tn(t) : t;
    },
    UI = function(t, r, e) {
        for (var i = new Array(e.length), n = 0, a = e.length; n < a; n++) {
            var o = e[n];
            i[n] = aS(o);
        }
        var s = i.join(" or ");
        return Tn(r) + " must be one of " + s + ", but was actually " + aS(t);
    },
    Uo = function(t, r, e) {
        Array.isArray(e) || (e = Uf(e));
        for (var i = 0, n = e.length; i < n; i++)
            if (t === e[i]) return;
        throw new TypeError(UI(t, r, e));
    },
    Pa = function(t, r, e) {
        Array.isArray(e) || (e = Uf(e)), Uo(t, r, e.concat(void 0));
    },
    oS = function(t, r, e) {
        Array.isArray(e) || (e = Uf(e));
        for (var i = 0, n = t.length; i < n; i++) Uo(t[i], r, e);
    },
    VI = function(t) {
        return t === null ? "null" : t === void 0 ? "undefined" : typeof t == "string" ? "string" : isNaN(t) ? "NaN" : typeof t == "number" ? "number" : typeof t == "boolean" ? "boolean" : typeof t == "symbol" ? "symbol" : typeof t == "bigint" ? "bigint" : t.constructor && t.constructor.name ? t.constructor.name : t.name ? t.name : t.constructor ? String(t.constructor) : String(t);
    },
    zI = function(t, r) {
        return r === "null" ? t === null : r === "undefined" ? t === void 0 : r === "string" ? typeof t == "string" : r === "number" ? typeof t == "number" && !isNaN(t) : r === "boolean" ? typeof t == "boolean" : r === "symbol" ? typeof t == "symbol" : r === "bigint" ? typeof t == "bigint" : r === Date ? t instanceof Date : r === Array ? t instanceof Array : r === Uint8Array ? t instanceof Uint8Array : r === ArrayBuffer ? t instanceof ArrayBuffer : r === Function ? t instanceof Function : t instanceof r[0];
    },
    WI = function(t, r, e) {
        for (var i = new Array(e.length), n = 0, a = e.length; n < a; n++) {
            var o = e[n];
            o === "null" && (i[n] = Tn("null")), o === "undefined" && (i[n] = Tn("undefined")), o === "string" ? i[n] = Tn("string") : o === "number" ? i[n] = Tn("number") : o === "boolean" ? i[n] = Tn("boolean") : o === "symbol" ? i[n] = Tn("symbol") : o === "bigint" ? i[n] = Tn("bigint") : o === Array ? i[n] = Tn("Array") : o === Uint8Array ? i[n] = Tn("Uint8Array") : o === ArrayBuffer ? i[n] = Tn("ArrayBuffer") : i[n] = Tn(o[1]);
        }
        var s = i.join(" or ");
        return Tn(r) + " must be of type " + s + ", but was actually of type " + Tn(VI(t));
    },
    ke = function(t, r, e) {
        for (var i = 0, n = e.length; i < n; i++)
            if (zI(t, e[i])) return;
        throw new TypeError(WI(t, r, e));
    },
    rt = function(t, r, e) {
        ke(t, r, e.concat("undefined"));
    },
    Jp = function(t, r, e) {
        for (var i = 0, n = t.length; i < n; i++) ke(t[i], r, e);
    },
    aa = function(t, r, e, i) {
        if (ke(t, r, ["number"]), ke(e, "min", ["number"]), ke(i, "max", ["number"]), i = Math.max(e, i), t < e || t > i) throw new Error(Tn(r) + " must be at least " + e + " and at most " + i + ", but was actually " + t);
    },
    Qa = function(t, r, e, i) {
        ke(t, r, ["number", "undefined"]), typeof t == "number" && aa(t, r, e, i);
    },
    Qp = function(t, r, e) {
        if (ke(t, r, ["number"]), t % e !== 0) throw new Error(Tn(r) + " must be a multiple of " + e + ", but was actually " + t);
    },
    sS = function(t, r) {
        if (!Number.isInteger(t)) throw new Error(Tn(r) + " must be an integer, but was actually " + t);
    },
    Ul = function(t, r) {
        if (![1, 0].includes(Math.sign(t))) throw new Error(Tn(r) + " must be a positive number or 0, but was actually " + t);
    };
var mr = new Uint16Array(256);
for (zf = 0; zf < 256; zf++) mr[zf] = zf;
var zf;
mr[22] = rr("");
mr[24] = rr("\u02D8");
mr[25] = rr("\u02C7");
mr[26] = rr("\u02C6");
mr[27] = rr("\u02D9");
mr[28] = rr("\u02DD");
mr[29] = rr("\u02DB");
mr[30] = rr("\u02DA");
mr[31] = rr("\u02DC");
mr[127] = rr("\uFFFD");
mr[128] = rr("\u2022");
mr[129] = rr("\u2020");
mr[130] = rr("\u2021");
mr[131] = rr("\u2026");
mr[132] = rr("\u2014");
mr[133] = rr("\u2013");
mr[134] = rr("\u0192");
mr[135] = rr("\u2044");
mr[136] = rr("\u2039");
mr[137] = rr("\u203A");
mr[138] = rr("\u2212");
mr[139] = rr("\u2030");
mr[140] = rr("\u201E");
mr[141] = rr("\u201C");
mr[142] = rr("\u201D");
mr[143] = rr("\u2018");
mr[144] = rr("\u2019");
mr[145] = rr("\u201A");
mr[146] = rr("\u2122");
mr[147] = rr("\uFB01");
mr[148] = rr("\uFB02");
mr[149] = rr("\u0141");
mr[150] = rr("\u0152");
mr[151] = rr("\u0160");
mr[152] = rr("\u0178");
mr[153] = rr("\u017D");
mr[154] = rr("\u0131");
mr[155] = rr("\u0142");
mr[156] = rr("\u0153");
mr[157] = rr("\u0161");
mr[158] = rr("\u017E");
mr[159] = rr("\uFFFD");
mr[160] = rr("\u20AC");
mr[173] = rr("\uFFFD");
var $p = function(t) {
    for (var r = new Array(t.length), e = 0, i = t.length; e < i; e++) r[e] = mr[t[e]];
    return String.fromCodePoint.apply(String, r);
};
var jI = function() {
        function t(r) {
            this.populate = r, this.value = void 0;
        }
        return t.prototype.getValue = function() {
            return this.value;
        }, t.prototype.access = function() {
            return this.value || (this.value = this.populate()), this.value;
        }, t.prototype.invalidate = function() {
            this.value = void 0;
        }, t.populatedBy = function(r) {
            return new t(r);
        }, t;
    }(),
    oa = jI;
var jn = function(t) {
    Ge(r, t);

    function r(e, i) {
        var n = this,
            a = "Method " + e + "." + i + "() not implemented";
        return n = t.call(this, a) || this, n;
    }
    return r;
}(Error);
var J0 = function(t) {
    Ge(r, t);

    function r(e) {
        var i = this,
            n = "Cannot construct " + e + " - it has a private constructor";
        return i = t.call(this, n) || this, i;
    }
    return r;
}(Error);
var Hc = function(t) {
    Ge(r, t);

    function r(e, i) {
        var n = this,
            a = function(l) {
                var c, u;
                return (c = l ? .name) !== null && c !== void 0 ? c : (u = l ? .constructor) === null || u === void 0 ? void 0 : u.name;
            },
            o = Array.isArray(e) ? e.map(a) : [a(e)],
            s = "Expected instance of " + o.join(" or ") + ", " + ("but got instance of " + (i && a(i)));
        return n = t.call(this, s) || this, n;
    }
    return r;
}(Error);
var lS = function(t) {
    Ge(r, t);

    function r(e) {
        var i = this,
            n = e + " stream encoding not supported";
        return i = t.call(this, n) || this, i;
    }
    return r;
}(Error);
var Q0 = function(t) {
    Ge(r, t);

    function r(e, i) {
        var n = this,
            a = "Cannot call " + e + "." + i + "() more than once";
        return n = t.call(this, a) || this, n;
    }
    return r;
}(Error);
var kz = function(t) {
    Ge(r, t);

    function r(e) {
        var i = this,
            n = "Missing catalog (ref=" + e + ")";
        return i = t.call(this, n) || this, i;
    }
    return r;
}(Error);
var cS = function(t) {
    Ge(r, t);

    function r() {
        var e = this,
            i = "Can't embed page with missing Contents";
        return e = t.call(this, i) || this, e;
    }
    return r;
}(Error);
var uS = function(t) {
    Ge(r, t);

    function r(e) {
        var i, n, a, o = this,
            s = (a = (n = (i = e ? .contructor) === null || i === void 0 ? void 0 : i.name) !== null && n !== void 0 ? n : e ? .name) !== null && a !== void 0 ? a : e,
            l = "Unrecognized stream type: " + s;
        return o = t.call(this, l) || this, o;
    }
    return r;
}(Error);
var fS = function(t) {
    Ge(r, t);

    function r() {
        var e = this,
            i = "Found mismatched contexts while embedding pages. All pages in the array passed to `PDFDocument.embedPages()` must be from the same document.";
        return e = t.call(this, i) || this, e;
    }
    return r;
}(Error);
var hS = function(t) {
    Ge(r, t);

    function r(e) {
        var i = this,
            n = "Attempted to convert PDFArray with " + e + " elements to rectangle, but must have exactly 4 elements.";
        return i = t.call(this, n) || this, i;
    }
    return r;
}(Error);
var e1 = function(t) {
    Ge(r, t);

    function r(e) {
        var i = this,
            n = 'Attempted to convert "' + e + '" to a date, but it does not match the PDF date string format.';
        return i = t.call(this, n) || this, i;
    }
    return r;
}(Error);
var av = function(t) {
    Ge(r, t);

    function r(e, i) {
        var n = this,
            a = "Invalid targetIndex specified: targetIndex=" + e + " must be less than Count=" + i;
        return n = t.call(this, a) || this, n;
    }
    return r;
}(Error);
var ov = function(t) {
    Ge(r, t);

    function r(e, i) {
        var n = this,
            a = "Failed to " + i + " at targetIndex=" + e + " due to corrupt page tree: It is likely that one or more 'Count' entries are invalid";
        return n = t.call(this, a) || this, n;
    }
    return r;
}(Error);
var $0 = function(t) {
    Ge(r, t);

    function r(e, i, n) {
        var a = this,
            o = "index should be at least " + i + " and at most " + n + ", but was actually " + e;
        return a = t.call(this, o) || this, a;
    }
    return r;
}(Error);
var eu = function(t) {
    Ge(r, t);

    function r() {
        var e = this,
            i = "Attempted to set invalid field value";
        return e = t.call(this, i) || this, e;
    }
    return r;
}(Error);
var dS = function(t) {
    Ge(r, t);

    function r() {
        var e = this,
            i = "Attempted to select multiple values for single-select field";
        return e = t.call(this, i) || this, e;
    }
    return r;
}(Error);
var pS = function(t) {
    Ge(r, t);

    function r(e) {
        var i = this,
            n = "No /DA (default appearance) entry found for field: " + e;
        return i = t.call(this, n) || this, i;
    }
    return r;
}(Error);
var mS = function(t) {
    Ge(r, t);

    function r(e) {
        var i = this,
            n = "No Tf operator found for DA of field: " + e;
        return i = t.call(this, n) || this, i;
    }
    return r;
}(Error);
var sv = function(t) {
    Ge(r, t);

    function r(e, i) {
        var n = this,
            a = "Failed to parse number " + ("(line:" + e.line + " col:" + e.column + " offset=" + e.offset + '): "' + i + '"');
        return n = t.call(this, a) || this, n;
    }
    return r;
}(Error);
var Vl = function(t) {
    Ge(r, t);

    function r(e, i) {
        var n = this,
            a = "Failed to parse PDF document " + ("(line:" + e.line + " col:" + e.column + " offset=" + e.offset + "): " + i);
        return n = t.call(this, a) || this, n;
    }
    return r;
}(Error);
var gS = function(t) {
    Ge(r, t);

    function r(e, i, n) {
        var a = this,
            o = "Expected next byte to be " + i + " but it was actually " + n;
        return a = t.call(this, e, o) || this, a;
    }
    return r;
}(Vl);
var vS = function(t) {
    Ge(r, t);

    function r(e, i) {
        var n = this,
            a = "Failed to parse PDF object starting with the following byte: " + i;
        return n = t.call(this, e, a) || this, n;
    }
    return r;
}(Vl);
var xS = function(t) {
    Ge(r, t);

    function r(e) {
        var i = this,
            n = "Failed to parse invalid PDF object";
        return i = t.call(this, e, n) || this, i;
    }
    return r;
}(Vl);
var _S = function(t) {
    Ge(r, t);

    function r(e) {
        var i = this,
            n = "Failed to parse PDF stream";
        return i = t.call(this, e, n) || this, i;
    }
    return r;
}(Vl);
var yS = function(t) {
    Ge(r, t);

    function r(e) {
        var i = this,
            n = "Failed to parse PDF literal string due to unbalanced parenthesis";
        return i = t.call(this, e, n) || this, i;
    }
    return r;
}(Vl);
var bS = function(t) {
    Ge(r, t);

    function r(e) {
        var i = this,
            n = "Parser stalled";
        return i = t.call(this, e, n) || this, i;
    }
    return r;
}(Vl);
var wS = function(t) {
    Ge(r, t);

    function r(e) {
        var i = this,
            n = "No PDF header found";
        return i = t.call(this, e, n) || this, i;
    }
    return r;
}(Vl);
var SS = function(t) {
    Ge(r, t);

    function r(e, i) {
        var n = this,
            a = "Did not find expected keyword '" + Xp(i) + "'";
        return n = t.call(this, e, a) || this, n;
    }
    return r;
}(Vl);
var CS = function(t) {
        return t[t.Null = 0] = "Null", t[t.Backspace = 8] = "Backspace", t[t.Tab = 9] = "Tab", t[t.Newline = 10] = "Newline", t[t.FormFeed = 12] = "FormFeed", t[t.CarriageReturn = 13] = "CarriageReturn", t[t.Space = 32] = "Space", t[t.ExclamationPoint = 33] = "ExclamationPoint", t[t.Hash = 35] = "Hash", t[t.Percent = 37] = "Percent", t[t.LeftParen = 40] = "LeftParen", t[t.RightParen = 41] = "RightParen", t[t.Plus = 43] = "Plus", t[t.Minus = 45] = "Minus", t[t.Dash = 45] = "Dash", t[t.Period = 46] = "Period", t[t.ForwardSlash = 47] = "ForwardSlash", t[t.Zero = 48] = "Zero", t[t.One = 49] = "One", t[t.Two = 50] = "Two", t[t.Three = 51] = "Three", t[t.Four = 52] = "Four", t[t.Five = 53] = "Five", t[t.Six = 54] = "Six", t[t.Seven = 55] = "Seven", t[t.Eight = 56] = "Eight", t[t.Nine = 57] = "Nine", t[t.LessThan = 60] = "LessThan", t[t.GreaterThan = 62] = "GreaterThan", t[t.A = 65] = "A", t[t.D = 68] = "D", t[t.E = 69] = "E", t[t.F = 70] = "F", t[t.O = 79] = "O", t[t.P = 80] = "P", t[t.R = 82] = "R", t[t.LeftSquareBracket = 91] = "LeftSquareBracket", t[t.BackSlash = 92] = "BackSlash", t[t.RightSquareBracket = 93] = "RightSquareBracket", t[t.a = 97] = "a", t[t.b = 98] = "b", t[t.d = 100] = "d", t[t.e = 101] = "e", t[t.f = 102] = "f", t[t.i = 105] = "i", t[t.j = 106] = "j", t[t.l = 108] = "l", t[t.m = 109] = "m", t[t.n = 110] = "n", t[t.o = 111] = "o", t[t.r = 114] = "r", t[t.s = 115] = "s", t[t.t = 116] = "t", t[t.u = 117] = "u", t[t.x = 120] = "x", t[t.LeftCurly = 123] = "LeftCurly", t[t.RightCurly = 125] = "RightCurly", t[t.Tilde = 126] = "Tilde", t;
    }(CS || {}),
    ie = CS;
w0();
var HI = function() {
        function t(r, e) {
            this.major = String(r), this.minor = String(e);
        }
        return t.prototype.toString = function() {
            var r = Za(129);
            return "%PDF-" + this.major + "." + this.minor + `
%` + r + r + r + r;
        }, t.prototype.sizeInBytes = function() {
            return 12 + this.major.length + this.minor.length;
        }, t.prototype.copyBytesInto = function(r, e) {
            var i = e;
            return r[e++] = ie.Percent, r[e++] = ie.P, r[e++] = ie.D, r[e++] = ie.F, r[e++] = ie.Dash, e += pi(this.major, r, e), r[e++] = ie.Period, e += pi(this.minor, r, e), r[e++] = ie.Newline, r[e++] = ie.Percent, r[e++] = 129, r[e++] = 129, r[e++] = 129, r[e++] = 129, e - i;
        }, t.forVersion = function(r, e) {
            return new t(r, e);
        }, t;
    }(),
    Ys = HI;
var GI = function() {
        function t() {}
        return t.prototype.clone = function(r) {
            throw new jn(this.constructor.name, "clone");
        }, t.prototype.toString = function() {
            throw new jn(this.constructor.name, "toString");
        }, t.prototype.sizeInBytes = function() {
            throw new jn(this.constructor.name, "sizeInBytes");
        }, t.prototype.copyBytesInto = function(r, e) {
            throw new jn(this.constructor.name, "copyBytesInto");
        }, t;
    }(),
    fi = GI;
var qI = function(t) {
        Ge(r, t);

        function r(e) {
            var i = t.call(this) || this;
            return i.numberValue = e, i.stringValue = U5(e), i;
        }
        return r.prototype.asNumber = function() {
            return this.numberValue;
        }, r.prototype.value = function() {
            return this.numberValue;
        }, r.prototype.clone = function() {
            return r.of(this.numberValue);
        }, r.prototype.toString = function() {
            return this.stringValue;
        }, r.prototype.sizeInBytes = function() {
            return this.stringValue.length;
        }, r.prototype.copyBytesInto = function(e, i) {
            return i += pi(this.stringValue, e, i), this.stringValue.length;
        }, r.of = function(e) {
            return new r(e);
        }, r;
    }(fi),
    wt = qI;
var XI = function(t) {
        Ge(r, t);

        function r(e) {
            var i = t.call(this) || this;
            return i.array = [], i.context = e, i;
        }
        return r.prototype.size = function() {
            return this.array.length;
        }, r.prototype.push = function(e) {
            this.array.push(e);
        }, r.prototype.insert = function(e, i) {
            this.array.splice(e, 0, i);
        }, r.prototype.indexOf = function(e) {
            var i = this.array.indexOf(e);
            return i === -1 ? void 0 : i;
        }, r.prototype.remove = function(e) {
            this.array.splice(e, 1);
        }, r.prototype.set = function(e, i) {
            this.array[e] = i;
        }, r.prototype.get = function(e) {
            return this.array[e];
        }, r.prototype.lookupMaybe = function(e) {
            for (var i, n = [], a = 1; a < arguments.length; a++) n[a - 1] = arguments[a];
            return (i = this.context).lookupMaybe.apply(i, Ar([this.get(e)], n));
        }, r.prototype.lookup = function(e) {
            for (var i, n = [], a = 1; a < arguments.length; a++) n[a - 1] = arguments[a];
            return (i = this.context).lookup.apply(i, Ar([this.get(e)], n));
        }, r.prototype.asRectangle = function() {
            if (this.size() !== 4) throw new hS(this.size());
            var e = this.lookup(0, wt).asNumber(),
                i = this.lookup(1, wt).asNumber(),
                n = this.lookup(2, wt).asNumber(),
                a = this.lookup(3, wt).asNumber(),
                o = e,
                s = i,
                l = n - e,
                c = a - i;
            return {
                x: o,
                y: s,
                width: l,
                height: c
            };
        }, r.prototype.asArray = function() {
            return this.array.slice();
        }, r.prototype.clone = function(e) {
            for (var i = r.withContext(e || this.context), n = 0, a = this.size(); n < a; n++) i.push(this.array[n]);
            return i;
        }, r.prototype.toString = function() {
            for (var e = "[ ", i = 0, n = this.size(); i < n; i++) e += this.get(i).toString(), e += " ";
            return e += "]", e;
        }, r.prototype.sizeInBytes = function() {
            for (var e = 3, i = 0, n = this.size(); i < n; i++) e += this.get(i).sizeInBytes() + 1;
            return e;
        }, r.prototype.copyBytesInto = function(e, i) {
            var n = i;
            e[i++] = ie.LeftSquareBracket, e[i++] = ie.Space;
            for (var a = 0, o = this.size(); a < o; a++) i += this.get(a).copyBytesInto(e, i), e[i++] = ie.Space;
            return e[i++] = ie.RightSquareBracket, i - n;
        }, r.prototype.scalePDFNumbers = function(e, i) {
            for (var n = 0, a = this.size(); n < a; n++) {
                var o = this.lookup(n);
                if (o instanceof wt) {
                    var s = n % 2 === 0 ? e : i;
                    this.set(n, wt.of(o.asNumber() * s));
                }
            }
        }, r.withContext = function(e) {
            return new r(e);
        }, r;
    }(fi),
    $t = XI;
var lv = {},
    KI = function(t) {
        Ge(r, t);

        function r(e, i) {
            var n = this;
            if (e !== lv) throw new J0("PDFBool");
            return n = t.call(this) || this, n.value = i, n;
        }
        return r.prototype.asBoolean = function() {
            return this.value;
        }, r.prototype.clone = function() {
            return this;
        }, r.prototype.toString = function() {
            return String(this.value);
        }, r.prototype.sizeInBytes = function() {
            return this.value ? 4 : 5;
        }, r.prototype.copyBytesInto = function(e, i) {
            return this.value ? (e[i++] = ie.t, e[i++] = ie.r, e[i++] = ie.u, e[i++] = ie.e, 4) : (e[i++] = ie.f, e[i++] = ie.a, e[i++] = ie.l, e[i++] = ie.s, e[i++] = ie.e, 5);
        }, r.True = new r(lv, !0), r.False = new r(lv, !1), r;
    }(fi),
    Zs = KI;
var Ia = new Uint8Array(256);
Ia[ie.LeftParen] = 1;
Ia[ie.RightParen] = 1;
Ia[ie.LessThan] = 1;
Ia[ie.GreaterThan] = 1;
Ia[ie.LeftSquareBracket] = 1;
Ia[ie.RightSquareBracket] = 1;
Ia[ie.LeftCurly] = 1;
Ia[ie.RightCurly] = 1;
Ia[ie.ForwardSlash] = 1;
Ia[ie.Percent] = 1;
var ho = new Uint8Array(256);
ho[ie.Null] = 1;
ho[ie.Tab] = 1;
ho[ie.Newline] = 1;
ho[ie.FormFeed] = 1;
ho[ie.CarriageReturn] = 1;
ho[ie.Space] = 1;
var t1 = new Uint8Array(256);
for (tu = 0, AS = 256; tu < AS; tu++) t1[tu] = ho[tu] || Ia[tu] ? 1 : 0;
var tu, AS;
t1[ie.Hash] = 1;
var YI = function(t) {
        return t.replace(/#([\dABCDEF]{2})/g, function(r, e) {
            return y5(e);
        });
    },
    ZI = function(t) {
        return t >= ie.ExclamationPoint && t <= ie.Tilde && !t1[t];
    },
    TS = {},
    DS = new Map(),
    JI = function(t) {
        Ge(r, t);

        function r(e, i) {
            var n = this;
            if (e !== TS) throw new J0("PDFName");
            n = t.call(this) || this;
            for (var a = "/", o = 0, s = i.length; o < s; o++) {
                var l = i[o],
                    c = rr(l);
                a += ZI(c) ? l : "#" + Bl(c);
            }
            return n.encodedName = a, n;
        }
        return r.prototype.asBytes = function() {
            for (var e = [], i = "", n = !1, a = function(h) {
                    h !== void 0 && e.push(h), n = !1;
                }, o = 1, s = this.encodedName.length; o < s; o++) {
                var l = this.encodedName[o],
                    c = rr(l),
                    u = this.encodedName[o + 1];
                n ? c >= ie.Zero && c <= ie.Nine || c >= ie.a && c <= ie.f || c >= ie.A && c <= ie.F ? (i += l, (i.length === 2 || !(u >= "0" && u <= "9" || u >= "a" && u <= "f" || u >= "A" && u <= "F")) && (a(parseInt(i, 16)), i = "")) : a(c) : c === ie.Hash ? n = !0 : a(c);
            }
            return new Uint8Array(e);
        }, r.prototype.decodeText = function() {
            var e = this.asBytes();
            return String.fromCharCode.apply(String, Array.from(e));
        }, r.prototype.asString = function() {
            return this.encodedName;
        }, r.prototype.value = function() {
            return this.encodedName;
        }, r.prototype.clone = function() {
            return this;
        }, r.prototype.toString = function() {
            return this.encodedName;
        }, r.prototype.sizeInBytes = function() {
            return this.encodedName.length;
        }, r.prototype.copyBytesInto = function(e, i) {
            return i += pi(this.encodedName, e, i), this.encodedName.length;
        }, r.of = function(e) {
            var i = YI(e),
                n = DS.get(i);
            return n || (n = new r(TS, i), DS.set(i, n)), n;
        }, r.Length = r.of("Length"), r.FlateDecode = r.of("FlateDecode"), r.Resources = r.of("Resources"), r.Font = r.of("Font"), r.XObject = r.of("XObject"), r.ExtGState = r.of("ExtGState"), r.Contents = r.of("Contents"), r.Type = r.of("Type"), r.Parent = r.of("Parent"), r.MediaBox = r.of("MediaBox"), r.Page = r.of("Page"), r.Annots = r.of("Annots"), r.TrimBox = r.of("TrimBox"), r.ArtBox = r.of("ArtBox"), r.BleedBox = r.of("BleedBox"), r.CropBox = r.of("CropBox"), r.Rotate = r.of("Rotate"), r.Title = r.of("Title"), r.Author = r.of("Author"), r.Subject = r.of("Subject"), r.Creator = r.of("Creator"), r.Keywords = r.of("Keywords"), r.Producer = r.of("Producer"), r.CreationDate = r.of("CreationDate"), r.ModDate = r.of("ModDate"), r;
    }(fi),
    K = JI;
var QI = function(t) {
        Ge(r, t);

        function r() {
            return t !== null && t.apply(this, arguments) || this;
        }
        return r.prototype.asNull = function() {
            return null;
        }, r.prototype.clone = function() {
            return this;
        }, r.prototype.toString = function() {
            return "null";
        }, r.prototype.sizeInBytes = function() {
            return 4;
        }, r.prototype.copyBytesInto = function(e, i) {
            return e[i++] = ie.n, e[i++] = ie.u, e[i++] = ie.l, e[i++] = ie.l, 4;
        }, r;
    }(fi),
    In = new QI();
var $I = function(t) {
        Ge(r, t);

        function r(e, i) {
            var n = t.call(this) || this;
            return n.dict = e, n.context = i, n;
        }
        return r.prototype.keys = function() {
            return Array.from(this.dict.keys());
        }, r.prototype.values = function() {
            return Array.from(this.dict.values());
        }, r.prototype.entries = function() {
            return Array.from(this.dict.entries());
        }, r.prototype.set = function(e, i) {
            this.dict.set(e, i);
        }, r.prototype.get = function(e, i) {
            i === void 0 && (i = !1);
            var n = this.dict.get(e);
            if (!(n === In && !i)) return n;
        }, r.prototype.has = function(e) {
            var i = this.dict.get(e);
            return i !== void 0 && i !== In;
        }, r.prototype.lookupMaybe = function(e) {
            for (var i, n = [], a = 1; a < arguments.length; a++) n[a - 1] = arguments[a];
            var o = n.includes(In),
                s = (i = this.context).lookupMaybe.apply(i, Ar([this.get(e, o)], n));
            if (!(s === In && !o)) return s;
        }, r.prototype.lookup = function(e) {
            for (var i, n = [], a = 1; a < arguments.length; a++) n[a - 1] = arguments[a];
            var o = n.includes(In),
                s = (i = this.context).lookup.apply(i, Ar([this.get(e, o)], n));
            if (!(s === In && !o)) return s;
        }, r.prototype.delete = function(e) {
            return this.dict.delete(e);
        }, r.prototype.asMap = function() {
            return new Map(this.dict);
        }, r.prototype.uniqueKey = function(e) {
            e === void 0 && (e = "");
            for (var i = this.keys(), n = K.of(this.context.addRandomSuffix(e, 10)); i.includes(n);) n = K.of(this.context.addRandomSuffix(e, 10));
            return n;
        }, r.prototype.clone = function(e) {
            for (var i = r.withContext(e || this.context), n = this.entries(), a = 0, o = n.length; a < o; a++) {
                var s = n[a],
                    l = s[0],
                    c = s[1];
                i.set(l, c);
            }
            return i;
        }, r.prototype.toString = function() {
            for (var e = `<<
`, i = this.entries(), n = 0, a = i.length; n < a; n++) {
                var o = i[n],
                    s = o[0],
                    l = o[1];
                e += s.toString() + " " + l.toString() + `
`;
            }
            return e += ">>", e;
        }, r.prototype.sizeInBytes = function() {
            for (var e = 5, i = this.entries(), n = 0, a = i.length; n < a; n++) {
                var o = i[n],
                    s = o[0],
                    l = o[1];
                e += s.sizeInBytes() + l.sizeInBytes() + 2;
            }
            return e;
        }, r.prototype.copyBytesInto = function(e, i) {
            var n = i;
            e[i++] = ie.LessThan, e[i++] = ie.LessThan, e[i++] = ie.Newline;
            for (var a = this.entries(), o = 0, s = a.length; o < s; o++) {
                var l = a[o],
                    c = l[0],
                    u = l[1];
                i += c.copyBytesInto(e, i), e[i++] = ie.Space, i += u.copyBytesInto(e, i), e[i++] = ie.Newline;
            }
            return e[i++] = ie.GreaterThan, e[i++] = ie.GreaterThan, i - n;
        }, r.withContext = function(e) {
            return new r(new Map(), e);
        }, r.fromMapWithContext = function(e, i) {
            return new r(e, i);
        }, r;
    }(fi),
    At = $I;
var eO = function(t) {
        Ge(r, t);

        function r(e) {
            var i = t.call(this) || this;
            return i.dict = e, i;
        }
        return r.prototype.clone = function(e) {
            throw new jn(this.constructor.name, "clone");
        }, r.prototype.getContentsString = function() {
            throw new jn(this.constructor.name, "getContentsString");
        }, r.prototype.getContents = function() {
            throw new jn(this.constructor.name, "getContents");
        }, r.prototype.getContentsSize = function() {
            throw new jn(this.constructor.name, "getContentsSize");
        }, r.prototype.updateDict = function() {
            var e = this.getContentsSize();
            this.dict.set(K.Length, wt.of(e));
        }, r.prototype.sizeInBytes = function() {
            return this.updateDict(), this.dict.sizeInBytes() + this.getContentsSize() + 18;
        }, r.prototype.toString = function() {
            this.updateDict();
            var e = this.dict.toString();
            return e += `
stream
`, e += this.getContentsString(), e += `
endstream`, e;
        }, r.prototype.copyBytesInto = function(e, i) {
            this.updateDict();
            var n = i;
            i += this.dict.copyBytesInto(e, i), e[i++] = ie.Newline, e[i++] = ie.s, e[i++] = ie.t, e[i++] = ie.r, e[i++] = ie.e, e[i++] = ie.a, e[i++] = ie.m, e[i++] = ie.Newline;
            for (var a = this.getContents(), o = 0, s = a.length; o < s; o++) e[i++] = a[o];
            return e[i++] = ie.Newline, e[i++] = ie.e, e[i++] = ie.n, e[i++] = ie.d, e[i++] = ie.s, e[i++] = ie.t, e[i++] = ie.r, e[i++] = ie.e, e[i++] = ie.a, e[i++] = ie.m, i - n;
        }, r;
    }(fi),
    Fi = eO;
var tO = function(t) {
        Ge(r, t);

        function r(e, i) {
            var n = t.call(this, e) || this;
            return n.contents = i, n;
        }
        return r.prototype.asUint8Array = function() {
            return this.contents.slice();
        }, r.prototype.clone = function(e) {
            return r.of(this.dict.clone(e), this.contents.slice());
        }, r.prototype.getContentsString = function() {
            return Xp(this.contents);
        }, r.prototype.getContents = function() {
            return this.contents;
        }, r.prototype.getContentsSize = function() {
            return this.contents.length;
        }, r.of = function(e, i) {
            return new r(e, i);
        }, r;
    }(Fi),
    ds = tO;
var kS = {},
    FS = new Map(),
    rO = function(t) {
        Ge(r, t);

        function r(e, i, n) {
            var a = this;
            if (e !== kS) throw new J0("PDFRef");
            return a = t.call(this) || this, a.objectNumber = i, a.generationNumber = n, a.tag = i + " " + n + " R", a;
        }
        return r.prototype.clone = function() {
            return this;
        }, r.prototype.toString = function() {
            return this.tag;
        }, r.prototype.sizeInBytes = function() {
            return this.tag.length;
        }, r.prototype.copyBytesInto = function(e, i) {
            return i += pi(this.tag, e, i), this.tag.length;
        }, r.of = function(e, i) {
            i === void 0 && (i = 0);
            var n = e + " " + i + " R",
                a = FS.get(n);
            return a || (a = new r(kS, e, i), FS.set(n, a)), a;
        }, r;
    }(fi),
    tr = rO;
var iO = function() {
        function t(r, e) {
            this.name = r, this.args = e || [];
        }
        return t.prototype.clone = function(r) {
            for (var e = new Array(this.args.length), i = 0, n = e.length; i < n; i++) {
                var a = this.args[i];
                e[i] = a instanceof fi ? a.clone(r) : a;
            }
            return t.of(this.name, e);
        }, t.prototype.toString = function() {
            for (var r = "", e = 0, i = this.args.length; e < i; e++) r += String(this.args[e]) + " ";
            return r += this.name, r;
        }, t.prototype.sizeInBytes = function() {
            for (var r = 0, e = 0, i = this.args.length; e < i; e++) {
                var n = this.args[e];
                r += (n instanceof fi ? n.sizeInBytes() : n.length) + 1;
            }
            return r += this.name.length, r;
        }, t.prototype.copyBytesInto = function(r, e) {
            for (var i = e, n = 0, a = this.args.length; n < a; n++) {
                var o = this.args[n];
                o instanceof fi ? e += o.copyBytesInto(r, e) : e += pi(o, r, e), r[e++] = ie.Space;
            }
            return e += pi(this.name, r, e), e - i;
        }, t.of = function(r, e) {
            return new t(r, e);
        }, t;
    }(),
    Nr = iO;
var ES = function(t) {
        return t.NonStrokingColor = "sc", t.NonStrokingColorN = "scn", t.NonStrokingColorRgb = "rg", t.NonStrokingColorGray = "g", t.NonStrokingColorCmyk = "k", t.NonStrokingColorspace = "cs", t.StrokingColor = "SC", t.StrokingColorN = "SCN", t.StrokingColorRgb = "RG", t.StrokingColorGray = "G", t.StrokingColorCmyk = "K", t.StrokingColorspace = "CS", t.BeginMarkedContentSequence = "BDC", t.BeginMarkedContent = "BMC", t.EndMarkedContent = "EMC", t.MarkedContentPointWithProps = "DP", t.MarkedContentPoint = "MP", t.DrawObject = "Do", t.ConcatTransformationMatrix = "cm", t.PopGraphicsState = "Q", t.PushGraphicsState = "q", t.SetFlatness = "i", t.SetGraphicsStateParams = "gs", t.SetLineCapStyle = "J", t.SetLineDashPattern = "d", t.SetLineJoinStyle = "j", t.SetLineMiterLimit = "M", t.SetLineWidth = "w", t.SetTextMatrix = "Tm", t.SetRenderingIntent = "ri", t.AppendRectangle = "re", t.BeginInlineImage = "BI", t.BeginInlineImageData = "ID", t.EndInlineImage = "EI", t.ClipEvenOdd = "W*", t.ClipNonZero = "W", t.CloseAndStroke = "s", t.CloseFillEvenOddAndStroke = "b*", t.CloseFillNonZeroAndStroke = "b", t.ClosePath = "h", t.AppendBezierCurve = "c", t.CurveToReplicateFinalPoint = "y", t.CurveToReplicateInitialPoint = "v", t.EndPath = "n", t.FillEvenOddAndStroke = "B*", t.FillEvenOdd = "f*", t.FillNonZeroAndStroke = "B", t.FillNonZero = "f", t.LegacyFillNonZero = "F", t.LineTo = "l", t.MoveTo = "m", t.ShadingFill = "sh", t.StrokePath = "S", t.BeginText = "BT", t.EndText = "ET", t.MoveText = "Td", t.MoveTextSetLeading = "TD", t.NextLine = "T*", t.SetCharacterSpacing = "Tc", t.SetFontAndSize = "Tf", t.SetTextHorizontalScaling = "Tz", t.SetTextLineHeight = "TL", t.SetTextRenderingMode = "Tr", t.SetTextRise = "Ts", t.SetWordSpacing = "Tw", t.ShowText = "Tj", t.ShowTextAdjusted = "TJ", t.ShowTextLine = "'", t.ShowTextLineAndSpace = '"', t.Type3D0 = "d0", t.Type3D1 = "d1", t.BeginCompatibilitySection = "BX", t.EndCompatibilitySection = "EX", t;
    }(ES || {}),
    Mr = ES;
w0();
var nO = function(t) {
        Ge(r, t);

        function r(e, i) {
            var n = t.call(this, e) || this;
            return n.computeContents = function() {
                var a = n.getUnencodedContents();
                return n.encode ? Tl.deflate(a) : a;
            }, n.encode = i, i && e.set(K.of("Filter"), K.of("FlateDecode")), n.contentsCache = oa.populatedBy(n.computeContents), n;
        }
        return r.prototype.getContents = function() {
            return this.contentsCache.access();
        }, r.prototype.getContentsSize = function() {
            return this.contentsCache.access().length;
        }, r.prototype.getUnencodedContents = function() {
            throw new jn(this.constructor.name, "getUnencodedContents");
        }, r;
    }(Fi),
    Gc = nO;
var aO = function(t) {
        Ge(r, t);

        function r(e, i, n) {
            n === void 0 && (n = !0);
            var a = t.call(this, e, n) || this;
            return a.operators = i, a;
        }
        return r.prototype.push = function() {
            for (var e, i = [], n = 0; n < arguments.length; n++) i[n] = arguments[n];
            (e = this.operators).push.apply(e, i);
        }, r.prototype.clone = function(e) {
            for (var i = new Array(this.operators.length), n = 0, a = this.operators.length; n < a; n++) i[n] = this.operators[n].clone(e);
            var o = this,
                s = o.dict,
                l = o.encode;
            return r.of(s.clone(e), i, l);
        }, r.prototype.getContentsString = function() {
            for (var e = "", i = 0, n = this.operators.length; i < n; i++) e += this.operators[i] + `
`;
            return e;
        }, r.prototype.getUnencodedContents = function() {
            for (var e = new Uint8Array(this.getUnencodedContentsSize()), i = 0, n = 0, a = this.operators.length; n < a; n++) i += this.operators[n].copyBytesInto(e, i), e[i++] = ie.Newline;
            return e;
        }, r.prototype.getUnencodedContentsSize = function() {
            for (var e = 0, i = 0, n = this.operators.length; i < n; i++) e += this.operators[i].sizeInBytes() + 1;
            return e;
        }, r.of = function(e, i, n) {
            return n === void 0 && (n = !0), new r(e, i, n);
        }, r;
    }(Gc),
    Js = aO;
var PS = function() {
    function t(r) {
        this.seed = r;
    }
    return t.prototype.nextInt = function() {
        var r = Math.sin(this.seed++) * 1e4;
        return r - Math.floor(r);
    }, t.withSeed = function(r) {
        return new t(r);
    }, t;
}();
var oO = function(t, r) {
        var e = t[0],
            i = r[0];
        return e.objectNumber - i.objectNumber;
    },
    sO = function() {
        function t() {
            this.largestObjectNumber = 0, this.header = Ys.forVersion(1, 7), this.trailerInfo = {}, this.indirectObjects = new Map(), this.rng = PS.withSeed(1);
        }
        return t.prototype.assign = function(r, e) {
            this.indirectObjects.set(r, e), r.objectNumber > this.largestObjectNumber && (this.largestObjectNumber = r.objectNumber);
        }, t.prototype.nextRef = function() {
            return this.largestObjectNumber += 1, tr.of(this.largestObjectNumber);
        }, t.prototype.register = function(r) {
            var e = this.nextRef();
            return this.assign(e, r), e;
        }, t.prototype.delete = function(r) {
            return this.indirectObjects.delete(r);
        }, t.prototype.lookupMaybe = function(r) {
            for (var e = [], i = 1; i < arguments.length; i++) e[i - 1] = arguments[i];
            var n = e.includes(In),
                a = r instanceof tr ? this.indirectObjects.get(r) : r;
            if (!(!a || a === In && !n)) {
                for (var o = 0, s = e.length; o < s; o++) {
                    var l = e[o];
                    if (l === In) {
                        if (a === In) return a;
                    } else if (a instanceof l) return a;
                }
                throw new Hc(e, a);
            }
        }, t.prototype.lookup = function(r) {
            for (var e = [], i = 1; i < arguments.length; i++) e[i - 1] = arguments[i];
            var n = r instanceof tr ? this.indirectObjects.get(r) : r;
            if (e.length === 0) return n;
            for (var a = 0, o = e.length; a < o; a++) {
                var s = e[a];
                if (s === In) {
                    if (n === In) return n;
                } else if (n instanceof s) return n;
            }
            throw new Hc(e, n);
        }, t.prototype.getObjectRef = function(r) {
            for (var e = Array.from(this.indirectObjects.entries()), i = 0, n = e.length; i < n; i++) {
                var a = e[i],
                    o = a[0],
                    s = a[1];
                if (s === r) return o;
            }
        }, t.prototype.enumerateIndirectObjects = function() {
            return Array.from(this.indirectObjects.entries()).sort(oO);
        }, t.prototype.obj = function(r) {
            if (r instanceof fi) return r;
            if (r == null) return In;
            if (typeof r == "string") return K.of(r);
            if (typeof r == "number") return wt.of(r);
            if (typeof r == "boolean") return r ? Zs.True : Zs.False;
            if (Array.isArray(r)) {
                for (var e = $t.withContext(this), i = 0, n = r.length; i < n; i++) e.push(this.obj(r[i]));
                return e;
            } else {
                for (var a = At.withContext(this), o = Object.keys(r), i = 0, n = o.length; i < n; i++) {
                    var s = o[i],
                        l = r[s];
                    l !== void 0 && a.set(K.of(s), this.obj(l));
                }
                return a;
            }
        }, t.prototype.stream = function(r, e) {
            return e === void 0 && (e = {}), ds.of(this.obj(e), qp(r));
        }, t.prototype.flateStream = function(r, e) {
            return e === void 0 && (e = {}), this.stream(Tl.deflate(qp(r)), ar(ar({}, e), {
                Filter: "FlateDecode"
            }));
        }, t.prototype.contentStream = function(r, e) {
            return e === void 0 && (e = {}), Js.of(this.obj(e), r);
        }, t.prototype.formXObject = function(r, e) {
            return e === void 0 && (e = {}), this.contentStream(r, ar(ar({
                BBox: this.obj([0, 0, 0, 0]),
                Matrix: this.obj([1, 0, 0, 1, 0, 0])
            }, e), {
                Type: "XObject",
                Subtype: "Form"
            }));
        }, t.prototype.getPushGraphicsStateContentStream = function() {
            if (this.pushGraphicsStateContentStreamRef) return this.pushGraphicsStateContentStreamRef;
            var r = this.obj({}),
                e = Nr.of(Mr.PushGraphicsState),
                i = Js.of(r, [e]);
            return this.pushGraphicsStateContentStreamRef = this.register(i), this.pushGraphicsStateContentStreamRef;
        }, t.prototype.getPopGraphicsStateContentStream = function() {
            if (this.popGraphicsStateContentStreamRef) return this.popGraphicsStateContentStreamRef;
            var r = this.obj({}),
                e = Nr.of(Mr.PopGraphicsState),
                i = Js.of(r, [e]);
            return this.popGraphicsStateContentStreamRef = this.register(i), this.popGraphicsStateContentStreamRef;
        }, t.prototype.addRandomSuffix = function(r, e) {
            return e === void 0 && (e = 4), r + "-" + Math.floor(this.rng.nextInt() * Math.pow(10, e));
        }, t.create = function() {
            return new t();
        }, t;
    }(),
    ru = sO;
var lO = function(t) {
        Ge(r, t);

        function r(e, i, n) {
            n === void 0 && (n = !0);
            var a = t.call(this, e, i) || this;
            return a.normalized = !1, a.autoNormalizeCTM = n, a;
        }
        return r.prototype.clone = function(e) {
            for (var i = r.fromMapWithContext(new Map(), e || this.context, this.autoNormalizeCTM), n = this.entries(), a = 0, o = n.length; a < o; a++) {
                var s = n[a],
                    l = s[0],
                    c = s[1];
                i.set(l, c);
            }
            return i;
        }, r.prototype.Parent = function() {
            return this.lookupMaybe(K.Parent, At);
        }, r.prototype.Contents = function() {
            return this.lookup(K.of("Contents"));
        }, r.prototype.Annots = function() {
            return this.lookupMaybe(K.Annots, $t);
        }, r.prototype.BleedBox = function() {
            return this.lookupMaybe(K.BleedBox, $t);
        }, r.prototype.TrimBox = function() {
            return this.lookupMaybe(K.TrimBox, $t);
        }, r.prototype.ArtBox = function() {
            return this.lookupMaybe(K.ArtBox, $t);
        }, r.prototype.Resources = function() {
            var e = this.getInheritableAttribute(K.Resources);
            return this.context.lookupMaybe(e, At);
        }, r.prototype.MediaBox = function() {
            var e = this.getInheritableAttribute(K.MediaBox);
            return this.context.lookup(e, $t);
        }, r.prototype.CropBox = function() {
            var e = this.getInheritableAttribute(K.CropBox);
            return this.context.lookupMaybe(e, $t);
        }, r.prototype.Rotate = function() {
            var e = this.getInheritableAttribute(K.Rotate);
            return this.context.lookupMaybe(e, wt);
        }, r.prototype.getInheritableAttribute = function(e) {
            var i;
            return this.ascend(function(n) {
                i || (i = n.get(e));
            }), i;
        }, r.prototype.setParent = function(e) {
            this.set(K.Parent, e);
        }, r.prototype.addContentStream = function(e) {
            var i = this.normalizedEntries().Contents || this.context.obj([]);
            this.set(K.Contents, i), i.push(e);
        }, r.prototype.wrapContentStreams = function(e, i) {
            var n = this.Contents();
            return n instanceof $t ? (n.insert(0, e), n.push(i), !0) : !1;
        }, r.prototype.addAnnot = function(e) {
            var i = this.normalizedEntries().Annots;
            i.push(e);
        }, r.prototype.removeAnnot = function(e) {
            var i = this.normalizedEntries().Annots,
                n = i.indexOf(e);
            n !== void 0 && i.remove(n);
        }, r.prototype.setFontDictionary = function(e, i) {
            var n = this.normalizedEntries().Font;
            n.set(e, i);
        }, r.prototype.newFontDictionaryKey = function(e) {
            var i = this.normalizedEntries().Font;
            return i.uniqueKey(e);
        }, r.prototype.newFontDictionary = function(e, i) {
            var n = this.newFontDictionaryKey(e);
            return this.setFontDictionary(n, i), n;
        }, r.prototype.setXObject = function(e, i) {
            var n = this.normalizedEntries().XObject;
            n.set(e, i);
        }, r.prototype.newXObjectKey = function(e) {
            var i = this.normalizedEntries().XObject;
            return i.uniqueKey(e);
        }, r.prototype.newXObject = function(e, i) {
            var n = this.newXObjectKey(e);
            return this.setXObject(n, i), n;
        }, r.prototype.setExtGState = function(e, i) {
            var n = this.normalizedEntries().ExtGState;
            n.set(e, i);
        }, r.prototype.newExtGStateKey = function(e) {
            var i = this.normalizedEntries().ExtGState;
            return i.uniqueKey(e);
        }, r.prototype.newExtGState = function(e, i) {
            var n = this.newExtGStateKey(e);
            return this.setExtGState(n, i), n;
        }, r.prototype.ascend = function(e) {
            e(this);
            var i = this.Parent();
            i && i.ascend(e);
        }, r.prototype.normalize = function() {
            if (!this.normalized) {
                var e = this.context,
                    i = this.get(K.Contents),
                    n = this.context.lookup(i);
                n instanceof Fi && this.set(K.Contents, e.obj([i])), this.autoNormalizeCTM && this.wrapContentStreams(this.context.getPushGraphicsStateContentStream(), this.context.getPopGraphicsStateContentStream());
                var a = this.getInheritableAttribute(K.Resources),
                    o = e.lookupMaybe(a, At) || e.obj({});
                this.set(K.Resources, o);
                var s = o.lookupMaybe(K.Font, At) || e.obj({});
                o.set(K.Font, s);
                var l = o.lookupMaybe(K.XObject, At) || e.obj({});
                o.set(K.XObject, l);
                var c = o.lookupMaybe(K.ExtGState, At) || e.obj({});
                o.set(K.ExtGState, c);
                var u = this.Annots() || e.obj([]);
                this.set(K.Annots, u), this.normalized = !0;
            }
        }, r.prototype.normalizedEntries = function() {
            this.normalize();
            var e = this.Annots(),
                i = this.Resources(),
                n = this.Contents();
            return {
                Annots: e,
                Resources: i,
                Contents: n,
                Font: i.lookup(K.Font, At),
                XObject: i.lookup(K.XObject, At),
                ExtGState: i.lookup(K.ExtGState, At)
            };
        }, r.InheritableEntries = ["Resources", "MediaBox", "CropBox", "Rotate"], r.withContextAndParent = function(e, i) {
            var n = new Map();
            return n.set(K.Type, K.Page), n.set(K.Parent, i), n.set(K.Resources, e.obj({})), n.set(K.MediaBox, e.obj([0, 0, 612, 792])), new r(n, e, !1);
        }, r.fromMapWithContext = function(e, i, n) {
            return n === void 0 && (n = !0), new r(e, i, n);
        }, r;
    }(At),
    _a = lO;
var cO = function() {
        function t(r, e) {
            var i = this;
            this.traversedObjects = new Map(), this.copy = function(n) {
                return n instanceof _a ? i.copyPDFPage(n) : n instanceof At ? i.copyPDFDict(n) : n instanceof $t ? i.copyPDFArray(n) : n instanceof Fi ? i.copyPDFStream(n) : n instanceof tr ? i.copyPDFIndirectObject(n) : n.clone();
            }, this.copyPDFPage = function(n) {
                for (var a = n.clone(), o = _a.InheritableEntries, s = 0, l = o.length; s < l; s++) {
                    var c = K.of(o[s]),
                        u = a.getInheritableAttribute(c);
                    !a.get(c) && u && a.set(c, u);
                }
                return a.delete(K.of("Parent")), i.copyPDFDict(a);
            }, this.copyPDFDict = function(n) {
                if (i.traversedObjects.has(n)) return i.traversedObjects.get(n);
                var a = n.clone(i.dest);
                i.traversedObjects.set(n, a);
                for (var o = n.entries(), s = 0, l = o.length; s < l; s++) {
                    var c = o[s],
                        u = c[0],
                        h = c[1];
                    a.set(u, i.copy(h));
                }
                return a;
            }, this.copyPDFArray = function(n) {
                if (i.traversedObjects.has(n)) return i.traversedObjects.get(n);
                var a = n.clone(i.dest);
                i.traversedObjects.set(n, a);
                for (var o = 0, s = n.size(); o < s; o++) {
                    var l = n.get(o);
                    a.set(o, i.copy(l));
                }
                return a;
            }, this.copyPDFStream = function(n) {
                if (i.traversedObjects.has(n)) return i.traversedObjects.get(n);
                var a = n.clone(i.dest);
                i.traversedObjects.set(n, a);
                for (var o = n.dict.entries(), s = 0, l = o.length; s < l; s++) {
                    var c = o[s],
                        u = c[0],
                        h = c[1];
                    a.dict.set(u, i.copy(h));
                }
                return a;
            }, this.copyPDFIndirectObject = function(n) {
                var a = i.traversedObjects.has(n);
                if (!a) {
                    var o = i.dest.nextRef();
                    i.traversedObjects.set(n, o);
                    var s = i.src.lookup(n);
                    if (s) {
                        var l = i.copy(s);
                        i.dest.assign(o, l);
                    }
                }
                return i.traversedObjects.get(n);
            }, this.src = r, this.dest = e;
        }
        return t.for = function(r, e) {
            return new t(r, e);
        }, t;
    }(),
    r1 = cO;
var uO = function() {
        function t(r) {
            this.subsections = r ? [
                [r]
            ] : [], this.chunkIdx = 0, this.chunkLength = r ? 1 : 0;
        }
        return t.prototype.addEntry = function(r, e) {
            this.append({
                ref: r,
                offset: e,
                deleted: !1
            });
        }, t.prototype.addDeletedEntry = function(r, e) {
            this.append({
                ref: r,
                offset: e,
                deleted: !0
            });
        }, t.prototype.toString = function() {
            for (var r = `xref
`, e = 0, i = this.subsections.length; e < i; e++) {
                var n = this.subsections[e];
                r += n[0].ref.objectNumber + " " + n.length + `
`;
                for (var a = 0, o = n.length; a < o; a++) {
                    var s = n[a];
                    r += Ja(String(s.offset), 10, "0"), r += " ", r += Ja(String(s.ref.generationNumber), 5, "0"), r += " ", r += s.deleted ? "f" : "n", r += ` 
`;
                }
            }
            return r;
        }, t.prototype.sizeInBytes = function() {
            for (var r = 5, e = 0, i = this.subsections.length; e < i; e++) {
                var n = this.subsections[e],
                    a = n.length,
                    o = n[0];
                r += 2, r += String(o.ref.objectNumber).length, r += String(a).length, r += 20 * a;
            }
            return r;
        }, t.prototype.copyBytesInto = function(r, e) {
            var i = e;
            return r[e++] = ie.x, r[e++] = ie.r, r[e++] = ie.e, r[e++] = ie.f, r[e++] = ie.Newline, e += this.copySubsectionsIntoBuffer(this.subsections, r, e), e - i;
        }, t.prototype.copySubsectionsIntoBuffer = function(r, e, i) {
            for (var n = i, a = r.length, o = 0; o < a; o++) {
                var s = this.subsections[o],
                    l = String(s[0].ref.objectNumber);
                i += pi(l, e, i), e[i++] = ie.Space;
                var c = String(s.length);
                i += pi(c, e, i), e[i++] = ie.Newline, i += this.copyEntriesIntoBuffer(s, e, i);
            }
            return i - n;
        }, t.prototype.copyEntriesIntoBuffer = function(r, e, i) {
            for (var n = r.length, a = 0; a < n; a++) {
                var o = r[a],
                    s = Ja(String(o.offset), 10, "0");
                i += pi(s, e, i), e[i++] = ie.Space;
                var l = Ja(String(o.ref.generationNumber), 5, "0");
                i += pi(l, e, i), e[i++] = ie.Space, e[i++] = o.deleted ? ie.f : ie.n, e[i++] = ie.Space, e[i++] = ie.Newline;
            }
            return 20 * n;
        }, t.prototype.append = function(r) {
            if (this.chunkLength === 0) {
                this.subsections.push([r]), this.chunkIdx = 0, this.chunkLength = 1;
                return;
            }
            var e = this.subsections[this.chunkIdx],
                i = e[this.chunkLength - 1];
            r.ref.objectNumber - i.ref.objectNumber > 1 ? (this.subsections.push([r]), this.chunkIdx += 1, this.chunkLength = 1) : (e.push(r), this.chunkLength += 1);
        }, t.create = function() {
            return new t({
                ref: tr.of(0, 65535),
                offset: 0,
                deleted: !0
            });
        }, t.createEmpty = function() {
            return new t();
        }, t;
    }(),
    Wf = uO;
var fO = function() {
        function t(r) {
            this.lastXRefOffset = String(r);
        }
        return t.prototype.toString = function() {
            return `startxref
` + this.lastXRefOffset + `
%%EOF`;
        }, t.prototype.sizeInBytes = function() {
            return 16 + this.lastXRefOffset.length;
        }, t.prototype.copyBytesInto = function(r, e) {
            var i = e;
            return r[e++] = ie.s, r[e++] = ie.t, r[e++] = ie.a, r[e++] = ie.r, r[e++] = ie.t, r[e++] = ie.x, r[e++] = ie.r, r[e++] = ie.e, r[e++] = ie.f, r[e++] = ie.Newline, e += pi(this.lastXRefOffset, r, e), r[e++] = ie.Newline, r[e++] = ie.Percent, r[e++] = ie.Percent, r[e++] = ie.E, r[e++] = ie.O, r[e++] = ie.F, e - i;
        }, t.forLastCrossRefSectionOffset = function(r) {
            return new t(r);
        }, t;
    }(),
    qc = fO;
var hO = function() {
        function t(r) {
            this.dict = r;
        }
        return t.prototype.toString = function() {
            return `trailer
` + this.dict.toString();
        }, t.prototype.sizeInBytes = function() {
            return 8 + this.dict.sizeInBytes();
        }, t.prototype.copyBytesInto = function(r, e) {
            var i = e;
            return r[e++] = ie.t, r[e++] = ie.r, r[e++] = ie.a, r[e++] = ie.i, r[e++] = ie.l, r[e++] = ie.e, r[e++] = ie.r, r[e++] = ie.Newline, e += this.dict.copyBytesInto(r, e), e - i;
        }, t.of = function(r) {
            return new t(r);
        }, t;
    }(),
    cv = hO;
var dO = function(t) {
        Ge(r, t);

        function r(e, i, n) {
            n === void 0 && (n = !0);
            var a = t.call(this, e.obj({}), n) || this;
            return a.objects = i, a.offsets = a.computeObjectOffsets(), a.offsetsString = a.computeOffsetsString(), a.dict.set(K.of("Type"), K.of("ObjStm")), a.dict.set(K.of("N"), wt.of(a.objects.length)), a.dict.set(K.of("First"), wt.of(a.offsetsString.length)), a;
        }
        return r.prototype.getObjectsCount = function() {
            return this.objects.length;
        }, r.prototype.clone = function(e) {
            return r.withContextAndObjects(e || this.dict.context, this.objects.slice(), this.encode);
        }, r.prototype.getContentsString = function() {
            for (var e = this.offsetsString, i = 0, n = this.objects.length; i < n; i++) {
                var a = this.objects[i],
                    o = a[1];
                e += o + `
`;
            }
            return e;
        }, r.prototype.getUnencodedContents = function() {
            for (var e = new Uint8Array(this.getUnencodedContentsSize()), i = pi(this.offsetsString, e, 0), n = 0, a = this.objects.length; n < a; n++) {
                var o = this.objects[n],
                    s = o[1];
                i += s.copyBytesInto(e, i), e[i++] = ie.Newline;
            }
            return e;
        }, r.prototype.getUnencodedContentsSize = function() {
            return this.offsetsString.length + K0(this.offsets)[1] + K0(this.objects)[1].sizeInBytes() + 1;
        }, r.prototype.computeOffsetsString = function() {
            for (var e = "", i = 0, n = this.offsets.length; i < n; i++) {
                var a = this.offsets[i],
                    o = a[0],
                    s = a[1];
                e += o + " " + s + " ";
            }
            return e;
        }, r.prototype.computeObjectOffsets = function() {
            for (var e = 0, i = new Array(this.objects.length), n = 0, a = this.objects.length; n < a; n++) {
                var o = this.objects[n],
                    s = o[0],
                    l = o[1];
                i[n] = [s.objectNumber, e], e += l.sizeInBytes() + 1;
            }
            return i;
        }, r.withContextAndObjects = function(e, i, n) {
            return n === void 0 && (n = !0), new r(e, i, n);
        }, r;
    }(Gc),
    jf = dO;
var pO = function() {
        function t(r, e) {
            var i = this;
            this.parsedObjects = 0, this.shouldWaitForTick = function(n) {
                return i.parsedObjects += n, i.parsedObjects % i.objectsPerTick === 0;
            }, this.context = r, this.objectsPerTick = e;
        }
        return t.prototype.serializeToBuffer = function() {
            return Rt(this, void 0, void 0, function() {
                var r, e, i, n, a, o, s, l, c, u, h, d, f, m, _, x, g;
                return Mt(this, function(b) {
                    switch (b.label) {
                        case 0:
                            return [4, this.computeBufferSize()];
                        case 1:
                            r = b.sent(), e = r.size, i = r.header, n = r.indirectObjects, a = r.xref, o = r.trailerDict, s = r.trailer, l = 0, c = new Uint8Array(e), l += i.copyBytesInto(c, l), c[l++] = ie.Newline, c[l++] = ie.Newline, u = 0, h = n.length, b.label = 2;
                        case 2:
                            return u < h ? (d = n[u], f = d[0], m = d[1], _ = String(f.objectNumber), l += pi(_, c, l), c[l++] = ie.Space, x = String(f.generationNumber), l += pi(x, c, l), c[l++] = ie.Space, c[l++] = ie.o, c[l++] = ie.b, c[l++] = ie.j, c[l++] = ie.Newline, l += m.copyBytesInto(c, l), c[l++] = ie.Newline, c[l++] = ie.e, c[l++] = ie.n, c[l++] = ie.d, c[l++] = ie.o, c[l++] = ie.b, c[l++] = ie.j, c[l++] = ie.Newline, c[l++] = ie.Newline, g = m instanceof jf ? m.getObjectsCount() : 1, this.shouldWaitForTick(g) ? [4, hs()] : [3, 4]) : [3, 5];
                        case 3:
                            b.sent(), b.label = 4;
                        case 4:
                            return u++, [3, 2];
                        case 5:
                            return a && (l += a.copyBytesInto(c, l), c[l++] = ie.Newline), o && (l += o.copyBytesInto(c, l), c[l++] = ie.Newline, c[l++] = ie.Newline), l += s.copyBytesInto(c, l), [2, c];
                    }
                });
            });
        }, t.prototype.computeIndirectObjectSize = function(r) {
            var e = r[0],
                i = r[1],
                n = e.sizeInBytes() + 3,
                a = i.sizeInBytes() + 9;
            return n + a;
        }, t.prototype.createTrailerDict = function() {
            return this.context.obj({
                Size: this.context.largestObjectNumber + 1,
                Root: this.context.trailerInfo.Root,
                Encrypt: this.context.trailerInfo.Encrypt,
                Info: this.context.trailerInfo.Info,
                ID: this.context.trailerInfo.ID
            });
        }, t.prototype.computeBufferSize = function() {
            return Rt(this, void 0, void 0, function() {
                var r, e, i, n, a, o, s, l, c, u, h;
                return Mt(this, function(d) {
                    switch (d.label) {
                        case 0:
                            r = Ys.forVersion(1, 7), e = r.sizeInBytes() + 2, i = Wf.create(), n = this.context.enumerateIndirectObjects(), a = 0, o = n.length, d.label = 1;
                        case 1:
                            return a < o ? (s = n[a], l = s[0], i.addEntry(l, e), e += this.computeIndirectObjectSize(s), this.shouldWaitForTick(1) ? [4, hs()] : [3, 3]) : [3, 4];
                        case 2:
                            d.sent(), d.label = 3;
                        case 3:
                            return a++, [3, 1];
                        case 4:
                            return c = e, e += i.sizeInBytes() + 1, u = cv.of(this.createTrailerDict()), e += u.sizeInBytes() + 2, h = qc.forLastCrossRefSectionOffset(c), e += h.sizeInBytes(), [2, {
                                size: e,
                                header: r,
                                indirectObjects: n,
                                xref: i,
                                trailerDict: u,
                                trailer: h
                            }];
                    }
                });
            });
        }, t.forContext = function(r, e) {
            return new t(r, e);
        }, t;
    }(),
    Hf = pO;
var mO = function(t) {
        Ge(r, t);

        function r(e) {
            var i = t.call(this) || this;
            return i.data = e, i;
        }
        return r.prototype.clone = function() {
            return r.of(this.data.slice());
        }, r.prototype.toString = function() {
            return "PDFInvalidObject(" + this.data.length + " bytes)";
        }, r.prototype.sizeInBytes = function() {
            return this.data.length;
        }, r.prototype.copyBytesInto = function(e, i) {
            for (var n = this.data.length, a = 0; a < n; a++) e[i++] = this.data[a];
            return n;
        }, r.of = function(e) {
            return new r(e);
        }, r;
    }(fi),
    Gf = mO;
var Xc = function(t) {
        return t[t.Deleted = 0] = "Deleted", t[t.Uncompressed = 1] = "Uncompressed", t[t.Compressed = 2] = "Compressed", t;
    }(Xc || {}),
    gO = function(t) {
        Ge(r, t);

        function r(e, i, n) {
            n === void 0 && (n = !0);
            var a = t.call(this, e, n) || this;
            return a.computeIndex = function() {
                for (var o = [], s = 0, l = 0, c = a.entries.length; l < c; l++) {
                    var u = a.entries[l],
                        h = a.entries[l - 1];
                    l === 0 ? o.push(u.ref.objectNumber) : u.ref.objectNumber - h.ref.objectNumber > 1 && (o.push(s), o.push(u.ref.objectNumber), s = 0), s += 1;
                }
                return o.push(s), o;
            }, a.computeEntryTuples = function() {
                for (var o = new Array(a.entries.length), s = 0, l = a.entries.length; s < l; s++) {
                    var c = a.entries[s];
                    if (c.type === Xc.Deleted) {
                        var u = c.type,
                            h = c.nextFreeObjectNumber,
                            d = c.ref;
                        o[s] = [u, h, d.generationNumber];
                    }
                    if (c.type === Xc.Uncompressed) {
                        var u = c.type,
                            f = c.offset,
                            d = c.ref;
                        o[s] = [u, f, d.generationNumber];
                    }
                    if (c.type === Xc.Compressed) {
                        var u = c.type,
                            m = c.objectStreamRef,
                            _ = c.index;
                        o[s] = [u, m.objectNumber, _];
                    }
                }
                return o;
            }, a.computeMaxEntryByteWidths = function() {
                for (var o = a.entryTuplesCache.access(), s = [0, 0, 0], l = 0, c = o.length; l < c; l++) {
                    var u = o[l],
                        h = u[0],
                        d = u[1],
                        f = u[2],
                        m = Lf(h),
                        _ = Lf(d),
                        x = Lf(f);
                    m > s[0] && (s[0] = m), _ > s[1] && (s[1] = _), x > s[2] && (s[2] = x);
                }
                return s;
            }, a.entries = i || [], a.entryTuplesCache = oa.populatedBy(a.computeEntryTuples), a.maxByteWidthsCache = oa.populatedBy(a.computeMaxEntryByteWidths), a.indexCache = oa.populatedBy(a.computeIndex), e.set(K.of("Type"), K.of("XRef")), a;
        }
        return r.prototype.addDeletedEntry = function(e, i) {
            var n = Xc.Deleted;
            this.entries.push({
                type: n,
                ref: e,
                nextFreeObjectNumber: i
            }), this.entryTuplesCache.invalidate(), this.maxByteWidthsCache.invalidate(), this.indexCache.invalidate(), this.contentsCache.invalidate();
        }, r.prototype.addUncompressedEntry = function(e, i) {
            var n = Xc.Uncompressed;
            this.entries.push({
                type: n,
                ref: e,
                offset: i
            }), this.entryTuplesCache.invalidate(), this.maxByteWidthsCache.invalidate(), this.indexCache.invalidate(), this.contentsCache.invalidate();
        }, r.prototype.addCompressedEntry = function(e, i, n) {
            var a = Xc.Compressed;
            this.entries.push({
                type: a,
                ref: e,
                objectStreamRef: i,
                index: n
            }), this.entryTuplesCache.invalidate(), this.maxByteWidthsCache.invalidate(), this.indexCache.invalidate(), this.contentsCache.invalidate();
        }, r.prototype.clone = function(e) {
            var i = this,
                n = i.dict,
                a = i.entries,
                o = i.encode;
            return r.of(n.clone(e), a.slice(), o);
        }, r.prototype.getContentsString = function() {
            for (var e = this.entryTuplesCache.access(), i = this.maxByteWidthsCache.access(), n = "", a = 0, o = e.length; a < o; a++) {
                for (var s = e[a], l = s[0], c = s[1], u = s[2], h = Vc(Wc(l)), d = Vc(Wc(c)), f = Vc(Wc(u)), m = i[0] - 1; m >= 0; m--) n += (h[m] || 0).toString(2);
                for (var m = i[1] - 1; m >= 0; m--) n += (d[m] || 0).toString(2);
                for (var m = i[2] - 1; m >= 0; m--) n += (f[m] || 0).toString(2);
            }
            return n;
        }, r.prototype.getUnencodedContents = function() {
            for (var e = this.entryTuplesCache.access(), i = this.maxByteWidthsCache.access(), n = new Uint8Array(this.getUnencodedContentsSize()), a = 0, o = 0, s = e.length; o < s; o++) {
                for (var l = e[o], c = l[0], u = l[1], h = l[2], d = Vc(Wc(c)), f = Vc(Wc(u)), m = Vc(Wc(h)), _ = i[0] - 1; _ >= 0; _--) n[a++] = d[_] || 0;
                for (var _ = i[1] - 1; _ >= 0; _--) n[a++] = f[_] || 0;
                for (var _ = i[2] - 1; _ >= 0; _--) n[a++] = m[_] || 0;
            }
            return n;
        }, r.prototype.getUnencodedContentsSize = function() {
            var e = this.maxByteWidthsCache.access(),
                i = k5(e);
            return i * this.entries.length;
        }, r.prototype.updateDict = function() {
            t.prototype.updateDict.call(this);
            var e = this.maxByteWidthsCache.access(),
                i = this.indexCache.access(),
                n = this.dict.context;
            this.dict.set(K.of("W"), n.obj(e)), this.dict.set(K.of("Index"), n.obj(i));
        }, r.create = function(e, i) {
            i === void 0 && (i = !0);
            var n = new r(e, [], i);
            return n.addDeletedEntry(tr.of(0, 65535), 0), n;
        }, r.of = function(e, i, n) {
            return n === void 0 && (n = !0), new r(e, i, n);
        }, r;
    }(Gc),
    uv = gO;
var vO = function(t) {
        Ge(r, t);

        function r(e, i, n, a) {
            var o = t.call(this, e, i) || this;
            return o.encodeStreams = n, o.objectsPerStream = a, o;
        }
        return r.prototype.computeBufferSize = function() {
            return Rt(this, void 0, void 0, function() {
                var e, i, n, a, o, s, l, c, m, _, u, g, h, d, x, f, m, _, x, g, b, w, T, E;
                return Mt(this, function(L) {
                    switch (L.label) {
                        case 0:
                            e = this.context.largestObjectNumber + 1, i = Ys.forVersion(1, 7), n = i.sizeInBytes() + 2, a = uv.create(this.createTrailerDict(), this.encodeStreams), o = [], s = [], l = [], c = this.context.enumerateIndirectObjects(), m = 0, _ = c.length, L.label = 1;
                        case 1:
                            return m < _ ? (u = c[m], g = u[0], h = u[1], d = g === this.context.trailerInfo.Encrypt || h instanceof Fi || h instanceof Gf || g.generationNumber !== 0, d ? (o.push(u), a.addUncompressedEntry(g, n), n += this.computeIndirectObjectSize(u), this.shouldWaitForTick(1) ? [4, hs()] : [3, 3]) : [3, 4]) : [3, 6];
                        case 2:
                            L.sent(), L.label = 3;
                        case 3:
                            return [3, 5];
                        case 4:
                            x = K0(s), f = K0(l), (!x || x.length % this.objectsPerStream === 0) && (x = [], s.push(x), f = tr.of(e++), l.push(f)), a.addCompressedEntry(g, f, x.length), x.push(u), L.label = 5;
                        case 5:
                            return m++, [3, 1];
                        case 6:
                            m = 0, _ = s.length, L.label = 7;
                        case 7:
                            return m < _ ? (x = s[m], g = l[m], b = jf.withContextAndObjects(this.context, x, this.encodeStreams), a.addUncompressedEntry(g, n), n += this.computeIndirectObjectSize([g, b]), o.push([g, b]), this.shouldWaitForTick(x.length) ? [4, hs()] : [3, 9]) : [3, 10];
                        case 8:
                            L.sent(), L.label = 9;
                        case 9:
                            return m++, [3, 7];
                        case 10:
                            return w = tr.of(e++), a.dict.set(K.of("Size"), wt.of(e)), a.addUncompressedEntry(w, n), T = n, n += this.computeIndirectObjectSize([w, a]), o.push([w, a]), E = qc.forLastCrossRefSectionOffset(T), n += E.sizeInBytes(), [2, {
                                size: n,
                                header: i,
                                indirectObjects: o,
                                trailer: E
                            }];
                    }
                });
            });
        }, r.forContext = function(e, i, n, a) {
            return n === void 0 && (n = !0), a === void 0 && (a = 50), new r(e, i, n, a);
        }, r;
    }(Hf),
    fv = vO;
var xO = function(t) {
        Ge(r, t);

        function r(e) {
            var i = t.call(this) || this;
            return i.value = e, i;
        }
        return r.prototype.asBytes = function() {
            for (var e = this.value + (this.value.length % 2 === 1 ? "0" : ""), i = e.length, n = new Uint8Array(e.length / 2), a = 0, o = 0; a < i;) {
                var s = parseInt(e.substring(a, a + 2), 16);
                n[o] = s, a += 2, o += 1;
            }
            return n;
        }, r.prototype.decodeText = function() {
            var e = this.asBytes();
            return Yp(e) ? Kp(e) : $p(e);
        }, r.prototype.decodeDate = function() {
            var e = this.decodeText(),
                i = Gp(e);
            if (!i) throw new e1(e);
            return i;
        }, r.prototype.asString = function() {
            return this.value;
        }, r.prototype.clone = function() {
            return r.of(this.value);
        }, r.prototype.toString = function() {
            return "<" + this.value + ">";
        }, r.prototype.sizeInBytes = function() {
            return this.value.length + 2;
        }, r.prototype.copyBytesInto = function(e, i) {
            return e[i++] = ie.LessThan, i += pi(this.value, e, i), e[i++] = ie.GreaterThan, this.value.length + 2;
        }, r.of = function(e) {
            return new r(e);
        }, r.fromText = function(e) {
            for (var i = N5(e), n = "", a = 0, o = i.length; a < o; a++) n += Ks(i[a], 4);
            return new r(n);
        }, r;
    }(fi),
    bt = xO;
var _O = function() {
        function t(r, e) {
            this.encoding = r === Z0.ZapfDingbats ? Bf.ZapfDingbats : r === Z0.Symbol ? Bf.Symbol : Bf.WinAnsi, this.font = iS.load(r), this.fontName = this.font.FontName, this.customName = e;
        }
        return t.prototype.encodeText = function(r) {
            for (var e = this.encodeTextAsGlyphs(r), i = new Array(e.length), n = 0, a = e.length; n < a; n++) i[n] = Bl(e[n].code);
            return bt.of(i.join(""));
        }, t.prototype.widthOfTextAtSize = function(r, e) {
            for (var i = this.encodeTextAsGlyphs(r), n = 0, a = 0, o = i.length; a < o; a++) {
                var s = i[a].name,
                    l = (i[a + 1] || {}).name,
                    c = this.font.getXAxisKerningForPair(s, l) || 0;
                n += this.widthOfGlyph(s) + c;
            }
            var u = e / 1e3;
            return n * u;
        }, t.prototype.heightOfFontAtSize = function(r, e) {
            e === void 0 && (e = {});
            var i = e.descender,
                n = i === void 0 ? !0 : i,
                a = this.font,
                o = a.Ascender,
                s = a.Descender,
                l = a.FontBBox,
                c = o || l[3],
                u = s || l[1],
                h = c - u;
            return n || (h += s || 0), h / 1e3 * r;
        }, t.prototype.sizeOfFontAtHeight = function(r) {
            var e = this.font,
                i = e.Ascender,
                n = e.Descender,
                a = e.FontBBox,
                o = i || a[3],
                s = n || a[1];
            return 1e3 * r / (o - s);
        }, t.prototype.embedIntoContext = function(r, e) {
            var i = r.obj({
                Type: "Font",
                Subtype: "Type1",
                BaseFont: this.customName || this.fontName,
                Encoding: this.encoding === Bf.WinAnsi ? "WinAnsiEncoding" : void 0
            });
            return e ? (r.assign(e, i), e) : r.register(i);
        }, t.prototype.widthOfGlyph = function(r) {
            return this.font.getWidthOfGlyph(r) || 250;
        }, t.prototype.encodeTextAsGlyphs = function(r) {
            for (var e = Array.from(r), i = new Array(e.length), n = 0, a = e.length; n < a; n++) {
                var o = _5(e[n]);
                i[n] = this.encoding.encodeUnicodeCodePoint(o);
            }
            return i;
        }, t.for = function(r, e) {
            return new t(r, e);
        }, t;
    }(),
    Kc = _O;
var OS = function(t, r) {
        for (var e = new Array(t.length), i = 0, n = t.length; i < n; i++) {
            var a = t[i],
                o = IS(i1(r(a))),
                s = IS.apply(void 0, a.codePoints.map(bO));
            e[i] = [o, s];
        }
        return yO(e);
    },
    yO = function(t) {
        return `/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo <<
  /Registry (Adobe)
  /Ordering (UCS)
  /Supplement 0
>> def
/CMapName /Adobe-Identity-UCS def
/CMapType 2 def
1 begincodespacerange
<0000><ffff>
endcodespacerange
` + t.length + ` beginbfchar
` + t.map(function(r) {
            var e = r[0],
                i = r[1];
            return e + " " + i;
        }).join(`
`) + `
endbfchar
endcmap
CMapName currentdict /CMap defineresource pop
end
end`;
    },
    IS = function() {
        for (var t = [], r = 0; r < arguments.length; r++) t[r] = arguments[r];
        return "<" + t.join("") + ">";
    },
    i1 = function(t) {
        return Ks(t, 4);
    },
    bO = function(t) {
        if (L5(t)) return i1(t);
        if (R5(t)) {
            var r = ev(t),
                e = tv(t);
            return "" + i1(r) + i1(e);
        }
        var i = Bl(t),
            n = "0x" + i + " is not a valid UTF-8 or UTF-16 codepoint.";
        throw new Error(n);
    };
var wO = function(t) {
        var r = 0,
            e = function(i) {
                r |= 1 << i - 1;
            };
        return t.fixedPitch && e(1), t.serif && e(2), t.symbolic && e(3), t.script && e(4), t.nonsymbolic && e(6), t.italic && e(7), t.allCap && e(17), t.smallCap && e(18), t.forceBold && e(19), r;
    },
    NS = function(t) {
        var r = t["OS/2"] ? t["OS/2"].sFamilyClass : 0,
            e = wO({
                fixedPitch: t.post.isFixedPitch,
                serif: 1 <= r && r <= 7,
                symbolic: !0,
                script: r === 10,
                italic: t.head.macStyle.italic
            });
        return e;
    };
var SO = function(t) {
        Ge(r, t);

        function r(e) {
            var i = t.call(this) || this;
            return i.value = e, i;
        }
        return r.prototype.asBytes = function() {
            for (var e = [], i = "", n = !1, a = function(h) {
                    h !== void 0 && e.push(h), n = !1;
                }, o = 0, s = this.value.length; o < s; o++) {
                var l = this.value[o],
                    c = rr(l),
                    u = this.value[o + 1];
                n ? c === ie.Newline || c === ie.CarriageReturn ? a() : c === ie.n ? a(ie.Newline) : c === ie.r ? a(ie.CarriageReturn) : c === ie.t ? a(ie.Tab) : c === ie.b ? a(ie.Backspace) : c === ie.f ? a(ie.FormFeed) : c === ie.LeftParen ? a(ie.LeftParen) : c === ie.RightParen ? a(ie.RightParen) : c === ie.Backspace ? a(ie.BackSlash) : c >= ie.Zero && c <= ie.Seven ? (i += l, (i.length === 3 || !(u >= "0" && u <= "7")) && (a(parseInt(i, 8)), i = "")) : a(c) : c === ie.BackSlash ? n = !0 : a(c);
            }
            return new Uint8Array(e);
        }, r.prototype.decodeText = function() {
            var e = this.asBytes();
            return Yp(e) ? Kp(e) : $p(e);
        }, r.prototype.decodeDate = function() {
            var e = this.decodeText(),
                i = Gp(e);
            if (!i) throw new e1(e);
            return i;
        }, r.prototype.asString = function() {
            return this.value;
        }, r.prototype.clone = function() {
            return r.of(this.value);
        }, r.prototype.toString = function() {
            return "(" + this.value + ")";
        }, r.prototype.sizeInBytes = function() {
            return this.value.length + 2;
        }, r.prototype.copyBytesInto = function(e, i) {
            return e[i++] = ie.LeftParen, i += pi(this.value, e, i), e[i++] = ie.RightParen, this.value.length + 2;
        }, r.of = function(e) {
            return new r(e);
        }, r.fromDate = function(e) {
            var i = Ja(String(e.getUTCFullYear()), 4, "0"),
                n = Ja(String(e.getUTCMonth() + 1), 2, "0"),
                a = Ja(String(e.getUTCDate()), 2, "0"),
                o = Ja(String(e.getUTCHours()), 2, "0"),
                s = Ja(String(e.getUTCMinutes()), 2, "0"),
                l = Ja(String(e.getUTCSeconds()), 2, "0");
            return new r("D:" + i + n + a + o + s + l + "Z");
        }, r;
    }(fi),
    Fr = SO;
var CO = function() {
        function t(r, e, i, n) {
            var a = this;
            this.allGlyphsInFontSortedById = function() {
                for (var o = new Array(a.font.characterSet.length), s = 0, l = o.length; s < l; s++) {
                    var c = a.font.characterSet[s];
                    o[s] = a.font.glyphForCodePoint(c);
                }
                return D5(o.sort(T5), function(u) {
                    return u.id;
                });
            }, this.font = r, this.scale = 1e3 / this.font.unitsPerEm, this.fontData = e, this.fontName = this.font.postscriptName || "Font", this.customName = i, this.fontFeatures = n, this.baseFontName = "", this.glyphCache = oa.populatedBy(this.allGlyphsInFontSortedById);
        }
        return t.for = function(r, e, i, n) {
            return Rt(this, void 0, void 0, function() {
                var a;
                return Mt(this, function(o) {
                    switch (o.label) {
                        case 0:
                            return [4, r.create(e)];
                        case 1:
                            return a = o.sent(), [2, new t(a, e, i, n)];
                    }
                });
            });
        }, t.prototype.encodeText = function(r) {
            for (var e = this.font.layout(r, this.fontFeatures).glyphs, i = new Array(e.length), n = 0, a = e.length; n < a; n++) i[n] = Ks(e[n].id, 4);
            return bt.of(i.join(""));
        }, t.prototype.widthOfTextAtSize = function(r, e) {
            for (var i = this.font.layout(r, this.fontFeatures).glyphs, n = 0, a = 0, o = i.length; a < o; a++) n += i[a].advanceWidth * this.scale;
            var s = e / 1e3;
            return n * s;
        }, t.prototype.heightOfFontAtSize = function(r, e) {
            e === void 0 && (e = {});
            var i = e.descender,
                n = i === void 0 ? !0 : i,
                a = this.font,
                o = a.ascent,
                s = a.descent,
                l = a.bbox,
                c = (o || l.maxY) * this.scale,
                u = (s || l.minY) * this.scale,
                h = c - u;
            return n || (h -= Math.abs(s) || 0), h / 1e3 * r;
        }, t.prototype.sizeOfFontAtHeight = function(r) {
            var e = this.font,
                i = e.ascent,
                n = e.descent,
                a = e.bbox,
                o = (i || a.maxY) * this.scale,
                s = (n || a.minY) * this.scale;
            return 1e3 * r / (o - s);
        }, t.prototype.embedIntoContext = function(r, e) {
            return this.baseFontName = this.customName || r.addRandomSuffix(this.fontName), this.embedFontDict(r, e);
        }, t.prototype.embedFontDict = function(r, e) {
            return Rt(this, void 0, void 0, function() {
                var i, n, a;
                return Mt(this, function(o) {
                    switch (o.label) {
                        case 0:
                            return [4, this.embedCIDFontDict(r)];
                        case 1:
                            return i = o.sent(), n = this.embedUnicodeCmap(r), a = r.obj({
                                Type: "Font",
                                Subtype: "Type0",
                                BaseFont: this.baseFontName,
                                Encoding: "Identity-H",
                                DescendantFonts: [i],
                                ToUnicode: n
                            }), e ? (r.assign(e, a), [2, e]) : [2, r.register(a)];
                    }
                });
            });
        }, t.prototype.isCFF = function() {
            return this.font.cff;
        }, t.prototype.embedCIDFontDict = function(r) {
            return Rt(this, void 0, void 0, function() {
                var e, i;
                return Mt(this, function(n) {
                    switch (n.label) {
                        case 0:
                            return [4, this.embedFontDescriptor(r)];
                        case 1:
                            return e = n.sent(), i = r.obj({
                                Type: "Font",
                                Subtype: this.isCFF() ? "CIDFontType0" : "CIDFontType2",
                                CIDToGIDMap: "Identity",
                                BaseFont: this.baseFontName,
                                CIDSystemInfo: {
                                    Registry: Fr.of("Adobe"),
                                    Ordering: Fr.of("Identity"),
                                    Supplement: 0
                                },
                                FontDescriptor: e,
                                W: this.computeWidths()
                            }), [2, r.register(i)];
                    }
                });
            });
        }, t.prototype.embedFontDescriptor = function(r) {
            return Rt(this, void 0, void 0, function() {
                var e, i, n, a, o, s, l, c, u, h, d, f, m, _, x;
                return Mt(this, function(g) {
                    switch (g.label) {
                        case 0:
                            return [4, this.embedFontStream(r)];
                        case 1:
                            return e = g.sent(), i = this.scale, n = this.font, a = n.italicAngle, o = n.ascent, s = n.descent, l = n.capHeight, c = n.xHeight, u = this.font.bbox, h = u.minX, d = u.minY, f = u.maxX, m = u.maxY, _ = r.obj((x = {
                                Type: "FontDescriptor",
                                FontName: this.baseFontName,
                                Flags: NS(this.font),
                                FontBBox: [h * i, d * i, f * i, m * i],
                                ItalicAngle: a,
                                Ascent: o * i,
                                Descent: s * i,
                                CapHeight: (l || o) * i,
                                XHeight: (c || 0) * i,
                                StemV: 0
                            }, x[this.isCFF() ? "FontFile3" : "FontFile2"] = e, x)), [2, r.register(_)];
                    }
                });
            });
        }, t.prototype.serializeFont = function() {
            return Rt(this, void 0, void 0, function() {
                return Mt(this, function(r) {
                    return [2, this.fontData];
                });
            });
        }, t.prototype.embedFontStream = function(r) {
            return Rt(this, void 0, void 0, function() {
                var e, i, n;
                return Mt(this, function(a) {
                    switch (a.label) {
                        case 0:
                            return n = (i = r).flateStream, [4, this.serializeFont()];
                        case 1:
                            return e = n.apply(i, [a.sent(), {
                                Subtype: this.isCFF() ? "CIDFontType0C" : void 0
                            }]), [2, r.register(e)];
                    }
                });
            });
        }, t.prototype.embedUnicodeCmap = function(r) {
            var e = OS(this.glyphCache.access(), this.glyphId.bind(this)),
                i = r.flateStream(e);
            return r.register(i);
        }, t.prototype.glyphId = function(r) {
            return r ? r.id : -1;
        }, t.prototype.computeWidths = function() {
            for (var r = this.glyphCache.access(), e = [], i = [], n = 0, a = r.length; n < a; n++) {
                var o = r[n],
                    s = r[n - 1],
                    l = this.glyphId(o),
                    c = this.glyphId(s);
                n === 0 ? e.push(l) : l - c !== 1 && (e.push(i), e.push(l), i = []), i.push(o.advanceWidth * this.scale);
            }
            return e.push(i), e;
        }, t;
    }(),
    Yc = CO;
var AO = function(t) {
        Ge(r, t);

        function r(e, i, n, a) {
            var o = t.call(this, e, i, n, a) || this;
            return o.subset = o.font.createSubset(), o.glyphs = [], o.glyphCache = oa.populatedBy(function() {
                return o.glyphs;
            }), o.glyphIdMap = new Map(), o;
        }
        return r.for = function(e, i, n, a) {
            return Rt(this, void 0, void 0, function() {
                var o;
                return Mt(this, function(s) {
                    switch (s.label) {
                        case 0:
                            return [4, e.create(i)];
                        case 1:
                            return o = s.sent(), [2, new r(o, i, n, a)];
                    }
                });
            });
        }, r.prototype.encodeText = function(e) {
            for (var i = this.font.layout(e, this.fontFeatures).glyphs, n = new Array(i.length), a = 0, o = i.length; a < o; a++) {
                var s = i[a],
                    l = this.subset.includeGlyph(s);
                this.glyphs[l - 1] = s, this.glyphIdMap.set(s.id, l), n[a] = Ks(l, 4);
            }
            return this.glyphCache.invalidate(), bt.of(n.join(""));
        }, r.prototype.isCFF = function() {
            return this.subset.cff;
        }, r.prototype.glyphId = function(e) {
            return e ? this.glyphIdMap.get(e.id) : -1;
        }, r.prototype.serializeFont = function() {
            var e = this;
            return new Promise(function(i, n) {
                var a = [];
                e.subset.encodeStream().on("data", function(o) {
                    return a.push(o);
                }).on("end", function() {
                    return i(A5(a));
                }).on("error", function(o) {
                    return n(o);
                });
            });
        }, r;
    }(Yc),
    hv = AO;
var n1 = function(t) {
        return t.Source = "Source", t.Data = "Data", t.Alternative = "Alternative", t.Supplement = "Supplement", t.EncryptedPayload = "EncryptedPayload", t.FormData = "EncryptedPayload", t.Schema = "Schema", t.Unspecified = "Unspecified", t;
    }(n1 || {}),
    TO = function() {
        function t(r, e, i) {
            i === void 0 && (i = {}), this.fileData = r, this.fileName = e, this.options = i;
        }
        return t.for = function(r, e, i) {
            return i === void 0 && (i = {}), new t(r, e, i);
        }, t.prototype.embedIntoContext = function(r, e) {
            return Rt(this, void 0, void 0, function() {
                var i, n, a, o, s, l, c, u, h;
                return Mt(this, function(d) {
                    return i = this.options, n = i.mimeType, a = i.description, o = i.creationDate, s = i.modificationDate, l = i.afRelationship, c = r.flateStream(this.fileData, {
                        Type: "EmbeddedFile",
                        Subtype: n ? ? void 0,
                        Params: {
                            Size: this.fileData.length,
                            CreationDate: o ? Fr.fromDate(o) : void 0,
                            ModDate: s ? Fr.fromDate(s) : void 0
                        }
                    }), u = r.register(c), h = r.obj({
                        Type: "Filespec",
                        F: Fr.of(this.fileName),
                        UF: bt.fromText(this.fileName),
                        EF: {
                            F: u
                        },
                        Desc: a ? bt.fromText(a) : void 0,
                        AFRelationship: l ? ? void 0
                    }), e ? (r.assign(e, h), [2, e]) : [2, r.register(h)];
                });
            });
        }, t;
    }(),
    dv = TO;
var LS = [65472, 65473, 65474, 65475, 65477, 65478, 65479, 65480, 65481, 65482, 65483, 65484, 65485, 65486, 65487],
    qf = function(t) {
        return t.DeviceGray = "DeviceGray", t.DeviceRGB = "DeviceRGB", t.DeviceCMYK = "DeviceCMYK", t;
    }(qf || {}),
    DO = {
        1: qf.DeviceGray,
        3: qf.DeviceRGB,
        4: qf.DeviceCMYK
    },
    kO = function() {
        function t(r, e, i, n, a) {
            this.imageData = r, this.bitsPerComponent = e, this.width = i, this.height = n, this.colorSpace = a;
        }
        return t.for = function(r) {
            return Rt(this, void 0, void 0, function() {
                var e, i, n, a, o, s, l, c, u, h;
                return Mt(this, function(d) {
                    if (e = new DataView(r.buffer), i = e.getUint16(0), i !== 65496) throw new Error("SOI not found in JPEG");
                    for (n = 2; n < e.byteLength && (a = e.getUint16(n), n += 2, !LS.includes(a));) n += e.getUint16(n);
                    if (!LS.includes(a)) throw new Error("Invalid JPEG");
                    if (n += 2, o = e.getUint8(n++), s = e.getUint16(n), n += 2, l = e.getUint16(n), n += 2, c = e.getUint8(n++), u = DO[c], !u) throw new Error("Unknown JPEG channel.");
                    return h = u, [2, new t(r, o, l, s, h)];
                });
            });
        }, t.prototype.embedIntoContext = function(r, e) {
            return Rt(this, void 0, void 0, function() {
                var i;
                return Mt(this, function(n) {
                    return i = r.stream(this.imageData, {
                        Type: "XObject",
                        Subtype: "Image",
                        BitsPerComponent: this.bitsPerComponent,
                        Width: this.width,
                        Height: this.height,
                        ColorSpace: this.colorSpace,
                        Filter: "DCTDecode",
                        Decode: this.colorSpace === qf.DeviceCMYK ? [1, 0, 1, 0, 1, 0, 1, 0] : void 0
                    }), e ? (r.assign(e, i), [2, e]) : [2, r.register(i)];
                });
            });
        }, t;
    }(),
    Xf = kO;
w0();
var it = {};
it.toRGBA8 = function(t) {
    var r = t.width,
        e = t.height;
    if (t.tabs.acTL == null) return [it.toRGBA8.decodeImage(t.data, r, e, t).buffer];
    var i = [];
    t.frames[0].data == null && (t.frames[0].data = t.data);
    for (var n = r * e * 4, a = new Uint8Array(n), o = new Uint8Array(n), s = new Uint8Array(n), l = 0; l < t.frames.length; l++) {
        var c = t.frames[l],
            u = c.rect.x,
            h = c.rect.y,
            d = c.rect.width,
            f = c.rect.height,
            m = it.toRGBA8.decodeImage(c.data, d, f, t);
        if (l != 0)
            for (var _ = 0; _ < n; _++) s[_] = a[_];
        if (c.blend == 0 ? it._copyTile(m, d, f, a, r, e, u, h, 0) : c.blend == 1 && it._copyTile(m, d, f, a, r, e, u, h, 1), i.push(a.buffer.slice(0)), c.dispose != 0) {
            if (c.dispose == 1) it._copyTile(o, d, f, a, r, e, u, h, 0);
            else if (c.dispose == 2)
                for (var _ = 0; _ < n; _++) a[_] = s[_];
        }
    }
    return i;
};
it.toRGBA8.decodeImage = function(t, r, e, i) {
    var n = r * e,
        a = it.decode._getBPP(i),
        o = Math.ceil(r * a / 8),
        s = new Uint8Array(n * 4),
        l = new Uint32Array(s.buffer),
        c = i.ctype,
        u = i.depth,
        h = it._bin.readUshort,
        d = Date.now();
    if (c == 6) {
        var f = n << 2;
        if (u == 8)
            for (var m = 0; m < f; m += 4) s[m] = t[m], s[m + 1] = t[m + 1], s[m + 2] = t[m + 2], s[m + 3] = t[m + 3];
        if (u == 16)
            for (var m = 0; m < f; m++) s[m] = t[m << 1];
    } else if (c == 2) {
        var _ = i.tabs.tRNS;
        if (_ == null) {
            if (u == 8)
                for (var m = 0; m < n; m++) {
                    var x = m * 3;
                    l[m] = 255 << 24 | t[x + 2] << 16 | t[x + 1] << 8 | t[x];
                }
            if (u == 16)
                for (var m = 0; m < n; m++) {
                    var x = m * 6;
                    l[m] = 255 << 24 | t[x + 4] << 16 | t[x + 2] << 8 | t[x];
                }
        } else {
            var g = _[0],
                b = _[1],
                w = _[2];
            if (u == 8)
                for (var m = 0; m < n; m++) {
                    var T = m << 2,
                        x = m * 3;
                    l[m] = 255 << 24 | t[x + 2] << 16 | t[x + 1] << 8 | t[x], t[x] == g && t[x + 1] == b && t[x + 2] == w && (s[T + 3] = 0);
                }
            if (u == 16)
                for (var m = 0; m < n; m++) {
                    var T = m << 2,
                        x = m * 6;
                    l[m] = 255 << 24 | t[x + 4] << 16 | t[x + 2] << 8 | t[x], h(t, x) == g && h(t, x + 2) == b && h(t, x + 4) == w && (s[T + 3] = 0);
                }
        }
    } else if (c == 3) {
        var E = i.tabs.PLTE,
            L = i.tabs.tRNS,
            P = L ? L.length : 0;
        if (u == 1)
            for (var k = 0; k < e; k++)
                for (var A = k * o, N = k * r, m = 0; m < r; m++) {
                    var T = N + m << 2,
                        C = t[A + (m >> 3)] >> 7 - ((m & 7) << 0) & 1,
                        F = 3 * C;
                    s[T] = E[F], s[T + 1] = E[F + 1], s[T + 2] = E[F + 2], s[T + 3] = C < P ? L[C] : 255;
                }
        if (u == 2)
            for (var k = 0; k < e; k++)
                for (var A = k * o, N = k * r, m = 0; m < r; m++) {
                    var T = N + m << 2,
                        C = t[A + (m >> 2)] >> 6 - ((m & 3) << 1) & 3,
                        F = 3 * C;
                    s[T] = E[F], s[T + 1] = E[F + 1], s[T + 2] = E[F + 2], s[T + 3] = C < P ? L[C] : 255;
                }
        if (u == 4)
            for (var k = 0; k < e; k++)
                for (var A = k * o, N = k * r, m = 0; m < r; m++) {
                    var T = N + m << 2,
                        C = t[A + (m >> 1)] >> 4 - ((m & 1) << 2) & 15,
                        F = 3 * C;
                    s[T] = E[F], s[T + 1] = E[F + 1], s[T + 2] = E[F + 2], s[T + 3] = C < P ? L[C] : 255;
                }
        if (u == 8)
            for (var m = 0; m < n; m++) {
                var T = m << 2,
                    C = t[m],
                    F = 3 * C;
                s[T] = E[F], s[T + 1] = E[F + 1], s[T + 2] = E[F + 2], s[T + 3] = C < P ? L[C] : 255;
            }
    } else if (c == 4) {
        if (u == 8)
            for (var m = 0; m < n; m++) {
                var T = m << 2,
                    W = m << 1,
                    I = t[W];
                s[T] = I, s[T + 1] = I, s[T + 2] = I, s[T + 3] = t[W + 1];
            }
        if (u == 16)
            for (var m = 0; m < n; m++) {
                var T = m << 2,
                    W = m << 2,
                    I = t[W];
                s[T] = I, s[T + 1] = I, s[T + 2] = I, s[T + 3] = t[W + 2];
            }
    } else if (c == 0)
        for (var g = i.tabs.tRNS ? i.tabs.tRNS : -1, k = 0; k < e; k++) {
            var U = k * o,
                le = k * r;
            if (u == 1)
                for (var H = 0; H < r; H++) {
                    var I = 255 * (t[U + (H >>> 3)] >>> 7 - (H & 7) & 1),
                        pe = I == g * 255 ? 0 : 255;
                    l[le + H] = pe << 24 | I << 16 | I << 8 | I;
                } else if (u == 2)
                    for (var H = 0; H < r; H++) {
                        var I = 85 * (t[U + (H >>> 2)] >>> 6 - ((H & 3) << 1) & 3),
                            pe = I == g * 85 ? 0 : 255;
                        l[le + H] = pe << 24 | I << 16 | I << 8 | I;
                    } else if (u == 4)
                        for (var H = 0; H < r; H++) {
                            var I = 17 * (t[U + (H >>> 1)] >>> 4 - ((H & 1) << 2) & 15),
                                pe = I == g * 17 ? 0 : 255;
                            l[le + H] = pe << 24 | I << 16 | I << 8 | I;
                        } else if (u == 8)
                            for (var H = 0; H < r; H++) {
                                var I = t[U + H],
                                    pe = I == g ? 0 : 255;
                                l[le + H] = pe << 24 | I << 16 | I << 8 | I;
                            } else if (u == 16)
                                for (var H = 0; H < r; H++) {
                                    var I = t[U + (H << 1)],
                                        pe = h(t, U + (H << m)) == g ? 0 : 255;
                                    l[le + H] = pe << 24 | I << 16 | I << 8 | I;
                                }
        }
    return s;
};
it.decode = function(t) {
    for (var r = new Uint8Array(t), e = 8, i = it._bin, n = i.readUshort, a = i.readUint, o = {
            tabs: {},
            frames: []
        }, s = new Uint8Array(r.length), l = 0, c, u = 0, h = [137, 80, 78, 71, 13, 10, 26, 10], d = 0; d < 8; d++)
        if (r[d] != h[d]) throw "The input is not a PNG file!";
    for (; e < r.length;) {
        var f = i.readUint(r, e);
        e += 4;
        var m = i.readASCII(r, e, 4);
        if (e += 4, m == "IHDR") it.decode._IHDR(r, e, o);
        else if (m == "IDAT") {
            for (var d = 0; d < f; d++) s[l + d] = r[e + d];
            l += f;
        } else if (m == "acTL") o.tabs[m] = {
            num_frames: a(r, e),
            num_plays: a(r, e + 4)
        }, c = new Uint8Array(r.length);
        else if (m == "fcTL") {
            if (u != 0) {
                var _ = o.frames[o.frames.length - 1];
                _.data = it.decode._decompress(o, c.slice(0, u), _.rect.width, _.rect.height), u = 0;
            }
            var x = {
                    x: a(r, e + 12),
                    y: a(r, e + 16),
                    width: a(r, e + 4),
                    height: a(r, e + 8)
                },
                g = n(r, e + 22);
            g = n(r, e + 20) / (g == 0 ? 100 : g);
            var b = {
                rect: x,
                delay: Math.round(g * 1e3),
                dispose: r[e + 24],
                blend: r[e + 25]
            };
            o.frames.push(b);
        } else if (m == "fdAT") {
            for (var d = 0; d < f - 4; d++) c[u + d] = r[e + d + 4];
            u += f - 4;
        } else if (m == "pHYs") o.tabs[m] = [i.readUint(r, e), i.readUint(r, e + 4), r[e + 8]];
        else if (m == "cHRM") {
            o.tabs[m] = [];
            for (var d = 0; d < 8; d++) o.tabs[m].push(i.readUint(r, e + d * 4));
        } else if (m == "tEXt") {
            o.tabs[m] == null && (o.tabs[m] = {});
            var w = i.nextZero(r, e),
                T = i.readASCII(r, e, w - e),
                E = i.readASCII(r, w + 1, e + f - w - 1);
            o.tabs[m][T] = E;
        } else if (m == "iTXt") {
            o.tabs[m] == null && (o.tabs[m] = {});
            var w = 0,
                L = e;
            w = i.nextZero(r, L);
            var T = i.readASCII(r, L, w - L);
            L = w + 1;
            var P = r[L],
                k = r[L + 1];
            L += 2, w = i.nextZero(r, L);
            var A = i.readASCII(r, L, w - L);
            L = w + 1, w = i.nextZero(r, L);
            var N = i.readUTF8(r, L, w - L);
            L = w + 1;
            var E = i.readUTF8(r, L, f - (L - e));
            o.tabs[m][T] = E;
        } else if (m == "PLTE") o.tabs[m] = i.readBytes(r, e, f);
        else if (m == "hIST") {
            var C = o.tabs.PLTE.length / 3;
            o.tabs[m] = [];
            for (var d = 0; d < C; d++) o.tabs[m].push(n(r, e + d * 2));
        } else if (m == "tRNS") o.ctype == 3 ? o.tabs[m] = i.readBytes(r, e, f) : o.ctype == 0 ? o.tabs[m] = n(r, e) : o.ctype == 2 && (o.tabs[m] = [n(r, e), n(r, e + 2), n(r, e + 4)]);
        else if (m == "gAMA") o.tabs[m] = i.readUint(r, e) / 1e5;
        else if (m == "sRGB") o.tabs[m] = r[e];
        else if (m == "bKGD") o.ctype == 0 || o.ctype == 4 ? o.tabs[m] = [n(r, e)] : o.ctype == 2 || o.ctype == 6 ? o.tabs[m] = [n(r, e), n(r, e + 2), n(r, e + 4)] : o.ctype == 3 && (o.tabs[m] = r[e]);
        else if (m == "IEND") break;
        e += f;
        var F = i.readUint(r, e);
        e += 4;
    }
    if (u != 0) {
        var _ = o.frames[o.frames.length - 1];
        _.data = it.decode._decompress(o, c.slice(0, u), _.rect.width, _.rect.height), u = 0;
    }
    return o.data = it.decode._decompress(o, s, o.width, o.height), delete o.compress, delete o.interlace, delete o.filter, o;
};
it.decode._decompress = function(t, r, e, i) {
    var s = Date.now(),
        n = it.decode._getBPP(t),
        a = Math.ceil(e * n / 8),
        o = new Uint8Array((a + 1 + t.interlace) * i);
    r = it.decode._inflate(r, o);
    var s = Date.now();
    return t.interlace == 0 ? r = it.decode._filterZero(r, t, 0, e, i) : t.interlace == 1 && (r = it.decode._readInterlace(r, t)), r;
};
it.decode._inflate = function(t, r) {
    var e = it.inflateRaw(new Uint8Array(t.buffer, 2, t.length - 6), r);
    return e;
};
it.inflateRaw = function() {
    var t = {};
    return t.H = {}, t.H.N = function(r, e) {
            var i = Uint8Array,
                n = 0,
                a = 0,
                o = 0,
                s = 0,
                l = 0,
                c = 0,
                u = 0,
                h = 0,
                d = 0,
                f, m;
            if (r[0] == 3 && r[1] == 0) return e || new i(0);
            var _ = t.H,
                x = _.b,
                g = _.e,
                b = _.R,
                w = _.n,
                T = _.A,
                E = _.Z,
                L = _.m,
                P = e == null;
            for (P && (e = new i(r.length >>> 2 << 3)); n == 0;) {
                if (n = x(r, d, 1), a = x(r, d + 1, 2), d += 3, a == 0) {
                    (d & 7) != 0 && (d += 8 - (d & 7));
                    var k = (d >>> 3) + 4,
                        A = r[k - 4] | r[k - 3] << 8;
                    P && (e = t.H.W(e, h + A)), e.set(new i(r.buffer, r.byteOffset + k, A), h), d = k + A << 3, h += A;
                    continue;
                }
                if (P && (e = t.H.W(e, h + (1 << 17))), a == 1 && (f = L.J, m = L.h, c = 511, u = 31), a == 2) {
                    o = g(r, d, 5) + 257, s = g(r, d + 5, 5) + 1, l = g(r, d + 10, 4) + 4, d += 14;
                    for (var N = d, C = 1, F = 0; F < 38; F += 2) L.Q[F] = 0, L.Q[F + 1] = 0;
                    for (var F = 0; F < l; F++) {
                        var W = g(r, d + F * 3, 3);
                        L.Q[(L.X[F] << 1) + 1] = W, W > C && (C = W);
                    }
                    d += 3 * l, w(L.Q, C), T(L.Q, C, L.u), f = L.w, m = L.d, d = b(L.u, (1 << C) - 1, o + s, r, d, L.v);
                    var I = _.V(L.v, 0, o, L.C);
                    c = (1 << I) - 1;
                    var U = _.V(L.v, o, s, L.D);
                    u = (1 << U) - 1, w(L.C, I), T(L.C, I, f), w(L.D, U), T(L.D, U, m);
                }
                for (;;) {
                    var le = f[E(r, d) & c];
                    d += le & 15;
                    var H = le >>> 4;
                    if (!(H >>> 8)) e[h++] = H;
                    else {
                        if (H == 256) break;
                        var pe = h + H - 254;
                        if (H > 264) {
                            var _e = L.q[H - 257];
                            pe = h + (_e >>> 3) + g(r, d, _e & 7), d += _e & 7;
                        }
                        var Fe = m[E(r, d) & u];
                        d += Fe & 15;
                        var Te = Fe >>> 4,
                            O = L.c[Te],
                            j = (O >>> 4) + x(r, d, O & 15);
                        for (d += O & 15; h < pe;) e[h] = e[h++ - j], e[h] = e[h++ - j], e[h] = e[h++ - j], e[h] = e[h++ - j];
                        h = pe;
                    }
                }
            }
            return e.length == h ? e : e.slice(0, h);
        }, t.H.W = function(r, e) {
            var i = r.length;
            if (e <= i) return r;
            var n = new Uint8Array(i << 1);
            return n.set(r, 0), n;
        }, t.H.R = function(r, e, i, n, a, o) {
            for (var s = t.H.e, l = t.H.Z, c = 0; c < i;) {
                var u = r[l(n, a) & e];
                a += u & 15;
                var h = u >>> 4;
                if (h <= 15) o[c] = h, c++;
                else {
                    var d = 0,
                        f = 0;
                    h == 16 ? (f = 3 + s(n, a, 2), a += 2, d = o[c - 1]) : h == 17 ? (f = 3 + s(n, a, 3), a += 3) : h == 18 && (f = 11 + s(n, a, 7), a += 7);
                    for (var m = c + f; c < m;) o[c] = d, c++;
                }
            }
            return a;
        }, t.H.V = function(r, e, i, n) {
            for (var a = 0, o = 0, s = n.length >>> 1; o < i;) {
                var l = r[o + e];
                n[o << 1] = 0, n[(o << 1) + 1] = l, l > a && (a = l), o++;
            }
            for (; o < s;) n[o << 1] = 0, n[(o << 1) + 1] = 0, o++;
            return a;
        }, t.H.n = function(r, e) {
            for (var i = t.H.m, n = r.length, a, o, s, l, c, u = i.j, l = 0; l <= e; l++) u[l] = 0;
            for (l = 1; l < n; l += 2) u[r[l]]++;
            var h = i.K;
            for (a = 0, u[0] = 0, o = 1; o <= e; o++) a = a + u[o - 1] << 1, h[o] = a;
            for (s = 0; s < n; s += 2) c = r[s + 1], c != 0 && (r[s] = h[c], h[c]++);
        }, t.H.A = function(r, e, i) {
            for (var n = r.length, a = t.H.m, o = a.r, s = 0; s < n; s += 2)
                if (r[s + 1] != 0)
                    for (var l = s >> 1, c = r[s + 1], u = l << 4 | c, h = e - c, d = r[s] << h, f = d + (1 << h); d != f;) {
                        var m = o[d] >>> 15 - e;
                        i[m] = u, d++;
                    }
        }, t.H.l = function(r, e) {
            for (var i = t.H.m.r, n = 15 - e, a = 0; a < r.length; a += 2) {
                var o = r[a] << e - r[a + 1];
                r[a] = i[o] >>> n;
            }
        }, t.H.M = function(r, e, i) {
            i = i << (e & 7);
            var n = e >>> 3;
            r[n] |= i, r[n + 1] |= i >>> 8;
        }, t.H.I = function(r, e, i) {
            i = i << (e & 7);
            var n = e >>> 3;
            r[n] |= i, r[n + 1] |= i >>> 8, r[n + 2] |= i >>> 16;
        }, t.H.e = function(r, e, i) {
            return (r[e >>> 3] | r[(e >>> 3) + 1] << 8) >>> (e & 7) & (1 << i) - 1;
        }, t.H.b = function(r, e, i) {
            return (r[e >>> 3] | r[(e >>> 3) + 1] << 8 | r[(e >>> 3) + 2] << 16) >>> (e & 7) & (1 << i) - 1;
        }, t.H.Z = function(r, e) {
            return (r[e >>> 3] | r[(e >>> 3) + 1] << 8 | r[(e >>> 3) + 2] << 16) >>> (e & 7);
        }, t.H.i = function(r, e) {
            return (r[e >>> 3] | r[(e >>> 3) + 1] << 8 | r[(e >>> 3) + 2] << 16 | r[(e >>> 3) + 3] << 24) >>> (e & 7);
        }, t.H.m = function() {
            var r = Uint16Array,
                e = Uint32Array;
            return {
                K: new r(16),
                j: new r(16),
                X: [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15],
                S: [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 999, 999, 999],
                T: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0],
                q: new r(32),
                p: [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 65535, 65535],
                z: [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0],
                c: new e(32),
                J: new r(512),
                _: [],
                h: new r(32),
                $: [],
                w: new r(32768),
                C: [],
                v: [],
                d: new r(32768),
                D: [],
                u: new r(512),
                Q: [],
                r: new r(32768),
                s: new e(286),
                Y: new e(30),
                a: new e(19),
                t: new e(15e3),
                k: new r(65536),
                g: new r(32768)
            };
        }(),
        function() {
            for (var r = t.H.m, e = 32768, i = 0; i < e; i++) {
                var n = i;
                n = (n & 2863311530) >>> 1 | (n & 1431655765) << 1, n = (n & 3435973836) >>> 2 | (n & 858993459) << 2, n = (n & 4042322160) >>> 4 | (n & 252645135) << 4, n = (n & 4278255360) >>> 8 | (n & 16711935) << 8, r.r[i] = (n >>> 16 | n << 16) >>> 17;
            }

            function a(o, s, l) {
                for (; s-- != 0;) o.push(0, l);
            }
            for (var i = 0; i < 32; i++) r.q[i] = r.S[i] << 3 | r.T[i], r.c[i] = r.p[i] << 4 | r.z[i];
            a(r._, 144, 8), a(r._, 112, 9), a(r._, 24, 7), a(r._, 8, 8), t.H.n(r._, 9), t.H.A(r._, 9, r.J), t.H.l(r._, 9), a(r.$, 32, 5), t.H.n(r.$, 5), t.H.A(r.$, 5, r.h), t.H.l(r.$, 5), a(r.Q, 19, 0), a(r.C, 286, 0), a(r.D, 30, 0), a(r.v, 320, 0);
        }(), t.H.N;
}();
it.decode._readInterlace = function(t, r) {
    for (var e = r.width, i = r.height, n = it.decode._getBPP(r), a = n >> 3, o = Math.ceil(e * n / 8), s = new Uint8Array(i * o), l = 0, c = [0, 0, 4, 0, 2, 0, 1], u = [0, 4, 0, 2, 0, 1, 0], h = [8, 8, 8, 4, 4, 2, 2], d = [8, 8, 4, 4, 2, 2, 1], f = 0; f < 7;) {
        for (var m = h[f], _ = d[f], x = 0, g = 0, b = c[f]; b < i;) b += m, g++;
        for (var w = u[f]; w < e;) w += _, x++;
        var T = Math.ceil(x * n / 8);
        it.decode._filterZero(t, r, l, x, g);
        for (var E = 0, L = c[f]; L < i;) {
            for (var P = u[f], k = l + E * T << 3; P < e;) {
                if (n == 1) {
                    var A = t[k >> 3];
                    A = A >> 7 - (k & 7) & 1, s[L * o + (P >> 3)] |= A << 7 - ((P & 7) << 0);
                }
                if (n == 2) {
                    var A = t[k >> 3];
                    A = A >> 6 - (k & 7) & 3, s[L * o + (P >> 2)] |= A << 6 - ((P & 3) << 1);
                }
                if (n == 4) {
                    var A = t[k >> 3];
                    A = A >> 4 - (k & 7) & 15, s[L * o + (P >> 1)] |= A << 4 - ((P & 1) << 2);
                }
                if (n >= 8)
                    for (var N = L * o + P * a, C = 0; C < a; C++) s[N + C] = t[(k >> 3) + C];
                k += n, P += _;
            }
            E++, L += m;
        }
        x * g != 0 && (l += g * (1 + T)), f = f + 1;
    }
    return s;
};
it.decode._getBPP = function(t) {
    var r = [1, null, 3, 1, 2, null, 4][t.ctype];
    return r * t.depth;
};
it.decode._filterZero = function(t, r, e, i, n) {
    var a = it.decode._getBPP(r),
        o = Math.ceil(i * a / 8),
        s = it.decode._paeth;
    a = Math.ceil(a / 8);
    var l = 0,
        c = 1,
        u = t[e],
        h = 0;
    if (u > 1 && (t[e] = [0, 0, 1][u - 2]), u == 3)
        for (h = a; h < o; h++) t[h + 1] = t[h + 1] + (t[h + 1 - a] >>> 1) & 255;
    for (var d = 0; d < n; d++)
        if (l = e + d * o, c = l + d + 1, u = t[c - 1], h = 0, u == 0)
            for (; h < o; h++) t[l + h] = t[c + h];
        else if (u == 1) {
        for (; h < a; h++) t[l + h] = t[c + h];
        for (; h < o; h++) t[l + h] = t[c + h] + t[l + h - a];
    } else if (u == 2)
        for (; h < o; h++) t[l + h] = t[c + h] + t[l + h - o];
    else if (u == 3) {
        for (; h < a; h++) t[l + h] = t[c + h] + (t[l + h - o] >>> 1);
        for (; h < o; h++) t[l + h] = t[c + h] + (t[l + h - o] + t[l + h - a] >>> 1);
    } else {
        for (; h < a; h++) t[l + h] = t[c + h] + s(0, t[l + h - o], 0);
        for (; h < o; h++) t[l + h] = t[c + h] + s(t[l + h - a], t[l + h - o], t[l + h - a - o]);
    }
    return t;
};
it.decode._paeth = function(t, r, e) {
    var i = t + r - e,
        n = i - t,
        a = i - r,
        o = i - e;
    return n * n <= a * a && n * n <= o * o ? t : a * a <= o * o ? r : e;
};
it.decode._IHDR = function(t, r, e) {
    var i = it._bin;
    e.width = i.readUint(t, r), r += 4, e.height = i.readUint(t, r), r += 4, e.depth = t[r], r++, e.ctype = t[r], r++, e.compress = t[r], r++, e.filter = t[r], r++, e.interlace = t[r], r++;
};
it._bin = {
    nextZero: function(t, r) {
        for (; t[r] != 0;) r++;
        return r;
    },
    readUshort: function(t, r) {
        return t[r] << 8 | t[r + 1];
    },
    writeUshort: function(t, r, e) {
        t[r] = e >> 8 & 255, t[r + 1] = e & 255;
    },
    readUint: function(t, r) {
        return t[r] * (256 * 256 * 256) + (t[r + 1] << 16 | t[r + 2] << 8 | t[r + 3]);
    },
    writeUint: function(t, r, e) {
        t[r] = e >> 24 & 255, t[r + 1] = e >> 16 & 255, t[r + 2] = e >> 8 & 255, t[r + 3] = e & 255;
    },
    readASCII: function(t, r, e) {
        for (var i = "", n = 0; n < e; n++) i += String.fromCharCode(t[r + n]);
        return i;
    },
    writeASCII: function(t, r, e) {
        for (var i = 0; i < e.length; i++) t[r + i] = e.charCodeAt(i);
    },
    readBytes: function(t, r, e) {
        for (var i = [], n = 0; n < e; n++) i.push(t[r + n]);
        return i;
    },
    pad: function(t) {
        return t.length < 2 ? "0" + t : t;
    },
    readUTF8: function(t, r, e) {
        for (var i = "", n, a = 0; a < e; a++) i += "%" + it._bin.pad(t[r + a].toString(16));
        try {
            n = decodeURIComponent(i);
        } catch {
            return it._bin.readASCII(t, r, e);
        }
        return n;
    }
};
it._copyTile = function(t, r, e, i, n, a, o, s, l) {
    for (var c = Math.min(r, n), u = Math.min(e, a), h = 0, d = 0, f = 0; f < u; f++)
        for (var m = 0; m < c; m++)
            if (o >= 0 && s >= 0 ? (h = f * r + m << 2, d = (s + f) * n + o + m << 2) : (h = (-s + f) * r - o + m << 2, d = f * n + m << 2), l == 0) i[d] = t[h], i[d + 1] = t[h + 1], i[d + 2] = t[h + 2], i[d + 3] = t[h + 3];
            else if (l == 1) {
        var _ = t[h + 3] * .00392156862745098,
            x = t[h] * _,
            g = t[h + 1] * _,
            b = t[h + 2] * _,
            w = i[d + 3] * (1 / 255),
            T = i[d] * w,
            E = i[d + 1] * w,
            L = i[d + 2] * w,
            P = 1 - _,
            k = _ + w * P,
            A = k == 0 ? 0 : 1 / k;
        i[d + 3] = 255 * k, i[d + 0] = (x + T * P) * A, i[d + 1] = (g + E * P) * A, i[d + 2] = (b + L * P) * A;
    } else if (l == 2) {
        var _ = t[h + 3],
            x = t[h],
            g = t[h + 1],
            b = t[h + 2],
            w = i[d + 3],
            T = i[d],
            E = i[d + 1],
            L = i[d + 2];
        _ == w && x == T && g == E && b == L ? (i[d] = 0, i[d + 1] = 0, i[d + 2] = 0, i[d + 3] = 0) : (i[d] = x, i[d + 1] = g, i[d + 2] = b, i[d + 3] = _);
    } else if (l == 3) {
        var _ = t[h + 3],
            x = t[h],
            g = t[h + 1],
            b = t[h + 2],
            w = i[d + 3],
            T = i[d],
            E = i[d + 1],
            L = i[d + 2];
        if (_ == w && x == T && g == E && b == L) continue;
        if (_ < 220 && w > 20) return !1;
    }
    return !0;
};
it.encode = function(t, r, e, i, n, a, o) {
    i == null && (i = 0), o == null && (o = !1);
    var s = it.encode.compress(t, r, e, i, [!1, !1, !1, 0, o]);
    return it.encode.compressPNG(s, -1), it.encode._main(s, r, e, n, a);
};
it.encodeLL = function(t, r, e, i, n, a, o, s) {
    for (var l = {
            ctype: 0 + (i == 1 ? 0 : 2) + (n == 0 ? 0 : 4),
            depth: a,
            frames: []
        }, c = Date.now(), u = (i + n) * a, h = u * r, d = 0; d < t.length; d++) l.frames.push({
        rect: {
            x: 0,
            y: 0,
            width: r,
            height: e
        },
        img: new Uint8Array(t[d]),
        blend: 0,
        dispose: 1,
        bpp: Math.ceil(u / 8),
        bpl: Math.ceil(h / 8)
    });
    it.encode.compressPNG(l, 0, !0);
    var f = it.encode._main(l, r, e, o, s);
    return f;
};
it.encode._main = function(t, r, e, i, n) {
    n == null && (n = {});
    var a = it.crc.crc,
        o = it._bin.writeUint,
        s = it._bin.writeUshort,
        l = it._bin.writeASCII,
        c = 8,
        u = t.frames.length > 1,
        h = !1,
        d = 33 + (u ? 20 : 0);
    if (n.sRGB != null && (d += 13), n.pHYs != null && (d += 21), t.ctype == 3) {
        for (var f = t.plte.length, m = 0; m < f; m++) t.plte[m] >>> 24 != 255 && (h = !0);
        d += 8 + f * 3 + 4 + (h ? 8 + f * 1 + 4 : 0);
    }
    for (var _ = 0; _ < t.frames.length; _++) {
        var x = t.frames[_];
        u && (d += 38), d += x.cimg.length + 12, _ != 0 && (d += 4);
    }
    d += 12;
    for (var g = new Uint8Array(d), b = [137, 80, 78, 71, 13, 10, 26, 10], m = 0; m < 8; m++) g[m] = b[m];
    if (o(g, c, 13), c += 4, l(g, c, "IHDR"), c += 4, o(g, c, r), c += 4, o(g, c, e), c += 4, g[c] = t.depth, c++, g[c] = t.ctype, c++, g[c] = 0, c++, g[c] = 0, c++, g[c] = 0, c++, o(g, c, a(g, c - 17, 17)), c += 4, n.sRGB != null && (o(g, c, 1), c += 4, l(g, c, "sRGB"), c += 4, g[c] = n.sRGB, c++, o(g, c, a(g, c - 5, 5)), c += 4), n.pHYs != null && (o(g, c, 9), c += 4, l(g, c, "pHYs"), c += 4, o(g, c, n.pHYs[0]), c += 4, o(g, c, n.pHYs[1]), c += 4, g[c] = n.pHYs[2], c++, o(g, c, a(g, c - 13, 13)), c += 4), u && (o(g, c, 8), c += 4, l(g, c, "acTL"), c += 4, o(g, c, t.frames.length), c += 4, o(g, c, n.loop != null ? n.loop : 0), c += 4, o(g, c, a(g, c - 12, 12)), c += 4), t.ctype == 3) {
        var f = t.plte.length;
        o(g, c, f * 3), c += 4, l(g, c, "PLTE"), c += 4;
        for (var m = 0; m < f; m++) {
            var w = m * 3,
                T = t.plte[m],
                E = T & 255,
                L = T >>> 8 & 255,
                P = T >>> 16 & 255;
            g[c + w + 0] = E, g[c + w + 1] = L, g[c + w + 2] = P;
        }
        if (c += f * 3, o(g, c, a(g, c - f * 3 - 4, f * 3 + 4)), c += 4, h) {
            o(g, c, f), c += 4, l(g, c, "tRNS"), c += 4;
            for (var m = 0; m < f; m++) g[c + m] = t.plte[m] >>> 24 & 255;
            c += f, o(g, c, a(g, c - f - 4, f + 4)), c += 4;
        }
    }
    for (var k = 0, _ = 0; _ < t.frames.length; _++) {
        var x = t.frames[_];
        u && (o(g, c, 26), c += 4, l(g, c, "fcTL"), c += 4, o(g, c, k++), c += 4, o(g, c, x.rect.width), c += 4, o(g, c, x.rect.height), c += 4, o(g, c, x.rect.x), c += 4, o(g, c, x.rect.y), c += 4, s(g, c, i[_]), c += 2, s(g, c, 1e3), c += 2, g[c] = x.dispose, c++, g[c] = x.blend, c++, o(g, c, a(g, c - 30, 30)), c += 4);
        var A = x.cimg,
            f = A.length;
        o(g, c, f + (_ == 0 ? 0 : 4)), c += 4;
        var N = c;
        l(g, c, _ == 0 ? "IDAT" : "fdAT"), c += 4, _ != 0 && (o(g, c, k++), c += 4), g.set(A, c), c += f, o(g, c, a(g, N, c - N)), c += 4;
    }
    return o(g, c, 0), c += 4, l(g, c, "IEND"), c += 4, o(g, c, a(g, c - 4, 4)), c += 4, g.buffer;
};
it.encode.compressPNG = function(t, r, e) {
    for (var i = 0; i < t.frames.length; i++) {
        var n = t.frames[i],
            a = n.rect.width,
            o = n.rect.height,
            s = new Uint8Array(o * n.bpl + o);
        n.cimg = it.encode._filterZero(n.img, o, n.bpp, n.bpl, s, r, e);
    }
};
it.encode.compress = function(t, r, e, i, n) {
    for (var a = n[0], o = n[1], s = n[2], l = n[3], c = n[4], u = 6, h = 8, d = 255, f = 0; f < t.length; f++)
        for (var m = new Uint8Array(t[f]), _ = m.length, x = 0; x < _; x += 4) d &= m[x + 3];
    var g = d != 255,
        b = it.encode.framize(t, r, e, a, o, s),
        w = {},
        T = [],
        E = [];
    if (i != 0) {
        for (var L = [], x = 0; x < b.length; x++) L.push(b[x].img.buffer);
        for (var P = it.encode.concatRGBA(L), k = it.quantize(P, i), A = 0, N = new Uint8Array(k.abuf), x = 0; x < b.length; x++) {
            var C = b[x].img,
                F = C.length;
            E.push(new Uint8Array(k.inds.buffer, A >> 2, F >> 2));
            for (var f = 0; f < F; f += 4) C[f] = N[A + f], C[f + 1] = N[A + f + 1], C[f + 2] = N[A + f + 2], C[f + 3] = N[A + f + 3];
            A += F;
        }
        for (var x = 0; x < k.plte.length; x++) T.push(k.plte[x].est.rgba);
    } else
        for (var f = 0; f < b.length; f++) {
            var W = b[f],
                I = new Uint32Array(W.img.buffer),
                U = W.rect.width,
                _ = I.length,
                le = new Uint8Array(_);
            E.push(le);
            for (var x = 0; x < _; x++) {
                var H = I[x];
                if (x != 0 && H == I[x - 1]) le[x] = le[x - 1];
                else if (x > U && H == I[x - U]) le[x] = le[x - U];
                else {
                    var pe = w[H];
                    if (pe == null && (w[H] = pe = T.length, T.push(H), T.length >= 300)) break;
                    le[x] = pe;
                }
            }
        }
    var _e = T.length;
    _e <= 256 && c == !1 && (_e <= 2 ? h = 1 : _e <= 4 ? h = 2 : _e <= 16 ? h = 4 : h = 8, h = Math.max(h, l));
    for (var f = 0; f < b.length; f++) {
        var W = b[f],
            Fe = W.rect.x,
            Te = W.rect.y,
            U = W.rect.width,
            O = W.rect.height,
            j = W.img,
            X = new Uint32Array(j.buffer),
            me = 4 * U,
            xe = 4;
        if (_e <= 256 && c == !1) {
            me = Math.ceil(h * U / 8);
            for (var be = new Uint8Array(me * O), B = E[f], ne = 0; ne < O; ne++) {
                var x = ne * me,
                    Z = ne * U;
                if (h == 8)
                    for (var J = 0; J < U; J++) be[x + J] = B[Z + J];
                else if (h == 4)
                    for (var J = 0; J < U; J++) be[x + (J >> 1)] |= B[Z + J] << 4 - (J & 1) * 4;
                else if (h == 2)
                    for (var J = 0; J < U; J++) be[x + (J >> 2)] |= B[Z + J] << 6 - (J & 3) * 2;
                else if (h == 1)
                    for (var J = 0; J < U; J++) be[x + (J >> 3)] |= B[Z + J] << 7 - (J & 7) * 1;
            }
            j = be, u = 3, xe = 1;
        } else if (g == !1 && b.length == 1) {
            for (var be = new Uint8Array(U * O * 3), ye = U * O, x = 0; x < ye; x++) {
                var C = x * 3,
                    je = x * 4;
                be[C] = j[je], be[C + 1] = j[je + 1], be[C + 2] = j[je + 2];
            }
            j = be, u = 2, xe = 3, me = 3 * U;
        }
        W.img = j, W.bpl = me, W.bpp = xe;
    }
    return {
        ctype: u,
        depth: h,
        plte: T,
        frames: b
    };
};
it.encode.framize = function(t, r, e, i, n, a) {
    for (var o = [], s = 0; s < t.length; s++) {
        var l = new Uint8Array(t[s]),
            c = new Uint32Array(l.buffer),
            u, h = 0,
            d = 0,
            f = r,
            m = e,
            _ = i ? 1 : 0;
        if (s != 0) {
            for (var x = a || i || s == 1 || o[s - 2].dispose != 0 ? 1 : 2, g = 0, b = 1e9, w = 0; w < x; w++) {
                for (var W = new Uint8Array(t[s - 1 - w]), T = new Uint32Array(t[s - 1 - w]), E = r, L = e, P = -1, k = -1, A = 0; A < e; A++)
                    for (var N = 0; N < r; N++) {
                        var C = A * r + N;
                        c[C] != T[C] && (N < E && (E = N), N > P && (P = N), A < L && (L = A), A > k && (k = A));
                    }
                P == -1 && (E = L = P = k = 0), n && ((E & 1) == 1 && E--, (L & 1) == 1 && L--);
                var F = (P - E + 1) * (k - L + 1);
                F < b && (b = F, g = w, h = E, d = L, f = P - E + 1, m = k - L + 1);
            }
            var W = new Uint8Array(t[s - 1 - g]);
            g == 1 && (o[s - 1].dispose = 2), u = new Uint8Array(f * m * 4), it._copyTile(W, r, e, u, f, m, -h, -d, 0), _ = it._copyTile(l, r, e, u, f, m, -h, -d, 3) ? 1 : 0, _ == 1 ? it.encode._prepareDiff(l, r, e, u, {
                x: h,
                y: d,
                width: f,
                height: m
            }) : it._copyTile(l, r, e, u, f, m, -h, -d, 0);
        } else u = l.slice(0);
        o.push({
            rect: {
                x: h,
                y: d,
                width: f,
                height: m
            },
            img: u,
            blend: _,
            dispose: 0
        });
    }
    if (i)
        for (var s = 0; s < o.length; s++) {
            var I = o[s];
            if (I.blend != 1) {
                var U = I.rect,
                    le = o[s - 1].rect,
                    H = Math.min(U.x, le.x),
                    pe = Math.min(U.y, le.y),
                    _e = Math.max(U.x + U.width, le.x + le.width),
                    Fe = Math.max(U.y + U.height, le.y + le.height),
                    Te = {
                        x: H,
                        y: pe,
                        width: _e - H,
                        height: Fe - pe
                    };
                o[s - 1].dispose = 1, s - 1 != 0 && it.encode._updateFrame(t, r, e, o, s - 1, Te, n), it.encode._updateFrame(t, r, e, o, s, Te, n);
            }
        }
    var O = 0;
    if (t.length != 1)
        for (var C = 0; C < o.length; C++) {
            var I = o[C];
            O += I.rect.width * I.rect.height;
        }
    return o;
};
it.encode._updateFrame = function(t, r, e, i, n, a, o) {
    for (var s = Uint8Array, l = Uint32Array, c = new s(t[n - 1]), u = new l(t[n - 1]), h = n + 1 < t.length ? new s(t[n + 1]) : null, d = new s(t[n]), f = new l(d.buffer), m = r, _ = e, x = -1, g = -1, b = 0; b < a.height; b++)
        for (var w = 0; w < a.width; w++) {
            var T = a.x + w,
                E = a.y + b,
                L = E * r + T,
                P = f[L];
            P == 0 || i[n - 1].dispose == 0 && u[L] == P && (h == null || h[L * 4 + 3] != 0) || (T < m && (m = T), T > x && (x = T), E < _ && (_ = E), E > g && (g = E));
        }
    x == -1 && (m = _ = x = g = 0), o && ((m & 1) == 1 && m--, (_ & 1) == 1 && _--), a = {
        x: m,
        y: _,
        width: x - m + 1,
        height: g - _ + 1
    };
    var k = i[n];
    k.rect = a, k.blend = 1, k.img = new Uint8Array(a.width * a.height * 4), i[n - 1].dispose == 0 ? (it._copyTile(c, r, e, k.img, a.width, a.height, -a.x, -a.y, 0), it.encode._prepareDiff(d, r, e, k.img, a)) : it._copyTile(d, r, e, k.img, a.width, a.height, -a.x, -a.y, 0);
};
it.encode._prepareDiff = function(t, r, e, i, n) {
    it._copyTile(t, r, e, i, n.width, n.height, -n.x, -n.y, 2);
};
it.encode._filterZero = function(t, r, e, i, n, a, o) {
    var s = [],
        l = [0, 1, 2, 3, 4];
    a != -1 ? l = [a] : (r * i > 5e5 || e == 1) && (l = [0]);
    var c;
    o && (c = {
        level: 0
    });
    for (var u = o && UZIP != null ? UZIP : Tl, h = 0; h < l.length; h++) {
        for (var d = 0; d < r; d++) it.encode._filterLine(n, t, d, i, e, l[h]);
        s.push(u.deflate(n, c));
    }
    for (var f, m = 1e9, h = 0; h < s.length; h++) s[h].length < m && (f = h, m = s[h].length);
    return s[f];
};
it.encode._filterLine = function(t, r, e, i, n, a) {
    var o = e * i,
        s = o + e,
        l = it.decode._paeth;
    if (t[s] = a, s++, a == 0) {
        if (i < 500)
            for (var c = 0; c < i; c++) t[s + c] = r[o + c];
        else t.set(new Uint8Array(r.buffer, o, i), s);
    } else if (a == 1) {
        for (var c = 0; c < n; c++) t[s + c] = r[o + c];
        for (var c = n; c < i; c++) t[s + c] = r[o + c] - r[o + c - n] + 256 & 255;
    } else if (e == 0) {
        for (var c = 0; c < n; c++) t[s + c] = r[o + c];
        if (a == 2)
            for (var c = n; c < i; c++) t[s + c] = r[o + c];
        if (a == 3)
            for (var c = n; c < i; c++) t[s + c] = r[o + c] - (r[o + c - n] >> 1) + 256 & 255;
        if (a == 4)
            for (var c = n; c < i; c++) t[s + c] = r[o + c] - l(r[o + c - n], 0, 0) + 256 & 255;
    } else {
        if (a == 2)
            for (var c = 0; c < i; c++) t[s + c] = r[o + c] + 256 - r[o + c - i] & 255;
        if (a == 3) {
            for (var c = 0; c < n; c++) t[s + c] = r[o + c] + 256 - (r[o + c - i] >> 1) & 255;
            for (var c = n; c < i; c++) t[s + c] = r[o + c] + 256 - (r[o + c - i] + r[o + c - n] >> 1) & 255;
        }
        if (a == 4) {
            for (var c = 0; c < n; c++) t[s + c] = r[o + c] + 256 - l(0, r[o + c - i], 0) & 255;
            for (var c = n; c < i; c++) t[s + c] = r[o + c] + 256 - l(r[o + c - n], r[o + c - i], r[o + c - n - i]) & 255;
        }
    }
};
it.crc = {
    table: function() {
        for (var t = new Uint32Array(256), r = 0; r < 256; r++) {
            for (var e = r, i = 0; i < 8; i++) e & 1 ? e = 3988292384 ^ e >>> 1 : e = e >>> 1;
            t[r] = e;
        }
        return t;
    }(),
    update: function(t, r, e, i) {
        for (var n = 0; n < i; n++) t = it.crc.table[(t ^ r[e + n]) & 255] ^ t >>> 8;
        return t;
    },
    crc: function(t, r, e) {
        return it.crc.update(4294967295, t, r, e) ^ 4294967295;
    }
};
it.quantize = function(t, r) {
    for (var e = new Uint8Array(t), i = e.slice(0), n = new Uint32Array(i.buffer), a = it.quantize.getKDtree(i, r), o = a[0], s = a[1], l = it.quantize.planeDst, c = e, u = n, h = c.length, d = new Uint8Array(e.length >> 2), f = 0; f < h; f += 4) {
        var m = c[f] * .00392156862745098,
            _ = c[f + 1] * (1 / 255),
            x = c[f + 2] * (1 / 255),
            g = c[f + 3] * (1 / 255),
            b = it.quantize.getNearest(o, m, _, x, g);
        d[f >> 2] = b.ind, u[f >> 2] = b.est.rgba;
    }
    return {
        abuf: i.buffer,
        inds: d,
        plte: s
    };
};
it.quantize.getKDtree = function(t, r, e) {
    e == null && (e = 1e-4);
    var i = new Uint32Array(t.buffer),
        n = {
            i0: 0,
            i1: t.length,
            bst: null,
            est: null,
            tdst: 0,
            left: null,
            right: null
        };
    n.bst = it.quantize.stats(t, n.i0, n.i1), n.est = it.quantize.estats(n.bst);
    for (var a = [n]; a.length < r;) {
        for (var o = 0, s = 0, l = 0; l < a.length; l++) a[l].est.L > o && (o = a[l].est.L, s = l);
        if (o < e) break;
        var c = a[s],
            u = it.quantize.splitPixels(t, i, c.i0, c.i1, c.est.e, c.est.eMq255),
            h = c.i0 >= u || c.i1 <= u;
        if (h) {
            c.est.L = 0;
            continue;
        }
        var d = {
            i0: c.i0,
            i1: u,
            bst: null,
            est: null,
            tdst: 0,
            left: null,
            right: null
        };
        d.bst = it.quantize.stats(t, d.i0, d.i1), d.est = it.quantize.estats(d.bst);
        var f = {
            i0: u,
            i1: c.i1,
            bst: null,
            est: null,
            tdst: 0,
            left: null,
            right: null
        };
        f.bst = {
            R: [],
            m: [],
            N: c.bst.N - d.bst.N
        };
        for (var l = 0; l < 16; l++) f.bst.R[l] = c.bst.R[l] - d.bst.R[l];
        for (var l = 0; l < 4; l++) f.bst.m[l] = c.bst.m[l] - d.bst.m[l];
        f.est = it.quantize.estats(f.bst), c.left = d, c.right = f, a[s] = d, a.push(f);
    }
    a.sort(function(m, _) {
        return _.bst.N - m.bst.N;
    });
    for (var l = 0; l < a.length; l++) a[l].ind = l;
    return [n, a];
};
it.quantize.getNearest = function(t, r, e, i, n) {
    if (t.left == null) return t.tdst = it.quantize.dist(t.est.q, r, e, i, n), t;
    var a = it.quantize.planeDst(t.est, r, e, i, n),
        o = t.left,
        s = t.right;
    a > 0 && (o = t.right, s = t.left);
    var l = it.quantize.getNearest(o, r, e, i, n);
    if (l.tdst <= a * a) return l;
    var c = it.quantize.getNearest(s, r, e, i, n);
    return c.tdst < l.tdst ? c : l;
};
it.quantize.planeDst = function(t, r, e, i, n) {
    var a = t.e;
    return a[0] * r + a[1] * e + a[2] * i + a[3] * n - t.eMq;
};
it.quantize.dist = function(t, r, e, i, n) {
    var a = r - t[0],
        o = e - t[1],
        s = i - t[2],
        l = n - t[3];
    return a * a + o * o + s * s + l * l;
};
it.quantize.splitPixels = function(t, r, e, i, n, a) {
    var o = it.quantize.vecDot;
    i -= 4;
    for (var s = 0; e < i;) {
        for (; o(t, e, n) <= a;) e += 4;
        for (; o(t, i, n) > a;) i -= 4;
        if (e >= i) break;
        var l = r[e >> 2];
        r[e >> 2] = r[i >> 2], r[i >> 2] = l, e += 4, i -= 4;
    }
    for (; o(t, e, n) > a;) e -= 4;
    return e + 4;
};
it.quantize.vecDot = function(t, r, e) {
    return t[r] * e[0] + t[r + 1] * e[1] + t[r + 2] * e[2] + t[r + 3] * e[3];
};
it.quantize.stats = function(t, r, e) {
    for (var i = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], n = [0, 0, 0, 0], a = e - r >> 2, o = r; o < e; o += 4) {
        var s = t[o] * .00392156862745098,
            l = t[o + 1] * (1 / 255),
            c = t[o + 2] * (1 / 255),
            u = t[o + 3] * (1 / 255);
        n[0] += s, n[1] += l, n[2] += c, n[3] += u, i[0] += s * s, i[1] += s * l, i[2] += s * c, i[3] += s * u, i[5] += l * l, i[6] += l * c, i[7] += l * u, i[10] += c * c, i[11] += c * u, i[15] += u * u;
    }
    return i[4] = i[1], i[8] = i[2], i[9] = i[6], i[12] = i[3], i[13] = i[7], i[14] = i[11], {
        R: i,
        m: n,
        N: a
    };
};
it.quantize.estats = function(t) {
    var r = t.R,
        e = t.m,
        i = t.N,
        n = e[0],
        a = e[1],
        o = e[2],
        s = e[3],
        l = i == 0 ? 0 : 1 / i,
        c = [r[0] - n * n * l, r[1] - n * a * l, r[2] - n * o * l, r[3] - n * s * l, r[4] - a * n * l, r[5] - a * a * l, r[6] - a * o * l, r[7] - a * s * l, r[8] - o * n * l, r[9] - o * a * l, r[10] - o * o * l, r[11] - o * s * l, r[12] - s * n * l, r[13] - s * a * l, r[14] - s * o * l, r[15] - s * s * l],
        u = c,
        h = it.M4,
        d = [.5, .5, .5, .5],
        f = 0,
        m = 0;
    if (i != 0)
        for (var _ = 0; _ < 10 && (d = h.multVec(u, d), m = Math.sqrt(h.dot(d, d)), d = h.sml(1 / m, d), !(Math.abs(m - f) < 1e-9)); _++) f = m;
    var x = [n * l, a * l, o * l, s * l],
        g = h.dot(h.sml(255, x), d);
    return {
        Cov: c,
        q: x,
        e: d,
        L: f,
        eMq255: g,
        eMq: h.dot(d, x),
        rgba: (Math.round(255 * x[3]) << 24 | Math.round(255 * x[2]) << 16 | Math.round(255 * x[1]) << 8 | Math.round(255 * x[0]) << 0) >>> 0
    };
};
it.M4 = {
    multVec: function(t, r) {
        return [t[0] * r[0] + t[1] * r[1] + t[2] * r[2] + t[3] * r[3], t[4] * r[0] + t[5] * r[1] + t[6] * r[2] + t[7] * r[3], t[8] * r[0] + t[9] * r[1] + t[10] * r[2] + t[11] * r[3], t[12] * r[0] + t[13] * r[1] + t[14] * r[2] + t[15] * r[3]];
    },
    dot: function(t, r) {
        return t[0] * r[0] + t[1] * r[1] + t[2] * r[2] + t[3] * r[3];
    },
    sml: function(t, r) {
        return [t * r[0], t * r[1], t * r[2], t * r[3]];
    }
};
it.encode.concatRGBA = function(t) {
    for (var r = 0, e = 0; e < t.length; e++) r += t[e].byteLength;
    for (var i = new Uint8Array(r), n = 0, e = 0; e < t.length; e++) {
        for (var a = new Uint8Array(t[e]), o = a.length, s = 0; s < o; s += 4) {
            var l = a[s],
                c = a[s + 1],
                u = a[s + 2],
                h = a[s + 3];
            h == 0 && (l = c = u = 0), i[n + s] = l, i[n + s + 1] = c, i[n + s + 2] = u, i[n + s + 3] = h;
        }
        n += o;
    }
    return i.buffer;
};
var pv = it;
var FO = function(t) {
        if (t === 0) return iu.Greyscale;
        if (t === 2) return iu.Truecolour;
        if (t === 3) return iu.IndexedColour;
        if (t === 4) return iu.GreyscaleWithAlpha;
        if (t === 6) return iu.TruecolourWithAlpha;
        throw new Error("Unknown color type: " + t);
    },
    EO = function(t) {
        for (var r = Math.floor(t.length / 4), e = new Uint8Array(r * 3), i = new Uint8Array(r * 1), n = 0, a = 0, o = 0; n < t.length;) e[a++] = t[n++], e[a++] = t[n++], e[a++] = t[n++], i[o++] = t[n++];
        return {
            rgbChannel: e,
            alphaChannel: i
        };
    },
    iu = function(t) {
        return t.Greyscale = "Greyscale", t.Truecolour = "Truecolour", t.IndexedColour = "IndexedColour", t.GreyscaleWithAlpha = "GreyscaleWithAlpha", t.TruecolourWithAlpha = "TruecolourWithAlpha", t;
    }(iu || {}),
    RS = function() {
        function t(r) {
            var e = pv.decode(r),
                i = pv.toRGBA8(e);
            if (i.length > 1) throw new Error("Animated PNGs are not supported");
            var n = new Uint8Array(i[0]),
                a = EO(n),
                o = a.rgbChannel,
                s = a.alphaChannel;
            this.rgbChannel = o;
            var l = s.some(function(c) {
                return c < 255;
            });
            l && (this.alphaChannel = s), this.type = FO(e.ctype), this.width = e.width, this.height = e.height, this.bitsPerComponent = 8;
        }
        return t.load = function(r) {
            return new t(r);
        }, t;
    }();
var PO = function() {
        function t(r) {
            this.image = r, this.bitsPerComponent = r.bitsPerComponent, this.width = r.width, this.height = r.height, this.colorSpace = "DeviceRGB";
        }
        return t.for = function(r) {
            return Rt(this, void 0, void 0, function() {
                var e;
                return Mt(this, function(i) {
                    return e = RS.load(r), [2, new t(e)];
                });
            });
        }, t.prototype.embedIntoContext = function(r, e) {
            return Rt(this, void 0, void 0, function() {
                var i, n;
                return Mt(this, function(a) {
                    return i = this.embedAlphaChannel(r), n = r.flateStream(this.image.rgbChannel, {
                        Type: "XObject",
                        Subtype: "Image",
                        BitsPerComponent: this.image.bitsPerComponent,
                        Width: this.image.width,
                        Height: this.image.height,
                        ColorSpace: this.colorSpace,
                        SMask: i
                    }), e ? (r.assign(e, n), [2, e]) : [2, r.register(n)];
                });
            });
        }, t.prototype.embedAlphaChannel = function(r) {
            if (this.image.alphaChannel) {
                var e = r.flateStream(this.image.alphaChannel, {
                    Type: "XObject",
                    Subtype: "Image",
                    Height: this.image.height,
                    Width: this.image.width,
                    BitsPerComponent: this.image.bitsPerComponent,
                    ColorSpace: "DeviceGray",
                    Decode: [0, 1]
                });
                return r.register(e);
            }
        }, t;
    }(),
    Kf = PO;
var IO = function() {
        function t(r, e, i) {
            this.bytes = r, this.start = e || 0, this.pos = this.start, this.end = e && i ? e + i : this.bytes.length;
        }
        return Object.defineProperty(t.prototype, "length", {
            get: function() {
                return this.end - this.start;
            },
            enumerable: !1,
            configurable: !0
        }), Object.defineProperty(t.prototype, "isEmpty", {
            get: function() {
                return this.length === 0;
            },
            enumerable: !1,
            configurable: !0
        }), t.prototype.getByte = function() {
            return this.pos >= this.end ? -1 : this.bytes[this.pos++];
        }, t.prototype.getUint16 = function() {
            var r = this.getByte(),
                e = this.getByte();
            return r === -1 || e === -1 ? -1 : (r << 8) + e;
        }, t.prototype.getInt32 = function() {
            var r = this.getByte(),
                e = this.getByte(),
                i = this.getByte(),
                n = this.getByte();
            return (r << 24) + (e << 16) + (i << 8) + n;
        }, t.prototype.getBytes = function(r, e) {
            e === void 0 && (e = !1);
            var i = this.bytes,
                n = this.pos,
                a = this.end;
            if (r) {
                var s = n + r;
                s > a && (s = a), this.pos = s;
                var o = i.subarray(n, s);
                return e ? new Uint8ClampedArray(o) : o;
            } else {
                var o = i.subarray(n, a);
                return e ? new Uint8ClampedArray(o) : o;
            }
        }, t.prototype.peekByte = function() {
            var r = this.getByte();
            return this.pos--, r;
        }, t.prototype.peekBytes = function(r, e) {
            e === void 0 && (e = !1);
            var i = this.getBytes(r, e);
            return this.pos -= i.length, i;
        }, t.prototype.skip = function(r) {
            r || (r = 1), this.pos += r;
        }, t.prototype.reset = function() {
            this.pos = this.start;
        }, t.prototype.moveStart = function() {
            this.start = this.pos;
        }, t.prototype.makeSubStream = function(r, e) {
            return new t(this.bytes, r, e);
        }, t.prototype.decode = function() {
            return this.bytes;
        }, t;
    }(),
    a1 = IO;
var OO = new Uint8Array(0),
    NO = function() {
        function t(r) {
            if (this.pos = 0, this.bufferLength = 0, this.eof = !1, this.buffer = OO, this.minBufferLength = 512, r)
                for (; this.minBufferLength < r;) this.minBufferLength *= 2;
        }
        return Object.defineProperty(t.prototype, "isEmpty", {
            get: function() {
                for (; !this.eof && this.bufferLength === 0;) this.readBlock();
                return this.bufferLength === 0;
            },
            enumerable: !1,
            configurable: !0
        }), t.prototype.getByte = function() {
            for (var r = this.pos; this.bufferLength <= r;) {
                if (this.eof) return -1;
                this.readBlock();
            }
            return this.buffer[this.pos++];
        }, t.prototype.getUint16 = function() {
            var r = this.getByte(),
                e = this.getByte();
            return r === -1 || e === -1 ? -1 : (r << 8) + e;
        }, t.prototype.getInt32 = function() {
            var r = this.getByte(),
                e = this.getByte(),
                i = this.getByte(),
                n = this.getByte();
            return (r << 24) + (e << 16) + (i << 8) + n;
        }, t.prototype.getBytes = function(r, e) {
            e === void 0 && (e = !1);
            var i, n = this.pos;
            if (r) {
                for (this.ensureBuffer(n + r), i = n + r; !this.eof && this.bufferLength < i;) this.readBlock();
                var a = this.bufferLength;
                i > a && (i = a);
            } else {
                for (; !this.eof;) this.readBlock();
                i = this.bufferLength;
            }
            this.pos = i;
            var o = this.buffer.subarray(n, i);
            return e && !(o instanceof Uint8ClampedArray) ? new Uint8ClampedArray(o) : o;
        }, t.prototype.peekByte = function() {
            var r = this.getByte();
            return this.pos--, r;
        }, t.prototype.peekBytes = function(r, e) {
            e === void 0 && (e = !1);
            var i = this.getBytes(r, e);
            return this.pos -= i.length, i;
        }, t.prototype.skip = function(r) {
            r || (r = 1), this.pos += r;
        }, t.prototype.reset = function() {
            this.pos = 0;
        }, t.prototype.makeSubStream = function(r, e) {
            for (var i = r + e; this.bufferLength <= i && !this.eof;) this.readBlock();
            return new a1(this.buffer, r, e);
        }, t.prototype.decode = function() {
            for (; !this.eof;) this.readBlock();
            return this.buffer.subarray(0, this.bufferLength);
        }, t.prototype.readBlock = function() {
            throw new jn(this.constructor.name, "readBlock");
        }, t.prototype.ensureBuffer = function(r) {
            var e = this.buffer;
            if (r <= e.byteLength) return e;
            for (var i = this.minBufferLength; i < r;) i *= 2;
            var n = new Uint8Array(i);
            return n.set(e), this.buffer = n;
        }, t;
    }(),
    ps = NO;
var MS = function(t) {
        return t === 32 || t === 9 || t === 13 || t === 10;
    },
    LO = function(t) {
        Ge(r, t);

        function r(e, i) {
            var n = t.call(this, i) || this;
            return n.stream = e, n.input = new Uint8Array(5), i && (i = .8 * i), n;
        }
        return r.prototype.readBlock = function() {
            for (var e = 126, i = 122, n = -1, a = this.stream, o = a.getByte(); MS(o);) o = a.getByte();
            if (o === n || o === e) {
                this.eof = !0;
                return;
            }
            var s = this.bufferLength,
                l, c;
            if (o === i) {
                for (l = this.ensureBuffer(s + 4), c = 0; c < 4; ++c) l[s + c] = 0;
                this.bufferLength += 4;
            } else {
                var u = this.input;
                for (u[0] = o, c = 1; c < 5; ++c) {
                    for (o = a.getByte(); MS(o);) o = a.getByte();
                    if (u[c] = o, o === n || o === e) break;
                }
                if (l = this.ensureBuffer(s + c - 1), this.bufferLength += c - 1, c < 5) {
                    for (; c < 5; ++c) u[c] = 117;
                    this.eof = !0;
                }
                var h = 0;
                for (c = 0; c < 5; ++c) h = h * 85 + (u[c] - 33);
                for (c = 3; c >= 0; --c) l[s + c] = h & 255, h >>= 8;
            }
        }, r;
    }(ps),
    BS = LO;
var RO = function(t) {
        Ge(r, t);

        function r(e, i) {
            var n = t.call(this, i) || this;
            return n.stream = e, n.firstDigit = -1, i && (i = .5 * i), n;
        }
        return r.prototype.readBlock = function() {
            var e = 8e3,
                i = this.stream.getBytes(e);
            if (!i.length) {
                this.eof = !0;
                return;
            }
            for (var n = i.length + 1 >> 1, a = this.ensureBuffer(this.bufferLength + n), o = this.bufferLength, s = this.firstDigit, l = 0, c = i.length; l < c; l++) {
                var u = i[l],
                    h = void 0;
                if (u >= 48 && u <= 57) h = u & 15;
                else if (u >= 65 && u <= 70 || u >= 97 && u <= 102) h = (u & 15) + 9;
                else if (u === 62) {
                    this.eof = !0;
                    break;
                } else continue;
                s < 0 ? s = h : (a[o++] = s << 4 | h, s = -1);
            }
            s >= 0 && this.eof && (a[o++] = s << 4, s = -1), this.firstDigit = s, this.bufferLength = o;
        }, r;
    }(ps),
    US = RO;
var VS = new Int32Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]),
    MO = new Int32Array([3, 4, 5, 6, 7, 8, 9, 10, 65547, 65549, 65551, 65553, 131091, 131095, 131099, 131103, 196643, 196651, 196659, 196667, 262211, 262227, 262243, 262259, 327811, 327843, 327875, 327907, 258, 258, 258]),
    BO = new Int32Array([1, 2, 3, 4, 65541, 65543, 131081, 131085, 196625, 196633, 262177, 262193, 327745, 327777, 393345, 393409, 459009, 459137, 524801, 525057, 590849, 591361, 657409, 658433, 724993, 727041, 794625, 798721, 868353, 876545]),
    UO = [new Int32Array([459008, 524368, 524304, 524568, 459024, 524400, 524336, 590016, 459016, 524384, 524320, 589984, 524288, 524416, 524352, 590048, 459012, 524376, 524312, 589968, 459028, 524408, 524344, 590032, 459020, 524392, 524328, 59e4, 524296, 524424, 524360, 590064, 459010, 524372, 524308, 524572, 459026, 524404, 524340, 590024, 459018, 524388, 524324, 589992, 524292, 524420, 524356, 590056, 459014, 524380, 524316, 589976, 459030, 524412, 524348, 590040, 459022, 524396, 524332, 590008, 524300, 524428, 524364, 590072, 459009, 524370, 524306, 524570, 459025, 524402, 524338, 590020, 459017, 524386, 524322, 589988, 524290, 524418, 524354, 590052, 459013, 524378, 524314, 589972, 459029, 524410, 524346, 590036, 459021, 524394, 524330, 590004, 524298, 524426, 524362, 590068, 459011, 524374, 524310, 524574, 459027, 524406, 524342, 590028, 459019, 524390, 524326, 589996, 524294, 524422, 524358, 590060, 459015, 524382, 524318, 589980, 459031, 524414, 524350, 590044, 459023, 524398, 524334, 590012, 524302, 524430, 524366, 590076, 459008, 524369, 524305, 524569, 459024, 524401, 524337, 590018, 459016, 524385, 524321, 589986, 524289, 524417, 524353, 590050, 459012, 524377, 524313, 589970, 459028, 524409, 524345, 590034, 459020, 524393, 524329, 590002, 524297, 524425, 524361, 590066, 459010, 524373, 524309, 524573, 459026, 524405, 524341, 590026, 459018, 524389, 524325, 589994, 524293, 524421, 524357, 590058, 459014, 524381, 524317, 589978, 459030, 524413, 524349, 590042, 459022, 524397, 524333, 590010, 524301, 524429, 524365, 590074, 459009, 524371, 524307, 524571, 459025, 524403, 524339, 590022, 459017, 524387, 524323, 589990, 524291, 524419, 524355, 590054, 459013, 524379, 524315, 589974, 459029, 524411, 524347, 590038, 459021, 524395, 524331, 590006, 524299, 524427, 524363, 590070, 459011, 524375, 524311, 524575, 459027, 524407, 524343, 590030, 459019, 524391, 524327, 589998, 524295, 524423, 524359, 590062, 459015, 524383, 524319, 589982, 459031, 524415, 524351, 590046, 459023, 524399, 524335, 590014, 524303, 524431, 524367, 590078, 459008, 524368, 524304, 524568, 459024, 524400, 524336, 590017, 459016, 524384, 524320, 589985, 524288, 524416, 524352, 590049, 459012, 524376, 524312, 589969, 459028, 524408, 524344, 590033, 459020, 524392, 524328, 590001, 524296, 524424, 524360, 590065, 459010, 524372, 524308, 524572, 459026, 524404, 524340, 590025, 459018, 524388, 524324, 589993, 524292, 524420, 524356, 590057, 459014, 524380, 524316, 589977, 459030, 524412, 524348, 590041, 459022, 524396, 524332, 590009, 524300, 524428, 524364, 590073, 459009, 524370, 524306, 524570, 459025, 524402, 524338, 590021, 459017, 524386, 524322, 589989, 524290, 524418, 524354, 590053, 459013, 524378, 524314, 589973, 459029, 524410, 524346, 590037, 459021, 524394, 524330, 590005, 524298, 524426, 524362, 590069, 459011, 524374, 524310, 524574, 459027, 524406, 524342, 590029, 459019, 524390, 524326, 589997, 524294, 524422, 524358, 590061, 459015, 524382, 524318, 589981, 459031, 524414, 524350, 590045, 459023, 524398, 524334, 590013, 524302, 524430, 524366, 590077, 459008, 524369, 524305, 524569, 459024, 524401, 524337, 590019, 459016, 524385, 524321, 589987, 524289, 524417, 524353, 590051, 459012, 524377, 524313, 589971, 459028, 524409, 524345, 590035, 459020, 524393, 524329, 590003, 524297, 524425, 524361, 590067, 459010, 524373, 524309, 524573, 459026, 524405, 524341, 590027, 459018, 524389, 524325, 589995, 524293, 524421, 524357, 590059, 459014, 524381, 524317, 589979, 459030, 524413, 524349, 590043, 459022, 524397, 524333, 590011, 524301, 524429, 524365, 590075, 459009, 524371, 524307, 524571, 459025, 524403, 524339, 590023, 459017, 524387, 524323, 589991, 524291, 524419, 524355, 590055, 459013, 524379, 524315, 589975, 459029, 524411, 524347, 590039, 459021, 524395, 524331, 590007, 524299, 524427, 524363, 590071, 459011, 524375, 524311, 524575, 459027, 524407, 524343, 590031, 459019, 524391, 524327, 589999, 524295, 524423, 524359, 590063, 459015, 524383, 524319, 589983, 459031, 524415, 524351, 590047, 459023, 524399, 524335, 590015, 524303, 524431, 524367, 590079]), 9],
    VO = [new Int32Array([327680, 327696, 327688, 327704, 327684, 327700, 327692, 327708, 327682, 327698, 327690, 327706, 327686, 327702, 327694, 0, 327681, 327697, 327689, 327705, 327685, 327701, 327693, 327709, 327683, 327699, 327691, 327707, 327687, 327703, 327695, 0]), 5],
    zO = function(t) {
        Ge(r, t);

        function r(e, i) {
            var n = t.call(this, i) || this;
            n.stream = e;
            var a = e.getByte(),
                o = e.getByte();
            if (a === -1 || o === -1) throw new Error("Invalid header in flate stream: " + a + ", " + o);
            if ((a & 15) !== 8) throw new Error("Unknown compression method in flate stream: " + a + ", " + o);
            if (((a << 8) + o) % 31 !== 0) throw new Error("Bad FCHECK in flate stream: " + a + ", " + o);
            if (o & 32) throw new Error("FDICT bit set in flate stream: " + a + ", " + o);
            return n.codeSize = 0, n.codeBuf = 0, n;
        }
        return r.prototype.readBlock = function() {
            var e, i, n = this.stream,
                a = this.getBits(3);
            if (a & 1 && (this.eof = !0), a >>= 1, a === 0) {
                var o = void 0;
                if ((o = n.getByte()) === -1) throw new Error("Bad block header in flate stream");
                var s = o;
                if ((o = n.getByte()) === -1) throw new Error("Bad block header in flate stream");
                if (s |= o << 8, (o = n.getByte()) === -1) throw new Error("Bad block header in flate stream");
                var l = o;
                if ((o = n.getByte()) === -1) throw new Error("Bad block header in flate stream");
                if (l |= o << 8, l !== (~s & 65535) && (s !== 0 || l !== 0)) throw new Error("Bad uncompressed block length in flate stream");
                this.codeBuf = 0, this.codeSize = 0;
                var c = this.bufferLength;
                e = this.ensureBuffer(c + s);
                var u = c + s;
                if (this.bufferLength = u, s === 0) n.peekByte() === -1 && (this.eof = !0);
                else
                    for (var h = c; h < u; ++h) {
                        if ((o = n.getByte()) === -1) {
                            this.eof = !0;
                            break;
                        }
                        e[h] = o;
                    }
                return;
            }
            var d, f;
            if (a === 1) d = UO, f = VO;
            else if (a === 2) {
                var m = this.getBits(5) + 257,
                    _ = this.getBits(5) + 1,
                    x = this.getBits(4) + 4,
                    g = new Uint8Array(VS.length),
                    b = void 0;
                for (b = 0; b < x; ++b) g[VS[b]] = this.getBits(3);
                var w = this.generateHuffmanTable(g);
                i = 0, b = 0;
                for (var T = m + _, E = new Uint8Array(T), L = void 0, P = void 0, k = void 0; b < T;) {
                    var A = this.getCode(w);
                    if (A === 16) L = 2, P = 3, k = i;
                    else if (A === 17) L = 3, P = 3, k = i = 0;
                    else if (A === 18) L = 7, P = 11, k = i = 0;
                    else {
                        E[b++] = i = A;
                        continue;
                    }
                    for (var N = this.getBits(L) + P; N-- > 0;) E[b++] = k;
                }
                d = this.generateHuffmanTable(E.subarray(0, m)), f = this.generateHuffmanTable(E.subarray(m, T));
            } else throw new Error("Unknown block type in flate stream");
            e = this.buffer;
            for (var C = e ? e.length : 0, F = this.bufferLength;;) {
                var W = this.getCode(d);
                if (W < 256) {
                    F + 1 >= C && (e = this.ensureBuffer(F + 1), C = e.length), e[F++] = W;
                    continue;
                }
                if (W === 256) {
                    this.bufferLength = F;
                    return;
                }
                W -= 257, W = MO[W];
                var I = W >> 16;
                I > 0 && (I = this.getBits(I)), i = (W & 65535) + I, W = this.getCode(f), W = BO[W], I = W >> 16, I > 0 && (I = this.getBits(I));
                var U = (W & 65535) + I;
                F + i >= C && (e = this.ensureBuffer(F + i), C = e.length);
                for (var le = 0; le < i; ++le, ++F) e[F] = e[F - U];
            }
        }, r.prototype.getBits = function(e) {
            for (var i = this.stream, n = this.codeSize, a = this.codeBuf, o; n < e;) {
                if ((o = i.getByte()) === -1) throw new Error("Bad encoding in flate stream");
                a |= o << n, n += 8;
            }
            return o = a & (1 << e) - 1, this.codeBuf = a >> e, this.codeSize = n -= e, o;
        }, r.prototype.getCode = function(e) {
            for (var i = this.stream, n = e[0], a = e[1], o = this.codeSize, s = this.codeBuf, l; o < a && (l = i.getByte()) !== -1;) s |= l << o, o += 8;
            var c = n[s & (1 << a) - 1];
            typeof n == "number" && console.log("FLATE:", c);
            var u = c >> 16,
                h = c & 65535;
            if (u < 1 || o < u) throw new Error("Bad encoding in flate stream");
            return this.codeBuf = s >> u, this.codeSize = o - u, h;
        }, r.prototype.generateHuffmanTable = function(e) {
            var i = e.length,
                n = 0,
                a;
            for (a = 0; a < i; ++a) e[a] > n && (n = e[a]);
            for (var o = 1 << n, s = new Int32Array(o), l = 1, c = 0, u = 2; l <= n; ++l, c <<= 1, u <<= 1)
                for (var h = 0; h < i; ++h)
                    if (e[h] === l) {
                        var d = 0,
                            f = c;
                        for (a = 0; a < l; ++a) d = d << 1 | f & 1, f >>= 1;
                        for (a = d; a < o; a += u) s[a] = l << 16 | h;
                        ++c;
                    }
            return [s, n];
        }, r;
    }(ps),
    zS = zO;
var WO = function(t) {
        Ge(r, t);

        function r(e, i, n) {
            var a = t.call(this, i) || this;
            a.stream = e, a.cachedData = 0, a.bitsCached = 0;
            for (var o = 4096, s = {
                    earlyChange: n,
                    codeLength: 9,
                    nextCode: 258,
                    dictionaryValues: new Uint8Array(o),
                    dictionaryLengths: new Uint16Array(o),
                    dictionaryPrevCodes: new Uint16Array(o),
                    currentSequence: new Uint8Array(o),
                    currentSequenceLength: 0
                }, l = 0; l < 256; ++l) s.dictionaryValues[l] = l, s.dictionaryLengths[l] = 1;
            return a.lzwState = s, a;
        }
        return r.prototype.readBlock = function() {
            var e = 512,
                i = e * 2,
                n = e,
                a, o, s, l = this.lzwState;
            if (l) {
                var c = l.earlyChange,
                    u = l.nextCode,
                    h = l.dictionaryValues,
                    d = l.dictionaryLengths,
                    f = l.dictionaryPrevCodes,
                    m = l.codeLength,
                    _ = l.prevCode,
                    x = l.currentSequence,
                    g = l.currentSequenceLength,
                    b = 0,
                    w = this.bufferLength,
                    T = this.ensureBuffer(this.bufferLength + i);
                for (a = 0; a < e; a++) {
                    var E = this.readBits(m),
                        L = g > 0;
                    if (!E || E < 256) x[0] = E, g = 1;
                    else if (E >= 258) {
                        if (E < u)
                            for (g = d[E], o = g - 1, s = E; o >= 0; o--) x[o] = h[s], s = f[s];
                        else x[g++] = x[0];
                    } else if (E === 256) {
                        m = 9, u = 258, g = 0;
                        continue;
                    } else {
                        this.eof = !0, delete this.lzwState;
                        break;
                    }
                    if (L && (f[u] = _, d[u] = d[_] + 1, h[u] = x[0], u++, m = u + c & u + c - 1 ? m : Math.min(Math.log(u + c) / .6931471805599453 + 1, 12) | 0), _ = E, b += g, i < b) {
                        do i += n; while (i < b);
                        T = this.ensureBuffer(this.bufferLength + i);
                    }
                    for (o = 0; o < g; o++) T[w++] = x[o];
                }
                l.nextCode = u, l.codeLength = m, l.prevCode = _, l.currentSequenceLength = g, this.bufferLength = w;
            }
        }, r.prototype.readBits = function(e) {
            for (var i = this.bitsCached, n = this.cachedData; i < e;) {
                var a = this.stream.getByte();
                if (a === -1) return this.eof = !0, null;
                n = n << 8 | a, i += 8;
            }
            return this.bitsCached = i -= e, this.cachedData = n, n >>> i & (1 << e) - 1;
        }, r;
    }(ps),
    WS = WO;
var jO = function(t) {
        Ge(r, t);

        function r(e, i) {
            var n = t.call(this, i) || this;
            return n.stream = e, n;
        }
        return r.prototype.readBlock = function() {
            var e = this.stream.getBytes(2);
            if (!e || e.length < 2 || e[0] === 128) {
                this.eof = !0;
                return;
            }
            var i, n = this.bufferLength,
                a = e[0];
            if (a < 128) {
                if (i = this.ensureBuffer(n + a + 1), i[n++] = e[1], a > 0) {
                    var o = this.stream.getBytes(a);
                    i.set(o, n), n += a;
                }
            } else {
                a = 257 - a;
                var s = e[1];
                i = this.ensureBuffer(n + a + 1);
                for (var l = 0; l < a; l++) i[n++] = s;
            }
            this.bufferLength = n;
        }, r;
    }(ps),
    jS = jO;
var HS = function(t, r, e) {
        if (r === K.of("FlateDecode")) return new zS(t);
        if (r === K.of("LZWDecode")) {
            var i = 1;
            if (e instanceof At) {
                var n = e.lookup(K.of("EarlyChange"));
                n instanceof wt && (i = n.asNumber());
            }
            return new WS(t, void 0, i);
        }
        if (r === K.of("ASCII85Decode")) return new BS(t);
        if (r === K.of("ASCIIHexDecode")) return new US(t);
        if (r === K.of("RunLengthDecode")) return new jS(t);
        throw new lS(r.asString());
    },
    Yf = function(t) {
        var r = t.dict,
            e = t.contents,
            i = new a1(e),
            n = r.lookup(K.of("Filter")),
            a = r.lookup(K.of("DecodeParms"));
        if (n instanceof K) i = HS(i, n, a);
        else if (n instanceof $t)
            for (var o = 0, s = n.size(); o < s; o++) i = HS(i, n.lookup(o, K), a && a.lookupMaybe(o, At));
        else if (n) throw new Hc([K, $t], n);
        return i;
    };
var HO = function(t) {
        var r = t.MediaBox(),
            e = r.lookup(2, wt).asNumber() - r.lookup(0, wt).asNumber(),
            i = r.lookup(3, wt).asNumber() - r.lookup(1, wt).asNumber();
        return {
            left: 0,
            bottom: 0,
            right: e,
            top: i
        };
    },
    GO = function(t) {
        return [1, 0, 0, 1, -t.left, -t.bottom];
    },
    qO = function() {
        function t(r, e, i) {
            this.page = r;
            var n = e ? ? HO(r);
            this.width = n.right - n.left, this.height = n.top - n.bottom, this.boundingBox = n, this.transformationMatrix = i ? ? GO(n);
        }
        return t.for = function(r, e, i) {
            return Rt(this, void 0, void 0, function() {
                return Mt(this, function(n) {
                    return [2, new t(r, e, i)];
                });
            });
        }, t.prototype.embedIntoContext = function(r, e) {
            return Rt(this, void 0, void 0, function() {
                var i, n, a, o, s, l, c, u, h, d;
                return Mt(this, function(f) {
                    if (i = this.page.normalizedEntries(), n = i.Contents, a = i.Resources, !n) throw new cS();
                    return o = this.decodeContents(n), s = this.boundingBox, l = s.left, c = s.bottom, u = s.right, h = s.top, d = r.flateStream(o, {
                        Type: "XObject",
                        Subtype: "Form",
                        FormType: 1,
                        BBox: [l, c, u, h],
                        Matrix: this.transformationMatrix,
                        Resources: a
                    }), e ? (r.assign(e, d), [2, e]) : [2, r.register(d)];
                });
            });
        }, t.prototype.decodeContents = function(r) {
            for (var e = Uint8Array.of(ie.Newline), i = [], n = 0, a = r.size(); n < a; n++) {
                var o = r.lookup(n, Fi),
                    s = void 0;
                if (o instanceof ds) s = Yf(o).decode();
                else if (o instanceof Js) s = o.getUnencodedContents();
                else throw new uS(o);
                i.push(s, e);
            }
            return C5.apply(void 0, i);
        }, t;
    }(),
    Zf = qO;
var o1 = function(t, r) {
        if (t !== void 0) return r[t];
    },
    Jf = function(t) {
        return t.UseNone = "UseNone", t.UseOutlines = "UseOutlines", t.UseThumbs = "UseThumbs", t.UseOC = "UseOC", t;
    }(Jf || {}),
    Qf = function(t) {
        return t.L2R = "L2R", t.R2L = "R2L", t;
    }(Qf || {}),
    $f = function(t) {
        return t.None = "None", t.AppDefault = "AppDefault", t;
    }($f || {}),
    s1 = function(t) {
        return t.Simplex = "Simplex", t.DuplexFlipShortEdge = "DuplexFlipShortEdge", t.DuplexFlipLongEdge = "DuplexFlipLongEdge", t;
    }(s1 || {}),
    XO = function() {
        function t(r) {
            this.dict = r;
        }
        return t.prototype.lookupBool = function(r) {
            var e = this.dict.lookup(K.of(r));
            if (e instanceof Zs) return e;
        }, t.prototype.lookupName = function(r) {
            var e = this.dict.lookup(K.of(r));
            if (e instanceof K) return e;
        }, t.prototype.HideToolbar = function() {
            return this.lookupBool("HideToolbar");
        }, t.prototype.HideMenubar = function() {
            return this.lookupBool("HideMenubar");
        }, t.prototype.HideWindowUI = function() {
            return this.lookupBool("HideWindowUI");
        }, t.prototype.FitWindow = function() {
            return this.lookupBool("FitWindow");
        }, t.prototype.CenterWindow = function() {
            return this.lookupBool("CenterWindow");
        }, t.prototype.DisplayDocTitle = function() {
            return this.lookupBool("DisplayDocTitle");
        }, t.prototype.NonFullScreenPageMode = function() {
            return this.lookupName("NonFullScreenPageMode");
        }, t.prototype.Direction = function() {
            return this.lookupName("Direction");
        }, t.prototype.PrintScaling = function() {
            return this.lookupName("PrintScaling");
        }, t.prototype.Duplex = function() {
            return this.lookupName("Duplex");
        }, t.prototype.PickTrayByPDFSize = function() {
            return this.lookupBool("PickTrayByPDFSize");
        }, t.prototype.PrintPageRange = function() {
            var r = this.dict.lookup(K.of("PrintPageRange"));
            if (r instanceof $t) return r;
        }, t.prototype.NumCopies = function() {
            var r = this.dict.lookup(K.of("NumCopies"));
            if (r instanceof wt) return r;
        }, t.prototype.getHideToolbar = function() {
            var r, e;
            return (e = (r = this.HideToolbar()) === null || r === void 0 ? void 0 : r.asBoolean()) !== null && e !== void 0 ? e : !1;
        }, t.prototype.getHideMenubar = function() {
            var r, e;
            return (e = (r = this.HideMenubar()) === null || r === void 0 ? void 0 : r.asBoolean()) !== null && e !== void 0 ? e : !1;
        }, t.prototype.getHideWindowUI = function() {
            var r, e;
            return (e = (r = this.HideWindowUI()) === null || r === void 0 ? void 0 : r.asBoolean()) !== null && e !== void 0 ? e : !1;
        }, t.prototype.getFitWindow = function() {
            var r, e;
            return (e = (r = this.FitWindow()) === null || r === void 0 ? void 0 : r.asBoolean()) !== null && e !== void 0 ? e : !1;
        }, t.prototype.getCenterWindow = function() {
            var r, e;
            return (e = (r = this.CenterWindow()) === null || r === void 0 ? void 0 : r.asBoolean()) !== null && e !== void 0 ? e : !1;
        }, t.prototype.getDisplayDocTitle = function() {
            var r, e;
            return (e = (r = this.DisplayDocTitle()) === null || r === void 0 ? void 0 : r.asBoolean()) !== null && e !== void 0 ? e : !1;
        }, t.prototype.getNonFullScreenPageMode = function() {
            var r, e, i = (r = this.NonFullScreenPageMode()) === null || r === void 0 ? void 0 : r.decodeText();
            return (e = o1(i, Jf)) !== null && e !== void 0 ? e : Jf.UseNone;
        }, t.prototype.getReadingDirection = function() {
            var r, e, i = (r = this.Direction()) === null || r === void 0 ? void 0 : r.decodeText();
            return (e = o1(i, Qf)) !== null && e !== void 0 ? e : Qf.L2R;
        }, t.prototype.getPrintScaling = function() {
            var r, e, i = (r = this.PrintScaling()) === null || r === void 0 ? void 0 : r.decodeText();
            return (e = o1(i, $f)) !== null && e !== void 0 ? e : $f.AppDefault;
        }, t.prototype.getDuplex = function() {
            var r, e = (r = this.Duplex()) === null || r === void 0 ? void 0 : r.decodeText();
            return o1(e, s1);
        }, t.prototype.getPickTrayByPDFSize = function() {
            var r;
            return (r = this.PickTrayByPDFSize()) === null || r === void 0 ? void 0 : r.asBoolean();
        }, t.prototype.getPrintPageRange = function() {
            var r = this.PrintPageRange();
            if (!r) return [];
            for (var e = [], i = 0; i < r.size(); i += 2) {
                var n = r.lookup(i, wt).asNumber(),
                    a = r.lookup(i + 1, wt).asNumber();
                e.push({
                    start: n,
                    end: a
                });
            }
            return e;
        }, t.prototype.getNumCopies = function() {
            var r, e;
            return (e = (r = this.NumCopies()) === null || r === void 0 ? void 0 : r.asNumber()) !== null && e !== void 0 ? e : 1;
        }, t.prototype.setHideToolbar = function(r) {
            var e = this.dict.context.obj(r);
            this.dict.set(K.of("HideToolbar"), e);
        }, t.prototype.setHideMenubar = function(r) {
            var e = this.dict.context.obj(r);
            this.dict.set(K.of("HideMenubar"), e);
        }, t.prototype.setHideWindowUI = function(r) {
            var e = this.dict.context.obj(r);
            this.dict.set(K.of("HideWindowUI"), e);
        }, t.prototype.setFitWindow = function(r) {
            var e = this.dict.context.obj(r);
            this.dict.set(K.of("FitWindow"), e);
        }, t.prototype.setCenterWindow = function(r) {
            var e = this.dict.context.obj(r);
            this.dict.set(K.of("CenterWindow"), e);
        }, t.prototype.setDisplayDocTitle = function(r) {
            var e = this.dict.context.obj(r);
            this.dict.set(K.of("DisplayDocTitle"), e);
        }, t.prototype.setNonFullScreenPageMode = function(r) {
            Uo(r, "nonFullScreenPageMode", Jf);
            var e = K.of(r);
            this.dict.set(K.of("NonFullScreenPageMode"), e);
        }, t.prototype.setReadingDirection = function(r) {
            Uo(r, "readingDirection", Qf);
            var e = K.of(r);
            this.dict.set(K.of("Direction"), e);
        }, t.prototype.setPrintScaling = function(r) {
            Uo(r, "printScaling", $f);
            var e = K.of(r);
            this.dict.set(K.of("PrintScaling"), e);
        }, t.prototype.setDuplex = function(r) {
            Uo(r, "duplex", s1);
            var e = K.of(r);
            this.dict.set(K.of("Duplex"), e);
        }, t.prototype.setPickTrayByPDFSize = function(r) {
            var e = this.dict.context.obj(r);
            this.dict.set(K.of("PickTrayByPDFSize"), e);
        }, t.prototype.setPrintPageRange = function(r) {
            Array.isArray(r) || (r = [r]);
            for (var e = [], i = 0, n = r.length; i < n; i++) e.push(r[i].start), e.push(r[i].end);
            Jp(e, "printPageRange", ["number"]);
            var a = this.dict.context.obj(e);
            this.dict.set(K.of("PrintPageRange"), a);
        }, t.prototype.setNumCopies = function(r) {
            aa(r, "numCopies", 1, Number.MAX_VALUE), sS(r, "numCopies");
            var e = this.dict.context.obj(r);
            this.dict.set(K.of("NumCopies"), e);
        }, t.fromDict = function(r) {
            return new t(r);
        }, t.create = function(r) {
            var e = r.obj({});
            return new t(e);
        }, t;
    }(),
    l1 = XO;
var KO = /\/([^\0\t\n\f\r\ ]+)[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]+Tf/,
    YO = function() {
        function t(r, e) {
            this.dict = r, this.ref = e;
        }
        return t.prototype.T = function() {
            return this.dict.lookupMaybe(K.of("T"), Fr, bt);
        }, t.prototype.Ff = function() {
            var r = this.getInheritableAttribute(K.of("Ff"));
            return this.dict.context.lookupMaybe(r, wt);
        }, t.prototype.V = function() {
            var r = this.getInheritableAttribute(K.of("V"));
            return this.dict.context.lookup(r);
        }, t.prototype.Kids = function() {
            return this.dict.lookupMaybe(K.of("Kids"), $t);
        }, t.prototype.DA = function() {
            var r = this.dict.lookup(K.of("DA"));
            if (r instanceof Fr || r instanceof bt) return r;
        }, t.prototype.setKids = function(r) {
            this.dict.set(K.of("Kids"), this.dict.context.obj(r));
        }, t.prototype.getParent = function() {
            var r = this.dict.get(K.of("Parent"));
            if (r instanceof tr) {
                var e = this.dict.lookup(K.of("Parent"), At);
                return new t(e, r);
            }
        }, t.prototype.setParent = function(r) {
            r ? this.dict.set(K.of("Parent"), r) : this.dict.delete(K.of("Parent"));
        }, t.prototype.getFullyQualifiedName = function() {
            var r = this.getParent();
            return r ? r.getFullyQualifiedName() + "." + this.getPartialName() : this.getPartialName();
        }, t.prototype.getPartialName = function() {
            var r;
            return (r = this.T()) === null || r === void 0 ? void 0 : r.decodeText();
        }, t.prototype.setPartialName = function(r) {
            r ? this.dict.set(K.of("T"), bt.fromText(r)) : this.dict.delete(K.of("T"));
        }, t.prototype.setDefaultAppearance = function(r) {
            this.dict.set(K.of("DA"), Fr.of(r));
        }, t.prototype.getDefaultAppearance = function() {
            var r = this.DA();
            return r instanceof bt ? r.decodeText() : r ? .asString();
        }, t.prototype.setFontSize = function(r) {
            var e, i = (e = this.getFullyQualifiedName()) !== null && e !== void 0 ? e : "",
                n = this.getDefaultAppearance();
            if (!n) throw new pS(i);
            var a = Of(n, KO);
            if (!a.match) throw new mS(i);
            var o = n.slice(0, a.pos - a.match[0].length),
                s = a.pos <= n.length ? n.slice(a.pos) : "",
                l = a.match[1],
                c = o + " /" + l + " " + r + " Tf " + s;
            this.setDefaultAppearance(c);
        }, t.prototype.getFlags = function() {
            var r, e;
            return (e = (r = this.Ff()) === null || r === void 0 ? void 0 : r.asNumber()) !== null && e !== void 0 ? e : 0;
        }, t.prototype.setFlags = function(r) {
            this.dict.set(K.of("Ff"), wt.of(r));
        }, t.prototype.hasFlag = function(r) {
            var e = this.getFlags();
            return (e & r) !== 0;
        }, t.prototype.setFlag = function(r) {
            var e = this.getFlags();
            this.setFlags(e | r);
        }, t.prototype.clearFlag = function(r) {
            var e = this.getFlags();
            this.setFlags(e & ~r);
        }, t.prototype.setFlagTo = function(r, e) {
            e ? this.setFlag(r) : this.clearFlag(r);
        }, t.prototype.getInheritableAttribute = function(r) {
            var e;
            return this.ascend(function(i) {
                e || (e = i.dict.get(r));
            }), e;
        }, t.prototype.ascend = function(r) {
            r(this);
            var e = this.getParent();
            e && e.ascend(r);
        }, t;
    }(),
    eh = YO;
var ZO = function() {
        function t(r) {
            this.dict = r;
        }
        return t.prototype.W = function() {
            var r = this.dict.lookup(K.of("W"));
            if (r instanceof wt) return r;
        }, t.prototype.getWidth = function() {
            var r, e;
            return (e = (r = this.W()) === null || r === void 0 ? void 0 : r.asNumber()) !== null && e !== void 0 ? e : 1;
        }, t.prototype.setWidth = function(r) {
            var e = this.dict.context.obj(r);
            this.dict.set(K.of("W"), e);
        }, t.fromDict = function(r) {
            return new t(r);
        }, t;
    }(),
    c1 = ZO;
var JO = function() {
        function t(r) {
            this.dict = r;
        }
        return t.prototype.Rect = function() {
            return this.dict.lookup(K.of("Rect"), $t);
        }, t.prototype.AP = function() {
            return this.dict.lookupMaybe(K.of("AP"), At);
        }, t.prototype.F = function() {
            var r = this.dict.lookup(K.of("F"));
            return this.dict.context.lookupMaybe(r, wt);
        }, t.prototype.getRectangle = function() {
            var r, e = this.Rect();
            return (r = e ? .asRectangle()) !== null && r !== void 0 ? r : {
                x: 0,
                y: 0,
                width: 0,
                height: 0
            };
        }, t.prototype.setRectangle = function(r) {
            var e = r.x,
                i = r.y,
                n = r.width,
                a = r.height,
                o = this.dict.context.obj([e, i, e + n, i + a]);
            this.dict.set(K.of("Rect"), o);
        }, t.prototype.getAppearanceState = function() {
            var r = this.dict.lookup(K.of("AS"));
            if (r instanceof K) return r;
        }, t.prototype.setAppearanceState = function(r) {
            this.dict.set(K.of("AS"), r);
        }, t.prototype.setAppearances = function(r) {
            this.dict.set(K.of("AP"), r);
        }, t.prototype.ensureAP = function() {
            var r = this.AP();
            return r || (r = this.dict.context.obj({}), this.dict.set(K.of("AP"), r)), r;
        }, t.prototype.getNormalAppearance = function() {
            var r = this.ensureAP(),
                e = r.get(K.of("N"));
            if (e instanceof tr || e instanceof At) return e;
            throw new Error("Unexpected N type: " + e ? .constructor.name);
        }, t.prototype.setNormalAppearance = function(r) {
            var e = this.ensureAP();
            e.set(K.of("N"), r);
        }, t.prototype.setRolloverAppearance = function(r) {
            var e = this.ensureAP();
            e.set(K.of("R"), r);
        }, t.prototype.setDownAppearance = function(r) {
            var e = this.ensureAP();
            e.set(K.of("D"), r);
        }, t.prototype.removeRolloverAppearance = function() {
            var r = this.AP();
            r ? .delete(K.of("R"));
        }, t.prototype.removeDownAppearance = function() {
            var r = this.AP();
            r ? .delete(K.of("D"));
        }, t.prototype.getAppearances = function() {
            var r = this.AP();
            if (r) {
                var e = r.lookup(K.of("N"), At, Fi),
                    i = r.lookupMaybe(K.of("R"), At, Fi),
                    n = r.lookupMaybe(K.of("D"), At, Fi);
                return {
                    normal: e,
                    rollover: i,
                    down: n
                };
            }
        }, t.prototype.getFlags = function() {
            var r, e;
            return (e = (r = this.F()) === null || r === void 0 ? void 0 : r.asNumber()) !== null && e !== void 0 ? e : 0;
        }, t.prototype.setFlags = function(r) {
            this.dict.set(K.of("F"), wt.of(r));
        }, t.prototype.hasFlag = function(r) {
            var e = this.getFlags();
            return (e & r) !== 0;
        }, t.prototype.setFlag = function(r) {
            var e = this.getFlags();
            this.setFlags(e | r);
        }, t.prototype.clearFlag = function(r) {
            var e = this.getFlags();
            this.setFlags(e & ~r);
        }, t.prototype.setFlagTo = function(r, e) {
            e ? this.setFlag(r) : this.clearFlag(r);
        }, t.fromDict = function(r) {
            return new t(r);
        }, t;
    }(),
    mv = JO;
var QO = function() {
        function t(r) {
            this.dict = r;
        }
        return t.prototype.R = function() {
            var r = this.dict.lookup(K.of("R"));
            if (r instanceof wt) return r;
        }, t.prototype.BC = function() {
            var r = this.dict.lookup(K.of("BC"));
            if (r instanceof $t) return r;
        }, t.prototype.BG = function() {
            var r = this.dict.lookup(K.of("BG"));
            if (r instanceof $t) return r;
        }, t.prototype.CA = function() {
            var r = this.dict.lookup(K.of("CA"));
            if (r instanceof bt || r instanceof Fr) return r;
        }, t.prototype.RC = function() {
            var r = this.dict.lookup(K.of("RC"));
            if (r instanceof bt || r instanceof Fr) return r;
        }, t.prototype.AC = function() {
            var r = this.dict.lookup(K.of("AC"));
            if (r instanceof bt || r instanceof Fr) return r;
        }, t.prototype.getRotation = function() {
            var r;
            return (r = this.R()) === null || r === void 0 ? void 0 : r.asNumber();
        }, t.prototype.getBorderColor = function() {
            var r = this.BC();
            if (r) {
                for (var e = [], i = 0, n = r ? .size(); i < n; i++) {
                    var a = r.get(i);
                    a instanceof wt && e.push(a.asNumber());
                }
                return e;
            }
        }, t.prototype.getBackgroundColor = function() {
            var r = this.BG();
            if (r) {
                for (var e = [], i = 0, n = r ? .size(); i < n; i++) {
                    var a = r.get(i);
                    a instanceof wt && e.push(a.asNumber());
                }
                return e;
            }
        }, t.prototype.getCaptions = function() {
            var r = this.CA(),
                e = this.RC(),
                i = this.AC();
            return {
                normal: r ? .decodeText(),
                rollover: e ? .decodeText(),
                down: i ? .decodeText()
            };
        }, t.prototype.setRotation = function(r) {
            var e = this.dict.context.obj(r);
            this.dict.set(K.of("R"), e);
        }, t.prototype.setBorderColor = function(r) {
            var e = this.dict.context.obj(r);
            this.dict.set(K.of("BC"), e);
        }, t.prototype.setBackgroundColor = function(r) {
            var e = this.dict.context.obj(r);
            this.dict.set(K.of("BG"), e);
        }, t.prototype.setCaptions = function(r) {
            var e = bt.fromText(r.normal);
            if (this.dict.set(K.of("CA"), e), r.rollover) {
                var i = bt.fromText(r.rollover);
                this.dict.set(K.of("RC"), i);
            } else this.dict.delete(K.of("RC"));
            if (r.down) {
                var n = bt.fromText(r.down);
                this.dict.set(K.of("AC"), n);
            } else this.dict.delete(K.of("AC"));
        }, t.fromDict = function(r) {
            return new t(r);
        }, t;
    }(),
    th = QO;
var $O = function(t) {
        Ge(r, t);

        function r() {
            return t !== null && t.apply(this, arguments) || this;
        }
        return r.prototype.MK = function() {
            var e = this.dict.lookup(K.of("MK"));
            if (e instanceof At) return e;
        }, r.prototype.BS = function() {
            var e = this.dict.lookup(K.of("BS"));
            if (e instanceof At) return e;
        }, r.prototype.DA = function() {
            var e = this.dict.lookup(K.of("DA"));
            if (e instanceof Fr || e instanceof bt) return e;
        }, r.prototype.P = function() {
            var e = this.dict.get(K.of("P"));
            if (e instanceof tr) return e;
        }, r.prototype.setP = function(e) {
            this.dict.set(K.of("P"), e);
        }, r.prototype.setDefaultAppearance = function(e) {
            this.dict.set(K.of("DA"), Fr.of(e));
        }, r.prototype.getDefaultAppearance = function() {
            var e = this.DA();
            return e instanceof bt ? e.decodeText() : e ? .asString();
        }, r.prototype.getAppearanceCharacteristics = function() {
            var e = this.MK();
            if (e) return th.fromDict(e);
        }, r.prototype.getOrCreateAppearanceCharacteristics = function() {
            var e = this.MK();
            if (e) return th.fromDict(e);
            var i = th.fromDict(this.dict.context.obj({}));
            return this.dict.set(K.of("MK"), i.dict), i;
        }, r.prototype.getBorderStyle = function() {
            var e = this.BS();
            if (e) return c1.fromDict(e);
        }, r.prototype.getOrCreateBorderStyle = function() {
            var e = this.BS();
            if (e) return c1.fromDict(e);
            var i = c1.fromDict(this.dict.context.obj({}));
            return this.dict.set(K.of("BS"), i.dict), i;
        }, r.prototype.getOnValue = function() {
            var e, i = (e = this.getAppearances()) === null || e === void 0 ? void 0 : e.normal;
            if (i instanceof At)
                for (var n = i.keys(), a = 0, o = n.length; a < o; a++) {
                    var s = n[a];
                    if (s !== K.of("Off")) return s;
                }
        }, r.fromDict = function(e) {
            return new r(e);
        }, r.create = function(e, i) {
            var n = e.obj({
                Type: "Annot",
                Subtype: "Widget",
                Rect: [0, 0, 0, 0],
                Parent: i
            });
            return new r(n);
        }, r;
    }(mv),
    nu = $O;
var eN = function(t) {
        Ge(r, t);

        function r() {
            return t !== null && t.apply(this, arguments) || this;
        }
        return r.prototype.FT = function() {
            var e = this.getInheritableAttribute(K.of("FT"));
            return this.dict.context.lookup(e, K);
        }, r.prototype.getWidgets = function() {
            var e = this.Kids();
            if (!e) return [nu.fromDict(this.dict)];
            for (var i = new Array(e.size()), n = 0, a = e.size(); n < a; n++) {
                var o = e.lookup(n, At);
                i[n] = nu.fromDict(o);
            }
            return i;
        }, r.prototype.addWidget = function(e) {
            var i = this.normalizedEntries().Kids;
            i.push(e);
        }, r.prototype.removeWidget = function(e) {
            var i = this.Kids();
            if (i) {
                if (e < 0 || e > i.size()) throw new $0(e, 0, i.size());
                i.remove(e);
            } else {
                if (e !== 0) throw new $0(e, 0, 0);
                this.setKids([]);
            }
        }, r.prototype.normalizedEntries = function() {
            var e = this.Kids();
            return e || (e = this.dict.context.obj([this.ref]), this.dict.set(K.of("Kids"), e)), {
                Kids: e
            };
        }, r.fromDict = function(e, i) {
            return new r(e, i);
        }, r;
    }(eh),
    $a = eN;
var tN = function(t) {
        Ge(r, t);

        function r() {
            return t !== null && t.apply(this, arguments) || this;
        }
        return r.prototype.Opt = function() {
            return this.dict.lookupMaybe(K.of("Opt"), Fr, bt, $t);
        }, r.prototype.setOpt = function(e) {
            this.dict.set(K.of("Opt"), this.dict.context.obj(e));
        }, r.prototype.getExportValues = function() {
            var e = this.Opt();
            if (e) {
                if (e instanceof Fr || e instanceof bt) return [e];
                for (var i = [], n = 0, a = e.size(); n < a; n++) {
                    var o = e.lookup(n);
                    (o instanceof Fr || o instanceof bt) && i.push(o);
                }
                return i;
            }
        }, r.prototype.removeExportValue = function(e) {
            var i = this.Opt();
            if (i)
                if (i instanceof Fr || i instanceof bt) {
                    if (e !== 0) throw new $0(e, 0, 0);
                    this.setOpt([]);
                } else {
                    if (e < 0 || e > i.size()) throw new $0(e, 0, i.size());
                    i.remove(e);
                }
        }, r.prototype.normalizeExportValues = function() {
            for (var e, i, n, a, o = (e = this.getExportValues()) !== null && e !== void 0 ? e : [], s = [], l = this.getWidgets(), c = 0, u = l.length; c < u; c++) {
                var h = l[c],
                    d = (i = o[c]) !== null && i !== void 0 ? i : bt.fromText((a = (n = h.getOnValue()) === null || n === void 0 ? void 0 : n.decodeText()) !== null && a !== void 0 ? a : "");
                s.push(d);
            }
            this.setOpt(s);
        }, r.prototype.addOpt = function(e, i) {
            var n;
            this.normalizeExportValues();
            var a = e.decodeText(),
                o;
            if (i)
                for (var s = (n = this.getExportValues()) !== null && n !== void 0 ? n : [], l = 0, c = s.length; l < c; l++) {
                    var u = s[l];
                    u.decodeText() === a && (o = l);
                }
            var h = this.Opt();
            return h.push(e), o ? ? h.size() - 1;
        }, r.prototype.addWidgetWithOpt = function(e, i, n) {
            var a = this.addOpt(i, n),
                o = K.of(String(a));
            return this.addWidget(e), o;
        }, r;
    }($a),
    Zc = tN;
var rN = function(t) {
        Ge(r, t);

        function r() {
            return t !== null && t.apply(this, arguments) || this;
        }
        return r.prototype.setValue = function(e) {
            var i, n = (i = this.getOnValue()) !== null && i !== void 0 ? i : K.of("Yes");
            if (e !== n && e !== K.of("Off")) throw new eu();
            this.dict.set(K.of("V"), e);
            for (var a = this.getWidgets(), o = 0, s = a.length; o < s; o++) {
                var l = a[o],
                    c = l.getOnValue() === e ? e : K.of("Off");
                l.setAppearanceState(c);
            }
        }, r.prototype.getValue = function() {
            var e = this.V();
            return e instanceof K ? e : K.of("Off");
        }, r.prototype.getOnValue = function() {
            var e = this.getWidgets()[0];
            return e ? .getOnValue();
        }, r.fromDict = function(e, i) {
            return new r(e, i);
        }, r.create = function(e) {
            var i = e.obj({
                    FT: "Btn",
                    Kids: []
                }),
                n = e.register(i);
            return new r(i, n);
        }, r;
    }(Zc),
    zl = rN;
var pn = function(t) {
        return 1 << t;
    },
    Vo = function(t) {
        return t[t.ReadOnly = pn(0)] = "ReadOnly", t[t.Required = pn(1)] = "Required", t[t.NoExport = pn(2)] = "NoExport", t;
    }(Vo || {}),
    ya = function(t) {
        return t[t.NoToggleToOff = pn(14)] = "NoToggleToOff", t[t.Radio = pn(15)] = "Radio", t[t.PushButton = pn(16)] = "PushButton", t[t.RadiosInUnison = pn(25)] = "RadiosInUnison", t;
    }(ya || {}),
    Ui = function(t) {
        return t[t.Multiline = pn(12)] = "Multiline", t[t.Password = pn(13)] = "Password", t[t.FileSelect = pn(20)] = "FileSelect", t[t.DoNotSpellCheck = pn(22)] = "DoNotSpellCheck", t[t.DoNotScroll = pn(23)] = "DoNotScroll", t[t.Comb = pn(24)] = "Comb", t[t.RichText = pn(25)] = "RichText", t;
    }(Ui || {}),
    Wr = function(t) {
        return t[t.Combo = pn(17)] = "Combo", t[t.Edit = pn(18)] = "Edit", t[t.Sort = pn(19)] = "Sort", t[t.MultiSelect = pn(21)] = "MultiSelect", t[t.DoNotSpellCheck = pn(22)] = "DoNotSpellCheck", t[t.CommitOnSelChange = pn(26)] = "CommitOnSelChange", t;
    }(Wr || {});
var iN = function(t) {
        Ge(r, t);

        function r() {
            return t !== null && t.apply(this, arguments) || this;
        }
        return r.prototype.setValues = function(e) {
            if (this.hasFlag(Wr.Combo) && !this.hasFlag(Wr.Edit) && !this.valuesAreValid(e)) throw new eu();
            if (e.length === 0 && this.dict.delete(K.of("V")), e.length === 1 && this.dict.set(K.of("V"), e[0]), e.length > 1) {
                if (!this.hasFlag(Wr.MultiSelect)) throw new dS();
                this.dict.set(K.of("V"), this.dict.context.obj(e));
            }
            this.updateSelectedIndices(e);
        }, r.prototype.valuesAreValid = function(e) {
            for (var i = this.getOptions(), n = function(l, c) {
                    var u = e[l].decodeText();
                    if (!i.find(function(h) {
                            return u === (h.display || h.value).decodeText();
                        })) return {
                        value: !1
                    };
                }, a = 0, o = e.length; a < o; a++) {
                var s = n(a, o);
                if (typeof s == "object") return s.value;
            }
            return !0;
        }, r.prototype.updateSelectedIndices = function(e) {
            if (e.length > 1) {
                for (var i = new Array(e.length), n = this.getOptions(), a = function(l, c) {
                        var u = e[l].decodeText();
                        i[l] = n.findIndex(function(h) {
                            return u === (h.display || h.value).decodeText();
                        });
                    }, o = 0, s = e.length; o < s; o++) a(o, s);
                this.dict.set(K.of("I"), this.dict.context.obj(i.sort()));
            } else this.dict.delete(K.of("I"));
        }, r.prototype.getValues = function() {
            var e = this.V();
            if (e instanceof Fr || e instanceof bt) return [e];
            if (e instanceof $t) {
                for (var i = [], n = 0, a = e.size(); n < a; n++) {
                    var o = e.lookup(n);
                    (o instanceof Fr || o instanceof bt) && i.push(o);
                }
                return i;
            }
            return [];
        }, r.prototype.Opt = function() {
            return this.dict.lookupMaybe(K.of("Opt"), Fr, bt, $t);
        }, r.prototype.setOptions = function(e) {
            for (var i = new Array(e.length), n = 0, a = e.length; n < a; n++) {
                var o = e[n],
                    s = o.value,
                    l = o.display;
                i[n] = this.dict.context.obj([s, l || s]);
            }
            this.dict.set(K.of("Opt"), this.dict.context.obj(i));
        }, r.prototype.getOptions = function() {
            var e = this.Opt();
            if (e instanceof Fr || e instanceof bt) return [{
                value: e,
                display: e
            }];
            if (e instanceof $t) {
                for (var i = [], n = 0, a = e.size(); n < a; n++) {
                    var o = e.lookup(n);
                    if ((o instanceof Fr || o instanceof bt) && i.push({
                            value: o,
                            display: o
                        }), o instanceof $t && o.size() > 0) {
                        var s = o.lookup(0, Fr, bt),
                            l = o.lookupMaybe(1, Fr, bt);
                        i.push({
                            value: s,
                            display: l || s
                        });
                    }
                }
                return i;
            }
            return [];
        }, r;
    }($a),
    rh = iN;
var nN = function(t) {
        Ge(r, t);

        function r() {
            return t !== null && t.apply(this, arguments) || this;
        }
        return r.fromDict = function(e, i) {
            return new r(e, i);
        }, r.create = function(e) {
            var i = e.obj({
                    FT: "Ch",
                    Ff: Wr.Combo,
                    Kids: []
                }),
                n = e.register(i);
            return new r(i, n);
        }, r;
    }(rh),
    Wl = nN;
var aN = function(t) {
        Ge(r, t);

        function r() {
            return t !== null && t.apply(this, arguments) || this;
        }
        return r.prototype.addField = function(e) {
            var i = this.normalizedEntries().Kids;
            i ? .push(e);
        }, r.prototype.normalizedEntries = function() {
            var e = this.Kids();
            return e || (e = this.dict.context.obj([]), this.dict.set(K.of("Kids"), e)), {
                Kids: e
            };
        }, r.fromDict = function(e, i) {
            return new r(e, i);
        }, r.create = function(e) {
            var i = e.obj({}),
                n = e.register(i);
            return new r(i, n);
        }, r;
    }(eh),
    jl = aN;
var oN = function(t) {
        Ge(r, t);

        function r() {
            return t !== null && t.apply(this, arguments) || this;
        }
        return r.fromDict = function(e, i) {
            return new r(e, i);
        }, r;
    }($a),
    Jc = oN;
var sN = function(t) {
        Ge(r, t);

        function r() {
            return t !== null && t.apply(this, arguments) || this;
        }
        return r.prototype.MaxLen = function() {
            var e = this.dict.lookup(K.of("MaxLen"));
            if (e instanceof wt) return e;
        }, r.prototype.Q = function() {
            var e = this.dict.lookup(K.of("Q"));
            if (e instanceof wt) return e;
        }, r.prototype.setMaxLength = function(e) {
            this.dict.set(K.of("MaxLen"), wt.of(e));
        }, r.prototype.removeMaxLength = function() {
            this.dict.delete(K.of("MaxLen"));
        }, r.prototype.getMaxLength = function() {
            var e;
            return (e = this.MaxLen()) === null || e === void 0 ? void 0 : e.asNumber();
        }, r.prototype.setQuadding = function(e) {
            this.dict.set(K.of("Q"), wt.of(e));
        }, r.prototype.getQuadding = function() {
            var e;
            return (e = this.Q()) === null || e === void 0 ? void 0 : e.asNumber();
        }, r.prototype.setValue = function(e) {
            this.dict.set(K.of("V"), e);
        }, r.prototype.removeValue = function() {
            this.dict.delete(K.of("V"));
        }, r.prototype.getValue = function() {
            var e = this.V();
            if (e instanceof Fr || e instanceof bt) return e;
        }, r.fromDict = function(e, i) {
            return new r(e, i);
        }, r.create = function(e) {
            var i = e.obj({
                    FT: "Tx",
                    Kids: []
                }),
                n = e.register(i);
            return new r(i, n);
        }, r;
    }($a),
    Hl = sN;
var lN = function(t) {
        Ge(r, t);

        function r() {
            return t !== null && t.apply(this, arguments) || this;
        }
        return r.fromDict = function(e, i) {
            return new r(e, i);
        }, r.create = function(e) {
            var i = e.obj({
                    FT: "Btn",
                    Ff: ya.PushButton,
                    Kids: []
                }),
                n = e.register(i);
            return new r(i, n);
        }, r;
    }(Zc),
    Gl = lN;
var cN = function(t) {
        Ge(r, t);

        function r() {
            return t !== null && t.apply(this, arguments) || this;
        }
        return r.prototype.setValue = function(e) {
            var i = this.getOnValues();
            if (!i.includes(e) && e !== K.of("Off")) throw new eu();
            this.dict.set(K.of("V"), e);
            for (var n = this.getWidgets(), a = 0, o = n.length; a < o; a++) {
                var s = n[a],
                    l = s.getOnValue() === e ? e : K.of("Off");
                s.setAppearanceState(l);
            }
        }, r.prototype.getValue = function() {
            var e = this.V();
            return e instanceof K ? e : K.of("Off");
        }, r.prototype.getOnValues = function() {
            for (var e = this.getWidgets(), i = [], n = 0, a = e.length; n < a; n++) {
                var o = e[n].getOnValue();
                o && i.push(o);
            }
            return i;
        }, r.fromDict = function(e, i) {
            return new r(e, i);
        }, r.create = function(e) {
            var i = e.obj({
                    FT: "Btn",
                    Ff: ya.Radio,
                    Kids: []
                }),
                n = e.register(i);
            return new r(i, n);
        }, r;
    }(Zc),
    ql = cN;
var uN = function(t) {
        Ge(r, t);

        function r() {
            return t !== null && t.apply(this, arguments) || this;
        }
        return r.fromDict = function(e, i) {
            return new r(e, i);
        }, r.create = function(e) {
            var i = e.obj({
                    FT: "Ch",
                    Kids: []
                }),
                n = e.register(i);
            return new r(i, n);
        }, r;
    }(rh),
    Xl = uN;
var ih = function(t) {
        if (!t) return [];
        for (var r = [], e = 0, i = t.size(); e < i; e++) {
            var n = t.get(e),
                a = t.lookup(e);
            n instanceof tr && a instanceof At && r.push([vv(a, n), n]);
        }
        return r;
    },
    vv = function(t, r) {
        var e = fN(t);
        return e ? jl.fromDict(t, r) : hN(t, r);
    },
    fN = function(t) {
        var r = t.lookup(K.of("Kids"));
        if (r instanceof $t)
            for (var e = 0, i = r.size(); e < i; e++) {
                var n = r.lookup(e),
                    a = n instanceof At && n.has(K.of("T"));
                if (a) return !0;
            }
        return !1;
    },
    hN = function(t, r) {
        var e = xv(t, K.of("FT")),
            i = t.context.lookup(e, K);
        return i === K.of("Btn") ? dN(t, r) : i === K.of("Ch") ? pN(t, r) : i === K.of("Tx") ? Hl.fromDict(t, r) : i === K.of("Sig") ? Jc.fromDict(t, r) : $a.fromDict(t, r);
    },
    dN = function(t, r) {
        var e, i = xv(t, K.of("Ff")),
            n = t.context.lookupMaybe(i, wt),
            a = (e = n ? .asNumber()) !== null && e !== void 0 ? e : 0;
        return gv(a, ya.PushButton) ? Gl.fromDict(t, r) : gv(a, ya.Radio) ? ql.fromDict(t, r) : zl.fromDict(t, r);
    },
    pN = function(t, r) {
        var e, i = xv(t, K.of("Ff")),
            n = t.context.lookupMaybe(i, wt),
            a = (e = n ? .asNumber()) !== null && e !== void 0 ? e : 0;
        return gv(a, Wr.Combo) ? Wl.fromDict(t, r) : Xl.fromDict(t, r);
    },
    gv = function(t, r) {
        return (t & r) !== 0;
    },
    xv = function(t, r) {
        var e;
        return GS(t, function(i) {
            e || (e = i.get(r));
        }), e;
    },
    GS = function(t, r) {
        r(t);
        var e = t.lookupMaybe(K.of("Parent"), At);
        e && GS(e, r);
    };
var mN = function() {
        function t(r) {
            this.dict = r;
        }
        return t.prototype.Fields = function() {
            var r = this.dict.lookup(K.of("Fields"));
            if (r instanceof $t) return r;
        }, t.prototype.getFields = function() {
            for (var r = this.normalizedEntries().Fields, e = new Array(r.size()), i = 0, n = r.size(); i < n; i++) {
                var a = r.get(i),
                    o = r.lookup(i, At);
                e[i] = [vv(o, a), a];
            }
            return e;
        }, t.prototype.getAllFields = function() {
            var r = [],
                e = function(i) {
                    if (i)
                        for (var n = 0, a = i.length; n < a; n++) {
                            var o = i[n];
                            r.push(o);
                            var s = o[0];
                            s instanceof jl && e(ih(s.Kids()));
                        }
                };
            return e(this.getFields()), r;
        }, t.prototype.addField = function(r) {
            var e = this.normalizedEntries().Fields;
            e ? .push(r);
        }, t.prototype.removeField = function(r) {
            var e = r.getParent(),
                i = e === void 0 ? this.normalizedEntries().Fields : e.Kids(),
                n = i ? .indexOf(r.ref);
            if (i === void 0 || n === void 0) throw new Error("Tried to remove inexistent field " + r.getFullyQualifiedName());
            i.remove(n), e !== void 0 && i.size() === 0 && this.removeField(e);
        }, t.prototype.normalizedEntries = function() {
            var r = this.Fields();
            return r || (r = this.dict.context.obj([]), this.dict.set(K.of("Fields"), r)), {
                Fields: r
            };
        }, t.fromDict = function(r) {
            return new t(r);
        }, t.create = function(r) {
            var e = r.obj({
                Fields: []
            });
            return new t(e);
        }, t;
    }(),
    Qc = mN;
var gN = function(t) {
        Ge(r, t);

        function r() {
            return t !== null && t.apply(this, arguments) || this;
        }
        return r.prototype.Pages = function() {
            return this.lookup(K.of("Pages"), At);
        }, r.prototype.AcroForm = function() {
            return this.lookupMaybe(K.of("AcroForm"), At);
        }, r.prototype.getAcroForm = function() {
            var e = this.AcroForm();
            if (e) return Qc.fromDict(e);
        }, r.prototype.getOrCreateAcroForm = function() {
            var e = this.getAcroForm();
            if (!e) {
                e = Qc.create(this.context);
                var i = this.context.register(e.dict);
                this.set(K.of("AcroForm"), i);
            }
            return e;
        }, r.prototype.ViewerPreferences = function() {
            return this.lookupMaybe(K.of("ViewerPreferences"), At);
        }, r.prototype.getViewerPreferences = function() {
            var e = this.ViewerPreferences();
            if (e) return l1.fromDict(e);
        }, r.prototype.getOrCreateViewerPreferences = function() {
            var e = this.getViewerPreferences();
            if (!e) {
                e = l1.create(this.context);
                var i = this.context.register(e.dict);
                this.set(K.of("ViewerPreferences"), i);
            }
            return e;
        }, r.prototype.insertLeafNode = function(e, i) {
            var n = this.get(K.of("Pages")),
                a = this.Pages().insertLeafNode(e, i);
            return a || n;
        }, r.prototype.removeLeafNode = function(e) {
            this.Pages().removeLeafNode(e);
        }, r.withContextAndPages = function(e, i) {
            var n = new Map();
            return n.set(K.of("Type"), K.of("Catalog")), n.set(K.of("Pages"), i), new r(n, e);
        }, r.fromMapWithContext = function(e, i) {
            return new r(e, i);
        }, r;
    }(At),
    nh = gN;
var vN = function(t) {
        Ge(r, t);

        function r() {
            return t !== null && t.apply(this, arguments) || this;
        }
        return r.prototype.Parent = function() {
            return this.lookup(K.of("Parent"));
        }, r.prototype.Kids = function() {
            return this.lookup(K.of("Kids"), $t);
        }, r.prototype.Count = function() {
            return this.lookup(K.of("Count"), wt);
        }, r.prototype.pushTreeNode = function(e) {
            var i = this.Kids();
            i.push(e);
        }, r.prototype.pushLeafNode = function(e) {
            var i = this.Kids();
            this.insertLeafKid(i.size(), e);
        }, r.prototype.insertLeafNode = function(e, i) {
            var n = this.Kids(),
                a = this.Count().asNumber();
            if (i > a) throw new av(i, a);
            for (var o = i, s = 0, l = n.size(); s < l; s++) {
                if (o === 0) {
                    this.insertLeafKid(s, e);
                    return;
                }
                var c = n.get(s),
                    u = this.context.lookup(c);
                if (u instanceof r) {
                    if (u.Count().asNumber() > o) return u.insertLeafNode(e, o) || c;
                    o -= u.Count().asNumber();
                }
                u instanceof _a && (o -= 1);
            }
            if (o === 0) {
                this.insertLeafKid(n.size(), e);
                return;
            }
            throw new ov(i, "insertLeafNode");
        }, r.prototype.removeLeafNode = function(e, i) {
            i === void 0 && (i = !0);
            var n = this.Kids(),
                a = this.Count().asNumber();
            if (e >= a) throw new av(e, a);
            for (var o = e, s = 0, l = n.size(); s < l; s++) {
                var c = n.get(s),
                    u = this.context.lookup(c);
                if (u instanceof r)
                    if (u.Count().asNumber() > o) {
                        u.removeLeafNode(o, i), i && u.Kids().size() === 0 && n.remove(s);
                        return;
                    } else o -= u.Count().asNumber();
                if (u instanceof _a)
                    if (o === 0) {
                        this.removeKid(s);
                        return;
                    } else o -= 1;
            }
            throw new ov(e, "removeLeafNode");
        }, r.prototype.ascend = function(e) {
            e(this);
            var i = this.Parent();
            i && i.ascend(e);
        }, r.prototype.traverse = function(e) {
            for (var i = this.Kids(), n = 0, a = i.size(); n < a; n++) {
                var o = i.get(n),
                    s = this.context.lookup(o);
                s instanceof r && s.traverse(e), e(s, o);
            }
        }, r.prototype.insertLeafKid = function(e, i) {
            var n = this.Kids();
            this.ascend(function(a) {
                var o = a.Count().asNumber() + 1;
                a.set(K.of("Count"), wt.of(o));
            }), n.insert(e, i);
        }, r.prototype.removeKid = function(e) {
            var i = this.Kids(),
                n = i.lookup(e);
            n instanceof _a && this.ascend(function(a) {
                var o = a.Count().asNumber() - 1;
                a.set(K.of("Count"), wt.of(o));
            }), i.remove(e);
        }, r.withContext = function(e, i) {
            var n = new Map();
            return n.set(K.of("Type"), K.of("Pages")), n.set(K.of("Kids"), e.obj([])), n.set(K.of("Count"), e.obj(0)), i && n.set(K.of("Parent"), i), new r(n, e);
        }, r.fromMapWithContext = function(e, i) {
            return new r(e, i);
        }, r;
    }(At),
    ah = vN;
var Dn = new Uint8Array(256);
Dn[ie.Zero] = 1;
Dn[ie.One] = 1;
Dn[ie.Two] = 1;
Dn[ie.Three] = 1;
Dn[ie.Four] = 1;
Dn[ie.Five] = 1;
Dn[ie.Six] = 1;
Dn[ie.Seven] = 1;
Dn[ie.Eight] = 1;
Dn[ie.Nine] = 1;
var u1 = new Uint8Array(256);
u1[ie.Period] = 1;
u1[ie.Plus] = 1;
u1[ie.Minus] = 1;
var oh = new Uint8Array(256);
for (au = 0, qS = 256; au < qS; au++) oh[au] = Dn[au] || u1[au] ? 1 : 0;
var au, qS;
var XS = ie.Newline,
    KS = ie.CarriageReturn,
    xN = function() {
        function t(r, e) {
            e === void 0 && (e = !1), this.bytes = r, this.capNumbers = e;
        }
        return t.prototype.parseRawInt = function() {
            for (var r = ""; !this.bytes.done();) {
                var e = this.bytes.peek();
                if (!Dn[e]) break;
                r += Za(this.bytes.next());
            }
            var i = Number(r);
            if (!r || !isFinite(i)) throw new sv(this.bytes.position(), r);
            return i;
        }, t.prototype.parseRawNumber = function() {
            for (var r = ""; !this.bytes.done();) {
                var e = this.bytes.peek();
                if (!oh[e] || (r += Za(this.bytes.next()), e === ie.Period)) break;
            }
            for (; !this.bytes.done();) {
                var e = this.bytes.peek();
                if (!Dn[e]) break;
                r += Za(this.bytes.next());
            }
            var i = Number(r);
            if (!r || !isFinite(i)) throw new sv(this.bytes.position(), r);
            if (i > Number.MAX_SAFE_INTEGER)
                if (this.capNumbers) {
                    var n = "Parsed number that is too large for some PDF readers: " + r + ", using Number.MAX_SAFE_INTEGER instead.";
                    return console.warn(n), Number.MAX_SAFE_INTEGER;
                } else {
                    var n = "Parsed number that is too large for some PDF readers: " + r + ", not capping.";
                    console.warn(n);
                }
            return i;
        }, t.prototype.skipWhitespace = function() {
            for (; !this.bytes.done() && ho[this.bytes.peek()];) this.bytes.next();
        }, t.prototype.skipLine = function() {
            for (; !this.bytes.done();) {
                var r = this.bytes.peek();
                if (r === XS || r === KS) return;
                this.bytes.next();
            }
        }, t.prototype.skipComment = function() {
            if (this.bytes.peek() !== ie.Percent) return !1;
            for (; !this.bytes.done();) {
                var r = this.bytes.peek();
                if (r === XS || r === KS) return !0;
                this.bytes.next();
            }
            return !0;
        }, t.prototype.skipWhitespaceAndComments = function() {
            for (this.skipWhitespace(); this.skipComment();) this.skipWhitespace();
        }, t.prototype.matchKeyword = function(r) {
            for (var e = this.bytes.offset(), i = 0, n = r.length; i < n; i++)
                if (this.bytes.done() || this.bytes.next() !== r[i]) return this.bytes.moveTo(e), !1;
            return !0;
        }, t;
    }(),
    YS = xN;
var _N = function() {
        function t(r) {
            this.idx = 0, this.line = 0, this.column = 0, this.bytes = r, this.length = this.bytes.length;
        }
        return t.prototype.moveTo = function(r) {
            this.idx = r;
        }, t.prototype.next = function() {
            var r = this.bytes[this.idx++];
            return r === ie.Newline ? (this.line += 1, this.column = 0) : this.column += 1, r;
        }, t.prototype.assertNext = function(r) {
            if (this.peek() !== r) throw new gS(this.position(), r, this.peek());
            return this.next();
        }, t.prototype.peek = function() {
            return this.bytes[this.idx];
        }, t.prototype.peekAhead = function(r) {
            return this.bytes[this.idx + r];
        }, t.prototype.peekAt = function(r) {
            return this.bytes[r];
        }, t.prototype.done = function() {
            return this.idx >= this.length;
        }, t.prototype.offset = function() {
            return this.idx;
        }, t.prototype.slice = function(r, e) {
            return this.bytes.slice(r, e);
        }, t.prototype.position = function() {
            return {
                line: this.line,
                column: this.column,
                offset: this.idx
            };
        }, t.of = function(r) {
            return new t(r);
        }, t.fromPDFRawStream = function(r) {
            return t.of(Yf(r).decode());
        }, t;
    }(),
    Kl = _N;
var yN = ie.Space,
    sh = ie.CarriageReturn,
    lh = ie.Newline,
    ch = [ie.s, ie.t, ie.r, ie.e, ie.a, ie.m],
    f1 = [ie.e, ie.n, ie.d, ie.s, ie.t, ie.r, ie.e, ie.a, ie.m],
    ai = {
        header: [ie.Percent, ie.P, ie.D, ie.F, ie.Dash],
        eof: [ie.Percent, ie.Percent, ie.E, ie.O, ie.F],
        obj: [ie.o, ie.b, ie.j],
        endobj: [ie.e, ie.n, ie.d, ie.o, ie.b, ie.j],
        xref: [ie.x, ie.r, ie.e, ie.f],
        trailer: [ie.t, ie.r, ie.a, ie.i, ie.l, ie.e, ie.r],
        startxref: [ie.s, ie.t, ie.a, ie.r, ie.t, ie.x, ie.r, ie.e, ie.f],
        true: [ie.t, ie.r, ie.u, ie.e],
        false: [ie.f, ie.a, ie.l, ie.s, ie.e],
        null: [ie.n, ie.u, ie.l, ie.l],
        stream: ch,
        streamEOF1: Ar(ch, [yN, sh, lh]),
        streamEOF2: Ar(ch, [sh, lh]),
        streamEOF3: Ar(ch, [sh]),
        streamEOF4: Ar(ch, [lh]),
        endstream: f1,
        EOF1endstream: Ar([sh, lh], f1),
        EOF2endstream: Ar([sh], f1),
        EOF3endstream: Ar([lh], f1)
    };
var bN = function(t) {
        Ge(r, t);

        function r(e, i, n) {
            n === void 0 && (n = !1);
            var a = t.call(this, e, n) || this;
            return a.context = i, a;
        }
        return r.prototype.parseObject = function() {
            if (this.skipWhitespaceAndComments(), this.matchKeyword(ai.true)) return Zs.True;
            if (this.matchKeyword(ai.false)) return Zs.False;
            if (this.matchKeyword(ai.null)) return In;
            var e = this.bytes.peek();
            if (e === ie.LessThan && this.bytes.peekAhead(1) === ie.LessThan) return this.parseDictOrStream();
            if (e === ie.LessThan) return this.parseHexString();
            if (e === ie.LeftParen) return this.parseString();
            if (e === ie.ForwardSlash) return this.parseName();
            if (e === ie.LeftSquareBracket) return this.parseArray();
            if (oh[e]) return this.parseNumberOrRef();
            throw new vS(this.bytes.position(), e);
        }, r.prototype.parseNumberOrRef = function() {
            var e = this.parseRawNumber();
            this.skipWhitespaceAndComments();
            var i = this.bytes.offset();
            if (Dn[this.bytes.peek()]) {
                var n = this.parseRawNumber();
                if (this.skipWhitespaceAndComments(), this.bytes.peek() === ie.R) return this.bytes.assertNext(ie.R), tr.of(e, n);
            }
            return this.bytes.moveTo(i), wt.of(e);
        }, r.prototype.parseHexString = function() {
            var e = "";
            for (this.bytes.assertNext(ie.LessThan); !this.bytes.done() && this.bytes.peek() !== ie.GreaterThan;) e += Za(this.bytes.next());
            return this.bytes.assertNext(ie.GreaterThan), bt.of(e);
        }, r.prototype.parseString = function() {
            for (var e = 0, i = !1, n = ""; !this.bytes.done();) {
                var a = this.bytes.next();
                if (n += Za(a), i || (a === ie.LeftParen && (e += 1), a === ie.RightParen && (e -= 1)), a === ie.BackSlash ? i = !i : i && (i = !1), e === 0) return Fr.of(n.substring(1, n.length - 1));
            }
            throw new yS(this.bytes.position());
        }, r.prototype.parseName = function() {
            this.bytes.assertNext(ie.ForwardSlash);
            for (var e = ""; !this.bytes.done();) {
                var i = this.bytes.peek();
                if (ho[i] || Ia[i]) break;
                e += Za(i), this.bytes.next();
            }
            return K.of(e);
        }, r.prototype.parseArray = function() {
            this.bytes.assertNext(ie.LeftSquareBracket), this.skipWhitespaceAndComments();
            for (var e = $t.withContext(this.context); this.bytes.peek() !== ie.RightSquareBracket;) {
                var i = this.parseObject();
                e.push(i), this.skipWhitespaceAndComments();
            }
            return this.bytes.assertNext(ie.RightSquareBracket), e;
        }, r.prototype.parseDict = function() {
            this.bytes.assertNext(ie.LessThan), this.bytes.assertNext(ie.LessThan), this.skipWhitespaceAndComments();
            for (var e = new Map(); !this.bytes.done() && this.bytes.peek() !== ie.GreaterThan && this.bytes.peekAhead(1) !== ie.GreaterThan;) {
                var i = this.parseName(),
                    n = this.parseObject();
                e.set(i, n), this.skipWhitespaceAndComments();
            }
            this.skipWhitespaceAndComments(), this.bytes.assertNext(ie.GreaterThan), this.bytes.assertNext(ie.GreaterThan);
            var a = e.get(K.of("Type"));
            return a === K.of("Catalog") ? nh.fromMapWithContext(e, this.context) : a === K.of("Pages") ? ah.fromMapWithContext(e, this.context) : a === K.of("Page") ? _a.fromMapWithContext(e, this.context) : At.fromMapWithContext(e, this.context);
        }, r.prototype.parseDictOrStream = function() {
            var e = this.bytes.position(),
                i = this.parseDict();
            if (this.skipWhitespaceAndComments(), !this.matchKeyword(ai.streamEOF1) && !this.matchKeyword(ai.streamEOF2) && !this.matchKeyword(ai.streamEOF3) && !this.matchKeyword(ai.streamEOF4) && !this.matchKeyword(ai.stream)) return i;
            var n = this.bytes.offset(),
                a, o = i.get(K.of("Length"));
            o instanceof wt ? (a = n + o.asNumber(), this.bytes.moveTo(a), this.skipWhitespaceAndComments(), this.matchKeyword(ai.endstream) || (this.bytes.moveTo(n), a = this.findEndOfStreamFallback(e))) : a = this.findEndOfStreamFallback(e);
            var s = this.bytes.slice(n, a);
            return ds.of(i, s);
        }, r.prototype.findEndOfStreamFallback = function(e) {
            for (var i = 1, n = this.bytes.offset(); !this.bytes.done() && (n = this.bytes.offset(), this.matchKeyword(ai.stream) ? i += 1 : this.matchKeyword(ai.EOF1endstream) || this.matchKeyword(ai.EOF2endstream) || this.matchKeyword(ai.EOF3endstream) || this.matchKeyword(ai.endstream) ? i -= 1 : this.bytes.next(), i !== 0););
            if (i !== 0) throw new _S(e);
            return n;
        }, r.forBytes = function(e, i, n) {
            return new r(Kl.of(e), i, n);
        }, r.forByteStream = function(e, i, n) {
            return n === void 0 && (n = !1), new r(e, i, n);
        }, r;
    }(YS),
    uh = bN;
var wN = function(t) {
        Ge(r, t);

        function r(e, i) {
            var n = t.call(this, Kl.fromPDFRawStream(e), e.dict.context) || this,
                a = e.dict;
            return n.alreadyParsed = !1, n.shouldWaitForTick = i || function() {
                return !1;
            }, n.firstOffset = a.lookup(K.of("First"), wt).asNumber(), n.objectCount = a.lookup(K.of("N"), wt).asNumber(), n;
        }
        return r.prototype.parseIntoContext = function() {
            return Rt(this, void 0, void 0, function() {
                var e, i, n, a, o, s, l, c;
                return Mt(this, function(u) {
                    switch (u.label) {
                        case 0:
                            if (this.alreadyParsed) throw new Q0("PDFObjectStreamParser", "parseIntoContext");
                            this.alreadyParsed = !0, e = this.parseOffsetsAndObjectNumbers(), i = 0, n = e.length, u.label = 1;
                        case 1:
                            return i < n ? (a = e[i], o = a.objectNumber, s = a.offset, this.bytes.moveTo(this.firstOffset + s), l = this.parseObject(), c = tr.of(o, 0), this.context.assign(c, l), this.shouldWaitForTick() ? [4, hs()] : [3, 3]) : [3, 4];
                        case 2:
                            u.sent(), u.label = 3;
                        case 3:
                            return i++, [3, 1];
                        case 4:
                            return [2];
                    }
                });
            });
        }, r.prototype.parseOffsetsAndObjectNumbers = function() {
            for (var e = [], i = 0, n = this.objectCount; i < n; i++) {
                this.skipWhitespaceAndComments();
                var a = this.parseRawInt();
                this.skipWhitespaceAndComments();
                var o = this.parseRawInt();
                e.push({
                    objectNumber: a,
                    offset: o
                });
            }
            return e;
        }, r.forStream = function(e, i) {
            return new r(e, i);
        }, r;
    }(uh),
    _v = wN;
var SN = function() {
        function t(r) {
            this.alreadyParsed = !1, this.dict = r.dict, this.bytes = Kl.fromPDFRawStream(r), this.context = this.dict.context;
            var e = this.dict.lookup(K.of("Size"), wt),
                i = this.dict.lookup(K.of("Index"));
            if (i instanceof $t) {
                this.subsections = [];
                for (var n = 0, a = i.size(); n < a; n += 2) {
                    var o = i.lookup(n + 0, wt).asNumber(),
                        s = i.lookup(n + 1, wt).asNumber();
                    this.subsections.push({
                        firstObjectNumber: o,
                        length: s
                    });
                }
            } else this.subsections = [{
                firstObjectNumber: 0,
                length: e.asNumber()
            }];
            var l = this.dict.lookup(K.of("W"), $t);
            this.byteWidths = [-1, -1, -1];
            for (var n = 0, a = l.size(); n < a; n++) this.byteWidths[n] = l.lookup(n, wt).asNumber();
        }
        return t.prototype.parseIntoContext = function() {
            if (this.alreadyParsed) throw new Q0("PDFXRefStreamParser", "parseIntoContext");
            this.alreadyParsed = !0, this.context.trailerInfo = {
                Root: this.dict.get(K.of("Root")),
                Encrypt: this.dict.get(K.of("Encrypt")),
                Info: this.dict.get(K.of("Info")),
                ID: this.dict.get(K.of("ID"))
            };
            var r = this.parseEntries();
            return r;
        }, t.prototype.parseEntries = function() {
            for (var r = [], e = this.byteWidths, i = e[0], n = e[1], a = e[2], o = 0, s = this.subsections.length; o < s; o++)
                for (var l = this.subsections[o], c = l.firstObjectNumber, u = l.length, h = 0; h < u; h++) {
                    for (var d = 0, f = 0, m = i; f < m; f++) d = d << 8 | this.bytes.next();
                    for (var _ = 0, f = 0, m = n; f < m; f++) _ = _ << 8 | this.bytes.next();
                    for (var x = 0, f = 0, m = a; f < m; f++) x = x << 8 | this.bytes.next();
                    i === 0 && (d = 1);
                    var g = c + h,
                        b = {
                            ref: tr.of(g, x),
                            offset: _,
                            deleted: d === 0,
                            inObjectStream: d === 2
                        };
                    r.push(b);
                }
            return r;
        }, t.forStream = function(r) {
            return new t(r);
        }, t;
    }(),
    yv = SN;
var CN = function(t) {
        Ge(r, t);

        function r(e, i, n, a) {
            i === void 0 && (i = 1 / 0), n === void 0 && (n = !1), a === void 0 && (a = !1);
            var o = t.call(this, Kl.of(e), ru.create(), a) || this;
            return o.alreadyParsed = !1, o.parsedObjects = 0, o.shouldWaitForTick = function() {
                return o.parsedObjects += 1, o.parsedObjects % o.objectsPerTick === 0;
            }, o.objectsPerTick = i, o.throwOnInvalidObject = n, o;
        }
        return r.prototype.parseDocument = function() {
            return Rt(this, void 0, void 0, function() {
                var e, i;
                return Mt(this, function(n) {
                    switch (n.label) {
                        case 0:
                            if (this.alreadyParsed) throw new Q0("PDFParser", "parseDocument");
                            this.alreadyParsed = !0, this.context.header = this.parseHeader(), n.label = 1;
                        case 1:
                            return this.bytes.done() ? [3, 3] : [4, this.parseDocumentSection()];
                        case 2:
                            if (n.sent(), i = this.bytes.offset(), i === e) throw new bS(this.bytes.position());
                            return e = i, [3, 1];
                        case 3:
                            return this.maybeRecoverRoot(), this.context.lookup(tr.of(0)) && (console.warn("Removing parsed object: 0 0 R"), this.context.delete(tr.of(0))), [2, this.context];
                    }
                });
            });
        }, r.prototype.maybeRecoverRoot = function() {
            var e = function(u) {
                    return u instanceof At && u.lookup(K.of("Type")) === K.of("Catalog");
                },
                i = this.context.lookup(this.context.trailerInfo.Root);
            if (!e(i))
                for (var n = this.context.enumerateIndirectObjects(), a = 0, o = n.length; a < o; a++) {
                    var s = n[a],
                        l = s[0],
                        c = s[1];
                    e(c) && (this.context.trailerInfo.Root = l);
                }
        }, r.prototype.parseHeader = function() {
            for (; !this.bytes.done();) {
                if (this.matchKeyword(ai.header)) {
                    var e = this.parseRawInt();
                    this.bytes.assertNext(ie.Period);
                    var i = this.parseRawInt(),
                        n = Ys.forVersion(e, i);
                    return this.skipBinaryHeaderComment(), n;
                }
                this.bytes.next();
            }
            throw new wS(this.bytes.position());
        }, r.prototype.parseIndirectObjectHeader = function() {
            this.skipWhitespaceAndComments();
            var e = this.parseRawInt();
            this.skipWhitespaceAndComments();
            var i = this.parseRawInt();
            if (this.skipWhitespaceAndComments(), !this.matchKeyword(ai.obj)) throw new SS(this.bytes.position(), ai.obj);
            return tr.of(e, i);
        }, r.prototype.matchIndirectObjectHeader = function() {
            var e = this.bytes.offset();
            try {
                return this.parseIndirectObjectHeader(), !0;
            } catch {
                return this.bytes.moveTo(e), !1;
            }
        }, r.prototype.parseIndirectObject = function() {
            return Rt(this, void 0, void 0, function() {
                var e, i;
                return Mt(this, function(n) {
                    switch (n.label) {
                        case 0:
                            return e = this.parseIndirectObjectHeader(), this.skipWhitespaceAndComments(), i = this.parseObject(), this.skipWhitespaceAndComments(), this.matchKeyword(ai.endobj), i instanceof ds && i.dict.lookup(K.of("Type")) === K.of("ObjStm") ? [4, _v.forStream(i, this.shouldWaitForTick).parseIntoContext()] : [3, 2];
                        case 1:
                            return n.sent(), [3, 3];
                        case 2:
                            i instanceof ds && i.dict.lookup(K.of("Type")) === K.of("XRef") ? yv.forStream(i).parseIntoContext() : this.context.assign(e, i), n.label = 3;
                        case 3:
                            return [2, e];
                    }
                });
            });
        }, r.prototype.tryToParseInvalidIndirectObject = function() {
            var e = this.bytes.position(),
                i = "Trying to parse invalid object: " + JSON.stringify(e) + ")";
            if (this.throwOnInvalidObject) throw new Error(i);
            console.warn(i);
            var n = this.parseIndirectObjectHeader();
            console.warn("Invalid object ref: " + n), this.skipWhitespaceAndComments();
            for (var a = this.bytes.offset(), o = !0; !this.bytes.done() && (this.matchKeyword(ai.endobj) && (o = !1), !!o);) this.bytes.next();
            if (o) throw new xS(e);
            var s = this.bytes.offset() - ai.endobj.length,
                l = Gf.of(this.bytes.slice(a, s));
            return this.context.assign(n, l), n;
        }, r.prototype.parseIndirectObjects = function() {
            return Rt(this, void 0, void 0, function() {
                var e, i;
                return Mt(this, function(n) {
                    switch (n.label) {
                        case 0:
                            this.skipWhitespaceAndComments(), n.label = 1;
                        case 1:
                            if (!(!this.bytes.done() && Dn[this.bytes.peek()])) return [3, 8];
                            e = this.bytes.offset(), n.label = 2;
                        case 2:
                            return n.trys.push([2, 4, , 5]), [4, this.parseIndirectObject()];
                        case 3:
                            return n.sent(), [3, 5];
                        case 4:
                            return i = n.sent(), this.bytes.moveTo(e), this.tryToParseInvalidIndirectObject(), [3, 5];
                        case 5:
                            return this.skipWhitespaceAndComments(), this.skipJibberish(), this.shouldWaitForTick() ? [4, hs()] : [3, 7];
                        case 6:
                            n.sent(), n.label = 7;
                        case 7:
                            return [3, 1];
                        case 8:
                            return [2];
                    }
                });
            });
        }, r.prototype.maybeParseCrossRefSection = function() {
            if (this.skipWhitespaceAndComments(), !!this.matchKeyword(ai.xref)) {
                this.skipWhitespaceAndComments();
                for (var e = -1, i = Wf.createEmpty(); !this.bytes.done() && Dn[this.bytes.peek()];) {
                    var n = this.parseRawInt();
                    this.skipWhitespaceAndComments();
                    var a = this.parseRawInt();
                    this.skipWhitespaceAndComments();
                    var o = this.bytes.peek();
                    if (o === ie.n || o === ie.f) {
                        var s = tr.of(e, a);
                        this.bytes.next() === ie.n ? i.addEntry(s, n) : i.addDeletedEntry(s, n), e += 1;
                    } else e = n;
                    this.skipWhitespaceAndComments();
                }
                return i;
            }
        }, r.prototype.maybeParseTrailerDict = function() {
            if (this.skipWhitespaceAndComments(), !!this.matchKeyword(ai.trailer)) {
                this.skipWhitespaceAndComments();
                var e = this.parseDict(),
                    i = this.context;
                i.trailerInfo = {
                    Root: e.get(K.of("Root")) || i.trailerInfo.Root,
                    Encrypt: e.get(K.of("Encrypt")) || i.trailerInfo.Encrypt,
                    Info: e.get(K.of("Info")) || i.trailerInfo.Info,
                    ID: e.get(K.of("ID")) || i.trailerInfo.ID
                };
            }
        }, r.prototype.maybeParseTrailer = function() {
            if (this.skipWhitespaceAndComments(), !!this.matchKeyword(ai.startxref)) {
                this.skipWhitespaceAndComments();
                var e = this.parseRawInt();
                return this.skipWhitespace(), this.matchKeyword(ai.eof), this.skipWhitespaceAndComments(), this.matchKeyword(ai.eof), this.skipWhitespaceAndComments(), qc.forLastCrossRefSectionOffset(e);
            }
        }, r.prototype.parseDocumentSection = function() {
            return Rt(this, void 0, void 0, function() {
                return Mt(this, function(e) {
                    switch (e.label) {
                        case 0:
                            return [4, this.parseIndirectObjects()];
                        case 1:
                            return e.sent(), this.maybeParseCrossRefSection(), this.maybeParseTrailerDict(), this.maybeParseTrailer(), this.skipJibberish(), [2];
                    }
                });
            });
        }, r.prototype.skipJibberish = function() {
            for (this.skipWhitespaceAndComments(); !this.bytes.done();) {
                var e = this.bytes.offset(),
                    i = this.bytes.peek(),
                    n = i >= ie.Space && i <= ie.Tilde;
                if (n && (this.matchKeyword(ai.xref) || this.matchKeyword(ai.trailer) || this.matchKeyword(ai.startxref) || this.matchIndirectObjectHeader())) {
                    this.bytes.moveTo(e);
                    break;
                }
                this.bytes.next();
            }
        }, r.prototype.skipBinaryHeaderComment = function() {
            this.skipWhitespaceAndComments();
            try {
                var e = this.bytes.offset();
                this.parseIndirectObjectHeader(), this.bytes.moveTo(e);
            } catch {
                this.bytes.next(), this.skipWhitespaceAndComments();
            }
        }, r.forBytesWithOptions = function(e, i, n, a) {
            return new r(e, i, n, a);
        }, r;
    }(uh),
    bv = CN;
var ms = function(t) {
        return 1 << t;
    },
    fh = function(t) {
        return t[t.Invisible = ms(0)] = "Invisible", t[t.Hidden = ms(1)] = "Hidden", t[t.Print = ms(2)] = "Print", t[t.NoZoom = ms(3)] = "NoZoom", t[t.NoRotate = ms(4)] = "NoRotate", t[t.NoView = ms(5)] = "NoView", t[t.ReadOnly = ms(6)] = "ReadOnly", t[t.Locked = ms(7)] = "Locked", t[t.ToggleNoView = ms(8)] = "ToggleNoView", t[t.LockedContents = ms(9)] = "LockedContents", t;
    }(fh || {});
var hh = function(t) {
        return t instanceof K ? t : K.of(t);
    },
    sr = function(t) {
        return t instanceof wt ? t : wt.of(t);
    },
    xr = function(t) {
        return t instanceof wt ? t.asNumber() : t;
    };
var h1 = function(t) {
    return t.Degrees = "degrees", t.Radians = "radians", t;
}(h1 || {});
var Wt = function(t) {
        return ke(t, "degreeAngle", ["number"]), {
            type: h1.Degrees,
            angle: t
        };
    },
    ZS = h1.Radians,
    JS = h1.Degrees,
    wv = function(t) {
        return t * Math.PI / 180;
    },
    AN = function(t) {
        return t * 180 / Math.PI;
    },
    On = function(t) {
        return t.type === ZS ? t.angle : t.type === JS ? wv(t.angle) : jc("Invalid rotation: " + JSON.stringify(t));
    },
    d1 = function(t) {
        return t.type === ZS ? AN(t.angle) : t.type === JS ? t.angle : jc("Invalid rotation: " + JSON.stringify(t));
    },
    zo = function(t) {
        t === void 0 && (t = 0);
        var r = t / 90 % 4;
        return r === 0 ? 0 : r === 1 ? 90 : r === 2 ? 180 : r === 3 ? 270 : 0;
    },
    Qs = function(t, r) {
        r === void 0 && (r = 0);
        var e = zo(r);
        return e === 90 || e === 270 ? {
            width: t.height,
            height: t.width
        } : {
            width: t.width,
            height: t.height
        };
    },
    QS = function(t, r, e) {
        r === void 0 && (r = 0), e === void 0 && (e = 0);
        var i = t.x,
            n = t.y,
            a = t.width,
            o = t.height,
            s = zo(e),
            l = r / 2;
        return s === 0 ? {
            x: i - l,
            y: n - l,
            width: a,
            height: o
        } : s === 90 ? {
            x: i - o + l,
            y: n - l,
            width: o,
            height: a
        } : s === 180 ? {
            x: i - a + l,
            y: n - o + l,
            width: a,
            height: o
        } : s === 270 ? {
            x: i - l,
            y: n - a + l,
            width: o,
            height: a
        } : {
            x: i - l,
            y: n - l,
            width: a,
            height: o
        };
    };
var Sv = function() {
    return Nr.of(Mr.ClipNonZero);
};
var p1 = Math.cos,
    m1 = Math.sin,
    g1 = Math.tan,
    v1 = function(t, r, e, i, n, a) {
        return Nr.of(Mr.ConcatTransformationMatrix, [sr(t), sr(r), sr(e), sr(i), sr(n), sr(a)]);
    },
    ba = function(t, r) {
        return v1(1, 0, 0, 1, t, r);
    },
    $c = function(t, r) {
        return v1(t, 0, 0, r, 0, 0);
    },
    e0 = function(t) {
        return v1(p1(xr(t)), m1(xr(t)), -m1(xr(t)), p1(xr(t)), 0, 0);
    },
    dh = function(t) {
        return e0(wv(xr(t)));
    },
    x1 = function(t, r) {
        return v1(1, g1(xr(t)), g1(xr(r)), 1, 0, 0);
    };
var ph = function(t, r) {
    return Nr.of(Mr.SetLineDashPattern, ["[" + t.map(sr).join(" ") + "]", sr(r)]);
};
var ou = function(t) {
        return t[t.Butt = 0] = "Butt", t[t.Round = 1] = "Round", t[t.Projecting = 2] = "Projecting", t;
    }(ou || {}),
    mh = function(t) {
        return Nr.of(Mr.SetLineCapStyle, [sr(t)]);
    };
var Yl = function(t) {
        return Nr.of(Mr.SetGraphicsStateParams, [hh(t)]);
    },
    Hi = function() {
        return Nr.of(Mr.PushGraphicsState);
    },
    Gi = function() {
        return Nr.of(Mr.PopGraphicsState);
    },
    su = function(t) {
        return Nr.of(Mr.SetLineWidth, [sr(t)]);
    },
    wa = function(t, r, e, i, n, a) {
        return Nr.of(Mr.AppendBezierCurve, [sr(t), sr(r), sr(e), sr(i), sr(n), sr(a)]);
    },
    gh = function(t, r, e, i) {
        return Nr.of(Mr.CurveToReplicateInitialPoint, [sr(t), sr(r), sr(e), sr(i)]);
    },
    gs = function() {
        return Nr.of(Mr.ClosePath);
    },
    po = function(t, r) {
        return Nr.of(Mr.MoveTo, [sr(t), sr(r)]);
    },
    mn = function(t, r) {
        return Nr.of(Mr.LineTo, [sr(t), sr(r)]);
    };
var lu = function() {
        return Nr.of(Mr.StrokePath);
    },
    _1 = function() {
        return Nr.of(Mr.FillNonZero);
    },
    y1 = function() {
        return Nr.of(Mr.FillNonZeroAndStroke);
    },
    Cv = function() {
        return Nr.of(Mr.EndPath);
    },
    $S = function() {
        return Nr.of(Mr.NextLine);
    };
var Av = function(t) {
        return Nr.of(Mr.ShowText, [t]);
    },
    Tv = function() {
        return Nr.of(Mr.BeginText);
    },
    Dv = function() {
        return Nr.of(Mr.EndText);
    },
    vh = function(t, r) {
        return Nr.of(Mr.SetFontAndSize, [hh(t), sr(r)]);
    };
var e4 = function(t) {
    return Nr.of(Mr.SetTextLineHeight, [sr(t)]);
};
var TN = function(t, r, e, i, n, a) {
        return Nr.of(Mr.SetTextMatrix, [sr(t), sr(r), sr(e), sr(i), sr(n), sr(a)]);
    },
    kv = function(t, r, e, i, n) {
        return TN(p1(xr(t)), m1(xr(t)) + g1(xr(r)), -m1(xr(t)) + g1(xr(e)), p1(xr(t)), i, n);
    };
var xh = function(t) {
        return Nr.of(Mr.DrawObject, [hh(t)]);
    },
    t4 = function(t) {
        return Nr.of(Mr.NonStrokingColorGray, [sr(t)]);
    },
    r4 = function(t) {
        return Nr.of(Mr.StrokingColorGray, [sr(t)]);
    },
    i4 = function(t, r, e) {
        return Nr.of(Mr.NonStrokingColorRgb, [sr(t), sr(r), sr(e)]);
    },
    n4 = function(t, r, e) {
        return Nr.of(Mr.StrokingColorRgb, [sr(t), sr(r), sr(e)]);
    },
    a4 = function(t, r, e, i) {
        return Nr.of(Mr.NonStrokingColorCmyk, [sr(t), sr(r), sr(e), sr(i)]);
    },
    o4 = function(t, r, e, i) {
        return Nr.of(Mr.StrokingColorCmyk, [sr(t), sr(r), sr(e), sr(i)]);
    },
    Fv = function(t) {
        return Nr.of(Mr.BeginMarkedContent, [hh(t)]);
    },
    Ev = function() {
        return Nr.of(Mr.EndMarkedContent);
    };
var t0 = function(t) {
        return t.Grayscale = "Grayscale", t.RGB = "RGB", t.CMYK = "CMYK", t;
    }(t0 || {}),
    Pv = function(t) {
        return aa(t, "gray", 0, 1), {
            type: t0.Grayscale,
            gray: t
        };
    },
    Lr = function(t, r, e) {
        return aa(t, "red", 0, 1), aa(r, "green", 0, 1), aa(e, "blue", 0, 1), {
            type: t0.RGB,
            red: t,
            green: r,
            blue: e
        };
    },
    Iv = function(t, r, e, i) {
        return aa(t, "cyan", 0, 1), aa(r, "magenta", 0, 1), aa(e, "yellow", 0, 1), aa(i, "key", 0, 1), {
            type: t0.CMYK,
            cyan: t,
            magenta: r,
            yellow: e,
            key: i
        };
    },
    Ov = t0.Grayscale,
    Nv = t0.RGB,
    Lv = t0.CMYK,
    vs = function(t) {
        return t.type === Ov ? t4(t.gray) : t.type === Nv ? i4(t.red, t.green, t.blue) : t.type === Lv ? a4(t.cyan, t.magenta, t.yellow, t.key) : jc("Invalid color: " + JSON.stringify(t));
    },
    cu = function(t) {
        return t.type === Ov ? r4(t.gray) : t.type === Nv ? n4(t.red, t.green, t.blue) : t.type === Lv ? o4(t.cyan, t.magenta, t.yellow, t.key) : jc("Invalid color: " + JSON.stringify(t));
    },
    sa = function(t, r) {
        return r === void 0 && (r = 1), t ? .length === 1 ? Pv(t[0] * r) : t ? .length === 3 ? Lr(t[0] * r, t[1] * r, t[2] * r) : t ? .length === 4 ? Iv(t[0] * r, t[1] * r, t[2] * r, t[3] * r) : void 0;
    },
    Rv = function(t) {
        return t.type === Ov ? [t.gray] : t.type === Nv ? [t.red, t.green, t.blue] : t.type === Lv ? [t.cyan, t.magenta, t.yellow, t.key] : jc("Invalid color: " + JSON.stringify(t));
    };
var jt = 0,
    Ht = 0,
    Ur = 0,
    Vr = 0,
    _h = 0,
    yh = 0,
    s4 = new Map([
        ["A", 7],
        ["a", 7],
        ["C", 6],
        ["c", 6],
        ["H", 1],
        ["h", 1],
        ["L", 2],
        ["l", 2],
        ["M", 2],
        ["m", 2],
        ["Q", 4],
        ["q", 4],
        ["S", 4],
        ["s", 4],
        ["T", 2],
        ["t", 2],
        ["V", 1],
        ["v", 1],
        ["Z", 0],
        ["z", 0]
    ]),
    DN = function(t) {
        for (var r, e = [], i = [], n = "", a = !1, o = 0, s = 0, l = t; s < l.length; s++) {
            var c = l[s];
            if (s4.has(c)) o = s4.get(c), r && (n.length > 0 && (i[i.length] = +n), e[e.length] = {
                cmd: r,
                args: i
            }, i = [], n = "", a = !1), r = c;
            else if ([" ", ","].includes(c) || c === "-" && n.length > 0 && n[n.length - 1] !== "e" || c === "." && a) {
                if (n.length === 0) continue;
                i.length === o ? (e[e.length] = {
                    cmd: r,
                    args: i
                }, i = [+n], r === "M" && (r = "L"), r === "m" && (r = "l")) : i[i.length] = +n, a = c === ".", n = ["-", "."].includes(c) ? c : "";
            } else n += c, c === "." && (a = !0);
        }
        return n.length > 0 && (i.length === o ? (e[e.length] = {
            cmd: r,
            args: i
        }, i = [+n], r === "M" && (r = "L"), r === "m" && (r = "l")) : i[i.length] = +n), e[e.length] = {
            cmd: r,
            args: i
        }, e;
    },
    kN = function(t) {
        jt = Ht = Ur = Vr = _h = yh = 0;
        for (var r = [], e = 0; e < t.length; e++) {
            var i = t[e];
            if (i.cmd && typeof l4[i.cmd] == "function") {
                var n = l4[i.cmd](i.args);
                Array.isArray(n) ? r = r.concat(n) : r.push(n);
            }
        }
        return r;
    },
    l4 = {
        M: function(t) {
            return jt = t[0], Ht = t[1], Ur = Vr = null, _h = jt, yh = Ht, po(jt, Ht);
        },
        m: function(t) {
            return jt += t[0], Ht += t[1], Ur = Vr = null, _h = jt, yh = Ht, po(jt, Ht);
        },
        C: function(t) {
            return jt = t[4], Ht = t[5], Ur = t[2], Vr = t[3], wa(t[0], t[1], t[2], t[3], t[4], t[5]);
        },
        c: function(t) {
            var r = wa(t[0] + jt, t[1] + Ht, t[2] + jt, t[3] + Ht, t[4] + jt, t[5] + Ht);
            return Ur = jt + t[2], Vr = Ht + t[3], jt += t[4], Ht += t[5], r;
        },
        S: function(t) {
            (Ur === null || Vr === null) && (Ur = jt, Vr = Ht);
            var r = wa(jt - (Ur - jt), Ht - (Vr - Ht), t[0], t[1], t[2], t[3]);
            return Ur = t[0], Vr = t[1], jt = t[2], Ht = t[3], r;
        },
        s: function(t) {
            (Ur === null || Vr === null) && (Ur = jt, Vr = Ht);
            var r = wa(jt - (Ur - jt), Ht - (Vr - Ht), jt + t[0], Ht + t[1], jt + t[2], Ht + t[3]);
            return Ur = jt + t[0], Vr = Ht + t[1], jt += t[2], Ht += t[3], r;
        },
        Q: function(t) {
            return Ur = t[0], Vr = t[1], jt = t[2], Ht = t[3], gh(t[0], t[1], jt, Ht);
        },
        q: function(t) {
            var r = gh(t[0] + jt, t[1] + Ht, t[2] + jt, t[3] + Ht);
            return Ur = jt + t[0], Vr = Ht + t[1], jt += t[2], Ht += t[3], r;
        },
        T: function(t) {
            Ur === null || Vr === null ? (Ur = jt, Vr = Ht) : (Ur = jt - (Ur - jt), Vr = Ht - (Vr - Ht));
            var r = gh(Ur, Vr, t[0], t[1]);
            return Ur = jt - (Ur - jt), Vr = Ht - (Vr - Ht), jt = t[0], Ht = t[1], r;
        },
        t: function(t) {
            Ur === null || Vr === null ? (Ur = jt, Vr = Ht) : (Ur = jt - (Ur - jt), Vr = Ht - (Vr - Ht));
            var r = gh(Ur, Vr, jt + t[0], Ht + t[1]);
            return jt += t[0], Ht += t[1], r;
        },
        A: function(t) {
            var r = c4(jt, Ht, t);
            return jt = t[5], Ht = t[6], r;
        },
        a: function(t) {
            t[5] += jt, t[6] += Ht;
            var r = c4(jt, Ht, t);
            return jt = t[5], Ht = t[6], r;
        },
        L: function(t) {
            return jt = t[0], Ht = t[1], Ur = Vr = null, mn(jt, Ht);
        },
        l: function(t) {
            return jt += t[0], Ht += t[1], Ur = Vr = null, mn(jt, Ht);
        },
        H: function(t) {
            return jt = t[0], Ur = Vr = null, mn(jt, Ht);
        },
        h: function(t) {
            return jt += t[0], Ur = Vr = null, mn(jt, Ht);
        },
        V: function(t) {
            return Ht = t[0], Ur = Vr = null, mn(jt, Ht);
        },
        v: function(t) {
            return Ht += t[0], Ur = Vr = null, mn(jt, Ht);
        },
        Z: function() {
            var t = gs();
            return jt = _h, Ht = yh, t;
        },
        z: function() {
            var t = gs();
            return jt = _h, Ht = yh, t;
        }
    },
    c4 = function(t, r, e) {
        for (var i = e[0], n = e[1], a = e[2], o = e[3], s = e[4], l = e[5], c = e[6], u = FN(l, c, i, n, o, s, a, t, r), h = [], d = 0, f = u; d < f.length; d++) {
            var m = f[d],
                _ = EN.apply(void 0, m);
            h.push(wa.apply(void 0, _));
        }
        return h;
    },
    FN = function(t, r, e, i, n, a, o, s, l) {
        var c = o * (Math.PI / 180),
            u = Math.sin(c),
            h = Math.cos(c);
        e = Math.abs(e), i = Math.abs(i), Ur = h * (s - t) * .5 + u * (l - r) * .5, Vr = h * (l - r) * .5 - u * (s - t) * .5;
        var d = Ur * Ur / (e * e) + Vr * Vr / (i * i);
        d > 1 && (d = Math.sqrt(d), e *= d, i *= d);
        var f = h / e,
            m = u / e,
            _ = -u / i,
            x = h / i,
            g = f * s + m * l,
            b = _ * s + x * l,
            w = f * t + m * r,
            T = _ * t + x * r,
            E = (w - g) * (w - g) + (T - b) * (T - b),
            L = 1 / E - .25;
        L < 0 && (L = 0);
        var P = Math.sqrt(L);
        a === n && (P = -P);
        var k = .5 * (g + w) - P * (T - b),
            A = .5 * (b + T) + P * (w - g),
            N = Math.atan2(b - A, g - k),
            C = Math.atan2(T - A, w - k),
            F = C - N;
        F < 0 && a === 1 ? F += 2 * Math.PI : F > 0 && a === 0 && (F -= 2 * Math.PI);
        for (var W = Math.ceil(Math.abs(F / (Math.PI * .5 + .001))), I = [], U = 0; U < W; U++) {
            var le = N + U * F / W,
                H = N + (U + 1) * F / W;
            I[U] = [k, A, le, H, e, i, u, h];
        }
        return I;
    },
    EN = function(t, r, e, i, n, a, o, s) {
        var l = s * n,
            c = -o * a,
            u = o * n,
            h = s * a,
            d = .5 * (i - e),
            f = 8 / 3 * Math.sin(d * .5) * Math.sin(d * .5) / Math.sin(d),
            m = t + Math.cos(e) - f * Math.sin(e),
            _ = r + Math.sin(e) + f * Math.cos(e),
            x = t + Math.cos(i),
            g = r + Math.sin(i),
            b = x + f * Math.sin(i),
            w = g - f * Math.cos(i),
            T = [l * m + c * _, u * m + h * _, l * b + c * w, u * b + h * w, l * x + c * g, u * x + h * g];
        return T;
    },
    u4 = function(t) {
        return kN(DN(t));
    };
var f4 = function(t, r) {
        for (var e = [Hi(), r.graphicsState && Yl(r.graphicsState), Tv(), vs(r.color), vh(r.font, r.size), e4(r.lineHeight), kv(On(r.rotate), On(r.xSkew), On(r.ySkew), r.x, r.y)].filter(Boolean), i = 0, n = t.length; i < n; i++) e.push(Av(t[i]), $S());
        return e.push(Dv(), Gi()), e;
    },
    S1 = function(t, r) {
        return [Hi(), r.graphicsState && Yl(r.graphicsState), ba(r.x, r.y), e0(On(r.rotate)), $c(r.width, r.height), x1(On(r.xSkew), On(r.ySkew)), xh(t), Gi()].filter(Boolean);
    },
    h4 = function(t, r) {
        return [Hi(), r.graphicsState && Yl(r.graphicsState), ba(r.x, r.y), e0(On(r.rotate)), $c(r.xScale, r.yScale), x1(On(r.xSkew), On(r.ySkew)), xh(t), Gi()].filter(Boolean);
    },
    d4 = function(t) {
        var r, e;
        return [Hi(), t.graphicsState && Yl(t.graphicsState), t.color && cu(t.color), su(t.thickness), ph((r = t.dashArray) !== null && r !== void 0 ? r : [], (e = t.dashPhase) !== null && e !== void 0 ? e : 0), po(t.start.x, t.start.y), t.lineCap && mh(t.lineCap), po(t.start.x, t.start.y), mn(t.end.x, t.end.y), lu(), Gi()].filter(Boolean);
    },
    r0 = function(t) {
        var r, e;
        return [Hi(), t.graphicsState && Yl(t.graphicsState), t.color && vs(t.color), t.borderColor && cu(t.borderColor), su(t.borderWidth), t.borderLineCap && mh(t.borderLineCap), ph((r = t.borderDashArray) !== null && r !== void 0 ? r : [], (e = t.borderDashPhase) !== null && e !== void 0 ? e : 0), ba(t.x, t.y), e0(On(t.rotate)), x1(On(t.xSkew), On(t.ySkew)), po(0, 0), mn(0, t.height), mn(t.width, t.height), mn(t.width, 0), gs(), t.color && t.borderWidth ? y1() : t.color ? _1() : t.borderColor ? lu() : gs(), Gi()].filter(Boolean);
    },
    b1 = 4 * ((Math.sqrt(2) - 1) / 3),
    PN = function(t) {
        var r = xr(t.x),
            e = xr(t.y),
            i = xr(t.xScale),
            n = xr(t.yScale);
        r -= i, e -= n;
        var a = i * b1,
            o = n * b1,
            s = r + i * 2,
            l = e + n * 2,
            c = r + i,
            u = e + n;
        return [Hi(), po(r, u), wa(r, u - o, c - a, e, c, e), wa(c + a, e, s, u - o, s, u), wa(s, u + o, c + a, l, c, l), wa(c - a, l, r, u + o, r, u), Gi()];
    },
    IN = function(t) {
        var r = xr(t.x),
            e = xr(t.y),
            i = xr(t.xScale),
            n = xr(t.yScale),
            a = -i,
            o = -n,
            s = i * b1,
            l = n * b1,
            c = a + i * 2,
            u = o + n * 2,
            h = a + i,
            d = o + n;
        return [ba(r, e), e0(On(t.rotate)), po(a, d), wa(a, d - l, h - s, o, h, o), wa(h + s, o, c, d - l, c, d), wa(c, d + l, h + s, u, h, u), wa(h - s, u, a, d + l, a, d)];
    },
    w1 = function(t) {
        var r, e, i;
        return Ar([Hi(), t.graphicsState && Yl(t.graphicsState), t.color && vs(t.color), t.borderColor && cu(t.borderColor), su(t.borderWidth), t.borderLineCap && mh(t.borderLineCap), ph((r = t.borderDashArray) !== null && r !== void 0 ? r : [], (e = t.borderDashPhase) !== null && e !== void 0 ? e : 0)], t.rotate === void 0 ? PN({
            x: t.x,
            y: t.y,
            xScale: t.xScale,
            yScale: t.yScale
        }) : IN({
            x: t.x,
            y: t.y,
            xScale: t.xScale,
            yScale: t.yScale,
            rotate: (i = t.rotate) !== null && i !== void 0 ? i : Wt(0)
        }), [t.color && t.borderWidth ? y1() : t.color ? _1() : t.borderColor ? lu() : gs(), Gi()]).filter(Boolean);
    },
    p4 = function(t, r) {
        var e, i, n;
        return Ar([Hi(), r.graphicsState && Yl(r.graphicsState), ba(r.x, r.y), e0(On((e = r.rotate) !== null && e !== void 0 ? e : Wt(0))), r.scale ? $c(r.scale, -r.scale) : $c(1, -1), r.color && vs(r.color), r.borderColor && cu(r.borderColor), r.borderWidth && su(r.borderWidth), r.borderLineCap && mh(r.borderLineCap), ph((i = r.borderDashArray) !== null && i !== void 0 ? i : [], (n = r.borderDashPhase) !== null && n !== void 0 ? n : 0)], u4(t), [r.color && r.borderWidth ? y1() : r.color ? _1() : r.borderColor ? lu() : gs(), Gi()]).filter(Boolean);
    },
    ON = function(t) {
        var r = xr(t.size),
            e = -1 + .75,
            i = -1 + .51,
            n = 1 - .525,
            a = 1 - .31,
            o = -1 + .325,
            s = -((o - e) * (a - e)) / (n - i) + i;
        return [Hi(), t.color && cu(t.color), su(t.thickness), ba(t.x, t.y), po(o * r, s * r), mn(e * r, i * r), mn(a * r, n * r), lu(), Gi()].filter(Boolean);
    },
    Wo = function(t) {
        return t.rotation === 0 ? [ba(0, 0), dh(0)] : t.rotation === 90 ? [ba(t.width, 0), dh(90)] : t.rotation === 180 ? [ba(t.width, t.height), dh(180)] : t.rotation === 270 ? [ba(0, t.height), dh(270)] : [];
    },
    bh = function(t) {
        var r = r0({
            x: t.x,
            y: t.y,
            width: t.width,
            height: t.height,
            borderWidth: t.borderWidth,
            color: t.color,
            borderColor: t.borderColor,
            rotate: Wt(0),
            xSkew: Wt(0),
            ySkew: Wt(0)
        });
        if (!t.filled) return r;
        var e = xr(t.width),
            i = xr(t.height),
            n = Math.min(e, i) / 2,
            a = ON({
                x: e / 2,
                y: i / 2,
                size: n,
                thickness: t.thickness,
                color: t.markColor
            });
        return Ar([Hi()], r, a, [Gi()]);
    },
    wh = function(t) {
        var r = xr(t.width),
            e = xr(t.height),
            i = Math.min(r, e) / 2,
            n = w1({
                x: t.x,
                y: t.y,
                xScale: i,
                yScale: i,
                color: t.color,
                borderColor: t.borderColor,
                borderWidth: t.borderWidth
            });
        if (!t.filled) return n;
        var a = w1({
            x: t.x,
            y: t.y,
            xScale: i * .45,
            yScale: i * .45,
            color: t.dotColor,
            borderColor: void 0,
            borderWidth: 0
        });
        return Ar([Hi()], n, a, [Gi()]);
    },
    Mv = function(t) {
        var r = xr(t.x),
            e = xr(t.y),
            i = xr(t.width),
            n = xr(t.height),
            a = r0({
                x: r,
                y: e,
                width: i,
                height: n,
                borderWidth: t.borderWidth,
                color: t.color,
                borderColor: t.borderColor,
                rotate: Wt(0),
                xSkew: Wt(0),
                ySkew: Wt(0)
            }),
            o = Bv(t.textLines, {
                color: t.textColor,
                font: t.font,
                size: t.fontSize,
                rotate: Wt(0),
                xSkew: Wt(0),
                ySkew: Wt(0)
            });
        return Ar([Hi()], a, o, [Gi()]);
    },
    Bv = function(t, r) {
        for (var e = [Tv(), vs(r.color), vh(r.font, r.size)], i = 0, n = t.length; i < n; i++) {
            var a = t[i],
                o = a.encoded,
                s = a.x,
                l = a.y;
            e.push(kv(On(r.rotate), On(r.xSkew), On(r.ySkew), s, l), Av(o));
        }
        return e.push(Dv()), e;
    },
    Uv = function(t) {
        var r = xr(t.x),
            e = xr(t.y),
            i = xr(t.width),
            n = xr(t.height),
            a = xr(t.borderWidth),
            o = xr(t.padding),
            s = r + a / 2 + o,
            l = e + a / 2 + o,
            c = i - (a / 2 + o) * 2,
            u = n - (a / 2 + o) * 2,
            h = [po(s, l), mn(s, l + u), mn(s + c, l + u), mn(s + c, l), gs(), Sv(), Cv()],
            d = r0({
                x: r,
                y: e,
                width: i,
                height: n,
                borderWidth: t.borderWidth,
                color: t.color,
                borderColor: t.borderColor,
                rotate: Wt(0),
                xSkew: Wt(0),
                ySkew: Wt(0)
            }),
            f = Bv(t.textLines, {
                color: t.textColor,
                font: t.font,
                size: t.fontSize,
                rotate: Wt(0),
                xSkew: Wt(0),
                ySkew: Wt(0)
            }),
            m = Ar([Fv("Tx"), Hi()], f, [Gi(), Ev()]);
        return Ar([Hi()], d, h, m, [Gi()]);
    },
    m4 = function(t) {
        for (var r = xr(t.x), e = xr(t.y), i = xr(t.width), n = xr(t.height), a = xr(t.lineHeight), o = xr(t.borderWidth), s = xr(t.padding), l = r + o / 2 + s, c = e + o / 2 + s, u = i - (o / 2 + s) * 2, h = n - (o / 2 + s) * 2, d = [po(l, c), mn(l, c + h), mn(l + u, c + h), mn(l + u, c), gs(), Sv(), Cv()], f = r0({
                x: r,
                y: e,
                width: i,
                height: n,
                borderWidth: t.borderWidth,
                color: t.color,
                borderColor: t.borderColor,
                rotate: Wt(0),
                xSkew: Wt(0),
                ySkew: Wt(0)
            }), m = [], _ = 0, x = t.selectedLines.length; _ < x; _++) {
            var g = t.textLines[t.selectedLines[_]];
            m.push.apply(m, r0({
                x: g.x - s,
                y: g.y - (a - g.height) / 2,
                width: i - o,
                height: g.height + (a - g.height) / 2,
                borderWidth: 0,
                color: t.selectedColor,
                borderColor: void 0,
                rotate: Wt(0),
                xSkew: Wt(0),
                ySkew: Wt(0)
            }));
        }
        var b = Bv(t.textLines, {
                color: t.textColor,
                font: t.font,
                size: t.fontSize,
                rotate: Wt(0),
                xSkew: Wt(0),
                ySkew: Wt(0)
            }),
            w = Ar([Fv("Tx"), Hi()], b, [Gi(), Ev()]);
        return Ar([Hi()], f, m, d, w, [Gi()]);
    };
var g4 = function(t) {
    Ge(r, t);

    function r() {
        var e = this,
            i = "Input document to `PDFDocument.load` is encrypted. You can use `PDFDocument.load(..., { ignoreEncryption: true })` if you wish to load the document anyways.";
        return e = t.call(this, i) || this, e;
    }
    return r;
}(Error);
var v4 = function(t) {
    Ge(r, t);

    function r() {
        var e = this,
            i = "Input to `PDFDocument.embedFont` was a custom font, but no `fontkit` instance was found. You must register a `fontkit` instance with `PDFDocument.registerFontkit(...)` before embedding custom fonts.";
        return e = t.call(this, i) || this, e;
    }
    return r;
}(Error);
var x4 = function(t) {
    Ge(r, t);

    function r() {
        var e = this,
            i = "A `page` passed to `PDFDocument.addPage` or `PDFDocument.insertPage` was from a different (foreign) PDF document. If you want to copy pages from one PDFDocument to another, you must use `PDFDocument.copyPages(...)` to copy the pages before adding or inserting them.";
        return e = t.call(this, i) || this, e;
    }
    return r;
}(Error);
var _4 = function(t) {
    Ge(r, t);

    function r() {
        var e = this,
            i = "PDFDocument has no pages so `PDFDocument.removePage` cannot be called";
        return e = t.call(this, i) || this, e;
    }
    return r;
}(Error);
var y4 = function(t) {
    Ge(r, t);

    function r(e) {
        var i = this,
            n = 'PDFDocument has no form field with the name "' + e + '"';
        return i = t.call(this, n) || this, i;
    }
    return r;
}(Error);
var Zl = function(t) {
    Ge(r, t);

    function r(e, i, n) {
        var a, o, s = this,
            l = i ? .name,
            c = (o = (a = n ? .constructor) === null || a === void 0 ? void 0 : a.name) !== null && o !== void 0 ? o : n,
            u = 'Expected field "' + e + '" to be of type ' + l + ", " + ("but it is actually of type " + c);
        return s = t.call(this, u) || this, s;
    }
    return r;
}(Error);
var VJ = function(t) {
    Ge(r, t);

    function r(e) {
        var i = this,
            n = 'Failed to select check box due to missing onValue: "' + e + '"';
        return i = t.call(this, n) || this, i;
    }
    return r;
}(Error);
var Vv = function(t) {
    Ge(r, t);

    function r(e) {
        var i = this,
            n = 'A field already exists with the specified name: "' + e + '"';
        return i = t.call(this, n) || this, i;
    }
    return r;
}(Error);
var b4 = function(t) {
    Ge(r, t);

    function r(e) {
        var i = this,
            n = 'Field name contains invalid component: "' + e + '"';
        return i = t.call(this, n) || this, i;
    }
    return r;
}(Error);
var zJ = function(t) {
    Ge(r, t);

    function r(e) {
        var i = this,
            n = 'A non-terminal field already exists with the specified name: "' + e + '"';
        return i = t.call(this, n) || this, i;
    }
    return r;
}(Error);
var w4 = function(t) {
    Ge(r, t);

    function r(e) {
        var i = this,
            n = "Reading rich text fields is not supported: Attempted to read rich text field: " + e;
        return i = t.call(this, n) || this, i;
    }
    return r;
}(Error);
var S4 = function(t) {
    Ge(r, t);

    function r(e, i) {
        var n = this,
            a = "Failed to layout combed text as lineLength=" + e + " is greater than cellCount=" + i;
        return n = t.call(this, a) || this, n;
    }
    return r;
}(Error);
var C4 = function(t) {
    Ge(r, t);

    function r(e, i, n) {
        var a = this,
            o = "Attempted to set text with length=" + e + " for TextField with maxLength=" + i + " and name=" + n;
        return a = t.call(this, o) || this, a;
    }
    return r;
}(Error);
var A4 = function(t) {
    Ge(r, t);

    function r(e, i, n) {
        var a = this,
            o = "Attempted to set maxLength=" + i + ", which is less than " + e + ", the length of this field's current value (name=" + n + ")";
        return a = t.call(this, o) || this, a;
    }
    return r;
}(Error);
var en = function(t) {
    return t[t.Left = 0] = "Left", t[t.Center = 1] = "Center", t[t.Right = 2] = "Right", t;
}(en || {});
var T4 = 4,
    D4 = 500,
    k4 = function(t, r, e, i) {
        i === void 0 && (i = !1);
        for (var n = T4; n < D4;) {
            for (var a = 0, o = 0, s = t.length; o < s; o++) {
                a += 1;
                for (var l = t[o], c = l.split(" "), u = e.width, h = 0, d = c.length; h < d; h++) {
                    var f = h === d - 1,
                        m = f ? c[h] : c[h] + " ",
                        _ = r.widthOfTextAtSize(m, n);
                    u -= _, u <= 0 && (a += 1, u = e.width - _);
                }
            }
            if (!i && a > t.length) return n - 1;
            var x = r.heightAtSize(n),
                g = x + x * .2,
                b = g * a;
            if (b > Math.abs(e.height)) return n - 1;
            n += 1;
        }
        return n;
    },
    NN = function(t, r, e, i) {
        for (var n = e.width / i, a = e.height, o = T4, s = w5(t); o < D4;) {
            for (var l = 0, c = s.length; l < c; l++) {
                var u = s[l],
                    h = r.widthOfTextAtSize(u, o) > n * .75;
                if (h) return o - 1;
            }
            var d = r.heightAtSize(o, {
                descender: !1
            });
            if (d > a) return o - 1;
            o += 1;
        }
        return o;
    },
    LN = function(t) {
        for (var r = t.length; r > 0; r--)
            if (/\s/.test(t[r])) return r;
    },
    RN = function(t, r, e, i) {
        for (var n, a = t.length; a > 0;) {
            var o = t.substring(0, a),
                s = e.encodeText(o),
                l = e.widthOfTextAtSize(o, i);
            if (l < r) {
                var c = t.substring(a) || void 0;
                return {
                    line: o,
                    encoded: s,
                    width: l,
                    remainder: c
                };
            }
            a = (n = LN(o)) !== null && n !== void 0 ? n : 0;
        }
        return {
            line: t,
            encoded: e.encodeText(t),
            width: e.widthOfTextAtSize(t, i),
            remainder: void 0
        };
    },
    zv = function(t, r) {
        var e = r.alignment,
            i = r.fontSize,
            n = r.font,
            a = r.bounds,
            o = Hp(Uc(t));
        (i === void 0 || i === 0) && (i = k4(o, n, a, !0));
        for (var s = n.heightAtSize(i), l = s + s * .2, c = [], u = a.x, h = a.y, d = a.x + a.width, f = a.y + a.height, m = a.y + a.height, _ = 0, x = o.length; _ < x; _++)
            for (var g = o[_]; g !== void 0;) {
                var b = RN(g, a.width, n, i),
                    w = b.line,
                    T = b.encoded,
                    E = b.width,
                    L = b.remainder,
                    P = e === en.Left ? a.x : e === en.Center ? a.x + a.width / 2 - E / 2 : e === en.Right ? a.x + a.width - E : a.x;
                m -= l, P < u && (u = P), m < h && (h = m), P + E > d && (d = P + E), m + s > f && (f = m + s), c.push({
                    text: w,
                    encoded: T,
                    width: E,
                    height: s,
                    x: P,
                    y: m
                }), g = L ? .trim();
            }
        return {
            fontSize: i,
            lineHeight: l,
            lines: c,
            bounds: {
                x: u,
                y: h,
                width: d - u,
                height: f - h
            }
        };
    },
    F4 = function(t, r) {
        var e = r.fontSize,
            i = r.font,
            n = r.bounds,
            a = r.cellCount,
            o = Qg(Uc(t));
        if (o.length > a) throw new S4(o.length, a);
        (e === void 0 || e === 0) && (e = NN(o, i, n, a));
        for (var s = n.width / a, l = i.heightAtSize(e, {
                descender: !1
            }), c = n.y + (n.height / 2 - l / 2), u = [], h = n.x, d = n.y, f = n.x + n.width, m = n.y + n.height, _ = 0, x = 0; _ < a;) {
            var g = $g(o, x),
                b = g[0],
                w = g[1],
                T = i.encodeText(b),
                E = i.widthOfTextAtSize(b, e),
                L = n.x + (s * _ + s / 2),
                P = L - E / 2;
            P < h && (h = P), c < d && (d = c), P + E > f && (f = P + E), c + l > m && (m = c + l), u.push({
                text: o,
                encoded: T,
                width: E,
                height: l,
                x: P,
                y: c
            }), _ += 1, x += w;
        }
        return {
            fontSize: e,
            cells: u,
            bounds: {
                x: h,
                y: d,
                width: f - h,
                height: m - d
            }
        };
    },
    Sh = function(t, r) {
        var e = r.alignment,
            i = r.fontSize,
            n = r.font,
            a = r.bounds,
            o = Qg(Uc(t));
        (i === void 0 || i === 0) && (i = k4([o], n, a));
        var s = n.encodeText(o),
            l = n.widthOfTextAtSize(o, i),
            c = n.heightAtSize(i, {
                descender: !1
            }),
            u = e === en.Left ? a.x : e === en.Center ? a.x + a.width / 2 - l / 2 : e === en.Right ? a.x + a.width - l : a.x,
            h = a.y + (a.height / 2 - c / 2);
        return {
            fontSize: i,
            line: {
                text: o,
                encoded: s,
                width: l,
                height: c,
                x: u,
                y: h
            },
            bounds: {
                x: u,
                y: h,
                width: l,
                height: c
            }
        };
    };
var vo = function(t) {
        return "normal" in t ? t : {
            normal: t
        };
    },
    MN = /\/([^\0\t\n\f\r\ ]+)[\0\t\n\f\r\ ]+(\d*\.\d+|\d+)[\0\t\n\f\r\ ]+Tf/,
    Jl = function(t) {
        var r, e, i = (r = t.getDefaultAppearance()) !== null && r !== void 0 ? r : "",
            n = (e = Of(i, MN).match) !== null && e !== void 0 ? e : [],
            a = Number(n[2]);
        return isFinite(a) ? a : void 0;
    },
    BN = /(\d*\.\d+|\d+)[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]+(g|rg|k)/,
    mo = function(t) {
        var r, e = (r = t.getDefaultAppearance()) !== null && r !== void 0 ? r : "",
            i = Of(e, BN).match,
            n = i ? ? [],
            a = n[1],
            o = n[2],
            s = n[3],
            l = n[4],
            c = n[5];
        if (c === "g" && a) return Pv(Number(a));
        if (c === "rg" && a && o && s) return Lr(Number(a), Number(o), Number(s));
        if (c === "k" && a && o && s && l) return Iv(Number(a), Number(o), Number(s), Number(l));
    },
    go = function(t, r, e, i) {
        var n;
        i === void 0 && (i = 0);
        var a = [vs(r).toString(), vh((n = e ? .name) !== null && n !== void 0 ? n : "dummy__noop", i).toString()].join(`
`);
        t.setDefaultAppearance(a);
    },
    E4 = function(t, r) {
        var e, i, n, a = mo(r),
            o = mo(t.acroField),
            s = r.getRectangle(),
            l = r.getAppearanceCharacteristics(),
            c = r.getBorderStyle(),
            u = (e = c ? .getWidth()) !== null && e !== void 0 ? e : 0,
            h = zo(l ? .getRotation()),
            d = Qs(s, h),
            f = d.width,
            m = d.height,
            _ = Wo(ar(ar({}, s), {
                rotation: h
            })),
            x = Lr(0, 0, 0),
            g = (i = sa(l ? .getBorderColor())) !== null && i !== void 0 ? i : x,
            b = sa(l ? .getBackgroundColor()),
            w = sa(l ? .getBackgroundColor(), .8),
            T = (n = a ? ? o) !== null && n !== void 0 ? n : x;
        go(a ? r : t.acroField, T);
        var E = {
            x: 0 + u / 2,
            y: 0 + u / 2,
            width: f - u,
            height: m - u,
            thickness: 1.5,
            borderWidth: u,
            borderColor: g,
            markColor: T
        };
        return {
            normal: {
                on: Ar(_, bh(ar(ar({}, E), {
                    color: b,
                    filled: !0
                }))),
                off: Ar(_, bh(ar(ar({}, E), {
                    color: b,
                    filled: !1
                })))
            },
            down: {
                on: Ar(_, bh(ar(ar({}, E), {
                    color: w,
                    filled: !0
                }))),
                off: Ar(_, bh(ar(ar({}, E), {
                    color: w,
                    filled: !1
                })))
            }
        };
    },
    P4 = function(t, r) {
        var e, i, n, a = mo(r),
            o = mo(t.acroField),
            s = r.getRectangle(),
            l = r.getAppearanceCharacteristics(),
            c = r.getBorderStyle(),
            u = (e = c ? .getWidth()) !== null && e !== void 0 ? e : 0,
            h = zo(l ? .getRotation()),
            d = Qs(s, h),
            f = d.width,
            m = d.height,
            _ = Wo(ar(ar({}, s), {
                rotation: h
            })),
            x = Lr(0, 0, 0),
            g = (i = sa(l ? .getBorderColor())) !== null && i !== void 0 ? i : x,
            b = sa(l ? .getBackgroundColor()),
            w = sa(l ? .getBackgroundColor(), .8),
            T = (n = a ? ? o) !== null && n !== void 0 ? n : x;
        go(a ? r : t.acroField, T);
        var E = {
            x: f / 2,
            y: m / 2,
            width: f - u,
            height: m - u,
            borderWidth: u,
            borderColor: g,
            dotColor: T
        };
        return {
            normal: {
                on: Ar(_, wh(ar(ar({}, E), {
                    color: b,
                    filled: !0
                }))),
                off: Ar(_, wh(ar(ar({}, E), {
                    color: b,
                    filled: !1
                })))
            },
            down: {
                on: Ar(_, wh(ar(ar({}, E), {
                    color: w,
                    filled: !0
                }))),
                off: Ar(_, wh(ar(ar({}, E), {
                    color: w,
                    filled: !1
                })))
            }
        };
    },
    I4 = function(t, r, e) {
        var i, n, a, o, s, l = mo(r),
            c = mo(t.acroField),
            u = Jl(r),
            h = Jl(t.acroField),
            d = r.getRectangle(),
            f = r.getAppearanceCharacteristics(),
            m = r.getBorderStyle(),
            _ = f ? .getCaptions(),
            x = (i = _ ? .normal) !== null && i !== void 0 ? i : "",
            g = (a = (n = _ ? .down) !== null && n !== void 0 ? n : x) !== null && a !== void 0 ? a : "",
            b = (o = m ? .getWidth()) !== null && o !== void 0 ? o : 0,
            w = zo(f ? .getRotation()),
            T = Qs(d, w),
            E = T.width,
            L = T.height,
            P = Wo(ar(ar({}, d), {
                rotation: w
            })),
            k = Lr(0, 0, 0),
            A = sa(f ? .getBorderColor()),
            N = sa(f ? .getBackgroundColor()),
            C = sa(f ? .getBackgroundColor(), .8),
            F = {
                x: b,
                y: b,
                width: E - b * 2,
                height: L - b * 2
            },
            W = Sh(x, {
                alignment: en.Center,
                fontSize: u ? ? h,
                font: e,
                bounds: F
            }),
            I = Sh(g, {
                alignment: en.Center,
                fontSize: u ? ? h,
                font: e,
                bounds: F
            }),
            U = Math.min(W.fontSize, I.fontSize),
            le = (s = l ? ? c) !== null && s !== void 0 ? s : k;
        go(l || u !== void 0 ? r : t.acroField, le, e, U);
        var H = {
            x: 0 + b / 2,
            y: 0 + b / 2,
            width: E - b,
            height: L - b,
            borderWidth: b,
            borderColor: A,
            textColor: le,
            font: e.name,
            fontSize: U
        };
        return {
            normal: Ar(P, Mv(ar(ar({}, H), {
                color: N,
                textLines: [W.line]
            }))),
            down: Ar(P, Mv(ar(ar({}, H), {
                color: C,
                textLines: [I.line]
            })))
        };
    },
    O4 = function(t, r, e) {
        var i, n, a, o, s = mo(r),
            l = mo(t.acroField),
            c = Jl(r),
            u = Jl(t.acroField),
            h = r.getRectangle(),
            d = r.getAppearanceCharacteristics(),
            f = r.getBorderStyle(),
            m = (i = t.getText()) !== null && i !== void 0 ? i : "",
            _ = (n = f ? .getWidth()) !== null && n !== void 0 ? n : 0,
            x = zo(d ? .getRotation()),
            g = Qs(h, x),
            b = g.width,
            w = g.height,
            T = Wo(ar(ar({}, h), {
                rotation: x
            })),
            E = Lr(0, 0, 0),
            L = sa(d ? .getBorderColor()),
            P = sa(d ? .getBackgroundColor()),
            k, A, N = t.isCombed() ? 0 : 1,
            C = {
                x: _ + N,
                y: _ + N,
                width: b - (_ + N) * 2,
                height: w - (_ + N) * 2
            };
        if (t.isMultiline()) {
            var F = zv(m, {
                alignment: t.getAlignment(),
                fontSize: c ? ? u,
                font: e,
                bounds: C
            });
            k = F.lines, A = F.fontSize;
        } else if (t.isCombed()) {
            var F = F4(m, {
                fontSize: c ? ? u,
                font: e,
                bounds: C,
                cellCount: (a = t.getMaxLength()) !== null && a !== void 0 ? a : 0
            });
            k = F.cells, A = F.fontSize;
        } else {
            var F = Sh(m, {
                alignment: t.getAlignment(),
                fontSize: c ? ? u,
                font: e,
                bounds: C
            });
            k = [F.line], A = F.fontSize;
        }
        var W = (o = s ? ? l) !== null && o !== void 0 ? o : E;
        go(s || c !== void 0 ? r : t.acroField, W, e, A);
        var I = {
            x: 0 + _ / 2,
            y: 0 + _ / 2,
            width: b - _,
            height: w - _,
            borderWidth: _ ? ? 0,
            borderColor: L,
            textColor: W,
            font: e.name,
            fontSize: A,
            color: P,
            textLines: k,
            padding: N
        };
        return Ar(T, Uv(I));
    },
    N4 = function(t, r, e) {
        var i, n, a, o = mo(r),
            s = mo(t.acroField),
            l = Jl(r),
            c = Jl(t.acroField),
            u = r.getRectangle(),
            h = r.getAppearanceCharacteristics(),
            d = r.getBorderStyle(),
            f = (i = t.getSelected()[0]) !== null && i !== void 0 ? i : "",
            m = (n = d ? .getWidth()) !== null && n !== void 0 ? n : 0,
            _ = zo(h ? .getRotation()),
            x = Qs(u, _),
            g = x.width,
            b = x.height,
            w = Wo(ar(ar({}, u), {
                rotation: _
            })),
            T = Lr(0, 0, 0),
            E = sa(h ? .getBorderColor()),
            L = sa(h ? .getBackgroundColor()),
            P = 1,
            k = {
                x: m + P,
                y: m + P,
                width: g - (m + P) * 2,
                height: b - (m + P) * 2
            },
            A = Sh(f, {
                alignment: en.Left,
                fontSize: l ? ? c,
                font: e,
                bounds: k
            }),
            N = A.line,
            C = A.fontSize,
            F = (a = o ? ? s) !== null && a !== void 0 ? a : T;
        go(o || l !== void 0 ? r : t.acroField, F, e, C);
        var W = {
            x: 0 + m / 2,
            y: 0 + m / 2,
            width: g - m,
            height: b - m,
            borderWidth: m ? ? 0,
            borderColor: E,
            textColor: F,
            font: e.name,
            fontSize: C,
            color: L,
            textLines: [N],
            padding: P
        };
        return Ar(w, Uv(W));
    },
    L4 = function(t, r, e) {
        var i, n, a = mo(r),
            o = mo(t.acroField),
            s = Jl(r),
            l = Jl(t.acroField),
            c = r.getRectangle(),
            u = r.getAppearanceCharacteristics(),
            h = r.getBorderStyle(),
            d = (i = h ? .getWidth()) !== null && i !== void 0 ? i : 0,
            f = zo(u ? .getRotation()),
            m = Qs(c, f),
            _ = m.width,
            x = m.height,
            g = Wo(ar(ar({}, c), {
                rotation: f
            })),
            b = Lr(0, 0, 0),
            w = sa(u ? .getBorderColor()),
            T = sa(u ? .getBackgroundColor()),
            E = t.getOptions(),
            L = t.getSelected();
        t.isSorted() && E.sort();
        for (var P = "", k = 0, A = E.length; k < A; k++) P += E[k], k < A - 1 && (P += `
`);
        for (var N = 1, C = {
                x: d + N,
                y: d + N,
                width: _ - (d + N) * 2,
                height: x - (d + N) * 2
            }, F = zv(P, {
                alignment: en.Left,
                fontSize: s ? ? l,
                font: e,
                bounds: C
            }), W = F.lines, I = F.fontSize, U = F.lineHeight, le = [], k = 0, A = W.length; k < A; k++) {
            var H = W[k];
            L.includes(H.text) && le.push(k);
        }
        var pe = Lr(153 / 255, 193 / 255, 218 / 255),
            _e = (n = a ? ? o) !== null && n !== void 0 ? n : b;
        return go(a || s !== void 0 ? r : t.acroField, _e, e, I), Ar(g, m4({
            x: 0 + d / 2,
            y: 0 + d / 2,
            width: _ - d,
            height: x - d,
            borderWidth: d ? ? 0,
            borderColor: w,
            textColor: _e,
            font: e.name,
            fontSize: I,
            color: T,
            textLines: W,
            lineHeight: U,
            selectedColor: pe,
            selectedLines: le,
            padding: N
        }));
    };
var UN = function() {
        function t(r, e, i) {
            this.alreadyEmbedded = !1, ke(r, "ref", [
                [tr, "PDFRef"]
            ]), ke(e, "doc", [
                [Hn, "PDFDocument"]
            ]), ke(i, "embedder", [
                [Zf, "PDFPageEmbedder"]
            ]), this.ref = r, this.doc = e, this.width = i.width, this.height = i.height, this.embedder = i;
        }
        return t.prototype.scale = function(r) {
            return ke(r, "factor", ["number"]), {
                width: this.width * r,
                height: this.height * r
            };
        }, t.prototype.size = function() {
            return this.scale(1);
        }, t.prototype.embed = function() {
            return Rt(this, void 0, void 0, function() {
                return Mt(this, function(r) {
                    switch (r.label) {
                        case 0:
                            return this.alreadyEmbedded ? [3, 2] : [4, this.embedder.embedIntoContext(this.doc.context, this.ref)];
                        case 1:
                            r.sent(), this.alreadyEmbedded = !0, r.label = 2;
                        case 2:
                            return [2];
                    }
                });
            });
        }, t.of = function(r, e, i) {
            return new t(r, e, i);
        }, t;
    }(),
    Ch = UN;
var VN = function() {
        function t(r, e, i) {
            this.modified = !0, ke(r, "ref", [
                [tr, "PDFRef"]
            ]), ke(e, "doc", [
                [Hn, "PDFDocument"]
            ]), ke(i, "embedder", [
                [Yc, "CustomFontEmbedder"],
                [Kc, "StandardFontEmbedder"]
            ]), this.ref = r, this.doc = e, this.name = i.fontName, this.embedder = i;
        }
        return t.prototype.encodeText = function(r) {
            return ke(r, "text", ["string"]), this.modified = !0, this.embedder.encodeText(r);
        }, t.prototype.widthOfTextAtSize = function(r, e) {
            return ke(r, "text", ["string"]), ke(e, "size", ["number"]), this.embedder.widthOfTextAtSize(r, e);
        }, t.prototype.heightAtSize = function(r, e) {
            var i;
            return ke(r, "size", ["number"]), rt(e ? .descender, "options.descender", ["boolean"]), this.embedder.heightOfFontAtSize(r, {
                descender: (i = e ? .descender) !== null && i !== void 0 ? i : !0
            });
        }, t.prototype.sizeAtHeight = function(r) {
            return ke(r, "height", ["number"]), this.embedder.sizeOfFontAtHeight(r);
        }, t.prototype.getCharacterSet = function() {
            return this.embedder instanceof Kc ? this.embedder.encoding.supportedCodePoints : this.embedder.font.characterSet;
        }, t.prototype.embed = function() {
            return Rt(this, void 0, void 0, function() {
                return Mt(this, function(r) {
                    switch (r.label) {
                        case 0:
                            return this.modified ? [4, this.embedder.embedIntoContext(this.doc.context, this.ref)] : [3, 2];
                        case 1:
                            r.sent(), this.modified = !1, r.label = 2;
                        case 2:
                            return [2];
                    }
                });
            });
        }, t.of = function(r, e, i) {
            return new t(r, e, i);
        }, t;
    }(),
    tn = VN;
var zN = function() {
        function t(r, e, i) {
            ke(r, "ref", [
                [tr, "PDFRef"]
            ]), ke(e, "doc", [
                [Hn, "PDFDocument"]
            ]), ke(i, "embedder", [
                [Xf, "JpegEmbedder"],
                [Kf, "PngEmbedder"]
            ]), this.ref = r, this.doc = e, this.width = i.width, this.height = i.height, this.embedder = i;
        }
        return t.prototype.scale = function(r) {
            return ke(r, "factor", ["number"]), {
                width: this.width * r,
                height: this.height * r
            };
        }, t.prototype.scaleToFit = function(r, e) {
            ke(r, "width", ["number"]), ke(e, "height", ["number"]);
            var i = r / this.width,
                n = e / this.height,
                a = Math.min(i, n);
            return this.scale(a);
        }, t.prototype.size = function() {
            return this.scale(1);
        }, t.prototype.embed = function() {
            return Rt(this, void 0, void 0, function() {
                var r, e, i;
                return Mt(this, function(n) {
                    switch (n.label) {
                        case 0:
                            return this.embedder ? (this.embedTask || (r = this, e = r.doc, i = r.ref, this.embedTask = this.embedder.embedIntoContext(e.context, i)), [4, this.embedTask]) : [2];
                        case 1:
                            return n.sent(), this.embedder = void 0, [2];
                    }
                });
            });
        }, t.of = function(r, e, i) {
            return new t(r, e, i);
        }, t;
    }(),
    uu = zN;
var xs = function(t) {
    return t[t.Left = 0] = "Left", t[t.Center = 1] = "Center", t[t.Right = 2] = "Right", t;
}(xs || {});
var xo = function(t) {
        rt(t ? .x, "options.x", ["number"]), rt(t ? .y, "options.y", ["number"]), rt(t ? .width, "options.width", ["number"]), rt(t ? .height, "options.height", ["number"]), rt(t ? .textColor, "options.textColor", [
            [Object, "Color"]
        ]), rt(t ? .backgroundColor, "options.backgroundColor", [
            [Object, "Color"]
        ]), rt(t ? .borderColor, "options.borderColor", [
            [Object, "Color"]
        ]), rt(t ? .borderWidth, "options.borderWidth", ["number"]), rt(t ? .rotate, "options.rotate", [
            [Object, "Rotation"]
        ]);
    },
    WN = function() {
        function t(r, e, i) {
            ke(r, "acroField", [
                [$a, "PDFAcroTerminal"]
            ]), ke(e, "ref", [
                [tr, "PDFRef"]
            ]), ke(i, "doc", [
                [Hn, "PDFDocument"]
            ]), this.acroField = r, this.ref = e, this.doc = i;
        }
        return t.prototype.getName = function() {
            var r;
            return (r = this.acroField.getFullyQualifiedName()) !== null && r !== void 0 ? r : "";
        }, t.prototype.isReadOnly = function() {
            return this.acroField.hasFlag(Vo.ReadOnly);
        }, t.prototype.enableReadOnly = function() {
            this.acroField.setFlagTo(Vo.ReadOnly, !0);
        }, t.prototype.disableReadOnly = function() {
            this.acroField.setFlagTo(Vo.ReadOnly, !1);
        }, t.prototype.isRequired = function() {
            return this.acroField.hasFlag(Vo.Required);
        }, t.prototype.enableRequired = function() {
            this.acroField.setFlagTo(Vo.Required, !0);
        }, t.prototype.disableRequired = function() {
            this.acroField.setFlagTo(Vo.Required, !1);
        }, t.prototype.isExported = function() {
            return !this.acroField.hasFlag(Vo.NoExport);
        }, t.prototype.enableExporting = function() {
            this.acroField.setFlagTo(Vo.NoExport, !1);
        }, t.prototype.disableExporting = function() {
            this.acroField.setFlagTo(Vo.NoExport, !0);
        }, t.prototype.needsAppearancesUpdate = function() {
            throw new jn(this.constructor.name, "needsAppearancesUpdate");
        }, t.prototype.defaultUpdateAppearances = function(r) {
            throw new jn(this.constructor.name, "defaultUpdateAppearances");
        }, t.prototype.markAsDirty = function() {
            this.doc.getForm().markFieldAsDirty(this.ref);
        }, t.prototype.markAsClean = function() {
            this.doc.getForm().markFieldAsClean(this.ref);
        }, t.prototype.isDirty = function() {
            return this.doc.getForm().fieldIsDirty(this.ref);
        }, t.prototype.createWidget = function(r) {
            var e, i = r.textColor,
                n = r.backgroundColor,
                a = r.borderColor,
                o = r.borderWidth,
                s = d1(r.rotate),
                l = r.caption,
                c = r.x,
                u = r.y,
                h = r.width + o,
                d = r.height + o,
                f = !!r.hidden,
                m = r.page;
            Qp(s, "degreesAngle", 90);
            var _ = nu.create(this.doc.context, this.ref),
                x = QS({
                    x: c,
                    y: u,
                    width: h,
                    height: d
                }, o, s);
            _.setRectangle(x), m && _.setP(m);
            var g = _.getOrCreateAppearanceCharacteristics();
            n && g.setBackgroundColor(Rv(n)), g.setRotation(s), l && g.setCaptions({
                normal: l
            }), a && g.setBorderColor(Rv(a));
            var b = _.getOrCreateBorderStyle();
            if (o !== void 0 && b.setWidth(o), _.setFlagTo(fh.Print, !0), _.setFlagTo(fh.Hidden, f), _.setFlagTo(fh.Invisible, !1), i) {
                var w = (e = this.acroField.getDefaultAppearance()) !== null && e !== void 0 ? e : "",
                    T = w + `
` + vs(i).toString();
                this.acroField.setDefaultAppearance(T);
            }
            return _;
        }, t.prototype.updateWidgetAppearanceWithFont = function(r, e, i) {
            var n = i.normal,
                a = i.rollover,
                o = i.down;
            this.updateWidgetAppearances(r, {
                normal: this.createAppearanceStream(r, n, e),
                rollover: a && this.createAppearanceStream(r, a, e),
                down: o && this.createAppearanceStream(r, o, e)
            });
        }, t.prototype.updateOnOffWidgetAppearance = function(r, e, i) {
            var n = i.normal,
                a = i.rollover,
                o = i.down;
            this.updateWidgetAppearances(r, {
                normal: this.createAppearanceDict(r, n, e),
                rollover: a && this.createAppearanceDict(r, a, e),
                down: o && this.createAppearanceDict(r, o, e)
            });
        }, t.prototype.updateWidgetAppearances = function(r, e) {
            var i = e.normal,
                n = e.rollover,
                a = e.down;
            r.setNormalAppearance(i), n ? r.setRolloverAppearance(n) : r.removeRolloverAppearance(), a ? r.setDownAppearance(a) : r.removeDownAppearance();
        }, t.prototype.createAppearanceStream = function(r, e, i) {
            var n, a = this.acroField.dict.context,
                o = r.getRectangle(),
                s = o.width,
                l = o.height,
                c = i && {
                    Font: (n = {}, n[i.name] = i.ref, n)
                },
                u = a.formXObject(e, {
                    Resources: c,
                    BBox: a.obj([0, 0, s, l]),
                    Matrix: a.obj([1, 0, 0, 1, 0, 0])
                }),
                h = a.register(u);
            return h;
        }, t.prototype.createImageAppearanceStream = function(r, e, i) {
            var n, a, o = this.acroField.dict.context,
                s = r.getRectangle(),
                l = r.getAppearanceCharacteristics(),
                c = r.getBorderStyle(),
                u = (a = c ? .getWidth()) !== null && a !== void 0 ? a : 0,
                h = zo(l ? .getRotation()),
                d = Wo(ar(ar({}, s), {
                    rotation: h
                })),
                f = Qs(s, h),
                m = e.scaleToFit(f.width - u * 2, f.height - u * 2),
                _ = {
                    x: u,
                    y: u,
                    width: m.width,
                    height: m.height,
                    rotate: Wt(0),
                    xSkew: Wt(0),
                    ySkew: Wt(0)
                };
            i === xs.Center ? (_.x += (f.width - u * 2) / 2 - m.width / 2, _.y += (f.height - u * 2) / 2 - m.height / 2) : i === xs.Right && (_.x = f.width - u - m.width, _.y = f.height - u - m.height);
            var x = this.doc.context.addRandomSuffix("Image", 10),
                g = Ar(d, S1(x, _)),
                b = {
                    XObject: (n = {}, n[x] = e.ref, n)
                },
                w = o.formXObject(g, {
                    Resources: b,
                    BBox: o.obj([0, 0, s.width, s.height]),
                    Matrix: o.obj([1, 0, 0, 1, 0, 0])
                });
            return o.register(w);
        }, t.prototype.createAppearanceDict = function(r, e, i) {
            var n = this.acroField.dict.context,
                a = this.createAppearanceStream(r, e.on),
                o = this.createAppearanceStream(r, e.off),
                s = n.obj({});
            return s.set(i, a), s.set(K.of("Off"), o), s;
        }, t;
    }(),
    Sa = WN;
var jN = function(t) {
        Ge(r, t);

        function r(e, i, n) {
            var a = t.call(this, e, i, n) || this;
            return ke(e, "acroCheckBox", [
                [zl, "PDFAcroCheckBox"]
            ]), a.acroField = e, a;
        }
        return r.prototype.check = function() {
            var e, i = (e = this.acroField.getOnValue()) !== null && e !== void 0 ? e : K.of("Yes");
            this.markAsDirty(), this.acroField.setValue(i);
        }, r.prototype.uncheck = function() {
            this.markAsDirty(), this.acroField.setValue(K.of("Off"));
        }, r.prototype.isChecked = function() {
            var e = this.acroField.getOnValue();
            return !!e && e === this.acroField.getValue();
        }, r.prototype.addToPage = function(e, i) {
            var n, a, o, s, l, c;
            ke(e, "page", [
                [gn, "PDFPage"]
            ]), xo(i), i || (i = {}), "textColor" in i || (i.textColor = Lr(0, 0, 0)), "backgroundColor" in i || (i.backgroundColor = Lr(1, 1, 1)), "borderColor" in i || (i.borderColor = Lr(0, 0, 0)), "borderWidth" in i || (i.borderWidth = 1);
            var u = this.createWidget({
                    x: (n = i.x) !== null && n !== void 0 ? n : 0,
                    y: (a = i.y) !== null && a !== void 0 ? a : 0,
                    width: (o = i.width) !== null && o !== void 0 ? o : 50,
                    height: (s = i.height) !== null && s !== void 0 ? s : 50,
                    textColor: i.textColor,
                    backgroundColor: i.backgroundColor,
                    borderColor: i.borderColor,
                    borderWidth: (l = i.borderWidth) !== null && l !== void 0 ? l : 0,
                    rotate: (c = i.rotate) !== null && c !== void 0 ? c : Wt(0),
                    hidden: i.hidden,
                    page: e.ref
                }),
                h = this.doc.context.register(u.dict);
            this.acroField.addWidget(h), u.setAppearanceState(K.of("Off")), this.updateWidgetAppearance(u, K.of("Yes")), e.node.addAnnot(h);
        }, r.prototype.needsAppearancesUpdate = function() {
            for (var e, i = this.acroField.getWidgets(), n = 0, a = i.length; n < a; n++) {
                var o = i[n],
                    s = o.getAppearanceState(),
                    l = (e = o.getAppearances()) === null || e === void 0 ? void 0 : e.normal;
                if (!(l instanceof At) || s && !l.has(s)) return !0;
            }
            return !1;
        }, r.prototype.defaultUpdateAppearances = function() {
            this.updateAppearances();
        }, r.prototype.updateAppearances = function(e) {
            var i;
            rt(e, "provider", [Function]);
            for (var n = this.acroField.getWidgets(), a = 0, o = n.length; a < o; a++) {
                var s = n[a],
                    l = (i = s.getOnValue()) !== null && i !== void 0 ? i : K.of("Yes");
                l && this.updateWidgetAppearance(s, l, e);
            }
            this.markAsClean();
        }, r.prototype.updateWidgetAppearance = function(e, i, n) {
            var a = n ? ? E4,
                o = vo(a(this, e));
            this.updateOnOffWidgetAppearance(e, i, o);
        }, r.of = function(e, i, n) {
            return new r(e, i, n);
        }, r;
    }(Sa),
    i0 = jN;
var HN = function(t) {
        Ge(r, t);

        function r(e, i, n) {
            var a = t.call(this, e, i, n) || this;
            return ke(e, "acroComboBox", [
                [Wl, "PDFAcroComboBox"]
            ]), a.acroField = e, a;
        }
        return r.prototype.getOptions = function() {
            for (var e = this.acroField.getOptions(), i = new Array(e.length), n = 0, a = i.length; n < a; n++) {
                var o = e[n],
                    s = o.display,
                    l = o.value;
                i[n] = (s ? ? l).decodeText();
            }
            return i;
        }, r.prototype.getSelected = function() {
            for (var e = this.acroField.getValues(), i = new Array(e.length), n = 0, a = e.length; n < a; n++) i[n] = e[n].decodeText();
            return i;
        }, r.prototype.setOptions = function(e) {
            ke(e, "options", [Array]);
            for (var i = new Array(e.length), n = 0, a = e.length; n < a; n++) i[n] = {
                value: bt.fromText(e[n])
            };
            this.acroField.setOptions(i);
        }, r.prototype.addOptions = function(e) {
            ke(e, "options", ["string", Array]);
            for (var i = Array.isArray(e) ? e : [e], n = this.acroField.getOptions(), a = new Array(i.length), o = 0, s = i.length; o < s; o++) a[o] = {
                value: bt.fromText(i[o])
            };
            this.acroField.setOptions(n.concat(a));
        }, r.prototype.select = function(e, i) {
            i === void 0 && (i = !1), ke(e, "options", ["string", Array]), ke(i, "merge", ["boolean"]);
            var n = Array.isArray(e) ? e : [e],
                a = this.getOptions(),
                o = n.find(function(h) {
                    return !a.includes(h);
                });
            o && this.enableEditing(), this.markAsDirty(), (n.length > 1 || n.length === 1 && i) && this.enableMultiselect();
            for (var s = new Array(n.length), l = 0, c = n.length; l < c; l++) s[l] = bt.fromText(n[l]);
            if (i) {
                var u = this.acroField.getValues();
                this.acroField.setValues(u.concat(s));
            } else this.acroField.setValues(s);
        }, r.prototype.clear = function() {
            this.markAsDirty(), this.acroField.setValues([]);
        }, r.prototype.setFontSize = function(e) {
            Ul(e, "fontSize"), this.acroField.setFontSize(e), this.markAsDirty();
        }, r.prototype.isEditable = function() {
            return this.acroField.hasFlag(Wr.Edit);
        }, r.prototype.enableEditing = function() {
            this.acroField.setFlagTo(Wr.Edit, !0);
        }, r.prototype.disableEditing = function() {
            this.acroField.setFlagTo(Wr.Edit, !1);
        }, r.prototype.isSorted = function() {
            return this.acroField.hasFlag(Wr.Sort);
        }, r.prototype.enableSorting = function() {
            this.acroField.setFlagTo(Wr.Sort, !0);
        }, r.prototype.disableSorting = function() {
            this.acroField.setFlagTo(Wr.Sort, !1);
        }, r.prototype.isMultiselect = function() {
            return this.acroField.hasFlag(Wr.MultiSelect);
        }, r.prototype.enableMultiselect = function() {
            this.acroField.setFlagTo(Wr.MultiSelect, !0);
        }, r.prototype.disableMultiselect = function() {
            this.acroField.setFlagTo(Wr.MultiSelect, !1);
        }, r.prototype.isSpellChecked = function() {
            return !this.acroField.hasFlag(Wr.DoNotSpellCheck);
        }, r.prototype.enableSpellChecking = function() {
            this.acroField.setFlagTo(Wr.DoNotSpellCheck, !1);
        }, r.prototype.disableSpellChecking = function() {
            this.acroField.setFlagTo(Wr.DoNotSpellCheck, !0);
        }, r.prototype.isSelectOnClick = function() {
            return this.acroField.hasFlag(Wr.CommitOnSelChange);
        }, r.prototype.enableSelectOnClick = function() {
            this.acroField.setFlagTo(Wr.CommitOnSelChange, !0);
        }, r.prototype.disableSelectOnClick = function() {
            this.acroField.setFlagTo(Wr.CommitOnSelChange, !1);
        }, r.prototype.addToPage = function(e, i) {
            var n, a, o, s, l, c, u;
            ke(e, "page", [
                [gn, "PDFPage"]
            ]), xo(i), i || (i = {}), "textColor" in i || (i.textColor = Lr(0, 0, 0)), "backgroundColor" in i || (i.backgroundColor = Lr(1, 1, 1)), "borderColor" in i || (i.borderColor = Lr(0, 0, 0)), "borderWidth" in i || (i.borderWidth = 1);
            var h = this.createWidget({
                    x: (n = i.x) !== null && n !== void 0 ? n : 0,
                    y: (a = i.y) !== null && a !== void 0 ? a : 0,
                    width: (o = i.width) !== null && o !== void 0 ? o : 200,
                    height: (s = i.height) !== null && s !== void 0 ? s : 50,
                    textColor: i.textColor,
                    backgroundColor: i.backgroundColor,
                    borderColor: i.borderColor,
                    borderWidth: (l = i.borderWidth) !== null && l !== void 0 ? l : 0,
                    rotate: (c = i.rotate) !== null && c !== void 0 ? c : Wt(0),
                    hidden: i.hidden,
                    page: e.ref
                }),
                d = this.doc.context.register(h.dict);
            this.acroField.addWidget(d);
            var f = (u = i.font) !== null && u !== void 0 ? u : this.doc.getForm().getDefaultFont();
            this.updateWidgetAppearance(h, f), e.node.addAnnot(d);
        }, r.prototype.needsAppearancesUpdate = function() {
            var e;
            if (this.isDirty()) return !0;
            for (var i = this.acroField.getWidgets(), n = 0, a = i.length; n < a; n++) {
                var o = i[n],
                    s = ((e = o.getAppearances()) === null || e === void 0 ? void 0 : e.normal) instanceof Fi;
                if (!s) return !0;
            }
            return !1;
        }, r.prototype.defaultUpdateAppearances = function(e) {
            ke(e, "font", [
                [tn, "PDFFont"]
            ]), this.updateAppearances(e);
        }, r.prototype.updateAppearances = function(e, i) {
            ke(e, "font", [
                [tn, "PDFFont"]
            ]), rt(i, "provider", [Function]);
            for (var n = this.acroField.getWidgets(), a = 0, o = n.length; a < o; a++) {
                var s = n[a];
                this.updateWidgetAppearance(s, e, i);
            }
            this.markAsClean();
        }, r.prototype.updateWidgetAppearance = function(e, i, n) {
            var a = n ? ? N4,
                o = vo(a(this, e, i));
            this.updateWidgetAppearanceWithFont(e, i, o);
        }, r.of = function(e, i, n) {
            return new r(e, i, n);
        }, r;
    }(Sa),
    fu = HN;
var GN = function(t) {
        Ge(r, t);

        function r(e, i, n) {
            var a = t.call(this, e, i, n) || this;
            return ke(e, "acroListBox", [
                [Xl, "PDFAcroListBox"]
            ]), a.acroField = e, a;
        }
        return r.prototype.getOptions = function() {
            for (var e = this.acroField.getOptions(), i = new Array(e.length), n = 0, a = i.length; n < a; n++) {
                var o = e[n],
                    s = o.display,
                    l = o.value;
                i[n] = (s ? ? l).decodeText();
            }
            return i;
        }, r.prototype.getSelected = function() {
            for (var e = this.acroField.getValues(), i = new Array(e.length), n = 0, a = e.length; n < a; n++) i[n] = e[n].decodeText();
            return i;
        }, r.prototype.setOptions = function(e) {
            ke(e, "options", [Array]), this.markAsDirty();
            for (var i = new Array(e.length), n = 0, a = e.length; n < a; n++) i[n] = {
                value: bt.fromText(e[n])
            };
            this.acroField.setOptions(i);
        }, r.prototype.addOptions = function(e) {
            ke(e, "options", ["string", Array]), this.markAsDirty();
            for (var i = Array.isArray(e) ? e : [e], n = this.acroField.getOptions(), a = new Array(i.length), o = 0, s = i.length; o < s; o++) a[o] = {
                value: bt.fromText(i[o])
            };
            this.acroField.setOptions(n.concat(a));
        }, r.prototype.select = function(e, i) {
            i === void 0 && (i = !1), ke(e, "options", ["string", Array]), ke(i, "merge", ["boolean"]);
            var n = Array.isArray(e) ? e : [e],
                a = this.getOptions();
            oS(n, "option", a), this.markAsDirty(), (n.length > 1 || n.length === 1 && i) && this.enableMultiselect();
            for (var o = new Array(n.length), s = 0, l = n.length; s < l; s++) o[s] = bt.fromText(n[s]);
            if (i) {
                var c = this.acroField.getValues();
                this.acroField.setValues(c.concat(o));
            } else this.acroField.setValues(o);
        }, r.prototype.clear = function() {
            this.markAsDirty(), this.acroField.setValues([]);
        }, r.prototype.setFontSize = function(e) {
            Ul(e, "fontSize"), this.acroField.setFontSize(e), this.markAsDirty();
        }, r.prototype.isSorted = function() {
            return this.acroField.hasFlag(Wr.Sort);
        }, r.prototype.enableSorting = function() {
            this.acroField.setFlagTo(Wr.Sort, !0);
        }, r.prototype.disableSorting = function() {
            this.acroField.setFlagTo(Wr.Sort, !1);
        }, r.prototype.isMultiselect = function() {
            return this.acroField.hasFlag(Wr.MultiSelect);
        }, r.prototype.enableMultiselect = function() {
            this.acroField.setFlagTo(Wr.MultiSelect, !0);
        }, r.prototype.disableMultiselect = function() {
            this.acroField.setFlagTo(Wr.MultiSelect, !1);
        }, r.prototype.isSelectOnClick = function() {
            return this.acroField.hasFlag(Wr.CommitOnSelChange);
        }, r.prototype.enableSelectOnClick = function() {
            this.acroField.setFlagTo(Wr.CommitOnSelChange, !0);
        }, r.prototype.disableSelectOnClick = function() {
            this.acroField.setFlagTo(Wr.CommitOnSelChange, !1);
        }, r.prototype.addToPage = function(e, i) {
            var n, a, o, s, l, c, u;
            ke(e, "page", [
                [gn, "PDFPage"]
            ]), xo(i), i || (i = {}), "textColor" in i || (i.textColor = Lr(0, 0, 0)), "backgroundColor" in i || (i.backgroundColor = Lr(1, 1, 1)), "borderColor" in i || (i.borderColor = Lr(0, 0, 0)), "borderWidth" in i || (i.borderWidth = 1);
            var h = this.createWidget({
                    x: (n = i.x) !== null && n !== void 0 ? n : 0,
                    y: (a = i.y) !== null && a !== void 0 ? a : 0,
                    width: (o = i.width) !== null && o !== void 0 ? o : 200,
                    height: (s = i.height) !== null && s !== void 0 ? s : 100,
                    textColor: i.textColor,
                    backgroundColor: i.backgroundColor,
                    borderColor: i.borderColor,
                    borderWidth: (l = i.borderWidth) !== null && l !== void 0 ? l : 0,
                    rotate: (c = i.rotate) !== null && c !== void 0 ? c : Wt(0),
                    hidden: i.hidden,
                    page: e.ref
                }),
                d = this.doc.context.register(h.dict);
            this.acroField.addWidget(d);
            var f = (u = i.font) !== null && u !== void 0 ? u : this.doc.getForm().getDefaultFont();
            this.updateWidgetAppearance(h, f), e.node.addAnnot(d);
        }, r.prototype.needsAppearancesUpdate = function() {
            var e;
            if (this.isDirty()) return !0;
            for (var i = this.acroField.getWidgets(), n = 0, a = i.length; n < a; n++) {
                var o = i[n],
                    s = ((e = o.getAppearances()) === null || e === void 0 ? void 0 : e.normal) instanceof Fi;
                if (!s) return !0;
            }
            return !1;
        }, r.prototype.defaultUpdateAppearances = function(e) {
            ke(e, "font", [
                [tn, "PDFFont"]
            ]), this.updateAppearances(e);
        }, r.prototype.updateAppearances = function(e, i) {
            ke(e, "font", [
                [tn, "PDFFont"]
            ]), rt(i, "provider", [Function]);
            for (var n = this.acroField.getWidgets(), a = 0, o = n.length; a < o; a++) {
                var s = n[a];
                this.updateWidgetAppearance(s, e, i);
            }
            this.markAsClean();
        }, r.prototype.updateWidgetAppearance = function(e, i, n) {
            var a = n ? ? L4,
                o = vo(a(this, e, i));
            this.updateWidgetAppearanceWithFont(e, i, o);
        }, r.of = function(e, i, n) {
            return new r(e, i, n);
        }, r;
    }(Sa),
    hu = GN;
var qN = function(t) {
        Ge(r, t);

        function r(e, i, n) {
            var a = t.call(this, e, i, n) || this;
            return ke(e, "acroRadioButton", [
                [ql, "PDFAcroRadioButton"]
            ]), a.acroField = e, a;
        }
        return r.prototype.getOptions = function() {
            var e = this.acroField.getExportValues();
            if (e) {
                for (var i = new Array(e.length), n = 0, a = e.length; n < a; n++) i[n] = e[n].decodeText();
                return i;
            }
            for (var o = this.acroField.getOnValues(), s = new Array(o.length), n = 0, a = s.length; n < a; n++) s[n] = o[n].decodeText();
            return s;
        }, r.prototype.getSelected = function() {
            var e = this.acroField.getValue();
            if (e !== K.of("Off")) {
                var i = this.acroField.getExportValues();
                if (i) {
                    for (var n = this.acroField.getOnValues(), a = 0, o = n.length; a < o; a++)
                        if (n[a] === e) return i[a].decodeText();
                }
                return e.decodeText();
            }
        }, r.prototype.select = function(e) {
            ke(e, "option", ["string"]);
            var i = this.getOptions();
            Uo(e, "option", i), this.markAsDirty();
            var n = this.acroField.getOnValues(),
                a = this.acroField.getExportValues();
            if (a)
                for (var o = 0, s = a.length; o < s; o++) a[o].decodeText() === e && this.acroField.setValue(n[o]);
            else
                for (var o = 0, s = n.length; o < s; o++) {
                    var l = n[o];
                    l.decodeText() === e && this.acroField.setValue(l);
                }
        }, r.prototype.clear = function() {
            this.markAsDirty(), this.acroField.setValue(K.of("Off"));
        }, r.prototype.isOffToggleable = function() {
            return !this.acroField.hasFlag(ya.NoToggleToOff);
        }, r.prototype.enableOffToggling = function() {
            this.acroField.setFlagTo(ya.NoToggleToOff, !1);
        }, r.prototype.disableOffToggling = function() {
            this.acroField.setFlagTo(ya.NoToggleToOff, !0);
        }, r.prototype.isMutuallyExclusive = function() {
            return !this.acroField.hasFlag(ya.RadiosInUnison);
        }, r.prototype.enableMutualExclusion = function() {
            this.acroField.setFlagTo(ya.RadiosInUnison, !1);
        }, r.prototype.disableMutualExclusion = function() {
            this.acroField.setFlagTo(ya.RadiosInUnison, !0);
        }, r.prototype.addOptionToPage = function(e, i, n) {
            var a, o, s, l, c, u, h, d, f;
            ke(e, "option", ["string"]), ke(i, "page", [
                [gn, "PDFPage"]
            ]), xo(n);
            var m = this.createWidget({
                    x: (a = n ? .x) !== null && a !== void 0 ? a : 0,
                    y: (o = n ? .y) !== null && o !== void 0 ? o : 0,
                    width: (s = n ? .width) !== null && s !== void 0 ? s : 50,
                    height: (l = n ? .height) !== null && l !== void 0 ? l : 50,
                    textColor: (c = n ? .textColor) !== null && c !== void 0 ? c : Lr(0, 0, 0),
                    backgroundColor: (u = n ? .backgroundColor) !== null && u !== void 0 ? u : Lr(1, 1, 1),
                    borderColor: (h = n ? .borderColor) !== null && h !== void 0 ? h : Lr(0, 0, 0),
                    borderWidth: (d = n ? .borderWidth) !== null && d !== void 0 ? d : 1,
                    rotate: (f = n ? .rotate) !== null && f !== void 0 ? f : Wt(0),
                    hidden: n ? .hidden,
                    page: i.ref
                }),
                _ = this.doc.context.register(m.dict),
                x = this.acroField.addWidgetWithOpt(_, bt.fromText(e), !this.isMutuallyExclusive());
            m.setAppearanceState(K.of("Off")), this.updateWidgetAppearance(m, x), i.node.addAnnot(_);
        }, r.prototype.needsAppearancesUpdate = function() {
            for (var e, i = this.acroField.getWidgets(), n = 0, a = i.length; n < a; n++) {
                var o = i[n],
                    s = o.getAppearanceState(),
                    l = (e = o.getAppearances()) === null || e === void 0 ? void 0 : e.normal;
                if (!(l instanceof At) || s && !l.has(s)) return !0;
            }
            return !1;
        }, r.prototype.defaultUpdateAppearances = function() {
            this.updateAppearances();
        }, r.prototype.updateAppearances = function(e) {
            rt(e, "provider", [Function]);
            for (var i = this.acroField.getWidgets(), n = 0, a = i.length; n < a; n++) {
                var o = i[n],
                    s = o.getOnValue();
                s && this.updateWidgetAppearance(o, s, e);
            }
        }, r.prototype.updateWidgetAppearance = function(e, i, n) {
            var a = n ? ? P4,
                o = vo(a(this, e));
            this.updateOnOffWidgetAppearance(e, i, o);
        }, r.of = function(e, i, n) {
            return new r(e, i, n);
        }, r;
    }(Sa),
    n0 = qN;
var XN = function(t) {
        Ge(r, t);

        function r(e, i, n) {
            var a = t.call(this, e, i, n) || this;
            return ke(e, "acroSignature", [
                [Jc, "PDFAcroSignature"]
            ]), a.acroField = e, a;
        }
        return r.prototype.needsAppearancesUpdate = function() {
            return !1;
        }, r.of = function(e, i, n) {
            return new r(e, i, n);
        }, r;
    }(Sa),
    Ah = XN;
var KN = function(t) {
        Ge(r, t);

        function r(e, i, n) {
            var a = t.call(this, e, i, n) || this;
            return ke(e, "acroText", [
                [Hl, "PDFAcroText"]
            ]), a.acroField = e, a;
        }
        return r.prototype.getText = function() {
            var e = this.acroField.getValue();
            if (!e && this.isRichFormatted()) throw new w4(this.getName());
            return e ? .decodeText();
        }, r.prototype.setText = function(e) {
            rt(e, "text", ["string"]);
            var i = this.getMaxLength();
            if (i !== void 0 && e && e.length > i) throw new C4(e.length, i, this.getName());
            this.markAsDirty(), this.disableRichFormatting(), e ? this.acroField.setValue(bt.fromText(e)) : this.acroField.removeValue();
        }, r.prototype.getAlignment = function() {
            var e = this.acroField.getQuadding();
            return e === 0 ? en.Left : e === 1 ? en.Center : e === 2 ? en.Right : en.Left;
        }, r.prototype.setAlignment = function(e) {
            Uo(e, "alignment", en), this.markAsDirty(), this.acroField.setQuadding(e);
        }, r.prototype.getMaxLength = function() {
            return this.acroField.getMaxLength();
        }, r.prototype.setMaxLength = function(e) {
            if (Qa(e, "maxLength", 0, Number.MAX_SAFE_INTEGER), this.markAsDirty(), e === void 0) this.acroField.removeMaxLength();
            else {
                var i = this.getText();
                if (i && i.length > e) throw new A4(i.length, e, this.getName());
                this.acroField.setMaxLength(e);
            }
        }, r.prototype.removeMaxLength = function() {
            this.markAsDirty(), this.acroField.removeMaxLength();
        }, r.prototype.setImage = function(e) {
            for (var i = this.getAlignment(), n = i === en.Center ? xs.Center : i === en.Right ? xs.Right : xs.Left, a = this.acroField.getWidgets(), o = 0, s = a.length; o < s; o++) {
                var l = a[o],
                    c = this.createImageAppearanceStream(l, e, n);
                this.updateWidgetAppearances(l, {
                    normal: c
                });
            }
            this.markAsClean();
        }, r.prototype.setFontSize = function(e) {
            Ul(e, "fontSize"), this.acroField.setFontSize(e), this.markAsDirty();
        }, r.prototype.isMultiline = function() {
            return this.acroField.hasFlag(Ui.Multiline);
        }, r.prototype.enableMultiline = function() {
            this.markAsDirty(), this.acroField.setFlagTo(Ui.Multiline, !0);
        }, r.prototype.disableMultiline = function() {
            this.markAsDirty(), this.acroField.setFlagTo(Ui.Multiline, !1);
        }, r.prototype.isPassword = function() {
            return this.acroField.hasFlag(Ui.Password);
        }, r.prototype.enablePassword = function() {
            this.acroField.setFlagTo(Ui.Password, !0);
        }, r.prototype.disablePassword = function() {
            this.acroField.setFlagTo(Ui.Password, !1);
        }, r.prototype.isFileSelector = function() {
            return this.acroField.hasFlag(Ui.FileSelect);
        }, r.prototype.enableFileSelection = function() {
            this.acroField.setFlagTo(Ui.FileSelect, !0);
        }, r.prototype.disableFileSelection = function() {
            this.acroField.setFlagTo(Ui.FileSelect, !1);
        }, r.prototype.isSpellChecked = function() {
            return !this.acroField.hasFlag(Ui.DoNotSpellCheck);
        }, r.prototype.enableSpellChecking = function() {
            this.acroField.setFlagTo(Ui.DoNotSpellCheck, !1);
        }, r.prototype.disableSpellChecking = function() {
            this.acroField.setFlagTo(Ui.DoNotSpellCheck, !0);
        }, r.prototype.isScrollable = function() {
            return !this.acroField.hasFlag(Ui.DoNotScroll);
        }, r.prototype.enableScrolling = function() {
            this.acroField.setFlagTo(Ui.DoNotScroll, !1);
        }, r.prototype.disableScrolling = function() {
            this.acroField.setFlagTo(Ui.DoNotScroll, !0);
        }, r.prototype.isCombed = function() {
            return this.acroField.hasFlag(Ui.Comb) && !this.isMultiline() && !this.isPassword() && !this.isFileSelector() && this.getMaxLength() !== void 0;
        }, r.prototype.enableCombing = function() {
            if (this.getMaxLength() === void 0) {
                var e = "PDFTextFields must have a max length in order to be combed";
                console.warn(e);
            }
            this.markAsDirty(), this.disableMultiline(), this.disablePassword(), this.disableFileSelection(), this.acroField.setFlagTo(Ui.Comb, !0);
        }, r.prototype.disableCombing = function() {
            this.markAsDirty(), this.acroField.setFlagTo(Ui.Comb, !1);
        }, r.prototype.isRichFormatted = function() {
            return this.acroField.hasFlag(Ui.RichText);
        }, r.prototype.enableRichFormatting = function() {
            this.acroField.setFlagTo(Ui.RichText, !0);
        }, r.prototype.disableRichFormatting = function() {
            this.acroField.setFlagTo(Ui.RichText, !1);
        }, r.prototype.addToPage = function(e, i) {
            var n, a, o, s, l, c, u;
            ke(e, "page", [
                [gn, "PDFPage"]
            ]), xo(i), i || (i = {}), "textColor" in i || (i.textColor = Lr(0, 0, 0)), "backgroundColor" in i || (i.backgroundColor = Lr(1, 1, 1)), "borderColor" in i || (i.borderColor = Lr(0, 0, 0)), "borderWidth" in i || (i.borderWidth = 1);
            var h = this.createWidget({
                    x: (n = i.x) !== null && n !== void 0 ? n : 0,
                    y: (a = i.y) !== null && a !== void 0 ? a : 0,
                    width: (o = i.width) !== null && o !== void 0 ? o : 200,
                    height: (s = i.height) !== null && s !== void 0 ? s : 50,
                    textColor: i.textColor,
                    backgroundColor: i.backgroundColor,
                    borderColor: i.borderColor,
                    borderWidth: (l = i.borderWidth) !== null && l !== void 0 ? l : 0,
                    rotate: (c = i.rotate) !== null && c !== void 0 ? c : Wt(0),
                    hidden: i.hidden,
                    page: e.ref
                }),
                d = this.doc.context.register(h.dict);
            this.acroField.addWidget(d);
            var f = (u = i.font) !== null && u !== void 0 ? u : this.doc.getForm().getDefaultFont();
            this.updateWidgetAppearance(h, f), e.node.addAnnot(d);
        }, r.prototype.needsAppearancesUpdate = function() {
            var e;
            if (this.isDirty()) return !0;
            for (var i = this.acroField.getWidgets(), n = 0, a = i.length; n < a; n++) {
                var o = i[n],
                    s = ((e = o.getAppearances()) === null || e === void 0 ? void 0 : e.normal) instanceof Fi;
                if (!s) return !0;
            }
            return !1;
        }, r.prototype.defaultUpdateAppearances = function(e) {
            ke(e, "font", [
                [tn, "PDFFont"]
            ]), this.updateAppearances(e);
        }, r.prototype.updateAppearances = function(e, i) {
            ke(e, "font", [
                [tn, "PDFFont"]
            ]), rt(i, "provider", [Function]);
            for (var n = this.acroField.getWidgets(), a = 0, o = n.length; a < o; a++) {
                var s = n[a];
                this.updateWidgetAppearance(s, e, i);
            }
            this.markAsClean();
        }, r.prototype.updateWidgetAppearance = function(e, i, n) {
            var a = n ? ? O4,
                o = vo(a(this, e, i));
            this.updateWidgetAppearanceWithFont(e, i, o);
        }, r.of = function(e, i, n) {
            return new r(e, i, n);
        }, r;
    }(Sa),
    du = KN;
var Th = function(t) {
    return t.Courier = "Courier", t.CourierBold = "Courier-Bold", t.CourierOblique = "Courier-Oblique", t.CourierBoldOblique = "Courier-BoldOblique", t.Helvetica = "Helvetica", t.HelveticaBold = "Helvetica-Bold", t.HelveticaOblique = "Helvetica-Oblique", t.HelveticaBoldOblique = "Helvetica-BoldOblique", t.TimesRoman = "Times-Roman", t.TimesRomanBold = "Times-Bold", t.TimesRomanItalic = "Times-Italic", t.TimesRomanBoldItalic = "Times-BoldItalic", t.Symbol = "Symbol", t.ZapfDingbats = "ZapfDingbats", t;
}(Th || {});
var YN = function() {
        function t(r, e) {
            var i = this;
            this.embedDefaultFont = function() {
                return i.doc.embedStandardFont(Th.Helvetica);
            }, ke(r, "acroForm", [
                [Qc, "PDFAcroForm"]
            ]), ke(e, "doc", [
                [Hn, "PDFDocument"]
            ]), this.acroForm = r, this.doc = e, this.dirtyFields = new Set(), this.defaultFontCache = oa.populatedBy(this.embedDefaultFont);
        }
        return t.prototype.hasXFA = function() {
            return this.acroForm.dict.has(K.of("XFA"));
        }, t.prototype.deleteXFA = function() {
            this.acroForm.dict.delete(K.of("XFA"));
        }, t.prototype.getFields = function() {
            for (var r = this.acroForm.getAllFields(), e = [], i = 0, n = r.length; i < n; i++) {
                var a = r[i],
                    o = a[0],
                    s = a[1],
                    l = ZN(o, s, this.doc);
                l && e.push(l);
            }
            return e;
        }, t.prototype.getFieldMaybe = function(r) {
            ke(r, "name", ["string"]);
            for (var e = this.getFields(), i = 0, n = e.length; i < n; i++) {
                var a = e[i];
                if (a.getName() === r) return a;
            }
        }, t.prototype.getField = function(r) {
            ke(r, "name", ["string"]);
            var e = this.getFieldMaybe(r);
            if (e) return e;
            throw new y4(r);
        }, t.prototype.getButton = function(r) {
            ke(r, "name", ["string"]);
            var e = this.getField(r);
            if (e instanceof gu) return e;
            throw new Zl(r, gu, e);
        }, t.prototype.getCheckBox = function(r) {
            ke(r, "name", ["string"]);
            var e = this.getField(r);
            if (e instanceof i0) return e;
            throw new Zl(r, i0, e);
        }, t.prototype.getDropdown = function(r) {
            ke(r, "name", ["string"]);
            var e = this.getField(r);
            if (e instanceof fu) return e;
            throw new Zl(r, fu, e);
        }, t.prototype.getOptionList = function(r) {
            ke(r, "name", ["string"]);
            var e = this.getField(r);
            if (e instanceof hu) return e;
            throw new Zl(r, hu, e);
        }, t.prototype.getRadioGroup = function(r) {
            ke(r, "name", ["string"]);
            var e = this.getField(r);
            if (e instanceof n0) return e;
            throw new Zl(r, n0, e);
        }, t.prototype.getSignature = function(r) {
            ke(r, "name", ["string"]);
            var e = this.getField(r);
            if (e instanceof Ah) return e;
            throw new Zl(r, Ah, e);
        }, t.prototype.getTextField = function(r) {
            ke(r, "name", ["string"]);
            var e = this.getField(r);
            if (e instanceof du) return e;
            throw new Zl(r, du, e);
        }, t.prototype.createButton = function(r) {
            ke(r, "name", ["string"]);
            var e = pu(r),
                i = this.findOrCreateNonTerminals(e.nonTerminal),
                n = Gl.create(this.doc.context);
            return n.setPartialName(e.terminal), mu(i, [n, n.ref], e.terminal), gu.of(n, n.ref, this.doc);
        }, t.prototype.createCheckBox = function(r) {
            ke(r, "name", ["string"]);
            var e = pu(r),
                i = this.findOrCreateNonTerminals(e.nonTerminal),
                n = zl.create(this.doc.context);
            return n.setPartialName(e.terminal), mu(i, [n, n.ref], e.terminal), i0.of(n, n.ref, this.doc);
        }, t.prototype.createDropdown = function(r) {
            ke(r, "name", ["string"]);
            var e = pu(r),
                i = this.findOrCreateNonTerminals(e.nonTerminal),
                n = Wl.create(this.doc.context);
            return n.setPartialName(e.terminal), mu(i, [n, n.ref], e.terminal), fu.of(n, n.ref, this.doc);
        }, t.prototype.createOptionList = function(r) {
            ke(r, "name", ["string"]);
            var e = pu(r),
                i = this.findOrCreateNonTerminals(e.nonTerminal),
                n = Xl.create(this.doc.context);
            return n.setPartialName(e.terminal), mu(i, [n, n.ref], e.terminal), hu.of(n, n.ref, this.doc);
        }, t.prototype.createRadioGroup = function(r) {
            ke(r, "name", ["string"]);
            var e = pu(r),
                i = this.findOrCreateNonTerminals(e.nonTerminal),
                n = ql.create(this.doc.context);
            return n.setPartialName(e.terminal), mu(i, [n, n.ref], e.terminal), n0.of(n, n.ref, this.doc);
        }, t.prototype.createTextField = function(r) {
            ke(r, "name", ["string"]);
            var e = pu(r),
                i = this.findOrCreateNonTerminals(e.nonTerminal),
                n = Hl.create(this.doc.context);
            return n.setPartialName(e.terminal), mu(i, [n, n.ref], e.terminal), du.of(n, n.ref, this.doc);
        }, t.prototype.flatten = function(r) {
            r === void 0 && (r = {
                updateFieldAppearances: !0
            }), r.updateFieldAppearances && this.updateFieldAppearances();
            for (var e = this.getFields(), i = 0, n = e.length; i < n; i++) {
                for (var a = e[i], o = a.acroField.getWidgets(), s = 0, l = o.length; s < l; s++) {
                    var c = o[s],
                        u = this.findWidgetPage(c),
                        h = this.findWidgetAppearanceRef(a, c),
                        d = u.node.newXObject("FlatWidget", h),
                        f = c.getRectangle(),
                        m = Ar([Hi(), ba(f.x, f.y)], Wo(ar(ar({}, f), {
                            rotation: 0
                        })), [xh(d), Gi()]).filter(Boolean);
                    u.pushOperators.apply(u, m);
                }
                this.removeField(a);
            }
        }, t.prototype.removeField = function(r) {
            for (var e = r.acroField.getWidgets(), i = new Set(), n = 0, a = e.length; n < a; n++) {
                var o = e[n],
                    s = this.findWidgetAppearanceRef(r, o),
                    l = this.findWidgetPage(o);
                i.add(l), l.node.removeAnnot(s);
            }
            i.forEach(function(f) {
                return f.node.removeAnnot(r.ref);
            }), this.acroForm.removeField(r.acroField);
            for (var c = r.acroField.normalizedEntries().Kids, u = c.size(), h = 0; h < u; h++) {
                var d = c.get(h);
                d instanceof tr && this.doc.context.delete(d);
            }
            this.doc.context.delete(r.ref);
        }, t.prototype.updateFieldAppearances = function(r) {
            rt(r, "font", [
                [tn, "PDFFont"]
            ]), r = r ? ? this.getDefaultFont();
            for (var e = this.getFields(), i = 0, n = e.length; i < n; i++) {
                var a = e[i];
                a.needsAppearancesUpdate() && a.defaultUpdateAppearances(r);
            }
        }, t.prototype.markFieldAsDirty = function(r) {
            rt(r, "fieldRef", [
                [tr, "PDFRef"]
            ]), this.dirtyFields.add(r);
        }, t.prototype.markFieldAsClean = function(r) {
            rt(r, "fieldRef", [
                [tr, "PDFRef"]
            ]), this.dirtyFields.delete(r);
        }, t.prototype.fieldIsDirty = function(r) {
            return rt(r, "fieldRef", [
                [tr, "PDFRef"]
            ]), this.dirtyFields.has(r);
        }, t.prototype.getDefaultFont = function() {
            return this.defaultFontCache.access();
        }, t.prototype.findWidgetPage = function(r) {
            var e = r.P(),
                i = this.doc.getPages().find(function(a) {
                    return a.ref === e;
                });
            if (i === void 0) {
                var n = this.doc.context.getObjectRef(r.dict);
                if (n === void 0) throw new Error("Could not find PDFRef for PDFObject");
                if (i = this.doc.findPageForAnnotationRef(n), i === void 0) throw new Error("Could not find page for PDFRef " + n);
            }
            return i;
        }, t.prototype.findWidgetAppearanceRef = function(r, e) {
            var i, n = e.getNormalAppearance();
            if (n instanceof At && (r instanceof i0 || r instanceof n0)) {
                var a = r.acroField.getValue(),
                    o = (i = n.get(a)) !== null && i !== void 0 ? i : n.get(K.of("Off"));
                o instanceof tr && (n = o);
            }
            if (!(n instanceof tr)) {
                var s = r.getName();
                throw new Error("Failed to extract appearance ref for: " + s);
            }
            return n;
        }, t.prototype.findOrCreateNonTerminals = function(r) {
            for (var e = [this.acroForm], i = 0, n = r.length; i < n; i++) {
                var a = r[i];
                if (!a) throw new b4(a);
                var o = e[0],
                    s = e[1],
                    l = this.findNonTerminal(a, o);
                if (l) e = l;
                else {
                    var c = jl.create(this.doc.context);
                    c.setPartialName(a), c.setParent(s);
                    var u = this.doc.context.register(c.dict);
                    o.addField(u), e = [c, u];
                }
            }
            return e;
        }, t.prototype.findNonTerminal = function(r, e) {
            for (var i = e instanceof Qc ? this.acroForm.getFields() : ih(e.Kids()), n = 0, a = i.length; n < a; n++) {
                var o = i[n],
                    s = o[0],
                    l = o[1];
                if (s.getPartialName() === r) {
                    if (s instanceof jl) return [s, l];
                    throw new Vv(r);
                }
            }
        }, t.of = function(r, e) {
            return new t(r, e);
        }, t;
    }(),
    Wv = YN,
    ZN = function(t, r, e) {
        if (t instanceof Gl) return gu.of(t, r, e);
        if (t instanceof zl) return i0.of(t, r, e);
        if (t instanceof Wl) return fu.of(t, r, e);
        if (t instanceof Xl) return hu.of(t, r, e);
        if (t instanceof Hl) return du.of(t, r, e);
        if (t instanceof ql) return n0.of(t, r, e);
        if (t instanceof Jc) return Ah.of(t, r, e);
    },
    pu = function(t) {
        if (t.length === 0) throw new Error("PDF field names must not be empty strings");
        for (var r = t.split("."), e = 0, i = r.length; e < i; e++)
            if (r[e] === "") throw new Error('Periods in PDF field names must be separated by at least one character: "' + t + '"');
        return r.length === 1 ? {
            nonTerminal: [],
            terminal: r[0]
        } : {
            nonTerminal: r.slice(0, r.length - 1),
            terminal: r[r.length - 1]
        };
    },
    mu = function(t, r, e) {
        for (var i = t[0], n = t[1], a = r[0], o = r[1], s = i.normalizedEntries(), l = ih("Kids" in s ? s.Kids : s.Fields), c = 0, u = l.length; c < u; c++)
            if (l[c][0].getPartialName() === e) throw new Vv(e);
        i.addField(o), a.setParent(n);
    };
var R4 = {
    "4A0": [4767.87, 6740.79],
    "2A0": [3370.39, 4767.87],
    A0: [2383.94, 3370.39],
    A1: [1683.78, 2383.94],
    A2: [1190.55, 1683.78],
    A3: [841.89, 1190.55],
    A4: [595.28, 841.89],
    A5: [419.53, 595.28],
    A6: [297.64, 419.53],
    A7: [209.76, 297.64],
    A8: [147.4, 209.76],
    A9: [104.88, 147.4],
    A10: [73.7, 104.88],
    B0: [2834.65, 4008.19],
    B1: [2004.09, 2834.65],
    B2: [1417.32, 2004.09],
    B3: [1000.63, 1417.32],
    B4: [708.66, 1000.63],
    B5: [498.9, 708.66],
    B6: [354.33, 498.9],
    B7: [249.45, 354.33],
    B8: [175.75, 249.45],
    B9: [124.72, 175.75],
    B10: [87.87, 124.72],
    C0: [2599.37, 3676.54],
    C1: [1836.85, 2599.37],
    C2: [1298.27, 1836.85],
    C3: [918.43, 1298.27],
    C4: [649.13, 918.43],
    C5: [459.21, 649.13],
    C6: [323.15, 459.21],
    C7: [229.61, 323.15],
    C8: [161.57, 229.61],
    C9: [113.39, 161.57],
    C10: [79.37, 113.39],
    RA0: [2437.8, 3458.27],
    RA1: [1729.13, 2437.8],
    RA2: [1218.9, 1729.13],
    RA3: [864.57, 1218.9],
    RA4: [609.45, 864.57],
    SRA0: [2551.18, 3628.35],
    SRA1: [1814.17, 2551.18],
    SRA2: [1275.59, 1814.17],
    SRA3: [907.09, 1275.59],
    SRA4: [637.8, 907.09],
    Executive: [521.86, 756],
    Folio: [612, 936],
    Legal: [612, 1008],
    Letter: [612, 792],
    Tabloid: [792, 1224]
};
var jv = function(t) {
    return t[t.Fastest = 1 / 0] = "Fastest", t[t.Fast = 1500] = "Fast", t[t.Medium = 500] = "Medium", t[t.Slow = 100] = "Slow", t;
}(jv || {});
var JN = function() {
        function t(r, e, i) {
            this.alreadyEmbedded = !1, this.ref = r, this.doc = e, this.embedder = i;
        }
        return t.prototype.embed = function() {
            return Rt(this, void 0, void 0, function() {
                var r, e, i, n, a;
                return Mt(this, function(o) {
                    switch (o.label) {
                        case 0:
                            return this.alreadyEmbedded ? [3, 2] : [4, this.embedder.embedIntoContext(this.doc.context, this.ref)];
                        case 1:
                            r = o.sent(), this.doc.catalog.has(K.of("Names")) || this.doc.catalog.set(K.of("Names"), this.doc.context.obj({})), e = this.doc.catalog.lookup(K.of("Names"), At), e.has(K.of("EmbeddedFiles")) || e.set(K.of("EmbeddedFiles"), this.doc.context.obj({})), i = e.lookup(K.of("EmbeddedFiles"), At), i.has(K.of("Names")) || i.set(K.of("Names"), this.doc.context.obj([])), n = i.lookup(K.of("Names"), $t), n.push(bt.fromText(this.embedder.fileName)), n.push(r), this.doc.catalog.has(K.of("AF")) || this.doc.catalog.set(K.of("AF"), this.doc.context.obj([])), a = this.doc.catalog.lookup(K.of("AF"), $t), a.push(r), this.alreadyEmbedded = !0, o.label = 2;
                        case 2:
                            return [2];
                    }
                });
            });
        }, t.of = function(r, e, i) {
            return new t(r, e, i);
        }, t;
    }(),
    M4 = JN;
var QN = function() {
        function t(r, e, i) {
            this.alreadyEmbedded = !1, this.ref = r, this.doc = e, this.embedder = i;
        }
        return t.prototype.embed = function() {
            return Rt(this, void 0, void 0, function() {
                var r, e, i, n, a, o, s;
                return Mt(this, function(l) {
                    switch (l.label) {
                        case 0:
                            return this.alreadyEmbedded ? [3, 2] : (r = this.doc, e = r.catalog, i = r.context, [4, this.embedder.embedIntoContext(this.doc.context, this.ref)]);
                        case 1:
                            n = l.sent(), e.has(K.of("Names")) || e.set(K.of("Names"), i.obj({})), a = e.lookup(K.of("Names"), At), a.has(K.of("JavaScript")) || a.set(K.of("JavaScript"), i.obj({})), o = a.lookup(K.of("JavaScript"), At), o.has(K.of("Names")) || o.set(K.of("Names"), i.obj([])), s = o.lookup(K.of("Names"), $t), s.push(bt.fromText(this.embedder.scriptName)), s.push(n), this.alreadyEmbedded = !0, l.label = 2;
                        case 2:
                            return [2];
                    }
                });
            });
        }, t.of = function(r, e, i) {
            return new t(r, e, i);
        }, t;
    }(),
    Hv = QN;
var $N = function() {
        function t(r, e) {
            this.script = r, this.scriptName = e;
        }
        return t.for = function(r, e) {
            return new t(r, e);
        }, t.prototype.embedIntoContext = function(r, e) {
            return Rt(this, void 0, void 0, function() {
                var i;
                return Mt(this, function(n) {
                    return i = r.obj({
                        Type: "Action",
                        S: "JavaScript",
                        JS: bt.fromText(this.script)
                    }), e ? (r.assign(e, i), [2, e]) : [2, r.register(i)];
                });
            });
        }, t;
    }(),
    B4 = $N;
var eL = function() {
        function t(r, e, i) {
            var n = this;
            if (this.defaultWordBreaks = [" "], this.computePages = function() {
                    var a = [];
                    return n.catalog.Pages().traverse(function(o, s) {
                        if (o instanceof _a) {
                            var l = n.pageMap.get(o);
                            l || (l = gn.of(o, s, n), n.pageMap.set(o, l)), a.push(l);
                        }
                    }), a;
                }, this.getOrCreateForm = function() {
                    var a = n.catalog.getOrCreateAcroForm();
                    return Wv.of(a, n);
                }, ke(r, "context", [
                    [ru, "PDFContext"]
                ]), ke(e, "ignoreEncryption", ["boolean"]), this.context = r, this.catalog = r.lookup(r.trailerInfo.Root), this.isEncrypted = !!r.lookup(r.trailerInfo.Encrypt), this.pageCache = oa.populatedBy(this.computePages), this.pageMap = new Map(), this.formCache = oa.populatedBy(this.getOrCreateForm), this.fonts = [], this.images = [], this.embeddedPages = [], this.embeddedFiles = [], this.javaScripts = [], !e && this.isEncrypted) throw new g4();
            i && this.updateInfoDict();
        }
        return t.load = function(r, e) {
            return e === void 0 && (e = {}), Rt(this, void 0, void 0, function() {
                var i, n, a, o, s, l, c, u, h, d, f, m;
                return Mt(this, function(_) {
                    switch (_.label) {
                        case 0:
                            return i = e.ignoreEncryption, n = i === void 0 ? !1 : i, a = e.parseSpeed, o = a === void 0 ? jv.Slow : a, s = e.throwOnInvalidObject, l = s === void 0 ? !1 : s, c = e.updateMetadata, u = c === void 0 ? !0 : c, h = e.capNumbers, d = h === void 0 ? !1 : h, ke(r, "pdf", ["string", Uint8Array, ArrayBuffer]), ke(n, "ignoreEncryption", ["boolean"]), ke(o, "parseSpeed", ["number"]), ke(l, "throwOnInvalidObject", ["boolean"]), f = Y0(r), [4, bv.forBytesWithOptions(f, o, l, d).parseDocument()];
                        case 1:
                            return m = _.sent(), [2, new t(m, n, u)];
                    }
                });
            });
        }, t.create = function(r) {
            return r === void 0 && (r = {}), Rt(this, void 0, void 0, function() {
                var e, i, n, a, o, s;
                return Mt(this, function(l) {
                    return e = r.updateMetadata, i = e === void 0 ? !0 : e, n = ru.create(), a = ah.withContext(n), o = n.register(a), s = nh.withContextAndPages(n, o), n.trailerInfo.Root = n.register(s), [2, new t(n, !1, i)];
                });
            });
        }, t.prototype.registerFontkit = function(r) {
            this.fontkit = r;
        }, t.prototype.getForm = function() {
            var r = this.formCache.access();
            return r.hasXFA() && (console.warn("Removing XFA form data as pdf-lib does not support reading or writing XFA"), r.deleteXFA()), r;
        }, t.prototype.getTitle = function() {
            var r = this.getInfoDict().lookup(K.Title);
            if (r) return Ql(r), r.decodeText();
        }, t.prototype.getAuthor = function() {
            var r = this.getInfoDict().lookup(K.Author);
            if (r) return Ql(r), r.decodeText();
        }, t.prototype.getSubject = function() {
            var r = this.getInfoDict().lookup(K.Subject);
            if (r) return Ql(r), r.decodeText();
        }, t.prototype.getKeywords = function() {
            var r = this.getInfoDict().lookup(K.Keywords);
            if (r) return Ql(r), r.decodeText();
        }, t.prototype.getCreator = function() {
            var r = this.getInfoDict().lookup(K.Creator);
            if (r) return Ql(r), r.decodeText();
        }, t.prototype.getProducer = function() {
            var r = this.getInfoDict().lookup(K.Producer);
            if (r) return Ql(r), r.decodeText();
        }, t.prototype.getCreationDate = function() {
            var r = this.getInfoDict().lookup(K.CreationDate);
            if (r) return Ql(r), r.decodeDate();
        }, t.prototype.getModificationDate = function() {
            var r = this.getInfoDict().lookup(K.ModDate);
            if (r) return Ql(r), r.decodeDate();
        }, t.prototype.setTitle = function(r, e) {
            ke(r, "title", ["string"]);
            var i = K.of("Title");
            if (this.getInfoDict().set(i, bt.fromText(r)), e ? .showInWindowTitleBar) {
                var n = this.catalog.getOrCreateViewerPreferences();
                n.setDisplayDocTitle(!0);
            }
        }, t.prototype.setAuthor = function(r) {
            ke(r, "author", ["string"]);
            var e = K.of("Author");
            this.getInfoDict().set(e, bt.fromText(r));
        }, t.prototype.setSubject = function(r) {
            ke(r, "author", ["string"]);
            var e = K.of("Subject");
            this.getInfoDict().set(e, bt.fromText(r));
        }, t.prototype.setKeywords = function(r) {
            ke(r, "keywords", [Array]);
            var e = K.of("Keywords");
            this.getInfoDict().set(e, bt.fromText(r.join(" ")));
        }, t.prototype.setCreator = function(r) {
            ke(r, "creator", ["string"]);
            var e = K.of("Creator");
            this.getInfoDict().set(e, bt.fromText(r));
        }, t.prototype.setProducer = function(r) {
            ke(r, "creator", ["string"]);
            var e = K.of("Producer");
            this.getInfoDict().set(e, bt.fromText(r));
        }, t.prototype.setLanguage = function(r) {
            ke(r, "language", ["string"]);
            var e = K.of("Lang");
            this.catalog.set(e, Fr.of(r));
        }, t.prototype.setCreationDate = function(r) {
            ke(r, "creationDate", [
                [Date, "Date"]
            ]);
            var e = K.of("CreationDate");
            this.getInfoDict().set(e, Fr.fromDate(r));
        }, t.prototype.setModificationDate = function(r) {
            ke(r, "modificationDate", [
                [Date, "Date"]
            ]);
            var e = K.of("ModDate");
            this.getInfoDict().set(e, Fr.fromDate(r));
        }, t.prototype.getPageCount = function() {
            return this.pageCount === void 0 && (this.pageCount = this.getPages().length), this.pageCount;
        }, t.prototype.getPages = function() {
            return this.pageCache.access();
        }, t.prototype.getPage = function(r) {
            var e = this.getPages();
            return aa(r, "index", 0, e.length - 1), e[r];
        }, t.prototype.getPageIndices = function() {
            return F5(0, this.getPageCount());
        }, t.prototype.removePage = function(r) {
            var e = this.getPageCount();
            if (this.pageCount === 0) throw new _4();
            aa(r, "index", 0, e - 1), this.catalog.removeLeafNode(r), this.pageCount = e - 1;
        }, t.prototype.addPage = function(r) {
            return ke(r, "page", ["undefined", [gn, "PDFPage"], Array]), this.insertPage(this.getPageCount(), r);
        }, t.prototype.insertPage = function(r, e) {
            var i = this.getPageCount();
            if (aa(r, "index", 0, i), ke(e, "page", ["undefined", [gn, "PDFPage"], Array]), !e || Array.isArray(e)) {
                var n = Array.isArray(e) ? e : R4.A4;
                e = gn.create(this), e.setSize.apply(e, n);
            } else if (e.doc !== this) throw new x4();
            var a = this.catalog.insertLeafNode(e.ref, r);
            return e.node.setParent(a), this.pageMap.set(e.node, e), this.pageCache.invalidate(), this.pageCount = i + 1, e;
        }, t.prototype.copyPages = function(r, e) {
            return Rt(this, void 0, void 0, function() {
                var i, n, a, o, s, l, c, u;
                return Mt(this, function(h) {
                    switch (h.label) {
                        case 0:
                            return ke(r, "srcDoc", [
                                [t, "PDFDocument"]
                            ]), ke(e, "indices", [Array]), [4, r.flush()];
                        case 1:
                            for (h.sent(), i = r1.for(r.context, this.context), n = r.getPages(), a = new Array(e.length), o = 0, s = e.length; o < s; o++) l = n[e[o]], c = i.copy(l.node), u = this.context.register(c), a[o] = gn.of(c, u, this);
                            return [2, a];
                    }
                });
            });
        }, t.prototype.copy = function() {
            return Rt(this, void 0, void 0, function() {
                var r, e, i, n;
                return Mt(this, function(a) {
                    switch (a.label) {
                        case 0:
                            return [4, t.create()];
                        case 1:
                            return r = a.sent(), [4, r.copyPages(this, this.getPageIndices())];
                        case 2:
                            for (e = a.sent(), i = 0, n = e.length; i < n; i++) r.addPage(e[i]);
                            return this.getAuthor() !== void 0 && r.setAuthor(this.getAuthor()), this.getCreationDate() !== void 0 && r.setCreationDate(this.getCreationDate()), this.getCreator() !== void 0 && r.setCreator(this.getCreator()), this.getModificationDate() !== void 0 && r.setModificationDate(this.getModificationDate()), this.getProducer() !== void 0 && r.setProducer(this.getProducer()), this.getSubject() !== void 0 && r.setSubject(this.getSubject()), this.getTitle() !== void 0 && r.setTitle(this.getTitle()), r.defaultWordBreaks = this.defaultWordBreaks, [2, r];
                    }
                });
            });
        }, t.prototype.addJavaScript = function(r, e) {
            ke(r, "name", ["string"]), ke(e, "script", ["string"]);
            var i = B4.for(e, r),
                n = this.context.nextRef(),
                a = Hv.of(n, this, i);
            this.javaScripts.push(a);
        }, t.prototype.attach = function(r, e, i) {
            return i === void 0 && (i = {}), Rt(this, void 0, void 0, function() {
                var n, a, o, s;
                return Mt(this, function(l) {
                    return ke(r, "attachment", ["string", Uint8Array, ArrayBuffer]), ke(e, "name", ["string"]), rt(i.mimeType, "mimeType", ["string"]), rt(i.description, "description", ["string"]), rt(i.creationDate, "options.creationDate", [Date]), rt(i.modificationDate, "options.modificationDate", [Date]), Pa(i.afRelationship, "options.afRelationship", n1), n = Y0(r), a = dv.for(n, e, i), o = this.context.nextRef(), s = M4.of(o, this, a), this.embeddedFiles.push(s), [2];
                });
            });
        }, t.prototype.embedFont = function(r, e) {
            return e === void 0 && (e = {}), Rt(this, void 0, void 0, function() {
                var i, n, a, o, s, l, c, u, h, d;
                return Mt(this, function(f) {
                    switch (f.label) {
                        case 0:
                            return i = e.subset, n = i === void 0 ? !1 : i, a = e.customName, o = e.features, ke(r, "font", ["string", Uint8Array, ArrayBuffer]), ke(n, "subset", ["boolean"]), nv(r) ? (s = Kc.for(r, a), [3, 7]) : [3, 1];
                        case 1:
                            return P5(r) ? (l = Y0(r), c = this.assertFontkit(), n ? [4, hv.for(c, l, a, o)] : [3, 3]) : [3, 6];
                        case 2:
                            return u = f.sent(), [3, 5];
                        case 3:
                            return [4, Yc.for(c, l, a, o)];
                        case 4:
                            u = f.sent(), f.label = 5;
                        case 5:
                            return s = u, [3, 7];
                        case 6:
                            throw new TypeError("`font` must be one of `StandardFonts | string | Uint8Array | ArrayBuffer`");
                        case 7:
                            return h = this.context.nextRef(), d = tn.of(h, this, s), this.fonts.push(d), [2, d];
                    }
                });
            });
        }, t.prototype.embedStandardFont = function(r, e) {
            if (ke(r, "font", ["string"]), !nv(r)) throw new TypeError("`font` must be one of type `StandardFonts`");
            var i = Kc.for(r, e),
                n = this.context.nextRef(),
                a = tn.of(n, this, i);
            return this.fonts.push(a), a;
        }, t.prototype.embedJpg = function(r) {
            return Rt(this, void 0, void 0, function() {
                var e, i, n, a;
                return Mt(this, function(o) {
                    switch (o.label) {
                        case 0:
                            return ke(r, "jpg", ["string", Uint8Array, ArrayBuffer]), e = Y0(r), [4, Xf.for(e)];
                        case 1:
                            return i = o.sent(), n = this.context.nextRef(), a = uu.of(n, this, i), this.images.push(a), [2, a];
                    }
                });
            });
        }, t.prototype.embedPng = function(r) {
            return Rt(this, void 0, void 0, function() {
                var e, i, n, a;
                return Mt(this, function(o) {
                    switch (o.label) {
                        case 0:
                            return ke(r, "png", ["string", Uint8Array, ArrayBuffer]), e = Y0(r), [4, Kf.for(e)];
                        case 1:
                            return i = o.sent(), n = this.context.nextRef(), a = uu.of(n, this, i), this.images.push(a), [2, a];
                    }
                });
            });
        }, t.prototype.embedPdf = function(r, e) {
            return e === void 0 && (e = [0]), Rt(this, void 0, void 0, function() {
                var i, n, a;
                return Mt(this, function(o) {
                    switch (o.label) {
                        case 0:
                            return ke(r, "pdf", ["string", Uint8Array, ArrayBuffer, [t, "PDFDocument"]]), ke(e, "indices", [Array]), r instanceof t ? (n = r, [3, 3]) : [3, 1];
                        case 1:
                            return [4, t.load(r)];
                        case 2:
                            n = o.sent(), o.label = 3;
                        case 3:
                            return i = n, a = E5(i.getPages(), e), [2, this.embedPages(a)];
                    }
                });
            });
        }, t.prototype.embedPage = function(r, e, i) {
            return Rt(this, void 0, void 0, function() {
                var n;
                return Mt(this, function(a) {
                    switch (a.label) {
                        case 0:
                            return ke(r, "page", [
                                [gn, "PDFPage"]
                            ]), [4, this.embedPages([r], [e], [i])];
                        case 1:
                            return n = a.sent()[0], [2, n];
                    }
                });
            });
        }, t.prototype.embedPages = function(r, e, i) {
            return e === void 0 && (e = []), i === void 0 && (i = []), Rt(this, void 0, void 0, function() {
                var c, u, n, a, o, s, l, c, u, h, d, f, m, _, x;
                return Mt(this, function(g) {
                    switch (g.label) {
                        case 0:
                            if (r.length === 0) return [2, []];
                            for (c = 0, u = r.length - 1; c < u; c++)
                                if (n = r[c], a = r[c + 1], n.node.context !== a.node.context) throw new fS();
                            o = r[0].node.context, s = o === this.context ? function(b) {
                                return b;
                            } : r1.for(o, this.context).copy, l = new Array(r.length), c = 0, u = r.length, g.label = 1;
                        case 1:
                            return c < u ? (h = s(r[c].node), d = e[c], f = i[c], [4, Zf.for(h, d, f)]) : [3, 4];
                        case 2:
                            m = g.sent(), _ = this.context.nextRef(), l[c] = Ch.of(_, this, m), g.label = 3;
                        case 3:
                            return c++, [3, 1];
                        case 4:
                            return (x = this.embeddedPages).push.apply(x, l), [2, l];
                    }
                });
            });
        }, t.prototype.flush = function() {
            return Rt(this, void 0, void 0, function() {
                return Mt(this, function(r) {
                    switch (r.label) {
                        case 0:
                            return [4, this.embedAll(this.fonts)];
                        case 1:
                            return r.sent(), [4, this.embedAll(this.images)];
                        case 2:
                            return r.sent(), [4, this.embedAll(this.embeddedPages)];
                        case 3:
                            return r.sent(), [4, this.embedAll(this.embeddedFiles)];
                        case 4:
                            return r.sent(), [4, this.embedAll(this.javaScripts)];
                        case 5:
                            return r.sent(), [2];
                    }
                });
            });
        }, t.prototype.save = function(r) {
            return r === void 0 && (r = {}), Rt(this, void 0, void 0, function() {
                var e, i, n, a, o, s, l, c, u, h;
                return Mt(this, function(d) {
                    switch (d.label) {
                        case 0:
                            return e = r.useObjectStreams, i = e === void 0 ? !0 : e, n = r.addDefaultPage, a = n === void 0 ? !0 : n, o = r.objectsPerTick, s = o === void 0 ? 50 : o, l = r.updateFieldAppearances, c = l === void 0 ? !0 : l, ke(i, "useObjectStreams", ["boolean"]), ke(a, "addDefaultPage", ["boolean"]), ke(s, "objectsPerTick", ["number"]), ke(c, "updateFieldAppearances", ["boolean"]), a && this.getPageCount() === 0 && this.addPage(), c && (u = this.formCache.getValue(), u && u.updateFieldAppearances()), [4, this.flush()];
                        case 1:
                            return d.sent(), h = i ? fv : Hf, [2, h.forContext(this.context, s).serializeToBuffer()];
                    }
                });
            });
        }, t.prototype.saveAsBase64 = function(r) {
            return r === void 0 && (r = {}), Rt(this, void 0, void 0, function() {
                var e, i, n, a, o;
                return Mt(this, function(s) {
                    switch (s.label) {
                        case 0:
                            return e = r.dataUri, i = e === void 0 ? !1 : e, n = V2(r, ["dataUri"]), ke(i, "dataUri", ["boolean"]), [4, this.save(n)];
                        case 1:
                            return a = s.sent(), o = v5(a), [2, i ? "data:application/pdf;base64," + o : o];
                    }
                });
            });
        }, t.prototype.findPageForAnnotationRef = function(r) {
            for (var e = this.getPages(), i = 0, n = e.length; i < n; i++) {
                var a = e[i],
                    o = a.node.Annots();
                if (o ? .indexOf(r) !== void 0) return a;
            }
        }, t.prototype.embedAll = function(r) {
            return Rt(this, void 0, void 0, function() {
                var e, i;
                return Mt(this, function(n) {
                    switch (n.label) {
                        case 0:
                            e = 0, i = r.length, n.label = 1;
                        case 1:
                            return e < i ? [4, r[e].embed()] : [3, 4];
                        case 2:
                            n.sent(), n.label = 3;
                        case 3:
                            return e++, [3, 1];
                        case 4:
                            return [2];
                    }
                });
            });
        }, t.prototype.updateInfoDict = function() {
            var r = "pdf-lib (https://github.com/Hopding/pdf-lib)",
                e = new Date(),
                i = this.getInfoDict();
            this.setProducer(r), this.setModificationDate(e), i.get(K.of("Creator")) || this.setCreator(r), i.get(K.of("CreationDate")) || this.setCreationDate(e);
        }, t.prototype.getInfoDict = function() {
            var r = this.context.lookup(this.context.trailerInfo.Info);
            if (r instanceof At) return r;
            var e = this.context.obj({});
            return this.context.trailerInfo.Info = this.context.register(e), e;
        }, t.prototype.assertFontkit = function() {
            if (!this.fontkit) throw new v4();
            return this.fontkit;
        }, t;
    }(),
    Hn = eL;

function Ql(t) {
    if (!(t instanceof bt) && !(t instanceof Fr)) throw new Hc([bt, Fr], t);
}
var $s = function(t) {
    return t.Normal = "Normal", t.Multiply = "Multiply", t.Screen = "Screen", t.Overlay = "Overlay", t.Darken = "Darken", t.Lighten = "Lighten", t.ColorDodge = "ColorDodge", t.ColorBurn = "ColorBurn", t.HardLight = "HardLight", t.SoftLight = "SoftLight", t.Difference = "Difference", t.Exclusion = "Exclusion", t;
}($s || {});
var tL = function() {
        function t(r, e, i) {
            this.fontSize = 24, this.fontColor = Lr(0, 0, 0), this.lineHeight = 24, this.x = 0, this.y = 0, ke(r, "leafNode", [
                [_a, "PDFPageLeaf"]
            ]), ke(e, "ref", [
                [tr, "PDFRef"]
            ]), ke(i, "doc", [
                [Hn, "PDFDocument"]
            ]), this.node = r, this.ref = e, this.doc = i;
        }
        return t.prototype.setRotation = function(r) {
            var e = d1(r);
            Qp(e, "degreesAngle", 90), this.node.set(K.of("Rotate"), this.doc.context.obj(e));
        }, t.prototype.getRotation = function() {
            var r = this.node.Rotate();
            return Wt(r ? r.asNumber() : 0);
        }, t.prototype.setSize = function(r, e) {
            ke(r, "width", ["number"]), ke(e, "height", ["number"]);
            var i = this.getMediaBox();
            this.setMediaBox(i.x, i.y, r, e);
            var n = this.getCropBox(),
                a = this.getBleedBox(),
                o = this.getTrimBox(),
                s = this.getArtBox(),
                l = this.node.CropBox(),
                c = this.node.BleedBox(),
                u = this.node.TrimBox(),
                h = this.node.ArtBox();
            l && Vf(n, i) && this.setCropBox(i.x, i.y, r, e), c && Vf(a, i) && this.setBleedBox(i.x, i.y, r, e), u && Vf(o, i) && this.setTrimBox(i.x, i.y, r, e), h && Vf(s, i) && this.setArtBox(i.x, i.y, r, e);
        }, t.prototype.setWidth = function(r) {
            ke(r, "width", ["number"]), this.setSize(r, this.getSize().height);
        }, t.prototype.setHeight = function(r) {
            ke(r, "height", ["number"]), this.setSize(this.getSize().width, r);
        }, t.prototype.setMediaBox = function(r, e, i, n) {
            ke(r, "x", ["number"]), ke(e, "y", ["number"]), ke(i, "width", ["number"]), ke(n, "height", ["number"]);
            var a = this.doc.context.obj([r, e, r + i, e + n]);
            this.node.set(K.MediaBox, a);
        }, t.prototype.setCropBox = function(r, e, i, n) {
            ke(r, "x", ["number"]), ke(e, "y", ["number"]), ke(i, "width", ["number"]), ke(n, "height", ["number"]);
            var a = this.doc.context.obj([r, e, r + i, e + n]);
            this.node.set(K.CropBox, a);
        }, t.prototype.setBleedBox = function(r, e, i, n) {
            ke(r, "x", ["number"]), ke(e, "y", ["number"]), ke(i, "width", ["number"]), ke(n, "height", ["number"]);
            var a = this.doc.context.obj([r, e, r + i, e + n]);
            this.node.set(K.BleedBox, a);
        }, t.prototype.setTrimBox = function(r, e, i, n) {
            ke(r, "x", ["number"]), ke(e, "y", ["number"]), ke(i, "width", ["number"]), ke(n, "height", ["number"]);
            var a = this.doc.context.obj([r, e, r + i, e + n]);
            this.node.set(K.TrimBox, a);
        }, t.prototype.setArtBox = function(r, e, i, n) {
            ke(r, "x", ["number"]), ke(e, "y", ["number"]), ke(i, "width", ["number"]), ke(n, "height", ["number"]);
            var a = this.doc.context.obj([r, e, r + i, e + n]);
            this.node.set(K.ArtBox, a);
        }, t.prototype.getSize = function() {
            var r = this.getMediaBox(),
                e = r.width,
                i = r.height;
            return {
                width: e,
                height: i
            };
        }, t.prototype.getWidth = function() {
            return this.getSize().width;
        }, t.prototype.getHeight = function() {
            return this.getSize().height;
        }, t.prototype.getMediaBox = function() {
            var r = this.node.MediaBox();
            return r.asRectangle();
        }, t.prototype.getCropBox = function() {
            var r, e = this.node.CropBox();
            return (r = e ? .asRectangle()) !== null && r !== void 0 ? r : this.getMediaBox();
        }, t.prototype.getBleedBox = function() {
            var r, e = this.node.BleedBox();
            return (r = e ? .asRectangle()) !== null && r !== void 0 ? r : this.getCropBox();
        }, t.prototype.getTrimBox = function() {
            var r, e = this.node.TrimBox();
            return (r = e ? .asRectangle()) !== null && r !== void 0 ? r : this.getCropBox();
        }, t.prototype.getArtBox = function() {
            var r, e = this.node.ArtBox();
            return (r = e ? .asRectangle()) !== null && r !== void 0 ? r : this.getCropBox();
        }, t.prototype.translateContent = function(r, e) {
            ke(r, "x", ["number"]), ke(e, "y", ["number"]), this.node.normalize(), this.getContentStream();
            var i = this.createContentStream(Hi(), ba(r, e)),
                n = this.doc.context.register(i),
                a = this.createContentStream(Gi()),
                o = this.doc.context.register(a);
            this.node.wrapContentStreams(n, o);
        }, t.prototype.scale = function(r, e) {
            ke(r, "x", ["number"]), ke(e, "y", ["number"]), this.setSize(this.getWidth() * r, this.getHeight() * e), this.scaleContent(r, e), this.scaleAnnotations(r, e);
        }, t.prototype.scaleContent = function(r, e) {
            ke(r, "x", ["number"]), ke(e, "y", ["number"]), this.node.normalize(), this.getContentStream();
            var i = this.createContentStream(Hi(), $c(r, e)),
                n = this.doc.context.register(i),
                a = this.createContentStream(Gi()),
                o = this.doc.context.register(a);
            this.node.wrapContentStreams(n, o);
        }, t.prototype.scaleAnnotations = function(r, e) {
            ke(r, "x", ["number"]), ke(e, "y", ["number"]);
            var i = this.node.Annots();
            if (i)
                for (var n = 0; n < i.size(); n++) {
                    var a = i.lookup(n);
                    a instanceof At && this.scaleAnnot(a, r, e);
                }
        }, t.prototype.resetPosition = function() {
            this.getContentStream(!1), this.x = 0, this.y = 0;
        }, t.prototype.setFont = function(r) {
            ke(r, "font", [
                [tn, "PDFFont"]
            ]), this.font = r, this.fontKey = this.node.newFontDictionary(this.font.name, this.font.ref);
        }, t.prototype.setFontSize = function(r) {
            ke(r, "fontSize", ["number"]), this.fontSize = r;
        }, t.prototype.setFontColor = function(r) {
            ke(r, "fontColor", [
                [Object, "Color"]
            ]), this.fontColor = r;
        }, t.prototype.setLineHeight = function(r) {
            ke(r, "lineHeight", ["number"]), this.lineHeight = r;
        }, t.prototype.getPosition = function() {
            return {
                x: this.x,
                y: this.y
            };
        }, t.prototype.getX = function() {
            return this.x;
        }, t.prototype.getY = function() {
            return this.y;
        }, t.prototype.moveTo = function(r, e) {
            ke(r, "x", ["number"]), ke(e, "y", ["number"]), this.x = r, this.y = e;
        }, t.prototype.moveDown = function(r) {
            ke(r, "yDecrease", ["number"]), this.y -= r;
        }, t.prototype.moveUp = function(r) {
            ke(r, "yIncrease", ["number"]), this.y += r;
        }, t.prototype.moveLeft = function(r) {
            ke(r, "xDecrease", ["number"]), this.x -= r;
        }, t.prototype.moveRight = function(r) {
            ke(r, "xIncrease", ["number"]), this.x += r;
        }, t.prototype.pushOperators = function() {
            for (var r = [], e = 0; e < arguments.length; e++) r[e] = arguments[e];
            Jp(r, "operator", [
                [Nr, "PDFOperator"]
            ]);
            var i = this.getContentStream();
            i.push.apply(i, r);
        }, t.prototype.drawText = function(r, e) {
            var i, n, a, o, s, l, c;
            e === void 0 && (e = {}), ke(r, "text", ["string"]), rt(e.color, "options.color", [
                [Object, "Color"]
            ]), Qa(e.opacity, "opacity.opacity", 0, 1), rt(e.font, "options.font", [
                [tn, "PDFFont"]
            ]), rt(e.size, "options.size", ["number"]), rt(e.rotate, "options.rotate", [
                [Object, "Rotation"]
            ]), rt(e.xSkew, "options.xSkew", [
                [Object, "Rotation"]
            ]), rt(e.ySkew, "options.ySkew", [
                [Object, "Rotation"]
            ]), rt(e.x, "options.x", ["number"]), rt(e.y, "options.y", ["number"]), rt(e.lineHeight, "options.lineHeight", ["number"]), rt(e.maxWidth, "options.maxWidth", ["number"]), rt(e.wordBreaks, "options.wordBreaks", [Array]), Pa(e.blendMode, "options.blendMode", $s);
            for (var u = this.setOrEmbedFont(e.font), h = u.oldFont, d = u.newFont, f = u.newFontKey, m = e.size || this.fontSize, _ = e.wordBreaks || this.doc.defaultWordBreaks, x = function(P) {
                    return d.widthOfTextAtSize(P, m);
                }, g = e.maxWidth === void 0 ? Hp(Uc(r)) : S5(r, _, e.maxWidth, x), b = new Array(g.length), w = 0, T = g.length; w < T; w++) b[w] = d.encodeText(g[w]);
            var E = this.maybeEmbedGraphicsState({
                    opacity: e.opacity,
                    blendMode: e.blendMode
                }),
                L = this.getContentStream();
            L.push.apply(L, f4(b, {
                color: (i = e.color) !== null && i !== void 0 ? i : this.fontColor,
                font: f,
                size: m,
                rotate: (n = e.rotate) !== null && n !== void 0 ? n : Wt(0),
                xSkew: (a = e.xSkew) !== null && a !== void 0 ? a : Wt(0),
                ySkew: (o = e.ySkew) !== null && o !== void 0 ? o : Wt(0),
                x: (s = e.x) !== null && s !== void 0 ? s : this.x,
                y: (l = e.y) !== null && l !== void 0 ? l : this.y,
                lineHeight: (c = e.lineHeight) !== null && c !== void 0 ? c : this.lineHeight,
                graphicsState: E
            })), e.font && (h ? this.setFont(h) : this.resetFont());
        }, t.prototype.drawImage = function(r, e) {
            var i, n, a, o, s, l, c;
            e === void 0 && (e = {}), ke(r, "image", [
                [uu, "PDFImage"]
            ]), rt(e.x, "options.x", ["number"]), rt(e.y, "options.y", ["number"]), rt(e.width, "options.width", ["number"]), rt(e.height, "options.height", ["number"]), rt(e.rotate, "options.rotate", [
                [Object, "Rotation"]
            ]), rt(e.xSkew, "options.xSkew", [
                [Object, "Rotation"]
            ]), rt(e.ySkew, "options.ySkew", [
                [Object, "Rotation"]
            ]), Qa(e.opacity, "opacity.opacity", 0, 1), Pa(e.blendMode, "options.blendMode", $s);
            var u = this.node.newXObject("Image", r.ref),
                h = this.maybeEmbedGraphicsState({
                    opacity: e.opacity,
                    blendMode: e.blendMode
                }),
                d = this.getContentStream();
            d.push.apply(d, S1(u, {
                x: (i = e.x) !== null && i !== void 0 ? i : this.x,
                y: (n = e.y) !== null && n !== void 0 ? n : this.y,
                width: (a = e.width) !== null && a !== void 0 ? a : r.size().width,
                height: (o = e.height) !== null && o !== void 0 ? o : r.size().height,
                rotate: (s = e.rotate) !== null && s !== void 0 ? s : Wt(0),
                xSkew: (l = e.xSkew) !== null && l !== void 0 ? l : Wt(0),
                ySkew: (c = e.ySkew) !== null && c !== void 0 ? c : Wt(0),
                graphicsState: h
            }));
        }, t.prototype.drawPage = function(r, e) {
            var i, n, a, o, s;
            e === void 0 && (e = {}), ke(r, "embeddedPage", [
                [Ch, "PDFEmbeddedPage"]
            ]), rt(e.x, "options.x", ["number"]), rt(e.y, "options.y", ["number"]), rt(e.xScale, "options.xScale", ["number"]), rt(e.yScale, "options.yScale", ["number"]), rt(e.width, "options.width", ["number"]), rt(e.height, "options.height", ["number"]), rt(e.rotate, "options.rotate", [
                [Object, "Rotation"]
            ]), rt(e.xSkew, "options.xSkew", [
                [Object, "Rotation"]
            ]), rt(e.ySkew, "options.ySkew", [
                [Object, "Rotation"]
            ]), Qa(e.opacity, "opacity.opacity", 0, 1), Pa(e.blendMode, "options.blendMode", $s);
            var l = this.node.newXObject("EmbeddedPdfPage", r.ref),
                c = this.maybeEmbedGraphicsState({
                    opacity: e.opacity,
                    blendMode: e.blendMode
                }),
                u = e.width !== void 0 ? e.width / r.width : e.xScale !== void 0 ? e.xScale : 1,
                h = e.height !== void 0 ? e.height / r.height : e.yScale !== void 0 ? e.yScale : 1,
                d = this.getContentStream();
            d.push.apply(d, h4(l, {
                x: (i = e.x) !== null && i !== void 0 ? i : this.x,
                y: (n = e.y) !== null && n !== void 0 ? n : this.y,
                xScale: u,
                yScale: h,
                rotate: (a = e.rotate) !== null && a !== void 0 ? a : Wt(0),
                xSkew: (o = e.xSkew) !== null && o !== void 0 ? o : Wt(0),
                ySkew: (s = e.ySkew) !== null && s !== void 0 ? s : Wt(0),
                graphicsState: c
            }));
        }, t.prototype.drawSvgPath = function(r, e) {
            var i, n, a, o, s, l, c, u, h;
            e === void 0 && (e = {}), ke(r, "path", ["string"]), rt(e.x, "options.x", ["number"]), rt(e.y, "options.y", ["number"]), rt(e.scale, "options.scale", ["number"]), rt(e.rotate, "options.rotate", [
                [Object, "Rotation"]
            ]), rt(e.borderWidth, "options.borderWidth", ["number"]), rt(e.color, "options.color", [
                [Object, "Color"]
            ]), Qa(e.opacity, "opacity.opacity", 0, 1), rt(e.borderColor, "options.borderColor", [
                [Object, "Color"]
            ]), rt(e.borderDashArray, "options.borderDashArray", [Array]), rt(e.borderDashPhase, "options.borderDashPhase", ["number"]), Pa(e.borderLineCap, "options.borderLineCap", ou), Qa(e.borderOpacity, "options.borderOpacity", 0, 1), Pa(e.blendMode, "options.blendMode", $s);
            var d = this.maybeEmbedGraphicsState({
                opacity: e.opacity,
                borderOpacity: e.borderOpacity,
                blendMode: e.blendMode
            });
            !("color" in e) && !("borderColor" in e) && (e.borderColor = Lr(0, 0, 0));
            var f = this.getContentStream();
            f.push.apply(f, p4(r, {
                x: (i = e.x) !== null && i !== void 0 ? i : this.x,
                y: (n = e.y) !== null && n !== void 0 ? n : this.y,
                scale: e.scale,
                rotate: (a = e.rotate) !== null && a !== void 0 ? a : Wt(0),
                color: (o = e.color) !== null && o !== void 0 ? o : void 0,
                borderColor: (s = e.borderColor) !== null && s !== void 0 ? s : void 0,
                borderWidth: (l = e.borderWidth) !== null && l !== void 0 ? l : 0,
                borderDashArray: (c = e.borderDashArray) !== null && c !== void 0 ? c : void 0,
                borderDashPhase: (u = e.borderDashPhase) !== null && u !== void 0 ? u : void 0,
                borderLineCap: (h = e.borderLineCap) !== null && h !== void 0 ? h : void 0,
                graphicsState: d
            }));
        }, t.prototype.drawLine = function(r) {
            var e, i, n, a, o;
            ke(r.start, "options.start", [
                [Object, "{ x: number, y: number }"]
            ]), ke(r.end, "options.end", [
                [Object, "{ x: number, y: number }"]
            ]), ke(r.start.x, "options.start.x", ["number"]), ke(r.start.y, "options.start.y", ["number"]), ke(r.end.x, "options.end.x", ["number"]), ke(r.end.y, "options.end.y", ["number"]), rt(r.thickness, "options.thickness", ["number"]), rt(r.color, "options.color", [
                [Object, "Color"]
            ]), rt(r.dashArray, "options.dashArray", [Array]), rt(r.dashPhase, "options.dashPhase", ["number"]), Pa(r.lineCap, "options.lineCap", ou), Qa(r.opacity, "opacity.opacity", 0, 1), Pa(r.blendMode, "options.blendMode", $s);
            var s = this.maybeEmbedGraphicsState({
                borderOpacity: r.opacity,
                blendMode: r.blendMode
            });
            "color" in r || (r.color = Lr(0, 0, 0));
            var l = this.getContentStream();
            l.push.apply(l, d4({
                start: r.start,
                end: r.end,
                thickness: (e = r.thickness) !== null && e !== void 0 ? e : 1,
                color: (i = r.color) !== null && i !== void 0 ? i : void 0,
                dashArray: (n = r.dashArray) !== null && n !== void 0 ? n : void 0,
                dashPhase: (a = r.dashPhase) !== null && a !== void 0 ? a : void 0,
                lineCap: (o = r.lineCap) !== null && o !== void 0 ? o : void 0,
                graphicsState: s
            }));
        }, t.prototype.drawRectangle = function(r) {
            var e, i, n, a, o, s, l, c, u, h, d, f, m;
            r === void 0 && (r = {}), rt(r.x, "options.x", ["number"]), rt(r.y, "options.y", ["number"]), rt(r.width, "options.width", ["number"]), rt(r.height, "options.height", ["number"]), rt(r.rotate, "options.rotate", [
                [Object, "Rotation"]
            ]), rt(r.xSkew, "options.xSkew", [
                [Object, "Rotation"]
            ]), rt(r.ySkew, "options.ySkew", [
                [Object, "Rotation"]
            ]), rt(r.borderWidth, "options.borderWidth", ["number"]), rt(r.color, "options.color", [
                [Object, "Color"]
            ]), Qa(r.opacity, "opacity.opacity", 0, 1), rt(r.borderColor, "options.borderColor", [
                [Object, "Color"]
            ]), rt(r.borderDashArray, "options.borderDashArray", [Array]), rt(r.borderDashPhase, "options.borderDashPhase", ["number"]), Pa(r.borderLineCap, "options.borderLineCap", ou), Qa(r.borderOpacity, "options.borderOpacity", 0, 1), Pa(r.blendMode, "options.blendMode", $s);
            var _ = this.maybeEmbedGraphicsState({
                opacity: r.opacity,
                borderOpacity: r.borderOpacity,
                blendMode: r.blendMode
            });
            !("color" in r) && !("borderColor" in r) && (r.color = Lr(0, 0, 0));
            var x = this.getContentStream();
            x.push.apply(x, r0({
                x: (e = r.x) !== null && e !== void 0 ? e : this.x,
                y: (i = r.y) !== null && i !== void 0 ? i : this.y,
                width: (n = r.width) !== null && n !== void 0 ? n : 150,
                height: (a = r.height) !== null && a !== void 0 ? a : 100,
                rotate: (o = r.rotate) !== null && o !== void 0 ? o : Wt(0),
                xSkew: (s = r.xSkew) !== null && s !== void 0 ? s : Wt(0),
                ySkew: (l = r.ySkew) !== null && l !== void 0 ? l : Wt(0),
                borderWidth: (c = r.borderWidth) !== null && c !== void 0 ? c : 0,
                color: (u = r.color) !== null && u !== void 0 ? u : void 0,
                borderColor: (h = r.borderColor) !== null && h !== void 0 ? h : void 0,
                borderDashArray: (d = r.borderDashArray) !== null && d !== void 0 ? d : void 0,
                borderDashPhase: (f = r.borderDashPhase) !== null && f !== void 0 ? f : void 0,
                graphicsState: _,
                borderLineCap: (m = r.borderLineCap) !== null && m !== void 0 ? m : void 0
            }));
        }, t.prototype.drawSquare = function(r) {
            r === void 0 && (r = {});
            var e = r.size;
            rt(e, "size", ["number"]), this.drawRectangle(ar(ar({}, r), {
                width: e,
                height: e
            }));
        }, t.prototype.drawEllipse = function(r) {
            var e, i, n, a, o, s, l, c, u, h, d;
            r === void 0 && (r = {}), rt(r.x, "options.x", ["number"]), rt(r.y, "options.y", ["number"]), rt(r.xScale, "options.xScale", ["number"]), rt(r.yScale, "options.yScale", ["number"]), rt(r.rotate, "options.rotate", [
                [Object, "Rotation"]
            ]), rt(r.color, "options.color", [
                [Object, "Color"]
            ]), Qa(r.opacity, "opacity.opacity", 0, 1), rt(r.borderColor, "options.borderColor", [
                [Object, "Color"]
            ]), Qa(r.borderOpacity, "options.borderOpacity", 0, 1), rt(r.borderWidth, "options.borderWidth", ["number"]), rt(r.borderDashArray, "options.borderDashArray", [Array]), rt(r.borderDashPhase, "options.borderDashPhase", ["number"]), Pa(r.borderLineCap, "options.borderLineCap", ou), Pa(r.blendMode, "options.blendMode", $s);
            var f = this.maybeEmbedGraphicsState({
                opacity: r.opacity,
                borderOpacity: r.borderOpacity,
                blendMode: r.blendMode
            });
            !("color" in r) && !("borderColor" in r) && (r.color = Lr(0, 0, 0));
            var m = this.getContentStream();
            m.push.apply(m, w1({
                x: (e = r.x) !== null && e !== void 0 ? e : this.x,
                y: (i = r.y) !== null && i !== void 0 ? i : this.y,
                xScale: (n = r.xScale) !== null && n !== void 0 ? n : 100,
                yScale: (a = r.yScale) !== null && a !== void 0 ? a : 100,
                rotate: (o = r.rotate) !== null && o !== void 0 ? o : void 0,
                color: (s = r.color) !== null && s !== void 0 ? s : void 0,
                borderColor: (l = r.borderColor) !== null && l !== void 0 ? l : void 0,
                borderWidth: (c = r.borderWidth) !== null && c !== void 0 ? c : 0,
                borderDashArray: (u = r.borderDashArray) !== null && u !== void 0 ? u : void 0,
                borderDashPhase: (h = r.borderDashPhase) !== null && h !== void 0 ? h : void 0,
                borderLineCap: (d = r.borderLineCap) !== null && d !== void 0 ? d : void 0,
                graphicsState: f
            }));
        }, t.prototype.drawCircle = function(r) {
            r === void 0 && (r = {});
            var e = r.size,
                i = e === void 0 ? 100 : e;
            rt(i, "size", ["number"]), this.drawEllipse(ar(ar({}, r), {
                xScale: i,
                yScale: i
            }));
        }, t.prototype.setOrEmbedFont = function(r) {
            var e = this.font,
                i = this.fontKey;
            r ? this.setFont(r) : this.getFont();
            var n = this.font,
                a = this.fontKey;
            return {
                oldFont: e,
                oldFontKey: i,
                newFont: n,
                newFontKey: a
            };
        }, t.prototype.getFont = function() {
            if (!this.font || !this.fontKey) {
                var r = this.doc.embedStandardFont(Th.Helvetica);
                this.setFont(r);
            }
            return [this.font, this.fontKey];
        }, t.prototype.resetFont = function() {
            this.font = void 0, this.fontKey = void 0;
        }, t.prototype.getContentStream = function(r) {
            return r === void 0 && (r = !0), r && this.contentStream ? this.contentStream : (this.contentStream = this.createContentStream(), this.contentStreamRef = this.doc.context.register(this.contentStream), this.node.addContentStream(this.contentStreamRef), this.contentStream);
        }, t.prototype.createContentStream = function() {
            for (var r = [], e = 0; e < arguments.length; e++) r[e] = arguments[e];
            var i = this.doc.context.obj({}),
                n = Js.of(i, r);
            return n;
        }, t.prototype.maybeEmbedGraphicsState = function(r) {
            var e = r.opacity,
                i = r.borderOpacity,
                n = r.blendMode;
            if (!(e === void 0 && i === void 0 && n === void 0)) {
                var a = this.doc.context.obj({
                        Type: "ExtGState",
                        ca: e,
                        CA: i,
                        BM: n
                    }),
                    o = this.node.newExtGState("GS", a);
                return o;
            }
        }, t.prototype.scaleAnnot = function(r, e, i) {
            for (var n = ["RD", "CL", "Vertices", "QuadPoints", "L", "Rect"], a = 0, o = n.length; a < o; a++) {
                var s = r.lookup(K.of(n[a]));
                s instanceof $t && s.scalePDFNumbers(e, i);
            }
            var l = r.lookup(K.of("InkList"));
            if (l instanceof $t)
                for (var a = 0, o = l.size(); a < o; a++) {
                    var c = l.lookup(a);
                    c instanceof $t && c.scalePDFNumbers(e, i);
                }
        }, t.of = function(r, e, i) {
            return new t(r, e, i);
        }, t.create = function(r) {
            ke(r, "doc", [
                [Hn, "PDFDocument"]
            ]);
            var e = tr.of(-1),
                i = _a.withContextAndParent(r.context, e),
                n = r.context.register(i);
            return new t(i, n, r);
        }, t;
    }(),
    gn = tL;
var rL = function(t) {
        Ge(r, t);

        function r(e, i, n) {
            var a = t.call(this, e, i, n) || this;
            return ke(e, "acroButton", [
                [Gl, "PDFAcroPushButton"]
            ]), a.acroField = e, a;
        }
        return r.prototype.setImage = function(e, i) {
            i === void 0 && (i = xs.Center);
            for (var n = this.acroField.getWidgets(), a = 0, o = n.length; a < o; a++) {
                var s = n[a],
                    l = this.createImageAppearanceStream(s, e, i);
                this.updateWidgetAppearances(s, {
                    normal: l
                });
            }
            this.markAsClean();
        }, r.prototype.setFontSize = function(e) {
            Ul(e, "fontSize"), this.acroField.setFontSize(e), this.markAsDirty();
        }, r.prototype.addToPage = function(e, i, n) {
            var a, o, s, l, c, u, h, d, f, m, _;
            rt(e, "text", ["string"]), rt(i, "page", [
                [gn, "PDFPage"]
            ]), xo(n);
            var x = this.createWidget({
                    x: ((a = n ? .x) !== null && a !== void 0 ? a : 0) - ((o = n ? .borderWidth) !== null && o !== void 0 ? o : 0) / 2,
                    y: ((s = n ? .y) !== null && s !== void 0 ? s : 0) - ((l = n ? .borderWidth) !== null && l !== void 0 ? l : 0) / 2,
                    width: (c = n ? .width) !== null && c !== void 0 ? c : 100,
                    height: (u = n ? .height) !== null && u !== void 0 ? u : 50,
                    textColor: (h = n ? .textColor) !== null && h !== void 0 ? h : Lr(0, 0, 0),
                    backgroundColor: (d = n ? .backgroundColor) !== null && d !== void 0 ? d : Lr(.75, .75, .75),
                    borderColor: n ? .borderColor,
                    borderWidth: (f = n ? .borderWidth) !== null && f !== void 0 ? f : 0,
                    rotate: (m = n ? .rotate) !== null && m !== void 0 ? m : Wt(0),
                    caption: e,
                    hidden: n ? .hidden,
                    page: i.ref
                }),
                g = this.doc.context.register(x.dict);
            this.acroField.addWidget(g);
            var b = (_ = n ? .font) !== null && _ !== void 0 ? _ : this.doc.getForm().getDefaultFont();
            this.updateWidgetAppearance(x, b), i.node.addAnnot(g);
        }, r.prototype.needsAppearancesUpdate = function() {
            var e;
            if (this.isDirty()) return !0;
            for (var i = this.acroField.getWidgets(), n = 0, a = i.length; n < a; n++) {
                var o = i[n],
                    s = ((e = o.getAppearances()) === null || e === void 0 ? void 0 : e.normal) instanceof Fi;
                if (!s) return !0;
            }
            return !1;
        }, r.prototype.defaultUpdateAppearances = function(e) {
            ke(e, "font", [
                [tn, "PDFFont"]
            ]), this.updateAppearances(e);
        }, r.prototype.updateAppearances = function(e, i) {
            ke(e, "font", [
                [tn, "PDFFont"]
            ]), rt(i, "provider", [Function]);
            for (var n = this.acroField.getWidgets(), a = 0, o = n.length; a < o; a++) {
                var s = n[a];
                this.updateWidgetAppearance(s, e, i);
            }
        }, r.prototype.updateWidgetAppearance = function(e, i, n) {
            var a = n ? ? I4,
                o = vo(a(this, e, i));
            this.updateWidgetAppearanceWithFont(e, i, o);
        }, r.of = function(e, i, n) {
            return new r(e, i, n);
        }, r;
    }(Sa),
    gu = rL;
var iL = ["*"],
    nL = ({
        dt: t
    }) => `
.p-divider-horizontal {
    display: flex;
    width: 100%;
    position: relative;
    align-items: center;
    margin: ${t("divider.horizontal.margin")};
    padding: ${t("divider.horizontal.padding")};
}

.p-divider-horizontal:before {
    position: absolute;
    display: block;
    inset-block-start: 50%;
    inset-inline-start: 0;
    width: 100%;
    content: "";
    border-block-start: 1px solid ${t("divider.border.color")};
}

.p-divider-horizontal .p-divider-content {
    padding: ${t("divider.horizontal.content.padding")};
}

.p-divider-vertical {
    min-height: 100%;
    display: flex;
    position: relative;
    justify-content: center;
    margin: ${t("divider.vertical.margin")};
    padding: ${t("divider.vertical.padding")};
}

.p-divider-vertical:before {
    position: absolute;
    display: block;
    inset-block-start: 0;
    inset-inline-start: 50%;
    height: 100%;
    content: "";
    border-inline-start: 1px solid ${t("divider.border.color")};
}

.p-divider.p-divider-vertical .p-divider-content {
    padding: ${t("divider.vertical.content.padding")};
}

.p-divider-content {
    z-index: 1;
    background: ${t("divider.content.background")};
    color: ${t("divider.content.color")};
}

.p-divider-solid.p-divider-horizontal:before {
    border-block-start-style: solid;
}

.p-divider-solid.p-divider-vertical:before {
    border-inline-start-style: solid;
}

.p-divider-dashed.p-divider-horizontal:before {
    border-block-start-style: dashed;
}

.p-divider-dashed.p-divider-vertical:before {
    border-inline-start-style: dashed;
}

.p-divider-dotted.p-divider-horizontal:before {
    border-block-start-style: dotted;
}

.p-divider-dotted.p-divider-vertical:before {
    border-inline-start-style: dotted;
}

.p-divider-left:dir(rtl),
.p-divider-right:dir(rtl) {
    flex-direction: row-reverse;
}
`,
    aL = {
        root: ({
            props: t
        }) => ({
            justifyContent: t.layout === "horizontal" ? t.align === "center" || t.align === null ? "center" : t.align === "left" ? "flex-start" : t.align === "right" ? "flex-end" : null : null,
            alignItems: t.layout === "vertical" ? t.align === "center" || t.align === null ? "center" : t.align === "top" ? "flex-start" : t.align === "bottom" ? "flex-end" : null : null
        })
    },
    oL = {
        root: ({
            props: t
        }) => ["p-divider p-component", "p-divider-" + t.layout, "p-divider-" + t.type, {
            "p-divider-left": t.layout === "horizontal" && (!t.align || t.align === "left")
        }, {
            "p-divider-center": t.layout === "horizontal" && t.align === "center"
        }, {
            "p-divider-right": t.layout === "horizontal" && t.align === "right"
        }, {
            "p-divider-top": t.layout === "vertical" && t.align === "top"
        }, {
            "p-divider-center": t.layout === "vertical" && (!t.align || t.align === "center")
        }, {
            "p-divider-bottom": t.layout === "vertical" && t.align === "bottom"
        }],
        content: "p-divider-content"
    },
    U4 = (() => {
        class t extends Cl {
            name = "divider";
            theme = nL;
            classes = oL;
            inlineStyles = aL;
            static ɵfac = (() => {
                let e;
                return function(n) {
                    return (e || (e = Da(t)))(n || t);
                };
            })();
            static ɵprov = gl({
                token: t,
                factory: t.ɵfac
            });
        }
        return t;
    })();
var Gv = (() => {
        class t extends Bs {
            style;
            styleClass;
            layout = "horizontal";
            type = "solid";
            align;
            _componentStyle = Ls(U4);
            get hostClass() {
                return this.styleClass;
            }
            static ɵfac = (() => {
                let e;
                return function(n) {
                    return (e || (e = Da(t)))(n || t);
                };
            })();
            static ɵcmp = Sn({
                type: t,
                selectors: [
                    ["p-divider"]
                ],
                hostVars: 33,
                hostBindings: function(i, n) {
                    i & 2 && (vt("aria-orientation", n.layout)("data-pc-name", "divider")("role", "separator"), Xn(n.hostClass), ld("justify-content", n.layout === "horizontal" ? n.align === "center" || n.align === void 0 ? "center" : n.align === "left" ? "flex-start" : n.align === "right" ? "flex-end" : null : null)("align-items", n.layout === "vertical" ? n.align === "center" || n.align === void 0 ? "center" : n.align === "top" ? "flex-start" : n.align === "bottom" ? "flex-end" : null : null), q2("p-divider", !0)("p-component", !0)("p-divider-horizontal", n.layout === "horizontal")("p-divider-vertical", n.layout === "vertical")("p-divider-solid", n.type === "solid")("p-divider-dashed", n.type === "dashed")("p-divider-dotted", n.type === "dotted")("p-divider-left", n.layout === "horizontal" && (!n.align || n.align === "left"))("p-divider-center", n.layout === "horizontal" && n.align === "center" || n.layout === "vertical" && (!n.align || n.align === "center"))("p-divider-right", n.layout === "horizontal" && n.align === "right")("p-divider-top", n.layout === "vertical" && n.align === "top")("p-divider-bottom", n.layout === "vertical" && n.align === "bottom"));
                },
                inputs: {
                    style: "style",
                    styleClass: "styleClass",
                    layout: "layout",
                    type: "type",
                    align: "align"
                },
                features: [Yo([U4]), za],
                ngContentSelectors: iL,
                decls: 2,
                vars: 0,
                consts: [
                    [1, "p-divider-content"]
                ],
                template: function(i, n) {
                    i & 1 && (g0(), ge(0, "div", 0), mc(1), ve());
                },
                dependencies: [ha, ja],
                encapsulation: 2,
                changeDetection: 0
            });
        }
        return t;
    })(),
    V4 = (() => {
        class t {
            static ɵfac = function(i) {
                return new(i || t)();
            };
            static ɵmod = pc({
                type: t
            });
            static ɵinj = dc({
                imports: [Gv]
            });
        }
        return t;
    })();
var cL = ["item"],
    uL = ["group"],
    fL = ["header"],
    z4 = ["filter"],
    hL = ["footer"],
    dL = ["emptyfilter"],
    pL = ["empty"],
    mL = ["filtericon"],
    gL = ["checkicon"],
    vL = ["checkmark"],
    xL = ["loader"],
    _L = ["headerchkbox"],
    yL = ["lastHiddenFocusableElement"],
    bL = ["firstHiddenFocusableElement"],
    wL = ["scroller"],
    SL = ["list"],
    CL = ["container"],
    AL = [
        [
            ["p-header"]
        ],
        [
            ["p-footer"]
        ]
    ],
    TL = ["p-header", "p-footer"],
    C1 = (t, r) => ({
        $implicit: t,
        options: r
    }),
    DL = t => ({
        "p-checkbox-disabled": t
    }),
    Xv = t => ({
        $implicit: t
    }),
    j4 = t => ({
        options: t
    }),
    H4 = () => [],
    Kv = t => ({
        height: t
    }),
    kL = () => ({}),
    FL = (t, r, e) => ({
        "p-listbox-option-selected": t,
        "p-focus": r,
        "p-disabled": e
    }),
    EL = (t, r, e, i) => ({
        $implicit: t,
        index: r,
        selected: e,
        disabled: i
    }),
    PL = t => ({
        implicit: t
    });

function IL(t, r) {
    t & 1 && Ci(0);
}

function OL(t, r) {
    if (t & 1 && (ge(0, "div", 22), mc(1), Oe(2, IL, 1, 0, "ng-container", 23), ve()), t & 2) {
        let e = ee();
        oe(2), Q("ngTemplateOutlet", e.headerTemplate || e._headerTemplate)("ngTemplateOutletContext", Zo(2, C1, e.modelValue(), e.visibleOptions()));
    }
}

function NL(t, r) {}

function LL(t, r) {
    t & 1 && Oe(0, NL, 0, 0, "ng-template");
}

function RL(t, r) {
    if (t & 1 && Oe(0, LL, 1, 0, null, 23), t & 2) {
        let e = ee(5);
        Q("ngTemplateOutlet", e.checkIconTemplate || e._checkIconTemplate)("ngTemplateOutletContext", ii(2, Xv, e.allSelected()));
    }
}

function ML(t, r) {
    t & 1 && (Xt(0), Oe(1, RL, 1, 4, "ng-template", null, 5, hi), Kt());
}

function BL(t, r) {
    if (t & 1 && (ge(0, "p-checkbox", 30), Oe(1, ML, 3, 0, "ng-container", 31), ve()), t & 2) {
        let e = ee(3);
        Q("ngModel", e.allSelected())("disabled", e.disabled)("tabindex", -1)("variant", e.config.inputStyle() === "filled" || e.config.inputVariant() === "filled" ? "filled" : "outlined")("binary", !0), oe(), Q("ngIf", e.checkIconTemplate || e._checkIconTemplate);
    }
}

function UL(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "div", 26), nt("click", function(n) {
            Ce(e);
            let a = ee(2);
            return Ae(a.onToggleAll(n));
        })("keydown", function(n) {
            Ce(e);
            let a = ee(2);
            return Ae(a.onHeaderCheckboxKeyDown(n));
        }), ge(1, "div", 27)(2, "input", 28, 4), nt("focus", function(n) {
            Ce(e);
            let a = ee(2);
            return Ae(a.onHeaderCheckboxFocus(n));
        })("blur", function() {
            Ce(e);
            let n = ee(2);
            return Ae(n.onHeaderCheckboxBlur());
        }), ve()(), Oe(4, BL, 2, 6, "p-checkbox", 29), ve();
    }
    if (t & 2) {
        let e = ee(2);
        Q("ngClass", ii(6, DL, e.disabled)), oe(), vt("data-p-hidden-accessible", !0), oe(), Q("disabled", e.disabled), vt("checked", e.allSelected())("aria-label", e.toggleAllAriaLabel), oe(2), Q("ngIf", e.checkbox && e.multiple);
    }
}

function VL(t, r) {
    t & 1 && Ci(0);
}

function zL(t, r) {
    if (t & 1 && (Xt(0), Oe(1, VL, 1, 0, "ng-container", 23), Kt()), t & 2) {
        let e = ee(2);
        oe(), Q("ngTemplateOutlet", e.filterTemplate || e._filterTemplate)("ngTemplateOutletContext", ii(2, j4, e.filterOptions));
    }
}

function WL(t, r) {
    t & 1 && St(0, "SearchIcon", 38), t & 2 && (Q("styleClass", "p-listbox-filter-icon"), vt("aria-hidden", !0));
}

function jL(t, r) {}

function HL(t, r) {
    t & 1 && Oe(0, jL, 0, 0, "ng-template");
}

function GL(t, r) {
    if (t & 1 && (ge(0, "span", 39), Oe(1, HL, 1, 0, null, 40), ve()), t & 2) {
        let e = ee(4);
        vt("aria-hidden", !0), oe(), Q("ngTemplateOutlet", e.filterIconTemplate || e._filterIconTemplate);
    }
}

function qL(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "div", 34)(1, "p-iconfield")(2, "input", 35, 6), nt("input", function(n) {
            Ce(e);
            let a = ee(3);
            return Ae(a.onFilterChange(n));
        })("keydown", function(n) {
            Ce(e);
            let a = ee(3);
            return Ae(a.onFilterKeyDown(n));
        })("focus", function(n) {
            Ce(e);
            let a = ee(3);
            return Ae(a.onFilterFocus(n));
        })("blur", function(n) {
            Ce(e);
            let a = ee(3);
            return Ae(a.onFilterBlur(n));
        }), ve(), ge(4, "p-inputicon"), Oe(5, WL, 1, 2, "SearchIcon", 36)(6, GL, 2, 2, "span", 37), ve()()();
    }
    if (t & 2) {
        let e = ee(3);
        oe(2), Q("value", e._filterValue() || "")("disabled", e.disabled)("tabindex", !e.disabled && !e.focused ? e.tabindex : -1), vt("aria-owns", e.id + "_list")("aria-activedescendant", e.focusedOptionId)("placeholder", e.filterPlaceHolder)("aria-label", e.ariaFilterLabel), oe(3), Q("ngIf", !e.filterIconTemplate && !e._filterIconTemplate), oe(), Q("ngIf", e.filterIconTemplate || e._filterIconTemplate);
    }
}

function XL(t, r) {
    if (t & 1 && (Oe(0, qL, 7, 9, "div", 32), ge(1, "span", 33), cr(2), ve()), t & 2) {
        let e = ee(2);
        Q("ngIf", e.filter), oe(), vt("data-p-hidden-accessible", !0), oe(), Zi(" ", e.filterResultMessageText, " ");
    }
}

function KL(t, r) {
    if (t & 1 && (ge(0, "div", 22), Oe(1, UL, 5, 8, "div", 24)(2, zL, 2, 4, "ng-container", 25)(3, XL, 3, 3, "ng-template", null, 3, hi), ve()), t & 2) {
        let e = Br(4),
            i = ee();
        oe(), Q("ngIf", i.checkbox && i.multiple && i.showToggleAll), oe(), Q("ngIf", i.filterTemplate || i._filterTemplate)("ngIfElse", e);
    }
}

function YL(t, r) {
    if (t & 1 && cr(0), t & 2) {
        let e = ee(2);
        Zi(" ", e.emptyFilterMessageText, " ");
    }
}

function ZL(t, r) {
    t & 1 && Ci(0, null, 7);
}

function JL(t, r) {
    if (t & 1 && Oe(0, ZL, 2, 0, "ng-container", 40), t & 2) {
        let e = ee(2);
        Q("ngTemplateOutlet", e.emptyFilterTemplate || e._emptyFilterTemplate || e._emptyTemplate || e.emptyTemplate);
    }
}

function QL(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "div", 41), nt("cdkDropListDropped", function(n) {
            Ce(e);
            let a = ee();
            return Ae(a.drop(n));
        }), Oe(1, YL, 1, 1)(2, JL, 1, 1, "ng-container"), ve();
    }
    if (t & 2) {
        let e = ee();
        Q("cdkDropListData", vr(2, H4)), oe(), Hu(!e.emptyFilterTemplate && !e._emptyFilterTemplate && !e._emptyTemplate && !e.emptyTemplate ? 1 : 2);
    }
}

function $L(t, r) {
    if (t & 1 && cr(0), t & 2) {
        let e = ee(2);
        Zi(" ", e.emptyMessage, " ");
    }
}

function e7(t, r) {
    t & 1 && Ci(0, null, 8);
}

function t7(t, r) {
    if (t & 1 && Oe(0, e7, 2, 0, "ng-container", 40), t & 2) {
        let e = ee(2);
        Q("ngTemplateOutlet", e.emptyTemplate || e._emptyTemplate);
    }
}

function r7(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "div", 41), nt("cdkDropListDropped", function(n) {
            Ce(e);
            let a = ee();
            return Ae(a.drop(n));
        }), Oe(1, $L, 1, 1)(2, t7, 1, 1, "ng-container"), ve();
    }
    if (t & 2) {
        let e = ee();
        Q("cdkDropListData", vr(2, H4)), oe(), Hu(!e.emptyTemplate && !e._emptyTemplate ? 1 : 2);
    }
}

function i7(t, r) {
    t & 1 && Ci(0);
}

function n7(t, r) {
    if (t & 1 && Oe(0, i7, 1, 0, "ng-container", 23), t & 2) {
        let e = r.$implicit,
            i = r.options;
        ee(2);
        let n = Br(3);
        Q("ngTemplateOutlet", n)("ngTemplateOutletContext", Zo(2, C1, e, i));
    }
}

function a7(t, r) {
    t & 1 && Ci(0);
}

function o7(t, r) {
    if (t & 1 && Oe(0, a7, 1, 0, "ng-container", 23), t & 2) {
        let e = r.options,
            i = ee(4);
        Q("ngTemplateOutlet", i.loaderTemplate || i._loaderTemplate)("ngTemplateOutletContext", ii(2, j4, e));
    }
}

function s7(t, r) {
    t & 1 && Oe(0, o7, 1, 4, "ng-template", null, 12, hi);
}

function l7(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "p-scroller", 43, 10), nt("onLazyLoad", function(n) {
            Ce(e);
            let a = ee(2);
            return Ae(a.onLazyLoad.emit(n));
        }), Oe(2, n7, 1, 5, "ng-template", null, 11, hi)(4, s7, 2, 0), ve();
    }
    if (t & 2) {
        let e = ee(2);
        ju(ii(9, Kv, e.scrollHeight)), Q("items", e.visibleOptions())("itemSize", e.virtualScrollItemSize)("autoSize", !0)("lazy", e.lazy)("options", e.virtualScrollOptions)("tabindex", e.scrollerTabIndex), oe(4), Hu(e.loaderTemplate || e._loaderTemplate ? 4 : -1);
    }
}

function c7(t, r) {
    t & 1 && Ci(0);
}

function u7(t, r) {
    if (t & 1 && (Xt(0), Oe(1, c7, 1, 0, "ng-container", 23), Kt()), t & 2) {
        ee();
        let e = Br(3),
            i = ee();
        oe(), Q("ngTemplateOutlet", e)("ngTemplateOutletContext", Zo(3, C1, i.visibleOptions(), vr(2, kL)));
    }
}

function f7(t, r) {
    if (t & 1 && (ge(0, "span"), cr(1), ve()), t & 2) {
        let e = ee(2).$implicit,
            i = ee(3);
        oe(), Wi(i.getOptionGroupLabel(e.optionGroup));
    }
}

function h7(t, r) {
    t & 1 && Ci(0);
}

function d7(t, r) {
    if (t & 1 && (Xt(0), ge(1, "li", 46), Oe(2, f7, 2, 1, "span", 31)(3, h7, 1, 0, "ng-container", 23), ve(), Kt()), t & 2) {
        let e = ee(),
            i = e.$implicit,
            n = e.index,
            a = ee().options,
            o = ee(2);
        oe(), Q("ngStyle", ii(7, Kv, a.itemSize + "px"))("cdkDragData", i)("cdkDragDisabled", !o.dragdrop), vt("id", o.id + "_" + o.getOptionIndex(n, a)), oe(), Q("ngIf", !o.groupTemplate && !o._groupTemplate), oe(), Q("ngTemplateOutlet", o.groupTemplate || o._groupTemplate)("ngTemplateOutletContext", ii(9, Xv, i.optionGroup));
    }
}

function p7(t, r) {}

function m7(t, r) {
    t & 1 && Oe(0, p7, 0, 0, "ng-template");
}

function g7(t, r) {
    if (t & 1 && Oe(0, m7, 1, 0, null, 23), t & 2) {
        let e = ee(4).$implicit,
            i = ee(3);
        Q("ngTemplateOutlet", i.checkIconTemplate || i._checkIconTemplate)("ngTemplateOutletContext", ii(2, Xv, i.isSelected(e)));
    }
}

function v7(t, r) {
    t & 1 && (Xt(0), Oe(1, g7, 1, 4, "ng-template", null, 5, hi), Kt());
}

function x7(t, r) {
    if (t & 1 && (ge(0, "p-checkbox", 49), Oe(1, v7, 3, 0, "ng-container", 31), ve()), t & 2) {
        let e = ee(2).$implicit,
            i = ee(3);
        Q("ngModel", i.isSelected(e))("readonly", !0)("disabled", i.disabled || i.isOptionDisabled(e))("tabindex", -1)("variant", i.config.inputStyle() === "filled" || i.config.inputVariant() === "filled" ? "filled" : "outlined")("binary", !0), oe(), Q("ngIf", i.checkIconTemplate || i._checkIconTemplate);
    }
}

function _7(t, r) {
    t & 1 && St(0, "BlankIcon", 51);
}

function y7(t, r) {
    t & 1 && St(0, "CheckIcon", 51);
}

function b7(t, r) {
    if (t & 1 && (Xt(0), Oe(1, _7, 1, 0, "BlankIcon", 50)(2, y7, 1, 0, "CheckIcon", 50), Kt()), t & 2) {
        let e = ee(3).$implicit,
            i = ee(3);
        oe(), Q("ngIf", !i.isSelected(e)), oe(), Q("ngIf", i.isSelected(e));
    }
}

function w7(t, r) {
    t & 1 && Ci(0);
}

function S7(t, r) {
    if (t & 1 && (Xt(0), Oe(1, b7, 3, 2, "ng-container", 31)(2, w7, 1, 0, "ng-container", 23), Kt()), t & 2) {
        let e = ee(2).$implicit,
            i = ee(3);
        oe(), Q("ngIf", !i.checkmarkTemplate && !i._checkmarkTemplate), oe(), Q("ngTemplateOutlet", i.checkmarkTemplate || i._checkmarkTemplate)("ngTemplateOutletContext", ii(3, PL, i.isSelected(e)));
    }
}

function C7(t, r) {
    if (t & 1 && (ge(0, "span"), cr(1), ve()), t & 2) {
        let e = ee(2).$implicit,
            i = ee(3);
        oe(), Wi(i.getOptionLabel(e));
    }
}

function A7(t, r) {
    t & 1 && Ci(0);
}

function T7(t, r) {
    if (t & 1) {
        let e = or();
        Xt(0), ge(1, "li", 47), nt("click", function(n) {
            Ce(e);
            let a = ee(),
                o = a.$implicit,
                s = a.index,
                l = ee().options,
                c = ee(2);
            return Ae(c.onOptionSelect(n, o, c.getOptionIndex(s, l)));
        })("dblclick", function(n) {
            Ce(e);
            let a = ee().$implicit,
                o = ee(3);
            return Ae(o.onOptionDoubleClick(n, a));
        })("mousedown", function(n) {
            Ce(e);
            let a = ee().index,
                o = ee().options,
                s = ee(2);
            return Ae(s.onOptionMouseDown(n, s.getOptionIndex(a, o)));
        })("mouseenter", function(n) {
            Ce(e);
            let a = ee().index,
                o = ee().options,
                s = ee(2);
            return Ae(s.onOptionMouseEnter(n, s.getOptionIndex(a, o)));
        })("touchend", function() {
            Ce(e);
            let n = ee(4);
            return Ae(n.onOptionTouchEnd());
        }), Oe(2, x7, 2, 7, "p-checkbox", 48)(3, S7, 3, 5, "ng-container", 31)(4, C7, 2, 1, "span", 31)(5, A7, 1, 0, "ng-container", 23), ve(), Kt();
    }
    if (t & 2) {
        let e = ee(),
            i = e.$implicit,
            n = e.index,
            a = ee().options,
            o = ee(2);
        oe(), Q("ngStyle", ii(15, Kv, a.itemSize + "px"))("ngClass", Z2(17, FL, o.isSelected(i) && o.highlightOnSelect, o.focusedOptionIndex() === o.getOptionIndex(n, a), o.isOptionDisabled(i)))("cdkDragData", i)("cdkDragDisabled", !o.dragdrop), vt("id", o.id + "_" + o.getOptionIndex(n, a))("aria-label", o.getOptionLabel(i))("aria-selected", o.isSelected(i))("aria-disabled", o.isOptionDisabled(i))("aria-setsize", o.ariaSetSize)("ariaPosInset", o.getAriaPosInset(o.getOptionIndex(n, a))), oe(), Q("ngIf", o.checkbox && o.multiple), oe(), Q("ngIf", o.checkmark), oe(), Q("ngIf", !o.itemTemplate && !o._itemTemplate), oe(), Q("ngTemplateOutlet", o.itemTemplate || o._itemTemplate)("ngTemplateOutletContext", Gu(21, EL, i, o.getOptionIndex(n, a), o.isSelected(i), o.isOptionDisabled(i)));
    }
}

function D7(t, r) {
    if (t & 1 && Oe(0, d7, 4, 11, "ng-container", 31)(1, T7, 6, 26, "ng-container", 31), t & 2) {
        let e = r.$implicit,
            i = ee(3);
        Q("ngIf", i.isOptionGroup(e)), oe(), Q("ngIf", !i.isOptionGroup(e));
    }
}

function k7(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "ul", 44, 13), nt("focus", function(n) {
            Ce(e);
            let a = ee(2);
            return Ae(a.onListFocus(n));
        })("blur", function(n) {
            Ce(e);
            let a = ee(2);
            return Ae(a.onListBlur(n));
        })("keydown", function(n) {
            Ce(e);
            let a = ee(2);
            return Ae(a.onListKeyDown(n));
        })("cdkDropListDropped", function(n) {
            Ce(e);
            let a = ee(2);
            return Ae(a.drop(n));
        }), Oe(2, D7, 2, 2, "ng-template", 45), ve();
    }
    if (t & 2) {
        let e = r.$implicit,
            i = r.options,
            n = ee(2);
        ju(i.contentStyle), Q("tabindex", -1)("ngClass", i.contentStyleClass)("cdkDropListData", e), vt("aria-multiselectable", !0)("aria-activedescendant", n.focused ? n.focusedOptionId : void 0)("aria-label", n.ariaLabel)("aria-disabled", n.disabled), oe(2), Q("ngForOf", e);
    }
}

function F7(t, r) {
    if (t & 1 && Oe(0, l7, 5, 11, "p-scroller", 42)(1, u7, 2, 6, "ng-container", 31)(2, k7, 3, 10, "ng-template", null, 9, hi), t & 2) {
        let e = ee();
        Q("ngIf", e.virtualScroll), oe(), Q("ngIf", !e.virtualScroll);
    }
}

function E7(t, r) {
    t & 1 && Ci(0);
}

function P7(t, r) {
    if (t & 1 && (ge(0, "div", 52), mc(1, 1), Oe(2, E7, 1, 0, "ng-container", 23), ve()), t & 2) {
        let e = ee();
        oe(2), Q("ngTemplateOutlet", e.footerTemplate || e._footerTemplate)("ngTemplateOutletContext", Zo(2, C1, e.modelValue(), e.visibleOptions()));
    }
}

function I7(t, r) {
    if (t & 1 && (ge(0, "span", 21), cr(1), ve()), t & 2) {
        let e = ee();
        oe(), Zi(" ", e.emptyMessage, " ");
    }
}
var O7 = ({
        dt: t
    }) => `
.p-listbox {
    background: ${t("listbox.background")};
    color: ${t("listbox.color")};
    border: 1px solid ${t("listbox.border.color")};
    border-radius: ${t("listbox.border.radius")};
    transition: background ${t("listbox.transition.duration")}, color ${t("listbox.transition.duration")}, border-color ${t("listbox.transition.duration")},
            box-shadow ${t("listbox.transition.duration")}, outline-color ${t("listbox.transition.duration")};
    outline-color: transparent;
    box-shadow: ${t("listbox.shadow")};
}

.p-listbox.p-focus {
    border-color: ${t("listbox.focus.border.color")};
    box-shadow: ${t("listbox.focus.ring.shadow")};
    outline: ${t("listbox.focus.ring.width")} ${t("listbox.focus.ring.style")} ${t("listbox.focus.ring.color")};
    outline-offset: ${t("listbox.focus.ring.offset")};
}

.p-listbox.p-disabled {
    opacity: 1;
    background: ${t("listbox.disabled.background")};
    color: ${t("listbox.disabled.color")};
}

.p-listbox.p-disabled .p-listbox-option {
    color: ${t("listbox.disabled.color")};
}

.p-listbox-header {
    padding: ${t("listbox.list.header.padding")};
    display: flex;
    align-items: center;
}

.p-listbox-header > * {
    flex: 1 1 auto;
}

.p-listbox-header > .p-checkbox {
    flex: 0 0 auto;
}

.p-listbox-filter {
    width: 100%;
}

.p-listbox-list-container {
    overflow: auto;
}

.p-listbox-list {
    list-style-type: none;
    margin: 0;
    padding: ${t("listbox.list.padding")};
    outline: 0 none;
    display: flex;
    flex-direction: column;
    gap: ${t("listbox.list.gap")};
}

.p-listbox-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    padding: ${t("listbox.option.padding")};
    border: 0 none;
    border-radius: ${t("listbox.option.border.radius")};
    color: ${t("listbox.option.color")};
    transition: background ${t("listbox.transition.duration")}, color ${t("listbox.transition.duration")}, border-color ${t("listbox.transition.duration")},
            box-shadow ${t("listbox.transition.duration")}, outline-color ${t("listbox.transition.duration")};
}

.p-listbox-option:not(.cdk-drag-disabled) {
    cursor: move;
}

.p-listbox-striped li:nth-child(even of .p-listbox-option) {
    background: ${t("listbox.option.striped.background")};
}

.p-listbox .p-listbox-list .p-listbox-option.p-listbox-option-selected {
    background: ${t("listbox.option.selected.background")};
    color: ${t("listbox.option.selected.color")};
}

.p-listbox:not(.p-disabled) .p-listbox-option.p-listbox-option-selected.p-focus {
    background: ${t("listbox.option.selected.focus.background")};
    color: ${t("listbox.option.selected.focus.color")};
}

.p-listbox:not(.p-disabled) .p-listbox-option:not(.p-listbox-option-selected):not(.p-disabled).p-focus {
    background: ${t("listbox.option.focus.background")};
    color: ${t("listbox.option.focus.color")};
}

.p-listbox:not(.p-disabled) .p-listbox-option:not(.p-listbox-option-selected):not(.p-disabled):hover {
    background: ${t("listbox.option.focus.background")};
    color: ${t("listbox.option.focus.color")};
}

.p-listbox-option-check-icon {
    position: relative;
    margin-inline-start: ${t("listbox.checkmark.gutter.start")};
    margin-inline-end: ${t("listbox.checkmark.gutter.end")};
    color: ${t("listbox.checkmark.color")};
}

.p-listbox-option-group {
    margin: 0;
    padding: ${t("listbox.option.group.padding")};
    color: ${t("listbox.option.group.color")};
    background: ${t("listbox.option.group.background")};
    font-weight: ${t("listbox.option.group.font.weight")};
}

.p-listbox-empty-message {
    padding: ${t("listbox.empty.message.padding")};
}

/* For PrimeNG */

p-listBox.ng-invalid.ng-dirty > .p-listbox.p-component,
p-list-box.ng-invalid.ng-dirty > .p-listbox.p-component,
p-listbox.ng-invalid.ng-dirty > .p-listbox.p-component {
    border-color: ${t("listbox.invalid.border.color")};
}
`,
    N7 = {
        root: ({
            props: t
        }) => ["p-listbox p-component", {
            "p-listbox-striped": t.striped,
            "p-disabled": t.disabled,
            "p-invalid": t.invalid
        }],
        header: "p-listbox-header",
        pcFilter: "p-listbox-filter",
        listContainer: "p-listbox-list-container",
        list: "p-listbox-list",
        optionGroup: "p-listbox-option-group",
        option: ({
            instance: t,
            props: r,
            option: e,
            index: i,
            getItemOptions: n
        }) => ["p-listbox-option", {
            "p-listbox-option-selected": t.isSelected(e) && r.highlightOnSelect,
            "p-focus": t.focusedOptionIndex === t.getOptionIndex(i, n),
            "p-disabled": t.isOptionDisabled(e)
        }],
        optionCheckIcon: "p-listbox-option-check-icon",
        optionBlankIcon: "p-listbox-option-blank-icon",
        emptyMessage: "p-listbox-empty-message"
    },
    W4 = (() => {
        class t extends Cl {
            name = "listbox";
            theme = O7;
            classes = N7;
            static ɵfac = (() => {
                let e;
                return function(n) {
                    return (e || (e = Da(t)))(n || t);
                };
            })();
            static ɵprov = gl({
                token: t,
                factory: t.ɵfac
            });
        }
        return t;
    })();
var L7 = {
        provide: ax,
        useExisting: nd(() => Yv),
        multi: !0
    },
    Yv = (() => {
        class t extends Bs {
            filterService;
            id;
            searchMessage;
            emptySelectionMessage;
            selectionMessage;
            autoOptionFocus = !0;
            ariaLabel;
            selectOnFocus;
            searchLocale;
            focusOnHover = !0;
            filterMessage;
            filterFields;
            lazy = !1;
            virtualScroll;
            virtualScrollItemSize;
            virtualScrollOptions;
            scrollHeight = "14rem";
            tabindex = 0;
            multiple;
            style;
            styleClass;
            listStyle;
            listStyleClass;
            readonly;
            disabled;
            checkbox = !1;
            filter = !1;
            filterBy;
            filterMatchMode = "contains";
            filterLocale;
            metaKeySelection = !1;
            dataKey;
            showToggleAll = !0;
            optionLabel;
            optionValue;
            optionGroupChildren = "items";
            optionGroupLabel = "label";
            optionDisabled;
            ariaFilterLabel;
            filterPlaceHolder;
            emptyFilterMessage;
            emptyMessage;
            group;
            get options() {
                return this._options();
            }
            set options(e) {
                this._options.set(e);
            }
            get filterValue() {
                return this._filterValue();
            }
            set filterValue(e) {
                this._filterValue.set(e);
            }
            get selectAll() {
                return this._selectAll;
            }
            set selectAll(e) {
                this._selectAll = e;
            }
            striped = !1;
            highlightOnSelect = !0;
            checkmark = !1;
            dragdrop = !1;
            onChange = new Qr();
            onClick = new Qr();
            onDblClick = new Qr();
            onFilter = new Qr();
            onFocus = new Qr();
            onBlur = new Qr();
            onSelectAllChange = new Qr();
            onLazyLoad = new Qr();
            onDrop = new Qr();
            headerCheckboxViewChild;
            filterViewChild;
            lastHiddenFocusableElement;
            firstHiddenFocusableElement;
            scroller;
            listViewChild;
            containerViewChild;
            headerFacet;
            footerFacet;
            itemTemplate;
            groupTemplate;
            headerTemplate;
            filterTemplate;
            footerTemplate;
            emptyFilterTemplate;
            emptyTemplate;
            filterIconTemplate;
            checkIconTemplate;
            checkmarkTemplate;
            loaderTemplate;
            templates;
            _itemTemplate;
            _groupTemplate;
            _headerTemplate;
            _filterTemplate;
            _footerTemplate;
            _emptyFilterTemplate;
            _emptyTemplate;
            _filterIconTemplate;
            _checkIconTemplate;
            _checkmarkTemplate;
            _loaderTemplate;
            _filterValue = ko(null);
            _filteredOptions;
            filterOptions;
            filtered;
            value;
            onModelChange = () => {};
            onModelTouched = () => {};
            optionTouched;
            focus;
            headerCheckboxFocus;
            translationSubscription;
            focused;
            scrollerTabIndex = "0";
            _componentStyle = Ls(W4);
            get containerClass() {
                return {
                    "p-listbox p-component": !0,
                    "p-listbox-striped": this.striped,
                    "p-disabled": this.disabled
                };
            }
            get focusedOptionId() {
                return this.focusedOptionIndex() !== -1 ? `${this.id}_${this.focusedOptionIndex()}` : null;
            }
            get filterResultMessageText() {
                return so(this.visibleOptions()) ? this.filterMessageText.replaceAll("{0}", this.visibleOptions().length) : this.emptyFilterMessageText;
            }
            get filterMessageText() {
                return this.filterMessage || this.config.translation.searchMessage || "";
            }
            get searchMessageText() {
                return this.searchMessage || this.config.translation.searchMessage || "";
            }
            get emptyFilterMessageText() {
                return this.emptyFilterMessage || this.config.translation.emptySearchMessage || this.config.translation.emptyFilterMessage || "";
            }
            get selectionMessageText() {
                return this.selectionMessage || this.config.translation.selectionMessage || "";
            }
            get emptySelectionMessageText() {
                return this.emptySelectionMessage || this.config.translation.emptySelectionMessage || "";
            }
            get selectedMessageText() {
                return this.hasSelectedOption() ? this.selectionMessageText.replaceAll("{0}", this.multiple ? this.modelValue().length : "1") : this.emptySelectionMessageText;
            }
            get ariaSetSize() {
                return this.visibleOptions().filter(e => !this.isOptionGroup(e)).length;
            }
            get virtualScrollerDisabled() {
                return !this.virtualScroll;
            }
            get searchFields() {
                return this.filterBy ? .split(",") || this.filterFields || [this.optionLabel];
            }
            get toggleAllAriaLabel() {
                return this.config.translation.aria ? this.config.translation.aria[this.allSelected() ? "selectAll" : "unselectAll"] : void 0;
            }
            searchValue;
            searchTimeout;
            _selectAll = null;
            _options = ko(null);
            startRangeIndex = ko(-1);
            focusedOptionIndex = ko(-1);
            modelValue = ko(null);
            visibleOptions = J2(() => {
                let e = this.group ? this.flatOptions(this._options()) : this._options() || [];
                return this._filterValue() ? this.filterService.filter(e, this.searchFields, this._filterValue(), this.filterMatchMode, this.filterLocale) : e;
            });
            constructor(e) {
                super(), this.filterService = e;
            }
            ngOnInit() {
                super.ngOnInit(), this.id = this.id || _0("pn_id_"), this.translationSubscription = this.config.translationObserver.subscribe(() => {
                    this.cd.markForCheck();
                }), this.autoUpdateModel(), this.filterBy && (this.filterOptions = {
                    filter: e => this.onFilterChange(e),
                    reset: () => this.resetFilter()
                });
            }
            ngAfterContentInit() {
                this.templates.forEach(e => {
                    switch (e.getType()) {
                        case "item":
                            this._itemTemplate = e.template;
                            break;
                        case "group":
                            this._groupTemplate = e.template;
                            break;
                        case "header":
                            this._headerTemplate = e.template;
                            break;
                        case "filter":
                            this._filterTemplate = e.template;
                            break;
                        case "footer":
                            this._footerTemplate = e.template;
                            break;
                        case "empty":
                            this._emptyTemplate = e.template;
                            break;
                        case "emptyfilter":
                            this._emptyFilterTemplate = e.template;
                            break;
                        case "filtericon":
                            this._filterIconTemplate = e.template;
                            break;
                        case "checkicon":
                            this._checkIconTemplate = e.template;
                            break;
                        case "checkmark":
                            this._checkmarkTemplate = e.template;
                            break;
                        case "loader":
                            this._loaderTemplate = e.template;
                            break;
                        default:
                            this._itemTemplate = e.template;
                            break;
                    }
                });
            }
            writeValue(e) {
                this.value = e, this.modelValue.set(this.value), this.cd.markForCheck();
            }
            registerOnChange(e) {
                this.onModelChange = e;
            }
            registerOnTouched(e) {
                this.onModelTouched = e;
            }
            setDisabledState(e) {
                this.disabled = e, this.cd.markForCheck();
            }
            flatOptions(e) {
                return (e || []).reduce((i, n, a) => {
                    i.push({
                        optionGroup: n,
                        group: !0,
                        index: a
                    });
                    let o = this.getOptionGroupChildren(n);
                    return o && o.forEach(s => i.push(s)), i;
                }, []);
            }
            autoUpdateModel() {
                if (this.selectOnFocus && this.autoOptionFocus && !this.hasSelectedOption() && !this.multiple) {
                    let e = this.findFirstFocusedOptionIndex();
                    this.focusedOptionIndex.set(e), this.onOptionSelect(null, this.visibleOptions()[this.focusedOptionIndex()]);
                }
            }
            updateModel(e, i) {
                this.value = e, this.modelValue.set(e), this.onModelChange(e), this.onChange.emit({
                    originalEvent: i,
                    value: this.value
                });
            }
            removeOption(e) {
                return this.modelValue().filter(i => !xd(i, this.getOptionValue(e), this.equalityKey()));
            }
            onOptionSelect(e, i, n = -1) {
                this.disabled || this.isOptionDisabled(i) || this.readonly || (e && this.onClick.emit({
                    originalEvent: e,
                    option: i,
                    value: this.value
                }), this.multiple ? this.onOptionSelectMultiple(e, i) : this.onOptionSelectSingle(e, i), this.optionTouched = !1, n !== -1 && this.focusedOptionIndex.set(n));
            }
            onOptionSelectMultiple(e, i) {
                let n = this.isSelected(i),
                    a = null;
                if (this.optionTouched ? !1 : this.metaKeySelection) {
                    let s = e.metaKey || e.ctrlKey;
                    n ? a = s ? this.removeOption(i) : [this.getOptionValue(i)] : (a = s ? this.modelValue() || [] : [], a = [...a, this.getOptionValue(i)]);
                } else a = n ? this.removeOption(i) : [...(this.modelValue() || []), this.getOptionValue(i)];
                this.updateModel(a, e);
            }
            onOptionSelectSingle(e, i) {
                let n = this.isSelected(i),
                    a = !1,
                    o = null;
                if (this.optionTouched ? !1 : this.metaKeySelection) {
                    let l = e.metaKey || e.ctrlKey;
                    n ? l && (o = null, a = !0) : (o = this.getOptionValue(i), a = !0);
                } else o = n ? null : this.getOptionValue(i), a = !0;
                a && this.updateModel(o, e);
            }
            onOptionSelectRange(e, i = -1, n = -1) {
                if (i === -1 && (i = this.findNearestSelectedOptionIndex(n, !0)), n === -1 && (n = this.findNearestSelectedOptionIndex(i)), i !== -1 && n !== -1) {
                    let a = Math.min(i, n),
                        o = Math.max(i, n),
                        s = this.visibleOptions().slice(a, o + 1).filter(l => this.isValidOption(l)).map(l => this.getOptionValue(l));
                    this.updateModel(s, e);
                }
            }
            onToggleAll(e) {
                if (!(this.disabled || this.readonly)) {
                    if (Qo(this.headerCheckboxViewChild.nativeElement), this.selectAll !== null) this.onSelectAllChange.emit({
                        originalEvent: e,
                        checked: !this.allSelected()
                    });
                    else {
                        let i = this.allSelected() ? [] : this.visibleOptions().filter(n => this.isValidOption(n)).map(n => this.getOptionValue(n));
                        this.updateModel(i, e), this.onChange.emit({
                            originalEvent: e,
                            value: this.value
                        });
                    }
                    e.preventDefault();
                }
            }
            allSelected() {
                return this.selectAll !== null ? this.selectAll : so(this.visibleOptions()) && this.visibleOptions().every(e => this.isOptionGroup(e) || this.isOptionDisabled(e) || this.isSelected(e));
            }
            onOptionTouchEnd() {
                this.disabled || (this.optionTouched = !0);
            }
            onOptionMouseDown(e, i) {
                this.changeFocusedOptionIndex(e, i);
            }
            onOptionMouseEnter(e, i) {
                this.focusOnHover && this.changeFocusedOptionIndex(e, i);
            }
            onOptionDoubleClick(e, i) {
                this.disabled || this.isOptionDisabled(i) || this.readonly || this.onDblClick.emit({
                    originalEvent: e,
                    option: i,
                    value: this.value
                });
            }
            onFirstHiddenFocus(e) {
                Qo(this.listViewChild.nativeElement);
                let i = mm(this.el.nativeElement, ':not([data-p-hidden-focusable="true"])');
                this.lastHiddenFocusableElement.nativeElement.tabIndex = $o(i) ? "-1" : void 0, this.firstHiddenFocusableElement.nativeElement.tabIndex = -1;
            }
            onLastHiddenFocus(e) {
                if (e.relatedTarget === this.listViewChild.nativeElement) {
                    let n = mm(this.el.nativeElement, ":not(.p-hidden-focusable)");
                    Qo(n), this.firstHiddenFocusableElement.nativeElement.tabIndex = void 0;
                } else Qo(this.firstHiddenFocusableElement.nativeElement);
                this.lastHiddenFocusableElement.nativeElement.tabIndex = -1;
            }
            onFocusout(e) {
                !this.el.nativeElement.contains(e.relatedTarget) && this.lastHiddenFocusableElement && this.firstHiddenFocusableElement && (this.firstHiddenFocusableElement.nativeElement.tabIndex = this.lastHiddenFocusableElement.nativeElement.tabIndex = void 0, this.containerViewChild.nativeElement.tabIndex = "0", this.scrollerTabIndex = "0");
            }
            onListFocus(e) {
                this.focused = !0;
                let i = this.focusedOptionIndex() !== -1 ? this.focusedOptionIndex() : this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;
                this.focusedOptionIndex.set(i), this.onFocus.emit(e), this.containerViewChild.nativeElement.tabIndex = "-1", this.scrollerTabIndex = "-1";
            }
            onFilterFocus(e) {
                this.containerViewChild.nativeElement.tabIndex = "-1";
            }
            onListBlur(e) {
                this.focused = !1, this.focusedOptionIndex.set(-1), this.startRangeIndex.set(-1), this.searchValue = "";
            }
            onHeaderCheckboxFocus(e) {
                this.headerCheckboxFocus = !0;
            }
            onHeaderCheckboxBlur() {
                this.headerCheckboxFocus = !1;
            }
            onHeaderCheckboxKeyDown(e) {
                if (this.disabled) {
                    e.preventDefault();
                    return;
                }
                switch (e.code) {
                    case "Space":
                        this.onToggleAll(e);
                        break;
                    case "Enter":
                        this.onToggleAll(e);
                        break;
                    case "Tab":
                        this.onHeaderCheckboxTabKeyDown(e);
                        break;
                    default:
                        break;
                }
            }
            onHeaderCheckboxTabKeyDown(e) {
                Qo(this.listViewChild.nativeElement), e.preventDefault();
            }
            onFilterChange(e) {
                let i = e.target.value ? .trim();
                this._filterValue.set(i), this.focusedOptionIndex.set(-1), this.startRangeIndex.set(-1), this.onFilter.emit({
                    originalEvent: e,
                    filter: this._filterValue()
                }), !this.virtualScrollerDisabled && this.scroller.scrollToIndex(0);
            }
            onFilterBlur(e) {
                this.focusedOptionIndex.set(-1), this.startRangeIndex.set(-1);
            }
            onListKeyDown(e) {
                let i = e.metaKey || e.ctrlKey;
                switch (e.code) {
                    case "ArrowDown":
                        this.onArrowDownKey(e);
                        break;
                    case "ArrowUp":
                        this.onArrowUpKey(e);
                        break;
                    case "Home":
                        this.onHomeKey(e);
                        break;
                    case "End":
                        this.onEndKey(e);
                        break;
                    case "PageDown":
                        this.onPageDownKey(e);
                        break;
                    case "PageUp":
                        this.onPageUpKey(e);
                        break;
                    case "Enter":
                    case "Space":
                    case "NumpadEnter":
                        this.onSpaceKey(e);
                        break;
                    case "Tab":
                        break;
                    case "ShiftLeft":
                    case "ShiftRight":
                        this.onShiftKey();
                        break;
                    default:
                        if (this.multiple && e.code === "KeyA" && i) {
                            let n = this.visibleOptions().filter(a => this.isValidOption(a)).map(a => this.getOptionValue(a));
                            this.updateModel(n, e), e.preventDefault();
                            break;
                        }!i && _d(e.key) && (this.searchOptions(e, e.key), e.preventDefault());
                        break;
                }
            }
            onFilterKeyDown(e) {
                switch (e.code) {
                    case "ArrowDown":
                        this.onArrowDownKey(e);
                        break;
                    case "ArrowUp":
                        this.onArrowUpKey(e);
                        break;
                    case "ArrowLeft":
                    case "ArrowRight":
                        this.onArrowLeftKey(e, !0);
                        break;
                    case "Home":
                        this.onHomeKey(e, !0);
                        break;
                    case "End":
                        this.onEndKey(e, !0);
                        break;
                    case "Enter":
                        this.onEnterKey(e);
                        break;
                    case "ShiftLeft":
                    case "ShiftRight":
                        this.onShiftKey();
                        break;
                    default:
                        break;
                }
            }
            onArrowDownKey(e) {
                let i = this.focusedOptionIndex() !== -1 ? this.findNextOptionIndex(this.focusedOptionIndex()) : this.findFirstFocusedOptionIndex();
                this.multiple && e.shiftKey && this.onOptionSelectRange(e, this.startRangeIndex(), i), this.changeFocusedOptionIndex(e, i), e.preventDefault();
            }
            onArrowUpKey(e) {
                let i = this.focusedOptionIndex() !== -1 ? this.findPrevOptionIndex(this.focusedOptionIndex()) : this.findLastFocusedOptionIndex();
                this.multiple && e.shiftKey && this.onOptionSelectRange(e, i, this.startRangeIndex()), this.changeFocusedOptionIndex(e, i), e.preventDefault();
            }
            onArrowLeftKey(e, i = !1) {
                i && this.focusedOptionIndex.set(-1);
            }
            onHomeKey(e, i = !1) {
                if (i) e.currentTarget.setSelectionRange(0, 0), this.focusedOptionIndex.set(-1);
                else {
                    let n = e.metaKey || e.ctrlKey,
                        a = this.findFirstOptionIndex();
                    this.multiple && e.shiftKey && n && this.onOptionSelectRange(e, a, this.startRangeIndex()), this.changeFocusedOptionIndex(e, a);
                }
                e.preventDefault();
            }
            onEndKey(e, i = !1) {
                if (i) {
                    let n = e.currentTarget,
                        a = n.value.length;
                    n.setSelectionRange(a, a), this.focusedOptionIndex.set(-1);
                } else {
                    let n = e.metaKey || e.ctrlKey,
                        a = this.findLastOptionIndex();
                    this.multiple && e.shiftKey && n && this.onOptionSelectRange(e, this.startRangeIndex(), a), this.changeFocusedOptionIndex(e, a);
                }
                e.preventDefault();
            }
            onPageDownKey(e) {
                this.scrollInView(0), e.preventDefault();
            }
            onPageUpKey(e) {
                this.scrollInView(this.visibleOptions().length - 1), e.preventDefault();
            }
            onEnterKey(e) {
                this.focusedOptionIndex() !== -1 && (this.multiple && e.shiftKey ? this.onOptionSelectRange(e, this.focusedOptionIndex()) : this.onOptionSelect(e, this.visibleOptions()[this.focusedOptionIndex()])), e.preventDefault();
            }
            onSpaceKey(e) {
                this.onEnterKey(e);
            }
            onShiftKey() {
                let e = this.focusedOptionIndex();
                this.startRangeIndex.set(e);
            }
            getOptionGroupChildren(e) {
                return this.optionGroupChildren ? x0(e, this.optionGroupChildren) : e.items;
            }
            getOptionGroupLabel(e) {
                return this.optionGroupLabel ? x0(e, this.optionGroupLabel) : e && e.label !== void 0 ? e.label : e;
            }
            getOptionLabel(e) {
                return this.optionLabel ? x0(e, this.optionLabel) : e.label != null ? e.label : e;
            }
            getOptionIndex(e, i) {
                return this.virtualScrollerDisabled ? e : i && i.getItemOptions(e).index;
            }
            getOptionValue(e) {
                return this.optionValue ? x0(e, this.optionValue) : !this.optionLabel && e && e.value !== void 0 ? e.value : e;
            }
            getAriaPosInset(e) {
                return (this.optionGroupLabel ? e - this.visibleOptions().slice(0, e).filter(i => this.isOptionGroup(i)).length : e) + 1;
            }
            hasSelectedOption() {
                return so(this.modelValue());
            }
            isOptionGroup(e) {
                return this.optionGroupLabel && e.optionGroup && e.group;
            }
            changeFocusedOptionIndex(e, i) {
                this.focusedOptionIndex() !== i && (this.focusedOptionIndex.set(i), this.scrollInView(), this.selectOnFocus && !this.multiple && this.onOptionSelect(e, this.visibleOptions()[i]));
            }
            searchOptions(e, i) {
                this.searchValue = (this.searchValue || "") + i;
                let n = -1,
                    a = !1;
                return this.focusedOptionIndex() !== -1 ? (n = this.visibleOptions().slice(this.focusedOptionIndex()).findIndex(o => this.isOptionMatched(o)), n = n === -1 ? this.visibleOptions().slice(0, this.focusedOptionIndex()).findIndex(o => this.isOptionMatched(o)) : n + this.focusedOptionIndex()) : n = this.visibleOptions().findIndex(o => this.isOptionMatched(o)), n !== -1 && (a = !0), n === -1 && this.focusedOptionIndex() === -1 && (n = this.findFirstFocusedOptionIndex()), n !== -1 && this.changeFocusedOptionIndex(e, n), this.searchTimeout && clearTimeout(this.searchTimeout), this.searchTimeout = setTimeout(() => {
                    this.searchValue = "", this.searchTimeout = null;
                }, 500), a;
            }
            isOptionMatched(e) {
                return this.isValidOption(e) && this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale));
            }
            scrollInView(e = -1) {
                let i = e !== -1 ? `${this.id}_${e}` : this.focusedOptionId,
                    n = wl(this.listViewChild.nativeElement, `li[id="${i}"]`);
                n ? n.scrollIntoView && n.scrollIntoView({
                    block: "nearest",
                    inline: "nearest"
                }) : this.virtualScrollerDisabled || this.virtualScroll && this.scroller.scrollToIndex(e !== -1 ? e : this.focusedOptionIndex());
            }
            findFirstOptionIndex() {
                return this.visibleOptions().findIndex(e => this.isValidOption(e));
            }
            findLastOptionIndex() {
                return Sl(this.visibleOptions(), e => this.isValidOption(e));
            }
            findFirstFocusedOptionIndex() {
                let e = this.findFirstSelectedOptionIndex();
                return e < 0 ? this.findFirstOptionIndex() : e;
            }
            findLastFocusedOptionIndex() {
                let e = this.findLastSelectedOptionIndex();
                return e < 0 ? this.findLastOptionIndex() : e;
            }
            findLastSelectedOptionIndex() {
                return this.hasSelectedOption() ? Sl(this.visibleOptions(), e => this.isValidSelectedOption(e)) : -1;
            }
            findNextOptionIndex(e) {
                let i = e < this.visibleOptions().length - 1 ? this.visibleOptions().slice(e + 1).findIndex(n => this.isValidOption(n)) : -1;
                return i > -1 ? i + e + 1 : e;
            }
            findNextSelectedOptionIndex(e) {
                let i = this.hasSelectedOption() && e < this.visibleOptions().length - 1 ? this.visibleOptions().slice(e + 1).findIndex(n => this.isValidSelectedOption(n)) : -1;
                return i > -1 ? i + e + 1 : -1;
            }
            findPrevSelectedOptionIndex(e) {
                let i = this.hasSelectedOption() && e > 0 ? Sl(this.visibleOptions().slice(0, e), n => this.isValidSelectedOption(n)) : -1;
                return i > -1 ? i : -1;
            }
            findFirstSelectedOptionIndex() {
                return this.hasSelectedOption() ? this.visibleOptions().findIndex(e => this.isValidSelectedOption(e)) : -1;
            }
            findPrevOptionIndex(e) {
                let i = e > 0 ? Sl(this.visibleOptions().slice(0, e), n => this.isValidOption(n)) : -1;
                return i > -1 ? i : e;
            }
            findNearestSelectedOptionIndex(e, i = !1) {
                let n = -1;
                return this.hasSelectedOption() && (i ? (n = this.findPrevSelectedOptionIndex(e), n = n === -1 ? this.findNextSelectedOptionIndex(e) : n) : (n = this.findNextSelectedOptionIndex(e), n = n === -1 ? this.findPrevSelectedOptionIndex(e) : n)), n > -1 ? n : e;
            }
            equalityKey() {
                return this.optionValue ? null : this.dataKey;
            }
            isValidSelectedOption(e) {
                return this.isValidOption(e) && this.isSelected(e);
            }
            isOptionDisabled(e) {
                return xx(this.optionDisabled) ? this.optionDisabled(e) : this.optionDisabled ? x0(e, this.optionDisabled) : !1;
            }
            isSelected(e) {
                let i = this.getOptionValue(e);
                return this.multiple ? (this.modelValue() || []).some(n => xd(n, i, this.equalityKey())) : xd(this.modelValue(), i, this.equalityKey());
            }
            isValidOption(e) {
                return e && !(this.isOptionDisabled(e) || this.isOptionGroup(e));
            }
            isEmpty() {
                return !this._options() ? .length || !this.visibleOptions() ? .length;
            }
            hasFilter() {
                return this._filterValue() && this._filterValue().trim().length > 0;
            }
            resetFilter() {
                this.filterViewChild && this.filterViewChild.nativeElement && (this.filterViewChild.nativeElement.value = ""), this._filterValue.set(null);
            }
            drop(e) {
                e && this.onDrop.emit(e);
            }
            ngOnDestroy() {
                this.translationSubscription && this.translationSubscription.unsubscribe(), super.ngOnDestroy();
            }
            static ɵfac = function(i) {
                return new(i || t)(li(y0));
            };
            static ɵcmp = Sn({
                type: t,
                selectors: [
                    ["p-listbox"],
                    ["p-listBox"],
                    ["p-list-box"]
                ],
                contentQueries: function(i, n, a) {
                    if (i & 1 && (Or(a, yx, 5), Or(a, bd, 5), Or(a, cL, 4), Or(a, uL, 4), Or(a, fL, 4), Or(a, z4, 4), Or(a, hL, 4), Or(a, dL, 4), Or(a, pL, 4), Or(a, mL, 4), Or(a, gL, 4), Or(a, vL, 4), Or(a, xL, 4), Or(a, es, 4)), i & 2) {
                        let o;
                        Nt(o = Lt()) && (n.headerFacet = o.first), Nt(o = Lt()) && (n.footerFacet = o.first), Nt(o = Lt()) && (n.itemTemplate = o.first), Nt(o = Lt()) && (n.groupTemplate = o.first), Nt(o = Lt()) && (n.headerTemplate = o.first), Nt(o = Lt()) && (n.filterTemplate = o.first), Nt(o = Lt()) && (n.footerTemplate = o.first), Nt(o = Lt()) && (n.emptyFilterTemplate = o.first), Nt(o = Lt()) && (n.emptyTemplate = o.first), Nt(o = Lt()) && (n.filterIconTemplate = o.first), Nt(o = Lt()) && (n.checkIconTemplate = o.first), Nt(o = Lt()) && (n.checkmarkTemplate = o.first), Nt(o = Lt()) && (n.loaderTemplate = o.first), Nt(o = Lt()) && (n.templates = o);
                    }
                },
                viewQuery: function(i, n) {
                    if (i & 1 && (Oi(_L, 5), Oi(z4, 5), Oi(yL, 5), Oi(bL, 5), Oi(wL, 5), Oi(SL, 5), Oi(CL, 5)), i & 2) {
                        let a;
                        Nt(a = Lt()) && (n.headerCheckboxViewChild = a.first), Nt(a = Lt()) && (n.filterViewChild = a.first), Nt(a = Lt()) && (n.lastHiddenFocusableElement = a.first), Nt(a = Lt()) && (n.firstHiddenFocusableElement = a.first), Nt(a = Lt()) && (n.scroller = a.first), Nt(a = Lt()) && (n.listViewChild = a.first), Nt(a = Lt()) && (n.containerViewChild = a.first);
                    }
                },
                inputs: {
                    id: "id",
                    searchMessage: "searchMessage",
                    emptySelectionMessage: "emptySelectionMessage",
                    selectionMessage: "selectionMessage",
                    autoOptionFocus: [2, "autoOptionFocus", "autoOptionFocus", Rr],
                    ariaLabel: "ariaLabel",
                    selectOnFocus: [2, "selectOnFocus", "selectOnFocus", Rr],
                    searchLocale: [2, "searchLocale", "searchLocale", Rr],
                    focusOnHover: [2, "focusOnHover", "focusOnHover", Rr],
                    filterMessage: "filterMessage",
                    filterFields: "filterFields",
                    lazy: [2, "lazy", "lazy", Rr],
                    virtualScroll: [2, "virtualScroll", "virtualScroll", Rr],
                    virtualScrollItemSize: [2, "virtualScrollItemSize", "virtualScrollItemSize", Fo],
                    virtualScrollOptions: "virtualScrollOptions",
                    scrollHeight: "scrollHeight",
                    tabindex: [2, "tabindex", "tabindex", Fo],
                    multiple: [2, "multiple", "multiple", Rr],
                    style: "style",
                    styleClass: "styleClass",
                    listStyle: "listStyle",
                    listStyleClass: "listStyleClass",
                    readonly: [2, "readonly", "readonly", Rr],
                    disabled: [2, "disabled", "disabled", Rr],
                    checkbox: [2, "checkbox", "checkbox", Rr],
                    filter: [2, "filter", "filter", Rr],
                    filterBy: "filterBy",
                    filterMatchMode: "filterMatchMode",
                    filterLocale: "filterLocale",
                    metaKeySelection: [2, "metaKeySelection", "metaKeySelection", Rr],
                    dataKey: "dataKey",
                    showToggleAll: [2, "showToggleAll", "showToggleAll", Rr],
                    optionLabel: "optionLabel",
                    optionValue: "optionValue",
                    optionGroupChildren: "optionGroupChildren",
                    optionGroupLabel: "optionGroupLabel",
                    optionDisabled: "optionDisabled",
                    ariaFilterLabel: "ariaFilterLabel",
                    filterPlaceHolder: "filterPlaceHolder",
                    emptyFilterMessage: "emptyFilterMessage",
                    emptyMessage: "emptyMessage",
                    group: [2, "group", "group", Rr],
                    options: "options",
                    filterValue: "filterValue",
                    selectAll: "selectAll",
                    striped: [2, "striped", "striped", Rr],
                    highlightOnSelect: [2, "highlightOnSelect", "highlightOnSelect", Rr],
                    checkmark: [2, "checkmark", "checkmark", Rr],
                    dragdrop: [2, "dragdrop", "dragdrop", Rr]
                },
                outputs: {
                    onChange: "onChange",
                    onClick: "onClick",
                    onDblClick: "onDblClick",
                    onFilter: "onFilter",
                    onFocus: "onFocus",
                    onBlur: "onBlur",
                    onSelectAllChange: "onSelectAllChange",
                    onLazyLoad: "onLazyLoad",
                    onDrop: "onDrop"
                },
                features: [Yo([L7, W4, {
                    provide: l_,
                    useValue: {
                        zIndex: 1200
                    }
                }]), za],
                ngContentSelectors: TL,
                decls: 16,
                vars: 22,
                consts: [
                    ["firstHiddenFocusableElement", ""],
                    ["container", ""],
                    ["lastHiddenFocusableElement", ""],
                    ["builtInFilterElement", ""],
                    ["headerchkbox", ""],
                    ["icon", ""],
                    ["filterInput", ""],
                    ["emptyFilter", ""],
                    ["empty", ""],
                    ["buildInItems", ""],
                    ["scroller", ""],
                    ["content", ""],
                    ["loader", ""],
                    ["list", ""],
                    [3, "focusout", "ngClass", "ngStyle"],
                    ["role", "presentation", 1, "p-hidden-accessible", "p-hidden-focusable", 3, "focus", "tabindex"],
                    ["class", "p-listbox-header", 4, "ngIf"],
                    [3, "ngClass", "ngStyle"],
                    ["cdkDropList", "", 1, "p-listbox-empty-message", 3, "cdkDropListData"],
                    ["class", "p-listbox-footer", 4, "ngIf"],
                    ["role", "status", "aria-live", "polite", "class", "p-hidden-accessible", 4, "ngIf"],
                    ["role", "status", "aria-live", "polite", 1, "p-hidden-accessible"],
                    [1, "p-listbox-header"],
                    [4, "ngTemplateOutlet", "ngTemplateOutletContext"],
                    ["class", "p-checkbox p-component", 3, "ngClass", "click", "keydown", 4, "ngIf"],
                    [4, "ngIf", "ngIfElse"],
                    [1, "p-checkbox", "p-component", 3, "click", "keydown", "ngClass"],
                    [1, "p-hidden-accessible"],
                    ["type", "checkbox", "readonly", "readonly", 3, "focus", "blur", "disabled"],
                    ["styleClass", "p-listbox-option-check-icon", 3, "ngModel", "disabled", "tabindex", "variant", "binary", 4, "ngIf"],
                    ["styleClass", "p-listbox-option-check-icon", 3, "ngModel", "disabled", "tabindex", "variant", "binary"],
                    [4, "ngIf"],
                    ["class", "p-listbox-filter-container", 4, "ngIf"],
                    ["role", "status", "attr.aria-live", "polite", 1, "p-hidden-accessible"],
                    [1, "p-listbox-filter-container"],
                    ["pInputText", "", "type", "text", "role", "searchbox", 1, "p-listbox-filter", 3, "input", "keydown", "focus", "blur", "value", "disabled", "tabindex"],
                    [3, "styleClass", 4, "ngIf"],
                    ["class", "p-listbox-filter-icon", 4, "ngIf"],
                    [3, "styleClass"],
                    [1, "p-listbox-filter-icon"],
                    [4, "ngTemplateOutlet"],
                    ["cdkDropList", "", 1, "p-listbox-empty-message", 3, "cdkDropListDropped", "cdkDropListData"],
                    [3, "items", "style", "itemSize", "autoSize", "lazy", "options", "tabindex", "onLazyLoad", 4, "ngIf"],
                    [3, "onLazyLoad", "items", "itemSize", "autoSize", "lazy", "options", "tabindex"],
                    ["role", "listbox", "cdkDropList", "", 1, "p-listbox-list", 3, "focus", "blur", "keydown", "cdkDropListDropped", "tabindex", "ngClass", "cdkDropListData"],
                    ["ngFor", "", 3, "ngForOf"],
                    ["role", "option", "cdkDrag", "", 1, "p-listbox-option-group", 3, "ngStyle", "cdkDragData", "cdkDragDisabled"],
                    ["pRipple", "", "role", "option", "cdkDrag", "", 1, "p-listbox-option", 3, "click", "dblclick", "mousedown", "mouseenter", "touchend", "ngStyle", "ngClass", "cdkDragData", "cdkDragDisabled"],
                    ["styleClass", "p-listbox-option-check-icon", 3, "ngModel", "readonly", "disabled", "tabindex", "variant", "binary", 4, "ngIf"],
                    ["styleClass", "p-listbox-option-check-icon", 3, "ngModel", "readonly", "disabled", "tabindex", "variant", "binary"],
                    ["styleClass", "p-listbox-option-check-icon", 4, "ngIf"],
                    ["styleClass", "p-listbox-option-check-icon"],
                    [1, "p-listbox-footer"]
                ],
                template: function(i, n) {
                    if (i & 1) {
                        let a = or();
                        g0(AL), ge(0, "div", 14), nt("focusout", function(s) {
                            return Ce(a), Ae(n.onFocusout(s));
                        }), ge(1, "span", 15, 0), nt("focus", function(s) {
                            return Ce(a), Ae(n.onFirstHiddenFocus(s));
                        }), ve(), Oe(3, OL, 3, 5, "div", 16)(4, KL, 5, 3, "div", 16), ge(5, "div", 17, 1), Oe(7, QL, 3, 3, "div", 18)(8, r7, 3, 3, "div", 18)(9, F7, 4, 2), ve(), Oe(10, P7, 3, 5, "div", 19)(11, I7, 2, 1, "span", 20), ge(12, "span", 21), cr(13), ve(), ge(14, "span", 15, 2), nt("focus", function(s) {
                            return Ce(a), Ae(n.onLastHiddenFocus(s));
                        }), ve()();
                    }
                    i & 2 && (Xn(n.styleClass), Q("ngClass", n.containerClass)("ngStyle", n.style), vt("id", n.id), oe(), Q("tabindex", n.disabled ? -1 : n.tabindex), vt("data-p-hidden-focusable", !0), oe(2), Q("ngIf", n.headerFacet || n.headerTemplate || n._headerTemplate), oe(), Q("ngIf", n.checkbox && n.multiple && n.showToggleAll || n.filter), oe(), Xn(n.listStyleClass), ld("max-height", n.virtualScroll ? "auto" : n.scrollHeight || "auto"), Q("ngClass", "p-listbox-list-container")("ngStyle", n.listStyle), vt("tabindex", !n.disabled && "0"), oe(2), Hu(n.hasFilter() && n.isEmpty() ? 7 : !n.hasFilter() && n.isEmpty() ? 8 : 9), oe(3), Q("ngIf", n.footerFacet || n.footerTemplate || n._footerTemplate), oe(), Q("ngIf", n.isEmpty()), oe(2), Zi(" ", n.selectedMessageText, " "), oe(), Q("tabindex", n.disabled ? -1 : n.tabindex), vt("data-p-hidden-focusable", !0));
                },
                dependencies: [ha, Wa, vl, Eo, Jo, vc, Al, Ix, Ex, Fx, Zx, kx, bx, Cd, Dx, bl, _l, yl, ja, Md, f_, c_],
                encapsulation: 2,
                changeDetection: 0
            });
        }
        return t;
    })();
var R7 = ["item"],
    M7 = ["sourceHeader"],
    B7 = ["targetHeader"],
    G4 = ["sourceFilter"],
    q4 = ["targetFilter"],
    U7 = ["emptymessagesource"],
    V7 = ["emptyfiltermessagesource"],
    z7 = ["emptymessagetarget"],
    W7 = ["emptyfiltermessagetarget"],
    j7 = ["moveupicon"],
    H7 = ["movetopicon"],
    G7 = ["movedownicon"],
    q7 = ["movebottomicon"],
    X7 = ["movetotargeticon"],
    K7 = ["movealltotargeticon"],
    Y7 = ["movetosourceicon"],
    Z7 = ["movealltosourceicon"],
    J7 = ["targetfiltericon"],
    Q7 = ["sourcefiltericon"],
    $7 = ["sourcelist"],
    eR = ["targetlist"],
    tR = () => ({
        "p-picklist p-component": !0
    }),
    A1 = t => ({
        $implicit: t
    }),
    K4 = t => ({
        options: t
    }),
    Y4 = (t, r, e, i) => ({
        $implicit: t,
        index: r,
        selected: e,
        disabled: i
    });

function rR(t, r) {
    t & 1 && St(0, "AngleUpIcon"), t & 2 && vt("data-pc-section", "moveupicon");
}

function iR(t, r) {}

function nR(t, r) {
    t & 1 && Oe(0, iR, 0, 0, "ng-template");
}

function aR(t, r) {
    t & 1 && St(0, "AngleDoubleUpIcon"), t & 2 && vt("data-pc-section", "movetopicon");
}

function oR(t, r) {}

function sR(t, r) {
    t & 1 && Oe(0, oR, 0, 0, "ng-template");
}

function lR(t, r) {
    t & 1 && St(0, "AngleDownIcon"), t & 2 && vt("data-pc-section", "movedownicon");
}

function cR(t, r) {}

function uR(t, r) {
    t & 1 && Oe(0, cR, 0, 0, "ng-template");
}

function fR(t, r) {
    t & 1 && St(0, "AngleDoubleDownIcon"), t & 2 && vt("data-pc-section", "movebottomicon");
}

function hR(t, r) {}

function dR(t, r) {
    t & 1 && Oe(0, hR, 0, 0, "ng-template");
}

function pR(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "div", 17)(1, "button", 13), nt("click", function() {
            Ce(e);
            let n = ee(),
                a = Br(4);
            return Ae(n.moveUp(a, n.source, n.selectedItemsSource, n.onSourceReorder, n.SOURCE_LIST));
        }), Oe(2, rR, 1, 1, "AngleUpIcon", 11)(3, nR, 1, 0, null, 18), ve(), ge(4, "button", 13), nt("click", function() {
            Ce(e);
            let n = ee(),
                a = Br(4);
            return Ae(n.moveTop(a, n.source, n.selectedItemsSource, n.onSourceReorder, n.SOURCE_LIST));
        }), Oe(5, aR, 1, 1, "AngleDoubleUpIcon", 11)(6, sR, 1, 0, null, 18), ve(), ge(7, "button", 13), nt("click", function() {
            Ce(e);
            let n = ee(),
                a = Br(4);
            return Ae(n.moveDown(a, n.source, n.selectedItemsSource, n.onSourceReorder, n.SOURCE_LIST));
        }), Oe(8, lR, 1, 1, "AngleDownIcon", 11)(9, uR, 1, 0, null, 18), ve(), ge(10, "button", 13), nt("click", function() {
            Ce(e);
            let n = ee(),
                a = Br(4);
            return Ae(n.moveBottom(a, n.source, n.selectedItemsSource, n.onSourceReorder, n.SOURCE_LIST));
        }), Oe(11, fR, 1, 1, "AngleDoubleDownIcon", 11)(12, dR, 1, 0, null, 18), ve()();
    }
    if (t & 2) {
        let e = ee();
        vt("data-pc-section", "sourceControls")("data-pc-group-section", "controls"), oe(), Q("disabled", e.sourceMoveDisabled())("buttonProps", e.getButtonProps("moveup")), vt("aria-label", e.moveUpAriaLabel)("data-pc-section", "sourceMoveUpButton"), oe(), Q("ngIf", !e.moveUpIconTemplate && !e._moveUpIconTemplate), oe(), Q("ngTemplateOutlet", e.moveUpIconTemplate || e._moveUpIconTemplate), oe(), Q("disabled", e.sourceMoveDisabled())("buttonProps", e.getButtonProps("movetop")), vt("aria-label", e.moveTopAriaLabel)("data-pc-section", "sourceMoveTopButton"), oe(), Q("ngIf", !e.moveTopIconTemplate && !e._moveTopIconTemplate), oe(), Q("ngTemplateOutlet", e.moveTopIconTemplate || e._moveTopIconTemplate), oe(), Q("disabled", e.sourceMoveDisabled())("buttonProps", e.getButtonProps("movedown")), vt("aria-label", e.moveDownAriaLabel)("data-pc-section", "sourceMoveDownButton"), oe(), Q("ngIf", !e.moveDownIconTemplate && !e._moveDownIconTemplate), oe(), Q("ngTemplateOutlet", e.moveDownIconTemplate || e._moveDownIconTemplate), oe(), Q("disabled", e.sourceMoveDisabled())("buttonProps", e.getButtonProps("movebottom")), vt("aria-label", e.moveBottomAriaLabel)("data-pc-section", "sourceMoveBottomButton"), oe(), Q("ngIf", !e.moveBottomIconTemplate || e._moveBottomIconTemplate), oe(), Q("ngTemplateOutlet", e.moveBottomIconTemplate || e._moveBottomIconTemplate);
    }
}

function mR(t, r) {
    if (t & 1 && (ge(0, "div", 20), cr(1), ve()), t & 2) {
        let e = ee(3);
        oe(), Wi(e.sourceHeader);
    }
}

function gR(t, r) {}

function vR(t, r) {
    t & 1 && Oe(0, gR, 0, 0, "ng-template");
}

function xR(t, r) {
    if (t & 1 && Oe(0, mR, 2, 1, "div", 19)(1, vR, 1, 0, null, 18), t & 2) {
        let e = ee(2);
        Q("ngIf", !e.sourceHeaderTemplate && !e._sourceHeaderTemplate), oe(), Q("ngTemplateOutlet", e.sourceHeaderTemplate || e._sourceHeaderTemplate);
    }
}

function _R(t, r) {
    t & 1 && (Xt(0), Oe(1, xR, 2, 2, "ng-template", null, 2, hi), Kt());
}

function yR(t, r) {}

function bR(t, r) {
    t & 1 && Oe(0, yR, 0, 0, "ng-template");
}

function wR(t, r) {
    if (t & 1 && Oe(0, bR, 1, 0, null, 14), t & 2) {
        let e = ee(2);
        Q("ngTemplateOutlet", e.sourceFilterTemplate || e._sourceFilterTemplate)("ngTemplateOutletContext", ii(2, K4, e.sourceFilterOptions));
    }
}

function SR(t, r) {
    t & 1 && (Xt(0), Oe(1, wR, 1, 4, "ng-template", null, 3, hi), Kt());
}

function CR(t, r) {
    t & 1 && Ci(0);
}

function AR(t, r) {
    if (t & 1 && (Xt(0), Oe(1, CR, 1, 0, "ng-container", 18), Kt()), t & 2) {
        let e = ee();
        oe(), Q("ngTemplateOutlet", e.sourceFilterIconTemplate || e._sourceFilterIconTemplate);
    }
}

function TR(t, r) {
    t & 1 && Ci(0);
}

function DR(t, r) {
    if (t & 1 && Oe(0, TR, 1, 0, "ng-container", 14), t & 2) {
        let e = r.$implicit,
            i = r.index,
            n = r.selected,
            a = r.disabled,
            o = ee(2);
        Q("ngTemplateOutlet", o.itemTemplate || o._itemTemplate)("ngTemplateOutletContext", Gu(2, Y4, e, i, n, a));
    }
}

function kR(t, r) {
    t & 1 && (Xt(0), Oe(1, DR, 1, 7, "ng-template", null, 4, hi), Kt());
}

function FR(t, r) {
    t & 1 && Ci(0);
}

function ER(t, r) {
    if (t & 1 && Oe(0, FR, 1, 0, "ng-container", 18), t & 2) {
        let e = ee(2);
        Q("ngTemplateOutlet", e.emptyMessageSourceTemplate || e._emptyMessageSourceTemplate);
    }
}

function PR(t, r) {
    t & 1 && (Xt(0), Oe(1, ER, 1, 1, "ng-template", null, 5, hi), Kt());
}

function IR(t, r) {
    t & 1 && Ci(0);
}

function OR(t, r) {
    if (t & 1 && Oe(0, IR, 1, 0, "ng-container", 18), t & 2) {
        let e = ee(2);
        Q("ngTemplateOutlet", e.emptyFilterMessageSourceTemplate || e._emptyFilterMessageSourceTemplate);
    }
}

function NR(t, r) {
    t & 1 && (Xt(0), Oe(1, OR, 1, 1, "ng-template", null, 6, hi), Kt());
}

function LR(t, r) {
    t & 1 && St(0, "AngleRightIcon"), t & 2 && vt("data-pc-section", "movetotargeticon");
}

function RR(t, r) {
    t & 1 && St(0, "AngleDownIcon"), t & 2 && vt("data-pc-section", "movetotargeticon");
}

function MR(t, r) {
    if (t & 1 && (Xt(0), Oe(1, LR, 1, 1, "AngleRightIcon", 11)(2, RR, 1, 1, "AngleDownIcon", 11), Kt()), t & 2) {
        let e = ee();
        oe(), Q("ngIf", !e.viewChanged), oe(), Q("ngIf", e.viewChanged);
    }
}

function BR(t, r) {}

function UR(t, r) {
    t & 1 && Oe(0, BR, 0, 0, "ng-template");
}

function VR(t, r) {
    t & 1 && St(0, "AngleDoubleRightIcon"), t & 2 && vt("data-pc-section", "movealltotargeticon");
}

function zR(t, r) {
    t & 1 && St(0, "AngleDoubleDownIcon"), t & 2 && vt("data-pc-section", "movealltotargeticon");
}

function WR(t, r) {
    if (t & 1 && (Xt(0), Oe(1, VR, 1, 1, "AngleDoubleRightIcon", 11)(2, zR, 1, 1, "AngleDoubleDownIcon", 11), Kt()), t & 2) {
        let e = ee();
        oe(), Q("ngIf", !e.viewChanged), oe(), Q("ngIf", e.viewChanged);
    }
}

function jR(t, r) {}

function HR(t, r) {
    t & 1 && Oe(0, jR, 0, 0, "ng-template");
}

function GR(t, r) {
    t & 1 && St(0, "AngleLeftIcon"), t & 2 && vt("data-pc-section", "movedownsourceticon");
}

function qR(t, r) {
    t & 1 && St(0, "AngleUpIcon"), t & 2 && vt("data-pc-section", "movedownsourceticon");
}

function XR(t, r) {
    if (t & 1 && (Xt(0), Oe(1, GR, 1, 1, "AngleLeftIcon", 11)(2, qR, 1, 1, "AngleUpIcon", 11), Kt()), t & 2) {
        let e = ee();
        oe(), Q("ngIf", !e.viewChanged), oe(), Q("ngIf", e.viewChanged);
    }
}

function KR(t, r) {}

function YR(t, r) {
    t & 1 && Oe(0, KR, 0, 0, "ng-template");
}

function ZR(t, r) {
    t & 1 && St(0, "AngleDoubleLeftIcon"), t & 2 && vt("data-pc-section", "movealltosourceticon");
}

function JR(t, r) {
    t & 1 && St(0, "AngleDoubleUpIcon"), t & 2 && vt("data-pc-section", "movealltosourceticon");
}

function QR(t, r) {
    if (t & 1 && (Xt(0), Oe(1, ZR, 1, 1, "AngleDoubleLeftIcon", 11)(2, JR, 1, 1, "AngleDoubleUpIcon", 11), Kt()), t & 2) {
        let e = ee();
        oe(), Q("ngIf", !e.viewChanged), oe(), Q("ngIf", e.viewChanged);
    }
}

function $R(t, r) {}

function eM(t, r) {
    t & 1 && Oe(0, $R, 0, 0, "ng-template");
}

function tM(t, r) {
    if (t & 1 && (ge(0, "div", 20), cr(1), ve()), t & 2) {
        let e = ee(3);
        oe(), Wi(e.targetHeader);
    }
}

function rM(t, r) {}

function iM(t, r) {
    t & 1 && Oe(0, rM, 0, 0, "ng-template");
}

function nM(t, r) {
    if (t & 1 && Oe(0, tM, 2, 1, "div", 19)(1, iM, 1, 0, null, 18), t & 2) {
        let e = ee(2);
        Q("ngIf", !e.targetHeaderTemplate && !e._targetHeaderTemplate), oe(), Q("ngTemplateOutlet", e.targetHeaderTemplate || e._targetHeaderTemplate);
    }
}

function aM(t, r) {
    t & 1 && (Xt(0), Oe(1, nM, 2, 2, "ng-template", null, 2, hi), Kt());
}

function oM(t, r) {}

function sM(t, r) {
    t & 1 && Oe(0, oM, 0, 0, "ng-template");
}

function lM(t, r) {
    if (t & 1 && Oe(0, sM, 1, 0, null, 14), t & 2) {
        let e = ee(2);
        Q("ngTemplateOutlet", e.targetFilterTemplate || e._targetFilterTemplate)("ngTemplateOutletContext", ii(2, K4, e.targetFilterOptions));
    }
}

function cM(t, r) {
    t & 1 && (Xt(0), Oe(1, lM, 1, 4, "ng-template", null, 3, hi), Kt());
}

function uM(t, r) {
    t & 1 && Ci(0);
}

function fM(t, r) {
    if (t & 1 && (Xt(0), Oe(1, uM, 1, 0, "ng-container", 18), Kt()), t & 2) {
        let e = ee();
        oe(), Q("ngTemplateOutlet", e.targetFilterIconTemplate || e._targetFilterIconTemplate);
    }
}

function hM(t, r) {
    t & 1 && Ci(0);
}

function dM(t, r) {
    if (t & 1 && Oe(0, hM, 1, 0, "ng-container", 14), t & 2) {
        let e = r.$implicit,
            i = r.index,
            n = r.selected,
            a = r.disabled,
            o = ee(2);
        Q("ngTemplateOutlet", o.itemTemplate || o._itemTemplate)("ngTemplateOutletContext", Gu(2, Y4, e, i, n, a));
    }
}

function pM(t, r) {
    t & 1 && (Xt(0), Oe(1, dM, 1, 7, "ng-template", null, 4, hi), Kt());
}

function mM(t, r) {
    t & 1 && Ci(0);
}

function gM(t, r) {
    if (t & 1 && Oe(0, mM, 1, 0, "ng-container", 18), t & 2) {
        let e = ee(2);
        Q("ngTemplateOutlet", e.emptyMessageTargetTemplate || e._emptyMessageTargetTemplate);
    }
}

function vM(t, r) {
    t & 1 && (Xt(0), Oe(1, gM, 1, 1, "ng-template", null, 5, hi), Kt());
}

function xM(t, r) {
    t & 1 && Ci(0);
}

function _M(t, r) {
    if (t & 1 && Oe(0, xM, 1, 0, "ng-container", 18), t & 2) {
        let e = ee(2);
        Q("ngTemplateOutlet", e.emptyFilterMessageTargetTemplate || e._emptyFilterMessageTargetTemplate);
    }
}

function yM(t, r) {
    t & 1 && (Xt(0), Oe(1, _M, 1, 1, "ng-template", null, 6, hi), Kt());
}

function bM(t, r) {
    t & 1 && St(0, "AngleUpIcon"), t & 2 && vt("data-pc-section", "moveupicon");
}

function wM(t, r) {}

function SM(t, r) {
    t & 1 && Oe(0, wM, 0, 0, "ng-template");
}

function CM(t, r) {
    t & 1 && St(0, "AngleDoubleUpIcon"), t & 2 && vt("data-pc-section", "movetopicon");
}

function AM(t, r) {}

function TM(t, r) {
    t & 1 && Oe(0, AM, 0, 0, "ng-template");
}

function DM(t, r) {
    t & 1 && St(0, "AngleDownIcon"), t & 2 && vt("data-pc-section", "movedownicon");
}

function kM(t, r) {}

function FM(t, r) {
    t & 1 && Oe(0, kM, 0, 0, "ng-template");
}

function EM(t, r) {
    t & 1 && St(0, "AngleDoubleDownIcon"), t & 2 && vt("data-pc-section", "movebottomicon");
}

function PM(t, r) {}

function IM(t, r) {
    t & 1 && Oe(0, PM, 0, 0, "ng-template");
}

function OM(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "div", 21)(1, "button", 13), nt("click", function() {
            Ce(e);
            let n = ee(),
                a = Br(26);
            return Ae(n.moveUp(a, n.target, n.selectedItemsTarget, n.onTargetReorder, n.TARGET_LIST));
        }), Oe(2, bM, 1, 1, "AngleUpIcon", 11)(3, SM, 1, 0, null, 18), ve(), ge(4, "button", 13), nt("click", function() {
            Ce(e);
            let n = ee(),
                a = Br(26);
            return Ae(n.moveTop(a, n.target, n.selectedItemsTarget, n.onTargetReorder, n.TARGET_LIST));
        }), Oe(5, CM, 1, 1, "AngleDoubleUpIcon", 11)(6, TM, 1, 0, null, 18), ve(), ge(7, "button", 13), nt("click", function() {
            Ce(e);
            let n = ee(),
                a = Br(26);
            return Ae(n.moveDown(a, n.target, n.selectedItemsTarget, n.onTargetReorder, n.TARGET_LIST));
        }), Oe(8, DM, 1, 1, "AngleDownIcon", 11)(9, FM, 1, 0, null, 18), ve(), ge(10, "button", 13), nt("click", function() {
            Ce(e);
            let n = ee(),
                a = Br(26);
            return Ae(n.moveBottom(a, n.target, n.selectedItemsTarget, n.onTargetReorder, n.TARGET_LIST));
        }), Oe(11, EM, 1, 1, "AngleDoubleDownIcon", 11)(12, IM, 1, 0, null, 18), ve()();
    }
    if (t & 2) {
        let e = ee();
        vt("data-pc-section", "targetControls")("data-pc-group-section", "controls"), oe(), Q("disabled", e.targetMoveDisabled())("buttonProps", e.getButtonProps("moveup")), vt("aria-label", e.moveUpAriaLabel)("data-pc-section", "targetMoveUpButton"), oe(), Q("ngIf", !e.moveUpIconTemplate && !e._moveUpIconTemplate), oe(), Q("ngTemplateOutlet", e.moveUpIconTemplate || e._moveUpIconTemplate), oe(), Q("disabled", e.targetMoveDisabled())("buttonProps", e.getButtonProps("movetop")), vt("aria-label", e.moveTopAriaLabel)("data-pc-section", "targetMoveTopButton"), oe(), Q("ngIf", !e.moveTopIconTemplate && !e._moveTopIconTemplate), oe(), Q("ngTemplateOutlet", e.moveTopIconTemplate || e.moveTopIconTemplate), oe(), Q("disabled", e.targetMoveDisabled())("buttonProps", e.getButtonProps("movedown")), vt("aria-label", e.moveDownAriaLabel)("data-pc-section", "targetMoveDownButton"), oe(), Q("ngIf", !e.moveDownIconTemplate && !e._moveDownIconTemplate), oe(), Q("ngTemplateOutlet", e.moveDownIconTemplate || e._moveDownIconTemplate), oe(), Q("disabled", e.targetMoveDisabled())("buttonProps", e.getButtonProps("movebottom")), vt("aria-label", e.moveBottomAriaLabel)("data-pc-section", "targetMoveBottomButton"), oe(), Q("ngIf", !e.moveBottomIconTemplate && !e._moveBottomIconTemplate), oe(), Q("ngTemplateOutlet", e.moveBottomIconTemplate || e._moveBottomIconTemplate);
    }
}
var NM = ({
        dt: t
    }) => `
.p-picklist {
    display: flex;
    gap: ${t("picklist.gap")};
}

.p-picklist-controls {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: ${t("picklist.controls.gap")};
}

.p-picklist-list-container {
    flex: 1 1 50%;
}

.p-picklist .p-listbox {
    height: 100%;
}
`,
    LM = {
        root: "p-picklist p-component",
        sourceControls: "p-picklist-controls p-picklist-source-controls",
        sourceListContainer: "p-picklist-list-container p-picklist-source-list-container",
        transferControls: "p-picklist-controls p-picklist-transfer-controls",
        targetListContainer: "p-picklist-list-container p-picklist-target-list-container",
        targetControls: "p-picklist-controls p-picklist-target-controls"
    },
    X4 = (() => {
        class t extends Cl {
            name = "picklist";
            theme = NM;
            classes = LM;
            static ɵfac = (() => {
                let e;
                return function(n) {
                    return (e || (e = Da(t)))(n || t);
                };
            })();
            static ɵprov = gl({
                token: t,
                factory: t.ɵfac
            });
        }
        return t;
    })();
var Zv = (() => {
        class t extends Bs {
            source;
            target;
            sourceHeader;
            tabindex = 0;
            rightButtonAriaLabel;
            leftButtonAriaLabel;
            allRightButtonAriaLabel;
            allLeftButtonAriaLabel;
            upButtonAriaLabel;
            downButtonAriaLabel;
            topButtonAriaLabel;
            bottomButtonAriaLabel;
            targetHeader;
            responsive;
            filterBy;
            filterLocale;
            trackBy = (e, i) => i;
            sourceTrackBy;
            targetTrackBy;
            showSourceFilter = !0;
            showTargetFilter = !0;
            metaKeySelection = !1;
            dragdrop = !1;
            style;
            styleClass;
            sourceStyle;
            targetStyle;
            showSourceControls = !0;
            showTargetControls = !0;
            sourceFilterPlaceholder;
            targetFilterPlaceholder;
            disabled = !1;
            sourceOptionDisabled;
            targetOptionDisabled;
            ariaSourceFilterLabel;
            ariaTargetFilterLabel;
            filterMatchMode = "contains";
            stripedRows;
            keepSelection = !1;
            scrollHeight = "14rem";
            autoOptionFocus = !0;
            buttonProps = {
                severity: "secondary"
            };
            moveUpButtonProps;
            moveTopButtonProps;
            moveDownButtonProps;
            moveBottomButtonProps;
            moveToTargetProps;
            moveAllToTargetProps;
            moveToSourceProps;
            moveAllToSourceProps;
            get breakpoint() {
                return this._breakpoint;
            }
            set breakpoint(e) {
                e !== this._breakpoint && (this._breakpoint = e, Ms(this.platformId) && (this.destroyMedia(), this.initMedia()));
            }
            onMoveToSource = new Qr();
            onMoveAllToSource = new Qr();
            onMoveAllToTarget = new Qr();
            onMoveToTarget = new Qr();
            onSourceReorder = new Qr();
            onTargetReorder = new Qr();
            onSourceSelect = new Qr();
            onTargetSelect = new Qr();
            onSourceFilter = new Qr();
            onTargetFilter = new Qr();
            onFocus = new Qr();
            onBlur = new Qr();
            listViewSourceChild;
            listViewTargetChild;
            sourceFilterViewChild;
            targetFilterViewChild;
            getButtonProps(e) {
                switch (e) {
                    case "moveup":
                        return Pi(Pi({}, this.buttonProps), this.moveUpButtonProps);
                    case "movetop":
                        return Pi(Pi({}, this.buttonProps), this.moveTopButtonProps);
                    case "movedown":
                        return Pi(Pi({}, this.buttonProps), this.moveDownButtonProps);
                    case "movebottom":
                        return Pi(Pi({}, this.buttonProps), this.moveBottomButtonProps);
                    case "movetotarget":
                        return Pi(Pi({}, this.buttonProps), this.moveToTargetProps);
                    case "movealltotarget":
                        return Pi(Pi({}, this.buttonProps), this.moveAllToTargetProps);
                    case "movetosource":
                        return Pi(Pi({}, this.buttonProps), this.moveToSourceProps);
                    case "movealltosource":
                        return Pi(Pi({}, this.buttonProps), this.moveAllToSourceProps);
                    default:
                        return this.buttonProps;
                }
            }
            get moveUpAriaLabel() {
                return this.upButtonAriaLabel ? this.upButtonAriaLabel : this.config.translation.aria ? this.config.translation.aria.moveUp : void 0;
            }
            get moveTopAriaLabel() {
                return this.topButtonAriaLabel ? this.topButtonAriaLabel : this.config.translation.aria ? this.config.translation.aria.moveTop : void 0;
            }
            get moveDownAriaLabel() {
                return this.downButtonAriaLabel ? this.downButtonAriaLabel : this.config.translation.aria ? this.config.translation.aria.moveDown : void 0;
            }
            get moveBottomAriaLabel() {
                return this.bottomButtonAriaLabel ? this.bottomButtonAriaLabel : this.config.translation.aria ? this.config.translation.aria.moveDown : void 0;
            }
            get moveToTargetAriaLabel() {
                return this.rightButtonAriaLabel ? this.rightButtonAriaLabel : this.config.translation.aria ? this.config.translation.aria.moveToTarget : void 0;
            }
            get moveAllToTargetAriaLabel() {
                return this.allRightButtonAriaLabel ? this.allRightButtonAriaLabel : this.config.translation.aria ? this.config.translation.aria.moveAllToTarget : void 0;
            }
            get moveToSourceAriaLabel() {
                return this.leftButtonAriaLabel ? this.leftButtonAriaLabel : this.config.translation.aria ? this.config.translation.aria.moveToSource : void 0;
            }
            get moveAllToSourceAriaLabel() {
                return this.allLeftButtonAriaLabel ? this.allLeftButtonAriaLabel : this.config.translation.aria ? this.config.translation.aria.moveAllToSource : void 0;
            }
            get idSource() {
                return this.id + "_source";
            }
            get idTarget() {
                return this.id + "_target";
            }
            get focusedOptionId() {
                return this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : null;
            }
            _breakpoint = "960px";
            visibleOptionsSource;
            visibleOptionsTarget;
            selectedItemsSource = [];
            selectedItemsTarget = [];
            reorderedListElement;
            movedUp;
            movedDown;
            itemTouched;
            styleElement;
            id = _0("pn_id_");
            filterValueSource;
            filterValueTarget;
            fromListType;
            sourceFilterOptions;
            targetFilterOptions;
            SOURCE_LIST = -1;
            TARGET_LIST = 1;
            window;
            media;
            viewChanged;
            focusedOptionIndex = -1;
            focusedOption;
            focused = {
                sourceList: !1,
                targetList: !1
            };
            _componentStyle = Ls(X4);
            mediaChangeListener;
            filterService = Ls(y0);
            ngOnInit() {
                super.ngOnInit(), this.responsive && (this.createStyle(), this.initMedia()), this.filterBy && (this.sourceFilterOptions = {
                    filter: e => this.filterSource(e),
                    reset: () => this.resetSourceFilter()
                }, this.targetFilterOptions = {
                    filter: e => this.filterTarget(e),
                    reset: () => this.resetTargetFilter()
                });
            }
            itemTemplate;
            sourceHeaderTemplate;
            targetHeaderTemplate;
            sourceFilterTemplate;
            targetFilterTemplate;
            emptyMessageSourceTemplate;
            emptyFilterMessageSourceTemplate;
            emptyMessageTargetTemplate;
            emptyFilterMessageTargetTemplate;
            moveUpIconTemplate;
            moveTopIconTemplate;
            moveDownIconTemplate;
            moveBottomIconTemplate;
            moveToTargetIconTemplate;
            moveAllToTargetIconTemplate;
            moveToSourceIconTemplate;
            moveAllToSourceIconTemplate;
            targetFilterIconTemplate;
            sourceFilterIconTemplate;
            templates;
            _itemTemplate;
            _sourceHeaderTemplate;
            _targetHeaderTemplate;
            _sourceFilterTemplate;
            _targetFilterTemplate;
            _emptyMessageSourceTemplate;
            _emptyFilterMessageSourceTemplate;
            _emptyMessageTargetTemplate;
            _emptyFilterMessageTargetTemplate;
            _moveUpIconTemplate;
            _moveTopIconTemplate;
            _moveDownIconTemplate;
            _moveBottomIconTemplate;
            _moveToTargetIconTemplate;
            _moveAllToTargetIconTemplate;
            _moveToSourceIconTemplate;
            _moveAllToSourceIconTemplate;
            _targetFilterIconTemplate;
            _sourceFilterIconTemplate;
            ngAfterContentInit() {
                this.templates.forEach(e => {
                    switch (e.getType()) {
                        case "item":
                            this._itemTemplate = e.template;
                            break;
                        case "option":
                            this._itemTemplate = e.template;
                            break;
                        case "sourceHeader":
                            this._sourceHeaderTemplate = e.template;
                            break;
                        case "targetHeader":
                            this._targetHeaderTemplate = e.template;
                            break;
                        case "sourceFilter":
                            this._sourceFilterTemplate = e.template;
                            break;
                        case "targetFilter":
                            this._targetFilterTemplate = e.template;
                            break;
                        case "emptymessagesource":
                            this._emptyMessageSourceTemplate = e.template;
                            break;
                        case "emptyfiltermessagesource":
                            this._emptyFilterMessageSourceTemplate = e.template;
                            break;
                        case "emptymessagetarget":
                            this._emptyMessageTargetTemplate = e.template;
                            break;
                        case "emptyfiltermessagetarget":
                            this._emptyFilterMessageTargetTemplate = e.template;
                            break;
                        case "moveupicon":
                            this._moveUpIconTemplate = e.template;
                            break;
                        case "movetopicon":
                            this._moveTopIconTemplate = e.template;
                            break;
                        case "movedownicon":
                            this._moveDownIconTemplate = e.template;
                            break;
                        case "movebottomicon":
                            this._moveBottomIconTemplate = e.template;
                            break;
                        case "movetotargeticon":
                            this._moveToTargetIconTemplate = e.template;
                            break;
                        case "movealltotargeticon":
                            this._moveAllToTargetIconTemplate = e.template;
                            break;
                        case "movetosourceicon":
                            this._moveToSourceIconTemplate = e.template;
                            break;
                        case "movealltosourceicon":
                            this._moveAllToSourceIconTemplate = e.template;
                            break;
                        case "targetfiltericon":
                            this._targetFilterIconTemplate = e.template;
                            break;
                        case "sourcefiltericon":
                            this._sourceFilterIconTemplate = e.template;
                            break;
                        default:
                            this._itemTemplate = e.template;
                            break;
                    }
                });
            }
            ngAfterViewChecked() {
                if (this.movedUp || this.movedDown) {
                    let e = pm(this.reorderedListElement ? .el.nativeElement, "li.p-listbox-option-selected"),
                        i;
                    e.length > 0 && (this.movedUp ? i = e[0] : i = e[e.length - 1], gx(this.reorderedListElement ? .el.nativeElement, i)), this.movedUp = !1, this.movedDown = !1, this.reorderedListElement = null;
                }
            }
            onItemClick(e, i, n, a, o, s) {
                if (this.disabled) return;
                let l = this.findIndexInList(i, n);
                s && (this.focusedOptionIndex = s);
                let c = l != -1;
                if (this.itemTouched ? !1 : this.metaKeySelection) {
                    let h = e.metaKey || e.ctrlKey || e.shiftKey;
                    c && h ? n = n.filter((d, f) => f !== l) : (h || (n = []), n.push(i));
                } else c ? n = n.filter((h, d) => d !== l) : n.push(i);
                this.setSelectionList(a, n), o.emit({
                    originalEvent: e,
                    items: n
                }), this.itemTouched = !1;
            }
            onOptionMouseDown(e, i) {
                this.focused[i === this.SOURCE_LIST ? "sourceList" : "targetList"] = !0, this.focusedOptionIndex = e;
            }
            onSourceItemDblClick() {
                this.disabled || (this.moveRight(), this.triggerChangeDetection());
            }
            onTargetItemDblClick() {
                this.disabled || (this.moveLeft(), this.triggerChangeDetection());
            }
            onFilter(e, i) {
                let n = e.target.value;
                i === this.SOURCE_LIST ? this.filterSource(n) : i === this.TARGET_LIST && this.filterTarget(n);
            }
            filterSource(e = "") {
                this.filterValueSource = e.trim().toLocaleLowerCase(this.filterLocale), this.filter(this.source, this.SOURCE_LIST), this.onSourceFilter.emit({
                    query: this.filterValueSource,
                    value: this.visibleOptionsSource
                });
            }
            filterTarget(e = "") {
                this.filterValueTarget = e.trim().toLocaleLowerCase(this.filterLocale), this.filter(this.target, this.TARGET_LIST), this.onTargetFilter.emit({
                    query: this.filterValueTarget,
                    value: this.visibleOptionsTarget
                });
            }
            filter(e, i) {
                let n = this.filterBy.split(",");
                i === this.SOURCE_LIST ? (this.visibleOptionsSource = this.filterService.filter(e, n, this.filterValueSource, this.filterMatchMode, this.filterLocale), this.onSourceFilter.emit({
                    query: this.filterValueSource,
                    value: this.visibleOptionsSource
                })) : i === this.TARGET_LIST && (this.visibleOptionsTarget = this.filterService.filter(e, n, this.filterValueTarget, this.filterMatchMode, this.filterLocale), this.onTargetFilter.emit({
                    query: this.filterValueTarget,
                    value: this.visibleOptionsTarget
                }));
            }
            isItemVisible(e, i) {
                return i == this.SOURCE_LIST ? this.isVisibleInList(this.visibleOptionsSource, e, this.filterValueSource) : this.isVisibleInList(this.visibleOptionsTarget, e, this.filterValueTarget);
            }
            isEmpty(e) {
                return e == this.SOURCE_LIST ? this.filterValueSource ? !this.visibleOptionsSource || this.visibleOptionsSource.length === 0 : !this.source || this.source.length === 0 : this.filterValueTarget ? !this.visibleOptionsTarget || this.visibleOptionsTarget.length === 0 : !this.target || this.target.length === 0;
            }
            isVisibleInList(e, i, n) {
                if (n && n.trim().length) {
                    for (let a = 0; a < e.length; a++)
                        if (i == e[a]) return !0;
                } else return !0;
            }
            onItemTouchEnd() {
                this.disabled || (this.itemTouched = !0);
            }
            sortByIndexInList(e, i) {
                return e.sort((n, a) => Ti(n, i) - Ti(a, i));
            }
            triggerChangeDetection() {
                this.source = [...this.source], this.target = [...this.target];
            }
            moveUp(e, i, n, a, o) {
                if (n && n.length) {
                    n = this.sortByIndexInList(n, i);
                    for (let s = 0; s < n.length; s++) {
                        let l = n[s],
                            c = Ti(l, i);
                        if (c != 0) {
                            let u = i[c],
                                h = i[c - 1];
                            i[c - 1] = u, i[c] = h;
                        } else break;
                    }
                    this.dragdrop && (this.filterValueSource && o === this.SOURCE_LIST || this.filterValueTarget && o === this.TARGET_LIST) && this.filter(i, o), this.movedUp = !0, this.reorderedListElement = e, a.emit({
                        items: n
                    }), this.triggerChangeDetection();
                }
            }
            moveTop(e, i, n, a, o) {
                if (n && n.length) {
                    n = this.sortByIndexInList(n, i);
                    for (let s = 0; s < n.length; s++) {
                        let l = n[s],
                            c = Ti(l, i);
                        if (c != 0) {
                            let u = i.splice(c, 1)[0];
                            i.unshift(u);
                        } else break;
                    }
                    this.dragdrop && (this.filterValueSource && o === this.SOURCE_LIST || this.filterValueTarget && o === this.TARGET_LIST) && this.filter(i, o), e.scrollTop = 0, a.emit({
                        items: n
                    }), this.triggerChangeDetection();
                }
            }
            moveDown(e, i, n, a, o) {
                if (n && n.length) {
                    n = this.sortByIndexInList(n, i);
                    for (let s = n.length - 1; s >= 0; s--) {
                        let l = n[s],
                            c = Ti(l, i);
                        if (c != i.length - 1) {
                            let u = i[c],
                                h = i[c + 1];
                            i[c + 1] = u, i[c] = h;
                        } else break;
                    }
                    this.dragdrop && (this.filterValueSource && o === this.SOURCE_LIST || this.filterValueTarget && o === this.TARGET_LIST) && this.filter(i, o), this.movedDown = !0, this.reorderedListElement = e, a.emit({
                        items: n
                    }), this.triggerChangeDetection();
                }
            }
            moveBottom(e, i, n, a, o) {
                if (n && n.length) {
                    n = this.sortByIndexInList(n, i);
                    for (let s = n.length - 1; s >= 0; s--) {
                        let l = n[s],
                            c = Ti(l, i);
                        if (c != i.length - 1) {
                            let u = i.splice(c, 1)[0];
                            i.push(u);
                        } else break;
                    }
                    this.dragdrop && (this.filterValueSource && o === this.SOURCE_LIST || this.filterValueTarget && o === this.TARGET_LIST) && this.filter(i, o), e.scrollTop = e.scrollHeight, a.emit({
                        items: n
                    }), this.triggerChangeDetection();
                }
            }
            moveRight() {
                if (this.selectedItemsSource && this.selectedItemsSource.length) {
                    let e = [...this.selectedItemsSource];
                    for (let i = 0; i < e.length; i++) {
                        let n = e[i];
                        Ti(n, this.target) == -1 && (this.target ? .push(this.source ? .splice(Ti(n, this.source), 1)[0]), this.visibleOptionsSource ? .includes(n) && this.visibleOptionsSource.splice(Ti(n, this.visibleOptionsSource), 1));
                    }
                    this.onMoveToTarget.emit({
                        items: e
                    }), this.keepSelection && (this.selectedItemsTarget = [...this.selectedItemsTarget, ...e]), e = [], this.selectedItemsSource = [], this.filterValueTarget && this.filter(this.target, this.TARGET_LIST), this.triggerChangeDetection();
                }
            }
            moveAllRight() {
                if (this.source) {
                    let e = [];
                    for (let i = 0; i < this.source.length; i++)
                        if (this.isItemVisible(this.source[i], this.SOURCE_LIST)) {
                            let n = this.source.splice(i, 1)[0];
                            this.target ? .push(n), e.push(n), i--;
                        }
                    this.onMoveAllToTarget.emit({
                        items: e
                    }), this.keepSelection && (this.selectedItemsTarget = [...this.selectedItemsTarget, ...this.selectedItemsSource]), this.selectedItemsSource = [], this.filterValueTarget && this.filter(this.target, this.TARGET_LIST), this.visibleOptionsSource = [], this.triggerChangeDetection();
                }
            }
            moveLeft() {
                if (this.selectedItemsTarget && this.selectedItemsTarget.length) {
                    let e = [...this.selectedItemsTarget];
                    for (let i = 0; i < e.length; i++) {
                        let n = e[i];
                        Ti(n, this.source) == -1 && (this.source ? .push(this.target ? .splice(Ti(n, this.target), 1)[0]), this.visibleOptionsTarget ? .includes(n) && this.visibleOptionsTarget.splice(Ti(n, this.visibleOptionsTarget), 1)[0]);
                    }
                    this.onMoveToSource.emit({
                        items: e
                    }), this.keepSelection && (this.selectedItemsSource = [...this.selectedItemsSource, e]), e = [], this.selectedItemsTarget = [], this.filterValueSource && this.filter(this.source, this.SOURCE_LIST), this.triggerChangeDetection();
                }
            }
            moveAllLeft() {
                if (this.target) {
                    let e = [];
                    for (let i = 0; i < this.target.length; i++)
                        if (this.isItemVisible(this.target[i], this.TARGET_LIST)) {
                            let n = this.target.splice(i, 1)[0];
                            this.source ? .push(n), e.push(n), i--;
                        }
                    this.onMoveAllToSource.emit({
                        items: e
                    }), this.keepSelection && (this.selectedItemsSource = [...this.selectedItemsSource, ...this.selectedItemsTarget]), this.selectedItemsTarget = [], this.filterValueSource && this.filter(this.source, this.SOURCE_LIST), this.visibleOptionsTarget = [], this.triggerChangeDetection();
                }
            }
            isSelected(e, i) {
                return this.findIndexInList(e, i) != -1;
            }
            findIndexInList(e, i) {
                return Ti(e, i);
            }
            onDrop(e, i) {
                let n = e.previousContainer !== e.container,
                    a = this.getDropIndexes(e.previousIndex, e.currentIndex, i, n, e.item.data);
                if (i === this.SOURCE_LIST) {
                    if (n) {
                        Sm(e.previousContainer.data, e.container.data, a.previousIndex, a.currentIndex);
                        let o = Ti(e.item.data, this.selectedItemsTarget);
                        o != -1 && (this.selectedItemsTarget.splice(o, 1), this.keepSelection && this.selectedItemsTarget.push(e.item.data)), this.visibleOptionsTarget && this.visibleOptionsTarget.splice(e.previousIndex, 1), this.onMoveToSource.emit({
                            items: [e.item.data]
                        });
                    } else wm(e.container.data, a.previousIndex, a.currentIndex), this.onSourceReorder.emit({
                        items: [e.item.data]
                    });
                    this.filterValueSource && this.filter(this.source, this.SOURCE_LIST);
                } else {
                    if (n) {
                        Sm(e.previousContainer.data, e.container.data, a.previousIndex, a.currentIndex);
                        let o = Ti(e.item.data, this.selectedItemsSource);
                        o != -1 && (this.selectedItemsSource.splice(o, 1), this.keepSelection && this.selectedItemsTarget.push(e.item.data)), this.visibleOptionsSource && this.visibleOptionsSource.splice(e.previousIndex, 1), this.onMoveToTarget.emit({
                            items: [e.item.data]
                        });
                    } else wm(e.container.data, a.previousIndex, a.currentIndex), this.onTargetReorder.emit({
                        items: [e.item.data]
                    });
                    this.filterValueTarget && this.filter(this.target, this.TARGET_LIST);
                }
            }
            onListFocus(e, i) {
                this.onFocus.emit(e);
            }
            onListBlur(e, i) {
                this.onBlur.emit(e);
            }
            getListElement(e) {
                return e === this.SOURCE_LIST ? this.listViewSourceChild ? .el.nativeElement : this.listViewTargetChild ? .el.nativeElement;
            }
            getListItems(e) {
                let i = this.getListElement(e);
                return pm(i, "li.p-picklist-item");
            }
            getLatestSelectedVisibleOptionIndex(e, i) {
                let n = [...i].reverse().find(a => e.includes(a));
                return n !== void 0 ? e.indexOf(n) : -1;
            }
            getVisibleList(e) {
                return e === this.SOURCE_LIST ? this.visibleOptionsSource && this.visibleOptionsSource.length > 0 ? this.visibleOptionsSource : this.source && this.source.length > 0 ? this.source : null : this.visibleOptionsTarget && this.visibleOptionsTarget.length > 0 ? this.visibleOptionsTarget : this.target && this.target.length > 0 ? this.target : null;
            }
            setSelectionList(e, i) {
                e === this.SOURCE_LIST ? this.selectedItemsSource = i : this.selectedItemsTarget = i;
            }
            findNextOptionIndex(e, i) {
                let a = [...this.getListItems(i)].findIndex(o => o.id === e);
                return a > -1 ? a + 1 : 0;
            }
            findPrevOptionIndex(e, i) {
                let a = [...this.getListItems(i)].findIndex(o => o.id === e);
                return a > -1 ? a - 1 : 0;
            }
            onItemKeyDown(e, i, n, a) {
                switch (e.code) {
                    case "ArrowDown":
                        this.onArrowDownKey(e, i, n, a);
                        break;
                    case "ArrowUp":
                        this.onArrowUpKey(e, i, n, a);
                        break;
                    case "Home":
                        this.onHomeKey(e, i, n, a);
                        break;
                    case "End":
                        this.onEndKey(e, i, n, a);
                        break;
                    case "Enter":
                        this.onEnterKey(e, i, n, a);
                        break;
                    case "Space":
                        this.onSpaceKey(e, i, n, a);
                        break;
                    case "KeyA":
                        e.ctrlKey && (this.setSelectionList(a, this.getVisibleList(a)), n.emit({
                            items: i
                        }), e.preventDefault());
                    default:
                        break;
                }
            }
            getFocusedOption(e, i) {
                return e === -1 ? null : i === this.SOURCE_LIST ? this.visibleOptionsSource && this.visibleOptionsSource.length ? this.visibleOptionsSource[e] : this.source && this.source.length ? this.source[e] : null : this.visibleOptionsTarget && this.visibleOptionsTarget.length ? this.visibleOptionsTarget[e] : this.target && this.target.length ? this.target[e] : null;
            }
            changeFocusedOptionIndex(e, i) {
                let n = this.getListItems(i);
                if (n ? .length > 0) {
                    let a = e >= n.length ? n.length - 1 : e < 0 ? 0 : e;
                    this.focusedOptionIndex = n[a].getAttribute("id"), this.focusedOption = this.getFocusedOption(a, i), this.scrollInView(n[a].getAttribute("id"), i);
                }
            }
            scrollInView(e, i) {
                let n = wl(this.getListElement(i), `li[id="${e}"]`);
                n && n.scrollIntoView && n.scrollIntoView({
                    block: "nearest",
                    inline: "start"
                });
            }
            onArrowDownKey(e, i, n, a) {
                let o = this.findNextOptionIndex(this.focusedOptionIndex, a);
                this.changeFocusedOptionIndex(o, a), e.shiftKey && this.onEnterKey(e, i, n, a), e.preventDefault();
            }
            onArrowUpKey(e, i, n, a) {
                let o = this.findPrevOptionIndex(this.focusedOptionIndex, a);
                this.changeFocusedOptionIndex(o, a), e.shiftKey && this.onEnterKey(e, i, n, a), e.preventDefault();
            }
            onEnterKey(e, i, n, a) {
                this.onItemClick(e, this.focusedOption, i, a, n), e.preventDefault();
            }
            onSpaceKey(e, i, n, a) {
                if (e.target.tagName !== "INPUT") {
                    if (e.preventDefault(), e.shiftKey && i && i.length > 0) {
                        let o = this.getVisibleList(a),
                            s = this.getLatestSelectedVisibleOptionIndex(o, i);
                        if (s !== -1) {
                            let l = Ti(this.focusedOption, o);
                            i = [...o.slice(Math.min(s, l), Math.max(s, l) + 1)], this.setSelectionList(a, i), n.emit({
                                items: i
                            });
                            return;
                        }
                    }
                    this.onEnterKey(e, i, n, a);
                }
            }
            onHomeKey(e, i, n, a) {
                if (e.ctrlKey && e.shiftKey) {
                    let o = this.getVisibleList(a),
                        s = Ti(this.focusedOption, o);
                    i = [...o.slice(0, s + 1)], this.setSelectionList(a, i), n.emit({
                        items: i
                    });
                } else this.changeFocusedOptionIndex(0, a);
                e.preventDefault();
            }
            onEndKey(e, i, n, a) {
                let o = this.getVisibleList(a),
                    s = o && o.length > 0 ? o.length - 1 : null;
                if (s !== null) {
                    if (e.ctrlKey && e.shiftKey) {
                        let l = Ti(this.focusedOption, o);
                        i = [...o.slice(l, s)], this.setSelectionList(a, i), n.emit({
                            items: i
                        });
                    } else this.changeFocusedOptionIndex(s, a);
                    e.preventDefault();
                }
            }
            getDropIndexes(e, i, n, a, o) {
                let s, l;
                return n === this.SOURCE_LIST ? (s = a ? this.filterValueTarget ? Ti(o, this.target) : e : this.filterValueSource ? Ti(o, this.source) : e, l = this.filterValueSource ? this.findFilteredCurrentIndex(this.visibleOptionsSource, i, this.source) : i) : (s = a ? this.filterValueSource ? Ti(o, this.source) : e : this.filterValueTarget ? Ti(o, this.target) : e, l = this.filterValueTarget ? this.findFilteredCurrentIndex(this.visibleOptionsTarget, i, this.target) : i), {
                    previousIndex: s,
                    currentIndex: l
                };
            }
            findFilteredCurrentIndex(e, i, n) {
                return e.length === i ? Ti(e[i - 1], n) + 1 : Ti(e[i], n);
            }
            resetSourceFilter() {
                this.visibleOptionsSource = null, this.filterValueSource = null, this.sourceFilterViewChild && (this.sourceFilterViewChild.nativeElement.value = "");
            }
            resetTargetFilter() {
                this.visibleOptionsTarget = null, this.filterValueTarget = null, this.targetFilterViewChild && (this.targetFilterViewChild.nativeElement.value = "");
            }
            resetFilter() {
                this.resetSourceFilter(), this.resetTargetFilter();
            }
            initMedia() {
                Ms(this.platformId) && (this.media = this.document.defaultView.matchMedia(`(max-width: ${this.breakpoint})`), this.viewChanged = this.media.matches, this.bindMediaChangeListener());
            }
            destroyMedia() {
                this.unbindMediaChangeListener();
            }
            bindMediaChangeListener() {
                this.media && !this.mediaChangeListener && (this.mediaChangeListener = this.renderer.listen(this.media, "change", e => {
                    this.viewChanged = e.matches, this.cd.markForCheck();
                }));
            }
            unbindMediaChangeListener() {
                this.mediaChangeListener && (this.mediaChangeListener(), this.mediaChangeListener = null);
            }
            createStyle() {
                if (Ms(this.platformId) && !this.styleElement) {
                    this.renderer.setAttribute(this.el.nativeElement.children[0], this.id, ""), this.styleElement = this.renderer.createElement("style"), this.renderer.setAttribute(this.styleElement, "type", "text/css"), this.renderer.appendChild(this.document.head, this.styleElement);
                    let e = `
                @media screen and (max-width: ${this.breakpoint}) {
                    .p-picklist[${this.id}] {
                        flex-direction: column;
                    }

                    .p-picklist[${this.id}] .p-picklist-controls {
                        flex-direction: row;
                    }
                }`;
                    this.renderer.setProperty(this.styleElement, "innerHTML", e), vx(this.styleElement, "nonce", this.config ? .csp() ? .nonce);
                }
            }
            sourceMoveDisabled() {
                if (this.disabled || !this.selectedItemsSource.length) return !0;
            }
            targetMoveDisabled() {
                if (this.disabled || !this.selectedItemsTarget.length) return !0;
            }
            moveRightDisabled() {
                return this.disabled || $o(this.selectedItemsSource);
            }
            moveLeftDisabled() {
                return this.disabled || $o(this.selectedItemsTarget);
            }
            moveAllRightDisabled() {
                return this.disabled || $o(this.source);
            }
            moveAllLeftDisabled() {
                return this.disabled || $o(this.target);
            }
            destroyStyle() {
                this.styleElement && (this.renderer.removeChild(this.document.head, this.styleElement), this.styleElement = null);
            }
            ngOnDestroy() {
                this.destroyStyle(), this.destroyMedia(), super.ngOnDestroy();
            }
            static ɵfac = (() => {
                let e;
                return function(n) {
                    return (e || (e = Da(t)))(n || t);
                };
            })();
            static ɵcmp = Sn({
                type: t,
                selectors: [
                    ["p-pickList"],
                    ["p-picklist"],
                    ["p-pick-list"]
                ],
                contentQueries: function(i, n, a) {
                    if (i & 1 && (Or(a, R7, 4), Or(a, M7, 4), Or(a, B7, 4), Or(a, G4, 4), Or(a, q4, 4), Or(a, U7, 4), Or(a, V7, 4), Or(a, z7, 4), Or(a, W7, 4), Or(a, j7, 4), Or(a, H7, 4), Or(a, G7, 4), Or(a, q7, 4), Or(a, X7, 4), Or(a, K7, 4), Or(a, Y7, 4), Or(a, Z7, 4), Or(a, J7, 4), Or(a, Q7, 4), Or(a, es, 4)), i & 2) {
                        let o;
                        Nt(o = Lt()) && (n.itemTemplate = o.first), Nt(o = Lt()) && (n.sourceHeaderTemplate = o.first), Nt(o = Lt()) && (n.targetHeaderTemplate = o.first), Nt(o = Lt()) && (n.sourceFilterTemplate = o.first), Nt(o = Lt()) && (n.targetFilterTemplate = o.first), Nt(o = Lt()) && (n.emptyMessageSourceTemplate = o.first), Nt(o = Lt()) && (n.emptyFilterMessageSourceTemplate = o.first), Nt(o = Lt()) && (n.emptyMessageTargetTemplate = o.first), Nt(o = Lt()) && (n.emptyFilterMessageTargetTemplate = o.first), Nt(o = Lt()) && (n.moveUpIconTemplate = o.first), Nt(o = Lt()) && (n.moveTopIconTemplate = o.first), Nt(o = Lt()) && (n.moveDownIconTemplate = o.first), Nt(o = Lt()) && (n.moveBottomIconTemplate = o.first), Nt(o = Lt()) && (n.moveToTargetIconTemplate = o.first), Nt(o = Lt()) && (n.moveAllToTargetIconTemplate = o.first), Nt(o = Lt()) && (n.moveToSourceIconTemplate = o.first), Nt(o = Lt()) && (n.moveAllToSourceIconTemplate = o.first), Nt(o = Lt()) && (n.targetFilterIconTemplate = o.first), Nt(o = Lt()) && (n.sourceFilterIconTemplate = o.first), Nt(o = Lt()) && (n.templates = o);
                    }
                },
                viewQuery: function(i, n) {
                    if (i & 1 && (Oi($7, 5), Oi(eR, 5), Oi(G4, 5), Oi(q4, 5)), i & 2) {
                        let a;
                        Nt(a = Lt()) && (n.listViewSourceChild = a.first), Nt(a = Lt()) && (n.listViewTargetChild = a.first), Nt(a = Lt()) && (n.sourceFilterViewChild = a.first), Nt(a = Lt()) && (n.targetFilterViewChild = a.first);
                    }
                },
                inputs: {
                    source: "source",
                    target: "target",
                    sourceHeader: "sourceHeader",
                    tabindex: [2, "tabindex", "tabindex", Fo],
                    rightButtonAriaLabel: "rightButtonAriaLabel",
                    leftButtonAriaLabel: "leftButtonAriaLabel",
                    allRightButtonAriaLabel: "allRightButtonAriaLabel",
                    allLeftButtonAriaLabel: "allLeftButtonAriaLabel",
                    upButtonAriaLabel: "upButtonAriaLabel",
                    downButtonAriaLabel: "downButtonAriaLabel",
                    topButtonAriaLabel: "topButtonAriaLabel",
                    bottomButtonAriaLabel: "bottomButtonAriaLabel",
                    targetHeader: "targetHeader",
                    responsive: [2, "responsive", "responsive", Rr],
                    filterBy: "filterBy",
                    filterLocale: "filterLocale",
                    trackBy: "trackBy",
                    sourceTrackBy: "sourceTrackBy",
                    targetTrackBy: "targetTrackBy",
                    showSourceFilter: [2, "showSourceFilter", "showSourceFilter", Rr],
                    showTargetFilter: [2, "showTargetFilter", "showTargetFilter", Rr],
                    metaKeySelection: [2, "metaKeySelection", "metaKeySelection", Rr],
                    dragdrop: [2, "dragdrop", "dragdrop", Rr],
                    style: "style",
                    styleClass: "styleClass",
                    sourceStyle: "sourceStyle",
                    targetStyle: "targetStyle",
                    showSourceControls: [2, "showSourceControls", "showSourceControls", Rr],
                    showTargetControls: [2, "showTargetControls", "showTargetControls", Rr],
                    sourceFilterPlaceholder: "sourceFilterPlaceholder",
                    targetFilterPlaceholder: "targetFilterPlaceholder",
                    disabled: [2, "disabled", "disabled", Rr],
                    sourceOptionDisabled: "sourceOptionDisabled",
                    targetOptionDisabled: "targetOptionDisabled",
                    ariaSourceFilterLabel: "ariaSourceFilterLabel",
                    ariaTargetFilterLabel: "ariaTargetFilterLabel",
                    filterMatchMode: "filterMatchMode",
                    stripedRows: [2, "stripedRows", "stripedRows", Rr],
                    keepSelection: [2, "keepSelection", "keepSelection", Rr],
                    scrollHeight: "scrollHeight",
                    autoOptionFocus: [2, "autoOptionFocus", "autoOptionFocus", Rr],
                    buttonProps: "buttonProps",
                    moveUpButtonProps: "moveUpButtonProps",
                    moveTopButtonProps: "moveTopButtonProps",
                    moveDownButtonProps: "moveDownButtonProps",
                    moveBottomButtonProps: "moveBottomButtonProps",
                    moveToTargetProps: "moveToTargetProps",
                    moveAllToTargetProps: "moveAllToTargetProps",
                    moveToSourceProps: "moveToSourceProps",
                    moveAllToSourceProps: "moveAllToSourceProps",
                    breakpoint: "breakpoint"
                },
                outputs: {
                    onMoveToSource: "onMoveToSource",
                    onMoveAllToSource: "onMoveAllToSource",
                    onMoveAllToTarget: "onMoveAllToTarget",
                    onMoveToTarget: "onMoveToTarget",
                    onSourceReorder: "onSourceReorder",
                    onTargetReorder: "onTargetReorder",
                    onSourceSelect: "onSourceSelect",
                    onTargetSelect: "onTargetSelect",
                    onSourceFilter: "onSourceFilter",
                    onTargetFilter: "onTargetFilter",
                    onFocus: "onFocus",
                    onBlur: "onBlur"
                },
                features: [Yo([X4]), za],
                decls: 34,
                vars: 99,
                consts: [
                    ["sourcelist", ""],
                    ["targetlist", ""],
                    ["header", ""],
                    ["filter", ""],
                    ["item", ""],
                    ["empty", ""],
                    ["emptyfilter", ""],
                    ["cdkDropListGroup", "", 3, "ngStyle", "ngClass"],
                    ["class", "p-picklist-controls p-picklist-source-controls", 4, "ngIf"],
                    [1, "p-picklist-list-container", "p-picklist-source-list-container"],
                    ["optionLabel", "name", 3, "ngModelChange", "onFocus", "onBlur", "keydown", "onDblClick", "onDrop", "onFilter", "multiple", "options", "ngModel", "id", "ngStyle", "striped", "tabindex", "disabled", "optionDisabled", "metaKeySelection", "scrollHeight", "autoOptionFocus", "filter", "filterBy", "filterLocale", "filterMatchMode", "filterPlaceHolder", "dragdrop"],
                    [4, "ngIf"],
                    [1, "p-picklist-controls", "p-picklist-transfer-controls"],
                    ["type", "button", "pButton", "", "pRipple", "", "severity", "secondary", 1, "p-button-icon-only", 3, "click", "disabled", "buttonProps"],
                    [4, "ngTemplateOutlet", "ngTemplateOutletContext"],
                    [1, "p-picklist-list-container", "p-picklist-target-list-container"],
                    ["class", "p-picklist-controls p-picklist-target-controls", 4, "ngIf"],
                    [1, "p-picklist-controls", "p-picklist-source-controls"],
                    [4, "ngTemplateOutlet"],
                    ["class", "p-picklist-title", 4, "ngIf"],
                    [1, "p-picklist-title"],
                    [1, "p-picklist-controls", "p-picklist-target-controls"]
                ],
                template: function(i, n) {
                    if (i & 1) {
                        let a = or();
                        ge(0, "div", 7), Oe(1, pR, 13, 26, "div", 8), ge(2, "div", 9)(3, "p-listbox", 10, 0), Tr("ngModelChange", function(s) {
                            return Ce(a), Sr(n.selectedItemsSource, s) || (n.selectedItemsSource = s), Ae(s);
                        }), nt("onFocus", function(s) {
                            return Ce(a), Ae(n.onListFocus(s, n.SOURCE_LIST));
                        })("onBlur", function(s) {
                            return Ce(a), Ae(n.onListBlur(s, n.SOURCE_LIST));
                        })("keydown", function(s) {
                            return Ce(a), Ae(n.onItemKeyDown(s, n.selectedItemsSource, n.onSourceSelect, n.SOURCE_LIST));
                        })("onDblClick", function() {
                            return Ce(a), Ae(n.onSourceItemDblClick());
                        })("onDrop", function(s) {
                            return Ce(a), Ae(n.onDrop(s, n.SOURCE_LIST));
                        })("onFilter", function(s) {
                            return Ce(a), Ae(n.onFilter(s.originalEvent, n.SOURCE_LIST));
                        }), Oe(5, _R, 3, 0, "ng-container", 11)(6, SR, 3, 0, "ng-container", 11)(7, AR, 2, 1, "ng-container", 11)(8, kR, 3, 0, "ng-container", 11)(9, PR, 3, 0, "ng-container", 11)(10, NR, 3, 0, "ng-container", 11), ve()(), ge(11, "div", 12)(12, "button", 13), nt("click", function() {
                            return Ce(a), Ae(n.moveRight());
                        }), Oe(13, MR, 3, 2, "ng-container", 11)(14, UR, 1, 0, null, 14), ve(), ge(15, "button", 13), nt("click", function() {
                            return Ce(a), Ae(n.moveAllRight());
                        }), Oe(16, WR, 3, 2, "ng-container", 11)(17, HR, 1, 0, null, 14), ve(), ge(18, "button", 13), nt("click", function() {
                            return Ce(a), Ae(n.moveLeft());
                        }), Oe(19, XR, 3, 2, "ng-container", 11)(20, YR, 1, 0, null, 14), ve(), ge(21, "button", 13), nt("click", function() {
                            return Ce(a), Ae(n.moveAllLeft());
                        }), Oe(22, QR, 3, 2, "ng-container", 11)(23, eM, 1, 0, null, 14), ve()(), ge(24, "div", 15)(25, "p-listbox", 10, 1), Tr("ngModelChange", function(s) {
                            return Ce(a), Sr(n.selectedItemsTarget, s) || (n.selectedItemsTarget = s), Ae(s);
                        }), nt("onFocus", function(s) {
                            return Ce(a), Ae(n.onListFocus(s, n.TARGET_LIST));
                        })("onBlur", function(s) {
                            return Ce(a), Ae(n.onListBlur(s, n.TARGET_LIST));
                        })("keydown", function(s) {
                            return Ce(a), Ae(n.onItemKeyDown(s, n.selectedItemsTarget, n.onTargetSelect, n.TARGET_LIST));
                        })("onDblClick", function() {
                            return Ce(a), Ae(n.onTargetItemDblClick());
                        })("onDrop", function(s) {
                            return Ce(a), Ae(n.onDrop(s, n.TARGET_LIST));
                        })("onFilter", function(s) {
                            return Ce(a), Ae(n.onFilter(s.originalEvent, n.TARGET_LIST));
                        }), Oe(27, aM, 3, 0, "ng-container", 11)(28, cM, 3, 0, "ng-container", 11)(29, fM, 2, 1, "ng-container", 11)(30, pM, 3, 0, "ng-container", 11)(31, vM, 3, 0, "ng-container", 11)(32, yM, 3, 0, "ng-container", 11), ve()(), Oe(33, OM, 13, 26, "div", 16), ve();
                    }
                    i & 2 && (Xn(n.styleClass), Q("ngStyle", n.style)("ngClass", vr(90, tR)), vt("data-pc-name", "picklist")("data-pc-section", "root"), oe(), Q("ngIf", n.showSourceControls), oe(), vt("data-pc-section", "sourceWrapper")("data-pc-group-section", "listWrapper"), oe(), Q("multiple", !0)("options", n.source), wr("ngModel", n.selectedItemsSource), Q("id", n.idSource + "_list")("ngStyle", n.sourceStyle)("striped", n.stripedRows)("tabindex", n.tabindex)("disabled", n.disabled)("optionDisabled", n.sourceOptionDisabled)("metaKeySelection", n.metaKeySelection)("scrollHeight", n.scrollHeight)("autoOptionFocus", n.autoOptionFocus)("filter", n.filterBy)("filterBy", n.filterBy)("filterLocale", n.filterLocale)("filterMatchMode", n.filterMatchMode)("filterPlaceHolder", n.sourceFilterPlaceholder)("dragdrop", n.dragdrop), oe(2), Q("ngIf", n.sourceHeaderTemplate || n._sourceHeaderTemplate || n.sourceHeader), oe(), Q("ngIf", n.sourceFilterTemplate || n._sourceFilterTemplate), oe(), Q("ngIf", n.sourceFilterIconTemplate || n._sourceFilterIconTemplate), oe(), Q("ngIf", n.itemTemplate || n._itemTemplate), oe(), Q("ngIf", n.emptyMessageSourceTemplate || n._emptyMessageSourceTemplate), oe(), Q("ngIf", n.emptyFilterMessageSourceTemplate || n._emptyFilterMessageSourceTemplate), oe(), vt("data-pc-section", "buttons")("data-pc-group-section", "controls"), oe(), Q("disabled", n.moveRightDisabled())("buttonProps", n.getButtonProps("movetotarget")), vt("aria-label", n.moveToTargetAriaLabel)("data-pc-section", "moveToTargetButton"), oe(), Q("ngIf", !n.moveToTargetIconTemplate && !n._moveToTargetIconTemplate), oe(), Q("ngTemplateOutlet", n.moveToTargetIconTemplate || n._moveToTargetIconTemplate)("ngTemplateOutletContext", ii(91, A1, n.viewChanged)), oe(), Q("disabled", n.moveAllRightDisabled())("buttonProps", n.getButtonProps("movealltotarget")), vt("aria-label", n.moveAllToTargetAriaLabel)("data-pc-section", "moveAllToTargetButton"), oe(), Q("ngIf", !n.moveAllToTargetIconTemplate && !n._moveAllToTargetIconTemplate), oe(), Q("ngTemplateOutlet", n.moveAllToTargetIconTemplate || n._moveAllToTargetIconTemplate)("ngTemplateOutletContext", ii(93, A1, n.viewChanged)), oe(), Q("disabled", n.moveLeftDisabled())("buttonProps", n.getButtonProps("movetosource")), vt("aria-label", n.moveToSourceAriaLabel)("data-pc-section", "moveToSourceButton"), oe(), Q("ngIf", !n.moveToSourceIconTemplate && !n._moveToSourceIconTemplate), oe(), Q("ngTemplateOutlet", n.moveToSourceIconTemplate || n._moveToSourceIconTemplate)("ngTemplateOutletContext", ii(95, A1, n.viewChanged)), oe(), Q("disabled", n.moveAllLeftDisabled())("buttonProps", n.getButtonProps("movealltosource")), vt("aria-label", n.moveAllToSourceAriaLabel)("data-pc-section", "moveAllToSourceButton"), oe(), Q("ngIf", !n.moveAllToSourceIconTemplate && !n._moveAllToSourceIconTemplate), oe(), Q("ngTemplateOutlet", n.moveAllToSourceIconTemplate || n._moveAllToSourceIconTemplate)("ngTemplateOutletContext", ii(97, A1, n.viewChanged)), oe(), vt("data-pc-section", "targetWrapper")("data-pc-group-section", "listwrapper"), oe(), Q("multiple", !0)("options", n.target), wr("ngModel", n.selectedItemsTarget), Q("id", n.idTarget + "_list")("ngStyle", n.targetStyle)("striped", n.stripedRows)("tabindex", n.tabindex)("disabled", n.disabled)("optionDisabled", n.targetOptionDisabled)("metaKeySelection", n.metaKeySelection)("scrollHeight", n.scrollHeight)("autoOptionFocus", n.autoOptionFocus)("filter", n.filterBy)("filterBy", n.filterBy)("filterLocale", n.filterLocale)("filterMatchMode", n.filterMatchMode)("filterPlaceHolder", n.targetFilterPlaceholder)("dragdrop", n.dragdrop), oe(2), Q("ngIf", n.targetHeaderTemplate || n._targetHeaderTemplate || n.targetHeader), oe(), Q("ngIf", n.targetFilterTemplate || n._targetFilterTemplate), oe(), Q("ngIf", n.targetFilterIconTemplate || n._targetFilterIconTemplate), oe(), Q("ngIf", n.itemTemplate || n._itemTemplate), oe(), Q("ngIf", n.emptyMessageTargetTemplate || n._emptyMessageTargetTemplate), oe(), Q("ngIf", n.emptyFilterMessageTargetTemplate || n._emptyFilterMessageTargetTemplate), oe(), Q("ngIf", n.showTargetControls));
                },
                dependencies: [ha, Wa, Eo, Jo, vc, b0, Al, Md, u_, w_, wx, Sx, S_, Cx, Ax, Sd, Tx, Yv, bl, _l, yl, ja],
                encapsulation: 2,
                changeDetection: 0
            });
        }
        return t;
    })(),
    Z4 = (() => {
        class t {
            static ɵfac = function(i) {
                return new(i || t)();
            };
            static ɵmod = pc({
                type: t
            });
            static ɵinj = dc({
                imports: [Zv, ja, ja]
            });
        }
        return t;
    })();
var XM = ["pTable"],
    Dh = () => ({
        standalone: !0
    }),
    KM = () => ({
        overflow: "visible"
    }),
    J4 = t => ({
        package: t
    });

function YM(t, r) {
    if (t & 1 && (ge(0, "div", 79)(1, "p", 80), cr(2), ve()()), t & 2) {
        let e = ee();
        oe(2), Zi(" ", e.errorMessage, " ");
    }
}

function ZM(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "div", 81)(1, "span", 82)(2, "button", 83), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.menuAddNewWatchlist());
        }), Xt(3), dt(4, 14), Kt(), ve(), ge(5, "button", 83), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.menuAddExistingWatchlist());
        }), Xt(6), dt(7, 15), Kt(), ve(), ge(8, "button", 83), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.menuAddAlert());
        }), Xt(9), dt(10, 16), Kt(), ve()()();
    }
    if (t & 2) {
        let e = ee();
        oe(2), Q("hidden", e.selectedRows.length === 0), oe(3), Q("hidden", e.selectedRows.length === 0), oe(3), Q("hidden", e.selectedRows.length === 0);
    }
}

function JM(t, r) {
    t & 1 && (ge(0, "span", 87), dt(1, 18), ve());
}

function QM(t, r) {
    t & 1 && (ge(0, "span", 87), dt(1, 19), ve());
}

function $M(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "button", 84), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.toggleGlobalFilterPane());
        }), Oe(1, JM, 2, 0, "span", 85), ge(2, "span", 86), dt(3, 17), ve(), Oe(4, QM, 2, 0, "span", 85), ve();
    }
    if (t & 2) {
        let e = ee();
        vt("aria-expanded", e.showGlobalFilterPane ? "true" : "false"), oe(), Q("ngIf", !e.showGlobalFilterPane), oe(3), Q("ngIf", e.showGlobalFilterPane);
    }
}

function e9(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "span", 88)(1, "input", 89), nt("input", function() {
            Ce(e);
            let n = ee();
            return Ae(n.applyGlobalFilter());
        }), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee();
            return Sr(a.globalFilterText, n) || (a.globalFilterText = n), Ae(n);
        }), ve()();
    }
    if (t & 2) {
        let e = ee();
        oe(), wr("ngModel", e.globalFilterText), Q("ngModelOptions", vr(2, Dh));
    }
}

function t9(t, r) {
    t & 1 && (ge(0, "span", 87), dt(1, 21), ve());
}

function r9(t, r) {
    t & 1 && (ge(0, "span", 87), dt(1, 22), ve());
}

function i9(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "button", 90), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.toggleColumnFilterPane());
        }), Oe(1, t9, 2, 0, "span", 85), ge(2, "span"), dt(3, 20), ve(), Oe(4, r9, 2, 0, "span", 85), ve();
    }
    if (t & 2) {
        let e = ee();
        Q("ngClass", e.showColumnFilterPane ? "pur-button--icon-filter-circle-xmark" : "pur-button--icon-filter"), vt("aria-expanded", e.showColumnFilterPane ? "true" : "false"), oe(), Q("ngIf", !e.showColumnFilterPane), oe(3), Q("ngIf", e.showColumnFilterPane);
    }
}

function n9(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "button", 91), nt("click", function(n) {
            Ce(e), ee();
            let a = Br(19);
            return Ae(a.toggle(n));
        }), ge(1, "span"), dt(2, 23), ve(), ge(3, "span", 87), dt(4, 24), ve()();
    }
}

function a9(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "button", 92), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.openGridSettings());
        }), ge(1, "span"), dt(2, 25), ve(), ge(3, "span", 87), dt(4, 26), ve()();
    }
}

function o9(t, r) {
    if (t & 1 && (ge(0, "th", 98), cr(1), St(2, "p-sortIcon", 99), ve()), t & 2) {
        let e = r.$implicit;
        v0("pSortableColumn", e.field), oe(), Zi(" ", e.header, " "), oe(), v0("field", e.field);
    }
}

function s9(t, r) {
    if (t & 1 && (ge(0, "th", 100), St(1, "p-columnFilter", 103), ve()), t & 2) {
        let e = r.$implicit;
        oe(), Q("field", e.field);
    }
}

function l9(t, r) {
    if (t & 1 && (ge(0, "tr")(1, "th", 100), St(2, "p-columnFilter", 101), ve(), Oe(3, s9, 2, 1, "th", 102), ve()), t & 2) {
        let e = ee(2);
        oe(3), Q("ngForOf", e.activeDisplayedColumns)("ngForTrackBy", e.getColumnId);
    }
}

function c9(t, r) {
    if (t & 1 && (ge(0, "tr")(1, "th", 93), St(2, "p-tableHeaderCheckbox", 94), ve(), ge(3, "th", 95), Xt(4), dt(5, 27), Kt(), St(6, "p-sortIcon", 96), ve(), Oe(7, o9, 3, 3, "th", 97), ve(), Oe(8, l9, 4, 2, "tr", 55)), t & 2) {
        let e = ee();
        oe(7), Q("ngForOf", e.activeDisplayedColumns)("ngForTrackBy", e.getColumnId), oe(), Q("ngIf", e.showColumnFilterPane);
    }
}

function u9(t, r) {
    t & 1 && Ci(0);
}

function f9(t, r) {
    t & 1 && Ci(0);
}

function h9(t, r) {
    if (t & 1 && (ge(0, "tr", 110), St(1, "td", 93), Oe(2, f9, 1, 0, "ng-container", 107), ve()), t & 2) {
        let e = ee().$implicit;
        ee(3);
        let i = Br(27);
        oe(2), Q("ngTemplateOutlet", i)("ngTemplateOutletContext", ii(2, J4, e));
    }
}

function d9(t, r) {
    if (t & 1 && (Xt(0), Oe(1, h9, 3, 4, "tr", 109), Kt()), t & 2) {
        let e = ee().$implicit,
            i = ee(2);
        oe(), Q("ngIf", i.hiddenChildRows.get(e.shipmentpin) === !1 && !i.isOnFilter);
    }
}

function p9(t, r) {
    if (t & 1 && (ge(0, "tr", 105)(1, "td", 93), St(2, "p-tableCheckbox", 106), ve(), Oe(3, u9, 1, 0, "ng-container", 107), ve(), Oe(4, d9, 2, 1, "ng-container", 108)), t & 2) {
        let e = r.$implicit,
            i = ee(2),
            n = Br(27);
        Q("pContextMenuRow", e), oe(2), Q("value", e), vt("ariaLabel", "select shipment " + e.shipmentpin)("aria-Label", "select shipment " + e.shipmentpin), oe(), Q("ngTemplateOutlet", n)("ngTemplateOutletContext", ii(8, J4, e)), oe(), Q("ngForOf", e.children)("ngForTrackBy", i.getShipmentId);
    }
}

function m9(t, r) {
    t & 1 && Oe(0, p9, 5, 10, "ng-template", 104);
}

function g9(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "button", 114, 5), nt("click", function() {
            Ce(e);
            let n = ee().package,
                a = ee();
            return Ae(a.toggleChildPackages(n.shipmentpin));
        }), ge(2, "span", 87), cr(3, "Toggle visibility of packages in this shipment"), ve()();
    }
    if (t & 2) {
        let e = ee().package,
            i = ee();
        vt("aria-expanded", i.hiddenChildRows.get(e.shipmentpin) === !1 ? "true" : "false");
    }
}

function v9(t, r) {
    if (t & 1 && (Xt(0), St(1, "span"), cr(2), Kt()), t & 2) {
        let e = ee(2).package;
        oe(), X2("shipments__status shipments__status--", e.packagestatuscode, ""), oe(), Zi(" ", e.packagestatuscodedisplayvalue || e.packagestatuscode, " ");
    }
}

function x9(t, r) {
    if (t & 1 && cr(0), t & 2) {
        let e = ee().$implicit,
            i = ee().package;
        Wi(i[e.field]);
    }
}

function _9(t, r) {
    if (t & 1 && (ge(0, "td"), Oe(1, v9, 3, 4, "ng-container", 115)(2, x9, 1, 1, "ng-template", null, 6, hi), ve()), t & 2) {
        let e = r.$implicit,
            i = Br(3);
        oe(), Q("ngIf", e.field === "packagestatuscode")("ngIfElse", i);
    }
}

function y9(t, r) {
    if (t & 1 && (ge(0, "td", 111)(1, "span")(2, "a", 112), cr(3), ve()(), Oe(4, g9, 4, 1, "button", 113), ve(), Oe(5, _9, 4, 2, "td", 108)), t & 2) {
        let e = r.package,
            i = ee();
        Q("ngClass", e.isStatusDifferent ? "shipments__status--Different" : ""), oe(2), K2("href", "https://www.purolator.com/en/shipping/tracker?pin=", e.packagepin, "", sd), oe(), Zi(" ", e.packagepin, " "), oe(), Q("ngIf", e.isLeadPin && (e.children == null ? null : e.children.length) > 0), oe(), Q("ngForOf", i.activeDisplayedColumns)("ngForTrackBy", i.getColumnId);
    }
}

function b9(t, r) {
    if (t & 1 && (ge(0, "div")(1, "strong"), cr(2), ve()()), t & 2) {
        let e = r.$implicit;
        oe(2), Wi(e.header);
    }
}

function w9(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "button", 116), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.closeGridSettings(!0));
        }), dt(1, 28), ve();
    }
}

function S9(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "p-footer", 117)(1, "button", 118), nt("click", function() {
            Ce(e);
            let n = ee();
            return n.showSaveTemplateModal = !1, Ae(n.selectedTemplate = "");
        }), dt(2, 29), ve(), ge(3, "button", 119), nt("click", function() {
            Ce(e);
            let n = ee();
            return n.showTemplateAddModal = !0, n.showSaveTemplateModal = !1, Ae(n.selectedTemplate = "");
        }), dt(4, 30), ve()();
    }
    if (t & 2) {
        let e = ee();
        oe(3), Q("disabled", e.isSavingColumnLayout);
    }
}

function C9(t, r) {
    t & 1 && (ge(0, "p", 120), dt(1, 31), ve());
}

function A9(t, r) {
    t & 1 && (ge(0, "p", 120), dt(1, 32), ve());
}

function T9(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "p-footer", 117)(1, "button", 118), nt("click", function() {
            Ce(e);
            let n = ee();
            return n.showTemplateAddModal = !1, Ae(n.selectedTemplate = "");
        }), dt(2, 33), ve(), ge(3, "button", 119), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.saveOrUpdateColumnLayout());
        }), dt(4, 34), ve()();
    }
    if (t & 2) {
        let e = ee();
        oe(3), Q("disabled", e.isSavingColumnLayout);
    }
}

function D9(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "button", 121), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.applyNewWatchlist());
        }), dt(1, 35), ve();
    }
    if (t & 2) {
        let e = ee();
        Q("disabled", e.invalidCharacterError);
    }
}

function k9(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "button", 122), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.addToExistingWatchlist(n.selectedWatchlistName));
        }), dt(1, 36), ve();
    }
}
var Q4 = (() => {
    class t {
        constructor(e, i, n, a, o, s, l, c, u, h, d, f) {
            this.changeDetectorRef = e, this.messageService = i, this.dialogService = n, this.filterService = a, this.user = o, this.apiService = s, this.spinner = l, this.lookupDataService = c, this.sharedService = u, this.authService = h, this.localeService = d, this.ngZone = f, this.columns = [], this.data = [], this.filteredData = [], this.allRows = [], this.visibleRows = [], this.totalRecords = 0, this.filteringRules = {}, this.dataForExport = [], this.recordCount = 0, this.selectedRows = [], this.menuItems = [], this.exportItems = [], this.templates = [], this.columnLayoutName = "", this.templateId = "", this.selectedTemplate = "", this.showErrorMessage = !1, this.duplicateTemplateTitleError = !1, this.titleInvalidCharacters = !1, this.isSelectedColumnDirty = !1, this.showSaveTemplateModal = !1, this.showTemplateAddModal = !1, this.isSavingColumnLayout = !1, this.savedDialogDetailText = "We\u2019ve noticed you made changes to the standard column layout, would you like to save it?", this.displayCapacityModal = !1, this.summaryText = " Generated Reports are at Capacity.", this.detailText = " You have reached the maximum number of reports created. Please delete a report to free up space.", this.errorMessages = {
                summary: " Something Went Wrong!",
                detail: " Please try again later. If issue persist again, please contact support team."
            }, this.ariaTimeoutId = null, this.hiddenChildRows = new Map(), this.pins = [], this.defaultSortField = "shipmentcreated", this.isApiError = !1, this.errorMessage = "Something Went Wrong!", this.virtualRowHeight = 48, this.showGlobalFilterPane = !1, this.globalFilterText = "", this.showColumnFilterPane = !1, this.activeDisplayedColumns = [], this.globalFilterFields = [], this.showGridSettings = !1, this.availableFields = [], this.selectedFields = [], this.showAddAlert = !1, this.showAddNewWatchlist = !1, this.showSelectWatchlist = !1, this.newWatchlistName = "", this.newWatchlistHeader = "Add to New Shipment Watch", this.selectedWatchlistName = "", this.watchlistNames = [], this.watchlistMenuSubject = new B2(!1), this.userWatchlistResponse = new U2(1), this.invalidCharacterError = !1, this.columns = o.createDefaultColumns(), this.rebuildActiveDisplayedColumns(), this.rebuildGlobalFilterFields(), this.watchlistMenuSubject.subscribe(m => {
                this.showSelectWatchlist = m;
            }), this.lookupDataService.getAllByGroup("column").subscribe(m => {
                xl.updateColumnHeader(m, this.localeService.getLocale(), this.columns), Array.isArray(this.availableFields) && this.availableFields.length && xl.updateColumnHeader(m, this.localeService.getLocale(), this.availableFields), Array.isArray(this.selectedFields) && this.selectedFields.length && xl.updateColumnHeader(m, this.localeService.getLocale(), this.selectedFields), this.changeDetectorRef.markForCheck();
            });
        }
        ngOnInit() {
            this.exportItems = [{
                label: "XLS Format",
                command: () => {
                    this.exportAll("inExcel");
                }
            }, {
                label: "PDF Format",
                command: () => {
                    this.exportAll("inPdf");
                }
            }], this.menuItems = [{
                label: "Add to New Shipment Watch",
                icon: "pi pi-fw pi-plus-circle",
                command: () => {
                    this.showAddNewWatchlist = !0;
                }
            }, {
                label: "Add to Existing Shipment Watch",
                icon: "pi pi-fw pi-eye",
                command: () => {
                    if (this.user.userData.watchlists.length === 0) {
                        this.messageService.add({
                            severity: "error",
                            summary: "No shipment watch exists",
                            detail: "At least one shipment watch must exist.  Please create a new Shipment Watch instead."
                        });
                        return;
                    }
                    this.watchlistNames = [];
                    for (let e = 0; e < this.user.userData.watchlists.length; e++) this.watchlistNames.push(this.user.userData.watchlists[e].watchlistName);
                    this.showSelectWatchlist = !0;
                }
            }, {
                separator: !0
            }, {
                label: "Create a Notification",
                icon: "pi pi-fw pi-bell",
                command: () => {
                    this.showAddAlert = !0;
                }
            }], this.getSavedColumnData(), this.user.userData.watchlists.length === 0 ? this.apiService.watchlistGet({
                userId: this.user.userData.id
            }).subscribe({
                next: e => {
                    let i = e;
                    this.userWatchlistResponse.next(i), this.user.userData.watchlists = i;
                },
                error: e => {
                    console.log(e);
                }
            }) : this.userWatchlistResponse.next(!0);
        }
        setVisualizationDetailsApiParams(e) {
            this.visualizationDetailsApiParams = e;
        }
        ngAfterViewInit() {
            this.pTableRef != null && (this.pTableRef.resetScrollTop = function() {});
        }
        ngOnDestroy() {
            this.ref && this.ref.close(), this.ariaTimeoutId && (clearTimeout(this.ariaTimeoutId), this.ariaTimeoutId = null);
        }
        onFilter(e) {
            this.filteredData = e.filteredValue, this.filteringRules = Object.fromEntries(Object.entries(e.filters).filter(([i]) => i !== "global")), this.rebuildAllRows();
        }
        activeColumns() {
            return this.columns.filter(e => e.isDisplayed && e.field !== "packagepin").sort((e, i) => e.position - i.position);
        }
        exportAll(e) {
            this.spinner.show("exportData");

            function i(c) {
                let u = [];
                for (let h in c) {
                    let d = {
                            columnName: "",
                            actions: []
                        },
                        f = c[h].filter(m => m.value !== null);
                    f.length > 0 && (d.columnName = h, d.actions = f, u.push(d));
                }
                return u;
            }
            let n = this.lookupDataService.lookupsDescriptions$,
                a = this.visualizationDetailsApiParams,
                o = this.getSortedColumns(this.columns.filter(c => c.isDisplayed), "position").map(c => c.field);
            a.body.columnNames = o, a.body.columnNames.push("packagestatuscode");
            let s = i(JSON.parse(JSON.stringify(this.filteringRules)));
            JSON.stringify(s) !== "{}" && (s.forEach(c => {
                if (c.columnName === "packagestatuscode")
                    for (let u of c.actions) {
                        let h = "";
                        switch (u.matchMode) {
                            case "startsWith":
                                h = Array.from(this.sharedService.statusMap.entries()).filter(([d, f]) => f.toLowerCase().startsWith(u.value.toLowerCase())).map(([d, f]) => d).join(",");
                                break;
                            case "endsWith":
                                h = Array.from(this.sharedService.statusMap.entries()).filter(([d, f]) => f.toLowerCase().endsWith(u.value.toLowerCase())).map(([d, f]) => d).join(",");
                                break;
                            case "contains":
                                h = Array.from(this.sharedService.statusMap.entries()).filter(([d, f]) => f.toLowerCase().includes(u.value.toLowerCase())).map(([d, f]) => d).join(",");
                                break;
                            case "notContains":
                                h = Array.from(this.sharedService.statusMap.entries()).filter(([d, f]) => !f.toLowerCase().includes(u.value.toLowerCase())).map(([d, f]) => d).join(",");
                                break;
                            case "equals":
                                h = Array.from(this.sharedService.statusMap.entries()).filter(([d, f]) => f.toLowerCase() == u.value.toLowerCase()).map(([d, f]) => d).join(",");
                                break;
                            case "notEquals":
                                h = Array.from(this.sharedService.statusMap.entries()).filter(([d, f]) => f.toLowerCase() != u.value.toLowerCase()).map(([d, f]) => d).join(",");
                                break;
                            case "includes":
                                h = u.value;
                                break;
                        }
                        u.value = h, u.matchMode = "includes";
                    }
            }), a.body.exportParams = {}, a.body.exportParams.filters = s, a.body.exportParams.lang = this.localeService.getLocale()), this.globalFilterText !== "" && (a.body.exportParams || (a.body.exportParams = {}), a.body.exportParams.globalSearch = this.globalFilterText, a.body.exportParams.lang = this.localeService.getLocale());
            let l = this.apiService.visualizationGetvisualizationdetailsPost$Response(a);
            try {
                this.getDetailsSubscription.unsubscribe();
            } catch {}
            this.getDetailsSubscription = Wu([n, l]).subscribe(async c => {
                let u = c[0],
                    h = c[1].body;
                if (this !== void 0) {
                    let d = this.localeService.getLocale(),
                        f = w => {
                            if (!u || typeof u != "object") return {};
                            let T = u[w];
                            if (!Array.isArray(T)) return {};
                            let E = {};
                            for (let L of T) {
                                let P = L ? .code;
                                if (!P) continue;
                                let k = L[d] ? ? L.en ? ? L.fr ? ? P;
                                E[P] = k;
                            }
                            return E;
                        },
                        m = f("product"),
                        _ = f("lastScanEventReason"),
                        x = f("packageStatus"),
                        g = f("packageSubStatus"),
                        b = f("shipmentType");
                    for (let w of h) w.productcode && (w.productcode = m[w.productcode] ? ? w.productcode), w.lastScanEventReasonCode && (w.lastScanEventReasonCode = _[w.lastScanEventReasonCode] ? ? w.lastScanEventReasonCode), w.packagestatuscode && (w.packagestatuscode = x[w.packagestatuscode] ? ? w.packagestatuscode), w.packagestatussubcode && (w.packagestatussubcode = g[w.packagestatussubcode] ? ? w.packagestatussubcode), w.shipmenttype && (w.shipmenttype = b[w.shipmenttype] ? ? w.shipmenttype);
                    this.load(h, !0), e === "inExcel" && this.exportExcel(), e === "inPdf" && (await this.exportPdf());
                }
                this.isApiError = !1, await this.spinner.hide("exportData");
            }, c => {
                console.log(c), this.spinner.hide("exportData"), this.isApiError = !0, this.load([], !0, !0), c.status === 504 ? this.errorMessage = "Please re-try as it is timed out due to the heavy load" : c.status === 413 && (this.errorMessage = "Please reduce the timeframe or number of shipping accounts in your query or use reporting feature");
            });
        }
        async exportPdf() {
            let e = this.reportData(),
                i = this.getColumnFieldsAndHeaders(),
                n = e.map(m => i.fields.map(_ => m[_]));

            function a(m, _) {
                let x = [];
                for (let g = 0; g < m.length; g += _) x.push(m.slice(g, g + _));
                return x;
            }
            let o = a(n, 1e4),
                s = 0,
                l = new Date().toISOString(),
                c = [],
                u = o.map(async m => {
                    s++;
                    let _ = new Bt("landscape", "px", "a0");
                    _.autoTable({
                        head: [i.headers],
                        body: m,
                        headStyles: {
                            fillColor: [51, 153, 255],
                            lineWidth: 1,
                            lineColor: [189, 189, 189]
                        },
                        tableLineColor: [189, 195, 199],
                        tableLineWidth: .75,
                        theme: "grid",
                        styles: {
                            fontSize: 12
                        }
                    });
                    let x = _.output("arraybuffer");
                    c.push(x);
                });
            await Promise.all(u);
            let h = await Hn.create(),
                d = c.map(async m => {
                    let _ = await Hn.load(m);
                    (await h.copyPages(_, _.getPageIndices())).forEach(g => {
                        h.addPage(g);
                    });
                });
            await Promise.all(d);
            let f = await h.save();
            this.downloadPDF(f, "ShipmentData_" + l + ".pdf");
        }
        downloadPDF(e, i) {
            let n = new Blob([e], {
                    type: "application/pdf"
                }),
                a = URL.createObjectURL(n),
                o = document.createElement("a");
            o.href = a, o.download = `${i}.pdf`, document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(a);
        }
        exportExcel() {
            let e = this.getColumnFieldsAndHeaders(),
                i = "ShipmentData " + new Date().toISOString() + ".xlsx",
                n = this.reportData(),
                a = Ef.json_to_sheet(n, {
                    header: e.fields
                }),
                o = e.fields.length;
            a["!cols"] = Array.from({
                length: o
            }, () => ({
                wch: 24
            })), Ef.sheet_add_aoa(a, [e.headers], {
                origin: "A1"
            });
            let s = Ef.book_new();
            Ef.book_append_sheet(s, a, "Sheet1"), h5(s, i);
        }
        gridData() {
            return !this.ariaTimeoutId && this.data ? .length && (this.ariaTimeoutId = window.setTimeout(() => {
                this.ngZone.runOutsideAngular(() => {
                    typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => this.injectAria()) : this.injectAria(), this.ariaTimeoutId = null;
                });
            }, 1e3)), this.isOnFilter ? this.data : this.data.filter(e => !e.isChildPin);
        }
        injectAria() {
            let e = this.pTableRef ? .el ? .nativeElement;
            if (!e) return;
            let i = typeof performance < "u" && typeof performance.now == "function",
                n = i ? performance.now() : 0,
                a = Array.from(e.querySelectorAll("div.p-checkbox-box")),
                o = Array.from(e.querySelectorAll("div.p-checkbox-box.p-component"));
            if (!a.length && !o.length) return;
            let s = 200,
                l = typeof requestAnimationFrame == "function" ? requestAnimationFrame : u => setTimeout(u, 0),
                c = (u, h, d, f) => {
                    let m = Math.min(h + s, u.length);
                    for (let _ = h; _ < m; _++) d(u[_]);
                    m < u.length ? l(() => c(u, m, d, f)) : f && f();
                };
            c(a, 0, u => {
                u.ariaLabel = "select all shipments";
            }, () => {
                c(o, 0, u => {
                    u.ariaLabel || (u.ariaLabel = "select shipment");
                }, () => {
                    if (!Ku.production && Ku.enableDevTimerInstrumentation && i) {
                        let u = performance.now() - n;
                        console.log(`[DataGridComponent] injectAria applied to ${a.length+o.length} checkboxes in ${u.toFixed(1)}ms`);
                    }
                });
            });
        }
        filterFields() {
            let e = [];
            for (let i = 0; i < this.columns.length; i++) this.columns[i].isDisplayed && e.push(this.columns[i].field);
            return e;
        }
        applyGlobalFilter() {
            this.pTableRef !== null && this.pTableRef !== void 0 && this.pTableRef.filterGlobal(this.globalFilterText, "contains");
        }
        toggleGlobalFilterPane() {
            this.showGlobalFilterPane = !this.showGlobalFilterPane;
        }
        toggleColumnFilterPane() {
            this.showColumnFilterPane = !this.showColumnFilterPane;
        }
        toggleChildPackages(e) {
            if (this.hiddenChildRows.has(e)) {
                let i = this.hiddenChildRows.get(e);
                this.hiddenChildRows.set(e, !i);
            } else this.hiddenChildRows.set(e, !1);
        }
        mapToStatusCode(e) {
            let i = "";
            return this.lookupDataService.getAllByGroup("packageStatus").subscribe(n => {
                let a = n.find(o => o.en.toLowerCase() === e.toLowerCase() || o.fr.toLowerCase() === e.toLowerCase());
                a && (i = a.code);
            }), i;
        }
        openGridSettings() {
            let e = this.getSortedColumns(this.columns, "header"),
                i = this.getFilteredColumns(e.length > 0 ? e : this.columns, !1);
            this.availableFields = i;
            let n = this.getSortedColumns(this.columns, "position"),
                a = this.getFilteredColumns(n.length > 0 ? n : this.columns, !0);
            this.selectedFields = a, this.showGridSettings = !0;
        }
        getSortedColumns(e, i) {
            return [...e].sort((n, a) => {
                if (n.field === xl.PACKAGEPIN) return -1;
                if (a.field === xl.PACKAGEPIN) return 1;
                let o = n[i],
                    s = a[i];
                return o === s ? 0 : o > s ? 1 : -1;
            });
        }
        dedupeByField(e) {
            let i = new Set(),
                n = [];
            for (let a of e) {
                let o = a ? .field;
                !o || i.has(o) || (i.add(o), n.push(a));
            }
            return n;
        }
        normalizeSelectedFields(e) {
            let i = e.map(n => this.columns.find(a => a.field === n.field) ? ? n);
            return this.dedupeByField(i);
        }
        applyPickListTarget(e) {
            this.selectedFields = this.normalizeSelectedFields(e), this.updateAvailableColumns(this.selectedFields), this.changeDetectorRef.markForCheck();
        }
        onPickListMoveToTarget(e) {
            this.isSelectedColumnDirty = !0;
            let i = Array.isArray(e ? .target) ? e.target : this.selectedFields,
                n = Array.isArray(e ? .items) ? e.items : [],
                a = new Set(n.map(s => s ? .field).filter(Boolean)),
                o = [...i.filter(s => !a.has(s ? .field)), ...n];
            this.selectedFields = this.normalizeSelectedFields(o), this.updateAvailableColumns(this.selectedFields), this.changeDetectorRef.markForCheck();
        }
        onPickListMoveToSource(e) {
            this.isSelectedColumnDirty = !0, this.selectedFields = this.normalizeSelectedFields(this.selectedFields), this.updateAvailableColumns(this.selectedFields), this.changeDetectorRef.markForCheck();
        }
        onPickListMoveAllToTarget(e) {
            this.isSelectedColumnDirty = !0;
            let i = Array.isArray(e ? .target) ? e.target : this.selectedFields;
            this.applyPickListTarget(i);
        }
        onPickListTargetReorder(e) {
            this.onPickListMoveAllToTarget(e);
        }
        getFilteredColumns(e, i) {
            return e.filter(({
                isAvailable: n,
                field: a,
                isDisplayed: o
            }) => n && o === i && a !== "packagepin");
        }
        closeGridSettings(e) {
            e && (this.updateColumns(), this.isSelectedColumnDirty && (this.showSaveTemplateModal = !0)), this.showGridSettings = !1;
        }
        updateColumns() {
            this.selectedFields = this.normalizeSelectedFields(this.selectedFields);
            let e = ["packagepin", "shipmentpin"];
            if (this.selectedFields.length === 0) this.hideAllColumnsExceptPackagePin();
            else {
                let i = this.selectedFields.map(n => n.field);
                e = e.concat(i.filter((n, a) => i.indexOf(n) === a)), this.updateDisplayedColumns(e);
            }
            this.apiService.datagridRefresh.next([...new Set(e)]), this.rebuildActiveDisplayedColumns(), this.rebuildGlobalFilterFields(), this.changeDetectorRef.markForCheck();
        }
        hideAllColumnsExceptPackagePin() {
            for (let e of this.columns) e.isDisplayed = e.field === "packagepin";
        }
        menuAddAlert() {
            this.showAddAlert = !0, this.pins = this.selectedRows.map(e => e.packagepin), this.ref = this.dialogService.open(s_, {
                contentStyle: {
                    overflow: "auto"
                },
                styleClass: "pur-dialog",
                baseZIndex: 1e4,
                data: {
                    isChange: !1,
                    isWatchlist: !1,
                    watchlistId: null,
                    watchlistName: null,
                    statuses: null,
                    substatuses: null,
                    deliveryMethod: null,
                    frequency: null,
                    pins: this.pins
                }
            }), this.ref.onClose.subscribe(() => {});
        }
        menuAddNewWatchlist() {
            this.showAddNewWatchlist = !0;
        }
        menuAddExistingWatchlist() {
            this.watchlistMenuSubject.next(!0), this.spinner.show("addToWatchlist"), this.userWatchlistResponse.subscribe(e => {
                if (this.user.userData.watchlists.length === 0) {
                    this.messageService.add({
                        severity: "error",
                        summary: "No shipment watch exists",
                        detail: "At least one shipment watch must exist.  Please create a new Shipment Watch instead."
                    }), this.spinner.hide("addToWatchlist"), this.watchlistMenuSubject.next(!1);
                    return;
                }
                this.watchlistNames = [];
                for (let i = 0; i < this.user.userData.watchlists.length; i++) this.user.userData.watchlists[i].isAlert || this.watchlistNames.push(this.user.userData.watchlists[i].watchlistName);
                this.spinner.hide("addToWatchlist");
            });
        }
        validateInput(e) {
            e ? .includes("'") || e ? .includes('"') ? this.invalidCharacterError = !0 : this.invalidCharacterError = !1;
        }
        applyNewWatchlist() {
            if (this.newWatchlistName === "") {
                this.messageService.add({
                    severity: "error",
                    summary: "No name provided",
                    detail: "A name is required to create a watchlist."
                }), this.showAddNewWatchlist = !1;
                return;
            }
            if (this.selectedRows.length === 0) {
                this.messageService.add({
                    severity: "error",
                    summary: "No rows selected",
                    detail: "Please select rows and try again."
                }), this.showAddNewWatchlist = !1;
                return;
            }
            this.userWatchlistResponse.subscribe(e => {
                for (let a = 0; a < this.user.userData.watchlists.length; a++)
                    if (this.user.userData.watchlists[a].watchlistName.toLowerCase() === this.newWatchlistName.toLowerCase() && !this.user.userData.watchlists[a].isAlert) {
                        this.messageService.add({
                            severity: "info",
                            summary: "A watchlist was found with that name.",
                            detail: "Adding shipments to existing watchlist"
                        }), this.showAddNewWatchlist = !1, this.addToExistingWatchlist(this.newWatchlistName);
                        return;
                    }
                let i = sx(),
                    n = {
                        watchlistId: i,
                        watchlistName: this.newWatchlistName,
                        userId: this.user.userData.id,
                        firstname: this.user.userData.firstName,
                        lastname: this.user.userData.lastName,
                        email: this.user.userData.email,
                        isAlert: !1,
                        packages: []
                    };
                for (let a = 0; a < this.selectedRows.length; a++) {
                    let o = {
                        watchlistId: i,
                        packagePin: this.selectedRows[a].packagepin
                    };
                    n.packages.push(o);
                }
                this.spinner.show("addNewWatchlist"), this.apiService.watchListPut(n).subscribe({
                    next: a => {
                        this.spinner.hide("addNewWatchlist"), this.user.userData.watchlists.push(n), this.messageService.add({
                            severity: "success",
                            summary: "Watchlist " + this.newWatchlistName + " created.",
                            detail: "" + this.selectedRows.length + " shipments added."
                        }), this.pTableRef != null && (this.selectedRows = []), this.selectedWatchlistName = "", this.newWatchlistName = "", this.showAddNewWatchlist = !1, this.showSelectWatchlist = !1;
                    },
                    error: a => {
                        console.log(a), this.spinner.hide("addNewWatchlist");
                    }
                });
            });
        }
        addToExistingWatchlist(e) {
            let i = 0,
                n = 0,
                a = e ? ? this.selectedWatchlistName;
            if (a === "") {
                this.messageService.add({
                    severity: "error",
                    summary: "No name provided",
                    detail: "A name is required to create a watchlist."
                }), this.showSelectWatchlist = !1;
                return;
            }
            if (this.selectedRows.length === 0) {
                this.messageService.add({
                    severity: "error",
                    summary: "No rows selected",
                    detail: "Please select rows and try again."
                }), this.showSelectWatchlist = !1;
                return;
            }
            for (let o = 0; o < this.user.userData.watchlists.length; o++)
                if (this.user.userData.watchlists[o].watchlistName.toLowerCase() === a.toLowerCase()) {
                    for (let s = 0; s < this.selectedRows.length; s++) {
                        let l = !1;
                        for (let c = 0; c < this.user.userData.watchlists[o].packages.length; c++)
                            if (this.user.userData.watchlists[o].packages[c].packagePin === this.selectedRows[s].packagepin) {
                                l = !0;
                                break;
                            }
                        if (l) n++;
                        else {
                            let c = {
                                watchlistId: this.user.userData.watchlists[o].watchlistId,
                                packagePin: this.selectedRows[s].packagepin,
                                lastEventDateTime: this.selectedRows[s].lasteventdatetime,
                                lastNotificationDateTime: this.selectedRows[s].lasteventdatetime
                            };
                            this.user.userData.watchlists[o].packages.push(c), i++;
                        }
                    }
                    this.spinner.show("addToWatchlist"), this.apiService.watchListPut(this.user.userData.watchlists[o]).subscribe({
                        next: s => {
                            this.spinner.hide("addToWatchlist"), n > 0 && this.messageService.add({
                                severity: "warn",
                                summary: "Items found in watchlist",
                                detail: "" + n + "shipment(s) had been added previously. "
                            }), i > 0 && this.messageService.add({
                                severity: "success",
                                summary: "Successfully added to watchlist",
                                detail: "" + i + " shipment(s) added. "
                            }), this.pTableRef != null && (this.selectedRows = []), this.selectedWatchlistName = "", this.newWatchlistName = "", this.showAddNewWatchlist = !1, this.showSelectWatchlist = !1;
                        },
                        error: s => {
                            console.log(s), this.spinner.hide("addToWatchlist");
                        }
                    });
                }
        }
        load(e, i, n = !1, a = "") {
            n && a && a.length > 0 && (this.isApiError = !0, this.errorMessage = a);
            let o = e.map(s => this.mapShipment(s));
            for (let s of o) s.children = [];
            this.buildLeadChildHierarchy(o), i ? this.dataForExport = o : (this.data = this.orderByInputPins(o), this.filteredData = []), !n || o.length > 0 ? this.isApiError = !1 : this.isApiError = !0, this.rebuildAllRows(), this.scheduleAriaInjection(), this.changeDetectorRef.markForCheck();
        }
        getColumnId(e, i) {
            return i.field;
        }
        getShipmentId(e, i) {
            return i.shipmentid;
        }
        rowTrackBy(e, i) {
            return i.shipmentid || i.packagepin || String(e);
        }
        rebuildActiveDisplayedColumns() {
            this.activeDisplayedColumns = this.columns.filter(e => e.isDisplayed && e.field !== "packagepin").sort((e, i) => e.position - i.position);
        }
        rebuildGlobalFilterFields() {
            let e = [];
            for (let i of this.columns) i.isDisplayed && e.push(i.field);
            this.globalFilterFields = e;
        }
        buildLeadChildHierarchy(e) {
            let i = new Map(),
                n = (a, o) => {
                    let s = a.lasteventdatetime,
                        l = o.lasteventdatetime;
                    return s && l ? s > l || !s ? 1 : s < l || !l ? -1 : 0 : 0;
                };
            for (let a of e)
                if (a.packagepin !== a.shipmentpin) {
                    a.isChildPin = !0;
                    let o = a.shipmentpin;
                    if (o) {
                        let s = i.get(o) ? ? [];
                        s.push(a), i.set(o, s);
                    }
                }
            i.forEach((a, o) => {
                a.sort(n);
                let s = e.find(l => l.packagepin === o);
                if (s) {
                    s.isLeadPin = !0, s.children = a;
                    for (let l of a)
                        if (s.packagestatuscode !== l.packagestatuscode) {
                            s.isStatusDifferent = !0;
                            break;
                        }
                }
            });
        }
        rebuildAllRows() {
            let e = this.filteredData && this.filteredData.length ? this.filteredData : this.data,
                i = [],
                n = this.isOnFilter;
            for (let a of e)
                if (!a.isChildPin && (i.push(a), !n && a.children && a.children.length && this.hiddenChildRows.get(a.shipmentpin) === !1))
                    for (let s of a.children) i.push(s);
            this.allRows = i, this.totalRecords = i.length, this.visibleRows = i;
        }
        scheduleAriaInjection() {
            this.ariaTimeoutId || !this.data ? .length || (this.ariaTimeoutId = window.setTimeout(() => {
                this.ngZone.runOutsideAngular(() => {
                    typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => this.injectAria()) : this.injectAria(), this.ariaTimeoutId = null;
                });
            }, 1e3));
        }
        mapShipment(e) {
            let i = new Ju();
            return i.shipmentcreated = e.shipmentcreated ? ? i.shipmentcreated, i.packageestimateddeliverydate = e.packageestimateddeliverydate ? ? i.packageestimateddeliverydate, i.statuscode = e.statuscode ? ? i.statuscode, i.packagepin = e.packagepin ? ? i.packagepin, i.shipmentpin = e.shipmentpin ? ? i.shipmentpin, i.piecetotalcount = e.piecetotalcount ? ? i.piecetotalcount, i.productcode = e.productcode ? ? i.productcode, i.receiverprovincestate = e.receiverprovincestate ? ? i.receiverprovincestate, i.receivercity = e.receivercity ? ? i.receivercity, i.receiverpostalzipcode = e.receiverpostalzipcode ? ? i.receiverpostalzipcode, i.receivername = e.receivername ? ? i.receivername, i.lasteventdatetime = e.lasteventdatetime ? ? i.lasteventdatetime, i.shipmenttype = e.shipmenttype ? ? i.shipmenttype, i.weightvalue = e.weightvalue ? ? i.weightvalue, i.shipperpostalzipcode = e.shipperpostalzipcode ? ? i.shipperpostalzipcode, i.shipperaccount = e.shipperaccount ? ? i.shipperaccount, i.shipmentid = e.shipmentid ? ? i.shipmentid, i.dataquality = e.dataquality ? ? i.dataquality, i.weightunit = e.weightunit ? ? i.weightunit, i.consolidatedshipmentpin = e.consolidatedshipmentpin ? ? i.consolidatedshipmentpin, i.note = e.note ? ? i.note, i.shippercompanyname = e.shippercompanyname ? ? i.shippercompanyname, i.shippername = e.shippername ? ? i.shippername, i.shipperstreetaddress1 = e.shipperstreetaddress1 ? ? i.shipperstreetaddress1, i.shipperstreetaddress2 = e.shipperstreetaddress2 ? ? i.shipperstreetaddress2, i.shipperstreetaddress3 = e.shipperstreetaddress3 ? ? i.shipperstreetaddress3, i.shippercity = e.shippercity ? ? i.shippercity, i.shipperprovincestate = e.shipperprovincestate ? ? i.shipperprovincestate, i.shippercountrycode = e.shippercountrycode ? ? i.shippercountrycode, i.receivercompanyname = e.receivercompanyname ? ? i.receivercompanyname, this.authService.isDashBoardViewAddress123Authorised() && (i.receiveraddress1 = e.receiveraddress1 ? ? i.receiveraddress1, i.receiveraddress2 = e.receiveraddress2 ? ? i.receiveraddress2, i.receiveraddress3 = e.receiveraddress3 ? ? i.receiveraddress3), i.receivercountrycode = e.receivercountrycode ? ? i.receivercountrycode, i.packagedeliveryname = e.packagedeliveryname ? ? i.packagedeliveryname, i.attentionreason = e.attentionreason ? ? i.attentionreason, i.packagedeliverydatetime = e.packagedeliverydatetime ? ? i.packagedeliverydatetime, i.returnshipment = e.returnshipment ? ? i.returnshipment, i.packagecreated = e.packagecreated ? ? i.packagecreated, i.packagereceived = e.packagereceived ? ? i.packagereceived, i.holdforpickuplocationid = e.holdforpickuplocationid ? "YES" : "NO", i.lasteventaddress1 = e.lasteventaddress1 ? ? i.lasteventaddress1, i.lasteventaddress2 = e.lasteventaddress2 ? ? i.lasteventaddress2, i.lasteventcity = e.lasteventcity ? ? i.lasteventcity, i.lasteventcode = e.lasteventcode ? ? i.lasteventcode, i.lasteventcountrycode = e.lasteventcountrycode ? ? i.lasteventcountrycode, i.lasteventlat = e.lasteventlat ? ? i.lasteventlat, i.lasteventlong = e.lasteventlong ? ? i.lasteventlong, i.lasteventpin = e.lasteventpin ? ? i.lasteventpin, i.lasteventpostalzipcode = e.lasteventpostalzipcode ? ? i.lasteventpostalzipcode, i.lasteventprovincestate = e.lasteventprovincestate ? ? i.lasteventprovincestate, i.lasteventreasoncode = e.lasteventreasoncode ? ? i.lasteventreasoncode, i.lasteventtimezone = e.lasteventtimezone ? ? i.lasteventtimezone, i.packagestatuscode = e.packagestatuscode ? ? i.packagestatuscode, i.packagestatussubcode = e.packagestatussubcode ? ? i.packagestatussubcode, i.packagestatuscodedisplayvalue = e.packagestatuscodedisplayvalue ? ? i.packagestatuscodedisplayvalue, i.packageweightdeclaredunit = e.packageweightdeclaredunit ? ? i.packageweightdeclaredunit, i.packageweightdeclaredvalue = e.packageweightdeclaredvalue ? ? i.packageweightdeclaredvalue, i.packageweightestimatedunit = e.packageweightestimatedunit ? ? i.packageweightestimatedunit, i.packageweightestimatedvalue = e.packageweightestimatedvalue ? ? i.packageweightestimatedvalue, i.lineofbusiness = e.lineofbusiness ? ? i.lineofbusiness, i.piecetotalcount = this.toNumber(i.piecetotalcount), i.weightvalue = this.toNumber(i.weightvalue), i.packageweightdeclaredvalue = this.toNumber(i.packageweightdeclaredvalue), i.packageweightestimatedvalue = this.toNumber(i.packageweightestimatedvalue), i.pchChainOfSignature = e.pchChainOfSignature ? ? e.pchChainOfSignature, i.pchDangerousGoods = e.pchDangerousGoods ? ? e.pchDangerousGoods, i.pchDeclaredValue = e.pchDeclaredValue ? ? e.pchDeclaredValue, i.pchDgClassification = e.pchDgClassification ? ? e.pchDgClassification, i.pchDgMode = e.pchDgMode ? ? e.pchDgMode, i.pchExpressCheque = e.pchExpressCheque ? ? e.pchExpressCheque, i.pchExpressChequeMop = e.pchExpressChequeMop ? ? e.pchExpressChequeMop, i.pchHealthcare = e.pchHealthcare ? ? e.pchHealthcare, i.pchHoldPickup = e.pchHoldPickup ? ? e.pchHoldPickup, i.pchOsnr = e.pchOsnr ? ? e.pchOsnr, i.pchResSigDom = e.pchResSigDom ? ? e.pchResSigDom, i.pchResSigIntl = e.pchResSigIntl ? ? e.pchResSigIntl, i.pchSaturdayDelivery = e.pchSaturdayDelivery ? ? e.pchSaturdayDelivery, i.pchSaturdayPickup = e.pchSaturdayPickup ? ? e.pchSaturdayPickup, i.pchSpecialHandling = e.pchSpecialHandling ? ? e.pchSpecialHandling, i.packagereferencevalue = e.packagereferencevalue ? ? e.packagereferencevalue, i.referencevalue1 = e.referencevalue1 ? ? e.referencevalue1, i.referencevalue2 = e.referencevalue2 ? ? e.referencevalue2, i.referencevalue3 = e.referencevalue3 ? ? e.referencevalue3, i.referencevalue4 = e.referencevalue4 ? ? e.referencevalue4, i.referencevalue5 = e.referencevalue5 ? ? e.referencevalue5, i.lastScanEventReasonCode = e.lastScanEventReasonCode ? ? e.lastScanEventReasonCode, i.pickupDate = e.pickupDate ? ? e.pickupDate, i.pickupTime = e.pickupTime ? ? e.pickupTime, i.terminalname = e.terminalname ? ? e.terminalname, i.payeraccount = e.payeraccount ? ? e.payeraccount, i.xreference = e.xreference ? ? e.xreference, i;
        }
        toNumber(e) {
            return isNaN(+e) ? 0 : +e;
        }
        reportData() {
            let e = this.orderByInputPins(this.dataForExport),
                i = this.columns.filter(a => a.isDisplayed || a.field === "packagepin").sort((a, o) => a.position > o.position ? 1 : -1);
            return e.map(a => {
                let o = {};
                return i.forEach(s => {
                    o[s.field] = a[s.field];
                }), o;
            });
        }
        getColumnFieldsAndHeaders() {
            let e = this.getSortedColumns(this.columns.filter(a => a.isDisplayed || a.field === "packagepin"), "position"),
                i = e.map(a => a.header),
                n = e.map(a => a.field);
            return {
                headers: i,
                fields: n
            };
        }
        orderByInputPins(e) {
            let i = this.user ? .userData ? .view ? .signature ? .pins;
            if (!Array.isArray(i) || i.length === 0) return e;
            let n = new Map(e.map(o => [o.packagepin, o]));
            return i.map(o => n.get(o) || new Ju(o));
        }
        setDefaultSortField(e = "") {
            this.defaultSortField = e;
        }
        restrictSpecialCharacters(e) {
            let i = /[^~|*<>^{}\\/]/g,
                n = String.fromCharCode(e.charCode);
            this.columnLayoutName && this.columnLayoutName.length >= 30 && e.preventDefault(), i.test(n) ? (this.titleInvalidCharacters = !1, this.duplicateTemplateTitleError = !1) : (this.titleInvalidCharacters = !0, e.preventDefault());
        }
        pasteHandler(e) {
            e.preventDefault();
            let n = (e.clipboardData || window.Clipboard).getData("text") + " ";
            if (!/[~|*<>^{}\\/]/g.test(n)) {
                let o = e.target,
                    s = o.value.substring(0, o.selectionStart || 0),
                    l = o.value.substring(o.selectionEnd || 0),
                    c = s + n + l;
                c && c.trim().length >= 30 && (c = c.substring(0, 30)), o.value = c.trimEnd();
                let u = s.length + n.length;
                o.selectionStart = u, o.selectionEnd = u, this.columnLayoutName = c;
            }
        }
        getSavedColumnData() {
            this.apiService.savedColumnLayoutGet({
                userId: this.user.userData.id,
                type: Yu.DASHBOARD
            }).subscribe(e => {
                if (e ? .payload) {
                    let i = e.payload;
                    i.forEach(n => {
                        if (n.type) {
                            let a = n.type.indexOf("|");
                            n.reportType = n.type, a !== -1 && (n.type = n.type.substring(0, n.type.indexOf("|")));
                        }
                    }), this.templates = i.filter(n => n.type === Yu.DASHBOARD);
                }
            });
        }
        duplicateTitleChecker() {
            let e = !1;
            return e = this.templates.some(n => n.title ? .trim().toLocaleUpperCase() === this.columnLayoutName ? .trim().toLocaleUpperCase() && n.type === Yu.DASHBOARD), e ? (this.duplicateTemplateTitleError = !0, !0) : (this.duplicateTemplateTitleError = !1, !1);
        }
        saveOrUpdateColumnLayout() {
            if (!this.columnLayoutName ? .trim()) {
                this.showErrorMessage = !0;
                return;
            }
            if (this.duplicateTitleChecker()) return;
            let i = this.selectedFields.map(a => a.field),
                n = {
                    userId: this.user.userData.id,
                    creationDate: this.transformDate(new Date(), "yyyy-MM-dd"),
                    title: this.columnLayoutName.trim(),
                    type: Yu.DASHBOARD,
                    columns: i
                };
            this.isSavingColumnLayout = !0, this.changeDetectorRef.markForCheck(), this.spinner.show("reportLoadingSpinner"), this.apiService.saveUpdateFinalColumnLayout(n).pipe(H2(() => {
                this.isSavingColumnLayout = !1, this.spinner.hide("reportLoadingSpinner"), this.changeDetectorRef.markForCheck();
            })).subscribe(a => {
                this.messageService.add({
                    severity: "success",
                    summary: "success",
                    detail: "Column layout created successfully.",
                    life: 3e3
                }), this.showTemplateAddModal = !1, this.columnLayoutName = "", this.getSavedColumnData();
            }, a => {
                if (this.showSaveTemplateModal = !1, a ? .error ? .payload ? .includes(zx)) {
                    this.summaryText = "Templates are at Capacity.", this.detailText = "You have reached the maximum number of templates created. Please delete a template to free up space.", this.displayCapacityModal = !0;
                    return;
                }
                let o = this.errorMessages.summary,
                    s = this.errorMessages.detail;
                this.messageService.add({
                    severity: "error",
                    summary: o,
                    detail: s
                }), this.selectedTemplate = "";
            });
        }
        transformDate(e, i = "yyyy-MM-dd") {
            let n = e.getTimezoneOffset();
            return e = new Date(e.getTime() - n * 60 * 1e3), $2(e, i, this.localeService.getLocaleId());
        }
        updateColumnList() {
            let e = this.templates.find(n => n.templateId === this.templateId);
            if (!e) return;
            let i = e.columns.map(n => this.columns.find(a => a.field === n)).filter(n => n !== void 0);
            i.length > 0 && (this.selectedFields = i, this.columnLayoutName = e.title, this.updateAvailableColumns(this.selectedFields), this.updateColumns());
        }
        updateDisplayedColumns(e = []) {
            e.length === 0 && (e = this.selectedFields.map(i => i.field)), this.columns.forEach(i => {
                let n = this.selectedFields.find(a => a.field === i.field);
                i.isDisplayed = !!n || i.field === "packagepin", n && (i.position = this.selectedFields.indexOf(n) + 1);
            }), this.apiService.datagridRefresh.next([...new Set(e)]), this.rebuildActiveDisplayedColumns(), this.rebuildGlobalFilterFields(), this.changeDetectorRef.markForCheck();
        }
        updateAvailableColumns(e) {
            let i = Array.isArray(e) ? e : [],
                n = new Set(i.map(o => o ? .field).filter(Boolean)),
                a = this.columns.filter(o => o.isAvailable && o.field !== "packagepin" && !n.has(o.field));
            this.availableFields = this.getSortedColumns(a, "header");
        }
        useSaveColumnLayout(e) {
            this.templateId = e.value, this.savedDialogDetailText = "We\u2019ve noticed you made changes to the standard column layout, would you like to save it? The new changes will replace existing saved layouts in your reporting dashboard.", this.templateId && this.updateColumnList();
        }
        static {
            this.ɵfac = function(i) {
                return new(i || t)(li(fd), li(yd), li(Nd), li(y0), li(md), li(Pd), li(hd), li(Id), li(h_), li(Od), li(gd), li(od));
            };
        }
        static {
            this.ɵcmp = Sn({
                type: t,
                selectors: [
                    ["app-datagrid"]
                ],
                viewQuery: function(i, n) {
                    if (i & 1 && Oi(XM, 5), i & 2) {
                        let a;
                        Nt(a = Lt()) && (n.pTableRef = a.first);
                    }
                },
                features: [Yo([yd, Nd])],
                decls: 70,
                vars: 70,
                consts: () => {
                    let e;
                    e = "Select from saved column layouts";
                    let i;
                    i = "Manage Columns";
                    let n;
                    n = "Available Columns";
                    let a;
                    a = "Displayed Columns";
                    let o;
                    o = "Search Columns";
                    let s;
                    s = "Search Columns";
                    let l;
                    l = "Would you like to save your column layout?";
                    let c;
                    c = "Save as Column Layout";
                    let u;
                    u = "Select Shipment Watch";
                    let h;
                    h = "Shipments Table View";
                    let d;
                    d = "Select the columns you'd like to see in this chart";
                    let f;
                    f = " To Save the Column Layout for future use, please enter a unique name:";
                    let m;
                    m = "Column Layout Name";
                    let _;
                    _ = " Shipment Watch Name ";
                    let x;
                    x = "*Invalid Characters";
                    let g;
                    g = " Shipment Watch Name ";
                    let b;
                    b = "Add to New Shipment Watch";
                    let w;
                    w = "Add to Existing Shipment Watch";
                    let T;
                    T = "Create Notification";
                    let E;
                    E = "Search";
                    let L;
                    L = " Show Shipment Search ";
                    let P;
                    P = " Hide Shipment Search ";
                    let k;
                    k = "Search shipments";
                    let A;
                    A = "Filter";
                    let N;
                    N = " Show Column Filters ";
                    let C;
                    C = " Hide Column Filters ";
                    let F;
                    F = "Export";
                    let W;
                    W = "Export";
                    let I;
                    I = "Manage Columns";
                    let U;
                    U = " Update Shipments Table Settings ";
                    let le;
                    le = "Activate to sort";
                    let H;
                    H = "Activate to sort in descending order";
                    let pe;
                    pe = "Activate to sort in ascending order";
                    let _e;
                    _e = "Piece Pin";
                    let Fe;
                    Fe = "Activate to sort";
                    let Te;
                    Te = "Activate to sort in descending order";
                    let O;
                    O = "Activate to sort in ascending order";
                    let j;
                    j = " Update Settings ";
                    let X;
                    X = "No, Continue";
                    let me;
                    me = "Yes, Save Layout";
                    let xe;
                    xe = "Column Layout Name is required.";
                    let be;
                    be = " Name already exists, please provide a unique column layout name. ";
                    let B;
                    B = "Back";
                    let ne;
                    ne = "Save Layout";
                    let Z;
                    Z = " Create Shipment Watch ";
                    let J;
                    return J = " Add to Shipment Watch ", [
                        ["cm", ""],
                        ["exportMenu", ""],
                        ["pTable", ""],
                        ["row", ""],
                        ["footer", ""],
                        ["toggleChildren", ""],
                        ["fieldValue", ""], h, d, f, m, _, x, g, b, w, T, E, L, P, A, N, C, F, W, I, U, _e, j, X, me, xe, be, B, ne, Z, J, [1, "pur-contextmenu", 3, "model"],
                        [1, "shipments__header"],
                        [1, "shipments__heading__wrapper"],
                        ["class", "pin-warning-area", 4, "ngIf"],
                        [1, "table-settings"],
                        [1, "shipments__count"],
                        ["class", "shipments_watchlist", 4, "ngIf"],
                        [1, "shipments__actions"],
                        [1, "shipments__search-wrapper"],
                        ["type", "button", "class", "pur-button pur-button--lg pur-button--nolink pur-button--icon-magnifying-glass", 3, "click", 4, "ngIf"],
                        ["class", "shipments__search", 4, "ngIf"],
                        ["type", "button", "class", "pur-button pur-button--lg pur-button--nolink", 3, "ngClass", "click", 4, "ngIf"],
                        ["type", "button", "class", "pur-button pur-button--lg pur-button--nolink pur-button--icon-export", 3, "click", 4, "ngIf"],
                        [3, "popup", "model"],
                        ["type", "button", "class", "pur-button pur-button--lg pur-button--nolink pur-button--icon-sliders", 3, "click", 4, "ngIf"],
                        ["placeholder", e, "optionLabel", "title", "optionValue", "templateId", 1, "select-template", "report-dropdown", 3, "ngModelChange", "onChange", "options", "ngModel", "ngModelOptions"],
                        ["scrollHeight", "65vh", "columnResizeMode", "expand", "responsiveLayout", "scroll", "selectionMode", "multiple", "dataKey", "packagepin", 1, "pur-datatable", 3, "selectionChange", "contextMenuSelectionChange", "onFilter", "value", "scrollable", "virtualScroll", "virtualScrollItemSize", "rowTrackBy", "resizableColumns", "autoLayout", "selection", "contextMenu", "contextMenuSelection", "globalFilterFields", "sortField", "sortOrder"],
                        ["pTemplate", "header"],
                        [4, "ngIf"],
                        ["role", "dialog", "header", i, "styleClass", "columnDialogHeader", "closeAriaLabel", "close", 1, "pur-dialog", 3, "visibleChange", "visible", "modal", "draggable", "resizable", "closable"],
                        [1, "columnDialogHeader"],
                        ["sourceHeader", n, "targetHeader", a, "autofocus", "", "filterBy", "header", "sourceFilterPlaceholder", o, "targetFilterPlaceholder", s, "topButtonAriaLabel", "move selected to top", "upButtonAriaLabel", "move selected up one", "downButtonAriaLabe", "move selected down one", "bottomButtonAriaLabel", "move selected to bottom", "rightButtonAriaLabel", "add to selected", "allRightButtonAriaLabel", "add all to selected", "leftButtonAriaLabel", "move to unselected", "allLeftButtonAriaLabel", "move all to unselected", 1, "pur-picklist", 3, "onMoveToTarget", "onMoveToSource", "onMoveAllToTarget", "onTargetReorder", "source", "target", "tabIndex", "dragdrop", "showSourceControls", "showTargetControls"],
                        ["pTemplate", "item"],
                        ["pTemplate", "footer"],
                        ["id", "save-dailog-confirm", 1, "delete-dailog"],
                        ["header", l, 1, "pur-dialog", 3, "visibleChange", "visible", "modal"],
                        [1, "model-body", "text-left", "modal-sub-heading"],
                        ["id", "save-dailog", 1, "delete-dailog"],
                        ["header", c, 1, "pur-dialog", 3, "visibleChange", "visible", "modal"],
                        [1, "Layout-field"],
                        ["for", "title", 1, "control-label"],
                        ["pInputText", "", "type", "text", "autofocus", "", 1, "form-input", 3, "ngModelChange", "keypress", "paste", "ngModel", "ngModelOptions"],
                        ["class", "p-error block error-message", 4, "ngIf"],
                        ["role", "dialog", "closeAriaLabel", "close", 1, "pur-dialog", 3, "visibleChange", "header", "visible", "modal", "draggable", "resizable", "closable"],
                        ["type", "ball-spin-clockwise", "name", "addNewWatchlist"],
                        [1, "pur-form-field"],
                        ["for", "newWatchlistName"],
                        [2, "color", "#eb0000", "padding-bottom", "0", "margin-bottom", "0", 3, "hidden"],
                        ["id", "newWatchListName", "type", "text", "autofocus", "", 1, "pur-control", 3, "ngModelChange", "ngModel", "ngModelOptions"],
                        ["role", "dialog", "header", u, "closeAriaLabel", "close", 1, "pur-dialog", 3, "visibleChange", "visible", "modal", "draggable", "resizable", "closable", "contentStyle"],
                        ["type", "ball-spin-clockwise", "name", "addToWatchlist"],
                        [3, "ngModelChange", "options", "ngModel", "ngModelOptions"],
                        [1, "pin-warning-area"],
                        ["id", "pin-warning-text"],
                        [1, "shipments_watchlist"],
                        [1, "shipments__watchlist-wrapper"],
                        [1, "watchList-button", 3, "click", "hidden"],
                        ["type", "button", 1, "pur-button", "pur-button--lg", "pur-button--nolink", "pur-button--icon-magnifying-glass", 3, "click"],
                        ["class", "sr-only", 4, "ngIf"],
                        [1, "button_label"],
                        [1, "sr-only"],
                        [1, "shipments__search"],
                        ["type", "search", "placeholder", k, 1, "pur-control", "pur-control--sm", 3, "input", "ngModelChange", "ngModel", "ngModelOptions"],
                        ["type", "button", 1, "pur-button", "pur-button--lg", "pur-button--nolink", 3, "click", "ngClass"],
                        ["type", "button", 1, "pur-button", "pur-button--lg", "pur-button--nolink", "pur-button--icon-export", 3, "click"],
                        ["type", "button", 1, "pur-button", "pur-button--lg", "pur-button--nolink", "pur-button--icon-sliders", 3, "click"],
                        [1, "checkbox_column"],
                        ["aria-label", "select all shipments", "ariaLabel", "select all shipments"],
                        ["pSortableColumn", "packagepin", "pResizableColumn", ""],
                        ["field", "packagepin", "ariaLabel", le, "ariaLabelDesc", H, "ariaLabelAsc", pe],
                        ["pResizableColumn", "", "scope", "col", 3, "pSortableColumn", 4, "ngFor", "ngForOf", "ngForTrackBy"],
                        ["pResizableColumn", "", "scope", "col", 3, "pSortableColumn"],
                        ["ariaLabel", Fe, "ariaLabelDesc", Te, "ariaLabelAsc", O, 3, "field"],
                        [1, "justify-content-center"],
                        ["type", "text", "field", "packagepin", "display", "menu"],
                        ["class", "justify-content-center", 4, "ngFor", "ngForOf", "ngForTrackBy"],
                        ["type", "text", "display", "menu", "aria-label", "filter pane toggle", 3, "field"],
                        ["pTemplate", "body"],
                        [1, "shipments__row", 3, "pContextMenuRow"],
                        [1, "pur-checkbox", 3, "value"],
                        [4, "ngTemplateOutlet", "ngTemplateOutletContext"],
                        [4, "ngFor", "ngForOf", "ngForTrackBy"],
                        ["class", "shipments__row shipments__row--child", 4, "ngIf"],
                        [1, "shipments__row", "shipments__row--child"],
                        [1, "shipments__pin-cell", 3, "ngClass"],
                        ["target", "_blank", 3, "href"],
                        ["class", "shipments__pin-expander pur-button pur-button--link pur-button--icon-chevron-right", "type", "button", 3, "click", 4, "ngIf"],
                        ["type", "button", 1, "shipments__pin-expander", "pur-button", "pur-button--link", "pur-button--icon-chevron-right", 3, "click"],
                        [4, "ngIf", "ngIfElse"],
                        ["aria-label", "update settings", "type", "button", 1, "pur-button", "pur-button--dark", 3, "click"],
                        [1, "pur-form", "pur-form--inline", "layout-footer"],
                        ["type", "button", "pButton", "", 1, "pur-button", "pur-button--sm", "pur-button--outline", "custom-button", 3, "click"],
                        ["type", "button", "pButton", "", 1, "pur-button", "pur-button--sm", 3, "click", "disabled"],
                        [1, "p-error", "block", "error-message"],
                        ["type", "button", 1, "pur-button", "pur-button--dark", 3, "click", "disabled"],
                        ["type", "button", 1, "pur-button", "pur-button--dark", 3, "click"]
                    ];
                },
                template: function(i, n) {
                    if (i & 1) {
                        let a = or();
                        St(0, "p-toast")(1, "p-contextMenu", 37, 0), ge(3, "header", 38)(4, "div", 39)(5, "h2", 39), Xt(6), dt(7, 7), Kt(), ve(), Oe(8, YM, 3, 1, "div", 40), ve(), ge(9, "div", 41), St(10, "div", 42), Oe(11, ZM, 11, 3, "div", 43), ge(12, "div", 44)(13, "span", 45), Oe(14, $M, 5, 3, "button", 46)(15, e9, 2, 3, "span", 47), ve(), Oe(16, i9, 5, 4, "button", 48)(17, n9, 5, 0, "button", 49), St(18, "p-menu", 50, 1), Oe(20, a9, 5, 0, "button", 51), ve(), ge(21, "p-select", 52), Tr("ngModelChange", function(s) {
                            return Ce(a), Sr(n.selectedTemplate, s) || (n.selectedTemplate = s), Ae(s);
                        }), nt("onChange", function(s) {
                            return Ce(a), Ae(n.useSaveColumnLayout(s));
                        }), ve()()(), ge(22, "p-table", 53, 2), Tr("selectionChange", function(s) {
                            return Ce(a), Sr(n.selectedRows, s) || (n.selectedRows = s), Ae(s);
                        })("contextMenuSelectionChange", function(s) {
                            return Ce(a), Sr(n.cmSelection, s) || (n.cmSelection = s), Ae(s);
                        }), nt("onFilter", function(s) {
                            return Ce(a), Ae(n.onFilter(s));
                        }), Oe(24, c9, 9, 3, "ng-template", 54)(25, m9, 1, 0, null, 55), ve(), Oe(26, y9, 6, 7, "ng-template", null, 3, hi), ge(28, "p-dialog", 56), Tr("visibleChange", function(s) {
                            return Ce(a), Sr(n.showGridSettings, s) || (n.showGridSettings = s), Ae(s);
                        }), ge(29, "p", 57), dt(30, 8), ve(), St(31, "p-divider"), ge(32, "div")(33, "p-pickList", 58), nt("onMoveToTarget", function(s) {
                            return Ce(a), Ae(n.onPickListMoveToTarget(s));
                        })("onMoveToSource", function(s) {
                            return Ce(a), Ae(n.onPickListMoveToSource(s));
                        })("onMoveAllToTarget", function(s) {
                            return Ce(a), Ae(n.onPickListMoveAllToTarget(s));
                        })("onTargetReorder", function(s) {
                            return Ce(a), Ae(n.onPickListTargetReorder(s));
                        }), Oe(34, b9, 3, 1, "ng-template", 59), ve()(), Oe(35, w9, 2, 0, "ng-template", 60), ve(), ge(36, "div", 61)(37, "p-dialog", 62), Tr("visibleChange", function(s) {
                            return Ce(a), Sr(n.showSaveTemplateModal, s) || (n.showSaveTemplateModal = s), Ae(s);
                        }), ge(38, "p", 63), cr(39), ve(), Oe(40, S9, 5, 1, "ng-template", null, 4, hi), ve()(), ge(42, "div", 64)(43, "p-dialog", 65), Tr("visibleChange", function(s) {
                            return Ce(a), Sr(n.showTemplateAddModal, s) || (n.showTemplateAddModal = s), Ae(s);
                        }), ge(44, "p", 63), dt(45, 9), ve(), ge(46, "div", 66)(47, "label", 67), dt(48, 10), ve(), ge(49, "input", 68), Tr("ngModelChange", function(s) {
                            return Ce(a), Sr(n.columnLayoutName, s) || (n.columnLayoutName = s), Ae(s);
                        }), nt("keypress", function(s) {
                            return Ce(a), Ae(n.restrictSpecialCharacters(s));
                        })("paste", function(s) {
                            return Ce(a), Ae(n.pasteHandler(s));
                        }), ve(), Oe(50, C9, 2, 0, "p", 69)(51, A9, 2, 0, "p", 69), ve(), Oe(52, T9, 5, 1, "ng-template", null, 4, hi), ve()(), ge(54, "p-dialog", 70), Tr("visibleChange", function(s) {
                            return Ce(a), Sr(n.showAddNewWatchlist, s) || (n.showAddNewWatchlist = s), Ae(s);
                        }), St(55, "ngx-spinner", 71), ge(56, "div", 72)(57, "label", 73), dt(58, 11), ve(), ge(59, "p", 74), dt(60, 12), ve(), ge(61, "input", 75), nt("ngModelChange", function(s) {
                            return Ce(a), Ae(n.validateInput(s));
                        }), Tr("ngModelChange", function(s) {
                            return Ce(a), Sr(n.newWatchlistName, s) || (n.newWatchlistName = s), Ae(s);
                        }), ve()(), Oe(62, D9, 2, 1, "ng-template", 60), ve(), ge(63, "p-dialog", 76), Tr("visibleChange", function(s) {
                            return Ce(a), Sr(n.showSelectWatchlist, s) || (n.showSelectWatchlist = s), Ae(s);
                        }), St(64, "ngx-spinner", 77), ge(65, "div", 72)(66, "label", 73), dt(67, 13), ve(), ge(68, "p-select", 78), Tr("ngModelChange", function(s) {
                            return Ce(a), Sr(n.selectedWatchlistName, s) || (n.selectedWatchlistName = s), Ae(s);
                        }), ve()(), Oe(69, k9, 2, 0, "ng-template", 60), ve();
                    }
                    if (i & 2) {
                        let a = Br(2);
                        oe(), Q("model", n.menuItems), oe(7), Q("ngIf", n.isApiError), oe(3), Q("ngIf", n.authService.isWatchListAuthorized()), oe(3), Q("ngIf", n.authService.isDashBoardTableViewSearchAuthorised()), oe(), Q("ngIf", n.showGlobalFilterPane), oe(), Q("ngIf", n.authService.isDashBoardTableViewFiltersAuthorised()), oe(), Q("ngIf", n.authService.isDashBoardExportAuthorised()), oe(), Q("popup", !0)("model", n.exportItems), oe(2), Q("ngIf", n.authService.isDashBoardManageColumnViewAuthorised()), oe(), Q("options", n.templates), wr("ngModel", n.selectedTemplate), Q("ngModelOptions", vr(65, Dh)), oe(), Q("value", n.visibleRows)("scrollable", !0)("virtualScroll", !0)("virtualScrollItemSize", n.virtualRowHeight)("rowTrackBy", n.rowTrackBy)("resizableColumns", !0)("autoLayout", !0), wr("selection", n.selectedRows), Q("contextMenu", a), wr("contextMenuSelection", n.cmSelection), Q("globalFilterFields", n.globalFilterFields)("sortField", n.defaultSortField)("sortOrder", -1), oe(3), Q("ngIf", !n.isApiError), oe(3), wr("visible", n.showGridSettings), Q("modal", !0)("draggable", !1)("resizable", !1)("closable", !0), oe(5), Q("source", n.availableFields)("target", n.selectedFields)("tabIndex", 0)("dragdrop", !0)("showSourceControls", !0)("showTargetControls", !0), oe(4), wr("visible", n.showSaveTemplateModal), Q("modal", !0), oe(2), Wi(n.savedDialogDetailText), oe(4), wr("visible", n.showTemplateAddModal), Q("modal", !0), oe(6), wr("ngModel", n.columnLayoutName), Q("ngModelOptions", vr(66, Dh)), oe(), Q("ngIf", n.showErrorMessage && !n.columnLayoutName), oe(), Q("ngIf", n.duplicateTemplateTitleError && n.columnLayoutName), oe(3), Q("header", n.newWatchlistHeader), wr("visible", n.showAddNewWatchlist), Q("modal", !0)("draggable", !1)("resizable", !1)("closable", !0), oe(5), Q("hidden", !n.invalidCharacterError), oe(2), wr("ngModel", n.newWatchlistName), Q("ngModelOptions", vr(67, Dh)), oe(2), wr("visible", n.showSelectWatchlist), Q("modal", !0)("draggable", !1)("resizable", !0)("closable", !0)("contentStyle", vr(68, KM)), oe(5), Q("options", n.watchlistNames), wr("ngModel", n.selectedWatchlistName), Q("ngModelOptions", vr(69, Dh));
                    }
                },
                dependencies: [ha, Wa, vl, Eo, Jo, bl, vd, _l, yl, Xx, qx, bd, es, T_, Bd, Yx, Kx, Dd, Td, Rd, Ld, Jx, $x, t_, Qx, r_, i_, n_, Px, Cd, kd, b0, Ad, Ed, Fd, pd, dd, V4, Gv, Z4, Zv],
                styles: [`[_ngcontent-%COMP%]:root{--pur-xxs: .5rem;--pur-xs: 1rem;--pur-sm: 1.5rem;--pur-md: 2rem;--pur-lg: 3rem;--pur-xl: 4rem;--pur-xxl: 6rem;--pur-breakpoint-xxs: 23.4375rem;--pur-breakpoint-xs: 50rem;--pur-breakpoint-sm: 67.5rem;--pur-breakpoint-md: 80rem;--pur-breakpoint-lg: 90rem;--pur-breakpoint-xl: 100rem;--pur-breakpoint-xxl: 120rem;--pur-breakpoint-xxxl: 160rem;--pur-sidebar-width: 13.1875rem;--pur-max-width: var(--pur-breakpoint-xxxl);--pur-gap: var(--pur-sm);--pur-gap-xs: var(--pur-xs);--pur-primary-red: #f00000;--pur-primary-blue: #001996;--pur-secondary-blue: #00a9ce;--pur-secondary-blue-darker: #00819e;--pur-secondary-orange: #ffa300;--pur-secondary-yellow: #fbdd40;--pur-secondary-green: #64a70b;--pur-secondary-magenta: #c800a1;--pur-secondary-grey-light: #a2aaad;--pur-secondary-grey-dark: #000;--pur-web-yellow: #f8c81e;--pur-web-green: #61A30A;--pur-web-grey-lighter: #f5f6f6;--pur-web-grey-light: #d3d3d3;--pur-web-grey: #c0c0c0;--pur-web-grey-dark: #495057;--pur-text-light: #fff;--pur-text-dark: #111;--pur-blue-magenta: #53525a;--pur-link: #001996;--pur-link-hover: #0a38e6;--pur-light-blue: #1d4ed8;--pur-alice-blue: #eff6ff;--pur-canvas: #ededed;--pur-backdrop: #303136;--pur-danger: #eb0000;--pur-Pattens-Blue: #dee2e6;--pur-webtoolkit-lightgrey-disabled: rgb(229, 229, 229);--pur-webtoolkit-darkgrey: rgb(73, 80, 87);--pur-webtoolkit-textcolour: rgb(17, 17, 17);--pur-webtoolkit-dropdown-filled: rgb(233, 233, 233);--pur-webtext-lightgreycolour1: rgb(245, 245, 245);--pur-secondary-black-shadow: rgba(0, 0, 0, .25);--pur-dropdown-header: rgb(248, 249, 250);--pur-font-mobile-xxs: .875rem;--pur-font-mobile-xs: 1rem;--pur-font-mobile-sm: 1.125rem;--pur-font-mobile-md: 1.25rem;--pur-font-mobile-lg: 1.625rem;--pur-font-mobile-xl: 1.875rem;--pur-font-mobile-xxl: 2.5rem;--pur-font-desktop-xxs: .875rem;--pur-font-desktop-xs: 1rem;--pur-font-desktop-sm: 1.25rem;--pur-font-desktop-md: 1.5rem;--pur-font-desktop-lg: 1.75rem;--pur-font-desktop-xl: 2rem;--pur-font-desktop-xxl: 2.5rem;--pur-line-mobile-xxs: 1.5rem;--pur-line-mobile-xs: 1.5rem;--pur-line-mobile-sm: 1.75rem;--pur-line-mobile-md: 1.75rem;--pur-line-mobile-lg: 2.5rem;--pur-line-mobile-xl: 2.5rem;--pur-line-mobile-xxl: 2.5rem;--pur-line-desktop-xxs: 1.5rem;--pur-line-desktop-xs: 1.5rem;--pur-line-desktop-sm: 1.5625rem;--pur-line-desktop-md: 2rem;--pur-line-desktop-lg: 3.5rem;--pur-line-desktop-xl: 3.75rem;--pur-line-desktop-xxl: 4.125rem;--pur-font-normal: 400;--pur-font-semibold: 600;--pur-font-body-family: "Open Sans", Arial, Helvetica, sans-serif;--pur-font-h1: var(--pur-font-normal) var(--pur-font-mobile-xxl)/var(--pur-line-mobile-xxl) var(--pur-font-body-family);--pur-font-h2: var(--pur-font-normal) var(--pur-font-mobile-xl)/var(--pur-line-mobile-xl) var(--pur-font-body-family);--pur-font-h3: var(--pur-font-normal) var(--pur-font-mobile-lg)/var(--pur-line-mobile-lg) var(--pur-font-body-family);--pur-font-h4: var(--pur-font-normal) var(--pur-font-mobile-md)/var(--pur-line-mobile-md) var(--pur-font-body-family);--pur-font-h5: var(--pur-font-normal) var(--pur-font-mobile-sm)/var(--pur-line-mobile-sm) var(--pur-font-body-family);--pur-font-body: var(--pur-font-normal) var(--pur-font-mobile-xs)/var(--pur-line-mobile-xs) var(--pur-font-body-family);--pur-font-legal: var(--pur-font-normal) var(--pur-font-mobile-xxs)/var(--pur-line-mobile-xxs) var(--pur-font-body-family);--pur-border-xxs: 1px;--pur-border-xs: 2px;--pur-border-md: .25rem;--pur-radius-sm: .25rem;--pur-radius-md: .625rem;--pur-shadow-md: drop-shadow(4px 4px 12px rgba(0, 0, 0, .16));--pur-duration: .15s;--pur-timing: ease-out;--pur-grey-high-dark: #757575;--pur-light-blue-bg:#00A2C7;--pur-p-chips-textcolor:#2C2C30;--pur-setting-editbutton:#5B6062;--pur-setting-openbutton:#056EC7;--pur-setting-deletebutton:#c01120;--pur-white:#FFFFFF;--pur-field-bordercolor:#919191}@media (min-width: 67.5rem){[_ngcontent-%COMP%]:root{--pur-font-h1: var(--pur-font-normal) var(--pur-font-desktop-xxl)/var(--pur-line-desktop-xxl) var(--pur-font-body-family);--pur-font-h2: var(--pur-font-normal) var(--pur-font-desktop-xl)/var(--pur-line-desktop-xl) var(--pur-font-body-family);--pur-font-h3: var(--pur-font-normal) var(--pur-font-desktop-lg)/var(--pur-line-desktop-lg) var(--pur-font-body-family);--pur-font-h4: var(--pur-font-normal) var(--pur-font-desktop-md)/var(--pur-line-desktop-md) var(--pur-font-body-family);--pur-font-h5: var(--pur-font-normal) var(--pur-font-desktop-sm)/var(--pur-line-desktop-sm) var(--pur-font-body-family);--pur-font-body: var(--pur-font-normal) var(--pur-font-desktop-xs)/var(--pur-line-desktop-xs) var(--pur-font-body-family);--pur-font-legal: var(--pur-font-normal) var(--pur-font-desktop-xxs)/var(--pur-line-desktop-xxs) var(--pur-font-body-family)}}.shipments__header[_ngcontent-%COMP%]{display:grid;grid-template-areas:"heading" "count" "watchlist" "actions";grid-template-columns:1fr;gap:var(--pur-xxs);align-items:center;margin-block-end:var(--pur-gap)}@media (min-width: 50rem){.shipments__header[_ngcontent-%COMP%]{grid-template-areas:"heading heading" "count watchlist actions";grid-template-columns:1fr min-content}}@media (min-width: 67.5rem){.shipments__header[_ngcontent-%COMP%]{grid-template-areas:"heading count watchlist actions ";grid-template-columns:1fr min-content min-content;gap:var(--pur-gap)}}.shipments__header[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%], .shipments__header[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin-block-end:0}.shipments__heading[_ngcontent-%COMP%]{grid-area:heading}.shipments__count[_ngcontent-%COMP%]{grid-area:count;white-space:nowrap}.shipments__actions[_ngcontent-%COMP%]{display:inline-flex;grid-area:actions}.shipments_watchlist[_ngcontent-%COMP%]{grid-area:watchlist}.shipments__search-wrapper[_ngcontent-%COMP%]{display:inline-flex;align-items:center}.shipments__watchlist-wrapper[_ngcontent-%COMP%]{align-items:center;display:inline-flex}.shipments__search[_ngcontent-%COMP%]{margin-inline:var(--pur-xxs)}.shipments__pin-expander[_ngcontent-%COMP%]{height:auto}.shipments__pin-expander.pur-button[_ngcontent-%COMP%]:not(.pur-button--icon-on-end).pur-button--nolink:before{background-image:svg-uri('<svg width="8" height="14" viewBox="0 0 8 14" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0.146894 12.8551C0.10033 12.8086 0.0633873 12.7534 0.0381808 12.6927C0.0129744 12.6319 -1.902e-08 12.5668 -2.18948e-08 12.5011C-2.47695e-08 12.4353 0.0129744 12.3702 0.0381808 12.3094C0.0633872 12.2487 0.10033 12.1935 0.146893 12.1471L5.79389 6.50106L0.146893 0.85506C0.100405 0.808572 0.0635287 0.753383 0.0383696 0.692643C0.0132105 0.631904 0.00026124 0.566803 0.000261237 0.50106C0.000261234 0.435316 0.0132105 0.370215 0.0383696 0.309476C0.0635287 0.248736 0.100405 0.193547 0.146893 0.147059C0.193381 0.100572 0.24857 0.0636949 0.309309 0.0385361C0.370049 0.0133772 0.435149 0.000428181 0.500893 0.000428178C0.566637 0.000428175 0.631737 0.0133772 0.692477 0.038536C0.753216 0.0636949 0.808405 0.100572 0.854893 0.147059L6.85489 6.14706C6.90146 6.1935 6.9384 6.24868 6.96361 6.30943C6.98881 6.37017 7.00179 6.43529 7.00179 6.50106C7.00179 6.56683 6.98881 6.63195 6.96361 6.69269C6.9384 6.75344 6.90146 6.80861 6.85489 6.85506L0.854894 12.8551C0.808448 12.9016 0.753273 12.9386 0.692527 12.9638C0.631782 12.989 0.566661 13.002 0.500894 13.002C0.435126 13.002 0.370005 12.989 0.30926 12.9638C0.248515 12.9386 0.193339 12.9016 0.146894 12.8551Z" fill="#495057"/></svg>')}.shipments__pin-expander[_ngcontent-%COMP%]:before{transition:rotate var(--pur-duration) var(--pur-timing)}.shipments__pin-expander[aria-expanded=true][_ngcontent-%COMP%]:before{rotate:90deg}.shipments__row--child[_ngcontent-%COMP%]   .shipments__pin-cell[_ngcontent-%COMP%]:before{content:"";display:inline-block;width:1rem;height:1rem;fill:#495057;background-image:url("data:image/svg+xml,%3Csvg width='17' height='24' viewBox='0 0 17 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.60463 21C0.774647 21 0.104095 21.6703 0.104095 22.5C0.104095 23.3297 0.774647 24 1.60463 24H6.10623C8.59149 24 10.6078 21.9844 10.6078 19.5V5.12344L14.0497 8.56407C14.6358 9.15 15.5877 9.15 16.1739 8.56407C16.76 7.97813 16.76 7.02657 16.1739 6.44063L10.1717 0.440628C9.5856 -0.145309 8.6337 -0.145309 8.04755 0.440628L2.04541 6.44063C1.45927 7.02657 1.45927 7.97813 2.04541 8.56407C2.63156 9.15 3.58346 9.15 4.16961 8.56407L7.60677 5.12344V19.5C7.60677 20.3297 6.93622 21 6.10623 21H1.60463Z' fill='%23495057'/%3E%3C/svg%3E");background-size:contain;background-repeat:no-repeat;background-position:50% 50%}.shipments__row--child[_ngcontent-%COMP%]   .shipments__pin-cell[_ngcontent-%COMP%]:before{margin-right:var(--pur-xxs);rotate:90deg}.shipments__status[_ngcontent-%COMP%]{margin-inline-end:var(--pur-xxs);width:var(--pur-xs);height:var(--pur-xs);border-radius:50%;background-color:var(--pur-primary-blue)}.shipments__status--DEL[_ngcontent-%COMP%]{background-color:var(--pur-secondary-green)}.shipments__status--ATT[_ngcontent-%COMP%]{background-color:var(--pur-primary-red)}.checkbox_column[_ngcontent-%COMP%]{width:3rem!important;flex:none!important}.watchList-button[_ngcontent-%COMP%]{padding-inline:var(--pur-sm);height:3.4375rem;border-radius:var(--pur-border-md);white-space:nowrap;text-decoration:none;cursor:pointer;color:var(--pur-primary-blue);font-size:var(--pur-font-mobile-xs);line-height:var(--pur-line-mobile-xs);margin-right:10px;border:1px solid var(--pur-primary-blue);background-color:var(--pur-text-light)}.watchList-button[_ngcontent-%COMP%]:hover{background-color:#001372;color:var(--pur-text-light)}.columnDialogHeader[_ngcontent-%COMP%]{color:var(--pur-blue-magenta)}a[_ngcontent-%COMP%]{color:inherit;text-decoration:inherit}#save-dailog[_ngcontent-%COMP%]   .Layout-field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}#save-dailog[_ngcontent-%COMP%]   .Layout-field[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{font-size:var(--pur-font-desktop-xxs);color:var(--pur-web-black);font-weight:700}#save-dailog[_ngcontent-%COMP%]   .layout-footer[_ngcontent-%COMP%]{margin-top:1.5rem}.pin-warning-area[_ngcontent-%COMP%]{max-width:100%;background-color:#f8b7bd;color:#000;text-align:center;padding:5px;margin:10px;border-radius:8px}.pin-warning-area[_ngcontent-%COMP%]   #pin-warning-text[_ngcontent-%COMP%]{margin:0;font-size:12px;font-weight:700}`],
                changeDetection: 0
            });
        }
    }
    return t;
})();
var T1 = class {
    constructor() {
        this.name = "", this.field = "", this.value = "", this.isDbField = !0, this.visualizationId = "", this.displayLabel = "", this.isRemovable = !1;
    }
};
var Jv = function(t) {
    return t.Info = "info", t.Success = "success", t.Warning = "warning", t.Error = "error", t;
}(Jv || {});
var F9 = ["*"],
    $4 = (() => {
        class t {
            getClassName() {
                let e = ["pur-alert-message"];
                return Object.values(Jv).some(n => n === this.type) && e.push(`pur-alert-message--${this.type}`), e.join(" ");
            }
            static {
                this.ɵfac = function(i) {
                    return new(i || t)();
                };
            }
            static {
                this.ɵcmp = Sn({
                    type: t,
                    selectors: [
                        ["app-alert-message"]
                    ],
                    inputs: {
                        type: "type"
                    },
                    ngContentSelectors: F9,
                    decls: 2,
                    vars: 1,
                    consts: [
                        ["role", "alert", 3, "ngClass"]
                    ],
                    template: function(i, n) {
                        i & 1 && (g0(), ge(0, "div", 0), mc(1), ve()), i & 2 && Q("ngClass", n.getClassName());
                    },
                    dependencies: [ha, Wa],
                    encapsulation: 2
                });
            }
        }
        return t;
    })();
var E9 = ["pDataGrid"],
    P9 = ["creationDateEditor"],
    I9 = ["deliveryDateEditor"],
    O9 = ["pinEditor"],
    Ri = () => ({
        standalone: !0
    }),
    N9 = () => ({
        "min-width": "95%",
        display: "block"
    }),
    L9 = t => ({
        "account-checked": t
    }),
    R9 = (t, r) => ({
        "main-expanded-row": t,
        "group-checked": r
    }),
    M9 = t => ({
        group: t
    }),
    B9 = (t, r) => ({
        space: t,
        "none-space": r
    }),
    U9 = t => ({
        space: t
    }),
    V9 = t => ({
        "last-row": t
    });

function z9(t, r) {
    t & 1 && (ge(0, "span", 81), Xt(1), dt(2, 12), Kt(), cr(3, " Purolator "), ve());
}

function W9(t, r) {
    if (t & 1 && (ge(0, "span"), Xt(1), dt(2, 13), Kt(), cr(3), ve()), t & 2) {
        let e = ee();
        oe(3), Zi(" ", e.user.userData.view.signature.selectedOrganizationName, "");
    }
}

function j9(t, r) {
    if (t & 1 && cr(0), t & 2) {
        let e = r.$implicit,
            i = ee();
        Zi(" ", i.isWatchlistRedirect ? i.watchlistRedirectLabel : e == null ? null : e.name, " ");
    }
}

function H9(t, r) {
    t & 1 && (ge(0, "p", 101), dt(1, 20), ve());
}

function G9(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "button", 102), nt("click", function(n) {
            Ce(e), ee();
            let a = Br(1),
                o = ee();
            return Ae(o.applyCreationDate(n, a));
        }), Xt(1), dt(2, 21), Kt(), ve();
    }
}

function q9(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "app-dropdown-editor", 82, 0), nt("keydown.enter", function() {
            Ce(e);
            let n = ee();
            return Ae(n.getSelectedRows());
        })("keydown.space", function() {
            Ce(e);
            let n = ee();
            return Ae(n.getSelectedRows());
        }), ge(2, "div", 83)(3, "header", 84)(4, "h2"), dt(5, 14), ve()(), ge(6, "p-datePicker", 85, 1), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee();
            return Sr(a.creationDateRange, n) || (a.creationDateRange = n), Ae(n);
        }), ve(), ge(8, "footer", 86)(9, "div")(10, "div", 87)(11, "span", 88)(12, "p-radioButton", 89), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.creationLast7());
        })("keydown.enter", function() {
            Ce(e);
            let n = ee();
            return Ae(n.creationLast7());
        })("keydown.space", function() {
            Ce(e);
            let n = ee();
            return Ae(n.creationLast7());
        }), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee();
            return Sr(a.user.userData.view.signature.shipDateOption, n) || (a.user.userData.view.signature.shipDateOption = n), Ae(n);
        }), ve(), ge(13, "label", 90), dt(14, 15), ve()(), ge(15, "span", 88)(16, "p-radioButton", 91), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.creationLast14());
        })("keydown.enter", function() {
            Ce(e);
            let n = ee();
            return Ae(n.creationLast14());
        })("keydown.space", function() {
            Ce(e);
            let n = ee();
            return Ae(n.creationLast14());
        }), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee();
            return Sr(a.user.userData.view.signature.shipDateOption, n) || (a.user.userData.view.signature.shipDateOption = n), Ae(n);
        }), ve(), ge(17, "label", 92), dt(18, 16), ve()(), ge(19, "span", 88)(20, "p-radioButton", 93), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.creationCustom());
        })("keydown.enter", function() {
            Ce(e);
            let n = ee();
            return Ae(n.creationCustom());
        })("keydown.space", function() {
            Ce(e);
            let n = ee();
            return Ae(n.creationCustom());
        }), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee();
            return Sr(a.user.userData.view.signature.shipDateOption, n) || (a.user.userData.view.signature.shipDateOption = n), Ae(n);
        }), ve(), ge(21, "label", 94), dt(22, 17), ve()(), ge(23, "span", 88)(24, "p-radioButton", 95), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.creationNone());
        })("keydown.enter", function() {
            Ce(e);
            let n = ee();
            return Ae(n.creationNone());
        })("keydown.space", function() {
            Ce(e);
            let n = ee();
            return Ae(n.creationNone());
        }), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee();
            return Sr(a.user.userData.view.signature.shipDateOption, n) || (a.user.userData.view.signature.shipDateOption = n), Ae(n);
        }), ve(), ge(25, "label", 96), dt(26, 18), ve()()(), Oe(27, H9, 2, 0, "p", 97), ge(28, "div", 98)(29, "button", 99), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.creationLast7());
        }), Xt(30), dt(31, 19), Kt(), ve(), Oe(32, G9, 3, 0, "button", 100), ve()()()()();
    }
    if (t & 2) {
        let e = ee();
        Q("value", e.user.userData.view.signature.shipDateSelected), oe(6), Q("inline", !0)("readonlyInput", !0)("numberOfMonths", 2)("disabled", e.creationDisabled), wr("ngModel", e.creationDateRange), Q("ngModelOptions", vr(20, Ri))("autofocus", !0)("tabIndex", 0), oe(6), wr("ngModel", e.user.userData.view.signature.shipDateOption), Q("ngModelOptions", vr(21, Ri))("autofocus", !0), oe(4), wr("ngModel", e.user.userData.view.signature.shipDateOption), Q("ngModelOptions", vr(22, Ri)), oe(4), wr("ngModel", e.user.userData.view.signature.shipDateOption), Q("ngModelOptions", vr(23, Ri)), oe(4), wr("ngModel", e.user.userData.view.signature.shipDateOption), Q("ngModelOptions", vr(24, Ri)), oe(3), Q("ngIf", !e.creationDateRange && !e.deliveryDateRange && !e.user.userData.view.signature.pinText), oe(5), Q("ngIf", e.creationDateRange || e.deliveryDateRange || e.user.userData.view.signature.pinText);
    }
}

function X9(t, r) {
    t & 1 && (ge(0, "p", 101), dt(1, 28), ve());
}

function K9(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "button", 102), nt("click", function(n) {
            Ce(e), ee();
            let a = Br(1),
                o = ee();
            return Ae(o.applyDeliveryDate(n, a));
        }), Xt(1), dt(2, 29), Kt(), ve();
    }
}

function Y9(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "app-dropdown-editor", 103, 2)(2, "div", 83)(3, "header", 84)(4, "h2"), dt(5, 22), ve()(), ge(6, "p-datePicker", 85, 3), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee();
            return Sr(a.deliveryDateRange, n) || (a.deliveryDateRange = n), Ae(n);
        }), ve(), ge(8, "footer", 86)(9, "div")(10, "div", 87)(11, "span", 88)(12, "p-radioButton", 104), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.deliveryNext7());
        })("keydown.enter", function() {
            Ce(e);
            let n = ee();
            return Ae(n.deliveryNext7());
        })("keydown.space", function() {
            Ce(e);
            let n = ee();
            return Ae(n.deliveryNext7());
        }), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee();
            return Sr(a.user.userData.view.signature.deliveryDateOption, n) || (a.user.userData.view.signature.deliveryDateOption = n), Ae(n);
        }), ve(), ge(13, "label"), dt(14, 23), ve()(), ge(15, "span", 88)(16, "p-radioButton", 105), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.deliveryNext14());
        })("keydown.enter", function() {
            Ce(e);
            let n = ee();
            return Ae(n.deliveryNext14());
        })("keydown.space", function() {
            Ce(e);
            let n = ee();
            return Ae(n.deliveryNext14());
        }), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee();
            return Sr(a.user.userData.view.signature.deliveryDateOption, n) || (a.user.userData.view.signature.deliveryDateOption = n), Ae(n);
        }), ve(), ge(17, "label"), dt(18, 24), ve()(), ge(19, "span", 88)(20, "p-radioButton", 106), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.deliveryCustom());
        })("keydown.enter", function() {
            Ce(e);
            let n = ee();
            return Ae(n.deliveryCustom());
        })("keydown.space", function() {
            Ce(e);
            let n = ee();
            return Ae(n.deliveryCustom());
        }), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee();
            return Sr(a.user.userData.view.signature.deliveryDateOption, n) || (a.user.userData.view.signature.deliveryDateOption = n), Ae(n);
        }), ve(), ge(21, "label"), dt(22, 25), ve()(), ge(23, "span", 88)(24, "p-radioButton", 107), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.deliveryNone());
        })("keydown.enter", function() {
            Ce(e);
            let n = ee();
            return Ae(n.deliveryNone());
        })("keydown.space", function() {
            Ce(e);
            let n = ee();
            return Ae(n.deliveryNone());
        }), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee();
            return Sr(a.user.userData.view.signature.deliveryDateOption, n) || (a.user.userData.view.signature.deliveryDateOption = n), Ae(n);
        }), ve(), ge(25, "label"), dt(26, 26), ve()()(), Oe(27, X9, 2, 0, "p", 97), ge(28, "div", 98)(29, "button", 99), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.deliveryNext7());
        }), Xt(30), dt(31, 27), Kt(), ve(), Oe(32, K9, 3, 0, "button", 100), ve()()()()();
    }
    if (t & 2) {
        let e = ee();
        Q("value", e.user.userData.view.signature.deliveryDateSelected), oe(6), Q("inline", !0)("readonlyInput", !0)("numberOfMonths", 2)("disabled", e.deliveryDisabled), wr("ngModel", e.deliveryDateRange), Q("ngModelOptions", vr(19, Ri))("autofocus", !0)("tabIndex", 0), oe(6), wr("ngModel", e.user.userData.view.signature.deliveryDateOption), Q("ngModelOptions", vr(20, Ri)), oe(4), wr("ngModel", e.user.userData.view.signature.deliveryDateOption), Q("ngModelOptions", vr(21, Ri)), oe(4), wr("ngModel", e.user.userData.view.signature.deliveryDateOption), Q("ngModelOptions", vr(22, Ri)), oe(4), wr("ngModel", e.user.userData.view.signature.deliveryDateOption), Q("ngModelOptions", vr(23, Ri)), oe(3), Q("ngIf", !e.creationDateRange && !e.deliveryDateRange && !e.user.userData.view.signature.pinText), oe(5), Q("ngIf", e.creationDateRange || e.deliveryDateRange || e.user.userData.view.signature.pinText);
    }
}

function Z9(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "tr")(1, "th", 128), dt(2, 37), ve(), ge(3, "th", 129), dt(4, 38), ve(), ge(5, "th", 129), dt(6, 39), ve(), ge(7, "th", 129), dt(8, 40), ve(), ge(9, "th", 129), dt(10, 41), ve(), ge(11, "th", 129), dt(12, 42), ve(), ge(13, "th", 129), dt(14, 43), ve()(), ge(15, "tr", 130)(16, "th", 131)(17, "input", 132), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee(2);
            return Sr(a.selectAll, n) || (a.selectAll = n), Ae(n);
        }), nt("click", function() {
            Ce(e);
            let n = ee(2);
            return Ae(n.onSelectAll());
        })("keydown.enter", function() {
            Ce(e);
            let n = ee(2);
            return Ae(n.onSelectAll());
        }), ve()(), ge(18, "th", 133)(19, "span", 134), St(20, "i", 135), ge(21, "input", 136), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee(2);
            return Sr(a.filterTerritory, n) || (a.filterTerritory = n), Ae(n);
        }), nt("keyup", function() {
            Ce(e);
            let n = ee(2);
            return Ae(n.onFilterChange());
        }), ve()()(), ge(22, "th", 133)(23, "span", 134), St(24, "i", 135), ge(25, "input", 136), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee(2);
            return Sr(a.filterCity, n) || (a.filterCity = n), Ae(n);
        }), nt("keyup", function() {
            Ce(e);
            let n = ee(2);
            return Ae(n.onFilterChange());
        }), ve()()(), ge(26, "th", 133)(27, "span", 134), St(28, "i", 135), ge(29, "input", 136), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee(2);
            return Sr(a.filterPostalZipCode, n) || (a.filterPostalZipCode = n), Ae(n);
        }), nt("keyup", function() {
            Ce(e);
            let n = ee(2);
            return Ae(n.onFilterChange());
        }), ve()()(), ge(30, "th", 133)(31, "span", 134), St(32, "i", 135), ge(33, "input", 136), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee(2);
            return Sr(a.filterName, n) || (a.filterName = n), Ae(n);
        }), nt("keyup", function() {
            Ce(e);
            let n = ee(2);
            return Ae(n.onFilterChange());
        }), ve()()(), ge(34, "th", 133)(35, "span", 134), St(36, "i", 135), ge(37, "input", 136), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee(2);
            return Sr(a.filterType, n) || (a.filterType = n), Ae(n);
        }), nt("keyup", function() {
            Ce(e);
            let n = ee(2);
            return Ae(n.onFilterChange());
        }), ve()()(), ge(38, "th", 137)(39, "span", 134), St(40, "i", 135), ge(41, "input", 136), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee(2);
            return Sr(a.filterAccount, n) || (a.filterAccount = n), Ae(n);
        }), nt("keyup", function() {
            Ce(e);
            let n = ee(2);
            return Ae(n.onFilterChange());
        }), ve()()()();
    }
    if (t & 2) {
        let e = ee(2);
        oe(17), wr("ngModel", e.selectAll), Q("ngModelOptions", vr(14, Ri)), oe(4), wr("ngModel", e.filterTerritory), Q("ngModelOptions", vr(15, Ri)), oe(4), wr("ngModel", e.filterCity), Q("ngModelOptions", vr(16, Ri)), oe(4), wr("ngModel", e.filterPostalZipCode), Q("ngModelOptions", vr(17, Ri)), oe(4), wr("ngModel", e.filterName), Q("ngModelOptions", vr(18, Ri)), oe(4), wr("ngModel", e.filterType), Q("ngModelOptions", vr(19, Ri)), oe(4), wr("ngModel", e.filterAccount), Q("ngModelOptions", vr(20, Ri));
    }
}

function J9(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "tr", 138)(1, "td", 139)(2, "input", 140), nt("click", function() {
            let n = Ce(e).$implicit,
                a = ee(2);
            return Ae(a.onSelectedCount(n));
        })("keydown.enter", function() {
            let n = Ce(e).$implicit,
                a = ee(2);
            return Ae(a.onSelectedCount(n));
        }), ve()(), ge(3, "td", 133), cr(4), ve(), ge(5, "td", 133), cr(6), ve(), ge(7, "td", 133), cr(8), ve(), ge(9, "td", 133), cr(10), ve(), ge(11, "td", 133), cr(12), ve(), ge(13, "td", 133), cr(14), ve()();
    }
    if (t & 2) {
        let e = r.$implicit;
        Q("ngClass", ii(8, L9, e.checked)), oe(2), Q("checked", e.checked), oe(2), Wi(e.territory), oe(2), Wi(e.city), oe(2), Wi(e.postalZipCode), oe(2), Wi(e.name.substring(0, 18)), oe(2), Wi(e.type), oe(2), Wi(e.account);
    }
}

function Q9(t, r) {
    t & 1 && (ge(0, "h4"), dt(1, 44), ve());
}

function $9(t, r) {
    t & 1 && Ci(0);
}

function eB(t, r) {
    if (t & 1 && (ge(0, "tr", 143), Oe(1, $9, 1, 0, "ng-container", 144), ve(), St(2, "tr", 138)), t & 2) {
        let e = r.$implicit;
        ee();
        let i = Br(3),
            n = ee(2);
        Q("ngClass", Zo(4, R9, n.expandedGroupName.includes(e.groupName), e.checked)), oe(), Q("ngTemplateOutlet", i)("ngTemplateOutletContext", ii(7, M9, e)), oe(), Q("ngClass", Zo(9, B9, !n.expandedGroupName.includes(e.groupName), n.expandedGroupName.includes(e.groupName)));
    }
}

function tB(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "td", 145)(1, "div")(2, "div", 146)(3, "span", 147)(4, "b"), cr(5), ve()()(), ge(6, "div")(7, "a", 148), nt("click", function() {
            let n = Ce(e).group,
                a = ee(3);
            return Ae(a.expandedGroup(n.name));
        }), am(8, 45), Rs(9, "number"), St(10, "i", 138), om(), ve()()(), ge(11, "div")(12, "input", 149), nt("click", function() {
            let n = Ce(e).group,
                a = ee(3);
            return Ae(a.onSelectedGroupCount(n));
        }), ve()()();
    }
    if (t & 2) {
        let e = r.group,
            i = ee(3);
        oe(5), Wi(e.name), oe(2), Q("pRowToggler", e), oe(3), Q("ngClass", i.expandedGroupName.includes(e.name) ? "pi pi-chevron-up" : "pi pi-chevron-down"), cd(sm(9, 5, e.accounts.length)), ud(8), oe(2), Q("checked", e.checked);
    }
}

function rB(t, r) {
    if (t & 1 && (ge(0, "tr", 151)(1, "td", 152), cr(2), ve()()), t & 2) {
        let e = r.$implicit,
            i = r.index,
            n = ee(2).$implicit;
        Q("ngClass", ii(3, V9, i === n.accounts.length - 1)), oe(2), Y2(" \xA0\xA0", e.name, " (", e.account, ") ");
    }
}

function iB(t, r) {
    if (t & 1 && (ge(0, "div"), Oe(1, rB, 3, 5, "tr", 150), St(2, "td", 138), ve()), t & 2) {
        let e = ee().$implicit,
            i = ee(3);
        oe(), Q("ngForOf", e.accounts), oe(), Q("ngClass", ii(2, U9, i.expandedGroupName.includes(e.name)));
    }
}

function nB(t, r) {
    if (t & 1 && Oe(0, iB, 3, 4, "div", 64), t & 2) {
        let e = r.$implicit,
            i = ee(3);
        Q("ngIf", i.expandedGroupName.includes(e.name));
    }
}

function aB(t, r) {
    if (t & 1 && (ge(0, "p-table", 141), Oe(1, eB, 3, 12, "ng-template", 123)(2, tB, 13, 7, "ng-template", null, 5, hi)(4, nB, 1, 1, "ng-template", 142), ve()), t & 2) {
        let e = ee(2);
        Q("value", e.groups)("scrollable", !0)("resizableColumns", !0)("autoLayout", !0);
    }
}

function oB(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "app-dropdown-editor", 108, 4), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.getSelectedRows());
        }), ge(2, "div", 109)(3, "header", 84)(4, "h2"), dt(5, 30), ve()(), ge(6, "div", 110)(7, "span")(8, "b"), dt(9, 31), ve()(), ge(10, "div", 111)(11, "span", 112), dt(12, 32), ve(), ge(13, "span", 113)(14, "p-inputSwitch", 114), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee();
            return Sr(a.onlySelected, n) || (a.onlySelected = n), Ae(n);
        }), nt("ngModelChange", function() {
            Ce(e);
            let n = ee();
            return Ae(n.activeIndex === 0 ? n.onOnlySelected() : n.onOnlySelectedGroup());
        }), ve()()()(), St(15, "br")(16, "br"), ge(17, "p-tabs", 115), Tr("valueChange", function(n) {
            Ce(e);
            let a = ee();
            return Sr(a.activeIndex, n) || (a.activeIndex = n), Ae(n);
        }), ge(18, "p-tablist")(19, "p-tab", 116), dt(20, 33), ve(), ge(21, "p-tab", 116), dt(22, 34), ve()(), ge(23, "p-tabpanels")(24, "p-tabpanel", 116)(25, "span", 117)(26, "button", 118), nt("click", function() {
            Ce(e);
            let n = Br(1),
                a = ee();
            return Ae(a.onCancel(n));
        }), ve(), cr(27, " \xA0 \xA0 "), ge(28, "button", 119), nt("click", function() {
            Ce(e);
            let n = Br(1),
                a = ee();
            return Ae(a.onDone(n));
        }), ve()(), St(29, "br")(30, "br")(31, "br"), ge(32, "ngx-spinner", 120), dt(33, 35), ve(), ge(34, "p-table", 121), Rs(35, "filter"), Rs(36, "filter"), Rs(37, "filter"), Rs(38, "filter"), Rs(39, "filter"), Rs(40, "filter"), Oe(41, Z9, 42, 21, "ng-template", 122)(42, J9, 15, 10, "ng-template", 123), ve()(), ge(43, "p-tabpanel", 116)(44, "span", 117)(45, "button", 124), nt("click", function() {
            Ce(e);
            let n = Br(1),
                a = ee();
            return Ae(a.onCancel(n));
        }), ve(), cr(46, " \xA0 \xA0 "), ge(47, "button", 125), nt("click", function() {
            Ce(e);
            let n = Br(1),
                a = ee();
            return Ae(a.onDoneGroup(n));
        }), ve()(), St(48, "br")(49, "br")(50, "br"), ge(51, "ngx-spinner", 126), dt(52, 36), ve(), Oe(53, Q9, 2, 0, "h4", 64)(54, aB, 5, 4, "p-table", 127), ve()()()()();
    }
    if (t & 2) {
        let e = ee();
        v0("label", e.accounts), v0("value", e.allAccountsSelected), oe(9), cd(e.activeIndex === 0 ? e.selectedAccounts : e.selectedGroups), ud(9), oe(5), wr("ngModel", e.onlySelected), Q("ngModelOptions", vr(44, Ri))("autofocus", !0)("tabIndex", 0), oe(3), wr("value", e.activeIndex), oe(2), Q("value", 0), oe(2), Q("value", 1), oe(3), Q("value", 0), oe(8), Q("fullScreen", !1), oe(2), Q("value", gc(40, 40, gc(39, 36, gc(38, 32, gc(37, 28, gc(36, 24, gc(35, 20, e.displayAccounts, "account", e.filterAccount), "name", e.filterName), "city", e.filterCity), "territory", e.filterTerritory), "type", e.filterType), "postalZipCode", e.filterPostalZipCode))("tableStyle", vr(45, N9))("scrollable", !0), oe(9), Q("value", 1), oe(4), Q("disabled", !e.groups.length), oe(4), Q("fullScreen", !1), oe(2), Q("ngIf", !e.groups.length), oe(), Q("ngIf", e.groups.length);
    }
}

function sB(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "div", 161)(1, "p", 162), cr(2), ge(3, "span", 163), nt("click", function() {
            Ce(e);
            let n = ee(2);
            return Ae(n.showPinWarning = !1);
        })("keydown.enter", function() {
            Ce(e);
            let n = ee(2);
            return Ae(n.showPinWarning = !1);
        })("keydown.space", function() {
            Ce(e);
            let n = ee(2);
            return Ae(n.showPinWarning = !1);
        }), cr(4, "\xD7"), ve()()();
    }
    if (t & 2) {
        let e = ee(2);
        oe(2), Zi(" ", e.pinWarningMessage, " ");
    }
}

function lB(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "app-dropdown-editor", 153, 6)(2, "div", 83)(3, "header", 84)(4, "h2"), dt(5, 46), ve()(), ge(6, "div", 154)(7, "label", 155)(8, "p"), dt(9, 47), ve()(), ge(10, "textarea", 156), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee();
            return Sr(a.user.userData.view.signature.pinText, n) || (a.user.userData.view.signature.pinText = n), Ae(n);
        }), ve()(), Oe(11, sB, 5, 1, "div", 157), ge(12, "footer", 86)(13, "div", 158)(14, "button", 159), nt("click", function() {
            Ce(e);
            let n = Br(18);
            return Ae(n.click());
        }), Xt(15), dt(16, 48), Kt(), ve(), ge(17, "input", 160, 7), nt("change", function(n) {
            Ce(e);
            let a = ee();
            return Ae(a.handlePinFile(n));
        }), ve()(), ge(19, "div", 158)(20, "button", 99), nt("click", function() {
            Ce(e);
            let n = Br(18),
                a = ee();
            return Ae(a.clearShipmentPins(n));
        }), Xt(21), dt(22, 49), Kt(), ve(), ge(23, "button", 102), nt("click", function(n) {
            Ce(e);
            let a = Br(1),
                o = ee();
            return Ae(o.applyPinEntry(n, a));
        }), Xt(24), dt(25, 50), Kt(), ve()()()()();
    }
    if (t & 2) {
        let e = ee();
        Q("value", e.user.userData.view.signature.pinSummary), oe(10), wr("ngModel", e.user.userData.view.signature.pinText), Q("ngModelOptions", vr(7, Ri))("autofocus", !0)("tabIndex", 0), oe(), Q("ngIf", e.showPinWarning), oe(6), Q("hidden", !0);
    }
}

function cB(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "p-chip", 164), nt("onRemove", function() {
            let n = Ce(e).$implicit,
                a = ee();
            return Ae(a.onFilterRemove(n.displayLabel));
        }), ve();
    }
    if (t & 2) {
        let e = r.$implicit;
        Q("label", e.displayLabel)("removable", e.isRemovable);
    }
}

function uB(t, r) {
    if (t & 1 && (ge(0, "strong"), cr(1), ve()), t & 2) {
        let e = ee(3);
        oe(), Wi(e.currentView.name);
    }
}

function fB(t, r) {
    if (t & 1 && (ge(0, "strong"), cr(1), ve()), t & 2) {
        let e = ee(3);
        oe(), Wi(e.reservedViewName);
    }
}

function hB(t, r) {
    if (t & 1 && (ge(0, "div")(1, "app-alert-message", 174)(2, "p"), Oe(3, uB, 2, 1, "strong", 64)(4, fB, 2, 1, "strong", 64), Xt(5), dt(6, 54), Kt(), ve()()()), t & 2) {
        let e = ee(2);
        oe(3), Q("ngIf", (e.currentView == null ? null : e.currentView.name) && (e.currentView == null ? null : e.currentView.isProtected)), oe(), Q("ngIf", !(e.currentView != null && e.currentView.isProtected) && e.isReservedViewName);
    }
}

function dB(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "div", 175)(1, "button", 176), nt("click", function() {
            Ce(e);
            let n = ee(2);
            return Ae(n.saveDialog = !1);
        }), Xt(2), dt(3, 55), Kt(), ve(), ge(4, "button", 177), nt("click", function() {
            Ce(e);
            let n = ee(2);
            return Ae(n.saveView());
        }), Xt(5), dt(6, 56), Kt(), ve()();
    }
    if (t & 2) {
        let e = ee(2);
        oe(4), Q("disabled", e.saveAsViewName.trim() === "" && !e.willOverwriteView);
    }
}

function pB(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "div", 165)(1, "button", 166), nt("click", function() {
            Ce(e);
            let n = ee();
            return Ae(n.showSave());
        }), Xt(2), dt(3, 51), Kt(), ve(), ge(4, "p-dialog", 167), Tr("visibleChange", function(n) {
            Ce(e);
            let a = ee();
            return Sr(a.saveDialog, n) || (a.saveDialog = n), Ae(n);
        }), Oe(5, hB, 7, 2, "div", 64), ge(6, "div", 168)(7, "div", 169)(8, "p-radioButton", 170), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee();
            return Sr(a.willOverwriteView, n) || (a.willOverwriteView = n), Ae(n);
        }), ve(), ge(9, "label"), am(10, 52), St(11, "strong"), om(), ve()(), ge(12, "div", 169)(13, "p-radioButton", 171), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee();
            return Sr(a.willOverwriteView, n) || (a.willOverwriteView = n), Ae(n);
        }), ve(), ge(14, "label"), dt(15, 53), ve(), ge(16, "input", 172), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee();
            return Sr(a.saveAsViewName, n) || (a.saveAsViewName = n), Ae(n);
        }), ve()()(), Oe(17, dB, 7, 1, "ng-template", 173), ve()();
    }
    if (t & 2) {
        let e = ee();
        oe(4), wr("visible", e.saveDialog), Q("modal", !0)("resizable", !1)("draggable", !1), oe(), Q("ngIf", (e.currentView == null ? null : e.currentView.isProtected) || e.isReservedViewName), oe(3), Q("value", !0)("disabled", e.currentView ? e.currentView.isProtected : !1), wr("ngModel", e.willOverwriteView), Q("ngModelOptions", vr(17, Ri)), oe(3), cd(e.currentView ? e.currentView.name : ""), ud(10), oe(2), Q("value", !1), wr("ngModel", e.willOverwriteView), Q("ngModelOptions", vr(18, Ri)), oe(3), Q("autofocus", !e.willOverwriteView)("disabled", e.willOverwriteView), wr("ngModel", e.saveAsViewName), Q("ngModelOptions", vr(19, Ri));
    }
}

function mB(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "div", 169)(1, "p-radioButton", 198), Tr("ngModelChange", function(n) {
            Ce(e);
            let a = ee(3).$implicit;
            return Sr(a.visualizationType, n) || (a.visualizationType = n), Ae(n);
        }), nt("ngModelChange", function() {
            Ce(e), ee();
            let n = Br(8),
                a = ee(2).$implicit,
                o = ee(2);
            return Ae(o.setChartType(a, n));
        }), ve(), ge(2, "label", 199), cr(3), ve()();
    }
    if (t & 2) {
        let e = r.$implicit,
            i = r.index,
            n = ee(3),
            a = n.$implicit,
            o = n.index;
        oe(), Q("inputId", "chartTypeSelect" + o + "_" + i)("name", "chartTypeSelect" + o)("value", e.value), wr("ngModel", a.visualizationType), Q("ngModelOptions", vr(7, Ri)), oe(), Q("for", "chartTypeSelect" + o + "_" + i), oe(), Wi(e.name);
    }
}

function gB(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "div", 190)(1, "button", 191), nt("click", function() {
            Ce(e);
            let n = ee(2).$implicit,
                a = ee(2);
            return Ae(a.moveUpVisualizationLevel(n.id));
        }), ge(2, "span", 192), cr(3, "Back to previous level"), ve()(), ge(4, "button", 193), nt("click", function(n) {
            Ce(e);
            let a = Br(8),
                o = ee(4);
            return Ae(o.togglePanel(a, n));
        }), ge(5, "span", 194), cr(6, "Open visualization menu"), ve()(), ge(7, "p-popover", 195, 8)(9, "fieldset", 196)(10, "legend"), dt(11, 58), ve(), Oe(12, mB, 4, 8, "div", 197), ve()()();
    }
    if (t & 2) {
        let e = ee(2).$implicit,
            i = ee(2);
        oe(), Q("hidden", i.getVisualizationLevel(e.id) === 1 && e.id !== i.PUROLATOR4 || e.id === i.PUROLATOR4 && i.getVisualizationLevel(e.id) === 0), oe(11), Q("ngForOf", e.visualizationTypes);
    }
}

function vB(t, r) {
    if (t & 1) {
        let e = or();
        ge(0, "div", 200), nt("chartInit", function(n) {
            Ce(e);
            let a = ee(2).index,
                o = ee(2);
            return Ae(o.onChartInit(n, a));
        })("chartClick", function(n) {
            Ce(e);
            let a = ee(2).$implicit,
                o = ee(2);
            return Ae(o.moveDownVisualizationLevel(n, a.id));
        }), ve();
    }
    if (t & 2) {
        let e = ee(2).$implicit;
        Q("options", e.options)("autoResize", !1);
    }
}

function xB(t, r) {
    if (t & 1 && (ge(0, "p", 201), cr(1), Rs(2, "number"), Xt(3), dt(4, 59), Kt(), ve()), t & 2) {
        let e = ee(2).$implicit;
        oe(), Zi(" ", sm(2, 1, e.count), " ");
    }
}

function _B(t, r) {
    if (t & 1 && (ge(0, "div", 202)(1, "p", 203), cr(2), ve()()), t & 2) {
        let e = ee(4);
        oe(2), Zi(" ", e.errorMessage, " ");
    }
}

function yB(t, r) {
    if (t & 1 && (ge(0, "div")(1, "header", 183)(2, "h3", 184), cr(3), ve(), Oe(4, gB, 13, 2, "div", 185), ve(), ge(5, "div", 186), Oe(6, vB, 1, 2, "div", 187)(7, xB, 5, 3, "p", 188)(8, _B, 3, 1, "div", 189), ve()()), t & 2) {
        let e = ee().$implicit,
            i = ee(2);
        oe(3), Wi(e.name), oe(), Q("ngIf", !(i.isApiError && i.errorSections.includes(e.groupKey))), oe(2), Q("ngIf", !(i.isApiError && i.errorSections.includes(e.groupKey))), oe(), Q("ngIf", !(i.isApiError && i.errorSections.includes(e.groupKey))), oe(), Q("ngIf", i.isApiError && i.errorSections.includes(e.groupKey));
    }
}

function bB(t, r) {
    if (t & 1 && (ge(0, "div", 182), Oe(1, yB, 9, 5, "div", 64), ve()), t & 2) {
        let e = r.index,
            i = ee(2);
        Q("hidden", !i.showVisualization(e)), oe(), Q("ngIf", i.showVisualization(e));
    }
}

function wB(t, r) {
    if (t & 1 && (ge(0, "section", 178)(1, "h2", 179), dt(2, 57), ve(), ge(3, "div", 180), Oe(4, bB, 2, 2, "div", 181), ve()()), t & 2) {
        let e = ee();
        oe(4), Q("ngForOf", e.user.userData.view.visualizations);
    }
}

function SB(t, r) {
    t & 1 && (ge(0, "section", 204), St(1, "app-datagrid", null, 9), ve());
}
var cne = (() => {
    class t {
        constructor(e, i, n, a, o, s, l, c, u, h) {
            this.apiService = e, this.router = i, this.activatedRoute = n, this.cdr = a, this.user = o, this.authService = s, this.lookupDataService = l, this.spinner = c, this.localeService = u, this.ngZone = h, this.lastRefresh = "", this.timerCounter = 0, this.timerInterval = 6e4, this.displayAccounts = [], this.backupAccounts = [], this.groups = [], this.localGroupsByOrg = [], this.backupGroups = [], this.expandedGroupName = [], this.filterAccount = "", this.filterName = "", this.filterCity = "", this.filterTerritory = "", this.filterType = "", this.filterPostalZipCode = "", this.selectAll = !1, this.onlySelected = !1, this.allAccountsSelected = "", this.accounts = "Accounts", this.selectedAccounts = 0, this.selectedGroups = 0, this.activeIndex = 0, this.PUROLATOR4 = nx.PUROLATOR4, this.isReservedViewName = !1, this.showPinWarning = !1, this.pinWarningMessage = "You have exceeded the maximum of 3,000 PINs.  Please reduce your query to 3,000 or less PINs", this.dashboardPinLimit = Ku.pinLimit, this.isApiError = !1, this.errorSections = [], this.errorMessage = "Something Went Wrong!", this.visualizationRequestQueue$ = new M2(), this.chartResizeState = new Map(), this.currentView = new fm(), this.saveAsViewName = "", this.saveDialog = !1, this.reservedViewName = "Purolator View", this.isWatchlistRedirect = !1, this.willOverwriteView = !0, this.levels = {
                visualizationIndex: 0,
                international: "receivercountrycode",
                countryFilter: "",
                stateProvinceFilter: ""
            }, this.drillLevel = 0, this.serviceDrilled = !1, this.statusDrilled = !1, this.attentionDrilled = !1, this.shipmentTypeDrilled = !1, this.levelMap = new Map([
                ["Purolator1", {
                    level: "statusDrilled",
                    filters: [{
                        id: "shipmentStatus",
                        name: "Package Status",
                        field: "packagestatuscode"
                    }]
                }],
                ["Purolator2", {
                    level: "shipmentTypeDrilled",
                    filters: [{
                        id: "shipmentType",
                        name: "Package Type",
                        field: "shipmenttype"
                    }]
                }],
                [this.PUROLATOR4, {
                    level: "drillLevel",
                    filters: [{
                        id: "countryWideFilter",
                        name: "Country",
                        field: "receivercountrycode"
                    }, {
                        id: "stateWideFilter",
                        name: "Region",
                        field: "receiverprovincestate"
                    }, {
                        id: "cityFilter",
                        name: "City",
                        field: "receivercity"
                    }]
                }],
                ["Purolator5", {
                    level: "serviceDrilled",
                    filters: [{
                        id: "serviceCategory",
                        name: "Service Category",
                        field: "productcode"
                    }]
                }],
                ["Purolator6", {
                    level: "attentionDrilled",
                    filters: [{
                        id: "attRequired",
                        name: "Attention Required",
                        field: "packagestatussubcode"
                    }]
                }]
            ]), this.dataSource = "", this.creationDateRange = [new Date(Date.now() - 7 * 24 * 60 * 60 * 1e3), new Date()], this.creationDisabled = !1, this.deliveryDateRange = [new Date(), new Date(Date.now() + 7 * 24 * 60 * 60 * 1e3)], this.deliveryDisabled = !1, this.router.routeReuseStrategy.shouldReuseRoute = () => !1, this.displayAccounts = this.user.userData.accounts, this.backupAccounts = this.displayAccounts, this.localGroupsByOrg = o.userData.localAccountGroups.filter(d => d.organizationId === this.user.userData.view.signature.selectedOrganizationId), this.groups = this.localGroupsByOrg, this.backupGroups = this.localGroupsByOrg, this.sortObjectArray(this.displayAccounts, "name"), this.sortObjectArray(this.groups, "name"), this.ngZone.runOutsideAngular(() => {
                this.timerId = setInterval(() => {
                    this.ngZone.run(() => this.updateLastRefresh());
                }, this.timerInterval);
            });
        }
        ngOnInit() {
            let e = this.activatedRoute.snapshot.queryParams.watchlist,
                i = this.activatedRoute.snapshot.queryParams.view,
                n = this.activatedRoute.snapshot.queryParams.group;
            if (this.displayAccounts = this.user.userData.accounts, this.selectAccountsSelected(), this.selectGroupsSelected(), this.visualizationRequestQueueSub = this.visualizationRequestQueue$.pipe(W2(a => a, 2)).subscribe(), e !== void 0) {
                this.isWatchlistRedirect = !0, this.watchlistRedirectLabel = String(e).trim();
                let a = this.user.userData.views ? .find(s => s ? .id === "p1") ? ? this.getDefaultView(this.user);
                if (!this.loadView(a)) return;
                this.user.userData.view.signature.pinText = "";
                for (let s of this.user.userData.watchlists)
                    if (s.watchlistName.toLowerCase() === e.toLowerCase()) {
                        for (let l of s.packages) this.user.userData.view.signature.pinText += l.packagePin + `
`;
                        break;
                    }
                this.applyPinEntry("", new Cm());
            } else if (i !== void 0) {
                let a = !1;
                for (let o of this.user.userData.views)
                    if (o.name ? .toLowerCase() === i.toLowerCase()) {
                        if (!this.loadView(o)) return;
                        this.onDataSourceChange(), a = !0;
                        break;
                    }
                if (!a) {
                    if (!this.loadView(this.getDefaultView(this.user))) return;
                    this.onDataSourceChange();
                }
            } else if (n !== void 0) {
                for (let a of this.localGroupsByOrg)
                    if (a.name.trim().toLowerCase() === n.trim().toLowerCase()) {
                        this.user.userData.view.signature.selectedAccountList = [...a.accounts], this.user.updateSelectedAccounts(), this.onDataSourceChange();
                        break;
                    }
                this.user.userData.view.signature.selectedAccountList.length === 0 && this.loadView(this.getDefaultView(this.user));
            } else {
                if (!this.loadView(this.getDefaultView(this.user))) return;
                this.onDataSourceChange(), this.deliveryDisabled = !0;
            }
            this.datagridRefreshSubscription = this.apiService.datagridRefresh$.subscribe(a => {
                this.getDetails(a);
            });
        }
        ngAfterViewInit() {
            this.getSelectedRows(), setTimeout(() => {
                this.activeIndex = 0, this.cdr.detectChanges();
            }, 0);
        }
        getSelectedRows() {
            this.reloadDisplayAccounts(), Po.setAccountSummary(this.user.userData.view.signature), this.allAccountsSelected = this.user.userData.view.signature.accountSummary;
            let e = this.displayAccounts.filter(i => i.checked);
            this.backupAccounts = this.displayAccounts, this.selectAll = e.length === this.displayAccounts.length, (this.selectAll || !this.user.userData.view.signature.selectedAccountList.length) && (this.allAccountsSelected = "All Accounts", (this.displayAccounts || []).forEach(i => i.checked = !0), this.selectAll = !0), this.selectAll && (this.displayAccounts.forEach(i => i.checked = !1), this.groups.forEach(i => i.checked = !1), this.selectAll = !1, this.selectedAccounts = 0, this.selectedGroups = 0, this.clearAccountFilter()), this.showSelectedCount();
        }
        reloadDisplayAccounts() {
            this.displayAccounts = this.user.userData.accounts, this.selectAccountsSelected();
            let e = this.displayAccounts.filter(n => n.checked);
            e.length === this.user.userData.accounts.length && (this.allAccountsSelected = "All Accounts"), this.displayAccounts.forEach(n => {
                e.forEach(a => {
                    a.account === n.account && a.type === n.type && (n.checked = !0);
                });
            });
            let i = this.currentView;
            this.cdr.detectChanges(), i && (this.currentView = i);
        }
        selectAccountsSelected() {
            this.displayAccounts.forEach(e => {
                this.user.userData.view.signature.selectedAccountList.forEach(i => {
                    i.account === e.account && i.type === e.type && (e.checked = !0);
                });
            }), this.allAccountsSelected = this.user.userData.view.signature.accountSummary;
        }
        selectGroupsSelected() {
            this.groups.forEach(i => {
                this.user.userData.view.signature.selectedGroupList.forEach(n => {
                    n.name === i.name && (i.checked = !0);
                });
            }), this.groups.filter(i => i.checked).forEach(i => {
                let n = i.accounts.map(a => a.account);
                for (let a = 0; a < n.length; a++)
                    for (let o = 0; o < this.displayAccounts.length; o++) this.displayAccounts[o].account === n[a] && (this.displayAccounts[o].checked = !0);
            });
        }
        onSelectedCount(e) {
            this.displayAccounts.forEach(i => {
                i.account === e.account && i.type === e.type && (i.checked = !i.checked);
            }), this.showSelectedCount();
        }
        showSelectedCount() {
            this.selectedAccounts = this.displayAccounts.filter(e => e.checked).length, this.onlySelected && this.onOnlySelected();
        }
        onSelectedGroupCount(e) {
            this.groups.forEach(i => {
                i.name === e.name && (i.checked = !i.checked, i.accounts.forEach(n => {
                    this.displayAccounts.forEach(a => {
                        a.account === n.account && a.type === n.type && (a.checked = i.checked);
                    });
                }));
            }), this.showSelectedGroupCount();
        }
        showSelectedGroupCount() {
            this.selectedGroups = this.groups.filter(e => e.checked).length, this.onlySelected && this.onOnlySelectedGroup();
        }
        onSelectAll() {
            this.selectAll ? (this.displayAccounts || []).forEach(e => {
                (!this.filterTerritory || e.territory.toLowerCase().includes(this.filterTerritory.toLowerCase())) && (!this.filterCity || e.city.toLowerCase().includes(this.filterCity.toLowerCase())) && (!this.filterType || e.type ? .toLowerCase().includes(this.filterType.toLowerCase())) && (!this.filterPostalZipCode || e.postalZipCode.toLowerCase().includes(this.filterPostalZipCode.toLowerCase())) && (!this.filterName || e.name.toLowerCase().includes(this.filterName.toLowerCase())) && (!this.filterAccount || e.account.toLowerCase().includes(this.filterAccount.toLowerCase())) && (e.checked = !1);
            }) : (this.displayAccounts || []).forEach(e => {
                (!this.filterTerritory || e.territory.toLowerCase().includes(this.filterTerritory.toLowerCase())) && (!this.filterCity || e.city.toLowerCase().includes(this.filterCity.toLowerCase())) && (!this.filterType || e.type ? .toLowerCase().includes(this.filterType.toLowerCase())) && (!this.filterPostalZipCode || e.postalZipCode.toLowerCase().includes(this.filterPostalZipCode.toLowerCase())) && (!this.filterName || e.name.toLowerCase().includes(this.filterName.toLowerCase())) && (!this.filterAccount || e.account.toLowerCase().includes(this.filterAccount.toLowerCase())) && (e.checked = !0);
            }), this.showSelectedCount();
        }
        onFilterChange() {
            this.selectAll = !1;
        }
        clearAccountFilter() {
            this.filterAccount = "", this.filterName = "", this.filterCity = "", this.filterTerritory = "", this.filterType = "", this.filterPostalZipCode = "";
        }
        onOnlySelected() {
            this.onlySelected ? (this.clearAccountFilter(), this.displayAccounts = this.displayAccounts.filter(e => e.checked)) : this.reloadDisplayAccounts();
        }
        onOnlySelectedGroup() {
            this.onlySelected ? this.groups = this.groups.filter(e => e.checked) : this.groups = this.backupGroups;
        }
        onCancel(e) {
            e.isExpanded$.next(!1);
        }
        onDone(e) {
            let i = this.displayAccounts.filter(n => n.checked);
            this.displayAccounts = this.user.userData.accounts, this.onlySelected = !1, this.displayAccounts.forEach(n => {
                i.forEach(a => {
                    a.account === n.account && a.type === n.type && (n.checked = !0);
                });
            }), i.forEach(n => {
                delete n.checked;
            }), this.user.userData.view.signature.selectedAccountList = i, Po.setAccountSummary(this.user.userData.view.signature), this.displayAccounts.length === this.user.userData.view.signature.selectedAccountList.length && (this.user.userData.view.signature.accountSummary = "All Accounts", (this.displayAccounts || []).forEach(n => n.checked = !0), this.selectAll = !0, this.cdr.detectChanges()), this.selectAccountsSelected(), this.onDataSourceChange(), this.onCancel(e);
        }
        onDoneGroup(e) {
            let i = this.groups.filter(n => n.checked);
            i.forEach(n => {
                let a = n.accounts.map(o => o.account);
                for (let o = 0; o < a.length; o++)
                    for (let s = 0; s < this.displayAccounts.length; s++) this.displayAccounts[s].account === a[o] && (this.displayAccounts[s].checked = !0);
                delete n.checked;
            }), this.user.userData.view.signature.selectedGroupList = i, this.selectGroupsSelected(), this.onDone(e);
        }
        expandedGroup(e) {
            this.expandedGroupName.includes(e) ? this.expandedGroupName = this.expandedGroupName.filter(i => i !== e) : this.expandedGroupName.push(e);
        }
        updateLastRefresh() {
            this.timerCounter > 60 || (this.timerCounter++, this.lastRefresh = "Updated" + ": ", this.timerCounter === 1 ? this.lastRefresh += this.timerCounter + " " + "minute ago" : this.timerCounter > 1 && this.timerCounter < 60 ? this.lastRefresh += this.timerCounter + " " + "minutes ago" : this.timerCounter >= 60 ? this.lastRefresh += " " + "Over an hour ago" : this.lastRefresh += " ?");
        }
        resetLastRefresh() {
            this.lastRefresh = "Updated" + ": ", this.lastRefresh += " " + "Just Now", this.timerCounter = 0, clearInterval(this.timerId), this.ngZone.runOutsideAngular(() => {
                this.timerId = setInterval(() => {
                    this.ngZone.run(() => this.updateLastRefresh());
                }, this.timerInterval);
            });
        }
        showSave() {
            this.saveDialog = !0;
        }
        viewChanged(e) {
            let i = e ? .value ? ? e;
            if (i && typeof i == "object" && (this.currentView = i), this.isWatchlistRedirect && (this.isWatchlistRedirect = !1, this.watchlistRedirectLabel = void 0), this.drillLevel = 0, !!this.loadView(this.currentView)) {
                if (this.displayAccounts = [...this.user.userData.accounts], this.displayAccounts.forEach(a => a.checked = !1), this.user.userData.view.signature.selectedAccountList.length)
                    for (let a of this.user.userData.view.signature.selectedAccountList) this.displayAccounts.forEach(o => {
                        o.account === a.account && o.type === a.type && (o.checked = !0);
                    });
                this.onDataSourceChange(), this.getSelectedRows();
            }
        }
        saveView() {
            this.willOverwriteView ? this.saveCurrentView() : this.saveNewView();
        }
        saveNewView() {
            if (this.validateViewName()) {
                for (let i = 0; i < this.user.userData.views.length; i++)
                    if (this.user.userData.views[i].name ? .toLowerCase() === this.saveAsViewName.toLowerCase()) {
                        this.user.userData.views[i] = JSON.parse(JSON.stringify(this.user.userData.view)), this.user.userData.views[i].name = this.saveAsViewName, this.currentView = this.user.userData.views[i], this.saveDialog = !1, this.authService.updateSettings(), this.getSelectedRows();
                        return;
                    }
                let e = JSON.parse(JSON.stringify(this.user.userData.view));
                e.name = this.saveAsViewName, e.id = e.name, e.isProtected = !1, e.isDefault = !1, this.user.userData.views.push(e), this.currentView = this.user.userData.views[this.user.userData.views.length - 1], this.user.userData.view = JSON.parse(JSON.stringify(this.currentView)), this.saveDialog = !1, this.authService.updateSettings(), this.getSelectedRows();
            }
        }
        validateViewName() {
            return this.isReservedViewName = !1, this.saveAsViewName.trim().toLowerCase() === this.reservedViewName.toLowerCase() ? (this.isReservedViewName = !0, !1) : !0;
        }
        saveCurrentView() {
            if (this.user.userData.view.name !== void 0) {
                for (let e = 0; e < this.user.userData.views.length; e++)
                    if (this.user.userData.views[e].name ? .toLowerCase() === this.user.userData.view.name.toLowerCase()) {
                        this.user.userData.views[e] = JSON.parse(JSON.stringify(this.user.userData.view)), this.saveDialog = !1;
                        let i = this.user.userData.views[e];
                        i && (this.currentView = i);
                        try {
                            this.authService.updateSettings();
                        } catch (n) {
                            console.log("authService.updateSettings", n);
                        }
                        Po.setAccountSummary(this.user.userData.view.signature), this.getSelectedRows(), this.cdr.detectChanges();
                        return;
                    }
            }
        }
        loadView(e) {
            if (this.user.userData.view = JSON.parse(JSON.stringify(e)), this.currentView = e, this.authService.isSelectOrganisationAuthorised())
                if (e.signature.selectedOrganizationId) this.authService.loadAccountsForOrganization(e.signature.selectedOrganizationId, this.user.userData).subscribe({
                    next: i => {},
                    error: i => {
                        console.log(i);
                    }
                });
                else return this.authService.showOrgPopup$.next(!0), !1;
            return this.willOverwriteView = !this.currentView ? .isProtected, e.signature.shipDateFrom && e.signature.shipDateTo && (this.creationDateRange = [new Date(e.signature.shipDateFrom), new Date(e.signature.shipDateTo)]), e.signature.deliveryDateFrom && e.signature.deliveryDateTo && (this.deliveryDateRange = [new Date(e.signature.deliveryDateFrom), new Date(e.signature.deliveryDateTo)]), !0;
        }
        getDefaultView(e) {
            for (let i = 0; i < e.userData.views.length; i++)
                if (e.userData.views[i].isDefault && e.userData.views[i].visualizations.length > 0) return e.userData.views[i];
            return e.userData.views.length > 0 && e.userData.views[0].visualizations.length > 0 || (e.userData.views.push(new fm()), this.user.createDefaultView(e.userData.views[0]), this.lookupDataService.getAllByGroup("column").subscribe(i => {
                xl.updateColumnHeader(i, this.localeService.getLocale(), e.userData.views[0].columns);
            })), e.userData.views[0];
        }
        showVisualization(e) {
            return e < this.user.userData.view.visualizations.length && this.user.userData.view.visualizations[e].isVisible;
        }
        togglePanel(e, i) {
            e.toggle(i);
        }
        setChartType(e, i) {
            this.user.getOptions(e), this.user.sortVisualizations(this.user.userData.view), i ? .hide();
        }
        initialData(e = "receivercountrycode") {
            let i = this.dataRequestBody();
            i.groupKey = e, this.apiService.visualizationGetvisualizationdataPost$Response({
                body: i
            }).subscribe(n => {
                let a = n.body;
                if (a.length === 0) {
                    this.destinationHomeLevel = this.drillLevel, this.onDataSourceChange();
                    return;
                }
                a.length > 1 || this.drillLevel >= 2 ? (this.destinationHomeLevel = this.drillLevel, this.onDataSourceChange()) : (this.drillLevel += 1, this.drillLevel == 1 ? (this.levels.countryFilter = a[0].key, this.user.userData.view.visualizations[this.levels.visualizationIndex].groupKey = "receiverprovincestate", this.initialData("receiverprovincestate")) : this.drillLevel == 2 && (this.levels.stateProvinceFilter = a[0].key, this.user.userData.view.visualizations[this.levels.visualizationIndex].groupKey = "receivercity", this.destinationHomeLevel = this.drillLevel, this.onDataSourceChange())), this.isApiError = !1;
                let o = this.errorSections.indexOf(i.groupKey);
                o > -1 && this.errorSections.splice(o, 1);
            }, n => {
                console.log("initial data: ", n), this.isApiError = !0, this.errorSections.push(i.groupKey), n.status === 504 && (this.errorMessage = "Please re-try as it is timed out due to the heavy load");
            });
        }
        getVisualizationLevel(e) {
            let i = this.levelMap.get(e) ? .level;
            if (typeof i > "u") return 1;
            let n = this[i];
            return typeof n == "number" ? Number(n) : n ? 2 : 1;
        }
        moveUpVisualizationLevel(e) {
            let i = this.getVisualizationLevel(e);
            if (i === 1 && e !== this.PUROLATOR4) return;
            if (i === 0 && e === this.PUROLATOR4) return;
            let n = this.levelMap.get(e),
                a = n ? .level;
            if (typeof n > "u" || typeof a > "u") throw Error(`Visualization with ID ${e} has no level.`);
            let o;
            e === this.PUROLATOR4 ? o = n.filters[i - 1] : o = n.filters[i - 2];
            let s = this.user.userData.view.signature.filters.findIndex(c => c.id === o.id);
            if (this.user.userData.view.signature.filters.splice(s, 1), e === this.PUROLATOR4)
                for (let c of this.user.userData.view.signature.filters) c.visualizationId === e && (c.isRemovable = !0);
            if (typeof this[a] == "boolean" ? this[a] = !1 : this[a] = i - 1, typeof i == "number" && i <= n.filters.length) {
                for (let c of this.user.userData.view.visualizations)
                    if (c.id === e) {
                        c.groupKey = n.filters[i - 1].field;
                        break;
                    }
            }
            this.onDataSourceChange();
        }
        moveDownVisualizationLevel(e, i) {
            if (typeof e ? .name > "u") return;
            let n = this.levelMap.get(i),
                a = n ? .level;
            if (typeof n > "u" || typeof a > "u") return;
            let o = this[a];
            o === !0 || typeof o == "number" && o >= n.filters.length || this.lookupDataService.getItemCode(e.name).subscribe(s => {
                let l = s,
                    c = o === !1 ? n.filters[0] : n.filters[o],
                    u = new T1();
                if (u.id = c.id, u.name = c.name, u.field = c.field, u.value = l, u.displayLabel = e.name, u.visualizationId = i, u.isRemovable = !0, i === this.PUROLATOR4)
                    for (let h of this.user.userData.view.signature.filters) h.visualizationId === i && (h.isRemovable = !1);
                if (this.user.userData.view.signature.filters.push(u), typeof o == "boolean" ? this[a] = !0 : this[a] = o + 1, typeof o == "number" && o < n.filters.length - 1) {
                    for (let h = 0; h < this.user.userData.view.visualizations.length; h++)
                        if (this.user.userData.view.visualizations[h].id === i) {
                            this.user.userData.view.visualizations[h].groupKey = n.filters[o + 1].field;
                            break;
                        }
                }
                this.onDataSourceChange();
            });
        }
        onFilterRemove(e) {
            var i = this.user.userData.view.signature.filters.findIndex(n => n.displayLabel === e);
            if (i >= 0) {
                let n = this.user.userData.view.signature.filters[i];
                if (n.visualizationId === this.PUROLATOR4) this.moveUpVisualizationLevel(n.visualizationId);
                else {
                    let a = this.levelMap.get(n.visualizationId);
                    a && (this[a.level] = !1), this.user.userData.view.signature.filters.splice(i, 1), this.onDataSourceChange();
                }
            }
        }
        clearFiltersFromPins() {
            this.drillLevel = 0, this.destinationHomeLevel = 0;
            for (let i of this.levelMap) i[0] !== this.PUROLATOR4 && (this[i[1].level] = !1);
            let e = this.levelMap.get(this.PUROLATOR4);
            this.drillLevel = this.destinationHomeLevel;
            for (let i = 0; i < this.user.userData.view.visualizations.length; i++)
                if (this.user.userData.view.visualizations[i].id === this.PUROLATOR4) {
                    this.user.userData.view.visualizations[i].groupKey = e.filters[this.destinationHomeLevel].field;
                    break;
                }
            this.user.userData.view.signature.filters.length = 0;
        }
        clearFilters() {
            this.clearFiltersFromPins(), this.onDataSourceChange();
        }
        getData(e) {
            if (this.user.userData.view.visualizations[e].groupKey === "" || this.user.userData.view.visualizations[e].externalDataSource) {
                console.log("Visualiation[" + e + "] skipped.");
                return;
            }
            let i = this.lookupDataService.lookupsDescriptions$,
                n = this.dataRequestBody(e),
                a = this.apiService.visualizationGetvisualizationdataPost$Response({
                    body: n
                }),
                o = Wu([i, a]).pipe(G2(([l, c]) => {
                    let u = c.body;
                    this.updateVisualizationSeries(u, e, l), this.updateDataGridRecordCount(e), this.isApiError = !1;
                    let h = this.errorSections.indexOf(n.groupKey);
                    h > -1 && this.errorSections.splice(h, 1);
                }), j2(l => (console.log("getData Error: ", l), this.isApiError = !0, this.errorSections.push(n.groupKey), l.status === 504 && (this.errorMessage = "Please re-try as it is timed out due to the heavy load"), this.updateVisualizationSeries([], e), this.updateDataGridRecordCount(e), z2(null)))),
                s = this.visualizationRequestQueue$;
            s && typeof s.next == "function" ? s.next(o) : o.subscribe();
        }
        updateVisualizationSeries(e, i, n) {
            this.initializeVisualizationSeries(i);
            let a = this.getDescriptionTable(i),
                o = e.map(s => this.processResponseItem(s, a, n));
            this.finalizeVisualizationSeries(i, o);
        }
        initializeVisualizationSeries(e) {
            this.user.userData.view.visualizations[e].series = [], this.user.userData.view.visualizations[e].series.push({
                name: "",
                data: []
            });
        }
        processResponseItem(e, i, n) {
            return i && e.key && e.key !== "null" ? {
                key: this.getLookupValue(e.key, i, n),
                value: e.value || 0
            } : {
                key: e.key || "Undefined",
                value: e.value || 0
            };
        }
        getLookupValue(e, i, n) {
            return !n ? .[i] || !Array.isArray(n[i]) ? e : n[i].find(o => o ? .hasOwnProperty("code") && o.code === e) ? .[this.localeService.getLocale()] || e;
        }
        finalizeVisualizationSeries(e, i) {
            this.user.userData.view.visualizations[e].series[0].data = i, this.user.userData.view.visualizations[e].series[0].data.sort((n, a) => n.key < a.key ? -1 : 1), this.user.getOptions(this.user.userData.view.visualizations[e]);
        }
        getDescriptionTable(e) {
            switch (this.user.userData.view.visualizations[e].groupKey) {
                case "packagestatuscode":
                    return "packageStatus";
                case "packagestatussubcode":
                    return "packageSubStatus";
                case "productcode":
                    return "product";
                case "shipmenttype":
                    return "shipmentType";
                default:
                    return "";
            }
        }
        updateDataGridRecordCount(e) {
            if (this.user.userData.view.visualizations[e].id === "Purolator1" && this.dataGrid !== void 0 && this.dataGrid !== null) {
                this.dataGrid.recordCount = 0;
                for (let i of this.user.userData.view.visualizations[e].series[0].data) this.dataGrid.recordCount += i.value;
            }
        }
        getDetails(e) {
            this.dataGrid ? .load([], !1);
            let i = this.lookupDataService.lookupsDescriptions$,
                n = {
                    body: this.detailRequestBody()
                };
            this.setColumnNames(n, e), n.body.currentUserId = this.user.userData.id, this.dataGrid ? .setVisualizationDetailsApiParams(n);
            let a = this.apiService.visualizationGetvisualizationdetailsPost$Response(n);
            this.getDetailsSubscription && this.getDetailsSubscription.unsubscribe(), this.getDetailsSubscription = Wu([i, a]).subscribe(o => {
                let s = o[0],
                    l = o[1].body;
                this.processResponse(l, n, s);
            }, o => {
                console.log("getDetails Error: ", o), o.status === 504 ? this.errorMessage = "Please re-try as it is timed out due to the heavy load" : o.status === 413 && (this.errorMessage = "Please reduce the timeframe or number of shipping accounts in your query or use reporting feature"), this.dataGrid !== void 0 && this.dataGrid.load([], !1, !0, this.errorMessage);
            });
        }
        onChartInit(e, i) {
            if (!e || this.chartResizeState.has(e)) return;
            let n = e.getDom ? .();
            if (!n || typeof ResizeObserver > "u") return;
            let a = n.getBoundingClientRect(),
                o = a.width,
                s = a.height,
                l = {
                    observer: new ResizeObserver(c => {
                        let u = c[0];
                        if (!u) return;
                        let h = u.contentRect,
                            d = h.width,
                            f = h.height,
                            m = Math.abs(d - l.lastWidth),
                            _ = Math.abs(f - l.lastHeight),
                            x = 2;
                        m <= x && _ <= x || (l.lastWidth = d, l.lastHeight = f, l.rafId != null && typeof cancelAnimationFrame == "function" && cancelAnimationFrame(l.rafId), this.ngZone.runOutsideAngular(() => {
                            l.rafId = typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => {
                                try {
                                    e.resize();
                                } catch (g) {
                                    console.error("Error during chart.resize():", g);
                                } finally {
                                    l.rafId = null;
                                }
                            }) : setTimeout(() => {
                                try {
                                    e.resize();
                                } catch (g) {
                                    console.error("Error during chart.resize() via timeout:", g);
                                } finally {
                                    l.rafId = null;
                                }
                            }, 0);
                        }));
                    }),
                    lastWidth: o,
                    lastHeight: s,
                    rafId: null
                };
            this.chartResizeState.set(e, l), l.observer.observe(n);
        }
        setColumnNames(e, i) {
            if (i && i.length > 0) e.body.columnNames = i, this.previousColumnNames = i;
            else if (this.previousColumnNames) e.body.columnNames = this.previousColumnNames;
            else {
                let a = this.user.createDefaultColumns().filter(o => o.isDisplayed).map(o => o.field);
                e.body.columnNames = a;
            }
        }
        processResponse(e, i, n) {
            if (!this.dataGrid) return;
            let a;
            if (n && typeof n == "object") {
                let u = this.localeService.getLocale(),
                    h = d => {
                        let f = n[d];
                        if (!Array.isArray(f)) return {};
                        let m = {};
                        for (let _ of f) {
                            let x = _ ? .code;
                            if (!x) continue;
                            let g = _[u] ? ? _.en ? ? _.fr ? ? x;
                            m[x] = g;
                        }
                        return m;
                    };
                a = {
                    productMap: h("product"),
                    packageStatusMap: h("packageStatus"),
                    shipmentTypeMap: h("shipmentType"),
                    lastScanEventReasonMap: h("lastScanEventReason"),
                    packageSubStatusMap: h("packageSubStatus")
                };
            }
            let o = Array.isArray(e) ? e : [],
                s = o.length,
                l = 200,
                c = u => {
                    let h = Math.min(u + l, s);
                    for (let d = u; d < h; d++) {
                        let f = o[d];
                        this.processRow(f, a);
                    }
                    h < s ? (typeof requestAnimationFrame == "function" ? requestAnimationFrame : f => setTimeout(f, 0))(() => c(h)) : this.dataGrid && (this.dataGrid.isOnFilter = !this.isEmptyObject(i.body.filters) || !this.isEmptyObject(i.body.pins), this.dataGrid.load(o, !1), this.processExternalData(o));
                };
            s > 0 ? c(0) : this.dataGrid && (this.dataGrid.isOnFilter = !this.isEmptyObject(i.body.filters) || !this.isEmptyObject(i.body.pins), this.dataGrid.load([], !1), this.processExternalData([]));
        }
        processRow(e, i) {
            if (i) {
                let {
                    productMap: n,
                    packageStatusMap: a,
                    shipmentTypeMap: o,
                    lastScanEventReasonMap: s,
                    packageSubStatusMap: l
                } = i;
                if (e.productcode && (e.productcode = n[e.productcode] ? ? e.productcode), e.packagestatuscode) {
                    let c = e.packagestatuscode,
                        u = a[c];
                    u && (e.packagestatuscodedisplayvalue = u);
                }
                e.shipmenttype && (e.shipmenttype = o[e.shipmenttype] ? ? e.shipmenttype), e.lastScanEventReasonCode && (e.lastScanEventReasonCode = s[e.lastScanEventReasonCode] ? ? e.lastScanEventReasonCode), e.packagestatussubcode && (e.packagestatussubcode = l[e.packagestatussubcode] ? ? e.packagestatussubcode);
            }
            e.returnshipment && (e.returnshipment = e.returnshipment === "true" ? "Yes" : "No");
        }
        processExternalData(e) {
            for (let i of this.user.userData.view.visualizations) i.externalDataSource && (i.externalData = {
                data: e
            }, this.user.createSeriesExternal(i));
        }
        isEmptyObject(e) {
            return Object.keys(e).length === 0;
        }
        formatDate(e) {
            if (e === void 0) return "";
            let i = e.getMonth() + 1,
                n = e.getDate();
            return [e.getFullYear(), (i > 9 ? "" : "0") + i, (n > 9 ? "" : "0") + n].join("-");
        }
        dataRequestBody(e) {
            let i = this.buildAccountList(),
                n = {};
            for (let o = 0; o < this.user.userData.view.signature.filters.length; o++) this.user.userData.view.signature.filters[o].isDbField && (n[this.user.userData.view.signature.filters[o].field] = this.user.userData.view.signature.filters[o].value);
            e !== void 0 && this.user.userData.view.visualizations[e].id === "Purolator6" && (n.packagestatuscode === void 0 ? n.packagestatuscode = "ATT" : n.packagestatuscode !== "ATT" && (n.packagestatuscode = "XX-NODATA-XX"));
            let a = {
                accountNumbers: i,
                deliveryDateEnd: this.formatDate(this.user.userData.view.signature.deliveryDateTo),
                deliveryDateStart: this.formatDate(this.user.userData.view.signature.deliveryDateFrom),
                filters: n,
                pins: this.user.userData.view.signature.pins,
                shipmentDateEnd: this.formatDate(this.user.userData.view.signature.shipDateTo),
                shipmentDateStart: this.formatDate(this.user.userData.view.signature.shipDateFrom),
                impersonating: this.authService.isImpersonating ? this.user.userData.id : "",
                groupKey: e !== void 0 ? this.user.userData.view.visualizations[e].groupKey : "vision"
            };
            return this.addValidAccountsToRequest(a), e !== void 0 && (a.lineOfBusinessIds = this.user.userData.view.signature.businessLines), a;
        }
        addValidAccountsToRequest(e) {
            if (!this.authService.hasAccess(hm) && this.user.userData.accounts.length > 0) {
                e.validAccountNumbers = [];
                for (let i = 0; i < this.user.userData.accounts.length; i++) this.isFreightAccount(this.user.userData.accounts[i] ? .type) || e.validAccountNumbers.push(this.user.userData.accounts[i].account);
            }
        }
        isFreightAccount(e) {
            return (e ? ? "").trim().toLowerCase() === "freight";
        }
        buildAccountList() {
            let e = [];
            if (this.user.userData.view.signature.selectedAccountList.length === 0) {
                if (this.authService.hasAccess(hm) && this.user.userData.view.signature.pins.length > 0) return [];
                for (let i = 0; i < this.user.userData.accounts.length; i++) this.isFreightAccount(this.user.userData.accounts[i] ? .type) || e.push(this.user.userData.accounts[i].account);
            } else
                for (let i = 0; i < this.user.userData.view.signature.selectedAccountList.length; i++) {
                    let n = this.user.userData.view.signature.selectedAccountList[i];
                    this.isFreightAccount(n ? .type) || e.push(n.account);
                }
            return e;
        }
        detailRequestBody(e) {
            let i = this.buildAccountList(),
                n = {};
            for (let o = 0; o < this.user.userData.view.signature.filters.length; o++) this.user.userData.view.signature.filters[o].isDbField && (n[this.user.userData.view.signature.filters[o].field] = this.user.userData.view.signature.filters[o].value);
            let a = {
                accountNumbers: i,
                deliveryDateEnd: this.formatDate(this.user.userData.view.signature.deliveryDateTo),
                deliveryDateStart: this.formatDate(this.user.userData.view.signature.deliveryDateFrom),
                filters: n,
                pins: this.user.userData.view.signature.pins,
                shipmentDateEnd: this.formatDate(this.user.userData.view.signature.shipDateTo),
                shipmentDateStart: this.formatDate(this.user.userData.view.signature.shipDateFrom)
            };
            return this.addValidAccountsToRequest(a), e !== void 0 && (a.lineOfBusinessIds = this.user.userData.view.signature.businessLines), a;
        }
        creationLast7() {
            let e = new Date(Date.now() - 6048e5),
                i = new Date();
            this.creationDateRange = [e, i], this.creationDisabled = !0, Po.setShipDateSelected(this.user.userData.view.signature, this.user.userData.view.signature.shipDateOption);
        }
        creationLast14() {
            let e = new Date(Date.now() - 12096e5),
                i = new Date();
            this.creationDateRange = [e, i], this.creationDisabled = !0, Po.setShipDateSelected(this.user.userData.view.signature, this.user.userData.view.signature.shipDateOption);
        }
        creationCustom() {
            this.creationDisabled = !1, this.user.userData.view.signature.shipDateSelected = "custom";
        }
        creationNone() {
            this.creationDateRange = null, this.creationDisabled = !0, this.user.userData.view.signature.shipDateSelected = "";
        }
        applyCreationDate(e, i) {
            this.user.userData.view.signature.shipDateOption === "last7" || this.user.userData.view.signature.shipDateOption === "last14" || this.creationDateRange != null && Po.setShipDateSelected(this.user.userData.view.signature, this.user.userData.view.signature.shipDateOption, this.creationDateRange), this.onDataSourceChange(), (i || this.creationDateEditor) ? .isExpanded$.next(!1);
        }
        deliveryNext7() {
            let e = new Date(Date.now() + 6048e5),
                i = new Date();
            this.deliveryDateRange = [i, e], this.deliveryDisabled = !0, Po.setDeliveryDateSelected(this.user.userData.view.signature, this.user.userData.view.signature.deliveryDateOption);
        }
        deliveryNext14() {
            let e = new Date(Date.now() + 12096e5),
                i = new Date();
            this.deliveryDateRange = [i, e], this.deliveryDisabled = !0, Po.setDeliveryDateSelected(this.user.userData.view.signature, this.user.userData.view.signature.deliveryDateOption);
        }
        deliveryCustom() {
            this.deliveryDisabled = !1, this.user.userData.view.signature.deliveryDateSelected = "Custom";
        }
        deliveryNone() {
            this.deliveryDateRange = null, this.deliveryDisabled = !0, this.user.userData.view.signature.deliveryDateSelected = "";
        }
        applyDeliveryDate(e, i) {
            this.user.userData.view.signature.deliveryDateOption === "next7" || this.user.userData.view.signature.deliveryDateOption === "next14" || this.deliveryDateRange != null && Po.setDeliveryDateSelected(this.user.userData.view.signature, this.user.userData.view.signature.deliveryDateOption, this.deliveryDateRange), this.onDataSourceChange(), (i || this.deliveryDateEditor) ? .isExpanded$.next(!1);
        }
        handlePinFile(e) {
            let i = e.target.files[0];
            if (i.type !== "text/plain" && i.type !== "text/csv") {
                this.pinWarningMessage = "Please upload a valid CSV file", this.showPinWarning = !0;
                return;
            }
            this.showPinWarning = !1;
            let n = new FileReader();
            n.onloadend = a => {
                let o = n.result,
                    s = [];
                o !== null && (s = o.replace(/\r?\n/g, ",").split(",")), this.user.userData.view.signature.pinText = "";
                for (let l = 0; l < s.length; l++) s[l].trim() !== "" && (this.user.userData.view.signature.pinText += s[l].trim() + `
`);
                setTimeout(() => {
                    e.target.value = null;
                }, 0);
            }, n.readAsText(i);
        }
        clearShipmentPins(e) {
            this.user.userData.view.signature.pinText = "", this.user.updatePinEntry(), this.showPinWarning = !1, e.value = null;
        }
        applyPinEntry(e, i) {
            this.clearFiltersFromPins(), this.user.updatePinEntry();
            let n = i || this.pinEditor;
            if (e === void 0 || n === void 0 || this.user.userData.view.signature.pins.length > this.dashboardPinLimit) {
                this.user.userData.view.signature.pins.length > this.dashboardPinLimit && (this.showPinWarning = !0, this.pinWarningMessage = "You have exceeded the maximum of 3,000 PINs.  Please reduce your query to 3,000 or less PINs");
                return;
            }
            let a = new Po();
            this.user.userData.view.signature.selectedAccountList = a.selectedAccountList, this.user.userData.view.signature.shipDateOption = a.shipDateOption, this.user.userData.view.signature.deliveryDateOption = a.deliveryDateOption, this.user.userData.view.signature.filters = a.filters, this.user.userData.view.signature.accountSummary = a.accountSummary, this.user.userData.view.signature.pinText === "" ? this.viewChanged() : (this.user.userData.view.signature.shipDateOption = void 0, this.user.userData.view.signature.deliveryDateOption = void 0, this.onDataSourceChange()), n.isExpanded$.next(!1);
        }
        onDataSourceChange() {
            if (this.dataSource = "", this.user.userData.view.signature.shipDateFrom = void 0, this.user.userData.view.signature.shipDateTo = void 0, this.user.userData.view.signature.deliveryDateFrom = void 0, this.user.userData.view.signature.deliveryDateTo = void 0, this.user.userData.view.signature.shipDateOption === "last7") this.user.userData.view.signature.shipDateFrom = this.user.minDate(7), this.user.userData.view.signature.shipDateTo = new Date(), this.creationLast7();
            else if (this.user.userData.view.signature.shipDateOption === "last14") this.user.userData.view.signature.shipDateFrom = this.user.minDate(14), this.user.userData.view.signature.shipDateTo = new Date(), this.creationLast14();
            else if (!this.user.userData.view.signature.shipDateOption) this.creationNone();
            else if (this.creationDateRange != null) {
                let a = this.creationDateRange.toString().split(",");
                this.user.userData.view.signature.shipDateFrom = new Date(a[0]), this.user.userData.view.signature.shipDateTo = a[1] !== "" ? new Date(a[1]) : new Date(a[0]);
            }
            if (this.user.userData.view.signature.deliveryDateOption === "next7") this.user.userData.view.signature.deliveryDateFrom = new Date(), this.user.userData.view.signature.deliveryDateTo = this.user.maxDate(7), this.deliveryNext7();
            else if (this.user.userData.view.signature.deliveryDateOption === "next14") this.user.userData.view.signature.deliveryDateFrom = new Date(), this.user.userData.view.signature.deliveryDateTo = this.user.maxDate(14), this.deliveryNext14();
            else if (!this.user.userData.view.signature.deliveryDateOption) this.deliveryNone();
            else if (this.deliveryDateRange != null) {
                let a = this.deliveryDateRange.toString().split(",");
                this.user.userData.view.signature.deliveryDateFrom = new Date(a[0]), this.user.userData.view.signature.deliveryDateTo = a[1] !== "" ? new Date(a[1]) : new Date(a[0]);
            }
            if (typeof this.destinationHomeLevel > "u") {
                for (let a = 0; a < this.user.userData.view.visualizations.length; a++)
                    if (this.user.userData.view.visualizations[a].destinationDrill) {
                        this.levels.visualizationIndex = a, this.initialData();
                        return;
                    }
            }
            for (let a = 0; a < this.user.userData.view.visualizations.length; a++)(this.user.userData.view.visualizations[a].isVisible && !this.user.userData.view.visualizations[a].externalDataSource || this.user.userData.view.visualizations[a].id === "Purolator1") && (this.user.userData.view.visualizations[a].options = {}, this.getData(a));
            let e = this.dataGrid ? .activeColumns(),
                i = [];
            if (e && e.length > 0) {
                let a = e.filter(o => o.isDisplayed).map(o => o.field);
                i = a, a.includes("packagepin") || (i = ["packagepin"].concat(a));
            }
            this.user.userData.view.signature.pins.length > 0 && this.dataGrid ? .setDefaultSortField(""), this.getDetails(i), this.getSelectedRows(), this.resetLastRefresh();
        }
        sortObjectArray(e, i) {
            e.sort((n, a) => {
                let o = n[i].toLowerCase(),
                    s = a[i].toLowerCase();
                return o < s ? -1 : o > s ? 1 : 0;
            });
        }
        ngOnDestroy() {
            this.timerId && clearInterval(this.timerId), this.datagridRefreshSubscription && this.datagridRefreshSubscription.unsubscribe(), this.getDetailsSubscription && this.getDetailsSubscription.unsubscribe(), this.visualizationRequestQueueSub && this.visualizationRequestQueueSub.unsubscribe(), this.chartResizeState.forEach((e, i) => {
                e.observer && e.observer.disconnect(), e.rafId != null && typeof cancelAnimationFrame == "function" && cancelAnimationFrame(e.rafId), i && typeof i.dispose == "function" && i.dispose();
            }), this.chartResizeState.clear();
        }
        static {
            this.ɵfac = function(i) {
                return new(i || t)(li(Pd), li(rx), li(tx), li(fd), li(md), li(Od), li(Id), li(hd), li(gd), li(od));
            };
        }
        static {
            this.ɵcmp = Sn({
                type: t,
                selectors: [
                    ["app-dashboard"]
                ],
                viewQuery: function(i, n) {
                    if (i & 1 && (Oi(E9, 5), Oi(P9, 5), Oi(I9, 5), Oi(O9, 5)), i & 2) {
                        let a;
                        Nt(a = Lt()) && (n.dataGrid = a.first), Nt(a = Lt()) && (n.creationDateEditor = a.first), Nt(a = Lt()) && (n.deliveryDateEditor = a.first), Nt(a = Lt()) && (n.pinEditor = a.first);
                    }
                },
                decls: 28,
                vars: 18,
                consts: () => {
                    let e;
                    e = "Shipment Date";
                    let i;
                    i = "Estimated Delivery Date";
                    let n;
                    n = "PINs";
                    let a;
                    a = "Tracking Dashboard";
                    let o;
                    o = "Clear All";
                    let s;
                    s = "Selected Organization:";
                    let l;
                    l = "Selected Organization:";
                    let c;
                    c = "Select a Date Range";
                    let u;
                    u = "Last 7 days";
                    let h;
                    h = "Last 14 days";
                    let d;
                    d = "Custom";
                    let f;
                    f = "None";
                    let m;
                    m = "Clear";
                    let _;
                    _ = " Atleast one of Creation Date or Estimated Delivery Date Range is required. ";
                    let x;
                    x = "Filter";
                    let g;
                    g = "Select a Date Range";
                    let b;
                    b = "Next 7 days";
                    let w;
                    w = "Next 14 days";
                    let T;
                    T = "Custom";
                    let E;
                    E = "None";
                    let L;
                    L = "Clear";
                    let P;
                    P = " Atleast one of Creation Date or Estimated Delivery Date Range is required. ";
                    let k;
                    k = "Filter";
                    let A;
                    A = "Cancel";
                    let N;
                    N = "Done";
                    let C;
                    C = "Cancel";
                    let F;
                    F = "Done";
                    let W;
                    W = "Select Accounts/Groups";
                    let I;
                    I = "" + "\uFFFD0\uFFFD" + "\xA0 selected";
                    let U;
                    U = "Show only selected\xA0";
                    let le;
                    le = "Accounts";
                    let H;
                    H = "Groups";
                    let pe;
                    pe = "Loading... ";
                    let _e;
                    _e = "Loading... ";
                    let Fe;
                    Fe = "Select All";
                    let Te;
                    Te = "Province/State";
                    let O;
                    O = "City";
                    let j;
                    j = "Postal Code";
                    let X;
                    X = "Account Name";
                    let me;
                    me = "Account Type";
                    let xe;
                    xe = "Account Number";
                    let be;
                    be = "No groups available.";
                    let B;
                    B = " " + "\uFFFD0\uFFFD" + " Accounts " + "\uFFFD#10\uFFFD" + "" + "\uFFFD/#10\uFFFD" + "";
                    let ne;
                    ne = "Select PINs to Include";
                    let Z;
                    Z = " Enter up to 3,000 PINs, one per line or comma separated, or upload a CSV file. ";
                    let J;
                    J = "Upload CSV";
                    let ye;
                    ye = "Clear";
                    let je;
                    je = "Filter";
                    let Qe;
                    Qe = "Save Current Filters and Settings";
                    let q;
                    q = "Save Current View";
                    let ze;
                    ze = " Update current view (" + "\uFFFD#11\uFFFD" + "" + "\uFFFD0\uFFFD" + "" + "\uFFFD/#11\uFFFD" + ") ";
                    let gt;
                    gt = "Create new view";
                    let ft;
                    ft = " is a standard view provided by Purolator and cannot be changed.";
                    let Re;
                    Re = "Cancel";
                    let pt;
                    pt = "Save View";
                    let ct;
                    ct = "Visualizations";
                    let xt;
                    xt = "Chart Type";
                    let yt;
                    return yt = "Packages", [
                        ["creationDateEditor", ""],
                        ["pCreationCalendar", ""],
                        ["deliveryDateEditor", ""],
                        ["pDeliveryCalendar", ""],
                        ["accountEditor", ""],
                        ["row", ""],
                        ["pinEditor", ""],
                        ["chooseFile", ""],
                        ["panel", ""],
                        ["pDataGrid", ""], a, o, s, l, c, u, h, d, f, m, _, x, g, b, w, T, E, L, P, k, W, I, U, le, H, pe, _e, Fe, Te, O, j, X, me, xe, be, B, ne, Z, J, ye, je, q, ze, gt, ft, Re, pt, ct, xt, yt, [1, "dashboard"],
                        [1, "dashboard_header"],
                        [1, "organization"],
                        ["class", "organizationName", 4, "ngIf"],
                        [4, "ngIf"],
                        ["pButton", "", "pRipple", "", "type", "button", "icon", "pi pi-refresh", "aria-label", "refresh", 1, "padding-left", "p-button-rounded", "p-button-text", 3, "click"],
                        ["inputId", "dropView", "id", "view-dropdown-green", "ariaLabel", "views dropdown", "aria-haspopup", "listbox", "optionLabel", "name", 1, "gap_left", 3, "ngModelChange", "ngClass", "autoDisplayFirst", "options", "ngModel", "ngModelOptions"],
                        ["pTemplate", "selectedItem"],
                        [1, "filter-controls", 2, "padding-block-start", "6px"],
                        [1, "filter-controls__dropdowns"],
                        ["label", e, "autofocus", "", 3, "value", "keydown.enter", "keydown.space", 4, "ngIf"],
                        ["label", i, "autofocus", "", 3, "value", 4, "ngIf"],
                        ["autofocus", "", "onKeyUp", "", 3, "label", "value", "click", 4, "ngIf"],
                        ["label", n, "autofocus", "", 3, "value", 4, "ngIf"],
                        [1, "filter-controls__more"],
                        ["class", "pur-chip", 3, "label", "removable", "onRemove", 4, "ngFor", "ngForOf"],
                        [1, "btn", "btn-sm", "btn-primary", 3, "click", "hidden"],
                        [1, "filter-controls__views"],
                        ["class", "save-dialog", 4, "ngIf"],
                        ["class", "visuals", 4, "ngIf"],
                        ["class", "data-grid", 4, "ngIf"],
                        [1, "organizationName"],
                        ["label", e, "autofocus", "", 3, "keydown.enter", "keydown.space", "value"],
                        ["role", "dialog"],
                        [1, "pur-overlaypanel-header"],
                        ["inputId", "range", "selectionMode", "range", 1, "pur-calendar", 3, "ngModelChange", "inline", "readonlyInput", "numberOfMonths", "disabled", "ngModel", "ngModelOptions", "autofocus", "tabIndex"],
                        [1, "filter-controls__footer"],
                        [1, "filter-controls__shortcuts", "pur-form", "pur-form--inline"],
                        [1, "pur-form-field"],
                        ["inputId", "creationLast7", "name", "creationSelection", "value", "last7", 1, "pur-radiobutton", 3, "click", "keydown.enter", "keydown.space", "ngModelChange", "ngModel", "ngModelOptions", "autofocus"],
                        ["for", "creationLast7"],
                        ["inputId", "creationLast14", "name", "creationSelection", "value", "last14", 1, "pur-radiobutton", 3, "click", "keydown.enter", "keydown.space", "ngModelChange", "ngModel", "ngModelOptions"],
                        ["for", "creationLast14"],
                        ["inputId", "creationCustom", "name", "creationSelection", "value", "custom", 1, "pur-radiobutton", 3, "click", "keydown.enter", "keydown.space", "ngModelChange", "ngModel", "ngModelOptions"],
                        ["for", "creationCustom"],
                        ["inputId", "creationNone", "name", "creationSelection", "value", "", 1, "pur-radiobutton", 3, "click", "keydown.enter", "keydown.space", "ngModelChange", "ngModel", "ngModelOptions"],
                        ["for", "creationNone"],
                        ["class", "p-error block", 4, "ngIf"],
                        [1, "filter-controls__actions", "pur-form", "pur-form--inline"],
                        ["type", "button", 1, "p-button", "pur-button", "pur-button--sm", "pur-button--outline", 3, "click"],
                        ["type", "button", "class", "p-button pur-button pur-button--sm pur-button--dark", 3, "click", 4, "ngIf"],
                        [1, "p-error", "block"],
                        ["type", "button", 1, "p-button", "pur-button", "pur-button--sm", "pur-button--dark", 3, "click"],
                        ["label", i, "autofocus", "", 3, "value"],
                        ["inputId", "deliveryNext7", "name", "creationSelection", "value", "next7", 1, "pur-radiobutton", 3, "click", "keydown.enter", "keydown.space", "ngModelChange", "ngModel", "ngModelOptions"],
                        ["inputId", "deliveryNext14", "name", "creationSelection", "value", "next14", 1, "pur-radiobutton", 3, "click", "keydown.enter", "keydown.space", "ngModelChange", "ngModel", "ngModelOptions"],
                        ["inputId", "deliveryCustom", "name", "creationSelection", "value", "custom", 1, "pur-radiobutton", 3, "click", "keydown.enter", "keydown.space", "ngModelChange", "ngModel", "ngModelOptions"],
                        ["inputId", "deliverynNone", "name", "creationSelection", "value", "", 1, "pur-radiobutton", 3, "click", "keydown.enter", "keydown.space", "ngModelChange", "ngModel", "ngModelOptions"],
                        ["autofocus", "", "onKeyUp", "", 3, "click", "label", "value"],
                        ["role", "dialog", 2, "max-width", "1471px"],
                        [1, "header_select"],
                        [1, "align"],
                        [1, "toggle-inline"],
                        [1, "toggle-btn", "toggle-inline"],
                        ["id", "only-selected-switch", 3, "ngModelChange", "ngModel", "ngModelOptions", "autofocus", "tabIndex"],
                        [1, "table_width", "accounts-tabview", 3, "valueChange", "value"],
                        [3, "value"],
                        [2, "float", "right", "display", "inline-flex"],
                        ["pButton", "", "pRipple", "", "type", "button", "label", A, 1, "pur-button", "pur-button--outline", "cancel_button", "move_right", 3, "click"],
                        ["pButton", "", "pRipple", "", "type", "button", "label", N, 1, "pur-button", "move_right", "pur-button--dark", 3, "click"],
                        ["name", "groupEditLoading", "type", "ball-spin-clockwise", 3, "fullScreen"],
                        ["scrollHeight", "400px", 1, "account-table", 3, "value", "tableStyle", "scrollable"],
                        ["pTemplate", "header"],
                        ["pTemplate", "body"],
                        ["pButton", "", "pRipple", "", "type", "button", "label", C, 1, "pur-button", "pur-button--outline", "cancel_button", 3, "click"],
                        ["pButton", "", "pRipple", "", "type", "button", "label", F, 1, "pur-button", "pur-button--dark", 3, "click", "disabled"],
                        ["name", "groupLoading", "type", "ball-spin-clockwise", 3, "fullScreen"],
                        ["class", "shipments pur-datatable table_width", "columnResizeMode", "expand", "responsiveLayout", "scroll", "dataKey", "groupName", "scrollHeight", "75%", 3, "value", "scrollable", "resizableColumns", "autoLayout", 4, "ngIf"],
                        ["scope", "col", 1, "col-1", "select_all_column"],
                        ["scope", "col", 1, "col-2"],
                        [1, "search-input"],
                        ["id", "h-select-all-checkbox", 1, "col-1", "select_all_column"],
                        ["type", "checkbox", "name", "h-select-all-checkbox-name", "id", "h-select-all-checkbox-input", 1, "searchInput1", "account-dialog-checkbox", 3, "ngModelChange", "click", "keydown.enter", "ngModel", "ngModelOptions"],
                        [1, "col-2"],
                        [1, "p-input-icon-right", "searchInput"],
                        [1, "pi", "pi-search"],
                        ["type", "text", 1, "searchInput", 3, "ngModelChange", "keyup", "ngModel", "ngModelOptions"],
                        ["scope", "col", "id", "filterAccount", 1, "col-2"],
                        [3, "ngClass"],
                        [1, "col-1", "select_all_column"],
                        ["type", "checkbox", 1, "account-dialog-checkbox", 3, "click", "keydown.enter", "checked"],
                        ["columnResizeMode", "expand", "responsiveLayout", "scroll", "dataKey", "groupName", "scrollHeight", "75%", 1, "shipments", "pur-datatable", "table_width", 3, "value", "scrollable", "resizableColumns", "autoLayout"],
                        ["pTemplate", "rowexpansion"],
                        [1, "table__row", "col-12", 3, "ngClass"],
                        [4, "ngTemplateOutlet", "ngTemplateOutletContext"],
                        [1, "col-12", "space_between"],
                        [1, "blue"],
                        [1, "description"],
                        ["href", "#", 3, "click", "pRowToggler"],
                        ["type", "checkbox", 3, "click", "checked"],
                        ["class", "expanded-row col-10", 3, "ngClass", 4, "ngFor", "ngForOf"],
                        [1, "expanded-row", "col-10", 3, "ngClass"],
                        [1, "col-12"],
                        ["label", n, "autofocus", "", 3, "value"],
                        [1, "pin-panel-content"],
                        ["for", "pin-entry-textarea"],
                        ["id", "pin-entry-textarea", "pTextarea", "", "rows", "6", "cols", "25", 3, "ngModelChange", "ngModel", "ngModelOptions", "autofocus", "tabIndex"],
                        ["class", "pin-warning-area", 4, "ngIf"],
                        [1, "filter-controls__actions"],
                        [1, "p-button", "pur-button", "pur-button--sm", "pur-button--outline", "pur-button--icon-upload", 3, "click"],
                        ["type", "file", "name", "requestfile", 3, "change", "hidden"],
                        [1, "pin-warning-area"],
                        ["id", "pin-warning-text"],
                        [1, "pin-warning-close-btn", 3, "click", "keydown.enter", "keydown.space"],
                        [1, "pur-chip", 3, "onRemove", "label", "removable"],
                        [1, "save-dialog"],
                        ["type", "button", 1, "pur-button", "pur-button--icon-disk", "pur-button--dark", 3, "click"],
                        ["role", "dialog", "header", Qe, "closeAriaLabel", "close", 1, "pur-dialog", 3, "visibleChange", "visible", "modal", "resizable", "draggable"],
                        [1, "save-dialog__options", "pur-form"],
                        [1, "pur-form-field", "pur-form-field--inline"],
                        ["inputId", "saveCurrentView", "name", "saveView", 1, "pur-radiobutton", 3, "ngModelChange", "value", "disabled", "ngModel", "ngModelOptions"],
                        ["inputId", "saveNewView", "name", "saveView", 1, "pur-radiobutton", 3, "ngModelChange", "value", "ngModel", "ngModelOptions"],
                        ["id", "newViewName", "type", "text", "autocomplete", "off", "aria-label", "New view name", 1, "pur-control", 3, "ngModelChange", "autofocus", "disabled", "ngModel", "ngModelOptions"],
                        ["pTemplate", "footer"],
                        ["type", "warning"],
                        [1, "pur-form", "pur-form--inline"],
                        ["type", "button", 1, "pur-button", "pur-button--outline", 3, "click"],
                        ["type", "button", 1, "pur-button", "pur-button--dark", 3, "click", "disabled"],
                        [1, "visuals"],
                        [2, "margin-bottom", "2px"],
                        [1, "visuals__cards"],
                        ["class", "visuals__card pur-card", 3, "hidden", 4, "ngFor", "ngForOf"],
                        [1, "visuals__card", "pur-card", 3, "hidden"],
                        [1, "pur-card__header"],
                        [1, "pur-card__heading"],
                        ["class", "pur-card__actions", "tabindex", "-1", 4, "ngIf"],
                        [1, "pur-card__content"],
                        ["echarts", "", "class", "pur-echarts", 3, "options", "autoResize", "chartInit", "chartClick", 4, "ngIf"],
                        ["class", "visuals__card-shipment-count", 4, "ngIf"],
                        ["class", "pin-warning-area card-warning-area", 4, "ngIf"],
                        ["tabindex", "-1", 1, "pur-card__actions"],
                        ["aria-hidden", "true", "tabindex", "-1", 1, "pur-card__action-up-level", "pur-button", "pur-button--link", "pur-button--lg", "pur-button--icon-arrow-turn-up", 3, "click", "hidden"],
                        ["aria-hidden", "true", "tabindex", "-1", 1, "sr-only"],
                        ["aria-hidden", "true", "tabindex", "-1", 1, "pur-card__action-menu", "pur-button", "pur-button--link", "pur-button--lg", "pur-button--icon-ellipsis-vertical", 3, "click"],
                        [1, "sr-only"],
                        ["styleClass", "pur-overlaypanel"],
                        [1, "pur-control-group"],
                        ["class", "pur-form-field pur-form-field--inline", 4, "ngFor", "ngForOf"],
                        [1, "pur-radiobutton", 3, "ngModelChange", "inputId", "name", "value", "ngModel", "ngModelOptions"],
                        [3, "for"],
                        ["echarts", "", 1, "pur-echarts", 3, "chartInit", "chartClick", "options", "autoResize"],
                        [1, "visuals__card-shipment-count"],
                        [1, "pin-warning-area", "card-warning-area"],
                        ["id", "pin-warning-error"],
                        [1, "data-grid"]
                    ];
                },
                template: function(i, n) {
                    i & 1 && (St(0, "app-notification-banner"), ge(1, "article", 60)(2, "div", 61)(3, "h1"), dt(4, 10), ve(), ge(5, "div", 62), Oe(6, z9, 4, 0, "span", 63)(7, W9, 4, 1, "span", 64), ge(8, "button", 65), nt("click", function() {
                        return n.onDataSourceChange();
                    }), ve(), cr(9), ge(10, "p-select", 66), Tr("ngModelChange", function(o) {
                        return Sr(n.currentView, o) || (n.currentView = o), o;
                    }), nt("ngModelChange", function(o) {
                        return n.viewChanged(o);
                    }), Oe(11, j9, 1, 1, "ng-template", 67), ve()()(), St(12, "hr"), ge(13, "section", 68)(14, "div", 69), Oe(15, q9, 33, 25, "app-dropdown-editor", 70)(16, Y9, 33, 24, "app-dropdown-editor", 71)(17, oB, 55, 46, "app-dropdown-editor", 72)(18, lB, 26, 8, "app-dropdown-editor", 73), ve(), ge(19, "div", 74), Oe(20, cB, 1, 2, "p-chip", 75), ge(21, "button", 76), nt("click", function() {
                        return n.clearFilters();
                    }), dt(22, 11), ve()(), ge(23, "div", 77), Oe(24, pB, 18, 20, "div", 78), ve()(), St(25, "hr"), Oe(26, wB, 5, 1, "section", 79)(27, SB, 3, 0, "section", 80), ve()), i & 2 && (oe(6), Q("ngIf", n.authService.isSelectOrganisationAuthorised() && !n.user.userData.view.signature.selectedOrganizationName), oe(), Q("ngIf", n.user.userData.view.signature.selectedOrganizationName), oe(2), Zi(" ", n.lastRefresh, " "), oe(), Q("ngClass", "pur-dropdown " + (n.isWatchlistRedirect ? "pur-dropdown--watchlist" : n.currentView && n.currentView.id === "p1" ? "pur-dropdown--featured" : "pur-dropdown--custom-view"))("autoDisplayFirst", !1)("options", n.user.userData.views), wr("ngModel", n.currentView), Q("ngModelOptions", vr(17, Ri)), oe(5), Q("ngIf", n.authService.isDashBoardShipmentDateFilterAuthorised()), oe(), Q("ngIf", n.authService.isDashBoardDeliveryDateFilterAuthorised()), oe(), Q("ngIf", n.authService.isDashBoardAccountsFilterAuthorised()), oe(), Q("ngIf", n.authService.isDashBoardPinsFilterAuthorised()), oe(2), Q("ngForOf", n.user.userData.view.signature.filters), oe(), Q("hidden", n.user.userData.view.signature.filters.length === 0), oe(3), Q("ngIf", n.authService.isSaveCurrentViewAuthorised()), oe(2), Q("ngIf", n.user.userData.view.showVisualizations), oe(), Q("ngIf", n.user.userData.view.showDataGrid));
                },
                dependencies: [ha, Wa, vl, Eo, Jo, ex, bl, vd, ox, _l, yl, Dd, Td, es, Rx, Lx, jx, Wx, kd, b0, Ad, Al, Gx, Hx, x_, v_, g_, m_, d_, p_, pd, dd, Rd, Ld, e_, o_, a_, Ed, Fd, y_, __, Vx, Ux, Mx, Q4, Cm, b_, $4],
                styles: ['@charset "UTF-8";body[_ngcontent-%COMP%]{font:var(--pur-font-body);color:var(--pur-text-black);background-color:var(--pur-canvas)}a[_ngcontent-%COMP%]{color:var(--pur-link)}a[_ngcontent-%COMP%]:hover, a[_ngcontent-%COMP%]:focus{color:var(--pur-link-hover)}h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%], h5[_ngcontent-%COMP%], h6[_ngcontent-%COMP%], p[_ngcontent-%COMP%], ol[_ngcontent-%COMP%], ul[_ngcontent-%COMP%], dl[_ngcontent-%COMP%]{margin-block-start:0;margin-block-end:var(--pur-gap)}article[_ngcontent-%COMP%], aside[_ngcontent-%COMP%], details[_ngcontent-%COMP%], figcaption[_ngcontent-%COMP%], figure[_ngcontent-%COMP%], footer[_ngcontent-%COMP%], header[_ngcontent-%COMP%], hgroup[_ngcontent-%COMP%], menu[_ngcontent-%COMP%], nav[_ngcontent-%COMP%], section[_ngcontent-%COMP%]{display:block}[hidden][_ngcontent-%COMP%]{display:none!important}[_ngcontent-%COMP%]:root{--pur-xxs: .5rem;--pur-xs: 1rem;--pur-sm: 1.5rem;--pur-md: 2rem;--pur-lg: 3rem;--pur-xl: 4rem;--pur-xxl: 6rem;--pur-breakpoint-xxs: 23.4375rem;--pur-breakpoint-xs: 50rem;--pur-breakpoint-sm: 67.5rem;--pur-breakpoint-md: 80rem;--pur-breakpoint-lg: 90rem;--pur-breakpoint-xl: 100rem;--pur-breakpoint-xxl: 120rem;--pur-breakpoint-xxxl: 160rem;--pur-sidebar-width: 13.1875rem;--pur-max-width: var(--pur-breakpoint-xxxl);--pur-gap: var(--pur-sm);--pur-gap-xs: var(--pur-xs);--pur-primary-red: #f00000;--pur-primary-blue: #001996;--pur-secondary-blue: #00a9ce;--pur-secondary-blue-darker: #00819e;--pur-secondary-orange: #ffa300;--pur-secondary-yellow: #fbdd40;--pur-secondary-green: #64a70b;--pur-secondary-magenta: #c800a1;--pur-secondary-grey-light: #a2aaad;--pur-secondary-grey-dark: #000;--pur-web-yellow: #f8c81e;--pur-web-green: #61A30A;--pur-web-grey-lighter: #f5f6f6;--pur-web-grey-light: #d3d3d3;--pur-web-grey: #c0c0c0;--pur-web-grey-dark: #495057;--pur-text-light: #fff;--pur-text-dark: #111;--pur-blue-magenta: #53525a;--pur-link: #001996;--pur-link-hover: #0a38e6;--pur-light-blue: #1d4ed8;--pur-alice-blue: #eff6ff;--pur-canvas: #ededed;--pur-backdrop: #303136;--pur-danger: #eb0000;--pur-Pattens-Blue: #dee2e6;--pur-webtoolkit-lightgrey-disabled: rgb(229, 229, 229);--pur-webtoolkit-darkgrey: rgb(73, 80, 87);--pur-webtoolkit-textcolour: rgb(17, 17, 17);--pur-webtoolkit-dropdown-filled: rgb(233, 233, 233);--pur-webtext-lightgreycolour1: rgb(245, 245, 245);--pur-secondary-black-shadow: rgba(0, 0, 0, .25);--pur-dropdown-header: rgb(248, 249, 250);--pur-font-mobile-xxs: .875rem;--pur-font-mobile-xs: 1rem;--pur-font-mobile-sm: 1.125rem;--pur-font-mobile-md: 1.25rem;--pur-font-mobile-lg: 1.625rem;--pur-font-mobile-xl: 1.875rem;--pur-font-mobile-xxl: 2.5rem;--pur-font-desktop-xxs: .875rem;--pur-font-desktop-xs: 1rem;--pur-font-desktop-sm: 1.25rem;--pur-font-desktop-md: 1.5rem;--pur-font-desktop-lg: 1.75rem;--pur-font-desktop-xl: 2rem;--pur-font-desktop-xxl: 2.5rem;--pur-line-mobile-xxs: 1.5rem;--pur-line-mobile-xs: 1.5rem;--pur-line-mobile-sm: 1.75rem;--pur-line-mobile-md: 1.75rem;--pur-line-mobile-lg: 2.5rem;--pur-line-mobile-xl: 2.5rem;--pur-line-mobile-xxl: 2.5rem;--pur-line-desktop-xxs: 1.5rem;--pur-line-desktop-xs: 1.5rem;--pur-line-desktop-sm: 1.5625rem;--pur-line-desktop-md: 2rem;--pur-line-desktop-lg: 3.5rem;--pur-line-desktop-xl: 3.75rem;--pur-line-desktop-xxl: 4.125rem;--pur-font-normal: 400;--pur-font-semibold: 600;--pur-font-body-family: "Open Sans", Arial, Helvetica, sans-serif;--pur-font-h1: var(--pur-font-normal) var(--pur-font-mobile-xxl)/var(--pur-line-mobile-xxl) var(--pur-font-body-family);--pur-font-h2: var(--pur-font-normal) var(--pur-font-mobile-xl)/var(--pur-line-mobile-xl) var(--pur-font-body-family);--pur-font-h3: var(--pur-font-normal) var(--pur-font-mobile-lg)/var(--pur-line-mobile-lg) var(--pur-font-body-family);--pur-font-h4: var(--pur-font-normal) var(--pur-font-mobile-md)/var(--pur-line-mobile-md) var(--pur-font-body-family);--pur-font-h5: var(--pur-font-normal) var(--pur-font-mobile-sm)/var(--pur-line-mobile-sm) var(--pur-font-body-family);--pur-font-body: var(--pur-font-normal) var(--pur-font-mobile-xs)/var(--pur-line-mobile-xs) var(--pur-font-body-family);--pur-font-legal: var(--pur-font-normal) var(--pur-font-mobile-xxs)/var(--pur-line-mobile-xxs) var(--pur-font-body-family);--pur-border-xxs: 1px;--pur-border-xs: 2px;--pur-border-md: .25rem;--pur-radius-sm: .25rem;--pur-radius-md: .625rem;--pur-shadow-md: drop-shadow(4px 4px 12px rgba(0, 0, 0, .16));--pur-duration: .15s;--pur-timing: ease-out;--pur-grey-high-dark: #757575;--pur-light-blue-bg:#00A2C7;--pur-p-chips-textcolor:#2C2C30;--pur-setting-editbutton:#5B6062;--pur-setting-openbutton:#056EC7;--pur-setting-deletebutton:#c01120;--pur-white:#FFFFFF;--pur-field-bordercolor:#919191}@media (min-width: 67.5rem){[_ngcontent-%COMP%]:root{--pur-font-h1: var(--pur-font-normal) var(--pur-font-desktop-xxl)/var(--pur-line-desktop-xxl) var(--pur-font-body-family);--pur-font-h2: var(--pur-font-normal) var(--pur-font-desktop-xl)/var(--pur-line-desktop-xl) var(--pur-font-body-family);--pur-font-h3: var(--pur-font-normal) var(--pur-font-desktop-lg)/var(--pur-line-desktop-lg) var(--pur-font-body-family);--pur-font-h4: var(--pur-font-normal) var(--pur-font-desktop-md)/var(--pur-line-desktop-md) var(--pur-font-body-family);--pur-font-h5: var(--pur-font-normal) var(--pur-font-desktop-sm)/var(--pur-line-desktop-sm) var(--pur-font-body-family);--pur-font-body: var(--pur-font-normal) var(--pur-font-desktop-xs)/var(--pur-line-desktop-xs) var(--pur-font-body-family);--pur-font-legal: var(--pur-font-normal) var(--pur-font-desktop-xxs)/var(--pur-line-desktop-xxs) var(--pur-font-body-family)}}.dashboard_header[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:flex-start;height:62px;margin-top:0}.organization[_ngcontent-%COMP%]{margin-left:auto;display:flex;align-items:center;gap:10px;margin-top:6px}[_nghost-%COMP%]     #view-dropdown-green .p-dropdown-label{color:#2b2b2b}.account-table[_ngcontent-%COMP%]     .p-datatable-scrollable .p-datatable-thead>tr>th, .account-table[_ngcontent-%COMP%]     .p-datatable-scrollable .p-datatable-tbody>tr>td, .account-table[_ngcontent-%COMP%]     .p-datatable-scrollable .p-datatable-tfoot>tr>td{flex:none!important}@media screen and (max-width: 1415px){h1[_ngcontent-%COMP%]{margin-bottom:0}.dashboard_header[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:flex-start;height:1%;width:100%;margin-top:0}}.filter-controls[_ngcontent-%COMP%]{display:grid;grid-template-areas:"controls controls" "more views";align-items:center;gap:var(--pur-xs)}.filter-controls__dropdowns[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;grid-area:controls;gap:var(--pur-xs)}.filter-controls__dropdowns[_ngcontent-%COMP%]   app-dropdown-editor[_ngcontent-%COMP%]{flex:1}.filter-controls__dropdowns[_ngcontent-%COMP%]     .pur-overlaypanel-header{height:fit-content}.filter-controls__dropdowns[_ngcontent-%COMP%]     .p-datepicker .p-datepicker-panel, .filter-controls__dropdowns[_ngcontent-%COMP%]     .p-datepicker-panel.p-datepicker-panel-inline, .filter-controls__dropdowns[_ngcontent-%COMP%]     .pur-calendar .p-datepicker .p-datepicker-panel{display:contents!important}.filter-controls__more[_ngcontent-%COMP%]{display:flex;gap:var(--pur-xxs);grid-area:more}.filter-controls__views[_ngcontent-%COMP%]{display:flex;justify-self:flex-end;gap:var(--pur-xs);grid-area:views}@media (min-width: 67.5rem) and (min-height: 50rem){.filter-controls[_ngcontent-%COMP%]{position:sticky;top:0;z-index:10;background-color:var(--pur-canvas)}}.filter-controls__footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-block-start:var(--pur-gap)}.filter-controls__footer[_ngcontent-%COMP%]:has(.filter-controls__actions:only-child){justify-content:flex-end}.filter-controls__actions[_ngcontent-%COMP%]{display:flex;gap:var(--pur-xs)}.account-detail__extra[_ngcontent-%COMP%]{white-space:nowrap}.account-detail__id[_ngcontent-%COMP%]:after{content:" \\2022";color:var(--pur-web-grey-light)}.pin-panel-content[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:var(--pur-gap);width:35rem;max-width:100%}.save-dialog__options[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content;justify-content:center;text-align:start}.visuals[_ngcontent-%COMP%]{margin-block-end:var(--pur-gap-xs);border-block-end:var(--pur-border-xxs) solid var(--pur-web-grey)}.visuals__cards[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(25%,1fr));gap:var(--pur-gap-xs)}@media screen and (min-width: 1800px){.pur-echarts[_ngcontent-%COMP%]{height:300px}}@media screen and (max-width: 1799px){.pur-echarts[_ngcontent-%COMP%]{height:250px}}.visuals__card-shipment-count[_ngcontent-%COMP%]{margin-block:var(--pur-xxs) 0;text-align:center;font-size:var(--pur-font-mobile-xxs);line-height:var(--pur-line-mobile-xxs)}@media (min-width: 67.5rem){.visuals__card-shipment-count[_ngcontent-%COMP%]{font-size:var(--pur-font-desktop-xxs);line-height:var(--pur-line-desktop-xxs)}}.data-grid[_ngcontent-%COMP%]{margin-block-end:var(--pur-gap)}.header_select[_ngcontent-%COMP%]{float:right}.align[_ngcontent-%COMP%]{vertical-align:middle}.buttons[_ngcontent-%COMP%]{float:right;margin-top:1.5%;margin-bottom:1.5%}td.col-1.select_all_column[_ngcontent-%COMP%]{text-align:center}.table_width[_ngcontent-%COMP%]{display:block;min-width:1175px}.space_between[_ngcontent-%COMP%]{justify-content:space-between}.select_all_column[_ngcontent-%COMP%]{max-width:10%;align-items:center;text-align:center}[_nghost-%COMP%]     .p-datepicker .p-datepicker-panel, [_nghost-%COMP%]     .p-datepicker-panel.p-datepicker-panel-inline, [_nghost-%COMP%]     .pur-calendar .p-datepicker .p-datepicker-panel{display:contents!important}[_nghost-%COMP%]   .header_bar[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;font-family:var(--auth-font-body-family);margin:0 33px}[_nghost-%COMP%]   .heading[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-evenly}[_nghost-%COMP%]   .title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;font-size:30px;color:var(--auth-primary-blue)}[_nghost-%COMP%]   #sub-title[_ngcontent-%COMP%]{color:#807f8a;font-family:var(--auth-font-body-family);margin-left:33px;margin-bottom:10px}[_nghost-%COMP%]   input#group-name-input[_ngcontent-%COMP%]{padding:12px;border:1px solid var(--auth-webtoolkit-darkgrey);border-radius:4px;font-family:var(--auth-font-body-family);width:295px}[_nghost-%COMP%]   .right[_ngcontent-%COMP%]{margin-right:2%}[_nghost-%COMP%]   .only[_ngcontent-%COMP%]{align-items:center;justify-content:space-evenly}[_nghost-%COMP%]   .p-datatable[_ngcontent-%COMP%]   .p-datatable-tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{text-align:center}[_nghost-%COMP%]   .p-datatable-scrollable[_ngcontent-%COMP%] > .p-datatable-wrapper[_ngcontent-%COMP%]{overflow:visible}[_nghost-%COMP%]   .select_all_column[_ngcontent-%COMP%]{align-items:center;font-weight:400;font-size:12px}[_nghost-%COMP%]   .p-inputswitch[_ngcontent-%COMP%]   .p-inputswitch-slider[_ngcontent-%COMP%]{height:85%}[_nghost-%COMP%]   .p-datatable[_ngcontent-%COMP%]   .p-datatable-tbody[_ngcontent-%COMP%] > tr.customer-checked[_ngcontent-%COMP%]{background-color:var(--auth-webtoolkit-checkbox-filled)}[_nghost-%COMP%]   .p-datatable[_ngcontent-%COMP%]   .p-datatable-tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]:not(.select_all_column){font-family:var(--auth-font-body-family);border:1px solid var(--auth-webtoolkit-lightgrey-border);text-align:left}[_nghost-%COMP%]   .p-datatable[_ngcontent-%COMP%]   .p-datatable-tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td.select_all_column[_ngcontent-%COMP%]{border:1px solid var(--auth-webtoolkit-lightgrey-border)}[_nghost-%COMP%]   .p-datatable[_ngcontent-%COMP%]   .p-datatable-thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-family:var(--auth-font-body-family);border:1px solid var(--auth-webtoolkit-lightgrey-border);border-bottom:none;background-color:var(--auth-webtext-lightgreycolour1);padding:.5rem 1rem 0rem}[_nghost-%COMP%]   .p-datatable[_ngcontent-%COMP%]   .p-datatable-thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th.select_all_column[_ngcontent-%COMP%]{font-weight:400}[_nghost-%COMP%]   .search-input[_ngcontent-%COMP%]{background-color:var(--auth-webtext-lightgreycolour1);border:1px solid var(--auth-webtoolkit-lightgrey-border);height:70px}[_nghost-%COMP%]   .search-input[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border-left:1px solid var(--auth-webtoolkit-lightgrey-border);border-bottom:1px solid var(--auth-webtoolkit-lightgrey-border);border-right:1px solid var(--auth-webtoolkit-lightgrey-border);border-top:1px solid var(--auth-webtext-lightgreycolour1)}[_nghost-%COMP%]   .toggle-inline[_ngcontent-%COMP%]{float:left;margin-top:5px}[_nghost-%COMP%]   .toggle-btn[_ngcontent-%COMP%]{margin-left:12px}[_nghost-%COMP%]   td[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{padding:7px 7px 7px 35px;margin:10px;border:1.5px solid var(--auth-webtoolkit-grey);border-radius:5px}[_nghost-%COMP%]   input[type=checkbox][_ngcontent-%COMP%]{transform:scale(1.6)}[_nghost-%COMP%]   button.edit-button[_ngcontent-%COMP%]:disabled{font-family:var(--auth-font-body-family);color:var(--auth-webtoolkit-grey-color);background:var(--auth-gray-light-table-row);opacity:.65;border-radius:4px;border:none}[_nghost-%COMP%]   button.edit-button[_ngcontent-%COMP%]{font-family:var(--auth-font-body-family);background:var(--auth-primary-blue);border-radius:4px}[_nghost-%COMP%]   .pi-search[_ngcontent-%COMP%]:before{padding-left:10px}[_nghost-%COMP%]   .move_right[_ngcontent-%COMP%]{text-align:right}[_nghost-%COMP%]   .cancel_button[_ngcontent-%COMP%]{background-color:transparent;background:transparent;color:var(--auth-primary-black);border:var(--auth-border-xxs) solid var(--auth-primary-black);border-color:var(--auth-primary-black)}[_nghost-%COMP%]   .cancel_button[_ngcontent-%COMP%]:enabled:hover{background-color:transparent;color:var(--auth-primary-black);border:var(--auth-border-xxs) solid var(--auth-primary-black);border-color:var(--auth-primary-black)}[_nghost-%COMP%]   .left_margin[_ngcontent-%COMP%]{margin-top:3%;min-height:calc(100vh - 120px);background:var(--auth-white);border:1px solid var(--auth-gray-content-border);border-radius:4px;font-family:var(--auth-font-body-family)}[_nghost-%COMP%]   p-table[_ngcontent-%COMP%]{border-collapse:collapse}[_nghost-%COMP%]   .left_button[_ngcontent-%COMP%]{margin-left:25%}[_nghost-%COMP%]   .create_right_margin[_ngcontent-%COMP%]{margin-bottom:1.5%;border-color:var(--auth-primary-blue)}[_nghost-%COMP%]   .right_margin[_ngcontent-%COMP%]{margin-right:3%;background:var(--auth-white)}[_nghost-%COMP%]   .right_edit_margin[_ngcontent-%COMP%]{margin-right:3%;border-color:var(--auth-primary-blue)}[_nghost-%COMP%]   .delete_button[_ngcontent-%COMP%]{margin-right:5%}[_nghost-%COMP%]   .right_margin[_ngcontent-%COMP%]:hover{color:var(--auth-white);background:var(--auth-secondary-red);border:4px}[_nghost-%COMP%]   .edit_button[_ngcontent-%COMP%]{margin-right:8.8%}[_nghost-%COMP%]   .title_bar[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin:17px 17px 17px 30px}[_nghost-%COMP%]   .button_cell[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;float:right}[_nghost-%COMP%]   .right[_ngcontent-%COMP%]{float:right}[_nghost-%COMP%]   .left[_ngcontent-%COMP%]{float:left}[_nghost-%COMP%]   .p-dropdown[_ngcontent-%COMP%]{border:none}[_nghost-%COMP%]   .description[_ngcontent-%COMP%]{color:var(--auth-primary-blue);font-size:large;font-weight:600;margin-left:.8rem}[_nghost-%COMP%]   .blue[_ngcontent-%COMP%]{margin-bottom:5px}[_nghost-%COMP%]   .p-datatable-resizable[_ngcontent-%COMP%]   .p-datatable-thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%], [_nghost-%COMP%]   .p-datatable-resizable[_ngcontent-%COMP%]   .p-datatable-tfoot[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%], [_nghost-%COMP%]   .p-datatable-resizable[_ngcontent-%COMP%]   .p-datatable-tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{overflow:visible}[_nghost-%COMP%]   .p-datatable-resizable-table[_ngcontent-%COMP%] > .p-datatable-thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%], [_nghost-%COMP%]   .p-datatable-resizable-table[_ngcontent-%COMP%] > .p-datatable-tfoot[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%], [_nghost-%COMP%]   .p-datatable-resizable-table[_ngcontent-%COMP%] > .p-datatable-tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{overflow:visible}[_nghost-%COMP%]   .p-datatable-scrollable[_ngcontent-%COMP%] > .p-datatable-wrapper[_ngcontent-%COMP%]{overflow:visible;margin-bottom:100px}[_nghost-%COMP%]   .p-datatable-table[_ngcontent-%COMP%]{border-spacing:0px;width:96%;margin:2%}[_nghost-%COMP%]   .p-datatable-scrollable[_ngcontent-%COMP%]   .p-datatable-thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], [_nghost-%COMP%]   .p-datatable-scrollable[_ngcontent-%COMP%]   .p-datatable-tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], [_nghost-%COMP%]   .p-datatable-scrollable[_ngcontent-%COMP%]   .p-datatable-tfoot[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{align-items:center}[_nghost-%COMP%]   .p-datatable-scrollable[_ngcontent-%COMP%]   .p-datatable-thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%], [_nghost-%COMP%]   .p-datatable-scrollable[_ngcontent-%COMP%]   .p-datatable-tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%], [_nghost-%COMP%]   .p-datatable-scrollable[_ngcontent-%COMP%]   .p-datatable-tfoot[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%]   .p-datatable[_ngcontent-%COMP%]   .p-datatable-tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{border:none;display:table-cell}[_nghost-%COMP%]   .p-datatable[_ngcontent-%COMP%]   .p-datatable-tbody[_ngcontent-%COMP%] > tr.table__row.main-expanded-row[_ngcontent-%COMP%]{background-color:var(--auth-gray-table-row);outline:1px solid var(--auth-webtoolkit-lightgrey);border-radius:5px 5px 0 0/5px 5px 0px 0px}[_nghost-%COMP%]   .p-datatable[_ngcontent-%COMP%]   .p-datatable-tbody[_ngcontent-%COMP%] > tr.table__row[_ngcontent-%COMP%]:not(.main-expanded-row){background-color:var(--auth-gray-table-row);outline:1px solid var(--auth-webtoolkit-lightgrey);border-radius:5px}[_nghost-%COMP%]   .space[_ngcontent-%COMP%]{height:21px}[_nghost-%COMP%]   .none-space[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   .p-datatable[_ngcontent-%COMP%]   .p-datatable-tbody[_ngcontent-%COMP%] > tr.expanded-row[_ngcontent-%COMP%]:not(.last-row){background-color:var(--auth-gray-light-table-row);border-left:1px solid var(--auth-webtoolkit-lightgrey);border-right:1px solid var(--auth-webtoolkit-lightgrey);border-radius:0}[_nghost-%COMP%]   .p-datatable[_ngcontent-%COMP%]   .p-datatable-tbody[_ngcontent-%COMP%] > tr.expanded-row.last-row[_ngcontent-%COMP%]{background-color:var(--auth-gray-light-table-row);border-left:1px solid var(--auth-webtoolkit-lightgrey);border-right:1px solid var(--auth-webtoolkit-lightgrey);border-bottom:1px solid var(--auth-webtoolkit-lightgrey);border-radius:0 0 5px 5px/0px 0px 5px 5px}[_nghost-%COMP%]   .p-datatable[_ngcontent-%COMP%]   .p-datatable-tbody[_ngcontent-%COMP%] > tr.expanded-row[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding-left:30px}[_nghost-%COMP%]   a[_ngcontent-%COMP%]{margin-left:15px;color:var(--auth-webtoolkit-darkgrey);text-decoration:underline}[_nghost-%COMP%]   a[_ngcontent-%COMP%]:hover{padding:5px;margin-left:7px;color:var(--auth-webtoolkit-darkgrey);background-color:var(--auth-gray-light-hover);text-decoration:underline;border-radius:5px}[_nghost-%COMP%]   input[type=text][_ngcontent-%COMP%]{padding:15px;background:var(--auth-white);border-radius:4px}[_nghost-%COMP%]   input[type=checkbox][_ngcontent-%COMP%]{width:26px;height:26px;background:var(--auth-white);border:1px solid var(--auth-webtoolkit-darkgrey);border-radius:4px;margin-top:22px}[_nghost-%COMP%]   input[type=checkbox][_ngcontent-%COMP%]:checked{accent-color:var(--auth-primary-blue)}[_nghost-%COMP%]   hr[_ngcontent-%COMP%]{background-color:var(--auth-webtoolkit-lightgrey);height:1px}[_nghost-%COMP%]   .p-datatable[_ngcontent-%COMP%]   .p-datatable-tbody[_ngcontent-%COMP%] > tr.table__row.group-checked[_ngcontent-%COMP%]{background-color:var(--auth-webtoolkit-checkbox-filled)}.searchInput1[_ngcontent-%COMP%]{margin-left:0;padding-left:0;max-width:100%}.searchInput[_ngcontent-%COMP%]{max-width:100%}.p-input-icon-right[_ngcontent-%COMP%] > i[_ngcontent-%COMP%]:last-of-type{color:var(--pur-blue-magenta)}#only-selected-switch[_ngcontent-%COMP%]:focus{outline:none!important}.pin-warning-area[_ngcontent-%COMP%]{max-width:100%;background-color:#f8b7bd;color:#000;text-align:center;padding:5px;margin:10px;border-radius:8px}.pin-warning-area[_ngcontent-%COMP%]   #pin-warning-text[_ngcontent-%COMP%]{margin:0;font-size:12px}.pin-warning-area[_ngcontent-%COMP%]   #pin-warning-text[_ngcontent-%COMP%]   .pin-warning-close-btn[_ngcontent-%COMP%]{position:relative;left:2.5px;font-size:15px;cursor:pointer;font-weight:700}.card-warning-area[_ngcontent-%COMP%]{margin-top:calc(50% - 4rem);font-weight:700}']
            });
        }
    }
    return t;
})();
export {
    cne as DashboardComponent
}; /**i18n:6e1dbccd4192d215e143e99fb4b6a095cee3c871f5aa7cd380ca91231f35e8e0*/