ag-grid-community
Version:
Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
4 lines • 1.02 MB
JavaScript
var _e=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 o=s.get(e);return!o&&i&&(o=new Set,s.set(e,o)),o}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,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){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).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{frameworkOverrides:s}=this,o=a=>{const l=s?()=>s.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},n=this.getListeners(i,t,!1);if((n?.size??0)>0){const a=new Set(n);for(const l of a)n?.has(l)&&o(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)o(()=>l(i,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}};function Vu(e,t){return t}function js(e){return e?.getLocaleTextFunc()??Vu}function ue(e,t,i){i==null||typeof i=="string"&&i==""?qs(e,t):he(e,t,i)}function he(e,t,i){e.setAttribute(ir(t),i.toString())}function qs(e,t){e.removeAttribute(ir(t))}function ir(e){return`aria-${e}`}function He(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Nu(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function zu(e){return parseInt(e.getAttribute("aria-posinset"),10)}function Wu(e){return e.getAttribute("aria-label")}function Jt(e,t){ue(e,"label",t)}function Ui(e,t){ue(e,"labelledby",t)}function _u(e,t){ue(e,"describedby",t)}function sr(e,t){ue(e,"live",t)}function Uu(e,t){ue(e,"atomic",t)}function $u(e,t){ue(e,"relevant",t)}function Ku(e,t){ue(e,"level",t)}function or(e,t){ue(e,"disabled",t)}function Ys(e,t){ue(e,"hidden",t)}function ju(e,t){ue(e,"activedescendant",t)}function $i(e,t){he(e,"expanded",t)}function qu(e){qs(e,"expanded")}function nr(e,t){he(e,"setsize",t)}function rr(e,t){he(e,"posinset",t)}function Yu(e,t){he(e,"multiselectable",t)}function ar(e,t){he(e,"rowcount",t)}function Ki(e,t){he(e,"rowindex",t)}function Qu(e,t){he(e,"rowspan",t)}function lr(e,t){he(e,"colcount",t)}function Qs(e,t){he(e,"colindex",t)}function dr(e,t){he(e,"colspan",t)}function cr(e,t){he(e,"sort",t)}function ur(e){qs(e,"sort")}function ji(e,t){ue(e,"selected",t)}function Zu(e,t){he(e,"checked",t===void 0?"mixed":t)}function hr(e,t){ue(e,"controls",t.id),Ui(t,e.id)}function Xu(e,t){ue(e,"haspopup",t===!1?null:t)}function Zs(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Xs,Js,eo,to,io,so,oo;function Ue(){return Xs===void 0&&(Xs=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Xs}function no(){return Js===void 0&&(Js=/(firefox)/i.test(navigator.userAgent)),Js}function gr(){return eo===void 0&&(eo=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),eo}function $e(){return to===void 0&&(to=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),to}function ro(e){if(!e)return null;const t=e.tabIndex,i=e.getAttribute("tabIndex");return t===-1&&(i===null||i===""&&!no())?null:t.toString()}function Ju(){if(oo!==void 0)return oo;if(!document.body)return-1;let e=1e6;const t=no()?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),oo=e,e}function eh(){return so==null&&pr(),so}function pr(){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&&(so=i,io=i===0)}function fr(){return io==null&&pr(),io}function th(e,t,i){const s=e.parentElement;let o=s&&s.firstChild;for(;o;)t&&o.classList.toggle(t,o===e),i&&o.classList.toggle(i,o!==e),o=o.nextSibling}var ih="[tabindex], input, select, button, textarea, [href]",mr="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function ao(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,s=t.call(e,"input, select, button, textarea"),o=t.call(e,mr),n=Ce(e);return s&&!o&&n}function z(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-hidden",!t),s||Ys(e,!t)}function Cr(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-invisible",!t),s||Ys(e,!t)}function Tt(e,t){const i="disabled",s=t?n=>n.setAttribute(i,""):n=>n.removeAttribute(i);s(e);const o=e.querySelectorAll("input")??[];for(const n of o)s(n)}function at(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 lt(e){const{height:t,width:i,borderTopWidth:s,borderRightWidth:o,borderBottomWidth:n,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:d,paddingLeft:c,marginTop:u,marginRight:h,marginBottom:g,marginLeft:p,boxSizing:m}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(s||"0"),borderRightWidth:parseFloat(o||"0"),borderBottomWidth:parseFloat(n||"0"),borderLeftWidth:parseFloat(r||"0"),paddingTop:parseFloat(a||"0"),paddingRight:parseFloat(l||"0"),paddingBottom:parseFloat(d||"0"),paddingLeft:parseFloat(c||"0"),marginTop:parseFloat(u||"0"),marginRight:parseFloat(h||"0"),marginBottom:parseFloat(g||"0"),marginLeft:parseFloat(p||"0"),boxSizing:m}}function qi(e){const t=lt(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function At(e){const t=lt(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function lo(e){const{height:t,marginBottom:i,marginTop:s}=lt(e);return Math.floor(t+i+s)}function ei(e){const{width:t,marginLeft:i,marginRight:s}=lt(e);return Math.floor(t+i+s)}function vr(e){const t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:s,borderRightWidth:o,borderBottomWidth:n}=lt(e);return{top:t.top+(i||0),left:t.left+(s||0),right:t.right+(o||0),bottom:t.bottom+(n||0)}}function Yi(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i)),i}function Qi(e,t,i){i&&(t*=-1),e.scrollLeft=t}function ee(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function ge(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function wr(e){return!!e.offsetParent}function Ce(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!wr(e)||window.getComputedStyle(e).visibility!=="visible")}function Zi(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function br(e,t,i){i&&i.nextSibling===t||(e.firstChild?i?i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function Sr(e,t){for(let i=0;i<t.length;i++){const s=t[i],o=e.children[i];o!==s&&e.insertBefore(s,o)}}function sh(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function ti(e,t){if(t)for(const i of Object.keys(t)){const s=t[i];if(!i||!i.length||s==null)continue;const o=sh(i),n=s.toString(),r=n.replace(/\s*!important/g,""),a=r.length!=n.length?"important":void 0;e.style.setProperty(o,r,a)}}function oh(e){return e.clientWidth<e.scrollWidth}function nh(e){return e.clientHeight<e.scrollHeight}function Xi(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Re(e,t)}function Re(e,t){t=co(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function ii(e,t){t=co(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function co(e){return typeof e=="number"?`${e}px`:e}function Ji(e){return e instanceof Node||e instanceof HTMLElement}function ve(e,t,i){i==null||i===""?e.removeAttribute(t):e.setAttribute(t,i.toString())}function Be(e,t,i){const o=Br(e).ResizeObserver,n=o?new o(i):null;return n?.observe(t),()=>n?.disconnect()}function rh(e){const t=ht(e),i="getSelection"in t?t.getSelection():null,s=[];for(let o=0;o<(i?.rangeCount??0);o++){const n=i?.getRangeAt(o);n&&s.push(n)}return{selection:i,ranges:s}}function ah(e,t){if(!e.gos.get("enableCellTextSelection")||!no()&&!Ue())return t();const{selection:s,ranges:o}=rh(e);t(),s?.removeAllRanges();for(const n of o)s?.addRange(n)}function De(e,t){const i=Br(e);i.requestAnimationFrame?i.requestAnimationFrame(t):i.webkitRequestAnimationFrame?i.webkitRequestAnimationFrame(t):i.setTimeout(t,0)}var yr="data-ref",uo;function Rr(){return uo??(uo=document.createTextNode(" ")),uo.cloneNode()}function V(e){const{attrs:t,children:i,cls:s,ref:o,role:n,tag:r}=e,a=document.createElement(r);if(s&&(a.className=s),o&&a.setAttribute(yr,o),n&&a.setAttribute("role",n),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(i)if(typeof i=="string")a.textContent=i;else{let l=!0;for(const d of i)d&&(typeof d=="string"?(a.appendChild(document.createTextNode(d)),l=!1):(l&&(a.appendChild(Rr()),l=!1),a.append(V(d)),a.appendChild(Rr())))}return a}var xr={};function es(e,t){xr[t]||(e(),xr[t]=!0)}function Ke(e,t,...i){e.get("debug")&&console.log("AG Grid: "+t,...i)}function dt(e,...t){es(()=>console.warn("AG Grid: "+e,...t),e+t?.join(""))}function It(e,...t){es(()=>console.error("AG Grid: "+e,...t),e+t?.join(""))}var lh={pending:!1,funcs:[]},dh={pending:!1,funcs:[]};function ts(e,t="setTimeout",i){const s=t==="raf"?dh:lh;if(s.funcs.push(e),s.pending)return;s.pending=!0;const o=()=>{const n=s.funcs.slice();s.funcs.length=0,s.pending=!1,n.forEach(r=>r())};t==="raf"?De(i,o):window.setTimeout(o,0)}function Q(e,t,i){let s;return function(...o){const n=this;window.clearTimeout(s),s=window.setTimeout(function(){e.isAlive()&&t.apply(n,o)},i)}}function Fr(e,t){let i=0;return function(...s){const o=this,n=Date.now();n-i<t||(i=n,e.apply(o,s))}}function Er(e,t,i=100,s){const o=Date.now();let n=null,r=!1;const a=()=>{const l=Date.now()-o>i;(e()||l)&&(t(),r=!0,n!=null&&(window.clearInterval(n),n=null),l&&s&&dt(s))};a(),r||(n=window.setInterval(a,10))}function Me(e){return e==null||e===""?null:e}function x(e){return e!=null&&e!==""}function N(e){return!x(e)}function is(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function kt(e,t){const i=e?JSON.stringify(e):null,s=t?JSON.stringify(t):null;return i===s}function Pr(e,t,i=!1){const s=e==null,o=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),s&&o)return 0;if(s)return-1;if(o)return 1;function n(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!i)return n(e,t);try{return e.localeCompare(t)}catch{return n(e,t)}}var Dr="https://www.ag-grid.com",D="33.3.0",Mr=2e3,Tr=100,Ar="_version_",Ir=null,ch=!1,Lt=`${Dr}/javascript-data-grid`;function uh(e){Ir=e}function hh(e){Lt=e}function kr(e,t,i){return Ir?.getConsoleMessage(e,t)??[mh(e,t,i)]}function ho(e,t,i,s){ch||e(`error #${t}`,...kr(t,i,s))}function gh(e){if(!e)return String(e);const t={};for(const i of Object.keys(e))typeof e[i]!="object"&&typeof e[i]!="function"&&(t[i]=e[i]);return JSON.stringify(t)}function ph(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=gh(e)),t}function ss(e){return e===void 0?"undefined":e===null?"null":e}function go(e,t){return`${e}?${t.toString()}`}function fh(e,t,i){const s=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let o=go(e,t);for(const[n,r]of s){if(n===Ar)continue;const a=o.length-i;if(a<=0)break;const l="...",d=a+l.length,c=r.length-d>Tr?r.slice(0,r.length-d)+l:r.slice(0,Tr)+l;t.set(n,c),o=go(e,t)}return o}function Lr(e,t){const i=new URLSearchParams;if(i.append(Ar,D),t)for(const n of Object.keys(t))i.append(n,ph(t[n]));const s=`${Lt}/errors/${e}`,o=go(s,i);return o.length<=Mr?o:fh(s,i,Mr)}var mh=(e,t,i)=>{const s=Lr(e,t);return`${i?i+`
`:""}Visit ${s}${i?"":`
Alternatively register the ValidationModule to see the full message in the console.`}`};function R(...e){ho(dt,e[0],e[1])}function G(...e){ho(It,e[0],e[1])}function si(e,t,i){ho(It,e,t,i)}function Or(e,t){const i=t[0];return`error #${i} `+kr(i,t[1],e).join(" ")}function Ve(...e){return Or(void 0,e)}function Ch(...e){return Or(`
`,e)}function Gr(e,t){return e.get("rowModelType")===t}function Z(e,t){return Gr(e,"clientSide")}function ct(e,t){return Gr(e,"serverSide")}function X(e,t){return e.get("domLayout")===t}function je(e){return ri(e)!==void 0}function po(e){return typeof e.get("getRowHeight")=="function"}function vh(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function Ne(e,t,i=!1,s){const{gos:o,environment:n}=e;if(s==null&&(s=n.getDefaultRowHeight()),po(o)){if(i)return{height:s,estimated:!0};const l={node:t,data:t.data},d=o.getCallback("getRowHeight")(l);if(fo(d))return d===0&&R(23),{height:Math.max(1,d),estimated:!1}}if(t.detail&&o.get("masterDetail"))return wh(o);const r=o.get("rowHeight");return{height:r&&fo(r)?r:s,estimated:!1}}function wh(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return fo(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function qe(e){const{environment:t,gos:i}=e,s=i.get("rowHeight");if(!s||N(s))return t.getDefaultRowHeight();const o=t.refreshRowHeightVariable();return o!==-1?o:(R(24),t.getDefaultRowHeight())}function fo(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function Hr(e,t,i){const s=t[e.getDomDataKey()];return s?s[i]:void 0}function ut(e,t,i,s){const o=e.getDomDataKey();let n=t[o];N(n)&&(n={},t[o]=n),n[i]=s}function Y(e){const{gos:t,eGridDiv:i}=e;let s=null;const o=t.get("getDocument");return o&&x(o)?s=o():i&&(s=i.ownerDocument),s&&x(s)?s:document}function Br(e){return Y(e).defaultView||window}function ht(e){return e.eGridDiv.getRootNode()}function W(e){return ht(e).activeElement}function os(e){let t=null,i=null;try{t=Y(e).fullscreenElement}catch{}finally{t||(t=ht(e));const s=t.querySelector("body");s?i=s:t instanceof ShadowRoot?i=t:t instanceof Document?i=t?.documentElement:i=t}return i}function bh(e){return os(e)?.clientWidth??(window.innerHeight||-1)}function Sh(e){return os(e)?.clientHeight??(window.innerHeight||-1)}function Vr(e,t,i){const o=e.getBoundingClientRect().height,n=bh(i)-2,r=Sh(i)-2;if(!e.offsetParent)return;const l=vr(e.offsetParent),{clientY:d,clientX:c}=t;let u=d-l.top-o/2,h=c-l.left-10;const g=Y(i),p=g.defaultView||window,m=p.pageYOffset||g.documentElement.scrollTop,f=p.pageXOffset||g.documentElement.scrollLeft;n>0&&h+e.clientWidth>n+f&&(h=n+f-e.clientWidth),h<0&&(h=0),r>0&&u+e.clientHeight>r+m&&(u=r+m-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}function mo(e){const t=W(e);return t===null||t===Y(e).body}function gt(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function Co(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||X(e,"print"))}function xe(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function ns(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function yh(e){return e.get("grandTotalRow")}function Rh(e){const t=e.get("groupTotalRow");return typeof t=="function"?e.getCallback("groupTotalRow"):()=>t??void 0}function xh(e){return e.get("groupHideOpenParents")?!0:e.get("groupDisplayType")==="multipleColumns"}function vo(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function wo(e,t,i){return!!t.group&&!t.footer&&vo(e,i)}function pt(e){const t=e.getCallback("getRowId");return t===void 0?t:i=>{let s=t(i);return typeof s!="string"&&(es(()=>R(25,{id:s}),"getRowIdString"),s=String(s)),s}}function Nr(e,t){const i=e.get("groupHideParentOfSingleChild");return!!(i===!0||i==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function zr(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function Fh(e,t){const i=e.get("suppressGroupChangesColumnVisibility");if(i===!0||t&&i==="suppressHideOnGroup"||!t&&i==="suppressShowOnUngroup")return!1;const s=e.get("suppressRowGroupHidesColumns");if(t&&s===!0)return!1;const o=e.get("suppressMakeColumnVisibleAfterUnGroup");return!(!t&&o===!0)}function ft(e){return e?.checkboxes??!0}function oi(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function ni(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function bo(e){return e?.hideDisabledCheckboxes??!1}function Wr(e){return typeof e.get("rowSelection")!="string"}function Eh(e){return e.get("cellSelection")!==void 0}function Ph(e){const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?t?.suppressMultiRanges??!1:!1:e.get("suppressMultiRangeSelection")}function Te(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function Dh(e){const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"&&t.handle?.mode==="fill"?t.handle:void 0:{mode:"fill",setFillValue:e.get("fillOperation"),direction:e.get("fillHandleDirection"),suppressClearOnFillReduction:e.get("suppressClearOnFillReduction")}}function _r(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 Mh(e){const t=_r(e);return t===!0||t==="enableSelection"}function Th(e){const t=_r(e);return t===!0||t==="enableDeselection"}function rs(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function ri(e){const t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t?.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function Ot(e){return ri(e)==="multiRow"}function Ah(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function ai(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?.mode==="multiRow"?t.groupSelects:void 0}function Ur(e,t=!0){const i=e.get("rowSelection");return typeof i!="object"?t?"all":void 0:i.mode==="multiRow"?i.selectAll:"all"}function Gt(e){const t=ai(e);return t==="descendants"||t==="filteredDescendants"}function $r(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function So(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function re(e){return e.get("columnMenu")==="legacy"}function Kr(e){return!re(e)}function yo(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function Ih(e,t,i){typeof e!="object"&&(e={});const s={...e};return i.forEach(o=>{const n=t[o];typeof n<"u"&&(s[o]=n)}),s}function kh(e,t){if(!e)return;const i={};let s=!1;if(Object.keys(e).forEach(r=>{i[r]=e[r],s=!0}),!s)return;const o={type:"gridOptionsChanged",options:i};t.dispatchEvent(o);const n={type:"componentStateChanged",...i};t.dispatchEvent(n)}function T(e,t){return e.addGridCommonParams(t)}function jr(e){return e.get("treeData")?e.get("treeDataParentIdField")?"treeSelfRef":e.get("treeDataChildrenField")?"treeNested":"treePath":"group"}var qr="__ag_Grid_Stop_Propagation",Lh=["touchstart","touchend","touchmove","touchcancel","scroll"],Oh=["wheel"],Ro={};function Ye(e){e[qr]=!0}function Ae(e){return e[qr]===!0}var Yr=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return i=>{if(typeof Ro[i]=="boolean")return Ro[i];const s=document.createElement(e[i]||"div");return i="on"+i,Ro[i]=i in s}})();function Qr(e,t,i){let s=t;for(;s;){const o=Hr(e,s,i);if(o)return o;s=s.parentElement}return null}function Zr(e,t){return!t||!e?!1:Hh(t).indexOf(e)>=0}function Gh(e){const t=[];let i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}function Hh(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():Gh(t)}function Bh(e,t,i,s){const o=Xr(i);let n;o!=null&&(n={passive:o}),e&&e.addEventListener&&e.addEventListener(t,i,s,n)}var Xr=e=>{const t=Lh.includes(e),i=Oh.includes(e);if(t)return!0;if(i)return!1},S=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,i){this.localEventService||(this.localEventService=new _e),this.localEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.localEventService?.removeEventListener(e,t,i)}dispatchLocalEvent(e){this.localEventService?.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const i=[];for(const s of Object.keys(t)){const o=t[s];o&&i.push(this._setupListener(e,s,o))}return i}_setupListener(e,t,i){if(this.destroyed)return()=>null;let s;return Vh(e)?(e.__addEventListener(t,i),s=()=>(e.__removeEventListener(t,i),null)):(e instanceof HTMLElement?Bh(this.beans.frameworkOverrides,e,t,i):e.addEventListener(t,i),s=()=>(e.removeEventListener(t,i),null)),this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==s),null)}setupGridOptionListener(e,t){const{gos:i}=this;i.addPropertyEventListener(e,t);const s=()=>(i.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==s),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=o=>{if(o.changeSet){if(o.changeSet&&o.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=o.changeSet.id}const n={type:"gridPropertyChanged",changeSet:o.changeSet,source:o.source};t(n)};e.forEach(o=>this.setupGridOptionListener(o,s))}getLocaleTextFunc(){return js(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const 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 Vh(e){return e.__addEventListener!==void 0}var Jr=new Set(["__proto__","constructor","prototype"]);function Nh(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 of Object.keys(e))t(i,e[i])}}function te(e,t,i=!0,s=!1){x(t)&&Nh(t,(o,n)=>{if(Jr.has(o))return;let r=e[o];r!==n&&(s&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[o]=r),ea(n)&&ea(r)&&!Array.isArray(r)?te(r,n,i,s):(i||n!==void 0)&&(e[o]=n))})}function li(e,t,i){if(!t||!e)return;if(!i)return e[t];const s=t.split(".");let o=e;for(let n=0;n<s.length;n++){if(o==null)return;o=o[s[n]]}return o}function ea(e){return typeof e=="object"&&e!==null}var zh=/[&<>"']/g,Wh={"&":"&","<":"<",">":">",'"':""","'":"'"};function mt(e){return e?.toString().toString()??null}function di(e){return mt(e)?.replace(zh,t=>Wh[t])??null}var _h={resizable:!0,sortable:!0},Uh=0;function ta(){return Uh++}function Ie(e){return e instanceof Ht}var Ht=class extends S{constructor(e,t,i,s){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=s,this.isColumn=!0,this.instanceId=ta(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new _e,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=di(i)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:i,colFlex:s}}=this;t?.initCol(this);const o=e.hide;o!==void 0?this.visible=!o:this.visible=!e.initialHide,i?.initCol(this),s?.initCol(this)}setColDef(e,t,i){const s=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),s&&(this.beans.rowSpanSvc?.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",i)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.setState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:i}}=this,s=e.get("suppressFieldDotNotation");this.fieldContainsDots=x(t)&&t.indexOf(".")>=0&&!s,this.tooltipFieldContainsDots=x(i)&&i.indexOf(".")>=0&&!s}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.beans.tooltipSvc?.initCol(this)}initRowSpan(){this.colDef.spanRows&&this.beans.rowSpanSvc?.register(this)}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const i=e.width,s=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){return this.beans.showRowGroupCols?.isRowGroupDisplayed(this,e)??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.colEventSvc);const i=this.frameworkEventListenerService?.wrap(e,t)??t;this.colEventSvc.addEventListener(e,i)}removeEventListener(e,t){const i=this.frameworkEventListenerService?.unwrap(e,t)??t;this.colEventSvc.removeEventListener(e,i)}createColumnFunctionCallbackParams(e){return T(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){return this.beans.cellNavigation?.isSuppressNavigable(this,e)??!1}isCellEditable(e){return this.beans.editSvc?.isCellEditable(this,e)??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){return this.beans.selectionSvc?.isCellCheckboxSelection(this,e)??!1}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?.suppressPaste??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??_h[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const i=this.createColumnFunctionCallbackParams(e);return t(i)}return!1}createColumnEvent(e,t){return T(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return N(this.sort)}isSorting(){return x(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){return R(261),!!this.beans.colHover?.isHovered(this)}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const i=e===!0;this.visible!==i&&(this.visible=i,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}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 T(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(N(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.colSpan(t);return Math.max(i,1)}getRowSpan(e){if(N(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!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),i||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchColEvent(e,t,i){const s=this.createColumnEvent(e,t);i&&te(s,i),this.colEventSvc.dispatchEvent(s)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function J(e){return e instanceof Bt}var Bt=class extends S{constructor(e,t,i,s){super(),this.colGroupDef=e,this.groupId=t,this.padding=i,this.level=s,this.isColumn=!1,this.expandable=!1,this.instanceId=ta(),this.expandableListenerRemoveCallback=null,this.expanded=!!e?.openByDefault}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(const t of this.children)Ie(t)?e(t):J(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){this.children&&this.children.forEach(t=>{Ie(t)?e.push(t):J(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 n=0,r=s.length;n<r;n++){const a=s[n];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,i=!0):l==="closed"?(t=!0,i=!0):(e=!0,t=!0)}const o=e&&t&&i;this.expandable!==o&&(this.expandable=o,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=i=>{i.forEach(s=>{J(s)&&s.isPadding()?t(s.children):e.push(s)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},$h={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function xo(e,t,i){const s={},o=e.gos;return Object.assign(s,o.get("defaultColGroupDef")),Object.assign(s,t),o.validateColDef(s,i),s}var ia=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=is(e);let i=0;for(;;){let s=e??t;if(s?i!==0&&(s+="_"+i):s=i,!this.existingKeys[s]){const o=String(s);return e&&i>0&&R(273,{providedId:e,usedId:o}),this.existingKeys[o]=!0,o}i++}}},Fo=Object.freeze([]);function H(e){if(e?.length)return e[e.length-1]}function Qe(e,t,i){return e==null&&t==null?!0:e!=null&&t!=null&&e.length===t.length&&e.every((s,o)=>i?i(s,t[o]):t[o]===s)}function as(e,t){if(e)for(const i of e)t(i)}function ae(e,t){const i=e.indexOf(t);i>=0&&e.splice(i,1)}function sa(e,t,i){for(let s=0;s<t.length;s++)ae(e,t[s]);for(let s=t.length-1;s>=0;s--)e.splice(i,0,t[s])}function Kh(e){return[].concat.apply([],e)}var ci="ag-Grid-AutoColumn",Eo="ag-Grid-SelectionColumn",Po="ag-Grid-RowNumbersColumn";function Do(e){const t=[],i=s=>{for(let o=0;o<s.length;o++){const n=s[o];Ie(n)?t.push(n):J(n)&&i(n.getChildren())}};return i(e),t}function ze(e){return e.reduce((t,i)=>t+i.getActualWidth(),0)}function ui(e,t,i){const s={};if(!t)return;ke(null,t,n=>{s[n.getInstanceId()]=n}),i&&ke(null,i,n=>{s[n.getInstanceId()]=null});const o=Object.values(s).filter(n=>n!=null);e.context.destroyBeans(o)}function ls(e){return e.getId().startsWith(ci)}function Ct(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(Eo)??!1}function Ze(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(Po)??!1}function ds(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function oa(e,t){return Qe(e,t,(i,s)=>i.getColId()===s.getColId())}function na(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function vt(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function Mo(e,t){const i=e===t,s=e.getColDef()===t,o=e.getColId()==t;return i||s||o}var jh=(e,t)=>(i,s)=>{const o={value1:void 0,value2:void 0};let n=!1;return e&&(e[i]!==void 0&&(o.value1=e[i],n=!0),x(s)&&e[s]!==void 0&&(o.value2=e[s],n=!0)),!n&&t&&(t[i]!==void 0&&(o.value1=t[i]),x(s)&&t[s]!==void 0&&(o.value2=t[s])),o};function qh(e,t=null,i,s,o){const{existingCols:n,existingGroups:r}=ra(s),a=new Map(n.map(f=>[f.getId(),f])),l=new Map(r.map(f=>[f.getId(),f]));let d=0;const c=(f,C)=>{if(d=Math.max(d,C),da(f)){if(!e.colGroupSvc)return null;const y=f.groupId,P=l.get(y),F=xo(e,f,y),M=new Bt(F,y,!1,C);return e.context.createBean(M),P&&M.setExpanded(P.isExpanded()),M.setChildren(f.children.map(I=>c(I,C+1))),M}const w=f.colId;let v=a.get(w);if(v){const y=Vt(e,f,v.getColId());v.setColDef(y,f,o),To(e,v,y,o)}else{const y=Vt(e,f,w);v=new Ht(y,f,w,i),e.context.createBean(v)}return e.dataTypeSvc?.addColumnListeners(v),v},u=t?.map(f=>c(f,0))??[];let h=0;const g={getUniqueKey:(f,C)=>String(++h)},p=e.colGroupSvc?e.colGroupSvc.balanceColumnTree(u,0,d,g):u;return ke(null,p,(f,C)=>{J(f)&&f.setupExpandable(),f.originalParent=C}),{columnTree:p,treeDepth:d}}function Yh(e,t=null,i,s,o){const n=new ia,{existingCols:r,existingGroups:a,existingColKeys:l}=ra(s);n.addExistingKeys(l);const d=aa(e,t,0,i,r,n,a,o),{colGroupSvc:c}=e,u=c?.findMaxDepth(d,0)??0,h=c?c.balanceColumnTree(d,0,u,n):d;return ke(null,h,(p,m)=>{J(p)&&p.setupExpandable(),p.originalParent=m}),{columnTree:h,treeDepth:u}}function ra(e){const t=[],i=[],s=[];return e&&ke(null,e,o=>{if(J(o)){const n=o;i.push(n)}else{const n=o;s.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:i,existingColKeys:s}}function aa(e,t,i,s,o,n,r,a){if(!t)return[];const{colGroupSvc:l}=e,d=new Array(t.length);for(let c=0;c<d.length;c++){const u=t[c];l&&da(u)?d[c]=l.createProvidedColumnGroup(s,u,i,o,n,r,a):d[c]=Qh(e,s,u,o,n,a)}return d}function Qh(e,t,i,s,o,n){const r=Zh(i,s);r&&s?.splice(r.idx,1);let a=r?.column;if(a){const l=Vt(e,i,a.getColId());a.setColDef(l,i,n),To(e,a,l,n)}else{const l=o.getUniqueKey(i.colId,i.field),d=Vt(e,i,l);a=new Ht(d,i,l,t),e.context.createBean(a)}return e.dataTypeSvc?.addColumnListeners(a),a}function la(e,t,i,s,o,n,r,a){const{sortSvc:l,pinnedCols:d,colFlex:c}=e;i!==void 0&&t.setVisible(!i,a),l&&(l.updateColSort(t,s,a),o!==void 0&&l.setColSortIndex(t,o)),n!==void 0&&d?.setColPinned(t,n),r!==void 0&&c?.setColFlex(t,r)}function To(e,t,i,s){la(e,t,i.hide,i.sort,i.sortIndex,i.pinned,i.flex,s);const o=t.getFlex();if(!(o!=null&&o>0))if(i.width!=null)t.setActualWidth(i.width,s);else{const n=t.getActualWidth();t.setActualWidth(n,s)}}function Zh(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]}}}function Vt(e,t,i,s){const{gos:o,dataTypeSvc:n}=e,r={},a=o.get("defaultColDef");te(r,a,!1,!0);const l=Xh(e,r,t,i);l&&Jh(e,l,r),te(r,t,!1,!0);const d=o.get("autoGroupColumnDef"),c=xe(o);return t.rowGroup&&d&&c&&te(r,{sort:d.sort,initialSort:d.initialSort},!1,!0),n?.validateColDef(r),o.validateColDef(r,i,s),r}function Xh(e,t,i,s){const o=e.dataTypeSvc?.updateColDefAndGetColumnType(t,i,s),n=i.type??o??t.type;return t.type=n,n?ds(n):void 0}function Jh(e,t,i){if(!t.length)return;const s=Object.assign({},$h),o=e.gos.get("columnTypes")||{};for(const n of Object.keys(o)){const r=o[n];n in s?R(34,{key:n}):(r.type&&R(35),s[n]=r)}t.forEach(n=>{const r=s[n.trim()];r?te(i,r,!1,!0):R(36,{t:n})})}function da(e){return e.children!==void 0}function ke(e,t,i){if(t)for(let s=0;s<t.length;s++){const o=t[s];J(o)&&ke(o,o.getChildren(),i),i(o,e)}}function ca(e,t){const i=[],s=[],o=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?o.push(r):a==="left"||a===!0?i.push(r):s.push(r)}),t.get("enableRtl")?[...o,...s,...i]:[...i,...s,...o]}function ua(e,t){let i=!0;return ke(null,t,s=>{if(!J(s))return;const o=s,n=o.getColGroupDef();if(!(n&&n.marryChildren))return;const a=[];o.getLeafColumns().forEach(h=>{const g=e.indexOf(h);a.push(g)});const l=Math.max.apply(Math,a),d=Math.min.apply(Math,a),c=l-d,u=o.getLeafColumns().length-1;c>u&&(i=!1)}),i}function ha(e,t){if(!e||e.length==0)return;const i=t(e[0]);for(let s=1;s<e.length;s++)if(i!==t(e[s]))return;return i}function ga(e,t,i){if(!t.length)return;const s=t.length===1?t[0]:null,o=ha(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:o??null,columns:t,column:s,source:i})}function eg(e,t,i){if(!t.length)return;const s=t.length===1?t[0]:null,o=ha(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:o,columns:t,column:s,source:i})}function pa(e,t,i,s){e.dispatchEvent({type:t,columns:i,column:i&&i.length==1?i[0]:null,source:s})}function Nt(e,t,i,s,o=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:o,finished:i,source:s})}function we(e,t,i){const{colModel:s,rowGroupColsSvc:o,pivotColsSvc:n,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:d,pivotResultCols:c,environment:u,valueColsSvc:h,eventSvc:g,gos:p}=e,m=s.getColDefCols()??[],f=a?.getColumns();if(!m?.length&&!f?.length)return!1;if(t?.state&&!t.state.forEach)return R(32),!1;const C=(P,F,M,I,k)=>{if(!P)return;const L=jh(F,t.defaultState),U=L("flex").value1;if(la(e,P,L("hide").value1,L("sort").value1,L("sortIndex").value1,L("pinned").value1,U,i),U==null){const de=L("width").value1;if(de!=null){const ye=P.getColDef().minWidth??u.getDefaultColumnMinWidth();ye!=null&&de>=ye&&P.setActualWidth(de,i)}}k||!P.isPrimary()||(h?.syncColumnWithState(P,i,L),o?.syncColumnWithState(P,i,L,M),n?.syncColumnWithState(P,i,L,I))},w=(P,F,M)=>{const I=ma(e,i),k=F.slice(),L={},U={},de=[],ye=[],Pe=[];let ce=0;const Hu=o?.columns.slice()??[],Bu=n?.columns.slice()??[];P.forEach(se=>{const Xt=se.colId;if(Xt.startsWith(ci)){de.push(se),Pe.push(se);return}if(Ct(Xt)){ye.push(se),Pe.push(se);return}const Mt=M(Xt);Mt?(C(Mt,se,L,U,!1),ae(k,Mt)):(Pe.push(se),ce+=1)});const Jn=se=>C(se,null,L,U,!1);k.forEach(Jn),o?.sortColumns(va.bind(o,L,Hu)),n?.sortColumns(va.bind(n,U,Bu)),s.refreshCols(!1);const er=(se,Xt,Ks=[])=>{Xt.forEach(Mt=>{const tr=se(Mt.colId);ae(Ks,tr),C(tr,Mt,null,null,!0)}),Ks.forEach(Jn)};return er(se=>r?.getColumn(se)??null,de,r?.getColumns()?.slice()),er(se=>a?.getColumn(se)??null,ye,a?.getColumns()?.slice()),tg(t,s,p),d.refresh(i),g.dispatchEvent({type:"columnEverythingChanged",source:i}),I(),{unmatchedAndAutoStates:Pe,unmatchedCount:ce}};l?.start();let{unmatchedAndAutoStates:v,unmatchedCount:y}=w(t.state||[],m,P=>s.getColDefCol(P));if(v.length>0||x(t.defaultState)){const P=c?.getPivotResultCols()?.list??[];y=w(v,P,F=>c?.getPivotResultCol(F)??null).unmatchedCount}return l?.finish(),y===0}function fa(e,t){const{colModel:i,autoColSvc:s,selectionColSvc:o}=e,n=i.getColDefCols();if(!n?.length)return;const r=i.getColDefColTree(),a=Do(r),l=[];let d=1e3,c=1e3;const u=f=>{const C=Ca(f);N(C.rowGroupIndex)&&C.rowGroup&&(C.rowGroupIndex=d++),N(C.pivotIndex)&&C.pivot&&(C.pivotIndex=c++),l.push(C)};s?.getColumns()?.forEach(u),o?.getColumns()?.forEach(u),a?.forEach(u),we(e,{state:l},t);const h=s?.getColumns()??[],m=[...o?.getColumns()??[],...h,...n].map(f=>({colId:f.colId}));we(e,{state:m,applyOrder:!0},t)}function ma(e,t){const{rowGroupColsSvc:i,pivotColsSvc:s,valueColsSvc:o,colModel:n,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:i?.columns.slice()??[],pivotColumns:s?.columns.slice()??[],valueColumns:o?.columns.slice()??[]},d=hi(e),c={};return d.forEach(u=>{c[u.colId]=u}),()=>{const u=(F,M,I,k)=>{const L=M.map(k),U=I.map(k);if(Qe(L,U))return;const ye=new Set(M);I.forEach(ce=>{ye.delete(ce)||ye.add(ce)});const Pe=[...ye];a.dispatchEvent({type:F,columns:Pe,column:Pe.length===1?Pe[0]:null,source:t})},h=F=>{const M=[];return n.forAllCols(I=>{const k=c[I.getColId()];k&&F(k,I)&&M.push(I)}),M},g=F=>F.getColId();u("columnRowGroupChanged",l.rowGroupColumns,i?.columns??[],g),u("columnPivotChanged",l.pivotColumns,s?.columns??[],g);const m=h((F,M)=>{const I=F.aggFunc!=null,k=I!=M.isValueActive(),L=I&&F.aggFunc!=M.getAggFunc();return k||L});m.length>0&&pa(a,"columnValueChanged",m,t),Nt(a,h((F,M)=>F.width!=M.getActualWidth()),!0,t),ga(a,h((F,M)=>F.pinned!=M.getPinned()),t),eg(a,h((F,M)=>F.hide==M.isVisible()),t);const y=h((F,M)=>F.sort!=M.getSort()||F.sortIndex!=M.getSortIndex());y.length>0&&r?.dispatchSortChangedEvents(t,y);const P=hi(e);sg(d,P,t,n,a)}}function hi(e){const{colModel:t,rowGroupColsSvc:i,pivotColsSvc:s}=e,o=t.getColDefCols();if(N(o)||!t.isAlive())return[];const n=i?.columns,r=s?.columns,a=[],l=c=>{const u=c.isRowGroupActive()&&n?n.indexOf(c):null,h=c.isPivotActive()&&r?r.indexOf(c):null,g=c.isValueActive()?c.getAggFunc():null,p=c.getSort()!=null?c.getSort():null,m=c.getSortIndex()!=null?c.getSortIndex():null;a.push({colId:c.getColId(),width:c.getActualWidth(),hide:!c.isVisible(),pinned:c.getPinned(),sort:p,sortIndex:m,aggFunc:g,rowGroup:c.isRowGroupActive(),rowGroupIndex:u,pivot:c.isPivotActive(),pivotIndex:h,flex:c.getFlex()??null})};t.forAllCols(c=>l(c));const d=new Map(t.getCols().map((c,u)=>[c.getColId(),u]));return a.sort((c,u)=>{const h=d.has(c.colId)?d.get(c.colId):-1,g=d.has(u.colId)?d.get(u.colId):-1;return h-g}),a}function Ca(e){const t=(p,m)=>p??m??null,i=e.getColDef(),s=t(i.sort,i.initialSort),o=t(i.sortIndex,i.initialSortIndex),n=t(i.hide,i.initialHide),r=t(i.pinned,i.initialPinned),a=t(i.width,i.initialWidth),l=t(i.flex,i.initialFlex);let d=t(i.rowGroupIndex,i.initialRowGroupIndex),c=t(i.rowGroup,i.initialRowGroup);d==null&&(c==null||c==!1)&&(d=null,c=null);let u=t(i.pivotIndex,i.initialPivotIndex),h=t(i.pivot,i.initialPivot);u==null&&(h==null||h==!1)&&(u=null,h=null);const g=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:s,sortIndex:o,hide:n,pinned:r,width:a,flex:l,rowGroup:c,rowGroupIndex:d,pivot:h,pivotIndex:u,aggFunc:g}}function tg(e,t,i){if(!e.applyOrder||!e.state)return;const s=[];e.state.forEach(o=>{o.colId!=null&&s.push(o.colId)}),ig(t.cols,s,t,i)}function ig(e,t,i,s){if(e==null)return;let o=[];const n={};t.forEach(a=>{if(n[a])return;const l=e.map[a];l&&(o.push(l),n[a]=!0)});let r=0;if(e.list.forEach(a=>{const l=a.getColId();if(n[l]!=null)return;l.startsWith(ci)?o.splice(r++,0,a):o.push(a)}),o=ca(o,s),!ua(o,i.getColTree())){R(39);return}e.list=o}function sg(e,t,i,s,o){const n={};t.forEach(c=>n[c.colId]=c);const r={};e.forEach(c=>{n[c.colId]&&(r[c.colId]=!0)});const a=e.filter(c=>r[c.colId]),l=t.filter(c=>r[c.colId]),d=[];l.forEach((c,u)=>{const h=a&&a[u];if(h&&h.colId!==c.colId){const g=s.getCol(h.colId);g&&d.push(g)}}),d.length&&o.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,finished:!0,source:i})}var va=(e,t,i,s)=>{const o=e[i.getId()],n=e[s.getId()],r=o!=null,a=n!=null;if(r&&a)return o-n;if(r)return-1;if(a)return 1;const l=t.indexOf(i),d=t.indexOf(s),c=l>=0,u=d>=0;return c&&u?l-d:c?-1:1},og=class extends S{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],e=>this.refreshAll(vt(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),vt(e.source)))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:i,colAutosize:s,rowGroupColsSvc:o,pivotColsSvc:n,valueColsSvc:r,visibleCols:a,colViewport:l,eventSvc:d}=t,c=this.colDefs?ma(t,e):void 0;i?.expire();const u=this.colDefCols?.list,h=this.colDefCols?.tree,g=Yh(t,this.colDefs,!0,h,e);ui(t,this.colDefCols?.tree,g.columnTree);const p=g.columnTree,m=g.treeDepth,f=Do(p),C={};f.forEach(w=>C[w.getId()]=w),this.colDefCols={tree:p,treeDepth:m,list:f,map:C},o?.extractCols(e,u),n?.extractCols(e,u),r?.extractCols(e,u),this.ready=!0,this.refreshCols(!0),a.refresh(e),l.checkViewportColumns(),d.dispatchEvent({type:"columnEverythingChanged",source:e}),c&&(this.changeEventsDispatching=!0,c(),this.changeEventsDispatching=!1),d.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&s?.applyAutosizeStrategy()}refreshCols(e){if(!this.colDefCols)return;const t=this.cols?.tree;this.saveColOrder();const{autoColSvc:i,selectionColSvc:s,rowNumbersSvc:o,quickFilter:n,pivotResultCols:r,showRowGroupCols:a,rowAutoHeight:l,visibleCols:d,colViewport:c,eventSvc:u}=this.beans,h=th