@arbocollab/arbo-plugin-item-table 0.1.135 → 0.1.136
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 +10 -10
- package/lib/umd/index.umd.js +6 -6
- package/package.json +1 -1
package/lib/umd/index.umd.js
CHANGED
|
@@ -115,25 +115,25 @@ Expected function or array of functions, received type ${typeof e}.`),gs)}functi
|
|
|
115
115
|
`).replace(/<\/(p|div|li|h[1-6])>/gi,`
|
|
116
116
|
`);return(new DOMParser().parseFromString(t,"text/html").body.textContent??"").replace(/\n{3,}/g,`
|
|
117
117
|
|
|
118
|
-
`).trim()}const mm=e=>({id:e.id,label:e.name,value:e.id,data:e,color:e.color||{bgColor:"#CCCCCC",textColor:"#FFFFFF"},selected:!1,hover:!1,type:"text",disabled:!1,clickable:!0,danger:!1}),vm=(e,t)=>{var P;const n=Sn("filterParams",null),s=B(((P=e.value)==null?void 0:P.map(E=>E.id))??[]),o=B([]),r=B(!1),i=qr(e,"workspaceId"),a=qr(e,"entityId"),l=qr(e,"id"),c=qr(e,"isSelectAll"),u=qr(e,"isBulkUpdate"),d=e.updateRowData,h=B([]),{apiServices:f}=ns(!!e.params,e),p=Y(()=>{var M,O;const E=new Set(((M=e.value)==null?void 0:M.map($=>$.id))??[]),k=((O=e.value)==null?void 0:O.map($=>({...mm($),selected:!0})))??[],I=o.value.filter($=>!E.has($.id));return au(k,I,"id")}),g=E=>{const k=p.value.find(I=>I.id===E);return k==null?void 0:k.data},v=()=>{var E;return u.value&&c.value?[]:(E=t==null?void 0:t.value)!=null&&E.length?t.value:[String(l.value)]},C=async(E,k,I)=>{if(r.value||!f.value)return!1;r.value=!0;try{const M=await E();if((M==null?void 0:M.message)!=="Done")throw new Error("API call failed");return k(),!0}catch(M){return console.error("API call error:",M),I==null||I(M),!1}finally{r.value=!1}},S=Y(()=>!!(u.value&&c.value)),b=async()=>await C(()=>f.value.unAssignAll({workspaceId:String(i.value),userIds:[],itemIds:S.value?void 0:v(),entityId:S.value?String(a.value):void 0,filterParams:n!=null&&n.value?n.value:void 0}),()=>{d==null||d({assignees:[],type:"removeAll"}),s.value=[]},()=>{var k;console.error("Failed to unassign all assignees"),(k=e.errorCallback)==null||k.call(e)}),w=async E=>await C(()=>f.value.replaceAssignee(R(E)),()=>{s.value=[E];const I=g(E);I&&(d==null||d({assignees:bu([I]),type:"overwrite"}))},()=>{var I;(I=e.errorCallback)==null||I.call(e)}),D=async E=>await C(()=>f.value.addAssignee(R(E)),()=>{var M,O,$;s.value.push(E);const I=g(E);if(I){const Z=($=(O=(M=e.params)==null?void 0:M.api)==null?void 0:O.getRowNode(String(e.id)))==null?void 0:$.data,Q=(Z==null?void 0:Z.assignees)||[],se=au([...Q,...bu([I])],"id");d==null||d({assignees:se,type:"add"})}},()=>{var I;(I=e.errorCallback)==null||I.call(e)}),R=E=>{const k={workspaceId:String(i.value),userIds:[E],filterParams:n!=null&&n.value?n.value:void 0};return S.value?(k.itemIds=void 0,k.entityId=String(a.value)):k.itemIds=v(),k},T=async E=>await C(()=>f.value.removeAssignee(R(E)),()=>{var O,$,Z;const I=(Z=($=(O=e.params)==null?void 0:O.api)==null?void 0:$.getRowNode(String(e.id)))==null?void 0:Z.data;s.value=s.value.filter(Q=>Q!==E);const M=bu(((I==null?void 0:I.assignees)||[]).filter(Q=>Q.id!==E));d==null||d({assignees:M,type:"remove"})},()=>{var I;(I=e.errorCallback)==null||I.call(e)});return{isSubmitting:r,options:h,unAssignAll:b,replaceAssignees:w,addAssignee:D,removeAssignee:T,handleSelect:E=>{const k=String(E.id);return s.value.includes(k)?T(k):D(k)},openPeopleInsight:E=>{if(!E||!i.value)return;const k=Zs({type:"people_insight",config:{user_id:E,ws_code:i.value,baseDomain:un.getInstance().getItem("BASE_URL")||""}}).url;window.open(k,"_blank")},assigneeList:o,mergedOptions:p,selectedUserIds:s}},$9={placement:"bottom-start",theme:"light",trigger:"click",interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,showArrow:!0,showOnInit:!1,alwaysShow:!1,debug:!1,content:void 0};function H9(e){return e.value?"$el"in e.value?e.value.$el:e.value:null}function Es(e={}){const t=B(!1),n={...$9,...e},s=B(null),o=B(null),r=B(null),i=B(!1);let a=null,l=null;const c=S=>{(S.key==="Escape"||S.key==="Esc")&&p()},u=()=>{a&&l&&(l.removeEventListener("click",a),a=null,l=null),r.value&&(r.value.destroy(),r.value=null,i.value=!1),document.removeEventListener("keydown",c)},d=S=>{const{showOnInit:b,alwaysShow:w,showArrow:D,debug:R,...T}=n;return{...T,content:S,theme:n.theme,trigger:w||n.toggleOnClick?"manual":n.trigger,placement:n.placement||"bottom-start",arrow:!1,offset:n.offset,interactive:n.interactive,appendTo:n.appendTo,animation:"fade",maxWidth:n.maxWidth||350,onShow:F=>{if(e.disabled)return!1;if(i.value=!0,document.addEventListener("keydown",c),e.onShow)return e.onShow(F)},onHide:F=>{if(t.value)return setTimeout(()=>{t.value=!1},200),!1;if(w)return!1;if(i.value=!1,document.removeEventListener("keydown",c),e.onHide)return e.onHide(F)},onClickOutside:n.onClickOutside?n.onClickOutside:(F,x)=>{const P=x.target.closest(".notification-center"),E=x.target.closest("#people-insight-container");if(P||E){t.value=!0;return}if(e.onClickOutside)return e.onClickOutside(F,x);w||F.hide()},popperOptions:n.popperOptions||{modifiers:[{name:"computeStyles",options:{gpuAcceleration:!1}},{name:"preventOverflow",options:{padding:8}}]},hideOnClick:n.hideOnClick!==void 0?n.hideOnClick:!1}},h=()=>{var w;u();const S=H9(s),b=o.value;if(!(!S||!b)){b.style.display==="none"&&(b.style.display="");try{const D=d(b),R=ka(S,D);r.value=Array.isArray(R)?R[0]:R,n.toggleOnClick&&!n.alwaysShow&&(a=()=>g(),l=S,S.addEventListener("click",a)),(n.showOnInit||n.alwaysShow)&&((w=r.value)==null||w.show())}catch(D){console.error("[useTippyComposable] Failed to create Tippy instance:",D)}}},f=S=>{S&&C(S),r.value&&r.value.show()},p=()=>{n.alwaysShow||r.value&&r.value.hide()},g=()=>{i.value?p():f()},v=S=>{r.value&&r.value.setContent(S)},C=S=>{r.value&&r.value.setProps(S)};return et([s,o],h,{flush:"post"}),es(()=>{u()}),{instance:r,isVisible:i,show:f,hide:p,toggle:g,triggerRef:s,popupRef:o,destroyTippy:u,setContent:v,setProps:C}}const NF=(e,t,n)=>{const s=B("Copy"),o=()=>{setTimeout(()=>{s.value="Copy"},5e3)};return{copyToClipboard:async i=>{i.stopPropagation(),i.preventDefault(),i.stopImmediatePropagation();try{return await navigator.clipboard.writeText(e),s.value="Copied",t==null||t(),o(),!0}catch(a){return console.error("Failed to copy text to clipboard:",a),s.value="Copy failed",o(),!1}},tooltip:s}},G9=(e,t,n)=>{const s={truncate:"End date cleared because it was before start. Please pick an end date.",swap:"Dates auto-swapped because start was after end.",...e.messages},o=lo({startDate:null,endDate:null,timezone:e.timezone||"UTC",format:e.format||"",isSelectingStart:!1,isSelectingEnd:!1,rangeFeedback:{status:"idle",action:null,message:""},cacheStartDate:null,cacheEndDate:null,isDirty:!1});eh(()=>{var P;((P=e.value)==null?void 0:P.length)===2&&(o.startDate=e.value[0],o.endDate=e.value[1]),o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate,o.isSelectingStart=!1,o.isSelectingEnd=!1,e.timezone&&(o.timezone=e.timezone)});const r=B(!1),i=B(!1),a=()=>{var $,Z,Q,se,ae,ee,V,W;const P=r.value||((Z=($=o.startDate)==null?void 0:$.getTime)==null?void 0:Z.call($))!==((se=(Q=o.cacheStartDate)==null?void 0:Q.getTime)==null?void 0:se.call(Q)),E=i.value||((ee=(ae=o.endDate)==null?void 0:ae.getTime)==null?void 0:ee.call(ae))!==((W=(V=o.cacheEndDate)==null?void 0:V.getTime)==null?void 0:W.call(V)),k=o.startDate===null,I=o.endDate===null;let M,O;P&&E&&k&&I?(M=!0,O=!0,t("clearAll")):P&&!E?(M=!0,k?t("clearStart"):t("update:start",o.startDate)):E&&!P?(O=!0,I?t("clearDue"):t("update:end",o.endDate)):P&&E&&(M=!0,O=!0,t("update",[o.startDate,o.endDate])),!(!M&&!O)&&(M&&!O?t("confirmed",{start:o.startDate}):!M&&O?t("confirmed",{end:o.endDate}):t("confirmed",{start:o.startDate,end:o.endDate}),o.isDirty=P||E)},l=(P,E)=>{const k=bt.fromObject({year:P.year,month:P.month,day:P.day},{zone:o.timezone});return(E==="start"?k.startOf("day"):k.endOf("day")).toJSDate()},c=()=>{o.rangeFeedback.status="idle",o.rangeFeedback.action=null,o.rangeFeedback.message=""},u=P=>{e.enableRangeFeedback&&(o.rangeFeedback.status="corrected",o.rangeFeedback.action=P,o.rangeFeedback.message=P==="swap"?s.swap:s.truncate)},d=P=>{if(!(!o.startDate||!o.endDate)){if(o.startDate.getTime()<=o.endDate.getTime()){e.enableRangeFeedback&&c();return}if(P==="select-start"){const E={start:o.startDate,end:o.endDate};o.endDate=null,t("range:invalid",E),t("range:corrected",{start:o.startDate,end:o.endDate,action:"truncate"}),o.isSelectingEnd=!0,u("truncate")}else{const E={start:o.startDate,end:o.endDate},k=o.startDate;o.startDate=o.endDate,o.endDate=k,t("range:invalid",E),t("range:corrected",{start:o.startDate,end:o.endDate,action:"swap"}),u("swap")}}},h=B(!1),f=B(!1),p=(P,E=!0)=>{r.value=!0,h.value=!1,!(e.disabled||e.readOnly)&&(o.startDate=l(P,"start"),E?(o.isSelectingStart=!1,o.isSelectingEnd=!0):(o.isSelectingStart=!0,o.isSelectingEnd=!1),d("select-start"))},g=P=>{i.value=!0,f.value=!1,!(e.disabled||e.readOnly)&&(o.endDate=l(P,"end"),d("select-end"))},v=()=>{r.value=!0,!(e.disabled||e.readOnly)&&(o.startDate=null,c())},C=()=>{i.value=!0,!(e.disabled||e.readOnly)&&(o.endDate=null,c())},S=()=>{r.value=!0,i.value=!0,!(e.disabled||e.readOnly)&&(o.startDate=null,o.endDate=null,c(),w())},b=()=>{e.disabled||e.readOnly||o.isDirty||(o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate)},w=()=>{e.disabled||e.readOnly||(a(),o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate,o.isDirty=!1)},D=()=>{e.disabled||e.readOnly||(o.startDate=o.cacheStartDate,o.endDate=o.cacheEndDate,c(),o.isDirty=!1)},R=Y(()=>o.startDate?bt.fromJSDate(o.startDate,{zone:o.timezone}).toFormat(o.format):e.startPlaceholder),T=Y(()=>o.endDate?bt.fromJSDate(o.endDate,{zone:o.timezone}).toFormat(o.format):e.duePlaceholder),F=Y(()=>!o.startDate&&!e.disabled?e.startTooltip:!o.startDate&&(e.disabled||e.readOnly)?e.startPlaceholder:o.startDate?bt.fromJSDate(o.startDate,{zone:o.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):e.startTooltip),x=Y(()=>!o.endDate&&!e.disabled?e.dueTooltip:!o.endDate&&(e.disabled||e.readOnly)?e.startPlaceholder:o.endDate?bt.fromJSDate(o.endDate,{zone:o.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):e.dueTooltip);return{states:o,displayStartDate:R,displayEndDate:T,tooltipStartDate:F,tooltipEndDate:x,showMultipleDueDates:f,showMultipleStartDates:h,selectEndDate:g,selectStartDate:p,clearDue:C,clearStart:v,clearAll:S,beginInteraction:b,confirmSelection:w,cancelSelection:D}},LF="MMM dd",U9=e=>{const t=e.timezone,n=Y(()=>e.start?pm({date:Wh(e.start),timezone:t,format:LF}):"No start"),s=Y(()=>e.end?pm({date:Wh(e.end),timezone:t,format:LF}):"No due"),o=d=>{if(!d)return null;const h=bt.now().setZone(t).startOf("day"),f=bt.fromISO(d).setZone(t).startOf("day");if(!f.isValid)return console.warn("Invalid date:",d,f.invalidReason),null;const p=f.diff(h,"days").days;return p===0?"today":p===1?"tomorrow":p===-1?"yesterday":p<-1?"past":"future"},r=Y(()=>o(e.start)),i=Y(()=>o(e.end)),a=Y(()=>{if(n.value==="No start")return["empty"];const d=[];return r.value&&d.push(`start-${r.value}`),e.isStarted&&d.push("actual"),d}),l=Y(()=>{if(s.value==="No due")return["empty"];const d=[];return i.value&&d.push(`end-${i.value}`),e.isEnded&&d.push("actual"),d}),c=Y(()=>e.start?pm({date:Wh(e.start),timezone:t,format:"MMM dd, yyyy | HH:mm"}):"No start"),u=Y(()=>e.end?pm({date:Wh(e.end),timezone:t,format:"MMM dd, yyyy | HH:mm"}):"No due");return{startDate:n,endDate:s,startClasses:a,endClasses:l,fullStartDate:c,fullEndDate:u}},W9="UserCache",z9="user",j9=()=>{const e=B({}),{getCachedValue:t,setCachedValue:n}=Rh({dbName:W9,storeName:z9}),s=async c=>c?await t(c):null;return{getCachedUser:s,setCachedUser:async c=>{if(!(c!=null&&c.id)){console.warn("Cannot cache user without id:",c);return}await n(c.id,c),e.value[c.id]=!0},getCachedUsers:async c=>{if(!c||c.length===0)return[];const u=c.map(h=>s(h));return(await Promise.all(u)).filter(h=>h!==null)},setCachedUsers:async c=>{if(!c||c.length===0)return;const d=au(c,"id").filter(h=>h.id&&!e.value[h.id]).map(async h=>{await n(h.id,h),e.value[h.id]=!0});await Promise.all(d)},isUserCached:c=>!!e.value[c],clearCacheTracking:()=>{e.value={}}}},K9={placement:"bottom-start",theme:"light",trigger:"manual",interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,showArrow:!0,showOnInit:!1,alwaysShow:!1,debug:!1,content:void 0,useTrigger:!0,showOverlay:!1,overlayOpacity:.5,closeOnOverlayClick:!0,centered:!1};let zh=0,ko=null;function q9(e){return ko||(ko=document.createElement("div"),ko.className="popup-overlay",ko.style.cssText=`
|
|
118
|
+
`).trim()}const mm=e=>({id:e.id,label:e.name,value:e.id,data:e,color:e.color||{bgColor:"#CCCCCC",textColor:"#FFFFFF"},selected:!1,hover:!1,type:"text",disabled:!1,clickable:!0,danger:!1}),vm=(e,t)=>{var P;const n=Sn("filterParams",null),s=B(((P=e.value)==null?void 0:P.map(E=>E.id))??[]),o=B([]),r=B(!1),i=qr(e,"workspaceId"),a=qr(e,"entityId"),l=qr(e,"id"),c=qr(e,"isSelectAll"),u=qr(e,"isBulkUpdate"),d=e.updateRowData,h=B([]),{apiServices:f}=ns(!!e.params,e),p=Y(()=>{var M,O;const E=new Set(((M=e.value)==null?void 0:M.map($=>$.id))??[]),k=((O=e.value)==null?void 0:O.map($=>({...mm($),selected:!0})))??[],I=o.value.filter($=>!E.has($.id));return au(k,I,"id")}),g=E=>{const k=p.value.find(I=>I.id===E);return k==null?void 0:k.data},v=()=>{var E;return u.value&&c.value?[]:(E=t==null?void 0:t.value)!=null&&E.length?t.value:[String(l.value)]},C=async(E,k,I)=>{if(r.value||!f.value)return!1;r.value=!0;try{const M=await E();if((M==null?void 0:M.message)!=="Done")throw new Error("API call failed");return k(),!0}catch(M){return console.error("API call error:",M),I==null||I(M),!1}finally{r.value=!1}},S=Y(()=>!!(u.value&&c.value)),b=async()=>await C(()=>f.value.unAssignAll({workspaceId:String(i.value),userIds:[],itemIds:S.value?void 0:v(),entityId:S.value?String(a.value):void 0,filterParams:n!=null&&n.value?n.value:void 0}),()=>{d==null||d({assignees:[],type:"removeAll"}),s.value=[]},()=>{var k;console.error("Failed to unassign all assignees"),(k=e.errorCallback)==null||k.call(e)}),w=async E=>await C(()=>f.value.replaceAssignee(R(E)),()=>{s.value=[E];const I=g(E);I&&(d==null||d({assignees:bu([I]),type:"overwrite"}))},()=>{var I;(I=e.errorCallback)==null||I.call(e)}),D=async E=>await C(()=>f.value.addAssignee(R(E)),()=>{var M,O,$;s.value.push(E);const I=g(E);if(I){const Z=($=(O=(M=e.params)==null?void 0:M.api)==null?void 0:O.getRowNode(String(e.id)))==null?void 0:$.data,Q=(Z==null?void 0:Z.assignees)||[],se=au([...Q,...bu([I])],"id");d==null||d({assignees:se,type:"add"})}},()=>{var I;(I=e.errorCallback)==null||I.call(e)}),R=E=>{const k={workspaceId:String(i.value),userIds:[E],filterParams:n!=null&&n.value?n.value:void 0};return S.value?(k.itemIds=void 0,k.entityId=String(a.value)):k.itemIds=v(),k},T=async E=>await C(()=>f.value.removeAssignee(R(E)),()=>{var O,$,Z;const I=(Z=($=(O=e.params)==null?void 0:O.api)==null?void 0:$.getRowNode(String(e.id)))==null?void 0:Z.data;s.value=s.value.filter(Q=>Q!==E);const M=bu(((I==null?void 0:I.assignees)||[]).filter(Q=>Q.id!==E));d==null||d({assignees:M,type:"remove"})},()=>{var I;(I=e.errorCallback)==null||I.call(e)});return{isSubmitting:r,options:h,unAssignAll:b,replaceAssignees:w,addAssignee:D,removeAssignee:T,handleSelect:E=>{const k=String(E.id);return s.value.includes(k)?T(k):D(k)},openPeopleInsight:E=>{if(!E||!i.value)return;const k=Zs({type:"people_insight",config:{user_id:E,ws_code:i.value,baseDomain:un.getInstance().getItem("BASE_URL")||""}}).url;window.open(k,"_blank")},assigneeList:o,mergedOptions:p,selectedUserIds:s}},$9={placement:"bottom-start",theme:"light",trigger:"click",interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,showArrow:!0,showOnInit:!1,alwaysShow:!1,debug:!1,content:void 0};function H9(e){return e.value?"$el"in e.value?e.value.$el:e.value:null}function Es(e={}){const t=B(!1),n={...$9,...e},s=B(null),o=B(null),r=B(null),i=B(!1);let a=null,l=null;const c=S=>{(S.key==="Escape"||S.key==="Esc")&&p()},u=()=>{a&&l&&(l.removeEventListener("click",a),a=null,l=null),r.value&&(r.value.destroy(),r.value=null,i.value=!1),document.removeEventListener("keydown",c)},d=S=>{const{showOnInit:b,alwaysShow:w,showArrow:D,debug:R,...T}=n;return{...T,content:S,theme:n.theme,trigger:w||n.toggleOnClick?"manual":n.trigger,placement:n.placement||"bottom-start",arrow:!1,offset:n.offset,interactive:n.interactive,appendTo:n.appendTo,animation:"fade",maxWidth:n.maxWidth||350,onShow:F=>{if(e.disabled)return!1;if(i.value=!0,document.addEventListener("keydown",c),e.onShow)return e.onShow(F)},onHide:F=>{if(t.value)return setTimeout(()=>{t.value=!1},200),!1;if(w)return!1;if(i.value=!1,document.removeEventListener("keydown",c),e.onHide)return e.onHide(F)},onClickOutside:n.onClickOutside?n.onClickOutside:(F,x)=>{const P=x.target.closest(".notification-center"),E=x.target.closest("#people-insight-container");if(P||E){t.value=!0;return}if(e.onClickOutside)return e.onClickOutside(F,x);w||F.hide()},popperOptions:n.popperOptions||{modifiers:[{name:"computeStyles",options:{gpuAcceleration:!1}},{name:"preventOverflow",options:{padding:8}}]},hideOnClick:n.hideOnClick!==void 0?n.hideOnClick:!1}},h=()=>{var w;u();const S=H9(s),b=o.value;if(!(!S||!b)){b.style.display==="none"&&(b.style.display="");try{const D=d(b),R=ka(S,D);r.value=Array.isArray(R)?R[0]:R,n.toggleOnClick&&!n.alwaysShow&&(a=()=>g(),l=S,S.addEventListener("click",a)),(n.showOnInit||n.alwaysShow)&&((w=r.value)==null||w.show())}catch(D){console.error("[useTippyComposable] Failed to create Tippy instance:",D)}}},f=S=>{S&&C(S),r.value&&r.value.show()},p=()=>{n.alwaysShow||r.value&&r.value.hide()},g=()=>{i.value?p():f()},v=S=>{r.value&&r.value.setContent(S)},C=S=>{r.value&&r.value.setProps(S)};return et([s,o],h,{flush:"post"}),es(()=>{u()}),{instance:r,isVisible:i,show:f,hide:p,toggle:g,triggerRef:s,popupRef:o,destroyTippy:u,setContent:v,setProps:C}}const NF=(e,t,n)=>{const s=B("Copy"),o=()=>{setTimeout(()=>{s.value="Copy"},5e3)};return{copyToClipboard:async i=>{i.stopPropagation(),i.preventDefault(),i.stopImmediatePropagation();try{return await navigator.clipboard.writeText(e),s.value="Copied",t==null||t(),o(),!0}catch(a){return console.error("Failed to copy text to clipboard:",a),s.value="Copy failed",o(),!1}},tooltip:s}},G9=(e,t,n)=>{const s={truncate:"End date cleared because it was before start. Please pick an end date.",swap:"Dates auto-swapped because start was after end.",...e.messages},o=lo({startDate:null,endDate:null,timezone:e.timezone||"UTC",format:e.format||"",isSelectingStart:!1,isSelectingEnd:!1,rangeFeedback:{status:"idle",action:null,message:""},cacheStartDate:null,cacheEndDate:null,isDirty:!1});eh(()=>{var P;((P=e.value)==null?void 0:P.length)===2&&(o.startDate=e.value[0],o.endDate=e.value[1]),o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate,o.isSelectingStart=!1,o.isSelectingEnd=!1,e.timezone&&(o.timezone=e.timezone)});const r=B(!1),i=B(!1),a=()=>{var $,Z,Q,se,ae,ee,V,W;const P=r.value||((Z=($=o.startDate)==null?void 0:$.getTime)==null?void 0:Z.call($))!==((se=(Q=o.cacheStartDate)==null?void 0:Q.getTime)==null?void 0:se.call(Q)),E=i.value||((ee=(ae=o.endDate)==null?void 0:ae.getTime)==null?void 0:ee.call(ae))!==((W=(V=o.cacheEndDate)==null?void 0:V.getTime)==null?void 0:W.call(V)),k=o.startDate===null,I=o.endDate===null;let M,O;P&&E&&k&&I?(M=!0,O=!0,t("clearAll")):P&&!E?(M=!0,k?t("clearStart"):t("update:start",o.startDate)):E&&!P?(O=!0,I?t("clearDue"):t("update:end",o.endDate)):P&&E&&(M=!0,O=!0,t("update",[o.startDate,o.endDate])),!(!M&&!O)&&(M&&!O?t("confirmed",{start:o.startDate}):!M&&O?t("confirmed",{end:o.endDate}):t("confirmed",{start:o.startDate,end:o.endDate}),o.isDirty=P||E)},l=(P,E)=>{const k=bt.fromObject({year:P.year,month:P.month,day:P.day},{zone:o.timezone});return(E==="start"?k.startOf("day"):k.endOf("day")).toJSDate()},c=()=>{o.rangeFeedback.status="idle",o.rangeFeedback.action=null,o.rangeFeedback.message=""},u=P=>{e.enableRangeFeedback&&(o.rangeFeedback.status="corrected",o.rangeFeedback.action=P,o.rangeFeedback.message=P==="swap"?s.swap:s.truncate)},d=P=>{if(!(!o.startDate||!o.endDate)){if(o.startDate.getTime()<=o.endDate.getTime()){e.enableRangeFeedback&&c();return}if(P==="select-start"){const E={start:o.startDate,end:o.endDate};o.endDate=null,t("range:invalid",E),t("range:corrected",{start:o.startDate,end:o.endDate,action:"truncate"}),o.isSelectingEnd=!0,u("truncate")}else{const E={start:o.startDate,end:o.endDate},k=o.startDate;o.startDate=o.endDate,o.endDate=k,t("range:invalid",E),t("range:corrected",{start:o.startDate,end:o.endDate,action:"swap"}),u("swap")}}},h=B(!1),f=B(!1),p=(P,E=!0)=>{r.value=!0,h.value=!1,!(e.disabled||e.readOnly)&&(o.startDate=l(P,"start"),E?(o.isSelectingStart=!1,o.isSelectingEnd=!0):(o.isSelectingStart=!0,o.isSelectingEnd=!1),d("select-start"))},g=P=>{i.value=!0,f.value=!1,!(e.disabled||e.readOnly)&&(o.endDate=l(P,"end"),d("select-end"))},v=()=>{r.value=!0,!(e.disabled||e.readOnly)&&(o.startDate=null,c())},C=()=>{i.value=!0,!(e.disabled||e.readOnly)&&(o.endDate=null,c())},S=()=>{r.value=!0,i.value=!0,!(e.disabled||e.readOnly)&&(o.startDate=null,o.endDate=null,c(),w())},b=()=>{e.disabled||e.readOnly||o.isDirty||(o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate)},w=()=>{e.disabled||e.readOnly||(a(),o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate,o.isDirty=!1)},D=()=>{e.disabled||e.readOnly||(o.startDate=o.cacheStartDate,o.endDate=o.cacheEndDate,c(),o.isDirty=!1)},R=Y(()=>o.startDate?bt.fromJSDate(o.startDate,{zone:o.timezone}).toFormat(o.format):e.startPlaceholder),T=Y(()=>o.endDate?bt.fromJSDate(o.endDate,{zone:o.timezone}).toFormat(o.format):e.duePlaceholder),F=Y(()=>!o.startDate&&!e.disabled?e.startTooltip:!o.startDate&&(e.disabled||e.readOnly)?e.startPlaceholder:o.startDate?bt.fromJSDate(o.startDate,{zone:o.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):e.startTooltip),x=Y(()=>!o.endDate&&!e.disabled?e.dueTooltip:!o.endDate&&(e.disabled||e.readOnly)?e.startPlaceholder:o.endDate?bt.fromJSDate(o.endDate,{zone:o.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):e.dueTooltip);return{states:o,displayStartDate:R,displayEndDate:T,tooltipStartDate:F,tooltipEndDate:x,showMultipleDueDates:f,showMultipleStartDates:h,selectEndDate:g,selectStartDate:p,clearDue:C,clearStart:v,clearAll:S,beginInteraction:b,confirmSelection:w,cancelSelection:D}},LF="MMM dd",U9=e=>{const t=e.timezone,n=Y(()=>e.start?pm({date:Wh(e.start),timezone:t,format:LF}):"No start"),s=Y(()=>e.end?pm({date:Wh(e.end),timezone:t,format:LF}):"No due"),o=d=>{if(!d)return null;const h=bt.now().setZone(t).startOf("day"),f=bt.fromISO(d).setZone(t).startOf("day");if(!f.isValid)return console.warn("Invalid date:",d,f.invalidReason),null;const p=f.diff(h,"days").days;return p===0?"today":p===1?"tomorrow":p===-1?"yesterday":p<-1?"past":"future"},r=Y(()=>o(e.start)),i=Y(()=>o(e.end)),a=Y(()=>{if(n.value==="No start")return["empty"];const d=[];return r.value&&d.push(`start-${r.value}`),e.isStarted&&d.push("actual"),d}),l=Y(()=>{if(s.value==="No due")return["empty"];const d=[];return i.value&&d.push(`end-${i.value}`),e.isEnded&&d.push("actual"),d}),c=Y(()=>e.start?pm({date:Wh(e.start),timezone:t,format:"MMM dd, yyyy | HH:mm"}):"No start"),u=Y(()=>e.end?pm({date:Wh(e.end),timezone:t,format:"MMM dd, yyyy | HH:mm"}):"No due");return{startDate:n,endDate:s,startClasses:a,endClasses:l,fullStartDate:c,fullEndDate:u}},W9="UserCache",z9="user",j9=()=>{const e=B({}),{getCachedValue:t,setCachedValue:n}=Rh({dbName:W9,storeName:z9}),s=async c=>c?await t(c):null;return{getCachedUser:s,setCachedUser:async c=>{if(!(c!=null&&c.id)){console.warn("Cannot cache user without id:",c);return}await n(c.id,c),e.value[c.id]=!0},getCachedUsers:async c=>{if(!c||c.length===0)return[];const u=c.map(h=>s(h));return(await Promise.all(u)).filter(h=>h!==null)},setCachedUsers:async c=>{if(!c||c.length===0)return;const d=au(c,"id").filter(h=>h.id&&!e.value[h.id]).map(async h=>{await n(h.id,h),e.value[h.id]=!0});await Promise.all(d)},isUserCached:c=>!!e.value[c],clearCacheTracking:()=>{e.value={}}}},K9={placement:"bottom-start",theme:"light",trigger:"manual",interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,showArrow:!0,showOnInit:!1,alwaysShow:!1,debug:!1,content:void 0,useTrigger:!0,showOverlay:!1,overlayOpacity:.5,closeOnOverlayClick:!0,centered:!1};let zh=0,ko=null;function q9(e,t){return ko||(ko=document.createElement("div"),ko.className="popup-overlay",ko.style.cssText=`
|
|
119
119
|
position: fixed;
|
|
120
120
|
top: 0;
|
|
121
121
|
left: 0;
|
|
122
122
|
right: 0;
|
|
123
123
|
bottom: 0;
|
|
124
124
|
background: rgba(0, 0, 0, ${e});
|
|
125
|
-
z-index:
|
|
125
|
+
z-index: ${t};
|
|
126
126
|
opacity: 0;
|
|
127
127
|
transition: opacity 0.3s ease;
|
|
128
128
|
pointer-events: auto;
|
|
129
|
-
`,document.body.appendChild(ko),requestAnimationFrame(()=>{ko&&(ko.style.opacity="1")})),ko}function VF(e,t){zh++;const
|
|
129
|
+
`,document.body.appendChild(ko),requestAnimationFrame(()=>{ko&&(ko.style.opacity="1")})),ko}function VF(e,t,n){zh++;const s=q9(e,t);return n&&s.addEventListener("click",n),()=>{n&&s.removeEventListener("click",n)}}function Sb(e){zh--,e&&e(),zh<=0&&(zh=0,ko&&(ko.style.opacity="0",setTimeout(()=>{ko&&zh===0&&(ko.remove(),ko=null)},300)))}function ym(e){const t=e.value;return t?"$el"in t?t.$el:t:null}function Y9(e={}){const t={...K9,...e},n=B(null),s=B(null),o=B(null),r=B(!1);let i=null;const a=f=>{f.style.cssText=`
|
|
130
130
|
position: fixed;
|
|
131
131
|
top: 50%;
|
|
132
132
|
left: 50%;
|
|
133
133
|
transform: translate(-50%, -50%);
|
|
134
|
-
z-index: 999;
|
|
134
|
+
z-index: ${e.zIndex||999};
|
|
135
135
|
display: block;
|
|
136
|
-
`},l=()=>{const f=ym(n);if(t.centered&&f){if(r.value=!0,a(f),t.showOverlay){const p=()=>{t.closeOnOverlayClick&&c()};i=VF(t.overlayOpacity,p)}}else if(o.value&&(o.value.show(),r.value=!0,t.showOverlay)){const p=()=>{t.closeOnOverlayClick&&c()};i=VF(t.overlayOpacity,p)}},c=()=>{const f=ym(n);t.centered&&f?(r.value=!1,f.style.display="none",t.showOverlay&&(Sb(i||void 0),i=null)):o.value&&(o.value.hide(),r.value=!1,t.showOverlay&&(Sb(i||void 0),i=null))},u=()=>{r.value?c():l()},d=()=>{o.value&&(o.value.destroy(),o.value=null),t.showOverlay&&i&&(Sb(i),i=null)},h=()=>{var g;const f=ym(n);if(!f)return;if(f.style.display="none",t.centered){t.showOnInit&&l();return}const p={content:f,placement:t.placement,theme:t.theme,trigger:t.trigger,interactive:t.interactive,appendTo:t.appendTo,arrow:t.showArrow,allowHTML:!0,hideOnClick:!1,popperOptions:{...t.popperOptions,modifiers:[...((g=t.popperOptions)==null?void 0:g.modifiers)||[],{name:"computeStyles",options:{adaptive:!1}}]},onShow(){r.value=!0,f.style.display="block"},onHide(){r.value=!1}};if(t.useTrigger){const v=ym(s);if(!v)return;o.value=ka(v,p)}else{const v=document.createElement("div");v.style.display="none",document.body.appendChild(v),o.value=ka(v,p)}t.showOnInit&&l()};return sn(()=>{h()}),es(()=>{d()}),et(()=>t.alwaysShow,f=>{f?l():c()},{immediate:!0}),{popupRef:n,triggerRef:s,instance:o,isVisible:r,show:l,hide:c,toggle:u,destroy:d}}var X9=Object.create,BF=Object.defineProperty,Z9=Object.getOwnPropertyDescriptor,Eb=Object.getOwnPropertyNames,J9=Object.getPrototypeOf,Q9=Object.prototype.hasOwnProperty,e7=(e,t)=>function(){return e&&(t=(0,e[Eb(e)[0]])(e=0)),t},t7=(e,t)=>function(){return t||(0,e[Eb(e)[0]])((t={exports:{}}).exports,t),t.exports},n7=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Eb(t))!Q9.call(e,o)&&o!==n&&BF(e,o,{get:()=>t[o],enumerable:!(s=Z9(t,o))||s.enumerable});return e},s7=(e,t,n)=>(n=e!=null?X9(J9(e)):{},n7(BF(n,"default",{value:e,enumerable:!0}),e)),jh=e7({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),o7=t7({"../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(e,t){jh(),t.exports=s;function n(r){return r instanceof Buffer?Buffer.from(r):new r.constructor(r.buffer.slice(),r.byteOffset,r.length)}function s(r){if(r=r||{},r.circles)return o(r);const i=new Map;if(i.set(Date,d=>new Date(d)),i.set(Map,(d,h)=>new Map(l(Array.from(d),h))),i.set(Set,(d,h)=>new Set(l(Array.from(d),h))),r.constructorHandlers)for(const d of r.constructorHandlers)i.set(d[0],d[1]);let a=null;return r.proto?u:c;function l(d,h){const f=Object.keys(d),p=new Array(f.length);for(let g=0;g<f.length;g++){const v=f[g],C=d[v];typeof C!="object"||C===null?p[v]=C:C.constructor!==Object&&(a=i.get(C.constructor))?p[v]=a(C,h):ArrayBuffer.isView(C)?p[v]=n(C):p[v]=h(C)}return p}function c(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return l(d,c);if(d.constructor!==Object&&(a=i.get(d.constructor)))return a(d,c);const h={};for(const f in d){if(Object.hasOwnProperty.call(d,f)===!1)continue;const p=d[f];typeof p!="object"||p===null?h[f]=p:p.constructor!==Object&&(a=i.get(p.constructor))?h[f]=a(p,c):ArrayBuffer.isView(p)?h[f]=n(p):h[f]=c(p)}return h}function u(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return l(d,u);if(d.constructor!==Object&&(a=i.get(d.constructor)))return a(d,u);const h={};for(const f in d){const p=d[f];typeof p!="object"||p===null?h[f]=p:p.constructor!==Object&&(a=i.get(p.constructor))?h[f]=a(p,u):ArrayBuffer.isView(p)?h[f]=n(p):h[f]=u(p)}return h}}function o(r){const i=[],a=[],l=new Map;if(l.set(Date,f=>new Date(f)),l.set(Map,(f,p)=>new Map(u(Array.from(f),p))),l.set(Set,(f,p)=>new Set(u(Array.from(f),p))),r.constructorHandlers)for(const f of r.constructorHandlers)l.set(f[0],f[1]);let c=null;return r.proto?h:d;function u(f,p){const g=Object.keys(f),v=new Array(g.length);for(let C=0;C<g.length;C++){const S=g[C],b=f[S];if(typeof b!="object"||b===null)v[S]=b;else if(b.constructor!==Object&&(c=l.get(b.constructor)))v[S]=c(b,p);else if(ArrayBuffer.isView(b))v[S]=n(b);else{const w=i.indexOf(b);w!==-1?v[S]=a[w]:v[S]=p(b)}}return v}function d(f){if(typeof f!="object"||f===null)return f;if(Array.isArray(f))return u(f,d);if(f.constructor!==Object&&(c=l.get(f.constructor)))return c(f,d);const p={};i.push(f),a.push(p);for(const g in f){if(Object.hasOwnProperty.call(f,g)===!1)continue;const v=f[g];if(typeof v!="object"||v===null)p[g]=v;else if(v.constructor!==Object&&(c=l.get(v.constructor)))p[g]=c(v,d);else if(ArrayBuffer.isView(v))p[g]=n(v);else{const C=i.indexOf(v);C!==-1?p[g]=a[C]:p[g]=d(v)}}return i.pop(),a.pop(),p}function h(f){if(typeof f!="object"||f===null)return f;if(Array.isArray(f))return u(f,h);if(f.constructor!==Object&&(c=l.get(f.constructor)))return c(f,h);const p={};i.push(f),a.push(p);for(const g in f){const v=f[g];if(typeof v!="object"||v===null)p[g]=v;else if(v.constructor!==Object&&(c=l.get(v.constructor)))p[g]=c(v,h);else if(ArrayBuffer.isView(v))p[g]=n(v);else{const C=i.indexOf(v);C!==-1?p[g]=a[C]:p[g]=h(v)}}return i.pop(),a.pop(),p}}}});jh(),jh(),jh();var $F=typeof navigator<"u",Dt=typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof global<"u"?global:{};typeof Dt.chrome<"u"&&Dt.chrome.devtools,$F&&(Dt.self,Dt.top);var HF;typeof navigator<"u"&&((HF=navigator.userAgent)==null||HF.toLowerCase().includes("electron")),jh();var r7=s7(o7()),i7=/(?:^|[-_/])(\w)/g;function a7(e,t){return t?t.toUpperCase():""}function l7(e){return e&&`${e}`.replace(i7,a7)}function c7(e,t){let n=e.replace(/^[a-z]:/i,"").replace(/\\/g,"/");n.endsWith(`index${t}`)&&(n=n.replace(`/index${t}`,t));const s=n.lastIndexOf("/"),o=n.substring(s+1);{const r=o.lastIndexOf(t);return o.substring(0,r)}}var GF=(0,r7.default)({circles:!0});const u7={trailing:!0};function Su(e,t=25,n={}){if(n={...u7,...n},!Number.isFinite(t))throw new TypeError("Expected `wait` to be a finite number");let s,o,r=[],i,a;const l=(c,u)=>(i=d7(e,c,u),i.finally(()=>{if(i=null,n.trailing&&a&&!o){const d=l(c,a);return a=null,d}}),i);return function(...c){return i?(n.trailing&&(a=c),i):new Promise(u=>{const d=!o&&n.leading;clearTimeout(o),o=setTimeout(()=>{o=null;const h=n.leading?s:l(this,c);for(const f of r)f(h);r=[]},t),d?(s=l(this,c),u(s)):r.push(u)})}}async function d7(e,t,n){return await e.apply(t,n)}function _b(e,t={},n){for(const s in e){const o=e[s],r=n?`${n}:${s}`:s;typeof o=="object"&&o!==null?_b(o,t,r):typeof o=="function"&&(t[r]=o)}return t}const h7={run:e=>e()},f7=()=>h7,UF=typeof console.createTask<"u"?console.createTask:f7;function p7(e,t){const n=t.shift(),s=UF(n);return e.reduce((o,r)=>o.then(()=>s.run(()=>r(...t))),Promise.resolve())}function g7(e,t){const n=t.shift(),s=UF(n);return Promise.all(e.map(o=>s.run(()=>o(...t))))}function Rb(e,t){for(const n of[...e])n(t)}class m7{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,n,s={}){if(!t||typeof n!="function")return()=>{};const o=t;let r;for(;this._deprecatedHooks[t];)r=this._deprecatedHooks[t],t=r.to;if(r&&!s.allowDeprecated){let i=r.message;i||(i=`${o} hook has been deprecated`+(r.to?`, please use ${r.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(i)||(console.warn(i),this._deprecatedMessages.add(i))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(n),()=>{n&&(this.removeHook(t,n),n=void 0)}}hookOnce(t,n){let s,o=(...r)=>(typeof s=="function"&&s(),s=void 0,o=void 0,n(...r));return s=this.hook(t,o),s}removeHook(t,n){if(this._hooks[t]){const s=this._hooks[t].indexOf(n);s!==-1&&this._hooks[t].splice(s,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,n){this._deprecatedHooks[t]=typeof n=="string"?{to:n}:n;const s=this._hooks[t]||[];delete this._hooks[t];for(const o of s)this.hook(t,o)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const n in t)this.deprecateHook(n,t[n])}addHooks(t){const n=_b(t),s=Object.keys(n).map(o=>this.hook(o,n[o]));return()=>{for(const o of s.splice(0,s.length))o()}}removeHooks(t){const n=_b(t);for(const s in n)this.removeHook(s,n[s])}removeAllHooks(){for(const t in this._hooks)delete this._hooks[t]}callHook(t,...n){return n.unshift(t),this.callHookWith(p7,t,...n)}callHookParallel(t,...n){return n.unshift(t),this.callHookWith(g7,t,...n)}callHookWith(t,n,...s){const o=this._before||this._after?{name:n,args:s,context:{}}:void 0;this._before&&Rb(this._before,o);const r=t(n in this._hooks?[...this._hooks[n]]:[],s);return r instanceof Promise?r.finally(()=>{this._after&&o&&Rb(this._after,o)}):(this._after&&o&&Rb(this._after,o),r)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const n=this._before.indexOf(t);n!==-1&&this._before.splice(n,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const n=this._after.indexOf(t);n!==-1&&this._after.splice(n,1)}}}}function WF(){return new m7}var v7=Object.create,zF=Object.defineProperty,y7=Object.getOwnPropertyDescriptor,Db=Object.getOwnPropertyNames,w7=Object.getPrototypeOf,C7=Object.prototype.hasOwnProperty,b7=(e,t)=>function(){return e&&(t=(0,e[Db(e)[0]])(e=0)),t},jF=(e,t)=>function(){return t||(0,e[Db(e)[0]])((t={exports:{}}).exports,t),t.exports},S7=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Db(t))!C7.call(e,o)&&o!==n&&zF(e,o,{get:()=>t[o],enumerable:!(s=y7(t,o))||s.enumerable});return e},E7=(e,t,n)=>(n=e!=null?v7(w7(e)):{},S7(zF(n,"default",{value:e,enumerable:!0}),e)),Qe=b7({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),_7=jF({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js"(e,t){Qe(),function(n){var s={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"Ae",Å:"A",Æ:"AE",Ç:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"Oe",Ő:"O",Ø:"O",Ù:"U",Ú:"U",Û:"U",Ü:"Ue",Ű:"U",Ý:"Y",Þ:"TH",ß:"ss",à:"a",á:"a",â:"a",ã:"a",ä:"ae",å:"a",æ:"ae",ç:"c",è:"e",é:"e",ê:"e",ë:"e",ì:"i",í:"i",î:"i",ï:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"oe",ő:"o",ø:"o",ù:"u",ú:"u",û:"u",ü:"ue",ű:"u",ý:"y",þ:"th",ÿ:"y","ẞ":"SS",ا:"a",أ:"a",إ:"i",آ:"aa",ؤ:"u",ئ:"e",ء:"a",ب:"b",ت:"t",ث:"th",ج:"j",ح:"h",خ:"kh",د:"d",ذ:"th",ر:"r",ز:"z",س:"s",ش:"sh",ص:"s",ض:"dh",ط:"t",ظ:"z",ع:"a",غ:"gh",ف:"f",ق:"q",ك:"k",ل:"l",م:"m",ن:"n",ه:"h",و:"w",ي:"y",ى:"a",ة:"h",ﻻ:"la",ﻷ:"laa",ﻹ:"lai",ﻵ:"laa",گ:"g",چ:"ch",پ:"p",ژ:"zh",ک:"k",ی:"y","َ":"a","ً":"an","ِ":"e","ٍ":"en","ُ":"u","ٌ":"on","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9",က:"k",ခ:"kh",ဂ:"g",ဃ:"ga",င:"ng",စ:"s",ဆ:"sa",ဇ:"z","စျ":"za",ည:"ny",ဋ:"t",ဌ:"ta",ဍ:"d",ဎ:"da",ဏ:"na",တ:"t",ထ:"ta",ဒ:"d",ဓ:"da",န:"n",ပ:"p",ဖ:"pa",ဗ:"b",ဘ:"ba",မ:"m",ယ:"y",ရ:"ya",လ:"l",ဝ:"w",သ:"th",ဟ:"h",ဠ:"la",အ:"a","ြ":"y","ျ":"ya","ွ":"w","ြွ":"yw","ျွ":"ywa","ှ":"h",ဧ:"e","၏":"-e",ဣ:"i",ဤ:"-i",ဉ:"u",ဦ:"-u",ဩ:"aw","သြော":"aw",ဪ:"aw","၀":"0","၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","္":"","့":"","း":"",č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z",ހ:"h",ށ:"sh",ނ:"n",ރ:"r",ބ:"b",ޅ:"lh",ކ:"k",އ:"a",ވ:"v",މ:"m",ފ:"f",ދ:"dh",ތ:"th",ލ:"l",ގ:"g",ޏ:"gn",ސ:"s",ޑ:"d",ޒ:"z",ޓ:"t",ޔ:"y",ޕ:"p",ޖ:"j",ޗ:"ch",ޘ:"tt",ޙ:"hh",ޚ:"kh",ޛ:"th",ޜ:"z",ޝ:"sh",ޞ:"s",ޟ:"d",ޠ:"t",ޡ:"z",ޢ:"a",ޣ:"gh",ޤ:"q",ޥ:"w","ަ":"a","ާ":"aa","ި":"i","ީ":"ee","ު":"u","ޫ":"oo","ެ":"e","ޭ":"ey","ޮ":"o","ޯ":"oa","ް":"",ა:"a",ბ:"b",გ:"g",დ:"d",ე:"e",ვ:"v",ზ:"z",თ:"t",ი:"i",კ:"k",ლ:"l",მ:"m",ნ:"n",ო:"o",პ:"p",ჟ:"zh",რ:"r",ს:"s",ტ:"t",უ:"u",ფ:"p",ქ:"k",ღ:"gh",ყ:"q",შ:"sh",ჩ:"ch",ც:"ts",ძ:"dz",წ:"ts",ჭ:"ch",ხ:"kh",ჯ:"j",ჰ:"h",α:"a",β:"v",γ:"g",δ:"d",ε:"e",ζ:"z",η:"i",θ:"th",ι:"i",κ:"k",λ:"l",μ:"m",ν:"n",ξ:"ks",ο:"o",π:"p",ρ:"r",σ:"s",τ:"t",υ:"y",φ:"f",χ:"x",ψ:"ps",ω:"o",ά:"a",έ:"e",ί:"i",ό:"o",ύ:"y",ή:"i",ώ:"o",ς:"s",ϊ:"i",ΰ:"y",ϋ:"y",ΐ:"i",Α:"A",Β:"B",Γ:"G",Δ:"D",Ε:"E",Ζ:"Z",Η:"I",Θ:"TH",Ι:"I",Κ:"K",Λ:"L",Μ:"M",Ν:"N",Ξ:"KS",Ο:"O",Π:"P",Ρ:"R",Σ:"S",Τ:"T",Υ:"Y",Φ:"F",Χ:"X",Ψ:"PS",Ω:"O",Ά:"A",Έ:"E",Ί:"I",Ό:"O",Ύ:"Y",Ή:"I",Ώ:"O",Ϊ:"I",Ϋ:"Y",ā:"a",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",ū:"u",Ā:"A",Ē:"E",Ģ:"G",Ī:"I",Ķ:"k",Ļ:"L",Ņ:"N",Ū:"U",Ќ:"Kj",ќ:"kj",Љ:"Lj",љ:"lj",Њ:"Nj",њ:"nj",Тс:"Ts",тс:"ts",ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"E",Ł:"L",Ń:"N",Ś:"S",Ź:"Z",Ż:"Z",Є:"Ye",І:"I",Ї:"Yi",Ґ:"G",є:"ye",і:"i",ї:"yi",ґ:"g",ă:"a",Ă:"A",ș:"s",Ș:"S",ț:"t",Ț:"T",ţ:"t",Ţ:"T",а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"c",ч:"ch",ш:"sh",щ:"sh",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"Yo",Ж:"Zh",З:"Z",И:"I",Й:"I",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"Kh",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sh",Ъ:"",Ы:"Y",Ь:"",Э:"E",Ю:"Yu",Я:"Ya",ђ:"dj",ј:"j",ћ:"c",џ:"dz",Ђ:"Dj",Ј:"j",Ћ:"C",Џ:"Dz",ľ:"l",ĺ:"l",ŕ:"r",Ľ:"L",Ĺ:"L",Ŕ:"R",ş:"s",Ş:"S",ı:"i",İ:"I",ğ:"g",Ğ:"G",ả:"a",Ả:"A",ẳ:"a",Ẳ:"A",ẩ:"a",Ẩ:"A",đ:"d",Đ:"D",ẹ:"e",Ẹ:"E",ẽ:"e",Ẽ:"E",ẻ:"e",Ẻ:"E",ế:"e",Ế:"E",ề:"e",Ề:"E",ệ:"e",Ệ:"E",ễ:"e",Ễ:"E",ể:"e",Ể:"E",ỏ:"o",ọ:"o",Ọ:"o",ố:"o",Ố:"O",ồ:"o",Ồ:"O",ổ:"o",Ổ:"O",ộ:"o",Ộ:"O",ỗ:"o",Ỗ:"O",ơ:"o",Ơ:"O",ớ:"o",Ớ:"O",ờ:"o",Ờ:"O",ợ:"o",Ợ:"O",ỡ:"o",Ỡ:"O",Ở:"o",ở:"o",ị:"i",Ị:"I",ĩ:"i",Ĩ:"I",ỉ:"i",Ỉ:"i",ủ:"u",Ủ:"U",ụ:"u",Ụ:"U",ũ:"u",Ũ:"U",ư:"u",Ư:"U",ứ:"u",Ứ:"U",ừ:"u",Ừ:"U",ự:"u",Ự:"U",ữ:"u",Ữ:"U",ử:"u",Ử:"ư",ỷ:"y",Ỷ:"y",ỳ:"y",Ỳ:"Y",ỵ:"y",Ỵ:"Y",ỹ:"y",Ỹ:"Y",ạ:"a",Ạ:"A",ấ:"a",Ấ:"A",ầ:"a",Ầ:"A",ậ:"a",Ậ:"A",ẫ:"a",Ẫ:"A",ắ:"a",Ắ:"A",ằ:"a",Ằ:"A",ặ:"a",Ặ:"A",ẵ:"a",Ẵ:"A","⓪":"0","①":"1","②":"2","③":"3","④":"4","⑤":"5","⑥":"6","⑦":"7","⑧":"8","⑨":"9","⑩":"10","⑪":"11","⑫":"12","⑬":"13","⑭":"14","⑮":"15","⑯":"16","⑰":"17","⑱":"18","⑲":"18","⑳":"18","⓵":"1","⓶":"2","⓷":"3","⓸":"4","⓹":"5","⓺":"6","⓻":"7","⓼":"8","⓽":"9","⓾":"10","⓿":"0","⓫":"11","⓬":"12","⓭":"13","⓮":"14","⓯":"15","⓰":"16","⓱":"17","⓲":"18","⓳":"19","⓴":"20","Ⓐ":"A","Ⓑ":"B","Ⓒ":"C","Ⓓ":"D","Ⓔ":"E","Ⓕ":"F","Ⓖ":"G","Ⓗ":"H","Ⓘ":"I","Ⓙ":"J","Ⓚ":"K","Ⓛ":"L","Ⓜ":"M","Ⓝ":"N","Ⓞ":"O","Ⓟ":"P","Ⓠ":"Q","Ⓡ":"R","Ⓢ":"S","Ⓣ":"T","Ⓤ":"U","Ⓥ":"V","Ⓦ":"W","Ⓧ":"X","Ⓨ":"Y","Ⓩ":"Z","ⓐ":"a","ⓑ":"b","ⓒ":"c","ⓓ":"d","ⓔ":"e","ⓕ":"f","ⓖ":"g","ⓗ":"h","ⓘ":"i","ⓙ":"j","ⓚ":"k","ⓛ":"l","ⓜ":"m","ⓝ":"n","ⓞ":"o","ⓟ":"p","ⓠ":"q","ⓡ":"r","ⓢ":"s","ⓣ":"t","ⓤ":"u","ⓦ":"v","ⓥ":"w","ⓧ":"x","ⓨ":"y","ⓩ":"z","“":'"',"”":'"',"‘":"'","’":"'","∂":"d",ƒ:"f","™":"(TM)","©":"(C)",œ:"oe",Œ:"OE","®":"(R)","†":"+","℠":"(SM)","…":"...","˚":"o",º:"o",ª:"a","•":"*","၊":",","။":".",$:"USD","€":"EUR","₢":"BRN","₣":"FRF","£":"GBP","₤":"ITL","₦":"NGN","₧":"ESP","₩":"KRW","₪":"ILS","₫":"VND","₭":"LAK","₮":"MNT","₯":"GRD","₱":"ARS","₲":"PYG","₳":"ARA","₴":"UAH","₵":"GHS","¢":"cent","¥":"CNY",元:"CNY",円:"YEN","﷼":"IRR","₠":"EWE","฿":"THB","₨":"INR","₹":"INR","₰":"PF","₺":"TRY","؋":"AFN","₼":"AZN",лв:"BGN","៛":"KHR","₡":"CRC","₸":"KZT",ден:"MKD",zł:"PLN","₽":"RUB","₾":"GEL"},o=["်","ް"],r={"ာ":"a","ါ":"a","ေ":"e","ဲ":"e","ိ":"i","ီ":"i","ို":"o","ု":"u","ူ":"u","ေါင်":"aung","ော":"aw","ော်":"aw","ေါ":"aw","ေါ်":"aw","်":"်","က်":"et","ိုက်":"aik","ောက်":"auk","င်":"in","ိုင်":"aing","ောင်":"aung","စ်":"it","ည်":"i","တ်":"at","ိတ်":"eik","ုတ်":"ok","ွတ်":"ut","ေတ်":"it","ဒ်":"d","ိုဒ်":"ok","ုဒ်":"ait","န်":"an","ာန်":"an","ိန်":"ein","ုန်":"on","ွန်":"un","ပ်":"at","ိပ်":"eik","ုပ်":"ok","ွပ်":"ut","န်ုပ်":"nub","မ်":"an","ိမ်":"ein","ုမ်":"on","ွမ်":"un","ယ်":"e","ိုလ်":"ol","ဉ်":"in","ံ":"an","ိံ":"ein","ုံ":"on","ައް":"ah","ަށް":"ah"},i={en:{},az:{ç:"c",ə:"e",ğ:"g",ı:"i",ö:"o",ş:"s",ü:"u",Ç:"C",Ə:"E",Ğ:"G",İ:"I",Ö:"O",Ş:"S",Ü:"U"},cs:{č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z"},fi:{ä:"a",Ä:"A",ö:"o",Ö:"O"},hu:{ä:"a",Ä:"A",ö:"o",Ö:"O",ü:"u",Ü:"U",ű:"u",Ű:"U"},lt:{ą:"a",č:"c",ę:"e",ė:"e",į:"i",š:"s",ų:"u",ū:"u",ž:"z",Ą:"A",Č:"C",Ę:"E",Ė:"E",Į:"I",Š:"S",Ų:"U",Ū:"U"},lv:{ā:"a",č:"c",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",š:"s",ū:"u",ž:"z",Ā:"A",Č:"C",Ē:"E",Ģ:"G",Ī:"i",Ķ:"k",Ļ:"L",Ņ:"N",Š:"S",Ū:"u",Ž:"Z"},pl:{ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ó:"o",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"e",Ł:"L",Ń:"N",Ó:"O",Ś:"S",Ź:"Z",Ż:"Z"},sv:{ä:"a",Ä:"A",ö:"o",Ö:"O"},sk:{ä:"a",Ä:"A"},sr:{љ:"lj",њ:"nj",Љ:"Lj",Њ:"Nj",đ:"dj",Đ:"Dj"},tr:{Ü:"U",Ö:"O",ü:"u",ö:"o"}},a={ar:{"∆":"delta","∞":"la-nihaya","♥":"hob","&":"wa","|":"aw","<":"aqal-men",">":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},ge:{"∆":"delta","∞":"usasruloba","♥":"siqvaruli","&":"da","|":"an","<":"naklebi",">":"meti","∑":"jami","¤":"valuta"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}},l=[";","?",":","@","&","=","+","$",",","/"].join(""),c=[";","?",":","@","&","=","+","$",","].join(""),u=[".","!","~","*","'","(",")"].join(""),d=function(v,C){var S="-",b="",w="",D=!0,R={},T,F,x,P,E,k,I,M,O,$,Z,Q,se,ae,ee="";if(typeof v!="string")return"";if(typeof C=="string"&&(S=C),I=a.en,M=i.en,typeof C=="object"){T=C.maintainCase||!1,R=C.custom&&typeof C.custom=="object"?C.custom:R,x=+C.truncate>1&&C.truncate||!1,P=C.uric||!1,E=C.uricNoSlash||!1,k=C.mark||!1,D=!(C.symbols===!1||C.lang===!1),S=C.separator||S,P&&(ee+=l),E&&(ee+=c),k&&(ee+=u),I=C.lang&&a[C.lang]&&D?a[C.lang]:D?a.en:{},M=C.lang&&i[C.lang]?i[C.lang]:C.lang===!1||C.lang===!0?{}:i.en,C.titleCase&&typeof C.titleCase.length=="number"&&Array.prototype.toString.call(C.titleCase)?(C.titleCase.forEach(function(V){R[V+""]=V+""}),F=!0):F=!!C.titleCase,C.custom&&typeof C.custom.length=="number"&&Array.prototype.toString.call(C.custom)&&C.custom.forEach(function(V){R[V+""]=V+""}),Object.keys(R).forEach(function(V){var W;V.length>1?W=new RegExp("\\b"+f(V)+"\\b","gi"):W=new RegExp(f(V),"gi"),v=v.replace(W,R[V])});for(Z in R)ee+=Z}for(ee+=S,ee=f(ee),v=v.replace(/(^\s+|\s+$)/g,""),se=!1,ae=!1,$=0,Q=v.length;$<Q;$++)Z=v[$],p(Z,R)?se=!1:M[Z]?(Z=se&&M[Z].match(/[A-Za-z0-9]/)?" "+M[Z]:M[Z],se=!1):Z in s?($+1<Q&&o.indexOf(v[$+1])>=0?(w+=Z,Z=""):ae===!0?(Z=r[w]+s[Z],w=""):Z=se&&s[Z].match(/[A-Za-z0-9]/)?" "+s[Z]:s[Z],se=!1,ae=!1):Z in r?(w+=Z,Z="",$===Q-1&&(Z=r[w]),ae=!0):I[Z]&&!(P&&l.indexOf(Z)!==-1)&&!(E&&c.indexOf(Z)!==-1)?(Z=se||b.substr(-1).match(/[A-Za-z0-9]/)?S+I[Z]:I[Z],Z+=v[$+1]!==void 0&&v[$+1].match(/[A-Za-z0-9]/)?S:"",se=!0):(ae===!0?(Z=r[w]+Z,w="",ae=!1):se&&(/[A-Za-z0-9]/.test(Z)||b.substr(-1).match(/A-Za-z0-9]/))&&(Z=" "+Z),se=!1),b+=Z.replace(new RegExp("[^\\w\\s"+ee+"_-]","g"),S);return F&&(b=b.replace(/(\w)(\S*)/g,function(V,W,te){var pe=W.toUpperCase()+(te!==null?te:"");return Object.keys(R).indexOf(pe.toLowerCase())<0?pe:pe.toLowerCase()})),b=b.replace(/\s+/g,S).replace(new RegExp("\\"+S+"+","g"),S).replace(new RegExp("(^\\"+S+"+|\\"+S+"+$)","g"),""),x&&b.length>x&&(O=b.charAt(x)===S,b=b.slice(0,x),O||(b=b.slice(0,b.lastIndexOf(S)))),!T&&!F&&(b=b.toLowerCase()),b},h=function(v){return function(S){return d(S,v)}},f=function(v){return v.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},p=function(g,v){for(var C in v)if(v[C]===g)return!0};if(typeof t<"u"&&t.exports)t.exports=d,t.exports.createSlug=h;else if(typeof define<"u"&&define.amd)define([],function(){return d});else try{if(n.getSlug||n.createSlug)throw"speakingurl: globals exists /(getSlug|createSlug)/";n.getSlug=d,n.createSlug=h}catch{}}(e)}}),R7=jF({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js"(e,t){Qe(),t.exports=_7()}});Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe();function D7(e){var t;const n=e.name||e._componentTag||e.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__||e.__name;return n==="index"&&((t=e.__file)!=null&&t.endsWith("index.vue"))?"":n}function T7(e){const t=e.__file;if(t)return l7(c7(t,".vue"))}function KF(e,t){return e.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__=t,t}function Tb(e){if(e.__VUE_DEVTOOLS_NEXT_APP_RECORD__)return e.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(e.root)return e.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__}function qF(e){var t,n;const s=(t=e.subTree)==null?void 0:t.type,o=Tb(e);return o?((n=o==null?void 0:o.types)==null?void 0:n.Fragment)===s:!1}function wm(e){var t,n,s;const o=D7((e==null?void 0:e.type)||{});if(o)return o;if((e==null?void 0:e.root)===e)return"Root";for(const i in(n=(t=e.parent)==null?void 0:t.type)==null?void 0:n.components)if(e.parent.type.components[i]===(e==null?void 0:e.type))return KF(e,i);for(const i in(s=e.appContext)==null?void 0:s.components)if(e.appContext.components[i]===(e==null?void 0:e.type))return KF(e,i);const r=T7((e==null?void 0:e.type)||{});return r||"Anonymous Component"}function I7(e){var t,n,s;const o=(s=(n=(t=e==null?void 0:e.appContext)==null?void 0:t.app)==null?void 0:n.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__)!=null?s:0,r=e===(e==null?void 0:e.root)?"root":e.uid;return`${o}:${r}`}function Ib(e,t){return t=t||`${e.id}:root`,e.instanceMap.get(t)||e.instanceMap.get(":root")}function x7(){const e={top:0,bottom:0,left:0,right:0,get width(){return e.right-e.left},get height(){return e.bottom-e.top}};return e}var Cm;function F7(e){return Cm||(Cm=document.createRange()),Cm.selectNode(e),Cm.getBoundingClientRect()}function P7(e){const t=x7();if(!e.children)return t;for(let n=0,s=e.children.length;n<s;n++){const o=e.children[n];let r;if(o.component)r=ql(o.component);else if(o.el){const i=o.el;i.nodeType===1||i.getBoundingClientRect?r=i.getBoundingClientRect():i.nodeType===3&&i.data.trim()&&(r=F7(i))}r&&A7(t,r)}return t}function A7(e,t){return(!e.top||t.top<e.top)&&(e.top=t.top),(!e.bottom||t.bottom>e.bottom)&&(e.bottom=t.bottom),(!e.left||t.left<e.left)&&(e.left=t.left),(!e.right||t.right>e.right)&&(e.right=t.right),e}var YF={top:0,left:0,right:0,bottom:0,width:0,height:0};function ql(e){const t=e.subTree.el;return typeof window>"u"?YF:qF(e)?P7(e.subTree):(t==null?void 0:t.nodeType)===1?t==null?void 0:t.getBoundingClientRect():e.subTree.component?ql(e.subTree.component):YF}Qe();function xb(e){return qF(e)?k7(e.subTree):e.subTree?[e.subTree.el]:[]}function k7(e){if(!e.children)return[];const t=[];return e.children.forEach(n=>{n.component?t.push(...xb(n.component)):n!=null&&n.el&&t.push(n.el)}),t}var XF="__vue-devtools-component-inspector__",ZF="__vue-devtools-component-inspector__card__",JF="__vue-devtools-component-inspector__name__",QF="__vue-devtools-component-inspector__indicator__",eP={display:"block",zIndex:2147483640,position:"fixed",backgroundColor:"#42b88325",border:"1px solid #42b88350",borderRadius:"5px",transition:"all 0.1s ease-in",pointerEvents:"none"},O7={fontFamily:"Arial, Helvetica, sans-serif",padding:"5px 8px",borderRadius:"4px",textAlign:"left",position:"absolute",left:0,color:"#e9e9e9",fontSize:"14px",fontWeight:600,lineHeight:"24px",backgroundColor:"#42b883",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"},M7={display:"inline-block",fontWeight:400,fontStyle:"normal",fontSize:"12px",opacity:.7};function Eu(){return document.getElementById(XF)}function N7(){return document.getElementById(ZF)}function L7(){return document.getElementById(QF)}function V7(){return document.getElementById(JF)}function Fb(e){return{left:`${Math.round(e.left*100)/100}px`,top:`${Math.round(e.top*100)/100}px`,width:`${Math.round(e.width*100)/100}px`,height:`${Math.round(e.height*100)/100}px`}}function Pb(e){var t;const n=document.createElement("div");n.id=(t=e.elementId)!=null?t:XF,Object.assign(n.style,{...eP,...Fb(e.bounds),...e.style});const s=document.createElement("span");s.id=ZF,Object.assign(s.style,{...O7,top:e.bounds.top<35?0:"-35px"});const o=document.createElement("span");o.id=JF,o.innerHTML=`<${e.name}> `;const r=document.createElement("i");return r.id=QF,r.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`,Object.assign(r.style,M7),s.appendChild(o),s.appendChild(r),n.appendChild(s),document.body.appendChild(n),n}function Ab(e){const t=Eu(),n=N7(),s=V7(),o=L7();t&&(Object.assign(t.style,{...eP,...Fb(e.bounds)}),Object.assign(n.style,{top:e.bounds.top<35?0:"-35px"}),s.innerHTML=`<${e.name}> `,o.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`)}function B7(e){const t=ql(e);if(!t.width&&!t.height)return;const n=wm(e);Eu()?Ab({bounds:t,name:n}):Pb({bounds:t,name:n})}function tP(){const e=Eu();e&&(e.style.display="none")}var kb=null;function Ob(e){const t=e.target;if(t){const n=t.__vueParentComponent;if(n&&(kb=n,n.vnode.el)){const o=ql(n),r=wm(n);Eu()?Ab({bounds:o,name:r}):Pb({bounds:o,name:r})}}}function $7(e,t){if(e.preventDefault(),e.stopPropagation(),kb){const n=I7(kb);t(n)}}var bm=null;function H7(){tP(),window.removeEventListener("mouseover",Ob),window.removeEventListener("click",bm,!0),bm=null}function G7(){return window.addEventListener("mouseover",Ob),new Promise(e=>{function t(n){n.preventDefault(),n.stopPropagation(),$7(n,s=>{window.removeEventListener("click",t,!0),bm=null,window.removeEventListener("mouseover",Ob);const o=Eu();o&&(o.style.display="none"),e(JSON.stringify({id:s}))})}bm=t,window.addEventListener("click",t,!0)})}function U7(e){const t=Ib(Js.value,e.id);if(t){const[n]=xb(t);if(typeof n.scrollIntoView=="function")n.scrollIntoView({behavior:"smooth"});else{const s=ql(t),o=document.createElement("div"),r={...Fb(s),position:"absolute"};Object.assign(o.style,r),document.body.appendChild(o),o.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{document.body.removeChild(o)},2e3)}setTimeout(()=>{const s=ql(t);if(s.width||s.height){const o=wm(t),r=Eu();r?Ab({...e,name:o,bounds:s}):Pb({...e,name:o,bounds:s}),setTimeout(()=>{r&&(r.style.display="none")},1500)}},1200)}}Qe();var nP,sP;(sP=(nP=Dt).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__)!=null||(nP.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__=!0);function W7(e){let t=0;const n=setInterval(()=>{Dt.__VUE_INSPECTOR__&&(clearInterval(n),t+=30,e()),t>=5e3&&clearInterval(n)},30)}function z7(){const e=Dt.__VUE_INSPECTOR__,t=e.openInEditor;e.openInEditor=async(...n)=>{e.disable(),t(...n)}}function j7(){return new Promise(e=>{function t(){z7(),e(Dt.__VUE_INSPECTOR__)}Dt.__VUE_INSPECTOR__?t():W7(()=>{t()})})}Qe(),Qe();function K7(e){return!!(e&&e.__v_isReadonly)}function oP(e){return K7(e)?oP(e.__v_raw):!!(e&&e.__v_isReactive)}function Mb(e){return!!(e&&e.__v_isRef===!0)}function Kh(e){const t=e&&e.__v_raw;return t?Kh(t):e}var q7=class{constructor(){this.refEditor=new Y7}set(e,t,n,s){const o=Array.isArray(t)?t:t.split(".");for(;o.length>1;){const a=o.shift();e instanceof Map?e=e.get(a):e instanceof Set?e=Array.from(e.values())[a]:e=e[a],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}const r=o[0],i=this.refEditor.get(e)[r];s?s(e,r,n):this.refEditor.isRef(i)?this.refEditor.set(i,n):e[r]=n}get(e,t){const n=Array.isArray(t)?t:t.split(".");for(let s=0;s<n.length;s++)if(e instanceof Map?e=e.get(n[s]):e=e[n[s]],this.refEditor.isRef(e)&&(e=this.refEditor.get(e)),!e)return;return e}has(e,t,n=!1){if(typeof e>"u")return!1;const s=Array.isArray(t)?t.slice():t.split("."),o=n?2:1;for(;e&&s.length>o;){const r=s.shift();e=e[r],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}return e!=null&&Object.prototype.hasOwnProperty.call(e,s[0])}createDefaultSetCallback(e){return(t,n,s)=>{if((e.remove||e.newKey)&&(Array.isArray(t)?t.splice(n,1):Kh(t)instanceof Map?t.delete(n):Kh(t)instanceof Set?t.delete(Array.from(t.values())[n]):Reflect.deleteProperty(t,n)),!e.remove){const o=t[e.newKey||n];this.refEditor.isRef(o)?this.refEditor.set(o,s):Kh(t)instanceof Map?t.set(e.newKey||n,s):Kh(t)instanceof Set?t.add(s):t[e.newKey||n]=s}}}},Y7=class{set(e,t){if(Mb(e))e.value=t;else{if(e instanceof Set&&Array.isArray(t)){e.clear(),t.forEach(o=>e.add(o));return}const n=Object.keys(t);if(e instanceof Map){const o=new Set(e.keys());n.forEach(r=>{e.set(r,Reflect.get(t,r)),o.delete(r)}),o.forEach(r=>e.delete(r));return}const s=new Set(Object.keys(e));n.forEach(o=>{Reflect.set(e,o,Reflect.get(t,o)),s.delete(o)}),s.forEach(o=>Reflect.deleteProperty(e,o))}}get(e){return Mb(e)?e.value:e}isRef(e){return Mb(e)||oP(e)}};Qe(),Qe(),Qe();var X7="__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";function Z7(){if(typeof window>"u"||!$F||typeof localStorage>"u"||localStorage===null)return{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""};const e=typeof localStorage.getItem<"u"?localStorage.getItem(X7):null;return e?JSON.parse(e):{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""}}Qe(),Qe(),Qe();var rP,iP;(iP=(rP=Dt).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS)!=null||(rP.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS=[]);var J7=new Proxy(Dt.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS,{get(e,t,n){return Reflect.get(e,t,n)}});function Q7(e,t){vs.timelineLayersState[t.id]=!1,J7.push({...e,descriptorId:t.id,appRecord:Tb(t.app)})}var aP,lP;(lP=(aP=Dt).__VUE_DEVTOOLS_KIT_INSPECTOR__)!=null||(aP.__VUE_DEVTOOLS_KIT_INSPECTOR__=[]);var Nb=new Proxy(Dt.__VUE_DEVTOOLS_KIT_INSPECTOR__,{get(e,t,n){return Reflect.get(e,t,n)}}),cP=Su(()=>{Ru.hooks.callHook("sendInspectorToClient",uP())});function eq(e,t){var n,s;Nb.push({options:e,descriptor:t,treeFilterPlaceholder:(n=e.treeFilterPlaceholder)!=null?n:"Search tree...",stateFilterPlaceholder:(s=e.stateFilterPlaceholder)!=null?s:"Search state...",treeFilter:"",selectedNodeId:"",appRecord:Tb(t.app)}),cP()}function uP(){return Nb.filter(e=>e.descriptor.app===Js.value.app).filter(e=>e.descriptor.id!=="components").map(e=>{var t;const n=e.descriptor,s=e.options;return{id:s.id,label:s.label,logo:n.logo,icon:`custom-ic-baseline-${(t=s==null?void 0:s.icon)==null?void 0:t.replace(/_/g,"-")}`,packageName:n.packageName,homepage:n.homepage,pluginId:n.id}})}function Sm(e,t){return Nb.find(n=>n.options.id===e&&(t?n.descriptor.app===t:!0))}function tq(){const e=WF();e.hook("addInspector",({inspector:s,plugin:o})=>{eq(s,o.descriptor)});const t=Su(async({inspectorId:s,plugin:o})=>{var r;if(!s||!((r=o==null?void 0:o.descriptor)!=null&&r.app)||vs.highPerfModeEnabled)return;const i=Sm(s,o.descriptor.app),a={app:o.descriptor.app,inspectorId:s,filter:(i==null?void 0:i.treeFilter)||"",rootNodes:[]};await new Promise(l=>{e.callHookWith(async c=>{await Promise.all(c.map(u=>u(a))),l()},"getInspectorTree")}),e.callHookWith(async l=>{await Promise.all(l.map(c=>c({inspectorId:s,rootNodes:a.rootNodes})))},"sendInspectorTreeToClient")},120);e.hook("sendInspectorTree",t);const n=Su(async({inspectorId:s,plugin:o})=>{var r;if(!s||!((r=o==null?void 0:o.descriptor)!=null&&r.app)||vs.highPerfModeEnabled)return;const i=Sm(s,o.descriptor.app),a={app:o.descriptor.app,inspectorId:s,nodeId:(i==null?void 0:i.selectedNodeId)||"",state:null},l={currentTab:`custom-inspector:${s}`};a.nodeId&&await new Promise(c=>{e.callHookWith(async u=>{await Promise.all(u.map(d=>d(a,l))),c()},"getInspectorState")}),e.callHookWith(async c=>{await Promise.all(c.map(u=>u({inspectorId:s,nodeId:a.nodeId,state:a.state})))},"sendInspectorStateToClient")},120);return e.hook("sendInspectorState",n),e.hook("customInspectorSelectNode",({inspectorId:s,nodeId:o,plugin:r})=>{const i=Sm(s,r.descriptor.app);i&&(i.selectedNodeId=o)}),e.hook("timelineLayerAdded",({options:s,plugin:o})=>{Q7(s,o.descriptor)}),e.hook("timelineEventAdded",({options:s,plugin:o})=>{var r;const i=["performance","component-event","keyboard","mouse"];vs.highPerfModeEnabled||!((r=vs.timelineLayersState)!=null&&r[o.descriptor.id])&&!i.includes(s.layerId)||e.callHookWith(async a=>{await Promise.all(a.map(l=>l(s)))},"sendTimelineEventToClient")}),e.hook("getComponentInstances",async({app:s})=>{const o=s.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(!o)return null;const r=o.id.toString();return[...o.instanceMap].filter(([a])=>a.split(":")[0]===r).map(([,a])=>a)}),e.hook("getComponentBounds",async({instance:s})=>ql(s)),e.hook("getComponentName",({instance:s})=>wm(s)),e.hook("componentHighlight",({uid:s})=>{const o=Js.value.instanceMap.get(s);o&&B7(o)}),e.hook("componentUnhighlight",()=>{tP()}),e}var dP,hP;(hP=(dP=Dt).__VUE_DEVTOOLS_KIT_APP_RECORDS__)!=null||(dP.__VUE_DEVTOOLS_KIT_APP_RECORDS__=[]);var fP,pP;(pP=(fP=Dt).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__)!=null||(fP.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__={});var gP,mP;(mP=(gP=Dt).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__)!=null||(gP.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__="");var vP,yP;(yP=(vP=Dt).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__)!=null||(vP.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__=[]);var wP,CP;(CP=(wP=Dt).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__)!=null||(wP.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__=[]);var Yl="__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";function nq(){return{connected:!1,clientConnected:!1,vitePluginDetected:!0,appRecords:[],activeAppRecordId:"",tabs:[],commands:[],highPerfModeEnabled:!0,devtoolsClientDetected:{},perfUniqueGroupId:0,timelineLayersState:Z7()}}var bP,SP;(SP=(bP=Dt)[Yl])!=null||(bP[Yl]=nq());var sq=Su(e=>{Ru.hooks.callHook("devtoolsStateUpdated",{state:e})});Su((e,t)=>{Ru.hooks.callHook("devtoolsConnectedUpdated",{state:e,oldState:t})});var Em=new Proxy(Dt.__VUE_DEVTOOLS_KIT_APP_RECORDS__,{get(e,t,n){return t==="value"?Dt.__VUE_DEVTOOLS_KIT_APP_RECORDS__:Dt.__VUE_DEVTOOLS_KIT_APP_RECORDS__[t]}}),Js=new Proxy(Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__,{get(e,t,n){return t==="value"?Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__:t==="id"?Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__:Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[t]}});function EP(){sq({...Dt[Yl],appRecords:Em.value,activeAppRecordId:Js.id,tabs:Dt.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,commands:Dt.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__})}function oq(e){Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__=e,EP()}function rq(e){Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__=e,EP()}var vs=new Proxy(Dt[Yl],{get(e,t){return t==="appRecords"?Em:t==="activeAppRecordId"?Js.id:t==="tabs"?Dt.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__:t==="commands"?Dt.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__:Dt[Yl][t]},deleteProperty(e,t){return delete e[t],!0},set(e,t,n){return{...Dt[Yl]},e[t]=n,Dt[Yl][t]=n,!0}});function iq(e={}){var t,n,s;const{file:o,host:r,baseUrl:i=window.location.origin,line:a=0,column:l=0}=e;if(o){if(r==="chrome-extension"){const c=o.replace(/\\/g,"\\\\"),u=(n=(t=window.VUE_DEVTOOLS_CONFIG)==null?void 0:t.openInEditorHost)!=null?n:"/";fetch(`${u}__open-in-editor?file=${encodeURI(o)}`).then(d=>{if(!d.ok){const h=`Opening component ${c} failed`;console.log(`%c${h}`,"color:red")}})}else if(vs.vitePluginDetected){const c=(s=Dt.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__)!=null?s:i;Dt.__VUE_INSPECTOR__.openInEditor(c,o,a,l)}}}Qe(),Qe(),Qe(),Qe(),Qe();var _P,RP;(RP=(_P=Dt).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__)!=null||(_P.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__=[]);var Lb=new Proxy(Dt.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__,{get(e,t,n){return Reflect.get(e,t,n)}});function Vb(e){const t={};return Object.keys(e).forEach(n=>{t[n]=e[n].defaultValue}),t}function Bb(e){return`__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${e}__`}function aq(e){var t,n,s;const o=(n=(t=Lb.find(r=>{var i;return r[0].id===e&&!!((i=r[0])!=null&&i.settings)}))==null?void 0:t[0])!=null?n:null;return(s=o==null?void 0:o.settings)!=null?s:null}function DP(e,t){var n,s,o;const r=Bb(e);if(r){const i=localStorage.getItem(r);if(i)return JSON.parse(i)}if(e){const i=(s=(n=Lb.find(a=>a[0].id===e))==null?void 0:n[0])!=null?s:null;return Vb((o=i==null?void 0:i.settings)!=null?o:{})}return Vb(t)}function lq(e,t){const n=Bb(e);localStorage.getItem(n)||localStorage.setItem(n,JSON.stringify(Vb(t)))}function cq(e,t,n){const s=Bb(e),o=localStorage.getItem(s),r=JSON.parse(o||"{}"),i={...r,[t]:n};localStorage.setItem(s,JSON.stringify(i)),Ru.hooks.callHookWith(a=>{a.forEach(l=>l({pluginId:e,key:t,oldValue:r[t],newValue:n,settings:i}))},"setPluginSettings")}Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe();var TP,IP,Oo=(IP=(TP=Dt).__VUE_DEVTOOLS_HOOK)!=null?IP:TP.__VUE_DEVTOOLS_HOOK=WF(),uq={vueAppInit(e){Oo.hook("app:init",e)},vueAppUnmount(e){Oo.hook("app:unmount",e)},vueAppConnected(e){Oo.hook("app:connected",e)},componentAdded(e){return Oo.hook("component:added",e)},componentEmit(e){return Oo.hook("component:emit",e)},componentUpdated(e){return Oo.hook("component:updated",e)},componentRemoved(e){return Oo.hook("component:removed",e)},setupDevtoolsPlugin(e){Oo.hook("devtools-plugin:setup",e)},perfStart(e){return Oo.hook("perf:start",e)},perfEnd(e){return Oo.hook("perf:end",e)}},xP={on:uq,setupDevToolsPlugin(e,t){return Oo.callHook("devtools-plugin:setup",e,t)}},dq=class{constructor({plugin:e,ctx:t}){this.hooks=t.hooks,this.plugin=e}get on(){return{visitComponentTree:e=>{this.hooks.hook("visitComponentTree",e)},inspectComponent:e=>{this.hooks.hook("inspectComponent",e)},editComponentState:e=>{this.hooks.hook("editComponentState",e)},getInspectorTree:e=>{this.hooks.hook("getInspectorTree",e)},getInspectorState:e=>{this.hooks.hook("getInspectorState",e)},editInspectorState:e=>{this.hooks.hook("editInspectorState",e)},inspectTimelineEvent:e=>{this.hooks.hook("inspectTimelineEvent",e)},timelineCleared:e=>{this.hooks.hook("timelineCleared",e)},setPluginSettings:e=>{this.hooks.hook("setPluginSettings",e)}}}notifyComponentUpdate(e){var t;if(vs.highPerfModeEnabled)return;const n=uP().find(s=>s.packageName===this.plugin.descriptor.packageName);if(n!=null&&n.id){if(e){const s=[e.appContext.app,e.uid,(t=e.parent)==null?void 0:t.uid,e];Oo.callHook("component:updated",...s)}else Oo.callHook("component:updated");this.hooks.callHook("sendInspectorState",{inspectorId:n.id,plugin:this.plugin})}}addInspector(e){this.hooks.callHook("addInspector",{inspector:e,plugin:this.plugin}),this.plugin.descriptor.settings&&lq(e.id,this.plugin.descriptor.settings)}sendInspectorTree(e){vs.highPerfModeEnabled||this.hooks.callHook("sendInspectorTree",{inspectorId:e,plugin:this.plugin})}sendInspectorState(e){vs.highPerfModeEnabled||this.hooks.callHook("sendInspectorState",{inspectorId:e,plugin:this.plugin})}selectInspectorNode(e,t){this.hooks.callHook("customInspectorSelectNode",{inspectorId:e,nodeId:t,plugin:this.plugin})}visitComponentTree(e){return this.hooks.callHook("visitComponentTree",e)}now(){return vs.highPerfModeEnabled?0:Date.now()}addTimelineLayer(e){this.hooks.callHook("timelineLayerAdded",{options:e,plugin:this.plugin})}addTimelineEvent(e){vs.highPerfModeEnabled||this.hooks.callHook("timelineEventAdded",{options:e,plugin:this.plugin})}getSettings(e){return DP(e??this.plugin.descriptor.id,this.plugin.descriptor.settings)}getComponentInstances(e){return this.hooks.callHook("getComponentInstances",{app:e})}getComponentBounds(e){return this.hooks.callHook("getComponentBounds",{instance:e})}getComponentName(e){return this.hooks.callHook("getComponentName",{instance:e})}highlightElement(e){const t=e.__VUE_DEVTOOLS_NEXT_UID__;return this.hooks.callHook("componentHighlight",{uid:t})}unhighlightElement(){return this.hooks.callHook("componentUnhighlight")}},hq=dq;Qe(),Qe(),Qe(),Qe();var fq="__vue_devtool_undefined__",pq="__vue_devtool_infinity__",gq="__vue_devtool_negative_infinity__",mq="__vue_devtool_nan__";Qe(),Qe();var vq={[fq]:"undefined",[mq]:"NaN",[pq]:"Infinity",[gq]:"-Infinity"};Object.entries(vq).reduce((e,[t,n])=>(e[n]=t,e),{}),Qe(),Qe(),Qe(),Qe(),Qe();var FP,PP;(PP=(FP=Dt).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__)!=null||(FP.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__=new Set);function AP(e,t){return xP.setupDevToolsPlugin(e,t)}function yq(e,t){const[n,s]=e;if(n.app!==t)return;const o=new hq({plugin:{setupFn:s,descriptor:n},ctx:Ru});n.packageName==="vuex"&&o.on.editInspectorState(r=>{o.sendInspectorState(r.inspectorId)}),s(o)}function kP(e,t){Dt.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(e)||vs.highPerfModeEnabled&&!(t!=null&&t.inspectingComponent)||(Dt.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(e),Lb.forEach(n=>{yq(n,e)}))}Qe(),Qe();var qh="__VUE_DEVTOOLS_ROUTER__",_u="__VUE_DEVTOOLS_ROUTER_INFO__",OP,MP;(MP=(OP=Dt)[_u])!=null||(OP[_u]={currentRoute:null,routes:[]});var NP,LP;(LP=(NP=Dt)[qh])!=null||(NP[qh]={}),new Proxy(Dt[_u],{get(e,t){return Dt[_u][t]}}),new Proxy(Dt[qh],{get(e,t){if(t==="value")return Dt[qh]}});function wq(e){const t=new Map;return((e==null?void 0:e.getRoutes())||[]).filter(n=>!t.has(n.path)&&t.set(n.path,1))}function $b(e){return e.map(t=>{let{path:n,name:s,children:o,meta:r}=t;return o!=null&&o.length&&(o=$b(o)),{path:n,name:s,children:o,meta:r}})}function Cq(e){if(e){const{fullPath:t,hash:n,href:s,path:o,name:r,matched:i,params:a,query:l}=e;return{fullPath:t,hash:n,href:s,path:o,name:r,params:a,query:l,matched:$b(i)}}return e}function bq(e,t){function n(){var s;const o=(s=e.app)==null?void 0:s.config.globalProperties.$router,r=Cq(o==null?void 0:o.currentRoute.value),i=$b(wq(o)),a=console.warn;console.warn=()=>{},Dt[_u]={currentRoute:r?GF(r):{},routes:GF(i)},Dt[qh]=o,console.warn=a}n(),xP.on.componentUpdated(Su(()=>{var s;((s=t.value)==null?void 0:s.app)===e.app&&(n(),!vs.highPerfModeEnabled&&Ru.hooks.callHook("routerInfoUpdated",{state:Dt[_u]}))},200))}function Sq(e){return{async getInspectorTree(t){const n={...t,app:Js.value.app,rootNodes:[]};return await new Promise(s=>{e.callHookWith(async o=>{await Promise.all(o.map(r=>r(n))),s()},"getInspectorTree")}),n.rootNodes},async getInspectorState(t){const n={...t,app:Js.value.app,state:null},s={currentTab:`custom-inspector:${t.inspectorId}`};return await new Promise(o=>{e.callHookWith(async r=>{await Promise.all(r.map(i=>i(n,s))),o()},"getInspectorState")}),n.state},editInspectorState(t){const n=new q7,s={...t,app:Js.value.app,set:(o,r=t.path,i=t.state.value,a)=>{n.set(o,r,i,a||n.createDefaultSetCallback(t.state))}};e.callHookWith(o=>{o.forEach(r=>r(s))},"editInspectorState")},sendInspectorState(t){const n=Sm(t);e.callHook("sendInspectorState",{inspectorId:t,plugin:{descriptor:n.descriptor,setupFn:()=>({})}})},inspectComponentInspector(){return G7()},cancelInspectComponentInspector(){return H7()},getComponentRenderCode(t){const n=Ib(Js.value,t);if(n)return typeof(n==null?void 0:n.type)!="function"?n.render.toString():n.type.toString()},scrollToComponent(t){return U7({id:t})},openInEditor:iq,getVueInspector:j7,toggleApp(t,n){const s=Em.value.find(o=>o.id===t);s&&(rq(t),oq(s),bq(s,Js),cP(),kP(s.app,n))},inspectDOM(t){const n=Ib(Js.value,t);if(n){const[s]=xb(n);s&&(Dt.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__=s)}},updatePluginSettings(t,n,s){cq(t,n,s)},getPluginSettings(t){return{options:aq(t),values:DP(t)}}}}Qe();var VP,BP;(BP=(VP=Dt).__VUE_DEVTOOLS_ENV__)!=null||(VP.__VUE_DEVTOOLS_ENV__={vitePluginDetected:!1});var $P=tq(),HP,GP;(GP=(HP=Dt).__VUE_DEVTOOLS_KIT_CONTEXT__)!=null||(HP.__VUE_DEVTOOLS_KIT_CONTEXT__={hooks:$P,get state(){return{...vs,activeAppRecordId:Js.id,activeAppRecord:Js.value,appRecords:Em.value}},api:Sq($P)});var Ru=Dt.__VUE_DEVTOOLS_KIT_CONTEXT__;Qe(),E7(R7());var UP,WP;(WP=(UP=Dt).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__)!=null||(UP.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__={id:0,appIds:new Set}),Qe(),Qe();function Eq(e){vs.highPerfModeEnabled=e??!vs.highPerfModeEnabled,!e&&Js.value&&kP(Js.value.app)}Qe(),Qe(),Qe();function _q(e){vs.devtoolsClientDetected={...vs.devtoolsClientDetected,...e};const t=Object.values(vs.devtoolsClientDetected).some(Boolean);Eq(!t)}var zP,jP;(jP=(zP=Dt).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__)!=null||(zP.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__=_q),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe();var Rq=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},KP=class{constructor(t){this.generateIdentifier=t,this.kv=new Rq}register(t,n){this.kv.getByValue(t)||(n||(n=this.generateIdentifier(t)),this.kv.set(n,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}},Dq=class extends KP{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t=="object"?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};Qe(),Qe();function Tq(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function Iq(e,t){const n=Tq(e);if("find"in n)return n.find(t);const s=n;for(let o=0;o<s.length;o++){const r=s[o];if(t(r))return r}}function Du(e,t){Object.entries(e).forEach(([n,s])=>t(s,n))}function _m(e,t){return e.indexOf(t)!==-1}function qP(e,t){for(let n=0;n<e.length;n++){const s=e[n];if(t(s))return s}}var xq=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return Iq(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}};Qe(),Qe();var Fq=e=>Object.prototype.toString.call(e).slice(8,-1),YP=e=>typeof e>"u",Pq=e=>e===null,Yh=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,Hb=e=>Yh(e)&&Object.keys(e).length===0,Ga=e=>Array.isArray(e),Aq=e=>typeof e=="string",kq=e=>typeof e=="number"&&!isNaN(e),Oq=e=>typeof e=="boolean",Mq=e=>e instanceof RegExp,Xh=e=>e instanceof Map,Zh=e=>e instanceof Set,XP=e=>Fq(e)==="Symbol",Nq=e=>e instanceof Date&&!isNaN(e.valueOf()),Lq=e=>e instanceof Error,ZP=e=>typeof e=="number"&&isNaN(e),Vq=e=>Oq(e)||Pq(e)||YP(e)||kq(e)||Aq(e)||XP(e),Bq=e=>typeof e=="bigint",$q=e=>e===1/0||e===-1/0,Hq=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),Gq=e=>e instanceof URL;Qe();var JP=e=>e.replace(/\./g,"\\."),Gb=e=>e.map(String).map(JP).join("."),Jh=e=>{const t=[];let n="";for(let o=0;o<e.length;o++){let r=e.charAt(o);if(r==="\\"&&e.charAt(o+1)==="."){n+=".",o++;continue}if(r==="."){t.push(n),n="";continue}n+=r}const s=n;return t.push(s),t};Qe();function li(e,t,n,s){return{isApplicable:e,annotation:t,transform:n,untransform:s}}var QP=[li(YP,"undefined",()=>null,()=>{}),li(Bq,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),li(Nq,"Date",e=>e.toISOString(),e=>new Date(e)),li(Lq,"Error",(e,t)=>{const n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(s=>{n[s]=e[s]}),n},(e,t)=>{const n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(s=>{n[s]=e[s]}),n}),li(Mq,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),li(Zh,"set",e=>[...e.values()],e=>new Set(e)),li(Xh,"map",e=>[...e.entries()],e=>new Map(e)),li(e=>ZP(e)||$q(e),"number",e=>ZP(e)?"NaN":e>0?"Infinity":"-Infinity",Number),li(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),li(Gq,"URL",e=>e.toString(),e=>new URL(e))];function Rm(e,t,n,s){return{isApplicable:e,annotation:t,transform:n,untransform:s}}var eA=Rm((e,t)=>XP(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const s=n.symbolRegistry.getValue(t[1]);if(!s)throw new Error("Trying to deserialize unknown symbol");return s}),Uq=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),tA=Rm(Hq,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=Uq[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function nA(e,t){return e!=null&&e.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var sA=Rm(nA,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const s={};return n.forEach(o=>{s[o]=e[o]}),s},(e,t,n)=>{const s=n.classRegistry.getValue(t[1]);if(!s)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(s.prototype),e)}),oA=Rm((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const s=n.customTransformerRegistry.findByName(t[1]);if(!s)throw new Error("Trying to deserialize unknown custom value");return s.deserialize(e)}),Wq=[sA,eA,oA,tA],rA=(e,t)=>{const n=qP(Wq,o=>o.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const s=qP(QP,o=>o.isApplicable(e,t));if(s)return{value:s.transform(e,t),type:s.annotation}},iA={};QP.forEach(e=>{iA[e.annotation]=e});var zq=(e,t,n)=>{if(Ga(t))switch(t[0]){case"symbol":return eA.untransform(e,t,n);case"class":return sA.untransform(e,t,n);case"custom":return oA.untransform(e,t,n);case"typed-array":return tA.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const s=iA[t];if(!s)throw new Error("Unknown transformation: "+t);return s.untransform(e,n)}};Qe();var Tu=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function aA(e){if(_m(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(_m(e,"prototype"))throw new Error("prototype is not allowed as a property");if(_m(e,"constructor"))throw new Error("constructor is not allowed as a property")}var jq=(e,t)=>{aA(t);for(let n=0;n<t.length;n++){const s=t[n];if(Zh(e))e=Tu(e,+s);else if(Xh(e)){const o=+s,r=+t[++n]==0?"key":"value",i=Tu(e,o);switch(r){case"key":e=i;break;case"value":e=e.get(i);break}}else e=e[s]}return e},Ub=(e,t,n)=>{if(aA(t),t.length===0)return n(e);let s=e;for(let r=0;r<t.length-1;r++){const i=t[r];if(Ga(s)){const a=+i;s=s[a]}else if(Yh(s))s=s[i];else if(Zh(s)){const a=+i;s=Tu(s,a)}else if(Xh(s)){if(r===t.length-2)break;const l=+i,c=+t[++r]==0?"key":"value",u=Tu(s,l);switch(c){case"key":s=u;break;case"value":s=s.get(u);break}}}const o=t[t.length-1];if(Ga(s)?s[+o]=n(s[+o]):Yh(s)&&(s[o]=n(s[o])),Zh(s)){const r=Tu(s,+o),i=n(r);r!==i&&(s.delete(r),s.add(i))}if(Xh(s)){const r=+t[t.length-2],i=Tu(s,r);switch(+o==0?"key":"value"){case"key":{const l=n(i);s.set(l,s.get(i)),l!==i&&s.delete(i);break}case"value":{s.set(i,n(s.get(i)));break}}}return e};function Wb(e,t,n=[]){if(!e)return;if(!Ga(e)){Du(e,(r,i)=>Wb(r,t,[...n,...Jh(i)]));return}const[s,o]=e;o&&Du(o,(r,i)=>{Wb(r,t,[...n,...Jh(i)])}),t(s,n)}function Kq(e,t,n){return Wb(t,(s,o)=>{e=Ub(e,o,r=>zq(r,s,n))}),e}function qq(e,t){function n(s,o){const r=jq(e,Jh(o));s.map(Jh).forEach(i=>{e=Ub(e,i,()=>r)})}if(Ga(t)){const[s,o]=t;s.forEach(r=>{e=Ub(e,Jh(r),()=>e)}),o&&Du(o,n)}else Du(t,n);return e}var Yq=(e,t)=>Yh(e)||Ga(e)||Xh(e)||Zh(e)||nA(e,t);function Xq(e,t,n){const s=n.get(e);s?s.push(t):n.set(e,[t])}function Zq(e,t){const n={};let s;return e.forEach(o=>{if(o.length<=1)return;t||(o=o.map(a=>a.map(String)).sort((a,l)=>a.length-l.length));const[r,...i]=o;r.length===0?s=i.map(Gb):n[Gb(r)]=i.map(Gb)}),s?Hb(n)?[s]:[s,n]:Hb(n)?void 0:n}var lA=(e,t,n,s,o=[],r=[],i=new Map)=>{var a;const l=Vq(e);if(!l){Xq(e,o,t);const p=i.get(e);if(p)return s?{transformedValue:null}:p}if(!Yq(e,n)){const p=rA(e,n),g=p?{transformedValue:p.value,annotations:[p.type]}:{transformedValue:e};return l||i.set(e,g),g}if(_m(r,e))return{transformedValue:null};const c=rA(e,n),u=(a=c==null?void 0:c.value)!=null?a:e,d=Ga(u)?[]:{},h={};Du(u,(p,g)=>{if(g==="__proto__"||g==="constructor"||g==="prototype")throw new Error(`Detected property ${g}. This is a prototype pollution risk, please remove it from your object.`);const v=lA(p,t,n,s,[...o,g],[...r,e],i);d[g]=v.transformedValue,Ga(v.annotations)?h[g]=v.annotations:Yh(v.annotations)&&Du(v.annotations,(C,S)=>{h[JP(g)+"."+S]=C})});const f=Hb(h)?{transformedValue:d,annotations:c?[c.type]:void 0}:{transformedValue:d,annotations:c?[c.type,h]:h};return l||i.set(e,f),f};Qe(),Qe();function cA(e){return Object.prototype.toString.call(e).slice(8,-1)}function uA(e){return cA(e)==="Array"}function Jq(e){if(cA(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function Qq(e,t,n,s,o){const r={}.propertyIsEnumerable.call(s,t)?"enumerable":"nonenumerable";r==="enumerable"&&(e[t]=n),o&&r==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function zb(e,t={}){if(uA(e))return e.map(o=>zb(o,t));if(!Jq(e))return e;const n=Object.getOwnPropertyNames(e),s=Object.getOwnPropertySymbols(e);return[...n,...s].reduce((o,r)=>{if(uA(t.props)&&!t.props.includes(r))return o;const i=e[r],a=zb(i,t);return Qq(o,r,a,e,t.nonenumerable),o},{})}var Pn=class{constructor({dedupe:e=!1}={}){this.classRegistry=new Dq,this.symbolRegistry=new KP(t=>{var n;return(n=t.description)!=null?n:""}),this.customTransformerRegistry=new xq,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,n=lA(e,t,this,this.dedupe),s={json:n.transformedValue};n.annotations&&(s.meta={...s.meta,values:n.annotations});const o=Zq(t,this.dedupe);return o&&(s.meta={...s.meta,referentialEqualities:o}),s}deserialize(e){const{json:t,meta:n}=e;let s=zb(t);return n!=null&&n.values&&(s=Kq(s,n.values,this)),n!=null&&n.referentialEqualities&&(s=qq(s,n.referentialEqualities)),s}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e))}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};Pn.defaultInstance=new Pn,Pn.serialize=Pn.defaultInstance.serialize.bind(Pn.defaultInstance),Pn.deserialize=Pn.defaultInstance.deserialize.bind(Pn.defaultInstance),Pn.stringify=Pn.defaultInstance.stringify.bind(Pn.defaultInstance),Pn.parse=Pn.defaultInstance.parse.bind(Pn.defaultInstance),Pn.registerClass=Pn.defaultInstance.registerClass.bind(Pn.defaultInstance),Pn.registerSymbol=Pn.defaultInstance.registerSymbol.bind(Pn.defaultInstance),Pn.registerCustom=Pn.defaultInstance.registerCustom.bind(Pn.defaultInstance),Pn.allowErrorProps=Pn.defaultInstance.allowErrorProps.bind(Pn.defaultInstance),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe();var dA,hA;(hA=(dA=Dt).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__)!=null||(dA.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__=[]);var fA,pA;(pA=(fA=Dt).__VUE_DEVTOOLS_KIT_RPC_CLIENT__)!=null||(fA.__VUE_DEVTOOLS_KIT_RPC_CLIENT__=null);var gA,mA;(mA=(gA=Dt).__VUE_DEVTOOLS_KIT_RPC_SERVER__)!=null||(gA.__VUE_DEVTOOLS_KIT_RPC_SERVER__=null);var vA,yA;(yA=(vA=Dt).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__)!=null||(vA.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__=null);var wA,CA;(CA=(wA=Dt).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__)!=null||(wA.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__=null);var bA,SA;(SA=(bA=Dt).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__)!=null||(bA.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__=null),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe();/*!
|
|
136
|
+
`},l=()=>{const f=ym(n);if(t.centered&&f){if(r.value=!0,a(f),t.showOverlay){const p=()=>{t.closeOnOverlayClick&&c()};i=VF(t.overlayOpacity,e.zIndex-1||998,p)}}else if(o.value&&(o.value.show(),r.value=!0,t.showOverlay)){const p=()=>{t.closeOnOverlayClick&&c()};i=VF(t.overlayOpacity,e.zIndex-1||998,p)}},c=()=>{const f=ym(n);t.centered&&f?(r.value=!1,f.style.display="none",t.showOverlay&&(Sb(i||void 0),i=null)):o.value&&(o.value.hide(),r.value=!1,t.showOverlay&&(Sb(i||void 0),i=null))},u=()=>{r.value?c():l()},d=()=>{o.value&&(o.value.destroy(),o.value=null),t.showOverlay&&i&&(Sb(i),i=null)},h=()=>{var g;const f=ym(n);if(!f)return;if(f.style.display="none",t.centered){t.showOnInit&&l();return}const p={content:f,placement:t.placement,theme:t.theme,trigger:t.trigger,interactive:t.interactive,appendTo:t.appendTo,arrow:t.showArrow,allowHTML:!0,hideOnClick:!1,popperOptions:{...t.popperOptions,modifiers:[...((g=t.popperOptions)==null?void 0:g.modifiers)||[],{name:"computeStyles",options:{adaptive:!1}}]},onShow(){r.value=!0,f.style.display="block"},onHide(){r.value=!1}};if(t.useTrigger){const v=ym(s);if(!v)return;o.value=ka(v,p)}else{const v=document.createElement("div");v.style.display="none",document.body.appendChild(v),o.value=ka(v,p)}t.showOnInit&&l()};return sn(()=>{h()}),es(()=>{d()}),et(()=>t.alwaysShow,f=>{f?l():c()},{immediate:!0}),{popupRef:n,triggerRef:s,instance:o,isVisible:r,show:l,hide:c,toggle:u,destroy:d}}var X9=Object.create,BF=Object.defineProperty,Z9=Object.getOwnPropertyDescriptor,Eb=Object.getOwnPropertyNames,J9=Object.getPrototypeOf,Q9=Object.prototype.hasOwnProperty,e7=(e,t)=>function(){return e&&(t=(0,e[Eb(e)[0]])(e=0)),t},t7=(e,t)=>function(){return t||(0,e[Eb(e)[0]])((t={exports:{}}).exports,t),t.exports},n7=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Eb(t))!Q9.call(e,o)&&o!==n&&BF(e,o,{get:()=>t[o],enumerable:!(s=Z9(t,o))||s.enumerable});return e},s7=(e,t,n)=>(n=e!=null?X9(J9(e)):{},n7(BF(n,"default",{value:e,enumerable:!0}),e)),jh=e7({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),o7=t7({"../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(e,t){jh(),t.exports=s;function n(r){return r instanceof Buffer?Buffer.from(r):new r.constructor(r.buffer.slice(),r.byteOffset,r.length)}function s(r){if(r=r||{},r.circles)return o(r);const i=new Map;if(i.set(Date,d=>new Date(d)),i.set(Map,(d,h)=>new Map(l(Array.from(d),h))),i.set(Set,(d,h)=>new Set(l(Array.from(d),h))),r.constructorHandlers)for(const d of r.constructorHandlers)i.set(d[0],d[1]);let a=null;return r.proto?u:c;function l(d,h){const f=Object.keys(d),p=new Array(f.length);for(let g=0;g<f.length;g++){const v=f[g],C=d[v];typeof C!="object"||C===null?p[v]=C:C.constructor!==Object&&(a=i.get(C.constructor))?p[v]=a(C,h):ArrayBuffer.isView(C)?p[v]=n(C):p[v]=h(C)}return p}function c(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return l(d,c);if(d.constructor!==Object&&(a=i.get(d.constructor)))return a(d,c);const h={};for(const f in d){if(Object.hasOwnProperty.call(d,f)===!1)continue;const p=d[f];typeof p!="object"||p===null?h[f]=p:p.constructor!==Object&&(a=i.get(p.constructor))?h[f]=a(p,c):ArrayBuffer.isView(p)?h[f]=n(p):h[f]=c(p)}return h}function u(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return l(d,u);if(d.constructor!==Object&&(a=i.get(d.constructor)))return a(d,u);const h={};for(const f in d){const p=d[f];typeof p!="object"||p===null?h[f]=p:p.constructor!==Object&&(a=i.get(p.constructor))?h[f]=a(p,u):ArrayBuffer.isView(p)?h[f]=n(p):h[f]=u(p)}return h}}function o(r){const i=[],a=[],l=new Map;if(l.set(Date,f=>new Date(f)),l.set(Map,(f,p)=>new Map(u(Array.from(f),p))),l.set(Set,(f,p)=>new Set(u(Array.from(f),p))),r.constructorHandlers)for(const f of r.constructorHandlers)l.set(f[0],f[1]);let c=null;return r.proto?h:d;function u(f,p){const g=Object.keys(f),v=new Array(g.length);for(let C=0;C<g.length;C++){const S=g[C],b=f[S];if(typeof b!="object"||b===null)v[S]=b;else if(b.constructor!==Object&&(c=l.get(b.constructor)))v[S]=c(b,p);else if(ArrayBuffer.isView(b))v[S]=n(b);else{const w=i.indexOf(b);w!==-1?v[S]=a[w]:v[S]=p(b)}}return v}function d(f){if(typeof f!="object"||f===null)return f;if(Array.isArray(f))return u(f,d);if(f.constructor!==Object&&(c=l.get(f.constructor)))return c(f,d);const p={};i.push(f),a.push(p);for(const g in f){if(Object.hasOwnProperty.call(f,g)===!1)continue;const v=f[g];if(typeof v!="object"||v===null)p[g]=v;else if(v.constructor!==Object&&(c=l.get(v.constructor)))p[g]=c(v,d);else if(ArrayBuffer.isView(v))p[g]=n(v);else{const C=i.indexOf(v);C!==-1?p[g]=a[C]:p[g]=d(v)}}return i.pop(),a.pop(),p}function h(f){if(typeof f!="object"||f===null)return f;if(Array.isArray(f))return u(f,h);if(f.constructor!==Object&&(c=l.get(f.constructor)))return c(f,h);const p={};i.push(f),a.push(p);for(const g in f){const v=f[g];if(typeof v!="object"||v===null)p[g]=v;else if(v.constructor!==Object&&(c=l.get(v.constructor)))p[g]=c(v,h);else if(ArrayBuffer.isView(v))p[g]=n(v);else{const C=i.indexOf(v);C!==-1?p[g]=a[C]:p[g]=h(v)}}return i.pop(),a.pop(),p}}}});jh(),jh(),jh();var $F=typeof navigator<"u",Dt=typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof global<"u"?global:{};typeof Dt.chrome<"u"&&Dt.chrome.devtools,$F&&(Dt.self,Dt.top);var HF;typeof navigator<"u"&&((HF=navigator.userAgent)==null||HF.toLowerCase().includes("electron")),jh();var r7=s7(o7()),i7=/(?:^|[-_/])(\w)/g;function a7(e,t){return t?t.toUpperCase():""}function l7(e){return e&&`${e}`.replace(i7,a7)}function c7(e,t){let n=e.replace(/^[a-z]:/i,"").replace(/\\/g,"/");n.endsWith(`index${t}`)&&(n=n.replace(`/index${t}`,t));const s=n.lastIndexOf("/"),o=n.substring(s+1);{const r=o.lastIndexOf(t);return o.substring(0,r)}}var GF=(0,r7.default)({circles:!0});const u7={trailing:!0};function Su(e,t=25,n={}){if(n={...u7,...n},!Number.isFinite(t))throw new TypeError("Expected `wait` to be a finite number");let s,o,r=[],i,a;const l=(c,u)=>(i=d7(e,c,u),i.finally(()=>{if(i=null,n.trailing&&a&&!o){const d=l(c,a);return a=null,d}}),i);return function(...c){return i?(n.trailing&&(a=c),i):new Promise(u=>{const d=!o&&n.leading;clearTimeout(o),o=setTimeout(()=>{o=null;const h=n.leading?s:l(this,c);for(const f of r)f(h);r=[]},t),d?(s=l(this,c),u(s)):r.push(u)})}}async function d7(e,t,n){return await e.apply(t,n)}function _b(e,t={},n){for(const s in e){const o=e[s],r=n?`${n}:${s}`:s;typeof o=="object"&&o!==null?_b(o,t,r):typeof o=="function"&&(t[r]=o)}return t}const h7={run:e=>e()},f7=()=>h7,UF=typeof console.createTask<"u"?console.createTask:f7;function p7(e,t){const n=t.shift(),s=UF(n);return e.reduce((o,r)=>o.then(()=>s.run(()=>r(...t))),Promise.resolve())}function g7(e,t){const n=t.shift(),s=UF(n);return Promise.all(e.map(o=>s.run(()=>o(...t))))}function Rb(e,t){for(const n of[...e])n(t)}class m7{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,n,s={}){if(!t||typeof n!="function")return()=>{};const o=t;let r;for(;this._deprecatedHooks[t];)r=this._deprecatedHooks[t],t=r.to;if(r&&!s.allowDeprecated){let i=r.message;i||(i=`${o} hook has been deprecated`+(r.to?`, please use ${r.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(i)||(console.warn(i),this._deprecatedMessages.add(i))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(n),()=>{n&&(this.removeHook(t,n),n=void 0)}}hookOnce(t,n){let s,o=(...r)=>(typeof s=="function"&&s(),s=void 0,o=void 0,n(...r));return s=this.hook(t,o),s}removeHook(t,n){if(this._hooks[t]){const s=this._hooks[t].indexOf(n);s!==-1&&this._hooks[t].splice(s,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,n){this._deprecatedHooks[t]=typeof n=="string"?{to:n}:n;const s=this._hooks[t]||[];delete this._hooks[t];for(const o of s)this.hook(t,o)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const n in t)this.deprecateHook(n,t[n])}addHooks(t){const n=_b(t),s=Object.keys(n).map(o=>this.hook(o,n[o]));return()=>{for(const o of s.splice(0,s.length))o()}}removeHooks(t){const n=_b(t);for(const s in n)this.removeHook(s,n[s])}removeAllHooks(){for(const t in this._hooks)delete this._hooks[t]}callHook(t,...n){return n.unshift(t),this.callHookWith(p7,t,...n)}callHookParallel(t,...n){return n.unshift(t),this.callHookWith(g7,t,...n)}callHookWith(t,n,...s){const o=this._before||this._after?{name:n,args:s,context:{}}:void 0;this._before&&Rb(this._before,o);const r=t(n in this._hooks?[...this._hooks[n]]:[],s);return r instanceof Promise?r.finally(()=>{this._after&&o&&Rb(this._after,o)}):(this._after&&o&&Rb(this._after,o),r)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const n=this._before.indexOf(t);n!==-1&&this._before.splice(n,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const n=this._after.indexOf(t);n!==-1&&this._after.splice(n,1)}}}}function WF(){return new m7}var v7=Object.create,zF=Object.defineProperty,y7=Object.getOwnPropertyDescriptor,Db=Object.getOwnPropertyNames,w7=Object.getPrototypeOf,C7=Object.prototype.hasOwnProperty,b7=(e,t)=>function(){return e&&(t=(0,e[Db(e)[0]])(e=0)),t},jF=(e,t)=>function(){return t||(0,e[Db(e)[0]])((t={exports:{}}).exports,t),t.exports},S7=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Db(t))!C7.call(e,o)&&o!==n&&zF(e,o,{get:()=>t[o],enumerable:!(s=y7(t,o))||s.enumerable});return e},E7=(e,t,n)=>(n=e!=null?v7(w7(e)):{},S7(zF(n,"default",{value:e,enumerable:!0}),e)),Qe=b7({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),_7=jF({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js"(e,t){Qe(),function(n){var s={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"Ae",Å:"A",Æ:"AE",Ç:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"Oe",Ő:"O",Ø:"O",Ù:"U",Ú:"U",Û:"U",Ü:"Ue",Ű:"U",Ý:"Y",Þ:"TH",ß:"ss",à:"a",á:"a",â:"a",ã:"a",ä:"ae",å:"a",æ:"ae",ç:"c",è:"e",é:"e",ê:"e",ë:"e",ì:"i",í:"i",î:"i",ï:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"oe",ő:"o",ø:"o",ù:"u",ú:"u",û:"u",ü:"ue",ű:"u",ý:"y",þ:"th",ÿ:"y","ẞ":"SS",ا:"a",أ:"a",إ:"i",آ:"aa",ؤ:"u",ئ:"e",ء:"a",ب:"b",ت:"t",ث:"th",ج:"j",ح:"h",خ:"kh",د:"d",ذ:"th",ر:"r",ز:"z",س:"s",ش:"sh",ص:"s",ض:"dh",ط:"t",ظ:"z",ع:"a",غ:"gh",ف:"f",ق:"q",ك:"k",ل:"l",م:"m",ن:"n",ه:"h",و:"w",ي:"y",ى:"a",ة:"h",ﻻ:"la",ﻷ:"laa",ﻹ:"lai",ﻵ:"laa",گ:"g",چ:"ch",پ:"p",ژ:"zh",ک:"k",ی:"y","َ":"a","ً":"an","ِ":"e","ٍ":"en","ُ":"u","ٌ":"on","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9",က:"k",ခ:"kh",ဂ:"g",ဃ:"ga",င:"ng",စ:"s",ဆ:"sa",ဇ:"z","စျ":"za",ည:"ny",ဋ:"t",ဌ:"ta",ဍ:"d",ဎ:"da",ဏ:"na",တ:"t",ထ:"ta",ဒ:"d",ဓ:"da",န:"n",ပ:"p",ဖ:"pa",ဗ:"b",ဘ:"ba",မ:"m",ယ:"y",ရ:"ya",လ:"l",ဝ:"w",သ:"th",ဟ:"h",ဠ:"la",အ:"a","ြ":"y","ျ":"ya","ွ":"w","ြွ":"yw","ျွ":"ywa","ှ":"h",ဧ:"e","၏":"-e",ဣ:"i",ဤ:"-i",ဉ:"u",ဦ:"-u",ဩ:"aw","သြော":"aw",ဪ:"aw","၀":"0","၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","္":"","့":"","း":"",č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z",ހ:"h",ށ:"sh",ނ:"n",ރ:"r",ބ:"b",ޅ:"lh",ކ:"k",އ:"a",ވ:"v",މ:"m",ފ:"f",ދ:"dh",ތ:"th",ލ:"l",ގ:"g",ޏ:"gn",ސ:"s",ޑ:"d",ޒ:"z",ޓ:"t",ޔ:"y",ޕ:"p",ޖ:"j",ޗ:"ch",ޘ:"tt",ޙ:"hh",ޚ:"kh",ޛ:"th",ޜ:"z",ޝ:"sh",ޞ:"s",ޟ:"d",ޠ:"t",ޡ:"z",ޢ:"a",ޣ:"gh",ޤ:"q",ޥ:"w","ަ":"a","ާ":"aa","ި":"i","ީ":"ee","ު":"u","ޫ":"oo","ެ":"e","ޭ":"ey","ޮ":"o","ޯ":"oa","ް":"",ა:"a",ბ:"b",გ:"g",დ:"d",ე:"e",ვ:"v",ზ:"z",თ:"t",ი:"i",კ:"k",ლ:"l",მ:"m",ნ:"n",ო:"o",პ:"p",ჟ:"zh",რ:"r",ს:"s",ტ:"t",უ:"u",ფ:"p",ქ:"k",ღ:"gh",ყ:"q",შ:"sh",ჩ:"ch",ც:"ts",ძ:"dz",წ:"ts",ჭ:"ch",ხ:"kh",ჯ:"j",ჰ:"h",α:"a",β:"v",γ:"g",δ:"d",ε:"e",ζ:"z",η:"i",θ:"th",ι:"i",κ:"k",λ:"l",μ:"m",ν:"n",ξ:"ks",ο:"o",π:"p",ρ:"r",σ:"s",τ:"t",υ:"y",φ:"f",χ:"x",ψ:"ps",ω:"o",ά:"a",έ:"e",ί:"i",ό:"o",ύ:"y",ή:"i",ώ:"o",ς:"s",ϊ:"i",ΰ:"y",ϋ:"y",ΐ:"i",Α:"A",Β:"B",Γ:"G",Δ:"D",Ε:"E",Ζ:"Z",Η:"I",Θ:"TH",Ι:"I",Κ:"K",Λ:"L",Μ:"M",Ν:"N",Ξ:"KS",Ο:"O",Π:"P",Ρ:"R",Σ:"S",Τ:"T",Υ:"Y",Φ:"F",Χ:"X",Ψ:"PS",Ω:"O",Ά:"A",Έ:"E",Ί:"I",Ό:"O",Ύ:"Y",Ή:"I",Ώ:"O",Ϊ:"I",Ϋ:"Y",ā:"a",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",ū:"u",Ā:"A",Ē:"E",Ģ:"G",Ī:"I",Ķ:"k",Ļ:"L",Ņ:"N",Ū:"U",Ќ:"Kj",ќ:"kj",Љ:"Lj",љ:"lj",Њ:"Nj",њ:"nj",Тс:"Ts",тс:"ts",ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"E",Ł:"L",Ń:"N",Ś:"S",Ź:"Z",Ż:"Z",Є:"Ye",І:"I",Ї:"Yi",Ґ:"G",є:"ye",і:"i",ї:"yi",ґ:"g",ă:"a",Ă:"A",ș:"s",Ș:"S",ț:"t",Ț:"T",ţ:"t",Ţ:"T",а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"c",ч:"ch",ш:"sh",щ:"sh",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"Yo",Ж:"Zh",З:"Z",И:"I",Й:"I",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"Kh",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sh",Ъ:"",Ы:"Y",Ь:"",Э:"E",Ю:"Yu",Я:"Ya",ђ:"dj",ј:"j",ћ:"c",џ:"dz",Ђ:"Dj",Ј:"j",Ћ:"C",Џ:"Dz",ľ:"l",ĺ:"l",ŕ:"r",Ľ:"L",Ĺ:"L",Ŕ:"R",ş:"s",Ş:"S",ı:"i",İ:"I",ğ:"g",Ğ:"G",ả:"a",Ả:"A",ẳ:"a",Ẳ:"A",ẩ:"a",Ẩ:"A",đ:"d",Đ:"D",ẹ:"e",Ẹ:"E",ẽ:"e",Ẽ:"E",ẻ:"e",Ẻ:"E",ế:"e",Ế:"E",ề:"e",Ề:"E",ệ:"e",Ệ:"E",ễ:"e",Ễ:"E",ể:"e",Ể:"E",ỏ:"o",ọ:"o",Ọ:"o",ố:"o",Ố:"O",ồ:"o",Ồ:"O",ổ:"o",Ổ:"O",ộ:"o",Ộ:"O",ỗ:"o",Ỗ:"O",ơ:"o",Ơ:"O",ớ:"o",Ớ:"O",ờ:"o",Ờ:"O",ợ:"o",Ợ:"O",ỡ:"o",Ỡ:"O",Ở:"o",ở:"o",ị:"i",Ị:"I",ĩ:"i",Ĩ:"I",ỉ:"i",Ỉ:"i",ủ:"u",Ủ:"U",ụ:"u",Ụ:"U",ũ:"u",Ũ:"U",ư:"u",Ư:"U",ứ:"u",Ứ:"U",ừ:"u",Ừ:"U",ự:"u",Ự:"U",ữ:"u",Ữ:"U",ử:"u",Ử:"ư",ỷ:"y",Ỷ:"y",ỳ:"y",Ỳ:"Y",ỵ:"y",Ỵ:"Y",ỹ:"y",Ỹ:"Y",ạ:"a",Ạ:"A",ấ:"a",Ấ:"A",ầ:"a",Ầ:"A",ậ:"a",Ậ:"A",ẫ:"a",Ẫ:"A",ắ:"a",Ắ:"A",ằ:"a",Ằ:"A",ặ:"a",Ặ:"A",ẵ:"a",Ẵ:"A","⓪":"0","①":"1","②":"2","③":"3","④":"4","⑤":"5","⑥":"6","⑦":"7","⑧":"8","⑨":"9","⑩":"10","⑪":"11","⑫":"12","⑬":"13","⑭":"14","⑮":"15","⑯":"16","⑰":"17","⑱":"18","⑲":"18","⑳":"18","⓵":"1","⓶":"2","⓷":"3","⓸":"4","⓹":"5","⓺":"6","⓻":"7","⓼":"8","⓽":"9","⓾":"10","⓿":"0","⓫":"11","⓬":"12","⓭":"13","⓮":"14","⓯":"15","⓰":"16","⓱":"17","⓲":"18","⓳":"19","⓴":"20","Ⓐ":"A","Ⓑ":"B","Ⓒ":"C","Ⓓ":"D","Ⓔ":"E","Ⓕ":"F","Ⓖ":"G","Ⓗ":"H","Ⓘ":"I","Ⓙ":"J","Ⓚ":"K","Ⓛ":"L","Ⓜ":"M","Ⓝ":"N","Ⓞ":"O","Ⓟ":"P","Ⓠ":"Q","Ⓡ":"R","Ⓢ":"S","Ⓣ":"T","Ⓤ":"U","Ⓥ":"V","Ⓦ":"W","Ⓧ":"X","Ⓨ":"Y","Ⓩ":"Z","ⓐ":"a","ⓑ":"b","ⓒ":"c","ⓓ":"d","ⓔ":"e","ⓕ":"f","ⓖ":"g","ⓗ":"h","ⓘ":"i","ⓙ":"j","ⓚ":"k","ⓛ":"l","ⓜ":"m","ⓝ":"n","ⓞ":"o","ⓟ":"p","ⓠ":"q","ⓡ":"r","ⓢ":"s","ⓣ":"t","ⓤ":"u","ⓦ":"v","ⓥ":"w","ⓧ":"x","ⓨ":"y","ⓩ":"z","“":'"',"”":'"',"‘":"'","’":"'","∂":"d",ƒ:"f","™":"(TM)","©":"(C)",œ:"oe",Œ:"OE","®":"(R)","†":"+","℠":"(SM)","…":"...","˚":"o",º:"o",ª:"a","•":"*","၊":",","။":".",$:"USD","€":"EUR","₢":"BRN","₣":"FRF","£":"GBP","₤":"ITL","₦":"NGN","₧":"ESP","₩":"KRW","₪":"ILS","₫":"VND","₭":"LAK","₮":"MNT","₯":"GRD","₱":"ARS","₲":"PYG","₳":"ARA","₴":"UAH","₵":"GHS","¢":"cent","¥":"CNY",元:"CNY",円:"YEN","﷼":"IRR","₠":"EWE","฿":"THB","₨":"INR","₹":"INR","₰":"PF","₺":"TRY","؋":"AFN","₼":"AZN",лв:"BGN","៛":"KHR","₡":"CRC","₸":"KZT",ден:"MKD",zł:"PLN","₽":"RUB","₾":"GEL"},o=["်","ް"],r={"ာ":"a","ါ":"a","ေ":"e","ဲ":"e","ိ":"i","ီ":"i","ို":"o","ု":"u","ူ":"u","ေါင်":"aung","ော":"aw","ော်":"aw","ေါ":"aw","ေါ်":"aw","်":"်","က်":"et","ိုက်":"aik","ောက်":"auk","င်":"in","ိုင်":"aing","ောင်":"aung","စ်":"it","ည်":"i","တ်":"at","ိတ်":"eik","ုတ်":"ok","ွတ်":"ut","ေတ်":"it","ဒ်":"d","ိုဒ်":"ok","ုဒ်":"ait","န်":"an","ာန်":"an","ိန်":"ein","ုန်":"on","ွန်":"un","ပ်":"at","ိပ်":"eik","ုပ်":"ok","ွပ်":"ut","န်ုပ်":"nub","မ်":"an","ိမ်":"ein","ုမ်":"on","ွမ်":"un","ယ်":"e","ိုလ်":"ol","ဉ်":"in","ံ":"an","ိံ":"ein","ုံ":"on","ައް":"ah","ަށް":"ah"},i={en:{},az:{ç:"c",ə:"e",ğ:"g",ı:"i",ö:"o",ş:"s",ü:"u",Ç:"C",Ə:"E",Ğ:"G",İ:"I",Ö:"O",Ş:"S",Ü:"U"},cs:{č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z"},fi:{ä:"a",Ä:"A",ö:"o",Ö:"O"},hu:{ä:"a",Ä:"A",ö:"o",Ö:"O",ü:"u",Ü:"U",ű:"u",Ű:"U"},lt:{ą:"a",č:"c",ę:"e",ė:"e",į:"i",š:"s",ų:"u",ū:"u",ž:"z",Ą:"A",Č:"C",Ę:"E",Ė:"E",Į:"I",Š:"S",Ų:"U",Ū:"U"},lv:{ā:"a",č:"c",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",š:"s",ū:"u",ž:"z",Ā:"A",Č:"C",Ē:"E",Ģ:"G",Ī:"i",Ķ:"k",Ļ:"L",Ņ:"N",Š:"S",Ū:"u",Ž:"Z"},pl:{ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ó:"o",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"e",Ł:"L",Ń:"N",Ó:"O",Ś:"S",Ź:"Z",Ż:"Z"},sv:{ä:"a",Ä:"A",ö:"o",Ö:"O"},sk:{ä:"a",Ä:"A"},sr:{љ:"lj",њ:"nj",Љ:"Lj",Њ:"Nj",đ:"dj",Đ:"Dj"},tr:{Ü:"U",Ö:"O",ü:"u",ö:"o"}},a={ar:{"∆":"delta","∞":"la-nihaya","♥":"hob","&":"wa","|":"aw","<":"aqal-men",">":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},ge:{"∆":"delta","∞":"usasruloba","♥":"siqvaruli","&":"da","|":"an","<":"naklebi",">":"meti","∑":"jami","¤":"valuta"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}},l=[";","?",":","@","&","=","+","$",",","/"].join(""),c=[";","?",":","@","&","=","+","$",","].join(""),u=[".","!","~","*","'","(",")"].join(""),d=function(v,C){var S="-",b="",w="",D=!0,R={},T,F,x,P,E,k,I,M,O,$,Z,Q,se,ae,ee="";if(typeof v!="string")return"";if(typeof C=="string"&&(S=C),I=a.en,M=i.en,typeof C=="object"){T=C.maintainCase||!1,R=C.custom&&typeof C.custom=="object"?C.custom:R,x=+C.truncate>1&&C.truncate||!1,P=C.uric||!1,E=C.uricNoSlash||!1,k=C.mark||!1,D=!(C.symbols===!1||C.lang===!1),S=C.separator||S,P&&(ee+=l),E&&(ee+=c),k&&(ee+=u),I=C.lang&&a[C.lang]&&D?a[C.lang]:D?a.en:{},M=C.lang&&i[C.lang]?i[C.lang]:C.lang===!1||C.lang===!0?{}:i.en,C.titleCase&&typeof C.titleCase.length=="number"&&Array.prototype.toString.call(C.titleCase)?(C.titleCase.forEach(function(V){R[V+""]=V+""}),F=!0):F=!!C.titleCase,C.custom&&typeof C.custom.length=="number"&&Array.prototype.toString.call(C.custom)&&C.custom.forEach(function(V){R[V+""]=V+""}),Object.keys(R).forEach(function(V){var W;V.length>1?W=new RegExp("\\b"+f(V)+"\\b","gi"):W=new RegExp(f(V),"gi"),v=v.replace(W,R[V])});for(Z in R)ee+=Z}for(ee+=S,ee=f(ee),v=v.replace(/(^\s+|\s+$)/g,""),se=!1,ae=!1,$=0,Q=v.length;$<Q;$++)Z=v[$],p(Z,R)?se=!1:M[Z]?(Z=se&&M[Z].match(/[A-Za-z0-9]/)?" "+M[Z]:M[Z],se=!1):Z in s?($+1<Q&&o.indexOf(v[$+1])>=0?(w+=Z,Z=""):ae===!0?(Z=r[w]+s[Z],w=""):Z=se&&s[Z].match(/[A-Za-z0-9]/)?" "+s[Z]:s[Z],se=!1,ae=!1):Z in r?(w+=Z,Z="",$===Q-1&&(Z=r[w]),ae=!0):I[Z]&&!(P&&l.indexOf(Z)!==-1)&&!(E&&c.indexOf(Z)!==-1)?(Z=se||b.substr(-1).match(/[A-Za-z0-9]/)?S+I[Z]:I[Z],Z+=v[$+1]!==void 0&&v[$+1].match(/[A-Za-z0-9]/)?S:"",se=!0):(ae===!0?(Z=r[w]+Z,w="",ae=!1):se&&(/[A-Za-z0-9]/.test(Z)||b.substr(-1).match(/A-Za-z0-9]/))&&(Z=" "+Z),se=!1),b+=Z.replace(new RegExp("[^\\w\\s"+ee+"_-]","g"),S);return F&&(b=b.replace(/(\w)(\S*)/g,function(V,W,te){var pe=W.toUpperCase()+(te!==null?te:"");return Object.keys(R).indexOf(pe.toLowerCase())<0?pe:pe.toLowerCase()})),b=b.replace(/\s+/g,S).replace(new RegExp("\\"+S+"+","g"),S).replace(new RegExp("(^\\"+S+"+|\\"+S+"+$)","g"),""),x&&b.length>x&&(O=b.charAt(x)===S,b=b.slice(0,x),O||(b=b.slice(0,b.lastIndexOf(S)))),!T&&!F&&(b=b.toLowerCase()),b},h=function(v){return function(S){return d(S,v)}},f=function(v){return v.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},p=function(g,v){for(var C in v)if(v[C]===g)return!0};if(typeof t<"u"&&t.exports)t.exports=d,t.exports.createSlug=h;else if(typeof define<"u"&&define.amd)define([],function(){return d});else try{if(n.getSlug||n.createSlug)throw"speakingurl: globals exists /(getSlug|createSlug)/";n.getSlug=d,n.createSlug=h}catch{}}(e)}}),R7=jF({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js"(e,t){Qe(),t.exports=_7()}});Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe();function D7(e){var t;const n=e.name||e._componentTag||e.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__||e.__name;return n==="index"&&((t=e.__file)!=null&&t.endsWith("index.vue"))?"":n}function T7(e){const t=e.__file;if(t)return l7(c7(t,".vue"))}function KF(e,t){return e.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__=t,t}function Tb(e){if(e.__VUE_DEVTOOLS_NEXT_APP_RECORD__)return e.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(e.root)return e.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__}function qF(e){var t,n;const s=(t=e.subTree)==null?void 0:t.type,o=Tb(e);return o?((n=o==null?void 0:o.types)==null?void 0:n.Fragment)===s:!1}function wm(e){var t,n,s;const o=D7((e==null?void 0:e.type)||{});if(o)return o;if((e==null?void 0:e.root)===e)return"Root";for(const i in(n=(t=e.parent)==null?void 0:t.type)==null?void 0:n.components)if(e.parent.type.components[i]===(e==null?void 0:e.type))return KF(e,i);for(const i in(s=e.appContext)==null?void 0:s.components)if(e.appContext.components[i]===(e==null?void 0:e.type))return KF(e,i);const r=T7((e==null?void 0:e.type)||{});return r||"Anonymous Component"}function I7(e){var t,n,s;const o=(s=(n=(t=e==null?void 0:e.appContext)==null?void 0:t.app)==null?void 0:n.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__)!=null?s:0,r=e===(e==null?void 0:e.root)?"root":e.uid;return`${o}:${r}`}function Ib(e,t){return t=t||`${e.id}:root`,e.instanceMap.get(t)||e.instanceMap.get(":root")}function x7(){const e={top:0,bottom:0,left:0,right:0,get width(){return e.right-e.left},get height(){return e.bottom-e.top}};return e}var Cm;function F7(e){return Cm||(Cm=document.createRange()),Cm.selectNode(e),Cm.getBoundingClientRect()}function P7(e){const t=x7();if(!e.children)return t;for(let n=0,s=e.children.length;n<s;n++){const o=e.children[n];let r;if(o.component)r=ql(o.component);else if(o.el){const i=o.el;i.nodeType===1||i.getBoundingClientRect?r=i.getBoundingClientRect():i.nodeType===3&&i.data.trim()&&(r=F7(i))}r&&A7(t,r)}return t}function A7(e,t){return(!e.top||t.top<e.top)&&(e.top=t.top),(!e.bottom||t.bottom>e.bottom)&&(e.bottom=t.bottom),(!e.left||t.left<e.left)&&(e.left=t.left),(!e.right||t.right>e.right)&&(e.right=t.right),e}var YF={top:0,left:0,right:0,bottom:0,width:0,height:0};function ql(e){const t=e.subTree.el;return typeof window>"u"?YF:qF(e)?P7(e.subTree):(t==null?void 0:t.nodeType)===1?t==null?void 0:t.getBoundingClientRect():e.subTree.component?ql(e.subTree.component):YF}Qe();function xb(e){return qF(e)?k7(e.subTree):e.subTree?[e.subTree.el]:[]}function k7(e){if(!e.children)return[];const t=[];return e.children.forEach(n=>{n.component?t.push(...xb(n.component)):n!=null&&n.el&&t.push(n.el)}),t}var XF="__vue-devtools-component-inspector__",ZF="__vue-devtools-component-inspector__card__",JF="__vue-devtools-component-inspector__name__",QF="__vue-devtools-component-inspector__indicator__",eP={display:"block",zIndex:2147483640,position:"fixed",backgroundColor:"#42b88325",border:"1px solid #42b88350",borderRadius:"5px",transition:"all 0.1s ease-in",pointerEvents:"none"},O7={fontFamily:"Arial, Helvetica, sans-serif",padding:"5px 8px",borderRadius:"4px",textAlign:"left",position:"absolute",left:0,color:"#e9e9e9",fontSize:"14px",fontWeight:600,lineHeight:"24px",backgroundColor:"#42b883",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"},M7={display:"inline-block",fontWeight:400,fontStyle:"normal",fontSize:"12px",opacity:.7};function Eu(){return document.getElementById(XF)}function N7(){return document.getElementById(ZF)}function L7(){return document.getElementById(QF)}function V7(){return document.getElementById(JF)}function Fb(e){return{left:`${Math.round(e.left*100)/100}px`,top:`${Math.round(e.top*100)/100}px`,width:`${Math.round(e.width*100)/100}px`,height:`${Math.round(e.height*100)/100}px`}}function Pb(e){var t;const n=document.createElement("div");n.id=(t=e.elementId)!=null?t:XF,Object.assign(n.style,{...eP,...Fb(e.bounds),...e.style});const s=document.createElement("span");s.id=ZF,Object.assign(s.style,{...O7,top:e.bounds.top<35?0:"-35px"});const o=document.createElement("span");o.id=JF,o.innerHTML=`<${e.name}> `;const r=document.createElement("i");return r.id=QF,r.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`,Object.assign(r.style,M7),s.appendChild(o),s.appendChild(r),n.appendChild(s),document.body.appendChild(n),n}function Ab(e){const t=Eu(),n=N7(),s=V7(),o=L7();t&&(Object.assign(t.style,{...eP,...Fb(e.bounds)}),Object.assign(n.style,{top:e.bounds.top<35?0:"-35px"}),s.innerHTML=`<${e.name}> `,o.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`)}function B7(e){const t=ql(e);if(!t.width&&!t.height)return;const n=wm(e);Eu()?Ab({bounds:t,name:n}):Pb({bounds:t,name:n})}function tP(){const e=Eu();e&&(e.style.display="none")}var kb=null;function Ob(e){const t=e.target;if(t){const n=t.__vueParentComponent;if(n&&(kb=n,n.vnode.el)){const o=ql(n),r=wm(n);Eu()?Ab({bounds:o,name:r}):Pb({bounds:o,name:r})}}}function $7(e,t){if(e.preventDefault(),e.stopPropagation(),kb){const n=I7(kb);t(n)}}var bm=null;function H7(){tP(),window.removeEventListener("mouseover",Ob),window.removeEventListener("click",bm,!0),bm=null}function G7(){return window.addEventListener("mouseover",Ob),new Promise(e=>{function t(n){n.preventDefault(),n.stopPropagation(),$7(n,s=>{window.removeEventListener("click",t,!0),bm=null,window.removeEventListener("mouseover",Ob);const o=Eu();o&&(o.style.display="none"),e(JSON.stringify({id:s}))})}bm=t,window.addEventListener("click",t,!0)})}function U7(e){const t=Ib(Js.value,e.id);if(t){const[n]=xb(t);if(typeof n.scrollIntoView=="function")n.scrollIntoView({behavior:"smooth"});else{const s=ql(t),o=document.createElement("div"),r={...Fb(s),position:"absolute"};Object.assign(o.style,r),document.body.appendChild(o),o.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{document.body.removeChild(o)},2e3)}setTimeout(()=>{const s=ql(t);if(s.width||s.height){const o=wm(t),r=Eu();r?Ab({...e,name:o,bounds:s}):Pb({...e,name:o,bounds:s}),setTimeout(()=>{r&&(r.style.display="none")},1500)}},1200)}}Qe();var nP,sP;(sP=(nP=Dt).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__)!=null||(nP.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__=!0);function W7(e){let t=0;const n=setInterval(()=>{Dt.__VUE_INSPECTOR__&&(clearInterval(n),t+=30,e()),t>=5e3&&clearInterval(n)},30)}function z7(){const e=Dt.__VUE_INSPECTOR__,t=e.openInEditor;e.openInEditor=async(...n)=>{e.disable(),t(...n)}}function j7(){return new Promise(e=>{function t(){z7(),e(Dt.__VUE_INSPECTOR__)}Dt.__VUE_INSPECTOR__?t():W7(()=>{t()})})}Qe(),Qe();function K7(e){return!!(e&&e.__v_isReadonly)}function oP(e){return K7(e)?oP(e.__v_raw):!!(e&&e.__v_isReactive)}function Mb(e){return!!(e&&e.__v_isRef===!0)}function Kh(e){const t=e&&e.__v_raw;return t?Kh(t):e}var q7=class{constructor(){this.refEditor=new Y7}set(e,t,n,s){const o=Array.isArray(t)?t:t.split(".");for(;o.length>1;){const a=o.shift();e instanceof Map?e=e.get(a):e instanceof Set?e=Array.from(e.values())[a]:e=e[a],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}const r=o[0],i=this.refEditor.get(e)[r];s?s(e,r,n):this.refEditor.isRef(i)?this.refEditor.set(i,n):e[r]=n}get(e,t){const n=Array.isArray(t)?t:t.split(".");for(let s=0;s<n.length;s++)if(e instanceof Map?e=e.get(n[s]):e=e[n[s]],this.refEditor.isRef(e)&&(e=this.refEditor.get(e)),!e)return;return e}has(e,t,n=!1){if(typeof e>"u")return!1;const s=Array.isArray(t)?t.slice():t.split("."),o=n?2:1;for(;e&&s.length>o;){const r=s.shift();e=e[r],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}return e!=null&&Object.prototype.hasOwnProperty.call(e,s[0])}createDefaultSetCallback(e){return(t,n,s)=>{if((e.remove||e.newKey)&&(Array.isArray(t)?t.splice(n,1):Kh(t)instanceof Map?t.delete(n):Kh(t)instanceof Set?t.delete(Array.from(t.values())[n]):Reflect.deleteProperty(t,n)),!e.remove){const o=t[e.newKey||n];this.refEditor.isRef(o)?this.refEditor.set(o,s):Kh(t)instanceof Map?t.set(e.newKey||n,s):Kh(t)instanceof Set?t.add(s):t[e.newKey||n]=s}}}},Y7=class{set(e,t){if(Mb(e))e.value=t;else{if(e instanceof Set&&Array.isArray(t)){e.clear(),t.forEach(o=>e.add(o));return}const n=Object.keys(t);if(e instanceof Map){const o=new Set(e.keys());n.forEach(r=>{e.set(r,Reflect.get(t,r)),o.delete(r)}),o.forEach(r=>e.delete(r));return}const s=new Set(Object.keys(e));n.forEach(o=>{Reflect.set(e,o,Reflect.get(t,o)),s.delete(o)}),s.forEach(o=>Reflect.deleteProperty(e,o))}}get(e){return Mb(e)?e.value:e}isRef(e){return Mb(e)||oP(e)}};Qe(),Qe(),Qe();var X7="__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";function Z7(){if(typeof window>"u"||!$F||typeof localStorage>"u"||localStorage===null)return{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""};const e=typeof localStorage.getItem<"u"?localStorage.getItem(X7):null;return e?JSON.parse(e):{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""}}Qe(),Qe(),Qe();var rP,iP;(iP=(rP=Dt).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS)!=null||(rP.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS=[]);var J7=new Proxy(Dt.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS,{get(e,t,n){return Reflect.get(e,t,n)}});function Q7(e,t){vs.timelineLayersState[t.id]=!1,J7.push({...e,descriptorId:t.id,appRecord:Tb(t.app)})}var aP,lP;(lP=(aP=Dt).__VUE_DEVTOOLS_KIT_INSPECTOR__)!=null||(aP.__VUE_DEVTOOLS_KIT_INSPECTOR__=[]);var Nb=new Proxy(Dt.__VUE_DEVTOOLS_KIT_INSPECTOR__,{get(e,t,n){return Reflect.get(e,t,n)}}),cP=Su(()=>{Ru.hooks.callHook("sendInspectorToClient",uP())});function eq(e,t){var n,s;Nb.push({options:e,descriptor:t,treeFilterPlaceholder:(n=e.treeFilterPlaceholder)!=null?n:"Search tree...",stateFilterPlaceholder:(s=e.stateFilterPlaceholder)!=null?s:"Search state...",treeFilter:"",selectedNodeId:"",appRecord:Tb(t.app)}),cP()}function uP(){return Nb.filter(e=>e.descriptor.app===Js.value.app).filter(e=>e.descriptor.id!=="components").map(e=>{var t;const n=e.descriptor,s=e.options;return{id:s.id,label:s.label,logo:n.logo,icon:`custom-ic-baseline-${(t=s==null?void 0:s.icon)==null?void 0:t.replace(/_/g,"-")}`,packageName:n.packageName,homepage:n.homepage,pluginId:n.id}})}function Sm(e,t){return Nb.find(n=>n.options.id===e&&(t?n.descriptor.app===t:!0))}function tq(){const e=WF();e.hook("addInspector",({inspector:s,plugin:o})=>{eq(s,o.descriptor)});const t=Su(async({inspectorId:s,plugin:o})=>{var r;if(!s||!((r=o==null?void 0:o.descriptor)!=null&&r.app)||vs.highPerfModeEnabled)return;const i=Sm(s,o.descriptor.app),a={app:o.descriptor.app,inspectorId:s,filter:(i==null?void 0:i.treeFilter)||"",rootNodes:[]};await new Promise(l=>{e.callHookWith(async c=>{await Promise.all(c.map(u=>u(a))),l()},"getInspectorTree")}),e.callHookWith(async l=>{await Promise.all(l.map(c=>c({inspectorId:s,rootNodes:a.rootNodes})))},"sendInspectorTreeToClient")},120);e.hook("sendInspectorTree",t);const n=Su(async({inspectorId:s,plugin:o})=>{var r;if(!s||!((r=o==null?void 0:o.descriptor)!=null&&r.app)||vs.highPerfModeEnabled)return;const i=Sm(s,o.descriptor.app),a={app:o.descriptor.app,inspectorId:s,nodeId:(i==null?void 0:i.selectedNodeId)||"",state:null},l={currentTab:`custom-inspector:${s}`};a.nodeId&&await new Promise(c=>{e.callHookWith(async u=>{await Promise.all(u.map(d=>d(a,l))),c()},"getInspectorState")}),e.callHookWith(async c=>{await Promise.all(c.map(u=>u({inspectorId:s,nodeId:a.nodeId,state:a.state})))},"sendInspectorStateToClient")},120);return e.hook("sendInspectorState",n),e.hook("customInspectorSelectNode",({inspectorId:s,nodeId:o,plugin:r})=>{const i=Sm(s,r.descriptor.app);i&&(i.selectedNodeId=o)}),e.hook("timelineLayerAdded",({options:s,plugin:o})=>{Q7(s,o.descriptor)}),e.hook("timelineEventAdded",({options:s,plugin:o})=>{var r;const i=["performance","component-event","keyboard","mouse"];vs.highPerfModeEnabled||!((r=vs.timelineLayersState)!=null&&r[o.descriptor.id])&&!i.includes(s.layerId)||e.callHookWith(async a=>{await Promise.all(a.map(l=>l(s)))},"sendTimelineEventToClient")}),e.hook("getComponentInstances",async({app:s})=>{const o=s.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(!o)return null;const r=o.id.toString();return[...o.instanceMap].filter(([a])=>a.split(":")[0]===r).map(([,a])=>a)}),e.hook("getComponentBounds",async({instance:s})=>ql(s)),e.hook("getComponentName",({instance:s})=>wm(s)),e.hook("componentHighlight",({uid:s})=>{const o=Js.value.instanceMap.get(s);o&&B7(o)}),e.hook("componentUnhighlight",()=>{tP()}),e}var dP,hP;(hP=(dP=Dt).__VUE_DEVTOOLS_KIT_APP_RECORDS__)!=null||(dP.__VUE_DEVTOOLS_KIT_APP_RECORDS__=[]);var fP,pP;(pP=(fP=Dt).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__)!=null||(fP.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__={});var gP,mP;(mP=(gP=Dt).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__)!=null||(gP.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__="");var vP,yP;(yP=(vP=Dt).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__)!=null||(vP.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__=[]);var wP,CP;(CP=(wP=Dt).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__)!=null||(wP.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__=[]);var Yl="__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";function nq(){return{connected:!1,clientConnected:!1,vitePluginDetected:!0,appRecords:[],activeAppRecordId:"",tabs:[],commands:[],highPerfModeEnabled:!0,devtoolsClientDetected:{},perfUniqueGroupId:0,timelineLayersState:Z7()}}var bP,SP;(SP=(bP=Dt)[Yl])!=null||(bP[Yl]=nq());var sq=Su(e=>{Ru.hooks.callHook("devtoolsStateUpdated",{state:e})});Su((e,t)=>{Ru.hooks.callHook("devtoolsConnectedUpdated",{state:e,oldState:t})});var Em=new Proxy(Dt.__VUE_DEVTOOLS_KIT_APP_RECORDS__,{get(e,t,n){return t==="value"?Dt.__VUE_DEVTOOLS_KIT_APP_RECORDS__:Dt.__VUE_DEVTOOLS_KIT_APP_RECORDS__[t]}}),Js=new Proxy(Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__,{get(e,t,n){return t==="value"?Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__:t==="id"?Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__:Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[t]}});function EP(){sq({...Dt[Yl],appRecords:Em.value,activeAppRecordId:Js.id,tabs:Dt.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,commands:Dt.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__})}function oq(e){Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__=e,EP()}function rq(e){Dt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__=e,EP()}var vs=new Proxy(Dt[Yl],{get(e,t){return t==="appRecords"?Em:t==="activeAppRecordId"?Js.id:t==="tabs"?Dt.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__:t==="commands"?Dt.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__:Dt[Yl][t]},deleteProperty(e,t){return delete e[t],!0},set(e,t,n){return{...Dt[Yl]},e[t]=n,Dt[Yl][t]=n,!0}});function iq(e={}){var t,n,s;const{file:o,host:r,baseUrl:i=window.location.origin,line:a=0,column:l=0}=e;if(o){if(r==="chrome-extension"){const c=o.replace(/\\/g,"\\\\"),u=(n=(t=window.VUE_DEVTOOLS_CONFIG)==null?void 0:t.openInEditorHost)!=null?n:"/";fetch(`${u}__open-in-editor?file=${encodeURI(o)}`).then(d=>{if(!d.ok){const h=`Opening component ${c} failed`;console.log(`%c${h}`,"color:red")}})}else if(vs.vitePluginDetected){const c=(s=Dt.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__)!=null?s:i;Dt.__VUE_INSPECTOR__.openInEditor(c,o,a,l)}}}Qe(),Qe(),Qe(),Qe(),Qe();var _P,RP;(RP=(_P=Dt).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__)!=null||(_P.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__=[]);var Lb=new Proxy(Dt.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__,{get(e,t,n){return Reflect.get(e,t,n)}});function Vb(e){const t={};return Object.keys(e).forEach(n=>{t[n]=e[n].defaultValue}),t}function Bb(e){return`__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${e}__`}function aq(e){var t,n,s;const o=(n=(t=Lb.find(r=>{var i;return r[0].id===e&&!!((i=r[0])!=null&&i.settings)}))==null?void 0:t[0])!=null?n:null;return(s=o==null?void 0:o.settings)!=null?s:null}function DP(e,t){var n,s,o;const r=Bb(e);if(r){const i=localStorage.getItem(r);if(i)return JSON.parse(i)}if(e){const i=(s=(n=Lb.find(a=>a[0].id===e))==null?void 0:n[0])!=null?s:null;return Vb((o=i==null?void 0:i.settings)!=null?o:{})}return Vb(t)}function lq(e,t){const n=Bb(e);localStorage.getItem(n)||localStorage.setItem(n,JSON.stringify(Vb(t)))}function cq(e,t,n){const s=Bb(e),o=localStorage.getItem(s),r=JSON.parse(o||"{}"),i={...r,[t]:n};localStorage.setItem(s,JSON.stringify(i)),Ru.hooks.callHookWith(a=>{a.forEach(l=>l({pluginId:e,key:t,oldValue:r[t],newValue:n,settings:i}))},"setPluginSettings")}Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe();var TP,IP,Oo=(IP=(TP=Dt).__VUE_DEVTOOLS_HOOK)!=null?IP:TP.__VUE_DEVTOOLS_HOOK=WF(),uq={vueAppInit(e){Oo.hook("app:init",e)},vueAppUnmount(e){Oo.hook("app:unmount",e)},vueAppConnected(e){Oo.hook("app:connected",e)},componentAdded(e){return Oo.hook("component:added",e)},componentEmit(e){return Oo.hook("component:emit",e)},componentUpdated(e){return Oo.hook("component:updated",e)},componentRemoved(e){return Oo.hook("component:removed",e)},setupDevtoolsPlugin(e){Oo.hook("devtools-plugin:setup",e)},perfStart(e){return Oo.hook("perf:start",e)},perfEnd(e){return Oo.hook("perf:end",e)}},xP={on:uq,setupDevToolsPlugin(e,t){return Oo.callHook("devtools-plugin:setup",e,t)}},dq=class{constructor({plugin:e,ctx:t}){this.hooks=t.hooks,this.plugin=e}get on(){return{visitComponentTree:e=>{this.hooks.hook("visitComponentTree",e)},inspectComponent:e=>{this.hooks.hook("inspectComponent",e)},editComponentState:e=>{this.hooks.hook("editComponentState",e)},getInspectorTree:e=>{this.hooks.hook("getInspectorTree",e)},getInspectorState:e=>{this.hooks.hook("getInspectorState",e)},editInspectorState:e=>{this.hooks.hook("editInspectorState",e)},inspectTimelineEvent:e=>{this.hooks.hook("inspectTimelineEvent",e)},timelineCleared:e=>{this.hooks.hook("timelineCleared",e)},setPluginSettings:e=>{this.hooks.hook("setPluginSettings",e)}}}notifyComponentUpdate(e){var t;if(vs.highPerfModeEnabled)return;const n=uP().find(s=>s.packageName===this.plugin.descriptor.packageName);if(n!=null&&n.id){if(e){const s=[e.appContext.app,e.uid,(t=e.parent)==null?void 0:t.uid,e];Oo.callHook("component:updated",...s)}else Oo.callHook("component:updated");this.hooks.callHook("sendInspectorState",{inspectorId:n.id,plugin:this.plugin})}}addInspector(e){this.hooks.callHook("addInspector",{inspector:e,plugin:this.plugin}),this.plugin.descriptor.settings&&lq(e.id,this.plugin.descriptor.settings)}sendInspectorTree(e){vs.highPerfModeEnabled||this.hooks.callHook("sendInspectorTree",{inspectorId:e,plugin:this.plugin})}sendInspectorState(e){vs.highPerfModeEnabled||this.hooks.callHook("sendInspectorState",{inspectorId:e,plugin:this.plugin})}selectInspectorNode(e,t){this.hooks.callHook("customInspectorSelectNode",{inspectorId:e,nodeId:t,plugin:this.plugin})}visitComponentTree(e){return this.hooks.callHook("visitComponentTree",e)}now(){return vs.highPerfModeEnabled?0:Date.now()}addTimelineLayer(e){this.hooks.callHook("timelineLayerAdded",{options:e,plugin:this.plugin})}addTimelineEvent(e){vs.highPerfModeEnabled||this.hooks.callHook("timelineEventAdded",{options:e,plugin:this.plugin})}getSettings(e){return DP(e??this.plugin.descriptor.id,this.plugin.descriptor.settings)}getComponentInstances(e){return this.hooks.callHook("getComponentInstances",{app:e})}getComponentBounds(e){return this.hooks.callHook("getComponentBounds",{instance:e})}getComponentName(e){return this.hooks.callHook("getComponentName",{instance:e})}highlightElement(e){const t=e.__VUE_DEVTOOLS_NEXT_UID__;return this.hooks.callHook("componentHighlight",{uid:t})}unhighlightElement(){return this.hooks.callHook("componentUnhighlight")}},hq=dq;Qe(),Qe(),Qe(),Qe();var fq="__vue_devtool_undefined__",pq="__vue_devtool_infinity__",gq="__vue_devtool_negative_infinity__",mq="__vue_devtool_nan__";Qe(),Qe();var vq={[fq]:"undefined",[mq]:"NaN",[pq]:"Infinity",[gq]:"-Infinity"};Object.entries(vq).reduce((e,[t,n])=>(e[n]=t,e),{}),Qe(),Qe(),Qe(),Qe(),Qe();var FP,PP;(PP=(FP=Dt).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__)!=null||(FP.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__=new Set);function AP(e,t){return xP.setupDevToolsPlugin(e,t)}function yq(e,t){const[n,s]=e;if(n.app!==t)return;const o=new hq({plugin:{setupFn:s,descriptor:n},ctx:Ru});n.packageName==="vuex"&&o.on.editInspectorState(r=>{o.sendInspectorState(r.inspectorId)}),s(o)}function kP(e,t){Dt.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(e)||vs.highPerfModeEnabled&&!(t!=null&&t.inspectingComponent)||(Dt.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(e),Lb.forEach(n=>{yq(n,e)}))}Qe(),Qe();var qh="__VUE_DEVTOOLS_ROUTER__",_u="__VUE_DEVTOOLS_ROUTER_INFO__",OP,MP;(MP=(OP=Dt)[_u])!=null||(OP[_u]={currentRoute:null,routes:[]});var NP,LP;(LP=(NP=Dt)[qh])!=null||(NP[qh]={}),new Proxy(Dt[_u],{get(e,t){return Dt[_u][t]}}),new Proxy(Dt[qh],{get(e,t){if(t==="value")return Dt[qh]}});function wq(e){const t=new Map;return((e==null?void 0:e.getRoutes())||[]).filter(n=>!t.has(n.path)&&t.set(n.path,1))}function $b(e){return e.map(t=>{let{path:n,name:s,children:o,meta:r}=t;return o!=null&&o.length&&(o=$b(o)),{path:n,name:s,children:o,meta:r}})}function Cq(e){if(e){const{fullPath:t,hash:n,href:s,path:o,name:r,matched:i,params:a,query:l}=e;return{fullPath:t,hash:n,href:s,path:o,name:r,params:a,query:l,matched:$b(i)}}return e}function bq(e,t){function n(){var s;const o=(s=e.app)==null?void 0:s.config.globalProperties.$router,r=Cq(o==null?void 0:o.currentRoute.value),i=$b(wq(o)),a=console.warn;console.warn=()=>{},Dt[_u]={currentRoute:r?GF(r):{},routes:GF(i)},Dt[qh]=o,console.warn=a}n(),xP.on.componentUpdated(Su(()=>{var s;((s=t.value)==null?void 0:s.app)===e.app&&(n(),!vs.highPerfModeEnabled&&Ru.hooks.callHook("routerInfoUpdated",{state:Dt[_u]}))},200))}function Sq(e){return{async getInspectorTree(t){const n={...t,app:Js.value.app,rootNodes:[]};return await new Promise(s=>{e.callHookWith(async o=>{await Promise.all(o.map(r=>r(n))),s()},"getInspectorTree")}),n.rootNodes},async getInspectorState(t){const n={...t,app:Js.value.app,state:null},s={currentTab:`custom-inspector:${t.inspectorId}`};return await new Promise(o=>{e.callHookWith(async r=>{await Promise.all(r.map(i=>i(n,s))),o()},"getInspectorState")}),n.state},editInspectorState(t){const n=new q7,s={...t,app:Js.value.app,set:(o,r=t.path,i=t.state.value,a)=>{n.set(o,r,i,a||n.createDefaultSetCallback(t.state))}};e.callHookWith(o=>{o.forEach(r=>r(s))},"editInspectorState")},sendInspectorState(t){const n=Sm(t);e.callHook("sendInspectorState",{inspectorId:t,plugin:{descriptor:n.descriptor,setupFn:()=>({})}})},inspectComponentInspector(){return G7()},cancelInspectComponentInspector(){return H7()},getComponentRenderCode(t){const n=Ib(Js.value,t);if(n)return typeof(n==null?void 0:n.type)!="function"?n.render.toString():n.type.toString()},scrollToComponent(t){return U7({id:t})},openInEditor:iq,getVueInspector:j7,toggleApp(t,n){const s=Em.value.find(o=>o.id===t);s&&(rq(t),oq(s),bq(s,Js),cP(),kP(s.app,n))},inspectDOM(t){const n=Ib(Js.value,t);if(n){const[s]=xb(n);s&&(Dt.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__=s)}},updatePluginSettings(t,n,s){cq(t,n,s)},getPluginSettings(t){return{options:aq(t),values:DP(t)}}}}Qe();var VP,BP;(BP=(VP=Dt).__VUE_DEVTOOLS_ENV__)!=null||(VP.__VUE_DEVTOOLS_ENV__={vitePluginDetected:!1});var $P=tq(),HP,GP;(GP=(HP=Dt).__VUE_DEVTOOLS_KIT_CONTEXT__)!=null||(HP.__VUE_DEVTOOLS_KIT_CONTEXT__={hooks:$P,get state(){return{...vs,activeAppRecordId:Js.id,activeAppRecord:Js.value,appRecords:Em.value}},api:Sq($P)});var Ru=Dt.__VUE_DEVTOOLS_KIT_CONTEXT__;Qe(),E7(R7());var UP,WP;(WP=(UP=Dt).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__)!=null||(UP.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__={id:0,appIds:new Set}),Qe(),Qe();function Eq(e){vs.highPerfModeEnabled=e??!vs.highPerfModeEnabled,!e&&Js.value&&kP(Js.value.app)}Qe(),Qe(),Qe();function _q(e){vs.devtoolsClientDetected={...vs.devtoolsClientDetected,...e};const t=Object.values(vs.devtoolsClientDetected).some(Boolean);Eq(!t)}var zP,jP;(jP=(zP=Dt).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__)!=null||(zP.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__=_q),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe();var Rq=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},KP=class{constructor(t){this.generateIdentifier=t,this.kv=new Rq}register(t,n){this.kv.getByValue(t)||(n||(n=this.generateIdentifier(t)),this.kv.set(n,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}},Dq=class extends KP{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t=="object"?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};Qe(),Qe();function Tq(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function Iq(e,t){const n=Tq(e);if("find"in n)return n.find(t);const s=n;for(let o=0;o<s.length;o++){const r=s[o];if(t(r))return r}}function Du(e,t){Object.entries(e).forEach(([n,s])=>t(s,n))}function _m(e,t){return e.indexOf(t)!==-1}function qP(e,t){for(let n=0;n<e.length;n++){const s=e[n];if(t(s))return s}}var xq=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return Iq(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}};Qe(),Qe();var Fq=e=>Object.prototype.toString.call(e).slice(8,-1),YP=e=>typeof e>"u",Pq=e=>e===null,Yh=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,Hb=e=>Yh(e)&&Object.keys(e).length===0,Ga=e=>Array.isArray(e),Aq=e=>typeof e=="string",kq=e=>typeof e=="number"&&!isNaN(e),Oq=e=>typeof e=="boolean",Mq=e=>e instanceof RegExp,Xh=e=>e instanceof Map,Zh=e=>e instanceof Set,XP=e=>Fq(e)==="Symbol",Nq=e=>e instanceof Date&&!isNaN(e.valueOf()),Lq=e=>e instanceof Error,ZP=e=>typeof e=="number"&&isNaN(e),Vq=e=>Oq(e)||Pq(e)||YP(e)||kq(e)||Aq(e)||XP(e),Bq=e=>typeof e=="bigint",$q=e=>e===1/0||e===-1/0,Hq=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),Gq=e=>e instanceof URL;Qe();var JP=e=>e.replace(/\./g,"\\."),Gb=e=>e.map(String).map(JP).join("."),Jh=e=>{const t=[];let n="";for(let o=0;o<e.length;o++){let r=e.charAt(o);if(r==="\\"&&e.charAt(o+1)==="."){n+=".",o++;continue}if(r==="."){t.push(n),n="";continue}n+=r}const s=n;return t.push(s),t};Qe();function li(e,t,n,s){return{isApplicable:e,annotation:t,transform:n,untransform:s}}var QP=[li(YP,"undefined",()=>null,()=>{}),li(Bq,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),li(Nq,"Date",e=>e.toISOString(),e=>new Date(e)),li(Lq,"Error",(e,t)=>{const n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(s=>{n[s]=e[s]}),n},(e,t)=>{const n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(s=>{n[s]=e[s]}),n}),li(Mq,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),li(Zh,"set",e=>[...e.values()],e=>new Set(e)),li(Xh,"map",e=>[...e.entries()],e=>new Map(e)),li(e=>ZP(e)||$q(e),"number",e=>ZP(e)?"NaN":e>0?"Infinity":"-Infinity",Number),li(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),li(Gq,"URL",e=>e.toString(),e=>new URL(e))];function Rm(e,t,n,s){return{isApplicable:e,annotation:t,transform:n,untransform:s}}var eA=Rm((e,t)=>XP(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const s=n.symbolRegistry.getValue(t[1]);if(!s)throw new Error("Trying to deserialize unknown symbol");return s}),Uq=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),tA=Rm(Hq,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=Uq[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function nA(e,t){return e!=null&&e.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var sA=Rm(nA,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const s={};return n.forEach(o=>{s[o]=e[o]}),s},(e,t,n)=>{const s=n.classRegistry.getValue(t[1]);if(!s)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(s.prototype),e)}),oA=Rm((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const s=n.customTransformerRegistry.findByName(t[1]);if(!s)throw new Error("Trying to deserialize unknown custom value");return s.deserialize(e)}),Wq=[sA,eA,oA,tA],rA=(e,t)=>{const n=qP(Wq,o=>o.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const s=qP(QP,o=>o.isApplicable(e,t));if(s)return{value:s.transform(e,t),type:s.annotation}},iA={};QP.forEach(e=>{iA[e.annotation]=e});var zq=(e,t,n)=>{if(Ga(t))switch(t[0]){case"symbol":return eA.untransform(e,t,n);case"class":return sA.untransform(e,t,n);case"custom":return oA.untransform(e,t,n);case"typed-array":return tA.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const s=iA[t];if(!s)throw new Error("Unknown transformation: "+t);return s.untransform(e,n)}};Qe();var Tu=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function aA(e){if(_m(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(_m(e,"prototype"))throw new Error("prototype is not allowed as a property");if(_m(e,"constructor"))throw new Error("constructor is not allowed as a property")}var jq=(e,t)=>{aA(t);for(let n=0;n<t.length;n++){const s=t[n];if(Zh(e))e=Tu(e,+s);else if(Xh(e)){const o=+s,r=+t[++n]==0?"key":"value",i=Tu(e,o);switch(r){case"key":e=i;break;case"value":e=e.get(i);break}}else e=e[s]}return e},Ub=(e,t,n)=>{if(aA(t),t.length===0)return n(e);let s=e;for(let r=0;r<t.length-1;r++){const i=t[r];if(Ga(s)){const a=+i;s=s[a]}else if(Yh(s))s=s[i];else if(Zh(s)){const a=+i;s=Tu(s,a)}else if(Xh(s)){if(r===t.length-2)break;const l=+i,c=+t[++r]==0?"key":"value",u=Tu(s,l);switch(c){case"key":s=u;break;case"value":s=s.get(u);break}}}const o=t[t.length-1];if(Ga(s)?s[+o]=n(s[+o]):Yh(s)&&(s[o]=n(s[o])),Zh(s)){const r=Tu(s,+o),i=n(r);r!==i&&(s.delete(r),s.add(i))}if(Xh(s)){const r=+t[t.length-2],i=Tu(s,r);switch(+o==0?"key":"value"){case"key":{const l=n(i);s.set(l,s.get(i)),l!==i&&s.delete(i);break}case"value":{s.set(i,n(s.get(i)));break}}}return e};function Wb(e,t,n=[]){if(!e)return;if(!Ga(e)){Du(e,(r,i)=>Wb(r,t,[...n,...Jh(i)]));return}const[s,o]=e;o&&Du(o,(r,i)=>{Wb(r,t,[...n,...Jh(i)])}),t(s,n)}function Kq(e,t,n){return Wb(t,(s,o)=>{e=Ub(e,o,r=>zq(r,s,n))}),e}function qq(e,t){function n(s,o){const r=jq(e,Jh(o));s.map(Jh).forEach(i=>{e=Ub(e,i,()=>r)})}if(Ga(t)){const[s,o]=t;s.forEach(r=>{e=Ub(e,Jh(r),()=>e)}),o&&Du(o,n)}else Du(t,n);return e}var Yq=(e,t)=>Yh(e)||Ga(e)||Xh(e)||Zh(e)||nA(e,t);function Xq(e,t,n){const s=n.get(e);s?s.push(t):n.set(e,[t])}function Zq(e,t){const n={};let s;return e.forEach(o=>{if(o.length<=1)return;t||(o=o.map(a=>a.map(String)).sort((a,l)=>a.length-l.length));const[r,...i]=o;r.length===0?s=i.map(Gb):n[Gb(r)]=i.map(Gb)}),s?Hb(n)?[s]:[s,n]:Hb(n)?void 0:n}var lA=(e,t,n,s,o=[],r=[],i=new Map)=>{var a;const l=Vq(e);if(!l){Xq(e,o,t);const p=i.get(e);if(p)return s?{transformedValue:null}:p}if(!Yq(e,n)){const p=rA(e,n),g=p?{transformedValue:p.value,annotations:[p.type]}:{transformedValue:e};return l||i.set(e,g),g}if(_m(r,e))return{transformedValue:null};const c=rA(e,n),u=(a=c==null?void 0:c.value)!=null?a:e,d=Ga(u)?[]:{},h={};Du(u,(p,g)=>{if(g==="__proto__"||g==="constructor"||g==="prototype")throw new Error(`Detected property ${g}. This is a prototype pollution risk, please remove it from your object.`);const v=lA(p,t,n,s,[...o,g],[...r,e],i);d[g]=v.transformedValue,Ga(v.annotations)?h[g]=v.annotations:Yh(v.annotations)&&Du(v.annotations,(C,S)=>{h[JP(g)+"."+S]=C})});const f=Hb(h)?{transformedValue:d,annotations:c?[c.type]:void 0}:{transformedValue:d,annotations:c?[c.type,h]:h};return l||i.set(e,f),f};Qe(),Qe();function cA(e){return Object.prototype.toString.call(e).slice(8,-1)}function uA(e){return cA(e)==="Array"}function Jq(e){if(cA(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function Qq(e,t,n,s,o){const r={}.propertyIsEnumerable.call(s,t)?"enumerable":"nonenumerable";r==="enumerable"&&(e[t]=n),o&&r==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function zb(e,t={}){if(uA(e))return e.map(o=>zb(o,t));if(!Jq(e))return e;const n=Object.getOwnPropertyNames(e),s=Object.getOwnPropertySymbols(e);return[...n,...s].reduce((o,r)=>{if(uA(t.props)&&!t.props.includes(r))return o;const i=e[r],a=zb(i,t);return Qq(o,r,a,e,t.nonenumerable),o},{})}var Pn=class{constructor({dedupe:e=!1}={}){this.classRegistry=new Dq,this.symbolRegistry=new KP(t=>{var n;return(n=t.description)!=null?n:""}),this.customTransformerRegistry=new xq,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,n=lA(e,t,this,this.dedupe),s={json:n.transformedValue};n.annotations&&(s.meta={...s.meta,values:n.annotations});const o=Zq(t,this.dedupe);return o&&(s.meta={...s.meta,referentialEqualities:o}),s}deserialize(e){const{json:t,meta:n}=e;let s=zb(t);return n!=null&&n.values&&(s=Kq(s,n.values,this)),n!=null&&n.referentialEqualities&&(s=qq(s,n.referentialEqualities)),s}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e))}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};Pn.defaultInstance=new Pn,Pn.serialize=Pn.defaultInstance.serialize.bind(Pn.defaultInstance),Pn.deserialize=Pn.defaultInstance.deserialize.bind(Pn.defaultInstance),Pn.stringify=Pn.defaultInstance.stringify.bind(Pn.defaultInstance),Pn.parse=Pn.defaultInstance.parse.bind(Pn.defaultInstance),Pn.registerClass=Pn.defaultInstance.registerClass.bind(Pn.defaultInstance),Pn.registerSymbol=Pn.defaultInstance.registerSymbol.bind(Pn.defaultInstance),Pn.registerCustom=Pn.defaultInstance.registerCustom.bind(Pn.defaultInstance),Pn.allowErrorProps=Pn.defaultInstance.allowErrorProps.bind(Pn.defaultInstance),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe();var dA,hA;(hA=(dA=Dt).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__)!=null||(dA.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__=[]);var fA,pA;(pA=(fA=Dt).__VUE_DEVTOOLS_KIT_RPC_CLIENT__)!=null||(fA.__VUE_DEVTOOLS_KIT_RPC_CLIENT__=null);var gA,mA;(mA=(gA=Dt).__VUE_DEVTOOLS_KIT_RPC_SERVER__)!=null||(gA.__VUE_DEVTOOLS_KIT_RPC_SERVER__=null);var vA,yA;(yA=(vA=Dt).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__)!=null||(vA.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__=null);var wA,CA;(CA=(wA=Dt).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__)!=null||(wA.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__=null);var bA,SA;(SA=(bA=Dt).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__)!=null||(bA.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__=null),Qe(),Qe(),Qe(),Qe(),Qe(),Qe(),Qe();/*!
|
|
137
137
|
* pinia v3.0.4
|
|
138
138
|
* (c) 2025 Eduardo San Martin Morote
|
|
139
139
|
* @license MIT
|
|
@@ -257,4 +257,4 @@ See ${tL(e,t)}`;return Array.isArray(s)?s.concat(r):[s,r]}var Ige={1:"Charting A
|
|
|
257
257
|
If you are trying to annotate ${s} with application data, use the '${s}.context' property instead.`),jf(u)}if(a.length>0&&o){const l=this.beans.frameworkOverrides.getDocLink(o);jf(`to see all the valid ${s} properties please check: ${l}`)}}};function Yge(e,t,n){const s={},o=e.filter(r=>!t.some(i=>i===r));if(o.length>0)for(const r of o)s[r]=n0({inputValue:r,allSuggestions:n}).values;return s}var Xge=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),Zge={moduleName:"Validation",version:ut,beans:[qge]};function eB(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var Jge=class extends We{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=["excludeChildrenWhenTreeDataFiltering"]}wireBeans(e){this.filterManager=e.filterManager}execute(e){const{changedPath:t}=e;this.filter(t)}filter(e){var n;const t=!!((n=this.filterManager)!=null&&n.isChildFilterPresent());this.filterNodes(t,e)}filterNodes(e,t){const n=(s,o)=>{s.hasChildren()&&e&&!o?s.childrenAfterFilter=s.childrenAfterGroup.filter(r=>{const i=r.childrenAfterFilter&&r.childrenAfterFilter.length>0,a=r.data&&this.filterManager.doesRowPassFilter({rowNode:r});return i||a}):s.childrenAfterFilter=s.childrenAfterGroup,eB(s)};if(this.doingTreeDataFiltering()){const s=(r,i)=>{if(r.childrenAfterGroup)for(let a=0;a<r.childrenAfterGroup.length;a++){const l=r.childrenAfterGroup[a],c=i||this.filterManager.doesRowPassFilter({rowNode:l});l.childrenAfterGroup?s(r.childrenAfterGroup[a],c):n(l,c)}n(r,i)},o=r=>s(r,!1);t.executeFromRootNode(o)}else{const s=o=>n(o,!1);t.forEachChangedNodeDepthFirst(s,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}},Qge=class extends A0{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,n,s,o){this.comp=e;const r=Qf(this,this.beans.context,o);this.eButtonShowMainFilter=n,this.eFloatingFilterBody=s,this.setGui(t,r),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(r),this.setupLeft(r),this.setupHover(r),this.setupFocus(r),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(r),this.setupUi(),r.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(r);const i=()=>this.onColDefChanged(r);r.addManagedListeners(this.column,{colDefChanged:i}),r.addManagedEventListeners({filterSwitched:({column:a})=>{a===this.column&&i()}}),r.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,n=e.colDef;return Pt(t.gos,{colDef:n,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,n=!!e.floatingFilter;this.active=t&&n}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=hr("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new wd(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.getLocaleTextFunc();od(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){var i;const{beans:t}=this;if(Un(t)===this.eGui)return;const o=Sc(t,this.eGui,null,e.shiftKey);if(o){(i=t.headerNavigation)==null||i.scrollToColumn(this.column),e.preventDefault(),o.focus();return}const r=this.findNextColumnWithFloatingFilter(e.shiftKey);r&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:r},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let n=this.column;do if(n=e?t.getColBefore(n):t.getColAfter(n),!n)break;while(!n.getColDef().filter||!n.getColDef().floatingFilter);return n}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case Oe.UP:case Oe.DOWN:case Oe.LEFT:case Oe.RIGHT:if(t)return;Rc(e);case Oe.ENTER:t&&bc(this.eGui)&&e.preventDefault();break;case Oe.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const n=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),s=!!e.relatedTarget&&pc(e.relatedTarget,"ag-floating-filter");if(n&&s&&e.target===this.eGui){const o=this.lastFocusEvent,r=!!(o&&o.key===Oe.TAB);if(o&&r){const i=o.shiftKey;bc(this.eGui,i)}}this.focusThis()}setupHover(e){var t;(t=this.beans.colHover)==null||t.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new P0(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){var e;this.suppressFilterButton=!((e=this.beans.menuSvc)!=null&&e.isFloatingFilterButtonEnabled(this.column)),this.highlightFilterButtonWhenActive=!$o(this.gos)}setupUserComp(){var t;if(!this.active)return;const e=(t=this.beans.colFilter)==null?void 0:t.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){var t;const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;(t=this.beans.menuSvc)==null||t.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{beans:{colFilter:t},column:n,gos:s}=this,o=r=>{if((r==null?void 0:r.source)==="filterDestroyed"&&(!this.isAlive()||!(t!=null&&t.isAlive())))return;const i=this.comp.getFloatingFilterComp();i&&i.then(a=>{if(a){if(s.get("enableFilterHandlers")){const u=r;let d="filter";u!=null&&u.afterFloatingFilter?d="ui":u!=null&&u.afterDataChange?d="dataChanged":(r==null?void 0:r.source)==="api"&&(d="api"),this.updateFloatingFilterParams(this.userCompDetails,d);return}const l=t==null?void 0:t.getCurrentFloatingFilterParentModel(n),c=r?{...r,columns:r.columns??[],source:r.source==="api"?"api":"columnFilter"}:null;a.onParentModelChanged(l,c)}})};[this.destroySyncListener]=e.addManagedListeners(n,{filterChanged:o}),t!=null&&t.isFilterActive(n)&&o(null)}setupWidth(e){const t=()=>{const n=`${this.column.getActualWidth()}px`;this.comp.setWidth(n)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){var e;if(!this.suppressFilterButton&&this.comp){const t=!!((e=this.beans.filterManager)!=null&&e.isFilterAllowed(this.column));this.comp.setButtonWrapperDisplayed(t),this.highlightFilterButtonWhenActive&&t&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive();const n=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const s=this.beans.colFilter,o=this.active?s==null?void 0:s.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,r=this.comp.getFloatingFilterComp();!r||!o?this.updateCompDetails(e,o,n):r.then(i=>{!i||s!=null&&s.areFilterCompsDifferent(this.userCompDetails??null,o)?this.updateCompDetails(e,o,n):this.updateFloatingFilterParams(o,"colDef")})}updateCompDetails(e,t,n){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),n&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){var s;if(!e)return;let n=e.params;(s=this.comp.getFloatingFilterComp())==null||s.then(o=>{var r;typeof(o==null?void 0:o.refresh)=="function"&&(this.gos.get("enableFilterHandlers")&&(n={...n,model:Ts(((r=this.beans.colFilter)==null?void 0:r.model)??{},this.column.getColId()),source:t}),o.refresh(n))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function eme(e,t){var s;const n=e.colModel.getCol(t);if(!n){_n(12,{colKey:t});return}(s=e.menuSvc)==null||s.showColumnMenu({column:n,positionBy:"auto"})}function tme(e){var t;(t=e.menuSvc)==null||t.hidePopupMenu()}var nme={moduleName:"SharedMenu",version:ut,beans:[fce],apiFunctions:{showColumnMenu:eme,hidePopupMenu:tme}},sme=class extends Oae{postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getDefaultPopupParent(){return this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:n,event:s}=e,o=t.getBoundingClientRect(),r=this.getParentRect();this.setAlignedTo(t,n);let i=!1;const a=()=>{const l=this.keepXYWithinBounds(n,o.top-r.top,0),c=n.clientWidth>0?n.clientWidth:200;i||(n.style.minWidth=`${c}px`,i=!0);const d=r.right-r.left-c;let h;return this.gos.get("enableRtl")?(h=p(),h<0&&(h=f(),this.setAlignedStyles(n,"left")),h>d&&(h=0,this.setAlignedStyles(n,"right"))):(h=f(),h>d&&(h=p(),this.setAlignedStyles(n,"right")),h<0&&(h=0,this.setAlignedStyles(n,"left"))),{x:h,y:l};function f(){return o.right-r.left-2}function p(){return o.left-r.left-c}};this.positionPopup({ePopup:n,keepWithinBounds:!0,updatePosition:a,postProcessCallback:()=>this.callPostProcessPopup(e,"subMenu",n,t,s instanceof MouseEvent?s:void 0)})}callPostProcessPopup(e,t,n,s,o){const r=this.gos.getCallback("postProcessPopup");if(r){const{column:i,rowNode:a}=e;r({column:i,rowNode:a,ePopup:n,type:t,eventSource:s,mouseEvent:o})}}getActivePopups(){return this.popupList.map(e=>e.element)}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const n of this.popupList)t.applyThemeClasses(n.wrapper)}}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return ga(e)}},Ry={moduleName:"Popup",version:ut,beans:[sme]},ome=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper,:where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}:where(.ag-floating-filter-full-body)>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function rme(e){const t=e.filterManager;return!!(t!=null&&t.isColumnFilterPresent())||!!(t!=null&&t.isAggregateFilterPresent())}function ime(e,t){var n;return((n=e.filterManager)==null?void 0:n.getColumnFilterInstance(t))??Promise.resolve(void 0)}function ame(e,t){var s;const n=e.colModel.getColDefCol(t);if(n)return(s=e.colFilter)==null?void 0:s.destroyFilter(n,"api")}function lme(e,t){e.frameworkOverrides.wrapIncoming(()=>{var n;return(n=e.filterManager)==null?void 0:n.setFilterModel(t)})}function cme(e){var t;return((t=e.filterManager)==null?void 0:t.getFilterModel())??{}}function ume(e,t,n){const{gos:s,colModel:o,colFilter:r}=e;n&&!s.get("enableFilterHandlers")&&(Je(288),n=!1);const i=o.getColDefCol(t);return i?(r==null?void 0:r.getModelForColumn(i,n))??null:null}function dme(e,t,n){var s;return((s=e.filterManager)==null?void 0:s.setColumnFilterModel(t,n))??Promise.resolve()}function hme(e,t){var s;const n=e.colModel.getCol(t);if(!n){_n(12,{colKey:t});return}(s=e.menuSvc)==null||s.showFilterMenu({column:n,containerType:"columnFilter",positionBy:"auto"})}function fme(e){var t;(t=e.menuSvc)==null||t.hideFilterMenu()}function pme(e,t){var s;const n=e.colModel.getCol(t);if(!n){_n(12,{colKey:t});return}return(s=e.colFilter)==null?void 0:s.getHandler(n,!0)}function gme(e,t){const{colModel:n,colFilter:s,gos:o}=e;if(!o.get("enableFilterHandlers")){Je(287);return}const{colId:r,action:i}=t;if(r){const a=n.getColById(r);a&&(s==null||s.updateModel(a,i))}else s==null||s.updateAllModels(i)}var mme={filterHandler:()=>({doesFilterPass:()=>!0})},vme=class extends We{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...dV},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){var n,s;this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)});const e=this.gos,t={...((s=(n=e.get("initialState"))==null?void 0:n.filter)==null?void 0:s.filterModel)??{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",n){const{colModel:s,dataTypeSvc:o,filterManager:r}=this.beans;if(o!=null&&o.isPendingInference){this.modelUpdates.push({model:e,source:t});return}const i=[],a=this.getModel(!0);if(e){const l=new Set(Object.keys(e));this.allColumnFilters.forEach((c,u)=>{const d=e[u];i.push(this.setModelOnFilterWrapper(c,d)),l.delete(u)}),l.forEach(c=>{const u=s.getColDefCol(c)||s.getCol(c);if(!u){Je(62,{colId:c});return}if(!u.isFilterAllowed()){Je(63,{colId:c});return}const d=this.getOrCreateFilterWrapper(u,!0);if(!d){Je(64,{colId:c});return}i.push(this.setModelOnFilterWrapper(d,e[c],!0))})}else this.model={},this.allColumnFilters.forEach(l=>{i.push(this.setModelOnFilterWrapper(l,null))});jn.all(i).then(()=>{const l=this.getModel(!0),c=[];this.allColumnFilters.forEach((u,d)=>{const h=a?a[d]:null,f=l?l[d]:null;Mf(h,f)||c.push(u.column)}),c.length>0?r==null||r.onFilterChanged({columns:c,source:t}):n&&this.updateActive("filterChanged")})}getModel(e){var r;const t={},{allColumnFilters:n,initialModel:s,beans:{colModel:o}}=this;if(n.forEach((i,a)=>{const l=this.getModelFromFilterWrapper(i);ht(l)&&(t[a]=l)}),!e)for(const i of Object.keys(s)){const a=s[i];ht(a)&&!n.has(i)&&((r=o.getCol(i))!=null&&r.isFilterAllowed())&&(t[i]=a)}return t}setState(e,t,n="api"){if(this.state.clear(),t)for(const s of Object.keys(t)){const o=t[s];this.state.set(s,{model:Ts(this.model,s),state:o})}this.setModel(e,n,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let n=!1;return e.forEach((s,o)=>{const r=s.state;r!=null&&(n=!0,t[o]=r)}),n?t:void 0}getModelFromFilterWrapper(e){const n=e.column.getColId();if(e.isHandler)return Ts(this.model,n);const s=e.filter;return s?typeof s.getModel!="function"?(Je(66),null):s.getModel():Ts(this.initialModel,n)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}updateActiveFilters(){const e=c=>c?c.isFilterActive?c.isFilterActive():(Je(67),!1):!1,{colModel:t,gos:n}=this.beans,s=!!NE(n),o=c=>{if(!c.isPrimary())return!0;const d=!t.isPivotActive();return!c.isValueActive()||!d?!1:t.isPivotMode()?!0:s},r=[],i=[],a=(c,u,d)=>{u&&(o(c)?r.push(d):i.push(d))},l=[];return this.allColumnFilters.forEach(c=>{const u=c.column,d=u.getColId();if(c.isHandler)l.push(jn.resolve().then(()=>{a(u,this.isHandlerActive(u),{colId:d,isHandler:!0,handler:c.handler,handlerParams:c.handlerParams})}));else{const h=ul(c);h&&l.push(h.then(f=>{a(u,e(f),{colId:d,isHandler:!1,comp:f})}))}}),jn.all(l).then(()=>{this.activeAggregateFilters=r,this.activeColumnFilters=i})}updateFilterFlagInColumns(e,t){var s;const n=[];return this.allColumnFilters.forEach(o=>{const r=o.column;if(o.isHandler)n.push(jn.resolve().then(()=>{this.setColFilterActive(r,this.isHandlerActive(r),e,t)}));else{const i=ul(o);i&&n.push(i.then(a=>{this.setColFilterActive(r,a.isFilterActive(),e,t)}))}}),(s=this.beans.groupFilter)==null||s.updateFilterFlags(e,t),jn.all(n)}doFiltersPass(e,t,n){const{data:s,aggData:o}=e,r=n?this.activeAggregateFilters:this.activeColumnFilters,i=n?o:s,a=this.model;for(let l=0;l<r.length;l++){const c=r[l],{colId:u,isHandler:d}=c;if(u!==t)if(d){const{handler:h,handlerParams:f}=c;if(!h.doesFilterPass({node:e,data:i,model:Ts(a,u),handlerParams:f}))return!1}else{const h=c.comp;if(typeof h.doesFilterPass!="function"){_n(91);continue}if(!h.doesFilterPass({node:e,data:i}))return!1}}return!0}getHandlerParams(e){const t=this.allColumnFilters.get(e.getColId());return t!=null&&t.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:n}=this.beans,s=()=>{this.isAlive()&&(n==null||n.onFilterChanged(e))};t.isRefreshInProgress()?setTimeout(s,0):s()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:n}=e,s=t==null?void 0:t.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",n).then(()=>{this.allColumnFilters.forEach(o=>{var a,l,c;const{column:r,isHandler:i}=o;s!==r.getColId()&&(i&&((l=(a=o.handler).onAnyFilterChanged)==null||l.call(a)),(c=ul(o,i))==null||c.then(u=>{typeof(u==null?void 0:u.onAnyFilterChanged)=="function"&&u.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach(n=>{var r,i;const s=n.isHandler;s&&((i=(r=n.handler).onNewRowsLoaded)==null||i.call(r));const o=ul(n,s);o&&t.push(o.then(a=>{var l;(l=a.onNewRowsLoaded)==null||l.call(a)}))}),jn.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){const{filterValueSvc:n,colModel:s}=this.beans;return(o,r)=>{const i=r?s.getCol(r):e;return i?n.getValue(i,o,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t!=null&&t.isHandler)return this.isHandlerActive(e);const n=t==null?void 0:t.filter;return n?n.isFilterActive():Ts(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=ht(Ts(this.model,e.getColId()));if(t)return t;const n=this.beans.groupFilter;return n!=null&&n.isGroupFilter(e)?n.isFilterActive(e):!1}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?ul(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const n=ul(t);return n?n.then(s=>({comp:s,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const n=this.getOrCreateFilterWrapper(e,t);return n!=null&&n.isHandler?n.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let n=this.cachedFilter(e);return!n&&t&&(n=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,n)),n}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType(()=>{var n;return(n=this.beans.dataTypeSvc)==null?void 0:n.getBaseDataType(e)},t)}getDefaultFilterFromDataType(e,t=!1){return mre(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":ole(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,n,s,o,r){const i=()=>{const c=this.createFilterCompParams(e,o,r),u=s(c,o);return wie(this.beans.userCompFactory,t,u,n)},a=i();return a?{compDetails:a,createFilterUi:c=>(c?i():a).newAgStackInstance()}:null}createFilterInstance(e,t,n,s){var d,h;const o=this.beans.selectableFilter;o!=null&&o.isSelectable(t)&&(t=o.getFilterDef(e,t));const{handler:r,handlerParams:i,handlerGenerator:a}=this.createHandler(e,t,n)??{},l=this.createFilterComp(e,t,n,s,!!r,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:r,handlerGenerator:a,handlerParams:i};const{compDetails:c,createFilterUi:u}=l;return this.isGlobalButtons&&((h=(d=c.params)==null?void 0:d.buttons)!=null&&h.length||Je(281,{colId:e.getColId()})),{compDetails:c,handler:r,handlerGenerator:a,handlerParams:i,createFilterUi:u}}createBaseFilterParams(e,t){const{filterManager:n,rowModel:s}=this.beans;return Pt(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:o=>(n==null?void 0:n.doesRowPassOtherFilters(e.getColId(),o))??!0,rowModel:s})}createFilterCompParams(e,t,n,s){const o=this.filterChangedCallbackFactory(e),r=this.createBaseFilterParams(e,s);if(r.filterChangedCallback=o,r.filterModifiedCallback=s?()=>{}:i=>this.filterModified(e,i),t){const i=r,a=e.getColId(),l=Ts(this.model,a);i.model=l,i.state=this.state.get(a)??{model:l},i.onModelChange=(c,u)=>{this.updateStoredModel(a,c),this.refreshHandlerAndUi(e,c,"ui",!1,u).then(()=>{o({...u,source:"columnFilter"})})},i.onStateChange=c=>{this.updateState(e,c),this.updateOrRefreshFilterUi(e)},i.onAction=(c,u,d)=>{this.updateModel(e,c,u),this.dispatchLocalEvent({type:"filterAction",column:e,action:c,event:d})},i.getHandler=()=>this.getHandler(e,!0),i.onUiChange=c=>this.filterUiChanged(e,c),i.source=n}return r}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,n){const s=t(),o={created:!0,create:t,filterParams:e.params,compDetails:e,promise:s};return s.then(n),o}createFilterWrapper(e){var a;const{compDetails:t,handler:n,handlerGenerator:s,handlerParams:o,createFilterUi:r}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),l=>l),i=e.getColId();if(n)return delete this.initialModel[i],(a=n.init)==null||a.call(n,{...o,source:"init",model:Ts(this.model,i)}),{column:e,isHandler:!0,handler:n,handlerGenerator:s,handlerParams:o,filterUi:this.createFilterUiForHandler(t,r)};if(r){const l={column:e,filterUi:null,isHandler:!1};return l.filterUi=this.createFilterUiLegacy(t,r,c=>{l.filter=c??void 0}),l}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,n){var f;const{gos:s,frameworkOverrides:o,registry:r}=this.beans;let i;const a=p=>{const g=p.filter;if(PL(g)){const v=g.handler;return v||(i=g.doesFilterPass,i?()=>({doesFilterPass:i}):void 0)}return typeof g=="string"?g:void 0},l=s.get("enableFilterHandlers"),c=l?a(t):void 0,u=p=>()=>this.createBean(r.createDynamicBean(p,!0));let d,h;if(typeof c=="string"){const p=(f=s.get("filterHandlers"))==null?void 0:f[c];p!=null?d=p:jae.has(c)&&(d=u(c),h=c)}else d=c;if(!d){let p;const{compName:g,jsComp:v,fwComp:C}=NL(o,t);g?p=g:v==null&&C==null&&t.filter===!0&&(p=n),h=this.handlerMap[p],h&&(d=u(h))}return d?{filterHandler:d,handlerNameOrCallback:i??h}:l?(rs(s)&&Je(277,{colId:e.getColId()}),mme):void 0}createHandler(e,t,n){const s=this.createHandlerFunc(e,t,n);if(!s)return;const o=GE(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:r,filterHandler:i}=s,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,i,o);return{handler:a,handlerParams:l,handlerGenerator:r??i}}createHandlerFromFunc(e,t,n){const s=e.getColDef(),o=t(Pt(this.gos,{column:e,colDef:s})),r=this.createHandlerParams(e,n);return{handler:o,handlerParams:r}}createHandlerParams(e,t){const n=e.getColDef(),s=e.getColId(),o=this.filterChangedCallbackFactory(e);return Pt(this.gos,{colDef:n,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:r=>{var i;return((i=this.beans.filterManager)==null?void 0:i.doesRowPassOtherFilters(s,r))??!0},onModelChange:(r,i)=>{this.updateStoredModel(s,r),this.refreshHandlerAndUi(e,r,"handler",!1,i).then(()=>{o({...i,source:"columnFilter"})})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:n,groupFilter:s}=this.beans;this.allColumnFilters.forEach((r,i)=>{let a;r.column.isPrimary()?a=t.getColDefCol(i):a=t.getCol(i),!(a&&a===r.column)&&(e.push(r.column),this.disposeFilterWrapper(r,"columnChanged"),this.disposeColumnListener(i))});const o=s&&e.every(r=>s.isGroupFilter(r));e.length>0&&!o&&(n==null||n.onFilterChanged({columns:e,source:"api"}))}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const n=this.beans.groupFilter;return n!=null&&n.isGroupFilter(e)?n.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){const{userCompFactory:n,frameworkOverrides:s,selectableFilter:o}=this.beans,r=h=>{const f=this.getOrCreateFilterUi(e);f!=null&&f.then(p=>{h(tp(p))})},i=e.getColDef(),a=o!=null&&o.isSelectable(i)?o.getFilterDef(e,i):i,l=cle(s,a,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",c=this.gos.get("enableFilterHandlers"),u=GE(n,a,this.createFilterCompParams(e,c,"init",!0)),d=Pt(this.gos,{column:e,filterParams:u,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:r,showParentFilter:t});if(c){const h=d,f=e.getColId(),p=this.filterChangedCallbackFactory(e);h.onUiChange=g=>this.floatingFilterUiChanged(e,g),h.model=Ts(this.model,f),h.onModelChange=(g,v)=>{this.updateStoredModel(f,g),this.refreshHandlerAndUi(e,g,"floating",!0,v).then(()=>{p({...v,source:"columnFilter"})})},h.getHandler=()=>this.getHandler(e,!0),h.source="init"}return _ie(n,i,d,l)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,n,s){const o="paramsUpdated";if(e.isHandler){const r=t.getColId();delete this.initialModel[r],this.state.delete(r);const i=e.filterUi,a=this.createFilterUiForHandler(n,s);e.filterUi=a;const l=this.eventSvc;i!=null&&i.created?i.promise.then(c=>{this.destroyBean(c),l.dispatchEvent({type:"filterDestroyed",source:o,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:o,column:t})}else this.destroyFilter(t,o)}destroyFilter(e,t="api"){const n=e.getColId(),s=this.allColumnFilters.get(n);this.disposeColumnListener(n),delete this.initialModel[n],s&&this.disposeFilterWrapper(s,t).then(o=>{var r;o&&this.isAlive()&&((r=this.beans.filterManager)==null||r.onFilterChanged({columns:[e],source:"api"}))})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let n=!1;const{column:s,isHandler:o,filterUi:r}=e,i=s.getColId();o&&(n=this.isHandlerActive(s),this.destroyBean(e.handler),delete this.model[i],this.state.delete(i));const a=()=>{this.setColFilterActive(s,!1,"filterDestroyed"),this.allColumnFilters.delete(i),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:s})};if(r){if(r.created)return r.promise.then(l=>(n=o?n:!!(l!=null&&l.isFilterActive()),this.destroyBean(l),a(),n));a()}return jn.resolve(n)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:(t==null?void 0:t.source)??"columnFilter"})}}filterParamsChanged(e,t="api"){var v,C,S,b,w,D;const n=this.allColumnFilters.get(e);if(!n)return;const s=this.beans,o=n.column,r=o.getColDef(),i=o.isFilterAllowed(),a=this.getDefaultFilter(o),l=s.selectableFilter,c=l!=null&&l.isSelectable(r)?l.getFilterDef(o,r):r,u=i?this.createHandlerFunc(o,c,this.getDefaultFilter(o)):void 0,d=!!u,h=n.isHandler;if(h!=d){this.destroyFilter(o,"paramsUpdated");return}const{compDetails:f,createFilterUi:p}=(i?this.createFilterComp(o,c,a,R=>R,d,"colDef"):null)??{compDetails:null,createFilterUi:null},g=(f==null?void 0:f.params)??GE(s.userCompFactory,c,this.createFilterCompParams(o,d,"colDef"));if(h){const R=(u==null?void 0:u.handlerNameOrCallback)??(u==null?void 0:u.filterHandler),T=Ts(this.model,e);if(n.handlerGenerator!=R){const F=n.handler,{handler:x,handlerParams:P}=this.createHandlerFromFunc(o,u.filterHandler,g);n.handler=x,n.handlerParams=P,n.handlerGenerator=R,delete this.model[e],(v=x.init)==null||v.call(x,{...P,source:"init",model:null}),this.destroyBean(F),T!=null&&((C=this.beans.filterManager)==null||C.onFilterChanged({columns:[o],source:t}))}else{const F=this.createHandlerParams(o,f==null?void 0:f.params);n.handlerParams=F,(b=(S=n.handler).refresh)==null||b.call(S,{...F,source:"colDef",model:T})}}if(this.areFilterCompsDifferent(((w=n.filterUi)==null?void 0:w.compDetails)??null,f)||!n.filterUi||!f){this.destroyFilterUi(n,o,f,p);return}n.filterUi.filterParams=g,(D=ul(n,h))==null||D.then(R=>{(R!=null&&R.refresh?R.refresh(g):!0)===!1?this.destroyFilterUi(n,o,f,p):this.dispatchLocalEvent({type:"filterParamsChanged",column:o,params:g})})}refreshHandlerAndUi(e,t,n,s,o){const r=this.cachedFilter(e);if(!r)return s&&this.getOrCreateFilterWrapper(e,!0),jn.resolve();if(!r.isHandler)return jn.resolve();const{filterUi:i,handler:a,handlerParams:l}=r;return Kae(()=>{if(i){const{created:c,filterParams:u}=i;if(c)return i.promise.then(d=>d?{filter:d,filterParams:u}:void 0);i.refreshed=!0}return jn.resolve(void 0)},a,l,t,this.state.get(e.getColId())??{model:t},n,o)}setColumnFilterWrapper(e,t){const n=e.getColId();this.allColumnFilters.set(n,t),this.allColumnListeners.set(n,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(n)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:n}=e,{componentClass:s}=t;return!(n===s||(n==null?void 0:n.render)&&(s==null?void 0:s.render)&&n.render===s.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){const t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);const n=this.getOrCreateFilterUi(t);return n?new Promise(s=>{n.then(o=>{s(tp(o))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:e,source:t})=>this.setModel(e,t)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:e,model:t,resolve:n})=>{this.setModelForColumn(e,t).then(()=>n())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:s,model:o}=this,r=e.getColId(),i=s.get(r);return i?i.model??null:Ts(o,r)}const n=this.cachedFilter(e);return n?this.getModelFromFilterWrapper(n):null}setModelForColumn(e,t){var n;if((n=this.beans.dataTypeSvc)!=null&&n.isPendingInference){let s=()=>{};const o=new Promise(r=>{s=r});return this.columnModelUpdates.push({key:e,model:t,resolve:s}),o}return new Promise(s=>{this.setModelForColumnLegacy(e,t).then(o=>s(o))})}getStateForColumn(e){return this.state.get(e)??{model:Ts(this.model,e)}}setModelForColumnLegacy(e,t){const n=this.beans.colModel.getColDefCol(e),s=n?this.getOrCreateFilterWrapper(n,!0):null;return s?this.setModelOnFilterWrapper(s,t):jn.resolve()}setColDefPropsForDataType(e,t,n){var u;const s=e.filter,o=s===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):s;if(typeof o!="string")return;let r,i;const a=this.beans,{filterParams:l,filterValueGetter:c}=e;o==="agMultiColumnFilter"?{filterParams:r,filterValueGetter:i}=((u=a.multiFilter)==null?void 0:u.getParamsForDataType(l,c,t,n))??{}:{filterParams:r,filterValueGetter:i}=tle(o,l,c,t,n,a,this.getLocaleTextFunc()),e.filterParams=r,i&&(e.filterValueGetter=i)}setColFilterActive(e,t,n,s){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",n)),e.dispatchColEvent("filterChanged",n,s)}setModelOnFilterWrapper(e,t,n){return new jn(s=>{if(e.isHandler){const r=e.column,i=r.getColId(),a=this.model[i];if(this.updateStoredModel(i,t),n&&t===a){s();return}this.refreshHandlerAndUi(r,t,"api").then(()=>s());return}const o=ul(e);if(o){o.then(r=>{if(typeof(r==null?void 0:r.setModel)!="function"){Je(65),s();return}(r.setModel(t)||jn.resolve()).then(()=>s())});return}s()})}updateStoredModel(e,t){ht(t)?this.model[e]=t:delete this.model[e];const n=this.state.get(e),s={model:t,state:n==null?void 0:n.state};this.state.set(e,s)}filterModified(e,t){var n;(n=this.getOrCreateFilterUi(e))==null||n.then(s=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:s,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,n){var i;const s=e.getColId(),o=this.cachedFilter(e),r=()=>o==null?void 0:o.filterUi;pV(t,r,()=>Ts(this.model,s),()=>this.state.get(s),a=>this.updateState(e,a),a=>{var l,c;return(c=(l=r())==null?void 0:l.filterParams)==null?void 0:c.onModelChange(a,n)},o!=null&&o.isHandler?(i=o.handler.processModelToApply)==null?void 0:i.bind(o.handler):void 0)}updateAllModels(e,t){const n=[];this.allColumnFilters.forEach((s,o)=>{var i;const r=this.beans.colModel.getColDefCol(o);r&&pV(e,()=>s.filterUi,()=>Ts(this.model,o),()=>this.state.get(o),a=>this.updateState(r,a),a=>{this.updateStoredModel(o,a),this.dispatchLocalEvent({type:"filterAction",column:r,action:e}),n.push(this.refreshHandlerAndUi(r,a,"ui"))},s!=null&&s.isHandler?(i=s.handler.processModelToApply)==null?void 0:i.bind(s.handler):void 0)}),n.length&&jn.all(n).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();fV(()=>{var n;return(n=this.cachedFilter(e))==null?void 0:n.filterUi},()=>Ts(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){const{state:e,model:t,activeFilterComps:n}=this;for(const o of n)if(o.source==="COLUMN_MENU")return!1;let s=!1;for(const o of e.keys()){const r=e.get(o);if(r.valid===!1)return!1;(r.model??null)!==Ts(t,o)&&(s=!0)}return s}hasUnappliedModel(e){var s;const{model:t,state:n}=this;return(((s=n.get(e))==null?void 0:s.model)??null)!==Ts(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;const n=this.beans.filterPanelSvc;return n!=null&&n.isActive?!!n.getState(e.getColId()):!1}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function yme(e){var t;return!!((t=e.filterManager)!=null&&t.isAnyFilterPresent())}function wme(e,t="api"){var n;(n=e.filterManager)==null||n.onFilterChanged({source:t})}var Cme=class extends We{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:s})=>this.onAdvFilterEnabledChanged(s),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:n}=this;this.alwaysPassFilter=n.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=n.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,n="api"){var s;this.isAdvFilterEnabled()||(s=this.colFilter)==null||s.setState(e,t,n)}setFilterModel(e,t="api",n){var s;if(this.isAdvFilterEnabled()){n||this.warnAdvFilters();return}(s=this.colFilter)==null||s.setModel(e,t)}getFilterModel(){var e;return((e=this.colFilter)==null?void 0:e.getModel())??{}}getFilterState(){var e;return(e=this.colFilter)==null?void 0:e.getState()}isColumnFilterPresent(){var e;return!!((e=this.colFilter)!=null&&e.isFilterPresent())}isAggregateFilterPresent(){var e;return!!((e=this.colFilter)!=null&&e.isAggFilterPresent())}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){var t,n;e?(t=this.colFilter)!=null&&t.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):(n=this.advancedFilter)!=null&&n.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){var e;return!!((e=this.advancedFilter)!=null&&e.isEnabled())}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){NE(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:n,columns:s=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):jn.resolve()).then(()=>{var r;const o={source:t,type:"filterChanged",columns:s};n&&so(o,n),this.eventSvc.dispatchEvent(o),(r=this.colFilter)==null||r.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){var e;return!!((e=this.colFilter)!=null&&e.isSuppressFlashingCellsBecauseFiltering())}isQuickFilterPresent(){var e;return!!((e=this.quickFilter)!=null&&e.isFilterPresent())}updateAggFiltering(){this.aggFiltering=!!NE(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,colIdToSkip:e})}doesRowPassAggregateFilters(e){var n;const{rowNode:t}=e;return(n=this.alwaysPassFilter)!=null&&n.call(this,t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){var n;const{rowNode:t}=e;return(n=this.alwaysPassFilter)!=null&&n.call(this,t)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterAllowed(e){var t;return this.isAdvFilterEnabled()?!1:!!((t=this.colFilter)!=null&&t.isFilterAllowed(e))}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){var n;if(this.isAdvFilterEnabled()){if((n=this.beans.dataTypeSvc)!=null&&n.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){var e;return this.isAdvFilterEnabled()?!1:!!((e=this.colFilter)!=null&&e.hasFloatingFilters())}getColumnFilterInstance(e){var t;return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):((t=this.colFilter)==null?void 0:t.getFilterInstance(e))??Promise.resolve(void 0)}warnAdvFilters(){Je(68)}setupAdvFilterHeaderComp(e){var t;(t=this.advancedFilter)==null||t.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(const e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){var n;return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):((n=this.colFilter)==null?void 0:n.setModelForColumn(e,t))??Promise.resolve()}},bme=class extends We{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){var e;(e=this.hidePopup)==null||e.call(this)}showMenuAfterMouseEvent(e,t,n,s){e&&!e.isColumn||this.showPopup(e,o=>{var r;(r=this.popupSvc)==null||r.positionPopupUnderMouseEvent({column:e,type:n,mouseEvent:t,ePopup:o})},n,t.target,$o(this.gos),s)}showMenuAfterButtonClick(e,t,n,s){if(e&&!e.isColumn)return;let o=-1,r="left";const i=$o(this.gos);!i&&this.gos.get("enableRtl")&&(o=1,r="right");const a=i?void 0:4*o,l=i?void 0:4;this.showPopup(e,c=>{var u;(u=this.popupSvc)==null||u.positionPopupByComponent({type:n,eventSource:t,ePopup:c,nudgeX:a,nudgeY:l,alignSide:r,keepWithinBounds:!0,position:"under",column:e})},n,t,i,s)}showPopup(e,t,n,s,o,r){var g;const i=e?this.createBean(new Qae(e,"COLUMN_MENU")):void 0;if(this.activeMenu=i,!(i!=null&&i.hasFilter())||!e){_n(57);return}const a=as({tag:"div",cls:`ag-menu${o?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:v=>this.trapFocusWithin(v,a)}),a.appendChild(i==null?void 0:i.getGui());let l;const c=()=>i==null?void 0:i.afterGuiDetached(),u=vre(this.gos)?s??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,d=v=>{VV(e,!1,"contextMenu");const C=v instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),C&&s&&vi(s)){const S=UL(s);S==null||S.focus({preventScroll:!0})}c(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,n,e),r==null||r()},h=this.getLocaleTextFunc(),f=o&&n!=="columnFilter"?h("ariaLabelColumnMenu","Column Menu"):h("ariaLabelColumnFilter","Column Filter"),p=(g=this.popupSvc)==null?void 0:g.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:d,positionCallback:()=>t(a),anchorToElement:u,ariaLabel:f});p&&(this.hidePopup=l=p.hideFunc),i.afterInit().then(()=>{t(a),i.afterGuiAttached({container:n,hidePopup:l})}),VV(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,n,e)}trapFocusWithin(e,t){e.key!==Oe.TAB||e.defaultPrevented||Sc(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),bc(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,n){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:n??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},Sme=class extends We{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,n){if(!t)return;const s=e.getColDef(),{selectableFilter:o,valueSvc:r}=this.beans,i=n??(o==null?void 0:o.getFilterValueGetter(e.getColId()))??s.filterValueGetter;return i?this.executeFilterValueGetter(i,t.data,e,t,s):r.getValue(e,t)}executeFilterValueGetter(e,t,n,s,o){const{expressionSvc:r,valueSvc:i}=this.beans,a=Pt(this.gos,{data:t,node:s,column:n,colDef:o,getValue:i.getValueCallback.bind(i,s)});return typeof e=="function"?e(a):r==null?void 0:r.evaluate(e,a)}},Eme={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},_me=class extends Cn{constructor(){super(Eme,[Jv]),this.eFloatingFilterText=dt}init(e){this.params=e;const t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){const n=e,s=n.getHandler();if(s.getModelAsString){const o=s.getModelAsString(n.model);this.eFloatingFilterText.setValue(o)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const n=t.getModelAsString(e);this.eFloatingFilterText.setValue(n)}})}refresh(e){this.init(e)}},c_=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){const n=e.filterOptions??t;this.filterOptions!==n&&(this.filterOptions=n,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){const{filterOptions:e}=this;if(e)for(const t of e){if(typeof t=="string")continue;const n=[["displayKey"],["displayName"],["predicate","test"]],s=o=>o.some(r=>t[r]!=null)?!0:(Je(72,{keys:o}),!1);if(!n.every(s)){this.filterOptions=e.filter(o=>o===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}getDefaultItem(e){const{filterOptions:t}=this;if(e)return e;if(t.length>=1){const n=t[0];if(typeof n=="string")return n;if(n.displayKey)return n.displayKey;Je(73)}else Je(74)}getCustomOption(e){return this.customFilterOptions[e]}};function pp(e,t,n){return n==null?e.splice(t):e.splice(t,n)}function Dy(e){return e==null||typeof e=="string"&&e.trim().length===0}function Rme(e){return e==="AND"||e==="OR"?e:"AND"}function Dme(e,t,n){if(e==null)return;const{predicate:s}=e;if(s!=null&&!t.some(o=>o==null))return s(t,n)}function Tme(e,t){let n=e.length;return n>t&&(e.splice(t),Je(78),n=t),n}function gp(e,t){const n=t.getCustomOption(e);if(n){const{numberOfInputs:o}=n;return o??1}return e&&["empty","notBlank","blank"].indexOf(e)>=0?0:e==="inRange"?2:1}var u_=class extends lle{constructor(e,t,n){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=n,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(e){super.setParams(e);const t=new c_;this.optionsFactory=t,t.init(e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e)}commonUpdateSimpleParams(e){this.setNumConditions(e),this.defaultJoinOperator=Rme(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions();const t=this.getGui();this.isReadOnly()?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,n)=>{const s=n===0?e:this.optionsFactory.defaultOption;t.setValue(s,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){const n=!e.operator,s=!t.operator;if(!n&&s||n&&!s)return!1;let r;if(n){const i=e,a=t;r=this.areSimpleModelsEqual(i,a)}else{const i=e,a=t;r=i.operator===a.operator&&il(i.conditions,a.conditions,(l,c)=>this.areSimpleModelsEqual(l,c))}return r}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),jn.resolve();if(e.operator){const s=e;let o=s.conditions;o==null&&(o=[],Je(77));const r=Tme(o,this.maxNumConditions),i=this.getNumConditions();if(r<i)this.removeConditionsAndOperators(r);else if(r>i)for(let l=i;l<r;l++)this.createJoinOperatorPanel(),this.createOption();const a=s.operator==="OR";this.eJoinAnds.forEach(l=>l.setValue(!a,!0)),this.eJoinOrs.forEach(l=>l.setValue(a,!0)),o.forEach((l,c)=>{this.eTypes[c].setValue(l.type,!0),this.setConditionIntoUi(l,c)})}else{const s=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(s.type,!0),this.setConditionIntoUi(s,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),jn.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(Je(79),t=1),this.maxNumConditions=t;let n=e.numAlwaysVisibleConditions??1;n<1&&(Je(80),n=1),n>t&&(Je(81),n=t),this.numAlwaysVisibleConditions=n}createOption(){const e=this.getGui(),t=this.createManagedBean(new a0);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const n=this.createEValue();this.eConditionBodies.push(n),e.appendChild(n),this.putOptionsIntoDropdown(t),this.resetType(t);const s=this.getNumConditions()-1;this.forEachPositionInput(s,o=>this.resetInput(o)),this.addChangedListeners(t,s)}createJoinOperatorPanel(){const e=as({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),n=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const s=this.eJoinPanels.length-1,o=this.joinOperatorId++;this.resetJoinOperatorAnd(t,s,o),this.resetJoinOperatorOr(n,s,o),this.isReadOnly()||(t.onValueChange(this.listener),n.onValueChange(this.listener))}createJoinOperator(e,t,n){const s=this.createManagedBean(new Bie);e.push(s);const o="ag-filter-condition-operator";return s.addCss(o),s.addCss(`${o}-${n}`),t.appendChild(s.getGui()),s}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const n of t)e.addOption(n);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,n=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:n?this.getLocaleTextFunc()(n.displayKey,n.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let n=0;n<this.getNumConditions();n++)this.isConditionUiComplete(n)?e=n:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const n=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<n){this.removeConditionsAndOperators(n+1);const s=e+1,o=n-s;o>0&&this.removeConditionsAndOperators(s,o),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((s,o)=>{const r=this.isConditionDisabled(o,e);s.setDisabled(r||this.filterListOptions.length<=1),o===1&&(Bf(this.eJoinPanels[0],r),this.eJoinAnds[0].setDisabled(r),this.eJoinOrs[0].setDisabled(r))}),this.eConditionBodies.forEach((s,o)=>{Bn(s,this.isConditionBodyVisible(o))});const n=(t??this.getJoinOperator())==="OR";for(const s of this.eJoinAnds)s.setValue(!n,!0);for(const s of this.eJoinOrs)s.setValue(n,!0);this.forEachInput((s,o,r,i)=>{this.setElementDisplayed(s,o<i),this.setElementDisabled(s,this.isConditionDisabled(r,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:n,eConditionBodies:s,eJoinPanels:o,eJoinAnds:r,eJoinOrs:i}=this;this.removeComponents(n,e,t),this.removeElements(s,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(o,a,t),this.removeComponents(r,a,t),this.removeComponents(i,a,t)}removeElements(e,t,n){const s=pp(e,t,n);for(const o of s)Br(o)}removeComponents(e,t,n){const s=pp(e,t,n);for(const o of s)Br(o.getGui()),this.destroyBean(o)}afterGuiAttached(e){var t;if(super.afterGuiAttached(e),this.resetPlaceholder(),!(e!=null&&e.suppressFocus)){let n;if(!this.isReadOnly()){const s=this.getInputs(0)[0];s instanceof Ec&&this.isConditionBodyVisible(0)?n=s.getInputElement():n=(t=this.eTypes[0])==null?void 0:t.getFocusableElement()}(n??this.getGui()).focus({preventScroll:!0})}}afterGuiDetached(){var i;super.afterGuiDetached();const e=this.params;if((i=this.beans.colFilter)!=null&&i.shouldKeepStateOnDetach(e.column))return;e.onStateChange({model:e.model});let t=-1,n=-1,s=!1;const o=this.getJoinOperator();for(let a=this.getNumConditions()-1;a>=0;a--)if(this.isConditionUiComplete(a))t===-1&&(t=a,n=a);else{const l=a>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(a-1),c=a<t;(l||c)&&(this.removeConditionsAndOperators(a,1),s=!0,c&&n--)}let r=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),r=!0),this.shouldAddNewConditionAtEnd(n===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),r=!0),r&&this.updateConditionStatusesAndValues(n,o),s&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=n}getModelAsString(e){var t,n;return((n=(t=this.params.getHandler())==null?void 0:t.getModelAsString)==null?void 0:n.call(t,e))??""}getPlaceholderText(e,t){let n=this.translate(e);if(typeof this.filterPlaceholder=="function"){const s=this.eTypes[t].getValue(),o=this.translate(s);n=this.filterPlaceholder({filterOptionKey:s,filterOption:o,placeholder:n})}else typeof this.filterPlaceholder=="string"&&(n=this.filterPlaceholder);return n}resetPlaceholder(){const e=this.getLocaleTextFunc();this.forEachInput((t,n,s,o)=>{if(!(t instanceof Ec))return;const r=n===0&&o>1?"inRangeStart":n===0?"filterOoo":"inRangeEnd",i=n===0&&o>1?e("ariaFilterFromValue","Filter from value"):n===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(r,s)),t.setInputAriaLabel(i)})}setElementValue(e,t,n){e instanceof Ec&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){xL(e)&&Bn(e.getGui(),t)}setElementDisabled(e,t){xL(e)&&Bf(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Ec&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,n)=>{this.forEachPositionTypeInput(n,t,e)})}forEachPositionInput(e,t){const n=this.getConditionType(e);this.forEachPositionTypeInput(e,n,t)}forEachPositionTypeInput(e,t,n){const s=gp(t,this.optionsFactory),o=this.getInputs(e);for(let r=0;r<o.length;r++){const i=o[r];i!=null&&n(i,r,e,s)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return gp(t,this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(n=>n==null))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinAnds.forEach((t,n)=>this.resetJoinOperatorAnd(t,n,this.joinOperatorId+n)),this.eJoinOrs.forEach((t,n)=>this.resetJoinOperatorOr(t,n,this.joinOperatorId+n)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){const n=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(n).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,n){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),n)}resetJoinOperatorOr(e,t,n){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),n)}resetJoinOperator(e,t,n,s,o){this.updateJoinOperatorDisabled(e.setValue(n,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${o}`).setLabel(s),t)}updateJoinOperatorsDisabled(){const e=(t,n)=>this.updateJoinOperatorDisabled(t,n);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const n=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((s,o,r)=>{r===t&&this.setElementValue(s,n[o]!=null?n[o]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,n,s)=>{this.setElementValue(t,n===0&&s===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,n=>{this.attachElementOnChange(n,this.listener)}))}hasInvalidInputs(){return!1}isReadOnly(){return!!this.params.readOnly}},tB=class{constructor(e,t,n,s,o,r){this.alive=!0,this.context=e,this.eParent=o;const i=Cie(t,n,s);i&&i.newAgStackInstance().then(a=>{var u,d;if(!this.alive){e.destroyBean(a);return}if(this.dateComp=a,!a)return;o.appendChild(a.getGui()),(u=a==null?void 0:a.afterGuiAttached)==null||u.call(a);const{tempValue:l,disabled:c}=this;l&&a.setDate(l),c!=null&&((d=a.setDisabled)==null||d.call(a,c)),r==null||r(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){var n;const t=this.dateComp;t?(n=t.setDisabled)==null||n.call(t,e):this.disabled=e}setDisplayed(e){Bn(this.eParent,e)}setInputPlaceholder(e){var t,n;(n=(t=this.dateComp)==null?void 0:t.setInputPlaceholder)==null||n.call(t,e)}setInputAriaLabel(e){var t,n;(n=(t=this.dateComp)==null?void 0:t.setInputAriaLabel)==null||n.call(t,e)}afterGuiAttached(e){var t,n;(n=(t=this.dateComp)==null?void 0:t.afterGuiAttached)==null||n.call(t,e)}updateParams(e){var t,n;(n=(t=this.dateComp)==null?void 0:t.refresh)==null||n.call(t,e)}},d_=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function nB(e,t){const{dateFrom:n,dateTo:s,type:o}=e||{};return[n&&vo(n,void 0,!0)||null,s&&vo(s,void 0,!0)||null].slice(0,gp(o,t))}var sB=1e3,oB=1/0,Ime=class extends u_{constructor(){super("dateFilter",nB,d_),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=sB,this.maxValidYear=oB,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e)}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(l,c)=>{const u=e[l];if(u!=null)if(isNaN(u))Je(82,{param:l});else return u==null?c:Number(u);return c},n=t("minValidYear",sB),s=t("maxValidYear",oB);this.minValidYear=n,this.maxValidYear=s,n>s&&Je(83);const{minValidDate:o,maxValidDate:r}=e,i=o instanceof Date?o:vo(o);this.minValidDate=i;const a=r instanceof Date?r:vo(r);this.maxValidDate=a,i&&a&&i>a&&Je(84)}createDateCompWrapper(e){const{beans:{userCompFactory:t,context:n,gos:s},params:o}=this,r=new tB(n,t,o.colDef,Pt(s,{onDateChanged:()=>this.onUiChanged(),filterParams:o,location:"filter"}),e);return this.addDestroyFunc(()=>r.destroy()),r}setElementValue(e,t){e.setDate(t)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=as({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,n,s){const o=as({tag:"div",cls:`ag-filter-${s} ag-filter-date-${s}`});t.push(o),e.appendChild(o),n.push(this.createDateCompWrapper(o))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),pp(this.eConditionPanelsFrom,e,t),pp(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,n){const s=pp(e,t,n);for(const o of s)o.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:n,minValidYear:s,maxValidYear:o}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<s)return!1;if(n){if(e>n)return!1}else if(e.getUTCFullYear()>o)return!1;return!0}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachInput((n,s,o,r)=>{o!==e||!t||s>=r||(t=t&&this.isValidDateValue(n.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),n={},s=this.getValues(e),o=this.params.useIsoSeparator?"T":" ";return s.length>0&&(n.dateFrom=Ho(s[0],!0,o)),s.length>1&&(n.dateTo=Ho(s[1],!0,o)),{dateFrom:null,dateTo:null,filterType:this.filterType,type:t,...n}}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),n=e("ariaFilterValue","Filter Value");this.forEachInput(s=>{s.setInputPlaceholder(t),s.setInputAriaLabel(n)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(n,s,o,r)=>{s<r&&t.push(n.getDate())}),t}translate(e){return e==="lessThan"?super.translate("before"):e==="greaterThan"?super.translate("after"):super.translate(e)}},rB=class extends We{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,n=new c_;this.optionsFactory=n,n.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(n,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if(e.source==="colDef"){const t=e.filterParams,n=this.optionsFactory;n.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:n,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(t==null)return!0;const{operator:n}=t,s=[];if(n){const i=t;s.push(...i.conditions??[])}else s.push(t);const o=n&&n==="OR"?"some":"every",r=this.params.getValue(e.node);return s[o](i=>this.individualConditionPasses(e,i,r))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:n,maxNumConditions:s}}=e;if(t==null)return;let r=CV(t)?t.conditions:[t];const i=(n==null?void 0:n.map(u=>typeof u=="string"?u:u.displayKey))??this.defaultOptions;if(!(!r||r.every(u=>i.find(d=>d===u.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let l=!1;const c=this.filterType;if((r&&!r.every(u=>u.filterType===c)||t.filterType!==c)&&(r=r.map(u=>({...u,filterType:c})),l=!0),typeof s=="number"&&r&&r.length>s&&(r=r.slice(0,s),l=!0),l){const u=r.length>1?{...t,filterType:c,conditions:r}:{...r[0],filterType:c};this.params={...e,model:u},e.onModelChange(u)}}individualConditionPasses(e,t,n){const s=this.optionsFactory,o=this.mapValuesFromModel(t,s),r=s.getCustomOption(t.type),i=Dme(r,o,n);return i??(n==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(o,n,t,e))}},iB=class extends rB{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:n,includeBlanksInGreaterThan:s,includeBlanksInLessThan:o,includeBlanksInRange:r}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(n)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(s)return!0;break;case"lessThan":case"lessThanOrEqual":if(o)return!0;break;case"inRange":if(r)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,n){const s=n.type;if(!this.isValid(t))return s==="notEqual"||s==="notBlank";const o=this.comparator(),r=e[0]!=null?o(e[0],t):0;switch(s){case"equals":return r===0;case"notEqual":return r!==0;case"greaterThan":return r>0;case"greaterThanOrEqual":return r>=0;case"lessThan":return r<0;case"lessThanOrEqual":return r<=0;case"inRange":{const i=o(e[1],t);return this.params.filterParams.inRangeInclusive?r>=0&&i<=0:r>0&&i<0}case"blank":return Dy(t);case"notBlank":return!Dy(t);default:return Je(76,{filterModelType:s}),!0}}},aB={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},xme={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},h_=class extends We{constructor(e,t,n){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=n}getModelAsString(e,t){const n=this.getLocaleTextFunc(),s=t==="filterToolPanel";if(!e)return s?dl(this,"filterSummaryInactive"):null;if(e.operator!=null){const r=e,a=(r.conditions??[]).map(c=>this.getModelAsString(c,t)),l=r.operator==="AND"?"andCondition":"orCondition";return a.join(` ${dl(this,l)} `)}else{if(e.type==="blank"||e.type==="notBlank")return s?dl(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):n(e.type,e.type);{const r=e,i=this.optionsFactory.getCustomOption(r.type),{displayKey:a,displayName:l,numberOfInputs:c}=i||{};return a&&l&&c===0?n(a,l):this.conditionToString(r,s,r.type==="inRange"||c===2,a,l)}}}updateParams(e){const{optionsFactory:t,filterParams:n}=e;this.optionsFactory=t,this.filterParams=n}conditionForToolPanel(e,t,n,s,o,r){let i;const a=this.getTypeKey(e);return a&&(i=dl(this,a)),o&&r&&(i=this.getLocaleTextFunc()(o,r)),i!=null?t?`${i} ${dl(this,"filterSummaryInRangeValues",[n(),s()])}`:`${i} ${n()}`:null}getTypeKey(e){const t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){const t=this.valueFormatter;return t?t(e??null)??"":String(e)}},lB=class extends h_{constructor(e,t){super(e,t,n=>{const{dataTypeSvc:s,valueSvc:o}=this.beans,r=t.column,i=s==null?void 0:s.getDateFormatterFunction(r),a=i?i(n??void 0):n;return o.formatValue(r,null,a)}),this.filterTypeKeys=aB}conditionToString(e,t,n,s,o){const{type:r}=e,i=vo(e.dateFrom),a=vo(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,c=t?this.formatValue.bind(this):h=>t0(h,l),u=()=>i!==null?c(i):"null",d=()=>a!==null?c(a):"null";if(t){const h=this.conditionForToolPanel(r,n,u,d,s,o);if(h!=null)return h}return n?`${u()}-${d()}`:i!=null?c(i):`${r}`}};function Fme(e,t){const n=t;return n<e?-1:n>e?1:0}var Pme=class extends iB{constructor(){super(nB,d_),this.filterType="date",this.FilterModelFormatterClass=lB}comparator(){return this.params.filterParams.comparator??Fme}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}},cB=class extends Cn{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}const t=e.operator;let n;t?n=e.conditions[0]:n=e,this.lastType=n.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const n=e;return this.isTypeEditable(n.type)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){const n=e;this.onModelUpdated(n.model)}}setParams(e){const t=new c_;this.optionsFactory=t,t.init(e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(t,e.filterParams)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const n=this.optionsFactory.defaultOption;t||(this.lastType=n),this.readOnly=!!e.filterParams.readOnly;const s=this.isTypeEditable(n);this.setEditable(s)}refresh(e){this.params=e;const t=e,n=this.reactive;if((!n||t.source==="colDef")&&this.updateParams(e),n){const{source:s,model:o}=t;if(s==="dataChanged"||s==="ui")return;this.onModelUpdated(o)}}updateParams(e){const t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t!=null&&t.afterFloatingFilter||t!=null&&t.afterDataChange||this.onModelUpdated(e)}hasSingleInput(e){var n;const t=(n=this.optionsFactory.getCustomOption(e))==null?void 0:n.numberOfInputs;return t==null||t==1}isTypeEditable(e){const t=["inRange","empty","blank","notBlank"];return!!e&&!this.readOnly&&this.hasSingleInput(e)&&t.indexOf(e)<0}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},Ame={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eReadOnlyText"},{tag:"div",ref:"eDateWrapper",cls:"ag-date-floating-filter-wrapper"}]},kme=class extends cB{constructor(){super(Ame,[Jv]),this.eReadOnlyText=dt,this.eDateWrapper=dt,this.FilterModelFormatterClass=lB,this.filterType="date",this.defaultOptions=d_}setParams(e){super.setParams(e),this.createDateComponent();const t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){const n=e?vo(e.dateFrom):null;this.dateComp.setDate(n),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){Bn(this.eDateWrapper,e),Bn(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){const e=this.dateComp.getDate();if(this.reactive){const t=this.params;t.onUiChange();const n=t.model,s=Ho(e),o=s==null?null:{...n??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:s};t.onModelChange(o,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t==null||t.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=m0(e,this.defaultDebounceMs);return Pt(this.gos,{onDateChanged:Os(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:n,params:s}=this;this.dateComp=new tB(e,t,s.column.getColDef(),this.getDateComponentParams(),n,o=>{o.setInputAriaLabel(this.getAriaLabel(s))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},Ome={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},Mme=class extends Cn{constructor(){super(Ome,[Jv]),this.eDateInput=dt,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}setParams(e){var h;const t=this.eDateInput.getInputElement(),n=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=n&&al();const{minValidYear:s,maxValidYear:o,minValidDate:r,maxValidDate:i,buttons:a,includeTime:l,colDef:c}=e.filterParams||{},u=this.beans.dataTypeSvc,d=l??((h=u==null?void 0:u.getDateIncludesTimeFlag)==null?void 0:h.call(u,c.cellDataType))??!1;if(n?d?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text",r&&s&&Je(85),i&&o&&Je(86),r&&i){const[f,p]=[r,i].map(g=>g instanceof Date?g:vo(g));f&&p&&f.getTime()>p.getTime()&&Je(87)}r?r instanceof Date?t.min=t0(r):t.min=r:s&&(t.min=`${s}-01-01`),i?i instanceof Date?t.max=t0(i):t.max=i:o&&(t.max=`${o}-12-31`),this.isApply=e.location==="floatingFilter"&&!!(a!=null&&a.includes("apply"))}refresh(e){this.params=e,this.setParams(e)}getDate(){return vo(this.eDateInput.getValue())}setDate(e){var s;const t=this.params.filterParams.colDef.cellDataType,n=((s=this.beans.dataTypeSvc)==null?void 0:s.getDateIncludesTimeFlag(t))??!1;this.eDateInput.setValue(Ho(e,n))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e!=null&&e.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){var t;return((t=e==null?void 0:e.filterParams)==null?void 0:t.browserDatePicker)??!0}},f_=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function p_(e){const{allowedCharPattern:t}=e??{};return t??null}function g_(e){return e==null||isNaN(e)?null:e}function uB(e,t){const{filter:n,filterTo:s,type:o}=e||{};return[g_(n),g_(s)].slice(0,gp(o,t))}var Nme=class extends u_{constructor(){super("numberFilter",uB,f_),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}setElementValue(e,t,n){const{numberFormatter:s}=this.params,o=!n&&s?s(t??null):t;super.setElementValue(e,o)}createEValue(){const e=p_(this.params),t=as({tag:"div",cls:"ag-filter-body",role:"presentation"});return this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}createFromToElement(e,t,n,s){const o=this.createManagedBean(s?new _c({allowedCharPattern:s}):new i0);o.addCss(`ag-filter-${n}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui())}removeEValues(e,t){const n=s=>this.removeComponents(s,e,t);n(this.eValuesFrom),n(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(n,s,o,r)=>{s<r&&t.push(g_(this.stringToFloat(n.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}stringToFloat(e){if(typeof e=="number")return e;let t=ia(e);t!=null&&t.trim()===""&&(t=null);const n=this.params.numberParser;return n?n(t):t==null||t.trim()==="-"?null:Number.parseFloat(t)}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},s=this.getValues(e);return s.length>0&&(n.filter=s[0]),s.length>1&&(n.filterTo=s[1]),n}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{t.getInputElement().validity.valid||(e=!0)}),e}},dB=class extends h_{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=aB}conditionToString(e,t,n,s,o){const{filter:r,filterTo:i,type:a}=e,l=this.formatValue.bind(this);if(t){const c=this.conditionForToolPanel(a,n,()=>l(r),()=>l(i),s,o);if(c!=null)return c}return n?`${l(r)}-${l(i)}`:r!=null?l(r):`${a}`}},Lme=class extends iB{constructor(){super(uB,f_),this.filterType="number",this.FilterModelFormatterClass=dB}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},hB=class extends We{constructor(e){super(),this.params=e,this.eInput=dt,this.onValueChanged=()=>{}}setupGui(e){var s;this.eInput=this.createManagedBean(new _c((s=this.params)==null?void 0:s.config));const t=this.eInput.getGui();e.appendChild(t);const n=o=>this.onValueChanged(o);this.addManagedListeners(t,{input:n,keydown:n})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t}){const{eInput:n}=this;n.setInputAriaLabel(e),t!==void 0&&n.setAutoComplete(t)}};function m_(e){const t=e==null?void 0:e.trim();return t===""?e:t}function fB(e,t){const{filter:n,filterTo:s,type:o}=e||{};return[n||null,s||null].slice(0,gp(o,t))}var Vme={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},pB=class extends cB{constructor(){super(...arguments),this.eFloatingFilterInputContainer=dt,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(Vme)}onModelUpdated(e){this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e))}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){const t=e.browserAutoComplete??!1,{inputSvc:n,defaultDebounceMs:s,readOnly:o}=this;if(n.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:t}),this.applyActive=sy(e.filterParams),!o){const r=m0(e.filterParams,s),i=Os(this,this.syncUpWithParentFilter.bind(this),r);n.setValueChangedListener(i)}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,n=t.getValue();ks(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(n,!0)}syncUpWithParentFilter(e){const t=e.key===Oe.ENTER,n=this.reactive;if(n&&this.params.onUiChange(),this.applyActive&&!t)return;const{inputSvc:s,params:o,lastType:r}=this;let i=s.getValue();if(o.filterParams.trimInput&&(i=m_(i),s.setValue(i,!0)),n){const a=o,l=a.model,c=this.convertValue(i),u=c==null?null:{...l??{filterType:this.filterType,type:r??this.optionsFactory.defaultOption},filter:c};a.onModelChange(u,{afterFloatingFilter:!0})}else o.parentFilterInstance(a=>{a==null||a.onFloatingFilterChanged(r||null,i||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},Bme=class extends We{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new i0),this.eTextInput=this.createManagedBean(new _c),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),n=this.eTextInput.getGui();e.appendChild(t),e.appendChild(n),this.setupListeners(t,s=>this.onValueChanged(s)),this.setupListeners(n,s=>this.onValueChanged(s))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams(e){this.setAriaLabel(e.ariaLabel),e.autoComplete!==void 0&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},$me=class extends pB{constructor(){super(...arguments),this.FilterModelFormatterClass=dB,this.filterType="number",this.defaultOptions=f_}updateParams(e){p_(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=p_(e.filterParams),this.allowedCharPattern?this.createManagedBean(new hB({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new Bme)}convertValue(e){return e?Number(e):null}},v_=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],Hme=class extends u_{constructor(){super("textFilter",fB,v_),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),n={filterType:this.filterType,type:t},s=this.getValues(e);return s.length>0&&(n.filter=s[0]),s.length>1&&(n.filterTo=s[1]),n}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(n,s,o,r)=>{s<r&&t.push(ia(n.getValue()))}),t}createEValue(){const e=as({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:n}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,n,"to"),e}createFromToElement(e,t,n){const s=this.createManagedBean(new _c);s.addCss(`ag-filter-${n}`),s.addCss("ag-filter-filter"),t.push(s),e.appendChild(s.getGui())}removeEValues(e,t){const n=r=>this.removeComponents(r,e,t),{eValuesFrom:s,eValuesTo:o}=this;n(s),n(o)}},gB=class extends h_{constructor(){super(...arguments),this.filterTypeKeys=xme}conditionToString(e,t,n,s,o){const{filter:r,filterTo:i,type:a}=e;if(t){const l=u=>()=>dl(this,"filterSummaryTextQuote",[u]),c=this.conditionForToolPanel(a,n,l(r),l(i),s,o);if(c!=null)return c}return n?`${r}-${i}`:r!=null?`${r}`:`${a}`}},Gme=({filterOption:e,value:t,filterText:n})=>{if(n==null)return!1;switch(e){case"contains":return t.includes(n);case"notContains":return!t.includes(n);case"equals":return t===n;case"notEqual":return t!=n;case"startsWith":return t.indexOf(n)===0;case"endsWith":{const s=t.lastIndexOf(n);return s>=0&&s===t.length-n.length}default:return!1}},Ume=e=>e,Wme=e=>e==null?null:e.toString().toLowerCase(),zme=class extends rB{constructor(){super(fB,v_),this.filterType="text",this.FilterModelFormatterClass=gB}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??Gme,this.formatter=t.textFormatter??(t.caseSensitive?Ume:Wme)}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,n,s){const o=e.map(h=>this.formatter(h))||[],r=this.formatter(t),{api:i,colDef:a,column:l,context:c,filterParams:{textFormatter:u}}=this.params;if(n.type==="blank")return Dy(t);if(n.type==="notBlank")return!Dy(t);const d={api:i,colDef:a,column:l,context:c,node:s.node,data:s.data,filterOption:n.type,value:r,textFormatter:u};return o.some(h=>this.matcher({...d,filterText:h}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=n=>{const s={...n},{filter:o,filterTo:r}=n;return o&&(s.filter=m_(o)??null),r&&(s.filterTo=m_(r)??null),s};return CV(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},jme=class extends pB{constructor(){super(...arguments),this.FilterModelFormatterClass=gB,this.filterType="text",this.defaultOptions=v_}createFloatingFilterInputService(){return this.createManagedBean(new hB)}};function Kme(e){var t;return!!((t=e.quickFilter)!=null&&t.isFilterPresent())}function qme(e){var t;return(t=e.quickFilter)==null?void 0:t.getText()}function Yme(e){var t;(t=e.quickFilter)==null||t.resetCache()}var Xme=class extends We{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",n=>this.setFilter(n.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){var l;const{autoColSvc:e,colModel:t,gos:n,pivotResultCols:s}=this.beans,o=t.isPivotMode(),r=e==null?void 0:e.getColumns(),i=t.getColDefCols();let a=(o&&!n.get("applyQuickFilterBeforePivotOrAgg")?(l=s==null?void 0:s.getPivotResultCols())==null?void 0:l.list:i)??[];r&&(a=a.concat(r)),this.colsToUse=n.get("includeHiddenColumnsInQuickFilter")?a:a.filter(c=>c.isVisible()||c.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(n=>t?this.doesRowPassCache(e,n):this.doesRowPassNoCache(e,n))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return ht(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){Je(70,{newFilter:e});return}const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),n=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,n&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(n=>{const s=this.getTextForColumn(n,e);return ht(s)&&s.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let n;e?(this.checkGenerateAggText(t),n=t.quickFilterAggregateText):n=this.getAggText(t);const{quickFilterParts:s,matcher:o}=this;return o(s,n)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let n=this.beans.filterValueSvc.getValue(e,t);const s=e.getColDef();if(s.getQuickFilterText){const o=Pt(this.gos,{value:n,node:t,data:t.data,column:e,colDef:s});n=s.getQuickFilterText(o)}return ht(n)?n.toString().toUpperCase():null}getAggText(e){const t=[];for(const n of this.colsToUse){const s=this.getTextForColumn(n,e);ht(s)&&t.push(s)}return t.join(`
|
|
258
258
|
`)}},Zme={moduleName:"ClientSideRowModelFilter",version:ut,rowModels:["clientSide"],beans:[Jge]},y_={moduleName:"FilterCore",version:ut,beans:[Cme],apiFunctions:{isAnyFilterPresent:yme,onFilterChanged:wme},css:[ome],dependsOn:[Zme]},mB={moduleName:"FilterValue",version:ut,beans:[Sme]},Ty={moduleName:"ColumnFilter",version:ut,beans:[vme,bme],dynamicBeans:{headerFilterCellCtrl:Qge},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:rme,getColumnFilterInstance:ime,destroyFilter:ame,setFilterModel:lme,getFilterModel:cme,getColumnFilterModel:ume,setColumnFilterModel:dme,showColumnFilter:hme,hideColumnFilter:fme,getColumnFilterHandler:pme,doFilterAction:gme},dependsOn:[y_,Ry,mB,nme]},Jme={moduleName:"CustomFilter",version:ut,userComponents:{agReadOnlyFloatingFilter:_me},dependsOn:[Ty]},Qme={moduleName:"TextFilter",version:ut,dependsOn:[Ty],userComponents:{agTextColumnFilter:{classImp:Hme,params:{useForm:!0}},agTextColumnFloatingFilter:jme},dynamicBeans:{agTextColumnFilterHandler:zme}},eve={moduleName:"NumberFilter",version:ut,dependsOn:[Ty],userComponents:{agNumberColumnFilter:{classImp:Nme,params:{useForm:!0}},agNumberColumnFloatingFilter:$me},dynamicBeans:{agNumberColumnFilterHandler:Lme}},tve={moduleName:"DateFilter",version:ut,dependsOn:[Ty],userComponents:{agDateColumnFilter:{classImp:Ime,params:{useForm:!0}},agDateInput:Mme,agDateColumnFloatingFilter:kme},dynamicBeans:{agDateColumnFilterHandler:Pme}},nve={moduleName:"QuickFilterCore",version:ut,rowModels:["clientSide"],beans:[Xme],dependsOn:[y_,mB]},sve={moduleName:"QuickFilter",version:ut,apiFunctions:{isQuickFilterPresent:Kme,getQuickFilter:qme,resetQuickFilter:Yme},dependsOn:[nve]},ove={moduleName:"ExternalFilter",version:ut,dependsOn:[y_]},rve=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",w_=(e,t,n)=>{var a,l,c;const{editModelSvc:s}=e,o=(l=(a=s==null?void 0:s.getCellValidationModel())==null?void 0:a.getCellValidation(t))==null?void 0:l.errorMessages,r=(c=s==null?void 0:s.getRowValidationModel().getRowValidation(t))==null?void 0:c.errorMessages,i=o||r;return i!=null&&i.length?i.join(n("tooltipValidationErrorSeparator",". ")):void 0},ive=class extends We{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,n,s){e&&t.destroyBean(e);const o=this.gos,r=l_(o),{column:i,eGui:a}=t,l=i.getColDef();!s&&r&&!l.headerComponent&&(s=Av(()=>a.querySelector(".ag-header-cell-text")));const c="header",d=this.beans.colNames.getDisplayNameForColumn(i,"header",!0),h=n??d,f={getGui:()=>a,getLocation:()=>c,getTooltipValue:()=>{var g;return n??((g=l==null?void 0:l.headerTooltipValueGetter)==null?void 0:g.call(l,Pt(o,{location:c,colDef:l,column:i,value:h,valueFormatted:d})))??(l==null?void 0:l.headerTooltip)},shouldDisplayTooltip:s,getAdditionalParams:()=>({column:i,colDef:i.getColDef()})};let p=this.createTooltipFeature(f);return p&&(p=t.createBean(p),t.setRefreshFunction("tooltip",()=>p.refreshTooltip())),p}setupHeaderGroupTooltip(e,t,n,s){e&&t.destroyBean(e);const o=this.gos,r=l_(o),{column:i,eGui:a}=t,l=i.getColGroupDef();!s&&r&&!(l!=null&&l.headerGroupComponent)&&(s=Av(()=>a.querySelector(".ag-header-group-text")));const c="headerGroup",d=this.beans.colNames.getDisplayNameForColumnGroup(i,"header"),h=n??d,f={getGui:()=>a,getLocation:()=>c,getTooltipValue:()=>{var g;return n??((g=l==null?void 0:l.headerTooltipValueGetter)==null?void 0:g.call(l,Pt(o,{location:c,colDef:l,column:i,value:h,valueFormatted:d})))??(l==null?void 0:l.headerTooltip)},shouldDisplayTooltip:s,getAdditionalParams:()=>{const g={column:i};return l&&(g.colDef=l),g}},p=this.createTooltipFeature(f);return p&&t.createBean(p)}enableCellTooltipFeature(e,t,n){const{beans:s}=this,{gos:o,editSvc:r}=s,{column:i,rowNode:a}=e;let l="cell";const c=()=>{const f=!!!(r!=null&&r.isEditing(e))&&w_(s,e,this.getLocaleTextFunc());if(f)return l="cellEditor",f;l="cell";const p=i.getColDef(),g=a.data;if(p.tooltipField&&ht(g))return up(g,p.tooltipField,i.isTooltipFieldContainsDots());const v=p.tooltipValueGetter;return v?v(Pt(o,{location:"cell",colDef:i.getColDef(),column:i,rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,value:e.value,valueFormatted:e.valueFormatted})):null},u=l_(o);n||(u&&!e.isCellRenderer()?n=()=>{const h=!!(r!=null&&r.isEditing(e));if(!h&&w_(s,e,this.getLocaleTextFunc()))return!0;if(!i.isTooltipEnabled())return!1;const g=Av(()=>{const v=e.eGui;return v.children.length===0?v:v.querySelector(".ag-cell-value")});return!h&&g()}:n=()=>!(r!=null&&r.isEditing(e)));const d={getGui:()=>e.eGui,getLocation:()=>l,getTooltipValue:t!=null?()=>t:c,shouldDisplayTooltip:n,getAdditionalParams:()=>({column:i,colDef:i.getColDef(),rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(d,s)}setupFullWidthRowTooltip(e,t,n,s){const o={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>n,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:s},r=this.beans,i=r.context;e&&t.destroyBean(e,i);const a=this.createTooltipFeature(o,r);if(a)return t.createBean(a,i)}setupCellEditorTooltip(e,t){var a,l;const{beans:n}=this,{context:s}=n,o=((a=t.getValidationElement)==null?void 0:a.call(t,!0))||!((l=t.isPopup)!=null&&l.call(t))&&e.eGui;if(!o)return;const r={getGui:()=>o,getTooltipValue:()=>w_(n,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{var p,g;const{editModelSvc:c}=n,u=(p=c==null?void 0:c.getRowValidationModel())==null?void 0:p.getRowValidationMap(),d=(g=c==null?void 0:c.getCellValidationModel())==null?void 0:g.getCellValidationMap(),h=!!u&&u.size>0,f=!!d&&d.size>0;return h||f}},i=this.createTooltipFeature(r,n);if(i)return e.createBean(i,s)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=ht(t.tooltipField)||ht(t.tooltipValueGetter)||ht(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},ave=class extends Pae{createTooltipComp(e,t){const n=Eie(this.beans.userCompFactory,e);n==null||n.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){var e;(e=this.onColumnMovedEventCallback)==null||e.call(this),this.onColumnMovedEventCallback=void 0}},vB={moduleName:"Tooltip",version:ut,beans:[ive],dynamicBeans:{tooltipFeature:sV,highlightTooltipFeature:Aae,tooltipStateManager:ave},userComponents:{agTooltipComponent:Mae},dependsOn:[Ry],css:[rve]},Td=class{constructor(e){this.cellValueChanges=e}},C_=class extends Td{constructor(e,t,n,s){super(e),this.initialRange=t,this.finalRange=n,this.ranges=s}},lve=10,yB=class{constructor(e){this.actionStack=[],this.maxStackSize=e||lve,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},cve=class extends We{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},n=this.activeCellEdit!==null&&e2(this.activeCellEdit,t),s=this.activeRowEdit!==null&&Aue(this.activeRowEdit,t);if(!(n||s||this.isPasting||this.isRangeInAction))return;const{rowPinned:r,rowIndex:i,column:a,oldValue:l,value:c}=e,u={rowPinned:r,rowIndex:i,columnId:a.getColId(),newValue:c,oldValue:l};this.cellValueChanges.push(u)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const n=e.get("undoRedoCellEditingLimit");if(n<=0)return;this.undoStack=new yB(n),this.redoStack=new yB(n),this.addListeners();const s=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:o=>{o.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:s,newColumnsLoaded:s,columnGroupOpened:s,columnRowGroupChanged:s,columnMoved:s,columnPinned:s,columnVisible:s,rowDragEnd:s}),t.whenReady(this,o=>{this.gridBodyCtrl=o.gridBodyCtrl})}getCurrentUndoStackSize(){var e;return((e=this.undoStack)==null?void 0:e.getCurrentStackSize())??0}getCurrentRedoStackSize(){var e;return((e=this.redoStack)==null?void 0:e.getCurrentStackSize())??0}undo(e){const{eventSvc:t,undoStack:n,redoStack:s}=this;t.dispatchEvent({type:"undoStarted",source:e});const o=this.undoRedo(n,s,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:o})}redo(e){const{eventSvc:t,undoStack:n,redoStack:s}=this;t.dispatchEvent({type:"redoStarted",source:e});const o=this.undoRedo(s,n,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:o})}undoRedo(e,t,n,s,o){if(!e)return!1;const r=e.pop();return r!=null&&r.cellValueChanges?(this.processAction(r,i=>i[s],o),r instanceof C_?this.processRange(r.ranges||[r[n]]):this.processCell(r.cellValueChanges),t.push(r),!0):!1}processAction(e,t,n){for(const s of e.cellValueChanges){const{rowIndex:o,rowPinned:r,columnId:i}=s,a={rowIndex:o,rowPinned:r},l=ma(this.beans,a);l.displayed&&l.setDataValue(i,t(s),n)}}processRange(e){let t;const n=this.beans.rangeSvc;n.removeAllCellRanges(!0),e.forEach((s,o)=>{if(!s)return;const r=s.startRow,i=s.endRow;o===e.length-1&&(t={rowPinned:r.rowPinned,rowIndex:r.rowIndex,columnId:s.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:i.rowIndex,rowEndPinned:i.rowPinned,columnStart:s.startColumn,columns:s.columns};n.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:n,rowPinned:s}=t,o={rowIndex:n,rowPinned:s},r=ma(this.beans,o),i={rowPinned:t.rowPinned,rowIndex:r.rowIndex,columnId:t.columnId};this.setLastFocusedCell(i)}setLastFocusedCell(e){const{rowIndex:t,columnId:n,rowPinned:s}=e,{colModel:o,focusSvc:r,rangeSvc:i}=this.beans,a=o.getCol(n);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const c={rowIndex:t,column:a,rowPinned:s};r.setFocusedCell({...c,forceBrowserFocus:!0}),i==null||i.setRangeToCell(c)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new Td(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const n=new Td(this.cellValueChanges);this.pushActionsToUndoStack(n)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new Td(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new C_(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:n}=this.beans;t&&la(n)?e=new C_(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new Td(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange("batchEditing"),batchEditingStopped:({changes:e})=>this.stopBigChange("batchEditing",e),bulkEditingStarted:()=>this.startBigChange("bulkEditing"),bulkEditingStopped:({changes:e})=>this.stopBigChange("bulkEditing",e)})}startBigChange(e){this.updateBigChange(e,!0)}updateBigChange(e,t){e==="bulkEditing"?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if(e==="bulkEditing"&&!this.bulkEditing||e==="batchEditing"&&!this.batchEditing||(this.updateBigChange(e,!1),(t==null?void 0:t.length)===0))return;const n=new Td(t??[]);this.pushActionsToUndoStack(n),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},uve=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}",dve={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},hve=class extends py{constructor(){super(dve,[r0]),this.eEditor=dt}initialiseEditor(e){const t=e.value??void 0,n=this.eEditor;n.setValue(t),n.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(n,{fieldValueChanged:o=>this.setAriaLabel(o.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),n=Iv(t,e),s=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${s} (${n})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,n=this.getValue();return t?t({value:n,internalErrors:null,cellEditorParams:e}):null}},Iy=class extends py{constructor(e){super(),this.cellEditorInput=e,this.eEditor=dt}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:n}=this,{cellStartedEdit:s,eventKey:o,suppressPreventDefault:r}=e;n.getInputElement().setAttribute("title",""),t.init(n,e);let i,a=!0;s?(this.focusAfterAttached=!0,o===Oe.BACKSPACE||o===Oe.DELETE?i="":o&&o.length===1?r?a=!1:i=o:(i=t.getStartValue(),o!==Oe.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,i=t.getStartValue()),a&&i!=null&&n.setStartValue(i),this.addGuiEventListener("keydown",l=>{const{key:c}=l;(c===Oe.PAGE_UP||c===Oe.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){var s,o;const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;al()||t.getFocusableElement().focus();const n=t.getInputElement();this.highlightAllOnFocus?n.select():(o=(s=this.cellEditorInput).setCaret)==null||o.call(s)}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),n=e.getInputElement();t.focus(),n.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},fve={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},pve=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return fve}getAgComponents(){return[zL]}init(e,t){var i,a;this.eEditor=e,this.params=t;const{min:n,max:s,step:o,colDef:r}=t;n!=null&&e.setMin(n),s!=null&&e.setMax(s),o!=null&&e.setStep(o),this.includeTime=t.includeTime??((a=(i=this.getDataTypeService())==null?void 0:i.getDateIncludesTimeFlag)==null?void 0:a.call(i,r.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:n}=this,{min:s,max:o,getValidationErrors:r}=n;let i=[];const a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(s){const l=s instanceof Date?s:new Date(s);if(t<l){const c=l.toLocaleDateString();i.push(a("minDateValidation",`Date must be after ${c}`,[c]))}}if(o){const l=o instanceof Date?o:new Date(o);if(t>l){const c=l.toLocaleDateString();i.push(a("maxDateValidation",`Date must be before ${c}`,[c]))}}}return i.length||(i=null),r?r({value:t,cellEditorParams:n,internalErrors:i}):i}getValue(){const{eEditor:e,params:t}=this,n=e.getDate();return!ht(n)&&!ht(t.value)?t.value:n??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return Ho(e,this.includeTime??!1)}},gve=class extends Iy{constructor(){super(new pve(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},mve={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},vve=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return mve}getAgComponents(){return[zL]}init(e,t){var i,a;this.eEditor=e,this.params=t;const{min:n,max:s,step:o,colDef:r}=t;n!=null&&e.setMin(n),s!=null&&e.setMax(s),o!=null&&e.setStep(o),this.includeTime=t.includeTime??((a=(i=this.getDataTypeService())==null?void 0:i.getDateIncludesTimeFlag)==null?void 0:a.call(i,r.cellDataType)),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,n=e.getInputElement().value,s=this.formatDate(this.parseDate(n??void 0)),{min:o,max:r,getValidationErrors:i}=t;let a=[];if(s){const l=new Date(s),c=this.getLocaleTextFunc();if(o){const u=new Date(o);if(l<u){const d=u.toLocaleDateString();a.push(c("minDateValidation",`Date must be after ${d}`,[d]))}}if(r){const u=new Date(r);if(l>u){const d=u.toLocaleDateString();a.push(c("maxDateValidation",`Date must be before ${d}`,[d]))}}}return a.length||(a=null),i?i({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,n=this.formatDate(t.getDate());return!ht(n)&&!ht(e.value)?e.value:e.parseValue(n??"")}getStartValue(){return Ho(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):vo(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):Ho(e??null,this.includeTime??!1)??void 0}},yve=class extends Iy{constructor(){super(new vve(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},wve={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},Cve=class extends py{constructor(){super(wve,[Hie]),this.eEditor=dt}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:n,eventKey:s,maxLength:o,cols:r,rows:i}=e;this.focusAfterAttached=n,t.getInputElement().setAttribute("title",""),t.setMaxLength(o||200).setCols(r||60).setRows(i||10);let a;n?(this.focusAfterAttached=!0,s===Oe.BACKSPACE||s===Oe.DELETE?a="":s&&s.length===1?a=s:(a=this.getStartValue(e),s!==Oe.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=this.getStartValue(e)),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return(t==null?void 0:t.toString())??t}onKeyDown(e){const t=e.key;(t===Oe.LEFT||t===Oe.UP||t===Oe.RIGHT||t===Oe.DOWN||e.shiftKey&&t===Oe.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:n}=this,s=this.getLocaleTextFunc();e.setInputAriaLabel(s("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),n&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:n}=t,s=e.getValue();return!ht(s)&&!ht(n)?n:t.parseValue(s)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:n}=e,s=this.getLocaleTextFunc(),o=this.getValue();let r=[];return typeof o=="string"&&t!=null&&o.length>t&&r.push(s("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),r.length||(r=null),n?n({value:o,internalErrors:r,cellEditorParams:e}):r}},bve={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},Sve=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return bve}getAgComponents(){return[Gie]}init(e,t){this.eEditor=e,this.params=t;const{max:n,min:s,precision:o,step:r}=t;n!=null&&e.setMax(n),s!=null&&e.setMin(s),o!=null&&e.setPrecision(o),r!=null&&e.setStep(r);const i=e.getInputElement();t.preventStepping?e.addManagedElementListeners(i,{keydown:this.preventStepping}):t.showStepperButtons&&i.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:n,getValidationErrors:s}=e,r=this.eEditor.getInputElement().valueAsNumber,i=this.getLocaleTextFunc();let a=[];return typeof r=="number"&&(t!=null&&r<t&&a.push(i("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),n!=null&&r>n&&a.push(i("maxValueValidation",`Must be less than or equal to ${n}.`,[String(n)]))),a.length||(a=null),s?s({value:r,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===Oe.UP||e.key===Oe.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,n=e.getValue();if(!ht(n)&&!ht(t.value))return t.value;let s=t.parseValue(n);if(s==null)return s;if(typeof s=="string"){if(s==="")return null;s=Number(s)}return isNaN(s)?null:s}getStartValue(){return this.params.value}setCaret(){al()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},Eve=class extends Iy{constructor(){super(new Sve(()=>this.getLocaleTextFunc()))}},_ve={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},Rve=class extends py{constructor(){super(_ve,[Qie]),this.eEditor=dt,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:n,gos:s}=this,{values:o,value:r,eventKey:i}=e;if(Vn(o)){Je(58);return}this.startedByEnter=i!=null?i===Oe.ENTER:!1;let a=!1;o.forEach(d=>{const h={value:d},f=n.formatValue(e.column,null,d),p=f!=null;h.text=p?f:d,t.addOption(h),a=a||r===d}),a?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:c,valueListMaxHeight:u}=e;l!=null&&t.setPickerGap(l),u!=null&&t.setPickerMaxHeight(u),c!=null&&t.setPickerMaxWidth(c),s.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:n}=e,s=this.getValue();let o=[];if(t&&!t.includes(s)){const r=this.getLocaleTextFunc();o.push(r("invalidSelectionValidation","Invalid selection."))}else o=null;return n?n({value:s,internalErrors:o,cellEditorParams:e}):o}},Dve={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},Tve=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return Dve}getAgComponents(){return[Jv]}init(e,t){this.eEditor=e,this.params=t;const n=t.maxLength;n!=null&&e.setMaxLength(n)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:n}=e,s=this.getValue(),o=this.getLocaleTextFunc();let r=[];return t!=null&&typeof s=="string"&&s.length>t&&r.push(o("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),r.length||(r=null),n?n({value:s,cellEditorParams:e,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,n=e.getValue();return!ht(n)&&!ht(t.value)?t.value:t.parseValue(n)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){al()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),n=ht(t)&&t.length||0;n&&e.getInputElement().setSelectionRange(n,n)}},wB=class extends Iy{constructor(){super(new Tve(()=>this.getLocaleTextFunc()))}};function Ive(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function xve(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function CB(e,t,n="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,n),"ensureVisible")}function bB(e,t,n){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,n),"ensureVisible")}function Fve(e,t,n=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,n),"ensureVisible")}function Pve(e){var t;(t=e.undoRedo)==null||t.undo("api")}function Ave(e){var t;(t=e.undoRedo)==null||t.redo("api")}function kve(e,t){var n;return(n=e.editModelSvc)==null?void 0:n.getEditRowDataValue(t,{checkSiblings:!0})}function Ove(e){var s;const t=(s=e.editModelSvc)==null?void 0:s.getEditMap(),n=[];return t==null||t.forEach((o,r)=>{const{rowIndex:i,rowPinned:a}=r;o.forEach((l,c)=>{const{editorValue:u,pendingValue:d,sourceValue:h,state:f}=l,p=va(l);let g=u??d;g===pr&&(g=void 0);const v={newValue:g,oldValue:h,state:f,column:c,colId:c.getColId(),colKey:c.getColId(),rowIndex:i,rowPinned:a};(f==="editing"||f==="changed"&&p)&&n.push(v)})}),n}function Mve(e,t=!1){var s;const{editSvc:n}=e;if(n!=null&&n.isBatchEditing()){if(t)for(const o of((s=e.editModelSvc)==null?void 0:s.getEditPositions())??[])o.state==="editing"&&n.revertSingleCellEdit(o);else xc(e,{persist:!0});_d(e,void 0,{cancel:t})}else n==null||n.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function Nve(e,t){var s;const n=Wn(e,t);return((s=e.editSvc)==null?void 0:s.isEditing(n))??!1}function Lve(e,t){const{key:n,colKey:s,rowIndex:o,rowPinned:r}=t,{editSvc:i,colModel:a}=e,l=a.getCol(s);if(!l){Je(12,{colKey:s});return}const u=ma(e,{rowIndex:o,rowPinned:r||null});if(!u){Je(290,{rowIndex:o,rowPinned:r});return}if(!l.isCellEditable(u))return;r==null&&bB(e,o),CB(e,s),i==null||i.startEditing({rowNode:u,column:l},{event:n?new KeyboardEvent("keydown",{key:n}):void 0,source:"api"})}function Vve(e){var t;return((t=e.editSvc)==null?void 0:t.validateEdit())||null}function Bve(e){var t;return((t=e.undoRedo)==null?void 0:t.getCurrentUndoStackSize())??0}function $ve(e){var t;return((t=e.undoRedo)==null?void 0:t.getCurrentRedoStackSize())??0}var Hve={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},Gve=class extends UE{constructor(e){super(Hve),this.params=e}postConstruct(){yc(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,n=s=>{_0(this.gos,s,t.node,t.column,!0)||t.onKeyDown(s)};this.addManagedElementListeners(e,{keydown:n})}};function Uve(e,{column:t},n,s,o="ui"){var c;if(n instanceof KeyboardEvent&&(n.key===Oe.TAB||n.key===Oe.ENTER||n.key===Oe.F2||n.key===Oe.BACKSPACE&&s))return!0;if((n==null?void 0:n.shiftKey)&&((c=e.rangeSvc)==null?void 0:c.getCellRanges().length)!=0)return!1;const i=t==null?void 0:t.getColDef(),a=Wve(e.gos,i),l=n==null?void 0:n.type;return l==="click"&&(n==null?void 0:n.detail)===1&&a===1||l==="dblclick"&&(n==null?void 0:n.detail)===2&&a===2?!0:o==="api"?s??!1:!1}function Wve(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t!=null&&t.singleClickEdit?1:2}function b_(e,{rowNode:t,column:n},s="ui"){const o=n.getColDef().editable,r=e.editModelSvc;return n.isColumnFunc(t,o)||!!r&&r.hasEdits({rowNode:t,column:n},{withOpenEditor:!0})}function zve(e,t,n="ui"){const s=b_(e,t,n);return s===!0||n==="ui"?s:e.colModel.getCols().some(r=>b_(e,{rowNode:t.rowNode,column:r},n))}var xy=(e,t=!1)=>{if(e!==void 0)return va(e)||t&&e.state==="editing"};function SB(e,t,n=!1){var s;return xy((s=e.editModelSvc)==null?void 0:s.getEdit(t),n)}var EB=(e,t,n)=>{if(e)for(let s=0,o=e.length;s<o;++s){const r=e[s];if(r.data&&(xy(t==null?void 0:t.getEdit({rowNode:r,column:n}))||xy(t==null?void 0:t.getEdit({rowNode:r.pinnedSibling,column:n})))||EB(r.childrenAfterGroup,t,n))return!0}};function _B(e,t){const{column:n,rowNode:s}=t;return e.gos.get("groupTotalRow")&&!(s!=null&&s.footer)?!1:EB(s==null?void 0:s.childrenAfterGroup,e.editModelSvc,n)}function RB(e,{rowNode:t,column:n}){var s;if(t=t.pinnedSibling,!!t)return xy((s=e.editModelSvc)==null?void 0:s.getEdit({rowNode:t,column:n}))}var jve=class extends We{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){var o;const{cellCtrl:e,editSvc:t,beans:n}=this;if(t!=null&&t.isBatchEditing()&&t.isEditing()){const r=SB(n,e)||_B(n,e)||RB(n,e);this.applyBatchingStyle(r)}else this.applyBatchingStyle(!1);const s=!!((o=this.editModelSvc)!=null&&o.getCellValidationModel().hasCellValidation(this.cellCtrl));this.cellComp.toggleCss("ag-cell-editing-error",s)}applyBatchingStyle(e){var t;this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&((t=this.editSvc)==null?void 0:t.isBatchEditing()))??!1)}},Kve=class extends We{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){var i;const{rowCtrl:e,editModelSvc:t,beans:n}=this;let s=e.rowNode,o=t==null?void 0:t.getEditRow(s);const r=(i=this.editModelSvc)==null?void 0:i.getRowValidationModel().hasRowValidation({rowNode:s});if(!o&&s.pinnedSibling&&(s=s.pinnedSibling,o=t==null?void 0:t.getEditRow(s)),o){const a=Array.from(o.keys()).some(l=>{const c={rowNode:s,column:l};return SB(n,c,!0)||_B(n,c)||RB(n,c)});this.applyStyle(r,a);return}this.applyStyle(r)}applyStyle(e=!1,t=!1){var o,r;const n=((o=this.editSvc)==null?void 0:o.isBatchEditing())??!1,s=this.gos.get("editType")==="fullRow";(r=this.rowCtrl)==null||r.forEachGui(void 0,({rowComp:i})=>{i.toggleCss("ag-row-editing",s&&t),i.toggleCss("ag-row-batch-edit",s&&t&&n),i.toggleCss("ag-row-inline-editing",t),i.toggleCss("ag-row-not-inline-editing",!t),i.toggleCss("ag-row-editing-invalid",s&&t&&e)})}},qve=({rowModel:e,pinnedRowModel:t,editModelSvc:n},s)=>{const o=new Set;e.forEachNode(r=>s.has(r)&&o.add(r)),t==null||t.forEachPinnedRow("top",r=>s.has(r)&&o.add(r)),t==null||t.forEachPinnedRow("bottom",r=>s.has(r)&&o.add(r));for(const r of s)o.has(r)||n.removeEdits({rowNode:r});return o},Yve=({editModelSvc:e},t,n)=>{var s;for(const o of t)(s=e==null?void 0:e.getEditRow(o))==null||s.forEach((r,i)=>!n.has(i)&&e.removeEdits({rowNode:o,column:i}))},Xve=e=>()=>{const t=new Set(e.colModel.getCols()),n=e.editModelSvc.getEditMap(!0),s=new Set(n.keys());Yve(e,qve(e,s),t)},Zve=new Set(["undo","redo","paste","bulk","rangeSvc"]),Jve=new Set(["ui","api"]),DB={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},Qve=new Set(Object.keys(DB)),eye=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),Fy={cancel:!0,source:"api"},tye={cancel:!1,source:"api"},Id={checkSiblings:!0},mp={force:!0,suppressFlash:!0},nye=class extends We{constructor(){super(...arguments),this.beanName="editSvc",this.batch=!1,this.stopping=!1,this.committing=!1}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:s})=>{this.stopEditing(void 0,Fy),this.createStrategy(s)});const t=Xve(e),n=()=>{const s=this.model.getCellValidationModel().getCellValidationMap().size>0,o=this.model.getRowValidationModel().getRowValidationMap().size>0;return s||o?this.stopEditing(void 0,Fy):this.isEditing()&&(this.isBatchEditing()?_d(e,this.model.getEditPositions()):this.stopEditing(void 0,tye)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:n,filterChanged:n,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}setBatchEditing(e){e?(this.batch=!0,this.stopEditing(void 0,Fy)):(this.stopEditing(void 0,Fy),this.batch=!1)}createStrategy(e){const{beans:t,gos:n,strategy:s}=this,o=TB(n,e);if(s){if(s.beanName===o)return s;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(o,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,n,s="ui"){const o=Uve(this.beans,e,t,n,s);return o&&(this.strategy??(this.strategy=this.createStrategy())),o}shouldStopEditing(e,t,n="ui"){var s;return((s=this.strategy)==null?void 0:s.shouldStop(e,t,n))??null}shouldCancelEditing(e,t,n="ui"){var s;return((s=this.strategy)==null?void 0:s.shouldCancel(e,t,n))??null}validateEdit(){return vpe(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??Id)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){const{startedEdit:n=!0,event:s=null,source:o="ui",ignoreEventKey:r=!1,silent:i}=t;if(this.strategy??(this.strategy=this.createStrategy()),!this.isCellEditable(e,"api"))return;const a=Wn(this.beans,e);if(a&&!a.comp){a.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const l=this.shouldStartEditing(e,s,n,o);if(l===!1&&o!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,o)&&!t.continueEditing&&this.stopEditing(void 0,{source:o}),l&&this.isBatchEditing()&&this.dispatchBatchEvent("batchEditingStarted",new Map),this.strategy.start({position:e,event:s,source:o,ignoreEventKey:r,startedEdit:n,silent:i})}stopEditing(e,t){var v,C,S;const{event:n,cancel:s,source:o="ui",forceCancel:r,forceStop:i}=t||{},{beans:a,model:l}=this;if(Qve.has(o)&&this.isBatchEditing())return this.bulkRefresh(e),!1;const c=this.committing?DB[o]:o;if(!(this.committing||this.isEditing(e)||this.isBatchEditing()&&l.hasEdits(e,Id))||!this.strategy||this.stopping)return!1;this.stopping=!0;const d=Wn(a,e);d&&(d.onEditorAttachedFuncs=[]);let h=l.getEditMap(!0),f=!1;const p=!s&&(!!this.shouldStopEditing(e,n,c)||this.committing&&!this.batch)||(i??!1),g=s&&!!this.shouldCancelEditing(e,n,c)||(r??!1);if(p||g){xc(a,{persist:!0,isCancelling:g||s,isStopping:p});const b=l.getEditMap(),w=this.processEdits(b,s,o);(v=this.strategy)==null||v.stop(s,n);for(const D of w)l.clearEditValue(D);this.bulkRefresh(void 0,h);for(const D of l.getEditPositions(b)){const R=Wn(a,D),T=va(D);R==null||R.refreshCell({force:!0,suppressFlash:!T})}h=b,f||(f=p)}else if(n instanceof KeyboardEvent&&this.batch&&((C=this.strategy)!=null&&C.midBatchInputsAllowed(e))&&this.isEditing(e,{withOpenEditor:!0})){const{key:b}=n,w=b===Oe.ENTER,D=b===Oe.ESCAPE,R=b===Oe.TAB;(w||R||D)&&(w||R?xc(a,{persist:!0}):D&&this.revertSingleCellEdit(d),this.isBatchEditing()?(S=this.strategy)==null||S.cleanupEditors():_d(a,l.getEditPositions(),{event:n,cancel:D}),n.preventDefault(),this.bulkRefresh(e,h,{suppressFlash:!0}),h=l.getEditMap())}else xc(a,{persist:!0}),h=l.getEditMap();return f&&e&&this.model.removeEdits(e),this.navigateAfterEdit(t,d==null?void 0:d.cellPosition),e_(a),this.model.hasEdits()||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap()),this.bulkRefresh(),g&&this.beans.rowRenderer.refreshRows({rowNodes:Array.from(h.keys())}),this.isBatchEditing()&&(this.beans.rowRenderer.refreshRows({suppressFlash:!0,force:!0}),f&&p&&this.dispatchBatchEvent("batchEditingStopped",h)),this.stopping=!1,f}navigateAfterEdit(e,t){var c;if(!e||!t)return;const{event:n,suppressNavigateAfterEdit:s}=e;if(!(n instanceof KeyboardEvent)||s)return;const{key:r,shiftKey:i}=n,a=this.gos.get("enterNavigatesVerticallyAfterEdit");if(r!==Oe.ENTER||!a)return;const l=i?Oe.UP:Oe.DOWN;(c=this.beans.navigation)==null||c.navigateToNextCell(null,l,t,!1)}processEdits(e,t=!1,n){const s=Array.from(e.keys()),o=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,r=[];for(const i of s){const a=e.get(i);for(const l of a.keys()){const c=a.get(l),u={rowNode:i,column:l},d=va(c);!t&&d&&!o&&(this.setNodeDataValue(i,l,c.pendingValue,void 0,n)||r.push(u))}}return r}setNodeDataValue(e,t,n,s,o="edit"){const{beans:r}=this,i=Wn(r,{rowNode:e,column:t}),a=Jve.has(o)?"edit":o;i&&(i.suppressRefreshCell=!0),this.commitNextEdit();const l=e.setDataValue(t,n,a);return i&&(i.suppressRefreshCell=!1),s&&(i==null||i.refreshCell(mp)),l}setEditMap(e,t){var s;this.strategy??(this.strategy=this.createStrategy()),(s=this.strategy)==null||s.setEditMap(e,t),this.bulkRefresh();let n=mp;t!=null&&t.forceRefreshOfEditCellsOnly&&(n={...sye(e),...mp}),this.beans.rowRenderer.refreshCells(n)}dispatchEditValuesChanged({rowNode:e,column:t},n={}){if(!e||!t||!n)return;const{pendingValue:s,sourceValue:o}=n,{rowIndex:r,rowPinned:i,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:r,rowPinned:i,column:t,source:"api",data:a,newValue:s,oldValue:o,value:s,colDef:t.getColDef()})}bulkRefresh(e={},t,n={}){var a;const{beans:s,gos:o}=this,{editModelSvc:r,rowModel:i}=s;rs(o)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),n):t&&((a=r==null?void 0:r.getEditMap(!1))==null||a.forEach((l,c)=>{for(const u of l.keys())this.refCell({rowNode:c,column:u},l.get(u),n)})))}refCell({rowNode:e,column:t},n,s={}){var d,h,f;const{beans:o,gos:r}=this,i=new Set([e]),a=new Set,l=e.pinnedSibling;l&&i.add(l);const c=e.sibling;c&&a.add(c);let u=e.parent;for(;u;)(d=u.sibling)!=null&&d.footer&&r.get("groupTotalRow")||!u.parent&&u.sibling&&r.get("grandTotalRow")?a.add(u.sibling):a.add(u),u=u.parent;for(const p of i)this.dispatchEditValuesChanged({rowNode:p,column:t},n);for(const p of i)(h=Wn(o,{rowNode:p,column:t}))==null||h.refreshCell(s);for(const p of a)(f=Wn(o,{rowNode:p,column:t}))==null||f.refreshCell(s)}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{rowNode:n}=e,{gos:s,beans:o}=this;if(n.group){if(s.get("treeData")){if(!n.data&&!s.get("enableGroupEdit"))return!1}else if(!s.get("enableGroupEdit"))return!1}const r=TB(s)==="fullRow"?zve(o,e,t):b_(o,e,t);return r&&(this.strategy??(this.strategy=this.createStrategy())),r}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,n=!0){var s,o,r,i;if(this.hasValidationErrors(e)){const a=Wn(this.beans,e);return this.cellEditingInvalidCommitBlocks()?((s=t==null?void 0:t.preventDefault)==null||s.call(t),n&&(!(a!=null&&a.hasBrowserFocus())&&(a==null||a.focusCell()),(i=(r=(o=a==null?void 0:a.comp)==null?void 0:o.getCellEditor())==null?void 0:r.focusIn)==null||i.call(r)),"block-stop"):(a&&this.revertSingleCellEdit(a),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){var s,o,r,i;const n=Wn(this.beans,e);(s=n==null?void 0:n.comp)!=null&&s.getCellEditor()&&(_d(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),Ed(this.beans,e,{silent:!0}),Fc(this.beans),n==null||n.refreshCell(mp),t&&(n==null||n.focusCell(),(i=(r=(o=n==null?void 0:n.comp)==null?void 0:o.getCellEditor())==null?void 0:r.focusIn)==null||i.call(r)))}hasValidationErrors(e){var s;Fc(this.beans);const t=Wn(this.beans,e);t&&(t.refreshCell(mp),(s=t.rowCtrl.rowEditStyleFeature)==null||s.applyRowStyles());let n=!1;return e!=null&&e.rowNode?(n||(n=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(n||(n=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(n||(n=this.model.getCellValidationModel().getCellValidationMap().size>0),n||(n=this.model.getRowValidationModel().getRowValidationMap().size>0)),n}moveToNextCell(e,t,n,s="ui"){var a;let o;const r=this.isEditing(),i=r&&this.checkNavWithValidation(void 0,n)==="block-stop";return e instanceof Rd&&r&&(o=(a=this.strategy)==null?void 0:a.moveToNextEditingCell(e,t,n,s,i)),o===null||(o=o||!!this.beans.focusSvc.focusedHeader,o===!1&&!i&&this.stopEditing()),o}getCellDataValue({rowNode:e,column:t},n=!0){if(!e||!t)return;let s=this.model.getEdit({rowNode:e,column:t});const o=e.pinnedSibling;if(o){const i=this.model.getEdit({rowNode:o,column:t});i&&(s=i)}const r=n?(s==null?void 0:s.editorValue)??(s==null?void 0:s.pendingValue):s==null?void 0:s.pendingValue;return r===pr||!s?(s==null?void 0:s.sourceValue)??this.valueSvc.getValue(t,e,!1,"api"):r}addStopEditingWhenGridLosesFocus(e){dpe(this,this.beans,e)}createPopupEditorWrapper(e){return new Gve(e)}commitNextEdit(){this.committing=!0}setDataValue(e,t,n){var s;try{if((!this.isEditing()||this.committing)&&!eye.has(n))return;const{beans:o}=this;this.strategy??(this.strategy=this.createStrategy());const r=this.isBatchEditing()?"ui":this.committing?n??"api":"api";if(!n||Zve.has(n))return by(o,e,t,n,void 0,{persist:!0}),this.setNodeDataValue(e.rowNode,e.column,t,!0,n);const i=this.model.getEdit(e);if(i){if(i.pendingValue===t)return!1;if(i.sourceValue!==t)return by(o,e,t,n,void 0,{persist:!0}),this.stopEditing(e,{source:r,suppressNavigateAfterEdit:!0}),!0;if(i.sourceValue===t)return(s=o.editModelSvc)==null||s.removeEdits(e),this.dispatchEditValuesChanged(e,{...i,pendingValue:t}),!0}return by(o,e,t,n,void 0,{persist:!0}),this.stopEditing(e,{source:r,suppressNavigateAfterEdit:!0}),!0}finally{this.committing=!1}}handleColDefChanged(e){ppe(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){if(!this.batch||!this.model.hasRowEdits(e.rowNode,Id))return;const{rowNode:s,column:o}=e,{compDetails:r,valueToDisplay:i}=t;if(r){const{params:l}=r;return l.data=this.model.getEditRowDataValue(s,Id),{compDetails:r}}const a=this.model.getEditRow(e.rowNode,Id);if(i!==void 0&&(a!=null&&a.has(o)))return{valueToDisplay:this.valueSvc.getValue(o,s)}}cleanupEditors(){var e;(e=this.strategy)==null||e.cleanupEditors()}dispatchCellEvent(e,t,n,s){var o;(o=this.strategy)==null||o.dispatchCellEvent(e,t,n,s)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return Pt(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},n){var c,u;if(!n||n.length===0)return;const{beans:s,rangeSvc:o,valueSvc:r}=this;xc(s,{persist:!0});const i=this.model.getEditMap(!0),a=(u=(c=i.get(e))==null?void 0:c.get(t))==null?void 0:u.pendingValue;this.batch||this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),n.forEach(d=>{if(o==null||o.forEachRowInRange(d,h=>{const f=ma(s,h);if(f===void 0)return;const p=i.get(f)??new Map;for(const g of d.columns)if(g&&this.isCellEditable({rowNode:f,column:g},"api")){const v=r.getValue(g,f,!0,"api");let C=r.parseValue(g,f??null,a,v);Number.isNaN(C)&&(C=null),p.set(g,{editorValue:void 0,pendingValue:C,sourceValue:v,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}p.size>0&&i.set(f,p)}),this.setEditMap(i),this.batch){this.cleanupEditors(),e_(s),this.bulkRefresh();return}this.commitNextEdit(),this.stopEditing(void 0,{source:"bulk"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(i)})}),this.bulkRefresh();const l=Wn(s,{rowNode:e,column:t});l&&l.focusCell(!0)}createCellStyleFeature(e,t){return new jve(e,t)}createRowStyleFeature(e,t){return new Kve(e,t)}setEditingCells(e,t){const{beans:n}=this,{colModel:s,valueSvc:o}=n,r=new Map;for(let{colId:i,column:a,colKey:l,rowIndex:c,rowPinned:u,newValue:d,state:h}of e){const f=i?s.getCol(i):l?s.getCol(l):a;if(!f)continue;const p=ma(n,{rowIndex:c,rowPinned:u});if(!p)continue;const g=o.getValue(f,p,!0,"api");if(!(t!=null&&t.forceRefreshOfEditCellsOnly)&&!va({pendingValue:d,sourceValue:g})&&h!=="editing")continue;let v=r.get(p);v||(v=new Map,r.set(p,v)),d===void 0&&(d=pr),v.set(f,{editorValue:void 0,pendingValue:d,sourceValue:g,state:h??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(r,t)}onCellFocused(e){var r;const t=Wn(this.beans,e);if(!t||!this.isEditing(t,Id))return;const n=this.model.getEdit(t);if(!n||!va(n))return;const o=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");(r=this.beans.ariaAnnounce)==null||r.announceValue(o,"pendingChange")}allowedFocusTargetOnValidation(e){return Wn(this.beans,e)}};function sye(e){return{rowNodes:e?Array.from(e.keys()):void 0,columns:e?[...new Set(Array.from(e.values()).flatMap(t=>Array.from(t.keys())))]:void 0}}function TB(e,t){return t??e.get("editType")??"singleCell"}var IB=class extends We{postConstruct(){var e,t;this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:(e=this.onCellFocusChanged)==null?void 0:e.bind(this),cellFocusCleared:(t=this.onCellFocusChanged)==null?void 0:t.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const n=e.previousParams,{editSvc:s,beans:o}=this,r=e.type==="cellFocused"?e.sourceEvent:null;n&&(t=Wn(o,n));const{gos:i,editModelSvc:a}=o,l=e.type==="cellFocusCleared";if(s.isEditing(void 0,{withOpenEditor:!0})){const{column:c,rowIndex:u,rowPinned:d}=e,h={column:c,rowNode:ma(o,{rowIndex:u,rowPinned:d})},f=i.get("invalidEditValueMode")==="block";if(f)return;const p=!f,g=!!(a!=null&&a.getCellValidationModel().hasCellValidation(h)),v=p&&g;(n||l?s.stopEditing(void 0,{cancel:v,source:l&&p?"api":void 0,event:r}):!0)||(s.isBatchEditing()?s.cleanupEditors():s.stopEditing(void 0,{source:"api"}))}t==null||t.refreshCell({suppressFlash:!0,force:!0})}stop(e,t){var o,r;const n=this.model.getEditPositions(),s={all:[],pass:[],fail:[]};for(const i of n){s.all.push(i);const a=this.model.getCellValidationModel().getCellValidation(i);if((((o=a==null?void 0:a.errorMessages)==null?void 0:o.length)??0)>0){s.fail.push(i);continue}s.pass.push(i)}if(e)for(const i of n)Sy(this.beans,i,{cancel:e}),this.model.stop(i);else{const i=this.processValidationResults(s);if(i.destroy.length>0)for(const a of i.destroy)Sy(this.beans,a,{event:t,cancel:e}),this.model.stop(a);if(i.keep.length>0)for(const a of i.keep){const l=Wn(this.beans,a);(r=this.editSvc)!=null&&r.cellEditingInvalidCommitBlocks()||l&&this.editSvc.revertSingleCellEdit(l)}}return!0}cleanupEditors({rowNode:e}={},t){xc(this.beans,{persist:!1});const n=this.model.getEditPositions(),s=[];if(e)for(const o of n)o.rowNode!==e&&s.push(o);else for(const o of n)s.push(o);_d(this.beans,s),e_(this.beans,t)}setFocusOutOnEditor(e){var t,n,s;(s=(n=(t=e.comp)==null?void 0:t.getCellEditor())==null?void 0:n.focusOut)==null||s.call(n)}setFocusInOnEditor(e){const t=e.comp,n=t==null?void 0:t.getCellEditor();if(n!=null&&n.focusIn)n.focusIn();else{const s=this.beans.gos.get("editType")==="fullRow";e.focusCell(s),e.onEditorAttachedFuncs.push(()=>{var o,r;return(r=(o=t==null?void 0:t.getCellEditor())==null?void 0:o.focusIn)==null?void 0:r.call(o)})}}setupEditors(e){const{event:t,ignoreEventKey:n=!1,startedEdit:s,position:o,cells:r=this.model.getEditPositions()}=e,i=t instanceof KeyboardEvent&&!n&&t.key||void 0;fpe(this.beans,r,o,i,t,s)}dispatchCellEvent(e,t,n,s){const o=Wn(this.beans,e);o&&this.eventSvc.dispatchEvent({...o.createEvent(t??null,n),...s})}dispatchRowEvent(e,t,n){if(n)return;const s=J0(this.beans,e);s&&this.eventSvc.dispatchEvent(s.createRowEvent(t))}shouldStop(e,t,n="ui"){const s=this.editSvc.isBatchEditing();return s&&n==="api"?!0:s&&(n==="ui"||n==="edit")?!1:n==="api"?!0:t instanceof KeyboardEvent&&!s?t.key===Oe.ENTER:null}shouldCancel(e,t,n="ui"){const s=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!s&&t.key===Oe.ESCAPE||s&&n==="api"||n==="api")}setEditMap(e,t){var s;t!=null&&t.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const n=[];if(e.forEach((o,r)=>{o.forEach((i,a)=>{i.state==="editing"&&n.push({...i,rowNode:r,column:a})})}),t!=null&&t.update&&(e=new Map([...this.model.getEditMap(),...e])),(s=this.model)==null||s.setEditMap(e),n.length>0){const o=n.at(-1),r=o.pendingValue===pr?void 0:o.pendingValue;this.start({position:o,event:new KeyboardEvent("keydown",{key:r}),source:"api"});const i=Wn(this.beans,o);i&&this.setFocusInOnEditor(i)}}destroy(){this.cleanupEditors(),super.destroy()}},oye=class extends IB{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}shouldStop(e,t,n="ui"){const{rowNode:s}=e||{};if(!J0(this.beans,{rowNode:this.rowNode}))return!0;const r=super.shouldStop({rowNode:this.rowNode},t,n);return r!==null?r:this.rowNode?s!==this.rowNode:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:n,startedEdit:s,event:o,ignoreEventKey:r}=e,{rowNode:i}=t;this.rowNode!==i&&super.cleanupEditors(t);const a=this.beans.visibleCols.allCols,l=[],c=[];for(const u of a)u.isCellEditable(i)&&c.push(u);if(c.length!=0){this.dispatchRowEvent({rowNode:i},"rowEditingStarted",n),this.startedRows.push(i);for(const u of c){const d={rowNode:i,column:u};l.push(d),this.model.hasEdits(d)||this.model.start(d)}this.rowNode=i,this.setupEditors({cells:l,position:t,startedEdit:s,event:o,ignoreEventKey:r})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){var o;const{rowNode:n}=this;if(n&&!this.model.hasRowEdits(n))return!1;const s=[];if(e||this.model.getEditMap().forEach((r,i)=>{if(!(!r||r.size===0)){for(const a of r.values())if(va(a)){s.push(i);break}}}),Fc(this.beans),!e&&((o=this.editSvc)==null?void 0:o.checkNavWithValidation({rowNode:n}))==="block-stop")return!1;super.stop(e,t);for(const r of s)this.dispatchRowEvent({rowNode:r},"rowValueChanged");return this.cleanupEditors({rowNode:n},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,n=e.previousParams;if((n==null?void 0:n.rowIndex)===t||e.sourceEvent instanceof KeyboardEvent)return;const s=Wn(this.beans,n);this.gos.get("invalidEditValueMode")==="block"&&s&&(this.model.getCellValidationModel().getCellValidation(s)||this.model.getRowValidationModel().getRowValidation(s))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);for(const n of this.startedRows)this.dispatchRowEvent({rowNode:n},"rowEditingStopped");this.startedRows.length=0}moveToNextEditingCell(e,t,n,s="ui",o=!1){var h,f,p,g;const r=e.cellPosition;let i;this.model.suspend(!0);try{i=(h=this.beans.navigation)==null?void 0:h.findNextCellToFocusOn(r,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(i===!1)return null;if(i==null)return!1;const a=i.cellPosition,l=e.isCellEditable(),c=i.isCellEditable(),u=a&&r.rowIndex===a.rowIndex&&r.rowPinned===a.rowPinned;l&&this.setFocusOutOnEditor(e),this.restoreEditors();const d=this.gos.get("suppressStartEditOnTab");return c&&!o?d?i.focusCell(!0,n):((f=i.comp)!=null&&f.getCellEditor()||Ed(this.beans,i,{event:n,cellStartedEdit:!0}),this.setFocusInOnEditor(i),i.focusCell(!1,n)):(c&&o&&this.setFocusInOnEditor(i),i.focusCell(!0,n)),!u&&!o&&((p=this.editSvc)==null||p.stopEditing({rowNode:e.rowNode},{event:n}),this.cleanupEditors(i,!0),d?i.focusCell(!0,n):this.editSvc.startEditing(i,{startedEdit:!0,event:n,source:s,ignoreEventKey:!0})),(g=e.rowCtrl)==null||g.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach((e,t)=>e.forEach(({state:n},s)=>{var r;if(n!=="editing")return;const o=Wn(this.beans,{rowNode:t,column:s});o&&!((r=o.comp)!=null&&r.getCellEditor())&&Ed(this.beans,o,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}},rye=class extends IB{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,n="ui"){const s=super.shouldStop(e,t,n);if(s!==null)return s;const{rowNode:o,column:r}=e||{};return(!this.rowNode||!this.column)&&o&&r?null:this.rowNode!==o||this.column!==r}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:n,event:s,ignoreEventKey:o}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:n,event:s,ignoreEventKey:o})}dispatchRowEvent(e,t,n){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){return super.stop(e,t),this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:n}=this.beans,{rowIndex:s,column:o,rowPinned:r}=e,i=ma(this.beans,{rowIndex:s,rowPinned:r}),a=Q0(o),l=t.getCol(a),c=e.previousParams;if(c){const u=Q0(c.column);if((c==null?void 0:c.rowIndex)===s&&u===a&&(c==null?void 0:c.rowPinned)===r)return}n!=null&&n.isEditing({rowNode:i,column:l},{withOpenEditor:!0})&&e.type==="cellFocused"||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,n,s="ui",o=!1){var p,g,v,C,S,b;const r=this.beans.focusSvc.getFocusedCell();r&&(e=bd(this.beans,r)??e);const i=e.cellPosition;let a;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),o||(e.eGui.focus(),(g=this.editSvc)==null||g.stopEditing(e,{source:(p=this.editSvc)!=null&&p.isBatchEditing()?"ui":"api",event:n}));try{a=(v=this.beans.navigation)==null?void 0:v.findNextCellToFocusOn(i,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(a===!1)return null;if(a==null)return!1;const c=a.cellPosition,u=e.isCellEditable(),d=a.isCellEditable(),h=c&&i.rowIndex===c.rowIndex&&i.rowPinned===c.rowPinned;u&&!o&&this.setFocusOutOnEditor(e);const f=this.gos.get("suppressStartEditOnTab");if(!h&&!o&&(super.cleanupEditors(a,!0),f?a.focusCell(!0,n):this.editSvc.startEditing(a,{startedEdit:!0,event:n,source:s,ignoreEventKey:!0})),d&&!o){if(a.focusCell(!1,n),f)a.focusCell(!0,n);else if(!((C=a.comp)!=null&&C.getCellEditor())){const w=(S=this.editSvc)==null?void 0:S.isEditing(a,{withOpenEditor:!0});Ed(this.beans,a,{event:n,cellStartedEdit:!0,silent:w}),this.setFocusInOnEditor(a),this.cleanupEditors(a)}}else d&&o&&this.setFocusInOnEditor(a),a.focusCell(!0,n);return(b=e.rowCtrl)==null||b.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},gl={moduleName:"EditCore",version:ut,beans:[upe,nye],apiFunctions:{getEditingCells:Ove,getEditRowValues:kve,getCellEditorInstances:hpe,startEditingCell:Lve,stopEditing:Mve,isEditing:Nve,validateEdit:Vve},dynamicBeans:{singleCell:rye,fullRow:oye},dependsOn:[Ry,vB],css:[uve]},iye={moduleName:"UndoRedoEdit",version:ut,beans:[cve],apiFunctions:{undoCellEditing:Pve,redoCellEditing:Ave,getCurrentUndoSize:Bve,getCurrentRedoSize:$ve},dependsOn:[gl]},aye={moduleName:"TextEditor",version:ut,userComponents:{agCellEditor:wB,agTextCellEditor:wB},dependsOn:[gl]},lye={moduleName:"NumberEditor",version:ut,userComponents:{agNumberCellEditor:{classImp:Eve}},dependsOn:[gl]},cye={moduleName:"DateEditor",version:ut,userComponents:{agDateCellEditor:gve,agDateStringCellEditor:yve},dependsOn:[gl]},uye={moduleName:"CheckboxEditor",version:ut,userComponents:{agCheckboxCellEditor:hve},dependsOn:[gl]},dye={moduleName:"SelectEditor",version:ut,userComponents:{agSelectCellEditor:Rve},dependsOn:[gl]},hye={moduleName:"LargeTextEditor",version:ut,userComponents:{agLargeTextCellEditor:Cve},dependsOn:[gl]},fye={moduleName:"CustomEditor",version:ut,dependsOn:[gl]},pye=class extends We{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,hd(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),Rre(e))}createColumns(e,t){var h,f;const n=()=>{var p;zv(this.beans,(p=this.columns)==null?void 0:p.tree),this.columns=null},s=e.treeDepth,r=(((h=this.columns)==null?void 0:h.treeDepth)??-1)==s,i=this.generateSelectionCols();if(_re(i,((f=this.columns)==null?void 0:f.list)??[])&&r)return;n();const{colGroupSvc:l}=this.beans,c=(l==null?void 0:l.findDepth(e.tree))??0,u=(l==null?void 0:l.balanceTreeForAutoCols(i,c))??[];this.columns={list:i,tree:u,treeDepth:c,map:{}},t(p=>{if(!p)return null;const g=p.filter(v=>!ua(v));return[...i,...g]})}updateColumns(e){var n;const t=hd(e.source);for(const s of((n=this.columns)==null?void 0:n.list)??[]){const o=this.createSelectionColDef(e.currentValue);s.setColDef(o,null,t),Hr(this.beans,{state:[{...o,colId:s.getColId()}]},t)}}getColumn(e){var t;return((t=this.columns)==null?void 0:t.list.find(n=>Jf(n,e)))??null}getColumns(){var e;return((e=this.columns)==null?void 0:e.list)??null}isSelectionColumnEnabled(){var i,a;const{gos:e,beans:t}=this,n=e.get("rowSelection");if(typeof n!="object"||!mc(e))return!1;const s=(((a=(i=t.autoColSvc)==null?void 0:i.getColumns())==null?void 0:a.length)??0)>0;if(n.checkboxLocation==="autoGroupColumn"&&s)return!1;const o=!!dd(n),r=Bv(n);return o||r}createSelectionColDef(e){const{gos:t}=this,n=e??t.get("selectionColumnDef"),s=t.get("enableRtl"),{rowSpan:o,spanRows:r,...i}=n??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:s?"right":"left",comparator(a,l,c,u){const d=c.isSelected(),h=u.isSelected();return d===h?0:d?1:-1},editable:!1,suppressFillHandle:!0,pinned:null,...i,colId:mL,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const n=new wc(e,null,t,!1);return this.createBean(n),[n]}onSelectionOptionsChanged(e,t,n){const s=t&&typeof t!="string"?dd(t):void 0,o=e&&typeof e!="string"?dd(e):void 0,r=s!==o,i=t&&typeof t!="string"?Bv(t):void 0,a=e&&typeof e!="string"?Bv(e):void 0,l=i!==a,c=$v(e),u=$v(t);(r||l||c!==u)&&this.beans.colModel.refreshAll(n)}destroy(){var e;zv(this.beans,(e=this.columns)==null?void 0:e.tree),super.destroy()}refreshVisibility(e,t,n){var l,c;if(!((l=this.columns)!=null&&l.list.length))return;const s=e.length+t.length+n.length;if(s===0)return;const o=this.columns.list[0];if(!o.isVisible())return;const r=()=>{let u;switch(o.pinned){case"left":case!0:u=e;break;case"right":u=n;break;default:u=t}u&&$r(u,o)};(((c=this.beans.rowNumbersSvc)==null?void 0:c.getColumn(vL))?2:1)===s&&r()}};function gye(e,t){var i;if(!t.nodes.every(a=>a.rowPinned&&!ap(a)?(Je(59),!1):a.id===void 0?(Je(60),!1):!0))return;const{nodes:s,source:o,newValue:r}=t;(i=e.selectionSvc)==null||i.setNodesSelected({nodes:s,source:o??"api",newValue:r})}function mye(e,t,n="apiSelectAll"){var s;(s=e.selectionSvc)==null||s.selectAllRowNodes({source:n,selectAll:t})}function vye(e,t,n="apiSelectAll"){var s;(s=e.selectionSvc)==null||s.deselectAllRowNodes({source:n,selectAll:t})}function yye(e,t="apiSelectAllFiltered"){var n;(n=e.selectionSvc)==null||n.selectAllRowNodes({source:t,selectAll:"filtered"})}function wye(e,t="apiSelectAllFiltered"){var n;(n=e.selectionSvc)==null||n.deselectAllRowNodes({source:t,selectAll:"filtered"})}function Cye(e,t="apiSelectAllCurrentPage"){var n;(n=e.selectionSvc)==null||n.selectAllRowNodes({source:t,selectAll:"currentPage"})}function bye(e,t="apiSelectAllCurrentPage"){var n;(n=e.selectionSvc)==null||n.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function Sye(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedNodes())??[]}function Eye(e){var t;return((t=e.selectionSvc)==null?void 0:t.getSelectedRows())??[]}var _ye=class extends Lce{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();const{gos:e}=this;this.mode=Hv(e),this.groupSelectsDescendants=Xf(e),this.groupSelectsFiltered=Gv(e)==="filteredDescendants",this.masterSelectsDetail=dL(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=Xf(e),n=Hv(e),s=Gv(e)==="filteredDescendants";this.masterSelectsDetail=dL(e)==="detail",(t!==this.groupSelectsDescendants||s!==this.groupSelectsFiltered||n!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=s,this.mode=n)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,n){if(this.isRowSelectionBlocked(t))return 0;const s=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,n);if(s==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in s)return s.reset?this.resetNodes():this.selectRange(s.deselect,!1,n),this.selectRange(s.select,!0,n);{const o=s.checkFilteredNodes?FB(s.node):s.newValue;return this.setNodesSelected({nodes:[s.node],newValue:o,clearSelection:s.clearSelection,keepDescendants:s.keepDescendants,event:e,source:n})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:n,nodes:s,event:o,source:r,keepDescendants:i=!1}){var c;if(s.length===0)return 0;const{gos:a}=this;if(!mc(a)&&e)return Je(132),0;if(s.length>1&&!this.isMultiSelect())return Je(130),0;let l=0;for(let u=0;u<s.length;u++){const d=s[u],h=xd(d);if(h.rowPinned&&!ap(h)){Je(59);continue}if(h.id===void 0){Je(60);continue}this.groupSelectsFiltered&&h.group&&!a.get("treeData")||this.selectRowNode(h,e,o,r)&&(this.detailSelection.delete(h.id),l++),this.groupSelectsDescendants&&((c=h.childrenAfterGroup)!=null&&c.length)&&(l+=this.selectChildren(h,e,r))}return n||(s.length===1&&r==="api"&&this.selectionCtx.setRoot(xd(s[0])),e&&(t||!this.isMultiSelect())&&(l+=this.clearOtherNodes(xd(s[0]),i,r)),l>0&&(this.updateGroupsFromChildrenSelections(r),this.dispatchSelectionChanged(r))),l}selectRange(e,t,n){let s=0;return e.forEach(o=>{const r=xd(o);if(r.group&&this.groupSelectsDescendants)return;this.selectRowNode(r,t,void 0,n)&&s++}),s>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n)),s}selectChildren(e,t,n){const s=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return s?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:n,nodes:s}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((n,s)=>{e(n)&&t.set(s,n)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:n,rowModel:s}=this.beans;if(!rs(n))return!1;const o=s.rootNode;if(!o)return!1;t||(t=new cp(!0,o),t.active=!1);let r=!1;return t.forEachChangedNodeDepthFirst(i=>{if(i!==o){const a=this.calculateSelectedFromChildren(i);r=this.selectRowNode(i,a===null?!1:a,void 0,e)||r}}),r}clearOtherNodes(e,t,n){const s=new Map;let o=0;return this.selectedNodes.forEach(r=>{const i=r.id==e.id;if((t?!Dye(e,r):!0)&&!i){const l=this.selectedNodes.get(r.id);o+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:n}),this.groupSelectsDescendants&&r.parent&&s.set(r.parent.id,r.parent)}}),s.forEach(r=>{const i=this.calculateSelectedFromChildren(r);this.selectRowNode(r,i===null?!1:i,void 0,n)}),o}onRowSelected(e){const t=e.node;this.groupSelectsDescendants&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}createDaemonNode(e){if(!e.id)return;const t=new cl(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){t&&e.id!==t.id&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:e,rowModel:t}=this.beans;if(!rs(e))return;const n=t.getTopLevelNodes();if(n===null)return;const s=[];function o(r){for(let i=0,a=r.length;i<a;i++){const l=r[i];l.isSelected()?s.push(l):l.group&&l.childrenAfterGroup&&o(l.childrenAfterGroup)}}return o(n),s}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){const n=rs(this.gos);let s=!1;const o=r=>{const i=this.selectRowNode(xd(r),!1,void 0,e);s||(s=i)};if(t==="currentPage"||t==="filtered"){if(!n){_n(102);return}this.getNodesToSelect(t).forEach(o)}else this.selectedNodes.forEach(o),this.reset(e);if(this.selectionCtx.selectAll=!1,n&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(e);s||(s=r)}s&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,n=0;return this.getNodesToSelect(e).forEach(s=>{this.groupSelectsDescendants&&s.group||(s.isSelected()?t++:s.selectable&&n++)}),{selectedCount:t,notSelectedCount:n}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:n}=this.getSelectedCounts(e);return xB(t,n)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],n=o=>t.push(o);if(e==="currentPage")return this.forEachNodeOnPage(o=>{if(!o.group){n(o);return}if(!o.expanded&&!o.footer){const r=i=>{var a;n(i),(a=i.childrenAfterFilter)==null||a.forEach(r)};r(o);return}this.groupSelectsDescendants||n(o)}),t;const s=this.beans.rowModel;return e==="filtered"?(s.forEachNodeAfterFilter(n),t):(s.forEachNode(n),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:n}=this.beans,s=t.getFirstRow(),o=t.getLastRow();for(let r=s;r<=o;r++){const i=n.getRow(r);i&&e(i)}}selectAllRowNodes(e){const{gos:t,selectionCtx:n}=this;if(!mc(t)){Je(132);return}if(dre(t)&&!Yf(t)){Je(130);return}if(!this.canSelectAll())return;const{source:s,selectAll:o}=e;let r=!1;if(this.getNodesToSelect(o).forEach(i=>{const a=this.selectRowNode(xd(i),!0,void 0,s);r||(r=a)}),n.selectAll=!0,rs(t)&&this.groupSelectsDescendants){const i=this.updateGroupsFromChildrenSelections(s);r||(r=i)}r&&this.dispatchSelectionChanged(s)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,n){if(e||(e=[]),!Array.isArray(e)){_n(103);return}const s=new Set(e),o=[];this.beans.rowModel.forEachNode(r=>{s.has(r.id)&&o.push(r)}),n&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:o,source:t})}canSelectAll(){return rs(this.beans.gos)}updateSelectable(e){var l;const{gos:t,rowModel:n}=this.beans;if(!mc(t))return;const s="selectableChanged",o=e!==void 0,r=rs(t)&&this.groupSelectsDescendants,i=[],a=c=>{var d;if(o&&!c.group)return;if(r&&c.group){const h=((d=c.childrenAfterGroup)==null?void 0:d.some(f=>f.selectable))??!1;this.setRowSelectable(c,h,!0);return}!this.updateRowSelectable(c,!0)&&c.isSelected()&&i.push(c)};if(r){if(e===void 0){const c=n.rootNode;e=c?new cp(!1,c):void 0}e==null||e.forEachChangedNodeDepthFirst(a,!o,!o)}else n.forEachNode(a);i.length&&this.setNodesSelected({nodes:i,newValue:!1,source:s}),!o&&r&&((l=this.updateGroupsFromChildrenSelections)==null||l.call(this,s))}updateSelectableAfterGrouping(e){var t;this.updateSelectable(e),this.groupSelectsDescendants&&((t=this.updateGroupsFromChildrenSelections)!=null&&t.call(this,"rowGroupChanged",e))&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){var r,i;if(!this.masterSelectsDetail)return;const n=(i=(r=e.detailNode)==null?void 0:r.detailGridInfo)==null?void 0:i.api;if(!n)return;const s=Rye(n);if(e.isSelected()!==s&&this.selectRowNode(e,s,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!s){const a=this.detailSelection.get(e.id)??new Set;for(const l of n.getSelectedNodes())a.add(l.id);this.detailSelection.set(e.id,a)}}setDetailSelectionState(e,t,n){if(this.masterSelectsDetail){if(!Yf(t)){Je(269);return}switch(e.isSelected()){case!0:{n.selectAll();break}case!1:{n.deselectAll();break}case void 0:{const s=this.detailSelection.get(e.id);if(s){const o=[];for(const r of s){const i=n.getRowNode(r);i&&o.push(i)}n.setNodesSelected({nodes:o,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function xd(e){return ap(e)?e.pinnedSibling:e.footer?e.sibling:e}function Rye(e){let t=0,n=0;return e.forEachNode(s=>{s.isSelected()?t++:s.selectable&&n++}),xB(t,n)}function xB(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function Dye(e,t){let n=t.parent;for(;n;){if(n===e)return!0;n=n.parent}return!1}function FB(e){var s;const t=e.isSelected()===!1,n=((s=e.childrenAfterFilter)==null?void 0:s.some(FB))??!1;return t||n}var Tye={moduleName:"SharedRowSelection",version:ut,beans:[pye],apiFunctions:{setNodesSelected:gye,selectAll:mye,deselectAll:vye,selectAllFiltered:yye,deselectAllFiltered:wye,selectAllOnCurrentPage:Cye,deselectAllOnCurrentPage:bye,getSelectedNodes:Sye,getSelectedRows:Eye}},Iye={moduleName:"RowSelection",version:ut,rowModels:["clientSide","infinite","viewport"],beans:[_ye],dependsOn:[Tye]};function xye(e){var t;(t=e.expansionSvc)==null||t.expandAll(!0)}function Fye(e){var t;(t=e.expansionSvc)==null||t.expandAll(!1)}function PB(e){var t;(t=e.rowModel)==null||t.onRowHeightChanged()}function AB(e){var t,n;if((t=e.rowAutoHeight)!=null&&t.active){Je(3);return}(n=e.rowModel)==null||n.resetRowHeights()}function Pye(e,t,n){var o,r;const s=Age(e);if(s){if(((o=e.rowGroupColsSvc)==null?void 0:o.columns.length)===0){if(t<0){_n(238);return}s.setRowCount(t,n);return}_n(28);return}(r=_y(e))==null||r.setRowCount(t,n)}function Aye(e){var t;return ld(e.gos)?e.rowModel.getBlockStates():((t=e.rowNodeBlockLoader)==null?void 0:t.getBlockState())??{}}function kye(e){return e.rowModel.isLastRowIndexKnown()}var Oye={moduleName:"CsrmSsrmSharedApi",version:ut,apiFunctions:{expandAll:xye,collapseAll:Fye}},Mye={moduleName:"RowModelSharedApi",version:ut,apiFunctions:{onRowHeightChanged:PB,resetRowHeights:AB}},Nye={moduleName:"SsrmInfiniteSharedApi",version:ut,apiFunctions:{setRowCount:Pye,getCacheBlockState:Aye,isLastRowIndexKnown:kye}},Lye=class extends We{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(s=>{var r;if(!s){_n(18),t||_n(20);return}if(this.isGridApi(s))return s;const o=s;return"current"in o?(r=o.current)==null?void 0:r.api:(o.api||_n(19),o.api)}).filter(s=>!!s&&!s.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){if(!this.consuming)for(const t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const n=[];return e.columns?e.columns.forEach(s=>{n.push(t(s))}):e.column&&n.push(t(e.column)),n}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":Je(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;if(t)for(const n of e.columnGroups){let s=null;n&&(s=t.getProvidedColGroup(n.getGroupId())),!(n&&!s)&&t.setColumnGroupOpened(s,n.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){const t=e.column;let n=null;const s=this.beans,{colResize:o,ctrlsSvc:r,colModel:i}=s;if(t&&(n=i.getColDefCol(t.getColId())),t&&!n)return;const a=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const d=e.api.getColumnState().map(h=>({colId:h.colId}));Hr(s,{state:d,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const d=e.api.getColumnState().map(h=>({colId:h.colId,hide:h.hide}));Hr(s,{state:d},"alignedGridChanged")}break;case"columnPinned":{const d=e.api.getColumnState().map(h=>({colId:h.colId,pinned:h.pinned}));Hr(s,{state:d},"alignedGridChanged")}break;case"columnResized":{const u=e,d={};for(const h of a)d[h.getId()]={key:h.getColId(),newWidth:h.getActualWidth()};for(const h of u.flexColumns??[])d[h.getId()]&&delete d[h.getId()];o==null||o.setColumnWidths(Object.values(d),!1,u.finished,"alignedGridChanged");break}}const c=r.getGridBodyCtrl().isVerticalScrollShowing();for(const u of this.getAlignedGridApis())u.setGridOption("alwaysShowVerticalScroll",c)}},Vye={moduleName:"AlignedGrids",version:ut,beans:[Lye],dependsOn:[m2]},Bye=class extends We{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},kB(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){const{selectionSvc:t,pinnedRowModel:n,groupStage:s}=this.beans;t==null||t.reset("rowDataChanged"),n!=null&&n.isManual()&&n.reset(),this.dispatchRowDataUpdateStarted(e),this.allNodesMap=Object.create(null),this.nextId=0;const o=kB(this.rootNode),r=new Array(e.length);o._leafs=r;let i=0;const a=s==null?void 0:s.getNestedDataGetter(),l=a?new Set:null,c=(u,d)=>{const h=u.level+1;for(let f=0,p=d.length;f<p;++f){const g=d[f];if(!g)continue;const v=this.createRowNode(g,h);if(v.sourceRowIndex=i,r[i++]=v,l&&!l.has(g)){l.add(g),v.treeParent=u;const C=a(g);C&&c(v,C)}}};c(o,e),r.length=i}setImmutableRowData(e,t){var C;const{rootNode:n,gos:s}=this;this.dispatchRowDataUpdateStarted(t);const o=ud(s),r=e.changedRowNodes,{adds:i,updates:a}=r,l=new Set,c=[],u=(C=this.beans.groupStage)==null?void 0:C.getNestedDataGetter();let d=s.get("suppressMaintainUnsortedOrder")?void 0:!1,h=-1,f=!1;const p=(S,b)=>{if(!d&&d!==void 0){const w=S.sourceRowIndex;d=w<=h,h=w}S.data!==b&&(S.updateData(b),i.has(S)||a.add(S),!S.selectable&&S.isSelected()&&c.push(S))},g=(S,b,w)=>{for(let D=0,R=b.length;D<R;++D){const T=b[D];if(!T)continue;let F=this.getRowNode(o({data:T,level:w}));if(F?(p(F,T),f||(f=!!u&&F.treeParent!==S)):(F=this.createRowNode(T,w),i.add(F)),!u||l.has(F)){l.add(F);continue}l.add(F),F.treeParent=S;const x=u(T);x&&g(F,x,w+1)}};g(n,t,0);const v=this.deleteUnusedNodes(l,r,c)||d||i.size>0;if(v){const S=n._leafs??(n._leafs=[]);d===void 0?Wye(S,l,r):Uye(S,l)&&(r.reordered=!0)}(v||f||a.size)&&(e.rowDataUpdated=!0,this.deselect(c))}deleteUnusedNodes(e,{removals:t},n){const s=this.rootNode._leafs;for(let o=0,r=s.length;o<r;o++){const i=s[o];e.has(i)||(t.add(i),i.isSelected()&&n.push(i),this.deleteNode(i))}return t.size>0}updateRowData(e,t){var a;if(this.dispatchRowDataUpdateStarted(e.add),(a=this.beans.groupStage)!=null&&a.getNestedDataGetter())return Je(268),{remove:[],update:[],add:[]};const n=[],s=ud(this.gos),o=this.executeRemove(s,e,t,n),r=this.executeUpdate(s,e,t,n),i=this.executeAdd(e,t);return this.deselect(n),{remove:o,update:r,add:i}}executeRemove(e,{remove:t},{adds:n,updates:s,removals:o},r){const i=this.rootNode._leafs,a=i==null?void 0:i.length,l=t==null?void 0:t.length;if(!l||!a)return[];let c=0,u=a,d=0,h;const f=new Array(l);for(let p=0;p<l;++p){const g=this.lookupNode(e,t[p]);if(!g)continue;const v=g.sourceRowIndex;v<u&&(u=v),v>d&&(d=v),g.isSelected()&&r.push(g),this.deleteNode(g),n.delete(g)?(h??(h=new Set),h.add(g)):(s.delete(g),o.add(g)),f[c++]=g}return f.length=c,c&&Gye(i,u,d,o,h),f}executeUpdate(e,{update:t},{adds:n,updates:s},o){const r=t==null?void 0:t.length;if(!r)return[];const i=new Array(r);let a=0;for(let l=0;l<r;l++){const c=t[l],u=this.lookupNode(e,c);u&&(u.updateData(c),!u.selectable&&u.isSelected()&&o.push(u),i[a++]=u,n.has(u)||s.add(u))}return i.length=a,i}executeAdd(e,t){var n;const s=(n=this.rootNode)._leafs??(n._leafs=[]),o=s.length,r=e.add,i=r==null?void 0:r.length;if(!i)return[];const a=o+i;let l=this.sanitizeAddIndex(s,e.addIndex);if(l<o){for(let d=o-1,h=a-1;d>=l;--d){const f=s[d];f.sourceRowIndex=h,s[h--]=f}t.reordered=!0}s.length=a;const c=new Array(i),u=t.adds;for(let d=0;d<i;d++){const h=this.createRowNode(r[d],0);u.add(h),h.sourceRowIndex=l,s[l]=h,c[d]=h,l++}return c}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e!=null&&e.length?e[0]:null})}deselect(e){var s;const t="rowDataChanged",n=this.beans.selectionSvc;e.length&&(n==null||n.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t})),(s=n==null?void 0:n.updateGroupsFromChildrenSelections)==null||s.call(n,t),e.length&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:(n==null?void 0:n.getSelectedNodes())??null,serverSideState:null})}createRowNode(e,t){const n=new cl(this.beans);n.parent=this.rootNode,n.level=t,n.group=!1,n.expanded=!1,n.setDataAndId(e,String(this.nextId++));const s=n.id,o=this.allNodesMap;return o[s]&&Je(2,{nodeId:s}),o[s]=n,n}deleteNode(e){var o;e.clearRowTopAndRowIndex();const t=e.id,n=this.allNodesMap;n[t]===e&&delete n[t];const s=e.pinnedSibling;s&&((o=this.beans.pinnedRowModel)==null||o.pinRow(s,null))}lookupNode(e,t){if(!e)return Hye(this.rootNode._leafs,t);const n=e({data:t,level:0}),s=this.allNodesMap[n];return s||(_n(4,{id:n}),null)}sanitizeAddIndex(e,t){const n=e.length;if(typeof t!="number"||t<0||t>=n||Number.isNaN(t))return n;t=Math.ceil(t);const s=this.gos;return t>0&&s.get("treeData")&&s.get("getDataPath")&&(t=$ye(e,t)),t}},$ye=(e,t)=>{for(let n=0,s=e.length;n<s;n++){const o=e[n];if((o==null?void 0:o.rowIndex)==t-1)return n+1}return t},kB=e=>{var i;e.group=!0,e.level=-1,e.id="ROOT_NODE_ID",((i=e._leafs)==null?void 0:i.length)!==0&&(e._leafs=[]);const t=[],n=[],s=[],o=[];e.childrenAfterGroup=t,e.childrenAfterSort=n,e.childrenAfterAggFilter=s,e.childrenAfterFilter=o;const r=e.sibling;return r&&(r.childrenAfterGroup=t,r.childrenAfterSort=n,r.childrenAfterAggFilter=s,r.childrenAfterFilter=o,r.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},Hye=(e,t)=>{if(e)for(let n=0,s=e.length;n<s;n++){const o=e[n];if(o.data===t)return o}return _n(5,{data:t}),null},Gye=(e,t,n,s,o)=>{t=Math.max(0,t);for(let r=t,i=e.length;r<i;++r){const a=e[r];r<=n&&(s.has(a)||o!=null&&o.has(a))||(a.sourceRowIndex=t,e[t++]=a)}e.length=t},Uye=(e,t)=>{const n=t.size;e.length=n;let s=0,o=!1,r=!1;for(const i of t){const a=i.sourceRowIndex;a===s?r||(r=o):(a>=0?r=!0:o=!0,i.sourceRowIndex=s,e[s]=i),++s}return r},Wye=(e,t,{removals:n,adds:s})=>{const o=e.length;e.length=t.size;let r=0;for(let i=0;i<o;++i){const a=e[i];n.has(a)||(r!==i&&(a.sourceRowIndex=r,e[r]=a),++r)}for(const i of s)i.sourceRowIndex<0&&(i.sourceRowIndex=r,e[r++]=i);e.length=r},OB=e=>{const t=e.childrenAfterSort,n=e.sibling;if(n&&(n.childrenAfterSort=t),!!t)for(let s=0,o=t.length-1;s<=o;s++){const r=t[s],i=s===0,a=s===o;r.firstChild!==i&&(r.firstChild=i,r.dispatchRowEvent("firstChildChanged")),r.lastChild!==a&&(r.lastChild=a,r.dispatchRowEvent("lastChildChanged")),r.childIndex!==s&&(r.childIndex=s,r.dispatchRowEvent("childIndexChanged"))}},zye=class extends We{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e){const t=this.beans.sortSvc.getSortOptions(),n=t.length>0&&!!e.changedRowNodes&&this.gos.get("deltaSort");this.sort(t,n,e.changedRowNodes,e.changedPath)}sort(e,t,n,s){const{gos:o,colModel:r,rowGroupColsSvc:i,rowNodeSorter:a,rowRenderer:l,showRowGroupCols:c}=this.beans,u=o.get("groupMaintainOrder"),d=r.getCols().some(S=>S.isRowGroupActive()),h=i==null?void 0:i.columns,f=r.isPivotMode(),p=o.getCallback("postSortRows");let g=!1,v;const C=S=>{var R,T;const b=f&&S.leafGroup;let w=u&&d&&!S.leafGroup;w&&(v??(v=this.shouldSortContainsGroupCols(e)),w&&(w=!v));let D=null;if(w){let F=!1;if(h){const x=S.level+1;x<h.length&&(F=h[x].getSort()===null)}F||(D=qye(S))}else!e.length||b||(t&&n?D=jye(a,S,n,s,e):D=a.doFullSort(S.childrenAfterAggFilter,e));if(D||(D=((R=S.childrenAfterAggFilter)==null?void 0:R.slice(0))??[]),g||(g=((T=S.childrenAfterSort)==null?void 0:T[0])!==D[0]),S.childrenAfterSort=D,OB(S),p){const F={nodes:S.childrenAfterSort};p(F)}};if(s==null||s.forEachChangedNodeDepthFirst(C),g&&o.get("groupHideOpenParents")){const S=c==null?void 0:c.getShowRowGroupCols();S!=null&&S.length&&l.refreshCells({columns:S,force:!0})}}shouldSortContainsGroupCols(e){const t=e.length;if(!t)return!1;if(bi(this.gos)){for(let n=0;n<t;++n){const s=e[n].column;if(s.isPrimary()&&s.isRowGroupActive())return!0}return!1}for(let n=0;n<t;++n)if(e[n].column.getColDef().showRowGroup)return!0;return!1}},jye=(e,t,n,s,o)=>{const r=t.childrenAfterAggFilter,i=t.childrenAfterSort;if(!i)return e.doFullSort(r,o);const a=new Set,l=[],{updates:c,adds:u}=n;for(let h=0,f=r.length;h<f;++h){const p=r[h];c.has(p)||u.has(p)||s&&!s.canSkip(p)?l.push({currentPos:l.length,rowNode:p}):a.add(p)}const d=i.filter(h=>a.has(h)).map((h,f)=>({currentPos:f,rowNode:h}));return l.sort((h,f)=>e.compareRowNodes(o,h,f)),Kye(e,o,l,d)},Kye=(e,t,n,s)=>{let o=0,r=0;const i=n.length,a=s.length,l=new Array(i+a);let c=0;for(;o<i&&r<a;){const u=n[o],d=s[r];e.compareRowNodes(t,u,d)<0?(l[c++]=u.rowNode,++o):(l[c++]=d.rowNode,++r)}for(;o<i;)l[c++]=n[o++].rowNode;for(;r<a;)l[c++]=s[r++].rowNode;return l},qye=e=>{const t=e.childrenAfterSort,n=e.childrenAfterAggFilter,s=t==null?void 0:t.length,o=n==null?void 0:n.length;if(!s||!o)return null;const r=new Array(o),i=new Set;for(let l=0;l<o;++l)i.add(n[l]);let a=0;for(let l=0;l<s;++l){const c=t[l];i.delete(c)&&(r[a++]=c)}if(i.size===0&&a===s)return t;for(const l of i)r[a++]=l;return r.length=a,r},Yye=class extends We{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.rowDataUpdatedPending=!1,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingModel=!1,this.rowNodesCountReady=!1,this.stages=[],this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=Os(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const e=this.beans,t=new cl(e);this.rootNode=t,this.nodeManager=this.createBean(new Bye(t));const n=this.refreshModel.bind(this,{step:"group"}),s=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:s,columnRowGroupChanged:n,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:n,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:e,stagesRefreshProps:t}=this,n=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(s=>!!s);this.stages=n;for(let s=n.length-1;s>=0;--s)for(const o of n[s].refreshProps)t.set(o,s);this.addManagedPropertyListeners([...t.keys()],s=>{var r;const o=(r=s.changeSet)==null?void 0:r.properties;o&&this.onPropChange(o)}),this.addManagedPropertyListener("rowData",()=>this.onPropChange(["rowData"])),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,n,s){let o,r=!1;do{o=!1;const i=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(i,n),c=Math.min(a,s);for(let u=l;u<=c;u++){const d=this.getRow(u);if(d.rowHeightEstimated){const h=ol(this.beans,d);d.setRowHeight(h.height),o=!0,r=!0}}o&&this.setRowTopAndRowIndex()}while(o);return r}onPropChange(e){const{nodeManager:t,gos:n,beans:s}=this,o=s.groupStage;if(!t)return;const r=new Set(e),i=o==null?void 0:o.onPropChange(r);let a;r.has("rowData")?a=n.get("rowData"):i&&(a=o==null?void 0:o.extractData()),a&&!Array.isArray(a)&&(a=null,Je(1));const l={step:"nothing",changedProps:r};a&&(!i&&!this.isEmpty()&&a.length>0&&n.exists("getRowId")&&!n.get("resetRowDataOnUpdate")?(l.keepRenderedRows=!0,l.animate=!n.get("suppressAnimationFrame"),l.changedRowNodes=new my,t.setImmutableRowData(l,a)):(l.rowDataUpdated=!0,l.newData=!0,t.setNewRowData(a),this.rowNodesCountReady=!0));const c=l.rowDataUpdated?"group":this.getRefreshedStage(e);c&&(l.step=c,this.refreshModel(l))}getRefreshedStage(e){const{stages:t,stagesRefreshProps:n}=this,s=t.length;let o=s;for(let r=0,i=e.length;r<i&&o;++r)o=Math.min(o,n.get(e[r])??o);return o<s?t[o].step:null}setRowTopAndRowIndex(e){const{beans:t,rowsToDisplay:n}=this,s=t.environment.getDefaultRowHeight();let o=0;const r=Ms(this.gos,"normal");for(let i=0,a=n.length;i<a;++i){const l=n[i],c=l.id;if(c!=null&&(e==null||e.add(c)),l.rowHeight==null){const u=ol(t,l,r,s);l.setRowHeight(u.height,u.estimated)}l.setRowTop(o),l.setRowIndex(i),o+=l.rowHeight}}clearRowTopAndRowIndex(e,t){const n=e.active,s=i=>{(i==null?void 0:i.id)!=null&&!t.has(i.id)&&i.clearRowTopAndRowIndex()},o=i=>{s(i),s(i.detailNode),s(i.sibling);const a=i.childrenAfterGroup;if(!i.hasChildren()||!a)return;const l=i.level==-1;if(!(n&&!l&&!i.expanded))for(let u=0,d=a.length;u<d;++u)o(a[u])},r=this.rootNode;r&&o(r)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){var o,r;const{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;const s=(o=e.sibling)!=null&&o.displayed?1:0;return(((r=e.childrenAfterSort)==null?void 0:r.length)??0)+s}getTopLevelRowDisplayedIndex(e){const{beans:t,rootNode:n,rowsToDisplay:s}=this;if(!n||!s.length||s[0]===n)return e;const r=n.childrenAfterSort,i=l=>{let c=r[l];if(this.gos.get("groupHideOpenParents"))for(;c.expanded&&c.childrenAfterSort&&c.childrenAfterSort.length>0;)c=c.childrenAfterSort[0];return c.rowIndex},a=t.footerSvc;return a?a==null?void 0:a.getTopDisplayIndex(s,e,r,i):i(e)}getTopLevelIndexFromDisplayedIndex(e){var a;const{rootNode:t,rowsToDisplay:n}=this;if(!t||!n.length||n[0]===t)return e;let o=this.getRow(e);o.footer&&(o=o.sibling);let r=o.parent;for(;r&&r!==t;)o=r,r=o.parent;const i=((a=t.childrenAfterSort)==null?void 0:a.indexOf(o))??-1;return i>=0?i:e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:cd(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){const s=t.length===0||t.some(o=>o.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:s,keepRenderedRows:!0,animate:cd(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:cd(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(e){const t=new cp(!1,this.rootNode);return t.active=e,t}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:n,rowDataUpdated:s}=e;return!(!t||n||!s||t.removals.size||t.adds.size)}refreshModel(e){var c,u;const{nodeManager:t,beans:n,eventSvc:s,started:o,refreshingModel:r}=this;if(!t)return;const i=!!e.rowDataUpdated,a=e.changedPath??(e.changedPath=this.createChangePath(!e.newData&&i));if(o&&i&&s.dispatchEvent({type:"rowDataUpdated"}),!o||r||n.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(e)){this.rowDataUpdatedPending||(this.rowDataUpdatedPending=i);return}switch(this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.refreshingModel=!0,(c=n.masterDetailSvc)==null||c.refreshModel(e),i&&e.step!=="group"&&((u=n.colFilter)==null||u.refreshModel()),e.step){case"group":this.doGrouping(e);case"filter":this.doFilter(a);case"pivot":this.doPivot(a);case"aggregate":this.doAggregate(a);case"filter_aggregates":this.doFilterAggregates(a);case"sort":this.doSort(e.changedRowNodes,a);case"map":this.doRowsToDisplay()}const l=new Set;this.setRowTopAndRowIndex(l),this.clearRowTopAndRowIndex(a,l),this.refreshingModel=!1,s.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}isEmpty(){var e,t,n;return!((t=(e=this.rootNode)==null?void 0:e._leafs)!=null&&t.length)||!((n=this.beans.colModel)!=null&&n.ready)}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let n=!1,s=!1;const o=[],r=Xf(this.gos);return this.forEachNodeAfterFilterAndSort(i=>{if(s)return;if(n&&(i===t||i===e)&&(s=!0,r&&i.group)){MB(o,i);return}if(!n){if(i!==t&&i!==e)return;n=!0,t===e&&(s=!0)}(!i.group||!r)&&o.push(i)}),o}getTopLevelNodes(){var e;return((e=this.rootNode)==null?void 0:e.childrenAfterGroup)??null}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay,n=t.length;if(this.isEmpty()||n===0)return-1;let s=0,o=n-1;if(e<=0)return 0;if(t[o].rowTop<=e)return o;let i=-1,a=-1;for(;;){const l=Math.floor((s+o)/2),c=t[l];if(this.isRowInPixel(c,e)||(c.rowTop<e?s=l+1:c.rowTop>e&&(o=l-1),i===s&&a===o))return l;i=s,a=o}}isRowInPixel(e,t){const n=e.rowTop,s=n+e.rowHeight;return n<=t&&s>t}forEachLeafNode(e){var n;const t=(n=this.rootNode)==null?void 0:n._leafs;if(t)for(let s=0,o=t.length;s<o;++s)e(t[s],s)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){const t=this.rowsToDisplay;for(let n=0,s=t.length;n<s;++n)e(t[n],n)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,n=>n.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,n=>n.childrenAfterSort)}forEachPivotNode(e,t,n){const{colModel:s,rowGroupColsSvc:o}=this.beans;if(!s.isPivotMode())return;if(!(o!=null&&o.columns.length)){e(this.rootNode,0);return}const r=n?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,i=>i.leafGroup?null:i[r])}depthFirstSearchRowNodes(e,t=!1,n=r=>r.childrenAfterGroup,s=this.rootNode,o=0){let r=o;if(!s)return r;const i=s===this.rootNode;if(i||e(s,r++),s.hasChildren()&&!s.footer){const a=n(s);if(a){const l=this.beans.footerSvc;r=(l==null?void 0:l.addTotalRows(r,s,e,t,i,"top"))??r;for(const c of a)r=this.depthFirstSearchRowNodes(e,t,n,c,r);return(l==null?void 0:l.addTotalRows(r,s,e,t,i,"bottom"))??r}}return r}doAggregate(e){var n;const t=this.rootNode;t&&((n=this.beans.aggStage)==null||n.execute({rowNode:t,changedPath:e}))}doFilterAggregates(e){const t=this.rootNode,n=this.beans.filterAggStage;if(n){n.execute({rowNode:t,changedPath:e});return}t.childrenAfterAggFilter=t.childrenAfterFilter}doSort(e,t){const n=this.beans.sortStage;if(n){n.execute({rowNode:this.rootNode,changedRowNodes:e,changedPath:t});return}t.forEachChangedNodeDepthFirst(s=>{s.childrenAfterSort=s.childrenAfterAggFilter.slice(0),OB(s)})}doGrouping(e){var o;const t=this.rootNode,n=this.beans.groupStage,s=n==null?void 0:n.execute({rowNode:t,changedRowNodes:e.changedRowNodes,changedPath:e.changedPath,afterColumnsChanged:!!e.afterColumnsChanged});if(s===void 0){const r=t._leafs;t.childrenAfterGroup=r,t.updateHasChildren();const i=t.sibling;i&&(i.childrenAfterGroup=r)}(s||e.rowDataUpdated)&&((o=this.beans.colFilter)==null||o.refreshModel()),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){const t=this.beans.filterStage;if(t){t.execute({rowNode:this.rootNode,changedPath:e});return}e.forEachChangedNodeDepthFirst(n=>{n.childrenAfterFilter=n.childrenAfterGroup,eB(n)},!0)}doPivot(e){var t;(t=this.beans.pivotStage)==null||t.execute({rowNode:this.rootNode,changedPath:e})}getRowNode(e){var s,o;const t=(s=this.nodeManager)==null?void 0:s.getRowNode(e);return typeof t=="object"?t:typeof e=="string"&&e.indexOf(f0)===0?(o=this.beans.groupStage)==null?void 0:o.getNode(e):void 0}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const n=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),n)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){const e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){var a;const{nodeManager:e,beans:t,eventSvc:n,asyncTransactions:s}=this;if(!e)return;(a=t.valueCache)==null||a.onDataChanged();const o=[],r=[],i=new my;for(const{rowDataTransaction:l,callback:c}of s??[]){this.rowNodesCountReady=!0;const u=e.updateRowData(l,i);o.push(u),c&&r.push(c.bind(null,u))}this.commitTransactions(i),r.length>0&&setTimeout(()=>{for(let l=0,c=r.length;l<c;l++)r[l]()},0),o.length>0&&n.dispatchEvent({type:"asyncTransactionsFlushed",results:o}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){var o;const t=this.nodeManager;if(!t)return null;(o=this.beans.valueCache)==null||o.onDataChanged(),this.rowNodesCountReady=!0;const n=new my,s=t.updateRowData(e,n);return this.commitTransactions(n),s}commitTransactions(e){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:e,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{beans:e,rootNode:t}=this,n=e.flattenStage;if(n){this.rowsToDisplay=n.execute({rowNode:t});return}const s=this.rootNode.childrenAfterSort??[];for(const o of s)o.setUiLevel(0);this.rowsToDisplay=s}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);const n=e.sibling;n==null||n.setRowHeight(n.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const n=t.detailNode;n==null||n.setRowHeight(n.rowHeight,!0);const s=t.sibling;s==null||s.setRowHeight(s.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){var t;e.rowHeightChanged&&!((t=this.beans.rowAutoHeight)!=null&&t.active)&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},MB=(e,t)=>{const n=t.childrenAfterGroup;if(n)for(let s=0,o=n.length;s<o;++s){const r=n[s];r.data&&e.push(r),r.group&&MB(e,r)}};function Xye(e){var t;(t=e.expansionSvc)==null||t.onGroupExpandedOrCollapsed()}function Zye(e,t){const n=pl(e);n&&((!t||t==="everything")&&(t="group"),n.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function Jye(e){var t;return((t=pl(e))==null?void 0:t.isEmpty())??!0}function Qye(e,t){var n;(n=pl(e))==null||n.forEachLeafNode(t)}function ewe(e,t){var n;(n=pl(e))==null||n.forEachNodeAfterFilter(t)}function twe(e,t){var n;(n=pl(e))==null||n.forEachNodeAfterFilterAndSort(t)}function nwe(e,t){return e.frameworkOverrides.wrapIncoming(()=>{var n;return(n=pl(e))==null?void 0:n.updateRowData(t)})}function swe(e,t,n){e.frameworkOverrides.wrapIncoming(()=>{var s;return(s=pl(e))==null?void 0:s.batchUpdateRowData(t,n)})}function owe(e){e.frameworkOverrides.wrapIncoming(()=>{var t;return(t=pl(e))==null?void 0:t.flushAsyncTransactions()})}function rwe(e){var t;return(t=e.selectionSvc)==null?void 0:t.getBestCostNodeSelection()}var NB={moduleName:"ClientSideRowModel",version:ut,rowModels:["clientSide"],beans:[Yye,zye],dependsOn:[z2]},iwe={moduleName:"ClientSideRowModelApi",version:ut,apiFunctions:{onGroupExpandedOrCollapsed:Xye,refreshClientSideRowModel:Zye,isRowDataEmpty:Jye,forEachLeafNode:Qye,forEachNodeAfterFilter:ewe,forEachNodeAfterFilterAndSort:twe,applyTransaction:nwe,applyTransactionAsync:swe,flushAsyncTransactions:owe,getBestCostNodeSelection:rwe,resetRowHeights:AB,onRowHeightChanged:PB},dependsOn:[Oye,Mye]},awe=class extends We{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:n,columnKeys:s,skipRowGroups:o,exportRowNumbers:r}=t,i=this.getColumnsToExport({allColumns:n,skipRowGroups:o,columnKeys:s,exportRowNumbers:r});return[this.prepareSession(i),this.prependContent(t),this.exportColumnGroups(t,i),this.exportHeaders(t,i),this.processPinnedTopRows(t,i),this.processRows(t,i),this.processPinnedBottomRows(t,i),this.appendContent(t)].reduce((a,l)=>l(a),e).parse()}processRow(e,t,n,s){var p;const o=t.shouldRowBeSkipped||(()=>!1),i=t.rowPositions!=null||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!i,l=this.colModel.isPivotMode()?s.leafGroup:!s.group,c=!!s.footer,u=s.allChildrenCount===1&&((p=s.childrenAfterGroup)==null?void 0:p.length)===1&&cre(this.gos,s);if(!l&&!c&&(t.skipRowGroups||u||a)||t.onlySelected&&!s.isSelected()||t.skipPinnedTop&&s.rowPinned==="top"||t.skipPinnedBottom&&s.rowPinned==="bottom"||s.stub||s.level===-1&&!l&&!c||o(Pt(this.gos,{node:s})))return;const f=e.onNewBodyRow(s);if(n.forEach((g,v)=>{f.onColumn(g,v,s)}),t.getCustomContentBelowRow){const g=t.getCustomContentBelowRow(Pt(this.gos,{node:s}));g&&e.addCustomContent(g)}}appendContent(e){return t=>{const n=e.appendContent;return n&&t.addCustomContent(n),t}}prependContent(e){return t=>{const n=e.prependContent;return n&&t.addCustomContent(n),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return n=>{if(!e.skipColumnGroupHeaders){const s=new IL,{colGroupSvc:o}=this.beans,r=o?o.createColumnGroups({columns:t,idCreator:s,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(r,n,e.processGroupHeaderCallback)}return n}}exportHeaders(e,t){return n=>{if(!e.skipColumnHeaders){const s=n.onNewHeaderRow();t.forEach((o,r)=>{s.onColumn(o,r,void 0)})}return n}}processPinnedTopRows(e,t){return n=>{var o,r;const s=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(i=>i.rowPinned==="top").sort((i,a)=>i.rowIndex-a.rowIndex).map(i=>{var a;return(a=this.pinnedRowModel)==null?void 0:a.getPinnedTopRow(i.rowIndex)}).forEach(s):(o=this.pinnedRowModel)!=null&&o.isManual()||(r=this.pinnedRowModel)==null||r.forEachPinnedRow("top",s),n}}processRows(e,t){return n=>{var c;const s=this.rowModel,o=rs(this.gos),r=ld(this.gos),i=!o&&e.onlySelected,a=this.processRow.bind(this,n,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(u=>u.rowPinned==null).sort((u,d)=>u.rowIndex-d.rowIndex).map(u=>s.getRow(u.rowIndex)).forEach(a);else if(this.colModel.isPivotMode())o?s.forEachPivotNode(a,!0,l==="filteredAndSorted"):r?s.forEachNodeAfterFilterAndSort(a,!0):s.forEachNode(a);else if(e.onlySelectedAllPages||i){const u=((c=this.beans.selectionSvc)==null?void 0:c.getSelectedNodes())??[];this.replicateSortedOrder(u),u.forEach(a)}else l==="all"?s.forEachNode(a):o||r?s.forEachNodeAfterFilterAndSort(a,!0):s.forEachNode(a);return n}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:n}=this.beans;if(!t||!n)return;const s=t.getSortOptions(),o=(r,i)=>{var a,l;return r.rowIndex!=null&&i.rowIndex!=null?r.rowIndex-i.rowIndex:r.level===i.level?((a=r.parent)==null?void 0:a.id)===((l=i.parent)==null?void 0:l.id)?n.compareRowNodes(s,{rowNode:r,currentPos:r.rowIndex??-1},{rowNode:i,currentPos:i.rowIndex??-1}):o(r.parent,i.parent):r.level>i.level?o(r.parent,i):o(r,i.parent)};e.sort(o)}processPinnedBottomRows(e,t){return n=>{var o,r;const s=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(i=>i.rowPinned==="bottom").sort((i,a)=>i.rowIndex-a.rowIndex).map(i=>{var a;return(a=this.pinnedRowModel)==null?void 0:a.getPinnedBottomRow(i.rowIndex)}).forEach(s):(o=this.pinnedRowModel)!=null&&o.isManual()||(r=this.pinnedRowModel)==null||r.forEachPinnedRow("bottom",s),n}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:n=!1,exportRowNumbers:s=!1,columnKeys:o}=e,{colModel:r,gos:i,visibleCols:a}=this,l=r.isPivotMode(),c=h=>ua(h)?!1:!da(h)||s;if(o!=null&&o.length)return r.getColsForKeys(o).filter(c);const u=i.get("treeData");let d=[];return t&&!l?d=r.getCols():d=a.allCols,d=d.filter(h=>c(h)&&(n&&!u?!BE(h):!0)),d}recursivelyAddHeaderGroups(e,t,n){const s=[];for(const o of e){const r=o;if(r.getChildren)for(const i of r.getChildren()??[])s.push(i)}e.length>0&&is(e[0])&&this.doAddHeaderHeader(t,e,n),s&&s.length>0&&this.recursivelyAddHeaderGroups(s,t,n)}doAddHeaderHeader(e,t,n){const s=e.onNewHeaderGroupingRow();let o=0;for(const r of t){const i=r;let a;n?a=n(Pt(this.gos,{columnGroup:i})):a=this.beans.colNames.getDisplayNameForColumnGroup(i,"header");const c=(i.isExpandable()?i.getLeafColumns():[]).reduce((u,d,h,f)=>{let p=Tn(u);return d.getColumnGroupShow()==="open"?(!p||p[1]!=null)&&(p=[h],u.push(p)):p&&p[1]==null&&(p[1]=h-1),h===f.length-1&&p&&p[1]==null&&(p[1]=h),u},[]);s.onColumn(i,a||"",o++,i.getLeafColumns().length-1,c)}}},lwe={moduleName:"SharedExport",version:ut,beans:[awe]},LB=`\r
|
|
259
259
|
`,cwe=class extends Vge{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:n}=e;this.suppressQuotes=t,this.columnSeparator=n}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,LB),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((n,s)=>{s!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(n.data.value||""),n.mergeAcross&&this.appendEmptyCells(n.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,n,s){n!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(s)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,n){t!=0&&(this.result+=this.columnSeparator);const s=this.extractRowCellValue(e,t,t,"csv",n);this.result+=this.putInQuotes(s.valueFormatted??s.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(Je(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=LB),this.isFirstLine=!1}},uwe=class extends Lge{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){Je(51);return}const t=this.getMergedParams(e),n=this.getData(t),s=new Blob(["\uFEFF",n],{type:"text/plain"}),o=typeof t.fileName=="function"?t.fileName(Pt(this.gos,{})):t.fileName;Bge(this.getFileName(o),s)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const n=t?Object.assign({},e):this.getMergedParams(e);return this.getData(n)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:n,rowGroupColsSvc:s,valueSvc:o,gos:r}=this,{processCellCallback:i,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:c,suppressQuotes:u,columnSeparator:d}=e;return new cwe({colModel:t,colNames:n,valueSvc:o,gos:r,processCellCallback:i||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:c||void 0,suppressQuotes:u||!1,columnSeparator:d||",",rowGroupColsSvc:s})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function dwe(e,t){var n;return(n=e.csvCreator)==null?void 0:n.getDataAsCsv(t)}function hwe(e,t){var n;(n=e.csvCreator)==null||n.exportDataAsCsv(t)}var fwe={moduleName:"CsvExport",version:ut,beans:[uwe],apiFunctions:{getDataAsCsv:dwe,exportDataAsCsv:hwe},dependsOn:[lwe]},pwe=class extends We{constructor(e,t,n){super(),this.id=e,this.parentCache=t,this.params=n,this.state="needsLoading",this.version=0,this.startRow=e*n.blockSize,this.endRow=this.startRow+n.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,n){this.successCommon(e,{rowData:t,rowCount:n})}isRequestMostRecentAndLive(e){const t=e===this.version,n=this.isAlive();return t&&n}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:n,beans:s,rowNodes:o}=this;for(let r=0;r<e;r++){const i=n+r,a=new cl(s);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(i),a.setRowTop(t*i),o.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:n,state:s}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:n,pageStatus:s}}}setDataAndId(e,t,n){ht(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(Vn(this.params.datasource.getRows)){Je(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:n,params:{sortModel:s,filterModel:o},gos:r}=this;return{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,n),failCallback:this.pageLoadFailed.bind(this,n),sortModel:s,filterModel:o,context:Pt(r,{}).context}}forEachNode(e,t,n){this.rowNodes.forEach((s,o)=>{this.startRow+o<n&&e(s,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const n=e-this.startRow;return this.rowNodes[n]}processServerResult(e){const{rowNodes:t,beans:n}=this;t.forEach((o,r)=>{const i=e.rowData?e.rowData[r]:void 0;!o.id&&o.alreadyRendered&&i&&(t[r]=new cl(n),t[r].setRowIndex(o.rowIndex),t[r].setRowTop(o.rowTop),t[r].setRowHeight(o.rowHeight),o.clearRowTopAndRowIndex()),this.setDataAndId(t[r],i,this.startRow+r)});const s=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,s)}destroy(){for(const e of this.rowNodes)e.clearRowTopAndRowIndex();super.destroy()}},gwe=2,mwe=class extends We{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const n=Math.floor(e/this.params.blockSize);let s=this.blocks[n];if(!s){if(t)return;s=this.createBlock(n)}return s.getRow(e)}createBlock(e){const t=this.params,n=this.createBean(new pwe(e,this,t));return this.blocks[n.id]=n,this.blockCount++,this.purgeBlocksIfNeeded(n),t.rowNodeBlockLoader.addBlock(n),n}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(sl(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(i=>i!=e),n=(i,a)=>a.lastAccessed-i.lastAccessed;t.sort(n);const s=this.params.maxBlocksInCache>0,o=s?this.params.maxBlocksInCache-1:null,r=gwe-1;t.forEach((i,a)=>{const l=i.state==="needsLoading"&&a>=r,c=s?a>=o:!1;if(l||c){if(this.isBlockCurrentlyDisplayed(i)||this.isBlockFocused(i))return;this.removeBlockFromCache(i)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:n,endRow:s}=e;return t.rowIndex>=n&&t.rowIndex<s}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:n}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,n-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:n,overflowSize:s}=this.params,r=(e.id+1)*n+s;this.rowCount<r&&(this.rowCount=r)}}setRowCount(e,t){this.rowCount=e,ht(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const n of this.getBlocksInOrder())n.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(n,s)=>n.id-s.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const n=[];let s=-1,o=!1;const r={value:0};let i=!1;for(const l of this.getBlocksInOrder())if(!i){if(o&&s+1!==l.id){i=!0;continue}s=l.id,l.forEachNode(c=>{const u=c===e||c===t;(o||u)&&n.push(c),u&&(o=!o)},r,this.rowCount)}return i||o?[]:n}},vwe=class extends We{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new cl(e);this.rootNode=t,t.level=-1,this.rowHeight=vc(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=vc(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){var t;let e;this.cacheParams?e=!Mf(this.cacheParams.sortModel,((t=this.beans.sortSvc)==null?void 0:t.getSortModel())??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){var n;return((n=this.infiniteCache)==null?void 0:n.getRowNodesInRange(e,t))??[]}reset(){var n;if(!this.datasource)return;ud(this.gos)!=null||(n=this.beans.selectionSvc)==null||n.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:n,rowNodeBlockLoader:s,eventSvc:o,gos:r}=e;this.cacheParams={datasource:this.datasource,filterModel:(t==null?void 0:t.getFilterModel())??{},sortModel:(n==null?void 0:n.getSortModel())??[],rowNodeBlockLoader:s,initialRowCount:r.get("infiniteInitialRowCount"),maxBlocksInCache:r.get("maxBlocksInCache"),rowHeight:vc(e),overflowSize:r.get("cacheOverflowSize"),blockSize:r.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new mwe(this.cacheParams)),o.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(n=>{n.id===e&&(t=n)}),t}forEachNode(e){var t;(t=this.infiniteCache)==null||t.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),n=this.getRowCount()-1;return t>n?n:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){var e;(e=this.infiniteCache)==null||e.refreshCache()}purgeCache(){var e;(e=this.infiniteCache)==null||e.purgeCache()}isLastRowIndexKnown(){var e;return((e=this.infiniteCache)==null?void 0:e.isLastRowIndexKnown())??!1}setRowCount(e,t){var n;(n=this.infiniteCache)==null||n.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function ywe(e){var t;(t=_y(e))==null||t.refreshCache()}function wwe(e){var t;(t=_y(e))==null||t.purgeCache()}function Cwe(e){var t;return(t=_y(e))==null?void 0:t.getRowCount()}var bwe=class extends We{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=ure(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=Os(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){$r(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){sl(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(n=>n.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const n of t)n.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:n,state:s}=t.getBlockStateJson();e[n]=s}),e}printCacheStatus(){sl(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},Swe={moduleName:"InfiniteRowModelCore",version:ut,rowModels:["infinite"],beans:[vwe,bwe]},Ewe={moduleName:"InfiniteRowModel",version:ut,apiFunctions:{refreshInfiniteCache:ywe,purgeInfiniteCache:wwe,getInfiniteRowCount:Cwe},dependsOn:[Swe,Nye]},_we="↑",Rwe="↓",Dwe={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},Twe=class extends Cn{constructor(){super(Dwe),this.eValue=dt,this.eDelta=dt,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const n=Math.abs(t),s=e.formatValue(n),o=ht(s)?s:n,r=t>=0,i=this.eDelta;r?i.textContent=_we+o:i.textContent=Rwe+o,i.classList.toggle("ag-value-change-delta-up",r),i.classList.toggle("ag-value-change-delta-down",!r)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),ks(this.eDelta)}refresh(e,t=!1){var c;const{value:n,valueFormatted:s}=e,{eValue:o,lastValue:r,beans:i}=this;if(n===r||(ht(s)?o.textContent=s:ht(n)?o.textContent=n:ks(o),(c=i.filterManager)!=null&&c.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n,l=r&&typeof r=="object"&&"toNumber"in r?r.toNumber():r;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const u=a-l;this.showDelta(e,u)}return r&&o.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=n,!0}},Iwe=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",xwe={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},Fwe=class extends Cn{constructor(){super(xwe),this.eCurrent=dt,this.refreshCount=0,this.registerCSS(Iwe)}init(e){this.refresh(e,!0)}addSlideAnimation(){var o;this.refreshCount++;const e=this.refreshCount;(o=this.ePrevious)==null||o.remove();const{beans:t,eCurrent:n}=this,s=as({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=s,s.textContent=n.textContent,this.getGui().insertBefore(s,n),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{var r;e===this.refreshCount&&((r=this.ePrevious)==null||r.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){var o;let n=e.value;if(Vn(n)&&(n=""),n===this.lastValue||(o=this.beans.filterManager)!=null&&o.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=n;const s=this.eCurrent;return ht(e.valueFormatted)?s.textContent=e.valueFormatted:ht(e.value)?s.textContent=n:ks(s),!0}},Pwe=class extends We{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,n=this.beans.gos.get("cellFlashDuration"),s=this.beans.gos.get("cellFadeDuration")){const o=this.animations[t];o.delete(e);const r=Date.now(),i=r+n,a=r+n+s,l={phase:"flash",flashEndTime:i,fadeEndTime:a};o.set(e,l);const c=`ag-cell-${t}`,u=`${c}-animation`,{comp:d,eGui:{style:h}}=e;d.toggleCss(c,!0),d.toggleCss(u,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&i+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),n)}),this.nextAnimationTime=i)}advanceAnimations(){const e=Date.now();let t=null;for(const n of Object.keys(this.animations)){const s=this.animations[n],o=`ag-cell-${n}`,r=`${o}-animation`;for(const[i,a]of s){if(!i.isAlive()||!i.comp){s.delete(i);continue}const{phase:l,flashEndTime:c,fadeEndTime:u}=a,d=l==="flash"?c:u;if(!(e+15>=d)){t=Math.min(d,t??1/0);continue}const{comp:f,eGui:{style:p}}=i;switch(l){case"flash":f.toggleCss(o,!1),f.toggleCss(r,!0),p.transition=`background-color ${u-c}ms`,p.transitionDelay=`${c-e}ms`,t=Math.min(u,t??1/0),a.phase="fade";break;case"fade":f.toggleCss(o,!1),f.toggleCss(r,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),s.delete(i);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const n=Fue(e.cellPosition);t.cells[n]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t==null?void 0:t.flashDuration,t==null?void 0:t.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function Awe(e,t={}){const{cellFlashSvc:n}=e;n&&e.frameworkOverrides.wrapIncoming(()=>{for(const s of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))n.flashCell(s,t)})}var kwe={moduleName:"HighlightChanges",version:ut,beans:[Pwe],userComponents:{agAnimateShowChangeCellRenderer:Twe,agAnimateSlideCellRenderer:Fwe},apiFunctions:{flashCells:Awe}};function Owe(e){var t;return((t=e.stateSvc)==null?void 0:t.getState())??{}}function Mwe(e,t,n){var s;return(s=e.stateSvc)==null?void 0:s.setState(t,n)}function VB(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=Nwe(e)),e.version=ut,e}function Nwe(e){return e.cellSelection=Lwe(e,"rangeSelection"),e}function Lwe(e,t){if(e&&typeof e=="object")return e[t]}var Vwe=class extends We{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=Os(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=Os(this,()=>{this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(this.updateCachedState("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowGroupExpansion",void 0)):(this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("ssrmRowGroupExpansion",void 0))},0),this.onRowSelectedDebounced=Os(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:n}=this.beans;this.isClientSideRowModel=rs(e);const s=VB(e.get("initialState")??{}),o=s.partialColumnState;delete s.partialColumnState,this.cachedState=s;const r=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>r(()=>this.setupStateOnGridReady(s))),(s.columnOrder||s.columnVisibility||s.columnSizing||s.columnPinning||s.columnGroup)&&(n==null||n.hideColumns("columnState"));const[i,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:c})=>{c==="gridInitializing"&&(i(),r(()=>{this.setupStateOnColumnsInitialised(s,!!o),n==null||n.revealColumns("columnState")}))},rowCountReady:()=>{a==null||a(),r(()=>this.setupStateOnRowCountReady(s))},firstDataRendered:()=>{l==null||l(),r(()=>this.setupStateOnFirstDataRendered(s))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const n=VB(e);delete n.partialColumnState,this.cachedState=n,this.startSuppressEvents();const s="api",o=t?new Set(t):void 0;this.setGridReadyState(n,s,o),this.setColumnsInitialisedState(n,s,!!o,o),this.setRowCountState(n,s,o),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(n,s,o),this.stopSuppressEvents(s)})}setGridReadyState(e,t,n){var s,o;t==="api"&&!(n!=null&&n.has("sideBar"))&&((o=(s=this.beans.sideBar)==null?void 0:s.comp)==null||o.setState(e.sideBar)),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,n,s){this.setColumnState(e,t,n,s),this.setColumnGroupState(e,t,s),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const n=s=>()=>this.updateColumnState([s]);this.addManagedEventListeners({columnValueChanged:n("aggregation"),columnMoved:n("columnOrder"),columnPinned:n("columnPinning"),columnResized:n("columnSizing"),columnVisible:n("columnVisibility"),columnPivotChanged:n("pivot"),columnPivotModeChanged:n("pivot"),columnRowGroupChanged:n("rowGroup"),sortChanged:n("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,n){const{filter:s,rowGroupExpansion:o,ssrmRowGroupExpansion:r,rowSelection:i,pagination:a}=e,l=(u,d)=>!(n!=null&&n.has(u))&&(d||t==="api");l("filter",s)&&this.setFilterState(s),l("rowGroupExpansion",o)&&this.setRowGroupExpansionState(r,o,t),l("rowSelection",i)&&this.setRowSelectionState(i,t),l("pagination",a)&&this.setPaginationState(a,t);const c=this.updateCachedState.bind(this);c("filter",this.getFilterState()),this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(c("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),c("rowGroupExpansion",void 0)):(c("rowGroupExpansion",this.getRowGroupExpansionState()),c("ssrmRowGroupExpansion",void 0)),c("rowSelection",this.getRowSelectionState()),c("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>{this.updateRowGroupExpansionStateTimer=0,this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(t("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),t("rowGroupExpansion",void 0)):(t("rowGroupExpansion",this.getRowGroupExpansionState()),t("ssrmRowGroupExpansion",void 0))},s=()=>t("filter",this.getFilterState()),{gos:o,colFilter:r}=this.beans;this.addManagedEventListeners({filterChanged:s,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:n,columnRowGroupChanged:n,rowDataUpdated:()=>{(o.get("groupDefaultExpanded")!==0||o.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(n)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:i=>{(i.newPage||i.newPageSize)&&t("pagination",this.getPaginationState())}}),r&&this.addManagedListeners(r,{filterStateChanged:s})}setFirstDataRenderedState(e,t,n){const{scroll:s,cellSelection:o,focusedCell:r,columnOrder:i,rowPinning:a}=e,l=(d,h)=>!(n!=null&&n.has(d))&&(h||t==="api");l("focusedCell",r)&&this.setFocusedCellState(r),l("cellSelection",o)&&this.setCellSelectionState(o),l("scroll",s)&&this.setScrollState(s),l("rowPinning",a)&&this.setRowPinningState(a),this.setColumnPivotState(!!(i!=null&&i.orderedColIds),t);const c=this.updateCachedState.bind(this);c("sideBar",this.getSideBarState()),c("focusedCell",this.getFocusedCellState());const u=this.getRangeSelectionState();c("rangeSelection",u),c("cellSelection",u),c("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),n=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:n,cellFocusCleared:n,cellSelectionChanged:s=>{if(s.finished){const o=this.getRangeSelectionState();t("rangeSelection",o),t("cellSelection",o)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return Oge(Kv(e),e.colModel.isPivotMode())}setColumnState(e,t,n,s){const{sort:o,rowGroup:r,aggregation:i,pivot:a,columnPinning:l,columnVisibility:c,columnSizing:u,columnOrder:d}=e;let h=!1;const f=(E,k)=>{const I=!(s!=null&&s.has(E))&&!!(k||t==="api");return h||(h=I),I},p={},g=E=>{let k=p[E];return k||(k={colId:E},p[E]=k,k)},v={},C=f("sort",o);C&&(o==null||o.sortModel.forEach(({colId:E,sort:k},I)=>{const M=g(E);M.sort=k,M.sortIndex=I})),(C||!n)&&(v.sort=null,v.sortIndex=null);const S=f("rowGroup",r);S&&(r==null||r.groupColIds.forEach((E,k)=>{const I=g(E);I.rowGroup=!0,I.rowGroupIndex=k})),(S||!n)&&(v.rowGroup=null,v.rowGroupIndex=null);const b=f("aggregation",i);b&&(i==null||i.aggregationModel.forEach(({colId:E,aggFunc:k})=>{g(E).aggFunc=k})),(b||!n)&&(v.aggFunc=null);const w=f("pivot",a);w&&(a==null||a.pivotColIds.forEach((E,k)=>{const I=g(E);I.pivot=!0,I.pivotIndex=k}),this.gos.updateGridOptions({options:{pivotMode:!!(a!=null&&a.pivotMode)},source:t})),(w||!n)&&(v.pivot=null,v.pivotIndex=null);const D=f("columnPinning",l);if(D){for(const E of(l==null?void 0:l.leftColIds)??[])g(E).pinned="left";for(const E of(l==null?void 0:l.rightColIds)??[])g(E).pinned="right"}(D||!n)&&(v.pinned=null);const R=f("columnVisibility",c);if(R)for(const E of(c==null?void 0:c.hiddenColIds)??[])g(E).hide=!0;(R||!n)&&(v.hide=null);const T=f("columnSizing",u);if(T)for(const{colId:E,flex:k,width:I}of(u==null?void 0:u.columnSizingModel)??[]){const M=g(E);M.flex=k??null,M.width=I}(T||!n)&&(v.flex=null);const F=d==null?void 0:d.orderedColIds,x=!!(F!=null&&F.length)&&!(s!=null&&s.has("columnOrder")),P=x?F.map(E=>g(E)):Object.values(p);(P.length||h)&&(this.columnStates=P,Hr(this.beans,{state:P,applyOrder:x,defaultState:v},t))}setColumnPivotState(e,t){const n=this.columnStates;this.columnStates=void 0;const s=this.columnGroupStates;this.columnGroupStates=void 0;const o=this.beans,{pivotResultCols:r,colGroupSvc:i}=o;if(r!=null&&r.isPivotResultColsPresent()){if(n){const a=[];for(const l of n)r.getPivotResultCol(l.colId)&&a.push(l);Hr(o,{state:a,applyOrder:e},t)}s&&(i==null||i.setColumnGroupState(s,t))}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return Mge(t)}setColumnGroupState(e,t,n){var a;const s=this.beans.colGroupSvc;if(!s||n!=null&&n.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const o=new Set((a=e.columnGroup)==null?void 0:a.openColumnGroupIds),i=s.getColumnGroupState().map(({groupId:l})=>{const c=o.has(l);return c&&o.delete(l),{groupId:l,open:c}});for(const l of o)i.push({groupId:l,open:!0});i.length&&(this.columnGroupStates=i),s.setColumnGroupState(i,t)}getFilterState(){const e=this.beans.filterManager;let t=e==null?void 0:e.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const n=e==null?void 0:e.getFilterState(),s=(e==null?void 0:e.getAdvFilterModel())??void 0;return t||s||n?{filterModel:t,columnFilterState:n,advancedFilterModel:s}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:n,columnFilterState:s,advancedFilterModel:o}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(n!==void 0||s!==void 0)&&(t==null||t.setFilterState(n??null,s??null,"columnFilter")),o!==void 0&&(t==null||t.setAdvFilterModel(o??null,"advancedFilter"))}getRangeSelectionState(){var t;const e=(t=this.beans.rangeSvc)==null?void 0:t.getCellRanges().map(n=>{const{id:s,type:o,startRow:r,endRow:i,columns:a,startColumn:l}=n;return{id:s,type:o,startRow:r,endRow:i,colIds:a.map(c=>c.getColId()),startColId:l.getColId()}});return e!=null&&e.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:n,colModel:s,visibleCols:o}=this.beans;if(!la(t)||!n)return;const r=[];for(const i of(e==null?void 0:e.cellRanges)??[]){const a=[];for(const c of i.colIds){const u=s.getCol(c);u&&a.push(u)}if(!a.length)continue;let l=s.getCol(i.startColId);if(!l){const c=o.allCols,u=new Set(a);l=c.find(d=>u.has(d))}r.push({...i,columns:a,startColumn:l})}n.setCellRanges(r)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=(e==null?void 0:e.getHScrollPosition())??{left:0},{top:n}=(e==null?void 0:e.getVScrollPosition())??{top:0};return n||t?{top:n,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:n}=e??{top:0,left:0},{frameworkOverrides:s,rowRenderer:o,animationFrameSvc:r,ctrlsSvc:i}=this.beans;s.wrapIncoming(()=>{var a;i.get("center").setCenterViewportScrollLeft(n),(a=i.getScrollFeature())==null||a.setVerticalScrollPosition(t),o.redraw({afterScroll:!0}),r==null||r.flushAllFrames()})}getSideBarState(){var e,t;return(t=(e=this.beans.sideBar)==null?void 0:e.comp)==null?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:n,rowPinned:s}=e;return{colId:t.getColId(),rowIndex:n,rowPinned:s}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:n}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:s,rowIndex:o,rowPinned:r}=e;t.setFocusedCell({column:n.getCol(s),rowIndex:o,rowPinned:r,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const n=e.getCurrentPage(),s=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!n&&!s))return{page:n,pageSize:s}}setPaginationState(e,t){const{pagination:n,gos:s}=this.beans;if(!n)return;const{pageSize:o,page:r}=e??{page:0,pageSize:s.get("paginationPageSize")},i=t==="gridInitializing";o&&!s.get("paginationAutoPageSize")&&n.setPageSize(o,i?"initialState":"pageSizeSelector"),typeof r=="number"&&(i?n.setPage(r):n.goToPage(r))}getRowSelectionState(){var s;const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!((s=t==null?void 0:t.toggledNodes)!=null&&s.length)?void 0:t}setRowSelectionState(e,t){var n;(n=this.beans.selectionSvc)==null||n.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e}=this.beans;if(e)return e.getExpansionState()}getRowPinningState(){var e;return(e=this.beans.pinnedRowModel)==null?void 0:e.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t==null||t.setPinnedState(e):t==null||t.reset()}setRowGroupExpansionState(e,t,n){const s=this.beans.expansionSvc;if(!s)return;const o=t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};s.setExpansionState(o,n)}updateColumnState(e){const t=this.getColumnState();let n=!1;const s=this.cachedState;for(const o of Object.keys(t)){const r=t[o];Mf(r,s[o])||(n=!0)}this.cachedState={...s,...t},n&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const n=this.cachedState[e];this.setCachedStateValue(e,t),Mf(t,n)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){var e;this.suppressEvents=!0,(e=this.beans.colAnimation)==null||e.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{var t;this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&((t=this.beans.colAnimation)==null||t.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},Bwe={moduleName:"GridState",version:ut,beans:[Vwe],apiFunctions:{getState:Owe,setState:Mwe}};function $we(e){return e.rowModel.isLastRowIndexKnown()}function Hwe(e){var t;return((t=e.pagination)==null?void 0:t.getPageSize())??100}function Gwe(e){var t;return((t=e.pagination)==null?void 0:t.getCurrentPage())??0}function Uwe(e){var t;return((t=e.pagination)==null?void 0:t.getTotalPages())??1}function Wwe(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function zwe(e){var t;(t=e.pagination)==null||t.goToNextPage()}function jwe(e){var t;(t=e.pagination)==null||t.goToPreviousPage()}function Kwe(e){var t;(t=e.pagination)==null||t.goToFirstPage()}function qwe(e){var t;(t=e.pagination)==null||t.goToLastPage()}function Ywe(e,t){var n;(n=e.pagination)==null||n.goToPage(t)}var Xwe=class extends We{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,n=()=>{const s=Math.max(vc(t),1),o=Math.floor(e/s);t.pagination.setPageSize(o,"autoCalculated")};this.isBodyRendered?Os(this,n,50)():(n(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},vp="paginationPageSizeSelector",Zwe={tag:"span",cls:"ag-paging-page-size"},Jwe=class extends Cn{constructor(){super(Zwe),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(vp,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!(e!=null&&e.newPageSize))return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){ks(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(vp)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),n=!t||!e.includes(t);if(n){const o=this.gos.exists("paginationPageSize"),r=this.gos.get(vp)!==!0;Je(94,{pageSizeSet:o,pageSizesSet:r,pageSizeOptions:e,paginationPageSizeOption:t}),r||Je(95,{paginationPageSizeOption:t,paginationPageSizeSelector:vp}),e.unshift("")}const s=String(n?"":t);this.selectPageSizeComp?(il(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(s,!0)):this.createPageSizeSelectorComp(e,s),this.hasEmptyOption=n}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const n=this.getLocaleTextFunc(),s=n("pageSizeSelectorLabel","Page Size:"),o=n("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new a0).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(o).setLabel(s).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(vp);return!Array.isArray(t)||!(t!=null&&t.length)?e:[...t].sort((n,s)=>n-s)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},Qwe={selector:"AG-PAGE-SIZE-SELECTOR",component:Jwe},eCe=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:var(--ag-pagination-panel-height);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}",tCe=class extends YV{constructor(){super(),this.btFirst=dt,this.btPrevious=dt,this.btNext=dt,this.btLast=dt,this.lbRecordCount=dt,this.lbFirstRowOnPage=dt,this.lbLastRowOnPage=dt,this.lbCurrent=dt,this.lbTotal=dt,this.pageSizeComp=dt,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(eCe)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[Qwe]);const{btFirst:t,btPrevious:n,btNext:s,btLast:o}=this;this.activateTabIndex([t,n,s,o]),t.insertAdjacentElement("afterbegin",hr(e?"last":"first",this.beans)),n.insertAdjacentElement("afterbegin",hr(e?"next":"previous",this.beans)),s.insertAdjacentElement("afterbegin",hr(e?"previous":"next",this.beans)),o.insertAdjacentElement("afterbegin",hr(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:r=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(r):Xle(this.beans,r),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}]){const{el:t,fn:n}=e;this.addManagedListeners(t,{click:n,keydown:s=>{(s.key===Oe.ENTER||s.key===Oe.SPACE)&&(s.preventDefault(),n())}})}Yle(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):Nge(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),n=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const s=this.isZeroPagesToDisplay(),o=e===n-1;this.nextButtonDisabled=o||s,this.lastButtonDisabled=!t||s||e===n-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){uoe(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),n=this.pagination.getMasterRowCount(),s=e?n:null,o=this.pagination.getCurrentPage(),r=this.pagination.getPageSize();let i,a;this.isZeroPagesToDisplay()?i=a=0:(i=r*o+1,a=i+r-1,e&&a>s&&(a=s));const l=i+r-1,c=!e&&n<l,u=this.formatNumber(i);this.lbFirstRowOnPage.textContent=u;let d;const h=this.getLocaleTextFunc();c?d=h("pageLastRowUnknown","?"):d=this.formatNumber(a),this.lbLastRowOnPage.textContent=d;const p=t>0?o+1:0,g=this.formatNumber(p);this.lbCurrent.textContent=g;let v,C;if(e)v=this.formatNumber(t),C=this.formatNumber(s);else{const S=h("more","more");v=S,C=S}this.lbTotal.textContent=v,this.lbRecordCount.textContent=C,this.announceAriaStatus(u,d,C,g,v)}announceAriaStatus(e,t,n,s,o){var d,h;const r=this.getLocaleTextFunc(),i=r("page","Page"),a=r("to","to"),l=r("of","of"),c=`${e} ${a} ${t} ${l} ${n}`,u=`${i} ${s} ${l} ${o}`;c!==this.ariaRowStatus&&(this.ariaRowStatus=c,(d=this.ariaAnnounce)==null||d.announceValue(c,"paginationRow")),u!==this.ariaPageStatus&&(this.ariaPageStatus=u,(h=this.ariaAnnounce)==null||h.announceValue(u,"paginationPage"))}},nCe={selector:"AG-PAGINATION",component:tCe},sCe=class extends We{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return nCe}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;const{editSvc:n}=this.beans;n!=null&&n.isEditing()&&(n.isBatchEditing()?n.cleanupEditors():n.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){var n,s;if(!this.active)return;let t=e;this.paginateChildRows||(t=((s=(n=this.beans.rowModel).getTopLevelIndexFromDisplayedIndex)==null?void 0:s.call(n,e))??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return ht(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:ht(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:ht(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:ht(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const n=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}n!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const n=this.pageSize,s=t-1;this.totalPages=Math.floor(s/n)+1,this.adjustCurrentPageIfInvalid();const o=this.currentPage,r=n*o;let i=n*(o+1)-1;if(i>s&&(i=s),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(r),i===s)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(i+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:n}=this,s=e-1;this.totalPages=Math.floor(s/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*n,this.bottomDisplayedRowIndex=t*(n+1)-1,this.bottomDisplayedRowIndex>s&&(this.bottomDisplayedRowIndex=s)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:n=!1,newPageSize:s=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:n,newPageSize:s,keepRenderedRows:t})}},oCe={moduleName:"Pagination",version:ut,beans:[sCe,Xwe],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:$we,paginationGetPageSize:Hwe,paginationGetCurrentPage:Gwe,paginationGetTotalPages:Uwe,paginationGetRowCount:Wwe,paginationGoToNextPage:zwe,paginationGoToPreviousPage:jwe,paginationGoToFirstPage:Kwe,paginationGoToLastPage:qwe,paginationGoToPage:Ywe},dependsOn:[Ry]};function rCe(e,t={}){const n=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(n))}function BB(e,t,n,s,o){t&&(s&&t.parent&&t.parent.level!==-1&&BB(e,t.parent,n,s,o),t.setExpanded(n,void 0,o))}function iCe(e,t){return e.rowModel.getRowNode(t)}function aCe(e,t,n,s){e.rowRenderer.addRenderedRowListener(t,n,s)}function lCe(e){return e.rowRenderer.getRenderedNodes()}function cCe(e,t,n){e.rowModel.forEachNode(t,n)}function uCe(e){return e.rowRenderer.firstRenderedRow}function dCe(e){return e.rowRenderer.lastRenderedRow}function hCe(e,t){return e.rowModel.getRow(t)}function fCe(e){return e.rowModel.getRowCount()}var pCe={moduleName:"RowApi",version:ut,apiFunctions:{redrawRows:rCe,setRowNodeExpanded:BB,getRowNode:iCe,addRenderedRowListener:aCe,getRenderedNodes:lCe,forEachNode:cCe,getFirstDisplayedRowIndex:uCe,getLastDisplayedRowIndex:dCe,getDisplayedRowAtIndex:hCe,getDisplayedRowCount:fCe}},gCe={moduleName:"ScrollApi",version:ut,apiFunctions:{getVerticalPixelRange:Ive,getHorizontalPixelRange:xve,ensureColumnVisible:CB,ensureIndexVisible:bB,ensureNodeVisible:Fve}};function mCe(e,t,n){if(!t)return;const s=e.ctrlsSvc.getGridBodyCtrl().eGridBody,o=`aria-${t}`;n===null?s.removeAttribute(o):s.setAttribute(o,n)}function vCe(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function yCe(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function wCe(e){var t;return((t=e.animationFrameSvc)==null?void 0:t.isQueueEmpty())??!0}function CCe(e){var t;(t=e.animationFrameSvc)==null||t.flushAllFrames()}function bCe(e){return{rowHeight:vc(e),headerHeight:op(e)}}function SCe(e,t={}){var r;const n=[];for(const i of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const a=i.getCellRenderer();a!=null&&n.push(tp(a))}if((r=t.columns)!=null&&r.length)return n;const s=[],o=o_(t.rowNodes);for(const i of e.rowRenderer.getAllRowCtrls()){if(o&&!r_(i.rowNode,o)||!i.isFullWidth())continue;const a=i.getFullWidthCellRenderers();for(let l=0;l<a.length;l++){const c=a[l];c!=null&&s.push(tp(c))}}return[...s,...n]}var ECe={moduleName:"RenderApi",version:ut,apiFunctions:{setGridAriaProperty:mCe,refreshCells:vCe,refreshHeader:yCe,isAnimationFrameQueueEmpty:wCe,flushAllAnimationFrames:CCe,getSizesForCurrentTheme:bCe,getCellRendererInstances:SCe}};function _Ce(e,t){var n,s;typeof t=="number"?(n=e.colAutosize)==null||n.sizeColumnsToFit(t,"api"):(s=e.colAutosize)==null||s.sizeColumnsToFitGridBody(t)}function $B({colAutosize:e,visibleCols:t},n,s){Array.isArray(n)?e==null||e.autoSizeCols({colKeys:n,skipHeader:s,source:"api"}):e==null||e.autoSizeCols({...n,colKeys:n.colIds??t.allCols,source:"api"})}function RCe(e,t){var n;t&&typeof t=="object"?$B(e,t):(n=e.colAutosize)==null||n.autoSizeAllColumns({source:"api",skipHeader:t})}var DCe=class extends We{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){var n;const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let s=!1;const o=t.type;if(o==="fitGridWidth"||o==="fitProvidedWidth")s=!0;else if(o==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const r=e.get("rowData");s=r!=null&&r.length>0&&rs(e)}s&&((n=this.beans.colDelayRenderSvc)==null||n.hideColumns(o))}}autoSizeCols(e){const{eventSvc:t,visibleCols:n}=this.beans;this.innerAutoSizeCols(e).then(s=>{var c;const o=u=>fd(t,Array.from(u),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return o(s);const r=HB(this.beans),i=u=>n.leftCols.some(d=>Jf(d,u)),a=u=>n.rightCols.some(d=>Jf(d,u)),l=e.colKeys.filter(u=>!ua(u)&&!da(u)&&!i(u)&&!a(u));this.sizeColumnsToFit(r,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:(c=e.columnLimits)==null?void 0:c.map(u=>({...u,key:u.colId})),colKeys:l,onlyScaleUp:!0}),o(s)})}innerAutoSizeCols(e){return new Promise((t,n)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,n));const{colKeys:s,skipHeader:o,skipHeaderGroups:r,stopAtGroup:i,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:c=[],source:u="api"}=e,{animationFrameSvc:d,renderStatus:h,colModel:f,autoWidthCalc:p,visibleCols:g}=this.beans;if(d==null||d.flushAllFrames(),this.timesDelayed<5&&h&&(!h.areHeaderCellsRendered()||!h.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,n)});return}this.timesDelayed=0;const v=new Set;let C=-1;const S=Object.fromEntries(c.map(({colId:D,...R})=>[D,R])),b=o??this.gos.get("skipHeaderOnAutoSize"),w=r??b;for(;C!==0;){C=0;const D=[];for(const R of s){if(!R||Ere(R))continue;const T=f.getCol(R);if(!T||v.has(T))continue;const F=p.getPreferredWidthForColumn(T,b);if(F>0){const x=S[T.colId]??{};x.minWidth??(x.minWidth=l),x.maxWidth??(x.maxWidth=a);const P=TCe(T,F,x);T.setActualWidth(P,u),v.add(T),C++}D.push(T)}D.length&&g.refresh(u)}w||this.autoSizeColumnGroupsByColumns(s,u,i),t(v)})}autoSizeColumn(e,t,n){this.autoSizeCols({colKeys:[e],skipHeader:n,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,n){const{colModel:s,ctrlsSvc:o}=this.beans,r=new Set,i=s.getColsForKeys(e);for(const l of i){let c=l.getParent();for(;c&&c!=n;)c.isPadding()||r.add(c),c=c.getParent()}let a;for(const l of r){for(const c of o.getHeaderRowContainerCtrls())if(a=c.getHeaderCtrlForColumn(l),a)break;a==null||a.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const n=this.gos.get("skipHeaderOnAutoSize"),s=()=>{this.autoSizeColumn(t,"uiColumnResized",n)};e.addEventListener("dblclick",s);const o=new Tc(e);return o.addEventListener("doubleTap",s),()=>{e.removeEventListener("dblclick",s),o.destroy()}}addColumnGroupResize(e,t,n){const s=this.gos.get("skipHeaderOnAutoSize"),o=()=>{const r=[],i=t.getDisplayedLeafColumns();for(const a of i)a.getColDef().suppressAutoSize||r.push(a.getColId());r.length>0&&this.autoSizeCols({colKeys:r,skipHeader:s,stopAtGroup:t,source:"uiColumnResized"}),n()};return e.addEventListener("dblclick",o),()=>e.removeEventListener("dblclick",o)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const n=HB(this.beans);if(n>0){this.sizeColumnsToFit(n,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):Je(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",n,s){var p,g;if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,n,s));return}const o={};for(const{key:v,...C}of(s==null?void 0:s.columnLimits)??[])o[typeof v=="string"?v:v.getColId()]=C;const r=this.beans.visibleCols.allCols;if(e<=0||!r.length)return;const i=ca(r);if(s!=null&&s.onlyScaleUp&&i>e||e===i&&r.every(C=>{if(C.colDef.suppressSizeToFit)return!0;const S=o==null?void 0:o[C.getId()],b=(S==null?void 0:S.minWidth)??(s==null?void 0:s.defaultMinWidth),w=(S==null?void 0:S.maxWidth)??(s==null?void 0:s.defaultMaxWidth),D=C.getActualWidth();return(b==null||D>=b)&&(w==null||D<=w)}))return;const l=[],c=[];for(const v of r){const C=((p=s==null?void 0:s.colKeys)==null?void 0:p.some(S=>Jf(v,S)))??!0;v.getColDef().suppressSizeToFit||!C?c.push(v):l.push(v)}const u=l.slice(0);let d=!1;const h=v=>{$r(l,v),c.push(v)};for(const v of l){v.resetActualWidth(t);const C=o==null?void 0:o[v.getId()],S=(C==null?void 0:C.minWidth)??(s==null?void 0:s.defaultMinWidth),b=(C==null?void 0:C.maxWidth)??(s==null?void 0:s.defaultMaxWidth),w=v.getActualWidth();typeof S=="number"&&w<S?v.setActualWidth(S,t,!0):typeof b=="number"&&w>b&&v.setActualWidth(b,t,!0)}for(;!d;){d=!0;const v=e-ca(c);if(v<=0)for(const C of l){const S=((g=o==null?void 0:o[C.getId()])==null?void 0:g.minWidth)??(s==null?void 0:s.defaultMinWidth)??C.minWidth;C.setActualWidth(S,t,!0)}else{const C=v/ca(l);let S=v;for(let b=l.length-1;b>=0;b--){const w=l[b],D=o==null?void 0:o[w.getId()],R=(D==null?void 0:D.minWidth)??(s==null?void 0:s.defaultMinWidth),T=(D==null?void 0:D.maxWidth)??(s==null?void 0:s.defaultMaxWidth),F=w.getMinWidth(),x=w.getMaxWidth(),P=typeof R=="number"&&R>F?R:F,E=typeof T=="number"&&T<x?T:x;let k=Math.round(w.getActualWidth()*C);k<P?(k=P,h(w),d=!1):k>E?(k=E,h(w),d=!1):b===0&&(k=S),w.setActualWidth(k,t,!0),S-=k}}}for(const v of u)v.fireColumnWidthChangedEvent(t);const f=this.beans.visibleCols;f.setLeftValues(t),f.updateBodyWidths(),!n&&fd(this.eventSvc,u,!0,t)}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,n=e.get("autoSizeStrategy");(n==null?void 0:n.type)!=="fitGridWidth"&&(n==null?void 0:n.type)!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const s=n.type;if(s==="fitGridWidth"){const{columnLimits:o,defaultMinWidth:r,defaultMaxWidth:i}=n,a=o==null?void 0:o.map(({colId:l,minWidth:c,maxWidth:u})=>({key:l,minWidth:c,maxWidth:u}));this.sizeColumnsToFitGridBody({defaultMinWidth:r,defaultMaxWidth:i,columnLimits:a})}else s==="fitProvidedWidth"&&this.sizeColumnsToFit(n.width,"sizeColumnsToFit");t==null||t.revealColumns(s)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{var s;if(!this.isAlive())return;const n="autosizeColumns";e?this.autoSizeCols({...t,source:n,colKeys:e}):this.autoSizeAllColumns({...t,source:n}),(s=this.beans.colDelayRenderSvc)==null||s.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function TCe(e,t,n={}){const s=n.minWidth??e.getMinWidth();t<s&&(t=s);const o=n.maxWidth??e.getMaxWidth();return t>o&&(t=o),t}function HB({ctrlsSvc:e,scrollVisibleSvc:t}){const n=e.getGridBodyCtrl(),o=n.isVerticalScrollShowing()?t.getScrollbarWidth():0;return $f(n.eGridBody)-o}var ICe={moduleName:"ColumnAutoSize",version:ut,beans:[DCe],apiFunctions:{sizeColumnsToFit:_Ce,autoSizeColumns:$B,autoSizeAllColumns:RCe},dependsOn:[h2]},xCe=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function FCe(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedTopRowCount())??0}function PCe(e){var t;return((t=e.pinnedRowModel)==null?void 0:t.getPinnedBottomRowCount())??0}function ACe(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedTopRow(t)}function kCe(e,t){var n;return(n=e.pinnedRowModel)==null?void 0:n.getPinnedBottomRow(t)}function OCe(e,t,n){var s;return(s=e.pinnedRowModel)==null?void 0:s.forEachPinnedRow(t,n)}var MCe={moduleName:"PinnedRow",version:ut,beans:[Ace],css:[xCe],apiFunctions:{getPinnedTopRowCount:FCe,getPinnedBottomRowCount:PCe,getPinnedTopRow:ACe,getPinnedBottomRow:kCe,forEachPinnedRow:OCe},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},NCe=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){var n;const e=(n=this.firstNode.__autoHeights)==null?void 0:n[this.col.getColId()];if(e==null)return;let t=0;for(const s of this.spannedNodes)s!==this.lastNode&&(t+=s.rowHeight);return e-t}},LCe=class extends We{constructor(e){super(),this.column=e}buildCache(e){var b;const{column:t,beans:{gos:n,pinnedRowModel:s,rowModel:o,valueSvc:r,pagination:i}}=this,{colDef:a}=t,l=this.getNodeMap(e),c=new Map,u=n.getCallback("isFullWidthRow"),d=a.equals,h=a.spanRows,f=typeof h=="function";let p=null,g=null,v;const C=(w,D)=>{p=w,g=null,v=D},S=w=>{const D=!w.isExpandable()&&!w.group&&!w.detail&&(u?!u({rowNode:w}):!0);if(w.rowIndex==null||!D){C(null,null);return}if(p==null||w.level!==p.level||w.footer||g&&w.rowIndex-1!==(g==null?void 0:g.getLastNode().rowIndex)){C(w,r.getValue(t,w));return}const R=r.getValue(t,w);if(f){const T=Pt(n,{valueA:v,nodeA:p,valueB:R,nodeB:w,column:t,colDef:a});if(!h(T)){C(w,R);return}}else if(d?!d(v,R):v!==R){C(w,R);return}if(!g){const T=l==null?void 0:l.get(p);(T==null?void 0:T.firstNode)===p?(T.reset(),g=T):g=new NCe(t,p),c.set(p,g)}g.addSpannedNode(w),c.set(w,g)};switch(e){case"center":(b=o.forEachDisplayedNode)==null||b.call(o,w=>{(!i||i.isRowInPage(w.rowIndex))&&S(w)}),this.centerValueNodeMap=c;break;case"top":s==null||s.forEachPinnedRow("top",S),this.topValueNodeMap=c;break;case"bottom":s==null||s.forEachPinnedRow("bottom",S),this.bottomValueNodeMap=c;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},VCe=class extends We{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=Os(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=Os(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const n=this.createManagedBean(new LCe(e));this.spanningColumns.set(e,n),n.buildCache("top"),n.buildCache("bottom"),n.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t==null||t.createCtrls("top"),t==null||t.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t==null||t.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const n=this.spanningColumns.get(e);return n?n.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:n}=this.beans,s=e.column,o=e.rowIndex,r=this.spanningColumns.get(s);if(!r)return;let i;switch(e.rowPinned){case"top":i=t==null?void 0:t.getPinnedTopRow(o);break;case"bottom":i=t==null?void 0:t.getPinnedBottomRow(o);break;default:i=n.getRow(o)}if(i)return r.getCellSpan(i)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const n=this.spanningColumns.get(e);if(n)return n.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[n,s]of this.spanningColumns)if(s.isCellSpanning(e)){const o=s.getCellSpan(e);t(n,o)}}destroy(){super.destroy(),this.spanningColumns.clear()}},BCe=class extends Rd{constructor(e,t,n){super(e.col,e.firstNode,n,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,n,s,o,r,i){this.eWrapper=n,super.setComp(e,t,n,s,o,r,i),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||Tv(e,t.rowIndex)}setAriaRowSpan(){goe(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(fy(t)){this.focusedCellPosition=void 0;return}const n=this.isCellFocused();n||(this.focusedCellPosition=void 0),e&&n&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},$Ce=class extends Ey{onRowIndexChanged(){super.onRowIndexChanged();for(const e of this.getAllCellCtrls())e.refreshAriaRowIndex()}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){var s;const t=(s=this.beans.rowSpanSvc)==null?void 0:s.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new BCe(t,this,this.beans)}isCorrectCtrlForSpan(e){var s;const t=(s=this.beans.rowSpanSvc)==null?void 0:s.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},HCe=class extends We{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,n=this.getCtrlsMap(e),s=n.size,o=this.getAllRelevantRowControls(e),r=new Map;let i=!1;for(const l of o)l.isAlive()&&(t==null||t.forEachSpannedColumn(l.rowNode,(c,u)=>{if(r.has(u.firstNode))return;const d=n.get(u.firstNode);if(d){r.set(u.firstNode,d),n.delete(u.firstNode);return}i=!0;const h=new $Ce(u.firstNode,this.beans,!1,!1,!1);r.set(u.firstNode,h)}));this.setCtrlsMap(e,r);const a=r.size===s;if(!(!i&&a)){for(const l of n.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,n=t==null?void 0:t.getCellSpanByPosition(e);if(!n)return;const s=this.getCtrlsMap(e.rowPinned).get(n.firstNode);if(s)return s.getAllCellCtrls().find(o=>o.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},GCe={moduleName:"CellSpan",version:ut,beans:[VCe,HCe]},UCe=class extends We{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,n=e.colDef,s=n.cellClassRules,o=this.getCellClassParams(e,n);n_(this.beans.expressionSvc,s===this.cellClassRules?void 0:this.cellClassRules,s,o,r=>t.toggleCss(r,!0),r=>t.toggleCss(r,!1)),this.cellClassRules=s}applyUserStyles(){const e=this.column,t=e.colDef,n=t.cellStyle;if(!n)return;let s;if(typeof n=="function"){const o=this.getCellClassParams(e,t);s=n(o)}else s=n;s&&this.cellComp.setUserStyles(s)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,n=e.colDef,s=this.getCellClassParams(e,n);for(const r of this.staticClasses)t.toggleCss(r,!1);const o=this.beans.cellStyles.getStaticCellClasses(n,s);this.staticClasses=o;for(const r of o)t.toggleCss(r,!0)}getCellClassParams(e,t){const{value:n,rowNode:s}=this.cellCtrl;return Pt(this.beans.gos,{value:n,data:s.data,node:s,colDef:t,column:e,rowIndex:s.rowIndex})}},WCe=class extends We{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,n,s){n_(this.beans.expressionSvc,void 0,e.cellClassRules,t,n,s),this.processStaticCellClasses(e,t,n)}getStaticCellClasses(e,t){const{cellClass:n}=e;if(!n)return[];let s;return typeof n=="function"?s=n(t):s=n,typeof s=="string"&&(s=[s]),s||[]}createCellCustomStyleFeature(e,t){return new UCe(e,t)}processStaticCellClasses(e,t,n){this.getStaticCellClasses(e,t).forEach(o=>{n(o)})}},zCe={moduleName:"CellStyle",version:ut,beans:[WCe]},jCe={moduleName:"RowStyle",version:ut,beans:[Ape]};function KCe(e,t){var n;return!!((n=e.colHover)!=null&&n.isHovered(t))}var qCe=class extends We{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=n=>{const{beans:s,gos:o,element:r,columns:i}=this,a=s.colHover;if(n??!!o.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(r,{mouseover:a.setMouseOver.bind(a,i),mouseout:a.clearMouseOver.bind(a)});else{for(const c of this.destroyManagedListeners)c();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},YCe="ag-column-hover",XCe=class extends We{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,n){const s=()=>{const o=this.isHovered(n);t.toggleCss("ag-column-hover",o)};e.addManagedEventListeners({columnHoverChanged:s}),s()}onCellColumnHover(e,t){if(!t)return;const n=this.isHovered(e);t.toggleCss(YCe,n)}addHeaderFilterColumnHoverListener(e,t,n,s){this.createHoverFeature(e,[n],s);const o=()=>{const r=this.isHovered(n);t.toggleCss("ag-column-hover",r)};e.addManagedEventListeners({columnHoverChanged:o}),o()}createHoverFeature(e,t,n){e.createManagedBean(new qCe(t,n))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},ZCe={moduleName:"ColumnHover",version:ut,beans:[XCe],apiFunctions:{isColumnHovered:KCe}},JCe=class extends We{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){var e,t;this.wrapSvc=(t=(e=this.beans.frameworkOverrides).createGlobalEventListenerWrapper)==null?void 0:t.call(e)}addListener(e,t){var r;const n=((r=this.wrapSvc)==null?void 0:r.wrap(e,t))??t,s=!Cy.has(e),o=s?this.asyncListeners:this.syncListeners;o.has(e)||o.set(e,new Set),o.get(e).add(n),this.eventSvc.addListener(e,n,s)}removeListener(e,t){var r,i;const n=((r=this.wrapSvc)==null?void 0:r.unwrap(e,t))??t,s=this.asyncListeners.get(e),o=!!(s!=null&&s.delete(n));o||(i=this.syncListeners.get(e))==null||i.delete(n),this.eventSvc.removeListener(e,n,o)}addGlobalListener(e){var r;const t=((r=this.wrapSvc)==null?void 0:r.wrapGlobal(e))??e,n=(i,a)=>{Cy.has(i)&&t(i,a)},s=(i,a)=>{Cy.has(i)||t(i,a)};this.globalListenerPairs.set(e,{syncListener:n,asyncListener:s});const o=this.eventSvc;o.addGlobalListener(n,!1),o.addGlobalListener(s,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:n,globalListenerPairs:s}=this,o=(n==null?void 0:n.unwrapGlobal(e))??e;if(s.has(o)){const{syncListener:i,asyncListener:a}=s.get(o);t.removeGlobalListener(i,!1),t.removeGlobalListener(a,!0),s.delete(e)}else this.syncGlobalListeners.delete(o),t.removeGlobalListener(o,!1)}destroyEventListeners(e,t){e.forEach((n,s)=>{n.forEach(o=>this.eventSvc.removeListener(s,o,t)),n.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const n of e)this.eventSvc.removeGlobalListener(n,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:n,asyncListener:s})=>{t.removeGlobalListener(n,!1),t.removeGlobalListener(s,!0)}),e.clear()}};function QCe(e,t,n){var s;(s=e.apiEventSvc)==null||s.addListener(t,n)}function ebe(e,t,n){var s;(s=e.apiEventSvc)==null||s.removeListener(t,n)}function tbe(e,t){var n;(n=e.apiEventSvc)==null||n.addGlobalListener(t)}function nbe(e,t){var n;(n=e.apiEventSvc)==null||n.removeGlobalListener(t)}var sbe={moduleName:"EventApi",version:ut,apiFunctions:{addEventListener:QCe,addGlobalListener:tbe,removeEventListener:ebe,removeGlobalListener:nbe},beans:[JCe]},obe={moduleName:"Locale",version:ut,beans:[kge]},rbe=class extends We{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=Os(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){var a,l,c,u;const{visibleCols:e,rowModel:t,rowSpanSvc:n,pinnedRowModel:s}=this.beans,o=e.autoHeightCols;let r=!1;const i=d=>{var p;const h=d.__autoHeights;let f=ol(this.beans,d).height;for(const g of o){let v=h==null?void 0:h[g.getColId()];const C=n==null?void 0:n.getCellSpan(g,d);if(C){if(C.getLastNode()!==d)continue;if(v=(p=n==null?void 0:n.getCellSpan(g,d))==null?void 0:p.getLastNodeAutoHeight(),!v)return}if(v==null){if(this.colSpanSkipCell(g,d))continue;return}f=Math.max(v,f)}f!==d.rowHeight&&(d.setRowHeight(f),r=!0)};(a=s==null?void 0:s.forEachPinnedRow)==null||a.call(s,"top",i),(l=s==null?void 0:s.forEachPinnedRow)==null||l.call(s,"bottom",i),(c=t.forEachDisplayedNode)==null||c.call(t,i),r&&((u=t.onRowHeightChanged)==null||u.call(t))}setRowAutoHeight(e,t,n){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[n.getId()];return}const s=e.__autoHeights[n.getId()];e.__autoHeights[n.getId()]=t,s!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:n,colViewport:s,visibleCols:o}=this.beans;if(!n.colSpanActive)return!1;let r=[];switch(e.getPinned()){case"left":r=o.getLeftColsForRow(t);break;case"right":r=o.getRightColsForRow(t);break;case null:r=s.getColsWithinViewport(t);break}return!r.includes(e)}setupCellAutoHeight(e,t,n){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const s=t.parentElement,{rowNode:o,column:r}=e,i=this.beans,a=u=>{var S;if((S=this.beans.editSvc)!=null&&S.isEditing(e)||!e.isAlive()||!n.isAlive())return;const{paddingTop:d,paddingBottom:h,borderBottomWidth:f,borderTopWidth:p}=gc(s),g=d+h+f+p,C=t.offsetHeight+g;if(u<5){const b=Ds(i),w=!(b!=null&&b.contains(t)),D=C==0;if(w||D){window.setTimeout(()=>a(u+1),0);return}}this.setRowAutoHeight(o,C,r)},l=()=>a(0);l();const c=tl(i,t,l);return n.addDestroyFunc(()=>{c(),this.setRowAutoHeight(o,void 0,r)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:n}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(n).filter(o=>o.isAutoHeight())),t.length!==0){if(!n.__autoHeights)return!1;for(const s of t){const o=n.__autoHeights[s.getColId()];if(!o||n.rowHeight<o)return!1}}return!0}},ibe={moduleName:"RowAutoHeight",version:ut,beans:[rbe]},abe={moduleName:"AllCommunity",version:ut,dependsOn:[NB,fwe,Ewe,Zge,aye,lye,cye,uye,dye,hye,fye,iye,Qme,eve,tve,Jme,sve,ove,Bwe,Vye,oCe,m2,pCe,gCe,ECe,ICe,jue,MCe,Iye,pge,zCe,ZCe,jCe,sbe,vge,kwe,vB,obe,ibe,zue,iwe,GCe]};let GB=!1;GB||(Qoe.registerModules([abe,NB]),GB=!0);class lbe{constructor(t,n){Qn(this,"gridApi",null);Qn(this,"container");Qn(this,"config");Qn(this,"eventListeners",new Map);this.container=t,this.config=n}init(){if(this.gridApi)throw new Error("Grid already initialized");const{onGridReady:t,onCellClicked:n,onCellFocused:s,onRowSelected:o,...r}=this.config,i={...r,onGridReady:a=>{this.gridApi=a.api,t&&t(a)},onCellClicked:a=>{n&&n(a)},onCellFocused:a=>{s&&s(a)},onRowSelected:a=>{o&&o(a)}};return this.gridApi=xge(this.container,i),this.gridApi}updateRowData(t){this.gridApi&&this.gridApi.setGridOption("rowData",t)}updateColumnDefs(t){this.gridApi&&this.gridApi.setGridOption("columnDefs",t)}setColumnWidth(t){var n;this.gridApi&&((n=this.gridApi)==null||n.applyColumnState({state:t,applyOrder:!1}))}updateDatasource(t){this.gridApi&&this.gridApi.setGridOption("datasource",t)}refreshInfiniteCache(){this.gridApi&&this.gridApi.refreshInfiniteCache()}sizeColumnsToFit(){this.gridApi}deselectAll(){this.gridApi&&this.gridApi.deselectAll()}getSelectedRows(){var t;return((t=this.gridApi)==null?void 0:t.getSelectedRows())||[]}setQuickFilterText(t){this.gridApi&&this.gridApi.setGridOption("quickFilterText",t)}getColumnState(){var t;return(t=this.gridApi)==null?void 0:t.getColumnState()}addEventListener(t,n){if(!this.gridApi)throw new Error("Grid not initialized");this.eventListeners.has(t)||this.eventListeners.set(t,new Set),this.eventListeners.get(t).add(n),this.gridApi.addEventListener(t,n)}addRow(t,n="bottom"){if(this.gridApi){const s={add:[t],addIndex:n==="bottom"?void 0:0};if(this.gridApi.applyTransaction(s),n==="bottom"){const o=this.gridApi.getDisplayedRowCount();o>0&&this.gridApi.ensureIndexVisible(o-1,"bottom")}}}addRows(t,n="bottom"){if(this.gridApi&&t.length>0){const s={add:t,addIndex:n==="bottom"?void 0:0};if(this.gridApi.applyTransaction(s),n==="bottom"){const o=this.gridApi.getDisplayedRowCount();o>0&&this.gridApi.ensureIndexVisible(o-1,"bottom")}}}destroy(){this.gridApi&&(this.eventListeners.forEach((t,n)=>{t.forEach(s=>{var o;(o=this.gridApi)==null||o.removeEventListener(n,s)})}),this.eventListeners.clear(),this.gridApi.destroy(),this.gridApi=null)}getApi(){return this.gridApi}switchTheme(t){document.body.dataset.agThemeMode=t==="dark"?"dark":"light"}}const cbe=S2.withParams({accentColor:"var(--primary-color)",backgroundColor:"#ffffff",borderColor:"#e5e7eb",borderRadius:4,browserColorScheme:"light",chromeBackgroundColor:"#f9fafb",columnBorder:!0,fontFamily:"inherit",fontSize:14,foregroundColor:"#111827",headerBackgroundColor:"#fff",headerFontSize:14,headerFontWeight:600,headerTextColor:"#374151",iconSize:16,rowBorder:!0,spacing:8,headerHeight:40,rowHeight:32,wrapperBorder:!0,wrapperBorderRadius:4},"light").withParams({accentColor:"var(--primary-color)",backgroundColor:"#1f2937",borderColor:"#374151",borderRadius:4,browserColorScheme:"dark",chromeBackgroundColor:"#111827",columnBorder:!0,fontFamily:"inherit",fontSize:14,foregroundColor:"#f9fafb",headerBackgroundColor:"#374151",headerFontSize:14,headerFontWeight:600,headerTextColor:"#f9fafb",iconSize:16,rowBorder:!0,spacing:8,headerHeight:40,rowHeight:32,wrapperBorder:!0,wrapperBorderRadius:4},"dark"),ube=ot({__name:"AgTable",props:{statusBar:{},sideBar:{type:[Object,String,Array,Boolean,null]},suppressContextMenu:{type:Boolean},preventDefaultOnContextMenu:{type:Boolean},allowContextMenuWithControlKey:{type:Boolean},columnMenu:{},suppressMenuHide:{type:Boolean},enableBrowserTooltips:{type:Boolean},tooltipTrigger:{},tooltipShowDelay:{},tooltipHideDelay:{},tooltipMouseTrack:{type:Boolean},tooltipShowMode:{},tooltipInteraction:{type:Boolean},popupParent:{},copyHeadersToClipboard:{type:Boolean},copyGroupHeadersToClipboard:{type:Boolean},clipboardDelimiter:{},suppressCopyRowsToClipboard:{type:Boolean},suppressCopySingleCellRanges:{type:Boolean},suppressLastEmptyLineOnPaste:{type:Boolean},suppressClipboardPaste:{type:Boolean},suppressClipboardApi:{type:Boolean},suppressCutToClipboard:{type:Boolean},columnDefs:{},defaultColDef:{},defaultColGroupDef:{},columnTypes:{},dataTypeDefinitions:{},maintainColumnOrder:{type:Boolean},enableStrictPivotColumnOrder:{type:Boolean},suppressFieldDotNotation:{type:Boolean},headerHeight:{},groupHeaderHeight:{},floatingFiltersHeight:{},pivotHeaderHeight:{},pivotGroupHeaderHeight:{},hidePaddedHeaderRows:{type:Boolean},allowDragFromColumnsToolPanel:{type:Boolean},suppressMovableColumns:{type:Boolean},suppressColumnMoveAnimation:{type:Boolean},suppressMoveWhenColumnDragging:{type:Boolean},suppressDragLeaveHidesColumns:{type:Boolean},suppressGroupChangesColumnVisibility:{type:[Boolean,String]},suppressMakeColumnVisibleAfterUnGroup:{type:Boolean},suppressRowGroupHidesColumns:{type:Boolean},colResizeDefault:{},suppressAutoSize:{type:Boolean},autoSizePadding:{},skipHeaderOnAutoSize:{type:Boolean},autoSizeStrategy:{},components:{},editType:{},suppressStartEditOnTab:{type:Boolean},getFullRowEditValidationErrors:{type:Function},invalidEditValueMode:{},singleClickEdit:{type:Boolean},suppressClickEdit:{type:Boolean},readOnlyEdit:{type:Boolean},stopEditingWhenCellsLoseFocus:{type:Boolean},enterNavigatesVertically:{type:Boolean},enterNavigatesVerticallyAfterEdit:{type:Boolean},enableCellEditingOnBackspace:{type:Boolean},undoRedoCellEditing:{type:Boolean},undoRedoCellEditingLimit:{},defaultCsvExportParams:{},suppressCsvExport:{type:Boolean},defaultExcelExportParams:{},suppressExcelExport:{type:Boolean},excelStyles:{},findSearchValue:{},findOptions:{},quickFilterText:{},cacheQuickFilter:{type:Boolean},includeHiddenColumnsInQuickFilter:{type:Boolean},quickFilterParser:{type:Function},quickFilterMatcher:{type:Function},applyQuickFilterBeforePivotOrAgg:{type:Boolean},excludeChildrenWhenTreeDataFiltering:{type:Boolean},enableAdvancedFilter:{type:Boolean},alwaysPassFilter:{type:Function},includeHiddenColumnsInAdvancedFilter:{type:Boolean},advancedFilterParent:{},advancedFilterBuilderParams:{},advancedFilterParams:{},suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},enableFilterHandlers:{type:Boolean},filterHandlers:{},enableCharts:{type:Boolean},chartThemes:{},customChartThemes:{},chartThemeOverrides:{},chartToolPanelsDef:{},chartMenuItems:{type:[Array,Function]},loadingCellRenderer:{},loadingCellRendererParams:{},loadingCellRendererSelector:{type:Function},localeText:{},masterDetail:{type:Boolean},keepDetailRows:{type:Boolean},keepDetailRowsCount:{},detailCellRenderer:{},detailCellRendererParams:{},detailRowHeight:{},detailRowAutoHeight:{type:Boolean},context:{},alignedGrids:{type:[Array,Function]},tabIndex:{},rowBuffer:{},valueCache:{type:Boolean},valueCacheNeverExpires:{type:Boolean},enableCellExpressions:{type:Boolean},suppressTouch:{type:Boolean},suppressFocusAfterRefresh:{type:Boolean},suppressBrowserResizeObserver:{type:Boolean},suppressPropertyNamesCheck:{type:Boolean},suppressChangeDetection:{type:Boolean},debug:{type:Boolean},loading:{type:Boolean},overlayLoadingTemplate:{},loadingOverlayComponent:{},loadingOverlayComponentParams:{},suppressLoadingOverlay:{type:Boolean},overlayNoRowsTemplate:{},noRowsOverlayComponent:{},noRowsOverlayComponentParams:{},suppressNoRowsOverlay:{type:Boolean},pagination:{type:Boolean},paginationPageSize:{},paginationPageSizeSelector:{type:[Array,Boolean]},paginationAutoPageSize:{type:Boolean},paginateChildRows:{type:Boolean},suppressPaginationPanel:{type:Boolean},pivotMode:{type:Boolean},pivotPanelShow:{},pivotMaxGeneratedColumns:{},pivotDefaultExpanded:{},pivotColumnGroupTotals:{},pivotRowTotals:{},pivotSuppressAutoColumn:{type:Boolean},suppressExpandablePivotGroups:{type:Boolean},functionsReadOnly:{type:Boolean},aggFuncs:{},suppressAggFuncInHeader:{type:Boolean},alwaysAggregateAtRootLevel:{type:Boolean},aggregateOnlyChangedColumns:{type:Boolean},suppressAggFilteredOnly:{type:Boolean},removePivotHeaderRowWhenSingleValueColumn:{type:Boolean},animateRows:{type:Boolean},cellFlashDuration:{},cellFadeDuration:{},allowShowChangeAfterFilter:{type:Boolean},domLayout:{},ensureDomOrder:{type:Boolean},enableCellSpan:{type:Boolean},enableRtl:{type:Boolean},suppressColumnVirtualisation:{type:Boolean},suppressMaxRenderedRowRestriction:{type:Boolean},suppressRowVirtualisation:{type:Boolean},rowDragManaged:{type:Boolean},rowDragInsertDelay:{},suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},dragAndDropImageComponent:{},dragAndDropImageComponentParams:{},fullWidthCellRenderer:{},fullWidthCellRendererParams:{},embedFullWidthRows:{type:Boolean},groupDisplayType:{},groupDefaultExpanded:{},autoGroupColumnDef:{},groupMaintainOrder:{type:Boolean},groupSelectsChildren:{type:Boolean},groupLockGroupColumns:{},groupAggFiltering:{type:[Boolean,Function]},groupTotalRow:{type:[String,Function]},grandTotalRow:{},suppressStickyTotalRow:{type:[Boolean,String]},groupSuppressBlankHeader:{type:Boolean},groupSelectsFiltered:{type:Boolean},showOpenedGroup:{type:Boolean},groupHideParentOfSingleChild:{type:[Boolean,String]},groupRemoveSingleChildren:{type:Boolean},groupRemoveLowestSingleChildren:{type:Boolean},groupHideOpenParents:{type:Boolean},groupAllowUnbalanced:{type:Boolean},rowGroupPanelShow:{},groupRowRenderer:{},groupRowRendererParams:{},treeData:{type:Boolean},treeDataChildrenField:{},treeDataParentIdField:{},rowGroupPanelSuppressSort:{type:Boolean},suppressGroupRowsSticky:{type:Boolean},groupHierarchyConfig:{},pinnedTopRowData:{},pinnedBottomRowData:{},enableRowPinning:{type:[Boolean,String]},isRowPinnable:{type:Function},isRowPinned:{type:Function},rowModelType:{},rowData:{},asyncTransactionWaitMillis:{},suppressModelUpdateAfterUpdateTransaction:{type:Boolean},datasource:{},cacheOverflowSize:{},infiniteInitialRowCount:{},serverSideInitialRowCount:{},suppressServerSideFullWidthLoadingRow:{type:Boolean},cacheBlockSize:{},maxBlocksInCache:{},maxConcurrentDatasourceRequests:{},blockLoadDebounceMillis:{},purgeClosedRowNodes:{type:Boolean},serverSideDatasource:{},serverSideSortAllLevels:{type:Boolean},serverSideEnableClientSideSort:{type:Boolean},serverSideOnlyRefreshFilteredGroups:{type:Boolean},serverSidePivotResultFieldSeparator:{},viewportDatasource:{},viewportRowModelPageSize:{},viewportRowModelBufferSize:{},alwaysShowHorizontalScroll:{type:Boolean},alwaysShowVerticalScroll:{type:Boolean},debounceVerticalScrollbar:{type:Boolean},suppressHorizontalScroll:{type:Boolean},suppressScrollOnNewData:{type:Boolean},suppressScrollWhenPopupsAreOpen:{type:Boolean},suppressAnimationFrame:{type:Boolean},suppressMiddleClickScrolls:{type:Boolean},suppressPreventDefaultOnMouseWheel:{type:Boolean},scrollbarWidth:{},rowSelection:{},cellSelection:{type:[Boolean,Object]},rowMultiSelectWithClick:{type:Boolean},suppressRowDeselection:{type:Boolean},suppressRowClickSelection:{type:Boolean},suppressCellFocus:{type:Boolean},suppressHeaderFocus:{type:Boolean},selectionColumnDef:{},rowNumbers:{type:[Boolean,Object]},suppressMultiRangeSelection:{type:Boolean},enableCellTextSelection:{type:Boolean},enableRangeSelection:{type:Boolean},enableRangeHandle:{type:Boolean},enableFillHandle:{type:Boolean},fillHandleDirection:{},suppressClearOnFillReduction:{type:Boolean},sortingOrder:{},accentedSort:{type:Boolean},unSortIcon:{type:Boolean},suppressMultiSort:{type:Boolean},alwaysMultiSort:{type:Boolean},multiSortKey:{},suppressMaintainUnsortedOrder:{type:Boolean},icons:{},rowHeight:{},rowStyle:{},rowClass:{},rowClassRules:{},suppressRowHoverHighlight:{type:Boolean},suppressRowTransform:{type:Boolean},columnHoverHighlight:{type:Boolean},gridId:{},deltaSort:{type:Boolean},treeDataDisplayType:{},enableGroupEdit:{type:Boolean},initialState:{},reactiveCustomComponents:{type:Boolean},renderingMode:{},theme:{},loadThemeGoogleFonts:{type:Boolean},themeCssLayer:{},styleNonce:{},themeStyleContainer:{},getContextMenuItems:{type:Function},getMainMenuItems:{type:Function},postProcessPopup:{type:Function},processUnpinnedColumns:{type:Function},processCellForClipboard:{type:Function},processHeaderForClipboard:{type:Function},processGroupHeaderForClipboard:{type:Function},processCellFromClipboard:{type:Function},sendToClipboard:{type:Function},processDataFromClipboard:{type:Function},isExternalFilterPresent:{type:Function},doesExternalFilterPass:{type:Function},getChartToolbarItems:{type:Function},createChartContainer:{type:Function},focusGridInnerElement:{type:Function},navigateToNextHeader:{type:Function},tabToNextHeader:{type:Function},navigateToNextCell:{type:Function},tabToNextCell:{type:Function},getLocaleText:{type:Function},getDocument:{type:Function},paginationNumberFormatter:{type:Function},getGroupRowAgg:{type:Function},isGroupOpenByDefault:{type:Function},ssrmExpandAllAffectsAllRows:{type:Boolean},initialGroupOrderComparator:{type:Function},processPivotResultColDef:{type:Function},processPivotResultColGroupDef:{type:Function},getDataPath:{type:Function},getChildCount:{type:Function},getServerSideGroupLevelParams:{type:Function},isServerSideGroupOpenByDefault:{type:Function},isApplyServerSideTransaction:{type:Function},isServerSideGroup:{type:Function},getServerSideGroupKey:{type:Function},getBusinessKeyForNode:{type:Function},getRowId:{type:Function},resetRowDataOnUpdate:{type:Boolean},processRowPostCreate:{type:Function},isRowSelectable:{type:Function},isRowMaster:{type:Function},fillOperation:{type:Function},postSortRows:{type:Function},getRowStyle:{type:Function},getRowClass:{type:Function},getRowHeight:{type:Function},isFullWidthRow:{type:Function},onToolPanelVisibleChanged:{type:Function},onToolPanelSizeChanged:{type:Function},onColumnMenuVisibleChanged:{type:Function},onContextMenuVisibleChanged:{type:Function},onCutStart:{type:Function},onCutEnd:{type:Function},onPasteStart:{type:Function},onPasteEnd:{type:Function},onColumnVisible:{type:Function},onColumnPinned:{type:Function},onColumnResized:{type:Function},onColumnMoved:{type:Function},onColumnValueChanged:{type:Function},onColumnPivotModeChanged:{type:Function},onColumnPivotChanged:{type:Function},onColumnGroupOpened:{type:Function},onNewColumnsLoaded:{type:Function},onGridColumnsChanged:{type:Function},onDisplayedColumnsChanged:{type:Function},onVirtualColumnsChanged:{type:Function},onColumnEverythingChanged:{type:Function},onColumnsReset:{type:Function},onColumnHeaderMouseOver:{type:Function},onColumnHeaderMouseLeave:{type:Function},onColumnHeaderClicked:{type:Function},onColumnHeaderContextMenu:{type:Function},onComponentStateChanged:{type:Function},onCellValueChanged:{type:Function},onCellEditRequest:{type:Function},onRowValueChanged:{type:Function},onCellEditingStarted:{type:Function},onCellEditingStopped:{type:Function},onRowEditingStarted:{type:Function},onRowEditingStopped:{type:Function},onBulkEditingStarted:{type:Function},onBulkEditingStopped:{type:Function},onBatchEditingStarted:{type:Function},onBatchEditingStopped:{type:Function},onUndoStarted:{type:Function},onUndoEnded:{type:Function},onRedoStarted:{type:Function},onRedoEnded:{type:Function},onCellSelectionDeleteStart:{type:Function},onCellSelectionDeleteEnd:{type:Function},onRangeDeleteStart:{type:Function},onRangeDeleteEnd:{type:Function},onFillStart:{type:Function},onFillEnd:{type:Function},onFilterOpened:{type:Function},onFilterChanged:{type:Function},onFilterModified:{type:Function},onFilterUiChanged:{type:Function},onFloatingFilterUiChanged:{type:Function},onAdvancedFilterBuilderVisibleChanged:{type:Function},onFindChanged:{type:Function},onChartCreated:{type:Function},onChartRangeSelectionChanged:{type:Function},onChartOptionsChanged:{type:Function},onChartDestroyed:{type:Function},onCellKeyDown:{type:Function},onGridReady:{type:Function},onGridPreDestroyed:{type:Function},onFirstDataRendered:{type:Function},onGridSizeChanged:{type:Function},onModelUpdated:{type:Function},onVirtualRowRemoved:{type:Function},onViewportChanged:{type:Function},onBodyScroll:{type:Function},onBodyScrollEnd:{type:Function},onDragStarted:{type:Function},onDragStopped:{type:Function},onDragCancelled:{type:Function},onStateUpdated:{type:Function},onPaginationChanged:{type:Function},onRowDragEnter:{type:Function},onRowDragMove:{type:Function},onRowDragLeave:{type:Function},onRowDragEnd:{type:Function},onRowDragCancel:{type:Function},isRowValidDropPosition:{type:Function},onRowResizeStarted:{type:Function},onRowResizeEnded:{type:Function},onColumnRowGroupChanged:{type:Function},onRowGroupOpened:{type:Function},onExpandOrCollapseAll:{type:Function},onPivotMaxColumnsExceeded:{type:Function},onPinnedRowDataChanged:{type:Function},onPinnedRowsChanged:{type:Function},onRowDataUpdated:{type:Function},onAsyncTransactionsFlushed:{type:Function},onStoreRefreshed:{type:Function},onHeaderFocused:{type:Function},onCellClicked:{type:Function},onCellDoubleClicked:{type:Function},onCellFocused:{type:Function},onCellMouseOver:{type:Function},onCellMouseOut:{type:Function},onCellMouseDown:{type:Function},onRowClicked:{type:Function},onRowDoubleClicked:{type:Function},onRowSelected:{type:Function},onSelectionChanged:{type:Function},onCellContextMenu:{type:Function},onRangeSelectionChanged:{type:Function},onCellSelectionChanged:{type:Function},onTooltipShow:{type:Function},onTooltipHide:{type:Function},onSortChanged:{type:Function},height:{},isSorting:{type:Boolean}},emits:["onGridReady","row-clicked","cell-clicked","cell-focused","row-selected"],setup(e,{expose:t,emit:n}){const s=e,o=n,r=B(null);tS(r,()=>{var v;const g=(v=i.value)==null?void 0:v.getApi();g==null||g.clearFocusedCell()});const i=B(null),a=Y(()=>({width:"100%",height:s.height||"500px"})),l=Y(()=>({...s,theme:cbe}));function c(){if(!r.value){console.warn("Grid container element not found");return}const g={...l.value,height:s.height};i.value=new lbe(r.value,g),i.value.init(),u()}function u(){var v;const g=((v=i.value)==null?void 0:v.getApi())??null;o("onGridReady",g)}function d(g){var C,S;if(!g)return;(C=i.value)==null||C.updateColumnDefs(g);const v=g.map(b=>b.field&&b.width&&!b.hide?{colId:b.field,width:b.width}:null).filter(b=>b!==null);(S=i.value)==null||S.setColumnWidth(v)}function h(){var g;(g=i.value)==null||g.destroy(),i.value=null}function f(){var g;return((g=i.value)==null?void 0:g.getApi())||void 0}function p(){return i.value||null}return et(()=>s.columnDefs,(g,v)=>{const C=g==null?void 0:g.filter(b=>!b.hide).map(b=>b.field).join(","),S=v==null?void 0:v.filter(b=>!b.hide).map(b=>b.field).join(",");C!==S&&d(g)},{deep:!0}),es(()=>{h()}),t({gridApi:f,gridManager:p,syncColumnDefs:d}),sn(()=>{c()}),es(()=>{h()}),(g,v)=>(z(),le("div",{ref_key:"gridContainerRef",ref:r,style:hn(a.value),class:J(["ag-theme-quartz",["ag-table-container",s.isSorting?"is-sorting":""]])},null,6))}});function Fd(e){return bN(e)}const dbe=()=>[...[{headerName:"Name",field:"name",sortable:!1,filter:!1,pinned:"left",headerComponent:Fd(ac),suppressMovable:!0},{headerName:"Notes",field:"description",sortable:!1,filter:!1,suppressMovable:!1},{headerName:"Assignee",field:"assignees",sortable:!1,filter:!1,headerComponent:Fd(ac)},{headerName:"Status",field:"status",sortable:!1,filter:!1,headerComponent:Fd(ac)},{headerName:"Date Range",field:"dateRange",sortable:!1,filter:!1,headerComponent:Fd(ac)},{headerName:"Last Updated",field:"lastUpdated",sortable:!1,filter:!1,headerComponent:Fd(ac),cellRendererParams:n=>{var s,o,r;return{...n,value:(s=n==null?void 0:n.data)==null?void 0:s.lastUpdated.value,tooltip:((r=(o=n==null?void 0:n.data)==null?void 0:o.lastUpdated)==null?void 0:r.tooltip)||void 0,readOnly:!0}}},{headerName:"Completed On",field:"completedOn",sortable:!1,filter:!1,headerComponent:Fd(ac),cellRendererParams:n=>{var s,o,r;return{...n,value:(s=n==null?void 0:n.data)==null?void 0:s.completedOn.value,tooltip:((r=(o=n==null?void 0:n.data)==null?void 0:o.completedOn)==null?void 0:r.tooltip)||void 0,readOnly:!0}}}].map(n=>Of.fromType(n))],Py={WIDTH:60,HEADER_CLASS:"ag-checkbox-header"},hbe=()=>({field:"__checkboxSelection",checkboxSelection:!0,headerCheckboxSelection:!0,pinned:"left",width:Py.WIDTH,minWidth:Py.WIDTH,maxWidth:Py.WIDTH,cellClass:"ag-checkbox-cell",headerClass:Py.HEADER_CLASS,headerComponent:Dv(wJ),suppressMovable:!0}),fbe={headerName:"",field:"options",sortable:!1,filter:!1,editable:!0,pinned:"right",lockPosition:!0,suppressMovable:!0,resizable:!1},pbe=(e,t,n)=>{const{getCachedValue:s,setCachedValue:o}=Rh({dbName:"item_table_column_configs",storeName:"column_configs"}),r=async()=>{const u=await s(t);if(u&&typeof u=="string")try{return JSON.parse(u)}catch(d){return console.error("Failed to parse cached column config:",d),null}return null},i=B([]),a=hbe(),l=async u=>{const d=await r(),h=new Map;d==null||d.forEach(k=>{k.width&&h.set(k.field,k.width)});const f=dbe(),p=Of.fromType(fbe),v=((u==null?void 0:u.map(k=>{var I;return{headerName:k.name,field:`metric_${k.id}`,editable:((I=k==null?void 0:k.auth_permission)==null?void 0:I.permission)==2,sortable:!0,filter:!1,flex:1,context:{...k},hide:!(k.is_primary||k.is_point_metric),cellClass:"ag-cell-optimized",headerComponent:Dv(ac),headerComponentParams:M=>({headerType:k.metric_type.code=="number"||k.metric_type.code=="formula"?"number":"default"}),width:h.get(`metric_${k.id}`)}}))||[]).map(k=>Of.fromType(k)),C=[a,...f,...v,p],S=C.filter(k=>k.pinned==="left"),b=C.filter(k=>k.pinned==="right"||k.field==="blank"),w=C.filter(k=>!k.pinned&&k.field!=="blank");if(!d||d.length===0){i.value=C;return}const D=new Map(d.map(k=>[k.field,k])),R=new Map(w.map(k=>[k.field,k])),T=[];for(const k of d)if(k.field&&R.has(k.field)){const I=R.get(k.field);T.push({...I,hide:k.hide,width:k.width}),R.delete(k.field)}const F=Array.from(R.values()),x=[...T,...F].map(k=>({...k,lockPinned:!0})),P=S.map(k=>{const I=D.get(k.field);return I!=null&&I.width?{...k,width:I.width}:k}),E=b.map(k=>{const I=D.get(k.field);return I!=null&&I.width?{...k,width:I.width}:k});i.value=[...P,...x,...E]};et(e,u=>l(u),{immediate:!0});const c=Tr((u,d)=>{var C,S;if(u.source!==void 0)if(["uiColumnResized","uiColumnMoved","api"].indexOf(u.source)===-1){console.warn("Skipping saveColumnConfig for source:",u.source);return}else console.warn("Executing saveColumnConfig for source:",u.source);else console.warn("Executing saveColumnConfig for source:",u);const h=(C=n==null?void 0:n.value)==null?void 0:C.getColumnDefs(),f=(S=n==null?void 0:n.value)==null?void 0:S.getColumnState().reduce((b,w)=>(b[w.colId]=Number(w.width),b),{}),p=new Map;Object.entries(f||{}).forEach(([b,w])=>{p.set(b,w)}),i.value=h||i.value;const g=h==null?void 0:h.filter(b=>!b.pinned&&b.field!=="blank"),v=(g==null?void 0:g.map(b=>({field:b.field,hide:b.hide,width:p.get(b.field)||b.width,pinned:b.pinned})))||[];d&&o(t,JSON.stringify(v))},ai);return{columnDefs:i,checkboxColumn:a,saveColumnConfig:c}},gbe=()=>{const e=un.getInstance().getItem("API_BASE_URL");return e!=null&&e.includes("v1")?e.slice(0,e.lastIndexOf("/v1")):String(e)},mbe=e=>{var k,I,M;const{showMessage:t,showErrorNetMessage:n}=gf(),s=ts(),o={domainApi:gbe(),wsCode:un.getInstance().getItem("ws.code"),entityId:e.value.entityId},r=(M=(I=(k=s==null?void 0:s.appContext)==null?void 0:k.config)==null?void 0:I.globalProperties)==null?void 0:M.apiConfig;if(!r||o.domainApi===""||o.wsCode==="")throw new Error("API configuration is missing in useItems");const i=new Vk(r,o);i.on("call-api",O=>{O.success?t(O.apiCode,"success"):n(O)});const a=lo({}),l=B([]),c=B(!1),u=B(null),d=B(null),h=B(1),f=B(20);let p=Promise.resolve();const{setCachedUsers:g}=j9(),v=O=>({workspaceId:e.value.workspaceId,entityIds:[e.value.entityId],orderBy:"id-asc",include_permission:"{include_permission}",include_permission_names:!0,q:O}),C=50,S=async(O,$,Z)=>{if(!O.length)return[];const Q=r5(O,$);return(await Promise.all(Q.map(Z))).flat()},b=async O=>{try{return(await i.getPermissionForItems({workspaceId:e.value.workspaceId,itemIds:O})).data.map(Z=>[Z==null?void 0:Z.id,Z.permission])}catch($){return console.error("Failed to fetch item permissions chunk:",$),[]}},w=async(O,$)=>{try{const Z=await i.getMetricValues({workspaceId:e.value.workspaceId,item_ids:O,per_page:O.length*$.length,metric_ids:$}),Q=Z.data.map(ae=>{const ee=new Map(ae.item_metrics.map(W=>[W.metric_id,{value:W.value,auth_permission:W==null?void 0:W.auth_permission}])),V=Object.fromEntries($.map(W=>[W,ee.get(W)??null]));return[ae==null?void 0:ae.id,V]}),se=new Set(Z.data.map(ae=>ae==null?void 0:ae.id));for(const ae of O)if(!se.has(ae)){const ee=Object.fromEntries($.map(V=>[V,{value:null,auth_permission:void 0}]));Q.push([ae,ee])}return Q}catch(Z){return console.error("Failed to fetch a chunk of metric values:",Z),O.map(se=>[se,Object.fromEntries($.map(ae=>[ae,void 0]))])}},D=async O=>{try{const $=await i.getAssignedUser({workspaceId:e.value.workspaceId,item_ids:O,per_page:O.length}),Z=$.data.flatMap(Q=>Q.assignees);return g(Z),$.data.map(Q=>[Q==null?void 0:Q.id,Q==null?void 0:Q.assignees])}catch($){return console.error("Failed to fetch a chunk of assigned users:",$),[]}},R=async O=>{if(!O.length)return console.warn("getPermissionForItems: Empty itemIds"),{};try{const $=await S(O,C,b);return Object.fromEntries($)}catch($){return console.error("Failed to fetch item permissions:",$),{}}},T=async(O,$)=>!O.length||!$.length?{}:(p=p.then(async()=>{try{const se=[];let ae=0;for(let V=0;V<$.length;V+=5){ae++;const W=$.slice(V,V+5),te=[];for(let ve=0;ve<W.length;ve++){const re=W[ve],ie=await S(O,C,j=>w(j,[re]));te.push(ie),await new Promise(j=>setTimeout(j,500))}se.push(...te);const pe=V+5>=$.length}const ee={};for(const V of se.flat()){const[W,te]=V;ee[W]||(ee[W]={}),Object.assign(ee[W],te)}return ee}catch(Z){return console.error("Failed to fetch metric values:",Z),{}}}),p),F=async O=>{if(!O.length)return console.warn("getAssignedUsers: Empty itemIds"),{};try{const $=await S(O,C,D);return Object.fromEntries($)}catch($){return console.error("Failed to fetch assigned users:",$),{}}};return{items:l,loading:c,error:u,pagination:d,currentPage:h,pageSize:f,cusorMap:a,fetchItems:async O=>{const{cursor:$,offset:Z,size:Q,searchQuery:se}=O;let ae=[];c.value=!0,u.value=null;try{const ee=await i.getAllItem_cursor({...O,cursor:$||void 0,offset:Z||void 0,pageSize:Q||f.value,...v(se),sortBy:O.sort_by});return l.value=ee.data,d.value=ee.meta,h.value=ee.meta.current_page||0,ae=ee.data.map(V=>V==null?void 0:V.id),ee}catch(ee){throw u.value=ee,console.error("Failed to fetch items (cursor):",ee),ee}finally{const ee=async()=>{try{const[V,W]=await Promise.all([F(ae),R(ae)]);e.value.updateItemData({assignees:V,permission:W},ae);const te=await T(ae,e.value.metricIds);e.value.setMetricValues(te,new Set(ae),e.value.metricIds)}catch(V){console.error("Post-fetch processing failed:",V)}};c.value=!1,setTimeout(ee)}},getAssignableStatus:async O=>{try{return await i.getAssignableStatus({workspaceId:e.value.workspaceId,itemIds:O})}catch($){throw console.error("Failed to fetch assignable status:",$),$}},getMetricList:async O=>{try{return await i.getMetricList({workspaceId:e.value.workspaceId,entityId:O})}catch($){throw console.error("Failed to fetch metric list:",$),$}},getMetricValues:T,getAssignedUsers:F}};function vbe(e){return{updateRowData:(s,o)=>{if(!e.value)return;const r=[],i=new Set,a=e.value.getColumnDefs();if(!a)return;const l=a.map(c=>{if(c.field&&c.field.startsWith("metric_")&&(c.hide===!1||c.hide===void 0))return c.field}).filter(Boolean);o.forEach(c=>{var d;const u=(d=e.value)==null?void 0:d.getRowNode(c);if(u){if(r.push(u),s.assignees){const h=A9((s.assignees[c]||[]).map(IF));u.data.assignees=h,i.add("assignees")}s.permission&&(u.data.permissions=s.permission[c]),l.forEach(h=>{u.data[h]=u.data[h]??null})}}),i.add("assignees"),i.add("status"),i.add("dateRange"),i.add("moreActions"),i.add("name"),i.add("description"),e.value.refreshCells({rowNodes:r,columns:Array.from(i),force:!0})},setMetricValues:(s,o,r)=>{const i=e.value;if(!i)return;const a=new Map(Array.from(o).map(c=>[c,new Map(r.map(u=>[u,{value:null,auth_permission:void 0}]))]));Object.entries(s).forEach(([c,u])=>{Object.entries(u).forEach(([d,h])=>{var f;(f=a.get(c))==null||f.set(d,{value:h==null?void 0:h.value,auth_permission:h==null?void 0:h.auth_permission})})});const l=Array.from(a.entries()).map(([c,u])=>{const d=i.getRowNode(c);return d!=null&&d.data?(u.forEach((h,f)=>{const p=`metric_${f}`;d.data[p]=(h==null?void 0:h.value)||null;const g=`metric_permission_${f}`;d.data[p]=(h==null?void 0:h.value)||null,d.data[g]=(h==null?void 0:h.auth_permission)||null}),d):null});l.length>0&&i.refreshCells({rowNodes:l,columns:Array.from(r).map(c=>`metric_${c}`),force:!0})}}}function ybe(e,t,n,s,o){let r=!0;return{async getRows(i){try{s(!0),r&&(o(!0),r=!1);const a=Math.floor(i.startRow/t)+1,{rows:l,total:c}=await e({page:a,pageSize:t,filterText:n(),sort_by:i.sortModel});let u=-1;Number.isFinite(c)?u=c:l.length<t&&(u=i.startRow+l.length),i.context={pageSize:t,text:n()},i.successCallback(l,u),s(!1),o(!1)}catch(a){console.error("Datasource fetch error:",a),i.failCallback(),s(!1),o(!1)}}}}function wbe(e){const{selectRowData:t,isSidebarOpen:n,quickFilterText:s,gridApi:o,fetcher:r}=e,i=B(!0),a=B(!0),l=B(!1),c=()=>{n.value=!n.value},u=v=>{if(i.value=!1,o.value=v,!v)return null;const{addEventListener:C,setGridOption:S}=v;if(!r)return console.error("Fetcher function is undefined"),null;const b=ybe(r,e.perPage,()=>s.value,w=>{i.value=w},w=>{a.value=w});return S==null||S("datasource",b),C==null||C("selectionChanged",()=>{t.value=v.getSelectedRows()}),v||null},d=v=>{var C,S;if((C=o.value)==null||C.hideOverlay(),v!==void 0&&(s.value=v),(S=o.value)==null||S.deselectAll(),t.value=[],i.value=!0,!o.value||!r){console.error("Grid API or fetcher is not available"),i.value=!1;return}l.value=!0,a.value=!0,o.value.purgeInfiniteCache(),o.value.ensureIndexVisible(0,"top"),setTimeout(()=>{i.value=!1,setTimeout(()=>{l.value=!1},100)},300)},h=()=>{var v;(v=o.value)==null||v.deselectAll(),t.value=[]},f=Tr(v=>{d(v)},ai),p=()=>{o.value},g=B(!1);return{isLoading:i,toggleSidebar:c,onGridReady:u,onSearch:f,handleUnSelect:h,firstLoad:a,cacheCleared:l,handleSelectAll:p,isSelectAll:g}}const Cbe={changelog:{"1.0.1":{date:"2024-06-20",changes:["Fixed styling issues for archived and deleted rows."]},"1.0.0":{date:"2024-06-15",changes:["Initial release of the Item Table package."]},"0.0.1-alpha.8":{date:"2024-06-10",changes:["Improved performance of row updates.","Added support for custom cell renderers.","Add row hover effect for better UX.","Add loading skeleton for filter","Beta release with core functionalities implemented."]},"0.0.1-alpha.9":{date:"2024-06-05",changes:["Add row selection feature.","Fix bug with column resizing.","Optimize rendering for large datasets.","Implement getLog function to retrieve changelog entries based on version.","Display app version and changelog in the Item Table component tooltip.","Clean up unused autocomplete and memoized config composables.","Update styles for better consistency and readability."]},"0.0.1-alpha.11":{date:"2024-06-18",changes:["Add bulk process status display: items now show an hourglass icon and tooltip when being processed.","Update data model: added isProcessing and bulk_process properties to track item status.","Improve row focus: focused rows now flash for better visibility.","Set 'Last Updated' and 'Completed On' columns as read-only.","Fix: resolve visual fetching issue in useRemoteFiles composable.","Fix: use correct upload icon in PopupCreateScenes component.","Enhance data conversion to include processing status in item rows."]},"0.0.1-alpha.12":{date:"2024-06-12",changes:["feat: enhance Snackbar component and notification handling","Refactor Snackbar.vue for improved readability and styling, including color adjustments for icons and text.","Add showMessage function in notifications store to display messages based on API keys, improving notification management.","Introduce notificationMessage constant to centralize notification messages for various API actions, enhancing maintainability.","Remove unnecessary console logs from useRemoteFiles and improve logging in notification store for better debugging."]},"0.0.1-alpha.16":{date:"2024-06-20",changes:["Add onboarding tour feature and enhance UI components with new dependencies","Refactor UI components for improved styling and functionality","Updated RatingComponent.vue to streamline class bindings and improve accessibility attributes.","Enhanced SearchBox.vue by adding a clear event handler and simplifying icon rendering.","Modified AssigneeGroupEditor.vue and AssigneeGroupRenderer.vue to remove unnecessary size attributes from icons.","Adjusted DateRangeRenderer.vue to remove size attributes from icons for consistency.","Updated HeaderCheckbox.vue to set dropdown placement to 'bottom-start'.","Refined HeaderSorting.vue to simplify sort option labels and improve sorting logic.","Enhanced HeaderWrapper.vue to utilize reactive properties for sorting state.","Improved HyperLinkEditor.vue and HyperLinkInlineEditor.vue by removing size attributes from icons.","Updated PopupLayout.vue to use a CSS variable for box-shadow styling.","Refined Snackbar.vue to standardize icon colors and improve styling consistency.","Adjusted useTippy.ts to set default placement and arrow visibility for tooltips.","Modified notificationMessage.ts to remove error messages for list fetching.","Cleaned up notifications.ts by removing console logs for a cleaner codebase.","Updated sortStore.ts to comment out unnecessary console logs for better performance.","Enhanced styles.scss by defining new icon size variables and standardizing box-shadow styles."]},"0.0.99":{date:"2024-06-24",changes:["Fix: resolve issue with incorrect version display in Item Table component.","Update changelog retrieval logic to ensure accurate version matching.","Enhance tooltip display for app version and changelog in Item Table component."]}}},bbe=e=>{var t;return(t=Object.entries(Cbe.changelog).find(([n,s])=>n===e))==null?void 0:t[1].changes},Sbe={key:1},Ebe=Et(ot({__name:"PopupOverwriteScenes",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const s=B(null),o=e,r=()=>{s.value&&s.value.show()},i=B(""),a=B("idle"),l=B({file:null,format:null}),{apiServices:c}=ns(!1,{}),u=B(!1),d=async()=>{u.value=!0;const P=o.workspaceId,E=o.entityId;if(!P||!E||!c.value){console.error("Workspace ID or Entity ID is missing");return}try{if(!await c.value.downloadExportedItemsFile(P,E))throw new Error("No response from downloadTemplate API")}catch(k){console.error("Error downloading template:",k)}u.value=!1},h=n,f=()=>{h("import-success"),S()},p=async P=>{var I,M,O;const E=new FormData,k=((I=P.name.split(".").pop())==null?void 0:I.toString())||"";if(E.append("file",P),E.append("format",k),E.append("entity_id",o.entityId||""),!c.value){console.error("API services not available");return}try{await c.value.overwriteScenesViaImportFile(o.workspaceId,o.entityId,E),g()}catch($){throw console.error("Error uploading file:",$),v(((O=(M=$.response)==null?void 0:M.data)==null?void 0:O.message)||"An unknown error occurred during file upload."),$}},g=()=>{a.value="success"},v=P=>{i.value=P,a.value="error"},C=async()=>{!l.value||!l.value.file||await p(l.value.file)},S=()=>{var P;R(),(P=s.value)==null||P.hide()};t({close:S,open:r});const b=Y(()=>({error:"Import failed",importing:"Import in progress",success:"Import successful",idle:"Update existing work"})[a.value]),w=Y(()=>l.value.file?!1:(console.error("No file selected"),!0)),D=B(null),R=()=>{var P;(P=D.value)==null||P.clear(),i.value="",l.value={file:null,format:null},a.value="idle"},T=Sn("switchInstance"),F=()=>{T?T("xlsx_toolbox","",{showLoad:!1}):window.appManager.switchInstance("xlsx_toolbox","",{showLoad:!1}),console.log("Toolbox opened")};let x;return sn(()=>{x=mN({target:window,allowedOrigins:["https://child.example"],onMessage:(P,E)=>{var I;if(P.type!==kf.SW_APP_LOADER)return;console.log("Received from:",E.origin),console.log("File name:",P.payload.fileName);const k=P.payload.file;(I=D.value)==null||I.setFile(k)},onInvalidMessage:(P,E,k)=>{console.warn("Rejected postMessage:",E,k.origin)}})}),es(()=>{x==null||x()}),(P,E)=>(z(),je(G(jk),{"popup-name":b.value,"show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:s,onHidden:R},nh({default:ge(()=>[a.value==="importing"||a.value==="error"||a.value==="success"?(z(),je(dN,{key:0,state:a.value,"error-message":i.value,overwrite:!0},null,8,["state","error-message"])):(z(),le("div",Sbe,[we("div",{class:J(P.$style["step-section"])},[we("span",{class:J(P.$style["step-title"])},"Step 1: Download current data",2),we("span",{class:J(P.$style["step-description"])},[...E[1]||(E[1]=[tt(" Download a file with all existing work and details. Edit it, then upload in Step 2. ",-1),we("br",null,null,-1),we("i",null,"Note: Empty cells and unchanged values will be skipped.",-1)])],2),we("div",{class:J(P.$style["actions-section"])},[he(G(ct),{class:J(P.$style["download-sample-btn"]),size:12,variant:"secondary",disabled:u.value,onHandleClick:d},{prefix:ge(()=>[he(G(at),{src:"Download"})]),default:ge(()=>[E[2]||(E[2]=tt(" Download file ",-1))]),_:1},8,["class","disabled"]),he(G(ct),{class:J(P.$style["download-sample-btn"]),size:12,variant:"secondary",onHandleClick:F},{default:ge(()=>[...E[3]||(E[3]=[tt(" Toolbox ",-1)])]),_:1},8,["class"])],2)],2),we("div",{class:J(P.$style["step-section"])},[we("span",{class:J(P.$style["step-title"])},"Step 2: Upload updated file (.xlsx, .xls, .csv)",2),he(G(PO),{modelValue:l.value,"onUpdate:modelValue":E[0]||(E[0]=k=>l.value=k),ref_key:"filUploaderRef",ref:D},null,8,["modelValue"])],2),we("div",{class:J(P.$style["step-section"]),style:{"padding-top":"0","padding-bottom":"0"}},[he(hN)],2)]))]),_:2},[a.value==="idle"?{name:"footer",fn:ge(()=>[he(G(ct),{style:{flex:"1"},variant:"secondary",onClick:S},{default:ge(()=>[...E[4]||(E[4]=[tt(" Cancel ",-1)])]),_:1}),he(G(ct),{disabled:w.value,style:{flex:"1"},variant:"primary",onClick:C},{default:ge(()=>[...E[5]||(E[5]=[tt(" Import ",-1)])]),_:1},8,["disabled"])]),key:"0"}:a.value==="success"?{name:"footer",fn:ge(()=>[he(G(ct),{style:{flex:"1"},variant:"primary",onClick:f},{default:ge(()=>[...E[6]||(E[6]=[tt(" Close ",-1)])]),_:1})]),key:"1"}:{name:"footer",fn:ge(()=>[he(G(ct),{style:{flex:"1"},variant:"primary",onClick:R},{default:ge(()=>[...E[7]||(E[7]=[tt(" Try Again ",-1)])]),_:1})]),key:"2"}]),1032,["popup-name"]))}}),[["__cssModules",{$style:{"step-section":"_step-section_1hsaq_1","step-title":"_step-title_1hsaq_11","step-title-2":"_step-title-2_1hsaq_17","step-description":"_step-description_1hsaq_23","date-format-guide":"_date-format-guide_1hsaq_28","import-error":"_import-error_1hsaq_39","drop-area":"_drop-area_1hsaq_49","is-dragging":"_is-dragging_1hsaq_49","drop-area-content":"_drop-area-content_1hsaq_52",browse:"_browse_1hsaq_61","download-sample-btn":"_download-sample-btn_1hsaq_65","actions-section":"_actions-section_1hsaq_69"}}]]),_be=Et(ot({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const n=To,s=Zb(),{setUserPermissions:o,setEntityPermissions:r}=s,{entityPermissions:i}=Qs(s),a=qt,l=B(null),c={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},u=B(""),d=Y(()=>{var Ye;const ke=((Ye=i.value)==null?void 0:Ye.has_create_item_permission)==1||!1;return[{label:"Create manually",value:"new_scene",icon:"Plus",type:"icon",id:"create_new_scene",hide:!ke},{label:"Import from CSV or Excel",value:"import_scenes",icon:"FileImport",type:"icon",hide:!ke,id:"import_scenes_option"},{label:"Update existing (CSV or Excel)",value:"overwrite_scenes",icon:"FilePen",type:"icon",hide:!ke,id:"overwrite_scenes_option"}]}),h=e;Of.initialize({wrapVueCellRenderer:Dv,wrapVueCellEditor:bN});const f=ef(),{switchInstanceFunc:p}=Qs(f);sn(()=>{const ke=ts();p.value=ke==null?void 0:ke.appContext.config.globalProperties.switchInstance;const Ye=new BroadcastChannel("focusable_channel");vt(()=>{setTimeout(()=>{Ye.postMessage("Focusable elements updated")},7e3)})});const g=B(null),v=B([]),C=zm(),{rowCount:S}=Qs(C),b=B(!1),w=B(""),D=B(),R=jA(),{metricList:T}=Qs(R),F=B(""),x=B(!1),P=B(new Set),E=B(new Map),{apiServices:k}=ns(!1,h),{columnDefs:I,checkboxColumn:M,saveColumnConfig:O}=pbe(T,h.entityId,g),$=B();et(()=>I,()=>{var ke;(ke=$.value)==null||ke.updateColumnDefs(I.value)},{deep:!0});const Z=(ke,Ye)=>{O(ke,Ye)},{updateRowData:Q,setMetricValues:se}=vbe(g),ae=Y(()=>({isSearching:w.value.length>0,isFiltering:!(Object.keys(Ae.value||{}).length==1&&Object.keys(Ae.value)[0]=="preflight_status")&&Object.keys(Ae.value||{}).length>0})),ee=Y(dm),V=Y(()=>I.value.filter(ke=>{var Ye;return((Ye=ke.field)==null?void 0:Ye.startsWith("metric_"))&&!ke.hide}).map(ke=>{var Ye;return((Ye=ke.field)==null?void 0:Ye.replace("metric_",""))||""}));Zr("timezone",ee);const W=Y(()=>({autoFetch:!1,workspaceId:h.workspaceId,entityId:h.entityId,metricIds:V.value,updateItemData:Q,setMetricValues:se})),{fetchItems:te,getMetricList:pe,cusorMap:ve,getMetricValues:re}=mbe(W),ie=Y(()=>{if(!g.value)return!1;const ke=g.value.getSelectedRows().length;return ke>0&&ke>=S.value.total}),j=Y(()=>{var ke;return((ke=l.value)==null?void 0:ke.name)||"Items"}),me=ke=>{setTimeout(()=>{vt(()=>{var Ye,Qt;g.value&&(ke?(Ye=g.value)==null||Ye.showNoRowsOverlay():(Qt=g.value)==null||Qt.hideOverlay())})},500)},oe=(ke,Ye)=>{var Qt;S.value.total=ke.meta.total??0,(Qt=ke.meta.next)!=null&&Qt.cursor&&(ve[Ye+1]=ke.meta.next.cursor),F.value=ke.meta["X-Tsr-signature"]||"",ke.meta.total===0?me(!0):me(!1)},Se=FO(),U=B(null),{sortingAPIConfiguration:K,isSortingRunning:ue}=Qs(Se),Ae=B({preflight_status:"1"}),Fe=Y(()=>({...Ae.value,search:w.value}));Zr("filterParams",Fe);const Le=B([]),ye=async({page:ke,pageSize:Ye,filterText:Qt})=>{var Go;(Go=g.value)==null||Go.hideOverlay();const Zt=ve[ke],Co=!Zt&&ke>1?(ke-1)*Ye:void 0,wa=K.value;wa.length>0&&(ue.value=!0);try{const Ca={cursor:Zt,size:Ye,searchQuery:Qt,offset:Co,sort_by:wa,...Ae.value},oo=await te(Ca);if(!oo)return{rows:[],total:0};const yp=(Kn=>{const Ai=Kn.data.map(bo=>FF(bo,ee.value));return Ai.forEach(bo=>{P.value.add(String(bo.id)),E.value.set(String(bo.id),{})}),Ai})(oo);return oe(oo,ke),{rows:yp,total:S.value.total}}catch(Ca){return console.error("Failed to fetch items:",Ca),{rows:[],total:0}}finally{ue.value=!1}},{isLoading:N,toggleSidebar:H,onGridReady:ce,handleUnSelect:Ge,handleSelectAll:Ce,onSearch:ze,firstLoad:Ue}=wbe({selectRowData:B([]),isSidebarOpen:b,quickFilterText:w,gridApi:g,perPage:c.ROWS_PER_PAGE,fetcher:ye}),_e=B([]),Ve=()=>{var ke;_e.value=((ke=g.value)==null?void 0:ke.getSelectedRows())||[]},gt=lo({columnsDisplay:[],rowsDisplay:{fromIndex:0,toIndex:0}}),kt=Y(()=>({blockLoadDebounceMillis:1e3,columnDefs:I.value,rowModelType:"infinite",cacheBlockSize:c.ROWS_PER_PAGE,infiniteInitialRowCount:20,popupParent:document.getElementById("item-table-layout-id")||void 0,rowSelection:{mode:"multiRow",checkboxes:!1,enableClickSelection:!1,enableSelectionWithoutKeys:!1},pagination:!1,rowHeight:c.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:c.GRID_HEIGHT,stopEditingWhenCellsLoseFocus:!0,onModelUpdated:Ut,noRowsOverlayComponent:Dv(oee),noRowsOverlayComponentParams:()=>ae.value,defaultColDef:{editable:!1,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:ke=>ke.data.id,getRowClass:ke=>{if(!ke.data)return["row-empty"];const Ye=["row-highlight"];return ke.data.id||Ye.push("row-inactive"),ke.data.isDeleted&&Ye.push("row-deleted"),ke.data.disabled&&Ye.push("row-deleted"),ke.data.isArchived&&Ye.push("row-archived"),ke.data.isLocked&&Ye.push("row-locked"),Ye},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:h.workspaceId,entityId:h.entityId,apiServices:k.value,sorting:ue.value},onCellKeyDown:ke=>{var Ye,Qt,Zt;if(ke.data.isDeleted)return!1;if(((Ye=ke==null?void 0:ke.event)==null?void 0:Ye.key)==="Enter"){const{api:Co,node:wa,column:Go}=ke,Ca=Co.getCellRendererInstances({rowNodes:[wa],columns:[Go]});if(Ca.length>0){const oo=Ca[0];oo&&typeof((Qt=oo.componsenExposed)==null?void 0:Qt.focus)=="function"&&((Zt=oo.componsenExposed)==null||Zt.focus())}}},isRowSelectable:ke=>!ke.group,suppressKeyboardEvent:ke=>{var Zt;if((Zt=ke.data)!=null&&Zt.isDeleted)return!0;const Ye=ke.event.key,Qt=ke.editing;return Qt&&Ye==="Tab"?!0:Qt&&Ye==="Enter"?!1:Ye==="Enter"?(ke.event.preventDefault(),ke.event.stopPropagation(),!0):Ye==="ArrowUp"||Ye==="ArrowDown"||Ye==="ArrowLeft"||Ye==="ArrowRight"||Ye==="Tab"||Ye==="Enter"},navigateToNextCell:()=>null,onBodyScroll:ke=>{const Ye=ke.api.getFirstDisplayedRowIndex(),Qt=ke.api.getLastDisplayedRowIndex();gt.rowsDisplay.fromIndex=Ye,gt.rowsDisplay.toIndex=Qt,gt.columnsDisplay=ke.api.getAllDisplayedVirtualColumns().map(Zt=>Zt.getColId())},onViewportChanged:ke=>{gt.columnsDisplay=ke.api.getAllDisplayedVirtualColumns().map(Ye=>Ye.getColId())},suppressHeaderFocus:!0,onCellEditingStarted(ke){if(ke.data.isDeleted&&ke.api.stopEditing(),ke.colDef.field=="options"){const Ye=ke.api.getCellRendererInstances({rowNodes:[ke.node],columns:[ke.column]});Ye.length>0&&Ye[0].focusUi()}},tabToNextCell:ke=>{let Ye=ke.nextCellPosition;if(Ye&&Ye.column.getColId()==="ag-Grid-SelectionColumn"){const Qt=ke.api.getAllDisplayedColumns(),Zt=Qt.indexOf(Ye.column),Co=ke.backwards?-1:1,wa=Qt[Zt+Co];if(wa)return{rowIndex:Ye.rowIndex,column:wa,rowPinned:Ye.rowPinned}}return Ye}}));function Ut(){if(!g.value)return;let ke=0;g.value.forEachNode(Ye=>{Ye.data&&ke++}),S.value.loaded=Math.min(ke,S.value.total)}et(()=>K,()=>{g.value&&(F.value="",P.value.clear(),g.value.deselectAll(),Object.keys(ve).forEach(ke=>delete ve[Number(ke)]),g.value.purgeInfiniteCache(),g.value.ensureIndexVisible(0))},{deep:!0});const en=B(),zt=B(),Ne=()=>{var ke;(ke=zt.value)==null||ke.open()},qe=()=>{var ke;(ke=en.value)==null||ke.open()},wt=async()=>{Ue.value=!0,g.value&&(F.value="",P.value.clear(),Object.keys(ve).forEach(ke=>delete ve[Number(ke)]),await g.value.deselectAll(),await g.value.ensureIndexVisible(0,"top"),await g.value.purgeInfiniteCache(),await g.value.refreshInfiniteCache())},Nt=Y(()=>un.getInstance().getItem("ITEM_TABLE_APP_VERSION")||""),Wt=B();Y(()=>{var ke;return(ke=bbe(Nt.value))==null?void 0:ke.map(Ye=>`<div>• ${Ye}</div>`).join(`
|
|
260
|
-
`)});function st(ke){var Ye;ke==="new_scene"?(Ye=Wt.value)==null||Ye.show():ke==="import_scenes"?qe():ke==="overwrite_scenes"&&Ne()}const Is=ke=>{v.value=ke.api.getSelectedRows().map(Ye=>Ye.id)},Ur=ke=>{const Ye=ce(ke);return Ye&&(Ye.addEventListener("modelUpdated",Ut),Ye.addEventListener("bodyScroll",()=>Ye.stopEditing()),Ye.addEventListener("selectionChanged",Ve),Ye.addEventListener("columnMoved",Zt=>Z(Zt,!0)),Ye.addEventListener("columnResized",Zt=>Z(Zt,!0)),Ye.addEventListener("firstDataRendered",()=>{Ue.value=!1}),!document.querySelector(".ag-body-viewport"))||ke==null||ke.setColumnsVisible(["ag-Grid-SelectionColumn"],!1),Ye},xi=()=>{var ke;u.value=(((ke=document.getElementById("item-table-layout-id"))==null?void 0:ke.clientHeight)??0)-78+"px"};sn(()=>{vt(()=>{xi()}),window.addEventListener("resize",xi);function ke(){requestAnimationFrame(ke)}ke()}),es(()=>{window.removeEventListener("resize",xi)});const gr=async({code:ke,name:Ye})=>{await ze(ke),setTimeout(()=>{var Qt;(Qt=D.value)==null||Qt.setValue(Ye)},300)},ya=ke=>{if(!g.value)return;const Ye=g.value.getRowNode(ke);Ye?(g.value.ensureIndexVisible(Number(Ye.rowIndex),"middle"),g.value.flashCells({rowNodes:[Ye],flashDuration:3e3,fadeDuration:1e3})):g.value.ensureIndexVisible(S.value.total-1,"bottom")},ml=ke=>ke.metric_type.code==="number"?"number":"default",Fi=async()=>{if(h.entityId)try{const ke=await pe(h.entityId);T.value=ke.data.map(Ye=>({...Ye,sortType:ml(Ye)}))}catch(ke){console.error("Failed to initialize metric list:",ke),T.value=[]}},Pi=async()=>{if(k.value)try{const ke=await k.value.getUserPermission(h.workspaceId);o(ke)}catch(ke){console.error("Failed to fetch user permissions:",ke)}},mr=async()=>{if(k.value)try{const ke=await k.value.getEntityDetail(h.workspaceId,h.entityId);r(ke.permission),l.value=ke}catch(ke){console.error("Failed to fetch entity details:",ke)}},Wr=fv(),{setUser:Pd}=Wr,kn=async()=>{if(k.value)try{const ke=await k.value.getMe();return Pd(ke),ke}catch(ke){console.error("Failed to fetch user details:",ke)}},ps=async()=>{var ke;if(k.value)try{const Ye=await k.value.getWorkspaces(h.workspaceId),Qt=(ke=Ye.data[0])==null?void 0:ke.ws_user_role_id;return Qt&&Wr.setUserRoleId(Qt),Ye}catch(Ye){console.error("Failed to fetch workspace details:",Ye)}};et(()=>[h.entityId,h.workspaceId],async([ke,Ye])=>{!ke||!Ye||(kn(),ps(),Fi(),Pi(),mr())},{immediate:!0,deep:!0}),et(V,(ke,Ye)=>{const Qt=ke.filter(Zt=>!(Ye!=null&&Ye.includes(Zt)));Qt.length>0&&re(Array.from(P.value),Qt).then(Zt=>{se(Zt,P.value,Qt)})},{immediate:!0,deep:!0}),et(F,(ke,Ye)=>{x.value=!!(Ye&&ke&&Ye!==ke)}),t({refreshTable:wt});const E_=ke=>{Ae.value=ke,wt()},Ad=ke=>{Le.value=ke,wt()},kd=ke=>{I.value=ke||[],Z({},!0)},Od=Y(()=>{var Zt;const ke=un.getInstance().getItem("ws.terminology"),Ye=ke?JSON.parse(ke):null;return`New ${((Zt=Ye==null?void 0:Ye.find(Co=>Co.code==="scene"))==null?void 0:Zt.name)||"Scene"}`});return B('<p><br>Here is template notess..</p><p><strong>this is Bold</strong>,<i> this is Italic</i>,<u> this is underline</u><br>this is hightlight , <br>1</p><p>1</p><ul class="todo-list"><li data-list-item-id="ed7bc572523bb0f35972903183a9d7346"><input type="checkbox" disabled="disabled"><span class="todo-list__label__description">1</span></li><li data-list-item-id="ef5b3e469bed2b79951b489fd3a25ffaa"><input type="checkbox" disabled="disabled"><span class="todo-list__label__description">2</span></li><li data-list-item-id="ed25bcd78b8b608ed432f01164608cb0d"><input type="checkbox" disabled="disabled"><span class="todo-list__label__description">3</span></li><li data-list-item-id="e05c8f5e183d4de144c2a6a8059691d5f"><input type="checkbox" disabled="disabled"><span class="todo-list__label__description">4</span></li></ul><p>This is list</p><ul><li data-list-item-id="ed6b9c0b0b97baf09030ee79ea57c40a9">1</li><li data-list-item-id="ef1fc34bceeb4a82abc8c61fe28972c9b">2</li><li data-list-item-id="e950cf66600b9cc40f130a396a6831a75">3</li><li data-list-item-id="e64b6e87f244f9268e45b32b785308a6e">4</li></ul><p> </p>'),(ke,Ye)=>{const Qt=Eo("focusable");return z(),je(G(pJ),{"is-sidebar-open":b.value,onCloseSidebar:G(H),onSidebarClear:G(H),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:G(H)},{"header-left":ge(()=>{var Zt;return[((Zt=G(i))==null?void 0:Zt.has_create_item_permission)==1?(z(),je(G(mS),{key:0,variant:["primary"],options:d.value,onSelect:st,onHandleClick:Ye[1]||(Ye[1]=Co=>st("new_scene")),id:"create_scene_dropdown",tabIndex:2},{prefix:ge(()=>[Ke(he(G(ct),{"data-focus-index":"1",id:"create_new_scene",variant:["primary"],onClick:Ye[0]||(Ye[0]=Co=>st("new_scene")),label:Od.value},null,8,["label"]),[[Qt,1]])]),_:1},8,["options"])):Ze("",!0)]}),"header-actions":ge(()=>[he(G(Hee),{"onUpdate:assignees":Ad,onApplyFilter:E_,loading:G(Ue),entityId:h.entityId},null,8,["loading","entityId"]),Ke(he(G(sS),{focusIndex:"4",modelValue:w.value,"onUpdate:modelValue":Ye[2]||(Ye[2]=Zt=>w.value=Zt),onSearch:G(ze),class:J(ke.$style.itemSearchBox),onClear:Ye[3]||(Ye[3]=Zt=>G(ze)("")),id:"item_search_box",ref_key:"searchBoxRef",ref:D},null,8,["modelValue","onSearch","class"]),[[G(n),{isLoading:G(Ue),fullwidth:!0}]]),Ke((z(),je(G($A),{status:G(N)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":x.value},{default:ge(()=>[Ke((z(),je(G(ct),{variant:["secondary","icon"],disabled:G(N),onClick:wt},{default:ge(()=>[he(G(at),{src:"ArrowsRotate"})]),_:1},8,["disabled"])),[[Qt,5],[G(a),"Refresh"]])]),_:1},8,["status","show-badge"])),[[G(n),{isLoading:G(Ue),fullwidth:!0}]]),Ke(he(G($Q),{"model-value":G(I),onChange:Ye[4]||(Ye[4]=Zt=>kd(Zt)),id:"table_customization",gridApi:g.value,ref_key:"tableCustomizationRef",ref:$,"checkbox-column":G(M),tableHeight:u.value},null,8,["model-value","gridApi","checkbox-column","tableHeight"]),[[G(n),{isLoading:G(Ue),fullwidth:!0}]])]),grid:ge(({availableHeight:Zt})=>[he(G(ube),Kt({id:"item_table_main",ref_key:"agGrid",ref:U},kt.value,{height:Zt+"px",isSorting:G(ue),onOnGridReady:Ur,onSelectionChanged:Is}),null,16,["height","isSorting"])]),footer:ge(()=>[we("div",{class:J(ke.$style.tableFooter),id:"table_footer"},[we("span",null,[Ye[5]||(Ye[5]=tt(" Showing ",-1)),we("b",null,Ct(G(S).loaded)+" of "+Ct(G(S).total),1)])],2)]),"new-row":ge(()=>[he(G(vee),{ref_key:"createNewSceneRef",ref:Wt,onSearchForCode:gr,onFocusOnId:ya},null,512)]),"bulk-update-actions":ge(()=>[!b.value&&v.value.length>0?Ke((z(),je(G(iJ),{key:0,selectRowData:_e.value,"workspace-id":h.workspaceId,"entity-id":h.entityId,"grid-api":g.value,onUnselect:G(Ge),onSelectAll:G(Ce),"take-name":j.value,"selected-all":ie.value,"total-rows":G(S).total,"visible-rows":G(S).loaded,onUpdated:Ve,loading:G(N)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","onSelectAll","take-name","selected-all","total-rows","visible-rows","loading"])),[[Ko,!b.value&&v.value.length>0]]):Ze("",!0)]),snackbar:ge(()=>[he(G(YJ))]),popup:ge(()=>[he(Use,{ref_key:"popupCreateSceneRef",ref:en,"workspace-id":h.workspaceId,"entity-id":h.entityId,onImportSuccess:wt},null,8,["workspace-id","entity-id"]),he(Ebe,{ref_key:"popupOverwriteScenesRef",ref:zt,"workspace-id":h.workspaceId,"entity-id":h.entityId,onImportSuccess:wt},null,8,["workspace-id","entity-id"])]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"])}}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_1sow5_1",tableFooter:"_tableFooter_1sow5_7",footerStart:"_footerStart_1sow5_17",newRow:"_newRow_1sow5_25","warning-text":"_warning-text_1sow5_43","has-error":"_has-error_1sow5_48",itemSearchBox:"_itemSearchBox_1sow5_52","beta-tag":"_beta-tag_1sow5_56"}}]]),UB="0.1.135",Rbe={key:0},Dbe=Et(ot({__name:"app",setup(e){const t=Y(()=>n.id.length===0||n.workspaceId.length===0),n=lo({id:"",workspaceId:"",apiConfig:{}}),s=gf(),{showMessage:o,showErrorNetMessage:r}=s,i=["basicInfor"],a=h=>{h.success?o(h.apiCode,"success"):i.includes(h.apiCode)||r(h)},l=B(null),c=()=>{const h=un.getInstance().getItem("API_BASE_URL");return h!=null&&h.includes("v1")?h.slice(0,h.lastIndexOf("/v1")):String(h)};eh(()=>{var h,f,p;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",UB);try{if(l.value=ts(),!l.value)throw new Error("Current instance is null");n.id=((h=l.value)==null?void 0:h.appContext.config.globalProperties.id)||"",n.workspaceId=((f=l.value)==null?void 0:f.appContext.config.globalProperties.workspaceId)||un.getInstance().getItem("ws.code");const g={domainApi:c(),wsCode:un.getInstance().getItem("ws.code"),entityId:n.id};if(n.apiConfig=(p=l.value)==null?void 0:p.appContext.config.globalProperties.apiConfig,!g.entityId||!g.wsCode||!g.domainApi)throw new Error("API configuration is missing in dashboardConfig");const v=new Vk(n.apiConfig,g);v.on("call-api",a),l.value.appContext.config.globalProperties.apiServices=v}catch(g){console.error("Error getting current instance:",g)}}),es(()=>{l.value.appContext.config.globalProperties.apiServices.off("call-api",a)});const u=Y(()=>n.id),d=Y(()=>n.workspaceId);return Zr("workspaceId",d),Zr("entityId",u),(h,f)=>(z(),le("div",{class:J(h.$style.dashboardPluginWrapper)},[t.value?(z(),le("span",Rbe," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):u.value?(z(),je(G(_be),{key:1,entityId:u.value,workspaceId:d.value},null,8,["entityId","workspaceId"])):Ze("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),S_=async(e={},t={})=>{const n=_T(Dbe),s=vY();n.use(s);const o=["apiConfig","workspaceId","id"],r={};Object.entries(e).forEach(([a,l])=>{l!==void 0&&(n.config.globalProperties[a]=l,r[a]=l,o.includes(a)&&typeof l=="string"?sessionStorage.setItem(a,l):console.error(`[Config Error] Key "${a}" has an invalid value and will not be persisted.`))}),n.config.globalProperties.$arboConfig=r,Object.values(t).forEach(a=>{a&&typeof a.install=="function"&&n.use(a)}),n.config.errorHandler=(a,l,c)=>{console.error("[Vue Error]",a),c&&console.error("[Info]",c)},console.log(`%cArbo Dashboard Plugin v${UB}`,"color: #4CAF50; font-weight: bold;"),console.log(n.config.globalProperties),globalThis.window.$switchInstance=n.config.globalProperties.switchInstance,n.provide("switchInstance",n.config.globalProperties.switchInstance),n.directive("tooltip",qt),n.directive("focusable",Wi);const i=await Pse();return n.use(i),n};globalThis.window!==void 0&&(globalThis.window.arboDashboard=S_),On.default=S_,On.initDashboard=S_,Object.defineProperties(On,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
260
|
+
`)});function st(ke){var Ye;ke==="new_scene"?(Ye=Wt.value)==null||Ye.show():ke==="import_scenes"?qe():ke==="overwrite_scenes"&&Ne()}const Is=ke=>{v.value=ke.api.getSelectedRows().map(Ye=>Ye.id)},Ur=ke=>{const Ye=ce(ke);return Ye&&(Ye.addEventListener("modelUpdated",Ut),Ye.addEventListener("bodyScroll",()=>Ye.stopEditing()),Ye.addEventListener("selectionChanged",Ve),Ye.addEventListener("columnMoved",Zt=>Z(Zt,!0)),Ye.addEventListener("columnResized",Zt=>Z(Zt,!0)),Ye.addEventListener("firstDataRendered",()=>{Ue.value=!1}),!document.querySelector(".ag-body-viewport"))||ke==null||ke.setColumnsVisible(["ag-Grid-SelectionColumn"],!1),Ye},xi=()=>{var ke;u.value=(((ke=document.getElementById("item-table-layout-id"))==null?void 0:ke.clientHeight)??0)-78+"px"};sn(()=>{vt(()=>{xi()}),window.addEventListener("resize",xi);function ke(){requestAnimationFrame(ke)}ke()}),es(()=>{window.removeEventListener("resize",xi)});const gr=async({code:ke,name:Ye})=>{await ze(ke),setTimeout(()=>{var Qt;(Qt=D.value)==null||Qt.setValue(Ye)},300)},ya=ke=>{if(!g.value)return;const Ye=g.value.getRowNode(ke);Ye?(g.value.ensureIndexVisible(Number(Ye.rowIndex),"middle"),g.value.flashCells({rowNodes:[Ye],flashDuration:3e3,fadeDuration:1e3})):g.value.ensureIndexVisible(S.value.total-1,"bottom")},ml=ke=>ke.metric_type.code==="number"?"number":"default",Fi=async()=>{if(h.entityId)try{const ke=await pe(h.entityId);T.value=ke.data.map(Ye=>({...Ye,sortType:ml(Ye)}))}catch(ke){console.error("Failed to initialize metric list:",ke),T.value=[]}},Pi=async()=>{if(k.value)try{const ke=await k.value.getUserPermission(h.workspaceId);o(ke)}catch(ke){console.error("Failed to fetch user permissions:",ke)}},mr=async()=>{if(k.value)try{const ke=await k.value.getEntityDetail(h.workspaceId,h.entityId);r(ke.permission),l.value=ke}catch(ke){console.error("Failed to fetch entity details:",ke)}},Wr=fv(),{setUser:Pd}=Wr,kn=async()=>{if(k.value)try{const ke=await k.value.getMe();return Pd(ke),ke}catch(ke){console.error("Failed to fetch user details:",ke)}},ps=async()=>{var ke;if(k.value)try{const Ye=await k.value.getWorkspaces(h.workspaceId),Qt=(ke=Ye.data[0])==null?void 0:ke.ws_user_role_id;return Qt&&Wr.setUserRoleId(Qt),Ye}catch(Ye){console.error("Failed to fetch workspace details:",Ye)}};et(()=>[h.entityId,h.workspaceId],async([ke,Ye])=>{!ke||!Ye||(kn(),ps(),Fi(),Pi(),mr())},{immediate:!0,deep:!0}),et(V,(ke,Ye)=>{const Qt=ke.filter(Zt=>!(Ye!=null&&Ye.includes(Zt)));Qt.length>0&&re(Array.from(P.value),Qt).then(Zt=>{se(Zt,P.value,Qt)})},{immediate:!0,deep:!0}),et(F,(ke,Ye)=>{x.value=!!(Ye&&ke&&Ye!==ke)}),t({refreshTable:wt});const E_=ke=>{Ae.value=ke,wt()},Ad=ke=>{Le.value=ke,wt()},kd=ke=>{I.value=ke||[],Z({},!0)},Od=Y(()=>{var Zt;const ke=un.getInstance().getItem("ws.terminology"),Ye=ke?JSON.parse(ke):null;return`New ${((Zt=Ye==null?void 0:Ye.find(Co=>Co.code==="scene"))==null?void 0:Zt.name)||"Scene"}`});return B('<p><br>Here is template notess..</p><p><strong>this is Bold</strong>,<i> this is Italic</i>,<u> this is underline</u><br>this is hightlight , <br>1</p><p>1</p><ul class="todo-list"><li data-list-item-id="ed7bc572523bb0f35972903183a9d7346"><input type="checkbox" disabled="disabled"><span class="todo-list__label__description">1</span></li><li data-list-item-id="ef5b3e469bed2b79951b489fd3a25ffaa"><input type="checkbox" disabled="disabled"><span class="todo-list__label__description">2</span></li><li data-list-item-id="ed25bcd78b8b608ed432f01164608cb0d"><input type="checkbox" disabled="disabled"><span class="todo-list__label__description">3</span></li><li data-list-item-id="e05c8f5e183d4de144c2a6a8059691d5f"><input type="checkbox" disabled="disabled"><span class="todo-list__label__description">4</span></li></ul><p>This is list</p><ul><li data-list-item-id="ed6b9c0b0b97baf09030ee79ea57c40a9">1</li><li data-list-item-id="ef1fc34bceeb4a82abc8c61fe28972c9b">2</li><li data-list-item-id="e950cf66600b9cc40f130a396a6831a75">3</li><li data-list-item-id="e64b6e87f244f9268e45b32b785308a6e">4</li></ul><p> </p>'),(ke,Ye)=>{const Qt=Eo("focusable");return z(),je(G(pJ),{"is-sidebar-open":b.value,onCloseSidebar:G(H),onSidebarClear:G(H),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:G(H)},{"header-left":ge(()=>{var Zt;return[((Zt=G(i))==null?void 0:Zt.has_create_item_permission)==1?(z(),je(G(mS),{key:0,variant:["primary"],options:d.value,onSelect:st,onHandleClick:Ye[1]||(Ye[1]=Co=>st("new_scene")),id:"create_scene_dropdown",tabIndex:2},{prefix:ge(()=>[Ke(he(G(ct),{"data-focus-index":"1",id:"create_new_scene",variant:["primary"],onClick:Ye[0]||(Ye[0]=Co=>st("new_scene")),label:Od.value},null,8,["label"]),[[Qt,1]])]),_:1},8,["options"])):Ze("",!0)]}),"header-actions":ge(()=>[he(G(Hee),{"onUpdate:assignees":Ad,onApplyFilter:E_,loading:G(Ue),entityId:h.entityId},null,8,["loading","entityId"]),Ke(he(G(sS),{focusIndex:"4",modelValue:w.value,"onUpdate:modelValue":Ye[2]||(Ye[2]=Zt=>w.value=Zt),onSearch:G(ze),class:J(ke.$style.itemSearchBox),onClear:Ye[3]||(Ye[3]=Zt=>G(ze)("")),id:"item_search_box",ref_key:"searchBoxRef",ref:D},null,8,["modelValue","onSearch","class"]),[[G(n),{isLoading:G(Ue),fullwidth:!0}]]),Ke((z(),je(G($A),{status:G(N)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":x.value},{default:ge(()=>[Ke((z(),je(G(ct),{variant:["secondary","icon"],disabled:G(N),onClick:wt},{default:ge(()=>[he(G(at),{src:"ArrowsRotate"})]),_:1},8,["disabled"])),[[Qt,5],[G(a),"Refresh"]])]),_:1},8,["status","show-badge"])),[[G(n),{isLoading:G(Ue),fullwidth:!0}]]),Ke(he(G($Q),{"model-value":G(I),onChange:Ye[4]||(Ye[4]=Zt=>kd(Zt)),id:"table_customization",gridApi:g.value,ref_key:"tableCustomizationRef",ref:$,"checkbox-column":G(M),tableHeight:u.value},null,8,["model-value","gridApi","checkbox-column","tableHeight"]),[[G(n),{isLoading:G(Ue),fullwidth:!0}]])]),grid:ge(({availableHeight:Zt})=>[he(G(ube),Kt({id:"item_table_main",ref_key:"agGrid",ref:U},kt.value,{height:Zt+"px",isSorting:G(ue),onOnGridReady:Ur,onSelectionChanged:Is}),null,16,["height","isSorting"])]),footer:ge(()=>[we("div",{class:J(ke.$style.tableFooter),id:"table_footer"},[we("span",null,[Ye[5]||(Ye[5]=tt(" Showing ",-1)),we("b",null,Ct(G(S).loaded)+" of "+Ct(G(S).total),1)])],2)]),"new-row":ge(()=>[he(G(vee),{ref_key:"createNewSceneRef",ref:Wt,onSearchForCode:gr,onFocusOnId:ya},null,512)]),"bulk-update-actions":ge(()=>[!b.value&&v.value.length>0?Ke((z(),je(G(iJ),{key:0,selectRowData:_e.value,"workspace-id":h.workspaceId,"entity-id":h.entityId,"grid-api":g.value,onUnselect:G(Ge),onSelectAll:G(Ce),"take-name":j.value,"selected-all":ie.value,"total-rows":G(S).total,"visible-rows":G(S).loaded,onUpdated:Ve,loading:G(N)},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","onSelectAll","take-name","selected-all","total-rows","visible-rows","loading"])),[[Ko,!b.value&&v.value.length>0]]):Ze("",!0)]),snackbar:ge(()=>[he(G(YJ))]),popup:ge(()=>[he(Use,{ref_key:"popupCreateSceneRef",ref:en,"workspace-id":h.workspaceId,"entity-id":h.entityId,onImportSuccess:wt},null,8,["workspace-id","entity-id"]),he(Ebe,{ref_key:"popupOverwriteScenesRef",ref:zt,"workspace-id":h.workspaceId,"entity-id":h.entityId,onImportSuccess:wt},null,8,["workspace-id","entity-id"])]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"])}}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_1sow5_1",tableFooter:"_tableFooter_1sow5_7",footerStart:"_footerStart_1sow5_17",newRow:"_newRow_1sow5_25","warning-text":"_warning-text_1sow5_43","has-error":"_has-error_1sow5_48",itemSearchBox:"_itemSearchBox_1sow5_52","beta-tag":"_beta-tag_1sow5_56"}}]]),UB="0.1.136",Rbe={key:0},Dbe=Et(ot({__name:"app",setup(e){const t=Y(()=>n.id.length===0||n.workspaceId.length===0),n=lo({id:"",workspaceId:"",apiConfig:{}}),s=gf(),{showMessage:o,showErrorNetMessage:r}=s,i=["basicInfor"],a=h=>{h.success?o(h.apiCode,"success"):i.includes(h.apiCode)||r(h)},l=B(null),c=()=>{const h=un.getInstance().getItem("API_BASE_URL");return h!=null&&h.includes("v1")?h.slice(0,h.lastIndexOf("/v1")):String(h)};eh(()=>{var h,f,p;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",UB);try{if(l.value=ts(),!l.value)throw new Error("Current instance is null");n.id=((h=l.value)==null?void 0:h.appContext.config.globalProperties.id)||"",n.workspaceId=((f=l.value)==null?void 0:f.appContext.config.globalProperties.workspaceId)||un.getInstance().getItem("ws.code");const g={domainApi:c(),wsCode:un.getInstance().getItem("ws.code"),entityId:n.id};if(n.apiConfig=(p=l.value)==null?void 0:p.appContext.config.globalProperties.apiConfig,!g.entityId||!g.wsCode||!g.domainApi)throw new Error("API configuration is missing in dashboardConfig");const v=new Vk(n.apiConfig,g);v.on("call-api",a),l.value.appContext.config.globalProperties.apiServices=v}catch(g){console.error("Error getting current instance:",g)}}),es(()=>{l.value.appContext.config.globalProperties.apiServices.off("call-api",a)});const u=Y(()=>n.id),d=Y(()=>n.workspaceId);return Zr("workspaceId",d),Zr("entityId",u),(h,f)=>(z(),le("div",{class:J(h.$style.dashboardPluginWrapper)},[t.value?(z(),le("span",Rbe," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):u.value?(z(),je(G(_be),{key:1,entityId:u.value,workspaceId:d.value},null,8,["entityId","workspaceId"])):Ze("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),S_=async(e={},t={})=>{const n=_T(Dbe),s=vY();n.use(s);const o=["apiConfig","workspaceId","id"],r={};Object.entries(e).forEach(([a,l])=>{l!==void 0&&(n.config.globalProperties[a]=l,r[a]=l,o.includes(a)&&typeof l=="string"?sessionStorage.setItem(a,l):console.error(`[Config Error] Key "${a}" has an invalid value and will not be persisted.`))}),n.config.globalProperties.$arboConfig=r,Object.values(t).forEach(a=>{a&&typeof a.install=="function"&&n.use(a)}),n.config.errorHandler=(a,l,c)=>{console.error("[Vue Error]",a),c&&console.error("[Info]",c)},console.log(`%cArbo Dashboard Plugin v${UB}`,"color: #4CAF50; font-weight: bold;"),console.log(n.config.globalProperties),globalThis.window.$switchInstance=n.config.globalProperties.switchInstance,n.provide("switchInstance",n.config.globalProperties.switchInstance),n.directive("tooltip",qt),n.directive("focusable",Wi);const i=await Pse();return n.use(i),n};globalThis.window!==void 0&&(globalThis.window.arboDashboard=S_),On.default=S_,On.initDashboard=S_,Object.defineProperties(On,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|