@trintel/zooy 1.14.0 → 1.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/attributes-D6kBA8su.js +1 -0
- package/dist/chunks/attributes-DLvrzXzz.js +159 -0
- package/dist/chunks/component-library-registry-BZI0_XM_.js +1 -0
- package/dist/chunks/{register-BQwcQb3J.js → register-BYYPJoHC.js} +1 -1
- package/dist/chunks/register-Dq0hul2Y.js +1 -0
- package/dist/chunks/{register-BToVLXl9.js → register-Kldh2rNG.js} +1 -1
- package/dist/chunks/register-RDk7_sJH.js +1632 -0
- package/dist/chunks/{tree-utils-DVtSIiGp.js → tree-utils-C5v92nx9.js} +21 -20
- package/dist/chunks/{tree-utils-Dzrq9O-e.js → tree-utils-CExeKLzH.js} +1 -1
- package/dist/zooy.cjs.js +68 -5
- package/dist/zooy.es.js +641 -368
- package/package.json +14 -11
- package/dist/chunks/component-library-registry-DS_liKzL.js +0 -1
- package/dist/chunks/register-9ABlBJaU.js +0 -1508
- package/dist/chunks/register-aC3Bk1C3.js +0 -1
- package/dist/chunks/zoo-B9S5MBHV.js +0 -436
- package/dist/chunks/zoo-bQS5G6fe.js +0 -64
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const m=require("./component-library-registry-BZI0_XM_.js");let h=require("badu"),l=require("ramda");var g={date_parse:t=>Date.parse(t),filesize:t=>(0,h.formatBytes)(4)((0,h.toInt)(t)),json:t=>JSON.stringify(t,null,2),tpl:(t,e,r)=>{const i=r?.getAttribute("zoo-bind-attr-tpl")||r?.getAttribute("zoo-bind-tpl");if(!i)return t;try{return new Function("value","data",`return \`${i}\`;`)(t,e)}catch(s){return console.warn("[Binder] Invalid template:",i,s),t}}},A=class{#n;#t;#r;#e=null;#i;constructor(t,e,r,i={}){if(!e)throw new Error("Binder requires a URL");if(!r||!(r instanceof Element))throw new Error("Binder requires a valid rootEl Element");this.#n=t,this.#t=new URL(e,window.location.origin),this.#r=r,this.#i={...g,...i.formatters},i.urlParams?this.#a(i.urlParams):this.#s()}get url(){return this.#t}get data(){return this.#e}get limit(){return parseInt(this.#t.searchParams.get("limit")||"0",10)}get offset(){return parseInt(this.#t.searchParams.get("offset")||"0",10)}get isPaginated(){return(0,l.both)((0,l.has)("count"),(0,l.has)("results"))(this.#e)}#a(t){return Object.entries(t).forEach(([e,r])=>{if(!(0,h.isDefAndNotNull)(r)||r===""||Array.isArray(r)&&r.length<1){this.#t.searchParams.delete(e);return}if(Array.isArray(r)){this.#t.searchParams.set(e,r.join(","));return}this.#t.searchParams.set(e,r)}),this.#s(),this.#t}#s(){const t=this.#t.href.split(this.url.origin)[1].slice(1);this.#r.querySelectorAll("[zoo-bind-binderurl]").forEach(e=>{e.setAttribute("zoo-bind-binderurl",t)})}async fetchData(t={}){const e=await this.#n.user.fetchJson(this.#a(t).toString(),this.#n.abortController.signal);this.setData(e)}setData(t){this.#e=t,this.render()}render(){if(!(0,h.isDefAndNotNull)(this.#e)){console.warn("[Binder] No data to render");return}this.#s(),this.#o(this.#r,this.#e,0),this.#u()}#o(t,e,r=0,i={}){const s=i.removeAttributes??!1;t.querySelectorAll("[zoo-bind-attr]").forEach(n=>{n.closest("[zoo-template]")||(n.getAttribute("zoo-bind-attr").split(",").forEach(a=>{const[o,u]=a.split(":").map(b=>b.trim()),[d,f]=u.split("|").map(b=>b.trim());let c=this.#l(e,d,r);f&&this.#i[f]&&(c=this.#i[f](c,e,n)),(0,h.isDefAndNotNull)(c)&&n.setAttribute(o,c)}),s&&(n.removeAttribute("zoo-bind-attr"),n.removeAttribute("zoo-bind-attr-tpl")))}),t.querySelectorAll("[zoo-bind]").forEach(n=>{if(n.closest("[zoo-template]"))return;const[a,o]=n.getAttribute("zoo-bind").split("|").map(d=>d.trim());let u=this.#l(e,a,r);o&&this.#i[o]&&(u=this.#i[o](u,e,n)),n.textContent=u??"",s&&(n.removeAttribute("zoo-bind"),n.removeAttribute("zoo-bind-tpl"))})}#u(){this.#r.querySelectorAll("[zoo-template]").forEach(t=>{const e=t.getAttribute("zoo-template"),r=t.getAttribute("zoo-template-bind");if(!e){console.warn("[Binder] Consumer missing template ID",t);return}const i=this.#r.querySelector(`#${e}`);if(!i||i.tagName!=="TEMPLATE"){console.error(`[DataBinder] Template not found or invalid: ${e}`);return}const s=r?(0,l.path)(r.split("."),this.#e):this.#e;if(!s){console.warn(`[DataBinder] Data slice is undefined. Path: ${r}. Skipping render for this consumer.`);return}if(!Array.isArray(s)){console.error(`[DataBinder] Data slice is not an array. Path: ${r}`,s);return}if(t.innerHTML="",s.forEach((n,a)=>{const o=this.#h(i,n,a);t.appendChild(o)}),m.ComponentLibraryRegistry.has("carbon")){const n=m.ComponentLibraryRegistry.get("carbon");n.render.call(this.#n,t,n.cache).catch(a=>console.error("[Binder] Carbon init failed:",a))}})}#h(t,e,r){const i=t.content.cloneNode(!0);return this.#o(i,e,r,{removeAttributes:!0}),i}#l(t,e,r){const i={$index:()=>r,$index__paged:()=>this.offset+r,$index1:()=>r+1,$index1__paged:()=>this.offset+r+1};return i[e]?i[e]():(0,l.path)(e.split("."),t)}},p=new Map(Object.entries({event:"event",endpoint:"endpoint",href:"href",url:"url",target:"target","record-id":"recordId","zoo-sort-field":"sortField","zoo-view":"view","zoo-event":"event","zoo-href":"href"})),y=t=>{let e={};return Array.from(t.attributes).forEach(r=>{const i=r.name,s=r.value;p.has(i)?e[p.get(i)]=s:(i.startsWith("data-")||i.startsWith("zoo-"))&&(e=(0,l.assocPath)(i.split("-"),s,e))}),e},z=(t,e,r="event")=>t.getAttribute(e)||t.getAttribute(r);Object.defineProperty(exports,"Binder",{enumerable:!0,get:function(){return A}});Object.defineProperty(exports,"getEventAttribute",{enumerable:!0,get:function(){return z}});Object.defineProperty(exports,"getSemanticAttributes",{enumerable:!0,get:function(){return y}});
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { t as m } from "./component-library-registry-BXnJ4Oqa.js";
|
|
2
|
+
import { formatBytes as g, isDefAndNotNull as f, toInt as z } from "badu";
|
|
3
|
+
import { assocPath as v, both as E, has as p, path as b } from "ramda";
|
|
4
|
+
var y = {
|
|
5
|
+
date_parse: (t) => Date.parse(t),
|
|
6
|
+
filesize: (t) => g(4)(z(t)),
|
|
7
|
+
json: (t) => JSON.stringify(t, null, 2),
|
|
8
|
+
tpl: (t, r, e) => {
|
|
9
|
+
const i = e?.getAttribute("zoo-bind-attr-tpl") || e?.getAttribute("zoo-bind-tpl");
|
|
10
|
+
if (!i) return t;
|
|
11
|
+
try {
|
|
12
|
+
return new Function("value", "data", `return \`${i}\`;`)(t, r);
|
|
13
|
+
} catch (o) {
|
|
14
|
+
return console.warn("[Binder] Invalid template:", i, o), t;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}, S = class {
|
|
18
|
+
#s;
|
|
19
|
+
#t;
|
|
20
|
+
#e;
|
|
21
|
+
#r = null;
|
|
22
|
+
#i;
|
|
23
|
+
constructor(t, r, e, i = {}) {
|
|
24
|
+
if (!r) throw new Error("Binder requires a URL");
|
|
25
|
+
if (!e || !(e instanceof Element)) throw new Error("Binder requires a valid rootEl Element");
|
|
26
|
+
this.#s = t, this.#t = new URL(r, window.location.origin), this.#e = e, this.#i = {
|
|
27
|
+
...y,
|
|
28
|
+
...i.formatters
|
|
29
|
+
}, i.urlParams ? this.#a(i.urlParams) : this.#o();
|
|
30
|
+
}
|
|
31
|
+
get url() {
|
|
32
|
+
return this.#t;
|
|
33
|
+
}
|
|
34
|
+
get data() {
|
|
35
|
+
return this.#r;
|
|
36
|
+
}
|
|
37
|
+
get limit() {
|
|
38
|
+
return parseInt(this.#t.searchParams.get("limit") || "0", 10);
|
|
39
|
+
}
|
|
40
|
+
get offset() {
|
|
41
|
+
return parseInt(this.#t.searchParams.get("offset") || "0", 10);
|
|
42
|
+
}
|
|
43
|
+
get isPaginated() {
|
|
44
|
+
return E(p("count"), p("results"))(this.#r);
|
|
45
|
+
}
|
|
46
|
+
#a(t) {
|
|
47
|
+
return Object.entries(t).forEach(([r, e]) => {
|
|
48
|
+
if (!f(e) || e === "" || Array.isArray(e) && e.length < 1) {
|
|
49
|
+
this.#t.searchParams.delete(r);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (Array.isArray(e)) {
|
|
53
|
+
this.#t.searchParams.set(r, e.join(","));
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
this.#t.searchParams.set(r, e);
|
|
57
|
+
}), this.#o(), this.#t;
|
|
58
|
+
}
|
|
59
|
+
#o() {
|
|
60
|
+
const t = this.#t.href.split(this.url.origin)[1].slice(1);
|
|
61
|
+
this.#e.querySelectorAll("[zoo-bind-binderurl]").forEach((r) => {
|
|
62
|
+
r.setAttribute("zoo-bind-binderurl", t);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
async fetchData(t = {}) {
|
|
66
|
+
const r = await this.#s.user.fetchJson(this.#a(t).toString(), this.#s.abortController.signal);
|
|
67
|
+
this.setData(r);
|
|
68
|
+
}
|
|
69
|
+
setData(t) {
|
|
70
|
+
this.#r = t, this.render();
|
|
71
|
+
}
|
|
72
|
+
render() {
|
|
73
|
+
if (!f(this.#r)) {
|
|
74
|
+
console.warn("[Binder] No data to render");
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
this.#o(), this.#n(this.#e, this.#r, 0), this.#h();
|
|
78
|
+
}
|
|
79
|
+
#n(t, r, e = 0, i = {}) {
|
|
80
|
+
const o = i.removeAttributes ?? !1;
|
|
81
|
+
t.querySelectorAll("[zoo-bind-attr]").forEach((s) => {
|
|
82
|
+
s.closest("[zoo-template]") || (s.getAttribute("zoo-bind-attr").split(",").forEach((a) => {
|
|
83
|
+
const [n, l] = a.split(":").map((d) => d.trim()), [c, u] = l.split("|").map((d) => d.trim());
|
|
84
|
+
let h = this.#l(r, c, e);
|
|
85
|
+
u && this.#i[u] && (h = this.#i[u](h, r, s)), f(h) && s.setAttribute(n, h);
|
|
86
|
+
}), o && (s.removeAttribute("zoo-bind-attr"), s.removeAttribute("zoo-bind-attr-tpl")));
|
|
87
|
+
}), t.querySelectorAll("[zoo-bind]").forEach((s) => {
|
|
88
|
+
if (s.closest("[zoo-template]")) return;
|
|
89
|
+
const [a, n] = s.getAttribute("zoo-bind").split("|").map((c) => c.trim());
|
|
90
|
+
let l = this.#l(r, a, e);
|
|
91
|
+
n && this.#i[n] && (l = this.#i[n](l, r, s)), s.textContent = l ?? "", o && (s.removeAttribute("zoo-bind"), s.removeAttribute("zoo-bind-tpl"));
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
#h() {
|
|
95
|
+
this.#e.querySelectorAll("[zoo-template]").forEach((t) => {
|
|
96
|
+
const r = t.getAttribute("zoo-template"), e = t.getAttribute("zoo-template-bind");
|
|
97
|
+
if (!r) {
|
|
98
|
+
console.warn("[Binder] Consumer missing template ID", t);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const i = this.#e.querySelector(`#${r}`);
|
|
102
|
+
if (!i || i.tagName !== "TEMPLATE") {
|
|
103
|
+
console.error(`[DataBinder] Template not found or invalid: ${r}`);
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
const o = e ? b(e.split("."), this.#r) : this.#r;
|
|
107
|
+
if (!o) {
|
|
108
|
+
console.warn(`[DataBinder] Data slice is undefined. Path: ${e}. Skipping render for this consumer.`);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if (!Array.isArray(o)) {
|
|
112
|
+
console.error(`[DataBinder] Data slice is not an array. Path: ${e}`, o);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
if (t.innerHTML = "", o.forEach((s, a) => {
|
|
116
|
+
const n = this.#c(i, s, a);
|
|
117
|
+
t.appendChild(n);
|
|
118
|
+
}), m.has("carbon")) {
|
|
119
|
+
const s = m.get("carbon");
|
|
120
|
+
s.render.call(this.#s, t, s.cache).catch((a) => console.error("[Binder] Carbon init failed:", a));
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
#c(t, r, e) {
|
|
125
|
+
const i = t.content.cloneNode(!0);
|
|
126
|
+
return this.#n(i, r, e, { removeAttributes: !0 }), i;
|
|
127
|
+
}
|
|
128
|
+
#l(t, r, e) {
|
|
129
|
+
const i = {
|
|
130
|
+
$index: () => e,
|
|
131
|
+
$index__paged: () => this.offset + e,
|
|
132
|
+
$index1: () => e + 1,
|
|
133
|
+
$index1__paged: () => this.offset + e + 1
|
|
134
|
+
};
|
|
135
|
+
return i[r] ? i[r]() : b(r.split("."), t);
|
|
136
|
+
}
|
|
137
|
+
}, A = new Map(Object.entries({
|
|
138
|
+
event: "event",
|
|
139
|
+
endpoint: "endpoint",
|
|
140
|
+
href: "href",
|
|
141
|
+
url: "url",
|
|
142
|
+
target: "target",
|
|
143
|
+
"record-id": "recordId",
|
|
144
|
+
"zoo-sort-field": "sortField",
|
|
145
|
+
"zoo-view": "view",
|
|
146
|
+
"zoo-event": "event",
|
|
147
|
+
"zoo-href": "href"
|
|
148
|
+
})), D = (t) => {
|
|
149
|
+
let r = {};
|
|
150
|
+
return Array.from(t.attributes).forEach((e) => {
|
|
151
|
+
const i = e.name, o = e.value;
|
|
152
|
+
A.has(i) ? r[A.get(i)] = o : (i.startsWith("data-") || i.startsWith("zoo-")) && (r = v(i.split("-"), o, r));
|
|
153
|
+
}), r;
|
|
154
|
+
}, T = (t, r, e = "event") => t.getAttribute(r) || t.getAttribute(e);
|
|
155
|
+
export {
|
|
156
|
+
D as n,
|
|
157
|
+
S as r,
|
|
158
|
+
T as t
|
|
159
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var g=Object.create,i=Object.defineProperty,p=Object.getOwnPropertyDescriptor,b=Object.getOwnPropertyNames,f=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,h=(e,t)=>{let r={};for(var a in e)i(r,a,{get:e[a],enumerable:!0});return t||i(r,Symbol.toStringTag,{value:"Module"}),r},_=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=b(t),o=0,l=s.length,n;o<l;o++)n=s[o],!c.call(e,n)&&n!==r&&i(e,n,{get:(u=>t[u]).bind(null,n),enumerable:!(a=p(t,n))||a.enumerable});return e},y=(e,t,r)=>(r=e!=null?g(f(e)):{},_(t||!e||!e.__esModule||!c.call(e,"default")?i(r,"default",{value:e,enumerable:!0}):r,e)),d=class{static#e=new Map;static register(e,t){if(!t.render)throw new Error(`Component library '${e}' must provide a render function`);this.#e.set(e,{...t,dispose:t.dispose||null,cache:t.cache||new Map,config:t.config||{}}),console.debug(`[ComponentLibraryRegistry] Registered: ${e}`)}static get(e){if(!this.#e.has(e)){const t=Array.from(this.#e.keys()).join(", ");throw new Error(`Component library '${e}' is not registered. Available: ${t||"none"}`)}return this.#e.get(e)}static has(e){return this.#e.has(e)}static getRegisteredLibraries(){return Array.from(this.#e.keys())}static getCacheStats(){const e={};for(const[t,r]of this.#e.entries())e[t]={cacheSize:r.cache.size,config:r.config};return e}static clearAllCaches(){for(const[e,t]of this.#e.entries())t.cache.clear(),console.debug(`[ComponentLibraryRegistry] Cleared cache for: ${e}`)}static clearCache(e){this.get(e).cache.clear(),console.debug(`[ComponentLibraryRegistry] Cleared cache for: ${e}`)}static unregister(e){return this.#e.delete(e)}static unregisterAll(){this.#e.clear()}};Object.defineProperty(exports,"ComponentLibraryRegistry",{enumerable:!0,get:function(){return d}});Object.defineProperty(exports,"__exportAll",{enumerable:!0,get:function(){return h}});Object.defineProperty(exports,"__toESM",{enumerable:!0,get:function(){return y}});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as M } from "./component-library-registry-BXnJ4Oqa.js";
|
|
2
|
-
import { r as E, s as l } from "./tree-utils-
|
|
2
|
+
import { r as E, s as l } from "./tree-utils-C5v92nx9.js";
|
|
3
3
|
import { isDefAndNotNull as p, toLowerCase as C } from "badu";
|
|
4
4
|
import * as a from "material-components-web";
|
|
5
5
|
var b = function(r) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Ut=Object.create;var nt=Object.defineProperty;var Ht=Object.getOwnPropertyDescriptor;var $t=Object.getOwnPropertyNames;var Gt=Object.getPrototypeOf,jt=Object.prototype.hasOwnProperty;var Vt=(t,e,s,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of $t(e))!jt.call(t,o)&&o!==s&&nt(t,o,{get:()=>e[o],enumerable:!(n=Ht(e,o))||n.enumerable});return t};var l=(t,e,s)=>(s=t!=null?Ut(Gt(t)):{},Vt(e||!t||!t.__esModule?nt(s,"default",{value:t,enumerable:!0}):s,t));const m=require("./component-library-registry-BZI0_XM_.js"),c=require("./attributes-D6kBA8su.js");let At=require("badu"),T=require("ramda");T=m.__toESM(T,1);let Zt=require("@carbon/web-components/lib/components/data-table/defs.js");var Jt=m.__exportAll({cdsTableWrap:()=>Yt}),ot=(t,e,s)=>{const n=customElements.get("cds-table"),o=customElements.get("cds-pagination"),r=customElements.get(n.selectorTableBatchActions);customElements.get("cds-popover");const a=e.dataBinder,i=e.pagination,p=e.skeleton,k=e.querySelector(n.selectorTableToolbarSearch),A=e.querySelector(n.selectorTableBatchActions),x=e.querySelector(n.selectorTableBody),G=["button","a","input","select","textarea",'[role="button"]',".cds--table-expand",".cds--table-column-checkbox"].join(","),tt=e.querySelectorAll(n.selectorHeaderCell+"[is-sortable]"),_t=e.isSortable||tt.length>0,j=Symbol(),V=Symbol(),w=new Map,Ct=d=>{t.listen(e,"click",u=>{const v=u.target.closest(n.selectorTableRow);if(!v||u.composedPath().some(S=>S.matches&&S.matches(G)))return;u.stopPropagation();const f=c.getSemanticAttributes(v);t.dispatchPanelEvent(d,{...f})})},xt=d=>{t.listen(e,n.eventExpandoToggle,u=>{const v=u.target,f=v.tagName==="CDS-TABLE-HEADER-ROW",S=u.detail.expanded,W={tableAttrs:s,...c.getSemanticAttributes(v),target:v,allRows:f,didExpand:S};t.dispatchPanelEvent(d,W)})},wt=d=>{w.set(j,u=>{t.dispatchPanelEvent(d,u)})},Dt=d=>{w.set(V,u=>{const v=u.detail.selectedRows,f=Math.min(v.length,A.totalRowsCount),S=u.target,W=c.getSemanticAttributes(S),E=v.map(c.getSemanticAttributes),P={tableAttrs:s,...W,target:S,selectCount:f,selection:E};t.dispatchPanelEvent(d,P)})},Tt=d=>{t.listen(e,n.eventTableRowSelect,u=>{const v=u.target,f=u.detail.selectedRows||[],S=f.length,W=f.map(c.getSemanticAttributes),E={tableAttrs:s,...c.getSemanticAttributes(v),selectCount:S,selection:W,target:v};t.dispatchPanelEvent(d,E)})},Bt=()=>{t.listen(e,n.eventBeforeSort,d=>{const u=d.target,v=d.detail.oldSortDirection,f=d.detail.sortDirection,S=c.getSemanticAttributes(u),W=S.sortField,E=f===Zt.TABLE_SORT_DIRECTION.DESCENDING?`-${W}`:W;d.cancelBubble=!0,d.stopPropagation(),d.preventDefault(),x.innerHTML="",p&&p.show(),tt.forEach((_,h)=>{_===u?(_.setAttribute("sort-active","true"),_.setAttribute("sort-direction",f)):(_.removeAttribute("sort-active"),_.setAttribute("sort-direction","none"))});const P={ordering:E};a.fetchData(P).then(()=>{i.setData(a),p&&p.hide()}),w.has(j)&&w.get(j)({tableAttrs:s,...S,sortNow:f,sortWas:v,sortField:W,ordering:E,target:u})})},Nt=()=>{t.listen(e,n.eventTableRowSelectAll,d=>{d.detail.selectedRows.length===0&&e.querySelectorAll(n.selectorTableRow).forEach(u=>{u.disabled=!1,u.selected=!1}),w.has(V)&&w.get(V)(d)})},Mt=()=>{t.listen(e,n.eventBeforeChangeSelectionAll,d=>{d.stopPropagation(),d.detail.callback&&d.detail.callback()})},Ft=d=>{const u=e.querySelector("cds-table-header-row");t.listen(d,r.eventClickSelectAll,v=>{v.stopPropagation(),u.dispatchEvent(new CustomEvent(n.eventBeforeChangeSelectionAll,{bubbles:!0,cancelable:!0,composed:!0,detail:{selected:!0,callback:()=>{d.selectedRowsCount=d.totalRowsCount,e.querySelectorAll(n.selectorTableRow).forEach(f=>{f.disabled=!0})}}}))})},Lt=d=>{t.listen(d,"keydown",u=>{if(u.key==="Enter"){p&&p.show(),i.totalItems=0,e.querySelector("cds-table-body").replaceChildren();const v={search:d.value||"",offset:0};a.fetchData(v).then(()=>{i.setData(a),p&&p.hide()})}})},qt=d=>{t.listen(d,n.eventSearchInput,u=>{if((u.detail.value||"")===""){const v={search:"",offset:0};p&&p.show(),a.fetchData(v).then(()=>{p&&p.hide(),i.setData(a)})}})},Ot=d=>{d.caret=!1;const u=d.querySelector("cds-icon-button, button:not([slot])"),v=d.querySelectorAll("cds-checkbox"),f=d.querySelectorAll("cds-modal-footer-button"),S=[...d.querySelectorAll("cds-checkbox-group")].map(c.getSemanticAttributes).map(T.pathOr("noop",["zoo","filter","field"])).reduce((h,b)=>(h[b]=null,h),{offset:0});if(!u||!f){console.error("Improperly configured Batch Filter popover");return}new MutationObserver(()=>{d.classList.toggle("cds--overflow-menu--open",d.open)}).observe(d,{attributes:!0,attributeFilter:["open"]});const W=Symbol(),E=Symbol(),P=[...f].reduce((h,b,C)=>(b.hasAttribute("reset-filter")&&h.set(W,b),b.hasAttribute("apply-filter")&&h.set(E,b),h),new Map),_=()=>{const h=new Map;return v.forEach(b=>{const C=b.getAttribute("id");if(!C||!C.includes(":"))return;const[B,N]=C.split(":");h.has(B)||h.set(B,[]),b.checked&&h.get(B).push(N)}),h};if(P.has(W)){const h=b=>b.checked=!1;t.listen(P.get(W),"click",b=>{b.stopPropagation(),v.forEach(h),p&&p.show(),a.fetchData(S).then(()=>{i&&i.setData(a),p&&p.hide(),d.open=!1})})}P.has(E)&&t.listen(P.get(E),"click",h=>{h.stopPropagation();const b=[..._()].reduce((C,[B,N])=>(C[B]=Array.isArray(N)&&N.length===0?null:N,C),{offset:0});p&&p.show(),a.fetchData(b).then(()=>{i&&i.setData(a),p&&p.hide(),d.open=!1})}),t.listen(u,"click",h=>{h.stopPropagation(),d.open=!d.open,d.classList.toggle("cds--overflow-menu--open",d.open)})},zt=()=>{t.listen(i,o.eventPageSizeChanged,d=>{const u={limit:i.pageSize,offset:0};a.fetchData(u).then(()=>{i.setData(a)})})},Rt=()=>{t.listen(i,o.eventChangeCurrent,d=>{const{page:u}=d.detail,v=i.pageSize,f={limit:v,offset:(u-1)*v};a.fetchData(f).then(()=>{i.setData(a),p&&p.hide()})})};a&&i&&(zt(),Rt()),a&&k&&(Lt(k),qt(k));const et=e.querySelector(n.selectorTableToolbarContent);if(et){const d=et.querySelectorAll("cds-popover[data-batch-filter]");a&&d&&d.forEach(Ot)}e.isSelectable&&(Nt(),Mt(),A&&Ft(A)),a&&_t&&Bt();const st={zoo:{event:{row:{click:Ct,expand:xt,check:{one:Tt,all:Dt}},column:{sort:wt}}}};(0,At.objToPaths)(s).forEach(([d,u])=>{T.hasPath(d,st)&&T.path(d,st)(u)})},Kt=t=>{const e=document.createElement("cds-pagination");return e.backwardText="Previous page",e.forwardText="Next page",e.itemsPerPageText="Items per page:",e.pageSize=t.limit,e.size="lg",[10,25,50,100,500].forEach(s=>{const n=document.createElement("cds-select-item");n.value=s.toString(),n.textContent=s.toString(),e.appendChild(n)}),e.setData=s=>{if(s.isPaginated){const{count:n}=T.pick(["count"],s.data),o=Math.ceil(n/s.limit);e.pagesUnknown=o>100,e.totalItems=n,e.pagesUnknown?e.formatStatusWithIndeterminateTotal=({start:r,end:a})=>`${r}–${a} of ${n} item${n<=1?"":"s"}`:delete e.formatStatusWithIndeterminateTotal}},e},Qt=t=>{if(!t.parentNode){console.error("[Carbon Table] Cannot create skeleton: table has no parent node");return}const e=!!t.querySelector("cds-table-header-title"),s=!!t.querySelector("cds-table-header-description"),n=!!t.querySelector("cds-table-toolbar"),o=[...t.querySelectorAll("cds-table-header-cell")].length,r=t.hasAttribute("zebra"),a=t.getAttribute("size"),i=document.createElement("cds-table-skeleton");i.showHeader=e||s,i.showToolbar=n,i.zebra=r,i.columnCount=o,i.size=a,i.show=()=>i.classList.remove("hidden"),i.hide=()=>i.classList.add("hidden");const p=document.createElement("div");return p.classList.add("zoo-datatable-skeleton-wrapper"),t.parentNode.insertBefore(p,t),p.appendChild(i),p.appendChild(t),i},Xt=(t,e)=>{const s=e.getAttribute("zoo-url-api"),n=parseInt(e.getAttribute("data-page-size")||25,10);if(s)return new c.Binder(t,s,e,{urlParams:{limit:n}})},Yt={selector:"cds-table",init:function(t){const e=c.getSemanticAttributes(t),s=this,n=Xt(s,t);if((0,At.isDefAndNotNull)(n)){t.dataBinder=n;const o=Qt(t);t.skeleton=o;const r=Kt(n);t.pagination=r,t.after(r),n.fetchData().then(a=>{o.hide(),r.setData(n),ot(s,t,e)})}else ot(s,t,e)}},te=m.__exportAll({cdsPaginationNavWrap:()=>se,cdsPaginationWrap:()=>ee}),ee={selector:"cds-pagination",init:function(t){const e=this,s=customElements.get("cds-pagination");let n=null;e.listen(t,s.eventChangeCurrent,o=>{const r=o.detail.page,a=t.pageSize,i=(r-1)*a;i!==n&&(n=i,e.dispatchPanelEvent("pagination-changed-current",{detail:{page:r,pageSize:a,action:"page-change"}}))}),e.listen(t,s.eventPageSizeChanged,o=>{const r=t.pageSize;n=null,e.dispatchPanelEvent("pagination-changed-page-size",{detail:{page:1,pageSize:r,action:"page-size-change"}})})}},se={selector:"cds-pagination-nav",event:"cds-page-changed",getData:(t,e,s)=>({...e,page:t.detail.page,pageNumber:t.detail.page+1,totalItems:s.totalItems})},ne=m.__exportAll({cdsModalBodyContentWrap:()=>de,cdsModalBodyWrap:()=>le,cdsModalCloseButWrap:()=>ie,cdsModalFooterButWrap:()=>ue,cdsModalFooterWrap:()=>pe,cdsModalHeaderWrap:()=>re,cdsModalHeadingWrap:()=>ae,cdsModalLabelWrap:()=>ce,cdsModalWrap:()=>oe}),oe={selector:"cds-modal",init:function(t){const e=customElements.get("cds-modal"),s=c.getSemanticAttributes(t),n=c.getEventAttribute(t,"open-event","event");n&&this.listen(t,"cds-modal-beingopened",a=>{this.dispatchPanelEvent(n,{...s,action:"opened"})});const o=t.getAttribute("before-close-event");o&&this.listen(t,e.eventBeforeClose,a=>{this.dispatchPanelEvent(o,{...s,action:"closing",cancelable:!0})}),this.listen(t,e.eventClose,a=>{this.dispatchPanelEvent("destroy_me",{...s,action:"closed",triggeredBy:a.detail?.triggeredBy})});const r=c.getEventAttribute(t,"primary-event","event");r&&this.listen(t,"cds-modal-primary-focus",a=>{this.dispatchPanelEvent(r,{...s,action:"primary"})})}},re={selector:"cds-modal-header"},ae={selector:"cds-modal-heading"},ce={selector:"cds-modal-label"},ie={selector:"cds-modal-close-button"},le={selector:"cds-modal-body"},de={selector:"cds-modal-body-content"},pe={selector:"cds-modal-footer"},ue={selector:"cds-modal-footer-button",init:function(t){const e=c.getSemanticAttributes(t);if(t.getAttribute("type")==="submit"){this.listen(t,"click",n=>{let o=t.closest("form");if(!o){const r=t.getAttribute("form");r&&(o=document.getElementById(r))}o&&o.requestSubmit()});return}const s=e.event;s&&this.listen(t,"click",n=>{n.stopPropagation(),this.dispatchPanelEvent(s,e)})}},ve=m.__exportAll({cdsMenuButtonWrap:()=>ge,cdsMenuWrap:()=>me}),me={selector:"cds-menu",init:function(t){const e=c.getSemanticAttributes(t),s=c.getEventAttribute(t,"open-event");s&&this.listen(t,"cds-menu-opened",o=>{this.dispatchPanelEvent(s,{...e,action:"opened"})});const n=c.getEventAttribute(t,"close-event");n&&this.listen(t,"cds-menu-closed",o=>{this.dispatchPanelEvent(n,{...e,action:"closed"})}),this.listen(t,"click",o=>{if(o.target.tagName==="CDS-MENU-ITEM"){const r=c.getSemanticAttributes(o.target),a=r.event||e.event;a&&(o.stopPropagation(),this.dispatchPanelEvent(a,{...e,...r}))}}),this.listen(t,"cds-item-changed",o=>{const r=o.detail.triggeredBy,a=c.getSemanticAttributes(r),i=a.event||e.event;i&&this.dispatchPanelEvent(i,{...e,...a,action:"selection-changed"})})}},ge={selector:"cds-menu-button",init:function(t){const e=c.getSemanticAttributes(t),s=t.querySelector("cds-menu");s&&this.listen(s,"click",n=>{if(n.target.tagName==="CDS-MENU-ITEM"){const o=c.getSemanticAttributes(n.target),r=o.event||e.event;r&&(n.stopPropagation(),this.dispatchPanelEvent(r,{...e,...o}))}})}},fe=m.__exportAll({cdsButFabWrap:()=>We,cdsButtonWrap:()=>he,cdsComboButWrap:()=>Ae,cdsCopyButWrap:()=>ke,cdsIconButToggleWrap:()=>Se,cdsIconButWrap:()=>be}),he={selector:"cds-button",init:function(t){const e=c.getSemanticAttributes(t);if(t.getAttribute("type")==="submit"){this.listen(t,"click",n=>{let o=t.closest("form");if(!o){const r=t.getAttribute("form");r&&(o=document.getElementById(r))}o&&o.requestSubmit()});return}const s=e.event;s&&this.listen(t,"click",n=>{n.stopPropagation(),this.dispatchPanelEvent(s,c.getSemanticAttributes(t))})}},be={selector:"cds-icon-button:not([data-toggle])",event:"click",getData:(t,e)=>e},Se={selector:"cds-icon-button[data-toggle]",init:function(t){const e=c.getSemanticAttributes(t);e.event&&this.listen(t,"click",s=>{s.stopPropagation(),t.isSelected=!t.isSelected,this.dispatchPanelEvent(e.event,{...e,isOn:t.isSelected})})}},We={selector:"cds-button[data-fab]",event:"click",getData:(t,e)=>e},ke={selector:"cds-copy-button",init:function(t){const e=c.getSemanticAttributes(t),s=e.event;s&&this.listen(t,"click",o=>{o.stopPropagation(),this.dispatchPanelEvent(s,{...e,action:"copy"})});const n=t.getAttribute("success-event");if(n){const o=new MutationObserver(()=>{t.hasAttribute("feedback-shown")&&this.dispatchPanelEvent(n,{...e,action:"copied"})});o.observe(t,{attributes:!0,attributeFilter:["feedback-shown"]}),t._copyObserver=o}}},Ae={selector:"cds-combo-button",init:function(t){const e=c.getSemanticAttributes(t);e.event&&this.listen(t,"click",n=>{const o=n.composedPath(),r=o.some(i=>i.tagName==="CDS-MENU-ITEM"),a=o.some(i=>i.tagName==="CDS-ICON-BUTTON");!r&&!a&&(n.stopPropagation(),this.dispatchPanelEvent(e.event,{...e,action:"primary"}))});const s=t.querySelector("cds-menu");s&&this.listen(s,"click",n=>{if(n.target.tagName==="CDS-MENU-ITEM"){const o=c.getSemanticAttributes(n.target),r=o.event||c.getEventAttribute(t,"menu-event","event");r&&this.dispatchPanelEvent(r,{...e,...o,action:"menu-item"})}})}},Ee=m.__exportAll({cdsComboBoxWrap:()=>ye,cdsDropdownWrap:()=>Ie,cdsMultiSelectWrap:()=>Pe}),Ie={selector:"cds-dropdown",init:function(t){const e=customElements.get("cds-dropdown"),s=c.getSemanticAttributes(t),n=s.event;n&&this.listen(t,e.eventSelect,r=>{this.dispatchPanelEvent(n,{...s,value:t.value,selectedValue:r.detail?.item?.value,selectedText:r.detail?.item?.textContent?.trim()})});const o=t.getAttribute("toggle-event");o&&this.listen(t,e.eventToggle,r=>{this.dispatchPanelEvent(o,{...s,open:t.hasAttribute("open")})})}},ye={selector:"cds-combo-box",init:function(t){const e=customElements.get("cds-combo-box"),s=c.getSemanticAttributes(t),n=s.event;n&&this.listen(t,e.eventSelect,r=>{const a=r.detail?.item;this.dispatchPanelEvent(n,{...s,value:t.value,selectedValue:a?.value,selectedText:a?.textContent?.trim()})});const o=t.getAttribute("toggle-event");o&&this.listen(t,e.eventToggle,r=>{this.dispatchPanelEvent(o,{...s,open:t.hasAttribute("open")})})}},Pe={selector:"cds-multi-select",init:function(t){const e=customElements.get("cds-multi-select"),s=c.getSemanticAttributes(t),n=s.event;n&&this.listen(t,e.eventSelect,r=>{const a=t.value?t.value.split(","):[];this.dispatchPanelEvent(n,{...s,selectedItems:a})});const o=t.getAttribute("toggle-event");o&&this.listen(t,e.eventToggle,r=>{this.dispatchPanelEvent(o,{...s,open:t.hasAttribute("open")})})}},_e=m.__exportAll({cdsDatePickerWrap:()=>Ce,cdsTimePickerWrap:()=>xe}),Ce={selector:"cds-date-picker",init:function(t){const e=customElements.get("cds-date-picker"),s=c.getSemanticAttributes(t),n=t.querySelector('cds-date-picker-input[kind="from"]'),o=t.querySelector('cds-date-picker-input[kind="to"]'),r=n&&o,a=s.event;a&&this.listen(t,e.eventChange,p=>{let k;r?k={from:n.value||"",to:o.value||""}:k=t.value,this.dispatchPanelEvent(a,{...s,value:k})});const i=t.getAttribute("error-event");i&&this.listen(t,e.eventFlatpickrError,p=>{this.dispatchPanelEvent(i,{...s,error:p.detail})})}},xe={selector:"cds-time-picker",event:"cds-time-picker-changed",getData:(t,e,s)=>({...e,value:s.value})},we=m.__exportAll({cdsFileUploaderButtonWrap:()=>Be,cdsFileUploaderDropContainerWrap:()=>Fe,cdsFileUploaderWrap:()=>Te});function Et(t){customElements.whenDefined(t).then(e=>{if(!(!e||e.prototype.__zooyAcceptCasePatched)){if(typeof e.prototype._getFiles!="function"){console.warn(`[Zooy] ${t}._getFiles missing; accept case-insensitivity shim skipped (Carbon may have refactored).`);return}e.prototype._getFiles=function(s,n){if(n===void 0&&(n=(s.type==="drop"?s.dataTransfer:s.target)?.files),!this.accept||!/^(change|drop)$/.test(s.type))return Array.from(n??[]);const o=new Set(this.accept.toLowerCase().split(/[\s,]+/).filter(Boolean));return Array.prototype.filter.call(n??[],({name:r,type:a=""})=>{const i=r.match(/\.[^.]+$/),p=i?i[0].toLowerCase():void 0;return o.has(a.toLowerCase())||p&&o.has(p)})},e.prototype.__zooyAcceptCasePatched=!0}})}Et("cds-file-uploader-drop-container");Et("cds-file-uploader-button");function De(t){customElements.whenDefined(t).then(e=>{if(!e||e.prototype.__zooyDisabledGuardPatched)return;if(typeof e.selectorUploaderItem!="string"){console.warn(`[Zooy] ${t}.selectorUploaderItem missing; disabled null-guard shim skipped (Carbon may have refactored).`);return}const s=e.prototype.updated;e.prototype.updated=function(n){return n.has("disabled")&&!this.querySelector(this.constructor.selectorUploaderItem)&&(n=new Map(n),n.delete("disabled")),s.call(this,n)},e.prototype.__zooyDisabledGuardPatched=!0})}De("cds-file-uploader");var Te={selector:"cds-file-uploader",init:function(t){const e=c.getSemanticAttributes(t),s=e.event;if(s){const o=t.querySelector('input[type="file"]');o&&this.listen(o,"change",r=>{this.dispatchPanelEvent(s,{...e,files:Array.from(r.target.files||[])})})}const n=t.getAttribute("delete-event");n&&this.listen(t,"cds-file-uploader-item-deleted",o=>{this.dispatchPanelEvent(n,{...e,fileName:o.detail?.fileName,fileId:o.detail?.fileId})})}};function It(t,e){const s=new DataTransfer;for(const n of e)s.items.add(n);t.files=s.files,t.dispatchEvent(new Event("change",{bubbles:!0}))}function yt(t){const e=t.getAttribute("for");if(!e)return console.warn(`[Zooy] ${t.tagName.toLowerCase()} missing 'for' attribute; cannot bind to a form input.`,t),null;const s=t.ownerDocument.getElementById(e);return!s||s.tagName!=="INPUT"||s.type!=="file"?(console.warn(`[Zooy] 'for=${e}' did not resolve to an <input type="file">.`,t),null):s}var Be={selector:"cds-file-uploader-button",init:function(t){const e=yt(t),s=c.getSemanticAttributes(t),n=s.event;this.listen(t,"cds-file-uploader-button-changed",o=>{const r=o.detail?.addedFiles||[];e&&It(e,r),n&&this.dispatchPanelEvent(n,{...s,files:Array.from(r)})})}};function Ne(t,e,s,n){const o=t.querySelector(`[data-file-list-for="${e}"]`);if(o){o.replaceChildren();for(const r of s){const a=t.createElement("cds-file-uploader-item");a.setAttribute("state","edit"),a.textContent=r.name,a.addEventListener("cds-file-uploader-item-deleted",()=>{n(r.name)}),o.appendChild(a)}}}function Me(t,e){const s=new DataTransfer;for(const n of t.files)n.name!==e&&s.items.add(n);t.files=s.files,t.dispatchEvent(new Event("change",{bubbles:!0}))}var Fe={selector:"cds-file-uploader-drop-container",init:function(t){const e=yt(t),s=c.getSemanticAttributes(t),n=s.event,o=t.getAttribute("for"),r=()=>{if(!o||!e)return;const a=Array.from(e.files);Ne(t.ownerDocument,o,a,i=>{Me(e,i),r()}),t.multiple||(t.style.display=a.length>0?"none":"")};this.listen(t,"cds-file-uploader-drop-container-changed",a=>{const i=a.detail?.addedFiles||[],p=t.multiple?i:i.slice(0,1);e&&It(e,p),r(),n&&this.dispatchPanelEvent(n,{...s,files:Array.from(p)})})}},Le=m.__exportAll({cdsAccordionWrap:()=>Oe,cdsContentSwitcherWrap:()=>ze,cdsTabsVerticalWrap:()=>Re,cdsTabsWrap:()=>qe}),qe={selector:"cds-tabs",init:function(t){const e=customElements.get("cds-tabs"),s=c.getSemanticAttributes(t),n=t.getAttribute("before-select-event");n&&this.listen(t,e.eventBeforeSelect,r=>{this.dispatchPanelEvent(n,{...s,tabValue:r.detail.item?.getAttribute("value"),cancelable:!0})});const o=s.event;o&&this.listen(t,e.eventSelect,r=>{const a=r.detail.item,i=c.getSemanticAttributes(a);this.dispatchPanelEvent(o,{...s,...i,tabValue:a.getAttribute("value"),tabIndex:r.detail.index,tabText:r.detail.text})})}},Oe={selector:"cds-accordion",init:function(t){const e=customElements.get("cds-accordion-item"),s=c.getSemanticAttributes(t);[...t.querySelectorAll("cds-accordion-item")].forEach(n=>{const o=c.getSemanticAttributes(n),r=o.event||s.event;r&&this.listen(n,e.eventToggle,a=>{this.dispatchPanelEvent(r,{...s,...o,open:a.detail.open})})})}},ze={selector:"cds-content-switcher",init:function(t){const e=customElements.get("cds-content-switcher"),s=c.getSemanticAttributes(t),n=t.getAttribute("before-select-event");n&&this.listen(t,e.eventBeforeSelect,r=>{this.dispatchPanelEvent(n,{...s,value:r.detail.item?.getAttribute("value"),cancelable:!0})});const o=s.event;o&&this.listen(t,e.eventSelect,r=>{const a=r.detail.item,i=c.getSemanticAttributes(a);this.dispatchPanelEvent(o,{...s,...i,value:a.getAttribute("value")})})}},Re={selector:"cds-tabs-vertical"},Ue=m.__exportAll({cdsBreadCrumbWrap:()=>Ge,cdsBreadcrumbItemWrap:()=>He,cdsBreadcrumbLinkWrap:()=>$e}),He={selector:"cds-breadcrumb-item"},$e={selector:"cds-breadcrumb-link",event:"click",getData:(t,e,s)=>(t.preventDefault(),{...e,href:s.getAttribute("href")})},Ge={selector:"cds-breadcrumb",init:function(t){const e=this,s=c.getSemanticAttributes(t),n=s.event;if(n){const o=a=>{e.dispatchPanelEvent(n,{...s,...a})};e.listen(t,"click",a=>{const i=a.target.closest("cds-breadcrumb-link");if(i){a.preventDefault(),a.stopPropagation();const p=c.getSemanticAttributes(i);o(p)}});const r=t.querySelector("cds-overflow-menu-body");r&&e.listen(r,"cds-overflow-menu-item-clicked",a=>{a.stopPropagation();const i=c.getSemanticAttributes(a.target);o(i)})}}},je=m.__exportAll({cdsNumberInputWrap:()=>Je,cdsPasswordInputWrap:()=>Ke,cdsSearchWrap:()=>Qe,cdsTextAreaWrap:()=>Ze,cdsTextInputWrap:()=>Ve}),Ve={selector:"cds-text-input",multiEvent:!0,events:[{type:"input",attrName:"event",getData:(t,e)=>({...e,value:t.currentTarget.value})},{type:"change",attrName:"change-event",getData:(t,e)=>({...e,value:t.currentTarget.value})}]},Ze={selector:"cds-textarea",multiEvent:!0,events:[{type:"input",attrName:"event",getData:(t,e)=>({...e,value:t.currentTarget.value})},{type:"change",attrName:"change-event",getData:(t,e)=>({...e,value:t.currentTarget.value})}]},Je={selector:"cds-number-input",event:"cds-number-input",getData:(t,e,s)=>({...e,value:t.detail.value,direction:t.detail.direction})},Ke={selector:"cds-password-input",multiEvent:!0,events:[{type:"input",attrName:"event",getData:(t,e)=>({...e,value:t.currentTarget.value})},{type:"change",attrName:"change-event",getData:(t,e)=>({...e,value:t.currentTarget.value})}]},Qe={selector:"cds-search",event:"cds-search-input",getData:(t,e,s)=>({...e,value:s.value})},Xe=m.__exportAll({cdsCheckboxWrap:()=>Ye,cdsRadioButGroupWrap:()=>ts,cdsSelectWrap:()=>ss,cdsSliderWrap:()=>ns,cdsToggleWrap:()=>es}),Ye={selector:"cds-checkbox",event:"cds-checkbox-changed",getData:(t,e,s)=>({...e,checked:t.detail.checked,value:s.value})},ts={selector:"cds-radio-button-group",event:"cds-radio-button-group-changed",getData:(t,e)=>({...e,value:t.detail?.value})},es={selector:"cds-toggle",event:"cds-toggle-changed",getData:(t,e)=>({...e,isOn:t.detail.checked,value:t.detail.checked})},ss={selector:"cds-select",event:"cds-select-selected",getData:(t,e)=>({...e,value:t.detail.value})},ns={selector:"cds-slider",init:function(t){const e=c.getSemanticAttributes(t),s=e.event;s&&this.listen(t,"cds-slider-changed",o=>{this.dispatchPanelEvent(s,{...e,value:o.detail.value})});const n=t.getAttribute("input-event");n&&this.listen(t,"cds-slider-input-changed",o=>{this.dispatchPanelEvent(n,{...e,value:o.detail.value})})}},os=m.__exportAll({cdsOperationalTagWrap:()=>is,cdsSDismissibleTagWrap:()=>as,cdsSelectableTagWrap:()=>cs,cdsTagSkeletonWrap:()=>ls,cdsTagsWrap:()=>rs}),rs={selector:"cds-tag",event:"click",getData:(t,e)=>e},as={selector:"cds-dismissible-tag",init:function(t){const e=c.getSemanticAttributes(t),s=t.getAttribute("click-event");s&&this.listen(t,"click",o=>{o.target.closest("button")||this.dispatchPanelEvent(s,{...e})});const n=e.event;n&&this.listen(t,"cds-dismissible-tag-closed",o=>{this.dispatchPanelEvent(n,{...e,action:"closed"})})}},Pt=t=>function(e){const s=c.getSemanticAttributes(e),n=e.constructor,o=n.eventBeforeSelected||`${t}-beingselected`,r=n.eventSelected||`${t}-selected`,a=e.getAttribute("before-select-event");a&&this.listen(e,o,p=>{this.dispatchPanelEvent(a,{...s,selected:e.selected,text:e.text,action:"selecting",cancelable:!0})});const i=s.event;i&&this.listen(e,r,p=>{this.dispatchPanelEvent(i,{...s,selected:e.selected,text:e.text,action:e.selected?"selected":"deselected"})})},cs={selector:"cds-selectable-tag",init:Pt("cds-selectable-tag")},is={selector:"cds-operational-tag",init:Pt("cds-operational-tag")},ls={selector:"cds-tag-skeleton"},ds=m.__exportAll({cdsContainedListDescriptionWrap:()=>ms,cdsContainedListItemWrap:()=>gs,cdsContainedListWrap:()=>vs,cdsListItemWrap:()=>Ss,cdsOrderedListWrap:()=>bs,cdsOverflowMenuWrap:()=>ps,cdsStructuredListWrap:()=>us,cdsTreeViewWrap:()=>fs,cdsUnorderedListWrap:()=>hs}),ps={selector:"cds-overflow-menu",init:function(t){const e=c.getSemanticAttributes(t),s=e.event,n=t.querySelector("cds-overflow-menu-body");s&&n&&this.listen(n,"cds-overflow-menu-item-clicked",o=>{o.stopPropagation();const r=c.getSemanticAttributes(o.target);this.dispatchPanelEvent(s,{...e,...r})})}},us={selector:"cds-structured-list",init:function(t){const e=c.getSemanticAttributes(t);[...t.querySelectorAll("cds-structured-list-row")].forEach(s=>{const n=c.getSemanticAttributes(s),o=n.event||e.event;o&&this.listen(s,"click",r=>{r.stopPropagation(),this.dispatchPanelEvent(o,{...e,...n})})}),t.hasAttribute("selection")&&this.listen(t,"cds-structured-list-selected",s=>{const n=s.detail.row,o=c.getSemanticAttributes(n),r=e.event;r&&this.dispatchPanelEvent(r,{...e,...o})})}},vs={selector:"cds-contained-list"},ms={selector:"cds-contained-list-description"},gs={selector:"cds-contained-list-item",event:"cds-contained-list-item-click",getData:(t,e)=>e},fs={selector:"cds-tree-view",init:function(t){const e=c.getSemanticAttributes(t);this.listen(t,"cds-tree-node-selected",n=>{const o=n.detail.node,r=c.getSemanticAttributes(o),a=r.event||e.event;a&&this.dispatchPanelEvent(a,{...e,...r,nodeId:o.id,label:o.getAttribute("label")})});const s=c.getEventAttribute(t,"expand-event");s&&this.listen(t,"cds-tree-node-expanded",n=>{this.dispatchPanelEvent(s,{...e,nodeId:n.detail.node.id,expanded:n.detail.expanded})})}},hs={selector:"cds-unordered-list"},bs={selector:"cds-ordered-list"},Ss={selector:"cds-list-item"},Ws=m.__exportAll({cdsActionableNotificationWrap:()=>Es,cdsCalloutNotificationWrap:()=>Is,cdsInlineNotificationWrap:()=>As,cdsToastNotificationWrap:()=>ks}),ks={selector:"cds-toast-notification",event:"cds-notification-closed",getData:(t,e)=>({...e,action:"closed"})},As={selector:"cds-inline-notification",event:"cds-notification-closed",getData:(t,e)=>({...e,action:"closed"})},Es={selector:"cds-actionable-notification",init:function(t){const e=c.getSemanticAttributes(t),s=c.getEventAttribute(t,"close-event","event");s&&this.listen(t,"cds-notification-closed",o=>{this.dispatchPanelEvent(s,{...e,action:"closed"})});const n=c.getEventAttribute(t,"action-event");n&&this.listen(t,"cds-notification-actioned",o=>{this.dispatchPanelEvent(n,{...e,action:"actioned"})})}},Is={selector:"cds-callout-notification"},ys=m.__exportAll({cdsClickableTileWrap:()=>_s,cdsExpandableTileWrap:()=>Cs,cdsRadioTileWrap:()=>ws,cdsSelectableTileWrap:()=>xs,cdsTileGroupWrap:()=>Ds,cdsTileWrap:()=>Ps}),Ps={selector:"cds-tile"},_s={selector:"cds-clickable-tile",init:function(t){const e=c.getSemanticAttributes(t),s=e.event;if(s){const n=e.href||t.getAttribute("href")||"";t.removeAttribute("href"),t.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),this.dispatchPanelEvent(s,{...e,href:n})},!0)}}},Cs={selector:"cds-expandable-tile",init:function(t){const e=c.getSemanticAttributes(t),s=t.getAttribute("before-toggle-event");s&&this.listen(t,"cds-expandable-tile-beingtoggled",o=>{this.dispatchPanelEvent(s,{...e,expanded:o.detail.expanded,cancelable:!0})});const n=e.event;n&&this.listen(t,"cds-expandable-tile-toggled",o=>{this.dispatchPanelEvent(n,{...e,expanded:o.detail.expanded})})}},xs={selector:"cds-selectable-tile",event:"cds-selectable-tile-changed",getData:(t,e,s)=>({...e,selected:t.detail.selected,value:s.value})},ws={selector:"cds-radio-tile",event:"cds-radio-tile-selected",getData:(t,e,s)=>({...e,selected:t.detail.selected,name:t.detail.name,value:s.value})},Ds={selector:"cds-tile-group",init:function(t){const e=c.getSemanticAttributes(t),s=e.event;s&&(this.listen(t,"cds-current-radio-tile-selection",n=>{const o=n.detail.target;this.dispatchPanelEvent(s,{...e,value:o?.value,name:o?.name,selected:o?.selected})}),this.listen(t,"cds-current-selectable-tile-selections",n=>{const o=n.detail.currentSelections||[];this.dispatchPanelEvent(s,{...e,values:o.map(r=>r.value),names:o.map(r=>r.name),count:o.length})}))}},Ts=m.__exportAll({cdsInlineLoadingWrap:()=>Ms,cdsProgressBarWrap:()=>Bs,cdsProgressIndicatorWrap:()=>Ns}),Bs={selector:"cds-progress-bar",init:function(t){const e=c.getSemanticAttributes(t);if(e.event){const s=new MutationObserver(()=>{const n=parseFloat(t.getAttribute("value")||"0");n>=parseFloat(t.getAttribute("max")||"100")&&this.dispatchPanelEvent(e.event,{...e,value:n,status:"complete"})});s.observe(t,{attributes:!0,attributeFilter:["value"]}),t._progressObserver=s}}},Ns={selector:"cds-progress-indicator",init:function(t){const e=c.getSemanticAttributes(t);this.listen(t,"cds-progress-step-click",s=>{const n=s.target,o=c.getSemanticAttributes(n),r=o.event||e.event;r&&this.dispatchPanelEvent(r,{...e,...o,stepIndex:n.getAttribute("data-index"),stepLabel:n.getAttribute("label")})})}},Ms={selector:"cds-inline-loading",init:function(t){const e=c.getSemanticAttributes(t),s=e.event;s&&this.listen(t,"cds-inline-loading-onsuccess",o=>{this.dispatchPanelEvent(s,{...e,status:"finished"})});const n=t.getAttribute("status-event");if(n){const o=new MutationObserver(r=>{r.forEach(a=>{if(a.attributeName==="status"){const i=t.getAttribute("status");this.dispatchPanelEvent(n,{...e,status:i})}})});o.observe(t,{attributes:!0,attributeFilter:["status"]}),t._statusObserver=o}}},Fs=m.__exportAll({cdsDefinitionTooltipWrap:()=>zs,cdsPopoverWrap:()=>qs,cdsToggletipWrap:()=>Os,cdsTooltipWrap:()=>Ls}),Ls={selector:"cds-tooltip",init:function(t){const e=c.getSemanticAttributes(t),s=c.getEventAttribute(t,"open-event");s&&this.listen(t,"cds-tooltip-beingopened",o=>{this.dispatchPanelEvent(s,{...e,action:"opened"})});const n=c.getEventAttribute(t,"close-event");n&&this.listen(t,"cds-tooltip-closed",o=>{this.dispatchPanelEvent(n,{...e,action:"closed"})})}},qs={selector:"cds-popover",init:function(t){const e=c.getSemanticAttributes(t),s=c.getEventAttribute(t,"open-event");s&&this.listen(t,"cds-popover-beingopened",o=>{this.dispatchPanelEvent(s,{...e,action:"opened"})});const n=c.getEventAttribute(t,"close-event");n&&this.listen(t,"cds-popover-closed",o=>{this.dispatchPanelEvent(n,{...e,action:"closed"})})}},Os={selector:"cds-toggletip",init:function(t){const e=c.getSemanticAttributes(t);if(e.event){const s=new MutationObserver(n=>{n.forEach(o=>{if(o.attributeName==="open"){const r=t.hasAttribute("open");this.dispatchPanelEvent(e.event,{...e,action:r?"opened":"closed",open:r})}})});s.observe(t,{attributes:!0,attributeFilter:["open"]}),t._toggletipObserver=s}}},zs={selector:"cds-definition-tooltip"},Rs=m.__exportAll({cdsCodeSnipWrap:()=>Hs,cdsLinkWrap:()=>Us}),Us={selector:"cds-link",event:"click",getData:(t,e,s)=>({...e,href:s.getAttribute("href")})},Hs={selector:"cds-code-snippet",event:"cds-copy-button-clicked",getData:(t,e)=>({...e,action:"copied"})},$s=m.__exportAll({cdsBadgeIndicatorWrap:()=>Ys,cdsColumnHangWrap:()=>on,cdsColumnWrap:()=>nn,cdsFormGroupWrap:()=>Vs,cdsFormItemWrap:()=>js,cdsFormWrap:()=>Gs,cdsGridWrap:()=>sn,cdsHeadingWrap:()=>Js,cdsIconIndicatorWrap:()=>Xs,cdsIconWrap:()=>Qs,cdsLayerWrap:()=>en,cdsLoadingWrap:()=>tn,cdsSectionWrap:()=>Ks,cdsStackWrap:()=>Zs}),Gs={selector:"cds-form"},js={selector:"cds-form-item"},Vs={selector:"cds-form-group"},Zs={selector:"cds-stack"},Js={selector:"cds-heading"},Ks={selector:"cds-section"},Qs={selector:"cds-icon"},Xs={selector:"cds-icon-indicator"},Ys={selector:"cds-badge-indicator"},tn={selector:"cds-loading"},en={selector:"cds-layer"},sn={selector:"cds-grid"},nn={selector:"cds-column"},on={selector:"cds-column-hang"},rn=m.__exportAll({cdsAccordionItemSkeletonWrap:()=>pn,cdsAccordionSkeletonWrap:()=>dn,cdsBreadcrumbSkeletonWrap:()=>un,cdsButtonSkeletonWrap:()=>vn,cdsCheckboxSkeletonWrap:()=>mn,cdsCodeSnippetSkeletonWrap:()=>gn,cdsDatePickerInputSkeletonWrap:()=>hn,cdsDropdownSkeletonWrap:()=>bn,cdsFileUploaderSkeletonWrap:()=>Sn,cdsNumberInputSkeletonWrap:()=>Wn,cdsPasswordInputSkeletonWrap:()=>kn,cdsProgressIndicatorSkeletonWrap:()=>An,cdsProgressStepSkeletonWrap:()=>En,cdsRadioButtonSkeletonWrap:()=>In,cdsSearchSkeletonWrap:()=>yn,cdsSelectSkeletonWrap:()=>Pn,cdsSkeletonIconWrap:()=>ln,cdsSkeletonPlaceholderWrap:()=>cn,cdsSkeletonTextWrap:()=>an,cdsSliderSkeletonWrap:()=>_n,cdsStructuredListHeaderCellSkeletonWrap:()=>Cn,cdsTabSkeletonWrap:()=>wn,cdsTableSkeletonWrap:()=>fn,cdsTabsSkeletonWrap:()=>xn,cdsTextInputSkeletonWrap:()=>Dn,cdsTextareaSkeletonWrap:()=>Tn,cdsToggleSkeletonWrap:()=>Bn}),an={selector:"cds-skeleton-text"},cn={selector:"cds-skeleton-placeholder"},ln={selector:"cds-skeleton-icon"},dn={selector:"cds-accordion-skeleton"},pn={selector:"cds-accordion-item-skeleton"},un={selector:"cds-breadcrumb-skeleton"},vn={selector:"cds-button-skeleton"},mn={selector:"cds-checkbox-skeleton"},gn={selector:"cds-code-snippet-skeleton"},fn={selector:"cds-table-skeleton"},hn={selector:"cds-date-picker-input-skeleton"},bn={selector:"cds-dropdown-skeleton"},Sn={selector:"cds-file-uploader-skeleton"},Wn={selector:"cds-number-input-skeleton"},kn={selector:"cds-password-input-skeleton"},An={selector:"cds-progress-indicator-skeleton"},En={selector:"cds-progress-step-skeleton"},In={selector:"cds-radio-button-skeleton"},yn={selector:"cds-search-skeleton"},Pn={selector:"cds-select-skeleton"},_n={selector:"cds-slider-skeleton"},Cn={selector:"cds-structured-list-header-cell-skeleton"},xn={selector:"cds-tabs-skeleton"},wn={selector:"cds-tab-skeleton"},Dn={selector:"cds-text-input-skeleton"},Tn={selector:"cds-textarea-skeleton"},Bn={selector:"cds-toggle-skeleton"};function g(t){return Object.values(t).filter(e=>typeof e=="object"&&e!==null&&e.selector)}var Nn=[...g(te),...g(Jt),...g(ne),...g(ve),...g(fe),...g(Ee),...g(_e),...g(we),...g(Le),...g(Ue),...g(je),...g(Xe),...g(os),...g(ds),...g(Ws),...g(ys),...g(Ts),...g(Fs),...g(Rs),...g($s),...g(rn)];function Mn(){const t=new Map;return Nn.forEach(e=>{t.set(e.selector,e)}),t}var Z=()=>import("@carbon/web-components/es/components/accordion/index.js"),L=()=>import("@carbon/web-components/es/components/breadcrumb/index.js"),Fn=()=>import("@carbon/web-components/es/components/stack/index.js"),rt=()=>import("@carbon/web-components/es/components/structured-list/index.js"),J=()=>import("@carbon/web-components/es/components/contained-list/index.js"),D=()=>import("@carbon/web-components/es/components/tile/index.js"),Ln=()=>import("@carbon/web-components/es/components/tree-view/index.js"),qn=()=>import("@carbon/web-components/es/components/link/index.js"),q=()=>import("@carbon/web-components/es/components/tabs/index.js"),On=()=>import("@carbon/web-components/es/components/content-switcher/index.js"),at=()=>import("@carbon/web-components/es/components/menu/index.js"),zn=()=>import("@carbon/web-components/es/components/overflow-menu/index.js"),O=()=>import("@carbon/web-components/es/components/button/index.js"),ct=()=>import("@carbon/web-components/es/components/icon-button/index.js"),Rn=()=>import("@carbon/web-components/es/components/combo-button/index.js"),Un=()=>import("@carbon/web-components/es/components/copy-button/index.js"),it=()=>import("@carbon/web-components/es/components/checkbox/index.js"),lt=()=>import("@carbon/web-components/es/components/radio-button/index.js"),dt=()=>import("@carbon/web-components/es/components/toggle/index.js"),z=()=>import("@carbon/web-components/es/components/select/index.js"),pt=()=>import("@carbon/web-components/es/components/slider/index.js"),R=()=>import("@carbon/web-components/es/components/text-input/index.js"),ut=()=>import("@carbon/web-components/es/components/textarea/index.js"),vt=()=>import("@carbon/web-components/es/components/number-input/index.js"),mt=()=>import("@carbon/web-components/es/components/password-input/index.js"),K=()=>import("@carbon/web-components/es/components/search/index.js"),Hn=()=>import("@carbon/web-components/es/components/combo-box/index.js"),gt=()=>import("@carbon/web-components/es/components/dropdown/index.js"),$n=()=>import("@carbon/web-components/es/components/multi-select/index.js"),ft=()=>import("@carbon/web-components/es/components/date-picker/index.js"),Gn=()=>import("@carbon/web-components/es/components/time-picker/index.js"),M=()=>import("@carbon/web-components/es/components/file-uploader/index.js"),ht=()=>import("@carbon/web-components/es/components/form/index.js"),jn=()=>import("@carbon/web-components/es/components/form-group/index.js"),bt=()=>import("@carbon/web-components/es/components/data-table/index.js"),St=()=>import("@carbon/web-components/es/components/pagination/index.js"),Wt=()=>import("@carbon/web-components/es/components/code-snippet/index.js"),F=()=>import("@carbon/web-components/es/components/tag/index.js"),Vn=()=>import("@carbon/web-components/es/components/badge-indicator/index.js"),U=()=>import("@carbon/web-components/es/components/notification/index.js"),Zn=()=>import("@carbon/web-components/es/components/loading/index.js"),Jn=()=>import("@carbon/web-components/es/components/inline-loading/index.js"),Kn=()=>import("@carbon/web-components/es/components/progress-bar/index.js"),Q=()=>import("@carbon/web-components/es/components/progress-indicator/index.js"),Qn=()=>import("@carbon/web-components/es/components/skeleton-placeholder/index.js"),Xn=()=>import("@carbon/web-components/es/components/skeleton-text/index.js"),Yn=()=>import("@carbon/web-components/es/components/skeleton-icon/index.js"),X=()=>import("@carbon/web-components/es/components/list/index.js"),to=()=>import("@carbon/web-components/es/components/layer/index.js"),Y=()=>import("@carbon/web-components/es/components/grid/index.js"),eo=()=>import("@carbon/web-components/es/components/pagination-nav/index.js"),y=()=>import("@carbon/web-components/es/components/modal/index.js"),I=()=>import("@carbon/web-components/es/components/tooltip/index.js"),so=()=>import("@carbon/web-components/es/components/popover/index.js"),no=()=>import("@carbon/web-components/es/components/toggle-tip/index.js"),kt=()=>import("@carbon/web-components/es/components/heading/index.js"),oo=()=>import("@carbon/web-components/es/components/icon/index.js"),ro=()=>import("@carbon/web-components/es/components/icon-indicator/index.js"),$={"cds-table":[I,O,R,K,z,St,bt],"cds-pagination":[z,R,St],"cds-button":[I,O],"cds-icon-button:not([data-toggle])":[I,ct],"cds-icon-button[data-toggle]":[I,ct],"cds-button[data-fab]":[I,O],"cds-copy-button":[I,Un],"cds-combo-button":[I,Rn],"cds-checkbox":[it],"cds-radio-button-group":[lt],"cds-toggle":[dt],"cds-select":[z],"cds-slider":[pt],"cds-text-input":[R],"cds-textarea":[ut],"cds-number-input":[vt],"cds-password-input":[I,mt],"cds-search":[K],"cds-dropdown":[gt],"cds-combo-box":[Hn],"cds-multi-select":[$n],"cds-date-picker":[ft],"cds-time-picker":[Gn],"cds-file-uploader":[M],"cds-file-uploader-button":[M],"cds-file-uploader-drop-container":[M],"cds-file-uploader-item":[M],"cds-tabs":[q],"cds-accordion":[Z],"cds-content-switcher":[On],"cds-breadcrumb":[L],"cds-breadcrumb-item":[L],"cds-breadcrumb-link":[L],"cds-menu":[at],"cds-menu-button":[at],"cds-overflow-menu":[zn],"cds-structured-list":[rt],"cds-contained-list":[J],"cds-contained-list-item":[J],"cds-contained-list-description":[J],"cds-tree-view":[Ln],"cds-modal":[y],"cds-modal-header":[y],"cds-modal-heading":[y],"cds-modal-label":[y],"cds-modal-close-button":[y],"cds-modal-body":[y],"cds-modal-body-content":[y],"cds-modal-footer":[y],"cds-modal-footer-button":[y],"cds-toast-notification":[U],"cds-inline-notification":[U],"cds-actionable-notification":[U],"cds-tile":[D],"cds-tile-group":[D],"cds-clickable-tile":[D],"cds-expandable-tile":[D],"cds-selectable-tile":[D],"cds-radio-tile":[D],"cds-progress-bar":[Kn],"cds-progress-indicator":[Q],"cds-inline-loading":[Jn],"cds-tooltip":[I],"cds-popover":[so],"cds-toggletip":[no],"cds-tag":[F],"cds-dismissible-tag":[F],"cds-selectable-tag":[F],"cds-operational-tag":[F],"cds-tag-skeleton":[F],"cds-link":[qn],"cds-code-snippet":[Wt],"cds-form":[ht],"cds-form-item":[ht],"cds-form-group":[jn],"cds-stack":[Fn],"cds-heading":[kt],"cds-section":[kt],"cds-icon":[oo],"cds-icon-indicator":[ro],"cds-badge-indicator":[Vn],"cds-loading":[Zn],"cds-skeleton-text":[Xn],"cds-skeleton-placeholder":[Qn],"cds-skeleton-icon":[Yn],"cds-accordion-skeleton":[Z],"cds-accordion-item-skeleton":[Z],"cds-breadcrumb-skeleton":[L],"cds-button-skeleton":[O],"cds-checkbox-skeleton":[it],"cds-code-snippet-skeleton":[Wt],"cds-table-skeleton":[bt],"cds-date-picker-input-skeleton":[ft],"cds-dropdown-skeleton":[gt],"cds-file-uploader-skeleton":[M],"cds-number-input-skeleton":[vt],"cds-password-input-skeleton":[mt],"cds-progress-indicator-skeleton":[Q],"cds-progress-step-skeleton":[Q],"cds-radio-button-skeleton":[lt],"cds-search-skeleton":[K],"cds-select-skeleton":[z],"cds-slider-skeleton":[pt],"cds-structured-list-header-cell-skeleton":[rt],"cds-tabs-skeleton":[q],"cds-tab-skeleton":[q],"cds-text-input-skeleton":[R],"cds-textarea-skeleton":[ut],"cds-toggle-skeleton":[dt],"cds-callout-notification":[U],"cds-definition-tooltip":[I],"cds-tabs-vertical":[q],"cds-unordered-list":[X],"cds-ordered-list":[X],"cds-list-item":[X],"cds-layer":[to],"cds-grid":[Y],"cds-column":[Y],"cds-column-hang":[Y],"cds-pagination-nav":[eo]};function ao(t){const e=new Map;if(!t||!(t instanceof Element))return e;for(const n of Object.keys(H))e.set(n,[]);for(const[n]of Object.entries(H))t.matches(n)&&e.get(n).push(t);const s=t.querySelectorAll("*");for(const n of s)for(const[o]of Object.entries(H))n.matches(o)&&e.get(o).push(n);for(const[n,o]of e.entries())o.length===0&&e.delete(n);return e}function co(t){const e=new Set;for(const[s,n]of t.entries())n.length>0&&$[s]&&$[s].forEach(o=>e.add(o));return e}async function io(t,e){if(t.size===0)return;const s=Array.from(t).map(async n=>(e.has(n)||e.set(n,n()),e.get(n)));await Promise.all(s)}function lo(t,e){let s=0;for(const[n,o]of t.entries()){const r=H[n];o.forEach(a=>{if(r.init){r.init.call(e,a);return}if(r.multiEvent){const k=c.getSemanticAttributes(a);r.events.forEach(A=>{const x=c.getEventAttribute(a,A.attrName,"event");x&&e.listen(a,A.type,G=>{e.dispatchPanelEvent(x,A.getData(G,k,a))})});return}const i=c.getSemanticAttributes(a),p=i.event;p&&e.listen(a,r.event,k=>{k.stopPropagation();const A=r.getData(k,i,a),x=A._eventOverride||p;delete A._eventOverride,e.dispatchPanelEvent(x,A)})}),s+=o.length}return s}var H=Object.fromEntries(Mn()),po=async function(t,e){const s=ao(t);if(s.size===0){this.debugMe("[Carbon] No Carbon components found in panel");return}this.carbonComponents||(this.carbonComponents=new Map);for(const[r,a]of s.entries())this.carbonComponents.set(r,a);const n=co(s);if(n.size>0)try{await io(n,e)}catch(r){console.error("[Carbon] Failed to load some component modules:",r)}const o=lo(s,this);o>0&&this.debugMe(`[Carbon] Total components initialized: ${o}`)},uo=(t={})=>{const{preload:e=[]}=t,s=new Map;if(e.length>0){const n=e.filter(r=>$[r]?!0:(console.warn(`[Carbon] No import found for selector: ${r}`),!1)),o=n.flatMap(r=>$[r].map(a=>(s.has(a)||s.set(a,a()),s.get(a))));Promise.all(o).then(()=>console.debug(`[Carbon] Preloaded: ${n.join(", ")}`)).catch(r=>console.warn("[Carbon] Preload error:",r))}m.ComponentLibraryRegistry.register("carbon",{cache:s,render:async function(n,o){try{await po.call(this,n,o)}catch(r){console.error("[Carbon] Initialization error:",r)}},dispose:function(n){},config:{version:"2.0",description:"IBM Carbon Design System Web Components"}}),console.debug("[Zooy] Carbon Design System library registered")};exports.registerCarbonLibrary=uo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const M=require("./component-library-registry-
|
|
1
|
+
const M=require("./component-library-registry-BZI0_XM_.js"),l=require("./tree-utils-CExeKLzH.js");let u=require("badu"),i=require("material-components-web");i=M.__toESM(i,1);var D=function(r){[...r.querySelectorAll(".mdc-ripple-surface")].forEach(i.ripple.MDCRipple.attachTo)},E=function(r){[...r.querySelectorAll(".mdc-button")].forEach(o=>{i.ripple.MDCRipple.attachTo(o),this.listen(o,"click",n=>{const t=n.currentTarget,e=l.getElDataMap(t);this.dispatchPanelEvent(e.zv,Object.assign({orgEvt:n,trigger:t,href:t.href||e.href},e))})})},v=function(r){[...r.querySelectorAll(".mdc-fab")].forEach(o=>{i.ripple.MDCRipple.attachTo(o),this.listen(o,"click",n=>{n.stopPropagation();const t=n.currentTarget,e=l.getElDataMap(t);this.dispatchPanelEvent(e.zv,Object.assign({orgEvt:n,trigger:t,href:t.href||e.href},e))})})},b=function(r){[...r.querySelectorAll(".mdc-icon-button:not(.mdc-icon-toggle)")].forEach(o=>{const n=new i.ripple.MDCRipple(o);o.zComponent=n,n.unbounded=!0,this.listen(o,"click",t=>{const e=t.currentTarget,c=l.getElDataMap(e),s=c.zv;(0,u.isDefAndNotNull)(s)&&(t.stopPropagation(),this.dispatchPanelEvent(c.zv,Object.assign({orgEvt:t,trigger:e,href:e.href||c.href},c)))})})},y=function(r){[...r.querySelectorAll(".mdc-icon-toggle")].forEach(o=>{const n=o.ariaPressed==="true",t=new i.iconButton.MDCIconButtonToggle(o);t.on=n,o.zComponent=t,this.listen(o,"click",e=>e.stopPropagation()),this.listen(o,"MDCIconButtonToggle:change",e=>{e.stopPropagation();const c=e.currentTarget,s=e.detail.isOn,a=l.getElDataMap(c);this.dispatchPanelEvent(a.zv,Object.assign({orgEvt:e,trigger:c,href:c.href||a.href,isOn:s},a))})})},S=function(r){const o="mdc-checkbox__native-control";[...r.querySelectorAll(".mdc-data-table")].forEach(n=>{const t=new i.dataTable.MDCDataTable(n);t.selectedAllAcrossPages=!1,t.onSomeSelected=c=>{},t.onNoneSelected=c=>{},t.onAllSelected=c=>{},t.toggleSelectAcrossPages=()=>(t.selectedAllAcrossPages=!t.selectedAllAcrossPages,t.selectedAllAcrossPages),t.setSelectAcrossPages=c=>(t.selectedAllAcrossPages=c,t.selectedAllAcrossPages),t.getSelectAcrossPages=()=>t.selectedAllAcrossPages,n.zComponent=t,n.dataTable=t;const e=c=>{const s=t.getSelectedRowIds().length;c.type==="MDCDataTable:selectedAll"?t.onAllSelected(s):s===0?t.onNoneSelected(s):t.onSomeSelected(s)};["MDCDataTable:rowSelectionChanged","MDCDataTable:selectedAll","MDCDataTable:unselectedAll"].forEach(c=>{this.listen(n,c,e)}),[...n.querySelectorAll(".mdc-data-table__row")].forEach(c=>{this.listen(c,"click",s=>{if(!s.target.classList.contains(o)){s.stopPropagation();const a=s.currentTarget,d=l.getElDataMap(a);this.dispatchPanelEvent(d.zv,Object.assign({orgEvt:s,trigger:a,href:a.href||d.href},d))}})})})},w=function(r){[...r.querySelectorAll(".mdc-tab-bar")].forEach(o=>{const n=new i.tabBar.MDCTabBar(o);o.zComponent=n,this.listen(o,"MDCTabBar:activated",t=>{const e=n.tabList[t.detail.index].root,c=l.getElDataMap(e);this.dispatchPanelEvent(c.zv,Object.assign({orgEvt:t,trigger:e,href:e.href||c.href},c))})})},A=function(r){[...r.querySelectorAll(".mdc-switch")].forEach(o=>{const n=o.querySelector("input"),t=l.getElDataMap(n);this.listen(n,"change",e=>{e.stopPropagation(),this.dispatchPanelEvent(t.zv,Object.assign({orgEvt:e,trigger:n,href:n.href||t.href,isOn:n.checked},t))})})},T=function(r){[...r.querySelectorAll(".mdc-chip-set")].forEach(o=>{const n=i.chips.MDCChipSet.attachTo(o);o.zComponent=n,n.listen("MDCChip:interaction",t=>{const e=n.chips.find(a=>a.id===t.detail.chipId),c=e.root,s=l.getElDataMap(c);this.dispatchPanelEvent(s.zv,Object.assign({orgEvt:t,trigger:c,href:c.href||s.href,isOn:e.selected},s))})})},P=function(r){[...r.querySelectorAll(".mdc-menu-surface")].forEach(i.menuSurface.MDCMenuSurface.attachTo)},q=function(r){[...r.querySelectorAll(".mdc-menu-surface--anchor:not(.mdc-select__menu)")].forEach(o=>{const n=o.querySelector(".mdc-menu"),t=l.getElDataMap(n).corner||"BOTTOM_START",e=new i.menu.MDCMenu(n);if(n.zComponent=e,e.setAnchorCorner(i.menuSurface.Corner[t]),e.items.forEach(i.ripple.MDCRipple.attachTo),e.quickOpen=!1,e.listen("click",c=>c.stopPropagation()),e.listen("MDCMenu:selected",c=>{c.stopPropagation();const s=c.detail.item,a=l.getElDataMap(s);this.dispatchPanelEvent(a.zv,Object.assign({orgEvt:c,trigger:s,href:s.href||a.href},a))}),o.addEventListener("click",()=>e.open=!e.open),n.classList.contains("z2-filter-on-keydown")){const c=()=>{a="",e.items.forEach(h=>h.classList.remove("hidden-list-itme"))},s=[...e.items].map(h=>(0,u.toLowerCase)(h.querySelector(".mdc-deprecated-list-item__text").textContent));let a="";const d="abcdefghijklmnopqrstuvwxyz0123456789 -_",g=h=>{const f=(0,u.toLowerCase)(h.key);h.defaultPrevented||(d.includes(f)?a=`${a}${f}`:f==="escape"?c():f==="backspace"&&(a=a.slice(0,-1)),a!==""&&s.forEach((C,m)=>{C.includes(a)?e.items[m].classList.remove("hidden-list-itme"):e.items[m].classList.add("hidden-list-itme")}))};e.listen("MDCMenuSurface:closed",()=>{c(),document.removeEventListener("keydown",g,!0)}),e.listen("MDCMenuSurface:opened",()=>{c(),document.addEventListener("keydown",g,!0)})}})},_=function(r){[...r.querySelectorAll(".mdc-deprecated-list:not(.mdc-menu__items)")].forEach(o=>{const n=new i.list.MDCList(o);o.zComponent=n,(0,u.isDefAndNotNull)(o.id)&&this.listMap.set(o.id,n),n.listElements.forEach(t=>i.ripple.MDCRipple.attachTo(t)),this.listen(o,"click",t=>{const e=t.target.closest("li"),c=l.getElDataMap(e);this.dispatchPanelEvent(c.zv,Object.assign({orgEvt:t,trigger:e,href:e.href||c.href},c))})})},x=function(r){[...r.querySelectorAll(".mdc-slider")].forEach(o=>{const n=new i.slider.MDCSlider(o);o.zComponent=n;const t=l.getElDataMap(o),e=o.parentElement.querySelector(`#${t.inputid}`);this.listen(o,"MDCSlider:change",()=>{e.value=n.value})})},k=function(r){[...r.querySelectorAll(".mdc-linear-progress")].forEach(o=>{o.linProg=i.linearProgress.MDCLinearProgress.attachTo(o)})},L=function(r){[...r.querySelectorAll(".mdc-text-field")].forEach(i.textField.MDCTextField.attachTo)},O=function(r){[...r.querySelectorAll(".mdc-text-field-icon")].forEach(i.textField.MDCTextFieldIcon.attachTo)},z=function(r,o){const n=e=>{const c=document.createElement("li");c.classList.add("mdc-deprecated-list-item"),c.dataset.value=e.value;const s=document.createElement("span");s.classList.add("mdc-deprecated-list-item__ripple"),c.appendChild(s);const a=document.createElement("span");return a.classList.add("mdc-deprecated-list-item__text"),a.textContent=e.textContent,c.appendChild(a),e.selected&&c.classList.add("mdc-deprecated-list-item--selected"),c},t=(e,c,s)=>()=>{for(;e.firstChild;)e.removeChild(e.lastChild);[...c.options].forEach(a=>e.appendChild(n(a))),s.layoutOptions();try{s.selectedIndex=c.options.selectedIndex}catch(a){console.error("MDC Select index sync error:",{targetIndex:c.options.selectedIndex,htmSelectField:c,mdcSelect:s,currentIndex:s.selectedIndex,error:a})}};[...r.querySelectorAll(".mdc-select")].forEach(e=>{const c=e.querySelector("ul.mdc-deprecated-list"),s=e.querySelector("select"),a=new i.select.MDCSelect(e);e.zComponent=a,s.buildMenu=t(c,s,a),s.buildMenu();const d=a.menu;o.hoist(d.menuSurface.root),d.setIsHoisted(!0),a.listen("MDCSelect:change",()=>{s.options[a.selectedIndex].selected=!0,s.dispatchEvent(new Event("custom:select:change"))})})},F=function(r){[...r.querySelectorAll(".mdc-form-field:not(.for-radio):not(.for-checkbox)")].forEach(i.formField.MDCFormField.attachTo)},I=function(r){[...r.querySelectorAll(".mdc-form-field.for-radio")].forEach(o=>{const n=new i.formField.MDCFormField(o),t=o.querySelector(".mdc-radio");t.querySelector('input[type="radio"]').classList.add("mdc-radio__native-control"),n.input=new i.radio.MDCRadio(t)})},B=function(r){[...r.querySelectorAll(".mdc-form-field.for-checkbox")].forEach(o=>{const n=o.querySelector(".mdc-checkbox"),t=new i.checkbox.MDCCheckbox(n),e=new i.formField.MDCFormField(o);e.input=t})},p=null;function j(){return p||((0,u.isDefAndNotNull)(window.mdc)&&Object.prototype.hasOwnProperty.call(window.mdc,"autoInit")?(p=Promise.resolve(),p):(p=new Promise((r,o)=>{const n=window.__MDC_CDN_URL__||"https://unpkg.com/material-components-web@14.0.0/dist/material-components-web.min.js",t=document.createElement("script");t.src=n,t.async=!0,t.onload=()=>{(0,u.isDefAndNotNull)(window.mdc)&&Object.prototype.hasOwnProperty.call(window.mdc,"autoInit")?r():o(new Error("MDC library loaded but window.mdc is not available"))},t.onerror=()=>{o(new Error(`Failed to load MDC library from ${n}`))},document.head.appendChild(t)}),p))}async function R(){await j(),M.ComponentLibraryRegistry.register("mdc",{render:function(r,o){(0,u.isDefAndNotNull)(window.mdc)&&Object.prototype.hasOwnProperty.call(window.mdc,"autoInit")&&(D.call(this,r),E.call(this,r),v.call(this,r),b.call(this,r),y.call(this,r),w.call(this,r),A.call(this,r),T.call(this,r),P.call(this,r),q.call(this,r),_.call(this,r),x.call(this,r),k.call(this,r),F.call(this,r),z.call(this,r,this),O.call(this,r),L.call(this,r),I.call(this,r),B.call(this,r),S.call(this,r))},dispose:function(r){[...r.querySelectorAll("[data-mdc-auto-init]")].forEach(o=>{try{o[o.getAttribute("data-mdc-auto-init")].destroy()}catch{}})},config:{version:"1.0",description:"Google Material Design Components (legacy, being phased out)"},utils:l.tree_utils_exports}),console.debug("[Zooy] MDC library registered")}exports.registerMdcLibrary=R;
|