@platforma-sdk/ui-vue 1.6.0 → 1.7.1
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/CHANGELOG.md +13 -0
- package/dist/lib.js +8 -4
- package/dist/lib.umd.cjs +1 -1
- package/dist/src/internal/createAppModel.d.ts +4 -1
- package/dist/src/internal/createAppModel.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/internal/createAppModel.ts +7 -6
package/dist/lib.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(W,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(W=typeof globalThis<"u"?globalThis:W||self,l(W.SdkVueLib={},W.Vue))})(this,function(W,l){"use strict";var q5=Object.defineProperty;var py=W=>{throw TypeError(W)};var Y5=(W,l,ft)=>l in W?q5(W,l,{enumerable:!0,configurable:!0,writable:!0,value:ft}):W[l]=ft;var Ye=(W,l,ft)=>Y5(W,typeof l!="symbol"?l+"":l,ft),dg=(W,l,ft)=>l.has(W)||py("Cannot "+ft);var P=(W,l,ft)=>(dg(W,l,"read from private field"),ft?ft.call(W):l.get(W)),je=(W,l,ft)=>l.has(W)?py("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(W):l.set(W,ft),we=(W,l,ft,wo)=>(dg(W,l,"write to private field"),wo?wo.call(W,ft):l.set(W,ft),ft),de=(W,l,ft)=>(dg(W,l,"access private method"),ft);var ld=(W,l,ft,wo)=>({set _(Bi){we(W,l,Bi,ft)},get _(){return P(W,l,wo)}});var Iv,Xo,Lv,_v,Qi,gi,Xi,Ji,Jo,er,St,es,wt,nt,xe,qt,fi,Bt,xt,ts,Pt,is,ss,mi,ns,Sn,Yt,te,pg,so,Ns,Dl,Ci,Ry,no,tr,Tl,kn,In,gg,cd,dd,rt,fg,Jl,Ln,mg;function ft(e,t){if(e==null)throw Error(t??"Empty (null | undefined) value");return e}function wo(e){return e!==null&&typeof e=="object"}function Bi(e){if(Array.isArray(e)){const t=[];for(let i=0;i<e.length;i++)t[i]=Bi(e[i]);return t}else if(wo(e)){const t={};return Object.keys(e).forEach(i=>{t[i]=Bi(e[i])}),t}else return e}function ud(e,t,i=!0){let s=0,n;return function(...o){n=()=>{e.apply(this,o),s=new Date().getTime()+t,n=null,i&&setTimeout(()=>{n&&n()},t)},new Date().getTime()>s&&n()}}function Fy(e){let t=0n,i;return async function(...s){const n=++t;try{await i}catch{}if(t!==n)return{ok:!1};const o=e(...s);return i=o,{ok:!0,value:await o}}}var vr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ey(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xy=function e(t){if(typeof t=="number"&&isNaN(t))throw new Error("NaN is not allowed");if(typeof t=="number"&&!isFinite(t))throw new Error("Infinity is not allowed");return t===null||typeof t!="object"?JSON.stringify(t):t.toJSON instanceof Function?e(t.toJSON()):Array.isArray(t)?`[${t.reduce((n,o,r)=>`${n}${r===0?"":","}${e(o===void 0||typeof o=="symbol"?null:o)}`,"")}]`:`{${Object.keys(t).sort().reduce((s,n)=>{if(t[n]===void 0||typeof t[n]=="symbol")return s;const o=s.length===0?"":",";return`${s}${o}${e(n)}:${e(t[n])}`},"")}}`};const wr=Ey(xy);class hd extends Error{}class pd extends Error{constructor(t){super(),this.errors=t}toString(){return this.errors.join(",")}}function Py(e){return{ok:!0,value:e}}function Cg(e){if(!e)throw new hd;if(!e.ok)throw Error(e.errors.join(";"));return e.value}function vg(e){return{value:e,errors:void 0}}function Dy(e){if(e.errors)throw new pd(e.errors);if(!e.value)throw new hd;return e.value}function Ty(e){return e!==void 0}function gd(e,t){return wr(e)===wr(t)}const fd=e=>e,md=e=>e instanceof Error?e:Error(String(e)),Cd=e=>e.name==="ZodError",vd=e=>{const{formErrors:t,fieldErrors:i}=e.flatten(),s=Object.entries(i).map(([n,o])=>n+":"+(o==null?void 0:o.join(",")));return t.concat(s).join("; ")};function wd(e){const t=e.validate??fd,{autoSave:i}=e,s=l.ref(),n=l.ref(),o=w=>{n.value={model:Bi(w)}};l.watch(()=>e.get(),w=>o(w),{immediate:!0});const r=()=>{var w;e.onSave(t(Bi((w=n.value)==null?void 0:w.model)))},a=()=>{o(e.get()),s.value=void 0},d=w=>{const S=md(w);Cd(S)?s.value=Error(vd(S)):s.value=S},h=w=>{s.value=void 0;try{t(w),i&&r()}catch(S){d(S)}},p=l.computed({get:()=>{var w;return(w=n.value)==null?void 0:w.model},set(w){o(w),h(w)}});l.watch(n,(w,S)=>{w&&w===S&&h(w.model)},{deep:!0});const f=l.computed(()=>!s.value),m=l.computed(()=>!gd(e.get(),l.unref(n))),v=l.computed(()=>s.value?s.value.message:"");return l.reactive({model:p,valid:f,isChanged:m,error:s,errorString:v,save:r,revert:a,setError:d})}function Ay(e,t){const i=e.validate??fd,{autoSave:s}=e,n=l.ref(),o=l.ref(),r=S=>{o.value={model:Object.assign(Bi(S),t??{})}};l.watch(()=>e.get(),S=>r(S),{immediate:!0});const a=()=>{var S;e.onSave(i(Bi((S=o.value)==null?void 0:S.model)))},d=()=>{r(e.get()),n.value=void 0},h=S=>{const b=md(S);Cd(b)?n.value=Error(vd(b)):n.value=b},p=S=>{n.value=void 0;try{i(S),s&&a()}catch(b){h(b)}},f=l.computed({get:()=>{var S;return(S=o.value)==null?void 0:S.model},set(){throw Error("Cannot replace base model")}});l.watch(o,(S,b)=>{S&&S===b&&p(S.model)},{deep:!0});const m=l.computed(()=>!n.value),v=l.computed(()=>!gd(e.get(),l.unref(o))),w=l.computed(()=>n.value?n.value.message:"");return l.reactive({model:f,valid:m,isChanged:v,error:n,errorString:w,save:a,revert:d,setError:h})}const My=e=>Object.fromEntries(new URL(e,"http://dummy").searchParams);function ky(e,t){const s=ud(t.setBlockArgs,100),n=ud(t.setBlockUiState,100),o=ud(t.setBlockArgsAndUiState,100),r=l.reactive({args:Object.freeze(e.args),outputs:Object.freeze(e.outputs),ui:Object.freeze(e.ui),navigationState:Object.freeze(e.navigationState)});t.onStateUpdates(async S=>{S.forEach(b=>{b.key==="args"&&(r.args=Object.freeze(b.value)),b.key==="ui"&&(r.ui=Object.freeze(b.value)),b.key==="outputs"&&(r.outputs=Object.freeze(b.value)),b.key==="navigationState"&&(r.navigationState=Object.freeze(b.value))}),await l.nextTick()});const a=()=>Bi(r.args),d=()=>Bi(r.ui),h=()=>Bi(r.navigationState),p={createArgsModel(S={}){return wd({get(){return S.transform?S.transform(r.args):r.args},validate:S.validate,autoSave:!0,onSave(b){s(b)}})},createUiModel(S={},b){return wd({get(){return S.transform?S.transform(r.ui):r.ui??b()},validate:S.validate,autoSave:!0,onSave(R){n(R)}})},useOutputs(...S){const b=l.reactive({errors:void 0,value:void 0});return l.watch(()=>r.outputs,()=>{try{Object.assign(b,{value:this.unwrapOutputs(...S),errors:void 0})}catch(R){Object.assign(b,{value:void 0,errors:[String(R)]})}},{immediate:!0,deep:!0}),b},unwrapOutputs(...S){const b=r.outputs,R=S.map(x=>[x,Cg(b[x])]);return Object.fromEntries(R)},getOutputField(S){return r.outputs[S]},getOutputFieldOkOptional(S){console.warn("use reactive app.outputValues.fieldName instead instead of getOutputFieldOkOptional(fieldName)");const b=this.getOutputField(S);if(b&&b.ok)return b.value},getOutputFieldErrorsOptional(S){console.warn("use reactive app.outputErrors.fieldName instead instead of getOutputFieldErrorsOptional(fieldName)");const b=this.getOutputField(S);if(b&&!b.ok)return b.errors},updateArgs(S){const b=a();return S(b),t.setBlockArgs(b)},updateUiState(S){const b=d();return t.setBlockUiState(S(b))},updateNavigationState(S){const b=h();return S(b),t.setNavigationState(b)},navigateTo(S){const b=h();return b.href=S,t.setNavigationState(b)}},f=l.computed(()=>{const S=Object.entries(r.outputs).map(([b,R])=>[b,R.ok&&R.value!==void 0?R.value:void 0]);return Object.fromEntries(S)}),m=l.computed(()=>{const S=Object.entries(r.outputs).map(([b,R])=>[b,R&&!R.ok?new pd(R.errors):void 0]);return Object.fromEntries(S)}),v={snapshot:r,queryParams:l.computed(()=>My(r.navigationState.href)),href:l.computed(()=>r.navigationState.href),hasErrors:l.computed(()=>Object.values(r.outputs).some(S=>!(S!=null&&S.ok))),outputValues:l.computed(()=>(console.warn("Change app.outputValues to app.model.outputs"),f.value)),outputErrors:l.computed(()=>(console.warn("Change app.outputErrors to app.model.outputErrors"),m.value)),args:l.computed(()=>(console.warn("Change app.args to app.snapshot.args"),r.args)),outputs:l.computed(()=>(console.warn("Change app.outputs to app.snapshot.outputs"),r.outputs)),ui:l.computed(()=>(console.warn("Change app.ui to app.snapshot.ui"),r.ui)),navigationState:l.computed(()=>(console.warn("Change app.navigationState to app.snapshot.navigationState"),r.navigationState))},w=Ay({get(){return{args:r.args,ui:r.ui}},autoSave:!0,onSave(S){o(S.args,S.ui)}},{outputs:f,outputErrors:m});return l.reactive(Object.assign(w,p,v))}var So=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){const s=t?this.allAsyncListeners:this.allSyncListeners;let n=s.get(e);return!n&&i&&(n=new Set,s.set(e,n)),n}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){const s=this.getListeners(e,i,!1);s&&(s.delete(t),s.size===0&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){const t=e;this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const i=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const s=(a,d)=>a.forEach(h=>{if(!d.has(h))return;const p=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>h(e)):()=>h(e);t?this.dispatchAsync(p):p()}),n=this.getListeners(i,t,!1)??new Set,o=new Set(n);o.size>0&&s(o,n),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(a=>{const d=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>a(i,e)):()=>a(i,e);t?this.dispatchAsync(d):d()})}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}},Rt=(e=>(e.CommunityCoreModule="@ag-grid-community/core",e.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",e.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",e.CsvExportModule="@ag-grid-community/csv-export",e.EnterpriseCoreModule="@ag-grid-enterprise/core",e.RowGroupingModule="@ag-grid-enterprise/row-grouping",e.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",e.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",e.MenuModule="@ag-grid-enterprise/menu",e.SetFilterModule="@ag-grid-enterprise/set-filter",e.MultiFilterModule="@ag-grid-enterprise/multi-filter",e.StatusBarModule="@ag-grid-enterprise/status-bar",e.SideBarModule="@ag-grid-enterprise/side-bar",e.RangeSelectionModule="@ag-grid-enterprise/range-selection",e.MasterDetailModule="@ag-grid-enterprise/master-detail",e.RichSelectModule="@ag-grid-enterprise/rich-select",e.GridChartsModule="@ag-grid-enterprise/charts",e.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",e.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",e.ExcelExportModule="@ag-grid-enterprise/excel-export",e.ClipboardModule="@ag-grid-enterprise/clipboard",e.SparklinesModule="@ag-grid-enterprise/sparklines",e.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",e.AngularModule="@ag-grid-community/angular",e.ReactModule="@ag-grid-community/react",e.VueModule="@ag-grid-community/vue",e))(Rt||{}),wg={};function Sd(e,t){wg[t]||(e(),wg[t]=!0)}function Fi(e,...t){console.log("AG Grid: "+e,...t)}function z(e,...t){Sd(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function We(e,...t){Sd(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function yd(e){return!!(e&&e.constructor&&e.call&&e.apply)}function Iy(e){Ly(e,400)}var bd=[],Rd=!1;function Sg(e){bd.push(e),!Rd&&(Rd=!0,window.setTimeout(()=>{const t=bd.slice();bd.length=0,Rd=!1,t.forEach(i=>i())},0))}function Ly(e,t=0){e.length>0&&window.setTimeout(()=>e.forEach(i=>i()),t)}function Wt(e,t){let i;return function(...s){const n=this;window.clearTimeout(i),i=window.setTimeout(function(){e.apply(n,s)},t)}}function yg(e,t){let i=0;return function(...s){const n=this,o=new Date().getTime();o-i<t||(i=o,e.apply(n,s))}}function _y(e,t,i=100,s){const n=new Date().getTime();let o=null,r=!1;const a=()=>{const d=new Date().getTime()-n>i;(e()||d)&&(t(),r=!0,o!=null&&(window.clearInterval(o),o=null),d&&s&&z(s))};a(),r||(o=window.setInterval(a,10))}function Oy(...e){return t=>e.reduce((i,s)=>s(i),t)}function Gi(e){return e==null||e===""?null:e}function q(e,t=!1){return e!=null&&(e!==""||t)}function Ve(e){return!q(e)}function Tt(e){return e==null||e.length===0}function ea(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function _n(e){if(e===void 0)return;if(e===null||e==="")return null;if(typeof e=="number")return isNaN(e)?void 0:e;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Fd(e){if(e!==void 0)return e===null||e===""?!1:Ed(e)}function Ed(e){return typeof e=="boolean"?e:typeof e=="string"?e.toUpperCase()==="TRUE"||e=="":!1}function Sr(e,t){const i=e?JSON.stringify(e):null,s=t?JSON.stringify(t):null;return i===s}function Vy(e,t,i=!1){const s=e==null,n=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),s&&n)return 0;if(s)return-1;if(n)return 1;function o(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!i)return o(e,t);try{return e.localeCompare(t)}catch{return o(e,t)}}function ta(e){if(e instanceof Set||e instanceof Map){const t=[];return e.forEach(i=>t.push(i)),t}return Object.values(e)}function bg(e,t){return e.get("rowModelType")===t}function st(e){return bg(e,"clientSide")}function xs(e){return bg(e,"serverSide")}function Ft(e,t){return e.get("domLayout")===t}function ia(e){return la(e)!==void 0}function sa(e){return!e.get("suppressAsyncEvents")}function Rg(e){return typeof e.get("getRowHeight")=="function"}function Ny(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function qs(e,t,i=!1,s){if(s==null&&(s=e.environment.getDefaultRowHeight()),Rg(e)){if(i)return{height:s,estimated:!0};const r={node:t,data:t.data},a=e.getCallback("getRowHeight")(r);if(xd(a))return a===0&&z("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,a),estimated:!1}}if(t.detail&&e.get("masterDetail"))return By(e);const n=e.get("rowHeight");return{height:n&&xd(n)?n:s,estimated:!1}}function By(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return xd(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function On(e){const{environment:t}=e,i=e.get("rowHeight");if(!i||Ve(i))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(z("row height must be a number if not using standard row model"),t.getDefaultRowHeight())}function xd(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function yr(e,t,i){const s=t[e.getDomDataKey()];return s?s[i]:void 0}function Vn(e,t,i,s){const n=e.getDomDataKey();let o=t[n];Ve(o)&&(o={},t[n]=o),o[i]=s}function lt(e){let t=null;const i=e.get("getDocument");return i&&q(i)?t=i():e.eGridDiv&&(t=e.eGridDiv.ownerDocument),t&&q(t)?t:document}function Fg(e){return lt(e).defaultView||window}function br(e){return e.eGridDiv.getRootNode()}function Je(e){return br(e).activeElement}function Eg(e){const t=lt(e),i=Je(e);return i===null||i===t.body}function yo(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function na(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Ft(e,"print"))}function us(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function Pd(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function xg(e){const t=e.get("grandTotalRow");if(t)return t;if(e.get("groupIncludeTotalFooter"))return"bottom"}function Pg(e){const t=e.get("groupTotalRow");if(typeof t=="function")return e.getCallback("groupTotalRow");if(t)return()=>t;const i=e.get("groupIncludeFooter");if(typeof i=="function"){const s=e.getCallback("groupIncludeFooter");return n=>s(n)?"bottom":void 0}return()=>i?"bottom":void 0}function Dg(e){return e.exists("groupDisplayType")?e.get("groupDisplayType")==="multipleColumns":e.get("groupHideOpenParents")}function oa(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function bo(e){const t=e.getCallback("getRowId");return t===void 0?t:i=>{let s=t(i);return typeof s!="string"&&(z("The getRowId callback must return a string. The ID ",s," is being cast to a string."),s=String(s)),s}}function Ro(e){return(e==null?void 0:e.checkboxes)??!0}function ra(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function Gy(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function Hy(e){return typeof e.get("rowSelection")!="string"}function Tg(e){return e.get("cellSelection")!==void 0}function Rr(e){const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?(t==null?void 0:t.suppressMultiRanges)??!1:!1:e.get("suppressMultiRangeSelection")}function ei(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function Wy(e){var s;const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?((s=t.handle)==null?void 0:s.mode)==="range":!1:e.get("enableRangeHandle")}function Ag(e){var s;const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?((s=t.handle)==null?void 0:s.mode)==="fill":!1:e.get("enableFillHandle")}function Dd(e){var s;const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"&&((s=t.handle)==null?void 0:s.mode)==="fill"?t.handle:void 0:{mode:"fill",setFillValue:e.get("fillOperation"),direction:e.get("fillHandleDirection"),suppressClearOnFillReduction:e.get("suppressClearOnFillReduction")}}function Mg(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const i=e.get("suppressRowClickSelection"),s=e.get("suppressRowDeselection");return i&&s?!1:i?"enableDeselection":s?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function zy(e){const t=Mg(e);return t===!0||t==="enableSelection"}function Td(e){const t=Mg(e);return t===!0||t==="enableDeselection"}function Ad(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function la(e){const t=e.get("rowSelection");if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}return t==null?void 0:t.mode}function Md(e){return la(e)==="multiRow"}function Uy(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function kd(e){const t=e.get("rowSelection");if(typeof t=="string"){const i=e.get("groupSelectsChildren"),s=e.get("groupSelectsFiltered");return i&&s?"filteredDescendants":i?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function Nn(e){const t=kd(e);return t==="descendants"||t==="filteredDescendants"}function Id(e){return e.isModuleRegistered("@ag-grid-enterprise/set-filter")&&!e.get("suppressSetFilterByDefault")}function $y(e){return e!=null&&e.length>0}function he(e){if(!(!e||!e.length))return e[e.length-1]}function hs(e,t,i){return e==null&&t==null?!0:e!=null&&t!=null&&e.length===t.length&&e.every((s,n)=>i?i(s,t[n]):t[n]===s)}function Ky(e,t){return hs(e,t)}function jy(e){return e.sort((t,i)=>t-i)}function kg(e,t){const i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.pop())}function kt(e,t){const i=e.indexOf(t);i>=0&&e.splice(i,1)}function Zy(e,t){for(let i=0;i<t.length;i++)kg(e,t[i])}function qy(e,t){for(let i=0;i<t.length;i++)kt(e,t[i])}function aa(e,t,i){e.splice(i,0,t)}function Ig(e,t,i){qy(e,t),t.slice().reverse().forEach(s=>aa(e,s,i))}function Ps(e,t){return e.indexOf(t)>-1}function Yy(e){return(e==null?void 0:e.flatMap(t=>t))??[]}function Lg(e,t){t==null||e==null||t.forEach(i=>e.push(i))}var _g="__ag_Grid_Stop_Propagation",Qy=["touchstart","touchend","touchmove","touchcancel","scroll"],Ld={};function Fo(e){e[_g]=!0}function Ds(e){return e[_g]===!0}var Og=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return i=>{if(typeof Ld[i]=="boolean")return Ld[i];const s=document.createElement(e[i]||"div");return i="on"+i,Ld[i]=i in s}})();function ca(e,t,i){let s=t;for(;s;){const n=yr(e,s,i);if(n)return n;s=s.parentElement}return null}function Xy(e,t){return!t||!e?!1:eb(t).indexOf(e)>=0}function Jy(e){const t=[];let i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}function eb(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():Jy(t)}function tb(e,t,i,s){const o=Ps(Qy,i)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(t,i,s,o)}var G=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.frameworkOverrides=e.frameworkOverrides,this.stubContext=e.context,this.eventService=e.eventService,this.gos=e.gos,this.localeService=e.localeService}getFrameworkOverrides(){return this.frameworkOverrides}destroy(){for(let e=0;e<this.destroyFunctions.length;e++)this.destroyFunctions[e]();this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,i){this.localEventService||(this.localEventService=new So),this.localEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.localEventService&&this.localEventService.removeEventListener(e,t,i)}dispatchLocalEvent(e){this.localEventService&&this.localEventService.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventService,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const i=[];for(const s in t){const n=t[s];n&&i.push(this._setupListener(e,s,n))}return i}_setupListener(e,t,i){if(this.destroyed)return()=>null;e instanceof HTMLElement?tb(this.getFrameworkOverrides(),e,t,i):e.addEventListener(t,i);const s=()=>(e.removeEventListener(t,i),null);return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(n=>n!==s),null)}setupGridOptionListener(e,t){this.gos.addPropertyEventListener(e,t);const i=()=>(this.gos.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const i=e.join("-")+this.propertyListenerId++,s=n=>{if(n.changeSet){if(n.changeSet&&n.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=n.changeSet.id}const o={type:"gridPropertyChanged",changeSet:n.changeSet,source:n.source};t(o)};e.forEach(n=>this.setupGridOptionListener(n,s))}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createManagedBean(e,t){const i=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),i}createBean(e,t,i){return(t||this.stubContext).createBean(e,i)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function zt(e){return e instanceof da}var da=class extends G{constructor(e,t,i,s){super(),this.isColumn=!1,this.expandable=!1,this.instanceId=Bg(),this.expandableListenerRemoveCallback=null,this.colGroupDef=e,this.groupId=t,this.expanded=!!e&&!!e.openByDefault,this.padding=i,this.level=s}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}addLeafColumns(e){this.children&&this.children.forEach(t=>{Xs(t)?e.push(t):zt(t)&&t.addLeafColumns(e)})}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,i=!1;const s=this.findChildrenRemovingPadding();for(let o=0,r=s.length;o<r;o++){const a=s[o];if(!a.isVisible())continue;const d=a.getColumnGroupShow();d==="open"?(e=!0,i=!0):d==="closed"?(t=!0,i=!0):(e=!0,t=!0)}const n=e&&t&&i;this.expandable!==n&&(this.expandable=n,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=i=>{i.forEach(s=>{zt(s)&&s.isPadding()?t(s.children):e.push(s)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},Vg="ag-Grid-ControlsColumn",ib=class extends G{constructor(){super(...arguments),this.beanName="controlsColService"}createControlsCols(){const e=this.gos.get("rowSelection");if(!e||typeof e=="string")return[];const t=Ro(e),i=ra(e);if(t||i){const s=this.gos.get("selectionColumnDef"),o={maxWidth:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:this.gos.get("enableRtl")?"right":"left",comparator(a,d,h,p){const f=h.isSelected(),m=p.isSelected();return f&&m?0:f?1:-1},editable:!1,suppressFillHandle:!0,...s,colId:`${Vg}`},r=new Hd(o,null,o.colId,!1);return this.createBean(r),[r]}return[]}},ua="ag-Grid-AutoColumn";function _d(e){const t=[],i=s=>{for(let n=0;n<s.length;n++){const o=s[n];Xs(o)?t.push(o):zt(o)&&i(o.getChildren())}};return i(e),t}function Ts(e){return e.reduce((t,i)=>t+i.getActualWidth(),0)}function Ys(e,t,i){const s={};if(!t)return;As(null,t,o=>{s[o.getInstanceId()]=o}),i&&As(null,i,o=>{s[o.getInstanceId()]=null});const n=Object.values(s).filter(o=>o!=null);e.destroyBeans(n)}function Od(e){return e.getId().startsWith(ua)}function Eo(e){return e.getColId().startsWith(Vg)}function ha(e){let t=[];return e instanceof Array?e.some(s=>typeof s!="string")?z("if colDef.type is supplied an array it should be of type 'string[]'"):t=e:typeof e=="string"?t=e.split(","):z("colDef.type should be of type 'string' | 'string[]'"),t}var Vd=class{constructor(e){this.frameworkOverrides=e,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=i=>{this.frameworkOverrides.wrapOutgoing(()=>e(i))},this.wrappedListeners.set(e,t)),t}wrapGlobal(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=(i,s)=>{this.frameworkOverrides.wrapOutgoing(()=>e(i,s))},this.wrappedGlobalListeners.set(e,t)),t}unwrap(e){return this.wrappedListeners.get(e)??e}unwrapGlobal(e){return this.wrappedGlobalListeners.get(e)??e}},Nd=new Set(["__proto__","constructor","prototype"]);function Ei(e,t){if(e!=null){if(Array.isArray(e)){for(let i=0;i<e.length;i++)t(i.toString(),e[i]);return}for(const[i,s]of Object.entries(e))t(i,s)}}function Ng(e){const t={},i=Object.keys(e);for(let s=0;s<i.length;s++){if(Nd.has(i[s]))continue;const n=i[s],o=e[n];t[n]=o}return t}function Bd(e,t){if(!e)return;const i=e,s={};return Object.keys(i).forEach(n=>{if(t&&t.indexOf(n)>=0||Nd.has(n))return;const o=i[n];Gd(o)&&o.constructor===Object?s[n]=Bd(o):s[n]=o}),s}function Qs(e){if(!e)return[];const t=Object;if(typeof t.values=="function")return t.values(e);const i=[];for(const s in e)e.hasOwnProperty(s)&&e.propertyIsEnumerable(s)&&i.push(e[s]);return i}function Ut(e,t,i=!0,s=!1){q(t)&&Ei(t,(n,o)=>{if(Nd.has(n))return;let r=e[n];r!==o&&(s&&r==null&&o!=null&&typeof o=="object"&&o.constructor===Object&&(r={},e[n]=r),Gd(o)&&Gd(r)&&!Array.isArray(r)?Ut(r,o,i,s):(i||o!==void 0)&&(e[n]=o))})}function Fr(e,t,i){if(!t||!e)return;if(!i)return e[t];const s=t.split(".");let n=e;for(let o=0;o<s.length;o++){if(n==null)return;n=n[s[o]]}return n}function Gd(e){return typeof e=="object"&&e!==null}var sb={resizable:!0,sortable:!0},nb=0;function Bg(){return nb++}function Xs(e){return e instanceof Hd}var Hd=class extends G{constructor(e,t,i,s){super(),this.isColumn=!0,this.instanceId=Bg(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.columnEventService=new So,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=s,this.setState(e)}wireBeans(e){this.columnHoverService=e.columnHoverService}getInstanceId(){return this.instanceId}setState(e){e.sort!==void 0?(e.sort==="asc"||e.sort==="desc")&&(this.sort=e.sort):(e.initialSort==="asc"||e.initialSort==="desc")&&(this.sort=e.initialSort);const t=e.sortIndex,i=e.initialSortIndex;t!==void 0?t!==null&&(this.sortIndex=t):i!==null&&(this.sortIndex=i);const s=e.hide,n=e.initialHide;s!==void 0?this.visible=!s:this.visible=!n,e.pinned!==void 0?this.setPinned(e.pinned):this.setPinned(e.initialPinned);const o=e.flex,r=e.initialFlex;o!==void 0?this.flex=o:r!==void 0&&(this.flex=r)}setColDef(e,t,i){this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.columnEventService.dispatchEvent(this.createColumnEvent("colDefChanged",i))}getUserProvidedColDef(){return this.userProvidedColDef}setParent(e){this.parent=e}getParent(){return this.parent}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}postConstruct(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()}initDotNotation(){const e=this.gos.get("suppressFieldDotNotation");this.fieldContainsDots=q(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!e,this.tooltipFieldContainsDots=q(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.gos.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.tooltipEnabled=q(this.colDef.tooltipField)||q(this.colDef.tooltipValueGetter)||q(this.colDef.tooltipComponent)}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const i=_n(e.width),s=_n(e.initialWidth);return i!=null?t=i:s!=null?t=s:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){if(Ve(this.colDef)||Ve(this.colDef.showRowGroup))return!1;const t=this.colDef.showRowGroup===!0,i=this.colDef.showRowGroup===e;return t||i}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}addEventListener(e,t){var s;this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.columnEventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new Vd(this.frameworkOverrides));const i=((s=this.frameworkEventListenerService)==null?void 0:s.wrap(t))??t;this.columnEventService.addEventListener(e,i)}removeEventListener(e,t){var s;const i=((s=this.frameworkEventListenerService)==null?void 0:s.unwrap(t))??t;this.columnEventService.removeEventListener(e,i)}createColumnFunctionCallbackParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){if(typeof this.colDef.suppressNavigable=="boolean")return this.colDef.suppressNavigable;if(typeof this.colDef.suppressNavigable=="function"){const t=this.createColumnFunctionCallbackParams(e),i=this.colDef.suppressNavigable;return i(t)}return!1}isCellEditable(e){if(e.group){if(this.gos.get("treeData")){if(!e.data&&!this.gos.get("enableGroupEdit"))return!1}else if(!this.gos.get("enableGroupEdit"))return!1}return this.isColumnFunc(e,this.colDef.editable)}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){const t=this.gos.get("rowSelection");if(t&&typeof t!="string"){const i=Eo(this)&&Ro(t);return this.isColumnFunc(e,i)}else return this.isColumnFunc(e,this.colDef.checkboxSelection)}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??sb[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const i=this.createColumnFunctionCallbackParams(e);return t(i)}return!1}setHighlighted(e){this.highlighted!==e&&(this.highlighted=e,this.columnEventService.dispatchEvent(this.createColumnEvent("headerHighlightChanged","uiColumnMoved")))}setMoving(e,t){this.moving=e,this.columnEventService.dispatchEvent(this.createColumnEvent("movingChanged",t))}createColumnEvent(e,t){return this.gos.addGridCommonParams({type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}setSort(e,t){this.sort!==e&&(this.sort=e,this.columnEventService.dispatchEvent(this.createColumnEvent("sortChanged",t))),this.dispatchStateUpdatedEvent("sort")}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return Ve(this.sort)}isSorting(){return q(this.sort)}getSortIndex(){return this.sortIndex}setSortIndex(e){this.sortIndex=e,this.dispatchStateUpdatedEvent("sortIndex")}setMenuVisible(e,t){this.menuVisible!==e&&(this.menuVisible=e,this.columnEventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",t)))}isMenuVisible(){return this.menuVisible}setAggFunc(e){this.aggFunc=e,this.dispatchStateUpdatedEvent("aggFunc")}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.columnEventService.dispatchEvent(this.createColumnEvent("leftChanged",t)))}isFilterActive(){return this.filterActive}setFilterActive(e,t,i){this.filterActive!==e&&(this.filterActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",t)));const s=this.createColumnEvent("filterChanged",t);i&&Ut(s,i),this.columnEventService.dispatchEvent(s)}isHovered(){return this.columnHoverService.isHovered(this)}setPinned(e){e===!0||e==="left"?this.pinned="left":e==="right"?this.pinned="right":this.pinned=null,this.dispatchStateUpdatedEvent("pinned")}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",t)))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",t)))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const i=e===!0;this.visible!==i&&(this.visible=i,this.columnEventService.dispatchEvent(this.createColumnEvent("visibleChanged",t))),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){const e=this.getColDef();return!e.suppressSpanHeaderHeight&&!e.autoHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let i=!0;for(;e;){if(!e.isPadding()){i=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:i}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(Ve(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.colSpan(t);return Math.max(i,1)}getRowSpan(e){if(Ve(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.rowSpan(t);return Math.max(i,1)}setActualWidth(e,t,i=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),i||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.columnEventService.dispatchEvent(this.createColumnEvent("widthChanged",e))}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex||0}setFlex(e){this.flex!==e&&(this.flex=e),this.dispatchStateUpdatedEvent("flex")}setMinimum(e){this.setActualWidth(this.minWidth,e)}setRowGroupActive(e,t){this.rowGroupActive!==e&&(this.rowGroupActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",t))),this.dispatchStateUpdatedEvent("rowGroup")}isRowGroupActive(){return this.rowGroupActive}setPivotActive(e,t){this.pivotActive!==e&&(this.pivotActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",t))),this.dispatchStateUpdatedEvent("pivot")}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}setValueActive(e,t){this.aggregationActive!==e&&(this.aggregationActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnValueChanged",t)))}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchStateUpdatedEvent(e){this.columnEventService.dispatchEvent({type:"columnStateUpdated",key:e})}},ob={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},rb=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=ea(e);let i=0;for(;;){let s;if(e?(s=e,i!==0&&(s+="_"+i)):t?(s=t,i!==0&&(s+="_"+i)):s=i,!this.existingKeys[s])return this.existingKeys[s]=!0,String(s);i++}}},lb=class extends G{constructor(){super(...arguments),this.beanName="columnFactory"}wireBeans(e){this.dataTypeService=e.dataTypeService}createColumnTree(e,t,i,s){const n=new rb,{existingCols:o,existingGroups:r,existingColKeys:a}=this.extractExistingTreeData(i);n.addExistingKeys(a);const d=this.recursivelyCreateColumns(e,0,t,o,n,r,s),h=this.findMaxDept(d,0),p=this.balanceColumnTree(d,0,h,n);return As(null,p,(m,v)=>{zt(m)&&m.setupExpandable(),m.setOriginalParent(v)}),{columnTree:p,treeDept:h}}extractExistingTreeData(e){const t=[],i=[],s=[];return e&&As(null,e,n=>{if(zt(n)){const o=n;i.push(o)}else{const o=n;s.push(o.getId()),t.push(o)}}),{existingCols:t,existingGroups:i,existingColKeys:s}}balanceTreeForAutoCols(e,t){const i=[],s=this.findDepth(t);return e.forEach(n=>{let o=n;for(let r=s-1;r>=0;r--){const a=new da(null,`FAKE_PATH_${n.getId()}}_${r}`,!0,r);this.createBean(a),a.setChildren([o]),o.setOriginalParent(a),o=a}s===0&&n.setOriginalParent(null),i.push(o)}),[i,s]}findDepth(e){let t=0,i=e;for(;i&&i[0]&&zt(i[0]);)t++,i=i[0].getChildren();return t}balanceColumnTree(e,t,i,s){const n=[];for(let o=0;o<e.length;o++){const r=e[o];if(zt(r)){const a=r,d=this.balanceColumnTree(a.getChildren(),t+1,i,s);a.setChildren(d),n.push(a)}else{let a,d;for(let h=i-1;h>=t;h--){const p=s.getUniqueKey(null,null),f=this.createMergedColGroupDef(null),m=new da(f,p,!0,t);this.createBean(m),d&&d.setChildren([m]),d=m,a||(a=d)}if(a&&d)if(n.push(a),e.some(p=>zt(p))){d.setChildren([r]);continue}else{d.setChildren(e);break}n.push(r)}}return n}findMaxDept(e,t){let i=t;for(let s=0;s<e.length;s++){const n=e[s];if(zt(n)){const o=n,r=this.findMaxDept(o.getChildren(),t+1);i<r&&(i=r)}}return i}recursivelyCreateColumns(e,t,i,s,n,o,r){if(!e)return[];const a=new Array(e.length);for(let d=0;d<a.length;d++){const h=e[d];this.isColumnGroup(h)?a[d]=this.createColumnGroup(i,h,t,s,n,o,r):a[d]=this.createColumn(i,h,s,n,r)}return a}createColumnGroup(e,t,i,s,n,o,r){const a=this.createMergedColGroupDef(t),d=n.getUniqueKey(a.groupId||null,null),h=new da(a,d,!1,i);this.createBean(h);const p=this.findExistingGroup(t,o);p&&o.splice(p.idx,1);const f=p==null?void 0:p.group;f&&h.setExpanded(f.isExpanded());const m=this.recursivelyCreateColumns(a.children,i+1,e,s,n,o,r);return h.setChildren(m),h}createMergedColGroupDef(e){const t={};return Object.assign(t,this.gos.get("defaultColGroupDef")),Object.assign(t,e),t}createColumn(e,t,i,s,n){var a;const o=this.findExistingColumn(t,i);o&&(i==null||i.splice(o.idx,1));let r=o==null?void 0:o.column;if(r){const d=this.addColumnDefaultAndTypes(t,r.getColId());r.setColDef(d,t,n),this.applyColumnState(r,d,n)}else{const d=s.getUniqueKey(t.colId,t.field),h=this.addColumnDefaultAndTypes(t,d);r=new Hd(h,t,d,e),this.createBean(r)}return(a=this.dataTypeService)==null||a.addColumnListeners(r),r}applyColumnState(e,t,i){const s=_n(t.flex);if(s!==void 0&&e.setFlex(s),e.getFlex()<=0){const a=_n(t.width);if(a!=null)e.setActualWidth(a,i);else{const d=e.getActualWidth();e.setActualWidth(d,i)}}t.sort!==void 0&&(t.sort=="asc"||t.sort=="desc"?e.setSort(t.sort,i):e.setSort(void 0,i));const o=_n(t.sortIndex);o!==void 0&&e.setSortIndex(o);const r=Fd(t.hide);r!==void 0&&e.setVisible(!r,i),t.pinned!==void 0&&e.setPinned(t.pinned)}findExistingColumn(e,t){if(t)for(let i=0;i<t.length;i++){const s=t[i].getUserProvidedColDef();if(!s)continue;if(e.colId!=null){if(t[i].getId()===e.colId)return{idx:i,column:t[i]};continue}if(e.field!=null){if(s.field===e.field)return{idx:i,column:t[i]};continue}if(s===e)return{idx:i,column:t[i]}}}findExistingGroup(e,t){if(e.groupId!=null)for(let s=0;s<t.length;s++){const n=t[s];if(n.getColGroupDef()&&n.getId()===e.groupId)return{idx:s,group:n}}}addColumnDefaultAndTypes(e,t){var a;const i={},s=this.gos.get("defaultColDef");Ut(i,s,!1,!0);const n=this.updateColDefAndGetColumnType(i,e,t);n&&this.assignColumnTypes(n,i),Ut(i,e,!1,!0);const o=this.gos.get("autoGroupColumnDef"),r=us(this.gos);return e.rowGroup&&o&&r&&Ut(i,{sort:o.sort,initialSort:o.initialSort},!1,!0),(a=this.dataTypeService)==null||a.validateColDef(i),i}updateColDefAndGetColumnType(e,t,i){var o;const s=(o=this.dataTypeService)==null?void 0:o.updateColDefAndGetColumnType(e,t,i),n=t.type??s??e.type;return e.type=n,n?ha(n):void 0}assignColumnTypes(e,t){if(!e.length)return;const i=Object.assign({},ob),s=this.gos.get("columnTypes")||{};Ei(s,(n,o)=>{n in i?z(`the column type '${n}' is a default column type and cannot be overridden.`):(o.type&&z("Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type."),i[n]=o)}),e.forEach(n=>{const o=i[n.trim()];o?Ut(t,o,!1,!0):z("colDef.type '"+n+"' does not correspond to defined gridOptions.columnTypes")})}isColumnGroup(e){return e.children!==void 0}};function As(e,t,i){if(t)for(let s=0;s<t.length;s++){const n=t[s];zt(n)&&As(n,n.getChildren(),i),i(n,e)}}var ab=class extends G{constructor(){super(...arguments),this.beanName="columnModel",this.pivotMode=!1,this.autoHeightActiveAtLeastOnce=!1,this.ready=!1,this.changeEventsDispatching=!1,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}wireBeans(e){this.context=e.context,this.ctrlsService=e.ctrlsService,this.columnFactory=e.columnFactory,this.columnSizeService=e.columnSizeService,this.visibleColsService=e.visibleColsService,this.columnViewportService=e.columnViewportService,this.pivotResultColsService=e.pivotResultColsService,this.columnAnimationService=e.columnAnimationService,this.autoColService=e.autoColService,this.controlsColService=e.controlsColService,this.valueCache=e.valueCache,this.columnDefFactory=e.columnDefFactory,this.columnApplyStateService=e.columnApplyStateService,this.columnGroupStateService=e.columnGroupStateService,this.eventDispatcher=e.columnEventDispatcher,this.columnMoveService=e.columnMoveService,this.columnAutosizeService=e.columnAutosizeService,this.funcColsService=e.funcColsService,this.quickFilterService=e.quickFilterService,this.showRowGroupColsService=e.showRowGroupColsService,this.environment=e.environment}postConstruct(){const e=this.gos.get("pivotMode");this.isPivotSettingAllowed(e)&&(this.pivotMode=e),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],t=>this.refreshAll(Bn(t.source))),this.addManagedPropertyListener("rowSelection",t=>{this.onSelectionOptionsChanged(t.currentValue,t.previousValue,Bn(t.source))}),this.addManagedPropertyListener("autoGroupColumnDef",t=>this.onAutoGroupColumnDefChanged(Bn(t.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],t=>this.recreateColumnDefs(Bn(t.source))),this.addManagedPropertyListener("pivotMode",t=>this.setPivotMode(this.gos.get("pivotMode"),Bn(t.source))),this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}createColsFromColDefs(e){var h,p,f;const t=this.colDefs?this.columnApplyStateService.compareColumnStatesAndDispatchEvents(e):void 0;this.valueCache.expire();const i=(h=this.colDefCols)==null?void 0:h.list,s=(p=this.colDefCols)==null?void 0:p.tree,n=this.columnFactory.createColumnTree(this.colDefs,!0,s,e);Ys(this.context,(f=this.colDefCols)==null?void 0:f.tree,n.columnTree);const o=n.columnTree,r=n.treeDept,a=_d(o),d={};a.forEach(m=>d[m.getId()]=m),this.colDefCols={tree:o,treeDepth:r,list:a,map:d},this.funcColsService.extractCols(e,i),this.ready=!0,this.refreshCols(!0),this.visibleColsService.refresh(e),this.columnViewportService.checkViewportColumns(),this.eventDispatcher.everythingChanged(e),t&&(this.changeEventsDispatching=!0,t(),this.changeEventsDispatching=!1),this.eventDispatcher.newColumnsLoaded(e),e==="gridInitializing"&&this.columnSizeService.applyAutosizeStrategy()}refreshCols(e){var n,o,r;if(!this.colDefCols)return;const t=(n=this.cols)==null?void 0:n.tree;this.saveColOrder(),this.selectCols(),this.createAutoCols(),this.addAutoCols(),this.createControlsCols(),this.addControlsCols();const i=Ny(this.gos,this.showingPivotResult);(!e||i)&&this.restoreColOrder(),this.positionLockedCols(),(o=this.showRowGroupColsService)==null||o.refresh(),(r=this.quickFilterService)==null||r.refreshQuickFilterCols(),this.setColSpanActive(),this.setAutoHeightActive(),this.visibleColsService.clear(),this.columnViewportService.clear(),!hs(t,this.cols.tree)&&this.eventDispatcher.gridColumns()}selectCols(){const e=this.pivotResultColsService.getPivotResultCols();if(this.showingPivotResult=e!=null,e){const{map:t,list:i,tree:s,treeDepth:n}=e;this.cols={list:i.slice(),map:{...t},tree:s.slice(),treeDepth:n},e.list.some(r=>{var a;return((a=this.cols)==null?void 0:a.map[r.getColId()])!==void 0})||(this.lastPivotOrder=null)}else{const{map:t,list:i,tree:s,treeDepth:n}=this.colDefCols;this.cols={list:i.slice(),map:{...t},tree:s.slice(),treeDepth:n}}}getColsToShow(){const e=this.isPivotMode()&&!this.isShowingPivotResult(),t=this.funcColsService.getValueColumns();return this.cols.list.filter(s=>{const n=Od(s);if(e){const o=t&&Ps(t,s);return n||o}else return n||s.isVisible()})}addAutoCols(){this.autoCols!=null&&(this.cols.list=this.autoCols.list.concat(this.cols.list),this.cols.tree=this.autoCols.tree.concat(this.cols.tree),Gg(this.cols))}createAutoCols(){var w,S;const e=oa(this.gos,this.pivotMode),t=this.pivotMode?this.gos.get("pivotSuppressAutoColumn"):this.isSuppressAutoCol(),i=this.funcColsService.getRowGroupColumns(),n=!(i.length>0||this.gos.get("treeData"))||t||e,o=()=>{this.autoCols&&(Ys(this.context,this.autoCols.tree),this.autoCols=null)};if(n||!this.autoColService){o();return}const r=this.autoColService.createAutoCols(i)??[],a=cb(r,((w=this.autoCols)==null?void 0:w.list)||null),d=this.cols.treeDepth,p=(this.autoCols?this.autoCols.treeDepth:-1)==d;if(a&&p)return;o();const[f,m]=this.columnFactory.balanceTreeForAutoCols(r,(S=this.cols)==null?void 0:S.tree);this.autoCols={list:r,tree:f,treeDepth:m,map:{}};const v=b=>{if(!b)return null;const R=b.filter(x=>!Od(x));return[...r,...R]};this.lastOrder=v(this.lastOrder),this.lastPivotOrder=v(this.lastPivotOrder)}createControlsCols(){var n,o,r,a;Ys(this.context,(n=this.controlsCols)==null?void 0:n.tree),this.controlsCols=null;const e=((o=this.controlsColService)==null?void 0:o.createControlsCols())??[],[t,i]=this.columnFactory.balanceTreeForAutoCols(e,this.cols.tree);this.controlsCols={list:e,tree:t,treeDepth:i,map:{}};function s(d,h){const p=Eo(d),f=Eo(h);return p&&!f?-1:!p&&f?1:0}(r=this.lastOrder)==null||r.sort(s),(a=this.lastPivotOrder)==null||a.sort(s)}addControlsCols(){this.controlsCols!=null&&(this.cols.list=this.controlsCols.list.concat(this.cols.list),this.cols.tree=this.controlsCols.tree.concat(this.cols.tree),Gg(this.cols))}refreshAll(e){this.isReady()&&(this.refreshCols(!1),this.visibleColsService.refresh(e))}setColsVisible(e,t=!1,i){this.columnApplyStateService.applyColumnState({state:e.map(s=>({colId:typeof s=="string"?s:s.getColId(),hide:!t}))},i)}setColsPinned(e,t,i){if(!this.cols||Tt(e))return;if(Ft(this.gos,"print")){z("Changing the column pinning status is not allowed with domLayout='print'");return}this.columnAnimationService.start();let s;t===!0||t==="left"?s="left":t==="right"?s="right":s=null;const n=[];e.forEach(o=>{if(!o)return;const r=this.getCol(o);r&&r.getPinned()!==s&&(r.setPinned(s),n.push(r))}),n.length&&(this.visibleColsService.refresh(i),this.eventDispatcher.columnPinned(n,i)),this.columnAnimationService.finish()}setColumnGroupOpened(e,t,i){let s;zt(e)?s=e.getId():s=e||"",this.columnGroupStateService.setColumnGroupState([{groupId:s,open:t}],i)}getProvidedColGroup(e){var i;let t=null;return As(null,(i=this.cols)==null?void 0:i.tree,s=>{zt(s)&&s.getId()===e&&(t=s)}),t}isColGroupLocked(e){const t=this.gos.get("groupLockGroupColumns");if(!e.isRowGroupActive()||t===0)return!1;if(t===-1)return!0;const s=this.funcColsService.getRowGroupColumns().findIndex(n=>n.getColId()===e.getColId());return t>s}isSuppressAutoCol(){return this.gos.get("groupDisplayType")==="custom"?!0:this.gos.get("treeDataDisplayType")==="custom"}setAutoHeightActive(){this.autoHeightActive=this.cols.list.some(e=>e.isVisible()&&e.isAutoHeight()),this.autoHeightActive&&(this.autoHeightActiveAtLeastOnce=!0,st(this.gos)||xs(this.gos)||z("autoHeight columns only work with Client Side Row Model and Server Side Row Model."))}restoreColOrder(){const e=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!e)return;const t=new Map(e.map((d,h)=>[d,h]));if(!this.cols.list.some(d=>t.has(d)))return;const s=new Map(this.cols.list.map(d=>[d,!0])),n=e.filter(d=>s.has(d)),o=new Map(n.map(d=>[d,!0])),r=this.cols.list.filter(d=>!o.has(d)),a=n.slice();r.forEach(d=>{let h=d.getOriginalParent();if(!h){a.push(d);return}const p=[];for(;!p.length&&h;)h.getLeafColumns().forEach(w=>{const S=a.indexOf(w)>=0,b=p.indexOf(w)<0;S&&b&&p.push(w)}),h=h.getOriginalParent();if(!p.length){a.push(d);return}const f=p.map(v=>a.indexOf(v)),m=Math.max(...f);aa(a,d,m+1)}),this.cols.list=a}sortColsLikeKeys(e){if(this.cols==null)return;let t=[];const i={};e.forEach(n=>{if(i[n])return;const o=this.cols.map[n];o&&(t.push(o),i[n]=!0)});let s=0;if(this.cols.list.forEach(n=>{const o=n.getColId();if(i[o]!=null)return;o.startsWith(ua)?aa(t,n,s++):t.push(n)}),t=this.columnMoveService.placeLockedColumns(t),!this.columnMoveService.doesMovePassMarryChildren(t)){z("Applying column order broke a group where columns should be married together. Applying new order has been discarded.");return}this.cols.list=t}sortColsLikeCols(e){!e||e.length<=1||e.filter(i=>this.cols.list.indexOf(i)<0).length>0||e.sort((i,s)=>{const n=this.cols.list.indexOf(i),o=this.cols.list.indexOf(s);return n-o})}resetColDefIntoCol(e,t){const i=e.getUserProvidedColDef();if(!i)return!1;const s=this.columnFactory.addColumnDefaultAndTypes(i,e.getColId());return e.setColDef(s,i,t),!0}queueResizeOperations(){this.shouldQueueResizeOperations=!0}isShouldQueueResizeOperations(){return this.shouldQueueResizeOperations}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}moveInCols(e,t,i){var s;Ig((s=this.cols)==null?void 0:s.list,e,t),this.visibleColsService.refresh(i)}positionLockedCols(){this.cols.list=this.columnMoveService.placeLockedColumns(this.cols.list)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=(e=this.cols)==null?void 0:e.list:this.lastOrder=(t=this.cols)==null?void 0:t.list}getColumnDefs(){if(!this.colDefCols)return;const e=this.colDefCols.list.slice();this.showingPivotResult?e.sort((s,n)=>this.lastOrder.indexOf(s)-this.lastOrder.indexOf(n)):this.lastOrder&&e.sort((s,n)=>this.cols.list.indexOf(s)-this.cols.list.indexOf(n));const t=this.funcColsService.getRowGroupColumns(),i=this.funcColsService.getPivotColumns();return this.columnDefFactory.buildColumnDefs(e,t,i)}isShowingPivotResult(){return this.showingPivotResult}isChangeEventsDispatching(){return this.changeEventsDispatching}isColSpanActive(){return this.colSpanActive}isProvidedColGroupsPresent(){var e;return((e=this.colDefCols)==null?void 0:e.treeDepth)>0}setColSpanActive(){this.colSpanActive=this.cols.list.some(e=>e.getColDef().colSpan!=null)}isAutoRowHeightActive(){return this.autoHeightActive}wasAutoRowHeightEverActive(){return this.autoHeightActiveAtLeastOnce}getHeaderRowCount(){return this.cols?this.cols.treeDepth+1:-1}isReady(){return this.ready}isPivotMode(){return this.pivotMode}setPivotMode(e,t){e===this.pivotMode||!this.isPivotSettingAllowed(this.pivotMode)||(this.pivotMode=e,this.ready&&(this.refreshCols(!1),this.visibleColsService.refresh(t),this.eventDispatcher.pivotModeChanged()))}isPivotSettingAllowed(e){return e&&this.gos.get("treeData")?(z("Pivot mode not available with treeData."),!1):!0}isPivotActive(){const e=this.funcColsService.getPivotColumns();return this.pivotMode&&!Tt(e)}recreateColumnDefs(e){this.cols&&(this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e),this.createColsFromColDefs(e))}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e,t,i;Ys(this.context,(e=this.colDefCols)==null?void 0:e.tree),Ys(this.context,(t=this.autoCols)==null?void 0:t.tree),Ys(this.context,(i=this.controlsCols)==null?void 0:i.tree),super.destroy()}getColTree(){return this.cols.tree}getColDefColTree(){return this.colDefCols.tree}getColDefCols(){var e;return(e=this.colDefCols)!=null&&e.list?this.colDefCols.list:null}getCols(){var e;return((e=this.cols)==null?void 0:e.list)??[]}getAllCols(){var i,s,n;const e=this.pivotResultColsService.getPivotResultCols(),t=e==null?void 0:e.list;return[((i=this.colDefCols)==null?void 0:i.list)??[],((s=this.autoCols)==null?void 0:s.list)??[],((n=this.controlsCols)==null?void 0:n.list)??[],t??[]].flat()}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColFromCollection(e,t){if(t==null)return null;const{map:i,list:s}=t;if(typeof e=="string"&&i[e])return i[e];for(let n=0;n<s.length;n++)if(Hg(s[n],e))return s[n];return this.getAutoCol(e)}getAutoCol(e){var t;return((t=this.autoCols)==null?void 0:t.list.find(i=>Hg(i,e)))??null}getAutoCols(){var e;return((e=this.autoCols)==null?void 0:e.list)??null}setColHeaderHeight(e,t){e.setAutoHeaderHeight(t)&&(e.isColumn?this.eventDispatcher.headerHeight(e):this.eventDispatcher.groupHeaderHeight(e))}getGroupRowsHeight(){const e=[],t=this.ctrlsService.getHeaderRowContainerCtrls();for(const i of t){if(!i)continue;const s=i.getGroupRowCount()||0;for(let n=0;n<s;n++){const o=i.getGroupRowCtrlAtIndex(n),r=e[n];if(o){const a=this.getColumnGroupHeaderRowHeight(o);(r==null||a>r)&&(e[n]=a)}}}return e}getColumnGroupHeaderRowHeight(e){const t=this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight();let i=0;const s=e.getHeaderCtrls();for(const n of s){const o=n.getColumn();if(o.isAutoHeaderHeight()){const r=o.getAutoHeaderHeight();r!=null&&r>i&&(i=r)}}return Math.max(t,i)}getColumnHeaderRowHeight(){const e=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),i=this.visibleColsService.getAllCols().filter(s=>s.isAutoHeaderHeight()).map(s=>s.getAutoHeaderHeight()||0);return Math.max(e,...i)}getHeaderHeight(){return this.gos.get("headerHeight")??this.environment.getDefaultHeaderHeight()}getFloatingFiltersHeight(){return this.gos.get("floatingFiltersHeight")??this.getHeaderHeight()}getGroupHeaderHeight(){return this.gos.get("groupHeaderHeight")??this.getHeaderHeight()}getPivotHeaderHeight(){return this.gos.get("pivotHeaderHeight")??this.getHeaderHeight()}getPivotGroupHeaderHeight(){return this.gos.get("pivotGroupHeaderHeight")??this.getGroupHeaderHeight()}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if((e==null?void 0:e.type)!=="fitCellContents")return;const{colIds:t,skipHeader:i}=e;setTimeout(()=>{t?this.columnAutosizeService.autoSizeCols({colKeys:t,skipHeader:i,source:"autosizeColumns"}):this.columnAutosizeService.autoSizeAllColumns("autosizeColumns",i)})}onAutoGroupColumnDefChanged(e){this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e)}onSelectionOptionsChanged(e,t,i){if(typeof e=="string"||typeof t=="string")return;const s=t?Ro(t):void 0,n=e?Ro(e):void 0,o=s!==n,r=t?ra(t):void 0,a=e?ra(e):void 0;(o||r!==a)&&this.refreshAll(i)}};function Bn(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function Gg(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function Hg(e,t){const i=e===t,s=e.getColDef()===t,n=e.getColId()==t;return i||s||n}function cb(e,t){return hs(e,t,(i,s)=>i.getColId()===s.getColId())}var db=class extends G{constructor(){super(...arguments),this.beanName="columnAutosizeService",this.timesDelayed=0}wireBeans(e){this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.animationFrameService=e.animationFrameService,this.autoWidthCalculator=e.autoWidthCalculator,this.eventDispatcher=e.columnEventDispatcher,this.ctrlsService=e.ctrlsService,this.renderStatusService=e.renderStatusService}autoSizeCols(e){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.autoSizeCols(e));return}const{colKeys:t,skipHeader:i,skipHeaderGroups:s,stopAtGroup:n,source:o="api"}=e;if(this.animationFrameService.flushAllFrames(),this.timesDelayed<5&&this.renderStatusService&&!this.renderStatusService.areHeaderCellsRendered()){this.timesDelayed++,setTimeout(()=>this.autoSizeCols(e));return}this.timesDelayed=0;const r=[];let a=-1;const d=i??this.gos.get("skipHeaderOnAutoSize"),h=s??d;for(;a!==0;){a=0;const p=[];t.forEach(f=>{if(!f)return;const m=this.columnModel.getCol(f);if(!m||r.indexOf(m)>=0)return;const v=this.autoWidthCalculator.getPreferredWidthForColumn(m,d);if(v>0){const w=this.normaliseColumnWidth(m,v);m.setActualWidth(w,o),r.push(m),a++}p.push(m)}),p.length&&this.visibleColsService.refresh(o)}h||this.autoSizeColumnGroupsByColumns(t,o,n),this.eventDispatcher.columnResized(r,!0,"autosizeColumns")}autoSizeColumn(e,t,i){e&&this.autoSizeCols({colKeys:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){const s=new Set;this.columnModel.getColsForKeys(e).forEach(a=>{let d=a.getParent();for(;d&&d!=i;)d.isPadding()||s.add(d),d=d.getParent()});let o;const r=[];for(const a of s){for(const d of this.ctrlsService.getHeaderRowContainerCtrls())if(o=d.getHeaderCtrlForColumn(a),o)break;o&&o.resizeLeafColumnsToFit(t)}return r}autoSizeAllColumns(e,t){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.autoSizeAllColumns(e,t));return}const i=this.visibleColsService.getAllCols();this.autoSizeCols({colKeys:i,skipHeader:t,source:e})}normaliseColumnWidth(e,t){const i=e.getMinWidth();t<i&&(t=i);const s=e.getMaxWidth();return e.isGreaterThanMax(t)&&(t=s),t}},ub=class extends G{constructor(){super(...arguments),this.beanName="funcColsService",this.rowGroupCols=[],this.valueCols=[],this.pivotCols=[]}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.aggFuncService=e.aggFuncService,this.visibleColsService=e.visibleColsService}getModifyColumnsNoEventsCallbacks(){return{addGroupCol:e=>this.rowGroupCols.push(e),removeGroupCol:e=>kt(this.rowGroupCols,e),addPivotCol:e=>this.pivotCols.push(e),removePivotCol:e=>kt(this.pivotCols,e),addValueCol:e=>this.valueCols.push(e),removeValueCol:e=>kt(this.valueCols,e)}}getSourceColumnsForGroupColumn(e){const t=e.getColDef().showRowGroup;if(!t)return null;if(t===!0)return this.rowGroupCols.slice(0);const i=this.columnModel.getColDefCol(t);return i?[i]:null}sortRowGroupColumns(e){this.rowGroupCols.sort(e)}sortPivotColumns(e){this.pivotCols.sort(e)}getValueColumns(){return this.valueCols?this.valueCols:[]}getPivotColumns(){return this.pivotCols?this.pivotCols:[]}getRowGroupColumns(){return this.rowGroupCols?this.rowGroupCols:[]}isRowGroupEmpty(){return Tt(this.rowGroupCols)}setColumnAggFunc(e,t,i){if(!e)return;const s=this.columnModel.getColDefCol(e);s&&(s.setAggFunc(t),this.eventDispatcher.columnChanged("columnValueChanged",[s],i))}setRowGroupColumns(e,t){this.setColList(e,this.rowGroupCols,"columnRowGroupChanged",!0,!0,(i,s)=>this.setRowGroupActive(i,s,t),t)}setRowGroupActive(e,t,i){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,i),e&&!this.gos.get("suppressRowGroupHidesColumns")&&this.columnModel.setColsVisible([t],!1,i),!e&&!this.gos.get("suppressMakeColumnVisibleAfterUnGroup")&&this.columnModel.setColsVisible([t],!0,i))}addRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!0,!0,i=>this.setRowGroupActive(!0,i,t),"columnRowGroupChanged",t)}removeRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!1,!0,i=>this.setRowGroupActive(!1,i,t),"columnRowGroupChanged",t)}addPivotColumns(e,t){this.updateColList(e,this.pivotCols,!0,!1,i=>i.setPivotActive(!0,t),"columnPivotChanged",t)}setPivotColumns(e,t){this.setColList(e,this.pivotCols,"columnPivotChanged",!0,!1,(i,s)=>{s.setPivotActive(i,t)},t)}removePivotColumns(e,t){this.updateColList(e,this.pivotCols,!1,!1,i=>i.setPivotActive(!1,t),"columnPivotChanged",t)}setValueColumns(e,t){this.setColList(e,this.valueCols,"columnValueChanged",!1,!1,(i,s)=>this.setValueActive(i,s,t),t)}setValueActive(e,t,i){if(e!==t.isValueActive()&&(t.setValueActive(e,i),e&&!t.getAggFunc()&&this.aggFuncService)){const s=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(s)}}addValueColumns(e,t){this.updateColList(e,this.valueCols,!0,!1,i=>this.setValueActive(!0,i,t),"columnValueChanged",t)}removeValueColumns(e,t){this.updateColList(e,this.valueCols,!1,!1,i=>this.setValueActive(!1,i,t),"columnValueChanged",t)}moveRowGroupColumn(e,t,i){if(this.isRowGroupEmpty())return;const s=this.rowGroupCols[e],n=this.rowGroupCols.slice(e,t);this.rowGroupCols.splice(e,1),this.rowGroupCols.splice(t,0,s),this.eventDispatcher.rowGroupChanged(n,i)}setColList(e,t,i,s,n,o,r){const a=this.columnModel.getCols();if(Tt(a))return;const d=new Map;t.forEach((p,f)=>d.set(p,f)),t.length=0,q(e)&&e.forEach(p=>{const f=this.columnModel.getColDefCol(p);f&&t.push(f)}),t.forEach((p,f)=>{const m=d.get(p);if(m===void 0){d.set(p,0);return}s&&m!==f||d.delete(p)}),(this.columnModel.getColDefCols()||[]).forEach(p=>{const f=t.indexOf(p)>=0;o(f,p)}),n&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(r),this.eventDispatcher.columnChanged(i,[...d.keys()],r)}updateColList(e,t,i,s,n,o,r){if(!e||Tt(e))return;let a=!1;const d=new Set;e.forEach(h=>{if(!h)return;const p=this.columnModel.getColDefCol(h);if(p){if(d.add(p),i){if(t.indexOf(p)>=0)return;t.push(p)}else{const f=t.indexOf(p);if(f<0)return;for(let m=f+1;m<t.length;m++)d.add(t[m]);kt(t,p)}n(p),a=!0}}),a&&(s&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(r),this.eventDispatcher.genericColumnEvent(o,Array.from(d),r))}extractCols(e,t){this.extractRowGroupCols(e,t),this.extractPivotCols(e,t),this.extractValueCols(e,t)}extractValueCols(e,t){this.valueCols=this.extractColsCommon(t,this.valueCols,(i,s)=>i.setValueActive(s,e),()=>{},()=>{},i=>{const s=i.aggFunc;if(s===null||s==="")return null;if(s!==void 0)return!!s},i=>i.initialAggFunc!=null&&i.initialAggFunc!=""),this.valueCols.forEach(i=>{const s=i.getColDef();s.aggFunc!=null&&s.aggFunc!=""?i.setAggFunc(s.aggFunc):i.getAggFunc()||i.setAggFunc(s.initialAggFunc)})}extractRowGroupCols(e,t){this.rowGroupCols=this.extractColsCommon(t,this.rowGroupCols,(i,s)=>i.setRowGroupActive(s,e),i=>i.rowGroupIndex,i=>i.initialRowGroupIndex,i=>i.rowGroup,i=>i.initialRowGroup)}extractPivotCols(e,t){this.pivotCols=this.extractColsCommon(t,this.pivotCols,(i,s)=>i.setPivotActive(s,e),i=>i.pivotIndex,i=>i.initialPivotIndex,i=>i.pivot,i=>i.initialPivot)}extractColsCommon(e=[],t=[],i,s,n,o,r){const a=[],d=[];(this.columnModel.getColDefCols()||[]).forEach(m=>{const v=e.indexOf(m)<0,w=m.getColDef(),S=Fd(o(w)),b=Fd(r(w)),R=_n(s(w)),x=_n(n(w));let T;S!==void 0?T=S:R!==void 0?R===null?T=!1:T=R>=0:v?b!==void 0?T=b:x!==void 0?T=x!=null&&x>=0:T=!1:T=t.indexOf(m)>=0,T&&((v?R!=null||x!=null:R!=null)?a.push(m):d.push(m))});const p=m=>{const v=s(m.getColDef()),w=n(m.getColDef());return v??w};a.sort((m,v)=>{const w=p(m),S=p(v);return w===S?0:w<S?-1:1});const f=[].concat(a);return t.forEach(m=>{d.indexOf(m)>=0&&f.push(m)}),d.forEach(m=>{f.indexOf(m)<0&&f.push(m)}),t.forEach(m=>{f.indexOf(m)<0&&i(m,!1)}),f.forEach(m=>{t.indexOf(m)<0&&i(m,!0)}),f}generateColumnStateForRowGroupAndPivotIndexes(e,t){const i={},s=(n,o,r,a,d,h)=>{const p=this.columnModel.getColDefCols();if(!o.length||!p)return[];const f=Object.keys(n),m=new Set(f),v=new Set(f),w=new Set(o.map(L=>{const A=L.getColId();return v.delete(A),A}).concat(f)),S=[],b={};let R=0;for(let L=0;L<p.length;L++){const A=p[L].getColId();w.has(A)&&(S.push(A),b[A]=R++)}let x=1e3,T=!1,I=0;const V=L=>{const A=b[L];for(let k=I;k<A;k++){const N=S[k];v.has(N)&&(n[N][d]=x++,v.delete(N))}I=A};o.forEach(L=>{const A=L.getColId();if(m.has(A))V(A),n[A][d]=x++;else{const k=L.getColDef();(k[d]===null||k[d]===void 0&&k[h]==null)&&(T||(k[r]||k[r]===void 0&&k[a]?V(A):(v.forEach(U=>{n[U][d]=x+b[U]}),x+=S.length,T=!0)),i[A]||(i[A]={colId:A}),i[A][d]=x++)}})};return s(e,this.rowGroupCols,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),s(t,this.pivotCols,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(i)}},hb=class extends G{constructor(){super(...arguments),this.beanName="columnApplyStateService"}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.sortController=e.sortController,this.columnGetStateService=e.columnGetStateService,this.funcColsService=e.funcColsService,this.visibleColsService=e.visibleColsService,this.columnAnimationService=e.columnAnimationService,this.pivotResultColsService=e.pivotResultColsService}applyColumnState(e,t){const i=this.columnModel.getColDefCols()||[];if(Tt(i))return!1;if(e&&e.state&&!e.state.forEach)return z("applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state."),!1;const s=this.funcColsService.getModifyColumnsNoEventsCallbacks(),n=(a,d,h)=>{const p=this.compareColumnStatesAndDispatchEvents(t),f=d.slice(),m={},v={},w=[],S=[];let b=0;const R=this.funcColsService.getRowGroupColumns().slice(),x=this.funcColsService.getPivotColumns().slice();a.forEach(L=>{const A=L.colId||"";if(A.startsWith(ua)){w.push(L),S.push(L);return}const N=h(A);N?(this.syncColumnWithStateItem(N,L,e.defaultState,m,v,!1,t,s),kt(f,N)):(S.push(L),b+=1)});const T=L=>this.syncColumnWithStateItem(L,null,e.defaultState,m,v,!1,t,s);f.forEach(T),this.funcColsService.sortRowGroupColumns(Wg.bind(this,m,R)),this.funcColsService.sortPivotColumns(Wg.bind(this,v,x)),this.columnModel.refreshCols(!1);const V=(this.columnModel.getAutoCols()||[]).slice();return w.forEach(L=>{const A=this.columnModel.getAutoCol(L.colId);kt(V,A),this.syncColumnWithStateItem(A,L,e.defaultState,null,null,!0,t,s)}),V.forEach(T),this.orderLiveColsLikeState(e),this.visibleColsService.refresh(t),this.eventDispatcher.everythingChanged(t),p(),{unmatchedAndAutoStates:S,unmatchedCount:b}};this.columnAnimationService.start();let{unmatchedAndAutoStates:o,unmatchedCount:r}=n(e.state||[],i,a=>this.columnModel.getColDefCol(a));if(o.length>0||q(e.defaultState)){const a=this.pivotResultColsService.getPivotResultCols(),d=a==null?void 0:a.list;r=n(o,d||[],h=>this.pivotResultColsService.getPivotResultCol(h)).unmatchedCount}return this.columnAnimationService.finish(),r===0}resetColumnState(e){const t=this.columnModel.getColDefCols();if(Tt(t))return;const i=this.columnModel.getColDefColTree(),s=_d(i),n=[];let o=1e3,r=1e3,a=[];const d=this.columnModel.getAutoCols();d&&(a=a.concat(d)),s&&(a=a.concat(s)),a.forEach(h=>{const p=this.getColumnStateFromColDef(h);Ve(p.rowGroupIndex)&&p.rowGroup&&(p.rowGroupIndex=o++),Ve(p.pivotIndex)&&p.pivot&&(p.pivotIndex=r++),n.push(p)}),this.applyColumnState({state:n,applyOrder:!0},e)}getColumnStateFromColDef(e){const t=(w,S)=>w??S??null,i=e.getColDef(),s=t(i.sort,i.initialSort),n=t(i.sortIndex,i.initialSortIndex),o=t(i.hide,i.initialHide),r=t(i.pinned,i.initialPinned),a=t(i.width,i.initialWidth),d=t(i.flex,i.initialFlex);let h=t(i.rowGroupIndex,i.initialRowGroupIndex),p=t(i.rowGroup,i.initialRowGroup);h==null&&(p==null||p==!1)&&(h=null,p=null);let f=t(i.pivotIndex,i.initialPivotIndex),m=t(i.pivot,i.initialPivot);f==null&&(m==null||m==!1)&&(f=null,m=null);const v=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:s,sortIndex:n,hide:o,pinned:r,width:a,flex:d,rowGroup:p,rowGroupIndex:h,pivot:m,pivotIndex:f,aggFunc:v}}syncColumnWithStateItem(e,t,i,s,n,o,r,a){if(!e)return;const d=(I,V)=>{const L={value1:void 0,value2:void 0};let A=!1;return t&&(t[I]!==void 0&&(L.value1=t[I],A=!0),q(V)&&t[V]!==void 0&&(L.value2=t[V],A=!0)),!A&&i&&(i[I]!==void 0&&(L.value1=i[I]),q(V)&&i[V]!==void 0&&(L.value2=i[V])),L},h=d("hide").value1;h!==void 0&&e.setVisible(!h,r);const p=d("pinned").value1;p!==void 0&&e.setPinned(p);const f=e.getColDef().minWidth??this.gos.environment.getDefaultColumnMinWidth(),m=d("flex").value1;if(m!==void 0&&e.setFlex(m),m==null){const I=d("width").value1;I!=null&&f!=null&&I>=f&&e.setActualWidth(I,r)}const v=d("sort").value1;v!==void 0&&(v==="desc"||v==="asc"?e.setSort(v,r):e.setSort(void 0,r));const w=d("sortIndex").value1;if(w!==void 0&&e.setSortIndex(w),o||!e.isPrimary())return;const S=d("aggFunc").value1;S!==void 0&&(typeof S=="string"?(e.setAggFunc(S),e.isValueActive()||(e.setValueActive(!0,r),a.addValueCol(e))):(q(S)&&z("stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON."),e.isValueActive()&&(e.setValueActive(!1,r),a.removeValueCol(e))));const{value1:b,value2:R}=d("rowGroup","rowGroupIndex");(b!==void 0||R!==void 0)&&(typeof R=="number"||b?(e.isRowGroupActive()||(e.setRowGroupActive(!0,r),a.addGroupCol(e)),s&&typeof R=="number"&&(s[e.getId()]=R)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,r),a.removeGroupCol(e)));const{value1:x,value2:T}=d("pivot","pivotIndex");(x!==void 0||T!==void 0)&&(typeof T=="number"||x?(e.isPivotActive()||(e.setPivotActive(!0,r),a.addPivotCol(e)),n&&typeof T=="number"&&(n[e.getId()]=T)):e.isPivotActive()&&(e.setPivotActive(!1,r),a.removePivotCol(e)))}orderLiveColsLikeState(e){if(!e.applyOrder||!e.state)return;const t=[];e.state.forEach(i=>{i.colId!=null&&t.push(i.colId)}),this.columnModel.sortColsLikeKeys(t)}compareColumnStatesAndDispatchEvents(e){const t={rowGroupColumns:this.funcColsService.getRowGroupColumns().slice(),pivotColumns:this.funcColsService.getPivotColumns().slice(),valueColumns:this.funcColsService.getValueColumns().slice()},i=this.columnGetStateService.getColumnState(),s={};return i.forEach(n=>{s[n.colId]=n}),()=>{const n=this.columnModel.getAllCols(),o=(S,b,R,x)=>{const T=b.map(x),I=R.map(x);if(hs(T,I))return;const L=new Set(b);R.forEach(k=>{L.delete(k)||L.add(k)});const A=[...L];this.eventService.dispatchEvent({type:S,columns:A,column:A.length===1?A[0]:null,source:e})},r=S=>{const b=[];return n.forEach(R=>{const x=s[R.getColId()];x&&S(x,R)&&b.push(R)}),b},a=S=>S.getColId();o("columnRowGroupChanged",t.rowGroupColumns,this.funcColsService.getRowGroupColumns(),a),o("columnPivotChanged",t.pivotColumns,this.funcColsService.getPivotColumns(),a);const h=r((S,b)=>{const R=S.aggFunc!=null,x=R!=b.isValueActive(),T=R&&S.aggFunc!=b.getAggFunc();return x||T});h.length>0&&this.eventDispatcher.columnChanged("columnValueChanged",h,e);const p=(S,b)=>S.width!=b.getActualWidth();this.eventDispatcher.columnResized(r(p),!0,e);const f=(S,b)=>S.pinned!=b.getPinned();this.eventDispatcher.columnPinned(r(f),e);const m=(S,b)=>S.hide==b.isVisible();this.eventDispatcher.columnVisible(r(m),e);const w=r((S,b)=>S.sort!=b.getSort()||S.sortIndex!=b.getSortIndex());w.length>0&&this.sortController.dispatchSortChangedEvents(e,w),this.normaliseColumnMovedEventForColumnState(i,e)}}normaliseColumnMovedEventForColumnState(e,t){const i=this.columnGetStateService.getColumnState(),s={};i.forEach(d=>s[d.colId]=d);const n={};e.forEach(d=>{s[d.colId]&&(n[d.colId]=!0)});const o=e.filter(d=>n[d.colId]),r=i.filter(d=>n[d.colId]),a=[];r.forEach((d,h)=>{const p=o&&o[h];if(p&&p.colId!==d.colId){const f=this.columnModel.getCol(p.colId);f&&a.push(f)}}),a.length&&this.eventDispatcher.columnMoved({movedColumns:a,source:t,finished:!0})}},Wg=(e,t,i,s)=>{const n=e[i.getId()],o=e[s.getId()],r=n!=null,a=o!=null;if(r&&a)return n-o;if(r)return-1;if(a)return 1;const d=t.indexOf(i),h=t.indexOf(s),p=d>=0,f=h>=0;return p&&f?d-h:p?-1:1},pb=class extends G{constructor(){super(...arguments),this.beanName="columnMoveService"}wireBeans(e){this.columnModel=e.columnModel,this.columnAnimationService=e.columnAnimationService,this.eventDispatcher=e.columnEventDispatcher}moveColumnByIndex(e,t,i){const s=this.columnModel.getCols();if(!s)return;const n=s[e];this.moveColumns([n],t,i)}moveColumns(e,t,i,s=!0){const n=this.columnModel.getCols();if(!n)return;if(t>n.length-e.length){z("tried to insert columns in invalid location, toIndex = ",t),z("remember that you should not count the moving columns when calculating the new index");return}this.columnAnimationService.start();const o=this.columnModel.getColsForKeys(e);this.doesMovePassRules(o,t)&&(this.columnModel.moveInCols(o,t,i),this.eventDispatcher.columnMoved({movedColumns:o,source:i,toIndex:t,finished:s})),this.columnAnimationService.finish()}doesMovePassRules(e,t){const i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){return!(!this.doesMovePassMarryChildren(e)||!this.doesMovePassLockedPositions(e))}getProposedColumnOrder(e,t){const s=this.columnModel.getCols().slice();return Ig(s,e,t),s}doesMovePassLockedPositions(e){const t=o=>o?o==="left"||o===!0?-1:1:0,i=this.gos.get("enableRtl");let s=i?1:-1,n=!0;return e.forEach(o=>{const r=t(o.getColDef().lockPosition);i?r>s&&(n=!1):r<s&&(n=!1),s=r}),n}doesMovePassMarryChildren(e){let t=!0;const i=this.columnModel.getColTree();return As(null,i,s=>{if(!zt(s))return;const n=s,o=n.getColGroupDef();if(!(o&&o.marryChildren))return;const a=[];n.getLeafColumns().forEach(m=>{const v=e.indexOf(m);a.push(v)});const d=Math.max.apply(Math,a),h=Math.min.apply(Math,a),p=d-h,f=n.getLeafColumns().length-1;p>f&&(t=!1)}),t}placeLockedColumns(e){const t=[],i=[],s=[];return e.forEach(o=>{const r=o.getColDef().lockPosition;r==="right"?s.push(o):r==="left"||r===!0?t.push(o):i.push(o)}),this.gos.get("enableRtl")?[...s,...i,...t]:[...t,...i,...s]}},gb=/[&<>"']/g,fb={"&":"&","<":"<",">":">",'"':""","'":"'"};function ps(e,t){if(e==null)return null;const i=e.toString().toString();return t?i:i.replace(gb,s=>fb[s])}function mb(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,i=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(i,"$1 $2$3").replace(/\./g," ").split(" ").map(n=>n.substring(0,1).toUpperCase()+(n.length>1?n.substring(1,n.length):"")).join(" ")}function Cb(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}var vb=class extends G{constructor(){super(...arguments),this.beanName="columnNameService"}wireBeans(e){this.expressionService=e.expressionService,this.funcColsService=e.funcColsService,this.columnModel=e.columnModel}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;const s=this.getHeaderName(e.getColDef(),e,null,null,t);return i?this.wrapHeaderNameWithAggFunc(e,s):s}getDisplayNameForProvidedColumnGroup(e,t,i){const s=t?t.getColGroupDef():null;return s?this.getHeaderName(s,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,s,n){const o=e.headerValueGetter;if(o){const r=this.gos.addGridCommonParams({colDef:e,column:t,columnGroup:i,providedColumnGroup:s,location:n});return typeof o=="function"?o(r):typeof o=="string"?this.expressionService.evaluate(o,r):(z("headerValueGetter must be a function or a string"),"")}else{if(e.headerName!=null)return e.headerName;if(e.field)return mb(e.field)}return""}wrapHeaderNameWithAggFunc(e,t){if(this.gos.get("suppressAggFuncInHeader"))return t;const i=e.getColDef().pivotValueColumn,s=q(i);let n=null,o;if(s){const r=this.funcColsService.getValueColumns(),a=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&r.length===1,d=e.getColDef().pivotTotalColumnIds!==void 0;if(a&&!d)return t;n=i?i.getAggFunc():null,o=!0}else{const r=e.isValueActive(),a=this.columnModel.isPivotMode()||!this.funcColsService.isRowGroupEmpty();r&&a?(n=e.getAggFunc(),o=!0):o=!1}if(o){const r=typeof n=="string"?n:"func";return`${this.localeService.getLocaleTextFunc()(r,r)}(${t})`}return t}},wb=class extends G{constructor(){super(...arguments),this.beanName="pivotResultColsService"}wireBeans(e){this.context=e.context,this.columnModel=e.columnModel,this.columnFactory=e.columnFactory,this.visibleColsService=e.visibleColsService}destroy(){var e;Ys(this.context,(e=this.pivotResultCols)==null?void 0:e.tree),super.destroy()}isPivotResultColsPresent(){return this.pivotResultCols!=null}lookupPivotResultCol(e,t){if(this.pivotResultCols==null)return null;const i=this.columnModel.getColDefCol(t);let s=null;return this.pivotResultCols.list.forEach(n=>{const o=n.getColDef().pivotKeys,r=n.getColDef().pivotValueColumn;hs(o,e)&&r===i&&(s=n)}),s}getPivotResultCols(){return this.pivotResultCols}getPivotResultCol(e){return this.pivotResultCols?this.columnModel.getColFromCollection(e,this.pivotResultCols):null}setPivotResultCols(e,t){var i,s;if(this.columnModel.isReady()&&!(e==null&&this.pivotResultCols==null)){if(e){this.processPivotResultColDef(e);const n=this.columnFactory.createColumnTree(e,!1,((i=this.pivotResultCols)==null?void 0:i.tree)||this.previousPivotResultCols||void 0,t);Ys(this.context,(s=this.pivotResultCols)==null?void 0:s.tree,n.columnTree);const o=n.columnTree,r=n.treeDept,a=_d(o),d={};this.pivotResultCols={tree:o,treeDepth:r,list:a,map:d},this.pivotResultCols.list.forEach(p=>this.pivotResultCols.map[p.getId()]=p);const h=!!this.previousPivotResultCols;this.previousPivotResultCols=null,this.columnModel.refreshCols(!h)}else this.previousPivotResultCols=this.pivotResultCols?this.pivotResultCols.tree:null,this.pivotResultCols=null,this.columnModel.refreshCols(!1);this.visibleColsService.refresh(t)}}processPivotResultColDef(e){const t=this.gos.get("processPivotResultColDef"),i=this.gos.get("processPivotResultColGroupDef");if(!t&&!i)return;const s=n=>{n.forEach(o=>{if(q(o.children)){const a=o;i&&i(a),s(a.children)}else t&&t(o)})};e&&s(e)}},Sb=class extends G{constructor(){super(...arguments),this.beanName="columnSizeService"}wireBeans(e){this.columnModel=e.columnModel,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher,this.visibleColsService=e.visibleColsService,this.ctrlsService=e.ctrlsService}setColumnWidths(e,t,i,s){const n=[];e.forEach(o=>{const r=this.columnModel.getColDefCol(o.key)||this.columnModel.getCol(o.key);if(!r)return;if(n.push({width:o.newWidth,ratios:[1],columns:[r]}),this.gos.get("colResizeDefault")==="shift"&&(t=!t),t){const d=this.visibleColsService.getColAfter(r);if(!d)return;const h=r.getActualWidth()-o.newWidth,p=d.getActualWidth()+h;n.push({width:p,ratios:[1],columns:[d]})}}),n.length!==0&&this.resizeColumnSets({resizeSets:n,finished:i,source:s})}resizeColumnSets(e){const{resizeSets:t,finished:i,source:s}=e;if(!(!t||t.every(p=>this.checkMinAndMaxWidthsForSet(p)))){if(i){const p=t&&t.length>0?t[0].columns:null;this.eventDispatcher.columnResized(p,i,s)}return}const o=[],r=[];t.forEach(p=>{const{width:f,columns:m,ratios:v}=p,w={},S={};m.forEach(x=>r.push(x));let b=!0,R=0;for(;b;){if(R++,R>1e3){We("infinite loop in resizeColumnSets");break}b=!1;const x=[];let T=0,I=f;m.forEach((L,A)=>{if(S[L.getId()])I-=w[L.getId()];else{x.push(L);const N=v[A];T+=N}});const V=1/T;x.forEach((L,A)=>{const k=A===x.length-1;let N;k?N=I:(N=Math.round(v[A]*f*V),I-=N);const $=L.getMinWidth(),U=L.getMaxWidth();N<$?(N=$,S[L.getId()]=!0,b=!0):U>0&&N>U&&(N=U,S[L.getId()]=!0,b=!0),w[L.getId()]=N})}m.forEach(x=>{const T=w[x.getId()];x.getActualWidth()!==T&&(x.setActualWidth(T,s),o.push(x))})});const a=o.length>0;let d=[];a&&(d=this.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0}),this.visibleColsService.setLeftValues(s),this.visibleColsService.updateBodyWidths(),this.columnViewportService.checkViewportColumns());const h=r.concat(d);(a||i)&&this.eventDispatcher.columnResized(h,i,s,d)}checkMinAndMaxWidthsForSet(e){const{columns:t,width:i}=e;let s=0,n=0,o=!0;t.forEach(d=>{const h=d.getMinWidth();s+=h||0;const p=d.getMaxWidth();p>0?n+=p:o=!1});const r=i>=s,a=!o||i<=n;return r&&a}refreshFlexedColumns(e={}){const t=e.source?e.source:"flex";if(e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];const i=this.visibleColsService.getCenterCols();let s=-1;if(e.resizingCols){const m=new Set(e.resizingCols);for(let v=i.length-1;v>=0;v--)if(m.has(i[v])){s=v;break}}let n=0,o=[],r=0,a=0;for(let m=0;m<i.length;m++)i[m].getFlex()&&m>s?(o.push(i[m]),a+=i[m].getFlex(),r+=i[m].getMinWidth()):n+=i[m].getActualWidth();if(!o.length)return[];let d=[];n+r>this.flexViewportWidth&&(o.forEach(m=>m.setActualWidth(m.getMinWidth(),t)),d=o,o=[]);const h=[];let p;e:for(;;){p=this.flexViewportWidth-n;const m=p/a;for(let v=0;v<o.length;v++){const w=o[v],S=m*w.getFlex();let b=0;const R=w.getMinWidth(),x=w.getMaxWidth();if(S<R?b=R:S>x&&(b=x),b){w.setActualWidth(b,t),kg(o,w),a-=w.getFlex(),d.push(w),n+=w.getActualWidth();continue e}h[v]=Math.floor(S)}break}let f=p;return o.forEach((m,v)=>{const w=v<o.length-1?Math.min(h[v],f):Math.max(h[v],f);m.setActualWidth(w,t),d.push(m),f-=h[v]}),e.skipSetLeft||this.visibleColsService.setLeftValues(t),e.updateBodyWidths&&this.visibleColsService.updateBodyWidths(),e.fireResizedEvent&&this.eventDispatcher.columnResized(d,!0,t,o),o}sizeColumnsToFit(e,t="sizeColumnsToFit",i,s){var m;if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,i,s));return}const n={};s&&((m=s==null?void 0:s.columnLimits)==null||m.forEach(({key:v,...w})=>{n[typeof v=="string"?v:v.getColId()]=w}));const o=this.visibleColsService.getAllCols(),r=e===Ts(o);if(e<=0||!o.length||r)return;const a=[],d=[];o.forEach(v=>{v.getColDef().suppressSizeToFit===!0?d.push(v):a.push(v)});const h=a.slice(0);let p=!1;const f=v=>{kt(a,v),d.push(v)};for(a.forEach(v=>{v.resetActualWidth(t);const w=n==null?void 0:n[v.getId()],S=(w==null?void 0:w.minWidth)??(s==null?void 0:s.defaultMinWidth),b=(w==null?void 0:w.maxWidth)??(s==null?void 0:s.defaultMaxWidth),R=v.getActualWidth();typeof S=="number"&&R<S?v.setActualWidth(S,t,!0):typeof b=="number"&&R>b&&v.setActualWidth(b,t,!0)});!p;){p=!0;const v=e-Ts(d);if(v<=0)a.forEach(w=>{var b;const S=((b=n==null?void 0:n[w.getId()])==null?void 0:b.minWidth)??(s==null?void 0:s.defaultMinWidth);if(typeof S=="number"){w.setActualWidth(S,t,!0);return}w.setMinimum(t)});else{const w=v/Ts(a);let S=v;for(let b=a.length-1;b>=0;b--){const R=a[b],x=n==null?void 0:n[R.getId()],T=(x==null?void 0:x.minWidth)??(s==null?void 0:s.defaultMinWidth),I=(x==null?void 0:x.maxWidth)??(s==null?void 0:s.defaultMaxWidth),V=R.getMinWidth(),L=R.getMaxWidth(),A=typeof T=="number"&&T>V?T:V,k=typeof I=="number"&&I<L?I:L;let N=Math.round(R.getActualWidth()*w);N<A?(N=A,f(R),p=!1):N>k?(N=k,f(R),p=!1):b===0&&(N=S),R.setActualWidth(N,t,!0),S-=N}}}h.forEach(v=>{v.fireColumnWidthChangedEvent(t)}),this.visibleColsService.setLeftValues(t),this.visibleColsService.updateBodyWidths(),!i&&this.eventDispatcher.columnResized(h,!0,t)}applyAutosizeStrategy(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout(()=>{if(t==="fitGridWidth"){const{columnLimits:i,defaultMinWidth:s,defaultMaxWidth:n}=e,o=i==null?void 0:i.map(({colId:r,minWidth:a,maxWidth:d})=>({key:r,minWidth:a,maxWidth:d}));this.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:s,defaultMaxWidth:n,columnLimits:o})}else t==="fitProvidedWidth"&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}};function zg(e,t){return e+"_"+t}function mt(e){return e instanceof Ug}var Ug=class extends G{constructor(e,t,i,s){super(),this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.groupId=t,this.partId=i,this.providedColumnGroup=e,this.pinned=s}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}setParent(e){this.parent=e}getUniqueId(){return zg(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{mt(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=he(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;return this.displayedChildren&&this.displayedChildren.forEach(t=>{e+=t.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){var e;return!!((e=this.getColGroupDef())!=null&&e.autoHeaderHeight)}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{Xs(t)?e.push(t):mt(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{Xs(t)?e.push(t):mt(t)&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return!this.isPadding()||!e||!e.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}this.children.forEach(i=>{if(mt(i)&&(!i.displayedChildren||!i.displayedChildren.length))return;switch(i.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(i);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(i);break;default:this.displayedChildren.push(i);break}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},$g=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let i;return typeof t!="number"?i=0:i=t+1,this.existingIds[e]=i,i}},yb=class extends G{constructor(){super(...arguments),this.beanName="visibleColsService",this.colsAndGroupsMap={},this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0}wireBeans(e){this.columnModel=e.columnModel,this.columnSizeService=e.columnSizeService,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher}refresh(e,t=!1){t||this.buildTrees(),this.updateOpenClosedVisibilityInColumnGroups(),this.columnsLeft=Wd(this.treeLeft),this.columnsCenter=Wd(this.treeCenter),this.columnsRight=Wd(this.treeRight),this.joinColsAriaOrder(),this.joinCols(),this.setLeftValues(e),this.autoHeightCols=this.columns.filter(i=>i.isAutoHeight()),this.columnSizeService.refreshFlexedColumns(),this.updateBodyWidths(),this.columnViewportService.checkViewportColumns(!1),this.setFirstRightAndLastLeftPinned(e),this.eventDispatcher.visibleCols(e)}updateBodyWidths(){const e=Ts(this.columnsCenter),t=Ts(this.columnsLeft),i=Ts(this.columnsRight);this.bodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i,this.eventService.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventService.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e){let t,i;this.gos.get("enableRtl")?(t=this.columnsLeft?this.columnsLeft[0]:null,i=this.columnsRight?he(this.columnsRight):null):(t=this.columnsLeft?he(this.columnsLeft):null,i=this.columnsRight?this.columnsRight[0]:null),this.columnModel.getCols().forEach(s=>{s.setLastLeftPinned(s===t,e),s.setFirstRightPinned(s===i,e)})}buildTrees(){const e=this.columnModel.getColsToShow(),t=e.filter(o=>o.getPinned()=="left"),i=e.filter(o=>o.getPinned()=="right"),s=e.filter(o=>o.getPinned()!="left"&&o.getPinned()!="right"),n=new $g;this.treeLeft=this.createGroups({columns:t,idCreator:n,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=this.createGroups({columns:i,idCreator:n,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=this.createGroups({columns:s,idCreator:n,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.ariaOrderColumns=[]}joinColsAriaOrder(){const e=this.columnModel.getCols(),t=[],i=[],s=[];for(const n of e){const o=n.getPinned();o?o===!0||o==="left"?t.push(n):s.push(n):i.push(n)}this.ariaOrderColumns=t.concat(i).concat(s)}getAriaColIndex(e){let t;return mt(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}getAllAutoHeightCols(){return this.autoHeightCols}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(t=>{mt(t)&&t.checkLeft()})})}setLeftValuesOfCols(e){if(!this.columnModel.getColDefCols())return;const i=this.columnModel.getCols().slice(0),s=this.gos.get("enableRtl");[this.columnsLeft,this.columnsRight,this.columnsCenter].forEach(n=>{if(s){let o=Ts(n);n.forEach(r=>{o-=r.getActualWidth(),r.setLeft(o,e)})}else{let o=0;n.forEach(r=>{r.setLeft(o,e),o+=r.getActualWidth()})}Zy(i,n)}),i.forEach(n=>{n.setLeft(null,e)})}joinCols(){this.gos.get("enableRtl")?this.columns=this.columnsRight.concat(this.columnsCenter).concat(this.columnsLeft):this.columns=this.columnsLeft.concat(this.columnsCenter).concat(this.columnsRight)}getColsCenter(){return this.columnsCenter}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}getTreeLeft(){return this.treeLeft}getTreeRight(){return this.treeRight}getTreeCenter(){return this.treeCenter}getAllCols(){return this.columns}isColDisplayed(e){return this.getAllCols().indexOf(e)>=0}getLeftColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsLeft):this.columnsLeft}getRightColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsRight):this.columnsRight}getColsForRow(e,t,i,s){const n=[];let o=null;for(let r=0;r<t.length;r++){const a=t[r],d=t.length-r,h=Math.min(a.getColSpan(e),d),p=[a];if(h>1){const m=h-1;for(let v=1;v<=m;v++)p.push(t[r+v]);r+=m}let f;i?(f=!1,p.forEach(m=>{i(m)&&(f=!0)})):f=!0,f&&(n.length===0&&o&&(s&&s(a))&&n.push(o),n.push(a)),o=a}return n}getBodyContainerWidth(){return this.bodyWidth}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getCenterCols(){return this.columnsCenter}getLeftCols(){return this.columnsLeft}getRightCols(){return this.columnsRight}getColBefore(e){const t=this.getAllCols(),i=t.indexOf(e);return i>0?t[i-1]:null}getGroupAtDirection(e,t){const i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),s=e.getDisplayedLeafColumns(),n=t==="After"?he(s):s[0],o=`getCol${t}`;for(;;){const r=this[o](n);if(!r)return null;const a=this.getColGroupAtLevel(r,i);if(a!==e)return a}}getColGroupAtLevel(e,t){let i=e.getParent(),s,n;for(;s=i.getProvidedColumnGroup().getLevel(),n=i.getPaddingLevel(),!(s+n<=t);)i=i.getParent();return i}isPinningLeft(){return this.columnsLeft.length>0}isPinningRight(){return this.columnsRight.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};Gn(this.treeCenter,!1,e),Gn(this.treeLeft,!1,e),Gn(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}updateOpenClosedVisibilityInColumnGroups(){const e=this.getAllTrees();Gn(e,!1,t=>{mt(t)&&t.calculateDisplayedColumns()})}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["getLeftCols","getCenterCols","getRightCols"];e&&t.reverse();for(let i=0;i<t.length;i++){const s=this[t[i]]();if(s.length)return e?he(s):s[0]}return null}getColumnGroup(e,t){if(!e)return null;if(mt(e))return e;const i=this.getAllTrees(),s=typeof t=="number";let n=null;return Gn(i,!1,o=>{if(mt(o)){const r=o;let a;s?a=e===r.getGroupId()&&t===r.getPartId():a=e===r.getGroupId(),a&&(n=r)}}),n}getColAfter(e){const t=this.getAllCols(),i=t.indexOf(e);return i<t.length-1?t[i+1]:null}isBodyWidthDirty(){return this.bodyWidthDirty}setBodyWidthDirty(){this.bodyWidthDirty=!0}getColsLeftWidth(){return Ts(this.columnsLeft)}getDisplayedColumnsRightWidth(){return Ts(this.columnsRight)}isColAtEdge(e,t){const i=this.getAllCols();if(!i.length)return!1;const s=t==="first";let n;if(mt(e)){const o=e.getDisplayedLeafColumns();if(!o.length)return!1;n=s?o[0]:he(o)}else n=e;return(s?i[0]:he(i))===n}createGroups(e){const{columns:t,idCreator:i,pinned:s,oldDisplayedGroups:n,isStandaloneStructure:o}=e,r=this.mapOldGroupsById(n),a=[];let d=t;for(;d.length;){const h=d;d=[];let p=0;const f=m=>{const v=p;p=m;const w=h[v],b=(mt(w)?w.getProvidedColumnGroup():w).getOriginalParent();if(b==null){for(let x=v;x<m;x++)a.push(h[x]);return}const R=this.createColGroup(b,i,r,s,o);for(let x=v;x<m;x++)R.addChild(h[x]);d.push(R)};for(let m=1;m<h.length;m++){const v=h[m],S=(mt(v)?v.getProvidedColumnGroup():v).getOriginalParent(),b=h[p],x=(mt(b)?b.getProvidedColumnGroup():b).getOriginalParent();S!==x&&f(m)}p<h.length&&f(h.length)}return o||this.setupParentsIntoCols(a,null),a}createColGroup(e,t,i,s,n){const o=e.getGroupId(),r=t.getInstanceIdForKey(o),a=zg(o,r);let d=i[a];return d&&d.getProvidedColumnGroup()!==e&&(d=null),q(d)?d.reset():(d=new Ug(e,o,r,s),n||this.createBean(d)),d}mapOldGroupsById(e){const t={},i=s=>{s.forEach(n=>{if(mt(n)){const o=n;t[n.getUniqueId()]=o,i(o.getChildren())}})};return e&&i(e),t}setupParentsIntoCols(e,t){e.forEach(i=>{if(i.setParent(t),mt(i)){const s=i;this.setupParentsIntoCols(s.getChildren(),s)}})}};function Gn(e,t,i){if(e)for(let s=0;s<e.length;s++){const n=e[s];if(mt(n)){const o=t?n.getDisplayedChildren():n.getChildren();Gn(o,t,i)}i(n)}}function Wd(e){const t=[];return Gn(e,!0,i=>{Xs(i)&&t.push(i)}),t}var Kg=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterOpened","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel"],bb=["scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","scrollGapChanged","columnHoverChanged","flashCells","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","gridStylesChanged","storeUpdated","filterDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","overlayExclusiveChanged"],Rb=[...Kg,...bb],Fb={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,advancedFilterModel:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,suppressGroupMaintainValueType:!0,groupLockGroupColumns:!0,rowGroupPanelSuppressSort:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,suppressServerSideInfiniteScroll:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0,suppressSetFilterByDefault:!0},It=class{};It.STRING_PROPERTIES=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow"],It.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","theme","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy","cellSelection","selectionColumnDef"],It.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],It.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"],It.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault"],It.OTHER_PROPERTIES=["suppressStickyTotalRow","loadThemeGoogleFonts","rowSelection"],It.FUNCTION_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","groupIncludeFooter","loadingCellRendererSelector","getRowId","groupAggFiltering","chartMenuItems","groupTotalRow"],It.ALL_PROPERTIES=[...It.ARRAY_PROPERTIES,...It.OBJECT_PROPERTIES,...It.STRING_PROPERTIES,...It.NUMBER_PROPERTIES,...It.FUNCTION_PROPERTIES,...It.BOOLEAN_PROPERTIES,...It.OTHER_PROPERTIES];var Er=It,xi=class{static getCallbackForEvent(t){return!t||t.length<2?t:"on"+t[0].toUpperCase()+t.substring(1)}};xi.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY",xi.PUBLIC_EVENTS=Kg,xi.EVENT_CALLBACKS=Rb.map(e=>xi.getCallbackForEvent(e)),xi.BOOLEAN_PROPERTIES=Er.BOOLEAN_PROPERTIES,xi.ALL_PROPERTIES=Er.ALL_PROPERTIES,xi.ALL_PROPERTIES_AND_CALLBACKS=[...xi.ALL_PROPERTIES,...xi.EVENT_CALLBACKS],xi.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(xi.ALL_PROPERTIES_AND_CALLBACKS);var Hi=xi;function Eb(e,t){typeof e!="object"&&(e={});const i={...e};return Hi.ALL_PROPERTIES_AND_CALLBACKS.forEach(n=>{const o=t[n];typeof o<"u"&&o!==Hi.VUE_OMITTED_PROPERTY&&(i[n]=o)}),i}function zd(e,t){if(!e)return;const i={};let s=!1;if(Object.keys(e).filter(r=>Hi.ALL_PROPERTIES_AND_CALLBACKS_SET.has(r)).forEach(r=>{i[r]=e[r],s=!0}),!s)return;const n={type:"gridOptionsChanged",options:i};t.dispatchEvent(n);const o={type:"componentStateChanged"};Ei(i,(r,a)=>{o[r]=a}),t.dispatchEvent(o)}function xr(e,t,i){return i&&e.addDestroyFunc(()=>t.destroyBean(i)),i??e}var xb=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){const t=(e||"").split(" ");if(t.length>1){t.forEach(s=>this.addCssClass(s));return}if(this.cssClassStates[e]!==!0&&e.length){const s=this.getGui();s&&s.classList.add(e),this.cssClassStates[e]=!0}}removeCssClass(e){const t=(e||"").split(" ");if(t.length>1){t.forEach(s=>this.removeCssClass(s));return}if(this.cssClassStates[e]!==!1&&e.length){const s=this.getGui();s&&s.classList.remove(e),this.cssClassStates[e]=!1}}containsCssClass(e){const t=this.getGui();return t?t.classList.contains(e):!1}addOrRemoveCssClass(e,t){if(!e)return;if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1){s.forEach(n=>this.addOrRemoveCssClass(n,t));return}}if(this.cssClassStates[e]!==t&&e.length){const s=this.getGui();s&&s.classList.toggle(e,t),this.cssClassStates[e]=t}}};function Ms(e,t,i){i==null||typeof i=="string"&&i==""?jg(e,t):Wi(e,t,i)}function Wi(e,t,i){e.setAttribute(Zg(t),i.toString())}function jg(e,t){e.removeAttribute(Zg(t))}function Zg(e){return`aria-${e}`}function ti(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Pb(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function Db(e){return e.getAttribute("aria-label")}function xo(e,t){Ms(e,"label",t)}function Pr(e,t){Ms(e,"labelledby",t)}function qg(e,t){Ms(e,"live",t)}function Tb(e,t){Ms(e,"atomic",t)}function Ab(e,t){Ms(e,"relevant",t)}function Mb(e,t){Ms(e,"disabled",t)}function Ud(e,t){Ms(e,"hidden",t)}function Dr(e,t){Wi(e,"expanded",t)}function kb(e,t){Wi(e,"setsize",t)}function Ib(e,t){Wi(e,"posinset",t)}function Lb(e,t){Wi(e,"multiselectable",t)}function _b(e,t){Wi(e,"rowcount",t)}function Yg(e,t){Wi(e,"rowindex",t)}function Ob(e,t){Wi(e,"colcount",t)}function Qg(e,t){Wi(e,"colindex",t)}function Vb(e,t){Wi(e,"colspan",t)}function Nb(e,t){Wi(e,"sort",t)}function Bb(e){jg(e,"sort")}function pa(e,t){Ms(e,"selected",t)}function Gb(e,t){Ms(e,"controls",t.id),Pr(t,e.id)}function $d(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Kd,ga,jd,Zd,qd,Yd,Qd,Xd,Jd;function gs(){return Kd===void 0&&(Kd=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Kd}function Xg(){if(ga===void 0)if(gs()){const e=navigator.userAgent.match(/version\/(\d+)/i);e&&(ga=e[1]!=null?parseFloat(e[1]):0)}else ga=0;return ga}function eu(){if(jd===void 0){const e=window;jd=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return jd}function tu(){return Zd===void 0&&(Zd=/(firefox)/i.test(navigator.userAgent)),Zd}function Jg(){return qd===void 0&&(qd=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),qd}function Js(){return Yd===void 0&&(Yd=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),Yd}function iu(){return!gs()||Xg()>=15}function su(e){if(!e)return null;const t=e.tabIndex,i=e.getAttribute("tabIndex");return t===-1&&(i===null||i===""&&!tu())?null:t.toString()}function Hb(){if(Jd!==void 0)return Jd;if(!document.body)return-1;let e=1e6;const t=tu()?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){const s=e*2;if(i.style.height=s+"px",s>t||i.clientHeight!==s)break;e=s}return document.body.removeChild(i),Jd=e,e}function Wb(){var e,t;return((e=document.body)==null?void 0:e.clientWidth)??(window.innerHeight||((t=document.documentElement)==null?void 0:t.clientWidth)||-1)}function zb(){var e,t;return((e=document.body)==null?void 0:e.clientHeight)??(window.innerHeight||((t=document.documentElement)==null?void 0:t.clientHeight)||-1)}function Ub(){return Xd==null&&ef(),Xd}function ef(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let i=t.offsetWidth-t.clientWidth;i===0&&t.clientWidth===0&&(i=null),t.parentNode&&t.parentNode.removeChild(t),i!=null&&(Xd=i,Qd=i===0)}function tf(){return Qd==null&&ef(),Qd}var fa,$b="[tabindex], input, select, button, textarea, [href]",sf="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function nu(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,s=t.call(e,"input, select, button, textarea"),n=t.call(e,sf),o=di(e);return s&&!n&&o}function et(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-hidden",!t),s||Ud(e,!t)}function Kb(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-invisible",!t),s||Ud(e,!t)}function Tr(e,t){const i="disabled",s=t?n=>n.setAttribute(i,""):n=>n.removeAttribute(i);s(e),df(e.querySelectorAll("input"),n=>s(n))}function Po(e,t,i){let s=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof i=="number"){if(++s>i)break}else if(e===i)break}return!1}function Hn(e){const{height:t,width:i,borderTopWidth:s,borderRightWidth:n,borderBottomWidth:o,borderLeftWidth:r,paddingTop:a,paddingRight:d,paddingBottom:h,paddingLeft:p,marginTop:f,marginRight:m,marginBottom:v,marginLeft:w,boxSizing:S}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(s||"0"),borderRightWidth:parseFloat(n||"0"),borderBottomWidth:parseFloat(o||"0"),borderLeftWidth:parseFloat(r||"0"),paddingTop:parseFloat(a||"0"),paddingRight:parseFloat(d||"0"),paddingBottom:parseFloat(h||"0"),paddingLeft:parseFloat(p||"0"),marginTop:parseFloat(f||"0"),marginRight:parseFloat(m||"0"),marginBottom:parseFloat(v||"0"),marginLeft:parseFloat(w||"0"),boxSizing:S}}function ma(e){const t=Hn(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function Do(e){const t=Hn(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function nf(e){const{height:t,marginBottom:i,marginTop:s}=Hn(e);return Math.floor(t+i+s)}function Ca(e){const{width:t,marginLeft:i,marginRight:s}=Hn(e);return Math.floor(t+i+s)}function of(e){const t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:s,borderRightWidth:n,borderBottomWidth:o}=Hn(e);return{top:t.top+(i||0),left:t.left+(s||0),right:t.right+(n||0),bottom:t.bottom+(o||0)}}function va(){if(typeof fa=="boolean")return fa;const e=document.createElement("div");return e.style.direction="rtl",e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="0px",e.style.overflow="hidden",e.dir="rtl",e.innerHTML=`<div style="width: 2px">
|
|
1
|
+
(function(W,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(W=typeof globalThis<"u"?globalThis:W||self,l(W.SdkVueLib={},W.Vue))})(this,function(W,l){"use strict";var q5=Object.defineProperty;var py=W=>{throw TypeError(W)};var Y5=(W,l,ft)=>l in W?q5(W,l,{enumerable:!0,configurable:!0,writable:!0,value:ft}):W[l]=ft;var Ye=(W,l,ft)=>Y5(W,typeof l!="symbol"?l+"":l,ft),dg=(W,l,ft)=>l.has(W)||py("Cannot "+ft);var P=(W,l,ft)=>(dg(W,l,"read from private field"),ft?ft.call(W):l.get(W)),je=(W,l,ft)=>l.has(W)?py("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(W):l.set(W,ft),we=(W,l,ft,wo)=>(dg(W,l,"write to private field"),wo?wo.call(W,ft):l.set(W,ft),ft),de=(W,l,ft)=>(dg(W,l,"access private method"),ft);var ld=(W,l,ft,wo)=>({set _(Bi){we(W,l,Bi,ft)},get _(){return P(W,l,wo)}});var Iv,Xo,Lv,_v,Qi,gi,Xi,Ji,Jo,er,St,es,wt,nt,xe,qt,fi,Bt,xt,ts,Pt,is,ss,mi,ns,Sn,Yt,te,pg,so,Ns,Dl,Ci,Ry,no,tr,Tl,kn,In,gg,cd,dd,rt,fg,Jl,Ln,mg;function ft(e,t){if(e==null)throw Error(t??"Empty (null | undefined) value");return e}function wo(e){return e!==null&&typeof e=="object"}function Bi(e){if(Array.isArray(e)){const t=[];for(let i=0;i<e.length;i++)t[i]=Bi(e[i]);return t}else if(wo(e)){const t={};return Object.keys(e).forEach(i=>{t[i]=Bi(e[i])}),t}else return e}function ud(e,t,i=!0){let s=0,n;return function(...o){n=()=>{e.apply(this,o),s=new Date().getTime()+t,n=null,i&&setTimeout(()=>{n&&n()},t)},new Date().getTime()>s&&n()}}function Fy(e){let t=0n,i;return async function(...s){const n=++t;try{await i}catch{}if(t!==n)return{ok:!1};const o=e(...s);return i=o,{ok:!0,value:await o}}}var vr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ey(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xy=function e(t){if(typeof t=="number"&&isNaN(t))throw new Error("NaN is not allowed");if(typeof t=="number"&&!isFinite(t))throw new Error("Infinity is not allowed");return t===null||typeof t!="object"?JSON.stringify(t):t.toJSON instanceof Function?e(t.toJSON()):Array.isArray(t)?`[${t.reduce((n,o,r)=>`${n}${r===0?"":","}${e(o===void 0||typeof o=="symbol"?null:o)}`,"")}]`:`{${Object.keys(t).sort().reduce((s,n)=>{if(t[n]===void 0||typeof t[n]=="symbol")return s;const o=s.length===0?"":",";return`${s}${o}${e(n)}:${e(t[n])}`},"")}}`};const wr=Ey(xy);class hd extends Error{}class pd extends Error{constructor(t){super(),this.errors=t}toString(){return this.errors.join(",")}}function Py(e){return{ok:!0,value:e}}function Cg(e){if(!e)throw new hd;if(!e.ok)throw Error(e.errors.join(";"));return e.value}function vg(e){return{value:e,errors:void 0}}function Dy(e){if(e.errors)throw new pd(e.errors);if(!e.value)throw new hd;return e.value}function Ty(e){return e!==void 0}function gd(e,t){return wr(e)===wr(t)}const fd=e=>e,md=e=>e instanceof Error?e:Error(String(e)),Cd=e=>e.name==="ZodError",vd=e=>{const{formErrors:t,fieldErrors:i}=e.flatten(),s=Object.entries(i).map(([n,o])=>n+":"+(o==null?void 0:o.join(",")));return t.concat(s).join("; ")};function wd(e){const t=e.validate??fd,{autoSave:i}=e,s=l.ref(),n=l.ref(),o=w=>{n.value={model:Bi(w)}};l.watch(()=>e.get(),w=>o(w),{immediate:!0});const r=()=>{var w;e.onSave(t(Bi((w=n.value)==null?void 0:w.model)))},a=()=>{o(e.get()),s.value=void 0},d=w=>{const S=md(w);Cd(S)?s.value=Error(vd(S)):s.value=S},h=w=>{s.value=void 0;try{t(w),i&&r()}catch(S){d(S)}},p=l.computed({get:()=>{var w;return(w=n.value)==null?void 0:w.model},set(w){o(w),h(w)}});l.watch(n,(w,S)=>{w&&w===S&&h(w.model)},{deep:!0});const f=l.computed(()=>!s.value),m=l.computed(()=>!gd(e.get(),l.unref(n))),v=l.computed(()=>s.value?s.value.message:"");return l.reactive({model:p,valid:f,isChanged:m,error:s,errorString:v,save:r,revert:a,setError:d})}function Ay(e,t){const i=e.validate??fd,{autoSave:s}=e,n=l.ref(),o=l.ref(),r=S=>{o.value={model:Object.assign(Bi(S),t??{}),stage:Symbol()}};l.watch(()=>e.get(),S=>r(S),{immediate:!0});const a=()=>{var S;e.onSave(i(Bi((S=o.value)==null?void 0:S.model)))},d=()=>{r(e.get()),n.value=void 0},h=S=>{const b=md(S);Cd(b)?n.value=Error(vd(b)):n.value=b},p=S=>{n.value=void 0;try{i(S),s&&a()}catch(b){h(b)}},f=l.computed({get:()=>{var S;return(S=o.value)==null?void 0:S.model},set(){throw Error("Cannot replace base model")}});l.watch([()=>({args:f.value.args,ui:f.value.ui}),()=>{var S;return(S=o.value)==null?void 0:S.stage}],([S,b],[R,x])=>{b===x&&p(S)},{deep:!0});const m=l.computed(()=>!n.value),v=l.computed(()=>!gd(e.get(),l.unref(o))),w=l.computed(()=>n.value?n.value.message:"");return l.reactive({model:f,valid:m,isChanged:v,error:n,errorString:w,save:a,revert:d,setError:h})}const My=e=>Object.fromEntries(new URL(e,"http://dummy").searchParams);function ky(e,t){const s=ud(t.setBlockArgs,100),n=ud(t.setBlockUiState,100),o=ud(t.setBlockArgsAndUiState,100),r=l.reactive({args:Object.freeze(e.args),outputs:Object.freeze(e.outputs),ui:Object.freeze(e.ui),navigationState:Object.freeze(e.navigationState)});t.onStateUpdates(async S=>{S.forEach(b=>{b.key==="args"&&(r.args=Object.freeze(b.value)),b.key==="ui"&&(r.ui=Object.freeze(b.value)),b.key==="outputs"&&(r.outputs=Object.freeze(b.value)),b.key==="navigationState"&&(r.navigationState=Object.freeze(b.value))}),await l.nextTick()});const a=()=>Bi(r.args),d=()=>Bi(r.ui),h=()=>Bi(r.navigationState),p={createArgsModel(S={}){return wd({get(){return S.transform?S.transform(r.args):r.args},validate:S.validate,autoSave:!0,onSave(b){s(b)}})},createUiModel(S={},b){return wd({get(){return S.transform?S.transform(r.ui):r.ui??b()},validate:S.validate,autoSave:!0,onSave(R){n(R)}})},useOutputs(...S){const b=l.reactive({errors:void 0,value:void 0});return l.watch(()=>r.outputs,()=>{try{Object.assign(b,{value:this.unwrapOutputs(...S),errors:void 0})}catch(R){Object.assign(b,{value:void 0,errors:[String(R)]})}},{immediate:!0,deep:!0}),b},unwrapOutputs(...S){const b=r.outputs,R=S.map(x=>[x,Cg(b[x])]);return Object.fromEntries(R)},getOutputField(S){return r.outputs[S]},getOutputFieldOkOptional(S){console.warn("use reactive app.outputValues.fieldName instead instead of getOutputFieldOkOptional(fieldName)");const b=this.getOutputField(S);if(b&&b.ok)return b.value},getOutputFieldErrorsOptional(S){console.warn("use reactive app.outputErrors.fieldName instead instead of getOutputFieldErrorsOptional(fieldName)");const b=this.getOutputField(S);if(b&&!b.ok)return b.errors},updateArgs(S){const b=a();return S(b),t.setBlockArgs(b)},updateUiState(S){const b=d();return t.setBlockUiState(S(b))},updateNavigationState(S){const b=h();return S(b),t.setNavigationState(b)},navigateTo(S){const b=h();return b.href=S,t.setNavigationState(b)}},f=l.computed(()=>{const S=Object.entries(r.outputs).map(([b,R])=>[b,R.ok&&R.value!==void 0?R.value:void 0]);return Object.fromEntries(S)}),m=l.computed(()=>{const S=Object.entries(r.outputs).map(([b,R])=>[b,R&&!R.ok?new pd(R.errors):void 0]);return Object.fromEntries(S)}),v={snapshot:r,queryParams:l.computed(()=>My(r.navigationState.href)),href:l.computed(()=>r.navigationState.href),hasErrors:l.computed(()=>Object.values(r.outputs).some(S=>!(S!=null&&S.ok))),outputValues:l.computed(()=>(console.warn("Change app.outputValues to app.model.outputs"),f.value)),outputErrors:l.computed(()=>(console.warn("Change app.outputErrors to app.model.outputErrors"),m.value)),args:l.computed(()=>(console.warn("Change app.args to app.snapshot.args"),r.args)),outputs:l.computed(()=>(console.warn("Change app.outputs to app.snapshot.outputs"),r.outputs)),ui:l.computed(()=>(console.warn("Change app.ui to app.snapshot.ui"),r.ui)),navigationState:l.computed(()=>(console.warn("Change app.navigationState to app.snapshot.navigationState"),r.navigationState))},w=Ay({get(){return{args:r.args,ui:r.ui}},autoSave:!0,onSave(S){o(S.args,S.ui)}},{outputs:f,outputErrors:m});return l.reactive(Object.assign(w,p,v))}var So=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){const s=t?this.allAsyncListeners:this.allSyncListeners;let n=s.get(e);return!n&&i&&(n=new Set,s.set(e,n)),n}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){const s=this.getListeners(e,i,!1);s&&(s.delete(t),s.size===0&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){const t=e;this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const i=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const s=(a,d)=>a.forEach(h=>{if(!d.has(h))return;const p=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>h(e)):()=>h(e);t?this.dispatchAsync(p):p()}),n=this.getListeners(i,t,!1)??new Set,o=new Set(n);o.size>0&&s(o,n),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(a=>{const d=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>a(i,e)):()=>a(i,e);t?this.dispatchAsync(d):d()})}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}},Rt=(e=>(e.CommunityCoreModule="@ag-grid-community/core",e.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",e.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",e.CsvExportModule="@ag-grid-community/csv-export",e.EnterpriseCoreModule="@ag-grid-enterprise/core",e.RowGroupingModule="@ag-grid-enterprise/row-grouping",e.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",e.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",e.MenuModule="@ag-grid-enterprise/menu",e.SetFilterModule="@ag-grid-enterprise/set-filter",e.MultiFilterModule="@ag-grid-enterprise/multi-filter",e.StatusBarModule="@ag-grid-enterprise/status-bar",e.SideBarModule="@ag-grid-enterprise/side-bar",e.RangeSelectionModule="@ag-grid-enterprise/range-selection",e.MasterDetailModule="@ag-grid-enterprise/master-detail",e.RichSelectModule="@ag-grid-enterprise/rich-select",e.GridChartsModule="@ag-grid-enterprise/charts",e.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",e.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",e.ExcelExportModule="@ag-grid-enterprise/excel-export",e.ClipboardModule="@ag-grid-enterprise/clipboard",e.SparklinesModule="@ag-grid-enterprise/sparklines",e.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",e.AngularModule="@ag-grid-community/angular",e.ReactModule="@ag-grid-community/react",e.VueModule="@ag-grid-community/vue",e))(Rt||{}),wg={};function Sd(e,t){wg[t]||(e(),wg[t]=!0)}function Fi(e,...t){console.log("AG Grid: "+e,...t)}function z(e,...t){Sd(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function We(e,...t){Sd(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function yd(e){return!!(e&&e.constructor&&e.call&&e.apply)}function Iy(e){Ly(e,400)}var bd=[],Rd=!1;function Sg(e){bd.push(e),!Rd&&(Rd=!0,window.setTimeout(()=>{const t=bd.slice();bd.length=0,Rd=!1,t.forEach(i=>i())},0))}function Ly(e,t=0){e.length>0&&window.setTimeout(()=>e.forEach(i=>i()),t)}function Wt(e,t){let i;return function(...s){const n=this;window.clearTimeout(i),i=window.setTimeout(function(){e.apply(n,s)},t)}}function yg(e,t){let i=0;return function(...s){const n=this,o=new Date().getTime();o-i<t||(i=o,e.apply(n,s))}}function _y(e,t,i=100,s){const n=new Date().getTime();let o=null,r=!1;const a=()=>{const d=new Date().getTime()-n>i;(e()||d)&&(t(),r=!0,o!=null&&(window.clearInterval(o),o=null),d&&s&&z(s))};a(),r||(o=window.setInterval(a,10))}function Oy(...e){return t=>e.reduce((i,s)=>s(i),t)}function Gi(e){return e==null||e===""?null:e}function q(e,t=!1){return e!=null&&(e!==""||t)}function Ve(e){return!q(e)}function Tt(e){return e==null||e.length===0}function ea(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function _n(e){if(e===void 0)return;if(e===null||e==="")return null;if(typeof e=="number")return isNaN(e)?void 0:e;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Fd(e){if(e!==void 0)return e===null||e===""?!1:Ed(e)}function Ed(e){return typeof e=="boolean"?e:typeof e=="string"?e.toUpperCase()==="TRUE"||e=="":!1}function Sr(e,t){const i=e?JSON.stringify(e):null,s=t?JSON.stringify(t):null;return i===s}function Vy(e,t,i=!1){const s=e==null,n=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),s&&n)return 0;if(s)return-1;if(n)return 1;function o(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!i)return o(e,t);try{return e.localeCompare(t)}catch{return o(e,t)}}function ta(e){if(e instanceof Set||e instanceof Map){const t=[];return e.forEach(i=>t.push(i)),t}return Object.values(e)}function bg(e,t){return e.get("rowModelType")===t}function st(e){return bg(e,"clientSide")}function xs(e){return bg(e,"serverSide")}function Ft(e,t){return e.get("domLayout")===t}function ia(e){return la(e)!==void 0}function sa(e){return!e.get("suppressAsyncEvents")}function Rg(e){return typeof e.get("getRowHeight")=="function"}function Ny(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function qs(e,t,i=!1,s){if(s==null&&(s=e.environment.getDefaultRowHeight()),Rg(e)){if(i)return{height:s,estimated:!0};const r={node:t,data:t.data},a=e.getCallback("getRowHeight")(r);if(xd(a))return a===0&&z("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,a),estimated:!1}}if(t.detail&&e.get("masterDetail"))return By(e);const n=e.get("rowHeight");return{height:n&&xd(n)?n:s,estimated:!1}}function By(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return xd(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function On(e){const{environment:t}=e,i=e.get("rowHeight");if(!i||Ve(i))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(z("row height must be a number if not using standard row model"),t.getDefaultRowHeight())}function xd(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function yr(e,t,i){const s=t[e.getDomDataKey()];return s?s[i]:void 0}function Vn(e,t,i,s){const n=e.getDomDataKey();let o=t[n];Ve(o)&&(o={},t[n]=o),o[i]=s}function lt(e){let t=null;const i=e.get("getDocument");return i&&q(i)?t=i():e.eGridDiv&&(t=e.eGridDiv.ownerDocument),t&&q(t)?t:document}function Fg(e){return lt(e).defaultView||window}function br(e){return e.eGridDiv.getRootNode()}function Je(e){return br(e).activeElement}function Eg(e){const t=lt(e),i=Je(e);return i===null||i===t.body}function yo(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function na(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Ft(e,"print"))}function us(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function Pd(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function xg(e){const t=e.get("grandTotalRow");if(t)return t;if(e.get("groupIncludeTotalFooter"))return"bottom"}function Pg(e){const t=e.get("groupTotalRow");if(typeof t=="function")return e.getCallback("groupTotalRow");if(t)return()=>t;const i=e.get("groupIncludeFooter");if(typeof i=="function"){const s=e.getCallback("groupIncludeFooter");return n=>s(n)?"bottom":void 0}return()=>i?"bottom":void 0}function Dg(e){return e.exists("groupDisplayType")?e.get("groupDisplayType")==="multipleColumns":e.get("groupHideOpenParents")}function oa(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function bo(e){const t=e.getCallback("getRowId");return t===void 0?t:i=>{let s=t(i);return typeof s!="string"&&(z("The getRowId callback must return a string. The ID ",s," is being cast to a string."),s=String(s)),s}}function Ro(e){return(e==null?void 0:e.checkboxes)??!0}function ra(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function Gy(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function Hy(e){return typeof e.get("rowSelection")!="string"}function Tg(e){return e.get("cellSelection")!==void 0}function Rr(e){const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?(t==null?void 0:t.suppressMultiRanges)??!1:!1:e.get("suppressMultiRangeSelection")}function ei(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function Wy(e){var s;const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?((s=t.handle)==null?void 0:s.mode)==="range":!1:e.get("enableRangeHandle")}function Ag(e){var s;const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?((s=t.handle)==null?void 0:s.mode)==="fill":!1:e.get("enableFillHandle")}function Dd(e){var s;const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"&&((s=t.handle)==null?void 0:s.mode)==="fill"?t.handle:void 0:{mode:"fill",setFillValue:e.get("fillOperation"),direction:e.get("fillHandleDirection"),suppressClearOnFillReduction:e.get("suppressClearOnFillReduction")}}function Mg(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const i=e.get("suppressRowClickSelection"),s=e.get("suppressRowDeselection");return i&&s?!1:i?"enableDeselection":s?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function zy(e){const t=Mg(e);return t===!0||t==="enableSelection"}function Td(e){const t=Mg(e);return t===!0||t==="enableDeselection"}function Ad(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function la(e){const t=e.get("rowSelection");if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}return t==null?void 0:t.mode}function Md(e){return la(e)==="multiRow"}function Uy(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function kd(e){const t=e.get("rowSelection");if(typeof t=="string"){const i=e.get("groupSelectsChildren"),s=e.get("groupSelectsFiltered");return i&&s?"filteredDescendants":i?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function Nn(e){const t=kd(e);return t==="descendants"||t==="filteredDescendants"}function Id(e){return e.isModuleRegistered("@ag-grid-enterprise/set-filter")&&!e.get("suppressSetFilterByDefault")}function $y(e){return e!=null&&e.length>0}function he(e){if(!(!e||!e.length))return e[e.length-1]}function hs(e,t,i){return e==null&&t==null?!0:e!=null&&t!=null&&e.length===t.length&&e.every((s,n)=>i?i(s,t[n]):t[n]===s)}function Ky(e,t){return hs(e,t)}function jy(e){return e.sort((t,i)=>t-i)}function kg(e,t){const i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.pop())}function kt(e,t){const i=e.indexOf(t);i>=0&&e.splice(i,1)}function Zy(e,t){for(let i=0;i<t.length;i++)kg(e,t[i])}function qy(e,t){for(let i=0;i<t.length;i++)kt(e,t[i])}function aa(e,t,i){e.splice(i,0,t)}function Ig(e,t,i){qy(e,t),t.slice().reverse().forEach(s=>aa(e,s,i))}function Ps(e,t){return e.indexOf(t)>-1}function Yy(e){return(e==null?void 0:e.flatMap(t=>t))??[]}function Lg(e,t){t==null||e==null||t.forEach(i=>e.push(i))}var _g="__ag_Grid_Stop_Propagation",Qy=["touchstart","touchend","touchmove","touchcancel","scroll"],Ld={};function Fo(e){e[_g]=!0}function Ds(e){return e[_g]===!0}var Og=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return i=>{if(typeof Ld[i]=="boolean")return Ld[i];const s=document.createElement(e[i]||"div");return i="on"+i,Ld[i]=i in s}})();function ca(e,t,i){let s=t;for(;s;){const n=yr(e,s,i);if(n)return n;s=s.parentElement}return null}function Xy(e,t){return!t||!e?!1:eb(t).indexOf(e)>=0}function Jy(e){const t=[];let i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}function eb(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():Jy(t)}function tb(e,t,i,s){const o=Ps(Qy,i)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(t,i,s,o)}var G=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.frameworkOverrides=e.frameworkOverrides,this.stubContext=e.context,this.eventService=e.eventService,this.gos=e.gos,this.localeService=e.localeService}getFrameworkOverrides(){return this.frameworkOverrides}destroy(){for(let e=0;e<this.destroyFunctions.length;e++)this.destroyFunctions[e]();this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,i){this.localEventService||(this.localEventService=new So),this.localEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.localEventService&&this.localEventService.removeEventListener(e,t,i)}dispatchLocalEvent(e){this.localEventService&&this.localEventService.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventService,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const i=[];for(const s in t){const n=t[s];n&&i.push(this._setupListener(e,s,n))}return i}_setupListener(e,t,i){if(this.destroyed)return()=>null;e instanceof HTMLElement?tb(this.getFrameworkOverrides(),e,t,i):e.addEventListener(t,i);const s=()=>(e.removeEventListener(t,i),null);return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(n=>n!==s),null)}setupGridOptionListener(e,t){this.gos.addPropertyEventListener(e,t);const i=()=>(this.gos.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const i=e.join("-")+this.propertyListenerId++,s=n=>{if(n.changeSet){if(n.changeSet&&n.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=n.changeSet.id}const o={type:"gridPropertyChanged",changeSet:n.changeSet,source:n.source};t(o)};e.forEach(n=>this.setupGridOptionListener(n,s))}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createManagedBean(e,t){const i=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),i}createBean(e,t,i){return(t||this.stubContext).createBean(e,i)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function zt(e){return e instanceof da}var da=class extends G{constructor(e,t,i,s){super(),this.isColumn=!1,this.expandable=!1,this.instanceId=Bg(),this.expandableListenerRemoveCallback=null,this.colGroupDef=e,this.groupId=t,this.expanded=!!e&&!!e.openByDefault,this.padding=i,this.level=s}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}addLeafColumns(e){this.children&&this.children.forEach(t=>{Xs(t)?e.push(t):zt(t)&&t.addLeafColumns(e)})}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,i=!1;const s=this.findChildrenRemovingPadding();for(let o=0,r=s.length;o<r;o++){const a=s[o];if(!a.isVisible())continue;const d=a.getColumnGroupShow();d==="open"?(e=!0,i=!0):d==="closed"?(t=!0,i=!0):(e=!0,t=!0)}const n=e&&t&&i;this.expandable!==n&&(this.expandable=n,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=i=>{i.forEach(s=>{zt(s)&&s.isPadding()?t(s.children):e.push(s)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},Vg="ag-Grid-ControlsColumn",ib=class extends G{constructor(){super(...arguments),this.beanName="controlsColService"}createControlsCols(){const e=this.gos.get("rowSelection");if(!e||typeof e=="string")return[];const t=Ro(e),i=ra(e);if(t||i){const s=this.gos.get("selectionColumnDef"),o={maxWidth:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:this.gos.get("enableRtl")?"right":"left",comparator(a,d,h,p){const f=h.isSelected(),m=p.isSelected();return f&&m?0:f?1:-1},editable:!1,suppressFillHandle:!0,...s,colId:`${Vg}`},r=new Hd(o,null,o.colId,!1);return this.createBean(r),[r]}return[]}},ua="ag-Grid-AutoColumn";function _d(e){const t=[],i=s=>{for(let n=0;n<s.length;n++){const o=s[n];Xs(o)?t.push(o):zt(o)&&i(o.getChildren())}};return i(e),t}function Ts(e){return e.reduce((t,i)=>t+i.getActualWidth(),0)}function Ys(e,t,i){const s={};if(!t)return;As(null,t,o=>{s[o.getInstanceId()]=o}),i&&As(null,i,o=>{s[o.getInstanceId()]=null});const n=Object.values(s).filter(o=>o!=null);e.destroyBeans(n)}function Od(e){return e.getId().startsWith(ua)}function Eo(e){return e.getColId().startsWith(Vg)}function ha(e){let t=[];return e instanceof Array?e.some(s=>typeof s!="string")?z("if colDef.type is supplied an array it should be of type 'string[]'"):t=e:typeof e=="string"?t=e.split(","):z("colDef.type should be of type 'string' | 'string[]'"),t}var Vd=class{constructor(e){this.frameworkOverrides=e,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=i=>{this.frameworkOverrides.wrapOutgoing(()=>e(i))},this.wrappedListeners.set(e,t)),t}wrapGlobal(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=(i,s)=>{this.frameworkOverrides.wrapOutgoing(()=>e(i,s))},this.wrappedGlobalListeners.set(e,t)),t}unwrap(e){return this.wrappedListeners.get(e)??e}unwrapGlobal(e){return this.wrappedGlobalListeners.get(e)??e}},Nd=new Set(["__proto__","constructor","prototype"]);function Ei(e,t){if(e!=null){if(Array.isArray(e)){for(let i=0;i<e.length;i++)t(i.toString(),e[i]);return}for(const[i,s]of Object.entries(e))t(i,s)}}function Ng(e){const t={},i=Object.keys(e);for(let s=0;s<i.length;s++){if(Nd.has(i[s]))continue;const n=i[s],o=e[n];t[n]=o}return t}function Bd(e,t){if(!e)return;const i=e,s={};return Object.keys(i).forEach(n=>{if(t&&t.indexOf(n)>=0||Nd.has(n))return;const o=i[n];Gd(o)&&o.constructor===Object?s[n]=Bd(o):s[n]=o}),s}function Qs(e){if(!e)return[];const t=Object;if(typeof t.values=="function")return t.values(e);const i=[];for(const s in e)e.hasOwnProperty(s)&&e.propertyIsEnumerable(s)&&i.push(e[s]);return i}function Ut(e,t,i=!0,s=!1){q(t)&&Ei(t,(n,o)=>{if(Nd.has(n))return;let r=e[n];r!==o&&(s&&r==null&&o!=null&&typeof o=="object"&&o.constructor===Object&&(r={},e[n]=r),Gd(o)&&Gd(r)&&!Array.isArray(r)?Ut(r,o,i,s):(i||o!==void 0)&&(e[n]=o))})}function Fr(e,t,i){if(!t||!e)return;if(!i)return e[t];const s=t.split(".");let n=e;for(let o=0;o<s.length;o++){if(n==null)return;n=n[s[o]]}return n}function Gd(e){return typeof e=="object"&&e!==null}var sb={resizable:!0,sortable:!0},nb=0;function Bg(){return nb++}function Xs(e){return e instanceof Hd}var Hd=class extends G{constructor(e,t,i,s){super(),this.isColumn=!0,this.instanceId=Bg(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.columnEventService=new So,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=s,this.setState(e)}wireBeans(e){this.columnHoverService=e.columnHoverService}getInstanceId(){return this.instanceId}setState(e){e.sort!==void 0?(e.sort==="asc"||e.sort==="desc")&&(this.sort=e.sort):(e.initialSort==="asc"||e.initialSort==="desc")&&(this.sort=e.initialSort);const t=e.sortIndex,i=e.initialSortIndex;t!==void 0?t!==null&&(this.sortIndex=t):i!==null&&(this.sortIndex=i);const s=e.hide,n=e.initialHide;s!==void 0?this.visible=!s:this.visible=!n,e.pinned!==void 0?this.setPinned(e.pinned):this.setPinned(e.initialPinned);const o=e.flex,r=e.initialFlex;o!==void 0?this.flex=o:r!==void 0&&(this.flex=r)}setColDef(e,t,i){this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.columnEventService.dispatchEvent(this.createColumnEvent("colDefChanged",i))}getUserProvidedColDef(){return this.userProvidedColDef}setParent(e){this.parent=e}getParent(){return this.parent}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}postConstruct(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()}initDotNotation(){const e=this.gos.get("suppressFieldDotNotation");this.fieldContainsDots=q(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!e,this.tooltipFieldContainsDots=q(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.gos.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.tooltipEnabled=q(this.colDef.tooltipField)||q(this.colDef.tooltipValueGetter)||q(this.colDef.tooltipComponent)}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const i=_n(e.width),s=_n(e.initialWidth);return i!=null?t=i:s!=null?t=s:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){if(Ve(this.colDef)||Ve(this.colDef.showRowGroup))return!1;const t=this.colDef.showRowGroup===!0,i=this.colDef.showRowGroup===e;return t||i}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}addEventListener(e,t){var s;this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.columnEventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new Vd(this.frameworkOverrides));const i=((s=this.frameworkEventListenerService)==null?void 0:s.wrap(t))??t;this.columnEventService.addEventListener(e,i)}removeEventListener(e,t){var s;const i=((s=this.frameworkEventListenerService)==null?void 0:s.unwrap(t))??t;this.columnEventService.removeEventListener(e,i)}createColumnFunctionCallbackParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){if(typeof this.colDef.suppressNavigable=="boolean")return this.colDef.suppressNavigable;if(typeof this.colDef.suppressNavigable=="function"){const t=this.createColumnFunctionCallbackParams(e),i=this.colDef.suppressNavigable;return i(t)}return!1}isCellEditable(e){if(e.group){if(this.gos.get("treeData")){if(!e.data&&!this.gos.get("enableGroupEdit"))return!1}else if(!this.gos.get("enableGroupEdit"))return!1}return this.isColumnFunc(e,this.colDef.editable)}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){const t=this.gos.get("rowSelection");if(t&&typeof t!="string"){const i=Eo(this)&&Ro(t);return this.isColumnFunc(e,i)}else return this.isColumnFunc(e,this.colDef.checkboxSelection)}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??sb[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const i=this.createColumnFunctionCallbackParams(e);return t(i)}return!1}setHighlighted(e){this.highlighted!==e&&(this.highlighted=e,this.columnEventService.dispatchEvent(this.createColumnEvent("headerHighlightChanged","uiColumnMoved")))}setMoving(e,t){this.moving=e,this.columnEventService.dispatchEvent(this.createColumnEvent("movingChanged",t))}createColumnEvent(e,t){return this.gos.addGridCommonParams({type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}setSort(e,t){this.sort!==e&&(this.sort=e,this.columnEventService.dispatchEvent(this.createColumnEvent("sortChanged",t))),this.dispatchStateUpdatedEvent("sort")}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return Ve(this.sort)}isSorting(){return q(this.sort)}getSortIndex(){return this.sortIndex}setSortIndex(e){this.sortIndex=e,this.dispatchStateUpdatedEvent("sortIndex")}setMenuVisible(e,t){this.menuVisible!==e&&(this.menuVisible=e,this.columnEventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",t)))}isMenuVisible(){return this.menuVisible}setAggFunc(e){this.aggFunc=e,this.dispatchStateUpdatedEvent("aggFunc")}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.columnEventService.dispatchEvent(this.createColumnEvent("leftChanged",t)))}isFilterActive(){return this.filterActive}setFilterActive(e,t,i){this.filterActive!==e&&(this.filterActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",t)));const s=this.createColumnEvent("filterChanged",t);i&&Ut(s,i),this.columnEventService.dispatchEvent(s)}isHovered(){return this.columnHoverService.isHovered(this)}setPinned(e){e===!0||e==="left"?this.pinned="left":e==="right"?this.pinned="right":this.pinned=null,this.dispatchStateUpdatedEvent("pinned")}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",t)))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",t)))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const i=e===!0;this.visible!==i&&(this.visible=i,this.columnEventService.dispatchEvent(this.createColumnEvent("visibleChanged",t))),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){const e=this.getColDef();return!e.suppressSpanHeaderHeight&&!e.autoHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let i=!0;for(;e;){if(!e.isPadding()){i=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:i}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(Ve(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.colSpan(t);return Math.max(i,1)}getRowSpan(e){if(Ve(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.rowSpan(t);return Math.max(i,1)}setActualWidth(e,t,i=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),i||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.columnEventService.dispatchEvent(this.createColumnEvent("widthChanged",e))}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex||0}setFlex(e){this.flex!==e&&(this.flex=e),this.dispatchStateUpdatedEvent("flex")}setMinimum(e){this.setActualWidth(this.minWidth,e)}setRowGroupActive(e,t){this.rowGroupActive!==e&&(this.rowGroupActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",t))),this.dispatchStateUpdatedEvent("rowGroup")}isRowGroupActive(){return this.rowGroupActive}setPivotActive(e,t){this.pivotActive!==e&&(this.pivotActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",t))),this.dispatchStateUpdatedEvent("pivot")}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}setValueActive(e,t){this.aggregationActive!==e&&(this.aggregationActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnValueChanged",t)))}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchStateUpdatedEvent(e){this.columnEventService.dispatchEvent({type:"columnStateUpdated",key:e})}},ob={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},rb=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=ea(e);let i=0;for(;;){let s;if(e?(s=e,i!==0&&(s+="_"+i)):t?(s=t,i!==0&&(s+="_"+i)):s=i,!this.existingKeys[s])return this.existingKeys[s]=!0,String(s);i++}}},lb=class extends G{constructor(){super(...arguments),this.beanName="columnFactory"}wireBeans(e){this.dataTypeService=e.dataTypeService}createColumnTree(e,t,i,s){const n=new rb,{existingCols:o,existingGroups:r,existingColKeys:a}=this.extractExistingTreeData(i);n.addExistingKeys(a);const d=this.recursivelyCreateColumns(e,0,t,o,n,r,s),h=this.findMaxDept(d,0),p=this.balanceColumnTree(d,0,h,n);return As(null,p,(m,v)=>{zt(m)&&m.setupExpandable(),m.setOriginalParent(v)}),{columnTree:p,treeDept:h}}extractExistingTreeData(e){const t=[],i=[],s=[];return e&&As(null,e,n=>{if(zt(n)){const o=n;i.push(o)}else{const o=n;s.push(o.getId()),t.push(o)}}),{existingCols:t,existingGroups:i,existingColKeys:s}}balanceTreeForAutoCols(e,t){const i=[],s=this.findDepth(t);return e.forEach(n=>{let o=n;for(let r=s-1;r>=0;r--){const a=new da(null,`FAKE_PATH_${n.getId()}}_${r}`,!0,r);this.createBean(a),a.setChildren([o]),o.setOriginalParent(a),o=a}s===0&&n.setOriginalParent(null),i.push(o)}),[i,s]}findDepth(e){let t=0,i=e;for(;i&&i[0]&&zt(i[0]);)t++,i=i[0].getChildren();return t}balanceColumnTree(e,t,i,s){const n=[];for(let o=0;o<e.length;o++){const r=e[o];if(zt(r)){const a=r,d=this.balanceColumnTree(a.getChildren(),t+1,i,s);a.setChildren(d),n.push(a)}else{let a,d;for(let h=i-1;h>=t;h--){const p=s.getUniqueKey(null,null),f=this.createMergedColGroupDef(null),m=new da(f,p,!0,t);this.createBean(m),d&&d.setChildren([m]),d=m,a||(a=d)}if(a&&d)if(n.push(a),e.some(p=>zt(p))){d.setChildren([r]);continue}else{d.setChildren(e);break}n.push(r)}}return n}findMaxDept(e,t){let i=t;for(let s=0;s<e.length;s++){const n=e[s];if(zt(n)){const o=n,r=this.findMaxDept(o.getChildren(),t+1);i<r&&(i=r)}}return i}recursivelyCreateColumns(e,t,i,s,n,o,r){if(!e)return[];const a=new Array(e.length);for(let d=0;d<a.length;d++){const h=e[d];this.isColumnGroup(h)?a[d]=this.createColumnGroup(i,h,t,s,n,o,r):a[d]=this.createColumn(i,h,s,n,r)}return a}createColumnGroup(e,t,i,s,n,o,r){const a=this.createMergedColGroupDef(t),d=n.getUniqueKey(a.groupId||null,null),h=new da(a,d,!1,i);this.createBean(h);const p=this.findExistingGroup(t,o);p&&o.splice(p.idx,1);const f=p==null?void 0:p.group;f&&h.setExpanded(f.isExpanded());const m=this.recursivelyCreateColumns(a.children,i+1,e,s,n,o,r);return h.setChildren(m),h}createMergedColGroupDef(e){const t={};return Object.assign(t,this.gos.get("defaultColGroupDef")),Object.assign(t,e),t}createColumn(e,t,i,s,n){var a;const o=this.findExistingColumn(t,i);o&&(i==null||i.splice(o.idx,1));let r=o==null?void 0:o.column;if(r){const d=this.addColumnDefaultAndTypes(t,r.getColId());r.setColDef(d,t,n),this.applyColumnState(r,d,n)}else{const d=s.getUniqueKey(t.colId,t.field),h=this.addColumnDefaultAndTypes(t,d);r=new Hd(h,t,d,e),this.createBean(r)}return(a=this.dataTypeService)==null||a.addColumnListeners(r),r}applyColumnState(e,t,i){const s=_n(t.flex);if(s!==void 0&&e.setFlex(s),e.getFlex()<=0){const a=_n(t.width);if(a!=null)e.setActualWidth(a,i);else{const d=e.getActualWidth();e.setActualWidth(d,i)}}t.sort!==void 0&&(t.sort=="asc"||t.sort=="desc"?e.setSort(t.sort,i):e.setSort(void 0,i));const o=_n(t.sortIndex);o!==void 0&&e.setSortIndex(o);const r=Fd(t.hide);r!==void 0&&e.setVisible(!r,i),t.pinned!==void 0&&e.setPinned(t.pinned)}findExistingColumn(e,t){if(t)for(let i=0;i<t.length;i++){const s=t[i].getUserProvidedColDef();if(!s)continue;if(e.colId!=null){if(t[i].getId()===e.colId)return{idx:i,column:t[i]};continue}if(e.field!=null){if(s.field===e.field)return{idx:i,column:t[i]};continue}if(s===e)return{idx:i,column:t[i]}}}findExistingGroup(e,t){if(e.groupId!=null)for(let s=0;s<t.length;s++){const n=t[s];if(n.getColGroupDef()&&n.getId()===e.groupId)return{idx:s,group:n}}}addColumnDefaultAndTypes(e,t){var a;const i={},s=this.gos.get("defaultColDef");Ut(i,s,!1,!0);const n=this.updateColDefAndGetColumnType(i,e,t);n&&this.assignColumnTypes(n,i),Ut(i,e,!1,!0);const o=this.gos.get("autoGroupColumnDef"),r=us(this.gos);return e.rowGroup&&o&&r&&Ut(i,{sort:o.sort,initialSort:o.initialSort},!1,!0),(a=this.dataTypeService)==null||a.validateColDef(i),i}updateColDefAndGetColumnType(e,t,i){var o;const s=(o=this.dataTypeService)==null?void 0:o.updateColDefAndGetColumnType(e,t,i),n=t.type??s??e.type;return e.type=n,n?ha(n):void 0}assignColumnTypes(e,t){if(!e.length)return;const i=Object.assign({},ob),s=this.gos.get("columnTypes")||{};Ei(s,(n,o)=>{n in i?z(`the column type '${n}' is a default column type and cannot be overridden.`):(o.type&&z("Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type."),i[n]=o)}),e.forEach(n=>{const o=i[n.trim()];o?Ut(t,o,!1,!0):z("colDef.type '"+n+"' does not correspond to defined gridOptions.columnTypes")})}isColumnGroup(e){return e.children!==void 0}};function As(e,t,i){if(t)for(let s=0;s<t.length;s++){const n=t[s];zt(n)&&As(n,n.getChildren(),i),i(n,e)}}var ab=class extends G{constructor(){super(...arguments),this.beanName="columnModel",this.pivotMode=!1,this.autoHeightActiveAtLeastOnce=!1,this.ready=!1,this.changeEventsDispatching=!1,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}wireBeans(e){this.context=e.context,this.ctrlsService=e.ctrlsService,this.columnFactory=e.columnFactory,this.columnSizeService=e.columnSizeService,this.visibleColsService=e.visibleColsService,this.columnViewportService=e.columnViewportService,this.pivotResultColsService=e.pivotResultColsService,this.columnAnimationService=e.columnAnimationService,this.autoColService=e.autoColService,this.controlsColService=e.controlsColService,this.valueCache=e.valueCache,this.columnDefFactory=e.columnDefFactory,this.columnApplyStateService=e.columnApplyStateService,this.columnGroupStateService=e.columnGroupStateService,this.eventDispatcher=e.columnEventDispatcher,this.columnMoveService=e.columnMoveService,this.columnAutosizeService=e.columnAutosizeService,this.funcColsService=e.funcColsService,this.quickFilterService=e.quickFilterService,this.showRowGroupColsService=e.showRowGroupColsService,this.environment=e.environment}postConstruct(){const e=this.gos.get("pivotMode");this.isPivotSettingAllowed(e)&&(this.pivotMode=e),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],t=>this.refreshAll(Bn(t.source))),this.addManagedPropertyListener("rowSelection",t=>{this.onSelectionOptionsChanged(t.currentValue,t.previousValue,Bn(t.source))}),this.addManagedPropertyListener("autoGroupColumnDef",t=>this.onAutoGroupColumnDefChanged(Bn(t.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],t=>this.recreateColumnDefs(Bn(t.source))),this.addManagedPropertyListener("pivotMode",t=>this.setPivotMode(this.gos.get("pivotMode"),Bn(t.source))),this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}createColsFromColDefs(e){var h,p,f;const t=this.colDefs?this.columnApplyStateService.compareColumnStatesAndDispatchEvents(e):void 0;this.valueCache.expire();const i=(h=this.colDefCols)==null?void 0:h.list,s=(p=this.colDefCols)==null?void 0:p.tree,n=this.columnFactory.createColumnTree(this.colDefs,!0,s,e);Ys(this.context,(f=this.colDefCols)==null?void 0:f.tree,n.columnTree);const o=n.columnTree,r=n.treeDept,a=_d(o),d={};a.forEach(m=>d[m.getId()]=m),this.colDefCols={tree:o,treeDepth:r,list:a,map:d},this.funcColsService.extractCols(e,i),this.ready=!0,this.refreshCols(!0),this.visibleColsService.refresh(e),this.columnViewportService.checkViewportColumns(),this.eventDispatcher.everythingChanged(e),t&&(this.changeEventsDispatching=!0,t(),this.changeEventsDispatching=!1),this.eventDispatcher.newColumnsLoaded(e),e==="gridInitializing"&&this.columnSizeService.applyAutosizeStrategy()}refreshCols(e){var n,o,r;if(!this.colDefCols)return;const t=(n=this.cols)==null?void 0:n.tree;this.saveColOrder(),this.selectCols(),this.createAutoCols(),this.addAutoCols(),this.createControlsCols(),this.addControlsCols();const i=Ny(this.gos,this.showingPivotResult);(!e||i)&&this.restoreColOrder(),this.positionLockedCols(),(o=this.showRowGroupColsService)==null||o.refresh(),(r=this.quickFilterService)==null||r.refreshQuickFilterCols(),this.setColSpanActive(),this.setAutoHeightActive(),this.visibleColsService.clear(),this.columnViewportService.clear(),!hs(t,this.cols.tree)&&this.eventDispatcher.gridColumns()}selectCols(){const e=this.pivotResultColsService.getPivotResultCols();if(this.showingPivotResult=e!=null,e){const{map:t,list:i,tree:s,treeDepth:n}=e;this.cols={list:i.slice(),map:{...t},tree:s.slice(),treeDepth:n},e.list.some(r=>{var a;return((a=this.cols)==null?void 0:a.map[r.getColId()])!==void 0})||(this.lastPivotOrder=null)}else{const{map:t,list:i,tree:s,treeDepth:n}=this.colDefCols;this.cols={list:i.slice(),map:{...t},tree:s.slice(),treeDepth:n}}}getColsToShow(){const e=this.isPivotMode()&&!this.isShowingPivotResult(),t=this.funcColsService.getValueColumns();return this.cols.list.filter(s=>{const n=Od(s);if(e){const o=t&&Ps(t,s);return n||o}else return n||s.isVisible()})}addAutoCols(){this.autoCols!=null&&(this.cols.list=this.autoCols.list.concat(this.cols.list),this.cols.tree=this.autoCols.tree.concat(this.cols.tree),Gg(this.cols))}createAutoCols(){var w,S;const e=oa(this.gos,this.pivotMode),t=this.pivotMode?this.gos.get("pivotSuppressAutoColumn"):this.isSuppressAutoCol(),i=this.funcColsService.getRowGroupColumns(),n=!(i.length>0||this.gos.get("treeData"))||t||e,o=()=>{this.autoCols&&(Ys(this.context,this.autoCols.tree),this.autoCols=null)};if(n||!this.autoColService){o();return}const r=this.autoColService.createAutoCols(i)??[],a=cb(r,((w=this.autoCols)==null?void 0:w.list)||null),d=this.cols.treeDepth,p=(this.autoCols?this.autoCols.treeDepth:-1)==d;if(a&&p)return;o();const[f,m]=this.columnFactory.balanceTreeForAutoCols(r,(S=this.cols)==null?void 0:S.tree);this.autoCols={list:r,tree:f,treeDepth:m,map:{}};const v=b=>{if(!b)return null;const R=b.filter(x=>!Od(x));return[...r,...R]};this.lastOrder=v(this.lastOrder),this.lastPivotOrder=v(this.lastPivotOrder)}createControlsCols(){var n,o,r,a;Ys(this.context,(n=this.controlsCols)==null?void 0:n.tree),this.controlsCols=null;const e=((o=this.controlsColService)==null?void 0:o.createControlsCols())??[],[t,i]=this.columnFactory.balanceTreeForAutoCols(e,this.cols.tree);this.controlsCols={list:e,tree:t,treeDepth:i,map:{}};function s(d,h){const p=Eo(d),f=Eo(h);return p&&!f?-1:!p&&f?1:0}(r=this.lastOrder)==null||r.sort(s),(a=this.lastPivotOrder)==null||a.sort(s)}addControlsCols(){this.controlsCols!=null&&(this.cols.list=this.controlsCols.list.concat(this.cols.list),this.cols.tree=this.controlsCols.tree.concat(this.cols.tree),Gg(this.cols))}refreshAll(e){this.isReady()&&(this.refreshCols(!1),this.visibleColsService.refresh(e))}setColsVisible(e,t=!1,i){this.columnApplyStateService.applyColumnState({state:e.map(s=>({colId:typeof s=="string"?s:s.getColId(),hide:!t}))},i)}setColsPinned(e,t,i){if(!this.cols||Tt(e))return;if(Ft(this.gos,"print")){z("Changing the column pinning status is not allowed with domLayout='print'");return}this.columnAnimationService.start();let s;t===!0||t==="left"?s="left":t==="right"?s="right":s=null;const n=[];e.forEach(o=>{if(!o)return;const r=this.getCol(o);r&&r.getPinned()!==s&&(r.setPinned(s),n.push(r))}),n.length&&(this.visibleColsService.refresh(i),this.eventDispatcher.columnPinned(n,i)),this.columnAnimationService.finish()}setColumnGroupOpened(e,t,i){let s;zt(e)?s=e.getId():s=e||"",this.columnGroupStateService.setColumnGroupState([{groupId:s,open:t}],i)}getProvidedColGroup(e){var i;let t=null;return As(null,(i=this.cols)==null?void 0:i.tree,s=>{zt(s)&&s.getId()===e&&(t=s)}),t}isColGroupLocked(e){const t=this.gos.get("groupLockGroupColumns");if(!e.isRowGroupActive()||t===0)return!1;if(t===-1)return!0;const s=this.funcColsService.getRowGroupColumns().findIndex(n=>n.getColId()===e.getColId());return t>s}isSuppressAutoCol(){return this.gos.get("groupDisplayType")==="custom"?!0:this.gos.get("treeDataDisplayType")==="custom"}setAutoHeightActive(){this.autoHeightActive=this.cols.list.some(e=>e.isVisible()&&e.isAutoHeight()),this.autoHeightActive&&(this.autoHeightActiveAtLeastOnce=!0,st(this.gos)||xs(this.gos)||z("autoHeight columns only work with Client Side Row Model and Server Side Row Model."))}restoreColOrder(){const e=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!e)return;const t=new Map(e.map((d,h)=>[d,h]));if(!this.cols.list.some(d=>t.has(d)))return;const s=new Map(this.cols.list.map(d=>[d,!0])),n=e.filter(d=>s.has(d)),o=new Map(n.map(d=>[d,!0])),r=this.cols.list.filter(d=>!o.has(d)),a=n.slice();r.forEach(d=>{let h=d.getOriginalParent();if(!h){a.push(d);return}const p=[];for(;!p.length&&h;)h.getLeafColumns().forEach(w=>{const S=a.indexOf(w)>=0,b=p.indexOf(w)<0;S&&b&&p.push(w)}),h=h.getOriginalParent();if(!p.length){a.push(d);return}const f=p.map(v=>a.indexOf(v)),m=Math.max(...f);aa(a,d,m+1)}),this.cols.list=a}sortColsLikeKeys(e){if(this.cols==null)return;let t=[];const i={};e.forEach(n=>{if(i[n])return;const o=this.cols.map[n];o&&(t.push(o),i[n]=!0)});let s=0;if(this.cols.list.forEach(n=>{const o=n.getColId();if(i[o]!=null)return;o.startsWith(ua)?aa(t,n,s++):t.push(n)}),t=this.columnMoveService.placeLockedColumns(t),!this.columnMoveService.doesMovePassMarryChildren(t)){z("Applying column order broke a group where columns should be married together. Applying new order has been discarded.");return}this.cols.list=t}sortColsLikeCols(e){!e||e.length<=1||e.filter(i=>this.cols.list.indexOf(i)<0).length>0||e.sort((i,s)=>{const n=this.cols.list.indexOf(i),o=this.cols.list.indexOf(s);return n-o})}resetColDefIntoCol(e,t){const i=e.getUserProvidedColDef();if(!i)return!1;const s=this.columnFactory.addColumnDefaultAndTypes(i,e.getColId());return e.setColDef(s,i,t),!0}queueResizeOperations(){this.shouldQueueResizeOperations=!0}isShouldQueueResizeOperations(){return this.shouldQueueResizeOperations}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}moveInCols(e,t,i){var s;Ig((s=this.cols)==null?void 0:s.list,e,t),this.visibleColsService.refresh(i)}positionLockedCols(){this.cols.list=this.columnMoveService.placeLockedColumns(this.cols.list)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=(e=this.cols)==null?void 0:e.list:this.lastOrder=(t=this.cols)==null?void 0:t.list}getColumnDefs(){if(!this.colDefCols)return;const e=this.colDefCols.list.slice();this.showingPivotResult?e.sort((s,n)=>this.lastOrder.indexOf(s)-this.lastOrder.indexOf(n)):this.lastOrder&&e.sort((s,n)=>this.cols.list.indexOf(s)-this.cols.list.indexOf(n));const t=this.funcColsService.getRowGroupColumns(),i=this.funcColsService.getPivotColumns();return this.columnDefFactory.buildColumnDefs(e,t,i)}isShowingPivotResult(){return this.showingPivotResult}isChangeEventsDispatching(){return this.changeEventsDispatching}isColSpanActive(){return this.colSpanActive}isProvidedColGroupsPresent(){var e;return((e=this.colDefCols)==null?void 0:e.treeDepth)>0}setColSpanActive(){this.colSpanActive=this.cols.list.some(e=>e.getColDef().colSpan!=null)}isAutoRowHeightActive(){return this.autoHeightActive}wasAutoRowHeightEverActive(){return this.autoHeightActiveAtLeastOnce}getHeaderRowCount(){return this.cols?this.cols.treeDepth+1:-1}isReady(){return this.ready}isPivotMode(){return this.pivotMode}setPivotMode(e,t){e===this.pivotMode||!this.isPivotSettingAllowed(this.pivotMode)||(this.pivotMode=e,this.ready&&(this.refreshCols(!1),this.visibleColsService.refresh(t),this.eventDispatcher.pivotModeChanged()))}isPivotSettingAllowed(e){return e&&this.gos.get("treeData")?(z("Pivot mode not available with treeData."),!1):!0}isPivotActive(){const e=this.funcColsService.getPivotColumns();return this.pivotMode&&!Tt(e)}recreateColumnDefs(e){this.cols&&(this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e),this.createColsFromColDefs(e))}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e,t,i;Ys(this.context,(e=this.colDefCols)==null?void 0:e.tree),Ys(this.context,(t=this.autoCols)==null?void 0:t.tree),Ys(this.context,(i=this.controlsCols)==null?void 0:i.tree),super.destroy()}getColTree(){return this.cols.tree}getColDefColTree(){return this.colDefCols.tree}getColDefCols(){var e;return(e=this.colDefCols)!=null&&e.list?this.colDefCols.list:null}getCols(){var e;return((e=this.cols)==null?void 0:e.list)??[]}getAllCols(){var i,s,n;const e=this.pivotResultColsService.getPivotResultCols(),t=e==null?void 0:e.list;return[((i=this.colDefCols)==null?void 0:i.list)??[],((s=this.autoCols)==null?void 0:s.list)??[],((n=this.controlsCols)==null?void 0:n.list)??[],t??[]].flat()}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColFromCollection(e,t){if(t==null)return null;const{map:i,list:s}=t;if(typeof e=="string"&&i[e])return i[e];for(let n=0;n<s.length;n++)if(Hg(s[n],e))return s[n];return this.getAutoCol(e)}getAutoCol(e){var t;return((t=this.autoCols)==null?void 0:t.list.find(i=>Hg(i,e)))??null}getAutoCols(){var e;return((e=this.autoCols)==null?void 0:e.list)??null}setColHeaderHeight(e,t){e.setAutoHeaderHeight(t)&&(e.isColumn?this.eventDispatcher.headerHeight(e):this.eventDispatcher.groupHeaderHeight(e))}getGroupRowsHeight(){const e=[],t=this.ctrlsService.getHeaderRowContainerCtrls();for(const i of t){if(!i)continue;const s=i.getGroupRowCount()||0;for(let n=0;n<s;n++){const o=i.getGroupRowCtrlAtIndex(n),r=e[n];if(o){const a=this.getColumnGroupHeaderRowHeight(o);(r==null||a>r)&&(e[n]=a)}}}return e}getColumnGroupHeaderRowHeight(e){const t=this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight();let i=0;const s=e.getHeaderCtrls();for(const n of s){const o=n.getColumn();if(o.isAutoHeaderHeight()){const r=o.getAutoHeaderHeight();r!=null&&r>i&&(i=r)}}return Math.max(t,i)}getColumnHeaderRowHeight(){const e=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),i=this.visibleColsService.getAllCols().filter(s=>s.isAutoHeaderHeight()).map(s=>s.getAutoHeaderHeight()||0);return Math.max(e,...i)}getHeaderHeight(){return this.gos.get("headerHeight")??this.environment.getDefaultHeaderHeight()}getFloatingFiltersHeight(){return this.gos.get("floatingFiltersHeight")??this.getHeaderHeight()}getGroupHeaderHeight(){return this.gos.get("groupHeaderHeight")??this.getHeaderHeight()}getPivotHeaderHeight(){return this.gos.get("pivotHeaderHeight")??this.getHeaderHeight()}getPivotGroupHeaderHeight(){return this.gos.get("pivotGroupHeaderHeight")??this.getGroupHeaderHeight()}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if((e==null?void 0:e.type)!=="fitCellContents")return;const{colIds:t,skipHeader:i}=e;setTimeout(()=>{t?this.columnAutosizeService.autoSizeCols({colKeys:t,skipHeader:i,source:"autosizeColumns"}):this.columnAutosizeService.autoSizeAllColumns("autosizeColumns",i)})}onAutoGroupColumnDefChanged(e){this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e)}onSelectionOptionsChanged(e,t,i){if(typeof e=="string"||typeof t=="string")return;const s=t?Ro(t):void 0,n=e?Ro(e):void 0,o=s!==n,r=t?ra(t):void 0,a=e?ra(e):void 0;(o||r!==a)&&this.refreshAll(i)}};function Bn(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function Gg(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function Hg(e,t){const i=e===t,s=e.getColDef()===t,n=e.getColId()==t;return i||s||n}function cb(e,t){return hs(e,t,(i,s)=>i.getColId()===s.getColId())}var db=class extends G{constructor(){super(...arguments),this.beanName="columnAutosizeService",this.timesDelayed=0}wireBeans(e){this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.animationFrameService=e.animationFrameService,this.autoWidthCalculator=e.autoWidthCalculator,this.eventDispatcher=e.columnEventDispatcher,this.ctrlsService=e.ctrlsService,this.renderStatusService=e.renderStatusService}autoSizeCols(e){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.autoSizeCols(e));return}const{colKeys:t,skipHeader:i,skipHeaderGroups:s,stopAtGroup:n,source:o="api"}=e;if(this.animationFrameService.flushAllFrames(),this.timesDelayed<5&&this.renderStatusService&&!this.renderStatusService.areHeaderCellsRendered()){this.timesDelayed++,setTimeout(()=>this.autoSizeCols(e));return}this.timesDelayed=0;const r=[];let a=-1;const d=i??this.gos.get("skipHeaderOnAutoSize"),h=s??d;for(;a!==0;){a=0;const p=[];t.forEach(f=>{if(!f)return;const m=this.columnModel.getCol(f);if(!m||r.indexOf(m)>=0)return;const v=this.autoWidthCalculator.getPreferredWidthForColumn(m,d);if(v>0){const w=this.normaliseColumnWidth(m,v);m.setActualWidth(w,o),r.push(m),a++}p.push(m)}),p.length&&this.visibleColsService.refresh(o)}h||this.autoSizeColumnGroupsByColumns(t,o,n),this.eventDispatcher.columnResized(r,!0,"autosizeColumns")}autoSizeColumn(e,t,i){e&&this.autoSizeCols({colKeys:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){const s=new Set;this.columnModel.getColsForKeys(e).forEach(a=>{let d=a.getParent();for(;d&&d!=i;)d.isPadding()||s.add(d),d=d.getParent()});let o;const r=[];for(const a of s){for(const d of this.ctrlsService.getHeaderRowContainerCtrls())if(o=d.getHeaderCtrlForColumn(a),o)break;o&&o.resizeLeafColumnsToFit(t)}return r}autoSizeAllColumns(e,t){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.autoSizeAllColumns(e,t));return}const i=this.visibleColsService.getAllCols();this.autoSizeCols({colKeys:i,skipHeader:t,source:e})}normaliseColumnWidth(e,t){const i=e.getMinWidth();t<i&&(t=i);const s=e.getMaxWidth();return e.isGreaterThanMax(t)&&(t=s),t}},ub=class extends G{constructor(){super(...arguments),this.beanName="funcColsService",this.rowGroupCols=[],this.valueCols=[],this.pivotCols=[]}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.aggFuncService=e.aggFuncService,this.visibleColsService=e.visibleColsService}getModifyColumnsNoEventsCallbacks(){return{addGroupCol:e=>this.rowGroupCols.push(e),removeGroupCol:e=>kt(this.rowGroupCols,e),addPivotCol:e=>this.pivotCols.push(e),removePivotCol:e=>kt(this.pivotCols,e),addValueCol:e=>this.valueCols.push(e),removeValueCol:e=>kt(this.valueCols,e)}}getSourceColumnsForGroupColumn(e){const t=e.getColDef().showRowGroup;if(!t)return null;if(t===!0)return this.rowGroupCols.slice(0);const i=this.columnModel.getColDefCol(t);return i?[i]:null}sortRowGroupColumns(e){this.rowGroupCols.sort(e)}sortPivotColumns(e){this.pivotCols.sort(e)}getValueColumns(){return this.valueCols?this.valueCols:[]}getPivotColumns(){return this.pivotCols?this.pivotCols:[]}getRowGroupColumns(){return this.rowGroupCols?this.rowGroupCols:[]}isRowGroupEmpty(){return Tt(this.rowGroupCols)}setColumnAggFunc(e,t,i){if(!e)return;const s=this.columnModel.getColDefCol(e);s&&(s.setAggFunc(t),this.eventDispatcher.columnChanged("columnValueChanged",[s],i))}setRowGroupColumns(e,t){this.setColList(e,this.rowGroupCols,"columnRowGroupChanged",!0,!0,(i,s)=>this.setRowGroupActive(i,s,t),t)}setRowGroupActive(e,t,i){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,i),e&&!this.gos.get("suppressRowGroupHidesColumns")&&this.columnModel.setColsVisible([t],!1,i),!e&&!this.gos.get("suppressMakeColumnVisibleAfterUnGroup")&&this.columnModel.setColsVisible([t],!0,i))}addRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!0,!0,i=>this.setRowGroupActive(!0,i,t),"columnRowGroupChanged",t)}removeRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!1,!0,i=>this.setRowGroupActive(!1,i,t),"columnRowGroupChanged",t)}addPivotColumns(e,t){this.updateColList(e,this.pivotCols,!0,!1,i=>i.setPivotActive(!0,t),"columnPivotChanged",t)}setPivotColumns(e,t){this.setColList(e,this.pivotCols,"columnPivotChanged",!0,!1,(i,s)=>{s.setPivotActive(i,t)},t)}removePivotColumns(e,t){this.updateColList(e,this.pivotCols,!1,!1,i=>i.setPivotActive(!1,t),"columnPivotChanged",t)}setValueColumns(e,t){this.setColList(e,this.valueCols,"columnValueChanged",!1,!1,(i,s)=>this.setValueActive(i,s,t),t)}setValueActive(e,t,i){if(e!==t.isValueActive()&&(t.setValueActive(e,i),e&&!t.getAggFunc()&&this.aggFuncService)){const s=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(s)}}addValueColumns(e,t){this.updateColList(e,this.valueCols,!0,!1,i=>this.setValueActive(!0,i,t),"columnValueChanged",t)}removeValueColumns(e,t){this.updateColList(e,this.valueCols,!1,!1,i=>this.setValueActive(!1,i,t),"columnValueChanged",t)}moveRowGroupColumn(e,t,i){if(this.isRowGroupEmpty())return;const s=this.rowGroupCols[e],n=this.rowGroupCols.slice(e,t);this.rowGroupCols.splice(e,1),this.rowGroupCols.splice(t,0,s),this.eventDispatcher.rowGroupChanged(n,i)}setColList(e,t,i,s,n,o,r){const a=this.columnModel.getCols();if(Tt(a))return;const d=new Map;t.forEach((p,f)=>d.set(p,f)),t.length=0,q(e)&&e.forEach(p=>{const f=this.columnModel.getColDefCol(p);f&&t.push(f)}),t.forEach((p,f)=>{const m=d.get(p);if(m===void 0){d.set(p,0);return}s&&m!==f||d.delete(p)}),(this.columnModel.getColDefCols()||[]).forEach(p=>{const f=t.indexOf(p)>=0;o(f,p)}),n&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(r),this.eventDispatcher.columnChanged(i,[...d.keys()],r)}updateColList(e,t,i,s,n,o,r){if(!e||Tt(e))return;let a=!1;const d=new Set;e.forEach(h=>{if(!h)return;const p=this.columnModel.getColDefCol(h);if(p){if(d.add(p),i){if(t.indexOf(p)>=0)return;t.push(p)}else{const f=t.indexOf(p);if(f<0)return;for(let m=f+1;m<t.length;m++)d.add(t[m]);kt(t,p)}n(p),a=!0}}),a&&(s&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(r),this.eventDispatcher.genericColumnEvent(o,Array.from(d),r))}extractCols(e,t){this.extractRowGroupCols(e,t),this.extractPivotCols(e,t),this.extractValueCols(e,t)}extractValueCols(e,t){this.valueCols=this.extractColsCommon(t,this.valueCols,(i,s)=>i.setValueActive(s,e),()=>{},()=>{},i=>{const s=i.aggFunc;if(s===null||s==="")return null;if(s!==void 0)return!!s},i=>i.initialAggFunc!=null&&i.initialAggFunc!=""),this.valueCols.forEach(i=>{const s=i.getColDef();s.aggFunc!=null&&s.aggFunc!=""?i.setAggFunc(s.aggFunc):i.getAggFunc()||i.setAggFunc(s.initialAggFunc)})}extractRowGroupCols(e,t){this.rowGroupCols=this.extractColsCommon(t,this.rowGroupCols,(i,s)=>i.setRowGroupActive(s,e),i=>i.rowGroupIndex,i=>i.initialRowGroupIndex,i=>i.rowGroup,i=>i.initialRowGroup)}extractPivotCols(e,t){this.pivotCols=this.extractColsCommon(t,this.pivotCols,(i,s)=>i.setPivotActive(s,e),i=>i.pivotIndex,i=>i.initialPivotIndex,i=>i.pivot,i=>i.initialPivot)}extractColsCommon(e=[],t=[],i,s,n,o,r){const a=[],d=[];(this.columnModel.getColDefCols()||[]).forEach(m=>{const v=e.indexOf(m)<0,w=m.getColDef(),S=Fd(o(w)),b=Fd(r(w)),R=_n(s(w)),x=_n(n(w));let T;S!==void 0?T=S:R!==void 0?R===null?T=!1:T=R>=0:v?b!==void 0?T=b:x!==void 0?T=x!=null&&x>=0:T=!1:T=t.indexOf(m)>=0,T&&((v?R!=null||x!=null:R!=null)?a.push(m):d.push(m))});const p=m=>{const v=s(m.getColDef()),w=n(m.getColDef());return v??w};a.sort((m,v)=>{const w=p(m),S=p(v);return w===S?0:w<S?-1:1});const f=[].concat(a);return t.forEach(m=>{d.indexOf(m)>=0&&f.push(m)}),d.forEach(m=>{f.indexOf(m)<0&&f.push(m)}),t.forEach(m=>{f.indexOf(m)<0&&i(m,!1)}),f.forEach(m=>{t.indexOf(m)<0&&i(m,!0)}),f}generateColumnStateForRowGroupAndPivotIndexes(e,t){const i={},s=(n,o,r,a,d,h)=>{const p=this.columnModel.getColDefCols();if(!o.length||!p)return[];const f=Object.keys(n),m=new Set(f),v=new Set(f),w=new Set(o.map(L=>{const A=L.getColId();return v.delete(A),A}).concat(f)),S=[],b={};let R=0;for(let L=0;L<p.length;L++){const A=p[L].getColId();w.has(A)&&(S.push(A),b[A]=R++)}let x=1e3,T=!1,I=0;const V=L=>{const A=b[L];for(let k=I;k<A;k++){const N=S[k];v.has(N)&&(n[N][d]=x++,v.delete(N))}I=A};o.forEach(L=>{const A=L.getColId();if(m.has(A))V(A),n[A][d]=x++;else{const k=L.getColDef();(k[d]===null||k[d]===void 0&&k[h]==null)&&(T||(k[r]||k[r]===void 0&&k[a]?V(A):(v.forEach(U=>{n[U][d]=x+b[U]}),x+=S.length,T=!0)),i[A]||(i[A]={colId:A}),i[A][d]=x++)}})};return s(e,this.rowGroupCols,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),s(t,this.pivotCols,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(i)}},hb=class extends G{constructor(){super(...arguments),this.beanName="columnApplyStateService"}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.sortController=e.sortController,this.columnGetStateService=e.columnGetStateService,this.funcColsService=e.funcColsService,this.visibleColsService=e.visibleColsService,this.columnAnimationService=e.columnAnimationService,this.pivotResultColsService=e.pivotResultColsService}applyColumnState(e,t){const i=this.columnModel.getColDefCols()||[];if(Tt(i))return!1;if(e&&e.state&&!e.state.forEach)return z("applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state."),!1;const s=this.funcColsService.getModifyColumnsNoEventsCallbacks(),n=(a,d,h)=>{const p=this.compareColumnStatesAndDispatchEvents(t),f=d.slice(),m={},v={},w=[],S=[];let b=0;const R=this.funcColsService.getRowGroupColumns().slice(),x=this.funcColsService.getPivotColumns().slice();a.forEach(L=>{const A=L.colId||"";if(A.startsWith(ua)){w.push(L),S.push(L);return}const N=h(A);N?(this.syncColumnWithStateItem(N,L,e.defaultState,m,v,!1,t,s),kt(f,N)):(S.push(L),b+=1)});const T=L=>this.syncColumnWithStateItem(L,null,e.defaultState,m,v,!1,t,s);f.forEach(T),this.funcColsService.sortRowGroupColumns(Wg.bind(this,m,R)),this.funcColsService.sortPivotColumns(Wg.bind(this,v,x)),this.columnModel.refreshCols(!1);const V=(this.columnModel.getAutoCols()||[]).slice();return w.forEach(L=>{const A=this.columnModel.getAutoCol(L.colId);kt(V,A),this.syncColumnWithStateItem(A,L,e.defaultState,null,null,!0,t,s)}),V.forEach(T),this.orderLiveColsLikeState(e),this.visibleColsService.refresh(t),this.eventDispatcher.everythingChanged(t),p(),{unmatchedAndAutoStates:S,unmatchedCount:b}};this.columnAnimationService.start();let{unmatchedAndAutoStates:o,unmatchedCount:r}=n(e.state||[],i,a=>this.columnModel.getColDefCol(a));if(o.length>0||q(e.defaultState)){const a=this.pivotResultColsService.getPivotResultCols(),d=a==null?void 0:a.list;r=n(o,d||[],h=>this.pivotResultColsService.getPivotResultCol(h)).unmatchedCount}return this.columnAnimationService.finish(),r===0}resetColumnState(e){const t=this.columnModel.getColDefCols();if(Tt(t))return;const i=this.columnModel.getColDefColTree(),s=_d(i),n=[];let o=1e3,r=1e3,a=[];const d=this.columnModel.getAutoCols();d&&(a=a.concat(d)),s&&(a=a.concat(s)),a.forEach(h=>{const p=this.getColumnStateFromColDef(h);Ve(p.rowGroupIndex)&&p.rowGroup&&(p.rowGroupIndex=o++),Ve(p.pivotIndex)&&p.pivot&&(p.pivotIndex=r++),n.push(p)}),this.applyColumnState({state:n,applyOrder:!0},e)}getColumnStateFromColDef(e){const t=(w,S)=>w??S??null,i=e.getColDef(),s=t(i.sort,i.initialSort),n=t(i.sortIndex,i.initialSortIndex),o=t(i.hide,i.initialHide),r=t(i.pinned,i.initialPinned),a=t(i.width,i.initialWidth),d=t(i.flex,i.initialFlex);let h=t(i.rowGroupIndex,i.initialRowGroupIndex),p=t(i.rowGroup,i.initialRowGroup);h==null&&(p==null||p==!1)&&(h=null,p=null);let f=t(i.pivotIndex,i.initialPivotIndex),m=t(i.pivot,i.initialPivot);f==null&&(m==null||m==!1)&&(f=null,m=null);const v=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:s,sortIndex:n,hide:o,pinned:r,width:a,flex:d,rowGroup:p,rowGroupIndex:h,pivot:m,pivotIndex:f,aggFunc:v}}syncColumnWithStateItem(e,t,i,s,n,o,r,a){if(!e)return;const d=(I,V)=>{const L={value1:void 0,value2:void 0};let A=!1;return t&&(t[I]!==void 0&&(L.value1=t[I],A=!0),q(V)&&t[V]!==void 0&&(L.value2=t[V],A=!0)),!A&&i&&(i[I]!==void 0&&(L.value1=i[I]),q(V)&&i[V]!==void 0&&(L.value2=i[V])),L},h=d("hide").value1;h!==void 0&&e.setVisible(!h,r);const p=d("pinned").value1;p!==void 0&&e.setPinned(p);const f=e.getColDef().minWidth??this.gos.environment.getDefaultColumnMinWidth(),m=d("flex").value1;if(m!==void 0&&e.setFlex(m),m==null){const I=d("width").value1;I!=null&&f!=null&&I>=f&&e.setActualWidth(I,r)}const v=d("sort").value1;v!==void 0&&(v==="desc"||v==="asc"?e.setSort(v,r):e.setSort(void 0,r));const w=d("sortIndex").value1;if(w!==void 0&&e.setSortIndex(w),o||!e.isPrimary())return;const S=d("aggFunc").value1;S!==void 0&&(typeof S=="string"?(e.setAggFunc(S),e.isValueActive()||(e.setValueActive(!0,r),a.addValueCol(e))):(q(S)&&z("stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON."),e.isValueActive()&&(e.setValueActive(!1,r),a.removeValueCol(e))));const{value1:b,value2:R}=d("rowGroup","rowGroupIndex");(b!==void 0||R!==void 0)&&(typeof R=="number"||b?(e.isRowGroupActive()||(e.setRowGroupActive(!0,r),a.addGroupCol(e)),s&&typeof R=="number"&&(s[e.getId()]=R)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,r),a.removeGroupCol(e)));const{value1:x,value2:T}=d("pivot","pivotIndex");(x!==void 0||T!==void 0)&&(typeof T=="number"||x?(e.isPivotActive()||(e.setPivotActive(!0,r),a.addPivotCol(e)),n&&typeof T=="number"&&(n[e.getId()]=T)):e.isPivotActive()&&(e.setPivotActive(!1,r),a.removePivotCol(e)))}orderLiveColsLikeState(e){if(!e.applyOrder||!e.state)return;const t=[];e.state.forEach(i=>{i.colId!=null&&t.push(i.colId)}),this.columnModel.sortColsLikeKeys(t)}compareColumnStatesAndDispatchEvents(e){const t={rowGroupColumns:this.funcColsService.getRowGroupColumns().slice(),pivotColumns:this.funcColsService.getPivotColumns().slice(),valueColumns:this.funcColsService.getValueColumns().slice()},i=this.columnGetStateService.getColumnState(),s={};return i.forEach(n=>{s[n.colId]=n}),()=>{const n=this.columnModel.getAllCols(),o=(S,b,R,x)=>{const T=b.map(x),I=R.map(x);if(hs(T,I))return;const L=new Set(b);R.forEach(k=>{L.delete(k)||L.add(k)});const A=[...L];this.eventService.dispatchEvent({type:S,columns:A,column:A.length===1?A[0]:null,source:e})},r=S=>{const b=[];return n.forEach(R=>{const x=s[R.getColId()];x&&S(x,R)&&b.push(R)}),b},a=S=>S.getColId();o("columnRowGroupChanged",t.rowGroupColumns,this.funcColsService.getRowGroupColumns(),a),o("columnPivotChanged",t.pivotColumns,this.funcColsService.getPivotColumns(),a);const h=r((S,b)=>{const R=S.aggFunc!=null,x=R!=b.isValueActive(),T=R&&S.aggFunc!=b.getAggFunc();return x||T});h.length>0&&this.eventDispatcher.columnChanged("columnValueChanged",h,e);const p=(S,b)=>S.width!=b.getActualWidth();this.eventDispatcher.columnResized(r(p),!0,e);const f=(S,b)=>S.pinned!=b.getPinned();this.eventDispatcher.columnPinned(r(f),e);const m=(S,b)=>S.hide==b.isVisible();this.eventDispatcher.columnVisible(r(m),e);const w=r((S,b)=>S.sort!=b.getSort()||S.sortIndex!=b.getSortIndex());w.length>0&&this.sortController.dispatchSortChangedEvents(e,w),this.normaliseColumnMovedEventForColumnState(i,e)}}normaliseColumnMovedEventForColumnState(e,t){const i=this.columnGetStateService.getColumnState(),s={};i.forEach(d=>s[d.colId]=d);const n={};e.forEach(d=>{s[d.colId]&&(n[d.colId]=!0)});const o=e.filter(d=>n[d.colId]),r=i.filter(d=>n[d.colId]),a=[];r.forEach((d,h)=>{const p=o&&o[h];if(p&&p.colId!==d.colId){const f=this.columnModel.getCol(p.colId);f&&a.push(f)}}),a.length&&this.eventDispatcher.columnMoved({movedColumns:a,source:t,finished:!0})}},Wg=(e,t,i,s)=>{const n=e[i.getId()],o=e[s.getId()],r=n!=null,a=o!=null;if(r&&a)return n-o;if(r)return-1;if(a)return 1;const d=t.indexOf(i),h=t.indexOf(s),p=d>=0,f=h>=0;return p&&f?d-h:p?-1:1},pb=class extends G{constructor(){super(...arguments),this.beanName="columnMoveService"}wireBeans(e){this.columnModel=e.columnModel,this.columnAnimationService=e.columnAnimationService,this.eventDispatcher=e.columnEventDispatcher}moveColumnByIndex(e,t,i){const s=this.columnModel.getCols();if(!s)return;const n=s[e];this.moveColumns([n],t,i)}moveColumns(e,t,i,s=!0){const n=this.columnModel.getCols();if(!n)return;if(t>n.length-e.length){z("tried to insert columns in invalid location, toIndex = ",t),z("remember that you should not count the moving columns when calculating the new index");return}this.columnAnimationService.start();const o=this.columnModel.getColsForKeys(e);this.doesMovePassRules(o,t)&&(this.columnModel.moveInCols(o,t,i),this.eventDispatcher.columnMoved({movedColumns:o,source:i,toIndex:t,finished:s})),this.columnAnimationService.finish()}doesMovePassRules(e,t){const i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){return!(!this.doesMovePassMarryChildren(e)||!this.doesMovePassLockedPositions(e))}getProposedColumnOrder(e,t){const s=this.columnModel.getCols().slice();return Ig(s,e,t),s}doesMovePassLockedPositions(e){const t=o=>o?o==="left"||o===!0?-1:1:0,i=this.gos.get("enableRtl");let s=i?1:-1,n=!0;return e.forEach(o=>{const r=t(o.getColDef().lockPosition);i?r>s&&(n=!1):r<s&&(n=!1),s=r}),n}doesMovePassMarryChildren(e){let t=!0;const i=this.columnModel.getColTree();return As(null,i,s=>{if(!zt(s))return;const n=s,o=n.getColGroupDef();if(!(o&&o.marryChildren))return;const a=[];n.getLeafColumns().forEach(m=>{const v=e.indexOf(m);a.push(v)});const d=Math.max.apply(Math,a),h=Math.min.apply(Math,a),p=d-h,f=n.getLeafColumns().length-1;p>f&&(t=!1)}),t}placeLockedColumns(e){const t=[],i=[],s=[];return e.forEach(o=>{const r=o.getColDef().lockPosition;r==="right"?s.push(o):r==="left"||r===!0?t.push(o):i.push(o)}),this.gos.get("enableRtl")?[...s,...i,...t]:[...t,...i,...s]}},gb=/[&<>"']/g,fb={"&":"&","<":"<",">":">",'"':""","'":"'"};function ps(e,t){if(e==null)return null;const i=e.toString().toString();return t?i:i.replace(gb,s=>fb[s])}function mb(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,i=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(i,"$1 $2$3").replace(/\./g," ").split(" ").map(n=>n.substring(0,1).toUpperCase()+(n.length>1?n.substring(1,n.length):"")).join(" ")}function Cb(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}var vb=class extends G{constructor(){super(...arguments),this.beanName="columnNameService"}wireBeans(e){this.expressionService=e.expressionService,this.funcColsService=e.funcColsService,this.columnModel=e.columnModel}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;const s=this.getHeaderName(e.getColDef(),e,null,null,t);return i?this.wrapHeaderNameWithAggFunc(e,s):s}getDisplayNameForProvidedColumnGroup(e,t,i){const s=t?t.getColGroupDef():null;return s?this.getHeaderName(s,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,s,n){const o=e.headerValueGetter;if(o){const r=this.gos.addGridCommonParams({colDef:e,column:t,columnGroup:i,providedColumnGroup:s,location:n});return typeof o=="function"?o(r):typeof o=="string"?this.expressionService.evaluate(o,r):(z("headerValueGetter must be a function or a string"),"")}else{if(e.headerName!=null)return e.headerName;if(e.field)return mb(e.field)}return""}wrapHeaderNameWithAggFunc(e,t){if(this.gos.get("suppressAggFuncInHeader"))return t;const i=e.getColDef().pivotValueColumn,s=q(i);let n=null,o;if(s){const r=this.funcColsService.getValueColumns(),a=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&r.length===1,d=e.getColDef().pivotTotalColumnIds!==void 0;if(a&&!d)return t;n=i?i.getAggFunc():null,o=!0}else{const r=e.isValueActive(),a=this.columnModel.isPivotMode()||!this.funcColsService.isRowGroupEmpty();r&&a?(n=e.getAggFunc(),o=!0):o=!1}if(o){const r=typeof n=="string"?n:"func";return`${this.localeService.getLocaleTextFunc()(r,r)}(${t})`}return t}},wb=class extends G{constructor(){super(...arguments),this.beanName="pivotResultColsService"}wireBeans(e){this.context=e.context,this.columnModel=e.columnModel,this.columnFactory=e.columnFactory,this.visibleColsService=e.visibleColsService}destroy(){var e;Ys(this.context,(e=this.pivotResultCols)==null?void 0:e.tree),super.destroy()}isPivotResultColsPresent(){return this.pivotResultCols!=null}lookupPivotResultCol(e,t){if(this.pivotResultCols==null)return null;const i=this.columnModel.getColDefCol(t);let s=null;return this.pivotResultCols.list.forEach(n=>{const o=n.getColDef().pivotKeys,r=n.getColDef().pivotValueColumn;hs(o,e)&&r===i&&(s=n)}),s}getPivotResultCols(){return this.pivotResultCols}getPivotResultCol(e){return this.pivotResultCols?this.columnModel.getColFromCollection(e,this.pivotResultCols):null}setPivotResultCols(e,t){var i,s;if(this.columnModel.isReady()&&!(e==null&&this.pivotResultCols==null)){if(e){this.processPivotResultColDef(e);const n=this.columnFactory.createColumnTree(e,!1,((i=this.pivotResultCols)==null?void 0:i.tree)||this.previousPivotResultCols||void 0,t);Ys(this.context,(s=this.pivotResultCols)==null?void 0:s.tree,n.columnTree);const o=n.columnTree,r=n.treeDept,a=_d(o),d={};this.pivotResultCols={tree:o,treeDepth:r,list:a,map:d},this.pivotResultCols.list.forEach(p=>this.pivotResultCols.map[p.getId()]=p);const h=!!this.previousPivotResultCols;this.previousPivotResultCols=null,this.columnModel.refreshCols(!h)}else this.previousPivotResultCols=this.pivotResultCols?this.pivotResultCols.tree:null,this.pivotResultCols=null,this.columnModel.refreshCols(!1);this.visibleColsService.refresh(t)}}processPivotResultColDef(e){const t=this.gos.get("processPivotResultColDef"),i=this.gos.get("processPivotResultColGroupDef");if(!t&&!i)return;const s=n=>{n.forEach(o=>{if(q(o.children)){const a=o;i&&i(a),s(a.children)}else t&&t(o)})};e&&s(e)}},Sb=class extends G{constructor(){super(...arguments),this.beanName="columnSizeService"}wireBeans(e){this.columnModel=e.columnModel,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher,this.visibleColsService=e.visibleColsService,this.ctrlsService=e.ctrlsService}setColumnWidths(e,t,i,s){const n=[];e.forEach(o=>{const r=this.columnModel.getColDefCol(o.key)||this.columnModel.getCol(o.key);if(!r)return;if(n.push({width:o.newWidth,ratios:[1],columns:[r]}),this.gos.get("colResizeDefault")==="shift"&&(t=!t),t){const d=this.visibleColsService.getColAfter(r);if(!d)return;const h=r.getActualWidth()-o.newWidth,p=d.getActualWidth()+h;n.push({width:p,ratios:[1],columns:[d]})}}),n.length!==0&&this.resizeColumnSets({resizeSets:n,finished:i,source:s})}resizeColumnSets(e){const{resizeSets:t,finished:i,source:s}=e;if(!(!t||t.every(p=>this.checkMinAndMaxWidthsForSet(p)))){if(i){const p=t&&t.length>0?t[0].columns:null;this.eventDispatcher.columnResized(p,i,s)}return}const o=[],r=[];t.forEach(p=>{const{width:f,columns:m,ratios:v}=p,w={},S={};m.forEach(x=>r.push(x));let b=!0,R=0;for(;b;){if(R++,R>1e3){We("infinite loop in resizeColumnSets");break}b=!1;const x=[];let T=0,I=f;m.forEach((L,A)=>{if(S[L.getId()])I-=w[L.getId()];else{x.push(L);const N=v[A];T+=N}});const V=1/T;x.forEach((L,A)=>{const k=A===x.length-1;let N;k?N=I:(N=Math.round(v[A]*f*V),I-=N);const $=L.getMinWidth(),U=L.getMaxWidth();N<$?(N=$,S[L.getId()]=!0,b=!0):U>0&&N>U&&(N=U,S[L.getId()]=!0,b=!0),w[L.getId()]=N})}m.forEach(x=>{const T=w[x.getId()];x.getActualWidth()!==T&&(x.setActualWidth(T,s),o.push(x))})});const a=o.length>0;let d=[];a&&(d=this.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0}),this.visibleColsService.setLeftValues(s),this.visibleColsService.updateBodyWidths(),this.columnViewportService.checkViewportColumns());const h=r.concat(d);(a||i)&&this.eventDispatcher.columnResized(h,i,s,d)}checkMinAndMaxWidthsForSet(e){const{columns:t,width:i}=e;let s=0,n=0,o=!0;t.forEach(d=>{const h=d.getMinWidth();s+=h||0;const p=d.getMaxWidth();p>0?n+=p:o=!1});const r=i>=s,a=!o||i<=n;return r&&a}refreshFlexedColumns(e={}){const t=e.source?e.source:"flex";if(e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];const i=this.visibleColsService.getCenterCols();let s=-1;if(e.resizingCols){const m=new Set(e.resizingCols);for(let v=i.length-1;v>=0;v--)if(m.has(i[v])){s=v;break}}let n=0,o=[],r=0,a=0;for(let m=0;m<i.length;m++)i[m].getFlex()&&m>s?(o.push(i[m]),a+=i[m].getFlex(),r+=i[m].getMinWidth()):n+=i[m].getActualWidth();if(!o.length)return[];let d=[];n+r>this.flexViewportWidth&&(o.forEach(m=>m.setActualWidth(m.getMinWidth(),t)),d=o,o=[]);const h=[];let p;e:for(;;){p=this.flexViewportWidth-n;const m=p/a;for(let v=0;v<o.length;v++){const w=o[v],S=m*w.getFlex();let b=0;const R=w.getMinWidth(),x=w.getMaxWidth();if(S<R?b=R:S>x&&(b=x),b){w.setActualWidth(b,t),kg(o,w),a-=w.getFlex(),d.push(w),n+=w.getActualWidth();continue e}h[v]=Math.floor(S)}break}let f=p;return o.forEach((m,v)=>{const w=v<o.length-1?Math.min(h[v],f):Math.max(h[v],f);m.setActualWidth(w,t),d.push(m),f-=h[v]}),e.skipSetLeft||this.visibleColsService.setLeftValues(t),e.updateBodyWidths&&this.visibleColsService.updateBodyWidths(),e.fireResizedEvent&&this.eventDispatcher.columnResized(d,!0,t,o),o}sizeColumnsToFit(e,t="sizeColumnsToFit",i,s){var m;if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,i,s));return}const n={};s&&((m=s==null?void 0:s.columnLimits)==null||m.forEach(({key:v,...w})=>{n[typeof v=="string"?v:v.getColId()]=w}));const o=this.visibleColsService.getAllCols(),r=e===Ts(o);if(e<=0||!o.length||r)return;const a=[],d=[];o.forEach(v=>{v.getColDef().suppressSizeToFit===!0?d.push(v):a.push(v)});const h=a.slice(0);let p=!1;const f=v=>{kt(a,v),d.push(v)};for(a.forEach(v=>{v.resetActualWidth(t);const w=n==null?void 0:n[v.getId()],S=(w==null?void 0:w.minWidth)??(s==null?void 0:s.defaultMinWidth),b=(w==null?void 0:w.maxWidth)??(s==null?void 0:s.defaultMaxWidth),R=v.getActualWidth();typeof S=="number"&&R<S?v.setActualWidth(S,t,!0):typeof b=="number"&&R>b&&v.setActualWidth(b,t,!0)});!p;){p=!0;const v=e-Ts(d);if(v<=0)a.forEach(w=>{var b;const S=((b=n==null?void 0:n[w.getId()])==null?void 0:b.minWidth)??(s==null?void 0:s.defaultMinWidth);if(typeof S=="number"){w.setActualWidth(S,t,!0);return}w.setMinimum(t)});else{const w=v/Ts(a);let S=v;for(let b=a.length-1;b>=0;b--){const R=a[b],x=n==null?void 0:n[R.getId()],T=(x==null?void 0:x.minWidth)??(s==null?void 0:s.defaultMinWidth),I=(x==null?void 0:x.maxWidth)??(s==null?void 0:s.defaultMaxWidth),V=R.getMinWidth(),L=R.getMaxWidth(),A=typeof T=="number"&&T>V?T:V,k=typeof I=="number"&&I<L?I:L;let N=Math.round(R.getActualWidth()*w);N<A?(N=A,f(R),p=!1):N>k?(N=k,f(R),p=!1):b===0&&(N=S),R.setActualWidth(N,t,!0),S-=N}}}h.forEach(v=>{v.fireColumnWidthChangedEvent(t)}),this.visibleColsService.setLeftValues(t),this.visibleColsService.updateBodyWidths(),!i&&this.eventDispatcher.columnResized(h,!0,t)}applyAutosizeStrategy(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout(()=>{if(t==="fitGridWidth"){const{columnLimits:i,defaultMinWidth:s,defaultMaxWidth:n}=e,o=i==null?void 0:i.map(({colId:r,minWidth:a,maxWidth:d})=>({key:r,minWidth:a,maxWidth:d}));this.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:s,defaultMaxWidth:n,columnLimits:o})}else t==="fitProvidedWidth"&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}};function zg(e,t){return e+"_"+t}function mt(e){return e instanceof Ug}var Ug=class extends G{constructor(e,t,i,s){super(),this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.groupId=t,this.partId=i,this.providedColumnGroup=e,this.pinned=s}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}setParent(e){this.parent=e}getUniqueId(){return zg(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{mt(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=he(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;return this.displayedChildren&&this.displayedChildren.forEach(t=>{e+=t.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){var e;return!!((e=this.getColGroupDef())!=null&&e.autoHeaderHeight)}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{Xs(t)?e.push(t):mt(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{Xs(t)?e.push(t):mt(t)&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return!this.isPadding()||!e||!e.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}this.children.forEach(i=>{if(mt(i)&&(!i.displayedChildren||!i.displayedChildren.length))return;switch(i.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(i);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(i);break;default:this.displayedChildren.push(i);break}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},$g=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let i;return typeof t!="number"?i=0:i=t+1,this.existingIds[e]=i,i}},yb=class extends G{constructor(){super(...arguments),this.beanName="visibleColsService",this.colsAndGroupsMap={},this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0}wireBeans(e){this.columnModel=e.columnModel,this.columnSizeService=e.columnSizeService,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher}refresh(e,t=!1){t||this.buildTrees(),this.updateOpenClosedVisibilityInColumnGroups(),this.columnsLeft=Wd(this.treeLeft),this.columnsCenter=Wd(this.treeCenter),this.columnsRight=Wd(this.treeRight),this.joinColsAriaOrder(),this.joinCols(),this.setLeftValues(e),this.autoHeightCols=this.columns.filter(i=>i.isAutoHeight()),this.columnSizeService.refreshFlexedColumns(),this.updateBodyWidths(),this.columnViewportService.checkViewportColumns(!1),this.setFirstRightAndLastLeftPinned(e),this.eventDispatcher.visibleCols(e)}updateBodyWidths(){const e=Ts(this.columnsCenter),t=Ts(this.columnsLeft),i=Ts(this.columnsRight);this.bodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i,this.eventService.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventService.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e){let t,i;this.gos.get("enableRtl")?(t=this.columnsLeft?this.columnsLeft[0]:null,i=this.columnsRight?he(this.columnsRight):null):(t=this.columnsLeft?he(this.columnsLeft):null,i=this.columnsRight?this.columnsRight[0]:null),this.columnModel.getCols().forEach(s=>{s.setLastLeftPinned(s===t,e),s.setFirstRightPinned(s===i,e)})}buildTrees(){const e=this.columnModel.getColsToShow(),t=e.filter(o=>o.getPinned()=="left"),i=e.filter(o=>o.getPinned()=="right"),s=e.filter(o=>o.getPinned()!="left"&&o.getPinned()!="right"),n=new $g;this.treeLeft=this.createGroups({columns:t,idCreator:n,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=this.createGroups({columns:i,idCreator:n,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=this.createGroups({columns:s,idCreator:n,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.ariaOrderColumns=[]}joinColsAriaOrder(){const e=this.columnModel.getCols(),t=[],i=[],s=[];for(const n of e){const o=n.getPinned();o?o===!0||o==="left"?t.push(n):s.push(n):i.push(n)}this.ariaOrderColumns=t.concat(i).concat(s)}getAriaColIndex(e){let t;return mt(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}getAllAutoHeightCols(){return this.autoHeightCols}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(t=>{mt(t)&&t.checkLeft()})})}setLeftValuesOfCols(e){if(!this.columnModel.getColDefCols())return;const i=this.columnModel.getCols().slice(0),s=this.gos.get("enableRtl");[this.columnsLeft,this.columnsRight,this.columnsCenter].forEach(n=>{if(s){let o=Ts(n);n.forEach(r=>{o-=r.getActualWidth(),r.setLeft(o,e)})}else{let o=0;n.forEach(r=>{r.setLeft(o,e),o+=r.getActualWidth()})}Zy(i,n)}),i.forEach(n=>{n.setLeft(null,e)})}joinCols(){this.gos.get("enableRtl")?this.columns=this.columnsRight.concat(this.columnsCenter).concat(this.columnsLeft):this.columns=this.columnsLeft.concat(this.columnsCenter).concat(this.columnsRight)}getColsCenter(){return this.columnsCenter}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}getTreeLeft(){return this.treeLeft}getTreeRight(){return this.treeRight}getTreeCenter(){return this.treeCenter}getAllCols(){return this.columns}isColDisplayed(e){return this.getAllCols().indexOf(e)>=0}getLeftColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsLeft):this.columnsLeft}getRightColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsRight):this.columnsRight}getColsForRow(e,t,i,s){const n=[];let o=null;for(let r=0;r<t.length;r++){const a=t[r],d=t.length-r,h=Math.min(a.getColSpan(e),d),p=[a];if(h>1){const m=h-1;for(let v=1;v<=m;v++)p.push(t[r+v]);r+=m}let f;i?(f=!1,p.forEach(m=>{i(m)&&(f=!0)})):f=!0,f&&(n.length===0&&o&&(s&&s(a))&&n.push(o),n.push(a)),o=a}return n}getBodyContainerWidth(){return this.bodyWidth}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getCenterCols(){return this.columnsCenter}getLeftCols(){return this.columnsLeft}getRightCols(){return this.columnsRight}getColBefore(e){const t=this.getAllCols(),i=t.indexOf(e);return i>0?t[i-1]:null}getGroupAtDirection(e,t){const i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),s=e.getDisplayedLeafColumns(),n=t==="After"?he(s):s[0],o=`getCol${t}`;for(;;){const r=this[o](n);if(!r)return null;const a=this.getColGroupAtLevel(r,i);if(a!==e)return a}}getColGroupAtLevel(e,t){let i=e.getParent(),s,n;for(;s=i.getProvidedColumnGroup().getLevel(),n=i.getPaddingLevel(),!(s+n<=t);)i=i.getParent();return i}isPinningLeft(){return this.columnsLeft.length>0}isPinningRight(){return this.columnsRight.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};Gn(this.treeCenter,!1,e),Gn(this.treeLeft,!1,e),Gn(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}updateOpenClosedVisibilityInColumnGroups(){const e=this.getAllTrees();Gn(e,!1,t=>{mt(t)&&t.calculateDisplayedColumns()})}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["getLeftCols","getCenterCols","getRightCols"];e&&t.reverse();for(let i=0;i<t.length;i++){const s=this[t[i]]();if(s.length)return e?he(s):s[0]}return null}getColumnGroup(e,t){if(!e)return null;if(mt(e))return e;const i=this.getAllTrees(),s=typeof t=="number";let n=null;return Gn(i,!1,o=>{if(mt(o)){const r=o;let a;s?a=e===r.getGroupId()&&t===r.getPartId():a=e===r.getGroupId(),a&&(n=r)}}),n}getColAfter(e){const t=this.getAllCols(),i=t.indexOf(e);return i<t.length-1?t[i+1]:null}isBodyWidthDirty(){return this.bodyWidthDirty}setBodyWidthDirty(){this.bodyWidthDirty=!0}getColsLeftWidth(){return Ts(this.columnsLeft)}getDisplayedColumnsRightWidth(){return Ts(this.columnsRight)}isColAtEdge(e,t){const i=this.getAllCols();if(!i.length)return!1;const s=t==="first";let n;if(mt(e)){const o=e.getDisplayedLeafColumns();if(!o.length)return!1;n=s?o[0]:he(o)}else n=e;return(s?i[0]:he(i))===n}createGroups(e){const{columns:t,idCreator:i,pinned:s,oldDisplayedGroups:n,isStandaloneStructure:o}=e,r=this.mapOldGroupsById(n),a=[];let d=t;for(;d.length;){const h=d;d=[];let p=0;const f=m=>{const v=p;p=m;const w=h[v],b=(mt(w)?w.getProvidedColumnGroup():w).getOriginalParent();if(b==null){for(let x=v;x<m;x++)a.push(h[x]);return}const R=this.createColGroup(b,i,r,s,o);for(let x=v;x<m;x++)R.addChild(h[x]);d.push(R)};for(let m=1;m<h.length;m++){const v=h[m],S=(mt(v)?v.getProvidedColumnGroup():v).getOriginalParent(),b=h[p],x=(mt(b)?b.getProvidedColumnGroup():b).getOriginalParent();S!==x&&f(m)}p<h.length&&f(h.length)}return o||this.setupParentsIntoCols(a,null),a}createColGroup(e,t,i,s,n){const o=e.getGroupId(),r=t.getInstanceIdForKey(o),a=zg(o,r);let d=i[a];return d&&d.getProvidedColumnGroup()!==e&&(d=null),q(d)?d.reset():(d=new Ug(e,o,r,s),n||this.createBean(d)),d}mapOldGroupsById(e){const t={},i=s=>{s.forEach(n=>{if(mt(n)){const o=n;t[n.getUniqueId()]=o,i(o.getChildren())}})};return e&&i(e),t}setupParentsIntoCols(e,t){e.forEach(i=>{if(i.setParent(t),mt(i)){const s=i;this.setupParentsIntoCols(s.getChildren(),s)}})}};function Gn(e,t,i){if(e)for(let s=0;s<e.length;s++){const n=e[s];if(mt(n)){const o=t?n.getDisplayedChildren():n.getChildren();Gn(o,t,i)}i(n)}}function Wd(e){const t=[];return Gn(e,!0,i=>{Xs(i)&&t.push(i)}),t}var Kg=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterOpened","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel"],bb=["scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","scrollGapChanged","columnHoverChanged","flashCells","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","gridStylesChanged","storeUpdated","filterDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","overlayExclusiveChanged"],Rb=[...Kg,...bb],Fb={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,advancedFilterModel:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,suppressGroupMaintainValueType:!0,groupLockGroupColumns:!0,rowGroupPanelSuppressSort:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,suppressServerSideInfiniteScroll:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0,suppressSetFilterByDefault:!0},It=class{};It.STRING_PROPERTIES=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow"],It.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","theme","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy","cellSelection","selectionColumnDef"],It.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],It.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"],It.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault"],It.OTHER_PROPERTIES=["suppressStickyTotalRow","loadThemeGoogleFonts","rowSelection"],It.FUNCTION_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","groupIncludeFooter","loadingCellRendererSelector","getRowId","groupAggFiltering","chartMenuItems","groupTotalRow"],It.ALL_PROPERTIES=[...It.ARRAY_PROPERTIES,...It.OBJECT_PROPERTIES,...It.STRING_PROPERTIES,...It.NUMBER_PROPERTIES,...It.FUNCTION_PROPERTIES,...It.BOOLEAN_PROPERTIES,...It.OTHER_PROPERTIES];var Er=It,xi=class{static getCallbackForEvent(t){return!t||t.length<2?t:"on"+t[0].toUpperCase()+t.substring(1)}};xi.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY",xi.PUBLIC_EVENTS=Kg,xi.EVENT_CALLBACKS=Rb.map(e=>xi.getCallbackForEvent(e)),xi.BOOLEAN_PROPERTIES=Er.BOOLEAN_PROPERTIES,xi.ALL_PROPERTIES=Er.ALL_PROPERTIES,xi.ALL_PROPERTIES_AND_CALLBACKS=[...xi.ALL_PROPERTIES,...xi.EVENT_CALLBACKS],xi.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(xi.ALL_PROPERTIES_AND_CALLBACKS);var Hi=xi;function Eb(e,t){typeof e!="object"&&(e={});const i={...e};return Hi.ALL_PROPERTIES_AND_CALLBACKS.forEach(n=>{const o=t[n];typeof o<"u"&&o!==Hi.VUE_OMITTED_PROPERTY&&(i[n]=o)}),i}function zd(e,t){if(!e)return;const i={};let s=!1;if(Object.keys(e).filter(r=>Hi.ALL_PROPERTIES_AND_CALLBACKS_SET.has(r)).forEach(r=>{i[r]=e[r],s=!0}),!s)return;const n={type:"gridOptionsChanged",options:i};t.dispatchEvent(n);const o={type:"componentStateChanged"};Ei(i,(r,a)=>{o[r]=a}),t.dispatchEvent(o)}function xr(e,t,i){return i&&e.addDestroyFunc(()=>t.destroyBean(i)),i??e}var xb=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){const t=(e||"").split(" ");if(t.length>1){t.forEach(s=>this.addCssClass(s));return}if(this.cssClassStates[e]!==!0&&e.length){const s=this.getGui();s&&s.classList.add(e),this.cssClassStates[e]=!0}}removeCssClass(e){const t=(e||"").split(" ");if(t.length>1){t.forEach(s=>this.removeCssClass(s));return}if(this.cssClassStates[e]!==!1&&e.length){const s=this.getGui();s&&s.classList.remove(e),this.cssClassStates[e]=!1}}containsCssClass(e){const t=this.getGui();return t?t.classList.contains(e):!1}addOrRemoveCssClass(e,t){if(!e)return;if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1){s.forEach(n=>this.addOrRemoveCssClass(n,t));return}}if(this.cssClassStates[e]!==t&&e.length){const s=this.getGui();s&&s.classList.toggle(e,t),this.cssClassStates[e]=t}}};function Ms(e,t,i){i==null||typeof i=="string"&&i==""?jg(e,t):Wi(e,t,i)}function Wi(e,t,i){e.setAttribute(Zg(t),i.toString())}function jg(e,t){e.removeAttribute(Zg(t))}function Zg(e){return`aria-${e}`}function ti(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Pb(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function Db(e){return e.getAttribute("aria-label")}function xo(e,t){Ms(e,"label",t)}function Pr(e,t){Ms(e,"labelledby",t)}function qg(e,t){Ms(e,"live",t)}function Tb(e,t){Ms(e,"atomic",t)}function Ab(e,t){Ms(e,"relevant",t)}function Mb(e,t){Ms(e,"disabled",t)}function Ud(e,t){Ms(e,"hidden",t)}function Dr(e,t){Wi(e,"expanded",t)}function kb(e,t){Wi(e,"setsize",t)}function Ib(e,t){Wi(e,"posinset",t)}function Lb(e,t){Wi(e,"multiselectable",t)}function _b(e,t){Wi(e,"rowcount",t)}function Yg(e,t){Wi(e,"rowindex",t)}function Ob(e,t){Wi(e,"colcount",t)}function Qg(e,t){Wi(e,"colindex",t)}function Vb(e,t){Wi(e,"colspan",t)}function Nb(e,t){Wi(e,"sort",t)}function Bb(e){jg(e,"sort")}function pa(e,t){Ms(e,"selected",t)}function Gb(e,t){Ms(e,"controls",t.id),Pr(t,e.id)}function $d(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Kd,ga,jd,Zd,qd,Yd,Qd,Xd,Jd;function gs(){return Kd===void 0&&(Kd=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Kd}function Xg(){if(ga===void 0)if(gs()){const e=navigator.userAgent.match(/version\/(\d+)/i);e&&(ga=e[1]!=null?parseFloat(e[1]):0)}else ga=0;return ga}function eu(){if(jd===void 0){const e=window;jd=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return jd}function tu(){return Zd===void 0&&(Zd=/(firefox)/i.test(navigator.userAgent)),Zd}function Jg(){return qd===void 0&&(qd=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),qd}function Js(){return Yd===void 0&&(Yd=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),Yd}function iu(){return!gs()||Xg()>=15}function su(e){if(!e)return null;const t=e.tabIndex,i=e.getAttribute("tabIndex");return t===-1&&(i===null||i===""&&!tu())?null:t.toString()}function Hb(){if(Jd!==void 0)return Jd;if(!document.body)return-1;let e=1e6;const t=tu()?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){const s=e*2;if(i.style.height=s+"px",s>t||i.clientHeight!==s)break;e=s}return document.body.removeChild(i),Jd=e,e}function Wb(){var e,t;return((e=document.body)==null?void 0:e.clientWidth)??(window.innerHeight||((t=document.documentElement)==null?void 0:t.clientWidth)||-1)}function zb(){var e,t;return((e=document.body)==null?void 0:e.clientHeight)??(window.innerHeight||((t=document.documentElement)==null?void 0:t.clientHeight)||-1)}function Ub(){return Xd==null&&ef(),Xd}function ef(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let i=t.offsetWidth-t.clientWidth;i===0&&t.clientWidth===0&&(i=null),t.parentNode&&t.parentNode.removeChild(t),i!=null&&(Xd=i,Qd=i===0)}function tf(){return Qd==null&&ef(),Qd}var fa,$b="[tabindex], input, select, button, textarea, [href]",sf="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function nu(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,s=t.call(e,"input, select, button, textarea"),n=t.call(e,sf),o=di(e);return s&&!n&&o}function et(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-hidden",!t),s||Ud(e,!t)}function Kb(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-invisible",!t),s||Ud(e,!t)}function Tr(e,t){const i="disabled",s=t?n=>n.setAttribute(i,""):n=>n.removeAttribute(i);s(e),df(e.querySelectorAll("input"),n=>s(n))}function Po(e,t,i){let s=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof i=="number"){if(++s>i)break}else if(e===i)break}return!1}function Hn(e){const{height:t,width:i,borderTopWidth:s,borderRightWidth:n,borderBottomWidth:o,borderLeftWidth:r,paddingTop:a,paddingRight:d,paddingBottom:h,paddingLeft:p,marginTop:f,marginRight:m,marginBottom:v,marginLeft:w,boxSizing:S}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(s||"0"),borderRightWidth:parseFloat(n||"0"),borderBottomWidth:parseFloat(o||"0"),borderLeftWidth:parseFloat(r||"0"),paddingTop:parseFloat(a||"0"),paddingRight:parseFloat(d||"0"),paddingBottom:parseFloat(h||"0"),paddingLeft:parseFloat(p||"0"),marginTop:parseFloat(f||"0"),marginRight:parseFloat(m||"0"),marginBottom:parseFloat(v||"0"),marginLeft:parseFloat(w||"0"),boxSizing:S}}function ma(e){const t=Hn(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function Do(e){const t=Hn(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function nf(e){const{height:t,marginBottom:i,marginTop:s}=Hn(e);return Math.floor(t+i+s)}function Ca(e){const{width:t,marginLeft:i,marginRight:s}=Hn(e);return Math.floor(t+i+s)}function of(e){const t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:s,borderRightWidth:n,borderBottomWidth:o}=Hn(e);return{top:t.top+(i||0),left:t.left+(s||0),right:t.right+(n||0),bottom:t.bottom+(o||0)}}function va(){if(typeof fa=="boolean")return fa;const e=document.createElement("div");return e.style.direction="rtl",e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="0px",e.style.overflow="hidden",e.dir="rtl",e.innerHTML=`<div style="width: 2px">
|
|
2
2
|
<span style="display: inline-block; width: 1px"></span>
|
|
3
3
|
<span style="display: inline-block; width: 1px"></span>
|
|
4
4
|
</div>`,document.body.appendChild(e),e.scrollLeft=1,fa=Math.floor(e.scrollLeft)===0,document.body.removeChild(e),fa}function wa(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i),eu()&&!va()&&(i=e.scrollWidth-e.clientWidth-i)),i}function Sa(e,t,i){i&&(va()?t*=-1:(gs()||eu())&&(t=e.scrollWidth-e.clientWidth-t)),e.scrollLeft=t}function Lt(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function fs(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function rf(e){return!!e.offsetParent}function di(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!rf(e)||window.getComputedStyle(e).visibility!=="visible")}function ks(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function lf(e,t,i){i&&i.nextSibling===t||(i?i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t))}function af(e,t){for(let i=0;i<t.length;i++){const s=t[i],n=e.children[i];n!==s&&e.insertBefore(s,n)}}function jb(e,t,i){i?i.insertAdjacentElement("afterend",t):e.firstChild?e.insertAdjacentElement("afterbegin",t):e.appendChild(t)}function cf(e,t){if(t)for(const[i,s]of Object.entries(t)){if(!i||!i.length||s==null)continue;const n=Cb(i),o=s.toString(),r=o.replace(/\s*!important/g,""),a=r.length!=o.length?"important":void 0;e.style.setProperty(n,r,a)}}function Zb(e){return e.clientWidth<e.scrollWidth}function qb(e){return e.clientHeight<e.scrollHeight}function ya(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):zi(e,t)}function zi(e,t){t=ou(t),e.style.width=t.toString(),e.style.maxWidth=t.toString(),e.style.minWidth=t.toString()}function Ar(e,t){t=ou(t),e.style.height=t.toString(),e.style.maxHeight=t.toString(),e.style.minHeight=t.toString()}function ou(e){return typeof e=="number"?`${e}px`:e}function ba(e){return e instanceof Node||e instanceof HTMLElement}function Yb(e){if(e==null)return[];const t=[];return df(e,i=>t.push(i)),t}function Qb(e,t){if(e)for(let i=0;i<e.length;i++){const s=e[i];t(s.name,s.value)}}function Pi(e,t,i){i==null||i===""?e.removeAttribute(t):e.setAttribute(t,i.toString())}function df(e,t){if(e!=null)for(let i=0;i<e.length;i++)t(e[i])}var To=class{constructor(e=0,t=1){this.nextValue=e,this.step=t}next(){const e=this.nextValue;return this.nextValue+=this.step,e}peek(){return this.nextValue}skip(e){this.nextValue+=e}},Xb=1e3,Jb=1e3,uf=100,hf=class Co extends G{constructor(t,i,s,n){super(),this.parentComp=t,this.tooltipShowDelayOverride=i,this.tooltipHideDelayOverride=s,this.shouldDisplayTooltip=n,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(t){this.popupService=t.popupService,this.userComponentFactory=t.userComponentFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const t=this.parentComp.getGui();this.tooltipTrigger===0&&this.addManagedListeners(t,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(t,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(t,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(t,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(t){const i=this.gos.get(t);return i<0&&z(`${t} should not be lower than 0`),Math.max(200,i)}getTooltipDelay(t){return t==="show"?this.tooltipShowDelayOverride??this.getGridOptionsTooltipDelay("tooltipShowDelay"):this.tooltipHideDelayOverride??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const t=this.gos.get("tooltipTrigger");return!t||t==="hover"?0:1}onMouseEnter(t){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!Js()&&(Co.isLocked?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(t)},uf):this.prepareToShowTooltip(t))}onMouseMove(t){this.lastMouseEvent&&(this.lastMouseEvent=t),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(t){var o;const i=t.relatedTarget,s=this.parentComp.getGui(),n=(o=this.tooltipComp)==null?void 0:o.getGui();this.isInteractingWithTooltip||s.contains(i)||this.interactionEnabled&&(n!=null&&n.contains(i))||this.setToDoNothing()}onKeyDown(){this.setToDoNothing()}prepareToShowTooltip(t){if(this.state!=0||Co.isLocked)return;let i=0;t&&(i=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=t||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),i),this.state=1}isLastTooltipHiddenRecently(){const t=new Date().getTime(),i=Co.lastTooltipHideTime;return t-i<Xb}setToDoNothing(t){!t&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const t={...this.parentComp.getTooltipParams()};if(!q(t.value)||this.shouldDisplayTooltip&&!this.shouldDisplayTooltip()){this.setToDoNothing();return}this.state=2,this.tooltipInstanceCount++;const i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.userComponentFactory.getTooltipCompDetails(t).newAgStackInstance().then(i)}hideTooltip(t){!t&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),Co.lastTooltipHideTime=new Date().getTime()),this.eventService.dispatchEvent({type:"tooltipHide",parentGui:this.parentComp.getGui()}),t&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(t,i){if(this.state!==2||this.tooltipInstanceCount!==t){this.destroyBean(i);return}const n=i.getGui();this.tooltipComp=i,n.classList.contains("ag-tooltip")||n.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&n.classList.add("ag-tooltip-animate"),this.interactionEnabled&&n.classList.add("ag-tooltip-interactive");const o=this.localeService.getLocaleTextFunc(),r=this.popupService.addPopup({eChild:n,ariaLabel:o("ariaLabelTooltip","Tooltip")});if(r&&(this.tooltipPopupDestroyFunc=r.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const a=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:a,columnMoved:a})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(n,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(n,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventService.dispatchEvent({type:"tooltipShow",tooltipGui:n,parentGui:this.parentComp.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){var s;const t=(s=this.tooltipComp)==null?void 0:s.getGui(),i=Je(this.gos);return!!t&&t.contains(i)}onTooltipFocusOut(t){const i=this.parentComp.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,i.contains(t.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const t={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupService.positionPopupUnderMouseEvent({...t,mouseEvent:this.lastMouseEvent}):this.popupService.positionPopupByComponent({...t,eventSource:this.parentComp.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const t=this.tooltipPopupDestroyFunc,i=this.tooltipComp,s=this.tooltipTrigger===0?Jb:0;window.setTimeout(()=>{t(),this.destroyBean(i)},s),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(t=>{t&&t()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){Co.isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},uf)}unlockService(){Co.isLocked=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};hf.isLocked=!1;var eR=hf,Ao=class extends G{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}wireBeans(e){this.beans=e}postConstruct(){this.refreshToolTip()}setBrowserTooltip(e){const t="title",i=this.ctrl.getGui();i&&(e!=null&&e!=""?i.setAttribute(t,e):i.removeAttribute(t))}updateTooltipText(){this.tooltip=this.ctrl.getTooltipValue()}createTooltipFeatureIfNeeded(){var t,i,s,n;if(this.tooltipManager!=null)return;const e={getTooltipParams:()=>this.getTooltipParams(),getGui:()=>this.ctrl.getGui()};this.tooltipManager=this.createBean(new eR(e,(i=(t=this.ctrl).getTooltipShowDelayOverride)==null?void 0:i.call(t),(n=(s=this.ctrl).getTooltipHideDelayOverride)==null?void 0:n.call(s),this.ctrl.shouldDisplayTooltip),this.beans.context)}refreshToolTip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context))):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}getTooltipParams(){var n,o,r,a,d;const e=this.ctrl,t=(n=e.getColumn)==null?void 0:n.call(e),i=(o=e.getColDef)==null?void 0:o.call(e),s=(r=e.getRowNode)==null?void 0:r.call(e);return{location:e.getLocation(),colDef:i,column:t,rowIndex:(a=e.getRowIndex)==null?void 0:a.call(e),node:s,data:s==null?void 0:s.data,value:this.getTooltipText(),valueFormatted:(d=e.getValueFormatted)==null?void 0:d.call(e),hideTooltipCallback:()=>{var h;return(h=this.tooltipManager)==null?void 0:h.hideTooltip(!0)}}}getTooltipText(){return this.tooltip}destroy(){this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)),super.destroy()}},tR=new To,ee=null,ke=class gy extends G{constructor(t,i){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=tR.next(),this.cssClassManager=new xb(()=>this.eGui),this.componentSelectors=new Map((i??[]).map(s=>[s.selector,s])),t&&this.setTemplate(t)}preWireBeans(t){super.preWireBeans(t)}preConstruct(){this.usingBrowserTooltips=this.gos.get("enableBrowserTooltips"),this.wireTemplate(this.getGui())}wireTemplate(t,i){t&&this.gos&&(this.applyElementsToComponent(t),this.createChildComponentsFromTags(t,i))}getCompId(){return this.compId}getTooltipParams(){return{value:this.tooltipText,location:"UNKNOWN"}}setTooltip(t){const{newTooltipText:i,showDelayOverride:s,hideDelayOverride:n,location:o,shouldDisplayTooltip:r}=t||{};this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.tooltipText!==i&&(this.tooltipText=i);const a=()=>this.tooltipText;i!=null&&(this.tooltipFeature=this.createBean(new Ao({getTooltipValue:a,getGui:()=>this.getGui(),getLocation:()=>o??"UNKNOWN",getColDef:t==null?void 0:t.getColDef,getColumn:t==null?void 0:t.getColumn,getTooltipShowDelayOverride:s!=null?()=>s:void 0,getTooltipHideDelayOverride:n!=null?()=>n:void 0,shouldDisplayTooltip:r})))}getDataRefAttribute(t){return t.getAttribute?t.getAttribute("data-ref"):null}applyElementsToComponent(t,i,s,n=null){if(i===void 0&&(i=this.getDataRefAttribute(t)),i){const o=this[i];if(o===ee)this[i]=n??t;else{const r=s&&s[i];!this.suppressDataRefValidation&&!r&&z(`Issue with data-ref: ${i} on ${this.constructor.name} with ${o}`)}}}createChildComponentsFromTags(t,i){Yb(t.childNodes).forEach(n=>{if(!(n instanceof HTMLElement))return;const o=this.createComponentFromElement(n,r=>{r.getGui()&&this.copyAttributesFromNode(n,r.getGui())},i);if(o){if(o.addItems&&n.children.length){this.createChildComponentsFromTags(n,i);const r=Array.prototype.slice.call(n.children);o.addItems(r)}this.swapComponentForNode(o,t,n)}else n.childNodes&&this.createChildComponentsFromTags(n,i)})}createComponentFromElement(t,i,s){const n=t.nodeName,o=this.getDataRefAttribute(t),r=n.indexOf("AG-")===0,a=r?this.componentSelectors.get(n):null;let d=null;if(a){gy.elementGettingCreated=t;const h=s&&o?s[o]:void 0;d=new a.component(h),d.setParentComponent(this),this.createBean(d,null,i)}else r&&z(`Missing selector: ${n}`);return this.applyElementsToComponent(t,o,s,d),d}copyAttributesFromNode(t,i){Qb(t.attributes,(s,n)=>i.setAttribute(s,n))}swapComponentForNode(t,i,s){const n=t.getGui();i.replaceChild(n,s),i.insertBefore(document.createComment(s.nodeName),n),this.addDestroyFunc(this.destroyBean.bind(this,t))}activateTabIndex(t){const i=this.gos.get("tabIndex");t||(t=[]),t.length||t.push(this.getGui()),t.forEach(s=>s.setAttribute("tabindex",i.toString()))}setTemplate(t,i,s){const n=ks(t);this.setTemplateFromElement(n,i,s)}setTemplateFromElement(t,i,s,n=!1){if(this.eGui=t,this.suppressDataRefValidation=n,i)for(let o=0;o<i.length;o++){const r=i[o];this.componentSelectors.set(r.selector,r)}this.wireTemplate(t,s)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(t){this.parentComponent=t}getParentComponent(){return this.parentComponent}setGui(t){this.eGui=t}queryForHtmlElement(t){return this.eGui.querySelector(t)}getContainerAndElement(t,i){let s=i;return t==null?null:(s||(s=this.eGui),ba(t)?{element:t,parent:s}:{element:t.getGui(),parent:s})}prependChild(t,i){const{element:s,parent:n}=this.getContainerAndElement(t,i)||{};!s||!n||n.insertAdjacentElement("afterbegin",s)}appendChild(t,i){const{element:s,parent:n}=this.getContainerAndElement(t,i)||{};!s||!n||n.appendChild(s)}isDisplayed(){return this.displayed}setVisible(t,i={}){if(t!==this.visible){this.visible=t;const{skipAriaHidden:s}=i;Kb(this.eGui,t,{skipAriaHidden:s})}}setDisplayed(t,i={}){if(t!==this.displayed){this.displayed=t;const{skipAriaHidden:s}=i;et(this.eGui,t,{skipAriaHidden:s});const n={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(n)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),super.destroy()}addGuiEventListener(t,i,s){this.eGui.addEventListener(t,i,s),this.addDestroyFunc(()=>this.eGui.removeEventListener(t,i))}addCssClass(t){this.cssClassManager.addCssClass(t)}removeCssClass(t){this.cssClassManager.removeCssClass(t)}containsCssClass(t){return this.cssClassManager.containsCssClass(t)}addOrRemoveCssClass(t,i){this.cssClassManager.addOrRemoveCssClass(t,i)}},pf={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate",columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"tree-closed",groupExpanded:"tree-open",setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",chart:"chart",close:"cross",cancel:"cancel",check:"tick",first:"first",previous:"previous",next:"next",last:"last",linked:"linked",unlinked:"unlinked",colorPicker:"color-picker",groupLoading:"loading",menu:"menu",menuAlt:"menu-alt",filter:"filter",columns:"columns",maximize:"maximize",minimize:"minimize",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"grip",rowDrag:"grip",save:"save",csvExport:"csv",excelExport:"excel",smallDown:"small-down",smallLeft:"small-left",smallRight:"small-right",smallUp:"small-up",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",advancedFilterBuilder:"group",advancedFilterBuilderDrag:"grip",advancedFilterBuilderInvalid:"not-allowed",advancedFilterBuilderMoveUp:"up",advancedFilterBuilderMoveDown:"down",advancedFilterBuilderAdd:"plus",advancedFilterBuilderRemove:"minus",chartsMenuEdit:"chart",chartsMenuAdvancedSettings:"settings",chartsMenuAdd:"plus",checkboxChecked:"checkbox-checked",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off"},iR=(()=>{const e=new Set(Object.values(pf));return e.add("eye"),e})();function sR(e,t,i){const s=_t(e,t,i);if(s){const{className:o}=s;if(typeof o=="string"&&o.indexOf("ag-icon")>-1||typeof o=="object"&&o["ag-icon"])return s}const n=document.createElement("span");return n.appendChild(s),n}function _t(e,t,i,s){let n=null;const o=i&&i.getColDef().icons;if(o&&(n=o[e]),t&&!n){const r=t.get("icons");r&&(n=r[e])}if(n){let r;if(typeof n=="function")r=n();else if(typeof n=="string")r=n;else throw new Error("icon from grid options needs to be a string or a function");if(typeof r=="string")return ks(r);if(ba(r))return r;z("iconRenderer should return back a string or a dom object")}else{const r=document.createElement("span");let a=pf[e]??(iR.has(e)?e:void 0);return a||(z(`Did not find icon ${e}`),a=""),r.setAttribute("class",`ag-icon ag-icon-${a}`),r.setAttribute("unselectable","on"),ti(r,"presentation"),r}}var nR=class extends ke{constructor(){super(...arguments),this.dragSource=null,this.eIcon=ee,this.eLabel=ee}postConstruct(){const e=t=>sR(t,this.gos,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(`<div class="ag-dnd-ghost ag-unselectable">
|