UNPKG

devkit-base-components

Version:

Devkit Base Components is a Vue plugin offering a collection of reusable, headless components designed to streamline your Vue.js development workflow. Built for flexibility and maintainability, this library gives you complete control over styling and beha

1,355 lines (1,333 loc) 225 kB
var oo = Object.defineProperty; var ro = (t, e, n) => e in t ? oo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n; var ge = (t, e, n) => ro(t, typeof e != "symbol" ? e + "" : e, n); import ao from "dexie"; import { ref as Te, readonly as io, getCurrentInstance as so, onMounted as uo, nextTick as co, watch as lo, mergeProps as g, openBlock as h, createElementBlock as I, createElementVNode as O, renderSlot as P, createBlock as E, Teleport as mo, createCommentVNode as A, createTextVNode as rt, toDisplayString as Pe, resolveComponent as V, resolveDirective as nn, withDirectives as Ee, resolveDynamicComponent as Z, withCtx as N, normalizeClass as W, Transition as at, vShow as fo, createVNode as z, normalizeProps as se, guardReactiveProps as he, normalizeStyle as it, Fragment as on, renderList as po, defineComponent as ve, inject as ze, useSlots as pn, computed as sn, h as F, useAttrs as st, unref as un, createSlots as bo } from "vue"; import { RouterLink as go } from "vue-router"; import { useI18n as bn } from "vue-i18n"; import { resolveApiEndpoint as ho } from "devkit-apiclient"; class vo { constructor(e) { ge(this, "table"); this.table = e; } async getValue(e) { const n = await this.table.get(e); return n == null ? void 0 : n.value; } async setValue(e, n) { await this.table.put({ key: e, value: n }); } async setLocale(e) { await this.setValue("locale", e); } async getLocale() { return await this.getValue("locale") ?? "en"; } async setIsDark(e) { await this.setValue("isDark", e); } } class yo { constructor(e) { ge(this, "table"); this.table = e; } async iconFind(e) { const n = await this.table.get(e); return n == null ? void 0 : n.value; } async iconCreate(e, n) { console.log("put the icon"), await this.table.put({ key: e, value: n }); } } class Io extends ao { constructor() { super("DEVKIT_BASE"); ge(this, "cache"); ge(this, "iconHelper"); ge(this, "cacheHelper"); ge(this, "icon"); this.version(1).stores({ cacheHelper: "key", icon: "key" }), this.iconHelper = new yo(this.icon), this.cache = new vo(this.cacheHelper); } } const gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null }, Symbol.toStringTag, { value: "Module" })); function ko(t, e) { return t ? t.classList ? t.classList.contains(e) : new RegExp("(^| )" + e + "( |$)", "gi").test(t.className) : !1; } function gn(t, e) { if (t && e) { const n = (o) => { ko(t, o) || (t.classList ? t.classList.add(o) : t.className += " " + o); }; [e].flat().filter(Boolean).forEach((o) => o.split(" ").forEach(n)); } } function So() { return window.innerWidth - document.documentElement.offsetWidth; } function ut(t) { for (const e of document == null ? void 0 : document.styleSheets) try { for (const n of e == null ? void 0 : e.cssRules) for (const o of n == null ? void 0 : n.style) if (t.test(o)) return { name: o, value: n.style.getPropertyValue(o).trim() }; } catch { } return null; } function wo(t = "p-overflow-hidden") { const e = ut(/-scrollbar-width$/); e != null && e.name && document.body.style.setProperty(e.name, So() + "px"), gn(document.body, t); } function Ye(t, e) { if (t && e) { const n = (o) => { t.classList ? t.classList.remove(o) : t.className = t.className.replace(new RegExp("(^|\\b)" + o.split(" ").join("|") + "(\\b|$)", "gi"), " "); }; [e].flat().filter(Boolean).forEach((o) => o.split(" ").forEach(n)); } } function _n(t = "p-overflow-hidden") { const e = ut(/-scrollbar-width$/); e != null && e.name && document.body.style.removeProperty(e.name), Ye(document.body, t); } function Co(t, e) { return t instanceof HTMLElement ? t.offsetWidth : 0; } function ye(t) { return typeof HTMLElement == "object" ? t instanceof HTMLElement : t && typeof t == "object" && t !== null && t.nodeType === 1 && typeof t.nodeName == "string"; } function Je(t, e = {}) { if (ye(t)) { const n = (o, r) => { var a, s; const u = (a = t == null ? void 0 : t.$attrs) != null && a[o] ? [(s = t == null ? void 0 : t.$attrs) == null ? void 0 : s[o]] : []; return [r].flat().reduce((i, c) => { if (c != null) { const l = typeof c; if (l === "string" || l === "number") i.push(c); else if (l === "object") { const m = Array.isArray(c) ? n(o, c) : Object.entries(c).map(([d, f]) => o === "style" && (f || f === 0) ? `${d.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()}:${f}` : f ? d : void 0); i = m.length ? i.concat(m.filter((d) => !!d)) : i; } } return i; }, u); }; Object.entries(e).forEach(([o, r]) => { if (r != null) { const a = o.match(/^on(.+)/); a ? t.addEventListener(a[1].toLowerCase(), r) : o === "p-bind" || o === "pBind" ? Je(t, r) : (r = o === "class" ? [...new Set(n("class", r))].join(" ").trim() : o === "style" ? n("style", r).join(";").trim() : r, (t.$attrs = t.$attrs || {}) && (t.$attrs[o] = r), t.setAttribute(o, r)); } }); } } function ct(t, e = {}, ...n) { { const o = document.createElement(t); return Je(o, e), o.append(...n), o; } } function $o(t, e) { return ye(t) ? Array.from(t.querySelectorAll(e)) : []; } function Xe(t, e) { return ye(t) ? t.matches(e) ? t : t.querySelector(e) : null; } function K(t, e) { t && document.activeElement !== t && t.focus(e); } function lt(t, e) { if (ye(t)) { const n = t.getAttribute(e); return isNaN(n) ? n === "true" || n === "false" ? n === "true" : n : +n; } } function dt(t, e = "") { let n = $o( t, `button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}` ), o = []; for (let r of n) getComputedStyle(r).display != "none" && getComputedStyle(r).visibility != "hidden" && o.push(r); return o; } function xe(t, e) { const n = dt(t, e); return n.length > 0 ? n[0] : null; } function Pn(t) { if (t) { let e = t.offsetHeight, n = getComputedStyle(t); return e -= parseFloat(n.paddingTop) + parseFloat(n.paddingBottom) + parseFloat(n.borderTopWidth) + parseFloat(n.borderBottomWidth), e; } return 0; } function _o(t) { if (t) { let e = t.parentNode; return e && e instanceof ShadowRoot && e.host && (e = e.host), e; } return null; } function Po(t, e) { const n = dt(t, e); return n.length > 0 ? n[n.length - 1] : null; } function xo(t) { if (t) { let e = t.getBoundingClientRect(); return { top: e.top + (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0), left: e.left + (window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0) }; } return { top: "auto", left: "auto" }; } function Oo(t, e) { return t ? t.offsetHeight : 0; } function Lo(t) { return !!(t !== null && typeof t < "u" && t.nodeName && _o(t)); } function xn(t) { if (t) { let e = t.offsetWidth, n = getComputedStyle(t); return e -= parseFloat(n.paddingLeft) + parseFloat(n.paddingRight) + parseFloat(n.borderLeftWidth) + parseFloat(n.borderRightWidth), e; } return 0; } function To(t, e, n) { return ye(t) ? lt(t, e) === n : !1; } function hn() { return !!(typeof window < "u" && window.document && window.document.createElement); } function On(t, e = "") { return ye(t) ? t.matches(`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}`) : !1; } function Ao() { return "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0; } function jo(t, e = "", n) { ye(t) && n !== null && n !== void 0 && t.setAttribute(e, n); } function Be(t) { "@babel/helpers - typeof"; return Be = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; } : function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Be(t); } function Ln(t, e) { var n = Object.keys(t); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(t); e && (o = o.filter(function(r) { return Object.getOwnPropertyDescriptor(t, r).enumerable; })), n.push.apply(n, o); } return n; } function Tn(t) { for (var e = 1; e < arguments.length; e++) { var n = arguments[e] != null ? arguments[e] : {}; e % 2 ? Ln(Object(n), !0).forEach(function(o) { Eo(t, o, n[o]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : Ln(Object(n)).forEach(function(o) { Object.defineProperty(t, o, Object.getOwnPropertyDescriptor(n, o)); }); } return t; } function Eo(t, e, n) { return (e = zo(e)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t; } function zo(t) { var e = Bo(t, "string"); return Be(e) == "symbol" ? e : e + ""; } function Bo(t, e) { if (Be(t) != "object" || !t) return t; var n = t[Symbol.toPrimitive]; if (n !== void 0) { var o = n.call(t, e || "default"); if (Be(o) != "object") return o; throw new TypeError("@@toPrimitive must return a primitive value."); } return (e === "string" ? String : Number)(t); } function Do(t) { var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; so() ? uo(t) : e ? t() : co(t); } var Mo = 0; function Vo(t) { var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = Te(!1), o = Te(t), r = Te(null), a = hn() ? window.document : void 0, s = e.document, u = s === void 0 ? a : s, i = e.immediate, c = i === void 0 ? !0 : i, l = e.manual, m = l === void 0 ? !1 : l, d = e.name, f = d === void 0 ? "style_".concat(++Mo) : d, p = e.id, v = p === void 0 ? void 0 : p, C = e.media, x = C === void 0 ? void 0 : C, S = e.nonce, b = S === void 0 ? void 0 : S, y = e.first, j = y === void 0 ? !1 : y, M = e.onMounted, te = M === void 0 ? void 0 : M, oe = e.onUpdated, re = oe === void 0 ? void 0 : oe, le = e.onLoad, ae = le === void 0 ? void 0 : le, de = e.props, me = de === void 0 ? {} : de, ie = function() { }, fe = function(Se) { var we = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; if (u) { var J = Tn(Tn({}, me), we), q = J.name || f, be = J.id || v, We = J.nonce || b; r.value = u.querySelector('style[data-primevue-style-id="'.concat(q, '"]')) || u.getElementById(be) || u.createElement("style"), r.value.isConnected || (o.value = Se || t, Je(r.value, { type: "text/css", id: be, media: x, nonce: We }), j ? u.head.prepend(r.value) : u.head.appendChild(r.value), jo(r.value, "data-primevue-style-id", q), Je(r.value, J), r.value.onload = function(Ce) { return ae == null ? void 0 : ae(Ce, { name: q }); }, te == null || te(q)), !n.value && (ie = lo(o, function(Ce) { r.value.textContent = Ce, re == null || re(q); }, { immediate: !0 }), n.value = !0); } }, ke = function() { !u || !n.value || (ie(), Lo(r.value) && u.head.removeChild(r.value), n.value = !1); }; return c && !m && Do(fe), { id: v, name: f, el: r, css: o, unload: ke, load: fe, isLoaded: io(n) }; } function mt() { const t = /* @__PURE__ */ new Map(); return { on(e, n) { let o = t.get(e); return o ? o.push(n) : o = [n], t.set(e, o), this; }, off(e, n) { let o = t.get(e); return o && o.splice(o.indexOf(n) >>> 0, 1), this; }, emit(e, n) { let o = t.get(e); o && o.slice().map((r) => { r(n); }); }, clear() { t.clear(); } }; } function G(t) { return t == null || t === "" || Array.isArray(t) && t.length === 0 || !(t instanceof Date) && typeof t == "object" && Object.keys(t).length === 0; } function vn(t) { return !!(t && t.constructor && t.call && t.apply); } function $(t) { return !G(t); } function An(t, e) { let n = -1; if ($(t)) try { n = t.findLastIndex(e); } catch { n = t.lastIndexOf([...t].reverse().find(e)); } return n; } function ce(t, e = !0) { return t instanceof Object && t.constructor === Object && (e || Object.keys(t).length !== 0); } function B(t, ...e) { return vn(t) ? t(...e) : t; } function D(t, e = !0) { return typeof t == "string" && (e || t !== ""); } function H(t) { return D(t) ? t.replace(/(-|_)/g, "").toLowerCase() : t; } function yn(t, e = "", n = {}) { const o = H(e).split("."), r = o.shift(); return r ? ce(t) ? yn(B(t[Object.keys(t).find((a) => H(a) === r) || ""], n), o.join("."), n) : void 0 : B(t, n); } function tn(t, e = !0) { return Array.isArray(t) && (e || t.length !== 0); } function Ro(t) { return $(t) && !isNaN(t); } function Fo(t = "") { return $(t) && t.length === 1 && !!t.match(/\S| /); } function ne(t, e) { if (e) { const n = e.test(t); return e.lastIndex = 0, n; } return !1; } function Ae(t) { return t && t.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g, "").replace(/ {2,}/g, " ").replace(/ ([{:}]) /g, "$1").replace(/([;,]) /g, "$1").replace(/ !/g, "!").replace(/: /g, ":"); } function No(t) { return D(t, !1) ? t[0].toUpperCase() + t.slice(1) : t; } function ft(t) { return D(t) ? t.replace(/(_)/g, "-").replace(/[A-Z]/g, (e, n) => n === 0 ? e : "-" + e.toLowerCase()).toLowerCase() : t; } function jn(t) { return D(t) ? t.replace(/[A-Z]/g, (e, n) => n === 0 ? e : "." + e.toLowerCase()).toLowerCase() : t; } var Ge = {}; function In(t = "pui_id_") { return Ge.hasOwnProperty(t) || (Ge[t] = 0), Ge[t]++, `${t}${Ge[t]}`; } function Ko() { let t = []; const e = (s, u, i = 999) => { const c = r(s, u, i), l = c.value + (c.key === s ? 0 : i) + 1; return t.push({ key: s, value: l }), l; }, n = (s) => { t = t.filter((u) => u.value !== s); }, o = (s, u) => r(s).value, r = (s, u, i = 0) => [...t].reverse().find((c) => !0) || { key: s, value: i }, a = (s) => s && parseInt(s.style.zIndex, 10) || 0; return { get: a, set: (s, u, i) => { u && (u.style.zIndex = String(e(s, !0, i))); }, clear: (s) => { s && (n(a(s)), s.style.zIndex = ""); }, getCurrent: (s) => o(s) }; } var _e = Ko(); function En() { var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "pv_id_"; return In(t); } var Ho = Object.defineProperty, Uo = Object.defineProperties, Zo = Object.getOwnPropertyDescriptors, Qe = Object.getOwnPropertySymbols, pt = Object.prototype.hasOwnProperty, bt = Object.prototype.propertyIsEnumerable, zn = (t, e, n) => e in t ? Ho(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, U = (t, e) => { for (var n in e || (e = {})) pt.call(e, n) && zn(t, n, e[n]); if (Qe) for (var n of Qe(e)) bt.call(e, n) && zn(t, n, e[n]); return t; }, rn = (t, e) => Uo(t, Zo(e)), Q = (t, e) => { var n = {}; for (var o in t) pt.call(t, o) && e.indexOf(o) < 0 && (n[o] = t[o]); if (t != null && Qe) for (var o of Qe(t)) e.indexOf(o) < 0 && bt.call(t, o) && (n[o] = t[o]); return n; }, Wo = mt(), ee = Wo; function Bn(t, e) { tn(t) ? t.push(...e || []) : ce(t) && Object.assign(t, e); } function Go(t) { return ce(t) && t.hasOwnProperty("value") && t.hasOwnProperty("type") ? t.value : t; } function qo(t) { return t.replaceAll(/ /g, "").replace(/[^\w]/g, "-"); } function cn(t = "", e = "") { return qo(`${D(t, !1) && D(e, !1) ? `${t}-` : t}${e}`); } function gt(t = "", e = "") { return `--${cn(t, e)}`; } function Yo(t = "") { const e = (t.match(/{/g) || []).length, n = (t.match(/}/g) || []).length; return (e + n) % 2 !== 0; } function ht(t, e = "", n = "", o = [], r) { if (D(t)) { const a = /{([^}]*)}/g, s = t.trim(); if (Yo(s)) return; if (ne(s, a)) { const u = s.replaceAll(a, (l) => { const d = l.replace(/{|}/g, "").split(".").filter((f) => !o.some((p) => ne(f, p))); return `var(${gt(n, ft(d.join("-")))}${$(r) ? `, ${r}` : ""})`; }), i = /(\d+\s+[\+\-\*\/]\s+\d+)/g, c = /var\([^)]+\)/g; return ne(u.replace(c, "0"), i) ? `calc(${u})` : u; } return s; } else if (Ro(t)) return t; } function Xo(t, e, n) { D(e, !1) && t.push(`${e}:${n};`); } function $e(t, e) { return t ? `${t}{${e}}` : ""; } var je = (...t) => Jo(L.getTheme(), ...t), Jo = (t = {}, e, n, o) => { if (e) { const { variable: r, options: a } = L.defaults || {}, { prefix: s, transform: u } = (t == null ? void 0 : t.options) || a || {}, c = ne(e, /{([^}]*)}/g) ? e : `{${e}}`; return o === "value" || G(o) && u === "strict" ? L.getTokenValue(e) : ht(c, void 0, s, [r.excludedKeyRegex], n); } return ""; }; function Qo(t, e = {}) { const n = L.defaults.variable, { prefix: o = n.prefix, selector: r = n.selector, excludedKeyRegex: a = n.excludedKeyRegex } = e, s = (c, l = "") => Object.entries(c).reduce( (m, [d, f]) => { const p = ne(d, a) ? cn(l) : cn(l, ft(d)), v = Go(f); if (ce(v)) { const { variables: C, tokens: x } = s(v, p); Bn(m.tokens, x), Bn(m.variables, C); } else m.tokens.push((o ? p.replace(`${o}-`, "") : p).replaceAll("-", ".")), Xo(m.variables, gt(p), ht(v, p, o, [a])); return m; }, { variables: [], tokens: [] } ), { variables: u, tokens: i } = s(t, o); return { value: u, tokens: i, declarations: u.join(""), css: $e(r, u.join("")) }; } var R = { regex: { rules: { class: { pattern: /^\.([a-zA-Z][\w-]*)$/, resolve(t) { return { type: "class", selector: t, matched: this.pattern.test(t.trim()) }; } }, attr: { pattern: /^\[(.*)\]$/, resolve(t) { return { type: "attr", selector: `:root${t}`, matched: this.pattern.test(t.trim()) }; } }, media: { pattern: /^@media (.*)$/, resolve(t) { return { type: "media", selector: `${t}{:root{[CSS]}}`, matched: this.pattern.test(t.trim()) }; } }, system: { pattern: /^system$/, resolve(t) { return { type: "system", selector: "@media (prefers-color-scheme: dark){:root{[CSS]}}", matched: this.pattern.test(t.trim()) }; } }, custom: { resolve(t) { return { type: "custom", selector: t, matched: !0 }; } } }, resolve(t) { const e = Object.keys(this.rules).filter((n) => n !== "custom").map((n) => this.rules[n]); return [t].flat().map((n) => { var o; return (o = e.map((r) => r.resolve(n)).find((r) => r.matched)) != null ? o : this.rules.custom.resolve(n); }); } }, _toVariables(t, e) { return Qo(t, { prefix: e == null ? void 0 : e.prefix }); }, getCommon({ name: t = "", theme: e = {}, params: n, set: o, defaults: r }) { var a, s, u, i, c, l, m; const { preset: d, options: f } = e; let p, v, C, x, S, b, y; if ($(d) && f.transform !== "strict") { const { primitive: j, semantic: M, extend: te } = d, oe = M || {}, { colorScheme: re } = oe, le = Q(oe, ["colorScheme"]), ae = te || {}, { colorScheme: de } = ae, me = Q(ae, ["colorScheme"]), ie = re || {}, { dark: fe } = ie, ke = Q(ie, ["dark"]), pe = de || {}, { dark: Se } = pe, we = Q(pe, ["dark"]), J = $(j) ? this._toVariables({ primitive: j }, f) : {}, q = $(le) ? this._toVariables({ semantic: le }, f) : {}, be = $(ke) ? this._toVariables({ light: ke }, f) : {}, We = $(fe) ? this._toVariables({ dark: fe }, f) : {}, Ce = $(me) ? this._toVariables({ semantic: me }, f) : {}, Cn = $(we) ? this._toVariables({ light: we }, f) : {}, $n = $(Se) ? this._toVariables({ dark: Se }, f) : {}, [Vt, Rt] = [(a = J.declarations) != null ? a : "", J.tokens], [Ft, Nt] = [(s = q.declarations) != null ? s : "", q.tokens || []], [Kt, Ht] = [(u = be.declarations) != null ? u : "", be.tokens || []], [Ut, Zt] = [(i = We.declarations) != null ? i : "", We.tokens || []], [Wt, Gt] = [(c = Ce.declarations) != null ? c : "", Ce.tokens || []], [qt, Yt] = [(l = Cn.declarations) != null ? l : "", Cn.tokens || []], [Xt, Jt] = [(m = $n.declarations) != null ? m : "", $n.tokens || []]; p = this.transformCSS(t, Vt, "light", "variable", f, o, r), v = Rt; const Qt = this.transformCSS(t, `${Ft}${Kt}`, "light", "variable", f, o, r), eo = this.transformCSS(t, `${Ut}`, "dark", "variable", f, o, r); C = `${Qt}${eo}`, x = [.../* @__PURE__ */ new Set([...Nt, ...Ht, ...Zt])]; const no = this.transformCSS(t, `${Wt}${qt}color-scheme:light`, "light", "variable", f, o, r), to = this.transformCSS(t, `${Xt}color-scheme:dark`, "dark", "variable", f, o, r); S = `${no}${to}`, b = [.../* @__PURE__ */ new Set([...Gt, ...Yt, ...Jt])], y = B(d.css, { dt: je }); } return { primitive: { css: p, tokens: v }, semantic: { css: C, tokens: x }, global: { css: S, tokens: b }, style: y }; }, getPreset({ name: t = "", preset: e = {}, options: n, params: o, set: r, defaults: a, selector: s }) { var u, i, c; let l, m, d; if ($(e) && n.transform !== "strict") { const f = t.replace("-directive", ""), p = e, { colorScheme: v, extend: C, css: x } = p, S = Q(p, ["colorScheme", "extend", "css"]), b = C || {}, { colorScheme: y } = b, j = Q(b, ["colorScheme"]), M = v || {}, { dark: te } = M, oe = Q(M, ["dark"]), re = y || {}, { dark: le } = re, ae = Q(re, ["dark"]), de = $(S) ? this._toVariables({ [f]: U(U({}, S), j) }, n) : {}, me = $(oe) ? this._toVariables({ [f]: U(U({}, oe), ae) }, n) : {}, ie = $(te) ? this._toVariables({ [f]: U(U({}, te), le) }, n) : {}, [fe, ke] = [(u = de.declarations) != null ? u : "", de.tokens || []], [pe, Se] = [(i = me.declarations) != null ? i : "", me.tokens || []], [we, J] = [(c = ie.declarations) != null ? c : "", ie.tokens || []], q = this.transformCSS(f, `${fe}${pe}`, "light", "variable", n, r, a, s), be = this.transformCSS(f, we, "dark", "variable", n, r, a, s); l = `${q}${be}`, m = [.../* @__PURE__ */ new Set([...ke, ...Se, ...J])], d = B(x, { dt: je }); } return { css: l, tokens: m, style: d }; }, getPresetC({ name: t = "", theme: e = {}, params: n, set: o, defaults: r }) { var a; const { preset: s, options: u } = e, i = (a = s == null ? void 0 : s.components) == null ? void 0 : a[t]; return this.getPreset({ name: t, preset: i, options: u, params: n, set: o, defaults: r }); }, getPresetD({ name: t = "", theme: e = {}, params: n, set: o, defaults: r }) { var a; const s = t.replace("-directive", ""), { preset: u, options: i } = e, c = (a = u == null ? void 0 : u.directives) == null ? void 0 : a[s]; return this.getPreset({ name: s, preset: c, options: i, params: n, set: o, defaults: r }); }, applyDarkColorScheme(t) { return !(t.darkModeSelector === "none" || t.darkModeSelector === !1); }, getColorSchemeOption(t, e) { var n; return this.applyDarkColorScheme(t) ? this.regex.resolve(t.darkModeSelector === !0 ? e.options.darkModeSelector : (n = t.darkModeSelector) != null ? n : e.options.darkModeSelector) : []; }, getLayerOrder(t, e = {}, n, o) { const { cssLayer: r } = e; return r ? `@layer ${B(r.order || "primeui", n)}` : ""; }, getCommonStyleSheet({ name: t = "", theme: e = {}, params: n, props: o = {}, set: r, defaults: a }) { const s = this.getCommon({ name: t, theme: e, params: n, set: r, defaults: a }), u = Object.entries(o).reduce((i, [c, l]) => i.push(`${c}="${l}"`) && i, []).join(" "); return Object.entries(s || {}).reduce((i, [c, l]) => { if (l != null && l.css) { const m = Ae(l == null ? void 0 : l.css), d = `${c}-variables`; i.push(`<style type="text/css" data-primevue-style-id="${d}" ${u}>${m}</style>`); } return i; }, []).join(""); }, getStyleSheet({ name: t = "", theme: e = {}, params: n, props: o = {}, set: r, defaults: a }) { var s; const u = { name: t, theme: e, params: n, set: r, defaults: a }, i = (s = t.includes("-directive") ? this.getPresetD(u) : this.getPresetC(u)) == null ? void 0 : s.css, c = Object.entries(o).reduce((l, [m, d]) => l.push(`${m}="${d}"`) && l, []).join(" "); return i ? `<style type="text/css" data-primevue-style-id="${t}-variables" ${c}>${Ae(i)}</style>` : ""; }, createTokens(t = {}, e, n = "", o = "", r = {}) { return Object.entries(t).forEach(([a, s]) => { const u = ne(a, e.variable.excludedKeyRegex) ? n : n ? `${n}.${jn(a)}` : jn(a), i = o ? `${o}.${a}` : a; ce(s) ? this.createTokens(s, e, u, i, r) : (r[u] || (r[u] = { paths: [], computed(c, l = {}) { var m, d; return this.paths.length === 1 ? (m = this.paths[0]) == null ? void 0 : m.computed(this.paths[0].scheme, l.binding) : c && c !== "none" ? (d = this.paths.find((f) => f.scheme === c)) == null ? void 0 : d.computed(c, l.binding) : this.paths.map((f) => f.computed(f.scheme, l[f.scheme])); } }), r[u].paths.push({ path: i, value: s, scheme: i.includes("colorScheme.light") ? "light" : i.includes("colorScheme.dark") ? "dark" : "none", computed(c, l = {}) { const m = /{([^}]*)}/g; let d = s; if (l.name = this.path, l.binding || (l.binding = {}), ne(s, m)) { const p = s.trim().replaceAll(m, (x) => { var S; const b = x.replace(/{|}/g, ""), y = (S = r[b]) == null ? void 0 : S.computed(c, l); return tn(y) && y.length === 2 ? `light-dark(${y[0].value},${y[1].value})` : y == null ? void 0 : y.value; }), v = /(\d+\w*\s+[\+\-\*\/]\s+\d+\w*)/g, C = /var\([^)]+\)/g; d = ne(p.replace(C, "0"), v) ? `calc(${p})` : p; } return G(l.binding) && delete l.binding, { colorScheme: c, path: this.path, paths: l, value: d.includes("undefined") ? void 0 : d }; } })); }), r; }, getTokenValue(t, e, n) { var o; const a = ((i) => i.split(".").filter((l) => !ne(l.toLowerCase(), n.variable.excludedKeyRegex)).join("."))(e), s = e.includes("colorScheme.light") ? "light" : e.includes("colorScheme.dark") ? "dark" : void 0, u = [(o = t[a]) == null ? void 0 : o.computed(s)].flat().filter((i) => i); return u.length === 1 ? u[0].value : u.reduce((i = {}, c) => { const l = c, { colorScheme: m } = l, d = Q(l, ["colorScheme"]); return i[m] = d, i; }, void 0); }, getSelectorRule(t, e, n, o) { return n === "class" || n === "attr" ? $e($(e) ? `${t}${e},${t} ${e}` : t, o) : $e(t, $(e) ? $e(e, o) : o); }, transformCSS(t, e, n, o, r = {}, a, s, u) { if ($(e)) { const { cssLayer: i } = r; if (o !== "style") { const c = this.getColorSchemeOption(r, s); e = n === "dark" ? c.reduce((l, { type: m, selector: d }) => ($(d) && (l += d.includes("[CSS]") ? d.replace("[CSS]", e) : this.getSelectorRule(d, u, m, e)), l), "") : $e(u ?? ":root", e); } if (i) { const c = { name: "primeui", order: "primeui" }; ce(i) && (c.name = B(i.name, { name: t, type: o })), $(c.name) && (e = $e(`@layer ${c.name}`, e), a == null || a.layerNames(c.name)); } return e; } return ""; } }, L = { defaults: { variable: { prefix: "p", selector: ":root", excludedKeyRegex: /^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states|extend|css)$/gi }, options: { prefix: "p", darkModeSelector: "system", cssLayer: !1 } }, _theme: void 0, _layerNames: /* @__PURE__ */ new Set(), _loadedStyleNames: /* @__PURE__ */ new Set(), _loadingStyles: /* @__PURE__ */ new Set(), _tokens: {}, update(t = {}) { const { theme: e } = t; e && (this._theme = rn(U({}, e), { options: U(U({}, this.defaults.options), e.options) }), this._tokens = R.createTokens(this.preset, this.defaults), this.clearLoadedStyleNames()); }, get theme() { return this._theme; }, get preset() { var t; return ((t = this.theme) == null ? void 0 : t.preset) || {}; }, get options() { var t; return ((t = this.theme) == null ? void 0 : t.options) || {}; }, get tokens() { return this._tokens; }, getTheme() { return this.theme; }, setTheme(t) { this.update({ theme: t }), ee.emit("theme:change", t); }, getPreset() { return this.preset; }, setPreset(t) { this._theme = rn(U({}, this.theme), { preset: t }), this._tokens = R.createTokens(t, this.defaults), this.clearLoadedStyleNames(), ee.emit("preset:change", t), ee.emit("theme:change", this.theme); }, getOptions() { return this.options; }, setOptions(t) { this._theme = rn(U({}, this.theme), { options: t }), this.clearLoadedStyleNames(), ee.emit("options:change", t), ee.emit("theme:change", this.theme); }, getLayerNames() { return [...this._layerNames]; }, setLayerNames(t) { this._layerNames.add(t); }, getLoadedStyleNames() { return this._loadedStyleNames; }, isStyleNameLoaded(t) { return this._loadedStyleNames.has(t); }, setLoadedStyleName(t) { this._loadedStyleNames.add(t); }, deleteLoadedStyleName(t) { this._loadedStyleNames.delete(t); }, clearLoadedStyleNames() { this._loadedStyleNames.clear(); }, getTokenValue(t) { return R.getTokenValue(this.tokens, t, this.defaults); }, getCommon(t = "", e) { return R.getCommon({ name: t, theme: this.theme, params: e, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } }); }, getComponent(t = "", e) { const n = { name: t, theme: this.theme, params: e, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } }; return R.getPresetC(n); }, getDirective(t = "", e) { const n = { name: t, theme: this.theme, params: e, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } }; return R.getPresetD(n); }, getCustomPreset(t = "", e, n, o) { const r = { name: t, preset: e, options: this.options, selector: n, params: o, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } }; return R.getPreset(r); }, getLayerOrderCSS(t = "") { return R.getLayerOrder(t, this.options, { names: this.getLayerNames() }, this.defaults); }, transformCSS(t = "", e, n = "style", o) { return R.transformCSS(t, e, o, n, this.options, { layerNames: this.setLayerNames.bind(this) }, this.defaults); }, getCommonStyleSheet(t = "", e, n = {}) { return R.getCommonStyleSheet({ name: t, theme: this.theme, params: e, props: n, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } }); }, getStyleSheet(t, e, n = {}) { return R.getStyleSheet({ name: t, theme: this.theme, params: e, props: n, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } }); }, onStyleMounted(t) { this._loadingStyles.add(t); }, onStyleUpdated(t) { this._loadingStyles.add(t); }, onStyleLoaded(t, { name: e }) { this._loadingStyles.size && (this._loadingStyles.delete(e), ee.emit(`theme:${e}:load`, t), !this._loadingStyles.size && ee.emit("theme:load")); } }, ue = { _loadedStyleNames: /* @__PURE__ */ new Set(), getLoadedStyleNames: function() { return this._loadedStyleNames; }, isStyleNameLoaded: function(e) { return this._loadedStyleNames.has(e); }, setLoadedStyleName: function(e) { this._loadedStyleNames.add(e); }, deleteLoadedStyleName: function(e) { this._loadedStyleNames.delete(e); }, clearLoadedStyleNames: function() { this._loadedStyleNames.clear(); } }; function De(t) { "@babel/helpers - typeof"; return De = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; } : function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, De(t); } function Dn(t, e) { return or(t) || tr(t, e) || nr(t, e) || er(); } function er() { throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } function nr(t, e) { if (t) { if (typeof t == "string") return Mn(t, e); var n = {}.toString.call(t).slice(8, -1); return n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set" ? Array.from(t) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Mn(t, e) : void 0; } } function Mn(t, e) { (e == null || e > t.length) && (e = t.length); for (var n = 0, o = Array(e); n < e; n++) o[n] = t[n]; return o; } function tr(t, e) { var n = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"]; if (n != null) { var o, r, a, s, u = [], i = !0, c = !1; try { if (a = (n = n.call(t)).next, e !== 0) for (; !(i = (o = a.call(n)).done) && (u.push(o.value), u.length !== e); i = !0) ; } catch (l) { c = !0, r = l; } finally { try { if (!i && n.return != null && (s = n.return(), Object(s) !== s)) return; } finally { if (c) throw r; } } return u; } } function or(t) { if (Array.isArray(t)) return t; } function Vn(t, e) { var n = Object.keys(t); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(t); e && (o = o.filter(function(r) { return Object.getOwnPropertyDescriptor(t, r).enumerable; })), n.push.apply(n, o); } return n; } function an(t) { for (var e = 1; e < arguments.length; e++) { var n = arguments[e] != null ? arguments[e] : {}; e % 2 ? Vn(Object(n), !0).forEach(function(o) { rr(t, o, n[o]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : Vn(Object(n)).forEach(function(o) { Object.defineProperty(t, o, Object.getOwnPropertyDescriptor(n, o)); }); } return t; } function rr(t, e, n) { return (e = ar(e)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t; } function ar(t) { var e = ir(t, "string"); return De(e) == "symbol" ? e : e + ""; } function ir(t, e) { if (De(t) != "object" || !t) return t; var n = t[Symbol.toPrimitive]; if (n !== void 0) { var o = n.call(t, e || "default"); if (De(o) != "object") return o; throw new TypeError("@@toPrimitive must return a primitive value."); } return (e === "string" ? String : Number)(t); } var sr = function(e) { var n = e.dt; return ` *, ::before, ::after { box-sizing: border-box; } /* Non vue overlay animations */ .p-connected-overlay { opacity: 0; transform: scaleY(0.8); transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1), opacity 0.12s cubic-bezier(0, 0, 0.2, 1); } .p-connected-overlay-visible { opacity: 1; transform: scaleY(1); } .p-connected-overlay-hidden { opacity: 0; transform: scaleY(1); transition: opacity 0.1s linear; } /* Vue based overlay animations */ .p-connected-overlay-enter-from { opacity: 0; transform: scaleY(0.8); } .p-connected-overlay-leave-to { opacity: 0; } .p-connected-overlay-enter-active { transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1), opacity 0.12s cubic-bezier(0, 0, 0.2, 1); } .p-connected-overlay-leave-active { transition: opacity 0.1s linear; } /* Toggleable Content */ .p-toggleable-content-enter-from, .p-toggleable-content-leave-to { max-height: 0; } .p-toggleable-content-enter-to, .p-toggleable-content-leave-from { max-height: 1000px; } .p-toggleable-content-leave-active { overflow: hidden; transition: max-height 0.45s cubic-bezier(0, 1, 0, 1); } .p-toggleable-content-enter-active { overflow: hidden; transition: max-height 1s ease-in-out; } .p-disabled, .p-disabled * { cursor: default; pointer-events: none; user-select: none; } .p-disabled, .p-component:disabled { opacity: `.concat(n("disabled.opacity"), `; } .pi { font-size: `).concat(n("icon.size"), `; } .p-icon { width: `).concat(n("icon.size"), `; height: `).concat(n("icon.size"), `; } .p-overlay-mask { background: `).concat(n("mask.background"), `; color: `).concat(n("mask.color"), `; position: fixed; top: 0; left: 0; width: 100%; height: 100%; } .p-overlay-mask-enter { animation: p-overlay-mask-enter-animation `).concat(n("mask.transition.duration"), ` forwards; } .p-overlay-mask-leave { animation: p-overlay-mask-leave-animation `).concat(n("mask.transition.duration"), ` forwards; } @keyframes p-overlay-mask-enter-animation { from { background: transparent; } to { background: `).concat(n("mask.background"), `; } } @keyframes p-overlay-mask-leave-animation { from { background: `).concat(n("mask.background"), `; } to { background: transparent; } } `); }, ur = function(e) { var n = e.dt; return ` .p-hidden-accessible { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } .p-hidden-accessible input, .p-hidden-accessible select { transform: scale(0); } .p-overflow-hidden { overflow: hidden; padding-right: `.concat(n("scrollbar.width"), `; } `); }, cr = {}, lr = {}, T = { name: "base", css: ur, theme: sr, classes: cr, inlineStyles: lr, load: function(e) { var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function(a) { return a; }, r = o(B(e, { dt: je })); return $(r) ? Vo(Ae(r), an({ name: this.name }, n)) : {}; }, loadCSS: function() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; return this.load(this.css, e); }, loadTheme: function() { var e = this, n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ""; return this.load(this.theme, n, function() { var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; return L.transformCSS(n.name || e.name, "".concat(r).concat(o)); }); }, getCommonTheme: function(e) { return L.getCommon(this.name, e); }, getComponentTheme: function(e) { return L.getComponent(this.name, e); }, getDirectiveTheme: function(e) { return L.getDirective(this.name, e); }, getPresetTheme: function(e, n, o) { return L.getCustomPreset(this.name, e, n, o); }, getLayerOrderThemeCSS: function() { return L.getLayerOrderCSS(this.name); }, getStyleSheet: function() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; if (this.css) { var o = B(this.css, { dt: je }) || "", r = Ae("".concat(o).concat(e)), a = Object.entries(n).reduce(function(s, u) { var i = Dn(u, 2), c = i[0], l = i[1]; return s.push("".concat(c, '="').concat(l, '"')) && s; }, []).join(" "); return $(r) ? '<style type="text/css" data-primevue-style-id="'.concat(this.name, '" ').concat(a, ">").concat(r, "</style>") : ""; } return ""; }, getCommonThemeStyleSheet: function(e) { var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; return L.getCommonStyleSheet(this.name, e, n); }, getThemeStyleSheet: function(e) { var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = [L.getStyleSheet(this.name, e, n)]; if (this.theme) { var r = this.name === "base" ? "global-style" : "".concat(this.name, "-style"), a = B(this.theme, { dt: je }), s = Ae(L.transformCSS(r, a)), u = Object.entries(n).reduce(function(i, c) { var l = Dn(c, 2), m = l[0], d = l[1]; return i.push("".concat(m, '="').concat(d, '"')) && i; }, []).join(" "); $(s) && o.push('<style type="text/css" data-primevue-style-id="'.concat(r, '" ').concat(u, ">").concat(s, "</style>")); } return o.join(""); }, extend: function(e) { return an(an({}, this), {}, { css: void 0, theme: void 0 }, e); } }, Rn = T.extend({ name: "common" }); function Me(t) { "@babel/helpers - typeof"; return Me = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; } : function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Me(t); } function dr(t) { return It(t) || mr(t) || yt(t) || vt(); } function mr(t) { if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null) return Array.from(t); } function Oe(t, e) { return It(t) || fr(t, e) || yt(t, e) || vt(); } function vt() { throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } function yt(t, e) { if (t) { if (typeof t == "string") return Fn(t, e); var n = {}.toString.call(t).slice(8, -1); return n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set" ? Array.from(t) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Fn(t, e) : void 0; } } function Fn(t, e) { (e == null || e > t.length) && (e = t.length); for (var n = 0, o = Array(e); n < e; n++) o[n] = t[n]; return o; } function fr(t, e) { var n = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"]; if (n != null) { var o, r, a, s, u = [], i = !0, c = !1; try { if (a = (n = n.call(t)).next, e === 0) { if (Object(n) !== n) return; i = !1; } else for (; !(i = (o = a.call(n)).done) && (u.push(o.value), u.length !== e); i = !0) ; } catch (l) { c = !0, r = l; } finally { try { if (!i && n.return != null && (s = n.return(), Object(s) !== s)) return; } finally { if (c) throw r; } } return u; } } function It(t) { if (Array.isArray(t)) return t; } function Nn(t, e) { var n = Object.keys(t); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(t); e && (o = o.filter(function(r) { return Object.getOwnPropertyDescriptor(t, r).enumerable; })), n.push.apply(n, o); } return n; } function w(t) { for (var e = 1; e < arguments.length; e++) { var n = arguments[e] != null ? arguments[e] : {}; e % 2 ? Nn(Object(n), !0).forEach(function(o) { Le(t, o, n[o]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : Nn(Object(n)).forEach(function(o) { Object.defineProperty(t, o, Object.getOwnPropertyDescriptor(n, o)); }); } return t; } function Le(t, e, n) { return (e = pr(e)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t; } function pr(t) { var e = br(t, "string"); return Me(e) == "symbol" ? e : e + ""; } function br(t, e) { if (Me(t) != "object" || !t) return t; var n = t[Symbol.toPrimitive]; if (n !== void 0) { var o = n.call(t, e || "default"); if (Me(o) != "object") return o; throw new TypeError("@@toPrimitive must return a primitive value."); } return (e === "string" ? String : Number)(t); } var Ie = { name: "BaseComponent", props: { pt: { type: Object, default: void 0 }, ptOptions: { type: Object, default: void 0 }, unstyled: { type: Boolean, default: void 0 }, dt: { type: Object, default: void 0 } }, inject: { $parentInstance: { default: void 0 } }, watch: { isUnstyled: { immediate: !0, handler: function(e) { e || (this._loadCoreStyles(), this._themeChangeListener(this._loadCoreStyles)); } }, dt: { immediate: !0, handler: function(e) { var n = this; e ? (this._loadScopedThemeStyles(e), this._themeChangeListener(function() { return n._loadScopedThemeStyles(e); })) : this._unloadScopedThemeStyles(); } } }, scopedStyleEl: void 0, rootEl: void 0, $attrSelector: void 0, beforeCreate: function() { var e, n, o, r, a, s, u, i, c, l, m, d = (e = this.pt) === null || e === void 0 ? void 0 : e._usept, f = d ? (n = this.pt) === null || n === void 0 || (n = n.originalValue) === null || n === void 0 ? void 0 : n[this.$.type.name] : void 0, p = d ? (o = this.pt) === null || o === void 0 || (o = o.value) === null || o === void 0 ? void 0 : o[this.$.type.name] : this.pt; (r = p || f) === null || r === void 0 || (r = r.hooks) === null || r === void 0 || (a = r.onBeforeCreate) === null || a === void 0 || a.call(r); var v = (s = this.$primevueConfig) === null || s === void 0 || (s = s.pt) === null || s === void 0 ? void 0 : s._usept, C = v ? (u = this.$primevue) === null || u === void 0 || (u = u.config) === null || u === void 0 || (u = u.pt) === null || u === void 0 ? void 0 : u.originalValue : void 0, x = v ? (i = this.$primevue) === null || i === void 0 || (i = i.config) === null || i === void 0 || (i = i.pt) === null || i === void 0 ? void 0 : i.value : (c = this.$primevue) === null || c === void 0 || (c = c.config) === null || c === void 0 ? void 0 : c.pt; (l = x || C) === null || l === void 0 || (l = l[this.$.type.name]) === null || l === void 0 || (l = l.hooks) === null || l === void 0 || (m = l.onBeforeCreate) === null || m === void 0 || m.call(l), this.$attrSelector = In("pc"); }, created: function() { this._hook("onCreated"); }, beforeMount: function() { this.rootEl = Xe(this.$el, '[data-pc-name="'.concat(H(this.$.type.name), '"]')), this.rootEl && (this.$attrSelector && !this.rootEl.hasAttribute(this.$attrSelector) && this.rootEl.setAttribute(this.$attrSelector, ""), this.rootEl.$pc = w({ name: this.$.type.name, attrSelector: this.$attrSelector }, this.$params)), this._loadStyles(), this._hook("onBeforeMount"); }, mounted: function() { this._hook("onMounted"); }, beforeUpdate: function() { this._hook("onBeforeUpdate"); }, updated: function() { this._hook("onUpdated"); }, beforeUnmount: function() { this._hook("onBeforeUnmount"); }, unmounted: function() { this._unloadScopedThemeStyles(), this._hook("onUnmounted"); }, methods: { _hook: function(e) { if (!this.$options.hostName) { var n = this._usePT(this._getPT(this.pt, this.$.type.name), this._getOptionValue, "hooks.".concat(e)), o = this._useDefaultPT(this._getOptionValue, "hooks.".concat(e)); n == null || n(), o == null || o(); } }, _mergeProps: function(e) { for (var n = arguments.length, o = new Array(n > 1 ? n - 1 : 0), r = 1; r < n; r++) o[r - 1] = arguments[r]; return vn(e) ? e.apply(void 0, o) : g.apply(void 0, o); }, _loadStyles: function() { var e = this, n = function() { ue.isStyleNameLoaded("base") || (T.loadCSS(e.$styleOptions), e._loadGlobalStyles(), ue.setLoadedStyleName("base")), e._loadThemeStyles(); }; n(), this._themeChangeListener(n); }, _loadCoreStyles: function() { var e, n; !ue.isStyleNameLoaded((e = this.$style) === null || e === void 0 ? void 0 : e.name) && (n = this.$style) !== null && n !== void 0 && n.name && (Rn.loadCSS(this.$styleOptions), this.$options.style && this.$style.loadCSS(this.$styleOptions), ue.setLoadedStyleName(this.$style.name)); }, _loadGlobalStyles: function() { var e = this._useGlobalPT(this._getOptionValue, "global.css", this.$params); $(e) && T.load(e, w({ name: "global" }, this.$styleOptions)); }, _loadThemeStyles: function() { var e, n; if (!(this.isUnstyled || this.$theme === "none")) { if (!L.isStyleNameLoaded("common")) {