@arbocollab/arbo-plugin-item-table 0.0.43 → 0.0.44
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 +2 -2
- package/lib/umd/index.umd.js +2 -2
- package/package.json +1 -1
package/lib/es/index.es.js
CHANGED
|
@@ -32836,7 +32836,7 @@ const UZ = /* @__PURE__ */ ht({
|
|
|
32836
32836
|
), t({
|
|
32837
32837
|
internalValue: u,
|
|
32838
32838
|
clear: () => {
|
|
32839
|
-
u.value = { file: null, format: null }, a.value = !1;
|
|
32839
|
+
i.value && (i.value.value = ""), u.value = { file: null, format: null }, a.value = !1;
|
|
32840
32840
|
}
|
|
32841
32841
|
}), (O, k) => {
|
|
32842
32842
|
const I = Xg("tooltip");
|
|
@@ -76445,7 +76445,7 @@ const Vme = { key: 1 }, Bme = /* @__PURE__ */ ht({
|
|
|
76445
76445
|
"beta-tag": "_beta-tag_1lefh_57"
|
|
76446
76446
|
}, Jme = {
|
|
76447
76447
|
$style: Xme
|
|
76448
|
-
}, Qme = /* @__PURE__ */ wt(zme, [["__cssModules", Jme]]), gL = "0.0.
|
|
76448
|
+
}, Qme = /* @__PURE__ */ wt(zme, [["__cssModules", Jme]]), gL = "0.0.44", eve = { key: 0 }, tve = /* @__PURE__ */ ht({
|
|
76449
76449
|
__name: "app",
|
|
76450
76450
|
setup(e) {
|
|
76451
76451
|
const t = Z(() => n.id.length === 0 || n.workspaceId.length === 0), n = Uo({
|
package/lib/umd/index.umd.js
CHANGED
|
@@ -105,7 +105,7 @@ This will fail in production.`);r=ja,r._s.has(e)||(o?$C(e,t,i,r):BP(e,i,r),M.env
|
|
|
105
105
|
<rect width="48" height="48" fill="white" transform="translate(0.617188 0.566406)"/>
|
|
106
106
|
</clipPath>
|
|
107
107
|
</defs>
|
|
108
|
-
</svg>`,s=Sd(),{showMessage:r}=s,a=K(!1),l=K(!1),c=e,u=K({file:null,format:null,isValid:void 0}),d=q(()=>{var O;return((O=c.acceptTypes)==null?void 0:O.map(k=>`.${k}`).join(","))||".xlsx,.xls,.csv"}),h=q(()=>u.value.format?o(u.value.format):""),f=q(()=>{var O;if(!u.value.isValid)return`Invalid file type. Please upload a ${(O=c.acceptTypes)==null?void 0:O.join(", ")} file.`}),g=q(()=>!!u.value.file),m=()=>{var O;(O=i.value)==null||O.click()},y=q(()=>u.value.file?u.value.file.name:""),b=O=>{var R;const k=c.acceptTypes||["xlsx","xls","csv"],I=(R=O.name.split(".").pop())==null?void 0:R.toLowerCase();return I?k.includes(I):!1},S=O=>{var I,R;const k=b(O);O&&k?(u.value.isValid=k,a.value=!k,u.value.file=O,u.value.format=((I=O.name.split(".").pop())==null?void 0:I.toLowerCase())||null):r(`Invalid file type. Please upload a ${(R=c.acceptTypes)==null?void 0:R.join(", ")} file.`,"error")},F=O=>{const k=O.target;if(k.files&&k.files[0]){const I=k.files[0];S(I)}},C=()=>{l.value=!0},D=()=>{l.value=!1},E=O=>{if(l.value=!1,O.dataTransfer&&O.dataTransfer.files&&O.dataTransfer.files[0]){const k=O.dataTransfer.files[0];S(k)}},x=n;return ut(u,O=>{x("update:modelValue",O)},{deep:!0}),t({internalValue:u,clear:()=>{u.value={file:null,format:null},a.value=!1}}),(O,k)=>{const I=lf("tooltip");return j(),Ce("div",{class:U([O.$style["drop-area"],{[O.$style["is-dragging"]]:l.value,[O.$style.error]:a.value}]),onDragenter:on(C,["prevent"]),onDragover:on(C,["prevent"]),onDragleave:on(D,["prevent"]),onDrop:on(E,["prevent"]),onClick:m},[g.value?ot("",!0):(j(),Ce("div",{key:0,class:U(O.$style["drop-area-content"])},[ve(mt,{src:"Upload",size:"24",color:"#3C9BFA"}),we("span",null,[ve(pt,{variant:["tertiary","text"],class:U(O.$style["upload-btn"])},{default:Ee(()=>[...k[0]||(k[0]=[dt(" Click to upload ",-1)])]),_:1},8,["class"]),k[1]||(k[1]=dt(" or drag and drop files here ",-1))])],2)),g.value?it((j(),Ce("div",{key:1,class:U(O.$style["drop-area-file"])},[we("div",{innerHTML:h.value},null,8,w7),it((j(),Ce("span",{class:U(O.$style["file-name"])},[dt(bt(y.value),1)],2)),[[I,{content:y.value}]])],2)),[[I,f.value]]):ot("",!0),we("input",{ref_key:"fileInput",ref:i,type:"file",style:{display:"none"},accept:d.value,onChange:F},null,40,b7)],34)}}}),[["__cssModules",{$style:{"upload-btn":"_upload-btn_1ybeg_1","drop-area":"_drop-area_1ybeg_8","is-dragging":"_is-dragging_1ybeg_18",error:"_error_1ybeg_22","drop-area-content":"_drop-area-content_1ybeg_26","drop-area-file":"_drop-area-file_1ybeg_34","file-name":"_file-name_1ybeg_42","clear-button":"_clear-button_1ybeg_51"}}]]),D1=wc("userStore",()=>{const e=K(null),t=K(null);return{user:e,setUser:o=>{e.value=o},setUserRoleId:o=>{t.value=o},workspaceUserRoleId:t}}),S7={width:"14",height:"12",viewBox:"0 0 14 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},E7=["fill"],R7=Ct(ct({__name:"FilterBox",emits:["update:assignees"],setup(e,{emit:t}){const{hide:n,isVisible:i,triggerRef:o,popupRef:s}=er({offset:[0,0]}),r=t,a=D1(),{workspaceUserRoleId:l}=ys(a),c=q(()=>l.value||""),u=K(!1);ut(u,h=>{h?r("update:assignees",[c.value]):r("update:assignees",[]),n()});const d=q(()=>u.value?"#000":"#3C9BFA");return(h,f)=>(j(),Ce("div",null,[ve(pt,{variant:"secondary",ref_key:"triggerRef",ref:o,actived:X(i),style:gn({border:u.value?"2px solid var(--primary-color)":"",backgroundColor:u.value?" #F0F7FF ":""})},{prefix:Ee(()=>[(j(),Ce("svg",S7,[we("path",{d:"M0.0998533 0.587105C0.269063 0.228176 0.627991 0 1.02538 0H12.1009C12.4983 0 12.8572 0.228176 13.0264 0.587105C13.1956 0.946034 13.1443 1.36906 12.8931 1.67671L8.20395 7.40675V10.6653C8.20395 10.9755 8.02961 11.2601 7.75016 11.3986C7.47071 11.537 7.13998 11.5088 6.8913 11.3216L5.25048 10.091C5.04281 9.9372 4.92232 9.69364 4.92232 9.4347V7.40675L0.230606 1.67415C-0.0180804 1.36906 -0.0719197 0.94347 0.0998533 0.587105Z",fill:d.value},null,8,E7)]))]),default:Ee(()=>[f[1]||(f[1]=dt(" Filter ",-1))]),_:1},8,["actived","style"]),we("div",{ref_key:"popupRef",ref:s},[we("div",{class:U(h.$style.row)},[ve(ew,{size:"small",label:"Show Archived Items",modelValue:u.value,"onUpdate:modelValue":f[0]||(f[0]=g=>u.value=g)},null,8,["modelValue"]),f[2]||(f[2]=dt(" Assigned to me ",-1))],2)],512)]))}}),[["__cssModules",{$style:{row:"_row_1akrr_1"}}]]),D7={style:{color:"#ff5200"}},_1=Ct(ct({__name:"ImportVisual",props:{state:{},errorMessage:{},overwrite:{type:Boolean}},setup(e){return(t,n)=>(j(),Ce("div",{class:U(t.$style["inform-layout"])},[e.state==="importing"?(j(),Ce("div",{key:0,class:U(t.$style["import-error"]),style:{width:"500px"}},[ve(X(kp),{src:"UploadInProgress","max-height":180,"max-width":180})],2)):e.state==="error"?(j(),Ce("div",{key:1,class:U(t.$style["import-error"]),style:{width:"500px"}},[ve(X(kp),{src:"Unsuccessful1","max-height":180,"max-width":180}),we("span",{class:U(t.$style["step-title"])}," File doesn’t meet requirements. Check file and try again. ",2),we("div",D7,[we("span",{class:U(t.$style["step-description"])},"Error code",2),we("span",{class:U(t.$style["step-description"])},bt(e.errorMessage),3)])],2)):e.state==="success"?(j(),Ce(Ot,{key:2},[ve(X(kp),{src:"Successful1","max-height":180,"max-width":180}),we("span",{class:U(t.$style["step-title"])},bt(e.overwrite?`Existing data will be overwritten in the background.
|
|
108
|
+
</svg>`,s=Sd(),{showMessage:r}=s,a=K(!1),l=K(!1),c=e,u=K({file:null,format:null,isValid:void 0}),d=q(()=>{var O;return((O=c.acceptTypes)==null?void 0:O.map(k=>`.${k}`).join(","))||".xlsx,.xls,.csv"}),h=q(()=>u.value.format?o(u.value.format):""),f=q(()=>{var O;if(!u.value.isValid)return`Invalid file type. Please upload a ${(O=c.acceptTypes)==null?void 0:O.join(", ")} file.`}),g=q(()=>!!u.value.file),m=()=>{var O;(O=i.value)==null||O.click()},y=q(()=>u.value.file?u.value.file.name:""),b=O=>{var R;const k=c.acceptTypes||["xlsx","xls","csv"],I=(R=O.name.split(".").pop())==null?void 0:R.toLowerCase();return I?k.includes(I):!1},S=O=>{var I,R;const k=b(O);O&&k?(u.value.isValid=k,a.value=!k,u.value.file=O,u.value.format=((I=O.name.split(".").pop())==null?void 0:I.toLowerCase())||null):r(`Invalid file type. Please upload a ${(R=c.acceptTypes)==null?void 0:R.join(", ")} file.`,"error")},F=O=>{const k=O.target;if(k.files&&k.files[0]){const I=k.files[0];S(I)}},C=()=>{l.value=!0},D=()=>{l.value=!1},E=O=>{if(l.value=!1,O.dataTransfer&&O.dataTransfer.files&&O.dataTransfer.files[0]){const k=O.dataTransfer.files[0];S(k)}},x=n;return ut(u,O=>{x("update:modelValue",O)},{deep:!0}),t({internalValue:u,clear:()=>{i.value&&(i.value.value=""),u.value={file:null,format:null},a.value=!1}}),(O,k)=>{const I=lf("tooltip");return j(),Ce("div",{class:U([O.$style["drop-area"],{[O.$style["is-dragging"]]:l.value,[O.$style.error]:a.value}]),onDragenter:on(C,["prevent"]),onDragover:on(C,["prevent"]),onDragleave:on(D,["prevent"]),onDrop:on(E,["prevent"]),onClick:m},[g.value?ot("",!0):(j(),Ce("div",{key:0,class:U(O.$style["drop-area-content"])},[ve(mt,{src:"Upload",size:"24",color:"#3C9BFA"}),we("span",null,[ve(pt,{variant:["tertiary","text"],class:U(O.$style["upload-btn"])},{default:Ee(()=>[...k[0]||(k[0]=[dt(" Click to upload ",-1)])]),_:1},8,["class"]),k[1]||(k[1]=dt(" or drag and drop files here ",-1))])],2)),g.value?it((j(),Ce("div",{key:1,class:U(O.$style["drop-area-file"])},[we("div",{innerHTML:h.value},null,8,w7),it((j(),Ce("span",{class:U(O.$style["file-name"])},[dt(bt(y.value),1)],2)),[[I,{content:y.value}]])],2)),[[I,f.value]]):ot("",!0),we("input",{ref_key:"fileInput",ref:i,type:"file",style:{display:"none"},accept:d.value,onChange:F},null,40,b7)],34)}}}),[["__cssModules",{$style:{"upload-btn":"_upload-btn_1ybeg_1","drop-area":"_drop-area_1ybeg_8","is-dragging":"_is-dragging_1ybeg_18",error:"_error_1ybeg_22","drop-area-content":"_drop-area-content_1ybeg_26","drop-area-file":"_drop-area-file_1ybeg_34","file-name":"_file-name_1ybeg_42","clear-button":"_clear-button_1ybeg_51"}}]]),D1=wc("userStore",()=>{const e=K(null),t=K(null);return{user:e,setUser:o=>{e.value=o},setUserRoleId:o=>{t.value=o},workspaceUserRoleId:t}}),S7={width:"14",height:"12",viewBox:"0 0 14 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},E7=["fill"],R7=Ct(ct({__name:"FilterBox",emits:["update:assignees"],setup(e,{emit:t}){const{hide:n,isVisible:i,triggerRef:o,popupRef:s}=er({offset:[0,0]}),r=t,a=D1(),{workspaceUserRoleId:l}=ys(a),c=q(()=>l.value||""),u=K(!1);ut(u,h=>{h?r("update:assignees",[c.value]):r("update:assignees",[]),n()});const d=q(()=>u.value?"#000":"#3C9BFA");return(h,f)=>(j(),Ce("div",null,[ve(pt,{variant:"secondary",ref_key:"triggerRef",ref:o,actived:X(i),style:gn({border:u.value?"2px solid var(--primary-color)":"",backgroundColor:u.value?" #F0F7FF ":""})},{prefix:Ee(()=>[(j(),Ce("svg",S7,[we("path",{d:"M0.0998533 0.587105C0.269063 0.228176 0.627991 0 1.02538 0H12.1009C12.4983 0 12.8572 0.228176 13.0264 0.587105C13.1956 0.946034 13.1443 1.36906 12.8931 1.67671L8.20395 7.40675V10.6653C8.20395 10.9755 8.02961 11.2601 7.75016 11.3986C7.47071 11.537 7.13998 11.5088 6.8913 11.3216L5.25048 10.091C5.04281 9.9372 4.92232 9.69364 4.92232 9.4347V7.40675L0.230606 1.67415C-0.0180804 1.36906 -0.0719197 0.94347 0.0998533 0.587105Z",fill:d.value},null,8,E7)]))]),default:Ee(()=>[f[1]||(f[1]=dt(" Filter ",-1))]),_:1},8,["actived","style"]),we("div",{ref_key:"popupRef",ref:s},[we("div",{class:U(h.$style.row)},[ve(ew,{size:"small",label:"Show Archived Items",modelValue:u.value,"onUpdate:modelValue":f[0]||(f[0]=g=>u.value=g)},null,8,["modelValue"]),f[2]||(f[2]=dt(" Assigned to me ",-1))],2)],512)]))}}),[["__cssModules",{$style:{row:"_row_1akrr_1"}}]]),D7={style:{color:"#ff5200"}},_1=Ct(ct({__name:"ImportVisual",props:{state:{},errorMessage:{},overwrite:{type:Boolean}},setup(e){return(t,n)=>(j(),Ce("div",{class:U(t.$style["inform-layout"])},[e.state==="importing"?(j(),Ce("div",{key:0,class:U(t.$style["import-error"]),style:{width:"500px"}},[ve(X(kp),{src:"UploadInProgress","max-height":180,"max-width":180})],2)):e.state==="error"?(j(),Ce("div",{key:1,class:U(t.$style["import-error"]),style:{width:"500px"}},[ve(X(kp),{src:"Unsuccessful1","max-height":180,"max-width":180}),we("span",{class:U(t.$style["step-title"])}," File doesn’t meet requirements. Check file and try again. ",2),we("div",D7,[we("span",{class:U(t.$style["step-description"])},"Error code",2),we("span",{class:U(t.$style["step-description"])},bt(e.errorMessage),3)])],2)):e.state==="success"?(j(),Ce(Ot,{key:2},[ve(X(kp),{src:"Successful1","max-height":180,"max-width":180}),we("span",{class:U(t.$style["step-title"])},bt(e.overwrite?`Existing data will be overwritten in the background.
|
|
109
109
|
Refresh to see updates.`:"Work will be created in background. Refresh to see updates."),3)],64)):ot("",!0)],2))}}),[["__cssModules",{$style:{"inform-layout":"_inform-layout_1og33_1","import-error":"_import-error_1og33_11","step-title":"_step-title_1og33_22","step-description":"_step-description_1og33_27"}}]]),x1=Ct(ct({__name:"DateRule",setup(e){const n=(()=>{const o=(h,f,g,m)=>{const y=document.createElement("span");return y.textContent=h,y.style.fontWeight=f,y.style.fontSize=g,y.style.color=m,y},s=document.createElement("div");s.style.display="flex",s.style.flexDirection="column";const r=document.createElement("div"),a=document.createElement("div"),l=o("Valid formats:","normal","14px","#02C39A"),c=o("Invalid formats:","normal","14px","#FF5200"),u=o(" 2025.12.31, 2025-12-31, 2025/12/31 ","normal","14px",""),d=o(" 12.31.2025, 2025.31.12","normal","14px","");return r.appendChild(l),r.appendChild(u),a.appendChild(c),a.appendChild(d),s.appendChild(r),s.appendChild(a),s.outerHTML})(),i=mn;return(o,s)=>(j(),Ce("div",{class:U(o.$style["date-format-guide"])},[we("span",{class:U(o.$style["step-title-2"])},[s[0]||(s[0]=dt(" Date format guide ",-1)),it(ve(X(mt),{src:"InfoCircle",color:"#A6A6A6"},null,512),[[X(i),{content:X(n)}]])],2),we("div",{class:U(o.$style["date-rule-section"])},[s[3]||(s[3]=we("span",null,"Enter dates in one of these formats:",-1)),we("ul",{class:U(o.$style["step-description"])},[we("li",{class:U(o.$style["date-rule"])},[...s[1]||(s[1]=[we("b",null,"DD MM YYYY",-1),dt(" (Day-Month-Year) ",-1)])],2),we("li",{class:U(o.$style["date-rule"])},[...s[2]||(s[2]=[we("b",null,"YYYY MM DD",-1),dt(" (Year-Month-Day) ",-1)])],2)],2)],2)],2))}}),[["__cssModules",{$style:{"date-format-guide":"_date-format-guide_ef59d_1","step-title-2":"_step-title-2_ef59d_13","date-rule-section":"_date-rule-section_ef59d_25","step-description":"_step-description_ef59d_29","date-rule":"_date-rule_ef59d_25"}}]]),_7={key:1},x7=Ct(ct({__name:"PopupCreateScenes",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const i=K(null),o=e,s=()=>{i.value&&i.value.show()},r=K(""),a=K("idle"),l=q(()=>({error:"Import failed",importing:"Import in progress",success:"Import successful",idle:"Create new work"})[a.value]),c=K(null),u=K({file:null,format:null}),{apiServices:d}=mo(!1,o),h=async I=>{var P,V;if(((P=d==null?void 0:d.value)==null?void 0:P.getStatuses)===void 0){console.error("API services not available",(V=d==null?void 0:d.value)==null?void 0:V.getStatuses);return}return await d.value.getStatuses(o.workspaceId,o.entityId,I)},f=K(!1),g=async()=>{f.value=!0;const I=o.workspaceId,R=o.entityId;if(!I||!R||!d.value){console.error("Workspace ID or Entity ID is missing");return}try{if(!await d.value.downloadTemplate(I,R))throw new Error("No response from downloadTemplate API")}catch(P){console.error("Error downloading template:",P)}f.value=!1},m=async I=>{var V,H,te;const R=new FormData,P=((V=I.name.split(".").pop())==null?void 0:V.toString())||"";if(R.append("file",I),R.append("format",P),R.append("template_flow_status_id",D.value||""),!d.value||!o.workspaceId||!o.entityId){console.error("API services not available");return}try{const B=await d.value.addNewSceneViaImportFile(o.workspaceId,o.entityId,R);y()}catch(B){throw console.error("Error uploading file:",B),b(((te=(H=B.response)==null?void 0:H.data)==null?void 0:te.message)||"An unknown error occurred during file upload."),B}},y=()=>{a.value="success"},b=I=>{r.value=I,a.value="error"},S=n,F=()=>{S("import-success"),k()},C=async()=>{if(!u.value||!u.value.file){console.error("No file to upload");return}a.value="importing",await m(u.value.file)};t({open:s});const D=K(null),E=q(()=>!u.value.file||!u.value.format||!u.value.isValid||!D.value),x=K(null),O=()=>{var I,R;(I=c.value)==null||I.clear(),r.value="",u.value={file:null,format:null},D.value=null,(R=x==null?void 0:x.value)==null||R.clear(),a.value="idle"},k=()=>{var I;O(),(I=i.value)==null||I.hide()};return(I,R)=>(j(),Xe(X(JP),{"popup-name":l.value,"show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:i,onHidden:O},Ru({default:Ee(()=>[a.value==="importing"||a.value==="error"||a.value==="success"?(j(),Xe(_1,{key:0,state:a.value,"error-message":r.value},null,8,["state","error-message"])):(j(),Ce("div",_7,[we("div",{class:U(I.$style["step-section"])},[we("span",{class:U(I.$style["step-title"])},"Step 1: Download sample file",2),we("span",{class:U(I.$style["step-description"])}," Get a sample file with all columns ready for editing. ",2),ve(X(pt),{class:U(I.$style["download-sample-btn"]),size:12,variant:"secondary",disabled:f.value,onHandleClick:g},{prefix:Ee(()=>[ve(X(mt),{src:"Download"})]),default:Ee(()=>[R[2]||(R[2]=dt(" Download sample file ",-1))]),_:1},8,["class","disabled"])],2),we("div",{class:U(I.$style["step-section"])},[we("span",{class:U(I.$style["step-title"])},"Step 2: Upload your file (.xlsx, .xls, .csv)",2),ve(X(R1),{modelValue:u.value,"onUpdate:modelValue":R[0]||(R[0]=P=>u.value=P),ref_key:"filUploaderRef",ref:c},null,8,["modelValue"])],2),we("div",{class:U(I.$style["step-section"])},[we("span",{class:U(I.$style["step-title"])},"Step 3: Select status",2),we("span",{class:U(I.$style["step-description"])},"Choose a status for the new work.",2),ve(X(m7),{ref_key:"statusRef",ref:x,modelValue:D.value,"onUpdate:modelValue":R[1]||(R[1]=P=>D.value=P),"get-status-func":h,"workspace-id":o.workspaceId,id:o.entityId},null,8,["modelValue","workspace-id","id"])],2),we("div",{class:U(I.$style["step-section"]),style:{"padding-top":"0","padding-bottom":"0"}},[ve(x1)],2)]))]),_:2},[a.value==="idle"?{name:"footer",fn:Ee(()=>[ve(X(pt),{style:{flex:"1"},variant:"secondary",onClick:k},{default:Ee(()=>[...R[3]||(R[3]=[dt(" Cancel ",-1)])]),_:1}),ve(X(pt),{disabled:E.value,style:{flex:"1"},variant:"primary",onClick:C},{default:Ee(()=>[...R[4]||(R[4]=[dt(" Import ",-1)])]),_:1},8,["disabled"])]),key:"0"}:a.value==="success"?{name:"footer",fn:Ee(()=>[ve(X(pt),{style:{flex:"1"},variant:"primary",onClick:F},{default:Ee(()=>[...R[5]||(R[5]=[dt(" Close ",-1)])]),_:1})]),key:"1"}:a.value=="error"?{name:"footer",fn:Ee(()=>[ve(X(pt),{style:{flex:"1"},variant:"primary",onClick:O},{default:Ee(()=>[...R[6]||(R[6]=[dt(" Try Again ",-1)])]),_:1})]),key:"2"}:void 0]),1032,["popup-name"]))}}),[["__cssModules",{$style:{"step-section":"_step-section_jt1wo_1","step-title":"_step-title_jt1wo_11","step-title-2":"_step-title-2_jt1wo_17","step-description":"_step-description_jt1wo_23","date-format-guide":"_date-format-guide_jt1wo_28","import-error":"_import-error_jt1wo_39","drop-area":"_drop-area_jt1wo_49","is-dragging":"_is-dragging_jt1wo_49","drop-area-content":"_drop-area-content_jt1wo_52",browse:"_browse_jt1wo_61","download-sample-btn":"_download-sample-btn_jt1wo_65"}}]]),Sw={id:void 0,assignees:uK,status:_K,dateRange:dK,isStarted:Ya,isCompleted:Ya,lastUpdated:Ya,completedOn:Ya,isDeleted:Ya,isArchived:Ya,isProcessing:Ya,name:ZP,options:O8,metric:bK,__checkboxSelection:void 0},F7={id:!1,assignees:!0,status:!0,dateRange:!0,isStarted:!1,isCompleted:!1,lastUpdated:!1,completedOn:!1,isDeleted:!1,isArchived:!1,isProcessing:!1,name:!1,options:!0,metric:!1,__checkboxSelection:!1},T7={id:void 0,assignees:WP,status:KP,dateRange:hK,isStarted:void 0,isCompleted:void 0,lastUpdated:void 0,completedOn:void 0,isDeleted:void 0,isArchived:void 0,isProcessing:void 0,name:ZP,options:XP,metric:void 0,__checkboxSelection:void 0},P7={id:[100,100],assignees:[200,200],status:[200,200],dateRange:[255,255],isStarted:[150,150],isCompleted:[150,150],lastUpdated:[180,180],completedOn:[180,180],isDeleted:[void 0,void 0],isArchived:[void 0,void 0],isProcessing:[void 0,void 0],name:[350,500],options:[50,50],metric:[200,300],__checkboxSelection:[50,50]},I7={dateRange:{cellEditorPopupPosition:"under",cellEditorPopup:!1},name:{cellEditorPopupPosition:"over",cellEditor:!1,cellEditorPopup:!1},metric:{suppressKeyboardEvent:void 0,suppressNavigable:!1,suppressMovable:!1,cellClass:"ag-cell-optimized"}},A7=e=>{if(Number(e.metric_type.id)==1)return["none","not","range"].includes(e.restricted_type)?"number":"dropdown";if(Number(e.metric_type.id)==2)return e.format_type=="icon"?"rating":"dropdown";if(Number(e.metric_type.id)==3)return},k7=e=>{var t;if(((t=e==null?void 0:e.auth_permission)==null?void 0:t.permission)==2)return A7(e)};function F1(e){var o,s,r,a,l,c,u,d,h;const t=((o=e==null?void 0:e.data)==null?void 0:o.permissions)||void 0,n={assignees:(t==null?void 0:t.has_update_assignee_permission)||0,completedOn:0,name:0,permissions:0,status:(t==null?void 0:t.has_edit_template_flow_status_permission)||0,dateRange:(t==null?void 0:t.has_edit_date_permission)||0,isStarted:0,isDeleted:0,isArchived:0,isProcessing:0,lastUpdated:0,id:0,isCompleted:0,options:1};if(console.log("Checking permissions for field:",(s=e.colDef)==null?void 0:s.field,"with data:",e.data),e.data===void 0)return{disabled:!1,readOnly:!1,type:void 0};if(((r=e.colDef)==null?void 0:r.field)=="options")return{disabled:!1,readOnly:!1,type:void 0};if((l=(a=e.colDef)==null?void 0:a.field)!=null&&l.includes("metric"))return console.log("Metric field detected, ",(c=e.colDef)==null?void 0:c.context),{disabled:!1,readOnly:!1,type:k7((u=e.colDef)==null?void 0:u.context)};if(!t)return{disabled:!1,readOnly:!1,type:void 0};let i={disabled:!1,readOnly:(t==null?void 0:t.has_edit_permission)==0,type:void 0};if(((d=e.colDef)==null?void 0:d.field)!=="name"){const f=n[(h=e.colDef)==null?void 0:h.field];i=f?{disabled:f===-1,readOnly:f!==-1&&f!==1,type:void 0}:{disabled:!1,readOnly:!0,type:void 0}}return i}class kd{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 r,a;const n=t.data||((r=t.node)==null?void 0:r.data),i=(a=t.colDef)==null?void 0:a.field,o=i&&n?n[i]:void 0,s=F1(t);return{...t,value:o,disabled:s==null?void 0:s.disabled,readOnly:s==null?void 0:s.readOnly,type:s==null?void 0:s.type}}static isFrameworkComponent(t){return!!t&&(typeof t=="object"||typeof t=="function")}static resolveRendererComponent(t){return t.includes("metric")&&Sw.metric?Sw.metric:Sw[t]??XC}static resolveEditorComponent(t){return t.includes("metric"),T7[t]??XC}static canEditField(t,n){const i=F1(n),o=F7[t]??!1;return!(i!=null&&i.disabled)&&!(i!=null&&i.readOnly)&&o}static resolveSize(t){const[n=200,i=300]=P7[t]??[];return{minWidth:n,maxWidth:i}}static buildHeaderComponentParams(t){return n=>typeof t=="function"?t(n):t??{}}static fromType(t){const{wrapVueCellRenderer:n,wrapVueCellEditor:i}=this.getWrappers(),o=String(t.field??""),s=this.resolveSize(o),r=I7[o]??{},a=this.resolveRendererComponent(o),l=this.isFrameworkComponent(a)?n(a):a;return{headerName:t.headerName,...s,...t,cellEditorSelector:u=>{if(!this.canEditField(o,u))return;const d=this.resolveEditorComponent(o);return{component:this.isFrameworkComponent(d)?i(d):d,params:this.buildCommonCellParams(u)}},singleClickEdit:!0,cellEditorPopup:!0,cellEditorPopupPosition:"under",editable:u=>this.canEditField(o,u),cellRenderer:l,cellRendererParams:t.cellRendererParams??this.buildCommonCellParams,headerComponentParams:this.buildHeaderComponentParams(t.headerComponentParams),...r}}}bn(kd,"wrappers",null);function O7(e){return"stopEditing"in e}const M7=ct({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},sortType:{type:String,default:"default"},maxRating:{type:Number,default:5}},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),()=>ve(t,{...e})}}),L7=()=>`${Math.max(50,Math.round(k3(0,100)))}%`,N7=8;function T1(e){return class{constructor(){bn(this,"container");bn(this,"vNode",null);bn(this,"componentInstance",null);bn(this,"params");bn(this,"isEditor",!1);bn(this,"_destroyed",!1)}init(n){var c,u,d,h;if(!n){console.error("[Vue3CellWrapper] Missing context information: workspaceId or entityId. Cannot initialize wrapper.");return}const i=performance.now(),o=n.context.apiClass;this.params=n,this.isEditor=O7(n),this.container=document.createElement("div"),this.container.classList.add("ag-vue3-cell-wrapper",`${e.name||"unknown-component"}`),this.container.style.setProperty("--loading-overlay-width",L7()),this.container.style.width="100%",this.container.style.height="100%";const s=Object.freeze(n),r=n,a={component:e,params:s,disabled:!1,readOnly:r.readOnly??!1,value:n.value,maxRating:r.maxRating??void 0,data:n.data,id:(c=n==null?void 0:n.data)==null?void 0:c.id,workspaceId:n.context.workspaceId,entityId:n.context.entityId,axiosService:o,tooltip:r.tooltip??void 0,isSearching:r.isSearching??!1,isFiltering:r.isFiltering??!1,isNoData:r.isNoData??!1};this.vNode=ve(M7,a),OR(this.vNode,this.container);const l=performance.now()-i;l>N7&&console.warn(`[Vue3CellWrapper] Slow render detected (${l.toFixed(1)}ms) for component "${(u=n.colDef)==null?void 0:u.field}" and field "${(d=n.data)==null?void 0:d.id}"`),this.componentInstance=(h=this.vNode.component)==null?void 0:h.proxy,this.componentInstance||console.warn("[Vue3CellWrapper] Component instance not available after render")}getGui(){return this.container}refresh(n){return!1}getValue(){var n,i,o;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((o=(i=this.componentInstance).getValue)==null?void 0:o.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,o,s;return this.isEditor?(i=this.componentInstance)!=null&&i.getPopupPosition?this.componentInstance.getPopupPosition():((s=(o=this.params)==null?void 0:o.colDef)==null?void 0:s.cellEditorPopupPosition)??"under":void 0}afterGuiAttached(){!this.isEditor||this.componentInstance}destroy(){if(!this._destroyed&&(this._destroyed=!0,!!this.container))try{const n=this.componentInstance;if(n){try{typeof n.$destroy=="function"&&n.$destroy()}catch(o){console.warn("[Vue3CellWrapper] Error during $destroy:",o)}try{typeof n.destroy=="function"&&n.destroy()}catch(o){console.warn("[Vue3CellWrapper] Error during destroy():",o)}}(typeof queueMicrotask=="function"?queueMicrotask:o=>Promise.resolve().then(o))(()=>{try{OR(null,this.container)}catch(o){console.warn("[Vue3CellWrapper] Error during unmount:",o)}finally{this.container.textContent=""}})}catch(n){console.error("[Vue3CellWrapper] Error during cleanup:",n)}finally{this.vNode=null,this.componentInstance=null}}}}function Qp(e){return T1(e)}function P1(e){return T1(e)}var el=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 o=i.get(e);return!o&&n&&(o=new Set,i.set(e,o)),o}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,o=a=>{const l=i?()=>i.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},s=this.getListeners(n,t,!1);if(((s==null?void 0:s.size)??0)>0){const a=new Set(s);for(const l of a)s!=null&&s.has(l)&&o(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)o(()=>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 lr(e){return e==null||e===""?null:e}function Ke(e){return e!=null&&e!==""}function hn(e){return!Ke(e)}function Ew(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Od(e,t){const n=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return n===i}function V7(e,t,n=!1){const i=e==null,o=t==null;if(e!=null&&e.toNumber&&(e=e.toNumber()),t!=null&&t.toNumber&&(t=t.toNumber()),i&&o)return 0;if(i)return-1;if(o)return 1;function s(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!n)return s(e,t);try{return e.localeCompare(t)}catch{return s(e,t)}}var B7=/[&<>"']/g,H7={"&":"&","<":"<",">":">",'"':""","'":"'"};function Fc(e){return(e==null?void 0:e.toString().toString())??null}function Md(e){var t;return((t=Fc(e))==null?void 0:t.replace(B7,n=>H7[n]))??null}function Ss(e){return e.eRootDiv.getRootNode()}function yn(e){return Ss(e).activeElement}function Zn(e){const{gos:t,eRootDiv:n}=e;let i=null;const o=t.get("getDocument");return o&&Ke(o)?i=o():n&&(i=n.ownerDocument),i&&Ke(i)?i:document}function I1(e){const t=yn(e);return t===null||t===Zn(e).body}function A1(e){return Zn(e).defaultView||window}function Rw(e){let t=null,n=null;try{t=Zn(e).fullscreenElement}catch{}finally{t||(t=Ss(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 G7(e){const t=Rw(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function $7(e){const t=Rw(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function Yo(e,t,n){n==null||typeof n=="string"&&n==""?k1(e,t):So(e,t,n)}function So(e,t,n){e.setAttribute(O1(t),n.toString())}function k1(e,t){e.removeAttribute(O1(t))}function O1(e){return`aria-${e}`}function zr(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function W7(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function U7(e){return e.getAttribute("aria-label")}function Tc(e,t){Yo(e,"label",t)}function Ld(e,t){Yo(e,"labelledby",t)}function M1(e,t){Yo(e,"live",t)}function z7(e,t){Yo(e,"atomic",t)}function j7(e,t){Yo(e,"relevant",t)}function K7(e,t){Yo(e,"invalid",t)}function q7(e,t){Yo(e,"disabled",t)}function L1(e,t){Yo(e,"hidden",t)}function Dw(e,t){So(e,"expanded",t)}function Y7(e,t){So(e,"setsize",t)}function Z7(e,t){So(e,"posinset",t)}function X7(e,t){So(e,"multiselectable",t)}function J7(e,t){So(e,"rowcount",t)}function eg(e,t){So(e,"rowindex",t)}function Q7(e,t){So(e,"rowspan",t)}function e9(e,t){So(e,"colcount",t)}function N1(e,t){So(e,"colindex",t)}function t9(e,t){So(e,"colspan",t)}function n9(e,t){So(e,"sort",t)}function i9(e){k1(e,"sort")}function V1(e,t){Yo(e,"selected",t)}function o9(e,t){Yo(e,"controls",t)}function s9(e,t){o9(e,t.id),Ld(t,e.id)}function B1(e,t){Yo(e,"owns",t)}function tg(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var r9="[tabindex], input, select, button, textarea, [href]",H1="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Nd(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(H1)?!1:Es(e)}function fn(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-hidden",!t),i||L1(e,!t)}function a9(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-invisible",!t),i||L1(e,!t)}function Vd(e,t){const n="disabled",i=t?s=>s.setAttribute(n,""):s=>s.removeAttribute(n);i(e);const o=e.querySelectorAll("input")??[];for(const s of o)i(s)}function tl(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 nl(e){const{height:t,width:n,borderTopWidth:i,borderRightWidth:o,borderBottomWidth:s,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:u,marginTop:d,marginRight:h,marginBottom:f,marginLeft:g,boxSizing:m}=window.getComputedStyle(e),y=Number.parseFloat;return{height:y(t||"0"),width:y(n||"0"),borderTopWidth:y(i||"0"),borderRightWidth:y(o||"0"),borderBottomWidth:y(s||"0"),borderLeftWidth:y(r||"0"),paddingTop:y(a||"0"),paddingRight:y(l||"0"),paddingBottom:y(c||"0"),paddingLeft:y(u||"0"),marginTop:y(d||"0"),marginRight:y(h||"0"),marginBottom:y(f||"0"),marginLeft:y(g||"0"),boxSizing:m}}function _w(e){const t=nl(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function Bd(e){const t=nl(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function G1(e){const{height:t,marginBottom:n,marginTop:i}=nl(e);return Math.floor(t+n+i)}function ng(e){const{width:t,marginLeft:n,marginRight:i}=nl(e);return Math.floor(t+n+i)}function $1(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:i,borderRightWidth:o,borderBottomWidth:s}=nl(e);return{top:t.top+(n||0),left:t.left+(i||0),right:t.right+(o||0),bottom:t.bottom+(s||0)}}function ig(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function og(e,t,n){n&&(t*=-1),e.scrollLeft=t}function ii(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function Zo(e){e!=null&&e.parentNode&&e.remove()}function W1(e){return!!e.offsetParent}function Es(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!W1(e)||window.getComputedStyle(e).visibility!=="visible")}function xw(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function U1(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 z1(e,t){for(let n=0;n<t.length;n++){const i=t[n],o=e.children[n];o!==i&&e.insertBefore(i,o)}}function l9(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Hd(e,t){if(t)for(const n of Object.keys(t)){const i=t[n];if(!(n!=null&&n.length)||i==null)continue;const o=l9(n),s=i.toString(),r=s.replace(/\s*!important/g,""),a=r.length!=s.length?"important":void 0;e.style.setProperty(o,r,a)}}function sg(e){return()=>{const t=e();return t?Fw(t)||j1(t):!0}}function Fw(e){return e.clientWidth<e.scrollWidth}function j1(e){return e.clientHeight<e.scrollHeight}function rg(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Rs(e,t)}function Rs(e,t){t=Tw(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Gd(e,t){t=Tw(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function Tw(e){return typeof e=="number"?`${e}px`:e}function Pw(e){return e instanceof Node||e instanceof HTMLElement}function to(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function jr(e,t,n){const o=A1(e).ResizeObserver,s=o?new o(n):null;return s==null||s.observe(t),()=>s==null?void 0:s.disconnect()}function cr(e,t){const n=A1(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var K1="data-ref",Iw;function q1(){return Iw??(Iw=document.createTextNode(" ")),Iw.cloneNode()}function $d(e){const{attrs:t,children:n,cls:i,ref:o,role:s,tag:r}=e,a=document.createElement(r);if(i&&(a.className=i),o&&a.setAttribute(K1,o),s&&a.setAttribute("role",s),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 c of n)c&&(typeof c=="string"?(a.appendChild(document.createTextNode(c)),l=!1):typeof c=="function"?a.appendChild(c()):(l&&(a.appendChild(q1()),l=!1),a.append($d(c)),a.appendChild(q1())))}return a}var c9=["touchstart","touchend","touchmove","touchcancel","scroll"],u9=["wheel"],Aw={},Y1=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof Aw[n]=="boolean")return Aw[n];const i=document.createElement(e[n]||"div");return n="on"+n,Aw[n]=n in i}})();function d9(e,t){return!t||!e?!1:f9(t).indexOf(e)>=0}function h9(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function f9(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():h9(t)}function p9(e,t,n){const i=g9(t);let o;i!=null&&(o={passive:i}),e.addEventListener(t,n,o)}var g9=e=>{const t=c9.includes(e),n=u9.includes(e);if(t)return!0;if(n)return!1};function Z1(e,t,n){if(n===0)return!1;const i=Math.abs(e.clientX-t.clientX),o=Math.abs(e.clientY-t.clientY);return Math.max(i,o)<=n}var Wd=(e,t)=>{const n=e.identifier;for(let i=0,o=t.length;i<o;++i){const s=t[i];if(s.identifier===n)return s}return null};function Ud(e,t){return e.gos.isElementInThisInstance(t.target)}function m9(e,t,n){const o=e.getBoundingClientRect().height,s=G7(n)-2,r=$7(n)-2;if(!e.offsetParent)return;const l=$1(e.offsetParent),{clientY:c,clientX:u}=t;let d=c-l.top-o/2,h=u-l.left-10;const f=Zn(n),g=f.defaultView||window,m=g.pageYOffset||f.documentElement.scrollTop,y=g.pageXOffset||f.documentElement.scrollLeft;s>0&&h+e.clientWidth>s+y&&(h=s+y-e.clientWidth),h<0&&(h=0),r>0&&d+e.clientHeight>r+m&&(d=r+m-e.clientHeight),d<0&&(d=0),e.style.left=`${h}px`,e.style.top=`${d}px`}var ag=(e,...t)=>{for(const n of t){const[i,o,s,r]=n;i.addEventListener(o,s,r),e.push(n)}},kw=e=>{if(e){for(const[t,n,i,o]of e)t.removeEventListener(n,i,o);e.length=0}},Kr=e=>{e.cancelable&&e.preventDefault()};function v9(e,t){return t}function X1(e){return(e==null?void 0:e.getLocaleTextFunc())??v9}function y9(e,t,n,i){const o=t[n];return e.getLocaleTextFunc()(n,typeof o=="function"?o(i):o,i)}function C9(e){return(t,n,i)=>e({key:t,defaultValue:n,variableValues:i})}function w9(e){return(t,n,i)=>{let o=e==null?void 0:e[t];if(o&&(i!=null&&i.length)){let s=0;for(;!(s>=i.length||o.indexOf("${variable}")===-1);)o=o.replace("${variable}",i[s++])}return o??n}}var Ds=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 el),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 o=t[i];o&&n.push(this._setupListener(e,i,o))}return n}_setupListener(e,t,n){if(this.destroyed)return()=>null;let i;if(b9(e))e.__addEventListener(t,n),i=()=>(e.__removeEventListener(t,n),null);else{const o=S9(e);e instanceof HTMLElement?p9(e,t,n):o?e.addListener(t,n):e.addEventListener(t,n),i=o?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==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(o=>o!==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=o=>{if(o.changeSet){if(o.changeSet&&o.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=o.changeSet.id}const s={type:"propertyChanged",changeSet:o.changeSet,source:o.source};t(s)};for(const o of e)this.setupPropertyListener(o,i)}getLocaleTextFunc(){return X1(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 b9(e){return e.__addEventListener!==void 0}function S9(e){return e.eventServiceType==="global"}var be=class extends Ds{},J1={};function Ow(e,t){J1[t]||(e(),J1[t]=!0)}var E9={pending:!1,funcs:[]},R9={pending:!1,funcs:[]};function Mw(e,t="setTimeout",n){const i=t==="raf"?R9:E9;if(i.funcs.push(e),i.pending)return;i.pending=!0;const o=()=>{const s=i.funcs.slice();i.funcs.length=0,i.pending=!1;for(const r of s)r()};t==="raf"?cr(n,o):window.setTimeout(o,0)}function oi(e,t,n){let i;return function(...o){const s=this;window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(s,o)},n)}}function Q1(e,t){let n=0;return function(...i){const o=this,s=Date.now();s-n<t||(n=s,e.apply(o,i))}}function D9(e,t,n,i=100){const o=Date.now();let s=null,r=!1;const a=()=>{s!=null&&(window.clearInterval(s),s=null)};e.addDestroyFunc(a);const l=()=>{const c=Date.now()-o>i;(t()||c)&&(n(),r=!0,a())};l(),r||(s=window.setInterval(l,10))}var eI=new Set(["__proto__","constructor","prototype"]);function _9(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=>!eI.has(i)))t(n,e[n])}}function Ti(e,t,n=!0,i=!1){Ke(t)&&_9(t,(o,s)=>{let r=e[o];r!==s&&(i&&r==null&&s!=null&&typeof s=="object"&&s.constructor===Object&&(r={},e[o]=r),tI(s)&&tI(r)&&!Array.isArray(r)?Ti(r,s,n,i):(n||s!==void 0)&&(e[o]=s))})}function tI(e){return typeof e=="object"&&e!==null}var Lw=class Rr{static applyGlobalGridOptions(t){if(!Rr.gridOptions)return{...t};let n={};return Ti(n,Rr.gridOptions,!0,!0),Rr.mergeStrategy==="deep"?Ti(n,t,!0,!0):n={...n,...t},Rr.gridOptions.context&&(n.context=Rr.gridOptions.context),t.context&&(Rr.mergeStrategy==="deep"&&n.context&&Ti(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(Rr.mergeStrategy==="deep"){const i=x9(t);if(i&&typeof i=="object"&&typeof n=="object")return Rr.applyGlobalGridOptions({[t]:n})[t]}return n}};Lw.gridOptions=void 0,Lw.mergeStrategy="shallow";var Nw=Lw;function x9(e){var t;return(t=Nw.gridOptions)==null?void 0:t[e]}var F9={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},nI="https://www.ag-grid.com";function qr(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function zd(e,...t){Ow(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function Pc(e,...t){Ow(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var iI=new Set,lg={},Ic={},cg,oI=!1,sI=!1,T9=!1;function P9(e){const[t,n]=e.version.split(".")||[],[i,o]=cg.split(".")||[];return t===i&&n===o}function I9(e){var i;cg||(cg=e.version);const t=o=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${o} Please update all modules to the same version.`;e.version?P9(e)||Pc(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${cg}.`)):Pc(t(`'${e.moduleName}' is incompatible.`));const n=(i=e.validate)==null?void 0:i.call(e);n&&!n.isValid&&Pc(`${n.message}`)}function jd(e,t,n=!1){n||(oI=!0),I9(e);const i=e.rowModels??["all"];iI.add(e);let o;t!==void 0?(sI=!0,Ic[t]===void 0&&(Ic[t]={}),o=Ic[t]):o=lg;for(const s of i)o[s]===void 0&&(o[s]={}),o[s][e.moduleName]=e;if(e.dependsOn)for(const s of e.dependsOn)jd(s,t,n)}function A9(e){delete Ic[e]}function Vw(e,t,n){const i=o=>{var s,r,a;return!!((s=lg[o])!=null&&s[e])||!!((a=(r=Ic[t])==null?void 0:r[o])!=null&&a[e])};return i(n)||i("all")}function Bw(){return sI}function k9(e,t){const n=Ic[e]??{};return[...Object.values(lg.all??{}),...Object.values(n.all??{}),...Object.values(lg[t]??{}),...Object.values(n[t]??{})]}function O9(){return new Set(iI)}function M9(){return oI}function L9(){return T9}var N9=class{static register(e){jd(e,void 0)}static registerModules(e){for(const t of e)jd(t,void 0)}},ze="34.3.1",rI=2e3,aI=100,lI="_version_",ug=null,Ac=`${nI}/javascript-data-grid`;function V9(e){ug=e}function B9(e){Ac=e}function cI(e,t,n){return(ug==null?void 0:ug(e,t))??[W9(e,t,n)]}function Hw(e,t,n,i,o){e(`${i?"warning":"error"} #${t}`,...cI(t,n,o))}function H9(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 G9(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=H9(e)),t}function dg(e){return e===void 0?"undefined":e===null?"null":e}function Gw(e,t){return`${e}?${t.toString()}`}function $9(e,t,n){const i=Array.from(t.entries()).sort((s,r)=>r[1].length-s[1].length);let o=Gw(e,t);for(const[s,r]of i){if(s===lI)continue;const a=o.length-n;if(a<=0)break;const l="...",c=a+l.length,u=r.length-c>aI?r.slice(0,r.length-c)+l:r.slice(0,aI)+l;t.set(s,u),o=Gw(e,t)}return o}function uI(e,t){const n=new URLSearchParams;if(n.append(lI,ze),t)for(const s of Object.keys(t))n.append(s,G9(t[s]));const i=`${Ac}/errors/${e}`,o=Gw(i,n);return o.length<=rI?o:$9(i,n,rI)}var W9=(e,t,n)=>{const i=uI(e,t);return`${`${n?n+`
|
|
110
110
|
`:""}Visit ${i}`}${n?"":`
|
|
111
111
|
Alternatively register the ValidationModule to see the full message in the console.`}`};function Oe(...e){Hw(zd,e[0],e[1],!0)}function Qt(...e){Hw(Pc,e[0],e[1],!1)}function Kd(e,t,n){Hw(Pc,e,t,!1,n)}function U9(e,t){const n=t[0];return`error #${n} `+cI(n,t[1],e).join(" ")}function _s(...e){return U9(void 0,e)}function dI(e,t){return e.get("rowModelType")===t}function In(e,t){return dI(e,"clientSide")}function kc(e,t){return dI(e,"serverSide")}function si(e,t){return e.get("domLayout")===t}function il(e){return pg(e)!==void 0}function hI(e){return typeof e.get("getRowHeight")=="function"}function z9(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function Yr(e,t,n=!1,i){const{gos:o,environment:s}=e;if(i==null&&(i=s.getDefaultRowHeight()),hI(o)){if(n)return{height:i,estimated:!0};const l={node:t,data:t.data},c=o.getCallback("getRowHeight")(l);if($w(c))return c===0&&Oe(23),{height:Math.max(1,c),estimated:!1}}if(t.detail&&o.get("masterDetail"))return j9(o);const r=o.get("rowHeight");return{height:r&&$w(r)?r:i,estimated:!1}}function j9(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return $w(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function ol(e){const{environment:t,gos:n}=e,i=n.get("rowHeight");if(!i||hn(i))return t.getDefaultRowHeight();const o=t.refreshRowHeightVariable();return o!==-1?o:(Oe(24),t.getDefaultRowHeight())}function $w(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function fI(e,t,n){const i=t[e.getDomDataKey()];return i?i[n]:void 0}function sl(e,t,n,i){const o=e.getDomDataKey();let s=t[o];hn(s)&&(s={},t[o]=s),s[n]=i}function Oc(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function pI(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||si(e,"print"))}function xs(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function Ww(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function gI(e){return e.get("grandTotalRow")}function mI(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function vI(e,t,n){return!!t.group&&!t.footer&&mI(e,n)}function Mc(e){const t=e.getCallback("getRowId");return t===void 0?t:n=>{let i=t(n);return typeof i!="string"&&(Ow(()=>Oe(25,{id:i}),"getRowIdString"),i=String(i)),i}}function K9(e,t){const n=e.get("groupHideParentOfSingleChild");return!!(n===!0||n==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function q9(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function Lc(e){return(e==null?void 0:e.checkboxes)??!0}function hg(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function fg(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function Uw(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function Y9(e){return typeof e.get("rowSelection")!="string"}function ur(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function yI(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 Z9(e){const t=yI(e);return t===!0||t==="enableSelection"}function X9(e){const t=yI(e);return t===!0||t==="enableDeselection"}function zw(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function pg(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 qd(e){return pg(e)==="multiRow"}function J9(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function gg(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 CI(e,t=!0){const n=e.get("rowSelection");return typeof n!="object"?t?"all":void 0:n.mode==="multiRow"?n.selectAll:"all"}function Q9(e){const t=e.get("rowSelection");return typeof t=="string"?!1:(t==null?void 0:t.mode)==="multiRow"?t.ctrlASelectsRows??!1:!1}function Yd(e){const t=gg(e);return t==="descendants"||t==="filteredDescendants"}function wI(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function eq(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function no(e){return e.get("columnMenu")==="legacy"}function tq(e){return!no(e)}function nq(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function vt(e,t){return e.addCommon(t)}function bI({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var iq={resizable:!0,sortable:!0},oq=0;function SI(){return oq++}function Zr(e){return e instanceof rl}var rl=class extends be{constructor(e,t,n,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=n,this.primary=i,this.isColumn=!0,this.instanceId=SI(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new el,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Md(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 o=e.hide;o!==void 0?this.visible=!o:this.visible=!e.initialHide,n==null||n.initCol(this),i==null||i.initCol(this)}setColDef(e,t,n){var o;const i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&((o=this.beans.rowSpanSvc)==null||o.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=Ke(t)&&t.includes(".")&&!i,this.tooltipFieldContainsDots=Ke(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,o,s;this.frameworkEventListenerService=(o=(i=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:o.call(i,this.frameworkEventListenerService,this.colEventSvc);const n=((s=this.frameworkEventListenerService)==null?void 0:s.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 vt(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]??iq[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 vt(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 hn(this.sort)}isSorting(){return Ke(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 Oe(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 vt(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(hn(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.colSpan(t);return Math.max(n,1)}getRowSpan(e){if(hn(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&&Ti(i,n),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function fi(e){return e instanceof mg}var mg=class extends be{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=SI(),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)Zr(t)?e(t):fi(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)Zr(t)?e.push(t):fi(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 s=0,r=i.length;s<r;s++){const a=i[s];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 o=e&&t&&n;this.expandable!==o&&(this.expandable=o,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=n=>{for(const i of n)fi(i)&&i.isPadding()?t(i.children):e.push(i)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},sq={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function EI(e,t,n){const i={},o=e.gos;return Object.assign(i,o.get("defaultColGroupDef")),Object.assign(i,t),o.validateColDef(i,n),i}var rq=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=Ew(e);let n=0;for(;;){let i=e??t;if(i?n!==0&&(i+="_"+n):i=n,!this.existingKeys[i]){const o=String(i);return e&&n>0&&Oe(273,{providedId:e,usedId:o}),this.existingKeys[o]=!0,o}n++}}};function nn(e){if(e!=null&&e.length)return e[e.length-1]}function Xr(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 o=0;o<i;o++)if(e[o]!==t[o]&&!(n!=null&&n(e[o],t[o])))return!1;return!0}function Zd(e,t){if(e)for(const n of e)t(n)}function Xo(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}function RI(e,t,n){for(let i=0;i<t.length;i++)Xo(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(n,0,t[i])}var vg="ag-Grid-AutoColumn",DI="ag-Grid-SelectionColumn",_I="ag-Grid-RowNumbersColumn";function xI(e){const t=[],n=i=>{for(let o=0;o<i.length;o++){const s=i[o];Zr(s)?t.push(s):fi(s)&&n(s.getChildren())}};return n(e),t}function dr(e){return e.reduce((t,n)=>t+n.getActualWidth(),0)}function yg(e,t,n){const i={};if(!t)return;pr(null,t,s=>{i[s.getInstanceId()]=s}),n&&pr(null,n,s=>{i[s.getInstanceId()]=null});const o=Object.values(i).filter(s=>s!=null);e.context.destroyBeans(o)}function jw(e){return e.getId().startsWith(vg)}function hr(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(DI))??!1}function fr(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(_I))??!1}function aq(e){return hr(e)||fr(e)}function Cg(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function lq(e,t){return Xr(e,t,(n,i)=>n.getColId()===i.getColId())}function cq(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function Nc(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function Xd(e,t){const n=e===t,i=e.getColDef()===t,o=e.getColId()==t;return n||i||o}var uq=(e,t)=>(n,i)=>{const o={value1:void 0,value2:void 0};let s=!1;return e&&(e[n]!==void 0&&(o.value1=e[n],s=!0),Ke(i)&&e[i]!==void 0&&(o.value2=e[i],s=!0)),!s&&t&&(t[n]!==void 0&&(o.value1=t[n]),Ke(i)&&t[i]!==void 0&&(o.value2=t[i])),o},dq=(e,t)=>{fi(e)&&e.setupExpandable(),e.originalParent=t};function hq(e,t=null,n,i,o){const s=new rq,{existingCols:r,existingGroups:a,existingColKeys:l}=fq(i);s.addExistingKeys(l);const c=FI(e,t,0,n,r,s,a,o),{colGroupSvc:u}=e,d=(u==null?void 0:u.findMaxDepth(c,0))??0,h=u?u.balanceColumnTree(c,0,d,s):c;return pr(null,h,dq),{columnTree:h,treeDepth:d}}function fq(e){const t=[],n=[],i=[];return e&&pr(null,e,o=>{if(fi(o)){const s=o;n.push(s)}else{const s=o;i.push(s.getId()),t.push(s)}}),{existingCols:t,existingGroups:n,existingColKeys:i}}function FI(e,t,n,i,o,s,r,a){if(!t)return[];const{colGroupSvc:l}=e,c=new Array(t.length);for(let u=0;u<c.length;u++){const d=t[u];l&&Cq(d)?c[u]=l.createProvidedColumnGroup(i,d,n,o,s,r,a):c[u]=pq(e,i,d,o,s,a)}return c}function pq(e,t,n,i,o,s){var l;const r=mq(n,i);r&&(i==null||i.splice(r.idx,1));let a=r==null?void 0:r.column;if(a){const c=Kw(e,n,a.getColId());a.setColDef(c,n,s),gq(e,a,c,s)}else{const c=o.getUniqueKey(n.colId,n.field),u=Kw(e,n,c);a=new rl(u,n,c,t),e.context.createBean(a)}return(l=e.dataTypeSvc)==null||l.addColumnListeners(a),a}function TI(e,t,n,i,o,s,r,a){const{sortSvc:l,pinnedCols:c,colFlex:u}=e;n!==void 0&&t.setVisible(!n,a),l&&(l.updateColSort(t,i,a),o!==void 0&&l.setColSortIndex(t,o)),s!==void 0&&(c==null||c.setColPinned(t,s)),r!==void 0&&(u==null||u.setColFlex(t,r))}function gq(e,t,n,i){TI(e,t,n.hide,n.sort,n.sortIndex,n.pinned,n.flex,i);const o=t.getFlex();if(!(o!=null&&o>0))if(n.width!=null)t.setActualWidth(n.width,i);else{const s=t.getActualWidth();t.setActualWidth(s,i)}}function mq(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 Kw(e,t,n,i){const{gos:o,dataTypeSvc:s}=e,r={},a=o.get("defaultColDef");Ti(r,a,!1,!0);const l=vq(e,r,t,n);l&&yq(e,l,r);const c=r.cellDataType;Ti(r,t,!1,!0),c!==void 0&&(r.cellDataType=c);const u=o.get("autoGroupColumnDef"),d=xs(o);return t.rowGroup&&u&&d&&Ti(r,{sort:u.sort,initialSort:u.initialSort},!1,!0),s&&(s.postProcess(r),s.validateColDef(r)),o.validateColDef(r,n,i),r}function vq(e,t,n,i){var r;const o=(r=e.dataTypeSvc)==null?void 0:r.updateColDefAndGetColumnType(t,n,i),s=n.type??o??t.type;return t.type=s,s?Cg(s):void 0}function yq(e,t,n){if(!t.length)return;const i=Object.assign({},sq),o=e.gos.get("columnTypes")||{};for(const s of Object.keys(o)){const r=o[s];s in i?Oe(34,{key:s}):(r.type&&Oe(35),i[s]=r)}for(const s of t){const r=i[s.trim()];r?Ti(n,r,!1,!0):Oe(36,{t:s})}}function Cq(e){return e.children!==void 0}function pr(e,t,n){if(t)for(let i=0;i<t.length;i++){const o=t[i];fi(o)&&pr(o,o.getChildren(),n),n(o,e)}}function PI(e,t){const n=[],i=[],o=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?o.push(r):a==="left"||a===!0?n.push(r):i.push(r)}),t.get("enableRtl")?[...o,...i,...n]:[...n,...i,...o]}function II(e,t){let n=!0;return pr(null,t,i=>{if(!fi(i))return;const o=i,s=o.getColGroupDef();if(!(s==null?void 0:s.marryChildren))return;const a=[];for(const h of o.getLeafColumns()){const f=e.indexOf(h);a.push(f)}const l=Math.max.apply(Math,a),c=Math.min.apply(Math,a),u=l-c,d=o.getLeafColumns().length-1;u>d&&(n=!1)}),n}function AI(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 kI(e,t,n){if(!t.length)return;const i=t.length===1?t[0]:null,o=AI(t,s=>s.getPinned());e.dispatchEvent({type:"columnPinned",pinned:o??null,columns:t,column:i,source:n})}function wq(e,t,n){if(!t.length)return;const i=t.length===1?t[0]:null,o=AI(t,s=>s.isVisible());e.dispatchEvent({type:"columnVisible",visible:o,columns:t,column:i,source:n})}function bq(e,t,n,i){e.dispatchEvent({type:t,columns:n,column:n&&n.length==1?n[0]:null,source:i})}function Vc(e,t,n,i,o=null){t!=null&&t.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:o,finished:n,source:i})}function Jo(e,t,n){var D;const{colModel:i,rowGroupColsSvc:o,pivotColsSvc:s,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:c,pivotResultCols:u,environment:d,valueColsSvc:h,eventSvc:f,gos:g}=e,m=i.getColDefCols()??[],y=a==null?void 0:a.getColumns();if(!m.length&&!(y!=null&&y.length))return!1;if(t!=null&&t.state&&!t.state.forEach)return Oe(32),!1;const b=(E,x,O,k,I)=>{if(!E)return;const R=uq(x,t.defaultState),P=R("flex").value1;if(TI(e,E,R("hide").value1,R("sort").value1,R("sortIndex").value1,R("pinned").value1,P,n),P==null){const V=R("width").value1;if(V!=null){const H=E.getColDef().minWidth??d.getDefaultColumnMinWidth();H!=null&&V>=H&&E.setActualWidth(V,n)}}I||!E.isPrimary()||(h==null||h.syncColumnWithState(E,n,R),o==null||o.syncColumnWithState(E,n,R,O),s==null||s.syncColumnWithState(E,n,R,k))},S=(E,x,O)=>{var ue,xe;const k=OI(e,n),I=x.slice(),R={},P={},V=[],H=[],te=[];let B=0;const G=(o==null?void 0:o.columns.slice())??[],Y=(s==null?void 0:s.columns.slice())??[];for(const re of E){const Ie=re.colId;if(Ie.startsWith(vg)){V.push(re),te.push(re);continue}if(hr(Ie)){H.push(re),te.push(re);continue}const Je=O(Ie);Je?(b(Je,re,R,P,!1),Xo(I,Je)):(te.push(re),B+=1)}const $=re=>b(re,null,R,P,!1);I.forEach($),o==null||o.sortColumns(LI.bind(o,R,G)),s==null||s.sortColumns(LI.bind(s,P,Y)),i.refreshCols(!1,n);const ce=(re,Ie,Me=[])=>{for(const Je of Ie){const gt=re(Je.colId);Xo(Me,gt),b(gt,Je,null,null,!0)}Me.forEach($)};return ce(re=>(r==null?void 0:r.getColumn(re))??null,V,(ue=r==null?void 0:r.getColumns())==null?void 0:ue.slice()),ce(re=>(a==null?void 0:a.getColumn(re))??null,H,(xe=a==null?void 0:a.getColumns())==null?void 0:xe.slice()),Eq(t,i,g),c.refresh(n),f.dispatchEvent({type:"columnEverythingChanged",source:n}),k(),{unmatchedAndAutoStates:te,unmatchedCount:B}};l==null||l.start();let{unmatchedAndAutoStates:F,unmatchedCount:C}=S(t.state||[],m,E=>i.getColDefCol(E));if(F.length>0||Ke(t.defaultState)){const E=((D=u==null?void 0:u.getPivotResultCols())==null?void 0:D.list)??[];C=S(F,E,x=>(u==null?void 0:u.getPivotResultCol(x))??null).unmatchedCount}return l==null||l.finish(),C===0}function Sq(e,t){var S,F;const{colModel:n,autoColSvc:i,selectionColSvc:o,eventSvc:s,gos:r}=e,a=n.getColDefCols();if(!(a!=null&&a.length))return;const l=n.getColDefColTree(),c=xI(l),u=[];let d=1e3,h=1e3;const f=C=>{const D=MI(C);hn(D.rowGroupIndex)&&D.rowGroup&&(D.rowGroupIndex=d++),hn(D.pivotIndex)&&D.pivot&&(D.pivotIndex=h++),u.push(D)};(S=i==null?void 0:i.getColumns())==null||S.forEach(f),(F=o==null?void 0:o.getColumns())==null||F.forEach(f),c==null||c.forEach(f),Jo(e,{state:u},t);const g=(i==null?void 0:i.getColumns())??[],b=[...(o==null?void 0:o.getColumns())??[],...g,...a].map(C=>({colId:C.colId}));Jo(e,{state:b,applyOrder:!0},t),s.dispatchEvent(vt(r,{type:"columnsReset",source:t}))}function OI(e,t){const{rowGroupColsSvc:n,pivotColsSvc:i,valueColsSvc:o,colModel:s,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:(n==null?void 0:n.columns.slice())??[],pivotColumns:(i==null?void 0:i.columns.slice())??[],valueColumns:(o==null?void 0:o.columns.slice())??[]},c=wg(e),u={};for(const d of c)u[d.colId]=d;return()=>{const d=(E,x,O,k)=>{const I=x.map(k),R=O.map(k);if(Xr(I,R))return;const V=new Set(x);for(const te of O)V.delete(te)||V.add(te);const H=[...V];a.dispatchEvent({type:E,columns:H,column:H.length===1?H[0]:null,source:t})},h=E=>{const x=[];return s.forAllCols(O=>{const k=u[O.getColId()];k&&E(k,O)&&x.push(O)}),x},f=E=>E.getColId();d("columnRowGroupChanged",l.rowGroupColumns,(n==null?void 0:n.columns)??[],f),d("columnPivotChanged",l.pivotColumns,(i==null?void 0:i.columns)??[],f);const m=h((E,x)=>{const O=E.aggFunc!=null,k=O!=x.isValueActive(),I=O&&E.aggFunc!=x.getAggFunc();return k||I});m.length>0&&bq(a,"columnValueChanged",m,t),Vc(a,h((E,x)=>E.width!=x.getActualWidth()),!0,t),kI(a,h((E,x)=>E.pinned!=x.getPinned()),t),wq(a,h((E,x)=>E.hide==x.isVisible()),t);const C=h((E,x)=>E.sort!=x.getSort()||E.sortIndex!=x.getSortIndex());C.length>0&&(r==null||r.dispatchSortChangedEvents(t,C));const D=wg(e);Dq(c,D,t,s,a)}}function wg(e){const{colModel:t,rowGroupColsSvc:n,pivotColsSvc:i}=e,o=t.getColDefCols();if(hn(o)||!t.isAlive())return[];const s=n==null?void 0:n.columns,r=i==null?void 0:i.columns,a=[],l=u=>{const d=u.isRowGroupActive()&&s?s.indexOf(u):null,h=u.isPivotActive()&&r?r.indexOf(u):null,f=u.isValueActive()?u.getAggFunc():null,g=u.getSort()!=null?u.getSort():null,m=u.getSortIndex()!=null?u.getSortIndex():null;a.push({colId:u.getColId(),width:u.getActualWidth(),hide:!u.isVisible(),pinned:u.getPinned(),sort:g,sortIndex:m,aggFunc:f,rowGroup:u.isRowGroupActive(),rowGroupIndex:d,pivot:u.isPivotActive(),pivotIndex:h,flex:u.getFlex()??null})};t.forAllCols(u=>l(u));const c=new Map(t.getCols().map((u,d)=>[u.getColId(),d]));return a.sort((u,d)=>{const h=c.has(u.colId)?c.get(u.colId):-1,f=c.has(d.colId)?c.get(d.colId):-1;return h-f}),a}function MI(e){const t=(g,m)=>g??m??null,n=e.getColDef(),i=t(n.sort,n.initialSort),o=t(n.sortIndex,n.initialSortIndex),s=t(n.hide,n.initialHide),r=t(n.pinned,n.initialPinned),a=t(n.width,n.initialWidth),l=t(n.flex,n.initialFlex);let c=t(n.rowGroupIndex,n.initialRowGroupIndex),u=t(n.rowGroup,n.initialRowGroup);c==null&&!u&&(c=null,u=null);let d=t(n.pivotIndex,n.initialPivotIndex),h=t(n.pivot,n.initialPivot);d==null&&!h&&(d=null,h=null);const f=t(n.aggFunc,n.initialAggFunc);return{colId:e.getColId(),sort:i,sortIndex:o,hide:s,pinned:r,width:a,flex:l,rowGroup:u,rowGroupIndex:c,pivot:h,pivotIndex:d,aggFunc:f}}function Eq(e,t,n){if(!e.applyOrder||!e.state)return;const i=[];for(const o of e.state)o.colId!=null&&i.push(o.colId);Rq(t.cols,i,t,n)}function Rq(e,t,n,i){if(e==null)return;let o=[];const s={};for(const a of t){if(s[a])continue;const l=e.map[a];l&&(o.push(l),s[a]=!0)}let r=0;for(const a of e.list){const l=a.getColId();if(s[l]!=null)continue;l.startsWith(vg)?o.splice(r++,0,a):o.push(a)}if(o=PI(o,i),!II(o,n.getColTree())){Oe(39);return}e.list=o}function Dq(e,t,n,i,o){const s={};for(const u of t)s[u.colId]=u;const r={};for(const u of e)s[u.colId]&&(r[u.colId]=!0);const a=e.filter(u=>r[u.colId]),l=t.filter(u=>r[u.colId]),c=[];l.forEach((u,d)=>{const h=a==null?void 0:a[d];if(h&&h.colId!==u.colId){const f=i.getCol(h.colId);f&&c.push(f)}}),c.length&&o.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,finished:!0,source:n})}var LI=(e,t,n,i)=>{const o=e[n.getId()],s=e[i.getId()],r=o!=null,a=s!=null;if(r&&a)return o-s;if(r)return-1;if(a)return 1;const l=t.indexOf(n),c=t.indexOf(i),u=l>=0,d=c>=0;return u&&d?l-c:u?-1:1},_q=class extends be{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(Nc(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),Nc(e.source)))}createColsFromColDefs(e){var S,F,C;const{beans:t}=this,{valueCache:n,colAutosize:i,rowGroupColsSvc:o,pivotColsSvc:s,valueColsSvc:r,visibleCols:a,eventSvc:l,groupHierarchyColSvc:c}=t,u=this.colDefs?OI(t,e):void 0;n==null||n.expire();const d=(S=this.colDefCols)==null?void 0:S.list,h=(F=this.colDefCols)==null?void 0:F.tree,f=hq(t,this.colDefs,!0,h,e);yg(t,(C=this.colDefCols)==null?void 0:C.tree,f.columnTree);const g=f.columnTree,m=f.treeDepth,y=xI(g),b={};for(const D of y)b[D.getId()]=D;this.colDefCols={tree:g,treeDepth:m,list:y,map:b},this.createColumnsForService([c],this.colDefCols,e),o==null||o.extractCols(e,d),s==null||s.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}),u&&(this.changeEventsDispatching=!0,u(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&(i==null||i.applyAutosizeStrategy())}refreshCols(e,t){var y;if(!this.colDefCols)return;const n=(y=this.cols)==null?void 0:y.tree;this.saveColOrder();const{autoColSvc:i,selectionColSvc:o,rowNumbersSvc:s,quickFilter:r,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:c,visibleCols:u,colViewport:d,eventSvc:h}=this.beans,f=this.selectCols(a,this.colDefCols);this.createColumnsForService([i,o,s],f,t);const g=z9(this.gos,this.showingPivotResult);(!e||g)&&this.restoreColOrder(f),this.positionLockedCols(f),l==null||l.refresh(),r==null||r.refreshCols(),this.setColSpanActive(),c==null||c.setAutoHeightActive(f),u.clear(),d.clear(),!Xr(n,this.cols.tree)&&h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,n){for(const i of e)i&&(i.createColumns(t,o=>{this.lastOrder=o(this.lastOrder),this.lastPivotOrder=o(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:o,tree:s,treeDepth:r}=n??t;return this.cols={list:o.slice(),map:{...i},tree:s.slice(),treeDepth:r},n&&(n.list.some(l=>{var c;return((c=this.cols)==null?void 0:c.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,o=t==null?void 0:t.isSelectionColumnEnabled(),s=n.get("rowNumbers"),r=e==null?void 0:e.columns;return this.cols.list.filter(l=>{const c=jw(l);if(i){const u=r==null?void 0:r.includes(l);return c||u||o&&hr(l)||s&&fr(l)}else return c||l.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,n){Jo(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 o=new Map;for(let d=0;d<n.length;d++){const h=n[d];o.set(h,d)}const s=e.list.filter(d=>!o.has(d));if(s.length===0){e.list=n;return}const r=(d,h)=>{const f=h?h.getOriginalParent():d.getOriginalParent();if(!f)return null;let g=null,m=null;for(const y of f.getChildren())if(!(y===h||y===d)){if(y instanceof rl){const b=o.get(y);if(b==null)continue;(g==null||g<b)&&(g=b,m=y);continue}y.forEachLeafColumn(b=>{const S=o.get(b);S!=null&&(g==null||g<S)&&(g=S,m=b)})}return m??r(d,f)},a=[],l=new Map;for(const d of s){const h=r(d,null);if(h==null){a.push(d);continue}const f=l.get(h);f===void 0?l.set(h,d):Array.isArray(f)?f.push(d):l.set(h,[f,d])}const c=new Array(e.list.length);let u=c.length-1;for(let d=a.length-1;d>=0;d--)c[u--]=a[d];for(let d=n.length-1;d>=0;d--){const h=n[d],f=l.get(h);if(f)if(Array.isArray(f))for(let g=f.length-1;g>=0;g--){const m=f[g];c[u--]=m}else c[u--]=f;c[u--]=h}e.list=c}positionLockedCols(e){e.list=PI(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=Nc(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;yg(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 s,r,a,l,c;const{pivotResultCols:t,autoColSvc:n,selectionColSvc:i,groupHierarchyColSvc:o}=this.beans;Zd((s=this.colDefCols)==null?void 0:s.list,e),Zd((r=n==null?void 0:n.columns)==null?void 0:r.list,e),Zd((a=i==null?void 0:i.columns)==null?void 0:a.list,e),Zd((l=o==null?void 0:o.columns)==null?void 0:l.list,e),Zd((c=t==null?void 0:t.getPivotResultCols())==null?void 0:c.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(Xd(i[a],e))return i[a];const{autoColSvc:o,selectionColSvc:s,groupHierarchyColSvc:r}=this.beans;return(o==null?void 0:o.getColumn(e))??(s==null?void 0:s.getColumn(e))??(r==null?void 0:r.getColumn(e))??null}},NI=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 Jd(e,t,n){return n&&e.addDestroyFunc(()=>t.destroyBean(n)),n??e}var je=null;function VI(e){return typeof(e==null?void 0:e.getGui)=="function"}var BI=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){var i;if(!e)return;if(e.indexOf(" ")>=0){const o=(e||"").split(" ");if(o.length>1){for(const s of o)this.toggleCss(s,t);return}}this.cssClassStates[e]!==t&&e.length&&((i=this.getGui())==null||i.classList.toggle(e,t),this.cssClassStates[e]=t)}},xq=0,Qd=class extends Ds{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=xq++,this.cssManager=new BI(()=>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(K1):null}applyElementsToComponent(e,t,n,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const o=this[t];if(o===je)this[t]=i??e;else{const s=n==null?void 0:n[t];if(!this.suppressDataRefValidation&&!s)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${o}`)}}}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 o=this.createComponentFromElement(i,s=>{const r=s.getGui();if(r)for(const a of i.attributes??[])r.setAttribute(a.name,a.value)},t);if(o){if(o.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);const s=Array.prototype.slice.call(i.children);o.addItems(s)}this.swapComponentForNode(o,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)}}createComponentFromElement(e,t,n){const i=e.nodeName,o=this.getDataRefAttribute(e),s=i.indexOf("AG-")===0,r=s?this.componentSelectors.get(i):null;let a=null;if(r){const l=n&&o?n[o]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(s)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,o,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=xw(e):i=$d(e),this.setTemplateFromElement(i,t,n)}setTemplateFromElement(e,t,n,i=!1){if(this.eGui=e,this.suppressDataRefValidation=i,t)for(let o=0;o<t.length;o++){const s=t[o];this.componentSelectors.set(s.selector,s)}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),Pw(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;a9(this.eGui,e,{skipAriaHidden:n})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:n}=t;fn(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)}},qt=class extends Qd{};function HI(e){return typeof e=="object"&&!!e.component}function Fq(e,t){return new Rn(n=>{n(window.setInterval(e,t))})}var Rn=class kh{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 kh(n=>{let i=t.length;const o=new Array(i);t.forEach((s,r)=>{s.then(a=>{o[r]=a,i--,i===0&&n(o)})})}):kh.resolve()}static resolve(t=null){return new kh(n=>n(t))}then(t){return new kh(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 Tq(e){return e?e.prototype&&"getGui"in e.prototype:!1}function GI(e,t,n,i){const{name:o}=n;let s,r,a,l,c,u;if(t){const d=t,h=d[o+"Selector"],f=h?h(i):null,g=m=>{typeof m=="string"?s=m:m!=null&&m!==!0&&(e.isFrameworkComponent(m)?a=m:r=m)};f?(g(f.component),l=f.params,c=f.popup,u=f.popupPosition):g(d[o])}return{compName:s,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:c,popupPositionFromSelector:u}}var Pq=class extends be{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,o=!1){var F;const{name:s,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:c,paramsFromSelector:u,popupFromSelector:d,popupPositionFromSelector:h}=GI(this.beans.frameworkOverrides,e,t,i),f,g;const m=C=>{const D=this.registry.getUserComponent(s,C);D&&(l=D.componentFromFramework?void 0:D.component,c=D.componentFromFramework?D.component:void 0,f=D.params,g=D.processParams)};if(a!=null&&m(a),l==null&&c==null&&n!=null&&m(n),l&&r&&!Tq(l)&&(l=(F=this.agCompUtils)==null?void 0:F.adaptFunction(t,l)),!l&&!c){const{validation:C}=this.beans;o&&(a!==n||!n)?a?C!=null&&C.isProvidedUserComp(a)||Qt(50,{compName:a}):n?C||Qt(260,{...this.gos.getModuleErrorParams(),propName:s,compName:n}):Qt(216,{name:s}):n&&!C&&Qt(146,{comp:n});return}const y=this.mergeParams(e,t,i,u,f,g),b=l==null,S=l??c;return{componentFromFramework:b,componentClass:S,params:y,type:t,popupFromSelector:d,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(S,b,y,t)}}newAgStackInstance(e,t,n,i){var a;const o=!t;let s;o?s=new e:s=this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(s);const r=(a=s.init)==null?void 0:a.call(s,n);return r==null?Rn.resolve(s):r.then(()=>s)}mergeParams(e,t,n,i=null,o,s){const r={...n,...o},a=e,l=a==null?void 0:a[t.name+"Params"];if(typeof l=="function"){const c=l(n);Ti(r,c)}else typeof l=="object"&&Ti(r,l);return Ti(r,i),s?s(r):r}},Iq={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},Aq={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},kq={name:"headerComponent",optionalMethods:["refresh"]},Oq={name:"innerHeaderComponent"},Mq={name:"innerHeaderGroupComponent"},Lq={name:"headerGroupComponent"},Nq={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Vq={name:"loadingCellRenderer",cellRenderer:!0},Bq={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},Hq={name:"loadingOverlayComponent",optionalMethods:["refresh"]},Gq={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},$q={name:"tooltipComponent"},qw={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},Wq={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},Uq={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},zq={name:"loadingCellRenderer",cellRenderer:!0},jq={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},Kq={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function qq(e,t){return e.getCompDetailsFromGridOptions(Aq,"agDragAndDropImage",t,!0)}function Yq(e,t,n){return e.getCompDetails(t,kq,"agColumnHeader",n)}function Zq(e,t,n){return e.getCompDetails(t,Oq,void 0,n)}function Xq(e,t){const n=t.columnGroup.getColGroupDef();return e.getCompDetails(n,Lq,"agColumnGroupHeader",t)}function Jq(e,t,n){return e.getCompDetails(t,Mq,void 0,n)}function Qq(e,t){return e.getCompDetailsFromGridOptions(Uq,void 0,t,!0)}function eY(e,t){return e.getCompDetailsFromGridOptions(zq,"agLoadingCellRenderer",t,!0)}function tY(e,t){return e.getCompDetailsFromGridOptions(jq,"agGroupRowRenderer",t,!0)}function nY(e,t){return e.getCompDetailsFromGridOptions(Kq,"agDetailCellRenderer",t,!0)}function $I(e,t,n){return e.getCompDetails(t,Nq,void 0,n)}function WI(e,t,n){return e.getCompDetails(t,Vq,"agSkeletonCellRenderer",n,!0)}function UI(e,t,n){return e.getCompDetails(t,Bq,"agCellEditor",n,!0)}function iY(e,t,n,i){const o=t.filter;return HI(o)&&(t={filter:o.component,filterParams:t.filterParams}),e.getCompDetails(t,qw,i,n,!0)}function oY(e,t,n){return e.getCompDetails(t,Iq,"agDateInput",n,!0)}function sY(e,t){return e.getCompDetailsFromGridOptions(Hq,"agLoadingOverlay",t,!0)}function rY(e,t){return e.getCompDetailsFromGridOptions(Gq,"agNoRowsOverlay",t,!0)}function aY(e,t){return e.getCompDetails(t.colDef,$q,"agTooltipComponent",t,!0)}function lY(e,t,n,i){return e.getCompDetails(t,Wq,i,n)}function zI(e,t){return GI(e,t,qw)}function Yw(e,t,n){return e.mergeParams(t,qw,n)}function eh(e){const t=e;return(t==null?void 0:t.getFrameworkComponentInstance)!=null?t.getFrameworkComponentInstance():e}function cY(e){return typeof e=="object"&&!!e.getComp}var de={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"},Zw=class extends Qd{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()}},Xw,Jw,Qw,eb,tb,nb,ib;function Jr(){return Xw===void 0&&(Xw=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Xw}function jI(){return Jw===void 0&&(Jw=/(firefox)/i.test(navigator.userAgent)),Jw}function KI(){return Qw===void 0&&(Qw=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Qw}function al(){return eb===void 0&&(eb=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),eb}function ob(e){if(!e)return null;const t=e.tabIndex,n=e.getAttribute("tabIndex");return t===-1&&(n===null||n===""&&!jI())?null:t.toString()}function uY(){if(ib!==void 0)return ib;if(!document.body)return-1;let e=1e6;const t=jI()?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(),ib=e,e}function dY(){return nb==null&&qI(),nb}function qI(){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&&(nb=n,tb=n===0)}function YI(){return tb==null&&qI(),tb}var sb="T",hY=new RegExp(`[${sb} ]`),fY=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${sb}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function Fs(e,t){return e.toString().padStart(t,"0")}function io(e,t=!0,n=sb){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(o=>Fs(o,2)).join("-");return t&&(i+=n+[e.getHours(),e.getMinutes(),e.getSeconds()].map(o=>Fs(o,2)).join(":")),i}function bg(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),Fs(e.getDate(),2),Fs(e.getHours(),2),`:${Fs(e.getMinutes(),2)}`,`:${Fs(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,Fs(e.getDate(),2)].map(String):null}var rb=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"},ZI=["January","February","March","April","May","June","July","August","September","October","November","December"],ab=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function lb(e,t){if(t==null)return io(e,!1);const n=Fs(e.getFullYear(),4),i={YYYY:()=>n.slice(n.length-4,n.length),YY:()=>n.slice(n.length-2,n.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>ZI[e.getMonth()],MMM:()=>ZI[e.getMonth()].slice(0,3),MM:()=>Fs(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${rb(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${rb(e.getDate())}`,DD:()=>Fs(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>ab[e.getDay()],ddd:()=>ab[e.getDay()].slice(0,3),dd:()=>ab[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${rb(e.getDay())}`,d:()=>`${e.getDay()}`},o=new RegExp(Object.keys(i).join("|"),"g");return t.replace(o,s=>s in i?i[s]():s)}function Sg(e,t=!1){return!!Vi(e,t)}function pY(e){return Sg(e,!0)}function Vi(e,t=!1,n){if(!e||!n&&!fY.test(e))return null;const[i,o]=e.split(hY);if(!i)return null;const s=i.split("-").map(f=>Number.parseInt(f,10));if(s.filter(f=>!isNaN(f)).length!==3)return null;const[r,a,l]=s,c=new Date(r,a-1,l);if(c.getFullYear()!==r||c.getMonth()!==a-1||c.getDate()!==l||!o&&t)return null;if(!o||o==="00:00:00")return c;const[u,d,h]=o.split(":").map(f=>Number.parseInt(f,10));if(u>=0&&u<24)c.setHours(u);else if(t)return null;if(d>=0&&d<60)c.setMinutes(d);else if(t)return null;if(h>=0&&h<60)c.setSeconds(h);else if(t)return null;return c}function cb(e){const{inputValue:t,allSuggestions:n,hideIrrelevant:i,filterByPercentageOfBestMatch:o}=e;let s=(n??[]).map((l,c)=>({value:l,relevance:gY(t,l),idx:c}));if(s.sort((l,c)=>l.relevance-c.relevance),i&&(s=s.filter(l=>l.relevance<Math.max(l.value.length,t.length))),s.length>0&&o&&o>0){const c=s[0].relevance*o;s=s.filter(u=>c-u.relevance<0)}const r=[],a=[];for(const l of s)r.push(l.value),a.push(l.idx);return{values:r,indices:a}}function gY(e,t){e.length<t.length&&([e,t]=[t,e]);let n=[],i=[];const o=e.length,s=t.length;for(let a=0;a<=s;a++)n[a]=a;let r=0;for(let a=1;a<=o;a++){i[0]=a;for(let l=1;l<=s;l++){const c=e[a-1],u=t[l-1];if(c.toLocaleLowerCase()===u.toLocaleLowerCase())++r,c===u&&++r,a>1&&l>1&&e[a-2].toLocaleLowerCase()===t[l-2].toLocaleLowerCase()&&(++r,e[a-2]===t[l-2]&&++r),a<o/2-10&&++r,i[l]=n[l-1];else{const d=i[l-1],h=n[l],f=n[l-1];i[l]=1+Math.min(d,h,f)}}[n,i]=[i,n]}return n[s]/(r+1)}function XI(e){var n;return e.altKey||e.ctrlKey||e.metaKey?!1:((n=e.key)==null?void 0:n.length)===1}var ub=!1,Eg=0;function mY(e){Eg>0||(e.addEventListener("keydown",Rg),e.addEventListener("mousedown",Rg))}function vY(e){Eg>0||(e.removeEventListener("keydown",Rg),e.removeEventListener("mousedown",Rg))}function Rg(e){const t=ub,n=e.type==="keydown";n&&(e.ctrlKey||e.metaKey||e.altKey)||t!==n&&(ub=n)}function yY(e){const t=Zn(e);return mY(t),Eg++,()=>{Eg--,vY(t)}}function CY(){return ub}function Bc(e,t,n=!1){const i=r9;let o=H1;t&&(o+=", "+t),n&&(o+=', [tabindex="-1"]');const s=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(l=>Es(l)),r=Array.prototype.slice.apply(e.querySelectorAll(o));return r.length?((l,c)=>l.filter(u=>c.indexOf(u)===-1))(s,r):s}function ll(e,t=!1,n=!1,i=!1){const o=Bc(e,i?".ag-tab-guard":null,n),s=t?nn(o):o[0];return s?(s.focus({preventScroll:!0}),!0):!1}function cl(e,t,n,i){const o=Bc(t,n?':not([tabindex="-1"])':null),s=yn(e);let r;n?r=o.findIndex(l=>l.contains(s)):r=o.indexOf(s);const a=r+(i?-1:1);return a<0||a>=o.length?null:o[a]}function JI(e,t=5){let n=0;for(;e&&ob(e)===null&&++n<=t;)e=e.parentElement;return ob(e)===null?null:e}var wY=".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)}",bY=class extends Qd{constructor(e,t,n){super(t,n),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(wY)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:n,labelAlignment:i,disabled:o}=this.config;o!=null&&this.setDisabled(o),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;ii(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(fn(t,!1),zr(t,"presentation")):(fn(t,!0),zr(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:(rg(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return Vd(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},QI=class extends bY{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==""||U7(e)!==null?Ld(e,""):Ld(e,t??"")}setAriaLabel(e){return Tc(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 Rs(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 SY(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 ul=class extends QI{constructor(e,t,n="text",i="input"){super(e,(e==null?void 0:e.template)??SY(i),[],t),this.inputType=n,this.displayFieldTag=i,this.eLabel=je,this.eWrapper=je,this.eInput=je}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:o,inputWidth:s}=this.config;o!=null&&this.setInputName(o),s!=null&&this.setInputWidth(s),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,to(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return rg(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 to(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Tc(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Vd(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)to(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";to(this.eInput,"autocomplete",t)}return this}},db=class extends ul{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)}},hb={selector:"AG-CHECKBOX",component:db},EY=class extends db{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)}},dl=class extends ul{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=Ke(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=n=>{XI(n)&&n.key&&!e.test(n.key)&&n.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:n=>{var o;const i=(o=n.clipboardData)==null?void 0:o.getData("text");i!=null&&i.split("").some(s=>!e.test(s))&&n.preventDefault()}})}},Dg={selector:"AG-INPUT-TEXT-FIELD",component:dl},RY=class extends ul{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}},DY={selector:"AG-INPUT-TEXT-AREA",component:RY},fb=class extends dl{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const s=Number.parseFloat(e.value),r=isNaN(s)?"":this.normalizeValue(s.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:n,max:i,step:o}=this.config;typeof t=="number"&&this.setPrecision(t),typeof n=="number"&&this.setMin(n),typeof i=="number"&&this.setMax(i),typeof o=="number"&&this.setStep(o)}onWheel(e){yn(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 o=Number.parseFloat(e).toFixed(n);return Number.parseFloat(o).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,to(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,to(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,to(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(Ke(n)){let i=this.isScientificNotation(n);if(i&&this.eInput.validity.valid)return e(n);if(!i){n=this.adjustPrecision(n);const o=this.normalizeValue(n);i=n!=o}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")}},_Y={selector:"AG-INPUT-NUMBER-FIELD",component:fb},xY=class extends dl{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=Jr();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){yn(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?io(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,to(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?io(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,to(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,to(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 Vi(this.getValue())??void 0}setDate(e,t){this.setValue(io(e??null,this.includeTime),t)}},eA={selector:"AG-INPUT-DATE-FIELD",component:xY},FY=".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)}}",TY="ag-active-item",PY=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",ref:"eText",children:t}]}),IY=class extends Qd{constructor(e,t,n){super(PY(e,t)),this.label=t,this.value=n,this.eText=je}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(TY,e),V1(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const n=this.getGui();Z7(n,e),Y7(n,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>Fw(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)}))}},AY=class extends Qd{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(FY)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case de.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const n=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(n)}break;case de.DOWN:case de.UP:e.preventDefault(),this.navigate(t);break;case de.PAGE_DOWN:case de.PAGE_UP:case de.PAGE_HOME:case de.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();ii(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(!Es(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const n=this.getGui(),{scrollTop:i,clientHeight:o}=n,{offsetTop:s,offsetHeight:r}=t;(s+r>i+o||s<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 IY(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===de.DOWN;let n;const{listItems:i,highlightedItem:o}=this;if(!o)n=t?i[0]:nn(i);else{let r=i.indexOf(o)+(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),o=this.options.length-1,s=t[0].getHeight(),r=Math.floor(this.getGui().clientHeight/s);let a=-1;e===de.PAGE_HOME?a=0:e===de.PAGE_END?a=o:e===de.PAGE_DOWN?a=Math.min(i+r,o):e===de.PAGE_UP&&(a=Math.max(i-r,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){zr(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"})}},kY=".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}}",OY={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"}}]}]},MY=class extends QI{constructor(e){if(super(e,(e==null?void 0:e.template)||OY,(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=je,this.eWrapper=je,this.eDisplayField=je,this.eIcon=je,this.registerCSS(kY),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:o,maxPickerWidth:s}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,n!=null&&this.setPickerMaxHeight(n),o!=null&&this.setPickerMinWidth(o),s!=null&&this.setPickerMaxWidth(s)}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 o=this.beans.iconSvc.createIconNoSpan(n);o&&this.eIcon.appendChild(o)}i!=null&&this.setInputWidth(i)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),Dw(e,!1),this.ariaRole&&zr(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 de.UP:case de.DOWN:case de.ENTER:case de.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case de.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:o=!0},maxPickerHeight:s,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:c,eWrapper:u}=this,d={modal:o,eChild:e,closeOnEsc:!0,closedCallback:()=>{const m=I1(c);this.beforeHidePicker(),m&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(n,i),anchorToElement:u};e.style.position="absolute";const h=c.popupSvc,f=h.addPopup(d);l?(r&&(e.style.minWidth=r),e.style.width=Tw(ng(u)),a&&(e.style.maxWidth=a)):rg(e,a??ng(u));const g=s??`${_w(h.getPopupParent())}px`;return e.style.setProperty("max-height",g),this.alignPickerToComponent(),f.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:n,gos:i},eWrapper:o,pickerComponent:s}=this,r=i.get("enableRtl")?"right":"left";n.positionPopupByComponent({type:t,eventSource:o,ePopup:s.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();Dw(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 rg(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()}},LY=".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)}",pb=class extends MY{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(LY)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:sg(()=>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 AY("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),n=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",n),s9(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===de.TAB&&this.hidePicker(),t){case de.ENTER:case de.UP:case de.DOWN:case de.PAGE_UP:case de.PAGE_DOWN:case de.PAGE_HOME:case de.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(n=this.listComponent)==null||n.handleKeyDown(e):super.onKeyDown(e);break;case de.ESCAPE:super.onKeyDown(e);break;case de.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:o},eDisplayField:s,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&&o&&(l=o),s.textContent=l,r==null||r.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},NY={selector:"AG-SELECT",component:pb},VY=':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}}',gb=typeof window!="object"||!((HM=(BM=window==null?void 0:window.document)==null?void 0:BM.fonts)!=null&&HM.forEach),Hc=(e,t,n,i,o,s)=>{if(gb)return;i&&(e=`@layer ${CSS.escape(i)} { ${e} }`);let r=Gc.map.get(t);if(r||(r=[],Gc.map.set(t,r)),r.some(u=>u.css===e))return;const a=document.createElement("style");s&&a.setAttribute("nonce",s),a.dataset.agGlobalCss=n,a.textContent=e;const l={css:e,el:a,priority:o};let c;for(const u of r){if(u.priority>o)break;c=u}if(c){c.el.insertAdjacentElement("afterend",a);const u=r.indexOf(c);r.splice(u+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),r.push(l)},tA=(e,t,n,i)=>{Hc(VY,e,"shared",t,0,n),i==null||i.forEach((o,s)=>o.forEach(r=>Hc(r,e,s,t,0,n)))},BY=e=>{Gc.grids.add(e)},HY=e=>{if(Gc.grids.delete(e),Gc.grids.size===0){Gc.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},nA,Gc=(nA=typeof window=="object"?window:{}).agStyleInjectionState??(nA.agStyleInjectionState={map:new WeakMap,grids:new Set}),Ts=e=>new iA(e),Qr="$default",GY=0,iA=class{constructor({feature:e,params:t,modeParams:n={},css:i,cssImports:o}){this.feature=e,this.css=i,this.cssImports=o,this.modeParams={[Qr]:{...n[Qr]??{},...t??{}},...n}}use(e,t,n){let i=this._inject;if(i==null){let{css:o}=this;if(o){const s=`ag-theme-${this.feature??"part"}-${++GY}`;typeof o=="function"&&(o=o()),o=`:where(.${s}) {
|
|
@@ -189,4 +189,4 @@ If you are trying to annotate ${i} with application data, use the '${i}.context'
|
|
|
189
189
|
<rect width="32" height="32" rx="4" fill="#CCF3EB"/>
|
|
190
190
|
<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"/>
|
|
191
191
|
</svg>
|
|
192
|
-
`,Hde=Ct(ct({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const n=WC(),{setUserPermissions:i,setEntityPermissions:o}=n,{entityPermissions:s}=ys(n),{addNotification:r}=Sd(),a=K(null),l={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},c=q(()=>{var Se;const le=((Se=s.value)==null?void 0:Se.has_create_item_permission)===1;return[{label:"Create manually",value:"new_scene",icon:"Plus",type:"icon",id:"create_new_scene",hide:!le},{label:"Import from CSV or Excel",value:"import_scenes",icon:"FileImport",type:"icon",hide:!le,id:"import_scenes_option"},{label:"Update existing (CSV or Excel)",value:"overwrite_scenes",icon:"FilePen",type:"icon",hide:!le,id:"overwrite_scenes_option"}]}),u=e;kd.initialize({wrapVueCellRenderer:Qp,wrapVueCellEditor:P1});const d=K(null),h=K([]),f=qC(),{rowCount:g}=ys(f),m=K(!1),y=K(""),b=K(),S=K(""),F=K(!1),C=K(new Set),D=K(new Map),{apiServices:E}=mo(!1,u),{columnDefs:x,checkboxColumn:O,saveColumnConfig:k}=nue(b,u.entityId),{updateRowData:I,setMetricValues:R}=Ode(d),P=q(()=>({isSearching:y.value.length>0,isFiltering:Je.value.length>0})),V=q(uC),H=q(()=>x.value.filter(le=>{var Se;return((Se=le.field)==null?void 0:Se.startsWith("metric_"))&&!le.hide}).map(le=>{var Se;return((Se=le.field)==null?void 0:Se.replace("metric_",""))||""}));Fa("timezone",V);const te=q(()=>({autoFetch:!1,workspaceId:u.workspaceId,entityId:u.entityId,metricIds:H.value,updateItemData:I})),{fetchItems:B,getMetricList:G,cusorMap:Y,getMetricValues:$}=kde(te),ce=q(()=>{if(!d.value)return!1;const le=d.value.getSelectedRows().length;return le>0&&le>=g.value.total}),ue=q(()=>{var le;return((le=a.value)==null?void 0:le.name)||"Items"}),xe=(le,Se)=>{var nt,Pe,Mn;g.value.total=le.meta.total??0,(nt=le.meta.next)!=null&&nt.cursor&&(Y[Se+1]=le.meta.next.cursor),S.value=le.meta["X-Tsr-content-sha256"]||"",le.meta.total===0?(Pe=d.value)==null||Pe.showNoRowsOverlay():(Mn=d.value)==null||Mn.hideOverlay()},re=E1(),{sortingAPIConfiguration:Ie,isSortingRunning:Me}=ys(re),Je=K([]),gt=async({page:le,pageSize:Se,filterText:nt})=>{var wr;(wr=d.value)==null||wr.hideOverlay();const Pe=Y[le],Mn=!Pe&&le>1?(le-1)*Se:void 0,To=Ie.value;To.length>0&&(Me.value=!0);try{const mi=await B({cursor:Pe,size:Se,searchQuery:nt,offset:Mn,sort_by:To,assignees:Je.value});if(!mi)return{rows:[],total:0};const la=(Ls=>{const ts=Ls.data.map(Pi=>kF(Pi,V.value));return ts.forEach(Pi=>{C.value.add(String(Pi.id)),D.value.set(String(Pi.id),{})}),ts})(mi);return xe(mi,le),{rows:la,total:g.value.total}}catch(mi){return console.error("Failed to fetch items:",mi),{rows:[],total:0}}finally{Me.value=!1}},{isLoading:It,toggleSidebar:He,onGridReady:en,handleUnSelect:tn,onSearch:At}=Lde({selectRowData:K([]),isSidebarOpen:m,quickFilterText:y,gridApi:d,columnDefs:x,perPage:l.ROWS_PER_PAGE,fetcher:gt}),N=q(()=>({blockLoadDebounceMillis:1e3,columnDefs:x.value,rowModelType:"infinite",cacheBlockSize:l.ROWS_PER_PAGE,infiniteInitialRowCount:20,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:l.ROW_HEIGHT,suppressHorizontalScroll:!1,suppressColumnVirtualisation:!1,debounceVerticalScrollbar:!1,animateRows:!1,suppressAnimationFrame:!1,suppressScrollOnNewData:!0,suppressScrollWhenPopupsAreOpen:!1,rowBuffer:20,enableCellTextSelection:!1,suppressDragLeaveHidesColumns:!0,suppressMaxRenderedRowRestriction:!1,height:l.GRID_HEIGHT,stopEditingWhenCellsLoseFocus:!0,onModelUpdated:Z,noRowsOverlayComponent:Qp(v7),noRowsOverlayComponentParams:()=>P.value,defaultColDef:{editable:!1,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:le=>le.data.id,getRowClass:le=>{if(!le.data)return["row-empty"];const Se=["row-highlight"];return le.data.id||Se.push("row-inactive"),le.data.isDeleted&&Se.push("row-deleted"),le.data.isArchived&&Se.push("row-archived"),Se},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:u.workspaceId,entityId:u.entityId,apiServices:E.value,sorting:Me.value}}));function Z(){if(!d.value)return;const le=d.value.getCacheBlockState();if(!le)return;const Se=Object.values(le).reduce((nt,Pe)=>(Pe==null?void 0:Pe.pageStatus)==="loaded"?nt+(Pe.endRow-Pe.startRow):nt,0);g.value.loaded=Math.min(Se,g.value.total)}ut(()=>Ie,()=>{d.value&&(S.value="",C.value.clear(),d.value.deselectAll(),Object.keys(Y).forEach(le=>delete Y[Number(le)]),d.value.purgeInfiniteCache(),d.value.ensureIndexVisible(0),d.value.refreshCells({force:!0}))},{deep:!0});const fe=K(),ke=K(),De=()=>{var le;(le=ke.value)==null||le.open()},Fe=()=>{var le;(le=fe.value)==null||le.open()},Ve=()=>{console.log("Refreshing table"),d.value&&(S.value="",C.value.clear(),d.value.deselectAll(),Object.keys(Y).forEach(le=>delete Y[Number(le)]),d.value.refreshInfiniteCache())},Ne=q(()=>sessionStorage.getItem("ITEM_TABLE_APP_VERSION")||""),Ae=K();function Te(le){var Se;le==="new_scene"?(Se=Ae.value)==null||Se.show():le==="import_scenes"?Fe():le==="overwrite_scenes"&&De()}const at=le=>{h.value=le.api.getSelectedRows().map(Se=>Se.id)},We=le=>{const Se=en(le);return Se&&(Se.addEventListener("modelUpdated",Z),Se.addEventListener("bodyScroll",()=>Se.stopEditing())),Se==null||Se.sizeColumnsToFit(),Se},lt=(le,Se)=>{if(!d.value)return;const nt=d.value.getRowNode(le);nt?(d.value.ensureIndexVisible(Number(nt.rowIndex),"middle"),d.value.flashCells({rowNodes:[nt],flashDuration:3e3,fadeDuration:1e3})):d.value.ensureIndexVisible(g.value.total-1,"bottom")},ht=async le=>{var nt;let Se;if(!(!E.value||!le.trim())){It.value=!0;try{Se=await E.value.createNewScene({workspaceId:u.workspaceId,entityId:u.entityId,name:le}),g.value.total<50&&await Ve()}catch(Pe){console.error("Error creating new scene:",Pe)}finally{It.value=!1,Se!=null&&Se.id&&r({id:String(Se==null?void 0:Se.id),message:`${le} created successfully`,actions:[{label:"View",variant:"secondary",action:()=>{lt(String(Se==null?void 0:Se.id))}},{label:"Scene Hub",variant:"primary",action:()=>{const Pe=Ho({type:"scene_hub",config:{ws_code:u.workspaceId,baseDomain:sessionStorage.getItem("URL_BASE")||"app.arbocollab.com",scene_id:String(Se==null?void 0:Se.id)}}).url;window.open(Pe,"_blank")},btnIcon:"CustomSceneHub"}],icon:Bde,type:"interactive"}),(nt=Ae.value)==null||nt.hide()}}},xt=le=>le.metric_type.code==="number"?"number":"default",Mt=async()=>{if(u.entityId)try{const le=await G(u.entityId);b.value=le.data.map(Se=>({...Se,sortType:xt(Se)}))}catch(le){console.error("Failed to initialize metric list:",le),b.value=[]}},Bt=async()=>{if(E.value)try{const le=await E.value.getUserPermission(u.workspaceId);i(le)}catch(le){console.error("Failed to fetch user permissions:",le)}},Dn=async()=>{if(E.value)try{const le=await E.value.getEntityDetail(u.workspaceId,u.entityId);o(le.permission),a.value=le}catch(le){console.error("Failed to fetch entity details:",le)}},sn=D1(),{setUser:Kn}=sn,Jn=async()=>{if(E.value)try{const le=await E.value.getMe();return console.log("User details:",le),Kn(le),le}catch(le){console.error("Failed to fetch user details:",le)}},ye=async()=>{var le;if(E.value)try{const Se=await E.value.getWorkspaces(u.workspaceId);console.log("Workspace details:",Se);const nt=(le=Se.data[0])==null?void 0:le.ws_user_role_id;return nt&&sn.setUserRoleId(nt),Se}catch(Se){console.error("Failed to fetch workspace details:",Se)}};ut(()=>[u.entityId,u.workspaceId],async([le,Se])=>{!le||!Se||(Jn(),ye(),Mt(),Bt(),Dn())},{immediate:!0,deep:!0}),ut(H,(le,Se)=>{const nt=le.filter(Pe=>!(Se!=null&&Se.includes(Pe)));nt.length>0&&$(Array.from(C.value),nt).then(Pe=>{R(Pe,C.value,nt)})},{immediate:!0,deep:!0}),ut(S,(le,Se)=>{F.value=!!(Se&&le&&Se!==le)}),t({refreshTable:Ve});const Re=le=>{Je.value=le,Ve()};return(le,Se)=>(j(),Xe(X(fK),{"is-sidebar-open":m.value,onCloseSidebar:X(He),onSidebarClear:X(He),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:X(He)},{"header-left":Ee(()=>[we("h1",{class:U(le.$style.tableTitle)},"Scenes",2),we("div",{class:U(le.$style["beta-tag"])},"Beta",2),ve(X(QC),{variant:["primary"],options:c.value,onSelect:Te,onHandleClick:Se[1]||(Se[1]=nt=>Te("new_scene")),id:"create_scene_dropdown"},{prefix:Ee(()=>[ve(X(pt),{id:"create_new_scene",variant:["primary"],onClick:Se[0]||(Se[0]=nt=>Te("new_scene")),label:"New"})]),_:1},8,["options"]),we("span",null,bt(Ne.value),1)]),"header-actions":Ee(()=>[ve(X(R7),{"onUpdate:assignees":Re}),ve(X(jC),{modelValue:y.value,"onUpdate:modelValue":Se[2]||(Se[2]=nt=>y.value=nt),onSearch:X(At),class:U(le.$style.itemSearchBox),onClear:Se[3]||(Se[3]=nt=>X(At)("")),id:"item_search_box"},null,8,["modelValue","onSearch","class"]),ve(X(HP),{status:X(It)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":F.value},{default:Ee(()=>[ve(X(pt),{variant:"secondary",onClick:Ve},{prefix:Ee(()=>[ve(X(mt),{src:"ArrowsRotate"})]),default:Ee(()=>[Se[4]||(Se[4]=dt(" Refresh ",-1))]),_:1})]),_:1},8,["status","show-badge"]),ve(X(p7),{"model-value":X(x),"onUpdate:modelValue":X(k),checkboxColumn:X(O),id:"table_customization"},null,8,["model-value","onUpdate:modelValue","checkboxColumn"])]),grid:Ee(({availableHeight:nt})=>[ve(X(Yce),_n({id:"item_table_main",ref:"agGrid"},N.value,{height:nt+"px",isSorting:X(Me),onOnGridReady:We,onSelectionChanged:at}),null,16,["height","isSorting"])]),footer:Ee(()=>[we("div",{class:U(le.$style.tableFooter),id:"table_footer"},[we("span",null,[Se[5]||(Se[5]=dt(" Showing ",-1)),we("b",null,bt(X(g).loaded)+" of "+bt(X(g).total),1)])],2)]),"new-row":Ee(()=>[ve(X(C7),{onCreateNewItem:ht,ref_key:"createNewSceneRef",ref:Ae},null,512)]),"bulk-update-actions":Ee(()=>{var nt;return[!m.value&&h.value.length>0?(j(),Xe(X(eK),{key:0,selectRowData:((nt=d.value)==null?void 0:nt.getSelectedRows())||[],"workspace-id":u.workspaceId,"entity-id":u.entityId,"grid-api":d.value,onUnselect:X(tn),"take-name":ue.value,"selected-all":ce.value},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","take-name","selected-all"])):ot("",!0)]}),snackbar:Ee(()=>[ve(X(TK))]),popup:Ee(()=>[ve(x7,{ref_key:"popupCreateSceneRef",ref:fe,"workspace-id":u.workspaceId,"entity-id":u.entityId,onImportSuccess:Ve},null,8,["workspace-id","entity-id"]),ve(Vde,{ref_key:"popupOverwriteScenesRef",ref:ke,"workspace-id":u.workspaceId,"entity-id":u.entityId,onImportSuccess:Ve},null,8,["workspace-id","entity-id"])]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"]))}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_1lefh_1",tableFooter:"_tableFooter_1lefh_7",footerStart:"_footerStart_1lefh_17",newRow:"_newRow_1lefh_25","warning-text":"_warning-text_1lefh_44","has-error":"_has-error_1lefh_49",itemSearchBox:"_itemSearchBox_1lefh_53","beta-tag":"_beta-tag_1lefh_57"}}]]),VM="0.0.43",Gde={key:0},$de=Ct(ct({__name:"app",setup(e){const t=q(()=>n.id.length===0||n.workspaceId.length===0),n=Oo({id:"",workspaceId:"",apiConfig:{}}),i=Sd(),{showMessage:o}=i,s=c=>{var u,d;c.success?o(c.apiCode,"success"):o(((d=(u=c.res)==null?void 0:u.data)==null?void 0:d.message)||c.apiCode,"error")},r=K(null);dv(()=>{var c,u,d;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",VM);try{if(r.value=Di(),!r.value)throw new Error("Current instance is null");n.id=((c=r.value)==null?void 0:c.appContext.config.globalProperties.id)||"",n.workspaceId=((u=r.value)==null?void 0:u.appContext.config.globalProperties.workspaceId)||sessionStorage.getItem("ws.code")||"";const h={domainApi:"https://api.dev.arbocollab.com/api",wsCode:sessionStorage.getItem("ws.code")||"w:yngazem",entityId:n.id};n.apiConfig=((d=r.value)==null?void 0:d.appContext.config.globalProperties.apiConfig)||{};const f=new NM(n.apiConfig,h);f.on("call-api",s),r.value.appContext.config.globalProperties.apiServices=f}catch(h){console.error("Error getting current instance:",h)}}),qn(()=>{r.value.appContext.config.globalProperties.apiServices.off("call-api",s)});const a=q(()=>n.id),l=q(()=>n.workspaceId);return Fa("workspaceId",l),Fa("entityId",a),(c,u)=>(j(),Ce("div",{class:U(c.$style.dashboardPluginWrapper)},[t.value?(j(),Ce("span",Gde," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):a.value?(j(),Xe(X(Hde),{key:1,entityId:a.value,workspaceId:l.value},null,8,["entityId","workspaceId"])):ot("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),HS=async(e={},t={})=>{const n=MR($de),i=E8();n.use(i);const o=["apiConfig","workspaceId","id"],s={};return Object.entries(e).forEach(([r,a])=>{a!==void 0&&(n.config.globalProperties[r]=a,s[r]=a,o.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=s,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)},console.log(`%cArbo Dashboard Plugin v${VM}`,"color: #4CAF50; font-weight: bold;"),console.log(n.config.globalProperties),n.provide("switchInstance",n.config.globalProperties.$switchInstance),n};typeof window<"u"&&(window.arboDashboard=HS),cn.default=HS,cn.initDashboard=HS,Object.defineProperties(cn,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
192
|
+
`,Hde=Ct(ct({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const n=WC(),{setUserPermissions:i,setEntityPermissions:o}=n,{entityPermissions:s}=ys(n),{addNotification:r}=Sd(),a=K(null),l={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},c=q(()=>{var Se;const le=((Se=s.value)==null?void 0:Se.has_create_item_permission)===1;return[{label:"Create manually",value:"new_scene",icon:"Plus",type:"icon",id:"create_new_scene",hide:!le},{label:"Import from CSV or Excel",value:"import_scenes",icon:"FileImport",type:"icon",hide:!le,id:"import_scenes_option"},{label:"Update existing (CSV or Excel)",value:"overwrite_scenes",icon:"FilePen",type:"icon",hide:!le,id:"overwrite_scenes_option"}]}),u=e;kd.initialize({wrapVueCellRenderer:Qp,wrapVueCellEditor:P1});const d=K(null),h=K([]),f=qC(),{rowCount:g}=ys(f),m=K(!1),y=K(""),b=K(),S=K(""),F=K(!1),C=K(new Set),D=K(new Map),{apiServices:E}=mo(!1,u),{columnDefs:x,checkboxColumn:O,saveColumnConfig:k}=nue(b,u.entityId),{updateRowData:I,setMetricValues:R}=Ode(d),P=q(()=>({isSearching:y.value.length>0,isFiltering:Je.value.length>0})),V=q(uC),H=q(()=>x.value.filter(le=>{var Se;return((Se=le.field)==null?void 0:Se.startsWith("metric_"))&&!le.hide}).map(le=>{var Se;return((Se=le.field)==null?void 0:Se.replace("metric_",""))||""}));Fa("timezone",V);const te=q(()=>({autoFetch:!1,workspaceId:u.workspaceId,entityId:u.entityId,metricIds:H.value,updateItemData:I})),{fetchItems:B,getMetricList:G,cusorMap:Y,getMetricValues:$}=kde(te),ce=q(()=>{if(!d.value)return!1;const le=d.value.getSelectedRows().length;return le>0&&le>=g.value.total}),ue=q(()=>{var le;return((le=a.value)==null?void 0:le.name)||"Items"}),xe=(le,Se)=>{var nt,Pe,Mn;g.value.total=le.meta.total??0,(nt=le.meta.next)!=null&&nt.cursor&&(Y[Se+1]=le.meta.next.cursor),S.value=le.meta["X-Tsr-content-sha256"]||"",le.meta.total===0?(Pe=d.value)==null||Pe.showNoRowsOverlay():(Mn=d.value)==null||Mn.hideOverlay()},re=E1(),{sortingAPIConfiguration:Ie,isSortingRunning:Me}=ys(re),Je=K([]),gt=async({page:le,pageSize:Se,filterText:nt})=>{var wr;(wr=d.value)==null||wr.hideOverlay();const Pe=Y[le],Mn=!Pe&&le>1?(le-1)*Se:void 0,To=Ie.value;To.length>0&&(Me.value=!0);try{const mi=await B({cursor:Pe,size:Se,searchQuery:nt,offset:Mn,sort_by:To,assignees:Je.value});if(!mi)return{rows:[],total:0};const la=(Ls=>{const ts=Ls.data.map(Pi=>kF(Pi,V.value));return ts.forEach(Pi=>{C.value.add(String(Pi.id)),D.value.set(String(Pi.id),{})}),ts})(mi);return xe(mi,le),{rows:la,total:g.value.total}}catch(mi){return console.error("Failed to fetch items:",mi),{rows:[],total:0}}finally{Me.value=!1}},{isLoading:It,toggleSidebar:He,onGridReady:en,handleUnSelect:tn,onSearch:At}=Lde({selectRowData:K([]),isSidebarOpen:m,quickFilterText:y,gridApi:d,columnDefs:x,perPage:l.ROWS_PER_PAGE,fetcher:gt}),N=q(()=>({blockLoadDebounceMillis:1e3,columnDefs:x.value,rowModelType:"infinite",cacheBlockSize:l.ROWS_PER_PAGE,infiniteInitialRowCount:20,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:l.ROW_HEIGHT,suppressHorizontalScroll:!1,suppressColumnVirtualisation:!1,debounceVerticalScrollbar:!1,animateRows:!1,suppressAnimationFrame:!1,suppressScrollOnNewData:!0,suppressScrollWhenPopupsAreOpen:!1,rowBuffer:20,enableCellTextSelection:!1,suppressDragLeaveHidesColumns:!0,suppressMaxRenderedRowRestriction:!1,height:l.GRID_HEIGHT,stopEditingWhenCellsLoseFocus:!0,onModelUpdated:Z,noRowsOverlayComponent:Qp(v7),noRowsOverlayComponentParams:()=>P.value,defaultColDef:{editable:!1,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:le=>le.data.id,getRowClass:le=>{if(!le.data)return["row-empty"];const Se=["row-highlight"];return le.data.id||Se.push("row-inactive"),le.data.isDeleted&&Se.push("row-deleted"),le.data.isArchived&&Se.push("row-archived"),Se},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:u.workspaceId,entityId:u.entityId,apiServices:E.value,sorting:Me.value}}));function Z(){if(!d.value)return;const le=d.value.getCacheBlockState();if(!le)return;const Se=Object.values(le).reduce((nt,Pe)=>(Pe==null?void 0:Pe.pageStatus)==="loaded"?nt+(Pe.endRow-Pe.startRow):nt,0);g.value.loaded=Math.min(Se,g.value.total)}ut(()=>Ie,()=>{d.value&&(S.value="",C.value.clear(),d.value.deselectAll(),Object.keys(Y).forEach(le=>delete Y[Number(le)]),d.value.purgeInfiniteCache(),d.value.ensureIndexVisible(0),d.value.refreshCells({force:!0}))},{deep:!0});const fe=K(),ke=K(),De=()=>{var le;(le=ke.value)==null||le.open()},Fe=()=>{var le;(le=fe.value)==null||le.open()},Ve=()=>{console.log("Refreshing table"),d.value&&(S.value="",C.value.clear(),d.value.deselectAll(),Object.keys(Y).forEach(le=>delete Y[Number(le)]),d.value.refreshInfiniteCache())},Ne=q(()=>sessionStorage.getItem("ITEM_TABLE_APP_VERSION")||""),Ae=K();function Te(le){var Se;le==="new_scene"?(Se=Ae.value)==null||Se.show():le==="import_scenes"?Fe():le==="overwrite_scenes"&&De()}const at=le=>{h.value=le.api.getSelectedRows().map(Se=>Se.id)},We=le=>{const Se=en(le);return Se&&(Se.addEventListener("modelUpdated",Z),Se.addEventListener("bodyScroll",()=>Se.stopEditing())),Se==null||Se.sizeColumnsToFit(),Se},lt=(le,Se)=>{if(!d.value)return;const nt=d.value.getRowNode(le);nt?(d.value.ensureIndexVisible(Number(nt.rowIndex),"middle"),d.value.flashCells({rowNodes:[nt],flashDuration:3e3,fadeDuration:1e3})):d.value.ensureIndexVisible(g.value.total-1,"bottom")},ht=async le=>{var nt;let Se;if(!(!E.value||!le.trim())){It.value=!0;try{Se=await E.value.createNewScene({workspaceId:u.workspaceId,entityId:u.entityId,name:le}),g.value.total<50&&await Ve()}catch(Pe){console.error("Error creating new scene:",Pe)}finally{It.value=!1,Se!=null&&Se.id&&r({id:String(Se==null?void 0:Se.id),message:`${le} created successfully`,actions:[{label:"View",variant:"secondary",action:()=>{lt(String(Se==null?void 0:Se.id))}},{label:"Scene Hub",variant:"primary",action:()=>{const Pe=Ho({type:"scene_hub",config:{ws_code:u.workspaceId,baseDomain:sessionStorage.getItem("URL_BASE")||"app.arbocollab.com",scene_id:String(Se==null?void 0:Se.id)}}).url;window.open(Pe,"_blank")},btnIcon:"CustomSceneHub"}],icon:Bde,type:"interactive"}),(nt=Ae.value)==null||nt.hide()}}},xt=le=>le.metric_type.code==="number"?"number":"default",Mt=async()=>{if(u.entityId)try{const le=await G(u.entityId);b.value=le.data.map(Se=>({...Se,sortType:xt(Se)}))}catch(le){console.error("Failed to initialize metric list:",le),b.value=[]}},Bt=async()=>{if(E.value)try{const le=await E.value.getUserPermission(u.workspaceId);i(le)}catch(le){console.error("Failed to fetch user permissions:",le)}},Dn=async()=>{if(E.value)try{const le=await E.value.getEntityDetail(u.workspaceId,u.entityId);o(le.permission),a.value=le}catch(le){console.error("Failed to fetch entity details:",le)}},sn=D1(),{setUser:Kn}=sn,Jn=async()=>{if(E.value)try{const le=await E.value.getMe();return console.log("User details:",le),Kn(le),le}catch(le){console.error("Failed to fetch user details:",le)}},ye=async()=>{var le;if(E.value)try{const Se=await E.value.getWorkspaces(u.workspaceId);console.log("Workspace details:",Se);const nt=(le=Se.data[0])==null?void 0:le.ws_user_role_id;return nt&&sn.setUserRoleId(nt),Se}catch(Se){console.error("Failed to fetch workspace details:",Se)}};ut(()=>[u.entityId,u.workspaceId],async([le,Se])=>{!le||!Se||(Jn(),ye(),Mt(),Bt(),Dn())},{immediate:!0,deep:!0}),ut(H,(le,Se)=>{const nt=le.filter(Pe=>!(Se!=null&&Se.includes(Pe)));nt.length>0&&$(Array.from(C.value),nt).then(Pe=>{R(Pe,C.value,nt)})},{immediate:!0,deep:!0}),ut(S,(le,Se)=>{F.value=!!(Se&&le&&Se!==le)}),t({refreshTable:Ve});const Re=le=>{Je.value=le,Ve()};return(le,Se)=>(j(),Xe(X(fK),{"is-sidebar-open":m.value,onCloseSidebar:X(He),onSidebarClear:X(He),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:X(He)},{"header-left":Ee(()=>[we("h1",{class:U(le.$style.tableTitle)},"Scenes",2),we("div",{class:U(le.$style["beta-tag"])},"Beta",2),ve(X(QC),{variant:["primary"],options:c.value,onSelect:Te,onHandleClick:Se[1]||(Se[1]=nt=>Te("new_scene")),id:"create_scene_dropdown"},{prefix:Ee(()=>[ve(X(pt),{id:"create_new_scene",variant:["primary"],onClick:Se[0]||(Se[0]=nt=>Te("new_scene")),label:"New"})]),_:1},8,["options"]),we("span",null,bt(Ne.value),1)]),"header-actions":Ee(()=>[ve(X(R7),{"onUpdate:assignees":Re}),ve(X(jC),{modelValue:y.value,"onUpdate:modelValue":Se[2]||(Se[2]=nt=>y.value=nt),onSearch:X(At),class:U(le.$style.itemSearchBox),onClear:Se[3]||(Se[3]=nt=>X(At)("")),id:"item_search_box"},null,8,["modelValue","onSearch","class"]),ve(X(HP),{status:X(It)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":F.value},{default:Ee(()=>[ve(X(pt),{variant:"secondary",onClick:Ve},{prefix:Ee(()=>[ve(X(mt),{src:"ArrowsRotate"})]),default:Ee(()=>[Se[4]||(Se[4]=dt(" Refresh ",-1))]),_:1})]),_:1},8,["status","show-badge"]),ve(X(p7),{"model-value":X(x),"onUpdate:modelValue":X(k),checkboxColumn:X(O),id:"table_customization"},null,8,["model-value","onUpdate:modelValue","checkboxColumn"])]),grid:Ee(({availableHeight:nt})=>[ve(X(Yce),_n({id:"item_table_main",ref:"agGrid"},N.value,{height:nt+"px",isSorting:X(Me),onOnGridReady:We,onSelectionChanged:at}),null,16,["height","isSorting"])]),footer:Ee(()=>[we("div",{class:U(le.$style.tableFooter),id:"table_footer"},[we("span",null,[Se[5]||(Se[5]=dt(" Showing ",-1)),we("b",null,bt(X(g).loaded)+" of "+bt(X(g).total),1)])],2)]),"new-row":Ee(()=>[ve(X(C7),{onCreateNewItem:ht,ref_key:"createNewSceneRef",ref:Ae},null,512)]),"bulk-update-actions":Ee(()=>{var nt;return[!m.value&&h.value.length>0?(j(),Xe(X(eK),{key:0,selectRowData:((nt=d.value)==null?void 0:nt.getSelectedRows())||[],"workspace-id":u.workspaceId,"entity-id":u.entityId,"grid-api":d.value,onUnselect:X(tn),"take-name":ue.value,"selected-all":ce.value},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","take-name","selected-all"])):ot("",!0)]}),snackbar:Ee(()=>[ve(X(TK))]),popup:Ee(()=>[ve(x7,{ref_key:"popupCreateSceneRef",ref:fe,"workspace-id":u.workspaceId,"entity-id":u.entityId,onImportSuccess:Ve},null,8,["workspace-id","entity-id"]),ve(Vde,{ref_key:"popupOverwriteScenesRef",ref:ke,"workspace-id":u.workspaceId,"entity-id":u.entityId,onImportSuccess:Ve},null,8,["workspace-id","entity-id"])]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"]))}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_1lefh_1",tableFooter:"_tableFooter_1lefh_7",footerStart:"_footerStart_1lefh_17",newRow:"_newRow_1lefh_25","warning-text":"_warning-text_1lefh_44","has-error":"_has-error_1lefh_49",itemSearchBox:"_itemSearchBox_1lefh_53","beta-tag":"_beta-tag_1lefh_57"}}]]),VM="0.0.44",Gde={key:0},$de=Ct(ct({__name:"app",setup(e){const t=q(()=>n.id.length===0||n.workspaceId.length===0),n=Oo({id:"",workspaceId:"",apiConfig:{}}),i=Sd(),{showMessage:o}=i,s=c=>{var u,d;c.success?o(c.apiCode,"success"):o(((d=(u=c.res)==null?void 0:u.data)==null?void 0:d.message)||c.apiCode,"error")},r=K(null);dv(()=>{var c,u,d;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",VM);try{if(r.value=Di(),!r.value)throw new Error("Current instance is null");n.id=((c=r.value)==null?void 0:c.appContext.config.globalProperties.id)||"",n.workspaceId=((u=r.value)==null?void 0:u.appContext.config.globalProperties.workspaceId)||sessionStorage.getItem("ws.code")||"";const h={domainApi:"https://api.dev.arbocollab.com/api",wsCode:sessionStorage.getItem("ws.code")||"w:yngazem",entityId:n.id};n.apiConfig=((d=r.value)==null?void 0:d.appContext.config.globalProperties.apiConfig)||{};const f=new NM(n.apiConfig,h);f.on("call-api",s),r.value.appContext.config.globalProperties.apiServices=f}catch(h){console.error("Error getting current instance:",h)}}),qn(()=>{r.value.appContext.config.globalProperties.apiServices.off("call-api",s)});const a=q(()=>n.id),l=q(()=>n.workspaceId);return Fa("workspaceId",l),Fa("entityId",a),(c,u)=>(j(),Ce("div",{class:U(c.$style.dashboardPluginWrapper)},[t.value?(j(),Ce("span",Gde," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):a.value?(j(),Xe(X(Hde),{key:1,entityId:a.value,workspaceId:l.value},null,8,["entityId","workspaceId"])):ot("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),HS=async(e={},t={})=>{const n=MR($de),i=E8();n.use(i);const o=["apiConfig","workspaceId","id"],s={};return Object.entries(e).forEach(([r,a])=>{a!==void 0&&(n.config.globalProperties[r]=a,s[r]=a,o.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=s,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)},console.log(`%cArbo Dashboard Plugin v${VM}`,"color: #4CAF50; font-weight: bold;"),console.log(n.config.globalProperties),n.provide("switchInstance",n.config.globalProperties.$switchInstance),n};typeof window<"u"&&(window.arboDashboard=HS),cn.default=HS,cn.initDashboard=HS,Object.defineProperties(cn,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|