import {
    a as Jt,
    c as ei,
    d as ti
} from "./chunk-ZLBVZLCB.js";
import {
    a as Zt
} from "./chunk-MMJF5WBO.js";
import {
    a as At,
    d as Pe,
    e as zt,
    f as Lt,
    g as $t,
    h as He,
    i as Ht,
    j as Bt,
    k as qt,
    o as Ut,
    p as jt
} from "./chunk-2F2DP6Z5.js";
import {
    $ as Yt,
    N as vt,
    O as Rt,
    P as Pt,
    Q as Xt,
    R as Gt,
    _ as Kt,
    a as Tt,
    b as Ct,
    c as bt
} from "./chunk-LNCD4SA3.js";
import {
    $ as Ot,
    B as R,
    Ba as Je,
    C as he,
    Ca as Se,
    E as ve,
    G as Ge,
    Ka as Ae,
    L as Ke,
    La as W,
    Ma as ze,
    N as wt,
    Na as Vt,
    Qa as Le,
    R as Ye,
    S as Et,
    T as _e,
    Ta as ae,
    Ua as et,
    V as xe,
    W as Mt,
    Wa as Re,
    Xa as Ft,
    Za as tt,
    _a as $e,
    b as xt,
    ba as Fe,
    bb as ue,
    c as St,
    db as Qt,
    e as Nt,
    h as ke,
    ib as Wt,
    l as Ve,
    na as Dt,
    ra as Ze,
    sa as kt,
    v as It,
    z as be
} from "./chunk-XPOKHL3M.js";
import {
    c as yt,
    d as Ue,
    f as De,
    h as je,
    i as We,
    k as Xe
} from "./chunk-Z33DM23Z.js";
import {
    B as Ce,
    a as mt,
    k as oe,
    l as ft,
    m as Te,
    n as U,
    r as re,
    s as le,
    w as Oe,
    y as j
} from "./chunk-OYJWBUYU.js";
import {
    Ab as a,
    Bb as de,
    Db as G,
    Eb as V,
    Gb as Qe,
    Hc as F,
    Jb as h,
    Kb as _,
    Lb as I,
    Mb as S,
    Nb as N,
    Ob as O,
    Pb as w,
    Pc as b,
    Qc as ne,
    Uc as gt,
    Vb as z,
    X as Ie,
    Y as ee,
    Ya as s,
    Yb as C,
    Z as we,
    Zb as d,
    ba as Ee,
    bb as ct,
    ca as te,
    cb as M,
    cc as v,
    dc as E,
    eb as pt,
    ec as f,
    f as B,
    fc as y,
    ic as qe,
    ja as at,
    jc as L,
    ka as u,
    kc as ce,
    la as g,
    lb as Q,
    lc as pe,
    mb as Me,
    na as X,
    nb as ht,
    pa as st,
    pb as ie,
    pc as K,
    qc as Y,
    rb as c,
    rc as Z,
    sc as J,
    ta as x,
    tc as q,
    ua as dt,
    uc as k,
    vc as H,
    w as lt,
    wc as ut,
    yb as _t,
    zb as D
} from "./chunk-SSI6PFOR.js";
import {
    a as $
} from "./chunk-FFRAY7OK.js";
var oi = t => ({
        height: t
    }),
    ri = t => ({
        "p-tree-node-droppoint-active": t
    }),
    _i = (t, r) => ({
        $implicit: t,
        loading: r
    }),
    ui = (t, r) => ({
        $implicit: t,
        partialSelected: r,
        class: "p-tree-node-checkbox"
    }),
    li = t => ({
        $implicit: t
    });

function gi(t, r) {
    if (t & 1) {
        let e = w();
        h(0, "li", 11), C("drop", function(i) {
            u(e);
            let o = d(2);
            return g(o.onDropPoint(i, -1));
        })("dragover", function(i) {
            u(e);
            let o = d(2);
            return g(o.onDropPointDragOver(i));
        })("dragenter", function(i) {
            u(e);
            let o = d(2);
            return g(o.onDropPointDragEnter(i, -1));
        })("dragleave", function(i) {
            u(e);
            let o = d(2);
            return g(o.onDropPointDragLeave(i));
        }), _();
    }
    if (t & 2) {
        let e = d(2);
        a("ngClass", k(2, ri, e.draghoverPrev)), D("aria-hidden", !0);
    }
}

function mi(t, r) {
    t & 1 && I(0, "ChevronRightIcon", 13), t & 2 && a("styleClass", "p-tree-node-toggle-icon");
}

function fi(t, r) {
    t & 1 && I(0, "ChevronDownIcon", 13), t & 2 && a("styleClass", "p-tree-node-toggle-icon");
}

function yi(t, r) {
    if (t & 1 && (S(0), c(1, mi, 1, 1, "ChevronRightIcon", 12)(2, fi, 1, 1, "ChevronDownIcon", 12), N()), t & 2) {
        let e = d(3);
        s(), a("ngIf", !e.node.expanded), s(), a("ngIf", e.node.expanded);
    }
}

function Ti(t, r) {
    t & 1 && (S(0), I(1, "SpinnerIcon", 13), N()), t & 2 && (s(), a("styleClass", "pi-spin p-tree-node-toggle-icon"));
}

function Ci(t, r) {
    if (t & 1 && (S(0), c(1, yi, 3, 2, "ng-container", 5)(2, Ti, 2, 1, "ng-container", 5), N()), t & 2) {
        let e = d(2);
        s(), a("ngIf", !e.node.loading), s(), a("ngIf", e.loadingMode === "icon" && e.node.loading);
    }
}

function bi(t, r) {}

function vi(t, r) {
    t & 1 && c(0, bi, 0, 0, "ng-template");
}

function xi(t, r) {
    if (t & 1 && (h(0, "span", 14), c(1, vi, 1, 0, null, 15), _()), t & 2) {
        let e = d(2);
        s(), a("ngTemplateOutlet", e.tree.togglerIconTemplate || e.tree._togglerIconTemplate)("ngTemplateOutletContext", H(2, _i, e.node.expanded, e.node.loading));
    }
}

function Si(t, r) {}

function Ni(t, r) {
    t & 1 && c(0, Si, 0, 0, "ng-template");
}

function Ii(t, r) {
    if (t & 1 && c(0, Ni, 1, 0, null, 15), t & 2) {
        let e = d(4);
        a("ngTemplateOutlet", e.tree.checkboxIconTemplate || e.tree._checkboxIconTemplate)("ngTemplateOutletContext", H(2, ui, e.isSelected(), e.node.partialSelected));
    }
}

function wi(t, r) {
    t & 1 && (S(0), c(1, Ii, 1, 5, "ng-template", null, 0, F), N());
}

function Ei(t, r) {
    if (t & 1) {
        let e = w();
        h(0, "p-checkbox", 16), C("click", function(i) {
            return u(e), g(i.preventDefault());
        }), c(1, wi, 3, 0, "ng-container", 5), _();
    }
    if (t & 2) {
        let e = d(2);
        a("ngModel", e.isSelected())("binary", !0)("indeterminate", e.node.partialSelected)("disabled", e.node.selectable === !1)("variant", (e.tree == null ? null : e.tree.config.inputStyle()) === "filled" || (e.tree == null ? null : e.tree.config.inputVariant()) === "filled" ? "filled" : "outlined")("tabindex", -1), D("data-p-partialchecked", e.node.partialSelected), s(), a("ngIf", e.tree.checkboxIconTemplate || e.tree._checkboxIconTemplate);
    }
}

function Mi(t, r) {
    if (t & 1 && I(0, "span"), t & 2) {
        let e = d(2);
        V(e.getIcon());
    }
}

function Oi(t, r) {
    if (t & 1 && (h(0, "span"), L(1), _()), t & 2) {
        let e = d(2);
        s(), ce(e.node.label);
    }
}

function Di(t, r) {
    t & 1 && O(0);
}

function ki(t, r) {
    if (t & 1 && (h(0, "span"), c(1, Di, 1, 0, "ng-container", 15), _()), t & 2) {
        let e = d(2);
        s(), a("ngTemplateOutlet", e.tree.getTemplateForNode(e.node))("ngTemplateOutletContext", k(2, li, e.node));
    }
}

function Vi(t, r) {
    if (t & 1 && I(0, "p-treeNode", 19), t & 2) {
        let e = r.$implicit,
            n = r.first,
            i = r.last,
            o = r.index,
            l = d(3);
        a("node", e)("parentNode", l.node)("firstChild", n)("lastChild", i)("index", o)("itemSize", l.itemSize)("level", l.level + 1)("loadingMode", l.loadingMode);
    }
}

function Fi(t, r) {
    if (t & 1 && (h(0, "ul", 17), c(1, Vi, 1, 8, "p-treeNode", 18), _()), t & 2) {
        let e = d(2);
        de("display", e.node.expanded ? "flex" : "none"), s(), a("ngForOf", e.node.children)("ngForTrackBy", e.tree.trackBy.bind(e));
    }
}

function Ai(t, r) {
    if (t & 1) {
        let e = w();
        h(0, "li", 11), C("drop", function(i) {
            u(e);
            let o = d(2);
            return g(o.onDropPoint(i, 1));
        })("dragover", function(i) {
            u(e);
            let o = d(2);
            return g(o.onDropPointDragOver(i));
        })("dragenter", function(i) {
            u(e);
            let o = d(2);
            return g(o.onDropPointDragEnter(i, 1));
        })("dragleave", function(i) {
            u(e);
            let o = d(2);
            return g(o.onDropPointDragLeave(i));
        }), _();
    }
    if (t & 2) {
        let e = d(2);
        a("ngClass", k(2, ri, e.draghoverNext)), D("aria-hidden", !0);
    }
}

function zi(t, r) {
    if (t & 1) {
        let e = w();
        c(0, gi, 1, 4, "li", 1), h(1, "li", 2), C("keydown", function(i) {
            u(e);
            let o = d();
            return g(o.onKeyDown(i));
        }), h(2, "div", 3), C("click", function(i) {
            u(e);
            let o = d();
            return g(o.onNodeClick(i));
        })("contextmenu", function(i) {
            u(e);
            let o = d();
            return g(o.onNodeRightClick(i));
        })("dblclick", function(i) {
            u(e);
            let o = d();
            return g(o.onNodeDblClick(i));
        })("touchend", function() {
            u(e);
            let i = d();
            return g(i.onNodeTouchEnd());
        })("drop", function(i) {
            u(e);
            let o = d();
            return g(o.onDropNode(i));
        })("dragover", function(i) {
            u(e);
            let o = d();
            return g(o.onDropNodeDragOver(i));
        })("dragenter", function(i) {
            u(e);
            let o = d();
            return g(o.onDropNodeDragEnter(i));
        })("dragleave", function(i) {
            u(e);
            let o = d();
            return g(o.onDropNodeDragLeave(i));
        })("dragstart", function(i) {
            u(e);
            let o = d();
            return g(o.onDragStart(i));
        })("dragend", function(i) {
            u(e);
            let o = d();
            return g(o.onDragStop(i));
        }), h(3, "button", 4), C("click", function(i) {
            u(e);
            let o = d();
            return g(o.toggle(i));
        }), c(4, Ci, 3, 2, "ng-container", 5)(5, xi, 2, 5, "span", 6), _(), c(6, Ei, 2, 8, "p-checkbox", 7)(7, Mi, 1, 2, "span", 8), h(8, "span", 9), c(9, Oi, 2, 1, "span", 5)(10, ki, 2, 4, "span", 5), _()(), c(11, Fi, 2, 4, "ul", 10), _(), c(12, Ai, 1, 4, "li", 1);
    }
    if (t & 2) {
        let e = d();
        a("ngIf", e.tree.droppableNodes), s(), G(e.node.style), V(e.node.styleClass), a("ngClass", e.nodeClass)("ngStyle", k(29, oi, e.itemSize + "px")), D("aria-label", e.node.label)("aria-checked", e.checked)("aria-setsize", e.node.children ? e.node.children.length : 0)("aria-selected", e.selected)("aria-expanded", e.node.expanded)("aria-posinset", e.index + 1)("aria-level", e.level + 1)("tabindex", e.index === 0 ? 0 : -1)("data-id", e.node.key), s(), de("padding-left", e.level * e.indentation + "rem"), a("ngClass", e.nodeContentClass)("draggable", e.tree.draggableNodes), s(), D("data-pc-section", "toggler"), s(), a("ngIf", !e.tree.togglerIconTemplate && !e.tree._togglerIconTemplate), s(), a("ngIf", e.tree.togglerIconTemplate || e.tree._togglerIconTemplate), s(), a("ngIf", e.tree.selectionMode == "checkbox"), s(), a("ngIf", e.node.icon || e.node.expandedIcon || e.node.collapsedIcon), s(2), a("ngIf", !e.tree.getTemplateForNode(e.node)), s(), a("ngIf", e.tree.getTemplateForNode(e.node)), s(), a("ngIf", !e.tree.virtualScroll && e.node.children && e.node.expanded), s(), a("ngIf", e.tree.droppableNodes && e.lastChild);
    }
}
var ii = ["filter"],
    Li = ["node"],
    Ri = ["header"],
    Pi = ["footer"],
    $i = ["loader"],
    Hi = ["empty"],
    Bi = ["togglericon"],
    Qi = ["checkboxicon"],
    qi = ["loadingicon"],
    Ui = ["filtericon"],
    ji = ["scroller"],
    Wi = ["wrapper"],
    Xi = t => ({
        options: t
    });

function Gi(t, r) {
    if (t & 1 && I(0, "i"), t & 2) {
        let e = d(2);
        V("p-tree-loading-icon pi-spin " + e.loadingIcon);
    }
}

function Ki(t, r) {
    t & 1 && I(0, "SpinnerIcon", 16), t & 2 && a("spin", !0)("styleClass", "p-tree-loading-icon");
}

function Yi(t, r) {}

function Zi(t, r) {
    t & 1 && c(0, Yi, 0, 0, "ng-template");
}

function Ji(t, r) {
    if (t & 1 && (h(0, "span", 17), c(1, Zi, 1, 0, null, 9), _()), t & 2) {
        let e = d(3);
        s(), a("ngTemplateOutlet", e.loadingIconTemplate || e._loadingIconTemplate);
    }
}

function en(t, r) {
    if (t & 1 && (S(0), c(1, Ki, 1, 2, "SpinnerIcon", 14)(2, Ji, 2, 1, "span", 15), N()), t & 2) {
        let e = d(2);
        s(), a("ngIf", !e.loadingIconTemplate && !e._loadingIconTemplate), s(), a("ngIf", e.loadingIconTemplate || e._loadingIconTemplate);
    }
}

function tn(t, r) {
    if (t & 1 && (h(0, "div", 12), c(1, Gi, 1, 2, "i", 13)(2, en, 3, 2, "ng-container", 10), _()), t & 2) {
        let e = d();
        s(), a("ngIf", e.loadingIcon), s(), a("ngIf", !e.loadingIcon);
    }
}

function nn(t, r) {
    t & 1 && O(0);
}

function on(t, r) {
    t & 1 && O(0);
}

function rn(t, r) {
    if (t & 1 && c(0, on, 1, 0, "ng-container", 18), t & 2) {
        let e = d();
        a("ngTemplateOutlet", e.filterTemplate || e._filterTemplate)("ngTemplateOutletContext", k(2, li, e.filterOptions));
    }
}

function ln(t, r) {
    t & 1 && I(0, "SearchIcon", 21);
}

function an(t, r) {}

function sn(t, r) {
    t & 1 && c(0, an, 0, 0, "ng-template");
}

function dn(t, r) {
    if (t & 1 && (h(0, "span"), c(1, sn, 1, 0, null, 9), _()), t & 2) {
        let e = d(3);
        s(), a("ngTemplateOutlet", e.filterIconTemplate || e._filterIconTemplate);
    }
}

function cn(t, r) {
    if (t & 1) {
        let e = w();
        h(0, "p-iconField")(1, "input", 19, 0), C("keydown.enter", function(i) {
            return u(e), g(i.preventDefault());
        })("input", function(i) {
            u(e);
            let o = d(2);
            return g(o._filter(i.target.value));
        }), _(), h(3, "p-inputIcon"), c(4, ln, 1, 0, "SearchIcon", 20)(5, dn, 2, 1, "span", 10), _()();
    }
    if (t & 2) {
        let e = d(2);
        s(), a("pAutoFocus", e.filterInputAutoFocus), D("placeholder", e.filterPlaceholder), s(3), a("ngIf", !e.filterIconTemplate && !e._filterIconTemplate), s(), a("ngIf", e.filterIconTemplate || e._filterIconTemplate);
    }
}

function pn(t, r) {
    if (t & 1 && c(0, cn, 6, 4, "p-iconField", 10), t & 2) {
        let e = d();
        a("ngIf", e.filter);
    }
}

function hn(t, r) {
    if (t & 1 && I(0, "p-treeNode", 27, 3), t & 2) {
        let e = r.$implicit,
            n = r.first,
            i = r.last,
            o = r.index,
            l = d(2).options,
            p = d(3);
        a("level", e.level)("rowNode", e)("node", e.node)("parentNode", e.parent)("firstChild", n)("lastChild", i)("index", p.getIndex(l, o))("itemSize", l.itemSize)("indentation", p.indentation)("loadingMode", p.loadingMode);
    }
}

function _n(t, r) {
    if (t & 1 && (h(0, "ul", 25), c(1, hn, 2, 10, "p-treeNode", 26), _()), t & 2) {
        let e = d(),
            n = e.$implicit,
            i = e.options,
            o = d(3);
        G(i.contentStyle), a("ngClass", i.contentStyleClass), D("aria-label", o.ariaLabel)("aria-labelledby", o.ariaLabelledBy), s(), a("ngForOf", n)("ngForTrackBy", o.trackBy);
    }
}

function un(t, r) {
    if (t & 1 && c(0, _n, 2, 7, "ul", 24), t & 2) {
        let e = r.$implicit;
        a("ngIf", e);
    }
}

function gn(t, r) {
    t & 1 && O(0);
}

function mn(t, r) {
    if (t & 1 && c(0, gn, 1, 0, "ng-container", 18), t & 2) {
        let e = r.options,
            n = d(4);
        a("ngTemplateOutlet", n.loaderTemplate || n._loaderTemplate)("ngTemplateOutletContext", k(2, Xi, e));
    }
}

function fn(t, r) {
    t & 1 && (S(0), c(1, mn, 1, 4, "ng-template", null, 4, F), N());
}

function yn(t, r) {
    if (t & 1) {
        let e = w();
        h(0, "p-scroller", 23, 1), C("onScroll", function(i) {
            u(e);
            let o = d(2);
            return g(o.onScroll.emit(i));
        })("onScrollIndexChange", function(i) {
            u(e);
            let o = d(2);
            return g(o.onScrollIndexChange.emit(i));
        })("onLazyLoad", function(i) {
            u(e);
            let o = d(2);
            return g(o.onLazyLoad.emit(i));
        }), c(2, un, 1, 1, "ng-template", null, 2, F)(4, fn, 3, 0, "ng-container", 10), _();
    }
    if (t & 2) {
        let e = d(2);
        G(k(9, oi, e.scrollHeight !== "flex" ? e.scrollHeight : void 0)), a("items", e.serializedValue)("tabindex", -1)("scrollHeight", e.scrollHeight !== "flex" ? void 0 : "100%")("itemSize", e.virtualScrollItemSize || e._virtualNodeHeight)("lazy", e.lazy)("options", e.virtualScrollOptions), s(4), a("ngIf", e.loaderTemplate || e._loaderTemplate);
    }
}

function Tn(t, r) {
    if (t & 1 && I(0, "p-treeNode", 32), t & 2) {
        let e = r.$implicit,
            n = r.first,
            i = r.last,
            o = r.index,
            l = d(4);
        a("node", e)("firstChild", n)("lastChild", i)("index", o)("level", 0)("loadingMode", l.loadingMode);
    }
}

function Cn(t, r) {
    if (t & 1 && (h(0, "ul", 30), c(1, Tn, 1, 6, "p-treeNode", 31), _()), t & 2) {
        let e = d(3);
        D("aria-label", e.ariaLabel)("aria-labelledby", e.ariaLabelledBy), s(), a("ngForOf", e.getRootNode())("ngForTrackBy", e.trackBy.bind(e));
    }
}

function bn(t, r) {
    if (t & 1 && (S(0), h(1, "div", 28, 5), c(3, Cn, 2, 4, "ul", 29), _(), N()), t & 2) {
        let e = d(2);
        s(), de("max-height", e.scrollHeight), s(2), a("ngIf", e.getRootNode());
    }
}

function vn(t, r) {
    if (t & 1 && (S(0), c(1, yn, 5, 11, "p-scroller", 22)(2, bn, 4, 3, "ng-container", 10), N()), t & 2) {
        let e = d();
        s(), a("ngIf", e.virtualScroll), s(), a("ngIf", !e.virtualScroll);
    }
}

function xn(t, r) {
    if (t & 1 && (S(0), L(1), N()), t & 2) {
        let e = d(2);
        s(), pe(" ", e.emptyMessageLabel, " ");
    }
}

function Sn(t, r) {}

function Nn(t, r) {
    t & 1 && c(0, Sn, 0, 0, "ng-template", null, 6, F);
}

function In(t, r) {
    if (t & 1 && (h(0, "div", 33), c(1, xn, 2, 1, "ng-container", 34)(2, Nn, 2, 0, null, 9), _()), t & 2) {
        let e = d();
        s(), a("ngIf", !e.emptyMessageTemplate && !e._emptyMessageTemplate)("ngIfElse", e.emptyFilter), s(), a("ngTemplateOutlet", e.emptyMessageTemplate || e._emptyMessageTemplate);
    }
}

function wn(t, r) {
    t & 1 && O(0);
}
var En = ({
        dt: t
    }) => `
.p-tree {
    background: ${t("tree.background")};
    color: ${t("tree.color")};
    padding: ${t("tree.padding")};
}

.p-tree-root-children,
.p-tree-node-children {
    display: flex;
    list-style-type: none;
    flex-direction: column;
    margin: 0;
    gap: ${t("tree.gap")};
}

.p-tree-root-children {
    padding: 0;
    padding-block-start: ${t("tree.gap")};
}

.p-tree-node-children {
    padding-block-start: ${t("tree.gap")};
    padding-inline-start: ${t("tree.indent")};
}

.p-tree-node {
    padding: 0;
    outline: 0 none;
}

.p-tree-node-content {
    border-radius: ${t("tree.node.border.radius")};
    padding: ${t("tree.node.padding")};
    display: flex;
    align-items: center;
    outline-color: transparent;
    color: ${t("tree.node.color")};
    gap: ${t("tree.node.gap")};
    transition: background ${t("tree.transition.duration")}, color ${t("tree.transition.duration")}, outline-color ${t("tree.transition.duration")}, box-shadow ${t("tree.transition.duration")};
}

.p-tree-node:focus-visible > .p-tree-node-content {
    box-shadow: ${t("tree.node.focus.ring.shadow")};
    outline: ${t("tree.node.focus.ring.width")} ${t("tree.node.focus.ring.style")} ${t("tree.node.focus.ring.color")};
    outline-offset: ${t("tree.node.focus.ring.offset")};
}

.p-tree-node-content.p-tree-node-selectable:not(.p-tree-node-selected):hover {
    background: ${t("tree.node.hover.background")};
    color: ${t("tree.node.hover.color")};
}

.p-tree-node-content.p-tree-node-selectable:not(.p-tree-node-selected):hover .p-tree-node-icon {
    color: ${t("tree.node.icon.hover.color")};
}

.p-tree-node-content.p-tree-node-selected {
    background: ${t("tree.node.selected.background")};
    color: ${t("tree.node.selected.color")};
}

.p-tree-node-content.p-tree-node-selected .p-tree-node-toggle-button {
    color: inherit;
}

.p-tree-node-toggle-button {
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    width: ${t("tree.node.toggle.button.size")};
    height: ${t("tree.node.toggle.button.size")};
    color: ${t("tree.node.toggle.button.color")};
    border: 0 none;
    background: transparent;
    border-radius: ${t("tree.node.toggle.button.border.radius")};
    transition: background ${t("tree.transition.duration")}, color ${t("tree.transition.duration")}, border-color ${t("tree.transition.duration")}, outline-color ${t("tree.transition.duration")}, box-shadow ${t("tree.transition.duration")};
    outline-color: transparent;
    padding: 0;
}

.p-tree-node-toggle-button:enabled:hover {
    background: ${t("tree.node.toggle.button.hover.background")};
    color: ${t("tree.node.toggle.button.hover.color")};
}

.p-tree-node-content.p-tree-node-selected .p-tree-node-toggle-button:hover {
    background: ${t("tree.node.toggle.button.selected.hover.background")};
    color: ${t("tree.node.toggle.button.selected.hover.color")};
}

.p-tree-root {
    overflow: auto;
}

.p-tree-node-selectable {
    cursor: pointer;
    user-select: none;
}

.p-tree-node-leaf > .p-tree-node-content .p-tree-node-toggle-button {
    visibility: hidden;
}

.p-tree-node-icon {
    color: ${t("tree.node.icon.color")};
    transition: color ${t("tree.transition.duration")};
}

.p-tree-node-content.p-tree-node-selected .p-tree-node-icon {
    color: ${t("tree.node.icon.selected.color")};
}

.p-tree-filter-input {
    width: 100%;
}

.p-tree-loading {
    position: relative;
    height: 100%;
}

.p-tree-loading-icon {
    font-size: ${t("tree.loading.icon.size")};
    width: ${t("tree.loading.icon.size")};
    height: ${t("tree.loading.icon.size")};
}

.p-tree .p-tree-mask {
    position: absolute;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.p-tree-flex-scrollable {
    display: flex;
    flex: 1;
    height: 100%;
    flex-direction: column;
}

.p-tree-flex-scrollable .p-tree-root {
    flex: 1;
}

/* For PrimeNG */
.p-tree .p-tree-node-droppoint {
    height: 4px;
    list-style-type: none;
}

.p-tree .p-tree-node-droppoint-active {
    border: 0 none;
    background-color: ${t("primary.color")};
}

.p-tree-node-content.p-tree-node-dragover {
    background: ${t("tree.node.hover.background")};
    color: ${t("tree.node.hover.color")};
}

.p-tree-node-content.p-tree-node-dragover .p-tree-node-icon {
    color: ${t("tree.node.icon.hover.color")};
}

.p-tree-horizontal {
    width: auto;
    padding-inline-start: 0;
    padding-inline-end: 0;
    overflow: auto;
}

.p-tree.p-tree-horizontal table,
.p-tree.p-tree-horizontal tr,
.p-tree.p-tree-horizontal td {
    border-collapse: collapse;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}

.p-tree-horizontal .p-tree-node-content {
    font-weight: normal;
    padding: 0.4em 1em 0.4em 0.2em;
    display: flex;
    align-items: center;
}

.p-tree-horizontal .p-tree-node-parent .p-tree-node-content {
    font-weight: normal;
    white-space: nowrap;
}

.p-tree.p-tree-horizontal .p-tree-node.p-tree-node-leaf,
.p-tree.p-tree-horizontal .p-tree-node.p-tree-node-collapsed {
    padding-inline-end: 0;
}

.p-tree.p-tree-horizontal .p-tree-node-children {
    padding: 0;
    margin: 0;
}

.p-tree.p-tree-horizontal .p-tree-node-connector {
    width: 1px;
}

.p-tree.p-tree-horizontal .p-tree-node-connector-table {
    height: 100%;
    width: 1px;
}

.p-tree.p-tree-horizontal table {
    height: 0;
}
`,
    Mn = {
        root: ({
            instance: t
        }) => ({
            "p-tree p-component": !0,
            "p-tree-selectable": t.selectionMode != null,
            "p-tree-loading": t.loading,
            "p-tree-flex-scrollable": t.scrollHeight === "flex",
            "p-tree-node-dragover": t.dragHover
        }),
        mask: "p-tree-mask p-overlay-mask",
        loadingIcon: "p-tree-loading-icon",
        pcFilterInput: "p-tree-filter-input",
        wrapper: "p-tree-root",
        rootChildren: "p-tree-root-children",
        node: ({
            instance: t
        }) => ({
            "p-tree-node": !0,
            "p-tree-node-leaf": t.isLeaf()
        }),
        nodeContent: ({
            instance: t
        }) => ({
            "p-tree-node-content": !0,
            [t.styleClass]: !!t.styleClass,
            "p-tree-node-selectable": t.selectable,
            "p-tree-node-dragover": t.draghoverNode,
            "p-tree-node-selected": t.selectionMode === "checkbox" && t.tree.highlightOnSelect ? t.checked : t.selected
        }),
        nodeToggleButton: "p-tree-node-toggle-button",
        nodeToggleIcon: "p-tree-node-toggle-icon",
        nodeCheckbox: "p-tree-node-checkbox",
        nodeIcon: "p-tree-node-icon",
        nodeLabel: "p-tree-node-label",
        nodeChildren: "p-tree-node-children"
    },
    ni = (() => {
        class t extends Le {
            name = "tree";
            theme = En;
            classes = Mn;
            static ɵfac = (() => {
                let e;
                return function(i) {
                    return (e || (e = X(t)))(i || t);
                };
            })();
            static ɵprov = ee({
                token: t,
                factory: t.ɵfac
            });
        }
        return t;
    })();
var On = (() => {
        class t extends ae {
            static ICON_CLASS = "p-tree-node-icon ";
            rowNode;
            node;
            parentNode;
            root;
            index;
            firstChild;
            lastChild;
            level;
            indentation;
            itemSize;
            loadingMode;
            tree = te(Ie(() => ot));
            timeout;
            draghoverPrev;
            draghoverNext;
            draghoverNode;
            get selected() {
                return this.tree.selectionMode === "single" || this.tree.selectionMode === "multiple" ? this.isSelected() : void 0;
            }
            get checked() {
                return this.tree.selectionMode === "checkbox" ? this.isSelected() : void 0;
            }
            get nodeClass() {
                return this.tree._componentStyle.classes.node({
                    instance: this
                });
            }
            get nodeContentClass() {
                return this.tree._componentStyle.classes.nodeContent({
                    instance: this
                });
            }
            get selectable() {
                return this.node.selectable === !1 ? !1 : this.tree.selectionMode != null;
            }
            ngOnInit() {
                super.ngOnInit(), this.node.parent = this.parentNode;
                let n = this.tree.el.nativeElement.closest("p-dialog");
                this.parentNode && !n && (this.setAllNodesTabIndexes(), this.tree.syncNodeOption(this.node, this.tree.value, "parent", this.tree.getNodeWithKey(this.parentNode.key, this.tree.value)));
            }
            getIcon() {
                let e;
                return this.node.icon ? e = this.node.icon : e = this.node.expanded && this.node.children && this.node.children ? .length ? this.node.expandedIcon : this.node.collapsedIcon, t.ICON_CLASS + " " + e + " p-tree-node-icon";
            }
            isLeaf() {
                return this.tree.isNodeLeaf(this.node);
            }
            toggle(e) {
                this.node.expanded ? this.collapse(e) : this.expand(e), e.stopPropagation();
            }
            expand(e) {
                this.node.expanded = !0, this.tree.virtualScroll && (this.tree.updateSerializedValue(), this.focusVirtualNode()), this.tree.onNodeExpand.emit({
                    originalEvent: e,
                    node: this.node
                });
            }
            collapse(e) {
                this.node.expanded = !1, this.tree.virtualScroll && (this.tree.updateSerializedValue(), this.focusVirtualNode()), this.tree.onNodeCollapse.emit({
                    originalEvent: e,
                    node: this.node
                });
            }
            onNodeClick(e) {
                this.tree.onNodeClick(e, this.node);
            }
            onNodeKeydown(e) {
                e.key === "Enter" && this.tree.onNodeClick(e, this.node);
            }
            onNodeTouchEnd() {
                this.tree.onNodeTouchEnd();
            }
            onNodeRightClick(e) {
                this.tree.onNodeRightClick(e, this.node);
            }
            onNodeDblClick(e) {
                this.tree.onNodeDblClick(e, this.node);
            }
            isSelected() {
                return this.tree.isSelected(this.node);
            }
            isSameNode(e) {
                return e.currentTarget && (e.currentTarget.isSameNode(e.target) || e.currentTarget.isSameNode(e.target.closest('[role="treeitem"]')));
            }
            onDropPoint(e, n) {
                e.preventDefault();
                let i = this.tree.dragNode,
                    o = this.tree.dragNodeIndex,
                    l = this.tree.dragNodeScope,
                    p = this.tree.dragNodeTree === this.tree ? n === 1 || o !== this.index - 1 : !0;
                if (this.tree.allowDrop(i, this.node, l) && p) {
                    let m = $({}, this.createDropPointEventMetadata(n));
                    this.tree.validateDrop ? this.tree.onNodeDrop.emit({
                        originalEvent: e,
                        dragNode: i,
                        dropNode: this.node,
                        index: this.index,
                        accept: () => {
                            this.processPointDrop(m);
                        }
                    }) : (this.processPointDrop(m), this.tree.onNodeDrop.emit({
                        originalEvent: e,
                        dragNode: i,
                        dropNode: this.node,
                        index: this.index
                    }));
                }
                this.draghoverPrev = !1, this.draghoverNext = !1;
            }
            processPointDrop(e) {
                let n = e.dropNode.parent ? e.dropNode.parent.children : this.tree.value;
                e.dragNodeSubNodes.splice(e.dragNodeIndex, 1);
                let i = this.index;
                e.position < 0 ? (i = e.dragNodeSubNodes === n ? e.dragNodeIndex > e.index ? e.index : e.index - 1 : e.index, n.splice(i, 0, e.dragNode)) : (i = n.length, n.push(e.dragNode)), this.tree.dragDropService.stopDrag({
                    node: e.dragNode,
                    subNodes: e.dropNode.parent ? e.dropNode.parent.children : this.tree.value,
                    index: e.dragNodeIndex
                });
            }
            createDropPointEventMetadata(e) {
                return {
                    dragNode: this.tree.dragNode,
                    dragNodeIndex: this.tree.dragNodeIndex,
                    dragNodeSubNodes: this.tree.dragNodeSubNodes,
                    dropNode: this.node,
                    index: this.index,
                    position: e
                };
            }
            onDropPointDragOver(e) {
                e.dataTransfer.dropEffect = "move", e.preventDefault();
            }
            onDropPointDragEnter(e, n) {
                this.tree.allowDrop(this.tree.dragNode, this.node, this.tree.dragNodeScope) && (n < 0 ? this.draghoverPrev = !0 : this.draghoverNext = !0);
            }
            onDropPointDragLeave(e) {
                this.draghoverPrev = !1, this.draghoverNext = !1;
            }
            onDragStart(e) {
                this.tree.draggableNodes && this.node.draggable !== !1 ? (e.dataTransfer.setData("text", "data"), this.tree.dragDropService.startDrag({
                    tree: this,
                    node: this.node,
                    subNodes: this.node ? .parent ? this.node.parent.children : this.tree.value,
                    index: this.index,
                    scope: this.tree.draggableScope
                })) : e.preventDefault();
            }
            onDragStop(e) {
                this.tree.dragDropService.stopDrag({
                    node: this.node,
                    subNodes: this.node ? .parent ? this.node.parent.children : this.tree.value,
                    index: this.index
                });
            }
            onDropNodeDragOver(e) {
                e.dataTransfer.dropEffect = "move", this.tree.droppableNodes && (e.preventDefault(), e.stopPropagation());
            }
            onDropNode(e) {
                if (this.tree.droppableNodes && this.node ? .droppable !== !1) {
                    let n = this.tree.dragNode;
                    if (this.tree.allowDrop(n, this.node, this.tree.dragNodeScope)) {
                        let i = $({}, this.createDropNodeEventMetadata());
                        this.tree.validateDrop ? this.tree.onNodeDrop.emit({
                            originalEvent: e,
                            dragNode: n,
                            dropNode: this.node,
                            index: this.index,
                            accept: () => {
                                this.processNodeDrop(i);
                            }
                        }) : (this.processNodeDrop(i), this.tree.onNodeDrop.emit({
                            originalEvent: e,
                            dragNode: n,
                            dropNode: this.node,
                            index: this.index
                        }));
                    }
                }
                e.preventDefault(), e.stopPropagation(), this.draghoverNode = !1;
            }
            createDropNodeEventMetadata() {
                return {
                    dragNode: this.tree.dragNode,
                    dragNodeIndex: this.tree.dragNodeIndex,
                    dragNodeSubNodes: this.tree.dragNodeSubNodes,
                    dropNode: this.node
                };
            }
            processNodeDrop(e) {
                let n = e.dragNodeIndex;
                e.dragNodeSubNodes.splice(n, 1), e.dropNode.children ? e.dropNode.children.push(e.dragNode) : e.dropNode.children = [e.dragNode], this.tree.dragDropService.stopDrag({
                    node: e.dragNode,
                    subNodes: e.dropNode.parent ? e.dropNode.parent.children : this.tree.value,
                    index: n
                });
            }
            onDropNodeDragEnter(e) {
                this.tree.droppableNodes && this.node ? .droppable !== !1 && this.tree.allowDrop(this.tree.dragNode, this.node, this.tree.dragNodeScope) && (this.draghoverNode = !0);
            }
            onDropNodeDragLeave(e) {
                if (this.tree.droppableNodes) {
                    let n = e.currentTarget.getBoundingClientRect();
                    (e.x > n.left + n.width || e.x < n.left || e.y >= Math.floor(n.top + n.height) || e.y < n.top) && (this.draghoverNode = !1);
                }
            }
            onKeyDown(e) {
                if (!(!this.isSameNode(e) || this.tree.contextMenu && this.tree.contextMenu.containerViewChild ? .nativeElement.style.display === "block")) switch (e.code) {
                    case "ArrowDown":
                        this.onArrowDown(e);
                        break;
                    case "ArrowUp":
                        this.onArrowUp(e);
                        break;
                    case "ArrowRight":
                        this.onArrowRight(e);
                        break;
                    case "ArrowLeft":
                        this.onArrowLeft(e);
                        break;
                    case "Enter":
                    case "Space":
                    case "NumpadEnter":
                        this.onEnter(e);
                        break;
                    case "Tab":
                        this.setAllNodesTabIndexes();
                        break;
                    default:
                        break;
                }
            }
            onArrowUp(e) {
                let n = e.target.getAttribute("data-pc-section") === "toggler" ? e.target.closest('[role="treeitem"]') : e.target.parentElement;
                if (n.previousElementSibling) this.focusRowChange(n, n.previousElementSibling, this.findLastVisibleDescendant(n.previousElementSibling));
                else {
                    let i = this.getParentNodeElement(n);
                    i && this.focusRowChange(n, i);
                }
                e.preventDefault();
            }
            onArrowDown(e) {
                let n = e.target.getAttribute("data-pc-section") === "toggler" ? e.target.closest('[role="treeitem"]') : e.target,
                    i = n.children[1];
                if (i && i.children.length > 0) this.focusRowChange(n, i.children[0]);
                else if (n.parentElement.nextElementSibling) this.focusRowChange(n, n.parentElement.nextElementSibling);
                else {
                    let o = this.findNextSiblingOfAncestor(n.parentElement);
                    o && this.focusRowChange(n, o);
                }
                e.preventDefault();
            }
            onArrowRight(e) {
                !this.node ? .expanded && !this.tree.isNodeLeaf(this.node) && (this.expand(e), e.currentTarget.tabIndex = -1, setTimeout(() => {
                    this.onArrowDown(e);
                }, 1)), e.preventDefault();
            }
            onArrowLeft(e) {
                let n = e.target.getAttribute("data-pc-section") === "toggler" ? e.target.closest('[role="treeitem"]') : e.target;
                if (this.level === 0 && !this.node ? .expanded) return !1;
                if (this.node ? .expanded) {
                    this.collapse(e);
                    return;
                }
                let i = this.getParentNodeElement(n.parentElement);
                i && this.focusRowChange(e.currentTarget, i), e.preventDefault();
            }
            onEnter(e) {
                this.tree.onNodeClick(e, this.node), this.setTabIndexForSelectionMode(e, this.tree.nodeTouched), e.preventDefault();
            }
            setAllNodesTabIndexes() {
                let e = Ye(this.tree.el.nativeElement, ".p-tree-node"),
                    n = [...e].some(i => i.getAttribute("aria-selected") === "true" || i.getAttribute("aria-checked") === "true");
                if ([...e].forEach(i => {
                        i.tabIndex = -1;
                    }), n) {
                    let i = [...e].filter(o => o.getAttribute("aria-selected") === "true" || o.getAttribute("aria-checked") === "true");
                    i[0].tabIndex = 0;
                    return;
                }
                e.length && ([...e][0].tabIndex = 0);
            }
            setTabIndexForSelectionMode(e, n) {
                if (this.tree.selectionMode !== null) {
                    let i = [...Ye(this.tree.el.nativeElement, '[role="treeitem"]')];
                    e.currentTarget.tabIndex = n === !1 ? -1 : 0, i.every(o => o.tabIndex === -1) && (i[0].tabIndex = 0);
                }
            }
            findNextSiblingOfAncestor(e) {
                let n = this.getParentNodeElement(e);
                return n ? n.nextElementSibling ? n.nextElementSibling : this.findNextSiblingOfAncestor(n) : null;
            }
            findLastVisibleDescendant(e) {
                let i = Array.from(e.children).find(o => R(o, "p-tree-node")) ? .children[1];
                if (i && i.children.length > 0) {
                    let o = i.children[i.children.length - 1];
                    return this.findLastVisibleDescendant(o);
                } else return e;
            }
            getParentNodeElement(e) {
                let n = e.parentElement ? .parentElement ? .parentElement;
                return n ? .tagName === "P-TREENODE" ? n : null;
            }
            focusNode(e) {
                this.tree.droppableNodes ? e.children[1].focus() : e.children[0].focus();
            }
            focusRowChange(e, n, i) {
                e.tabIndex = "-1", n.children[0].tabIndex = "0", this.focusNode(i || n);
            }
            focusVirtualNode() {
                this.timeout = setTimeout(() => {
                    let e = Et(document.body, `[data-id="${this.node?.key??this.node?.data}"]`);
                    _e(e);
                }, 1);
            }
            static ɵfac = (() => {
                let e;
                return function(i) {
                    return (e || (e = X(t)))(i || t);
                };
            })();
            static ɵcmp = Q({
                type: t,
                selectors: [
                    ["p-treeNode"]
                ],
                inputs: {
                    rowNode: "rowNode",
                    node: "node",
                    parentNode: "parentNode",
                    root: [2, "root", "root", b],
                    index: [2, "index", "index", ne],
                    firstChild: [2, "firstChild", "firstChild", b],
                    lastChild: [2, "lastChild", "lastChild", b],
                    level: [2, "level", "level", ne],
                    indentation: [2, "indentation", "indentation", ne],
                    itemSize: [2, "itemSize", "itemSize", ne],
                    loadingMode: "loadingMode"
                },
                features: [ie],
                decls: 1,
                vars: 1,
                consts: [
                    ["icon", ""],
                    ["class", "p-tree-node-droppoint", 3, "ngClass", "drop", "dragover", "dragenter", "dragleave", 4, "ngIf"],
                    ["role", "treeitem", 3, "keydown", "ngClass", "ngStyle"],
                    [3, "click", "contextmenu", "dblclick", "touchend", "drop", "dragover", "dragenter", "dragleave", "dragstart", "dragend", "ngClass", "draggable"],
                    ["type", "button", "pRipple", "", "tabindex", "-1", 1, "p-tree-node-toggle-button", 3, "click"],
                    [4, "ngIf"],
                    ["class", "p-tree-node-toggle-icon", 4, "ngIf"],
                    ["styleClass", "p-tree-node-checkbox", 3, "ngModel", "binary", "indeterminate", "disabled", "variant", "tabindex", "click", 4, "ngIf"],
                    [3, "class", 4, "ngIf"],
                    [1, "p-tree-node-label"],
                    ["class", "p-tree-node-children", "style", "display: none;", "role", "group", 3, "display", 4, "ngIf"],
                    [1, "p-tree-node-droppoint", 3, "drop", "dragover", "dragenter", "dragleave", "ngClass"],
                    [3, "styleClass", 4, "ngIf"],
                    [3, "styleClass"],
                    [1, "p-tree-node-toggle-icon"],
                    [4, "ngTemplateOutlet", "ngTemplateOutletContext"],
                    ["styleClass", "p-tree-node-checkbox", 3, "click", "ngModel", "binary", "indeterminate", "disabled", "variant", "tabindex"],
                    ["role", "group", 1, "p-tree-node-children", 2, "display", "none"],
                    [3, "node", "parentNode", "firstChild", "lastChild", "index", "itemSize", "level", "loadingMode", 4, "ngFor", "ngForOf", "ngForTrackBy"],
                    [3, "node", "parentNode", "firstChild", "lastChild", "index", "itemSize", "level", "loadingMode"]
                ],
                template: function(n, i) {
                    n & 1 && c(0, zi, 13, 31), n & 2 && Qe(i.node ? 0 : -1);
                },
                dependencies: [t, j, oe, Te, U, le, re, Qt, Zt, be, ke, Ve, zt, Pe, tt, W],
                encapsulation: 2
            });
        }
        return t;
    })(),
    ot = (() => {
        class t extends ae {
            dragDropService;
            value;
            selectionMode;
            loadingMode = "mask";
            selection;
            style;
            styleClass;
            contextMenu;
            draggableScope;
            droppableScope;
            draggableNodes;
            droppableNodes;
            metaKeySelection = !1;
            propagateSelectionUp = !0;
            propagateSelectionDown = !0;
            loading;
            loadingIcon;
            emptyMessage = "";
            ariaLabel;
            togglerAriaLabel;
            ariaLabelledBy;
            validateDrop;
            filter;
            filterInputAutoFocus = !1;
            filterBy = "label";
            filterMode = "lenient";
            filterOptions;
            filterPlaceholder;
            filteredNodes;
            filterLocale;
            scrollHeight;
            lazy = !1;
            virtualScroll;
            virtualScrollItemSize;
            virtualScrollOptions;
            indentation = 1.5;
            _templateMap;
            trackBy = (e, n) => n;
            highlightOnSelect = !1;
            _virtualNodeHeight;
            get virtualNodeHeight() {
                return this._virtualNodeHeight;
            }
            set virtualNodeHeight(e) {
                this._virtualNodeHeight = e, console.log("The virtualNodeHeight property is deprecated, use virtualScrollItemSize property instead.");
            }
            selectionChange = new x();
            onNodeSelect = new x();
            onNodeUnselect = new x();
            onNodeExpand = new x();
            onNodeCollapse = new x();
            onNodeContextMenuSelect = new x();
            onNodeDoubleClick = new x();
            onNodeDrop = new x();
            onLazyLoad = new x();
            onScroll = new x();
            onScrollIndexChange = new x();
            onFilter = new x();
            filterTemplate;
            nodeTemplate;
            headerTemplate;
            footerTemplate;
            loaderTemplate;
            emptyMessageTemplate;
            togglerIconTemplate;
            checkboxIconTemplate;
            loadingIconTemplate;
            filterIconTemplate;
            filterViewChild;
            scroller;
            wrapperViewChild;
            templates;
            _headerTemplate;
            _emptyMessageTemplate;
            _footerTemplate;
            _loaderTemplate;
            _togglerIconTemplate;
            _checkboxIconTemplate;
            _loadingIconTemplate;
            _filterIconTemplate;
            _filterTemplate;
            ngAfterContentInit() {
                this.templates.length && (this._templateMap = {}), this.templates.forEach(e => {
                    switch (e.getType()) {
                        case "header":
                            this._headerTemplate = e.template;
                            break;
                        case "empty":
                            this._emptyMessageTemplate = e.template;
                            break;
                        case "footer":
                            this._footerTemplate = e.template;
                            break;
                        case "loader":
                            this._loaderTemplate = e.template;
                            break;
                        case "togglericon":
                            this._togglerIconTemplate = e.template;
                            break;
                        case "checkboxicon":
                            this._checkboxIconTemplate = e.template;
                            break;
                        case "loadingicon":
                            this._loadingIconTemplate = e.template;
                            break;
                        case "filtericon":
                            this._filterIconTemplate = e.template;
                            break;
                        case "filter":
                            this._filterTemplate = e.template;
                            break;
                        default:
                            this._templateMap[e.name] = e.template;
                            break;
                    }
                });
            }
            serializedValue;
            nodeTouched;
            dragNodeTree;
            dragNode;
            dragNodeSubNodes;
            dragNodeIndex;
            dragNodeScope;
            dragHover;
            dragStartSubscription;
            dragStopSubscription;
            _componentStyle = te(ni);
            constructor(e) {
                super(), this.dragDropService = e;
            }
            ngOnInit() {
                super.ngOnInit(), this.filterBy && (this.filterOptions = {
                    filter: e => this._filter(e),
                    reset: () => this.resetFilter()
                }), this.droppableNodes && (this.dragStartSubscription = this.dragDropService.dragStart$.subscribe(e => {
                    this.dragNodeTree = e.tree, this.dragNode = e.node, this.dragNodeSubNodes = e.subNodes, this.dragNodeIndex = e.index, this.dragNodeScope = e.scope;
                }), this.dragStopSubscription = this.dragDropService.dragStop$.subscribe(e => {
                    this.dragNodeTree = null, this.dragNode = null, this.dragNodeSubNodes = null, this.dragNodeIndex = null, this.dragNodeScope = null, this.dragHover = !1;
                }));
            }
            ngOnChanges(e) {
                super.ngOnChanges(e), e.value && (this.updateSerializedValue(), this.hasFilterActive() && this._filter(this.filterViewChild.nativeElement.value));
            }
            get containerClass() {
                return this._componentStyle.classes.root({
                    instance: this
                });
            }
            get emptyMessageLabel() {
                return this.emptyMessage || this.config.getTranslation(ze.EMPTY_MESSAGE);
            }
            updateSerializedValue() {
                this.serializedValue = [], this.serializeNodes(null, this.getRootNode(), 0, !0);
            }
            serializeNodes(e, n, i, o) {
                if (n && n.length)
                    for (let l of n) {
                        l.parent = e;
                        let p = {
                            node: l,
                            parent: e,
                            level: i,
                            visible: o && (e ? e.expanded : !0)
                        };
                        this.serializedValue.push(p), p.visible && l.expanded && this.serializeNodes(l, l.children, i + 1, p.visible);
                    }
            }
            onNodeClick(e, n) {
                let i = e.target;
                if (!(R(i, "p-tree-toggler") || R(i, "p-tree-toggler-icon"))) {
                    if (this.selectionMode) {
                        if (n.selectable === !1) {
                            n.style = "--p-focus-ring-color: none;";
                            return;
                        } else n.style ? .includes("--p-focus-ring-color") || (n.style = n.style ? `${n.style}--p-focus-ring-color: var(--primary-color)` : "--p-focus-ring-color: var(--primary-color)");
                        if (this.hasFilteredNodes() && (n = this.getNodeWithKey(n.key, this.filteredNodes), !n)) return;
                        let o = this.findIndexInSelection(n),
                            l = o >= 0;
                        if (this.isCheckboxSelectionMode()) l ? (this.propagateSelectionDown ? this.propagateDown(n, !1) : this.selection = this.selection.filter((p, m) => m != o), this.propagateSelectionUp && n.parent && this.propagateUp(n.parent, !1), this.selectionChange.emit(this.selection), this.onNodeUnselect.emit({
                            originalEvent: e,
                            node: n
                        })) : (this.propagateSelectionDown ? this.propagateDown(n, !0) : this.selection = [...(this.selection || []), n], this.propagateSelectionUp && n.parent && this.propagateUp(n.parent, !0), this.selectionChange.emit(this.selection), this.onNodeSelect.emit({
                            originalEvent: e,
                            node: n
                        }));
                        else if (this.nodeTouched ? !1 : this.metaKeySelection) {
                            let m = e.metaKey || e.ctrlKey;
                            l && m ? (this.isSingleSelectionMode() ? this.selectionChange.emit(null) : (this.selection = this.selection.filter((T, P) => P != o), this.selectionChange.emit(this.selection)), this.onNodeUnselect.emit({
                                originalEvent: e,
                                node: n
                            })) : (this.isSingleSelectionMode() ? this.selectionChange.emit(n) : this.isMultipleSelectionMode() && (this.selection = m ? this.selection || [] : [], this.selection = [...this.selection, n], this.selectionChange.emit(this.selection)), this.onNodeSelect.emit({
                                originalEvent: e,
                                node: n
                            }));
                        } else this.isSingleSelectionMode() ? l ? (this.selection = null, this.onNodeUnselect.emit({
                            originalEvent: e,
                            node: n
                        })) : (this.selection = n, setTimeout(() => {
                            this.onNodeSelect.emit({
                                originalEvent: e,
                                node: n
                            });
                        })) : l ? (this.selection = this.selection.filter((m, T) => T != o), this.onNodeUnselect.emit({
                            originalEvent: e,
                            node: n
                        })) : (this.selection = [...(this.selection || []), n], setTimeout(() => {
                            this.onNodeSelect.emit({
                                originalEvent: e,
                                node: n
                            });
                        })), this.selectionChange.emit(this.selection);
                    }
                    this.nodeTouched = !1;
                }
            }
            onNodeTouchEnd() {
                this.nodeTouched = !0;
            }
            onNodeRightClick(e, n) {
                if (this.contextMenu) {
                    let i = e.target;
                    if (i.className && i.className.indexOf("p-tree-toggler") === 0) return;
                    this.findIndexInSelection(n) >= 0 || (this.isSingleSelectionMode() ? this.selectionChange.emit(n) : this.selectionChange.emit([n])), this.contextMenu.show(e), this.onNodeContextMenuSelect.emit({
                        originalEvent: e,
                        node: n
                    });
                }
            }
            onNodeDblClick(e, n) {
                this.onNodeDoubleClick.emit({
                    originalEvent: e,
                    node: n
                });
            }
            findIndexInSelection(e) {
                let n = -1;
                if (this.selectionMode && this.selection)
                    if (this.isSingleSelectionMode()) n = this.selection.key && this.selection.key === e.key || this.selection == e ? 0 : -1;
                    else
                        for (let i = 0; i < this.selection.length; i++) {
                            let o = this.selection[i];
                            if (o.key && o.key === e.key || o == e) {
                                n = i;
                                break;
                            }
                        }
                return n;
            }
            syncNodeOption(e, n, i, o) {
                let l = this.hasFilteredNodes() ? this.getNodeWithKey(e.key, n) : null;
                l && (l[i] = o || e[i]);
            }
            hasFilteredNodes() {
                return this.filter && this.filteredNodes && this.filteredNodes.length;
            }
            hasFilterActive() {
                return this.filter && this.filterViewChild ? .nativeElement ? .value.length > 0;
            }
            getNodeWithKey(e, n) {
                for (let i of n) {
                    if (i.key === e) return i;
                    if (i.children) {
                        let o = this.getNodeWithKey(e, i.children);
                        if (o) return o;
                    }
                }
            }
            propagateUp(e, n) {
                if (e.children && e.children.length) {
                    let o = 0,
                        l = !1;
                    for (let p of e.children) this.isSelected(p) ? o++ : p.partialSelected && (l = !0);
                    if (n && o == e.children.length) this.selection = [...(this.selection || []), e], e.partialSelected = !1;
                    else {
                        if (!n) {
                            let p = this.findIndexInSelection(e);
                            p >= 0 && (this.selection = this.selection.filter((m, T) => T != p));
                        }
                        l || o > 0 && o != e.children.length ? e.partialSelected = !0 : e.partialSelected = !1;
                    }
                    this.syncNodeOption(e, this.filteredNodes, "partialSelected");
                }
                let i = e.parent;
                i && this.propagateUp(i, n);
            }
            propagateDown(e, n) {
                let i = this.findIndexInSelection(e);
                if (n && i == -1 ? this.selection = [...(this.selection || []), e] : !n && i > -1 && (this.selection = this.selection.filter((o, l) => l != i)), e.partialSelected = !1, this.syncNodeOption(e, this.filteredNodes, "partialSelected"), e.children && e.children.length)
                    for (let o of e.children) this.propagateDown(o, n);
            }
            isSelected(e) {
                return this.findIndexInSelection(e) != -1;
            }
            isSingleSelectionMode() {
                return this.selectionMode && this.selectionMode == "single";
            }
            isMultipleSelectionMode() {
                return this.selectionMode && this.selectionMode == "multiple";
            }
            isCheckboxSelectionMode() {
                return this.selectionMode && this.selectionMode == "checkbox";
            }
            isNodeLeaf(e) {
                return e.leaf == !1 ? !1 : !(e.children && e.children.length);
            }
            getRootNode() {
                return this.filteredNodes ? this.filteredNodes : this.value;
            }
            getTemplateForNode(e) {
                return this._templateMap ? e.type ? this._templateMap[e.type] : this._templateMap.default : null;
            }
            onDragOver(e) {
                this.droppableNodes && (!this.value || this.value.length === 0) && (e.dataTransfer.dropEffect = "move", e.preventDefault());
            }
            onDrop(e) {
                if (this.droppableNodes && (!this.value || this.value.length === 0)) {
                    e.preventDefault();
                    let n = this.dragNode;
                    if (this.allowDrop(n, null, this.dragNodeScope)) {
                        let i = this.dragNodeIndex;
                        this.value = this.value || [], this.validateDrop ? this.onNodeDrop.emit({
                            originalEvent: e,
                            dragNode: n,
                            dropNode: null,
                            index: i,
                            accept: () => {
                                this.processTreeDrop(n, i);
                            }
                        }) : (this.onNodeDrop.emit({
                            originalEvent: e,
                            dragNode: n,
                            dropNode: null,
                            index: i
                        }), this.processTreeDrop(n, i));
                    }
                }
            }
            processTreeDrop(e, n) {
                this.dragNodeSubNodes.splice(n, 1), this.value.push(e), this.dragDropService.stopDrag({
                    node: e
                });
            }
            onDragEnter() {
                this.droppableNodes && this.allowDrop(this.dragNode, null, this.dragNodeScope) && (this.dragHover = !0);
            }
            onDragLeave(e) {
                if (this.droppableNodes) {
                    let n = e.currentTarget.getBoundingClientRect();
                    (e.x > n.left + n.width || e.x < n.left || e.y > n.top + n.height || e.y < n.top) && (this.dragHover = !1);
                }
            }
            allowDrop(e, n, i) {
                if (e) {
                    if (this.isValidDragScope(i)) {
                        let o = !0;
                        if (n)
                            if (e === n) o = !1;
                            else {
                                let l = n.parent;
                                for (; l != null;) {
                                    if (l === e) {
                                        o = !1;
                                        break;
                                    }
                                    l = l.parent;
                                }
                            }
                        return o;
                    } else return !1;
                } else return !1;
            }
            isValidDragScope(e) {
                let n = this.droppableScope;
                if (n) {
                    if (typeof n == "string") {
                        if (typeof e == "string") return n === e;
                        if (Array.isArray(e)) return e.indexOf(n) != -1;
                    } else if (Array.isArray(n)) {
                        if (typeof e == "string") return n.indexOf(e) != -1;
                        if (Array.isArray(e)) {
                            for (let i of n)
                                for (let o of e)
                                    if (i === o) return !0;
                        }
                    }
                    return !1;
                } else return !0;
            }
            _filter(e) {
                let n = e;
                if (n === "") this.filteredNodes = null;
                else {
                    this.filteredNodes = [];
                    let i = this.filterBy.split(","),
                        o = Je(n).toLocaleLowerCase(this.filterLocale),
                        l = this.filterMode === "strict";
                    for (let p of this.value) {
                        let m = $({}, p),
                            T = {
                                searchFields: i,
                                filterText: o,
                                isStrictMode: l
                            };
                        (l && (this.findFilteredNodes(m, T) || this.isFilterMatched(m, T)) || !l && (this.isFilterMatched(m, T) || this.findFilteredNodes(m, T))) && this.filteredNodes.push(m);
                    }
                }
                this.updateSerializedValue(), this.onFilter.emit({
                    filter: n,
                    filteredValue: this.filteredNodes
                });
            }
            resetFilter() {
                this.filteredNodes = null, this.filterViewChild && this.filterViewChild.nativeElement && (this.filterViewChild.nativeElement.value = "");
            }
            scrollToVirtualIndex(e) {
                this.virtualScroll && this.scroller ? .scrollToIndex(e);
            }
            scrollTo(e) {
                this.virtualScroll ? this.scroller ? .scrollTo(e) : this.wrapperViewChild && this.wrapperViewChild.nativeElement && (this.wrapperViewChild.nativeElement.scrollTo ? this.wrapperViewChild.nativeElement.scrollTo(e) : (this.wrapperViewChild.nativeElement.scrollLeft = e.left, this.wrapperViewChild.nativeElement.scrollTop = e.top));
            }
            findFilteredNodes(e, n) {
                if (e) {
                    let i = !1;
                    if (e.children) {
                        let o = [...e.children];
                        e.children = [];
                        for (let l of o) {
                            let p = $({}, l);
                            this.isFilterMatched(p, n) && (i = !0, e.children.push(p));
                        }
                    }
                    if (i) return e.expanded = !0, !0;
                }
            }
            isFilterMatched(e, n) {
                let {
                    searchFields: i,
                    filterText: o,
                    isStrictMode: l
                } = n, p = !1;
                for (let m of i) Je(String(kt(e, m))).toLocaleLowerCase(this.filterLocale).indexOf(o) > -1 && (p = !0);
                return (!p || l && !this.isNodeLeaf(e)) && (p = this.findFilteredNodes(e, {
                    searchFields: i,
                    filterText: o,
                    isStrictMode: l
                }) || p), p;
            }
            getIndex(e, n) {
                let i = e.getItemOptions;
                return i ? i(n).index : n;
            }
            getBlockableElement() {
                return this.el.nativeElement.children[0];
            }
            ngOnDestroy() {
                this.dragStartSubscription && this.dragStartSubscription.unsubscribe(), this.dragStopSubscription && this.dragStopSubscription.unsubscribe(), super.ngOnDestroy();
            }
            static ɵfac = function(n) {
                return new(n || t)(M(Vt, 8));
            };
            static ɵcmp = Q({
                type: t,
                selectors: [
                    ["p-tree"]
                ],
                contentQueries: function(n, i, o) {
                    if (n & 1 && (v(o, ii, 4), v(o, Li, 4), v(o, Ri, 4), v(o, Pi, 4), v(o, $i, 4), v(o, Hi, 4), v(o, Bi, 4), v(o, Qi, 4), v(o, qi, 4), v(o, Ui, 4), v(o, Ae, 4)), n & 2) {
                        let l;
                        f(l = y()) && (i.filterTemplate = l.first), f(l = y()) && (i.nodeTemplate = l.first), f(l = y()) && (i.headerTemplate = l.first), f(l = y()) && (i.footerTemplate = l.first), f(l = y()) && (i.loaderTemplate = l.first), f(l = y()) && (i.emptyMessageTemplate = l.first), f(l = y()) && (i.togglerIconTemplate = l.first), f(l = y()) && (i.checkboxIconTemplate = l.first), f(l = y()) && (i.loadingIconTemplate = l.first), f(l = y()) && (i.filterIconTemplate = l.first), f(l = y()) && (i.templates = l);
                    }
                },
                viewQuery: function(n, i) {
                    if (n & 1 && (E(ii, 5), E(ji, 5), E(Wi, 5)), n & 2) {
                        let o;
                        f(o = y()) && (i.filterViewChild = o.first), f(o = y()) && (i.scroller = o.first), f(o = y()) && (i.wrapperViewChild = o.first);
                    }
                },
                inputs: {
                    value: "value",
                    selectionMode: "selectionMode",
                    loadingMode: "loadingMode",
                    selection: "selection",
                    style: "style",
                    styleClass: "styleClass",
                    contextMenu: "contextMenu",
                    draggableScope: "draggableScope",
                    droppableScope: "droppableScope",
                    draggableNodes: [2, "draggableNodes", "draggableNodes", b],
                    droppableNodes: [2, "droppableNodes", "droppableNodes", b],
                    metaKeySelection: [2, "metaKeySelection", "metaKeySelection", b],
                    propagateSelectionUp: [2, "propagateSelectionUp", "propagateSelectionUp", b],
                    propagateSelectionDown: [2, "propagateSelectionDown", "propagateSelectionDown", b],
                    loading: [2, "loading", "loading", b],
                    loadingIcon: "loadingIcon",
                    emptyMessage: "emptyMessage",
                    ariaLabel: "ariaLabel",
                    togglerAriaLabel: "togglerAriaLabel",
                    ariaLabelledBy: "ariaLabelledBy",
                    validateDrop: [2, "validateDrop", "validateDrop", b],
                    filter: [2, "filter", "filter", b],
                    filterInputAutoFocus: [2, "filterInputAutoFocus", "filterInputAutoFocus", b],
                    filterBy: "filterBy",
                    filterMode: "filterMode",
                    filterOptions: "filterOptions",
                    filterPlaceholder: "filterPlaceholder",
                    filteredNodes: "filteredNodes",
                    filterLocale: "filterLocale",
                    scrollHeight: "scrollHeight",
                    lazy: [2, "lazy", "lazy", b],
                    virtualScroll: [2, "virtualScroll", "virtualScroll", b],
                    virtualScrollItemSize: [2, "virtualScrollItemSize", "virtualScrollItemSize", ne],
                    virtualScrollOptions: "virtualScrollOptions",
                    indentation: [2, "indentation", "indentation", ne],
                    _templateMap: "_templateMap",
                    trackBy: "trackBy",
                    highlightOnSelect: [2, "highlightOnSelect", "highlightOnSelect", b],
                    virtualNodeHeight: "virtualNodeHeight"
                },
                outputs: {
                    selectionChange: "selectionChange",
                    onNodeSelect: "onNodeSelect",
                    onNodeUnselect: "onNodeUnselect",
                    onNodeExpand: "onNodeExpand",
                    onNodeCollapse: "onNodeCollapse",
                    onNodeContextMenuSelect: "onNodeContextMenuSelect",
                    onNodeDoubleClick: "onNodeDoubleClick",
                    onNodeDrop: "onNodeDrop",
                    onLazyLoad: "onLazyLoad",
                    onScroll: "onScroll",
                    onScrollIndexChange: "onScrollIndexChange",
                    onFilter: "onFilter"
                },
                features: [J([ni]), ie, at],
                decls: 8,
                vars: 10,
                consts: [
                    ["filter", ""],
                    ["scroller", ""],
                    ["content", ""],
                    ["treeNode", ""],
                    ["loader", ""],
                    ["wrapper", ""],
                    ["emptyFilter", ""],
                    [3, "drop", "dragover", "dragenter", "dragleave", "ngClass", "ngStyle"],
                    ["class", "p-tree-mask p-overlay-mask", 4, "ngIf"],
                    [4, "ngTemplateOutlet"],
                    [4, "ngIf"],
                    ["class", "p-tree-empty-message", 4, "ngIf"],
                    [1, "p-tree-mask", "p-overlay-mask"],
                    [3, "class", 4, "ngIf"],
                    [3, "spin", "styleClass", 4, "ngIf"],
                    ["class", "p-tree-loading-icon", 4, "ngIf"],
                    [3, "spin", "styleClass"],
                    [1, "p-tree-loading-icon"],
                    [4, "ngTemplateOutlet", "ngTemplateOutletContext"],
                    ["pInputText", "", "type", "search", "autocomplete", "off", 1, "p-tree-filter-input", 3, "keydown.enter", "input", "pAutoFocus"],
                    ["class", "p-tree-filter-icon", 4, "ngIf"],
                    [1, "p-tree-filter-icon"],
                    ["styleClass", "p-tree-root", 3, "items", "tabindex", "style", "scrollHeight", "itemSize", "lazy", "options", "onScroll", "onScrollIndexChange", "onLazyLoad", 4, "ngIf"],
                    ["styleClass", "p-tree-root", 3, "onScroll", "onScrollIndexChange", "onLazyLoad", "items", "tabindex", "scrollHeight", "itemSize", "lazy", "options"],
                    ["class", "p-tree-root-children", "role", "tree", 3, "ngClass", "style", 4, "ngIf"],
                    ["role", "tree", 1, "p-tree-root-children", 3, "ngClass"],
                    [3, "level", "rowNode", "node", "parentNode", "firstChild", "lastChild", "index", "itemSize", "indentation", "loadingMode", 4, "ngFor", "ngForOf", "ngForTrackBy"],
                    [3, "level", "rowNode", "node", "parentNode", "firstChild", "lastChild", "index", "itemSize", "indentation", "loadingMode"],
                    [1, "p-tree-root"],
                    ["class", "p-tree-root-children", "role", "tree", 4, "ngIf"],
                    ["role", "tree", 1, "p-tree-root-children"],
                    [3, "node", "firstChild", "lastChild", "index", "level", "loadingMode", 4, "ngFor", "ngForOf", "ngForTrackBy"],
                    [3, "node", "firstChild", "lastChild", "index", "level", "loadingMode"],
                    [1, "p-tree-empty-message"],
                    [4, "ngIf", "ngIfElse"]
                ],
                template: function(n, i) {
                    if (n & 1 && (h(0, "div", 7), C("drop", function(l) {
                            return i.onDrop(l);
                        })("dragover", function(l) {
                            return i.onDragOver(l);
                        })("dragenter", function() {
                            return i.onDragEnter();
                        })("dragleave", function(l) {
                            return i.onDragLeave(l);
                        }), c(1, tn, 3, 2, "div", 8)(2, nn, 1, 0, "ng-container", 9)(3, rn, 1, 4, "ng-container")(4, pn, 1, 1, "p-iconField")(5, vn, 3, 2, "ng-container", 10)(6, In, 3, 3, "div", 11)(7, wn, 1, 0, "ng-container", 9), _()), n & 2) {
                        let o;
                        V(i.styleClass), a("ngClass", i.containerClass)("ngStyle", i.style), s(), a("ngIf", i.loading && i.loadingMode === "mask"), s(), a("ngTemplateOutlet", i.headerTemplate || i._headerTemplate), s(), Qe(i.filterTemplate || i._filterTemplate ? 3 : 4), s(2), a("ngIf", (o = i.getRootNode()) == null ? null : o.length), s(), a("ngIf", !i.loading && (i.getRootNode() == null || i.getRootNode().length === 0)), s(), a("ngTemplateOutlet", i.footerTemplate || i._footerTemplate);
                    }
                },
                dependencies: [j, oe, Te, U, le, re, qt, W, Lt, tt, He, be, At, $t, On, Ft, Re],
                encapsulation: 2
            });
        }
        return t;
    })();
var Dn = ["value"],
    kn = ["header"],
    Vn = ["empty"],
    Fn = ["footer"],
    An = ["clearicon"],
    zn = ["triggericon"],
    Ln = ["dropdownicon"],
    Rn = ["filtericon"],
    Pn = ["closeicon"],
    $n = ["itemtogglericon"],
    Hn = ["itemcheckboxicon"],
    Bn = ["itemloadingicon"],
    Qn = ["container"],
    qn = ["focusInput"],
    Un = ["filter"],
    jn = ["tree"],
    Wn = ["panel"],
    Xn = ["overlay"],
    Gn = ["firstHiddenFocusableEl"],
    Kn = ["lastHiddenFocusableEl"],
    Yn = (t, r) => ({
        $implicit: t,
        placeholder: r
    }),
    ai = (t, r) => ({
        $implicit: t,
        options: r
    }),
    Zn = t => ({
        "max-height": t
    }),
    Jn = t => ({
        $implicit: t
    }),
    eo = (t, r) => ({
        $implicit: t,
        partialSelected: r
    });

function to(t, r) {
    t & 1 && O(0);
}

function io(t, r) {
    if (t & 1 && (S(0), c(1, to, 1, 0, "ng-container", 25), N()), t & 2) {
        let e = d();
        s(), a("ngTemplateOutlet", e.valueTemplate || e._valueTemplate)("ngTemplateOutletContext", H(2, Yn, e.value, e.placeholder));
    }
}

function no(t, r) {
    if (t & 1 && (S(0), L(1), N()), t & 2) {
        let e = d(2);
        s(), pe(" ", e.label || "empty", " ");
    }
}

function oo(t, r) {
    if (t & 1 && (h(0, "div", 27), I(1, "p-chip", 28), _()), t & 2) {
        let e = r.$implicit;
        s(), a("label", e.label);
    }
}

function ro(t, r) {
    if (t & 1 && (S(0), L(1), N()), t & 2) {
        let e = d(3);
        s(), ce(e.placeholder || "empty");
    }
}

function lo(t, r) {
    if (t & 1 && c(0, oo, 2, 1, "div", 26)(1, ro, 2, 1, "ng-container", 20), t & 2) {
        let e = d(2);
        a("ngForOf", e.value), s(), a("ngIf", e.emptyValue);
    }
}

function ao(t, r) {
    if (t & 1 && c(0, no, 2, 1, "ng-container", 19)(1, lo, 2, 2, "ng-template", null, 5, F), t & 2) {
        let e = qe(2),
            n = d();
        a("ngIf", n.display === "comma")("ngIfElse", e);
    }
}

function so(t, r) {
    if (t & 1) {
        let e = w();
        h(0, "TimesIcon", 31), C("click", function(i) {
            u(e);
            let o = d(2);
            return g(o.clear(i));
        }), _();
    }
    t & 2 && V("p-treeselect-clear-icon");
}

function co(t, r) {}

function po(t, r) {
    t & 1 && c(0, co, 0, 0, "ng-template");
}

function ho(t, r) {
    if (t & 1) {
        let e = w();
        h(0, "span", 32), C("click", function(i) {
            u(e);
            let o = d(2);
            return g(o.clear(i));
        }), c(1, po, 1, 0, null, 33), _();
    }
    if (t & 2) {
        let e = d(2);
        s(), a("ngTemplateOutlet", e.clearIconTemplate || e._clearIconTemplate);
    }
}

function _o(t, r) {
    if (t & 1 && (S(0), c(1, so, 1, 2, "TimesIcon", 29)(2, ho, 2, 1, "span", 30), N()), t & 2) {
        let e = d();
        s(), a("ngIf", !e.clearIconTemplate && !e._clearIconTemplate), s(), a("ngIf", e.clearIconTemplate || e.clearIconTemplate);
    }
}

function uo(t, r) {
    t & 1 && I(0, "ChevronDownIcon", 34), t & 2 && a("styleClass", "p-treeselect-dropdown-icon");
}

function go(t, r) {}

function mo(t, r) {
    t & 1 && c(0, go, 0, 0, "ng-template");
}

function fo(t, r) {
    if (t & 1 && (h(0, "span", 35), c(1, mo, 1, 0, null, 33), _()), t & 2) {
        let e = d();
        s(), a("ngTemplateOutlet", e.triggerIconTemplate || e._triggerIconTemplate || e.dropdownIconTemplate || e._dropdownIconTemplate);
    }
}

function yo(t, r) {
    t & 1 && O(0);
}

function To(t, r) {
    t & 1 && O(0);
}

function Co(t, r) {
    if (t & 1 && c(0, To, 1, 0, "ng-container", 33), t & 2) {
        let e = d(3);
        a("ngTemplateOutlet", e.emptyTemplate || e._emptyTemplate);
    }
}

function bo(t, r) {
    t & 1 && (S(0), c(1, Co, 1, 1, "ng-template", null, 10, F), N());
}

function vo(t, r) {
    t & 1 && O(0);
}

function xo(t, r) {
    if (t & 1 && c(0, vo, 1, 0, "ng-container", 25), t & 2) {
        let e = r.$implicit,
            n = d(3);
        a("ngTemplateOutlet", n.itemTogglerIconTemplate || n._itemTogglerIconTemplate)("ngTemplateOutletContext", k(2, Jn, e));
    }
}

function So(t, r) {
    t & 1 && c(0, xo, 1, 4, "ng-template", null, 11, F);
}

function No(t, r) {
    t & 1 && O(0);
}

function Io(t, r) {
    if (t & 1 && c(0, No, 1, 0, "ng-container", 25), t & 2) {
        let e = r.$implicit,
            n = r.partialSelected,
            i = d(3);
        a("ngTemplateOutlet", i.itemCheckboxIconTemplate || i._itemCheckboxIconTemplate)("ngTemplateOutletContext", H(2, eo, e, n));
    }
}

function wo(t, r) {
    t & 1 && c(0, Io, 1, 5, "ng-template", null, 12, F);
}

function Eo(t, r) {
    t & 1 && O(0);
}

function Mo(t, r) {
    if (t & 1 && c(0, Eo, 1, 0, "ng-container", 33), t & 2) {
        let e = d(3);
        a("ngTemplateOutlet", e.itemLoadingIconTemplate || e._itemLoadingIconTemplate);
    }
}

function Oo(t, r) {
    t & 1 && c(0, Mo, 1, 1, "ng-template", null, 13, F);
}

function Do(t, r) {
    t & 1 && O(0);
}

function ko(t, r) {
    if (t & 1) {
        let e = w();
        h(0, "div", 36, 6)(2, "span", 37, 7), C("focus", function(i) {
            u(e);
            let o = d();
            return g(o.onFirstHiddenFocus(i));
        }), _(), c(4, yo, 1, 0, "ng-container", 25), h(5, "div", 38)(6, "p-tree", 39, 8), C("selectionChange", function(i) {
            u(e);
            let o = d();
            return g(o.onSelectionChange(i));
        })("onNodeExpand", function(i) {
            u(e);
            let o = d();
            return g(o.nodeExpand(i));
        })("onNodeCollapse", function(i) {
            u(e);
            let o = d();
            return g(o.nodeCollapse(i));
        })("onNodeSelect", function(i) {
            u(e);
            let o = d();
            return g(o.onSelect(i));
        })("onNodeUnselect", function(i) {
            u(e);
            let o = d();
            return g(o.onUnselect(i));
        }), c(8, bo, 3, 0, "ng-container", 20)(9, So, 2, 0, null, 20)(10, wo, 2, 0, null, 20)(11, Oo, 2, 0, null, 20), _()(), c(12, Do, 1, 0, "ng-container", 25), h(13, "span", 37, 9), C("focus", function(i) {
            u(e);
            let o = d();
            return g(o.onLastHiddenFocus(i));
        }), _()();
    }
    if (t & 2) {
        let e = d();
        V(e.panelStyleClass), a("ngStyle", e.panelStyle)("ngClass", e.panelClass), D("id", e.listId), s(2), D("tabindex", 0)("data-p-hidden-accessible", !0)("data-p-hidden-focusable", !0), s(2), a("ngTemplateOutlet", e.headerTemplate || e._headerTemplate)("ngTemplateOutletContext", H(39, ai, e.value, e.options)), s(), a("ngStyle", k(42, Zn, e.scrollHeight)), s(), a("value", e.options)("propagateSelectionDown", e.propagateSelectionDown)("propagateSelectionUp", e.propagateSelectionUp)("selectionMode", e.selectionMode)("selection", e.value)("metaKeySelection", e.metaKeySelection)("emptyMessage", e.emptyMessage)("filter", e.filter)("filterBy", e.filterBy)("filterMode", e.filterMode)("filterPlaceholder", e.filterPlaceholder)("filterLocale", e.filterLocale)("filteredNodes", e.filteredNodes)("virtualScroll", e.virtualScroll)("virtualScrollItemSize", e.virtualScrollItemSize)("virtualScrollOptions", e.virtualScrollOptions)("_templateMap", e.templateMap)("loading", e.loading)("filterInputAutoFocus", e.filterInputAutoFocus), s(2), a("ngIf", e.emptyTemplate || e._emptyTemplate), s(), a("ngIf", e.itemTogglerIconTemplate || e._itemTogglerIconTemplate), s(), a("ngIf", e.itemCheckboxIconTemplate || e._itemCheckboxIconTemplate), s(), a("ngIf", e.itemLoadingIconTemplate || e._itemLoadingIconTemplate), s(), a("ngTemplateOutlet", e.footerTemplate)("ngTemplateOutletContext", H(44, ai, e.value, e.options)), s(), D("tabindex", 0)("data-p-hidden-accessible", !0)("data-p-hidden-focusable", !0);
    }
}
var Vo = ({
        dt: t
    }) => `
.p-treeselect {
    display: inline-flex;
    cursor: pointer;
    position: relative;
    user-select: none;
    background: ${t("treeselect.background")};
    border: 1px solid ${t("treeselect.border.color")};
    transition: background ${t("treeselect.transition.duration")}, color ${t("treeselect.transition.duration")}, border-color ${t("treeselect.transition.duration")}, outline-color ${t("treeselect.transition.duration")}, box-shadow ${t("treeselect.transition.duration")};
    border-radius: ${t("treeselect.border.radius")};
    outline-color: transparent;
    box-shadow: ${t("treeselect.shadow")};
}

p-treeSelect.ng-invalid.ng-dirty .p-treeselect,
p-tree-select.ng-invalid.ng-dirty .p-treeselect,
p-treeselect.ng-invalid.ng-dirty .p-treeselect {
    border-color: ${t("treeselect.invalid.border.color")};
}

p-treeSelect.ng-invalid.ng-dirty .p-treeselect.p-focus,
p-tree-select.ng-invalid.ng-dirty .p-treeselect.p-focus,
p-treeselect.ng-invalid.ng-dirty .p-treeselect.p-focus {
    border-color: ${t("treeselect.focus.border.color")};
}

.p-treeselect:not(.p-disabled):hover {
    border-color: ${t("treeselect.hover.border.color")};
}

.p-treeselect:not(.p-disabled).p-focus {
    border-color: ${t("treeselect.focus.border.color")};
    box-shadow: ${t("treeselect.focus.ring.shadow")};
    outline: ${t("treeselect.focus.ring.width")} ${t("treeselect.focus.ring.style")} ${t("treeselect.focus.ring.color")};
    outline-offset: ${t("treeselect.focus.ring.offset")};
}

.p-treeselect.p-variant-filled {
    background: ${t("treeselect.filled.background")};
}

.p-treeselect.p-variant-filled:not(.p-disabled):hover {
    background: ${t("treeselect.filled.hover.background")};
}

.p-treeselect.p-variant-filled.p-focus {
    background: ${t("treeselect.filled.focus.background")};
}

.p-treeselect.p-disabled {
    opacity: 1;
    background: ${t("treeselect.disabled.background")};
}

.p-treeselect-dropdown {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
    color: ${t("treeselect.dropdown.color")};
    width: ${t("treeselect.dropdown.width")};
    border-start-end-radius: ${t("border.radius.md")};
    border-end-end-radius: ${t("border.radius.md")};
}

.p-treeselect-label-container {
    overflow: hidden;
    flex: 1 1 auto;
    cursor: pointer;
}

.p-treeselect-label {
    display: flex;
    align-items-center;
    gap: calc(${t("treeselect.padding.y")} / 2);
    white-space: nowrap;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: ${t("treeselect.padding.y")} ${t("treeselect.padding.x")};
    color: ${t("treeselect.color")};
}

.p-treeselect-label.p-placeholder {
    color: ${t("treeselect.placeholder.color")};
}

p-treeselect.ng-invalid.ng-dirty .p-treeselect-label.p-placeholder {
    color: ${t("treeselect.invalid.placeholder.color")};
}

.p-treeselect.p-disabled .p-treeselect-label {
    color: ${t("treeselect.disabled.color")};
}

.p-treeselect-label-empty {
    overflow: hidden;
    visibility: hidden;
}

.p-treeselect .p-treeselect-overlay {
    min-width: 100%;
}

.p-treeselect-overlay {
    background: ${t("treeselect.overlay.background")};
    color: ${t("treeselect.overlay.color")};
    border: 1px solid ${t("treeselect.overlay.border.color")};
    border-radius: ${t("treeselect.overlay.border.radius")};
    box-shadow: ${t("treeselect.overlay.shadow")};
    overflow: hidden;
}


.p-treeselect-tree-container {
    overflow: auto;
}

.p-treeselect-empty-message {
    padding: ${t("treeselect.empty.message.padding")};
    background: transparent;
}

.p-treeselect-fluid {
    display: flex;
}

.p-treeselect-overlay .p-tree {
    padding: ${t("treeselect.tree.padding")};
}

.p-treeselect-label .p-chip {
    padding-top: calc(${t("treeselect.padding.y")} / 2);
    padding-bottom: calc(${t("treeselect.padding.y")} / 2);
    border-radius: ${t("treeselect.chip.border.radius")};
}

.p-treeselect-label:has(.p-chip) {
    padding: calc(${t("treeselect.padding.y")} / 2) calc(${t("treeselect.padding.x")} / 2);
}

.p-treeselect-sm .p-treeselect-label {
    font-size: ${t("treeselect.sm.font.size")};
    padding-block: ${t("treeselect.sm.padding.y")};
    padding-inline: ${t("treeselect.sm.padding.x")};
}

.p-treeselect-sm .p-treeselect-dropdown .p-icon {
    font-size: ${t("treeselect.sm.font.size")};
    width: ${t("treeselect.sm.font.size")};
    height: ${t("treeselect.sm.font.size")};
}

.p-treeselect-lg .p-treeselect-label {
    font-size: ${t("treeselect.lg.font.size")};
    padding-block: ${t("treeselect.lg.padding.y")};
    padding-inline: ${t("treeselect.lg.padding.x")};
}

.p-treeselect-lg .p-treeselect-dropdown .p-icon {
    font-size: ${t("treeselect.lg.font.size")};
    width: ${t("treeselect.lg.font.size")};
    height: ${t("treeselect.lg.font.size")};
}

.p-treeselect-clear-icon {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
    color: ${t("treeselect.clear.icon.color")};
}`,
    Fo = {
        root: ({
            instance: t
        }) => ({
            position: t.appendTo === "self" ? "relative" : void 0
        })
    },
    Ao = {
        root: ({
            instance: t
        }) => ({
            "p-treeselect p-component p-inputwrapper": !0,
            "p-treeselect-display-chip": t.display === "chip",
            "p-disabled": t.disabled,
            "p-invalid": t.invalid,
            "p-focus": t.focused,
            "p-variant-filled": t.variant === "filled" || t.config.inputVariant() === "filled" || t.config.inputStyle() === "filled",
            "p-inputwrapper-filled": !t.emptyValue,
            "p-inputwrapper-focus": t.focused || t.overlayVisible,
            "p-treeselect-open": t.overlayVisible,
            "p-treeselect-clearable": t.showClear,
            "p-treeselect-fluid": t.hasFluid,
            "p-treeselect-sm p-inputfield-sm": t.size === "small",
            "p-treeselect-lg p-inputfield-lg": t.size === "large"
        }),
        labelContainer: "p-treeselect-label-container",
        label: ({
            instance: t
        }) => ({
            "p-treeselect-label": !0,
            "p-placeholder": t.label === t.placeholder,
            "p-treeselect-label-empty": !t.placeholder && t.emptyValue
        }),
        chip: "p-treeselect-chip-item",
        pcChip: "p-treeselect-chip",
        dropdown: "p-treeselect-dropdown",
        dropdownIcon: "p-treeselect-dropdown-icon",
        panel: "p-treeselect-overlay p-component",
        treeContainer: "p-treeselect-tree-container",
        emptyMessage: "p-treeselect-empty-message"
    },
    si = (() => {
        class t extends Le {
            name = "treeselect";
            theme = Vo;
            classes = Ao;
            inlineStyles = Fo;
            static ɵfac = (() => {
                let e;
                return function(i) {
                    return (e || (e = X(t)))(i || t);
                };
            })();
            static ɵprov = ee({
                token: t,
                factory: t.ɵfac
            });
        }
        return t;
    })();
var zo = {
        provide: St,
        useExisting: Ie(() => Be),
        multi: !0
    },
    Be = (() => {
        class t extends ae {
            inputId;
            scrollHeight = "400px";
            disabled;
            metaKeySelection = !1;
            variant;
            display = "comma";
            selectionMode = "single";
            tabindex = "0";
            ariaLabel;
            ariaLabelledBy;
            placeholder;
            panelClass;
            panelStyle;
            fluid = !1;
            panelStyleClass;
            set containerStyle(e) {
                let n = this._componentStyle.inlineStyles.root({
                    instance: this
                });
                this._containerStyle = $($({}, n), e);
            }
            get containerStyle() {
                return this._containerStyle;
            }
            _containerStyle;
            containerStyleClass;
            labelStyle;
            labelStyleClass;
            overlayOptions;
            emptyMessage = "";
            appendTo;
            filter = !1;
            filterBy = "label";
            filterMode = "lenient";
            filterPlaceholder;
            filterLocale;
            filterInputAutoFocus = !0;
            propagateSelectionDown = !0;
            propagateSelectionUp = !0;
            showClear = !1;
            resetFilterOnHide = !0;
            virtualScroll;
            virtualScrollItemSize;
            size;
            virtualScrollOptions;
            autofocus;
            get options() {
                return this._options;
            }
            set options(e) {
                this._options = e, this.updateTreeState();
            }
            get showTransitionOptions() {
                return this._showTransitionOptions;
            }
            set showTransitionOptions(e) {
                this._showTransitionOptions = e, console.log("The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.");
            }
            get hideTransitionOptions() {
                return this._hideTransitionOptions;
            }
            set hideTransitionOptions(e) {
                this._hideTransitionOptions = e, console.log("The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.");
            }
            loading;
            onNodeExpand = new x();
            onNodeCollapse = new x();
            onShow = new x();
            onHide = new x();
            onClear = new x();
            onFilter = new x();
            onFocus = new x();
            onBlur = new x();
            onNodeUnselect = new x();
            onNodeSelect = new x();
            _showTransitionOptions;
            _hideTransitionOptions;
            containerEl;
            focusInput;
            filterViewChild;
            treeViewChild;
            panelEl;
            overlayViewChild;
            firstHiddenFocusableElementOnOverlay;
            lastHiddenFocusableElementOnOverlay;
            filteredNodes;
            filterValue = null;
            serializedValue;
            valueTemplate;
            headerTemplate;
            emptyTemplate;
            footerTemplate;
            clearIconTemplate;
            triggerIconTemplate;
            dropdownIconTemplate;
            filterIconTemplate;
            closeIconTemplate;
            itemTogglerIconTemplate;
            itemCheckboxIconTemplate;
            itemLoadingIconTemplate;
            templates;
            _valueTemplate;
            _headerTemplate;
            _emptyTemplate;
            _footerTemplate;
            _clearIconTemplate;
            _triggerIconTemplate;
            _filterIconTemplate;
            _closeIconTemplate;
            _itemTogglerIconTemplate;
            _itemCheckboxIconTemplate;
            _itemLoadingIconTemplate;
            _dropdownIconTemplate;
            focused;
            overlayVisible;
            selfChange;
            value;
            expandedNodes = [];
            _options;
            templateMap;
            onModelChange = () => {};
            onModelTouched = () => {};
            listId = "";
            _componentStyle = te(si);
            ngOnInit() {
                super.ngOnInit(), this.listId = Se("pn_id_") + "_list", this.updateTreeState();
            }
            ngAfterContentInit() {
                this.templates.length && (this.templateMap = {}), this.templates.forEach(e => {
                    switch (e.getType()) {
                        case "value":
                            this._valueTemplate = e.template;
                            break;
                        case "header":
                            this._headerTemplate = e.template;
                            break;
                        case "empty":
                            this._emptyTemplate = e.template;
                            break;
                        case "footer":
                            this._footerTemplate = e.template;
                            break;
                        case "clearicon":
                            this._clearIconTemplate = e.template;
                            break;
                        case "triggericon":
                            this._triggerIconTemplate = e.template;
                            break;
                        case "filtericon":
                            this._filterIconTemplate = e.template;
                            break;
                        case "closeicon":
                            this._closeIconTemplate = e.template;
                            break;
                        case "itemtogglericon":
                            this._itemTogglerIconTemplate = e.template;
                            break;
                        case "itemcheckboxicon":
                            this._itemCheckboxIconTemplate = e.template;
                            break;
                        case "dropdownicon":
                            this._dropdownIconTemplate = e.template;
                            break;
                        case "itemloadingicon":
                            this._itemLoadingIconTemplate = e.template;
                            break;
                        default:
                            e.name ? this.templateMap[e.name] = e.template : this.valueTemplate = e.template;
                            break;
                    }
                });
            }
            onOverlayAnimationStart(e) {
                switch (e.toState) {
                    case "visible":
                        if (this.filter) Ze(this.filterValue) && this.treeViewChild ? ._filter(this.filterValue), this.filterInputAutoFocus && this.filterViewChild ? .nativeElement.focus();
                        else {
                            let n = xe(this.panelEl.nativeElement);
                            n && n.length > 0 && n[0].focus();
                        }
                        break;
                }
            }
            onOverlayBeforeHide(e) {
                let n = xe(this.containerEl.nativeElement);
                n && n.length > 0 && n[0].focus();
            }
            onSelectionChange(e) {
                this.value = e, this.onModelChange(this.value), this.cd.markForCheck();
            }
            onClick(e) {
                this.disabled || !this.overlayViewChild ? .el ? .nativeElement ? .contains(e.target) && !R(e.target, "p-treeselect-close") && !R(e.target, "p-checkbox-box") && !R(e.target, "p-checkbox-icon") && (this.overlayVisible ? this.hide() : this.show(), this.focusInput ? .nativeElement.focus());
            }
            onKeyDown(e) {
                switch (e.code) {
                    case "ArrowDown":
                        this.overlayVisible || (this.show(), e.preventDefault()), this.onArrowDown(e), e.preventDefault();
                        break;
                    case "Space":
                    case "Enter":
                        this.overlayVisible || (this.show(), e.preventDefault());
                        break;
                    case "Escape":
                        this.overlayVisible && (this.hide(), this.focusInput ? .nativeElement.focus(), e.preventDefault());
                        break;
                    case "Tab":
                        this.onTabKey(e);
                        break;
                    default:
                        break;
                }
            }
            onFilterInput(e) {
                this.filterValue = e.target.value, this.treeViewChild ? ._filter(this.filterValue), this.onFilter.emit({
                    filter: this.filterValue,
                    filteredValue: this.treeViewChild ? .filteredNodes
                }), setTimeout(() => {
                    this.overlayViewChild.alignOverlay();
                });
            }
            onArrowDown(e) {
                if (this.overlayVisible && this.panelEl ? .nativeElement) {
                    let n = xe(this.panelEl.nativeElement, ".p-tree-node");
                    n && n.length > 0 && n[0].focus(), e.preventDefault();
                }
            }
            onFirstHiddenFocus(e) {
                let n = e.relatedTarget === this.focusInput ? .nativeElement ? Mt(this.overlayViewChild ? .overlayViewChild ? .nativeElement, ':not([data-p-hidden-focusable="true"])') : this.focusInput ? .nativeElement;
                _e(n);
            }
            onLastHiddenFocus(e) {
                let n = e.relatedTarget === this.focusInput ? .nativeElement ? Ot(this.overlayViewChild ? .overlayViewChild ? .nativeElement, ':not([data-p-hidden-focusable="true"])') : this.focusInput ? .nativeElement;
                _e(n);
            }
            show() {
                this.overlayVisible = !0;
            }
            hide(e) {
                this.overlayVisible = !1, this.resetFilter(), this.onHide.emit(e), this.cd.markForCheck();
            }
            clear(e) {
                this.value = null, this.resetExpandedNodes(), this.resetPartialSelected(), this.onModelChange(this.value), this.onClear.emit(), e.stopPropagation();
            }
            checkValue() {
                return this.value !== null && Ze(this.value);
            }
            onTabKey(e, n = !1) {
                n || (this.overlayVisible && this.hasFocusableElements() ? (_e(e.shiftKey ? this.lastHiddenFocusableElementOnOverlay.nativeElement : this.firstHiddenFocusableElementOnOverlay.nativeElement), e.preventDefault()) : this.overlayVisible && this.hide(this.filter));
            }
            hasFocusableElements() {
                return xe(this.overlayViewChild.overlayViewChild.nativeElement, ':not([data-p-hidden-focusable="true"])').length > 0;
            }
            resetFilter() {
                this.filter && !this.resetFilterOnHide ? (this.filteredNodes = this.treeViewChild ? .filteredNodes, this.treeViewChild ? .resetFilter()) : this.filterValue = null;
            }
            updateTreeState() {
                if (this.value) {
                    let e = this.selectionMode === "single" ? [this.value] : [...this.value];
                    this.resetExpandedNodes(), this.resetPartialSelected(), e && this.options && this.updateTreeBranchState(null, null, e);
                }
            }
            updateTreeBranchState(e, n, i) {
                if (e) {
                    if (this.isSelected(e) && (this.expandPath(n), i.splice(i.indexOf(e), 1)), i.length > 0 && e.children)
                        for (let o of e.children) this.updateTreeBranchState(o, [...n, e], i);
                } else
                    for (let o of this.options) this.updateTreeBranchState(o, [], i);
            }
            expandPath(e) {
                for (let n of e) n.expanded = !0;
                this.expandedNodes = [...e];
            }
            nodeExpand(e) {
                this.onNodeExpand.emit(e), this.expandedNodes.push(e.node);
            }
            nodeCollapse(e) {
                this.onNodeCollapse.emit(e), this.expandedNodes.splice(this.expandedNodes.indexOf(e.node), 1);
            }
            resetExpandedNodes() {
                for (let e of this.expandedNodes) e.expanded = !1;
                this.expandedNodes = [];
            }
            resetPartialSelected(e = this.options) {
                if (e)
                    for (let n of e) n.partialSelected = !1, n.children && n.children ? .length > 0 && this.resetPartialSelected(n.children);
            }
            findSelectedNodes(e, n, i) {
                if (e) {
                    if (this.isSelected(e) && (i.push(e), delete n[e.key]), Object.keys(n).length && e.children)
                        for (let o of e.children) this.findSelectedNodes(o, n, i);
                } else
                    for (let o of this.options) this.findSelectedNodes(o, n, i);
            }
            isSelected(e) {
                return this.findIndexInSelection(e) != -1;
            }
            findIndexInSelection(e) {
                let n = -1;
                if (this.value)
                    if (this.selectionMode === "single") n = this.value.key && this.value.key === e.key || this.value == e ? 0 : -1;
                    else
                        for (let i = 0; i < this.value.length; i++) {
                            let o = this.value[i];
                            if (o.key && o.key === e.key || o == e) {
                                n = i;
                                break;
                            }
                        }
                return n;
            }
            onSelect(e) {
                this.onNodeSelect.emit(e), this.selectionMode === "single" && (this.hide(), this.focusInput ? .nativeElement.focus());
            }
            onUnselect(e) {
                this.onNodeUnselect.emit(e);
            }
            onInputFocus(e) {
                this.disabled || (this.focused = !0, this.onFocus.emit(e));
            }
            onInputBlur(e) {
                this.focused = !1, this.onBlur.emit(e), this.onModelTouched();
            }
            writeValue(e) {
                this.value = e, this.updateTreeState(), this.cd.markForCheck();
            }
            registerOnChange(e) {
                this.onModelChange = e;
            }
            registerOnTouched(e) {
                this.onModelTouched = e;
            }
            setDisabledState(e) {
                setTimeout(() => {
                    this.disabled = e, this.cd.markForCheck();
                });
            }
            get containerClass() {
                return this._componentStyle.classes.root({
                    instance: this
                });
            }
            get hasFluid() {
                let n = this.el.nativeElement.closest("p-fluid");
                return this.fluid || !!n;
            }
            get labelClass() {
                return this._componentStyle.classes.label({
                    instance: this
                });
            }
            get emptyValue() {
                return !this.value || Object.keys(this.value).length === 0;
            }
            get emptyOptions() {
                return !this.options || this.options.length === 0;
            }
            get label() {
                let e = this.value || [];
                return e.length ? e.map(n => n.label).join(", ") : this.selectionMode === "single" && this.value ? e.label : this.placeholder;
            }
            static ɵfac = (() => {
                let e;
                return function(i) {
                    return (e || (e = X(t)))(i || t);
                };
            })();
            static ɵcmp = Q({
                type: t,
                selectors: [
                    ["p-treeSelect"],
                    ["p-treeselect"],
                    ["p-tree-select"]
                ],
                contentQueries: function(n, i, o) {
                    if (n & 1 && (v(o, Dn, 4), v(o, kn, 4), v(o, Vn, 4), v(o, Fn, 4), v(o, An, 4), v(o, zn, 4), v(o, Ln, 4), v(o, Rn, 4), v(o, Pn, 4), v(o, $n, 4), v(o, Hn, 4), v(o, Bn, 4), v(o, Ae, 4)), n & 2) {
                        let l;
                        f(l = y()) && (i.valueTemplate = l.first), f(l = y()) && (i.headerTemplate = l.first), f(l = y()) && (i.emptyTemplate = l.first), f(l = y()) && (i.footerTemplate = l.first), f(l = y()) && (i.clearIconTemplate = l.first), f(l = y()) && (i.triggerIconTemplate = l.first), f(l = y()) && (i.dropdownIconTemplate = l.first), f(l = y()) && (i.filterIconTemplate = l.first), f(l = y()) && (i.closeIconTemplate = l.first), f(l = y()) && (i.itemTogglerIconTemplate = l.first), f(l = y()) && (i.itemCheckboxIconTemplate = l.first), f(l = y()) && (i.itemLoadingIconTemplate = l.first), f(l = y()) && (i.templates = l);
                    }
                },
                viewQuery: function(n, i) {
                    if (n & 1 && (E(Qn, 5), E(qn, 5), E(Un, 5), E(jn, 5), E(Wn, 5), E(Xn, 5), E(Gn, 5), E(Kn, 5)), n & 2) {
                        let o;
                        f(o = y()) && (i.containerEl = o.first), f(o = y()) && (i.focusInput = o.first), f(o = y()) && (i.filterViewChild = o.first), f(o = y()) && (i.treeViewChild = o.first), f(o = y()) && (i.panelEl = o.first), f(o = y()) && (i.overlayViewChild = o.first), f(o = y()) && (i.firstHiddenFocusableElementOnOverlay = o.first), f(o = y()) && (i.lastHiddenFocusableElementOnOverlay = o.first);
                    }
                },
                inputs: {
                    inputId: "inputId",
                    scrollHeight: "scrollHeight",
                    disabled: [2, "disabled", "disabled", b],
                    metaKeySelection: [2, "metaKeySelection", "metaKeySelection", b],
                    variant: "variant",
                    display: "display",
                    selectionMode: "selectionMode",
                    tabindex: "tabindex",
                    ariaLabel: "ariaLabel",
                    ariaLabelledBy: "ariaLabelledBy",
                    placeholder: "placeholder",
                    panelClass: "panelClass",
                    panelStyle: "panelStyle",
                    fluid: [2, "fluid", "fluid", b],
                    panelStyleClass: "panelStyleClass",
                    containerStyle: "containerStyle",
                    containerStyleClass: "containerStyleClass",
                    labelStyle: "labelStyle",
                    labelStyleClass: "labelStyleClass",
                    overlayOptions: "overlayOptions",
                    emptyMessage: "emptyMessage",
                    appendTo: "appendTo",
                    filter: [2, "filter", "filter", b],
                    filterBy: "filterBy",
                    filterMode: "filterMode",
                    filterPlaceholder: "filterPlaceholder",
                    filterLocale: "filterLocale",
                    filterInputAutoFocus: [2, "filterInputAutoFocus", "filterInputAutoFocus", b],
                    propagateSelectionDown: [2, "propagateSelectionDown", "propagateSelectionDown", b],
                    propagateSelectionUp: [2, "propagateSelectionUp", "propagateSelectionUp", b],
                    showClear: [2, "showClear", "showClear", b],
                    resetFilterOnHide: [2, "resetFilterOnHide", "resetFilterOnHide", b],
                    virtualScroll: "virtualScroll",
                    virtualScrollItemSize: "virtualScrollItemSize",
                    size: "size",
                    virtualScrollOptions: "virtualScrollOptions",
                    autofocus: [2, "autofocus", "autofocus", b],
                    options: "options",
                    showTransitionOptions: "showTransitionOptions",
                    hideTransitionOptions: "hideTransitionOptions",
                    loading: [2, "loading", "loading", b]
                },
                outputs: {
                    onNodeExpand: "onNodeExpand",
                    onNodeCollapse: "onNodeCollapse",
                    onShow: "onShow",
                    onHide: "onHide",
                    onClear: "onClear",
                    onFilter: "onFilter",
                    onFocus: "onFocus",
                    onBlur: "onBlur",
                    onNodeUnselect: "onNodeUnselect",
                    onNodeSelect: "onNodeSelect"
                },
                features: [J([zo, si]), ie],
                decls: 18,
                vars: 30,
                consts: [
                    ["container", ""],
                    ["focusInput", ""],
                    ["defaultValueTemplate", ""],
                    ["overlay", ""],
                    ["content", ""],
                    ["chipsValueTemplate", ""],
                    ["panel", ""],
                    ["firstHiddenFocusableEl", ""],
                    ["tree", ""],
                    ["lastHiddenFocusableEl", ""],
                    ["empty", ""],
                    ["togglericon", ""],
                    ["checkboxicon", ""],
                    ["loadingicon", ""],
                    [3, "click", "ngClass", "ngStyle"],
                    [1, "p-hidden-accessible"],
                    ["type", "text", "role", "combobox", "readonly", "", 3, "focus", "blur", "keydown", "disabled", "pAutoFocus"],
                    [1, "p-treeselect-label-container"],
                    [3, "ngClass", "ngStyle"],
                    [4, "ngIf", "ngIfElse"],
                    [4, "ngIf"],
                    ["role", "button", "aria-haspopup", "tree", 1, "p-treeselect-dropdown"],
                    [3, "styleClass", 4, "ngIf"],
                    ["class", "p-treeselect-dropdown-icon", 4, "ngIf"],
                    [3, "visibleChange", "onAnimationStart", "onBeforeHide", "onShow", "onHide", "visible", "options", "target", "appendTo", "showTransitionOptions", "hideTransitionOptions"],
                    [4, "ngTemplateOutlet", "ngTemplateOutletContext"],
                    ["class", "p-treeselect-chip-item", 4, "ngFor", "ngForOf"],
                    [1, "p-treeselect-chip-item"],
                    ["styleClass", "p-treeselect-chip", 3, "label"],
                    [3, "class", "click", 4, "ngIf"],
                    ["class", "p-treeselect-clear-icon", 3, "click", 4, "ngIf"],
                    [3, "click"],
                    [1, "p-treeselect-clear-icon", 3, "click"],
                    [4, "ngTemplateOutlet"],
                    [3, "styleClass"],
                    [1, "p-treeselect-dropdown-icon"],
                    [1, "p-treeselect-overlay", "p-component", 3, "ngStyle", "ngClass"],
                    ["role", "presentation", 1, "p-hidden-accessible", "p-hidden-focusable", 3, "focus"],
                    [1, "p-treeselect-tree-container", 3, "ngStyle"],
                    [3, "selectionChange", "onNodeExpand", "onNodeCollapse", "onNodeSelect", "onNodeUnselect", "value", "propagateSelectionDown", "propagateSelectionUp", "selectionMode", "selection", "metaKeySelection", "emptyMessage", "filter", "filterBy", "filterMode", "filterPlaceholder", "filterLocale", "filteredNodes", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "_templateMap", "loading", "filterInputAutoFocus"]
                ],
                template: function(n, i) {
                    if (n & 1) {
                        let o = w();
                        h(0, "div", 14, 0), C("click", function(p) {
                            return u(o), g(i.onClick(p));
                        }), h(2, "div", 15)(3, "input", 16, 1), C("focus", function(p) {
                            return u(o), g(i.onInputFocus(p));
                        })("blur", function(p) {
                            return u(o), g(i.onInputBlur(p));
                        })("keydown", function(p) {
                            return u(o), g(i.onKeyDown(p));
                        }), _()(), h(5, "div", 17)(6, "div", 18), c(7, io, 2, 5, "ng-container", 19)(8, ao, 3, 2, "ng-template", null, 2, F), _()(), c(10, _o, 3, 2, "ng-container", 20), h(11, "div", 21), c(12, uo, 1, 1, "ChevronDownIcon", 22)(13, fo, 2, 1, "span", 23), _(), h(14, "p-overlay", 24, 3), Z("visibleChange", function(p) {
                            return u(o), Y(i.overlayVisible, p) || (i.overlayVisible = p), g(p);
                        }), C("onAnimationStart", function(p) {
                            return u(o), g(i.onOverlayAnimationStart(p));
                        })("onBeforeHide", function(p) {
                            return u(o), g(i.onOverlayBeforeHide(p));
                        })("onShow", function(p) {
                            return u(o), g(i.onShow.emit(p));
                        })("onHide", function(p) {
                            return u(o), g(i.hide(p));
                        }), c(16, ko, 15, 47, "ng-template", null, 4, F), _()();
                    }
                    if (n & 2) {
                        let o, l, p = qe(9);
                        V(i.containerStyleClass), a("ngClass", i.containerClass)("ngStyle", i.containerStyle), s(3), a("disabled", i.disabled)("pAutoFocus", i.autofocus), D("id", i.inputId)("tabindex", i.disabled ? -1 : i.tabindex)("aria-controls", i.overlayVisible ? i.listId : null)("aria-haspopup", "tree")("aria-expanded", (o = i.overlayVisible) !== null && o !== void 0 ? o : !1)("aria-labelledby", i.ariaLabelledBy)("aria-label", i.ariaLabel || (i.label === "p-emptylabel" ? void 0 : i.label)), s(3), V(i.labelStyleClass), a("ngClass", i.labelClass)("ngStyle", i.labelStyle), s(), a("ngIf", i.valueTemplate || i._valueTemplate)("ngIfElse", p), s(3), a("ngIf", i.checkValue() && !i.disabled && i.showClear), s(), D("aria-expanded", (l = i.overlayVisible) !== null && l !== void 0 ? l : !1)("aria-label", "treeselect trigger"), s(), a("ngIf", !i.triggerIconTemplate && !i._triggerIconTemplate && !i.dropdownIconTemplate && !i._dropdownIconTemplate), s(), a("ngIf", i.triggerIconTemplate || i._triggerIconTemplate || i.dropdownIconTemplate || i._dropdownIconTemplate), s(), K("visible", i.overlayVisible), a("options", i.overlayOptions)("target", "@parent")("appendTo", i.appendTo)("showTransitionOptions", i.showTransitionOptions)("hideTransitionOptions", i.hideTransitionOptions);
                    }
                },
                dependencies: [j, oe, Te, U, le, re, Bt, W, ot, Re, $e, Pe, Jt],
                encapsulation: 2,
                changeDetection: 0
            });
        }
        return t;
    })(),
    di = (() => {
        class t {
            static ɵfac = function(n) {
                return new(n || t)();
            };
            static ɵmod = Me({
                type: t
            });
            static ɵinj = we({
                imports: [Be, W, W]
            });
        }
        return t;
    })();
var Ro = ["mask"],
    Po = ["content"],
    $o = ["footer"],
    Ho = ["titlebar"],
    Bo = (t, r, e) => ({
        position: "fixed",
        height: "100%",
        width: "100%",
        left: 0,
        top: 0,
        display: "flex",
        "justify-content": t,
        "align-items": r,
        "pointer-events": e
    }),
    Qo = t => ({
        "p-dialog p-component": !0,
        "p-dialog-maximized": t
    }),
    qo = () => ({
        display: "flex",
        "flex-direction": "column",
        "pointer-events": "auto"
    }),
    Uo = (t, r) => ({
        transform: t,
        transition: r
    }),
    jo = t => ({
        value: "visible",
        params: t
    });

function Wo(t, r) {
    if (t & 1) {
        let e = w();
        h(0, "div", 14), C("mousedown", function(i) {
            u(e);
            let o = d(2);
            return g(o.initResize(i));
        }), _();
    }
    t & 2 && a("ngClass", "p-resizable-handle");
}

function Xo(t, r) {
    t & 1 && O(0);
}

function Go(t, r) {
    t & 1 && I(0, "WindowMaximizeIcon");
}

function Ko(t, r) {
    t & 1 && I(0, "WindowMinimizeIcon");
}

function Yo(t, r) {
    if (t & 1 && (S(0), c(1, Go, 1, 0, "WindowMaximizeIcon", 11)(2, Ko, 1, 0, "WindowMinimizeIcon", 11), N()), t & 2) {
        let e = d(5);
        s(), a("ngIf", !e.maximized && !e.maximizeIconTemplate), s(), a("ngIf", e.maximized && !e.minimizeIconTemplate);
    }
}

function Zo(t, r) {}

function Jo(t, r) {
    t & 1 && c(0, Zo, 0, 0, "ng-template");
}

function er(t, r) {
    if (t & 1 && (S(0), c(1, Jo, 1, 0, null, 21), N()), t & 2) {
        let e = d(5);
        s(), a("ngTemplateOutlet", e.maximizeIconTemplate);
    }
}

function tr(t, r) {}

function ir(t, r) {
    t & 1 && c(0, tr, 0, 0, "ng-template");
}

function nr(t, r) {
    if (t & 1 && (S(0), c(1, ir, 1, 0, null, 21), N()), t & 2) {
        let e = d(5);
        s(), a("ngTemplateOutlet", e.minimizeIconTemplate);
    }
}

function or(t, r) {
    if (t & 1) {
        let e = w();
        h(0, "p-button", 20), C("onClick", function() {
            u(e);
            let i = d(4);
            return g(i.maximize());
        })("keydown.enter", function() {
            u(e);
            let i = d(4);
            return g(i.maximize());
        }), c(1, Yo, 3, 2, "ng-container", 11)(2, er, 2, 1, "ng-container", 11)(3, nr, 2, 1, "ng-container", 11), _();
    }
    if (t & 2) {
        let e = d(4);
        a("styleClass", "p-dialog-maximize-button")("tabindex", e.maximizable ? "0" : "-1"), s(), a("ngIf", !e.maximizeIcon), s(), a("ngIf", !e.maximized), s(), a("ngIf", e.maximized);
    }
}

function rr(t, r) {
    t & 1 && (S(0), I(1, "TimesIcon"), N());
}

function lr(t, r) {}

function ar(t, r) {
    t & 1 && c(0, lr, 0, 0, "ng-template");
}

function sr(t, r) {
    if (t & 1 && (h(0, "span"), c(1, ar, 1, 0, null, 21), _()), t & 2) {
        let e = d(5);
        s(), a("ngTemplateOutlet", e.closeIconTemplate);
    }
}

function dr(t, r) {
    if (t & 1) {
        let e = w();
        h(0, "p-button", 22), C("onClick", function() {
            u(e);
            let i = d(4);
            return g(i.hide());
        })("keydown.enter", function() {
            u(e);
            let i = d(4);
            return g(i.hide());
        }), c(1, rr, 2, 0, "ng-container", 11)(2, sr, 2, 1, "span", 11), _();
    }
    if (t & 2) {
        let e = d(4);
        a("styleClass", "p-dialog-close-button")("ariaLabel", e.ddconfig.closeAriaLabel || e.defaultCloseAriaLabel), s(), a("ngIf", !e.closeIconTemplate), s(), a("ngIf", e.closeIconTemplate);
    }
}

function cr(t, r) {
    if (t & 1 && (S(0), h(1, "span", 16), L(2), _(), h(3, "div", 17), c(4, or, 4, 5, "p-button", 18)(5, dr, 3, 4, "p-button", 19), _(), N()), t & 2) {
        let e = d(3);
        s(), a("ngClass", "p-dialog-title")("id", e.ariaLabelledBy), s(), ce(e.ddconfig.header), s(), a("ngClass", "p-dialog-header-actions"), s(), a("ngIf", e.ddconfig.maximizable), s(), a("ngIf", e.closable);
    }
}

function pr(t, r) {
    if (t & 1) {
        let e = w();
        h(0, "div", 15, 3), C("mousedown", function(i) {
            u(e);
            let o = d(2);
            return g(o.initDrag(i));
        }), c(2, Xo, 1, 0, "ng-container", 12)(3, cr, 6, 6, "ng-container", 11), _();
    }
    if (t & 2) {
        let e = d(2);
        a("ngClass", "p-dialog-header"), s(2), a("ngComponentOutlet", e.headerTemplate), s(), a("ngIf", !e.headerTemplate);
    }
}

function hr(t, r) {}

function _r(t, r) {
    t & 1 && c(0, hr, 0, 0, "ng-template", 23);
}

function ur(t, r) {
    t & 1 && O(0);
}

function gr(t, r) {
    if (t & 1 && (S(0), L(1), N()), t & 2) {
        let e = d(3);
        s(), pe(" ", e.ddconfig.footer, " ");
    }
}

function mr(t, r) {
    t & 1 && O(0);
}

function fr(t, r) {
    if (t & 1 && (h(0, "div", 17, 4), c(2, gr, 2, 1, "ng-container", 11)(3, mr, 1, 0, "ng-container", 12), _()), t & 2) {
        let e = d(2);
        a("ngClass", "p-dialog-footer"), s(2), a("ngIf", !e.footerTemplate), s(), a("ngComponentOutlet", e.footerTemplate);
    }
}

function yr(t, r) {
    if (t & 1) {
        let e = w();
        h(0, "div", 7, 1), C("@animation.start", function(i) {
            u(e);
            let o = d();
            return g(o.onAnimationStart(i));
        })("@animation.done", function(i) {
            u(e);
            let o = d();
            return g(o.onAnimationEnd(i));
        }), c(2, Wo, 1, 1, "div", 8)(3, pr, 4, 3, "div", 9), h(4, "div", 10, 2), c(6, _r, 1, 0, null, 11)(7, ur, 1, 0, "ng-container", 12), _(), c(8, fr, 4, 3, "div", 13), _();
    }
    if (t & 2) {
        let e = d();
        G(e.ddconfig.style), V(e.ddconfig.styleClass), de("width", e.ddconfig.width)("height", e.ddconfig.height), a("ngClass", k(22, Qo, e.maximizable && e.maximized))("ngStyle", q(24, qo))("@animation", k(28, jo, H(25, Uo, e.transformOptions, e.ddconfig.transitionOptions || "150ms cubic-bezier(0, 0, 0.2, 1)")))("pFocusTrapDisabled", e.ddconfig.focusTrap === !1), D("aria-labelledby", e.ariaLabelledBy)("aria-modal", !0)("id", e.dialogId), s(2), a("ngIf", e.ddconfig.resizable), s(), a("ngIf", e.ddconfig.showHeader !== !1), s(), a("ngClass", "p-dialog-content")("ngStyle", e.ddconfig.contentStyle), s(2), a("ngIf", !e.contentTemplate), s(), a("ngComponentOutlet", e.contentTemplate), s(), a("ngIf", e.ddconfig.footer || e.footerTemplate);
    }
}
var ci = (() => {
        class t {
            viewContainerRef;
            constructor(e) {
                this.viewContainerRef = e;
            }
            static ɵfac = function(n) {
                return new(n || t)(M(pt));
            };
            static ɵdir = ht({
                type: t,
                selectors: [
                    ["", "pDynamicDialogContent", ""]
                ]
            });
        }
        return t;
    })(),
    pi = (() => {
        class t extends Gt {
            name = "dialog";
            static ɵfac = (() => {
                let e;
                return function(i) {
                    return (e || (e = X(t)))(i || t);
                };
            })();
            static ɵprov = ee({
                token: t,
                factory: t.ɵfac
            });
        }
        return t;
    })();
var ge = class {
        data;
        inputValues;
        header;
        ariaLabelledBy;
        footer;
        width;
        height;
        closeOnEscape = !1;
        focusOnShow = !0;
        focusTrap = !0;
        baseZIndex;
        autoZIndex = !1;
        dismissableMask = !1;
        rtl = !1;
        style;
        contentStyle;
        styleClass;
        transitionOptions;
        closable = !1;
        showHeader = !1;
        modal = !1;
        maskStyleClass;
        resizable = !1;
        draggable = !1;
        keepInViewport = !1;
        minX;
        minY;
        maximizable = !1;
        maximizeIcon;
        minimizeIcon;
        position;
        closeAriaLabel;
        appendTo;
        duplicate = !1;
        breakpoints;
        templates;
    },
    se = class {
        constructor() {}
        close(r) {
            this._onClose.next(r), setTimeout(() => {
                this._onClose.complete();
            }, 1e3);
        }
        destroy() {
            this._onDestroy.next(null);
        }
        dragStart(r) {
            this._onDragStart.next(r);
        }
        dragEnd(r) {
            this._onDragEnd.next(r);
        }
        resizeInit(r) {
            this._onResizeInit.next(r);
        }
        resizeEnd(r) {
            this._onResizeEnd.next(r);
        }
        maximize(r) {
            this._onMaximize.next(r);
        }
        _onClose = new B();
        onClose = this._onClose.asObservable();
        _onDestroy = new B();
        onDestroy = this._onDestroy.asObservable();
        _onDragStart = new B();
        onDragStart = this._onDragStart.asObservable();
        _onDragEnd = new B();
        onDragEnd = this._onDragEnd.asObservable();
        _onResizeInit = new B();
        onResizeInit = this._onResizeInit.asObservable();
        _onResizeEnd = new B();
        onResizeEnd = this._onResizeEnd.asObservable();
        _onMaximize = new B();
        onMaximize = this._onMaximize.asObservable();
        onChildComponentLoaded = new B();
    },
    Tr = We([De({
        transform: "{{transform}}",
        opacity: 0
    }), Ue("{{transition}}", De({
        transform: "none",
        opacity: 1
    }))]),
    Cr = We([Ue("{{transition}}", De({
        transform: "{{transform}}",
        opacity: 0
    }))]),
    br = (() => {
        class t extends ae {
            renderer;
            ddconfig;
            dialogRef;
            zone;
            parentDialog;
            visible = !0;
            componentRef;
            mask;
            resizing;
            dragging;
            maximized;
            _style = {};
            originalStyle;
            lastPageX;
            lastPageY;
            ariaLabelledBy;
            id = Se("pn_id_");
            styleElement;
            insertionPoint;
            maskViewChild;
            contentViewChild;
            footerViewChild;
            headerViewChild;
            childComponentType;
            inputValues;
            container;
            wrapper;
            documentKeydownListener;
            documentEscapeListener;
            maskClickListener;
            transformOptions = "scale(0.7)";
            documentResizeListener;
            documentResizeEndListener;
            documentDragListener;
            documentDragEndListener;
            _componentStyle = te(pi);
            get minX() {
                return this.ddconfig.minX ? this.ddconfig.minX : 0;
            }
            get minY() {
                return this.ddconfig.minY ? this.ddconfig.minY : 0;
            }
            get keepInViewport() {
                return this.ddconfig.keepInViewport;
            }
            get maximizable() {
                return this.ddconfig.maximizable;
            }
            get maximizeIcon() {
                return this.ddconfig.maximizeIcon;
            }
            get minimizeIcon() {
                return this.ddconfig.minimizeIcon;
            }
            get closable() {
                return this.ddconfig.closable;
            }
            get style() {
                return this._style;
            }
            get position() {
                return this.ddconfig.position;
            }
            get defaultCloseAriaLabel() {
                return this.config.getTranslation(ze.ARIA).close;
            }
            set style(e) {
                e && (this._style = $({}, e), this.originalStyle = e);
            }
            get parent() {
                let e = Array.from(this.document.getElementsByClassName("p-dialog"));
                if (e.length > 1) return e.pop();
            }
            get parentContent() {
                let e = Array.from(this.document.getElementsByClassName("p-dialog"));
                if (e.length > 0) {
                    let n = e[e.length - 1].querySelector(".p-dialog-content");
                    if (n) return Array.isArray(n) ? n[0] : n;
                }
            }
            get header() {
                return this.ddconfig.header;
            }
            get data() {
                return this.ddconfig.data;
            }
            get breakpoints() {
                return this.ddconfig.breakpoints;
            }
            get footerTemplate() {
                return this.ddconfig ? .templates ? .footer;
            }
            get headerTemplate() {
                return this.ddconfig ? .templates ? .header;
            }
            get contentTemplate() {
                return this.ddconfig ? .templates ? .content;
            }
            get minimizeIconTemplate() {
                return this.ddconfig ? .templates ? .minimizeicon;
            }
            get maximizeIconTemplate() {
                return this.ddconfig ? .templates ? .maximizeicon;
            }
            get closeIconTemplate() {
                return this.ddconfig ? .templates ? .closeicon;
            }
            get maskClass() {
                let n = ["left", "right", "top", "topleft", "topright", "bottom", "bottomleft", "bottomright"].find(i => i === this.position);
                return {
                    "p-dialog-mask": !0,
                    "p-overlay-mask p-overlay-mask-enter": this.ddconfig.modal || this.ddconfig.dismissableMask,
                    [`p-dialog-${n}`]: n
                };
            }
            get dialogId() {
                return this.attrSelector;
            }
            zIndexForLayering;
            constructor(e, n, i, o, l) {
                super(), this.renderer = e, this.ddconfig = n, this.dialogRef = i, this.zone = o, this.parentDialog = l;
            }
            ngOnInit() {
                super.ngOnInit(), this.breakpoints && this.createStyle();
            }
            createStyle() {
                if (Ce(this.platformId) && !this.styleElement) {
                    this.styleElement = this.renderer.createElement("style"), this.styleElement.type = "text/css", this.renderer.appendChild(this.document.head, this.styleElement);
                    let e = "";
                    for (let n in this.breakpoints) e += `
                        @media screen and (max-width: ${n}) {
                            .p-dialog[id=${this.dialogId}]:not(.p-dialog-maximized) {
                                width: ${this.breakpoints[n]} !important;
                            }
                        }
                    `;
                    this.renderer.setProperty(this.styleElement, "innerHTML", e), Dt(this.styleElement, "nonce", this.config ? .csp() ? .nonce);
                }
            }
            destroyStyle() {
                this.styleElement && (this.renderer.removeChild(this.document.head, this.styleElement), this.styleElement = null);
            }
            ngAfterViewInit() {
                super.ngAfterViewInit(), this.loadChildComponent(this.childComponentType), this.ariaLabelledBy = this.getAriaLabelledBy(), this.cd.detectChanges();
            }
            getAriaLabelledBy() {
                let {
                    header: e,
                    showHeader: n
                } = this.ddconfig;
                return e === null || n === !1 ? null : Se("pn_id_") + "_header";
            }
            loadChildComponent(e) {
                let n = this.insertionPoint ? .viewContainerRef;
                n ? .clear(), this.componentRef = n ? .createComponent(e), this.inputValues && Object.entries(this.inputValues).forEach(([i, o]) => {
                    this.componentRef.setInput(i, o);
                }), this.dialogRef.onChildComponentLoaded.next(this.componentRef.instance);
            }
            moveOnTop() {
                this.ddconfig.autoZIndex !== !1 ? (ue.set("modal", this.container, (this.ddconfig.baseZIndex || 0) + this.config.zIndex.modal), this.wrapper.style.zIndex = String(parseInt(this.container.style.zIndex, 10) - 1)) : this.zIndexForLayering = ue.generateZIndex("modal", (this.ddconfig.baseZIndex || 0) + this.config.zIndex.modal);
            }
            onAnimationStart(e) {
                switch (e.toState) {
                    case "visible":
                        this.container = e.element, this.wrapper = this.container.parentElement, this.moveOnTop(), this.parent && this.unbindGlobalListeners(), this.bindGlobalListeners(), this.container ? .setAttribute(this.id, ""), this.ddconfig.modal !== !1 && this.enableModality(), this.ddconfig.focusOnShow !== !1 && this.focus();
                        break;
                    case "void":
                        this.wrapper && this.ddconfig.modal !== !1 && he(this.wrapper, "p-overlay-mask-leave");
                        break;
                }
            }
            onAnimationEnd(e) {
                e.toState === "void" && (this.parentContent && this.focus(this.parentContent), this.onContainerDestroy(), this.dialogRef.destroy());
            }
            onContainerDestroy() {
                this.unbindGlobalListeners(), this.container && this.ddconfig.autoZIndex !== !1 && ue.clear(this.container), this.zIndexForLayering && ue.revertZIndex(this.zIndexForLayering), this.ddconfig.modal !== !1 && this.disableModality(), this.container = null;
            }
            close() {
                this.visible = !1, this.cd.markForCheck();
            }
            hide() {
                this.dialogRef && this.dialogRef.close();
            }
            enableModality() {
                this.ddconfig.dismissableMask && (this.maskClickListener = this.renderer.listen(this.wrapper, "mousedown", e => {
                    this.wrapper && this.wrapper.isSameNode(e.target) && this.hide();
                })), this.ddconfig.modal !== !1 && he(this.document.body, "p-overflow-hidden");
            }
            disableModality() {
                this.wrapper && (this.ddconfig.dismissableMask && this.unbindMaskClickListener(), this.ddconfig.modal !== !1 && ve(this.document.body, "p-overflow-hidden"), this.cd.destroyed || this.cd.detectChanges());
            }
            focus(e = this.contentViewChild.nativeElement) {
                let n = et.getFocusableElement(e, "[autofocus]");
                if (n) {
                    this.zone.runOutsideAngular(() => {
                        setTimeout(() => n.focus(), 5);
                    });
                    return;
                }
                let i = et.getFocusableElement(e);
                i ? this.zone.runOutsideAngular(() => {
                    setTimeout(() => i.focus(), 5);
                }) : this.footerViewChild ? this.focus(this.footerViewChild.nativeElement) : !i && this.headerViewChild && this.focus(this.headerViewChild.nativeElement);
            }
            maximize() {
                this.maximized = !this.maximized, this.maximized ? he(this.document.body, "p-overflow-hidden") : ve(this.document.body, "p-overflow-hidden"), this.dialogRef.maximize({
                    maximized: this.maximized
                });
            }
            initResize(e) {
                this.ddconfig.resizable && (this.documentResizeListener || this.bindDocumentResizeListeners(), this.resizing = !0, this.lastPageX = e.pageX, this.lastPageY = e.pageY, he(this.document.body, "p-unselectable-text"), this.dialogRef.resizeInit(e));
            }
            onResize(e) {
                if (this.resizing) {
                    let n = e.pageX - this.lastPageX,
                        i = e.pageY - this.lastPageY,
                        o = Ke(this.container),
                        l = Fe(this.container),
                        p = Fe(this.contentViewChild.nativeElement),
                        m = o + n,
                        T = l + i,
                        P = this.container.style.minWidth,
                        me = this.container.style.minHeight,
                        fe = this.container.getBoundingClientRect(),
                        ye = Ge();
                    (!parseInt(this.container.style.top) || !parseInt(this.container.style.left)) && (m += n, T += i), (!P || m > parseInt(P)) && fe.left + m < ye.width && (this._style.width = m + "px", this.container.style.width = this._style.width), (!me || T > parseInt(me)) && fe.top + T < ye.height && (this.contentViewChild.nativeElement.style.height = p + T - l + "px", this._style.height && (this._style.height = T + "px", this.container.style.height = this._style.height)), this.lastPageX = e.pageX, this.lastPageY = e.pageY;
                }
            }
            resizeEnd(e) {
                this.resizing && (this.resizing = !1, ve(this.document.body, "p-unselectable-text"), this.dialogRef.resizeEnd(e));
            }
            initDrag(e) {
                R(e.target, "p-dialog-header-icon") || R(e.target.parentElement, "p-dialog-header-icon") || this.ddconfig.draggable && (this.dragging = !0, this.lastPageX = e.pageX, this.lastPageY = e.pageY, this.container.style.margin = "0", he(this.document.body, "p-unselectable-text"), this.dialogRef.dragStart(e));
            }
            onDrag(e) {
                if (this.dragging) {
                    let n = Ke(this.container),
                        i = Fe(this.container),
                        o = e.pageX - this.lastPageX,
                        l = e.pageY - this.lastPageY,
                        p = this.container.getBoundingClientRect(),
                        m = p.left + o,
                        T = p.top + l,
                        P = Ge();
                    this.container.style.position = "fixed", this.keepInViewport ? (m >= this.minX && m + n < P.width && (this._style.left = m + "px", this.lastPageX = e.pageX, this.container.style.left = m + "px"), T >= this.minY && T + i < P.height && (this._style.top = T + "px", this.lastPageY = e.pageY, this.container.style.top = T + "px")) : (this.lastPageX = e.pageX, this.container.style.left = m + "px", this.lastPageY = e.pageY, this.container.style.top = T + "px");
                }
            }
            endDrag(e) {
                this.dragging && (this.dragging = !1, ve(this.document.body, "p-unselectable-text"), this.dialogRef.dragEnd(e), this.cd.detectChanges());
            }
            resetPosition() {
                this.container.style.position = "", this.container.style.left = "", this.container.style.top = "", this.container.style.margin = "";
            }
            bindDocumentDragListener() {
                Ce(this.platformId) && this.zone.runOutsideAngular(() => {
                    this.documentDragListener = this.renderer.listen(this.document, "mousemove", this.onDrag.bind(this));
                });
            }
            bindDocumentDragEndListener() {
                Ce(this.platformId) && this.zone.runOutsideAngular(() => {
                    this.documentDragEndListener = this.renderer.listen(this.document, "mouseup", this.endDrag.bind(this));
                });
            }
            unbindDocumentDragEndListener() {
                this.documentDragEndListener && (this.documentDragEndListener(), this.documentDragListener = null);
            }
            unbindDocumentDragListener() {
                this.documentDragListener && (this.documentDragListener(), this.documentDragListener = null);
            }
            bindDocumentResizeListeners() {
                Ce(this.platformId) && this.zone.runOutsideAngular(() => {
                    this.documentResizeListener = this.renderer.listen(this.document, "mousemove", this.onResize.bind(this)), this.documentResizeEndListener = this.renderer.listen(this.document, "mouseup", this.resizeEnd.bind(this));
                });
            }
            unbindDocumentResizeListeners() {
                this.documentResizeListener && this.documentResizeEndListener && (this.documentResizeListener(), this.documentResizeEndListener(), this.documentResizeListener = null, this.documentResizeEndListener = null);
            }
            bindGlobalListeners() {
                this.ddconfig.closeOnEscape !== !1 && this.bindDocumentEscapeListener(), this.ddconfig.resizable && this.bindDocumentResizeListeners(), this.ddconfig.draggable && (this.bindDocumentDragListener(), this.bindDocumentDragEndListener());
            }
            unbindGlobalListeners() {
                this.unbindDocumentEscapeListener(), this.unbindDocumentResizeListeners(), this.unbindDocumentDragListener(), this.unbindDocumentDragEndListener();
            }
            bindDocumentEscapeListener() {
                let e = this.maskViewChild ? this.maskViewChild.nativeElement.ownerDocument : "document";
                this.documentEscapeListener = this.renderer.listen(e, "keydown", n => {
                    if (n.which == 27) {
                        let i = ue.getCurrent();
                        (parseInt(this.container.style.zIndex) == i || this.zIndexForLayering == i) && this.hide();
                    }
                });
            }
            unbindDocumentEscapeListener() {
                this.documentEscapeListener && (this.documentEscapeListener(), this.documentEscapeListener = null);
            }
            unbindMaskClickListener() {
                this.maskClickListener && (this.maskClickListener(), this.maskClickListener = null);
            }
            ngOnDestroy() {
                this.onContainerDestroy(), this.componentRef && this.componentRef.destroy(), this.destroyStyle(), super.ngOnDestroy();
            }
            static ɵfac = function(n) {
                return new(n || t)(M(ct), M(ge), M(se), M(dt), M(t, 12));
            };
            static ɵcmp = Q({
                type: t,
                selectors: [
                    ["p-dynamicDialog"],
                    ["p-dynamicdialog"],
                    ["p-dynamic-dialog"]
                ],
                viewQuery: function(n, i) {
                    if (n & 1 && (E(ci, 5), E(Ro, 5), E(Po, 5), E($o, 5), E(Ho, 5)), n & 2) {
                        let o;
                        f(o = y()) && (i.insertionPoint = o.first), f(o = y()) && (i.maskViewChild = o.first), f(o = y()) && (i.contentViewChild = o.first), f(o = y()) && (i.footerViewChild = o.first), f(o = y()) && (i.headerViewChild = o.first);
                    }
                },
                features: [J([pi]), ie],
                decls: 3,
                vars: 9,
                consts: [
                    ["mask", ""],
                    ["container", ""],
                    ["content", ""],
                    ["titlebar", ""],
                    ["footer", ""],
                    [3, "ngStyle", "ngClass"],
                    ["role", "dialog", "pFocusTrap", "", 3, "ngClass", "ngStyle", "style", "class", "pFocusTrapDisabled", "width", "height", 4, "ngIf"],
                    ["role", "dialog", "pFocusTrap", "", 3, "ngClass", "ngStyle", "pFocusTrapDisabled"],
                    ["style", "z-index: 90;", 3, "ngClass", "mousedown", 4, "ngIf"],
                    [3, "ngClass", "mousedown", 4, "ngIf"],
                    [3, "ngClass", "ngStyle"],
                    [4, "ngIf"],
                    [4, "ngComponentOutlet"],
                    [3, "ngClass", 4, "ngIf"],
                    [2, "z-index", "90", 3, "mousedown", "ngClass"],
                    [3, "mousedown", "ngClass"],
                    [3, "ngClass", "id"],
                    [3, "ngClass"],
                    ["rounded", "", "text", "", 3, "styleClass", "tabindex", "onClick", "keydown.enter", 4, "ngIf"],
                    ["rounded", "", "text", "", "severity", "secondary", 3, "styleClass", "ariaLabel", "onClick", "keydown.enter", 4, "ngIf"],
                    ["rounded", "", "text", "", 3, "onClick", "keydown.enter", "styleClass", "tabindex"],
                    [4, "ngTemplateOutlet"],
                    ["rounded", "", "text", "", "severity", "secondary", 3, "onClick", "keydown.enter", "styleClass", "ariaLabel"],
                    ["pDynamicDialogContent", ""]
                ],
                template: function(n, i) {
                    n & 1 && (h(0, "div", 5, 0), c(2, yr, 9, 30, "div", 6), _()), n & 2 && (V(i.ddconfig.maskStyleClass), a("ngStyle", ut(5, Bo, i.position === "left" || i.position === "topleft" || i.position === "bottomleft" ? "flex-start" : i.position === "right" || i.position === "topright" || i.position === "bottomright" ? "flex-end" : "center", i.position === "top" || i.position === "topleft" || i.position === "topright" ? "flex-start" : i.position === "bottom" || i.position === "bottomleft" || i.position === "bottomright" ? "flex-end" : "center", i.ddconfig.modal ? "auto" : "none"))("ngClass", i.maskClass), s(2), a("ngIf", i.visible));
                },
                dependencies: [j, oe, ft, U, le, re, W, ci, Rt, Pt, $e, Wt, Xt],
                encapsulation: 2,
                data: {
                    animation: [yt("animation", [je("void => visible", [Xe(Tr)]), je("visible => void", [Xe(Cr)])])]
                }
            });
        }
        return t;
    })();
var rt = class {
        _parentInjector;
        _additionalTokens;
        constructor(r, e) {
            this._parentInjector = r, this._additionalTokens = e;
        }
        get(r, e, n) {
            let i = this._additionalTokens.get(r);
            return i || this._parentInjector.get(r, e);
        }
    },
    Zl = (() => {
        class t {
            appRef;
            injector;
            document;
            dialogComponentRefMap = new Map();
            constructor(e, n, i) {
                this.appRef = e, this.injector = n, this.document = i;
            }
            open(e, n) {
                if (!this.duplicationPermission(e, n)) return null;
                let i = this.appendDialogComponentToBody(n, e);
                return this.dialogComponentRefMap.get(i).instance.childComponentType = e, this.dialogComponentRefMap.get(i).instance.inputValues = n.inputValues, i;
            }
            getInstance(e) {
                return this.dialogComponentRefMap.get(e).instance;
            }
            appendDialogComponentToBody(e, n) {
                let i = new WeakMap();
                i.set(ge, e);
                let o = new se();
                i.set(se, o);
                let l = o.onClose.subscribe(() => {
                        this.dialogComponentRefMap.get(o).instance.close();
                    }),
                    p = o.onDestroy.subscribe(() => {
                        this.removeDialogComponentFromBody(o), p.unsubscribe(), l.unsubscribe();
                    }),
                    m = gt(br, {
                        environmentInjector: this.appRef.injector,
                        elementInjector: new rt(this.injector, i)
                    });
                this.appRef.attachView(m.hostView);
                let T = m.hostView.rootNodes[0];
                return !e.appendTo || e.appendTo === "body" ? this.document.body.appendChild(T) : wt(e.appendTo, T), this.dialogComponentRefMap.set(o, m), o;
            }
            removeDialogComponentFromBody(e) {
                if (!e || !this.dialogComponentRefMap.has(e)) return;
                let n = this.dialogComponentRefMap.get(e);
                this.appRef.detachView(n.hostView), n.destroy(), n.changeDetectorRef.detectChanges(), this.dialogComponentRefMap.delete(e);
            }
            duplicationPermission(e, n) {
                if (n.duplicate) return !0;
                let i = !0;
                for (let [o, l] of this.dialogComponentRefMap)
                    if (l.instance.childComponentType === e) {
                        i = !1;
                        break;
                    }
                return i;
            }
            static ɵfac = function(n) {
                return new(n || t)(Ee(_t), Ee(st), Ee(mt));
            };
            static ɵprov = ee({
                token: t,
                factory: t.ɵfac
            });
        }
        return t;
    })();
var xr = () => ({
        border: "red 1px solid"
    }),
    Ne = () => ({
        standalone: !0
    });

function Sr(t, r) {
    t & 1 && (h(0, "ngx-spinner", 14), z(1, 0), _()), t & 2 && a("fullScreen", !1);
}

function Nr(t, r) {
    t & 1 && (h(0, "ngx-spinner", 14), z(1, 1), _()), t & 2 && a("fullScreen", !1);
}

function Ir(t, r) {
    if (t & 1 && (h(0, "div"), c(1, Sr, 2, 1, "ngx-spinner", 13)(2, Nr, 2, 1, "ngx-spinner", 13), _()), t & 2) {
        let e = d();
        s(), a("ngIf", !e.processing), s(), a("ngIf", e.processing);
    }
}

function wr(t, r) {
    t & 1 && (h(0, "h1", 35), z(1, 9), _());
}

function Er(t, r) {
    t & 1 && (h(0, "h1", 35), z(1, 10), _());
}

function Mr(t, r) {
    if (t & 1) {
        let e = w();
        h(0, "div", 15), c(1, wr, 2, 0, "h1", 16)(2, Er, 2, 0, "h1", 16), h(3, "div", 17)(4, "span"), z(5, 2), _(), L(6, ":\xA0\xA0 "), h(7, "input", 18), Z("ngModelChange", function(i) {
            u(e);
            let o = d();
            return Y(o.alertName, i) || (o.alertName = i), g(i);
        }), C("ngModelChange", function() {
            u(e);
            let i = d();
            return g(i.duplicateChecker());
        }), _(), h(8, "p", 19), L(9, "*Notification name already exist."), _()(), h(10, "table", 20)(11, "tr", 21)(12, "th", 22), z(13, 3), _(), h(14, "th", 22), z(15, 4), _(), h(16, "th", 22), z(17, 5), _(), h(18, "th", 22), z(19, 6), _()(), h(20, "tr", 23)(21, "td", 24)(22, "p-treeSelect", 25), Z("ngModelChange", function(i) {
            u(e);
            let o = d();
            return Y(o.selectedStatuses, i) || (o.selectedStatuses = i), g(i);
        }), _()(), h(23, "td", 26)(24, "p-select", 27), Z("ngModelChange", function(i) {
            u(e);
            let o = d();
            return Y(o.deliveryMethod, i) || (o.deliveryMethod = i), g(i);
        }), _()(), h(25, "td", 28)(26, "p-select", 29), Z("ngModelChange", function(i) {
            u(e);
            let o = d();
            return Y(o.frequency, i) || (o.frequency = i), g(i);
        }), _()(), h(27, "td", 30)(28, "p-multiSelect", 31), Z("ngModelChange", function(i) {
            u(e);
            let o = d();
            return Y(o.selectedPins, i) || (o.selectedPins = i), g(i);
        }), _()()()(), I(29, "br"), h(30, "div", 32)(31, "button", 33), C("click", function() {
            u(e);
            let i = d();
            return g(i.onCancel());
        }), z(32, 7), _(), h(33, "button", 34), C("click", function() {
            u(e);
            let i = d();
            return g(i.onSubscribe());
        }), z(34, 8), _()()();
    }
    if (t & 2) {
        let e = d();
        s(), a("ngIf", !e.config.data.isChange), s(), a("ngIf", e.config.data.isChange), s(5), G(e.duplicateNameError ? q(26, xr) : ""), K("ngModel", e.alertName), a("ngModelOptions", q(27, Ne))("disabled", e.noChangeToAlertName), s(), a("hidden", !e.duplicateNameError), s(14), K("ngModel", e.selectedStatuses), a("options", e.statusOptions)("selectionMode", "checkbox")("metaKeySelection", !1)("showClear", !0)("ngModelOptions", q(28, Ne)), s(2), a("dropdownIcon", "none")("options", e.methodOptions), K("ngModel", e.deliveryMethod), a("ngModelOptions", q(29, Ne))("disabled", !0), s(2), a("options", e.frequencyOptions), K("ngModel", e.frequency), a("ngModelOptions", q(30, Ne)), s(2), K("ngModel", e.selectedPins), a("options", e.pinOptions)("ngModelOptions", q(31, Ne)), s(5), a("disabled", e.duplicateNameError || !e.selectedStatuses.length);
    }
}
var ma = (() => {
    class t {
        constructor(e, n, i, o, l, p, m, T) {
            this.localeService = e, this.ref = n, this.config = i, this.datePipe = o, this.apiService = l, this.user = p, this.lookups = m, this.spinner = T, this.pins = [], this.deliveryMethodName = " Delivery Method ", this.frequencyName = " Frequency ", this.attention = !1, this.showOption = !1, this.loading = !1, this.processing = !1, this.payload = {}, this.noChangeToAlertName = !1, this.date = this.datePipe.transform(new Date(), "yyyyMMddhhmmss"), this.alert = "", this.alertName = "", this.dropdownTitle = "Select Types", this.dropdownPinTitle = "Select Pins", this.methodOptions = [{
                text: "Email only",
                value: "1"
            }], this.frequencyOptions = [{
                text: "Hourly",
                value: "1"
            }, {
                text: "Every 3 hours",
                value: "3"
            }, {
                text: "Every 6 hours",
                value: "6"
            }, {
                text: "Every 8 hours",
                value: "8"
            }, {
                text: "Daily",
                value: "24"
            }], this.pinOptions = [], this.selectedPins = [], this.locale = "en", this.statusOptions = [], this.selectedStatuses = [], this.duplicateNameError = !1, this.locale = this.localeService.getLocale();
        }
        ngOnInit() {
            this.loading = !0, this.spinner.show("notificationLoading"), this.packageStatus = [], this.packageSubStatus = [];
            let e = this.lookups.lookupsDescriptions$,
                n = this.apiService.watchlistGet({
                    userId: this.user.userData.id
                });
            lt([e, n]).subscribe(i => {
                this.resp = i[0], this.user.userData.watchlists = i[1];
                let o = this.resp.packageStatus,
                    l = this.resp.packageSubStatus;
                o && o.length && o.forEach(p => {
                    let m;
                    p.code === "ATT" ? (m = {
                        label: this.locale === "fr" ? p.fr : p.en,
                        data: {
                            code: p.code,
                            subStatus: !1
                        },
                        children: []
                    }, l && l.length && l.forEach(T => {
                        m.children.push({
                            label: this.locale === "fr" ? T.fr : T.en,
                            data: {
                                code: T.code,
                                subStatus: !0
                            }
                        });
                    })) : m = {
                        label: this.locale === "fr" ? p.fr : p.en,
                        data: {
                            code: p.code,
                            subStatus: !1
                        }
                    }, this.statusOptions.push(m);
                }), this.config.data.isChange ? this.onChange() : (this.noChangeToAlertName = !1, this.date = this.datePipe.transform(new Date(), "yyyyMMddhhmmss"), this.alert = "Alert_" + this.date, this.alertName = this.date, this.pins = this.config.data.pins, (this.pins || []).forEach(p => {
                    this.selectedPins.push({
                        watchlistId: this.config.data.watchlistId,
                        packagePin: p,
                        checked: !0
                    }), this.pinOptions.push({
                        watchlistId: this.config.data.watchlistId,
                        packagePin: p,
                        checked: !0
                    });
                }), this.onClear()), this.loading = !1, this.spinner.hide("notificationLoading");
            });
        }
        onChange() {
            this.watchlistId = this.config.data.watchlistId, this.alertName = this.config.data.watchlistName, this.onDeliveryMethod(this.config.data.notificationTypeId), this.onFrequency(this.config.data.notificationFrequencyId), this.pins = this.config.data.pins, (this.pins || []).forEach(o => {
                this.selectedPins.push({
                    watchlistId: this.config.data.watchlistId,
                    packagePin: o,
                    checked: !0
                }), this.pinOptions.push({
                    watchlistId: this.config.data.watchlistId,
                    packagePin: o,
                    checked: !0
                });
            });
            let e;
            this.config.data.statuses && this.config.data.statuses.length && (e = JSON.parse(this.config.data.statuses));
            let n;
            this.config.data.substatuses && this.config.data.substatuses.length && (n = JSON.parse(this.config.data.substatuses));
            for (let o of this.statusOptions)
                if (o.data.code === "ATT") {
                    let l = 0;
                    for (let p of o.children) n ? .includes(p.data.code) && (this.selectedStatuses.push(p), l++);
                    l === o.children.length && l !== 0 && this.selectedStatuses.push(o);
                } else e ? .includes(o.data.code) && this.selectedStatuses.push(o);
            this.packageSubStatus.filter(o => !o.checked).length || (this.attention = !0);
        }
        onCancel() {
            this.ref.close();
        }
        onAttention() {
            (this.packageSubStatus || []).forEach(e => e.checked = !this.attention);
        }
        onClear() {
            this.attention = !1, (this.packageStatus || []).forEach(e => e.checked = !1), (this.packageSubStatus || []).forEach(e => e.checked = !1);
        }
        onDeliveryMethod(e) {
            switch (e) {
                case 1:
                    this.deliveryMethod = "1", this.deliveryMethodName = "Email";
                    break;
                case 2:
                    this.deliveryMethod = "2", this.deliveryMethodName = "App";
                    break;
                case 3:
                    this.deliveryMethod = "3", this.deliveryMethodName = "Both";
                    break;
                default:
                    break;
            }
        }
        onFrequency(e) {
            switch (e) {
                case 1:
                    this.frequency = "1", this.frequencyName = "Hourly";
                    break;
                case 2:
                    this.frequency = "2", this.frequencyName = "Every 2 Hours";
                    break;
                case 3:
                    this.frequency = "3", this.frequencyName = "Every 3 Hours";
                    break;
                case 6:
                    this.frequency = "6", this.frequencyName = "Every 6 Hours";
                    break;
                case 8:
                    this.frequency = "8", this.frequencyName = "Every 8 Hours";
                    break;
                case 24:
                    this.frequency = "24", this.frequencyName = "Daily";
                    break;
                default:
                    break;
            }
        }
        duplicateChecker() {
            if (this.noChangeToAlertName) {
                this.duplicateNameError = !1;
                return;
            }
            for (let e of this.user.userData.watchlists)
                if (e.isAlert && e.watchlistName === this.alertName) {
                    this.duplicateNameError = !0;
                    return;
                }
            this.duplicateNameError = !1;
        }
        onSubscribe() {
            this.loading = !0, this.processing = !0, this.spinner.show("notificationLoading"), this.config.data.isWatchlist ? (this.payload.watchlistId = this.config.data.watchlistId, this.payload.watchlistName = this.config.data.watchlistName) : this.config.data.isChange ? (this.payload.watchlistId = this.config.data.watchlistId, this.payload.watchlistName = this.alertName) : (this.payload.watchlistId = this.alert, this.payload.watchlistName = this.alertName);
            let e = new Date();
            if (this.payload.userId = this.user.userData.id, this.payload.email = this.user.userData.email, this.payload.firstname = this.user.userData.firstName, this.payload.lastname = this.user.userData.lastName, this.payload.changeDetectedDateTime = e, this.payload.notificationFrequencyId = +this.frequency, this.payload.notificationTypeId = +this.deliveryMethod, this.payload.isAlert = !0, this.payload.packages = [], !this.config.data.isWatchlist)
                for (let o of this.selectedPins || []) {
                    let l = {};
                    l.watchlistId = this.payload.watchlistId, l.packagePin = o.packagePin, l.lastEventDateTime = e, l.lastNotificationDateTime = e, this.payload.packages.push(l);
                }
            this.payload.statuses = "", this.payload.substatuses = "";
            let n = [],
                i = [];
            if (this.selectedStatuses.length) {
                let o = !1;
                for (let m of this.selectedStatuses) m.data.subStatus ? (o = !0, n.push(m.data.code)) : i.push(m.data.code);
                !i.includes("ATT") && o && i.push("ATT");
                let l = JSON.stringify(n);
                this.payload.substatuses = l.replace(/[\\]/g, "");
                let p = JSON.stringify(i);
                this.payload.statuses = p.replace(/[\\]/g, "");
            }
            this.apiService.watchListPut(this.payload).subscribe({
                next: o => {
                    this.config.data.isChange && !this.config.data.isWatchlist && (this.apiService.alertRefresh.next(!0), this.apiService.statusAlertRefresh.next(!0)), this.spinner.hide("notificationLoading"), this.processing = !1, this.loading = !1, this.ref.close();
                },
                error: o => {
                    console.log(o), this.spinner.hide("notificationLoading"), this.processing = !1, this.loading = !1;
                }
            });
        }
        static {
            this.ɵfac = function(n) {
                return new(n || t)(M(xt), M(se), M(ge), M(Oe), M(Kt), M(vt), M(Yt), M(Tt));
            };
        }
        static {
            this.ɵcmp = Q({
                type: t,
                selectors: [
                    ["app-notifications"]
                ],
                features: [J([Oe])],
                decls: 2,
                vars: 2,
                consts: () => {
                    let e;
                    e = "Loading...";
                    let n;
                    n = "Processing...";
                    let i;
                    i = "*Name is Required";
                    let o;
                    o = " Notification Name ";
                    let l;
                    l = "Type";
                    let p;
                    p = "Delivery Method";
                    let m;
                    m = "Frequency";
                    let T;
                    T = "Pins";
                    let P;
                    P = " Cancel ";
                    let me;
                    me = " Subscribe ";
                    let fe;
                    fe = "Add Notification ";
                    let ye;
                    return ye = "Change Notification ", [e, n, o, l, p, m, T, P, me, fe, ye, [4, "ngIf"],
                        ["style", "max-width: 40%; display: block", 4, "ngIf"],
                        ["name", "notificationLoading", "type", "ball-spin-clockwise", 3, "fullScreen", 4, "ngIf"],
                        ["name", "notificationLoading", "type", "ball-spin-clockwise", 3, "fullScreen"],
                        [2, "max-width", "40%", "display", "block"],
                        ["class", "notification_header blue", 4, "ngIf"],
                        [1, "header"],
                        ["type", "text", "pInputText", "", "required", "", "placeholder", i, "aria-label", "alert name input", 3, "ngModelChange", "ngModel", "ngModelOptions", "disabled"],
                        [3, "hidden"],
                        [2, "margin-bottom", "80%"],
                        [1, "underline"],
                        [1, "columns"],
                        [1, ""],
                        ["id", "status-tree-select-"],
                        ["placeholder", "Select Item", "panelStyleClass", "displayOverride", "appendTo", "body", "scrollHeight", "300px", "id", "status-tree-select", 1, "pur-dropdown", "pur-dropdown--lg", 3, "ngModelChange", "ngModel", "options", "selectionMode", "metaKeySelection", "showClear", "ngModelOptions"],
                        [1, "alert-field__method"],
                        ["appendTo", "body", "panelStyleClass", "displayOverride", "optionLabel", "text", "optionValue", "value", "scrollHeight", "300px", 1, "pur-dropdown", "pur-dropdown--lg", 3, "ngModelChange", "dropdownIcon", "options", "ngModel", "ngModelOptions", "disabled"],
                        [1, "alert-field__frequency"],
                        ["appendTo", "body", "panelStyleClass", "displayOverride", "optionLabel", "text", "optionValue", "value", "scrollHeight", "300px", 1, "pur-dropdown", "pur-dropdown--lg", 3, "ngModelChange", "options", "ngModel", "ngModelOptions"],
                        [1, "alert-field__pins"],
                        ["optionLabel", "packagePin", 1, "pur-dropdown", "pur-dropdown--lg", 3, "ngModelChange", "ngModel", "options", "ngModelOptions"],
                        [1, "button_section"],
                        ["type", "button", 1, "btn", "btn-secondary", "black", "cancel_button", 3, "click"],
                        ["type", "button", 1, "btn", "btn-primary", 3, "click", "disabled"],
                        [1, "notification_header", "blue"]
                    ];
                },
                template: function(n, i) {
                    n & 1 && c(0, Ir, 3, 2, "div", 11)(1, Mr, 35, 32, "div", 12), n & 2 && (a("ngIf", i.loading), s(), a("ngIf", !i.loading));
                },
                dependencies: [j, U, be, Nt, ke, It, Ve, Ht, He, di, Be, jt, Ut, ti, ei, bt, Ct],
                styles: [`.notification_header{display:flex;align-items:center;justify-content:center;margin-right:auto;margin-left:auto;text-align:center;background:#fff;width:100%;position:absolute;right:0;top:5px}.blue{color:#001996}.p-treeselect-label-container{height:50px;width:180px}.p-multiselect-label-container{height:50px;width:170px}.center{display:flex;align-items:center;justify-content:center}.left{margin-left:5%}.black{color:#000;border-color:#000;background-color:#fff}.close{float:right;margin-right:5%}.drop_down_width{width:180%}.button_section{inset:90% 60% 10% 40%;position:absolute;width:100%}.columns{width:25%}.underline{border-bottom:1pt solid black;margin-bottom:3%}.cancel_button{margin-right:4%}.select_type{height:55px}.circle{background:#fff;border:black solid;border-radius:50%;width:22px;height:22px}.alert-field__type,.alert-field__method,.alert-field__frequency,.alert-field__pins,td{width:25%}.displayOverride,.pur-dropdown.p-select{display:flex}.bold{font-weight:700}
`],
                encapsulation: 2
            });
        }
    }
    return t;
})();
export {
    Zl as a, ma as b
}; /**i18n:6e1dbccd4192d215e143e99fb4b6a095cee3c871f5aa7cd380ca91231f35e8e0*/