@arbocollab/arbo-plugin-item-table 0.0.1-alpha.17 → 0.0.1-alpha.18
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/lib/es/index.es.js +12 -2
- package/lib/umd/index.umd.js +2 -2
- package/package.json +1 -1
package/lib/es/index.es.js
CHANGED
|
@@ -30808,6 +30808,14 @@ const f7 = {
|
|
|
30808
30808
|
axiosService: {
|
|
30809
30809
|
type: Object,
|
|
30810
30810
|
default: void 0
|
|
30811
|
+
},
|
|
30812
|
+
isSearching: {
|
|
30813
|
+
type: Boolean,
|
|
30814
|
+
default: !1
|
|
30815
|
+
},
|
|
30816
|
+
isFiltering: {
|
|
30817
|
+
type: Boolean,
|
|
30818
|
+
default: !1
|
|
30811
30819
|
}
|
|
30812
30820
|
}, p7 = /* @__PURE__ */ lt({
|
|
30813
30821
|
name: "AgGridVue3CellWrapper",
|
|
@@ -30850,7 +30858,9 @@ function x1(e) {
|
|
|
30850
30858
|
workspaceId: n.context.workspaceId,
|
|
30851
30859
|
entityId: n.context.entityId,
|
|
30852
30860
|
axiosService: s,
|
|
30853
|
-
tooltip: n.tooltip ?? void 0
|
|
30861
|
+
tooltip: n.tooltip ?? void 0,
|
|
30862
|
+
isSearching: n.isSearching ?? !1,
|
|
30863
|
+
isNoData: n.isNoData ?? !1
|
|
30854
30864
|
};
|
|
30855
30865
|
this.vNode = be(p7, r), WS(this.vNode, this.container);
|
|
30856
30866
|
const a = performance.now() - i;
|
|
@@ -73015,7 +73025,7 @@ const Dfe = `<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="
|
|
|
73015
73025
|
itemSearchBox: Afe
|
|
73016
73026
|
}, kfe = {
|
|
73017
73027
|
$style: Ife
|
|
73018
|
-
}, Ofe = /* @__PURE__ */ St(Ffe, [["__cssModules", kfe]]), Mfe = "0.0.1-alpha.
|
|
73028
|
+
}, Ofe = /* @__PURE__ */ St(Ffe, [["__cssModules", kfe]]), Mfe = "0.0.1-alpha.18", Lfe = { key: 0 }, Nfe = /* @__PURE__ */ lt({
|
|
73019
73029
|
__name: "app",
|
|
73020
73030
|
setup(e) {
|
|
73021
73031
|
const t = W(() => n.id.length === 0 || n.workspaceId.length === 0), n = so({
|
package/lib/umd/index.umd.js
CHANGED
|
@@ -85,7 +85,7 @@ Only state can be modified.`);r[0]="$state",Ml=!1,i.set(o,r,i.state.value),Ml=!0
|
|
|
85
85
|
state: () => new MyClass()
|
|
86
86
|
Found in store "${x.$id}".`),g&&o&&n.hydrate&&n.hydrate(x.$state,g),u=!0,c=!0,x}/*! #__NO_SIDE_EFFECTS__ */function c_(e,t,n){let i;const s=typeof t=="function";i=s?n:t;function o(r,a){const l=em();if(r=(I.env.NODE_ENV==="test"&&ha&&ha._testing?null:r)||(l?Ri(xf,null):null),r&&Nc(r),I.env.NODE_ENV!=="production"&&!ha)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
87
87
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
88
|
-
This will fail in production.`);r=ha,r._s.has(e)||(s?xC(e,t,i,r):u_(e,i,r),I.env.NODE_ENV!=="production"&&(o._pinia=r));const u=r._s.get(e);if(I.env.NODE_ENV!=="production"&&a){const c="__hot:"+e,d=s?xC(c,t,i,r,!0):u_(c,Qi({},i),r,!0);a._hotUpdate(d),delete r.state.value[c],r._s.delete(c)}if(I.env.NODE_ENV!=="production"&&_o){const c=Ti();if(c&&c.proxy&&!a){const d=c.proxy,h="_pStores"in d?d._pStores:d._pStores={};h[e]=u}}return u}return o.$id=e,o}function _C(e){const t=gt(e),n={};for(const i in t){const s=t[i];s.effect?n[i]=W({get:()=>e[i],set(o){e[i]=o}}):(Ht(s)||Hi(s))&&(n[i]=Zo(e,i))}return n}const gj={list:{success:void 0,error:void 0},list_cursor:{success:void 0,error:"Failed to fetch items."},assignedUser:{success:void 0,error:"Failed to fetch assigned users."},metricValues:{success:void 0,error:"Failed to fetch metric values."},assignableUser:{success:void 0,error:"Failed to fetch assignable users."},assignableStatus:{success:void 0,error:"Failed to fetch assignable statuses."},item:{success:"Item updated successfully.",error:"Failed to fetch item."},delete_item:{success:"Item deleted successfully.",error:"Failed to delete item."},delete_rendition:{success:"Rendition deleted successfully.",error:"Failed to delete rendition."},archive_item:{success:"Item archived successfully.",error:"Failed to archive item."},bulkUpdate:{success:"Items updated successfully.",error:"Failed to update items."},assigneeReplace:{success:"Assignees replaced successfully.",error:"Failed to replace assignees."},unAssignAll:{success:"All assignees removed successfully.",error:"Failed to remove all assignees."},removeAssignee:{success:"Assignee removed successfully.",error:"Failed to remove assignee."},createNewScene:{success:"New scene created successfully.",error:"Failed to create new scene."},metricList:{success:void 0,error:"Failed to fetch metrics."},basicInfor:{success:void 0,error:"Failed to fetch basic information."},multipleAssignableUser:{success:void 0,error:"Failed to fetch multiple assignable users."},bulkDelete:{success:"Items deleted successfully.",error:"Failed to delete items."},bulkArchive:{success:"Items archived successfully.",error:"Failed to archive items."}},Vc=c_("toast",()=>{const e=oe([]),t=(s,o)=>{const r=gj[s];if(r){const a=r[o];if(a){n({id:s,type:o,message:a});return}}},n=(s,o=5e3)=>{const r={...s,id:s.id??Date.now()+Math.random()};e.value.push(r),setTimeout(()=>{i(r.id)},o)};function i(s){e.value=e.value.filter(o=>o.id!==s)}return{notifications:e,addNotification:n,removeNotification:i,showMessage:t}}),mj=["innerHTML"],vj=St(at({__name:"Snackbar",setup(e){const t=CN,n=Vc(),{removeNotification:i}=n,{notifications:s}=_C(n),o=r=>r.trim().startsWith("<svg");return(r,a)=>(K(),Qe(tN,{name:"list",tag:"div",class:U(r.$style["notification-wrapper"])},{default:xe(()=>[(K(!0),Ce(At,null,wn(Z(s),l=>{var u;return rt((K(),Ce("div",{key:l.id,class:U([r.$style["notification-item"],r.$style[`notification--${l.type||"info"}`],!(l!=null&&l.actions)||((u=l==null?void 0:l.actions)==null?void 0:u.length)==0?r.$style["snackbar-type"]:""])},[me("p",{class:U(r.$style.snackbar__message)},[l.icon&&!o(l.icon)?(K(),Qe(ut,{key:0,src:l.icon,source:"remote"},null,8,["src"])):ot("",!0),l.icon&&o(l.icon)?(K(),Ce("i",{key:1,class:U(r.$style["icon-draw"]),innerHTML:l.icon},null,10,mj)):ot("",!0),yt(" "+pt(l.message),1)],2),l.actions?(K(),Ce("div",{key:0,class:U(r.$style["actions-notification"])},[(K(!0),Ce(At,null,wn(l.actions,c=>(K(),Qe(wt,gn({key:c.label},{ref_for:!0},c,{onClick:c.action}),{prefix:xe(()=>[c.btnIcon?(K(),Qe(ut,{key:0,src:c.btnIcon,source:"remote",color:"white"},null,8,["src"])):ot("",!0)]),_:2},1040,["onClick"]))),128))],2)):ot("",!0),be(wt,{variant:"tertiary",onClick:c=>Z(i)(l.id),class:U(r.$style["close-btn"]),size:18},{default:xe(()=>[be(ut,{src:"Xmark",color:"var(--icon-color)"})]),_:1},8,["onClick","class"])],2)),[[Z(t)]])}),128))]),_:1},8,["class"]))}}),[["__cssModules",{$style:{"notification-wrapper":"_notification-wrapper_1oslg_1","notification-item":"_notification-item_1oslg_16","notification--success":"_notification--success_1oslg_30","notification--error":"_notification--error_1oslg_33","close-btn":"_close-btn_1oslg_37","notification--info":"_notification--info_1oslg_40","notification--warning":"_notification--warning_1oslg_47","notification--interactive":"_notification--interactive_1oslg_54","snackbar-type":"_snackbar-type_1oslg_60",snackbar__message:"_snackbar__message_1oslg_68","actions-notification":"_actions-notification_1oslg_81"}}]]),Cj=["draggable","onDragstart","onDragenter","onDragleave","onDrop","onFocus"],yj=St(at({__name:"DragDropList",props:{modelValue:{default:()=>[]},value:{default:void 0},groupName:{default:"default"},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1}},emits:["update","update:modelValue","input"],setup(e,{emit:t}){const n=e,i=t,s=oe([]),o=oe(null),r=oe(null),a=oe(null),l=oe(0),u=W(()=>n.value!==void 0?n.value:n.modelValue);vt(u,S=>{s.value=[...S]},{immediate:!0});const c=(S,y)=>{var E;if(n.disabled||n.readOnly||(E=s.value[y])!=null&&E.required){S.preventDefault();return}r.value=y,S.dataTransfer&&(S.dataTransfer.effectAllowed="move",S.dataTransfer.setData("text/plain",y.toString()),S.dataTransfer.setData("application/json",JSON.stringify({index:y,groupName:n.groupName}))),setTimeout(()=>{const F=S.target;F==null||F.classList.add("drag-item--dragging")},0)},d=S=>{r.value=null,a.value=null,l.value=0;const y=S.target;y==null||y.classList.remove("drag-item--dragging")},h=(S,y)=>{n.disabled||n.readOnly||(S.preventDefault(),!(r.value===null||r.value===y)&&(l.value++,a.value=y))},p=(S,y)=>{l.value--,l.value===0&&(a.value=null)},g=S=>{n.disabled||n.readOnly||(S.preventDefault(),S.dataTransfer&&(S.dataTransfer.dropEffect="move"))},C=(S,y)=>{if(n.disabled||n.readOnly)return;S.preventDefault(),S.stopPropagation();const E=r.value;if(E===null||E===y){b();return}const F=[...s.value],[x]=F.splice(E,1);F.splice(y,0,x),s.value=F,R(F),b()},v=S=>{S.preventDefault(),b()},b=()=>{r.value=null,a.value=null,l.value=0},R=S=>{i("update",S,n.groupName),i("update:modelValue",S),i("input",S)};return(S,y)=>(K(),Ce("div",{class:U([S.$style["drag-drop-container"],{[S.$style["is-disabled"]]:n.disabled,[S.$style["is-readonly"]]:n.readOnly}]),onDragover:Ut(g,["prevent"]),onDrop:Ut(v,["prevent"])},[(K(!0),Ce(At,null,wn(s.value,(E,F)=>(K(),Ce("div",{key:E.id||F,class:U({[S.$style["drag-item"]]:!0,[S.$style["drag-item--focused"]]:o.value===F,[S.$style["drag-item--dragging"]]:r.value===F,[S.$style["drag-item--over"]]:a.value===F,[S.$style["drag-item--disabled"]]:E.required}),draggable:!n.disabled&&!n.readOnly,tabindex:"0",onDragstart:x=>c(x,F),onDragend:d,onDragenter:Ut(x=>h(x,F),["prevent"]),onDragleave:x=>p(),onDragover:Ut(g,["prevent"]),onDrop:Ut(x=>C(x,F),["prevent"]),onFocus:x=>o.value=F,onBlur:y[0]||(y[0]=x=>o.value=null)},[mt(S.$slots,"item",{item:E,index:F},()=>[E.required?ot("",!0):(K(),Ce("span",{key:0,class:U(S.$style["drag-handle"]),"aria-hidden":"true"}," :: ",2)),me("div",{class:U(S.$style["draggable-item"])},pt(E.name),3)])],42,Cj))),128))],34))}}),[["__cssModules",{$style:{"drag-drop-container":"_drag-drop-container_fuk6u_1","is-disabled":"_is-disabled_fuk6u_7","is-readonly":"_is-readonly_fuk6u_11","drag-item":"_drag-item_fuk6u_15","drag-item--dragging":"_drag-item--dragging_fuk6u_23","drag-item--over":"_drag-item--over_fuk6u_30"}}]]),PC=St(at({__name:"DragDropItem",props:{item:{},disabled:{type:Boolean},readOnly:{type:Boolean},columnStates:{}},emits:["toggle-column"],setup(e,{emit:t}){const n=mn,i=e,s=oe(!1),o=oe(i.columnStates[String(i.item.field)]||!1),r=t,a=W(()=>{var l,u;return(u=(l=i.item)==null?void 0:l.field)==null?void 0:u.includes("metric")});return vt(()=>o.value,()=>{r("toggle-column",i.item.field,i.item.required)}),(l,u)=>(K(),Ce("div",{key:e.item.field,class:U([l.$style["column-config__item"],{[l.$style.disabled]:e.disabled||i.readOnly}])},[be(uT,{id:`col-${e.item.field}`,modelValue:o.value,"onUpdate:modelValue":u[0]||(u[0]=c=>o.value=c),disabled:e.disabled},null,8,["id","modelValue","disabled"]),be(ut,{color:e.disabled?"var(--disabled-color)":"var(--primary-color)",source:"remote",src:"GripVertical",class:U(l.$style.handler)},null,8,["color","class"]),rt((K(),Ce("span",{class:U(l.$style["column-config__item-label"])},[yt(pt(e.item.headerName),1)],2)),[[Z(n),{content:e.item.headerName}]]),a.value?rt((K(),Ce("div",{key:0,class:U(l.$style.badge),onHover:u[1]||(u[1]=c=>s.value=!0)},[...u[2]||(u[2]=[yt(" M ",-1)])],34)),[[Z(n),"Metric"]]):ot("",!0)],2))}}),[["__cssModules",{$style:{"column-config__item":"_column-config__item_48o5h_1",disabled:"_disabled_48o5h_13",readOnly:"_readOnly_48o5h_17","column-config__item--pinned":"_column-config__item--pinned_48o5h_20",handler:"_handler_48o5h_27",badge:"_badge_48o5h_31","column-config__item-label":"_column-config__item-label_48o5h_45"}}]]),wj=St(at({__name:"TableCustomization",props:{modelValue:{},readOnly:{type:Boolean},disabled:{type:Boolean},checkboxColumn:{}},emits:["update:modelValue","input"],setup(e,{emit:t}){const n=mn,i=e,s=t,o=oe(""),r=oe([]),a=oe({}),{triggerRef:l,popupRef:u}=vs({placement:"bottom-end",trigger:"click"}),c=W(()=>r.value.filter(S=>S.pinned==="left"&&S.field&&S.headerName)),d=W(()=>r.value.filter(S=>S.pinned==="right"&&S.field||S.field==="blank")),h=W({get:()=>r.value.filter(S=>!S.pinned&&S.field&&S.field!=="blank"),set:S=>{r.value=[...c.value,...S,...d.value]}}),p=W(()=>{if(!o.value)return{};const S=o.value.toLowerCase();return[...r.value,...h.value].reduce((y,E)=>{var F;return(F=E.headerName)!=null&&F.toLowerCase().includes(S)&&E.field&&(y[E.field]=!0),y},{})}),g=W(()=>i.modelValue),C=()=>{const S={};r.value.forEach(y=>{y.field&&(S[y.field]=!y.hide)}),a.value=S},v=()=>{const S=r.value.map(y=>({...y,hide:y.field?!a.value[y.field]:!1}));s("update:modelValue",S),s("input",S)},b=S=>{const y=[...c.value,...S,...d.value];i.checkboxColumn&&y.unshift(i.checkboxColumn),r.value=y,v()},R=(S,y)=>{!y&&S&&(a.value[S]=!a.value[S],v())};return vt(g,S=>{S&&S.length>0&&(r.value=[...S],C())},{immediate:!0}),(S,y)=>(K(),Ce("div",{class:U(S.$style["table-customization"])},[me("div",{ref_key:"triggerRef",ref:l},[mt(S.$slots,"trigger",{},()=>[rt((K(),Qe(wt,{variant:["secondary"],disabled:i.disabled},{prefix:xe(()=>[be(ut,{src:"Gear"})]),default:xe(()=>[y[2]||(y[2]=yt(" Customise ",-1))]),_:1},8,["disabled"])),[[Z(n),"Customise table columns"]])])],512),me("div",{ref_key:"popupRef",ref:u,class:U(S.$style["tippy-content-wrapper"])},[me("div",{class:U(S.$style["column-config"])},[be(Yv,{modelValue:o.value,"onUpdate:modelValue":y[0]||(y[0]=E=>o.value=E)},null,8,["modelValue"]),me("div",{class:U(S.$style["column-config__header"])},[...y[3]||(y[3]=[me("label",null,"Manage columns",-1)])],2),Object.entries(p.value).length===0&&o.value.length>0?(K(),Ce("div",{key:0,class:U(S.$style["no-columns"])},[...y[4]||(y[4]=[yt(" No results. ",-1),me("br",null,null,-1),yt(" Try another search. ",-1)])],2)):ot("",!0),me("div",{class:U(S.$style["column-config__list"])},[c.value.length>0?(K(),Ce("div",{key:0,class:U(S.$style["column-config__pinned-section"])},[(K(!0),Ce(At,null,wn(c.value,E=>rt((K(),Qe(PC,{key:E.field,item:E,disabled:!1,readOnly:!0,columnStates:a.value},null,8,["item","columnStates"])),[[Jr,p.value[E.field]||!o.value]])),128))],2)):ot("",!0),be(yj,{modelValue:h.value,"onUpdate:modelValue":y[1]||(y[1]=E=>h.value=E),"group-name":"columns",onUpdate:b,disabled:i.disabled,readOnly:i.readOnly},{item:xe(({item:E})=>[rt(be(PC,{item:E,columnStates:a.value,disabled:i.disabled,readOnly:i.readOnly,onToggleColumn:R},null,8,["item","columnStates","disabled","readOnly"]),[[Jr,p.value[E.field]||!o.value]])]),_:1},8,["modelValue","disabled","readOnly"]),d.value.length>0?(K(),Ce("div",{key:1,class:U(S.$style["column-config__pinned-section"])},[(K(!0),Ce(At,null,wn(d.value.filter(E=>{var F;return E.headerName&&((F=E.headerName)==null?void 0:F.length)>0}),E=>rt((K(),Qe(PC,{key:E.field,item:E,disabled:i.disabled,readOnly:i.readOnly,columnStates:a.value},null,8,["item","disabled","readOnly","columnStates"])),[[Jr,p.value[E.field]||!o.value]])),128))],2)):ot("",!0)],2),me("div",{class:U(S.$style["column-config__footer"])},[be(wt,{type:"button",variant:"secondary",disabled:!0},{default:xe(()=>[...y[5]||(y[5]=[me("span",null,"Add Column",-1)])]),_:1})],2)],2)],2)],2))}}),[["__cssModules",{$style:{"table-customization":"_table-customization_apyis_1","table-customization__trigger":"_table-customization__trigger_apyis_7","column-config":"_column-config_apyis_23","column-config__header":"_column-config__header_apyis_33","icon-color":"_icon-color_apyis_43","column-config__list":"_column-config__list_apyis_46","column-config__section-label":"_column-config__section-label_apyis_50","column-config__footer":"_column-config__footer_apyis_59","column-config__add-button":"_column-config__add-button_apyis_62","cs-icon":"_cs-icon_apyis_80","no-columns":"_no-columns_apyis_84"}}]]),bj=St(at({__name:"StatusSelect",props:{modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=[{label:"Online",value:"online",color:"green"},{label:"Offline",value:"offline",color:"gray"},{label:"Busy",value:"busy",color:"red"},{label:"Away",value:"away",color:"yellow"}],i=e,s=oe(i.modelValue),o=W(()=>i.modelValue||"Select status"),r=W(()=>{const a="red";return{backgroundColor:a,border:qm(a,"white")?"1px solid #ccc":"1px solid #fff"}});return(a,l)=>(K(),Qe(N4,{options:n,value:s.value},{trigger:xe(({visibled:u})=>[be(Us,{actived:u,class:U(a.$style["status-wrapper"])},{suffix:xe(()=>[be(ut,{src:"ChevronUp",source:"remote",class:U([[a.$style["dropdown-icon"]],{[a.$style["dropdown-icon-show"]]:!u}])},null,8,["class"])]),default:xe(()=>[me("div",{class:U(a.$style.status)},[me("div",{class:U(a.$style["color-indicator"]),style:dn(r.value)},null,6),yt(" "+pt(o.value),1)],2)]),_:2},1032,["actived","class"])]),options:xe(()=>[(K(),Ce(At,null,wn(n,u=>be(xc,{key:u.value,label:u.label,value:u,type:"status",data:{color:u.color}},null,8,["label","value","data"])),64))]),_:1},8,["value"]))}}),[["__cssModules",{$style:{"status-wrapper":"_status-wrapper_tjjfy_1",status:"_status_tjjfy_1","color-indicator":"_color-indicator_tjjfy_11","dropdown-icon":"_dropdown-icon_tjjfy_16","dropdown-icon-show":"_dropdown-icon-show_tjjfy_22"}}]]),Sj=St(at({name:"EmptyData",__name:"EmptyData",props:{isSearching:{type:Boolean},isFiltering:{type:Boolean}},setup(e){const t=e,n={noData:"No data available.",noSearchResults:"No results. Try another search.",noFilterResults:"No results. Try another filter."},i=W(()=>t.isSearching||t.isFiltering?"NoDataSearchFilter":"ClickToCreate"),s=W(()=>t.isSearching?n.noSearchResults:t.isFiltering?n.noFilterResults:n.noData);return(o,r)=>(K(),Ce("div",{class:U(o.$style["no-data-item-table"])},[me("div",{class:U(o.$style.visual)},[be(G3,{source:"remote",src:i.value,ratio:"4/3",maxWidth:500,maxHeight:350},null,8,["src"])],2),me("div",{class:U(o.$style.description)},pt(s.value),3)],2))}}),[["__cssModules",{$style:{"no-data-item-table":"_no-data-item-table_oh0wi_1",visual:"_visual_oh0wi_12",description:"_description_oh0wi_19"}}]]),d_=c_("sortStore",()=>{const e=oe({}),t={id:"id",name:"name",isStated:"actual_start_date",isCompleted:"actual_due_date",lastUpdated:"updated_at",completedOn:"due_date",status:"template_flow_status",assignees:"assignee"},n={start_asc:{column:"start_date",direction:"asc"},start_desc:{column:"start_date",direction:"desc"},due_asc:{column:"due_date",direction:"asc"},due_desc:{column:"due_date",direction:"desc"}},i=W(()=>{const a=e.value;return Object.values(a).filter(u=>u.sort!=="none"&&!!u.sort).map(u=>{let c;switch(u.colId){case"dateRange":c=n[u.sort];break;default:if(u.colId.includes("metric")){const[d,h]=u.colId.split("_");c={column:d,direction:u.sort,type:h}}else c={column:t[u.colId]||u.colId,direction:u.sort};break}return c})}),s=(a,l)=>{e.value={[a]:{colId:a,sort:l}}},o=()=>{e.value={}},r=oe(!1);return{sortingAPIConfiguration:i,sorts:e,setSort:s,clearSorting:o,isSortingRunning:r}}),ga=at({name:"HeaderSorting",__name:"HeaderWrapper",props:{params:{},headerType:{},disabled:{type:Boolean},readOnly:{type:Boolean}},setup(e){const t=e,n=d_(),{sorts:i}=_C(n),s=W(()=>t.params.column.getColId()),o=a=>{s.value&&n.setSort(s.value,a)},r=oe("none");return vt(()=>i.value,$s(()=>{if(s.value){const a=i.value[s.value];r.value=a?a.sort:"none"}},200),{deep:!0,immediate:!0}),(a,l)=>s.value?(K(),Qe(V4,gn({key:0},t,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=u=>r.value=u),onSortChanged:o}),null,16,["modelValue"])):ot("",!0)}}),Ej={class:"create-scenes-body"},Rj={class:"step step-1-download-sample"},Dj={class:"step step-2-upload-file"},Fj={class:"drop-area-content"},Tj={class:"step step-3-select-status"},xj={class:"step description"},_j=St(at({__name:"PopupCreateScenes",setup(e,{expose:t}){const n=oe(null),i=oe(null),s=oe(!1),o=()=>{n.value&&n.value.show()},r=()=>{var p;(p=i.value)==null||p.click()},a=p=>{s.value=!0},l=p=>{s.value=!1},u=p=>{var C;s.value=!1;const g=(C=p.dataTransfer)==null?void 0:C.files;g&&g.length>0&&d(g[0])},c=p=>{const C=p.target.files;C&&C.length>0&&d(C[0])},d=p=>{console.log("Selected file:",p)};Kn(()=>{xn(()=>{})}),t({open:o});const h=oe(null);return(p,g)=>(K(),Qe(Z(W4),{"popup-name":"Create Scenes","show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:n},{default:xe(()=>[me("div",Ej,[me("div",Rj,[g[3]||(g[3]=me("h2",null,"Step 1: Download sample",-1)),g[4]||(g[4]=me("p",null,"This file contains all columns available for editing.",-1)),be(Z(wt),{class:"download-sample-btn",size:12,variant:"secondary"},{prefix:xe(()=>[be(Z(ut),{src:"Download"})]),default:xe(()=>[g[2]||(g[2]=yt(" Download sample file ",-1))]),_:1})]),me("div",Dj,[g[6]||(g[6]=me("h2",null,"Step 2: Upload file (.xlsx, .xls, .csv)",-1)),me("div",{class:U(["drop-area",{"is-dragging":s.value}]),onDragenter:Ut(a,["prevent"]),onDragover:g[0]||(g[0]=Ut(()=>{},["prevent"])),onDragleave:Ut(l,["prevent"]),onDrop:Ut(u,["prevent"]),onClick:r},[me("div",Fj,[be(Z(ut),{src:"Upload",size:"48"}),g[5]||(g[5]=me("p",null,[yt(" Drag & drop your file here or "),me("span",{class:"browse"},"browse")],-1))]),me("input",{ref_key:"fileInput",ref:i,type:"file",style:{display:"none"},accept:".xlsx, .xls, .csv",onChange:c},null,544)],34)]),me("div",Tj,[g[7]||(g[7]=me("h2",null,"Step 3: Select status",-1)),be(Z(bj),{modelValue:h.value,"onUpdate:modelValue":g[1]||(g[1]=C=>h.value=C)},null,8,["modelValue"])]),me("div",xj,[g[9]||(g[9]=me("h3",null,"Date format guide",-1)),g[10]||(g[10]=yt(" Ensure all dates follow one of the two formats below: ",-1)),g[11]||(g[11]=me("ul",null,[me("li",null,"DD MM YYYY (Day-Month-Year)"),me("li",null,"YYYY MM DD (Year-Month-Day)")],-1)),be(Z(wt),null,{prefix:xe(()=>[be(Z(ut),{src:"InfoCircle"})]),default:xe(()=>[g[8]||(g[8]=yt(" Check valid formats ",-1))]),_:1})])])]),_:1},512))}}),[["__scopeId","data-v-02954980"]]),Pj={status:$4,dateRange:R4,checkbox:void 0,dateTime:P4,format:void 0,number:void 0,rating:lT,more:B3,assignee:E4,name:oT,text:p4,metric:M4},Aj={status:!0,dateRange:!0,checkbox:!0,dateTime:!1,format:!1,number:!1,rating:!1,more:!1,assignee:!0,name:!1,text:!1,metric:!1},Ij={status:iT,checkbox:"agCheckboxCellEditor",dateTime:null,format:rT,number:"agNumberCellEditor",more:aT,assignee:XF,dateRange:D4,rating:null,name:oT,text:null,metric:null},h_={status:[200,200],dateRange:[255,255],checkbox:[50,50],dateTime:[200,200],format:[200,200],number:[200,200],rating:[200,200],more:[50,50],assignee:[200,200],name:[300,window.innerWidth*.7],text:[200,500],metric:[200,300]},kj={dateRange:{cellEditorPopupPosition:"under",cellEditorPopup:!1},name:{cellEditorPopupPosition:"over",cellEditor:!1,cellEditorPopup:!1},metric:{suppressKeyboardEvent:void 0,suppressNavigable:!1,suppressMovable:!1,cellClass:"ag-cell-optimized"}};class ma{static initialize(t){this.wrappers=t}static getWrappers(){if(!this.wrappers)throw new Error("CellRendererFactory: Not initialized. Please call CellRendererFactory.initialize() first.");return this.wrappers}static buildCommonCellParams(t){var o,r;const n=t.data||((o=t.node)==null?void 0:o.data),i=(r=t.colDef)==null?void 0:r.field,s=i&&n?n[i]:void 0;return{...t,value:s}}static fromType(t,n){var v,b;const{wrapVueCellRenderer:i,wrapVueCellEditor:s}=this.getWrappers(),o=Pj[t],r=Ij[t],a=Aj[t]??!1,l={minWidth:((v=h_[t])==null?void 0:v[0])||250,maxWidth:((b=h_[t])==null?void 0:b[1])||250},u=kj[t]||{},c=R=>!!R&&typeof R!="string",d=c(o)?i(o):o,h=n.editable??a;let p={};const g=n.cellRendererParams?n.cellRendererParams:this.buildCommonCellParams;return h&&r&&(p={cellEditor:c(r)?s(r):r,cellEditorParams:g,singleClickEdit:!0,cellEditorPopup:!0,cellEditorPopupPosition:"under"}),{headerName:t,...l,cellRenderer:d,editable:h,...n,...p,...u,context:{...n.context,workspaceId:this.workspaceId,entityId:this.entityId},cellRendererParams:g,headerComponentParams:R=>({...typeof n.headerComponentParams=="function"?n.headerComponentParams(R):n.headerComponentParams,headerType:t})}}}rn(ma,"wrappers",null),rn(ma,"workspaceId",""),rn(ma,"entityId","");function Oj(e){return"stopEditing"in e}const Mj=at({name:"AgGridVue3CellWrapper",props:{component:{type:Object,required:!0},params:{type:Object,required:!0},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},value:{type:null,default:void 0},data:{type:Object,default:void 0},id:{type:[String,Number],default:void 0},tooltip:{type:[String,Number],default:void 0},isNoData:{type:Boolean,default:!1},workspaceId:{type:String,default:void 0},entityId:{type:String,default:void 0},axiosService:{type:Object,default:void 0}},setup(e){var n;const t=((n=e.component)==null?void 0:n.default)||e.component;return t||console.error("[Vue3CellWrapper] Invalid component provided:",e.component),()=>be(t,{...e})}}),Lj=()=>`${Math.max(50,Math.round(mz(0,100)))}%`,Nj=8,Vj=e=>e?e.querySelectorAll("*").length+1:0,Bj=e=>e?Object.keys(e).filter(t=>/^on[A-Z]/.test(t)).length:0;function f_(e){return class{constructor(){rn(this,"container");rn(this,"vNode",null);rn(this,"componentInstance",null);rn(this,"params");rn(this,"isEditor",!1)}init(n){var l,u,c,d,h,p,g;if(!n){console.error("[Vue3CellWrapper] Missing context information: workspaceId or entityId. Cannot initialize wrapper.");return}const i=performance.now(),s=n.context.apiClass;this.params=n,this.isEditor=Oj(n),this.container=document.createElement("div"),this.container.classList.add("ag-vue3-cell-wrapper"),this.container.classList.add(`${e.name||"unknown-component"}`),this.container.style.setProperty("--loading-overlay-width",Lj()),this.container.style.width="100%",this.container.style.height="100%";const o=Object.freeze(n),r={component:e,params:o,disabled:n.disabled??!1,readOnly:n.readOnly??!1,value:n.value,data:n.data,id:(l=n==null?void 0:n.data)==null?void 0:l.id,workspaceId:n.context.workspaceId,entityId:n.context.entityId,axiosService:s,tooltip:n.tooltip??void 0};this.vNode=be(Mj,r),z0(this.vNode,this.container);const a=performance.now()-i;if(a>Nj){console.warn(`[Vue3CellWrapper] Slow render detected (${a.toFixed(1)}ms) for component "${(u=n.colDef)==null?void 0:u.field}" and field "${(c=n.data)==null?void 0:c.id}"`);{const C=Vj(this.container),v=Bj((d=this.vNode)==null?void 0:d.props),b=Object.keys(((h=this.vNode)==null?void 0:h.props)||{}).length,R=Object.keys(n.context||{}).length;console.debug("[Vue3CellWrapper] Render diagnostics",{field:(p=n.colDef)==null?void 0:p.field,domCount:C,eventProps:v,propCount:b,contextCount:R,durationMs:a.toFixed(1)})}}this.componentInstance=(g=this.vNode.component)==null?void 0:g.proxy,this.componentInstance||console.warn("[Vue3CellWrapper] Component instance not available after render")}getGui(){return this.container}refresh(n){return!1}getValue(){var n,i,s;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((s=(i=this.componentInstance).getValue)==null?void 0:s.call(i))??this.componentInstance.value:(console.warn("[Vue3CellWrapper] getValue() called but component instance not available"),(n=this.params)==null?void 0:n.value)}isPopup(){var n;return this.isEditor?(n=this.componentInstance)!=null&&n.isPopup?this.componentInstance.isPopup():!0:!1}getPopupPosition(){var i,s,o;return this.isEditor?(i=this.componentInstance)!=null&&i.getPopupPosition?this.componentInstance.getPopupPosition():((o=(s=this.params)==null?void 0:s.colDef)==null?void 0:o.cellEditorPopupPosition)??"under":void 0}afterGuiAttached(){!this.isEditor||this.componentInstance}destroy(){if(!(!this.container||!this.vNode))try{this.componentInstance&&(typeof this.componentInstance.$destroy=="function"&&this.componentInstance.$destroy(),typeof this.componentInstance.destroy=="function"&&this.componentInstance.destroy()),Promise.resolve().then(()=>{try{z0(null,this.container)}catch(n){console.warn("[Vue3CellWrapper] Error during unmount:",n)}})}catch(n){console.error("[Vue3CellWrapper] Error during cleanup:",n)}finally{this.vNode=null,this.componentInstance=null}}}}function Of(e){return f_(e)}function p_(e){return f_(e)}var va=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,n){const i=t?this.allAsyncListeners:this.allSyncListeners;let s=i.get(e);return!s&&n&&(s=new Set,i.set(e,s)),s}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,n=!1){this.getListeners(e,n,!0).add(t)}removeEventListener(e,t,n=!1){const i=this.getListeners(e,n,!1);i&&(i.delete(t),i.size===0&&(n?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const n=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:i}=this,s=a=>{const l=i?()=>i.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},o=this.getListeners(n,t,!1);if(((o==null?void 0:o.size)??0)>0){const a=new Set(o);for(const l of a)o!=null&&o.has(l)&&s(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)s(()=>l(n,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}};function Ao(e){return e==null||e===""?null:e}function ze(e){return e!=null&&e!==""}function nn(e){return!ze(e)}function AC(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Bc(e,t){const n=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return n===i}function Hj(e,t,n=!1){const i=e==null,s=t==null;if(e!=null&&e.toNumber&&(e=e.toNumber()),t!=null&&t.toNumber&&(t=t.toNumber()),i&&s)return 0;if(i)return-1;if(s)return 1;function o(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!n)return o(e,t);try{return e.localeCompare(t)}catch{return o(e,t)}}var Gj=/[&<>"']/g,$j={"&":"&","<":"<",">":">",'"':""","'":"'"};function Nl(e){return(e==null?void 0:e.toString().toString())??null}function Hc(e){var t;return((t=Nl(e))==null?void 0:t.replace(Gj,n=>$j[n]))??null}function qs(e){return e.eRootDiv.getRootNode()}function an(e){return qs(e).activeElement}function Mn(e){const{gos:t,eRootDiv:n}=e;let i=null;const s=t.get("getDocument");return s&&ze(s)?i=s():n&&(i=n.ownerDocument),i&&ze(i)?i:document}function g_(e){const t=an(e);return t===null||t===Mn(e).body}function m_(e){return Mn(e).defaultView||window}function IC(e){let t=null,n=null;try{t=Mn(e).fullscreenElement}catch{}finally{t||(t=qs(e));const i=t.querySelector("body");i?n=i:t instanceof ShadowRoot?n=t:t instanceof Document?n=t==null?void 0:t.documentElement:n=t}return n}function Wj(e){const t=IC(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function zj(e){const t=IC(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function Es(e,t,n){n==null||typeof n=="string"&&n==""?v_(e,t):Xi(e,t,n)}function Xi(e,t,n){e.setAttribute(C_(t),n.toString())}function v_(e,t){e.removeAttribute(C_(t))}function C_(e){return`aria-${e}`}function dr(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Uj(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function jj(e){return e.getAttribute("aria-label")}function Vl(e,t){Es(e,"label",t)}function Gc(e,t){Es(e,"labelledby",t)}function y_(e,t){Es(e,"live",t)}function Kj(e,t){Es(e,"atomic",t)}function qj(e,t){Es(e,"relevant",t)}function Yj(e,t){Es(e,"invalid",t)}function Zj(e,t){Es(e,"disabled",t)}function w_(e,t){Es(e,"hidden",t)}function kC(e,t){Xi(e,"expanded",t)}function Jj(e,t){Xi(e,"setsize",t)}function Qj(e,t){Xi(e,"posinset",t)}function Xj(e,t){Xi(e,"multiselectable",t)}function e8(e,t){Xi(e,"rowcount",t)}function Mf(e,t){Xi(e,"rowindex",t)}function t8(e,t){Xi(e,"rowspan",t)}function n8(e,t){Xi(e,"colcount",t)}function b_(e,t){Xi(e,"colindex",t)}function i8(e,t){Xi(e,"colspan",t)}function s8(e,t){Xi(e,"sort",t)}function o8(e){v_(e,"sort")}function S_(e,t){Es(e,"selected",t)}function r8(e,t){Es(e,"controls",t)}function a8(e,t){r8(e,t.id),Gc(t,e.id)}function E_(e,t){Es(e,"owns",t)}function Lf(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var l8="[tabindex], input, select, button, textarea, [href]",R_="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function $c(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(R_)?!1:Ys(e)}function sn(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-hidden",!t),i||w_(e,!t)}function u8(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-invisible",!t),i||w_(e,!t)}function Wc(e,t){const n="disabled",i=t?o=>o.setAttribute(n,""):o=>o.removeAttribute(n);i(e);const s=e.querySelectorAll("input")??[];for(const o of s)i(o)}function Ca(e,t,n){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof n=="number"){if(++i>n)break}else if(e===n)break}return!1}function ya(e){const{height:t,width:n,borderTopWidth:i,borderRightWidth:s,borderBottomWidth:o,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:u,paddingLeft:c,marginTop:d,marginRight:h,marginBottom:p,marginLeft:g,boxSizing:C}=window.getComputedStyle(e),v=Number.parseFloat;return{height:v(t||"0"),width:v(n||"0"),borderTopWidth:v(i||"0"),borderRightWidth:v(s||"0"),borderBottomWidth:v(o||"0"),borderLeftWidth:v(r||"0"),paddingTop:v(a||"0"),paddingRight:v(l||"0"),paddingBottom:v(u||"0"),paddingLeft:v(c||"0"),marginTop:v(d||"0"),marginRight:v(h||"0"),marginBottom:v(p||"0"),marginLeft:v(g||"0"),boxSizing:C}}function OC(e){const t=ya(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function zc(e){const t=ya(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function D_(e){const{height:t,marginBottom:n,marginTop:i}=ya(e);return Math.floor(t+n+i)}function Nf(e){const{width:t,marginLeft:n,marginRight:i}=ya(e);return Math.floor(t+n+i)}function F_(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:i,borderRightWidth:s,borderBottomWidth:o}=ya(e);return{top:t.top+(n||0),left:t.left+(i||0),right:t.right+(s||0),bottom:t.bottom+(o||0)}}function Vf(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function Bf(e,t,n){n&&(t*=-1),e.scrollLeft=t}function Hn(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function Rs(e){e!=null&&e.parentNode&&e.remove()}function T_(e){return!!e.offsetParent}function Ys(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!T_(e)||window.getComputedStyle(e).visibility!=="visible")}function MC(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function x_(e,t,n){n&&n.nextSibling===t||(e.firstChild?n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function __(e,t){for(let n=0;n<t.length;n++){const i=t[n],s=e.children[n];s!==i&&e.insertBefore(i,s)}}function c8(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Uc(e,t){if(t)for(const n of Object.keys(t)){const i=t[n];if(!(n!=null&&n.length)||i==null)continue;const s=c8(n),o=i.toString(),r=o.replace(/\s*!important/g,""),a=r.length!=o.length?"important":void 0;e.style.setProperty(s,r,a)}}function Hf(e){return()=>{const t=e();return t?LC(t)||P_(t):!0}}function LC(e){return e.clientWidth<e.scrollWidth}function P_(e){return e.clientHeight<e.scrollHeight}function Gf(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Zs(e,t)}function Zs(e,t){t=NC(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function jc(e,t){t=NC(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function NC(e){return typeof e=="number"?`${e}px`:e}function VC(e){return e instanceof Node||e instanceof HTMLElement}function Mi(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function hr(e,t,n){const s=m_(e).ResizeObserver,o=s?new s(n):null;return o==null||o.observe(t),()=>o==null?void 0:o.disconnect()}function Io(e,t){const n=m_(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var A_="data-ref",BC;function I_(){return BC??(BC=document.createTextNode(" ")),BC.cloneNode()}function Kc(e){const{attrs:t,children:n,cls:i,ref:s,role:o,tag:r}=e,a=document.createElement(r);if(i&&(a.className=i),s&&a.setAttribute(A_,s),o&&a.setAttribute("role",o),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(n)if(typeof n=="string")a.textContent=n;else{let l=!0;for(const u of n)u&&(typeof u=="string"?(a.appendChild(document.createTextNode(u)),l=!1):typeof u=="function"?a.appendChild(u()):(l&&(a.appendChild(I_()),l=!1),a.append(Kc(u)),a.appendChild(I_())))}return a}var d8=["touchstart","touchend","touchmove","touchcancel","scroll"],h8=["wheel"],HC={},k_=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof HC[n]=="boolean")return HC[n];const i=document.createElement(e[n]||"div");return n="on"+n,HC[n]=n in i}})();function f8(e,t){return!t||!e?!1:g8(t).indexOf(e)>=0}function p8(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function g8(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():p8(t)}function m8(e,t,n){const i=v8(t);let s;i!=null&&(s={passive:i}),e.addEventListener(t,n,s)}var v8=e=>{const t=d8.includes(e),n=h8.includes(e);if(t)return!0;if(n)return!1};function O_(e,t,n){if(n===0)return!1;const i=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(i,s)<=n}var qc=(e,t)=>{const n=e.identifier;for(let i=0,s=t.length;i<s;++i){const o=t[i];if(o.identifier===n)return o}return null};function Yc(e,t){return e.gos.isElementInThisInstance(t.target)}function C8(e,t,n){const s=e.getBoundingClientRect().height,o=Wj(n)-2,r=zj(n)-2;if(!e.offsetParent)return;const l=F_(e.offsetParent),{clientY:u,clientX:c}=t;let d=u-l.top-s/2,h=c-l.left-10;const p=Mn(n),g=p.defaultView||window,C=g.pageYOffset||p.documentElement.scrollTop,v=g.pageXOffset||p.documentElement.scrollLeft;o>0&&h+e.clientWidth>o+v&&(h=o+v-e.clientWidth),h<0&&(h=0),r>0&&d+e.clientHeight>r+C&&(d=r+C-e.clientHeight),d<0&&(d=0),e.style.left=`${h}px`,e.style.top=`${d}px`}var $f=(e,...t)=>{for(const n of t){const[i,s,o,r]=n;i.addEventListener(s,o,r),e.push(n)}},GC=e=>{if(e){for(const[t,n,i,s]of e)t.removeEventListener(n,i,s);e.length=0}},fr=e=>{e.cancelable&&e.preventDefault()};function y8(e,t){return t}function M_(e){return(e==null?void 0:e.getLocaleTextFunc())??y8}function w8(e,t,n,i){const s=t[n];return e.getLocaleTextFunc()(n,typeof s=="function"?s(i):s,i)}function b8(e){return(t,n,i)=>e({key:t,defaultValue:n,variableValues:i})}function S8(e){return(t,n,i)=>{let s=e==null?void 0:e[t];if(s&&(i!=null&&i.length)){let o=0;for(;!(o>=i.length||s.indexOf("${variable}")===-1);)s=s.replace("${variable}",i[o++])}return s??n}}var Js=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,n){this.localEventService||(this.localEventService=new va),this.localEventService.addEventListener(e,t,n)}removeEventListener(e,t,n){var i;(i=this.localEventService)==null||i.removeEventListener(e,t,n)}dispatchLocalEvent(e){var t;(t=this.localEventService)==null||t.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const n=[];for(const i of Object.keys(t)){const s=t[i];s&&n.push(this._setupListener(e,i,s))}return n}_setupListener(e,t,n){if(this.destroyed)return()=>null;let i;if(E8(e))e.__addEventListener(t,n),i=()=>(e.__removeEventListener(t,n),null);else{const s=R8(e);e instanceof HTMLElement?m8(e,t,n):s?e.addListener(t,n):e.addEventListener(t,n),i=s?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}setupPropertyListener(e,t){const{gos:n}=this;n.addPropertyEventListener(e,t);const i=()=>(n.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const n=e.join("-")+this.propertyListenerId++,i=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=s.changeSet.id}const o={type:"propertyChanged",changeSet:s.changeSet,source:s.source};t(o)};for(const s of e)this.setupPropertyListener(s,i)}getLocaleTextFunc(){return M_(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const n=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),n}createBean(e,t,n){return(t||this.stubContext).createBean(e,n)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function E8(e){return e.__addEventListener!==void 0}function R8(e){return e.eventServiceType==="global"}var ve=class extends Js{},L_={};function $C(e,t){L_[t]||(e(),L_[t]=!0)}var D8={pending:!1,funcs:[]},F8={pending:!1,funcs:[]};function WC(e,t="setTimeout",n){const i=t==="raf"?F8:D8;if(i.funcs.push(e),i.pending)return;i.pending=!0;const s=()=>{const o=i.funcs.slice();i.funcs.length=0,i.pending=!1;for(const r of o)r()};t==="raf"?Io(n,s):window.setTimeout(s,0)}function Gn(e,t,n){let i;return function(...s){const o=this;window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(o,s)},n)}}function N_(e,t){let n=0;return function(...i){const s=this,o=Date.now();o-n<t||(n=o,e.apply(s,i))}}function T8(e,t,n,i=100){const s=Date.now();let o=null,r=!1;const a=()=>{o!=null&&(window.clearInterval(o),o=null)};e.addDestroyFunc(a);const l=()=>{const u=Date.now()-s>i;(t()||u)&&(n(),r=!0,a())};l(),r||(o=window.setInterval(l,10))}var V_=new Set(["__proto__","constructor","prototype"]);function x8(e,t){if(e!=null){if(Array.isArray(e)){for(let n=0;n<e.length;n++)t(n.toString(),e[n]);return}for(const n of Object.keys(e).filter(i=>!V_.has(i)))t(n,e[n])}}function di(e,t,n=!0,i=!1){ze(t)&&x8(t,(s,o)=>{let r=e[s];r!==o&&(i&&r==null&&o!=null&&typeof o=="object"&&o.constructor===Object&&(r={},e[s]=r),B_(o)&&B_(r)&&!Array.isArray(r)?di(r,o,n,i):(n||o!==void 0)&&(e[s]=o))})}function B_(e){return typeof e=="object"&&e!==null}var zC=class Ko{static applyGlobalGridOptions(t){if(!Ko.gridOptions)return{...t};let n={};return di(n,Ko.gridOptions,!0,!0),Ko.mergeStrategy==="deep"?di(n,t,!0,!0):n={...n,...t},Ko.gridOptions.context&&(n.context=Ko.gridOptions.context),t.context&&(Ko.mergeStrategy==="deep"&&n.context&&di(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(Ko.mergeStrategy==="deep"){const i=_8(t);if(i&&typeof i=="object"&&typeof n=="object")return Ko.applyGlobalGridOptions({[t]:n})[t]}return n}};zC.gridOptions=void 0,zC.mergeStrategy="shallow";var UC=zC;function _8(e){var t;return(t=UC.gridOptions)==null?void 0:t[e]}var P8={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1,enableFilterHandlers:!1},H_="https://www.ag-grid.com";function pr(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function Zc(e,...t){$C(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function Bl(e,...t){$C(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var G_=new Set,Wf={},Hl={},zf,$_=!1,W_=!1,A8=!1;function I8(e){const[t,n]=e.version.split(".")||[],[i,s]=zf.split(".")||[];return t===i&&n===s}function k8(e){var i;zf||(zf=e.version);const t=s=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${s} Please update all modules to the same version.`;e.version?I8(e)||Bl(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${zf}.`)):Bl(t(`'${e.moduleName}' is incompatible.`));const n=(i=e.validate)==null?void 0:i.call(e);n&&!n.isValid&&Bl(`${n.message}`)}function Jc(e,t,n=!1){n||($_=!0),k8(e);const i=e.rowModels??["all"];G_.add(e);let s;t!==void 0?(W_=!0,Hl[t]===void 0&&(Hl[t]={}),s=Hl[t]):s=Wf;for(const o of i)s[o]===void 0&&(s[o]={}),s[o][e.moduleName]=e;if(e.dependsOn)for(const o of e.dependsOn)Jc(o,t,n)}function O8(e){delete Hl[e]}function jC(e,t,n){const i=s=>{var o,r,a;return!!((o=Wf[s])!=null&&o[e])||!!((a=(r=Hl[t])==null?void 0:r[s])!=null&&a[e])};return i(n)||i("all")}function KC(){return W_}function M8(e,t){const n=Hl[e]??{};return[...Object.values(Wf.all??{}),...Object.values(n.all??{}),...Object.values(Wf[t]??{}),...Object.values(n[t]??{})]}function L8(){return new Set(G_)}function N8(){return $_}function V8(){return A8}var B8=class{static register(e){Jc(e,void 0)}static registerModules(e){for(const t of e)Jc(t,void 0)}},$e="34.3.1",z_=2e3,U_=100,j_="_version_",Uf=null,Gl=`${H_}/javascript-data-grid`;function H8(e){Uf=e}function G8(e){Gl=e}function K_(e,t,n){return(Uf==null?void 0:Uf(e,t))??[U8(e,t,n)]}function qC(e,t,n,i,s){e(`${i?"warning":"error"} #${t}`,...K_(t,n,s))}function $8(e){if(!e)return String(e);const t={};for(const n of Object.keys(e))typeof e[n]!="object"&&typeof e[n]!="function"&&(t[n]=e[n]);return JSON.stringify(t)}function W8(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=$8(e)),t}function jf(e){return e===void 0?"undefined":e===null?"null":e}function YC(e,t){return`${e}?${t.toString()}`}function z8(e,t,n){const i=Array.from(t.entries()).sort((o,r)=>r[1].length-o[1].length);let s=YC(e,t);for(const[o,r]of i){if(o===j_)continue;const a=s.length-n;if(a<=0)break;const l="...",u=a+l.length,c=r.length-u>U_?r.slice(0,r.length-u)+l:r.slice(0,U_)+l;t.set(o,c),s=YC(e,t)}return s}function q_(e,t){const n=new URLSearchParams;if(n.append(j_,$e),t)for(const o of Object.keys(t))n.append(o,W8(t[o]));const i=`${Gl}/errors/${e}`,s=YC(i,n);return s.length<=z_?s:z8(i,n,z_)}var U8=(e,t,n)=>{const i=q_(e,t);return`${`${n?n+`
|
|
88
|
+
This will fail in production.`);r=ha,r._s.has(e)||(s?xC(e,t,i,r):u_(e,i,r),I.env.NODE_ENV!=="production"&&(o._pinia=r));const u=r._s.get(e);if(I.env.NODE_ENV!=="production"&&a){const c="__hot:"+e,d=s?xC(c,t,i,r,!0):u_(c,Qi({},i),r,!0);a._hotUpdate(d),delete r.state.value[c],r._s.delete(c)}if(I.env.NODE_ENV!=="production"&&_o){const c=Ti();if(c&&c.proxy&&!a){const d=c.proxy,h="_pStores"in d?d._pStores:d._pStores={};h[e]=u}}return u}return o.$id=e,o}function _C(e){const t=gt(e),n={};for(const i in t){const s=t[i];s.effect?n[i]=W({get:()=>e[i],set(o){e[i]=o}}):(Ht(s)||Hi(s))&&(n[i]=Zo(e,i))}return n}const gj={list:{success:void 0,error:void 0},list_cursor:{success:void 0,error:"Failed to fetch items."},assignedUser:{success:void 0,error:"Failed to fetch assigned users."},metricValues:{success:void 0,error:"Failed to fetch metric values."},assignableUser:{success:void 0,error:"Failed to fetch assignable users."},assignableStatus:{success:void 0,error:"Failed to fetch assignable statuses."},item:{success:"Item updated successfully.",error:"Failed to fetch item."},delete_item:{success:"Item deleted successfully.",error:"Failed to delete item."},delete_rendition:{success:"Rendition deleted successfully.",error:"Failed to delete rendition."},archive_item:{success:"Item archived successfully.",error:"Failed to archive item."},bulkUpdate:{success:"Items updated successfully.",error:"Failed to update items."},assigneeReplace:{success:"Assignees replaced successfully.",error:"Failed to replace assignees."},unAssignAll:{success:"All assignees removed successfully.",error:"Failed to remove all assignees."},removeAssignee:{success:"Assignee removed successfully.",error:"Failed to remove assignee."},createNewScene:{success:"New scene created successfully.",error:"Failed to create new scene."},metricList:{success:void 0,error:"Failed to fetch metrics."},basicInfor:{success:void 0,error:"Failed to fetch basic information."},multipleAssignableUser:{success:void 0,error:"Failed to fetch multiple assignable users."},bulkDelete:{success:"Items deleted successfully.",error:"Failed to delete items."},bulkArchive:{success:"Items archived successfully.",error:"Failed to archive items."}},Vc=c_("toast",()=>{const e=oe([]),t=(s,o)=>{const r=gj[s];if(r){const a=r[o];if(a){n({id:s,type:o,message:a});return}}},n=(s,o=5e3)=>{const r={...s,id:s.id??Date.now()+Math.random()};e.value.push(r),setTimeout(()=>{i(r.id)},o)};function i(s){e.value=e.value.filter(o=>o.id!==s)}return{notifications:e,addNotification:n,removeNotification:i,showMessage:t}}),mj=["innerHTML"],vj=St(at({__name:"Snackbar",setup(e){const t=CN,n=Vc(),{removeNotification:i}=n,{notifications:s}=_C(n),o=r=>r.trim().startsWith("<svg");return(r,a)=>(K(),Qe(tN,{name:"list",tag:"div",class:U(r.$style["notification-wrapper"])},{default:xe(()=>[(K(!0),Ce(At,null,wn(Z(s),l=>{var u;return rt((K(),Ce("div",{key:l.id,class:U([r.$style["notification-item"],r.$style[`notification--${l.type||"info"}`],!(l!=null&&l.actions)||((u=l==null?void 0:l.actions)==null?void 0:u.length)==0?r.$style["snackbar-type"]:""])},[me("p",{class:U(r.$style.snackbar__message)},[l.icon&&!o(l.icon)?(K(),Qe(ut,{key:0,src:l.icon,source:"remote"},null,8,["src"])):ot("",!0),l.icon&&o(l.icon)?(K(),Ce("i",{key:1,class:U(r.$style["icon-draw"]),innerHTML:l.icon},null,10,mj)):ot("",!0),yt(" "+pt(l.message),1)],2),l.actions?(K(),Ce("div",{key:0,class:U(r.$style["actions-notification"])},[(K(!0),Ce(At,null,wn(l.actions,c=>(K(),Qe(wt,gn({key:c.label},{ref_for:!0},c,{onClick:c.action}),{prefix:xe(()=>[c.btnIcon?(K(),Qe(ut,{key:0,src:c.btnIcon,source:"remote",color:"white"},null,8,["src"])):ot("",!0)]),_:2},1040,["onClick"]))),128))],2)):ot("",!0),be(wt,{variant:"tertiary",onClick:c=>Z(i)(l.id),class:U(r.$style["close-btn"]),size:18},{default:xe(()=>[be(ut,{src:"Xmark",color:"var(--icon-color)"})]),_:1},8,["onClick","class"])],2)),[[Z(t)]])}),128))]),_:1},8,["class"]))}}),[["__cssModules",{$style:{"notification-wrapper":"_notification-wrapper_1oslg_1","notification-item":"_notification-item_1oslg_16","notification--success":"_notification--success_1oslg_30","notification--error":"_notification--error_1oslg_33","close-btn":"_close-btn_1oslg_37","notification--info":"_notification--info_1oslg_40","notification--warning":"_notification--warning_1oslg_47","notification--interactive":"_notification--interactive_1oslg_54","snackbar-type":"_snackbar-type_1oslg_60",snackbar__message:"_snackbar__message_1oslg_68","actions-notification":"_actions-notification_1oslg_81"}}]]),Cj=["draggable","onDragstart","onDragenter","onDragleave","onDrop","onFocus"],yj=St(at({__name:"DragDropList",props:{modelValue:{default:()=>[]},value:{default:void 0},groupName:{default:"default"},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1}},emits:["update","update:modelValue","input"],setup(e,{emit:t}){const n=e,i=t,s=oe([]),o=oe(null),r=oe(null),a=oe(null),l=oe(0),u=W(()=>n.value!==void 0?n.value:n.modelValue);vt(u,S=>{s.value=[...S]},{immediate:!0});const c=(S,y)=>{var E;if(n.disabled||n.readOnly||(E=s.value[y])!=null&&E.required){S.preventDefault();return}r.value=y,S.dataTransfer&&(S.dataTransfer.effectAllowed="move",S.dataTransfer.setData("text/plain",y.toString()),S.dataTransfer.setData("application/json",JSON.stringify({index:y,groupName:n.groupName}))),setTimeout(()=>{const F=S.target;F==null||F.classList.add("drag-item--dragging")},0)},d=S=>{r.value=null,a.value=null,l.value=0;const y=S.target;y==null||y.classList.remove("drag-item--dragging")},h=(S,y)=>{n.disabled||n.readOnly||(S.preventDefault(),!(r.value===null||r.value===y)&&(l.value++,a.value=y))},p=(S,y)=>{l.value--,l.value===0&&(a.value=null)},g=S=>{n.disabled||n.readOnly||(S.preventDefault(),S.dataTransfer&&(S.dataTransfer.dropEffect="move"))},C=(S,y)=>{if(n.disabled||n.readOnly)return;S.preventDefault(),S.stopPropagation();const E=r.value;if(E===null||E===y){b();return}const F=[...s.value],[x]=F.splice(E,1);F.splice(y,0,x),s.value=F,R(F),b()},v=S=>{S.preventDefault(),b()},b=()=>{r.value=null,a.value=null,l.value=0},R=S=>{i("update",S,n.groupName),i("update:modelValue",S),i("input",S)};return(S,y)=>(K(),Ce("div",{class:U([S.$style["drag-drop-container"],{[S.$style["is-disabled"]]:n.disabled,[S.$style["is-readonly"]]:n.readOnly}]),onDragover:Ut(g,["prevent"]),onDrop:Ut(v,["prevent"])},[(K(!0),Ce(At,null,wn(s.value,(E,F)=>(K(),Ce("div",{key:E.id||F,class:U({[S.$style["drag-item"]]:!0,[S.$style["drag-item--focused"]]:o.value===F,[S.$style["drag-item--dragging"]]:r.value===F,[S.$style["drag-item--over"]]:a.value===F,[S.$style["drag-item--disabled"]]:E.required}),draggable:!n.disabled&&!n.readOnly,tabindex:"0",onDragstart:x=>c(x,F),onDragend:d,onDragenter:Ut(x=>h(x,F),["prevent"]),onDragleave:x=>p(),onDragover:Ut(g,["prevent"]),onDrop:Ut(x=>C(x,F),["prevent"]),onFocus:x=>o.value=F,onBlur:y[0]||(y[0]=x=>o.value=null)},[mt(S.$slots,"item",{item:E,index:F},()=>[E.required?ot("",!0):(K(),Ce("span",{key:0,class:U(S.$style["drag-handle"]),"aria-hidden":"true"}," :: ",2)),me("div",{class:U(S.$style["draggable-item"])},pt(E.name),3)])],42,Cj))),128))],34))}}),[["__cssModules",{$style:{"drag-drop-container":"_drag-drop-container_fuk6u_1","is-disabled":"_is-disabled_fuk6u_7","is-readonly":"_is-readonly_fuk6u_11","drag-item":"_drag-item_fuk6u_15","drag-item--dragging":"_drag-item--dragging_fuk6u_23","drag-item--over":"_drag-item--over_fuk6u_30"}}]]),PC=St(at({__name:"DragDropItem",props:{item:{},disabled:{type:Boolean},readOnly:{type:Boolean},columnStates:{}},emits:["toggle-column"],setup(e,{emit:t}){const n=mn,i=e,s=oe(!1),o=oe(i.columnStates[String(i.item.field)]||!1),r=t,a=W(()=>{var l,u;return(u=(l=i.item)==null?void 0:l.field)==null?void 0:u.includes("metric")});return vt(()=>o.value,()=>{r("toggle-column",i.item.field,i.item.required)}),(l,u)=>(K(),Ce("div",{key:e.item.field,class:U([l.$style["column-config__item"],{[l.$style.disabled]:e.disabled||i.readOnly}])},[be(uT,{id:`col-${e.item.field}`,modelValue:o.value,"onUpdate:modelValue":u[0]||(u[0]=c=>o.value=c),disabled:e.disabled},null,8,["id","modelValue","disabled"]),be(ut,{color:e.disabled?"var(--disabled-color)":"var(--primary-color)",source:"remote",src:"GripVertical",class:U(l.$style.handler)},null,8,["color","class"]),rt((K(),Ce("span",{class:U(l.$style["column-config__item-label"])},[yt(pt(e.item.headerName),1)],2)),[[Z(n),{content:e.item.headerName}]]),a.value?rt((K(),Ce("div",{key:0,class:U(l.$style.badge),onHover:u[1]||(u[1]=c=>s.value=!0)},[...u[2]||(u[2]=[yt(" M ",-1)])],34)),[[Z(n),"Metric"]]):ot("",!0)],2))}}),[["__cssModules",{$style:{"column-config__item":"_column-config__item_48o5h_1",disabled:"_disabled_48o5h_13",readOnly:"_readOnly_48o5h_17","column-config__item--pinned":"_column-config__item--pinned_48o5h_20",handler:"_handler_48o5h_27",badge:"_badge_48o5h_31","column-config__item-label":"_column-config__item-label_48o5h_45"}}]]),wj=St(at({__name:"TableCustomization",props:{modelValue:{},readOnly:{type:Boolean},disabled:{type:Boolean},checkboxColumn:{}},emits:["update:modelValue","input"],setup(e,{emit:t}){const n=mn,i=e,s=t,o=oe(""),r=oe([]),a=oe({}),{triggerRef:l,popupRef:u}=vs({placement:"bottom-end",trigger:"click"}),c=W(()=>r.value.filter(S=>S.pinned==="left"&&S.field&&S.headerName)),d=W(()=>r.value.filter(S=>S.pinned==="right"&&S.field||S.field==="blank")),h=W({get:()=>r.value.filter(S=>!S.pinned&&S.field&&S.field!=="blank"),set:S=>{r.value=[...c.value,...S,...d.value]}}),p=W(()=>{if(!o.value)return{};const S=o.value.toLowerCase();return[...r.value,...h.value].reduce((y,E)=>{var F;return(F=E.headerName)!=null&&F.toLowerCase().includes(S)&&E.field&&(y[E.field]=!0),y},{})}),g=W(()=>i.modelValue),C=()=>{const S={};r.value.forEach(y=>{y.field&&(S[y.field]=!y.hide)}),a.value=S},v=()=>{const S=r.value.map(y=>({...y,hide:y.field?!a.value[y.field]:!1}));s("update:modelValue",S),s("input",S)},b=S=>{const y=[...c.value,...S,...d.value];i.checkboxColumn&&y.unshift(i.checkboxColumn),r.value=y,v()},R=(S,y)=>{!y&&S&&(a.value[S]=!a.value[S],v())};return vt(g,S=>{S&&S.length>0&&(r.value=[...S],C())},{immediate:!0}),(S,y)=>(K(),Ce("div",{class:U(S.$style["table-customization"])},[me("div",{ref_key:"triggerRef",ref:l},[mt(S.$slots,"trigger",{},()=>[rt((K(),Qe(wt,{variant:["secondary"],disabled:i.disabled},{prefix:xe(()=>[be(ut,{src:"Gear"})]),default:xe(()=>[y[2]||(y[2]=yt(" Customise ",-1))]),_:1},8,["disabled"])),[[Z(n),"Customise table columns"]])])],512),me("div",{ref_key:"popupRef",ref:u,class:U(S.$style["tippy-content-wrapper"])},[me("div",{class:U(S.$style["column-config"])},[be(Yv,{modelValue:o.value,"onUpdate:modelValue":y[0]||(y[0]=E=>o.value=E)},null,8,["modelValue"]),me("div",{class:U(S.$style["column-config__header"])},[...y[3]||(y[3]=[me("label",null,"Manage columns",-1)])],2),Object.entries(p.value).length===0&&o.value.length>0?(K(),Ce("div",{key:0,class:U(S.$style["no-columns"])},[...y[4]||(y[4]=[yt(" No results. ",-1),me("br",null,null,-1),yt(" Try another search. ",-1)])],2)):ot("",!0),me("div",{class:U(S.$style["column-config__list"])},[c.value.length>0?(K(),Ce("div",{key:0,class:U(S.$style["column-config__pinned-section"])},[(K(!0),Ce(At,null,wn(c.value,E=>rt((K(),Qe(PC,{key:E.field,item:E,disabled:!1,readOnly:!0,columnStates:a.value},null,8,["item","columnStates"])),[[Jr,p.value[E.field]||!o.value]])),128))],2)):ot("",!0),be(yj,{modelValue:h.value,"onUpdate:modelValue":y[1]||(y[1]=E=>h.value=E),"group-name":"columns",onUpdate:b,disabled:i.disabled,readOnly:i.readOnly},{item:xe(({item:E})=>[rt(be(PC,{item:E,columnStates:a.value,disabled:i.disabled,readOnly:i.readOnly,onToggleColumn:R},null,8,["item","columnStates","disabled","readOnly"]),[[Jr,p.value[E.field]||!o.value]])]),_:1},8,["modelValue","disabled","readOnly"]),d.value.length>0?(K(),Ce("div",{key:1,class:U(S.$style["column-config__pinned-section"])},[(K(!0),Ce(At,null,wn(d.value.filter(E=>{var F;return E.headerName&&((F=E.headerName)==null?void 0:F.length)>0}),E=>rt((K(),Qe(PC,{key:E.field,item:E,disabled:i.disabled,readOnly:i.readOnly,columnStates:a.value},null,8,["item","disabled","readOnly","columnStates"])),[[Jr,p.value[E.field]||!o.value]])),128))],2)):ot("",!0)],2),me("div",{class:U(S.$style["column-config__footer"])},[be(wt,{type:"button",variant:"secondary",disabled:!0},{default:xe(()=>[...y[5]||(y[5]=[me("span",null,"Add Column",-1)])]),_:1})],2)],2)],2)],2))}}),[["__cssModules",{$style:{"table-customization":"_table-customization_apyis_1","table-customization__trigger":"_table-customization__trigger_apyis_7","column-config":"_column-config_apyis_23","column-config__header":"_column-config__header_apyis_33","icon-color":"_icon-color_apyis_43","column-config__list":"_column-config__list_apyis_46","column-config__section-label":"_column-config__section-label_apyis_50","column-config__footer":"_column-config__footer_apyis_59","column-config__add-button":"_column-config__add-button_apyis_62","cs-icon":"_cs-icon_apyis_80","no-columns":"_no-columns_apyis_84"}}]]),bj=St(at({__name:"StatusSelect",props:{modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=[{label:"Online",value:"online",color:"green"},{label:"Offline",value:"offline",color:"gray"},{label:"Busy",value:"busy",color:"red"},{label:"Away",value:"away",color:"yellow"}],i=e,s=oe(i.modelValue),o=W(()=>i.modelValue||"Select status"),r=W(()=>{const a="red";return{backgroundColor:a,border:qm(a,"white")?"1px solid #ccc":"1px solid #fff"}});return(a,l)=>(K(),Qe(N4,{options:n,value:s.value},{trigger:xe(({visibled:u})=>[be(Us,{actived:u,class:U(a.$style["status-wrapper"])},{suffix:xe(()=>[be(ut,{src:"ChevronUp",source:"remote",class:U([[a.$style["dropdown-icon"]],{[a.$style["dropdown-icon-show"]]:!u}])},null,8,["class"])]),default:xe(()=>[me("div",{class:U(a.$style.status)},[me("div",{class:U(a.$style["color-indicator"]),style:dn(r.value)},null,6),yt(" "+pt(o.value),1)],2)]),_:2},1032,["actived","class"])]),options:xe(()=>[(K(),Ce(At,null,wn(n,u=>be(xc,{key:u.value,label:u.label,value:u,type:"status",data:{color:u.color}},null,8,["label","value","data"])),64))]),_:1},8,["value"]))}}),[["__cssModules",{$style:{"status-wrapper":"_status-wrapper_tjjfy_1",status:"_status_tjjfy_1","color-indicator":"_color-indicator_tjjfy_11","dropdown-icon":"_dropdown-icon_tjjfy_16","dropdown-icon-show":"_dropdown-icon-show_tjjfy_22"}}]]),Sj=St(at({name:"EmptyData",__name:"EmptyData",props:{isSearching:{type:Boolean},isFiltering:{type:Boolean}},setup(e){const t=e,n={noData:"No data available.",noSearchResults:"No results. Try another search.",noFilterResults:"No results. Try another filter."},i=W(()=>t.isSearching||t.isFiltering?"NoDataSearchFilter":"ClickToCreate"),s=W(()=>t.isSearching?n.noSearchResults:t.isFiltering?n.noFilterResults:n.noData);return(o,r)=>(K(),Ce("div",{class:U(o.$style["no-data-item-table"])},[me("div",{class:U(o.$style.visual)},[be(G3,{source:"remote",src:i.value,ratio:"4/3",maxWidth:500,maxHeight:350},null,8,["src"])],2),me("div",{class:U(o.$style.description)},pt(s.value),3)],2))}}),[["__cssModules",{$style:{"no-data-item-table":"_no-data-item-table_oh0wi_1",visual:"_visual_oh0wi_12",description:"_description_oh0wi_19"}}]]),d_=c_("sortStore",()=>{const e=oe({}),t={id:"id",name:"name",isStated:"actual_start_date",isCompleted:"actual_due_date",lastUpdated:"updated_at",completedOn:"due_date",status:"template_flow_status",assignees:"assignee"},n={start_asc:{column:"start_date",direction:"asc"},start_desc:{column:"start_date",direction:"desc"},due_asc:{column:"due_date",direction:"asc"},due_desc:{column:"due_date",direction:"desc"}},i=W(()=>{const a=e.value;return Object.values(a).filter(u=>u.sort!=="none"&&!!u.sort).map(u=>{let c;switch(u.colId){case"dateRange":c=n[u.sort];break;default:if(u.colId.includes("metric")){const[d,h]=u.colId.split("_");c={column:d,direction:u.sort,type:h}}else c={column:t[u.colId]||u.colId,direction:u.sort};break}return c})}),s=(a,l)=>{e.value={[a]:{colId:a,sort:l}}},o=()=>{e.value={}},r=oe(!1);return{sortingAPIConfiguration:i,sorts:e,setSort:s,clearSorting:o,isSortingRunning:r}}),ga=at({name:"HeaderSorting",__name:"HeaderWrapper",props:{params:{},headerType:{},disabled:{type:Boolean},readOnly:{type:Boolean}},setup(e){const t=e,n=d_(),{sorts:i}=_C(n),s=W(()=>t.params.column.getColId()),o=a=>{s.value&&n.setSort(s.value,a)},r=oe("none");return vt(()=>i.value,$s(()=>{if(s.value){const a=i.value[s.value];r.value=a?a.sort:"none"}},200),{deep:!0,immediate:!0}),(a,l)=>s.value?(K(),Qe(V4,gn({key:0},t,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=u=>r.value=u),onSortChanged:o}),null,16,["modelValue"])):ot("",!0)}}),Ej={class:"create-scenes-body"},Rj={class:"step step-1-download-sample"},Dj={class:"step step-2-upload-file"},Fj={class:"drop-area-content"},Tj={class:"step step-3-select-status"},xj={class:"step description"},_j=St(at({__name:"PopupCreateScenes",setup(e,{expose:t}){const n=oe(null),i=oe(null),s=oe(!1),o=()=>{n.value&&n.value.show()},r=()=>{var p;(p=i.value)==null||p.click()},a=p=>{s.value=!0},l=p=>{s.value=!1},u=p=>{var C;s.value=!1;const g=(C=p.dataTransfer)==null?void 0:C.files;g&&g.length>0&&d(g[0])},c=p=>{const C=p.target.files;C&&C.length>0&&d(C[0])},d=p=>{console.log("Selected file:",p)};Kn(()=>{xn(()=>{})}),t({open:o});const h=oe(null);return(p,g)=>(K(),Qe(Z(W4),{"popup-name":"Create Scenes","show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:n},{default:xe(()=>[me("div",Ej,[me("div",Rj,[g[3]||(g[3]=me("h2",null,"Step 1: Download sample",-1)),g[4]||(g[4]=me("p",null,"This file contains all columns available for editing.",-1)),be(Z(wt),{class:"download-sample-btn",size:12,variant:"secondary"},{prefix:xe(()=>[be(Z(ut),{src:"Download"})]),default:xe(()=>[g[2]||(g[2]=yt(" Download sample file ",-1))]),_:1})]),me("div",Dj,[g[6]||(g[6]=me("h2",null,"Step 2: Upload file (.xlsx, .xls, .csv)",-1)),me("div",{class:U(["drop-area",{"is-dragging":s.value}]),onDragenter:Ut(a,["prevent"]),onDragover:g[0]||(g[0]=Ut(()=>{},["prevent"])),onDragleave:Ut(l,["prevent"]),onDrop:Ut(u,["prevent"]),onClick:r},[me("div",Fj,[be(Z(ut),{src:"Upload",size:"48"}),g[5]||(g[5]=me("p",null,[yt(" Drag & drop your file here or "),me("span",{class:"browse"},"browse")],-1))]),me("input",{ref_key:"fileInput",ref:i,type:"file",style:{display:"none"},accept:".xlsx, .xls, .csv",onChange:c},null,544)],34)]),me("div",Tj,[g[7]||(g[7]=me("h2",null,"Step 3: Select status",-1)),be(Z(bj),{modelValue:h.value,"onUpdate:modelValue":g[1]||(g[1]=C=>h.value=C)},null,8,["modelValue"])]),me("div",xj,[g[9]||(g[9]=me("h3",null,"Date format guide",-1)),g[10]||(g[10]=yt(" Ensure all dates follow one of the two formats below: ",-1)),g[11]||(g[11]=me("ul",null,[me("li",null,"DD MM YYYY (Day-Month-Year)"),me("li",null,"YYYY MM DD (Year-Month-Day)")],-1)),be(Z(wt),null,{prefix:xe(()=>[be(Z(ut),{src:"InfoCircle"})]),default:xe(()=>[g[8]||(g[8]=yt(" Check valid formats ",-1))]),_:1})])])]),_:1},512))}}),[["__scopeId","data-v-02954980"]]),Pj={status:$4,dateRange:R4,checkbox:void 0,dateTime:P4,format:void 0,number:void 0,rating:lT,more:B3,assignee:E4,name:oT,text:p4,metric:M4},Aj={status:!0,dateRange:!0,checkbox:!0,dateTime:!1,format:!1,number:!1,rating:!1,more:!1,assignee:!0,name:!1,text:!1,metric:!1},Ij={status:iT,checkbox:"agCheckboxCellEditor",dateTime:null,format:rT,number:"agNumberCellEditor",more:aT,assignee:XF,dateRange:D4,rating:null,name:oT,text:null,metric:null},h_={status:[200,200],dateRange:[255,255],checkbox:[50,50],dateTime:[200,200],format:[200,200],number:[200,200],rating:[200,200],more:[50,50],assignee:[200,200],name:[300,window.innerWidth*.7],text:[200,500],metric:[200,300]},kj={dateRange:{cellEditorPopupPosition:"under",cellEditorPopup:!1},name:{cellEditorPopupPosition:"over",cellEditor:!1,cellEditorPopup:!1},metric:{suppressKeyboardEvent:void 0,suppressNavigable:!1,suppressMovable:!1,cellClass:"ag-cell-optimized"}};class ma{static initialize(t){this.wrappers=t}static getWrappers(){if(!this.wrappers)throw new Error("CellRendererFactory: Not initialized. Please call CellRendererFactory.initialize() first.");return this.wrappers}static buildCommonCellParams(t){var o,r;const n=t.data||((o=t.node)==null?void 0:o.data),i=(r=t.colDef)==null?void 0:r.field,s=i&&n?n[i]:void 0;return{...t,value:s}}static fromType(t,n){var v,b;const{wrapVueCellRenderer:i,wrapVueCellEditor:s}=this.getWrappers(),o=Pj[t],r=Ij[t],a=Aj[t]??!1,l={minWidth:((v=h_[t])==null?void 0:v[0])||250,maxWidth:((b=h_[t])==null?void 0:b[1])||250},u=kj[t]||{},c=R=>!!R&&typeof R!="string",d=c(o)?i(o):o,h=n.editable??a;let p={};const g=n.cellRendererParams?n.cellRendererParams:this.buildCommonCellParams;return h&&r&&(p={cellEditor:c(r)?s(r):r,cellEditorParams:g,singleClickEdit:!0,cellEditorPopup:!0,cellEditorPopupPosition:"under"}),{headerName:t,...l,cellRenderer:d,editable:h,...n,...p,...u,context:{...n.context,workspaceId:this.workspaceId,entityId:this.entityId},cellRendererParams:g,headerComponentParams:R=>({...typeof n.headerComponentParams=="function"?n.headerComponentParams(R):n.headerComponentParams,headerType:t})}}}rn(ma,"wrappers",null),rn(ma,"workspaceId",""),rn(ma,"entityId","");function Oj(e){return"stopEditing"in e}const Mj=at({name:"AgGridVue3CellWrapper",props:{component:{type:Object,required:!0},params:{type:Object,required:!0},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},value:{type:null,default:void 0},data:{type:Object,default:void 0},id:{type:[String,Number],default:void 0},tooltip:{type:[String,Number],default:void 0},isNoData:{type:Boolean,default:!1},workspaceId:{type:String,default:void 0},entityId:{type:String,default:void 0},axiosService:{type:Object,default:void 0},isSearching:{type:Boolean,default:!1},isFiltering:{type:Boolean,default:!1}},setup(e){var n;const t=((n=e.component)==null?void 0:n.default)||e.component;return t||console.error("[Vue3CellWrapper] Invalid component provided:",e.component),()=>be(t,{...e})}}),Lj=()=>`${Math.max(50,Math.round(mz(0,100)))}%`,Nj=8,Vj=e=>e?e.querySelectorAll("*").length+1:0,Bj=e=>e?Object.keys(e).filter(t=>/^on[A-Z]/.test(t)).length:0;function f_(e){return class{constructor(){rn(this,"container");rn(this,"vNode",null);rn(this,"componentInstance",null);rn(this,"params");rn(this,"isEditor",!1)}init(n){var l,u,c,d,h,p,g;if(!n){console.error("[Vue3CellWrapper] Missing context information: workspaceId or entityId. Cannot initialize wrapper.");return}const i=performance.now(),s=n.context.apiClass;this.params=n,this.isEditor=Oj(n),this.container=document.createElement("div"),this.container.classList.add("ag-vue3-cell-wrapper"),this.container.classList.add(`${e.name||"unknown-component"}`),this.container.style.setProperty("--loading-overlay-width",Lj()),this.container.style.width="100%",this.container.style.height="100%";const o=Object.freeze(n),r={component:e,params:o,disabled:n.disabled??!1,readOnly:n.readOnly??!1,value:n.value,data:n.data,id:(l=n==null?void 0:n.data)==null?void 0:l.id,workspaceId:n.context.workspaceId,entityId:n.context.entityId,axiosService:s,tooltip:n.tooltip??void 0,isSearching:n.isSearching??!1,isNoData:n.isNoData??!1};this.vNode=be(Mj,r),z0(this.vNode,this.container);const a=performance.now()-i;if(a>Nj){console.warn(`[Vue3CellWrapper] Slow render detected (${a.toFixed(1)}ms) for component "${(u=n.colDef)==null?void 0:u.field}" and field "${(c=n.data)==null?void 0:c.id}"`);{const C=Vj(this.container),v=Bj((d=this.vNode)==null?void 0:d.props),b=Object.keys(((h=this.vNode)==null?void 0:h.props)||{}).length,R=Object.keys(n.context||{}).length;console.debug("[Vue3CellWrapper] Render diagnostics",{field:(p=n.colDef)==null?void 0:p.field,domCount:C,eventProps:v,propCount:b,contextCount:R,durationMs:a.toFixed(1)})}}this.componentInstance=(g=this.vNode.component)==null?void 0:g.proxy,this.componentInstance||console.warn("[Vue3CellWrapper] Component instance not available after render")}getGui(){return this.container}refresh(n){return!1}getValue(){var n,i,s;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((s=(i=this.componentInstance).getValue)==null?void 0:s.call(i))??this.componentInstance.value:(console.warn("[Vue3CellWrapper] getValue() called but component instance not available"),(n=this.params)==null?void 0:n.value)}isPopup(){var n;return this.isEditor?(n=this.componentInstance)!=null&&n.isPopup?this.componentInstance.isPopup():!0:!1}getPopupPosition(){var i,s,o;return this.isEditor?(i=this.componentInstance)!=null&&i.getPopupPosition?this.componentInstance.getPopupPosition():((o=(s=this.params)==null?void 0:s.colDef)==null?void 0:o.cellEditorPopupPosition)??"under":void 0}afterGuiAttached(){!this.isEditor||this.componentInstance}destroy(){if(!(!this.container||!this.vNode))try{this.componentInstance&&(typeof this.componentInstance.$destroy=="function"&&this.componentInstance.$destroy(),typeof this.componentInstance.destroy=="function"&&this.componentInstance.destroy()),Promise.resolve().then(()=>{try{z0(null,this.container)}catch(n){console.warn("[Vue3CellWrapper] Error during unmount:",n)}})}catch(n){console.error("[Vue3CellWrapper] Error during cleanup:",n)}finally{this.vNode=null,this.componentInstance=null}}}}function Of(e){return f_(e)}function p_(e){return f_(e)}var va=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,n){const i=t?this.allAsyncListeners:this.allSyncListeners;let s=i.get(e);return!s&&n&&(s=new Set,i.set(e,s)),s}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,n=!1){this.getListeners(e,n,!0).add(t)}removeEventListener(e,t,n=!1){const i=this.getListeners(e,n,!1);i&&(i.delete(t),i.size===0&&(n?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const n=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:i}=this,s=a=>{const l=i?()=>i.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},o=this.getListeners(n,t,!1);if(((o==null?void 0:o.size)??0)>0){const a=new Set(o);for(const l of a)o!=null&&o.has(l)&&s(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)s(()=>l(n,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}};function Ao(e){return e==null||e===""?null:e}function ze(e){return e!=null&&e!==""}function nn(e){return!ze(e)}function AC(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Bc(e,t){const n=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return n===i}function Hj(e,t,n=!1){const i=e==null,s=t==null;if(e!=null&&e.toNumber&&(e=e.toNumber()),t!=null&&t.toNumber&&(t=t.toNumber()),i&&s)return 0;if(i)return-1;if(s)return 1;function o(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!n)return o(e,t);try{return e.localeCompare(t)}catch{return o(e,t)}}var Gj=/[&<>"']/g,$j={"&":"&","<":"<",">":">",'"':""","'":"'"};function Nl(e){return(e==null?void 0:e.toString().toString())??null}function Hc(e){var t;return((t=Nl(e))==null?void 0:t.replace(Gj,n=>$j[n]))??null}function qs(e){return e.eRootDiv.getRootNode()}function an(e){return qs(e).activeElement}function Mn(e){const{gos:t,eRootDiv:n}=e;let i=null;const s=t.get("getDocument");return s&&ze(s)?i=s():n&&(i=n.ownerDocument),i&&ze(i)?i:document}function g_(e){const t=an(e);return t===null||t===Mn(e).body}function m_(e){return Mn(e).defaultView||window}function IC(e){let t=null,n=null;try{t=Mn(e).fullscreenElement}catch{}finally{t||(t=qs(e));const i=t.querySelector("body");i?n=i:t instanceof ShadowRoot?n=t:t instanceof Document?n=t==null?void 0:t.documentElement:n=t}return n}function Wj(e){const t=IC(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function zj(e){const t=IC(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function Es(e,t,n){n==null||typeof n=="string"&&n==""?v_(e,t):Xi(e,t,n)}function Xi(e,t,n){e.setAttribute(C_(t),n.toString())}function v_(e,t){e.removeAttribute(C_(t))}function C_(e){return`aria-${e}`}function dr(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Uj(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function jj(e){return e.getAttribute("aria-label")}function Vl(e,t){Es(e,"label",t)}function Gc(e,t){Es(e,"labelledby",t)}function y_(e,t){Es(e,"live",t)}function Kj(e,t){Es(e,"atomic",t)}function qj(e,t){Es(e,"relevant",t)}function Yj(e,t){Es(e,"invalid",t)}function Zj(e,t){Es(e,"disabled",t)}function w_(e,t){Es(e,"hidden",t)}function kC(e,t){Xi(e,"expanded",t)}function Jj(e,t){Xi(e,"setsize",t)}function Qj(e,t){Xi(e,"posinset",t)}function Xj(e,t){Xi(e,"multiselectable",t)}function e8(e,t){Xi(e,"rowcount",t)}function Mf(e,t){Xi(e,"rowindex",t)}function t8(e,t){Xi(e,"rowspan",t)}function n8(e,t){Xi(e,"colcount",t)}function b_(e,t){Xi(e,"colindex",t)}function i8(e,t){Xi(e,"colspan",t)}function s8(e,t){Xi(e,"sort",t)}function o8(e){v_(e,"sort")}function S_(e,t){Es(e,"selected",t)}function r8(e,t){Es(e,"controls",t)}function a8(e,t){r8(e,t.id),Gc(t,e.id)}function E_(e,t){Es(e,"owns",t)}function Lf(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var l8="[tabindex], input, select, button, textarea, [href]",R_="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function $c(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(R_)?!1:Ys(e)}function sn(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-hidden",!t),i||w_(e,!t)}function u8(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-invisible",!t),i||w_(e,!t)}function Wc(e,t){const n="disabled",i=t?o=>o.setAttribute(n,""):o=>o.removeAttribute(n);i(e);const s=e.querySelectorAll("input")??[];for(const o of s)i(o)}function Ca(e,t,n){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof n=="number"){if(++i>n)break}else if(e===n)break}return!1}function ya(e){const{height:t,width:n,borderTopWidth:i,borderRightWidth:s,borderBottomWidth:o,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:u,paddingLeft:c,marginTop:d,marginRight:h,marginBottom:p,marginLeft:g,boxSizing:C}=window.getComputedStyle(e),v=Number.parseFloat;return{height:v(t||"0"),width:v(n||"0"),borderTopWidth:v(i||"0"),borderRightWidth:v(s||"0"),borderBottomWidth:v(o||"0"),borderLeftWidth:v(r||"0"),paddingTop:v(a||"0"),paddingRight:v(l||"0"),paddingBottom:v(u||"0"),paddingLeft:v(c||"0"),marginTop:v(d||"0"),marginRight:v(h||"0"),marginBottom:v(p||"0"),marginLeft:v(g||"0"),boxSizing:C}}function OC(e){const t=ya(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function zc(e){const t=ya(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function D_(e){const{height:t,marginBottom:n,marginTop:i}=ya(e);return Math.floor(t+n+i)}function Nf(e){const{width:t,marginLeft:n,marginRight:i}=ya(e);return Math.floor(t+n+i)}function F_(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:i,borderRightWidth:s,borderBottomWidth:o}=ya(e);return{top:t.top+(n||0),left:t.left+(i||0),right:t.right+(s||0),bottom:t.bottom+(o||0)}}function Vf(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function Bf(e,t,n){n&&(t*=-1),e.scrollLeft=t}function Hn(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function Rs(e){e!=null&&e.parentNode&&e.remove()}function T_(e){return!!e.offsetParent}function Ys(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!T_(e)||window.getComputedStyle(e).visibility!=="visible")}function MC(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function x_(e,t,n){n&&n.nextSibling===t||(e.firstChild?n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function __(e,t){for(let n=0;n<t.length;n++){const i=t[n],s=e.children[n];s!==i&&e.insertBefore(i,s)}}function c8(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Uc(e,t){if(t)for(const n of Object.keys(t)){const i=t[n];if(!(n!=null&&n.length)||i==null)continue;const s=c8(n),o=i.toString(),r=o.replace(/\s*!important/g,""),a=r.length!=o.length?"important":void 0;e.style.setProperty(s,r,a)}}function Hf(e){return()=>{const t=e();return t?LC(t)||P_(t):!0}}function LC(e){return e.clientWidth<e.scrollWidth}function P_(e){return e.clientHeight<e.scrollHeight}function Gf(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Zs(e,t)}function Zs(e,t){t=NC(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function jc(e,t){t=NC(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function NC(e){return typeof e=="number"?`${e}px`:e}function VC(e){return e instanceof Node||e instanceof HTMLElement}function Mi(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function hr(e,t,n){const s=m_(e).ResizeObserver,o=s?new s(n):null;return o==null||o.observe(t),()=>o==null?void 0:o.disconnect()}function Io(e,t){const n=m_(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var A_="data-ref",BC;function I_(){return BC??(BC=document.createTextNode(" ")),BC.cloneNode()}function Kc(e){const{attrs:t,children:n,cls:i,ref:s,role:o,tag:r}=e,a=document.createElement(r);if(i&&(a.className=i),s&&a.setAttribute(A_,s),o&&a.setAttribute("role",o),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(n)if(typeof n=="string")a.textContent=n;else{let l=!0;for(const u of n)u&&(typeof u=="string"?(a.appendChild(document.createTextNode(u)),l=!1):typeof u=="function"?a.appendChild(u()):(l&&(a.appendChild(I_()),l=!1),a.append(Kc(u)),a.appendChild(I_())))}return a}var d8=["touchstart","touchend","touchmove","touchcancel","scroll"],h8=["wheel"],HC={},k_=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof HC[n]=="boolean")return HC[n];const i=document.createElement(e[n]||"div");return n="on"+n,HC[n]=n in i}})();function f8(e,t){return!t||!e?!1:g8(t).indexOf(e)>=0}function p8(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function g8(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():p8(t)}function m8(e,t,n){const i=v8(t);let s;i!=null&&(s={passive:i}),e.addEventListener(t,n,s)}var v8=e=>{const t=d8.includes(e),n=h8.includes(e);if(t)return!0;if(n)return!1};function O_(e,t,n){if(n===0)return!1;const i=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(i,s)<=n}var qc=(e,t)=>{const n=e.identifier;for(let i=0,s=t.length;i<s;++i){const o=t[i];if(o.identifier===n)return o}return null};function Yc(e,t){return e.gos.isElementInThisInstance(t.target)}function C8(e,t,n){const s=e.getBoundingClientRect().height,o=Wj(n)-2,r=zj(n)-2;if(!e.offsetParent)return;const l=F_(e.offsetParent),{clientY:u,clientX:c}=t;let d=u-l.top-s/2,h=c-l.left-10;const p=Mn(n),g=p.defaultView||window,C=g.pageYOffset||p.documentElement.scrollTop,v=g.pageXOffset||p.documentElement.scrollLeft;o>0&&h+e.clientWidth>o+v&&(h=o+v-e.clientWidth),h<0&&(h=0),r>0&&d+e.clientHeight>r+C&&(d=r+C-e.clientHeight),d<0&&(d=0),e.style.left=`${h}px`,e.style.top=`${d}px`}var $f=(e,...t)=>{for(const n of t){const[i,s,o,r]=n;i.addEventListener(s,o,r),e.push(n)}},GC=e=>{if(e){for(const[t,n,i,s]of e)t.removeEventListener(n,i,s);e.length=0}},fr=e=>{e.cancelable&&e.preventDefault()};function y8(e,t){return t}function M_(e){return(e==null?void 0:e.getLocaleTextFunc())??y8}function w8(e,t,n,i){const s=t[n];return e.getLocaleTextFunc()(n,typeof s=="function"?s(i):s,i)}function b8(e){return(t,n,i)=>e({key:t,defaultValue:n,variableValues:i})}function S8(e){return(t,n,i)=>{let s=e==null?void 0:e[t];if(s&&(i!=null&&i.length)){let o=0;for(;!(o>=i.length||s.indexOf("${variable}")===-1);)s=s.replace("${variable}",i[o++])}return s??n}}var Js=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,n){this.localEventService||(this.localEventService=new va),this.localEventService.addEventListener(e,t,n)}removeEventListener(e,t,n){var i;(i=this.localEventService)==null||i.removeEventListener(e,t,n)}dispatchLocalEvent(e){var t;(t=this.localEventService)==null||t.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const n=[];for(const i of Object.keys(t)){const s=t[i];s&&n.push(this._setupListener(e,i,s))}return n}_setupListener(e,t,n){if(this.destroyed)return()=>null;let i;if(E8(e))e.__addEventListener(t,n),i=()=>(e.__removeEventListener(t,n),null);else{const s=R8(e);e instanceof HTMLElement?m8(e,t,n):s?e.addListener(t,n):e.addEventListener(t,n),i=s?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}setupPropertyListener(e,t){const{gos:n}=this;n.addPropertyEventListener(e,t);const i=()=>(n.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const n=e.join("-")+this.propertyListenerId++,i=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=s.changeSet.id}const o={type:"propertyChanged",changeSet:s.changeSet,source:s.source};t(o)};for(const s of e)this.setupPropertyListener(s,i)}getLocaleTextFunc(){return M_(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const n=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),n}createBean(e,t,n){return(t||this.stubContext).createBean(e,n)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function E8(e){return e.__addEventListener!==void 0}function R8(e){return e.eventServiceType==="global"}var ve=class extends Js{},L_={};function $C(e,t){L_[t]||(e(),L_[t]=!0)}var D8={pending:!1,funcs:[]},F8={pending:!1,funcs:[]};function WC(e,t="setTimeout",n){const i=t==="raf"?F8:D8;if(i.funcs.push(e),i.pending)return;i.pending=!0;const s=()=>{const o=i.funcs.slice();i.funcs.length=0,i.pending=!1;for(const r of o)r()};t==="raf"?Io(n,s):window.setTimeout(s,0)}function Gn(e,t,n){let i;return function(...s){const o=this;window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(o,s)},n)}}function N_(e,t){let n=0;return function(...i){const s=this,o=Date.now();o-n<t||(n=o,e.apply(s,i))}}function T8(e,t,n,i=100){const s=Date.now();let o=null,r=!1;const a=()=>{o!=null&&(window.clearInterval(o),o=null)};e.addDestroyFunc(a);const l=()=>{const u=Date.now()-s>i;(t()||u)&&(n(),r=!0,a())};l(),r||(o=window.setInterval(l,10))}var V_=new Set(["__proto__","constructor","prototype"]);function x8(e,t){if(e!=null){if(Array.isArray(e)){for(let n=0;n<e.length;n++)t(n.toString(),e[n]);return}for(const n of Object.keys(e).filter(i=>!V_.has(i)))t(n,e[n])}}function di(e,t,n=!0,i=!1){ze(t)&&x8(t,(s,o)=>{let r=e[s];r!==o&&(i&&r==null&&o!=null&&typeof o=="object"&&o.constructor===Object&&(r={},e[s]=r),B_(o)&&B_(r)&&!Array.isArray(r)?di(r,o,n,i):(n||o!==void 0)&&(e[s]=o))})}function B_(e){return typeof e=="object"&&e!==null}var zC=class Ko{static applyGlobalGridOptions(t){if(!Ko.gridOptions)return{...t};let n={};return di(n,Ko.gridOptions,!0,!0),Ko.mergeStrategy==="deep"?di(n,t,!0,!0):n={...n,...t},Ko.gridOptions.context&&(n.context=Ko.gridOptions.context),t.context&&(Ko.mergeStrategy==="deep"&&n.context&&di(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(Ko.mergeStrategy==="deep"){const i=_8(t);if(i&&typeof i=="object"&&typeof n=="object")return Ko.applyGlobalGridOptions({[t]:n})[t]}return n}};zC.gridOptions=void 0,zC.mergeStrategy="shallow";var UC=zC;function _8(e){var t;return(t=UC.gridOptions)==null?void 0:t[e]}var P8={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1,enableFilterHandlers:!1},H_="https://www.ag-grid.com";function pr(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function Zc(e,...t){$C(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function Bl(e,...t){$C(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var G_=new Set,Wf={},Hl={},zf,$_=!1,W_=!1,A8=!1;function I8(e){const[t,n]=e.version.split(".")||[],[i,s]=zf.split(".")||[];return t===i&&n===s}function k8(e){var i;zf||(zf=e.version);const t=s=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${s} Please update all modules to the same version.`;e.version?I8(e)||Bl(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${zf}.`)):Bl(t(`'${e.moduleName}' is incompatible.`));const n=(i=e.validate)==null?void 0:i.call(e);n&&!n.isValid&&Bl(`${n.message}`)}function Jc(e,t,n=!1){n||($_=!0),k8(e);const i=e.rowModels??["all"];G_.add(e);let s;t!==void 0?(W_=!0,Hl[t]===void 0&&(Hl[t]={}),s=Hl[t]):s=Wf;for(const o of i)s[o]===void 0&&(s[o]={}),s[o][e.moduleName]=e;if(e.dependsOn)for(const o of e.dependsOn)Jc(o,t,n)}function O8(e){delete Hl[e]}function jC(e,t,n){const i=s=>{var o,r,a;return!!((o=Wf[s])!=null&&o[e])||!!((a=(r=Hl[t])==null?void 0:r[s])!=null&&a[e])};return i(n)||i("all")}function KC(){return W_}function M8(e,t){const n=Hl[e]??{};return[...Object.values(Wf.all??{}),...Object.values(n.all??{}),...Object.values(Wf[t]??{}),...Object.values(n[t]??{})]}function L8(){return new Set(G_)}function N8(){return $_}function V8(){return A8}var B8=class{static register(e){Jc(e,void 0)}static registerModules(e){for(const t of e)Jc(t,void 0)}},$e="34.3.1",z_=2e3,U_=100,j_="_version_",Uf=null,Gl=`${H_}/javascript-data-grid`;function H8(e){Uf=e}function G8(e){Gl=e}function K_(e,t,n){return(Uf==null?void 0:Uf(e,t))??[U8(e,t,n)]}function qC(e,t,n,i,s){e(`${i?"warning":"error"} #${t}`,...K_(t,n,s))}function $8(e){if(!e)return String(e);const t={};for(const n of Object.keys(e))typeof e[n]!="object"&&typeof e[n]!="function"&&(t[n]=e[n]);return JSON.stringify(t)}function W8(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=$8(e)),t}function jf(e){return e===void 0?"undefined":e===null?"null":e}function YC(e,t){return`${e}?${t.toString()}`}function z8(e,t,n){const i=Array.from(t.entries()).sort((o,r)=>r[1].length-o[1].length);let s=YC(e,t);for(const[o,r]of i){if(o===j_)continue;const a=s.length-n;if(a<=0)break;const l="...",u=a+l.length,c=r.length-u>U_?r.slice(0,r.length-u)+l:r.slice(0,U_)+l;t.set(o,c),s=YC(e,t)}return s}function q_(e,t){const n=new URLSearchParams;if(n.append(j_,$e),t)for(const o of Object.keys(t))n.append(o,W8(t[o]));const i=`${Gl}/errors/${e}`,s=YC(i,n);return s.length<=z_?s:z8(i,n,z_)}var U8=(e,t,n)=>{const i=q_(e,t);return`${`${n?n+`
|
|
89
89
|
`:""}Visit ${i}`}${n?"":`
|
|
90
90
|
Alternatively register the ValidationModule to see the full message in the console.`}`};function _e(...e){qC(Zc,e[0],e[1],!0)}function Kt(...e){qC(Bl,e[0],e[1],!1)}function Qc(e,t,n){qC(Bl,e,t,!1,n)}function j8(e,t){const n=t[0];return`error #${n} `+K_(n,t[1],e).join(" ")}function Qs(...e){return j8(void 0,e)}function Y_(e,t){return e.get("rowModelType")===t}function bn(e,t){return Y_(e,"clientSide")}function $l(e,t){return Y_(e,"serverSide")}function $n(e,t){return e.get("domLayout")===t}function wa(e){return Yf(e)!==void 0}function Z_(e){return typeof e.get("getRowHeight")=="function"}function K8(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function gr(e,t,n=!1,i){const{gos:s,environment:o}=e;if(i==null&&(i=o.getDefaultRowHeight()),Z_(s)){if(n)return{height:i,estimated:!0};const l={node:t,data:t.data},u=s.getCallback("getRowHeight")(l);if(ZC(u))return u===0&&_e(23),{height:Math.max(1,u),estimated:!1}}if(t.detail&&s.get("masterDetail"))return q8(s);const r=s.get("rowHeight");return{height:r&&ZC(r)?r:i,estimated:!1}}function q8(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return ZC(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function ba(e){const{environment:t,gos:n}=e,i=n.get("rowHeight");if(!i||nn(i))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(_e(24),t.getDefaultRowHeight())}function ZC(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function J_(e,t,n){const i=t[e.getDomDataKey()];return i?i[n]:void 0}function Sa(e,t,n,i){const s=e.getDomDataKey();let o=t[s];nn(o)&&(o={},t[s]=o),o[n]=i}function Wl(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function Q_(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||$n(e,"print"))}function Xs(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function JC(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function X_(e){return e.get("grandTotalRow")}function eP(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function tP(e,t,n){return!!t.group&&!t.footer&&eP(e,n)}function zl(e){const t=e.getCallback("getRowId");return t===void 0?t:n=>{let i=t(n);return typeof i!="string"&&($C(()=>_e(25,{id:i}),"getRowIdString"),i=String(i)),i}}function Y8(e,t){const n=e.get("groupHideParentOfSingleChild");return!!(n===!0||n==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function Z8(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function Ul(e){return(e==null?void 0:e.checkboxes)??!0}function Kf(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function qf(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function QC(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function J8(e){return typeof e.get("rowSelection")!="string"}function ko(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function nP(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const n=e.get("suppressRowClickSelection"),i=e.get("suppressRowDeselection");return n&&i?!1:n?"enableDeselection":i?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function Q8(e){const t=nP(e);return t===!0||t==="enableSelection"}function X8(e){const t=nP(e);return t===!0||t==="enableDeselection"}function XC(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function Yf(e){const t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t==null?void 0:t.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function Xc(e){return Yf(e)==="multiRow"}function eK(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function Zf(e){const t=e.get("rowSelection");if(typeof t=="string"){const n=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return n&&i?"filteredDescendants":n?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function iP(e,t=!0){const n=e.get("rowSelection");return typeof n!="object"?t?"all":void 0:n.mode==="multiRow"?n.selectAll:"all"}function tK(e){const t=e.get("rowSelection");return typeof t=="string"?!1:(t==null?void 0:t.mode)==="multiRow"?t.ctrlASelectsRows??!1:!1}function ed(e){const t=Zf(e);return t==="descendants"||t==="filteredDescendants"}function sP(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function nK(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function Li(e){return e.get("columnMenu")==="legacy"}function iK(e){return!Li(e)}function sK(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function lt(e,t){return e.addCommon(t)}function oP({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var oK={resizable:!0,sortable:!0},rK=0;function rP(){return rK++}function mr(e){return e instanceof Ea}var Ea=class extends ve{constructor(e,t,n,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=n,this.primary=i,this.isColumn=!0,this.instanceId=rP(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new va,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Hc(n)}destroy(){var e;super.destroy(),(e=this.beans.rowSpanSvc)==null||e.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:n,colFlex:i}}=this;t==null||t.initCol(this);const s=e.hide;s!==void 0?this.visible=!s:this.visible=!e.initialHide,n==null||n.initCol(this),i==null||i.initCol(this)}setColDef(e,t,n){var s;const i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&((s=this.beans.rowSpanSvc)==null||s.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",n)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.setState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:n}}=this,i=e.get("suppressFieldDotNotation");this.fieldContainsDots=ze(t)&&t.includes(".")&&!i,this.tooltipFieldContainsDots=ze(n)&&n.includes(".")&&!i}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){var e;(e=this.beans.tooltipSvc)==null||e.initCol(this)}initRowSpan(){var e;this.colDef.spanRows&&((e=this.beans.rowSpanSvc)==null||e.register(this))}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:n=>{const i=e.recreateColDef(this.colDef);this.setColDef(i,i,n.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const n=e.width,i=e.initialWidth;return n!=null?t=n:i!=null?t=i:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){var t;return((t=this.beans.showRowGroupCols)==null?void 0:t.isRowGroupDisplayed(this,e))??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){var i,s,o;this.frameworkEventListenerService=(s=(i=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:s.call(i,this.frameworkEventListenerService,this.colEventSvc);const n=((o=this.frameworkEventListenerService)==null?void 0:o.wrap(e,t))??t;this.colEventSvc.addEventListener(e,n)}removeEventListener(e,t){var i;const n=((i=this.frameworkEventListenerService)==null?void 0:i.unwrap(e,t))??t;this.colEventSvc.removeEventListener(e,n)}createColumnFunctionCallbackParams(e){return lt(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){var t;return((t=this.beans.cellNavigation)==null?void 0:t.isSuppressNavigable(this,e))??!1}isCellEditable(e){var t;return((t=this.beans.editSvc)==null?void 0:t.isCellEditable({rowNode:e,column:this}))??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){var t;return((t=this.beans.selectionSvc)==null?void 0:t.isCellCheckboxSelection(this,e))??!1}isSuppressPaste(e){var t;return this.isColumnFunc(e,((t=this.colDef)==null?void 0:t.suppressPaste)??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??oK[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const n=this.createColumnFunctionCallbackParams(e);return t(n)}return!1}createColumnEvent(e,t){return lt(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return nn(this.sort)}isSorting(){return ze(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){var e;return _e(261),!!((e=this.beans.colHover)!=null&&e.isHovered(this))}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const n=e===!0;this.visible!==n&&(this.visible=n,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e!=null&&e.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!(e!=null&&e.isPadding()))return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let n=!0;for(;e;){if(!e.isPadding()){n=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:n}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return lt(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(nn(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.colSpan(t);return Math.max(n,1)}getRowSpan(e){if(nn(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.rowSpan(t);return Math.max(n,1)}setActualWidth(e,t,n=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),n||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchColEvent(e,t,n){const i=this.createColumnEvent(e,t);n&&di(i,n),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function Jn(e){return e instanceof Jf}var Jf=class extends ve{constructor(e,t,n,i){super(),this.colGroupDef=e,this.groupId=t,this.padding=n,this.level=i,this.isColumn=!1,this.expandable=!1,this.instanceId=rP(),this.expandableListenerRemoveCallback=null,this.expanded=!!(e!=null&&e.openByDefault)}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(const t of this.children)mr(t)?e(t):Jn(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)mr(t)?e.push(t):Jn(t)&&t.addLeafColumns(e)}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);for(const t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(const t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,n=!1;const i=this.findChildrenRemovingPadding();for(let o=0,r=i.length;o<r;o++){const a=i[o];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,n=!0):l==="closed"?(t=!0,n=!0):(e=!0,t=!0)}const s=e&&t&&n;this.expandable!==s&&(this.expandable=s,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=n=>{for(const i of n)Jn(i)&&i.isPadding()?t(i.children):e.push(i)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},aK={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function aP(e,t,n){const i={},s=e.gos;return Object.assign(i,s.get("defaultColGroupDef")),Object.assign(i,t),s.validateColDef(i,n),i}var lK=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=AC(e);let n=0;for(;;){let i=e??t;if(i?n!==0&&(i+="_"+n):i=n,!this.existingKeys[i]){const s=String(i);return e&&n>0&&_e(273,{providedId:e,usedId:s}),this.existingKeys[s]=!0,s}n++}}};function Yt(e){if(e!=null&&e.length)return e[e.length-1]}function vr(e,t,n){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const i=e.length;if(i!==t.length)return!1;for(let s=0;s<i;s++)if(e[s]!==t[s]&&!(n!=null&&n(e[s],t[s])))return!1;return!0}function td(e,t){if(e)for(const n of e)t(n)}function Ds(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}function lP(e,t,n){for(let i=0;i<t.length;i++)Ds(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(n,0,t[i])}var Qf="ag-Grid-AutoColumn",uP="ag-Grid-SelectionColumn",cP="ag-Grid-RowNumbersColumn";function dP(e){const t=[],n=i=>{for(let s=0;s<i.length;s++){const o=i[s];mr(o)?t.push(o):Jn(o)&&n(o.getChildren())}};return n(e),t}function Oo(e){return e.reduce((t,n)=>t+n.getActualWidth(),0)}function Xf(e,t,n){const i={};if(!t)return;No(null,t,o=>{i[o.getInstanceId()]=o}),n&&No(null,n,o=>{i[o.getInstanceId()]=null});const s=Object.values(i).filter(o=>o!=null);e.context.destroyBeans(s)}function ey(e){return e.getId().startsWith(Qf)}function Mo(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(uP))??!1}function Lo(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(cP))??!1}function uK(e){return Mo(e)||Lo(e)}function ep(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function cK(e,t){return vr(e,t,(n,i)=>n.getColId()===i.getColId())}function dK(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function jl(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function nd(e,t){const n=e===t,i=e.getColDef()===t,s=e.getColId()==t;return n||i||s}var hK=(e,t)=>(n,i)=>{const s={value1:void 0,value2:void 0};let o=!1;return e&&(e[n]!==void 0&&(s.value1=e[n],o=!0),ze(i)&&e[i]!==void 0&&(s.value2=e[i],o=!0)),!o&&t&&(t[n]!==void 0&&(s.value1=t[n]),ze(i)&&t[i]!==void 0&&(s.value2=t[i])),s},fK=(e,t)=>{Jn(e)&&e.setupExpandable(),e.originalParent=t};function pK(e,t=null,n,i,s){const o=new lK,{existingCols:r,existingGroups:a,existingColKeys:l}=gK(i);o.addExistingKeys(l);const u=hP(e,t,0,n,r,o,a,s),{colGroupSvc:c}=e,d=(c==null?void 0:c.findMaxDepth(u,0))??0,h=c?c.balanceColumnTree(u,0,d,o):u;return No(null,h,fK),{columnTree:h,treeDepth:d}}function gK(e){const t=[],n=[],i=[];return e&&No(null,e,s=>{if(Jn(s)){const o=s;n.push(o)}else{const o=s;i.push(o.getId()),t.push(o)}}),{existingCols:t,existingGroups:n,existingColKeys:i}}function hP(e,t,n,i,s,o,r,a){if(!t)return[];const{colGroupSvc:l}=e,u=new Array(t.length);for(let c=0;c<u.length;c++){const d=t[c];l&&bK(d)?u[c]=l.createProvidedColumnGroup(i,d,n,s,o,r,a):u[c]=mK(e,i,d,s,o,a)}return u}function mK(e,t,n,i,s,o){var l;const r=CK(n,i);r&&(i==null||i.splice(r.idx,1));let a=r==null?void 0:r.column;if(a){const u=ty(e,n,a.getColId());a.setColDef(u,n,o),vK(e,a,u,o)}else{const u=s.getUniqueKey(n.colId,n.field),c=ty(e,n,u);a=new Ea(c,n,u,t),e.context.createBean(a)}return(l=e.dataTypeSvc)==null||l.addColumnListeners(a),a}function fP(e,t,n,i,s,o,r,a){const{sortSvc:l,pinnedCols:u,colFlex:c}=e;n!==void 0&&t.setVisible(!n,a),l&&(l.updateColSort(t,i,a),s!==void 0&&l.setColSortIndex(t,s)),o!==void 0&&(u==null||u.setColPinned(t,o)),r!==void 0&&(c==null||c.setColFlex(t,r))}function vK(e,t,n,i){fP(e,t,n.hide,n.sort,n.sortIndex,n.pinned,n.flex,i);const s=t.getFlex();if(!(s!=null&&s>0))if(n.width!=null)t.setActualWidth(n.width,i);else{const o=t.getActualWidth();t.setActualWidth(o,i)}}function CK(e,t){if(t)for(let n=0;n<t.length;n++){const i=t[n].getUserProvidedColDef();if(!i)continue;if(e.colId!=null){if(t[n].getId()===e.colId)return{idx:n,column:t[n]};continue}if(e.field!=null){if(i.field===e.field)return{idx:n,column:t[n]};continue}if(i===e)return{idx:n,column:t[n]}}}function ty(e,t,n,i){const{gos:s,dataTypeSvc:o}=e,r={},a=s.get("defaultColDef");di(r,a,!1,!0);const l=yK(e,r,t,n);l&&wK(e,l,r);const u=r.cellDataType;di(r,t,!1,!0),u!==void 0&&(r.cellDataType=u);const c=s.get("autoGroupColumnDef"),d=Xs(s);return t.rowGroup&&c&&d&&di(r,{sort:c.sort,initialSort:c.initialSort},!1,!0),o&&(o.postProcess(r),o.validateColDef(r)),s.validateColDef(r,n,i),r}function yK(e,t,n,i){var r;const s=(r=e.dataTypeSvc)==null?void 0:r.updateColDefAndGetColumnType(t,n,i),o=n.type??s??t.type;return t.type=o,o?ep(o):void 0}function wK(e,t,n){if(!t.length)return;const i=Object.assign({},aK),s=e.gos.get("columnTypes")||{};for(const o of Object.keys(s)){const r=s[o];o in i?_e(34,{key:o}):(r.type&&_e(35),i[o]=r)}for(const o of t){const r=i[o.trim()];r?di(n,r,!1,!0):_e(36,{t:o})}}function bK(e){return e.children!==void 0}function No(e,t,n){if(t)for(let i=0;i<t.length;i++){const s=t[i];Jn(s)&&No(s,s.getChildren(),n),n(s,e)}}function pP(e,t){const n=[],i=[],s=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?s.push(r):a==="left"||a===!0?n.push(r):i.push(r)}),t.get("enableRtl")?[...s,...i,...n]:[...n,...i,...s]}function gP(e,t){let n=!0;return No(null,t,i=>{if(!Jn(i))return;const s=i,o=s.getColGroupDef();if(!(o==null?void 0:o.marryChildren))return;const a=[];for(const h of s.getLeafColumns()){const p=e.indexOf(h);a.push(p)}const l=Math.max.apply(Math,a),u=Math.min.apply(Math,a),c=l-u,d=s.getLeafColumns().length-1;c>d&&(n=!1)}),n}function mP(e,t){if(!e||e.length==0)return;const n=t(e[0]);for(let i=1;i<e.length;i++)if(n!==t(e[i]))return;return n}function vP(e,t,n){if(!t.length)return;const i=t.length===1?t[0]:null,s=mP(t,o=>o.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:i,source:n})}function SK(e,t,n){if(!t.length)return;const i=t.length===1?t[0]:null,s=mP(t,o=>o.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:i,source:n})}function EK(e,t,n,i){e.dispatchEvent({type:t,columns:n,column:n&&n.length==1?n[0]:null,source:i})}function Kl(e,t,n,i,s=null){t!=null&&t.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:s,finished:n,source:i})}function Fs(e,t,n){var E;const{colModel:i,rowGroupColsSvc:s,pivotColsSvc:o,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:u,pivotResultCols:c,environment:d,valueColsSvc:h,eventSvc:p,gos:g}=e,C=i.getColDefCols()??[],v=a==null?void 0:a.getColumns();if(!C.length&&!(v!=null&&v.length))return!1;if(t!=null&&t.state&&!t.state.forEach)return _e(32),!1;const b=(F,x,V,A,O)=>{if(!F)return;const P=hK(x,t.defaultState),N=P("flex").value1;if(fP(e,F,P("hide").value1,P("sort").value1,P("sortIndex").value1,P("pinned").value1,N,n),N==null){const ne=P("width").value1;if(ne!=null){const pe=F.getColDef().minWidth??d.getDefaultColumnMinWidth();pe!=null&&ne>=pe&&F.setActualWidth(ne,n)}}O||!F.isPrimary()||(h==null||h.syncColumnWithState(F,n,P),s==null||s.syncColumnWithState(F,n,P,V),o==null||o.syncColumnWithState(F,n,P,A))},R=(F,x,V)=>{var Ie,ke;const A=CP(e,n),O=x.slice(),P={},N={},ne=[],pe=[],Be=[];let ee=0;const z=(s==null?void 0:s.columns.slice())??[],L=(o==null?void 0:o.columns.slice())??[];for(const He of F){const it=He.colId;if(it.startsWith(Qf)){ne.push(He),Be.push(He);continue}if(Mo(it)){pe.push(He),Be.push(He);continue}const ct=V(it);ct?(b(ct,He,P,N,!1),Ds(O,ct)):(Be.push(He),ee+=1)}const G=He=>b(He,null,P,N,!1);O.forEach(G),s==null||s.sortColumns(wP.bind(s,P,z)),o==null||o.sortColumns(wP.bind(o,N,L)),i.refreshCols(!1,n);const ae=(He,it,nt=[])=>{for(const ct of it){const Ft=He(ct.colId);Ds(nt,Ft),b(Ft,ct,null,null,!0)}nt.forEach(G)};return ae(He=>(r==null?void 0:r.getColumn(He))??null,ne,(Ie=r==null?void 0:r.getColumns())==null?void 0:Ie.slice()),ae(He=>(a==null?void 0:a.getColumn(He))??null,pe,(ke=a==null?void 0:a.getColumns())==null?void 0:ke.slice()),DK(t,i,g),u.refresh(n),p.dispatchEvent({type:"columnEverythingChanged",source:n}),A(),{unmatchedAndAutoStates:Be,unmatchedCount:ee}};l==null||l.start();let{unmatchedAndAutoStates:S,unmatchedCount:y}=R(t.state||[],C,F=>i.getColDefCol(F));if(S.length>0||ze(t.defaultState)){const F=((E=c==null?void 0:c.getPivotResultCols())==null?void 0:E.list)??[];y=R(S,F,x=>(c==null?void 0:c.getPivotResultCol(x))??null).unmatchedCount}return l==null||l.finish(),y===0}function RK(e,t){var R,S;const{colModel:n,autoColSvc:i,selectionColSvc:s,eventSvc:o,gos:r}=e,a=n.getColDefCols();if(!(a!=null&&a.length))return;const l=n.getColDefColTree(),u=dP(l),c=[];let d=1e3,h=1e3;const p=y=>{const E=yP(y);nn(E.rowGroupIndex)&&E.rowGroup&&(E.rowGroupIndex=d++),nn(E.pivotIndex)&&E.pivot&&(E.pivotIndex=h++),c.push(E)};(R=i==null?void 0:i.getColumns())==null||R.forEach(p),(S=s==null?void 0:s.getColumns())==null||S.forEach(p),u==null||u.forEach(p),Fs(e,{state:c},t);const g=(i==null?void 0:i.getColumns())??[],b=[...(s==null?void 0:s.getColumns())??[],...g,...a].map(y=>({colId:y.colId}));Fs(e,{state:b,applyOrder:!0},t),o.dispatchEvent(lt(r,{type:"columnsReset",source:t}))}function CP(e,t){const{rowGroupColsSvc:n,pivotColsSvc:i,valueColsSvc:s,colModel:o,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:(n==null?void 0:n.columns.slice())??[],pivotColumns:(i==null?void 0:i.columns.slice())??[],valueColumns:(s==null?void 0:s.columns.slice())??[]},u=tp(e),c={};for(const d of u)c[d.colId]=d;return()=>{const d=(F,x,V,A)=>{const O=x.map(A),P=V.map(A);if(vr(O,P))return;const ne=new Set(x);for(const Be of V)ne.delete(Be)||ne.add(Be);const pe=[...ne];a.dispatchEvent({type:F,columns:pe,column:pe.length===1?pe[0]:null,source:t})},h=F=>{const x=[];return o.forAllCols(V=>{const A=c[V.getColId()];A&&F(A,V)&&x.push(V)}),x},p=F=>F.getColId();d("columnRowGroupChanged",l.rowGroupColumns,(n==null?void 0:n.columns)??[],p),d("columnPivotChanged",l.pivotColumns,(i==null?void 0:i.columns)??[],p);const C=h((F,x)=>{const V=F.aggFunc!=null,A=V!=x.isValueActive(),O=V&&F.aggFunc!=x.getAggFunc();return A||O});C.length>0&&EK(a,"columnValueChanged",C,t),Kl(a,h((F,x)=>F.width!=x.getActualWidth()),!0,t),vP(a,h((F,x)=>F.pinned!=x.getPinned()),t),SK(a,h((F,x)=>F.hide==x.isVisible()),t);const y=h((F,x)=>F.sort!=x.getSort()||F.sortIndex!=x.getSortIndex());y.length>0&&(r==null||r.dispatchSortChangedEvents(t,y));const E=tp(e);TK(u,E,t,o,a)}}function tp(e){const{colModel:t,rowGroupColsSvc:n,pivotColsSvc:i}=e,s=t.getColDefCols();if(nn(s)||!t.isAlive())return[];const o=n==null?void 0:n.columns,r=i==null?void 0:i.columns,a=[],l=c=>{const d=c.isRowGroupActive()&&o?o.indexOf(c):null,h=c.isPivotActive()&&r?r.indexOf(c):null,p=c.isValueActive()?c.getAggFunc():null,g=c.getSort()!=null?c.getSort():null,C=c.getSortIndex()!=null?c.getSortIndex():null;a.push({colId:c.getColId(),width:c.getActualWidth(),hide:!c.isVisible(),pinned:c.getPinned(),sort:g,sortIndex:C,aggFunc:p,rowGroup:c.isRowGroupActive(),rowGroupIndex:d,pivot:c.isPivotActive(),pivotIndex:h,flex:c.getFlex()??null})};t.forAllCols(c=>l(c));const u=new Map(t.getCols().map((c,d)=>[c.getColId(),d]));return a.sort((c,d)=>{const h=u.has(c.colId)?u.get(c.colId):-1,p=u.has(d.colId)?u.get(d.colId):-1;return h-p}),a}function yP(e){const t=(g,C)=>g??C??null,n=e.getColDef(),i=t(n.sort,n.initialSort),s=t(n.sortIndex,n.initialSortIndex),o=t(n.hide,n.initialHide),r=t(n.pinned,n.initialPinned),a=t(n.width,n.initialWidth),l=t(n.flex,n.initialFlex);let u=t(n.rowGroupIndex,n.initialRowGroupIndex),c=t(n.rowGroup,n.initialRowGroup);u==null&&!c&&(u=null,c=null);let d=t(n.pivotIndex,n.initialPivotIndex),h=t(n.pivot,n.initialPivot);d==null&&!h&&(d=null,h=null);const p=t(n.aggFunc,n.initialAggFunc);return{colId:e.getColId(),sort:i,sortIndex:s,hide:o,pinned:r,width:a,flex:l,rowGroup:c,rowGroupIndex:u,pivot:h,pivotIndex:d,aggFunc:p}}function DK(e,t,n){if(!e.applyOrder||!e.state)return;const i=[];for(const s of e.state)s.colId!=null&&i.push(s.colId);FK(t.cols,i,t,n)}function FK(e,t,n,i){if(e==null)return;let s=[];const o={};for(const a of t){if(o[a])continue;const l=e.map[a];l&&(s.push(l),o[a]=!0)}let r=0;for(const a of e.list){const l=a.getColId();if(o[l]!=null)continue;l.startsWith(Qf)?s.splice(r++,0,a):s.push(a)}if(s=pP(s,i),!gP(s,n.getColTree())){_e(39);return}e.list=s}function TK(e,t,n,i,s){const o={};for(const c of t)o[c.colId]=c;const r={};for(const c of e)o[c.colId]&&(r[c.colId]=!0);const a=e.filter(c=>r[c.colId]),l=t.filter(c=>r[c.colId]),u=[];l.forEach((c,d)=>{const h=a==null?void 0:a[d];if(h&&h.colId!==c.colId){const p=i.getCol(h.colId);p&&u.push(p)}}),u.length&&s.dispatchEvent({type:"columnMoved",columns:u,column:u.length===1?u[0]:null,finished:!0,source:n})}var wP=(e,t,n,i)=>{const s=e[n.getId()],o=e[i.getId()],r=s!=null,a=o!=null;if(r&&a)return s-o;if(r)return-1;if(a)return 1;const l=t.indexOf(n),u=t.indexOf(i),c=l>=0,d=u>=0;return c&&d?l-u:c?-1:1},xK=class extends ve{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(jl(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),jl(e.source)))}createColsFromColDefs(e){var R,S,y;const{beans:t}=this,{valueCache:n,colAutosize:i,rowGroupColsSvc:s,pivotColsSvc:o,valueColsSvc:r,visibleCols:a,eventSvc:l,groupHierarchyColSvc:u}=t,c=this.colDefs?CP(t,e):void 0;n==null||n.expire();const d=(R=this.colDefCols)==null?void 0:R.list,h=(S=this.colDefCols)==null?void 0:S.tree,p=pK(t,this.colDefs,!0,h,e);Xf(t,(y=this.colDefCols)==null?void 0:y.tree,p.columnTree);const g=p.columnTree,C=p.treeDepth,v=dP(g),b={};for(const E of v)b[E.getId()]=E;this.colDefCols={tree:g,treeDepth:C,list:v,map:b},this.createColumnsForService([u],this.colDefCols,e),s==null||s.extractCols(e,d),o==null||o.extractCols(e,d),r==null||r.extractCols(e,d),this.ready=!0,this.refreshCols(!0,e),a.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),c&&(this.changeEventsDispatching=!0,c(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&(i==null||i.applyAutosizeStrategy())}refreshCols(e,t){var v;if(!this.colDefCols)return;const n=(v=this.cols)==null?void 0:v.tree;this.saveColOrder();const{autoColSvc:i,selectionColSvc:s,rowNumbersSvc:o,quickFilter:r,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:u,visibleCols:c,colViewport:d,eventSvc:h}=this.beans,p=this.selectCols(a,this.colDefCols);this.createColumnsForService([i,s,o],p,t);const g=K8(this.gos,this.showingPivotResult);(!e||g)&&this.restoreColOrder(p),this.positionLockedCols(p),l==null||l.refresh(),r==null||r.refreshCols(),this.setColSpanActive(),u==null||u.setAutoHeightActive(p),c.clear(),d.clear(),!vr(n,this.cols.tree)&&h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,n){for(const i of e)i&&(i.createColumns(t,s=>{this.lastOrder=s(this.lastOrder),this.lastPivotOrder=s(this.lastPivotOrder)},n),i.addColumns(t))}selectCols(e,t){const n=(e==null?void 0:e.getPivotResultCols())??null;this.showingPivotResult=n!=null;const{map:i,list:s,tree:o,treeDepth:r}=n??t;return this.cols={list:s.slice(),map:{...i},tree:o.slice(),treeDepth:r},n&&(n.list.some(l=>{var u;return((u=this.cols)==null?void 0:u.map[l.getColId()])!==void 0})||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{valueColsSvc:e,selectionColSvc:t,gos:n}=this.beans,i=this.isPivotMode()&&!this.showingPivotResult,s=t==null?void 0:t.isSelectionColumnEnabled(),o=n.get("rowNumbers"),r=e==null?void 0:e.columns;return this.cols.list.filter(l=>{const u=ey(l);if(i){const c=r==null?void 0:r.includes(l);return u||c||s&&Mo(l)||o&&Lo(l)}else return u||l.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,n){Fs(this.beans,{state:e.map(i=>({colId:typeof i=="string"?i:i.getColId(),hide:!t}))},n)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const n=t.filter(d=>e.map[d.getId()]!=null);if(n.length===0)return;if(n.length===e.list.length){e.list=n;return}const i=d=>{const h=d.getOriginalParent();return h?h.getChildren().length>1?!0:i(h):!1};if(!n.some(d=>i(d))){const d=new Set(n);for(const h of e.list)d.has(h)||n.push(h);e.list=n;return}const s=new Map;for(let d=0;d<n.length;d++){const h=n[d];s.set(h,d)}const o=e.list.filter(d=>!s.has(d));if(o.length===0){e.list=n;return}const r=(d,h)=>{const p=h?h.getOriginalParent():d.getOriginalParent();if(!p)return null;let g=null,C=null;for(const v of p.getChildren())if(!(v===h||v===d)){if(v instanceof Ea){const b=s.get(v);if(b==null)continue;(g==null||g<b)&&(g=b,C=v);continue}v.forEachLeafColumn(b=>{const R=s.get(b);R!=null&&(g==null||g<R)&&(g=R,C=b)})}return C??r(d,p)},a=[],l=new Map;for(const d of o){const h=r(d,null);if(h==null){a.push(d);continue}const p=l.get(h);p===void 0?l.set(h,d):Array.isArray(p)?p.push(d):l.set(h,[p,d])}const u=new Array(e.list.length);let c=u.length-1;for(let d=a.length-1;d>=0;d--)u[c--]=a[d];for(let d=n.length-1;d>=0;d--){const h=n[d],p=l.get(h);if(p)if(Array.isArray(p))for(let g=p.length-1;g>=0;g--){const C=p[g];u[c--]=C}else u[c--]=p;u[c--]=h}e.list=u}positionLockedCols(e){e.list=pP(e.list,this.gos)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=((e=this.cols)==null?void 0:e.list)??null:this.lastOrder=((t=this.cols)==null?void 0:t.list)??null}getColumnDefs(e){var t,n;return this.colDefCols&&((n=this.beans.colDefFactory)==null?void 0:n.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,((t=this.cols)==null?void 0:t.list)??[],e))}setColSpanActive(){var e;this.colSpanActive=!!((e=this.cols)!=null&&e.list.some(t=>t.getColDef().colSpan!=null))}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);const{visibleCols:n,eventSvc:i}=this.beans;n.refresh(t),i.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){var t;const e=(t=this.beans.pivotColsSvc)==null?void 0:t.columns;return this.pivotMode&&!!(e!=null&&e.length)}recreateColumnDefs(e){var n;if(!this.cols)return;(n=this.beans.autoColSvc)==null||n.updateColumns(e);const t=jl(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;Xf(this.beans,(e=this.colDefCols)==null?void 0:e.tree),super.destroy()}getColTree(){var e;return((e=this.cols)==null?void 0:e.tree)??[]}getColDefColTree(){var e;return((e=this.colDefCols)==null?void 0:e.tree)??[]}getColDefCols(){var e;return((e=this.colDefCols)==null?void 0:e.list)??null}getCols(){var e;return((e=this.cols)==null?void 0:e.list)??[]}forAllCols(e){var o,r,a,l,u;const{pivotResultCols:t,autoColSvc:n,selectionColSvc:i,groupHierarchyColSvc:s}=this.beans;td((o=this.colDefCols)==null?void 0:o.list,e),td((r=n==null?void 0:n.columns)==null?void 0:r.list,e),td((a=i==null?void 0:i.columns)==null?void 0:a.list,e),td((l=s==null?void 0:s.columns)==null?void 0:l.list,e),td((u=t==null?void 0:t.getPivotResultCols())==null?void 0:u.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){var t;return((t=this.cols)==null?void 0:t.map[e])??null}getColFromCollection(e,t){if(t==null)return null;const{map:n,list:i}=t;if(typeof e=="string"&&n[e])return n[e];for(let a=0;a<i.length;a++)if(nd(i[a],e))return i[a];const{autoColSvc:s,selectionColSvc:o,groupHierarchyColSvc:r}=this.beans;return(s==null?void 0:s.getColumn(e))??(o==null?void 0:o.getColumn(e))??(r==null?void 0:r.getColumn(e))??null}},bP=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let n;return typeof t!="number"?n=0:n=t+1,this.existingIds[e]=n,n}};function id(e,t,n){return n&&e.addDestroyFunc(()=>t.destroyBean(n)),n??e}var We=null;function SP(e){return typeof(e==null?void 0:e.getGui)=="function"}var EP=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){var i;if(!e)return;if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1){for(const o of s)this.toggleCss(o,t);return}}this.cssClassStates[e]!==t&&e.length&&((i=this.getGui())==null||i.classList.toggle(e,t),this.cssClassStates[e]=t)}},_K=0,sd=class extends Js{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=_K++,this.cssManager=new EP(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(n=>[n.selector,n])),e&&this.setTemplate(e)}preConstruct(){var t,n;this.wireTemplate(this.getGui());const e="component-"+((n=(t=Object.getPrototypeOf(this))==null?void 0:t.constructor)==null?void 0:n.name);for(const i of this.css??[])this.beans.environment.addGlobalCSS(i,e)}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(A_):null}applyElementsToComponent(e,t,n,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===We)this[t]=i??e;else{const o=n==null?void 0:n[t];if(!this.suppressDataRefValidation&&!o)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${s}`)}}}createChildComponentsFromTags(e,t){const n=[];for(const i of e.childNodes??[])n.push(i);for(const i of n){if(!(i instanceof HTMLElement))continue;const s=this.createComponentFromElement(i,o=>{const r=o.getGui();if(r)for(const a of i.attributes??[])r.setAttribute(a.name,a.value)},t);if(s){if(s.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);const o=Array.prototype.slice.call(i.children);s.addItems(o)}this.swapComponentForNode(s,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)}}createComponentFromElement(e,t,n){const i=e.nodeName,s=this.getDataRefAttribute(e),o=i.indexOf("AG-")===0,r=o?this.componentSelectors.get(i):null;let a=null;if(r){const l=n&&s?n[s]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(o)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,s,n,a),a}swapComponentForNode(e,t,n){const i=e.getGui();t.replaceChild(i,n),t.insertBefore(document.createComment(n.nodeName),i),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(const n of e)n.setAttribute("tabindex",t.toString())}setTemplate(e,t,n){let i;typeof e=="string"||e==null?i=MC(e):i=Kc(e),this.setTemplateFromElement(i,t,n)}setTemplateFromElement(e,t,n,i=!1){if(this.eGui=e,this.suppressDataRefValidation=i,t)for(let s=0;s<t.length;s++){const o=t[s];this.componentSelectors.set(o.selector,o)}this.wireTemplate(e,n)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let n=t;return e==null?null:(n||(n=this.eGui),VC(e)?{element:e,parent:n}:{element:e.getGui(),parent:n})}prependChild(e,t){const{element:n,parent:i}=this.getContainerAndElement(e,t)||{};!n||!i||i.insertAdjacentElement("afterbegin",n)}appendChild(e,t){const{element:n,parent:i}=this.getContainerAndElement(e,t)||{};!n||!i||i.appendChild(n)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:n}=t;u8(this.eGui,e,{skipAriaHidden:n})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:n}=t;sn(this.eGui,e,{skipAriaHidden:n});const i={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(i)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,n){this.eGui.addEventListener(e,t,n),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}},$t=class extends sd{};function RP(e){return typeof e=="object"&&!!e.component}function PK(e,t){return new fn(n=>{n(window.setInterval(e,t))})}var fn=class Vd{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(n=>this.onDone(n),n=>this.onReject(n))}static all(t){return t.length?new Vd(n=>{let i=t.length;const s=new Array(i);t.forEach((o,r)=>{o.then(a=>{s[r]=a,i--,i===0&&n(s)})})}):Vd.resolve()}static resolve(t=null){return new Vd(n=>n(t))}then(t){return new Vd(n=>{this.status===1?n(t(this.resolution)):this.waiters.push(i=>n(t(i)))})}onDone(t){this.status=1,this.resolution=t;for(const n of this.waiters)n(t)}onReject(t){}};function AK(e){return e?e.prototype&&"getGui"in e.prototype:!1}function DP(e,t,n,i){const{name:s}=n;let o,r,a,l,u,c;if(t){const d=t,h=d[s+"Selector"],p=h?h(i):null,g=C=>{typeof C=="string"?o=C:C!=null&&C!==!0&&(e.isFrameworkComponent(C)?a=C:r=C)};p?(g(p.component),l=p.params,u=p.popup,c=p.popupPosition):g(d[s])}return{compName:o,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:u,popupPositionFromSelector:c}}var IK=class extends ve{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,n,i=!1){return this.getCompDetails(this.gridOptions,e,t,n,i)}getCompDetails(e,t,n,i,s=!1){var S;const{name:o,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:u,paramsFromSelector:c,popupFromSelector:d,popupPositionFromSelector:h}=DP(this.beans.frameworkOverrides,e,t,i),p,g;const C=y=>{const E=this.registry.getUserComponent(o,y);E&&(l=E.componentFromFramework?void 0:E.component,u=E.componentFromFramework?E.component:void 0,p=E.params,g=E.processParams)};if(a!=null&&C(a),l==null&&u==null&&n!=null&&C(n),l&&r&&!AK(l)&&(l=(S=this.agCompUtils)==null?void 0:S.adaptFunction(t,l)),!l&&!u){const{validation:y}=this.beans;s&&(a!==n||!n)?a?y!=null&&y.isProvidedUserComp(a)||Kt(50,{compName:a}):n?y||Kt(260,{...this.gos.getModuleErrorParams(),propName:o,compName:n}):Kt(216,{name:o}):n&&!y&&Kt(146,{comp:n});return}const v=this.mergeParams(e,t,i,c,p,g),b=l==null,R=l??u;return{componentFromFramework:b,componentClass:R,params:v,type:t,popupFromSelector:d,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(R,b,v,t)}}newAgStackInstance(e,t,n,i){var a;const s=!t;let o;s?o=new e:o=this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(o);const r=(a=o.init)==null?void 0:a.call(o,n);return r==null?fn.resolve(o):r.then(()=>o)}mergeParams(e,t,n,i=null,s,o){const r={...n,...s},a=e,l=a==null?void 0:a[t.name+"Params"];if(typeof l=="function"){const u=l(n);di(r,u)}else typeof l=="object"&&di(r,l);return di(r,i),o?o(r):r}},kK={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},OK={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},MK={name:"headerComponent",optionalMethods:["refresh"]},LK={name:"innerHeaderComponent"},NK={name:"innerHeaderGroupComponent"},VK={name:"headerGroupComponent"},BK={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},HK={name:"loadingCellRenderer",cellRenderer:!0},GK={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},$K={name:"loadingOverlayComponent",optionalMethods:["refresh"]},WK={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},zK={name:"tooltipComponent"},ny={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},UK={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},jK={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},KK={name:"loadingCellRenderer",cellRenderer:!0},qK={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},YK={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function ZK(e,t){return e.getCompDetailsFromGridOptions(OK,"agDragAndDropImage",t,!0)}function JK(e,t,n){return e.getCompDetails(t,MK,"agColumnHeader",n)}function QK(e,t,n){return e.getCompDetails(t,LK,void 0,n)}function XK(e,t){const n=t.columnGroup.getColGroupDef();return e.getCompDetails(n,VK,"agColumnGroupHeader",t)}function eq(e,t,n){return e.getCompDetails(t,NK,void 0,n)}function tq(e,t){return e.getCompDetailsFromGridOptions(jK,void 0,t,!0)}function nq(e,t){return e.getCompDetailsFromGridOptions(KK,"agLoadingCellRenderer",t,!0)}function iq(e,t){return e.getCompDetailsFromGridOptions(qK,"agGroupRowRenderer",t,!0)}function sq(e,t){return e.getCompDetailsFromGridOptions(YK,"agDetailCellRenderer",t,!0)}function FP(e,t,n){return e.getCompDetails(t,BK,void 0,n)}function TP(e,t,n){return e.getCompDetails(t,HK,"agSkeletonCellRenderer",n,!0)}function xP(e,t,n){return e.getCompDetails(t,GK,"agCellEditor",n,!0)}function oq(e,t,n,i){const s=t.filter;return RP(s)&&(t={filter:s.component,filterParams:t.filterParams}),e.getCompDetails(t,ny,i,n,!0)}function rq(e,t,n){return e.getCompDetails(t,kK,"agDateInput",n,!0)}function aq(e,t){return e.getCompDetailsFromGridOptions($K,"agLoadingOverlay",t,!0)}function lq(e,t){return e.getCompDetailsFromGridOptions(WK,"agNoRowsOverlay",t,!0)}function uq(e,t){return e.getCompDetails(t.colDef,zK,"agTooltipComponent",t,!0)}function cq(e,t,n,i){return e.getCompDetails(t,UK,i,n)}function _P(e,t){return DP(e,t,ny)}function iy(e,t,n){return e.mergeParams(t,ny,n)}function od(e){const t=e;return(t==null?void 0:t.getFrameworkComponentInstance)!=null?t.getFrameworkComponentInstance():e}function dq(e){return typeof e=="object"&&!!e.getComp}var re={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",SPACE:" ",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete",F2:"F2",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",PAGE_HOME:"Home",PAGE_END:"End",A:"KeyA",C:"KeyC",D:"KeyD",V:"KeyV",X:"KeyX",Y:"KeyY",Z:"KeyZ"},sy=class extends sd{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;(e==null?void 0:e.isAlive())&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},oy,ry,ay,ly,uy,cy,dy;function Cr(){return oy===void 0&&(oy=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),oy}function PP(){return ry===void 0&&(ry=/(firefox)/i.test(navigator.userAgent)),ry}function AP(){return ay===void 0&&(ay=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),ay}function Ra(){return ly===void 0&&(ly=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),ly}function hy(e){if(!e)return null;const t=e.tabIndex,n=e.getAttribute("tabIndex");return t===-1&&(n===null||n===""&&!PP())?null:t.toString()}function hq(){if(dy!==void 0)return dy;if(!document.body)return-1;let e=1e6;const t=PP()?6e6:1e9,n=document.createElement("div");for(document.body.appendChild(n);;){const i=e*2;if(n.style.height=i+"px",i>t||n.clientHeight!==i)break;e=i}return n.remove(),dy=e,e}function fq(){return cy==null&&IP(),cy}function IP(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let n=t.offsetWidth-t.clientWidth;n===0&&t.clientWidth===0&&(n=null),t.parentNode&&t.remove(),n!=null&&(cy=n,uy=n===0)}function kP(){return uy==null&&IP(),uy}var fy="T",pq=new RegExp(`[${fy} ]`),gq=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${fy}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function eo(e,t){return e.toString().padStart(t,"0")}function Ni(e,t=!0,n=fy){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>eo(s,2)).join("-");return t&&(i+=n+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>eo(s,2)).join(":")),i}function np(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),eo(e.getDate(),2),eo(e.getHours(),2),`:${eo(e.getMinutes(),2)}`,`:${eo(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,eo(e.getDate(),2)].map(String):null}var py=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"},OP=["January","February","March","April","May","June","July","August","September","October","November","December"],gy=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function my(e,t){if(t==null)return Ni(e,!1);const n=eo(e.getFullYear(),4),i={YYYY:()=>n.slice(n.length-4,n.length),YY:()=>n.slice(n.length-2,n.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>OP[e.getMonth()],MMM:()=>OP[e.getMonth()].slice(0,3),MM:()=>eo(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${py(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${py(e.getDate())}`,DD:()=>eo(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>gy[e.getDay()],ddd:()=>gy[e.getDay()].slice(0,3),dd:()=>gy[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${py(e.getDay())}`,d:()=>`${e.getDay()}`},s=new RegExp(Object.keys(i).join("|"),"g");return t.replace(s,o=>o in i?i[o]():o)}function ip(e,t=!1){return!!Ci(e,t)}function mq(e){return ip(e,!0)}function Ci(e,t=!1,n){if(!e||!n&&!gq.test(e))return null;const[i,s]=e.split(pq);if(!i)return null;const o=i.split("-").map(p=>Number.parseInt(p,10));if(o.filter(p=>!isNaN(p)).length!==3)return null;const[r,a,l]=o,u=new Date(r,a-1,l);if(u.getFullYear()!==r||u.getMonth()!==a-1||u.getDate()!==l||!s&&t)return null;if(!s||s==="00:00:00")return u;const[c,d,h]=s.split(":").map(p=>Number.parseInt(p,10));if(c>=0&&c<24)u.setHours(c);else if(t)return null;if(d>=0&&d<60)u.setMinutes(d);else if(t)return null;if(h>=0&&h<60)u.setSeconds(h);else if(t)return null;return u}function vy(e){const{inputValue:t,allSuggestions:n,hideIrrelevant:i,filterByPercentageOfBestMatch:s}=e;let o=(n??[]).map((l,u)=>({value:l,relevance:vq(t,l),idx:u}));if(o.sort((l,u)=>l.relevance-u.relevance),i&&(o=o.filter(l=>l.relevance<Math.max(l.value.length,t.length))),o.length>0&&s&&s>0){const u=o[0].relevance*s;o=o.filter(c=>u-c.relevance<0)}const r=[],a=[];for(const l of o)r.push(l.value),a.push(l.idx);return{values:r,indices:a}}function vq(e,t){e.length<t.length&&([e,t]=[t,e]);let n=[],i=[];const s=e.length,o=t.length;for(let a=0;a<=o;a++)n[a]=a;let r=0;for(let a=1;a<=s;a++){i[0]=a;for(let l=1;l<=o;l++){const u=e[a-1],c=t[l-1];if(u.toLocaleLowerCase()===c.toLocaleLowerCase())++r,u===c&&++r,a>1&&l>1&&e[a-2].toLocaleLowerCase()===t[l-2].toLocaleLowerCase()&&(++r,e[a-2]===t[l-2]&&++r),a<s/2-10&&++r,i[l]=n[l-1];else{const d=i[l-1],h=n[l],p=n[l-1];i[l]=1+Math.min(d,h,p)}}[n,i]=[i,n]}return n[o]/(r+1)}function MP(e){var n;return e.altKey||e.ctrlKey||e.metaKey?!1:((n=e.key)==null?void 0:n.length)===1}var Cy=!1,sp=0;function Cq(e){sp>0||(e.addEventListener("keydown",op),e.addEventListener("mousedown",op))}function yq(e){sp>0||(e.removeEventListener("keydown",op),e.removeEventListener("mousedown",op))}function op(e){const t=Cy,n=e.type==="keydown";n&&(e.ctrlKey||e.metaKey||e.altKey)||t!==n&&(Cy=n)}function wq(e){const t=Mn(e);return Cq(t),sp++,()=>{sp--,yq(t)}}function bq(){return Cy}function ql(e,t,n=!1){const i=l8;let s=R_;t&&(s+=", "+t),n&&(s+=', [tabindex="-1"]');const o=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(l=>Ys(l)),r=Array.prototype.slice.apply(e.querySelectorAll(s));return r.length?((l,u)=>l.filter(c=>u.indexOf(c)===-1))(o,r):o}function Da(e,t=!1,n=!1,i=!1){const s=ql(e,i?".ag-tab-guard":null,n),o=t?Yt(s):s[0];return o?(o.focus({preventScroll:!0}),!0):!1}function Fa(e,t,n,i){const s=ql(t,n?':not([tabindex="-1"])':null),o=an(e);let r;n?r=s.findIndex(l=>l.contains(o)):r=s.indexOf(o);const a=r+(i?-1:1);return a<0||a>=s.length?null:s[a]}function LP(e,t=5){let n=0;for(;e&&hy(e)===null&&++n<=t;)e=e.parentElement;return hy(e)===null?null:e}var Sq=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",Eq=class extends sd{constructor(e,t,n){super(t,n),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(Sq)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:n,labelAlignment:i,disabled:s}=this.config;s!=null&&this.setDisabled(s),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),n!=null&&this.setLabelWidth(n),this.setLabelAlignment(i||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;Hn(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(sn(t,!1),dr(t,"presentation")):(sn(t,!0),dr(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const n=this.getGui().classList;return n.toggle("ag-label-align-left",e==="left"),n.toggle("ag-label-align-right",e==="right"),n.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(Gf(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return Wc(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},NP=class extends Eq{constructor(e,t,n,i){super(e,t,n),this.className=i}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:n}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),n!=null&&this.onValueChange(n),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),n=this.getLabel();n==null||n==""||jj(e)!==null?Gc(e,""):Gc(e,t??"")}setAriaLabel(e){return Vl(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return Zs(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function Rq(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var Ta=class extends NP{constructor(e,t,n="text",i="input"){super(e,(e==null?void 0:e.template)??Rq(i),[],t),this.inputType=n,this.displayFieldTag=i,this.eLabel=We,this.eWrapper=We,this.eInput=We}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:n,className:i}=this;e.classList.add(`${i}-label`),t.classList.add(`${i}-input-wrapper`),n.classList.add(`${i}-input`),this.addCss("ag-input-field"),n.id=n.id||`ag-${this.getCompId()}-input`;const{inputName:s,inputWidth:o}=this.config;s!=null&&this.setInputName(s),o!=null&&this.setInputWidth(o),this.addInputListeners(),this.activateTabIndex([n])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,Mi(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return Gf(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return Mi(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Vl(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Wc(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Mi(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Mi(this.eInput,"autocomplete",t)}return this}},yy=class extends Ta{constructor(e,t="ag-checkbox",n="checkbox"){super(e,t,n),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const n=this.eInput;n.checked=e,n.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,n){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:n});const i=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:i.id,name:i.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),n=this.selected=e.target.checked;this.refreshSelectedClass(n),this.dispatchChange(n,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},wy={selector:"AG-CHECKBOX",component:yy},Dq=class extends yy{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},xa=class extends Ta{constructor(e,t="ag-text-field",n="text"){super(e,t,n)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const n=this.eInput;return n.value!==e&&(n.value=ze(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=n=>{MP(n)&&n.key&&!e.test(n.key)&&n.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:n=>{var s;const i=(s=n.clipboardData)==null?void 0:s.getData("text");i!=null&&i.split("").some(o=>!e.test(o))&&n.preventDefault()}})}},rp={selector:"AG-INPUT-TEXT-FIELD",component:xa},Fq=class extends Ta{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const n=super.setValue(e,t);return this.eInput.value=e,n}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},Tq={selector:"AG-INPUT-TEXT-AREA",component:Fq},by=class extends xa{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const o=Number.parseFloat(e.value),r=isNaN(o)?"":this.normalizeValue(o.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:n,max:i,step:s}=this.config;typeof t=="number"&&this.setPrecision(t),typeof n=="number"&&this.setMin(n),typeof i=="number"&&this.setMax(i),typeof s=="number"&&this.setStep(s)}onWheel(e){an(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const n=this.precision;if(n==null)return e;if(t){const s=Number.parseFloat(e).toFixed(n);return Number.parseFloat(s).toString()}const i=String(e).split(".");if(i.length>1){if(i[1].length<=n)return e;if(n>0)return`${i[0]}.${i[1].slice(0,n)}`}return i[0]}setMin(e){return this.min===e?this:(this.min=e,Mi(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Mi(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Mi(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(n=>super.setValue(n,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,n){if(ze(n)){let i=this.isScientificNotation(n);if(i&&this.eInput.validity.valid)return e(n);if(!i){n=this.adjustPrecision(n);const s=this.normalizeValue(n);i=n!=s}if(i)return t(n)}return e(n)}getValue(){const e=this.eInput;if(!e.validity.valid)return;const t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},xq={selector:"AG-INPUT-NUMBER-FIELD",component:by},_q=class extends xa{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=Cr();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){an(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?Ni(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,Mi(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?Ni(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,Mi(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,Mi(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return Ci(this.getValue())??void 0}setDate(e,t){this.setValue(Ni(e??null,this.includeTime),t)}},VP={selector:"AG-INPUT-DATE-FIELD",component:_q},Pq=".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}",Aq="ag-active-item",Iq=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",ref:"eText",children:t}]}),kq=class extends sd{constructor(e,t,n){super(Iq(e,t)),this.label=t,this.value=n,this.eText=We}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(Aq,e),S_(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const n=this.getGui();Qj(n,e),Jj(n,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>LC(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){const e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},Oq=class extends sd{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(Pq)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case re.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const n=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(n)}break;case re.DOWN:case re.UP:e.preventDefault(),this.navigate(t);break;case re.PAGE_DOWN:case re.PAGE_UP:case re.PAGE_HOME:case re.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:n}=e,i=n??t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();Hn(this.getGui()),this.listItems=[],this.refreshAriaRole()}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const n=this.options.findIndex(i=>i.value===e);if(n!==-1){const i=this.options[n];this.value=i.value,this.displayValue=i.text,this.highlightItem(this.listItems[n]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!Ys(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const n=this.getGui(),{scrollTop:i,clientHeight:s}=n,{offsetTop:o,offsetHeight:r}=t;(o+r>i+s||o<i)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){var e,t;(t=(e=this.highlightedItem)==null?void 0:e.tooltipFeature)==null||t.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){var e;(e=this.highlightedItem)==null||e.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const n=new kq(this.cssIdentifier,t,e);n.setParentComponent(this);const i=this.createManagedBean(n);this.listItems.push(i),this.getGui().appendChild(i.getGui())}navigate(e){const t=e===re.DOWN;let n;const{listItems:i,highlightedItem:s}=this;if(!s)n=t?i[0]:Yt(i);else{let r=i.indexOf(s)+(t?1:-1);r=Math.min(Math.max(r,0),i.length-1),n=i[r]}this.highlightItem(n)}navigateToPage(e){const{listItems:t,highlightedItem:n}=this;if(!n||t.length===0)return;const i=t.indexOf(n),s=this.options.length-1,o=t[0].getHeight(),r=Math.floor(this.getGui().clientHeight/o);let a=-1;e===re.PAGE_HOME?a=0:e===re.PAGE_END?a=s:e===re.PAGE_DOWN?a=Math.min(i+r,s):e===re.PAGE_UP&&(a=Math.max(i-r,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){dr(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((n,i)=>{n.setIndex(i+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},Mq=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.ag-picker-has-focus),&:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:disabled{opacity:.5}}",Lq={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},Nq=class extends NP{constructor(e){if(super(e,(e==null?void 0:e.template)||Lq,(e==null?void 0:e.agComponents)||[],e==null?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=We,this.eWrapper=We,this.eDisplayField=We,this.eIcon=We,this.registerCSS(Mq),this.ariaRole=e==null?void 0:e.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:n,variableWidth:i,minPickerWidth:s,maxPickerWidth:o}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,n!=null&&this.setPickerMaxHeight(n),s!=null&&this.setPickerMinWidth(s),o!=null&&this.setPickerMaxWidth(o)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:n,inputWidth:i}=this.config;if(n){const s=this.beans.iconSvc.createIconNoSpan(n);s&&this.eIcon.appendChild(s)}i!=null&&this.setInputWidth(i)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),kC(e,!1),this.ariaRole&&dr(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&(e==null?void 0:e.target)===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case re.UP:case re.DOWN:case re.ENTER:case re.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case re.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:n,pickerAriaLabelValue:i,modalPicker:s=!0},maxPickerHeight:o,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:u,eWrapper:c}=this,d={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const C=g_(u);this.beforeHidePicker(),C&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(n,i),anchorToElement:c};e.style.position="absolute";const h=u.popupSvc,p=h.addPopup(d);l?(r&&(e.style.minWidth=r),e.style.width=NC(Nf(c)),a&&(e.style.maxWidth=a)):Gf(e,a??Nf(c));const g=o??`${OC(h.getPopupParent())}px`;return e.style.setProperty("max-height",g),this.alignPickerToComponent(),p.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:n,gos:i},eWrapper:s,pickerComponent:o}=this,r=i.get("enableRtl")?"right":"left";n.positionPopupByComponent({type:t,eventSource:s,ePopup:o.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();kC(t,e);const n=this.eWrapper.classList;n.toggle("ag-picker-expanded",e),n.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){var t;(t=this.pickerComponent)!=null&&t.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return Gf(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},Vq=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}",Sy=class extends Nq{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(Vq)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Hf(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:n}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),n&&t==null&&(this.eDisplayField.textContent=n),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new Oq("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),n=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",n),a8(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i==null||i.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){var e;(e=this.listComponent)==null||e.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){var n;const{key:t}=e;switch(t===re.TAB&&this.hidePicker(),t){case re.ENTER:case re.UP:case re.DOWN:case re.PAGE_UP:case re.PAGE_DOWN:case re.PAGE_HOME:case re.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(n=this.listComponent)==null||n.handleKeyDown(e):super.onKeyDown(e);break;case re.ESCAPE:super.onKeyDown(e);break;case re.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){var e;return(e=this.listComponent)==null||e.clearOptions(),this.setValue(void 0,!0),this}setValue(e,t,n){const{listComponent:i,config:{placeholder:s},eDisplayField:o,tooltipFeature:r}=this;if(this.value===e||!i)return this;if(n||i.setValue(e,!0),i.getValue()===this.getValue())return this;let l=i.getDisplayValue();return l==null&&s&&(l=s),o.textContent=l,r==null||r.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},Bq={selector:"AG-SELECT",component:Sy},Hq=':where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}&:where(button){color:inherit}}:where(.ag-root-wrapper,ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',Ey=typeof window!="object"||!((Rk=(Ek=window==null?void 0:window.document)==null?void 0:Ek.fonts)!=null&&Rk.forEach),Yl=(e,t,n,i,s,o)=>{if(Ey)return;i&&(e=`@layer ${CSS.escape(i)} { ${e} }`);let r=Zl.map.get(t);if(r||(r=[],Zl.map.set(t,r)),r.some(c=>c.css===e))return;const a=document.createElement("style");o&&a.setAttribute("nonce",o),a.dataset.agGlobalCss=n,a.textContent=e;const l={css:e,el:a,priority:s};let u;for(const c of r){if(c.priority>s)break;u=c}if(u){u.el.insertAdjacentElement("afterend",a);const c=r.indexOf(u);r.splice(c+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),r.push(l)},BP=(e,t,n,i)=>{Yl(Hq,e,"shared",t,0,n),i==null||i.forEach((s,o)=>s.forEach(r=>Yl(r,e,o,t,0,n)))},Gq=e=>{Zl.grids.add(e)},$q=e=>{if(Zl.grids.delete(e),Zl.grids.size===0){Zl.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},HP,Zl=(HP=typeof window=="object"?window:{}).agStyleInjectionState??(HP.agStyleInjectionState={map:new WeakMap,grids:new Set}),to=e=>new GP(e),yr="$default",Wq=0,GP=class{constructor({feature:e,params:t,modeParams:n={},css:i,cssImports:s}){this.feature=e,this.css=i,this.cssImports=s,this.modeParams={[yr]:{...n[yr]??{},...t??{}},...n}}use(e,t,n){let i=this._inject;if(i==null){let{css:s}=this;if(s){const o=`ag-theme-${this.feature??"part"}-${++Wq}`;typeof s=="function"&&(s=s()),s=`:where(.${o}) {
|
|
91
91
|
${s}
|
|
@@ -168,4 +168,4 @@ If you are trying to annotate ${i} with application data, use the '${i}.context'
|
|
|
168
168
|
<rect width="32" height="32" rx="4" fill="#CCF3EB"/>
|
|
169
169
|
<path d="M11 9C9.89688 9 9 9.89688 9 11V21C9 22.1031 9.89688 23 11 23H21C22.1031 23 23 22.1031 23 21V11C23 9.89688 22.1031 9 21 9H11ZM19.5312 14.5312L15.5312 18.5312C15.2375 18.825 14.7625 18.825 14.4719 18.5312L12.4719 16.5312C12.1781 16.2375 12.1781 15.7625 12.4719 15.4719C12.7656 15.1813 13.2406 15.1781 13.5312 15.4719L15 16.9406L18.4688 13.4688C18.7625 13.175 19.2375 13.175 19.5281 13.4688C19.8187 13.7625 19.8219 14.2375 19.5281 14.5281L19.5312 14.5312Z" fill="#00A18D"/>
|
|
170
170
|
</svg>
|
|
171
|
-
`,Hle=St(at({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const{addNotification:n}=Vc(),i={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},s=[{label:"Create manually",value:"new_scene",iconName:"Plus",type:"icon"},{label:"Import from CSV or Excel",value:"import_scenes",iconName:"FileImport",type:"icon",disabled:!1},{label:"Update existing (CSV or Excel)",value:"overwrite_scenes",iconName:"FilePen",type:"icon",disabled:!0}],o=e;ma.initialize({wrapVueCellRenderer:Of,wrapVueCellEditor:p_});const r=oe(null),a=oe([]),l=oe(0),u=oe(!1),c=oe(""),d=oe(),h=oe(""),p=oe(!1),g=As({totalItems:0}),C=oe(new Set),v=oe(new Map),{apiServices:b}=Ws(!1,o),{columnDefs:R,checkboxColumn:S}=sae(d,o.entityId),{setItemAssignees:y,setMetricValues:E}=Lle(r),{newItemData:F,validateNewItem:x,openNewItemForm:V,closeNewItemForm:A}=Mle(),O=W(()=>c.value.length>0),P=W(()=>!1),N=W(vf),ne=W(()=>R.value.filter(ge=>{var ie;return((ie=ge.field)==null?void 0:ie.startsWith("metric_"))&&!ge.hide}).map(ge=>{var ie;return((ie=ge.field)==null?void 0:ie.replace("metric_",""))||""}));qr("timezone",N);const pe=W(()=>({autoFetch:!1,workspaceId:o.workspaceId,entityId:o.entityId,metricIds:ne.value,setItemAssignees:y,setMetricValues:E})),{fetchItems:Be,getMetricList:ee,cusorMap:z,getMetricValues:L}=Ole(pe),G=(ge,ie,De)=>ge===1?ie:De,ae=W(()=>{const ge=G(g.totalItems,"scene","scenes"),ie=G(l.value,"scene","scenes");return{visible:`${l.value} ${ge}`,total:`${g.totalItems} ${ie}`}}),Ie=ge=>{const ie=ge.data.map(De=>KF(De,N.value));return ie.forEach(De=>{C.value.add(String(De.id)),v.value.set(String(De.id),{})}),ie},ke=(ge,ie)=>{var De,Ye,ft;g.totalItems=ge.meta.total??0,(De=ge.meta.next)!=null&&De.cursor&&(z[ie+1]=ge.meta.next.cursor),h.value=ge.meta["X-Tsr-content-sha256"]||"",ge.meta.total===0?(Ye=r.value)==null||Ye.showNoRowsOverlay():(ft=r.value)==null||ft.hideOverlay()},He=d_(),{sortingAPIConfiguration:it,isSortingRunning:nt}=_C(He),ct=async({page:ge,pageSize:ie,filterText:De})=>{const Ye=z[ge],ft=!Ye&&ge>1?(ge-1)*ie:void 0,xt=it.value;xt.length>0&&(nt.value=!0);try{const _t=await Be({cursor:Ye,size:ie,searchQuery:De,offset:ft,sort_by:xt});if(!_t)return{rows:[],total:0};const pn=Ie(_t);return ke(_t,ge),{rows:pn,total:g.totalItems}}catch(_t){return console.error("Failed to fetch items:",_t),{rows:[],total:0}}finally{nt.value=!1}},{isLoading:Ft,toggleSidebar:qt,onGridReady:Je,handleUnSelect:yn,onSearch:Wt}=Vle({selectRowData:oe([]),isSidebarOpen:u,quickFilterText:c,gridApi:r,columnDefs:R,perPage:i.ROWS_PER_PAGE,fetcher:ct}),Tt=W(()=>({blockLoadDebounceMillis:Dc,columnDefs:R.value,rowModelType:"infinite",cacheBlockSize:i.ROWS_PER_PAGE,popupParent:document.getElementById("item-table-layout-id")||void 0,rowSelection:{mode:"multiRow",checkboxes:!1,headerCheckbox:!1,enableClickSelection:!1,enableSelectionWithoutKeys:!1},suppressHeaderFocus:!1,pagination:!1,rowHeight:i.ROW_HEIGHT,suppressHorizontalScroll:!1,suppressColumnVirtualisation:!0,debounceVerticalScrollbar:!1,animateRows:!1,suppressAnimationFrame:!1,suppressScrollOnNewData:!0,suppressScrollWhenPopupsAreOpen:!1,rowBuffer:20,enableCellTextSelection:!1,suppressDragLeaveHidesColumns:!0,suppressMaxRenderedRowRestriction:!1,height:i.GRID_HEIGHT,stopEditingWhenCellsLoseFocus:!0,onModelUpdated:M,noRowsOverlayComponent:Of(Sj),noRowsOverlayComponentParams:()=>({isSearching:O.value,isFiltering:P.value}),defaultColDef:{editable:!0,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:ge=>ge.data.id,getRowClass:ge=>{if(!ge.data)return["row-empty"];const ie=["row-highlight"];return ge.data.id||ie.push("row-inactive"),ge.data.isDeleted&&ie.push("row-deleted"),ge.data.isArchived&&ie.push("row-archived"),ie},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:o.workspaceId,entityId:o.entityId,apiServices:b.value,sorting:nt.value}}));function M(){if(!r.value)return;const ge=r.value.getCacheBlockState();if(!ge)return;const ie=Object.values(ge).reduce((De,Ye)=>(Ye==null?void 0:Ye.pageStatus)==="loaded"?De+(Ye.endRow-Ye.startRow):De,0);l.value=Math.min(ie,g.totalItems)}vt(()=>it,()=>{r.value&&(h.value="",C.value.clear(),r.value.deselectAll(),Object.keys(z).forEach(ge=>delete z[Number(ge)]),r.value.purgeInfiniteCache(),r.value.ensureIndexVisible(0),r.value.refreshCells({force:!0}))},{deep:!0});const $=oe(),ue=()=>{var ge;(ge=$.value)==null||ge.open()},Fe=()=>{r.value&&(h.value="",C.value.clear(),Object.keys(z).forEach(ge=>delete z[Number(ge)]),r.value.refreshInfiniteCache())},ye=oe(),Ee=W(()=>sessionStorage.getItem("ITEM_TABLE_APP_VERSION")||"");function Oe(ge){ge==="new_scene"?(V(),xn(()=>{ye.value&&ye.value.focus()})):ge==="import_scenes"&&ue()}const Ae=ge=>{const ie=Je(ge);return ie&&(ie.addEventListener("modelUpdated",M),ie.addEventListener("bodyScroll",()=>ie.stopEditing())),ie==null||ie.sizeColumnsToFit(),ie},Te=(ge,ie)=>{if(!r.value)return;const De=r.value.getRowNode(ge);De?(r.value.ensureIndexVisible(Number(De.rowIndex),"middle"),r.value.flashCells({rowNodes:[De],flashDuration:3e3,fadeDuration:1e3})):r.value.ensureIndexVisible(g.totalItems-1,"bottom")},Re=async ge=>{let ie;if(!(!b.value||!ge.trim())){A(),Ft.value=!0;try{ie=await b.value.createNewScene({workspaceId:o.workspaceId,entityId:o.entityId,name:ge}),Fe()}catch(De){console.error("Error creating new scene:",De)}finally{Ft.value=!1,ie!=null&&ie.id&&n({id:String(ie==null?void 0:ie.id),message:`${ge} created successfully`,actions:[{label:"Focus",variant:"secondary",action:()=>{Te(String(ie==null?void 0:ie.id))}},{label:"Scene Hub",variant:"primary",action:()=>{const De=gs({type:"scene_hub",config:{ws_code:o.workspaceId,baseDomain:sessionStorage.getItem("URL_BASE")||"app.arbocollab.com",scene_id:String(ie==null?void 0:ie.id)}}).url;window.open(De,"_blank")},btnIcon:"CustomSceneHub"}],icon:Ble,type:"interactive"})}}};return vt(()=>[o.entityId,o.workspaceId],async([ge,ie])=>{if(!(!ge||!ie)){Ft.value=!0;try{const De=await ee(ge);d.value=De.data}catch(De){console.error("Failed to initialize metric list:",De),d.value=[]}finally{Ft.value=!1}}},{immediate:!0,deep:!0}),vt(ne,(ge,ie)=>{const De=ge.filter(Ye=>!(ie!=null&&ie.includes(Ye)));De.length>0&&L(Array.from(C.value),De).then(Ye=>{E(Ye,C.value,De)})},{immediate:!0,deep:!0}),vt(h,(ge,ie)=>{p.value=!!(ie&&ge&&ie!==ge)}),t({refreshTable:Fe}),(ge,ie)=>(K(),Qe(Z(F4),{"is-sidebar-open":u.value,onCloseSidebar:Z(qt),onSidebarClear:Z(qt),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:Z(qt)},{"header-left":xe(()=>[me("h1",{class:U(ge.$style.tableTitle)},"Scenes",2),be(Z(Xv),{variant:["primary"],options:s,onSelect:Oe,onHandleClick:ie[1]||(ie[1]=De=>Oe("new_scene")),id:"create_scene_dropdown"},{prefix:xe(()=>[be(Z(wt),{id:"create_new_scene",variant:["primary"],onClick:ie[0]||(ie[0]=De=>Oe("new_scene")),label:"New"})]),_:1}),me("span",null,pt(Ee.value),1)]),"header-actions":xe(()=>[be(Z(Yv),{modelValue:c.value,"onUpdate:modelValue":ie[2]||(ie[2]=De=>c.value=De),onSearch:Z(Wt),class:U(ge.$style.itemSearchBox),onClear:ie[3]||(ie[3]=De=>Z(Wt)("")),id:"item_search_box"},null,8,["modelValue","onSearch","class"]),be(Z(UF),{status:Z(Ft)?"busy":"online",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":p.value},{default:xe(()=>[be(Z(wt),{variant:"secondary",onClick:Fe},{prefix:xe(()=>[be(Z(ut),{src:"ArrowsRotate"})]),default:xe(()=>[ie[9]||(ie[9]=yt(" Refresh ",-1))]),_:1})]),_:1},8,["status","show-badge"]),be(Z(wj),{modelValue:Z(R),"onUpdate:modelValue":ie[4]||(ie[4]=De=>Ht(R)?R.value=De:null),checkboxColumn:Z(S),id:"table_customization"},null,8,["modelValue","checkboxColumn"])]),grid:xe(({availableHeight:De})=>[be(Z(Qre),gn({id:"item_table_main",ref:"agGrid"},Tt.value,{height:De+"px",isSorting:Z(nt),onOnGridReady:Ae,onSelectionChanged:ie[5]||(ie[5]=Ye=>a.value=Ye.api.getSelectedRows().map(ft=>ft.id))}),null,16,["height","isSorting"])]),footer:xe(()=>[me("div",{class:U(ge.$style.tableFooter),id:"table_footer"},[me("div",{class:U(ge.$style.footerStart)},[be(Z(ut),{src:"Eye"}),me("span",null,[ie[10]||(ie[10]=yt(" Visibles: ",-1)),me("b",null,pt(ae.value.visible),1)])],2),me("div",{class:U(ge.$style.footerStart)},[be(Z(ut),{src:"List"}),me("span",null,[ie[11]||(ie[11]=yt(" Total: ",-1)),me("b",null,pt(ae.value.total),1)])],2)],2)]),"new-row":xe(()=>[Z(F).isCreating?(K(),Ce("div",{key:0,class:U(ge.$style.newRow)},[be(Z(JF),{ref_key:"newSceneInputRef",ref:ye,modelValue:Z(F).name,"onUpdate:modelValue":ie[6]||(ie[6]=De=>Z(F).name=De),onChange:Z(x),onEnter:ie[7]||(ie[7]=De=>Re(Z(F).name)),placeholder:"Enter name",focused:!0,"max-length":25},{clear:xe(()=>[Z(F).name.length==0?(K(),Qe(Z(ut),{key:0,src:"Pen",color:"#f7941d"})):ot("",!0)]),_:1},8,["modelValue","onChange"]),be(Z(wt),{onClick:ie[8]||(ie[8]=De=>Re(Z(F).name)),disabled:!!Z(F).error||!Z(F).name.trim()},{prefix:xe(()=>[be(Z(ut),{src:"Plus"})]),default:xe(()=>[ie[12]||(ie[12]=yt(" Create ",-1))]),_:1},8,["disabled"]),be(Z(wt),{variant:["secondary","icon"],onClick:Z(A)},{prefix:xe(()=>[be(Z(ut),{src:"XMarkSolid"})]),_:1},8,["onClick"])],2)):ot("",!0)]),"bulk-update-actions":xe(()=>{var De;return[!u.value&&a.value.length>0?(K(),Qe(Z(f4),{key:0,selectRowData:((De=r.value)==null?void 0:De.getSelectedRows())||[],"workspace-id":o.workspaceId,"entity-id":o.entityId,"grid-api":r.value,onUnselect:Z(yn)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect"])):ot("",!0)]}),snackbar:xe(()=>[be(Z(vj))]),popup:xe(()=>[be(_j,{ref_key:"popupCreateSceneRef",ref:$},null,512)]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"]))}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_1xbuf_1",tableFooter:"_tableFooter_1xbuf_7",footerStart:"_footerStart_1xbuf_17",newRow:"_newRow_1xbuf_25","warning-text":"_warning-text_1xbuf_43","has-error":"_has-error_1xbuf_48",itemSearchBox:"_itemSearchBox_1xbuf_52"}}]]),Gle="0.0.1-alpha.17",$le={key:0},Wle=St(at({__name:"app",setup(e){const t=W(()=>n.id.length===0||n.workspaceId.length===0),n=As({id:"",workspaceId:"",apiConfig:{}}),i=Vc(),{showMessage:s}=i,o=u=>{s(u.apiCode,u.success?"success":"error")},r=oe(null);Ug(()=>{var u,c,d;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",Gle);try{if(r.value=Ti(),!r.value)throw new Error("Current instance is null");n.id=((u=r.value)==null?void 0:u.appContext.config.globalProperties.id)||"",n.workspaceId=((c=r.value)==null?void 0:c.appContext.config.globalProperties.workspaceId)||sessionStorage.getItem("ws.code")||"",n.apiConfig=((d=r.value)==null?void 0:d.appContext.config.globalProperties.apiConfig)||{};const h=new bk(n.apiConfig);h.on("call-api",o),r.value.appContext.config.globalProperties.apiServices=h}catch(h){console.error("Error getting current instance:",h)}}),ri(()=>{r.value.appContext.config.globalProperties.apiServices.off("call-api",o)});const a=W(()=>n.id),l=W(()=>n.workspaceId);return qr("workspaceId",l),qr("entityId",a),(u,c)=>(K(),Ce("div",{class:U(u.$style.dashboardPluginWrapper)},[t.value?(K(),Ce("span",$le," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):a.value?(K(),Qe(Z(Hle),{key:1,entityId:a.value,workspaceId:l.value},null,8,["entityId","workspaceId"])):ot("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),qw=async(e={},t={})=>{const n=U0(Wle),i=dj();n.use(i);const s=["apiConfig","workspaceId","id"],o={};return Object.entries(e).forEach(([r,a])=>{a!==void 0&&(n.config.globalProperties[r]=a,o[r]=a,s.includes(r)&&typeof a=="string"?sessionStorage.setItem(r,a):console.error(`[Config Error] Key "${r}" has an invalid value and will not be persisted.`))}),n.config.globalProperties.$arboConfig=o,Object.values(t).forEach(r=>{r&&typeof r.install=="function"&&n.use(r)}),n.config.errorHandler=(r,a,l)=>{console.error("[Vue Error]",r),l&&console.error("[Info]",l)},n};typeof window<"u"&&(window.arboDashboard=qw),Xt.default=qw,Xt.initDashboard=qw,Object.defineProperties(Xt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
171
|
+
`,Hle=St(at({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const{addNotification:n}=Vc(),i={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},s=[{label:"Create manually",value:"new_scene",iconName:"Plus",type:"icon"},{label:"Import from CSV or Excel",value:"import_scenes",iconName:"FileImport",type:"icon",disabled:!1},{label:"Update existing (CSV or Excel)",value:"overwrite_scenes",iconName:"FilePen",type:"icon",disabled:!0}],o=e;ma.initialize({wrapVueCellRenderer:Of,wrapVueCellEditor:p_});const r=oe(null),a=oe([]),l=oe(0),u=oe(!1),c=oe(""),d=oe(),h=oe(""),p=oe(!1),g=As({totalItems:0}),C=oe(new Set),v=oe(new Map),{apiServices:b}=Ws(!1,o),{columnDefs:R,checkboxColumn:S}=sae(d,o.entityId),{setItemAssignees:y,setMetricValues:E}=Lle(r),{newItemData:F,validateNewItem:x,openNewItemForm:V,closeNewItemForm:A}=Mle(),O=W(()=>c.value.length>0),P=W(()=>!1),N=W(vf),ne=W(()=>R.value.filter(ge=>{var ie;return((ie=ge.field)==null?void 0:ie.startsWith("metric_"))&&!ge.hide}).map(ge=>{var ie;return((ie=ge.field)==null?void 0:ie.replace("metric_",""))||""}));qr("timezone",N);const pe=W(()=>({autoFetch:!1,workspaceId:o.workspaceId,entityId:o.entityId,metricIds:ne.value,setItemAssignees:y,setMetricValues:E})),{fetchItems:Be,getMetricList:ee,cusorMap:z,getMetricValues:L}=Ole(pe),G=(ge,ie,De)=>ge===1?ie:De,ae=W(()=>{const ge=G(g.totalItems,"scene","scenes"),ie=G(l.value,"scene","scenes");return{visible:`${l.value} ${ge}`,total:`${g.totalItems} ${ie}`}}),Ie=ge=>{const ie=ge.data.map(De=>KF(De,N.value));return ie.forEach(De=>{C.value.add(String(De.id)),v.value.set(String(De.id),{})}),ie},ke=(ge,ie)=>{var De,Ye,ft;g.totalItems=ge.meta.total??0,(De=ge.meta.next)!=null&&De.cursor&&(z[ie+1]=ge.meta.next.cursor),h.value=ge.meta["X-Tsr-content-sha256"]||"",ge.meta.total===0?(Ye=r.value)==null||Ye.showNoRowsOverlay():(ft=r.value)==null||ft.hideOverlay()},He=d_(),{sortingAPIConfiguration:it,isSortingRunning:nt}=_C(He),ct=async({page:ge,pageSize:ie,filterText:De})=>{const Ye=z[ge],ft=!Ye&&ge>1?(ge-1)*ie:void 0,xt=it.value;xt.length>0&&(nt.value=!0);try{const _t=await Be({cursor:Ye,size:ie,searchQuery:De,offset:ft,sort_by:xt});if(!_t)return{rows:[],total:0};const pn=Ie(_t);return ke(_t,ge),{rows:pn,total:g.totalItems}}catch(_t){return console.error("Failed to fetch items:",_t),{rows:[],total:0}}finally{nt.value=!1}},{isLoading:Ft,toggleSidebar:qt,onGridReady:Je,handleUnSelect:yn,onSearch:Wt}=Vle({selectRowData:oe([]),isSidebarOpen:u,quickFilterText:c,gridApi:r,columnDefs:R,perPage:i.ROWS_PER_PAGE,fetcher:ct}),Tt=W(()=>({blockLoadDebounceMillis:Dc,columnDefs:R.value,rowModelType:"infinite",cacheBlockSize:i.ROWS_PER_PAGE,popupParent:document.getElementById("item-table-layout-id")||void 0,rowSelection:{mode:"multiRow",checkboxes:!1,headerCheckbox:!1,enableClickSelection:!1,enableSelectionWithoutKeys:!1},suppressHeaderFocus:!1,pagination:!1,rowHeight:i.ROW_HEIGHT,suppressHorizontalScroll:!1,suppressColumnVirtualisation:!0,debounceVerticalScrollbar:!1,animateRows:!1,suppressAnimationFrame:!1,suppressScrollOnNewData:!0,suppressScrollWhenPopupsAreOpen:!1,rowBuffer:20,enableCellTextSelection:!1,suppressDragLeaveHidesColumns:!0,suppressMaxRenderedRowRestriction:!1,height:i.GRID_HEIGHT,stopEditingWhenCellsLoseFocus:!0,onModelUpdated:M,noRowsOverlayComponent:Of(Sj),noRowsOverlayComponentParams:()=>({isSearching:O.value,isFiltering:P.value}),defaultColDef:{editable:!0,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:ge=>ge.data.id,getRowClass:ge=>{if(!ge.data)return["row-empty"];const ie=["row-highlight"];return ge.data.id||ie.push("row-inactive"),ge.data.isDeleted&&ie.push("row-deleted"),ge.data.isArchived&&ie.push("row-archived"),ie},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:o.workspaceId,entityId:o.entityId,apiServices:b.value,sorting:nt.value}}));function M(){if(!r.value)return;const ge=r.value.getCacheBlockState();if(!ge)return;const ie=Object.values(ge).reduce((De,Ye)=>(Ye==null?void 0:Ye.pageStatus)==="loaded"?De+(Ye.endRow-Ye.startRow):De,0);l.value=Math.min(ie,g.totalItems)}vt(()=>it,()=>{r.value&&(h.value="",C.value.clear(),r.value.deselectAll(),Object.keys(z).forEach(ge=>delete z[Number(ge)]),r.value.purgeInfiniteCache(),r.value.ensureIndexVisible(0),r.value.refreshCells({force:!0}))},{deep:!0});const $=oe(),ue=()=>{var ge;(ge=$.value)==null||ge.open()},Fe=()=>{r.value&&(h.value="",C.value.clear(),Object.keys(z).forEach(ge=>delete z[Number(ge)]),r.value.refreshInfiniteCache())},ye=oe(),Ee=W(()=>sessionStorage.getItem("ITEM_TABLE_APP_VERSION")||"");function Oe(ge){ge==="new_scene"?(V(),xn(()=>{ye.value&&ye.value.focus()})):ge==="import_scenes"&&ue()}const Ae=ge=>{const ie=Je(ge);return ie&&(ie.addEventListener("modelUpdated",M),ie.addEventListener("bodyScroll",()=>ie.stopEditing())),ie==null||ie.sizeColumnsToFit(),ie},Te=(ge,ie)=>{if(!r.value)return;const De=r.value.getRowNode(ge);De?(r.value.ensureIndexVisible(Number(De.rowIndex),"middle"),r.value.flashCells({rowNodes:[De],flashDuration:3e3,fadeDuration:1e3})):r.value.ensureIndexVisible(g.totalItems-1,"bottom")},Re=async ge=>{let ie;if(!(!b.value||!ge.trim())){A(),Ft.value=!0;try{ie=await b.value.createNewScene({workspaceId:o.workspaceId,entityId:o.entityId,name:ge}),Fe()}catch(De){console.error("Error creating new scene:",De)}finally{Ft.value=!1,ie!=null&&ie.id&&n({id:String(ie==null?void 0:ie.id),message:`${ge} created successfully`,actions:[{label:"Focus",variant:"secondary",action:()=>{Te(String(ie==null?void 0:ie.id))}},{label:"Scene Hub",variant:"primary",action:()=>{const De=gs({type:"scene_hub",config:{ws_code:o.workspaceId,baseDomain:sessionStorage.getItem("URL_BASE")||"app.arbocollab.com",scene_id:String(ie==null?void 0:ie.id)}}).url;window.open(De,"_blank")},btnIcon:"CustomSceneHub"}],icon:Ble,type:"interactive"})}}};return vt(()=>[o.entityId,o.workspaceId],async([ge,ie])=>{if(!(!ge||!ie)){Ft.value=!0;try{const De=await ee(ge);d.value=De.data}catch(De){console.error("Failed to initialize metric list:",De),d.value=[]}finally{Ft.value=!1}}},{immediate:!0,deep:!0}),vt(ne,(ge,ie)=>{const De=ge.filter(Ye=>!(ie!=null&&ie.includes(Ye)));De.length>0&&L(Array.from(C.value),De).then(Ye=>{E(Ye,C.value,De)})},{immediate:!0,deep:!0}),vt(h,(ge,ie)=>{p.value=!!(ie&&ge&&ie!==ge)}),t({refreshTable:Fe}),(ge,ie)=>(K(),Qe(Z(F4),{"is-sidebar-open":u.value,onCloseSidebar:Z(qt),onSidebarClear:Z(qt),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:Z(qt)},{"header-left":xe(()=>[me("h1",{class:U(ge.$style.tableTitle)},"Scenes",2),be(Z(Xv),{variant:["primary"],options:s,onSelect:Oe,onHandleClick:ie[1]||(ie[1]=De=>Oe("new_scene")),id:"create_scene_dropdown"},{prefix:xe(()=>[be(Z(wt),{id:"create_new_scene",variant:["primary"],onClick:ie[0]||(ie[0]=De=>Oe("new_scene")),label:"New"})]),_:1}),me("span",null,pt(Ee.value),1)]),"header-actions":xe(()=>[be(Z(Yv),{modelValue:c.value,"onUpdate:modelValue":ie[2]||(ie[2]=De=>c.value=De),onSearch:Z(Wt),class:U(ge.$style.itemSearchBox),onClear:ie[3]||(ie[3]=De=>Z(Wt)("")),id:"item_search_box"},null,8,["modelValue","onSearch","class"]),be(Z(UF),{status:Z(Ft)?"busy":"online",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":p.value},{default:xe(()=>[be(Z(wt),{variant:"secondary",onClick:Fe},{prefix:xe(()=>[be(Z(ut),{src:"ArrowsRotate"})]),default:xe(()=>[ie[9]||(ie[9]=yt(" Refresh ",-1))]),_:1})]),_:1},8,["status","show-badge"]),be(Z(wj),{modelValue:Z(R),"onUpdate:modelValue":ie[4]||(ie[4]=De=>Ht(R)?R.value=De:null),checkboxColumn:Z(S),id:"table_customization"},null,8,["modelValue","checkboxColumn"])]),grid:xe(({availableHeight:De})=>[be(Z(Qre),gn({id:"item_table_main",ref:"agGrid"},Tt.value,{height:De+"px",isSorting:Z(nt),onOnGridReady:Ae,onSelectionChanged:ie[5]||(ie[5]=Ye=>a.value=Ye.api.getSelectedRows().map(ft=>ft.id))}),null,16,["height","isSorting"])]),footer:xe(()=>[me("div",{class:U(ge.$style.tableFooter),id:"table_footer"},[me("div",{class:U(ge.$style.footerStart)},[be(Z(ut),{src:"Eye"}),me("span",null,[ie[10]||(ie[10]=yt(" Visibles: ",-1)),me("b",null,pt(ae.value.visible),1)])],2),me("div",{class:U(ge.$style.footerStart)},[be(Z(ut),{src:"List"}),me("span",null,[ie[11]||(ie[11]=yt(" Total: ",-1)),me("b",null,pt(ae.value.total),1)])],2)],2)]),"new-row":xe(()=>[Z(F).isCreating?(K(),Ce("div",{key:0,class:U(ge.$style.newRow)},[be(Z(JF),{ref_key:"newSceneInputRef",ref:ye,modelValue:Z(F).name,"onUpdate:modelValue":ie[6]||(ie[6]=De=>Z(F).name=De),onChange:Z(x),onEnter:ie[7]||(ie[7]=De=>Re(Z(F).name)),placeholder:"Enter name",focused:!0,"max-length":25},{clear:xe(()=>[Z(F).name.length==0?(K(),Qe(Z(ut),{key:0,src:"Pen",color:"#f7941d"})):ot("",!0)]),_:1},8,["modelValue","onChange"]),be(Z(wt),{onClick:ie[8]||(ie[8]=De=>Re(Z(F).name)),disabled:!!Z(F).error||!Z(F).name.trim()},{prefix:xe(()=>[be(Z(ut),{src:"Plus"})]),default:xe(()=>[ie[12]||(ie[12]=yt(" Create ",-1))]),_:1},8,["disabled"]),be(Z(wt),{variant:["secondary","icon"],onClick:Z(A)},{prefix:xe(()=>[be(Z(ut),{src:"XMarkSolid"})]),_:1},8,["onClick"])],2)):ot("",!0)]),"bulk-update-actions":xe(()=>{var De;return[!u.value&&a.value.length>0?(K(),Qe(Z(f4),{key:0,selectRowData:((De=r.value)==null?void 0:De.getSelectedRows())||[],"workspace-id":o.workspaceId,"entity-id":o.entityId,"grid-api":r.value,onUnselect:Z(yn)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect"])):ot("",!0)]}),snackbar:xe(()=>[be(Z(vj))]),popup:xe(()=>[be(_j,{ref_key:"popupCreateSceneRef",ref:$},null,512)]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"]))}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_1xbuf_1",tableFooter:"_tableFooter_1xbuf_7",footerStart:"_footerStart_1xbuf_17",newRow:"_newRow_1xbuf_25","warning-text":"_warning-text_1xbuf_43","has-error":"_has-error_1xbuf_48",itemSearchBox:"_itemSearchBox_1xbuf_52"}}]]),Gle="0.0.1-alpha.18",$le={key:0},Wle=St(at({__name:"app",setup(e){const t=W(()=>n.id.length===0||n.workspaceId.length===0),n=As({id:"",workspaceId:"",apiConfig:{}}),i=Vc(),{showMessage:s}=i,o=u=>{s(u.apiCode,u.success?"success":"error")},r=oe(null);Ug(()=>{var u,c,d;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",Gle);try{if(r.value=Ti(),!r.value)throw new Error("Current instance is null");n.id=((u=r.value)==null?void 0:u.appContext.config.globalProperties.id)||"",n.workspaceId=((c=r.value)==null?void 0:c.appContext.config.globalProperties.workspaceId)||sessionStorage.getItem("ws.code")||"",n.apiConfig=((d=r.value)==null?void 0:d.appContext.config.globalProperties.apiConfig)||{};const h=new bk(n.apiConfig);h.on("call-api",o),r.value.appContext.config.globalProperties.apiServices=h}catch(h){console.error("Error getting current instance:",h)}}),ri(()=>{r.value.appContext.config.globalProperties.apiServices.off("call-api",o)});const a=W(()=>n.id),l=W(()=>n.workspaceId);return qr("workspaceId",l),qr("entityId",a),(u,c)=>(K(),Ce("div",{class:U(u.$style.dashboardPluginWrapper)},[t.value?(K(),Ce("span",$le," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):a.value?(K(),Qe(Z(Hle),{key:1,entityId:a.value,workspaceId:l.value},null,8,["entityId","workspaceId"])):ot("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),qw=async(e={},t={})=>{const n=U0(Wle),i=dj();n.use(i);const s=["apiConfig","workspaceId","id"],o={};return Object.entries(e).forEach(([r,a])=>{a!==void 0&&(n.config.globalProperties[r]=a,o[r]=a,s.includes(r)&&typeof a=="string"?sessionStorage.setItem(r,a):console.error(`[Config Error] Key "${r}" has an invalid value and will not be persisted.`))}),n.config.globalProperties.$arboConfig=o,Object.values(t).forEach(r=>{r&&typeof r.install=="function"&&n.use(r)}),n.config.errorHandler=(r,a,l)=>{console.error("[Vue Error]",r),l&&console.error("[Info]",l)},n};typeof window<"u"&&(window.arboDashboard=qw),Xt.default=qw,Xt.initDashboard=qw,Object.defineProperties(Xt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|