403Webshell
Server IP : 31.14.161.123  /  Your IP : 216.73.217.61
Web Server : Apache
System : Linux cpanel.classit.ro 4.18.0-553.144.1.el8_10.x86_64 #1 SMP Tue Jul 14 09:26:58 EDT 2026 x86_64
User : diamedic ( 1014)
PHP Version : 8.2.32
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/diamedic/public_html/app/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/diamedic/public_html/app/chunk-EHYP27E4.js
import{Ba as mn,Ga as x,Ha as zt,La as Cn,db as Wt,fb as bi,ja as ws,jb as Ss,jc as wn,nb as vn,oa as gn,pa as pn,vc as S,ya as fn}from"./chunk-YYBV4RPL.js";import{a as R,b as O,c as vs,f as hn}from"./chunk-EQDQRRRY.js";var rt=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){let s=t?this.allAsyncListeners:this.allSyncListeners,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){let 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){let 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){let i=e.type;if(t&&"event"in e){let a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}let{frameworkOverrides:s}=this,o=a=>{let l=s?()=>s.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},n=this.getListeners(i,t,!1);if((n?.size??0)>0){let a=new Set(n);for(let l of a)n?.has(l)&&o(()=>l(e))}let r=this.getGlobalListeners(t);if(r.size>0){let a=new Set(r);for(let l of a)o(()=>l(i,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){let t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;let e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}};function rd(e,t){return t}function Sr(e){return e?.getLocaleTextFunc()??rd}function Be(e,t,i){i==null||typeof i=="string"&&i==""?br(e,t):Ce(e,t,i)}function Ce(e,t,i){e.setAttribute(yr(t),i.toString())}function br(e,t){e.removeAttribute(yr(t))}function yr(e){return`aria-${e}`}function $e(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function ad(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function ld(e){return e.getAttribute("aria-label")}function rs(e,t){Be(e,"label",t)}function Zs(e,t){Be(e,"labelledby",t)}function Rr(e,t){Be(e,"live",t)}function dd(e,t){Be(e,"atomic",t)}function cd(e,t){Be(e,"relevant",t)}function ud(e,t){Be(e,"disabled",t)}function xr(e,t){Be(e,"hidden",t)}function Xs(e,t){Ce(e,"expanded",t)}function hd(e,t){Ce(e,"setsize",t)}function gd(e,t){Ce(e,"posinset",t)}function pd(e,t){Ce(e,"multiselectable",t)}function fd(e,t){Ce(e,"rowcount",t)}function Fo(e,t){Ce(e,"rowindex",t)}function md(e,t){Ce(e,"rowspan",t)}function Cd(e,t){Ce(e,"colcount",t)}function Fr(e,t){Ce(e,"colindex",t)}function vd(e,t){Ce(e,"colspan",t)}function wd(e,t){Ce(e,"sort",t)}function Sd(e){br(e,"sort")}function Js(e,t){Be(e,"selected",t)}function bd(e,t){Be(e,"controls",t.id),Zs(t,e.id)}function Eo(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var bs,ys,Rs,xs,eo,to,Fs;function ut(){return bs===void 0&&(bs=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),bs}function Er(){return ys===void 0&&(ys=/(firefox)/i.test(navigator.userAgent)),ys}function Pr(){return Rs===void 0&&(Rs=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Rs}function Je(){return xs===void 0&&(xs=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),xs}function io(e){if(!e)return null;let t=e.tabIndex,i=e.getAttribute("tabIndex");return t===-1&&(i===null||i===""&&!Er())?null:t.toString()}function yd(){if(Fs!==void 0)return Fs;if(!document.body)return-1;let e=1e6,t=Er()?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){let s=e*2;if(i.style.height=s+"px",s>t||i.clientHeight!==s)break;e=s}return document.body.removeChild(i),Fs=e,e}function Rd(){return to==null&&Dr(),to}function Dr(){let 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&&(to=i,eo=i===0)}function Mr(){return eo==null&&Dr(),eo}var xd="[tabindex], input, select, button, textarea, [href]",Tr="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Po(e){let t=Element.prototype.matches||Element.prototype.msMatchesSelector,s=t.call(e,"input, select, button, textarea"),o=t.call(e,Tr),n=ye(e);return s&&!o&&n}function U(e,t,i={}){let{skipAriaHidden:s}=i;e.classList.toggle("ag-hidden",!t),s||xr(e,!t)}function Fd(e,t,i={}){let{skipAriaHidden:s}=i;e.classList.toggle("ag-invisible",!t),s||xr(e,!t)}function ni(e,t){let i="disabled",s=t?n=>n.setAttribute(i,""):n=>n.removeAttribute(i);s(e);let o=e.querySelectorAll("input")??[];for(let n of o)s(n)}function et(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 ht(e){let{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:f}=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:f}}function Do(e){let t=ht(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function ri(e){let t=ht(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function Ar(e){let{height:t,marginBottom:i,marginTop:s}=ht(e);return Math.floor(t+i+s)}function Bi(e){let{width:t,marginLeft:i,marginRight:s}=ht(e);return Math.floor(t+i+s)}function kr(e){let t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:s,borderRightWidth:o,borderBottomWidth:n}=ht(e);return{top:t.top+(i||0),left:t.left+(s||0),right:t.right+(o||0),bottom:t.bottom+(n||0)}}function Vi(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i)),i}function Ni(e,t,i){i&&(t*=-1),e.scrollLeft=t}function J(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function se(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Ir(e){return!!e.offsetParent}function ye(e){let t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!Ir(e)||window.getComputedStyle(e).visibility!=="visible")}function Mo(e){let t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Lr(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 Or(e,t){for(let i=0;i<t.length;i++){let s=t[i],o=e.children[i];o!==s&&e.insertBefore(s,o)}}function Ed(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function mi(e,t){if(t)for(let i of Object.keys(t)){let s=t[i];if(!i||!i.length||s==null)continue;let o=Ed(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 Pd(e){return e.clientWidth<e.scrollWidth}function Dd(e){return e.clientHeight<e.scrollHeight}function zi(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):De(e,t)}function De(e,t){t=To(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Zt(e,t){t=To(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function To(e){return typeof e=="number"?`${e}px`:e}function Ao(e){return e instanceof Node||e instanceof HTMLElement}function pe(e,t,i){i==null||i===""?e.removeAttribute(t):e.setAttribute(t,i.toString())}function qe(e,t,i){let o=$r(e).ResizeObserver,n=o?new o(i):null;return n?.observe(t),()=>n?.disconnect()}function Ve(e,t){let i=$r(e);i.requestAnimationFrame?i.requestAnimationFrame(t):i.webkitRequestAnimationFrame?i.webkitRequestAnimationFrame(t):i.setTimeout(t,0)}var Hr="data-ref",Es;function Sn(){return Es??(Es=document.createTextNode(" ")),Es.cloneNode()}function W(e){let{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(Hr,o),n&&a.setAttribute("role",n),t)for(let l of Object.keys(t))a.setAttribute(l,t[l]);if(i)if(typeof i=="string")a.textContent=i;else{let l=!0;for(let d of i)d&&(typeof d=="string"?(a.appendChild(document.createTextNode(d)),l=!1):(l&&(a.appendChild(Sn()),l=!1),a.append(W(d)),a.appendChild(Sn())))}return a}var bn={};function ko(e,t){bn[t]||(e(),bn[t]=!0)}function Ke(e,t,...i){e.get("debug")&&console.log("AG Grid: "+t,...i)}function bt(e,...t){ko(()=>console.warn("AG Grid: "+e,...t),e+t?.join(""))}function yt(e,...t){ko(()=>console.error("AG Grid: "+e,...t),e+t?.join(""))}var Md={pending:!1,funcs:[]},Td={pending:!1,funcs:[]};function so(e,t="setTimeout",i){let s=t==="raf"?Td:Md;if(s.funcs.push(e),s.pending)return;s.pending=!0;let o=()=>{let n=s.funcs.slice();s.funcs.length=0,s.pending=!1,n.forEach(r=>r())};t==="raf"?Ve(i,o):window.setTimeout(o,0)}function Q(e,t,i){let s;return function(...o){let n=this;window.clearTimeout(s),s=window.setTimeout(function(){e.isAlive()&&t.apply(n,o)},i)}}function yn(e,t){let i=0;return function(...s){let o=this,n=Date.now();n-i<t||(i=n,e.apply(o,s))}}function Ad(e,t,i=100,s){let o=Date.now(),n=null,r=!1,a=()=>{let l=Date.now()-o>i;(e()||l)&&(t(),r=!0,n!=null&&(window.clearInterval(n),n=null),l&&s&&bt(s))};a(),r||(n=window.setInterval(a,10))}function ke(e){return e==null||e===""?null:e}function P(e){return e!=null&&e!==""}function _(e){return!P(e)}function oo(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function ai(e,t){let i=e?JSON.stringify(e):null,s=t?JSON.stringify(t):null;return i===s}function kd(e,t,i=!1){let 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 Gr="https://www.ag-grid.com",D="33.3.2",Rn=2e3,xn=100,Br="_version_",Vr=null,Id=!1,Rt=`${Gr}/javascript-data-grid`;function Ld(e){Vr=e}function Od(e){Rt=e}function Nr(e,t,i){return Vr?.getConsoleMessage(e,t)??[Vd(e,t,i)]}function Io(e,t,i,s){Id||e(`error #${t}`,...Nr(t,i,s))}function Hd(e){if(!e)return String(e);let t={};for(let i of Object.keys(e))typeof e[i]!="object"&&typeof e[i]!="function"&&(t[i]=e[i]);return JSON.stringify(t)}function Gd(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=Hd(e)),t}function Wi(e){return e===void 0?"undefined":e===null?"null":e}function no(e,t){return`${e}?${t.toString()}`}function Bd(e,t,i){let s=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length),o=no(e,t);for(let[n,r]of s){if(n===Br)continue;let a=o.length-i;if(a<=0)break;let l="...",d=a+l.length,c=r.length-d>xn?r.slice(0,r.length-d)+l:r.slice(0,xn)+l;t.set(n,c),o=no(e,t)}return o}function zr(e,t){let i=new URLSearchParams;if(i.append(Br,D),t)for(let n of Object.keys(t))i.append(n,Gd(t[n]));let s=`${Rt}/errors/${e}`,o=no(s,i);return o.length<=Rn?o:Bd(s,i,Rn)}var Vd=(e,t,i)=>{let s=zr(e,t);return`${i?i+` 
`:""}Visit ${s}${i?"":` 
  Alternatively register the ValidationModule to see the full message in the console.`}`};function F(...e){Io(bt,e[0],e[1])}function z(...e){Io(yt,e[0],e[1])}function qt(e,t,i){Io(yt,e,t,i)}function Nd(e,t){let i=t[0];return`error #${i} `+Nr(i,t[1],e).join(" ")}function Ue(...e){return Nd(void 0,e)}function Wr(e,t){return e.get("rowModelType")===t}function Y(e,t){return Wr(e,"clientSide")}function Ot(e,t){return Wr(e,"serverSide")}function Z(e,t){return e.get("domLayout")===t}function tt(e){return Ui(e)!==void 0}function _r(e){return typeof e.get("getRowHeight")=="function"}function zd(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function je(e,t,i=!1,s){let{gos:o,environment:n}=e;if(s==null&&(s=n.getDefaultRowHeight()),_r(o)){if(i)return{height:s,estimated:!0};let l={node:t,data:t.data},d=o.getCallback("getRowHeight")(l);if(ro(d))return d===0&&F(23),{height:Math.max(1,d),estimated:!1}}if(t.detail&&o.get("masterDetail"))return Wd(o);let r=o.get("rowHeight");return{height:r&&ro(r)?r:s,estimated:!1}}function Wd(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};let t=e.get("detailRowHeight");return ro(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function it(e){let{environment:t,gos:i}=e,s=i.get("rowHeight");if(!s||_(s))return t.getDefaultRowHeight();let o=t.refreshRowHeightVariable();return o!==-1?o:(F(24),t.getDefaultRowHeight())}function ro(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function Ur(e,t,i){let s=t[e.getDomDataKey()];return s?s[i]:void 0}function at(e,t,i,s){let o=e.getDomDataKey(),n=t[o];_(n)&&(n={},t[o]=n),n[i]=s}function q(e){let{gos:t,eGridDiv:i}=e,s=null,o=t.get("getDocument");return o&&P(o)?s=o():i&&(s=i.ownerDocument),s&&P(s)?s:document}function $r(e){return q(e).defaultView||window}function li(e){return e.eGridDiv.getRootNode()}function $(e){return li(e).activeElement}function Lo(e){let t=null,i=null;try{t=q(e).fullscreenElement}catch{}finally{t||(t=li(e));let s=t.querySelector("body");s?i=s:t instanceof ShadowRoot?i=t:t instanceof Document?i=t?.documentElement:i=t}return i}function _d(e){return Lo(e)?.clientWidth??(window.innerHeight||-1)}function Ud(e){return Lo(e)?.clientHeight??(window.innerHeight||-1)}function $d(e,t,i){let o=e.getBoundingClientRect().height,n=_d(i)-2,r=Ud(i)-2;if(!e.offsetParent)return;let l=kr(e.offsetParent),{clientY:d,clientX:c}=t,u=d-l.top-o/2,h=c-l.left-10,g=q(i),p=g.defaultView||window,f=p.pageYOffset||g.documentElement.scrollTop,m=p.pageXOffset||g.documentElement.scrollLeft;n>0&&h+e.clientWidth>n+m&&(h=n+m-e.clientWidth),h<0&&(h=0),r>0&&u+e.clientHeight>r+f&&(u=r+f-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}function Kr(e){let t=$(e);return t===null||t===q(e).body}function xt(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function jr(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Z(e,"print"))}function Ee(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function ao(e){let t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function qr(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function Yr(e,t,i){return!!t.group&&!t.footer&&qr(e,i)}function At(e){let t=e.getCallback("getRowId");return t===void 0?t:i=>{let s=t(i);return typeof s!="string"&&(ko(()=>F(25,{id:s}),"getRowIdString"),s=String(s)),s}}function Kd(e,t){let i=e.get("groupHideParentOfSingleChild");return!!(i===!0||i==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function jd(e){let t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function Ft(e){return e?.checkboxes??!0}function Ai(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function _i(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function Ps(e){return e?.hideDisabledCheckboxes??!1}function qd(e){return typeof e.get("rowSelection")!="string"}function Oe(e){let t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function Qr(e){let t=e.get("rowSelection")??"single";if(typeof t=="string"){let 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 Yd(e){let t=Qr(e);return t===!0||t==="enableSelection"}function Qd(e){let t=Qr(e);return t===!0||t==="enableDeselection"}function lo(e){let t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function Ui(e){let 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 di(e){return Ui(e)==="multiRow"}function Zd(e){let t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function $i(e){let t=e.get("rowSelection");if(typeof t=="string"){let i=e.get("groupSelectsChildren"),s=e.get("groupSelectsFiltered");return i&&s?"filteredDescendants":i?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function Zr(e,t=!0){let i=e.get("rowSelection");return typeof i!="object"?t?"all":void 0:i.mode==="multiRow"?i.selectAll:"all"}function ci(e){let t=$i(e);return t==="descendants"||t==="filteredDescendants"}function Fn(e){let t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function Ds(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function de(e){return e.get("columnMenu")==="legacy"}function Xd(e){return!de(e)}function Xr(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function Jr(e,t,i){typeof e!="object"&&(e={});let s=R({},e);return i.forEach(o=>{let n=t[o];typeof n<"u"&&(s[o]=n)}),s}function ea(e,t){if(!e)return;let i={},s=!1;if(Object.keys(e).forEach(r=>{i[r]=e[r],s=!0}),!s)return;let o={type:"gridOptionsChanged",options:i};t.dispatchEvent(o);let n=R({type:"componentStateChanged"},i);t.dispatchEvent(n)}function I(e,t){return e.addGridCommonParams(t)}function Jd(e){return e.get("treeData")?e.get("treeDataParentIdField")?"treeSelfRef":e.get("treeDataChildrenField")?"treeNested":"treePath":"group"}var ta="__ag_Grid_Stop_Propagation",ec=["touchstart","touchend","touchmove","touchcancel","scroll"],tc=["wheel"],Ms={};function lt(e){e[ta]=!0}function Ie(e){return e[ta]===!0}var ia=(()=>{let e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return i=>{if(typeof Ms[i]=="boolean")return Ms[i];let s=document.createElement(e[i]||"div");return i="on"+i,Ms[i]=i in s}})();function sa(e,t,i){let s=t;for(;s;){let o=Ur(e,s,i);if(o)return o;s=s.parentElement}return null}function ic(e,t){return!t||!e?!1:oc(t).indexOf(e)>=0}function sc(e){let t=[],i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}function oc(e){let t=e;return t.path?t.path:t.composedPath?t.composedPath():sc(t)}function nc(e,t,i,s){let o=oa(i),n;o!=null&&(n={passive:o}),e&&e.addEventListener&&e.addEventListener(t,i,s,n)}var oa=e=>{let t=ec.includes(e),i=tc.includes(e);if(t)return!0;if(i)return!1},y=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(){let{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 rt),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){let i=[];for(let s of Object.keys(t)){let 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 rc(e)?(e.__addEventListener(t,i),s=()=>(e.__removeEventListener(t,i),null)):(e instanceof HTMLElement?nc(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){let{gos:i}=this;i.addPropertyEventListener(e,t);let 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;let 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}let n={type:"gridPropertyChanged",changeSet:o.changeSet,source:o.source};t(n)};e.forEach(o=>this.setupGridOptionListener(o,s))}getLocaleTextFunc(){return Sr(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){let 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 rc(e){return e.__addEventListener!==void 0}var na=new Set(["__proto__","constructor","prototype"]);function ac(e,t){if(e!=null){if(Array.isArray(e)){for(let i=0;i<e.length;i++)t(i.toString(),e[i]);return}for(let i of Object.keys(e))t(i,e[i])}}function oe(e,t,i=!0,s=!1){P(t)&&ac(t,(o,n)=>{if(na.has(o))return;let r=e[o];r!==n&&(s&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[o]=r),En(n)&&En(r)&&!Array.isArray(r)?oe(r,n,i,s):(i||n!==void 0)&&(e[o]=n))})}function Xt(e,t,i){if(!t||!e)return;if(!i)return e[t];let s=t.split("."),o=e;for(let n=0;n<s.length;n++){if(o==null)return;o=o[s[n]]}return o}function En(e){return typeof e=="object"&&e!==null}var lc=/[&<>"']/g,dc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Ht(e){return e?.toString().toString()??null}function ki(e){return Ht(e)?.replace(lc,t=>dc[t])??null}var cc={resizable:!0,sortable:!0},uc=0;function ra(){return uc++}function He(e){return e instanceof as}var as=class extends y{constructor(e,t,i,s){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=s,this.isColumn=!0,this.instanceId=ra(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new rt,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=ki(i)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}setState(){let{colDef:e,beans:{sortSvc:t,pinnedCols:i,colFlex:s}}=this;t?.initCol(this);let o=e.hide;o!==void 0?this.visible=!o:this.visible=!e.initialHide,i?.initCol(this),s?.initCol(this)}setColDef(e,t,i){let 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(){let{gos:e,colDef:{field:t,tooltipField:i}}=this,s=e.get("suppressFieldDotNotation");this.fieldContainsDots=P(t)&&t.indexOf(".")>=0&&!s,this.tooltipFieldContainsDots=P(i)&&i.indexOf(".")>=0&&!s}initMinAndMaxWidths(){let 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){let t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t,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);let i=this.frameworkEventListenerService?.wrap(e,t)??t;this.colEventSvc.addEventListener(e,i)}removeEventListener(e,t){let i=this.frameworkEventListenerService?.unwrap(e,t)??t;this.colEventSvc.removeEventListener(e,i)}createColumnFunctionCallbackParams(e){return I(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]??cc[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){let i=this.createColumnFunctionCallbackParams(e);return t(i)}return!1}createColumnEvent(e,t){return I(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 _(this.sort)}isSorting(){return P(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 F(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){let 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};let t=e.getPaddingLevel()+1,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){let t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return I(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(_(this.colDef.colSpan))return 1;let t=this.createBaseColDefParams(e),i=this.colDef.colSpan(t);return Math.max(i,1)}getRowSpan(e){if(_(this.colDef.rowSpan))return 1;let 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){let s=this.createColumnEvent(e,t);i&&oe(s,i),this.colEventSvc.dispatchEvent(s)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function X(e){return e instanceof Ii}var Ii=class extends y{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=ra(),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(){let e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(let t of this.children)He(t)?e(t):X(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){this.children&&this.children.forEach(t=>{He(t)?e.push(t):X(t)&&t.addLeafColumns(e)})}getColumnGroupShow(){let e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();let 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,s=this.findChildrenRemovingPadding();for(let n=0,r=s.length;n<r;n++){let a=s[n];if(!a.isVisible())continue;let l=a.getColumnGroupShow();l==="open"?(e=!0,i=!0):l==="closed"?(t=!0,i=!0):(e=!0,t=!0)}let o=e&&t&&i;this.expandable!==o&&(this.expandable=o,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){let e=[],t=i=>{i.forEach(s=>{X(s)&&s.isPadding()?t(s.children):e.push(s)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},hc={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function Pn(e,t,i){let s={},o=e.gos;return Object.assign(s,o.get("defaultColGroupDef")),Object.assign(s,t),o.validateColDef(s,i),s}var gc=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=oo(e);let i=0;for(;;){let s=e??t;if(s?i!==0&&(s+="_"+i):s=i,!this.existingKeys[s]){let o=String(s);return e&&i>0&&F(273,{providedId:e,usedId:o}),this.existingKeys[o]=!0,o}i++}}},Dn=Object.freeze([]);function N(e){if(e?.length)return e[e.length-1]}function gt(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 yi(e,t){if(e)for(let i of e)t(i)}function me(e,t){let i=e.indexOf(t);i>=0&&e.splice(i,1)}function Mn(e,t,i){for(let s=0;s<t.length;s++)me(e,t[s]);for(let s=t.length-1;s>=0;s--)e.splice(i,0,t[s])}var ls="ag-Grid-AutoColumn",aa="ag-Grid-SelectionColumn",la="ag-Grid-RowNumbersColumn";function da(e){let t=[],i=s=>{for(let o=0;o<s.length;o++){let n=s[o];He(n)?t.push(n):X(n)&&i(n.getChildren())}};return i(e),t}function Ae(e){return e.reduce((t,i)=>t+i.getActualWidth(),0)}function Ki(e,t,i){let s={};if(!t)return;Le(null,t,n=>{s[n.getInstanceId()]=n}),i&&Le(null,i,n=>{s[n.getInstanceId()]=null});let o=Object.values(s).filter(n=>n!=null);e.context.destroyBeans(o)}function Oo(e){return e.getId().startsWith(ls)}function Gt(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(aa)??!1}function st(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(la)??!1}function ji(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function pc(e,t){return gt(e,t,(i,s)=>i.getColId()===s.getColId())}function fc(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function Et(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function ca(e,t){let i=e===t,s=e.getColDef()===t,o=e.getColId()==t;return i||s||o}var mc=(e,t)=>(i,s)=>{let o={value1:void 0,value2:void 0},n=!1;return e&&(e[i]!==void 0&&(o.value1=e[i],n=!0),P(s)&&e[s]!==void 0&&(o.value2=e[s],n=!0)),!n&&t&&(t[i]!==void 0&&(o.value1=t[i]),P(s)&&t[s]!==void 0&&(o.value2=t[s])),o};function Cc(e,t=null,i,s,o){let n=new gc,{existingCols:r,existingGroups:a,existingColKeys:l}=vc(s);n.addExistingKeys(l);let d=ua(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 Le(null,h,(p,f)=>{X(p)&&p.setupExpandable(),p.originalParent=f}),{columnTree:h,treeDepth:u}}function vc(e){let t=[],i=[],s=[];return e&&Le(null,e,o=>{if(X(o)){let n=o;i.push(n)}else{let n=o;s.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:i,existingColKeys:s}}function ua(e,t,i,s,o,n,r,a){if(!t)return[];let{colGroupSvc:l}=e,d=new Array(t.length);for(let c=0;c<d.length;c++){let u=t[c];l&&xc(u)?d[c]=l.createProvidedColumnGroup(s,u,i,o,n,r,a):d[c]=wc(e,s,u,o,n,a)}return d}function wc(e,t,i,s,o,n){let r=bc(i,s);r&&s?.splice(r.idx,1);let a=r?.column;if(a){let l=co(e,i,a.getColId());a.setColDef(l,i,n),Sc(e,a,l,n)}else{let l=o.getUniqueKey(i.colId,i.field),d=co(e,i,l);a=new as(d,i,l,t),e.context.createBean(a)}return e.dataTypeSvc?.addColumnListeners(a),a}function ha(e,t,i,s,o,n,r,a){let{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 Sc(e,t,i,s){ha(e,t,i.hide,i.sort,i.sortIndex,i.pinned,i.flex,s);let o=t.getFlex();if(!(o!=null&&o>0))if(i.width!=null)t.setActualWidth(i.width,s);else{let n=t.getActualWidth();t.setActualWidth(n,s)}}function bc(e,t){if(t)for(let i=0;i<t.length;i++){let 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 co(e,t,i,s){let{gos:o,dataTypeSvc:n}=e,r={},a=o.get("defaultColDef");oe(r,a,!1,!0);let l=yc(e,r,t,i);l&&Rc(e,l,r),oe(r,t,!1,!0);let d=o.get("autoGroupColumnDef"),c=Ee(o);return t.rowGroup&&d&&c&&oe(r,{sort:d.sort,initialSort:d.initialSort},!1,!0),n?.validateColDef(r),o.validateColDef(r,i,s),r}function yc(e,t,i,s){let o=e.dataTypeSvc?.updateColDefAndGetColumnType(t,i,s),n=i.type??o??t.type;return t.type=n,n?ji(n):void 0}function Rc(e,t,i){if(!t.length)return;let s=Object.assign({},hc),o=e.gos.get("columnTypes")||{};for(let n of Object.keys(o)){let r=o[n];n in s?F(34,{key:n}):(r.type&&F(35),s[n]=r)}t.forEach(n=>{let r=s[n.trim()];r?oe(i,r,!1,!0):F(36,{t:n})})}function xc(e){return e.children!==void 0}function Le(e,t,i){if(t)for(let s=0;s<t.length;s++){let o=t[s];X(o)&&Le(o,o.getChildren(),i),i(o,e)}}function ga(e,t){let i=[],s=[],o=[];return e.forEach(r=>{let 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 pa(e,t){let i=!0;return Le(null,t,s=>{if(!X(s))return;let o=s,n=o.getColGroupDef();if(!(n&&n.marryChildren))return;let a=[];o.getLeafColumns().forEach(h=>{let g=e.indexOf(h);a.push(g)});let 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 fa(e,t){if(!e||e.length==0)return;let i=t(e[0]);for(let s=1;s<e.length;s++)if(i!==t(e[s]))return;return i}function ma(e,t,i){if(!t.length)return;let s=t.length===1?t[0]:null,o=fa(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:o??null,columns:t,column:s,source:i})}function Fc(e,t,i){if(!t.length)return;let s=t.length===1?t[0]:null,o=fa(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:o,columns:t,column:s,source:i})}function Ec(e,t,i,s){e.dispatchEvent({type:t,columns:i,column:i&&i.length==1?i[0]:null,source:s})}function kt(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 be(e,t,i){let{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,f=s.getColDefCols()??[],m=a?.getColumns();if(!f?.length&&!m?.length)return!1;if(t?.state&&!t.state.forEach)return F(32),!1;let C=(A,M,k,G,H)=>{if(!A)return;let B=mc(M,t.defaultState),K=B("flex").value1;if(ha(e,A,B("hide").value1,B("sort").value1,B("sortIndex").value1,B("pinned").value1,K,i),K==null){let ae=B("width").value1;if(ae!=null){let ve=A.getColDef().minWidth??u.getDefaultColumnMinWidth();ve!=null&&ae>=ve&&A.setActualWidth(ae,i)}}H||!A.isPrimary()||(h?.syncColumnWithState(A,i,B),o?.syncColumnWithState(A,i,B,k),n?.syncColumnWithState(A,i,B,G))},v=(A,M,k)=>{let G=Ca(e,i),H=M.slice(),B={},K={},ae=[],ve=[],Re=[],le=0,od=o?.columns.slice()??[],nd=n?.columns.slice()??[];A.forEach(ee=>{let Nt=ee.colId;if(Nt.startsWith(ls)){ae.push(ee),Re.push(ee);return}if(Gt(Nt)){ve.push(ee),Re.push(ee);return}let mt=k(Nt);mt?(C(mt,ee,B,K,!1),me(H,mt)):(Re.push(ee),le+=1)});let dn=ee=>C(ee,null,B,K,!1);H.forEach(dn),o?.sortColumns(Tn.bind(o,B,od)),n?.sortColumns(Tn.bind(n,K,nd)),s.refreshCols(!1);let cn=(ee,Nt,Cs=[])=>{Nt.forEach(mt=>{let un=ee(mt.colId);me(Cs,un),C(un,mt,null,null,!0)}),Cs.forEach(dn)};return cn(ee=>r?.getColumn(ee)??null,ae,r?.getColumns()?.slice()),cn(ee=>a?.getColumn(ee)??null,ve,a?.getColumns()?.slice()),Dc(t,s,p),d.refresh(i),g.dispatchEvent({type:"columnEverythingChanged",source:i}),G(),{unmatchedAndAutoStates:Re,unmatchedCount:le}};l?.start();let{unmatchedAndAutoStates:w,unmatchedCount:T}=v(t.state||[],f,A=>s.getColDefCol(A));if(w.length>0||P(t.defaultState)){let A=c?.getPivotResultCols()?.list??[];T=v(w,A,M=>c?.getPivotResultCol(M)??null).unmatchedCount}return l?.finish(),T===0}function Pc(e,t){let{colModel:i,autoColSvc:s,selectionColSvc:o}=e,n=i.getColDefCols();if(!n?.length)return;let r=i.getColDefColTree(),a=da(r),l=[],d=1e3,c=1e3,u=m=>{let C=va(m);_(C.rowGroupIndex)&&C.rowGroup&&(C.rowGroupIndex=d++),_(C.pivotIndex)&&C.pivot&&(C.pivotIndex=c++),l.push(C)};s?.getColumns()?.forEach(u),o?.getColumns()?.forEach(u),a?.forEach(u),be(e,{state:l},t);let h=s?.getColumns()??[],f=[...o?.getColumns()??[],...h,...n].map(m=>({colId:m.colId}));be(e,{state:f,applyOrder:!0},t)}function Ca(e,t){let{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=qi(e),c={};return d.forEach(u=>{c[u.colId]=u}),()=>{let u=(M,k,G,H)=>{let B=k.map(H),K=G.map(H);if(gt(B,K))return;let ve=new Set(k);G.forEach(le=>{ve.delete(le)||ve.add(le)});let Re=[...ve];a.dispatchEvent({type:M,columns:Re,column:Re.length===1?Re[0]:null,source:t})},h=M=>{let k=[];return n.forAllCols(G=>{let H=c[G.getColId()];H&&M(H,G)&&k.push(G)}),k},g=M=>M.getColId();u("columnRowGroupChanged",l.rowGroupColumns,i?.columns??[],g),u("columnPivotChanged",l.pivotColumns,s?.columns??[],g);let f=h((M,k)=>{let G=M.aggFunc!=null,H=G!=k.isValueActive(),B=G&&M.aggFunc!=k.getAggFunc();return H||B});f.length>0&&Ec(a,"columnValueChanged",f,t),kt(a,h((M,k)=>M.width!=k.getActualWidth()),!0,t),ma(a,h((M,k)=>M.pinned!=k.getPinned()),t),Fc(a,h((M,k)=>M.hide==k.isVisible()),t);let T=h((M,k)=>M.sort!=k.getSort()||M.sortIndex!=k.getSortIndex());T.length>0&&r?.dispatchSortChangedEvents(t,T);let A=qi(e);Tc(d,A,t,n,a)}}function qi(e){let{colModel:t,rowGroupColsSvc:i,pivotColsSvc:s}=e,o=t.getColDefCols();if(_(o)||!t.isAlive())return[];let n=i?.columns,r=s?.columns,a=[],l=c=>{let 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,f=c.getSortIndex()!=null?c.getSortIndex():null;a.push({colId:c.getColId(),width:c.getActualWidth(),hide:!c.isVisible(),pinned:c.getPinned(),sort:p,sortIndex:f,aggFunc:g,rowGroup:c.isRowGroupActive(),rowGroupIndex:u,pivot:c.isPivotActive(),pivotIndex:h,flex:c.getFlex()??null})};t.forAllCols(c=>l(c));let d=new Map(t.getCols().map((c,u)=>[c.getColId(),u]));return a.sort((c,u)=>{let 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 va(e){let t=(p,f)=>p??f??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),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);let 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 Dc(e,t,i){if(!e.applyOrder||!e.state)return;let s=[];e.state.forEach(o=>{o.colId!=null&&s.push(o.colId)}),Mc(t.cols,s,t,i)}function Mc(e,t,i,s){if(e==null)return;let o=[],n={};t.forEach(a=>{if(n[a])return;let l=e.map[a];l&&(o.push(l),n[a]=!0)});let r=0;if(e.list.forEach(a=>{let l=a.getColId();if(n[l]!=null)return;l.startsWith(ls)?o.splice(r++,0,a):o.push(a)}),o=ga(o,s),!pa(o,i.getColTree())){F(39);return}e.list=o}function Tc(e,t,i,s,o){let n={};t.forEach(c=>n[c.colId]=c);let r={};e.forEach(c=>{n[c.colId]&&(r[c.colId]=!0)});let a=e.filter(c=>r[c.colId]),l=t.filter(c=>r[c.colId]),d=[];l.forEach((c,u)=>{let h=a&&a[u];if(h&&h.colId!==c.colId){let 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 Tn=(e,t,i,s)=>{let 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;let l=t.indexOf(i),d=t.indexOf(s),c=l>=0,u=d>=0;return c&&u?l-d:c?-1:1},Ac=class extends y{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(Et(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),Et(e.source)))}createColsFromColDefs(e){let{beans:t}=this,{valueCache:i,colAutosize:s,rowGroupColsSvc:o,pivotColsSvc:n,valueColsSvc:r,visibleCols:a,colViewport:l,eventSvc:d}=t,c=this.colDefs?Ca(t,e):void 0;i?.expire();let u=this.colDefCols?.list,h=this.colDefCols?.tree,g=Cc(t,this.colDefs,!0,h,e);Ki(t,this.colDefCols?.tree,g.columnTree);let p=g.columnTree,f=g.treeDepth,m=da(p),C={};m.forEach(v=>C[v.getId()]=v),this.colDefCols={tree:p,treeDepth:f,list:m,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;let t=this.cols?.tree;this.saveColOrder();let{autoColSvc:i,selectionColSvc:s,rowNumbersSvc:o,quickFilter:n,pivotResultCols:r,showRowGroupCols:a,rowAutoHeight:l,visibleCols:d,colViewport:c,eventSvc:u}=this.beans,h=this.selectCols(r,this.colDefCols);this.createColumnsForService([i,s,o],h);let g=zd(this.gos,this.showingPivotResult);(!e||g)&&this.restoreColOrder(h),this.positionLockedCols(h),a?.refresh(),n?.refreshCols(),this.setColSpanActive(),l?.setAutoHeightActive(h),d.clear(),c.clear(),!gt(t,this.cols.tree)&&u.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t){for(let i of e)i&&(i.createColumns(t,s=>{this.lastOrder=s(this.lastOrder),this.lastPivotOrder=s(this.lastPivotOrder)}),i.addColumns(t))}selectCols(e,t){let i=e?.getPivotResultCols()??null;this.showingPivotResult=i!=null;let{map:s,list:o,tree:n,treeDepth:r}=i??t;return this.cols={list:o.slice(),map:R({},s),tree:n.slice(),treeDepth:r},i&&(i.list.some(l=>this.cols?.map[l.getColId()]!==void 0)||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];let e=this.isPivotMode()&&!this.showingPivotResult,t=this.beans.valueColsSvc?.columns;return this.cols.list.filter(s=>{let o=Oo(s);if(e){let n=t?.includes(s);return o||n}else return o||s.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,i){be(this.beans,{state:e.map(s=>({colId:typeof s=="string"?s:s.getColId(),hide:!t}))},i)}restoreColOrder(e){let t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;let i=t.filter(u=>e.map[u.getId()]!=null);if(i.length===0)return;if(i.length===e.list.length){e.list=i;return}let s=u=>{let h=u.getOriginalParent();return h?h.getChildren().length>1?!0:s(h):!1};if(!i.some(u=>s(u))){let u=new Set(i);for(let h of e.list)u.has(h)||i.push(h);e.list=i;return}let o=new Map;for(let u=0;u<i.length;u++){let h=i[u];o.set(h,u)}let n=e.list.filter(u=>!o.has(u));if(n.length===0){e.list=i;return}let r=(u,h)=>{let g=h?h.getOriginalParent():u.getOriginalParent();if(!g)return null;let p=null,f=null;for(let m of g.getChildren())if(!(m===h||m===u)){if(m instanceof as){let C=o.get(m);if(C==null)continue;(p==null||p<C)&&(p=C,f=m);continue}m.forEachLeafColumn(C=>{let v=o.get(C);v!=null&&(p==null||p<v)&&(p=v,f=C)})}return f??r(u,g)},a=[],l=new Map;for(let u of n){let h=r(u,null);if(h==null){a.push(u);continue}let g=l.get(h);g===void 0?l.set(h,u):Array.isArray(g)?g.push(u):l.set(h,[g,u])}let d=new Array(e.list.length),c=d.length-1;for(let u=a.length-1;u>=0;u--)d[c--]=a[u];for(let u=i.length-1;u>=0;u--){let h=i[u],g=l.get(h);if(g)if(Array.isArray(g))for(let p=g.length-1;p>=0;p--){let f=g[p];d[c--]=f}else d[c--]=g;d[c--]=h}e.list=d}positionLockedCols(e){e.list=ga(e.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(){return this.colDefCols?this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[]):void 0}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some(e=>e.getColDef().colSpan!=null)}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1);let{visibleCols:i,eventSvc:s}=this.beans;i.refresh(t),s.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){let e=this.beans.pivotColsSvc?.columns;return this.pivotMode&&!!e?.length}recreateColumnDefs(e){if(!this.cols)return;this.beans.autoColSvc?.updateColumns(e);let t=Et(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){Ki(this.beans,this.colDefCols?.tree),super.destroy()}getColTree(){return this.cols?.tree??[]}getColDefColTree(){return this.colDefCols?.tree??[]}getColDefCols(){return this.colDefCols?.list??null}getCols(){return this.cols?.list??[]}forAllCols(e){let{pivotResultCols:t,autoColSvc:i,selectionColSvc:s}=this.beans;yi(this.colDefCols?.list,e),yi(i?.columns?.list,e),yi(s?.columns?.list,e),yi(t?.getPivotResultCols()?.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){return this.cols?.map[e]??null}getColFromCollection(e,t){if(t==null)return null;let{map:i,list:s}=t;if(typeof e=="string"&&i[e])return i[e];for(let o=0;o<s.length;o++)if(ca(s[o],e))return s[o];return this.beans.autoColSvc?.getColumn(e)??this.beans.selectionColSvc?.getColumn(e)??null}};var wa=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){let t=this.existingIds[e],i;return typeof t!="number"?i=0:i=t+1,this.existingIds[e]=i,i}};function Ci(e,t,i){return i&&e.addDestroyFunc(()=>t.destroyBean(i)),i??e}var Sa=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){if(!e)return;if(e.indexOf(" ")>=0){let s=(e||"").split(" ");if(s.length>1){s.forEach(o=>this.toggleCss(o,t));return}}this.cssClassStates[e]!==t&&e.length&&(this.getGui()?.classList.toggle(e,t),this.cssClassStates[e]=t)}},kc=0,E=null,V=class extends y{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=kc++,this.cssManager=new Sa(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(i=>[i.selector,i])),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui());let e="component-"+Object.getPrototypeOf(this)?.constructor?.name;this.css?.forEach(t=>this.beans.environment.addGlobalCSS(t,e))}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(Hr):null}applyElementsToComponent(e,t,i,s=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){let o=this[t];if(o===E)this[t]=s??e;else{let n=i&&i[t];if(!this.suppressDataRefValidation&&!n)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${o}`)}}}createChildComponentsFromTags(e,t){let i=[];for(let s of e.childNodes??[])i.push(s);i.forEach(s=>{if(!(s instanceof HTMLElement))return;let o=this.createComponentFromElement(s,n=>{let r=n.getGui();if(r)for(let a of s.attributes??[])r.setAttribute(a.name,a.value)},t);if(o){if(o.addItems&&s.children.length){this.createChildComponentsFromTags(s,t);let n=Array.prototype.slice.call(s.children);o.addItems(n)}this.swapComponentForNode(o,e,s)}else s.childNodes&&this.createChildComponentsFromTags(s,t)})}createComponentFromElement(e,t,i){let s=e.nodeName,o=this.getDataRefAttribute(e),n=s.indexOf("AG-")===0,r=n?this.componentSelectors.get(s):null,a=null;if(r){let l=i&&o?i[o]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(n)throw new Error(`selector: ${s}`);return this.applyElementsToComponent(e,o,i,a),a}swapComponentForNode(e,t,i){let s=e.getGui();t.replaceChild(s,i),t.insertBefore(document.createComment(i.nodeName),s),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){let t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach(i=>i.setAttribute("tabindex",t.toString()))}setTemplate(e,t,i){let s;typeof e=="string"||e==null?s=Mo(e):s=W(e),this.setTemplateFromElement(s,t,i)}setTemplateFromElement(e,t,i,s=!1){if(this.eGui=e,this.suppressDataRefValidation=s,t)for(let o=0;o<t.length;o++){let n=t[o];this.componentSelectors.set(n.selector,n)}this.wireTemplate(e,i)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let i=t;return e==null?null:(i||(i=this.eGui),Ao(e)?{element:e,parent:i}:{element:e.getGui(),parent:i})}prependChild(e,t){let{element:i,parent:s}=this.getContainerAndElement(e,t)||{};!i||!s||s.insertAdjacentElement("afterbegin",i)}appendChild(e,t){let{element:i,parent:s}=this.getContainerAndElement(e,t)||{};!i||!s||s.appendChild(i)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;let{skipAriaHidden:i}=t;Fd(this.eGui,e,{skipAriaHidden:i})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;let{skipAriaHidden:i}=t;U(this.eGui,e,{skipAriaHidden:i});let s={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(s)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,i){this.eGui.addEventListener(e,t,i),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}};var ie=class Yt{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(i=>this.onDone(i),i=>this.onReject(i))}static all(t){return t.length?new Yt(i=>{let s=t.length,o=new Array(s);t.forEach((n,r)=>{n.then(a=>{o[r]=a,s--,s===0&&i(o)})})}):Yt.resolve()}static resolve(t=null){return new Yt(i=>i(t))}then(t){return new Yt(i=>{this.status===1?i(t(this.resolution)):this.waiters.push(s=>i(t(s)))})}onDone(t){this.status=1,this.resolution=t,this.waiters.forEach(i=>i(t))}onReject(t){}};function Ic(e){return e?e.prototype&&"getGui"in e.prototype:!1}function ba(e,t,i,s){let{name:o}=i,n,r,a,l,d,c;if(t){let u=t,h=u[o+"Selector"],g=h?h(s):null,p=f=>{typeof f=="string"?n=f:f!=null&&f!==!0&&(e.isFrameworkComponent(f)?a=f:r=f)};g?(p(g.component),l=g.params,d=g.popup,c=g.popupPosition):p(u[o])}return{compName:n,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:d,popupPositionFromSelector:c}}var Lc=class extends y{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,i,s=!1){return this.getCompDetails(this.gridOptions,e,t,i,s)}getCompDetails(e,t,i,s,o=!1){let{name:n,cellRenderer:r}=t,{compName:a,jsComp:l,fwComp:d,paramsFromSelector:c,popupFromSelector:u,popupPositionFromSelector:h}=ba(this.beans.frameworkOverrides,e,t,s),g,p=v=>{let w=this.registry.getUserComponent(n,v);w&&(l=w.componentFromFramework?void 0:w.component,d=w.componentFromFramework?w.component:void 0,g=w.params)};if(a!=null&&p(a),l==null&&d==null&&i!=null&&p(i),l&&r&&!Ic(l)&&(l=this.agCompUtils?.adaptFunction(t,l)),!l&&!d){let{validation:v}=this.beans;o&&(a!==i||!i)?a?v?.isProvidedUserComp(a)||z(50,{compName:a}):i?v||z(260,O(R({},this.gos.getModuleErrorParams()),{propName:n,compName:i})):z(216,{name:n}):i&&!v&&z(146,{comp:i});return}let f=this.mergeParams(e,t,s,c,g),m=l==null,C=l??d;return{componentFromFramework:m,componentClass:C,params:f,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(C,m,f,t)}}newAgStackInstance(e,t,i,s){let o=!t,n;o?n=new e:n=this.frameworkCompWrapper.wrap(e,s.mandatoryMethods,s.optionalMethods,s),this.createBean(n);let r=n.init?.(i);return r==null?ie.resolve(n):r.then(()=>n)}mergeParams(e,t,i,s=null,o){let n=R(R({},i),o),r=e,a=r&&r[t.name+"Params"];if(typeof a=="function"){let l=a(i);oe(n,l)}else typeof a=="object"&&oe(n,a);return oe(n,s),n}},Oc={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},Hc={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},Gc={name:"headerComponent",optionalMethods:["refresh"]},Bc={name:"innerHeaderComponent"},Vc={name:"innerHeaderGroupComponent"},Nc={name:"headerGroupComponent"};var zc={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0};var Wc={name:"loadingCellRenderer",cellRenderer:!0},_c={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},Uc={name:"loadingOverlayComponent",optionalMethods:["refresh"]},$c={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},Kc={name:"tooltipComponent"},Ho={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},jc={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},qc={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Yc={name:"loadingCellRenderer",cellRenderer:!0},Qc={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},Zc={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function Xc(e,t){return e.getCompDetailsFromGridOptions(Hc,"agDragAndDropImage",t,!0)}function Jc(e,t,i){return e.getCompDetails(t,Gc,"agColumnHeader",i)}function eu(e,t,i){return e.getCompDetails(t,Bc,void 0,i)}function tu(e,t){let i=t.columnGroup.getColGroupDef();return e.getCompDetails(i,Nc,"agColumnGroupHeader",t)}function iu(e,t,i){return e.getCompDetails(t,Vc,void 0,i)}function su(e,t){return e.getCompDetailsFromGridOptions(qc,void 0,t,!0)}function ou(e,t){return e.getCompDetailsFromGridOptions(Yc,"agLoadingCellRenderer",t,!0)}function nu(e,t){return e.getCompDetailsFromGridOptions(Qc,"agGroupRowRenderer",t,!0)}function ru(e,t){return e.getCompDetailsFromGridOptions(Zc,"agDetailCellRenderer",t,!0)}function An(e,t,i){return e.getCompDetails(t,zc,void 0,i)}function au(e,t,i){return e.getCompDetails(t,Wc,"agSkeletonCellRenderer",i,!0)}function kn(e,t,i){return e.getCompDetails(t,_c,"agCellEditor",i,!0)}function lu(e,t,i,s){return e.getCompDetails(t,Ho,s,i,!0)}function du(e,t,i){return e.getCompDetails(t,Oc,"agDateInput",i,!0)}function cu(e,t){return e.getCompDetailsFromGridOptions(Uc,"agLoadingOverlay",t,!0)}function uu(e,t){return e.getCompDetailsFromGridOptions($c,"agNoRowsOverlay",t,!0)}function hu(e,t){return e.getCompDetails(t.colDef,Kc,"agTooltipComponent",t,!0)}function gu(e,t,i,s){return e.getCompDetails(t,jc,s,i)}function pu(e,t){return ba(e,t,Ho)}function fu(e,t,i){return e.mergeParams(t,Ho,i)}function ui(e){let t=e;return t!=null&&t.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var ya=new Set,Yi={},Pt={},Li,Ra=!1,xa=!1,mu=!1;function Cu(e){let[t,i]=e.version.split(".")||[],[s,o]=Li.split(".")||[];return t===s&&i===o}function vu(e){Li||(Li=e.version);let t=i=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${i} Please update all modules to the same version.`;if(e.version?Cu(e)||yt(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Li}.`)):yt(t(`'${e.moduleName}' is incompatible.`)),e.validate){let i=e.validate();i.isValid||yt(`${i.message}`)}}function hi(e,t,i=!1){i||(Ra=!0),vu(e);let s=e.rowModels??["all"];ya.add(e);let o;t!==void 0?(xa=!0,Pt[t]===void 0&&(Pt[t]={}),o=Pt[t]):o=Yi,s.forEach(n=>{o[n]===void 0&&(o[n]={}),o[n][e.moduleName]=e}),e.dependsOn&&e.dependsOn.forEach(n=>hi(n,t,i))}function wu(e){delete Pt[e]}function uo(e,t,i){let s=o=>!!Yi[o]?.[e]||!!Pt[t]?.[o]?.[e];return s(i)||s("all")}function Go(){return xa}function Su(e,t){let i=Pt[e]??{};return[...Object.values(Yi.all??{}),...Object.values(i.all??{}),...Object.values(Yi[t]??{}),...Object.values(i[t]??{})]}function bu(){return new Set(ya)}function yu(){return Ra}function Ru(){return mu}var A1=class{static register(e){hi(e,void 0)}static registerModules(e){e.forEach(t=>hi(t,void 0))}},xu=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,!(!e||!e.beanClasses)&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){for(let t of Object.keys(e.providedBeanInstances))this.beans[t]=e.providedBeanInstances[t];e.beanClasses.forEach(t=>{let i=new t;i.beanName?this.beans[i.beanName]=i:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(i)}),e.derivedBeans?.forEach(t=>{let{beanName:i,bean:s}=t(this);this.beans[i]=s,this.createdBeans.push(s)}),e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){if(!e)throw Error("null bean");return this.initBeans([e],t),e}initBeans(e,t){e.forEach(i=>{i.preWireBeans?.(this.beans),i.wireBeans?.(this.beans)}),e.forEach(i=>i.preConstruct?.()),t&&e.forEach(t),e.forEach(i=>i.postConstruct?.())}getBeans(){return this.beans}getBean(e){return this.beans[e]}destroy(){if(this.destroyed)return;this.destroyed=!0;let e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[]}destroyBean(e){e?.destroy?.()}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}},Fu=class extends xu{init(e){this.gridId=e.gridId,this.beans.context=this,this.destroyCallback=e.destroyCallback,super.init(e)}destroy(){super.destroy(),wu(this.gridId),this.destroyCallback?.()}getGridId(){return this.gridId}},Eu="ag-column-first",Pu="ag-column-last";function Fa(e,t,i,s){return _(e)?[]:Mu(e.headerClass,e,t,i,s)}function Ea(e,t,i){e.toggleCss(Eu,i.isColAtEdge(t,"first")),e.toggleCss(Pu,i.isColAtEdge(t,"last"))}function Du(e,t,i,s){return I(t,{colDef:e,column:i,columnGroup:s})}function Mu(e,t,i,s,o){if(_(e))return[];let n;if(typeof e=="function"){let r=Du(t,i,s,o);n=e(r)}else n=e;return typeof n=="string"?[n]:Array.isArray(n)?[...n]:[]}function vi(e){return!!(e.rowPinned&&e.pinnedSibling)}function ue(e,t,i,s){let o=t==="top";if(!i)return ue(e,t,o?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),s);if(!s){let l=o?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return ue(e,t,i,o?e.getPinnedTopRow(l-1):e.getPinnedBottomRow(l-1))}let n=!1,r=!1,a=[];return e.forEachPinnedRow(t,l=>{if(l===i&&!n){n=!0,a.push(l);return}if(n&&l===s){r=!0,a.push(l);return}n&&!r&&a.push(l)}),a}var b={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",SPACE:" ",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete",F2:"F2",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",PAGE_HOME:"Home",PAGE_END:"End",A:"KeyA",C:"KeyC",D:"KeyD",V:"KeyV",X:"KeyX",Y:"KeyY",Z:"KeyZ"},ho=!1,Qi=0;function Tu(e){Qi>0||(e.addEventListener("keydown",Zi),e.addEventListener("mousedown",Zi))}function Au(e){Qi>0||(e.removeEventListener("keydown",Zi),e.removeEventListener("mousedown",Zi))}function Zi(e){let t=ho,i=e.type==="keydown";i&&(e.ctrlKey||e.metaKey||e.altKey)||t!==i&&(ho=i)}function ku(e){let t=q(e);return Tu(t),Qi++,()=>{Qi--,Au(t)}}function Iu(){return ho}function Lu(e,t,i){t.addManagedElementListeners(i,{keydown:s=>{if(!s.defaultPrevented&&s.key===b.TAB){let o=s.shiftKey;pt(e,i,!1,o)||It(e,o)&&s.preventDefault()}}})}function Dt(e,t,i=!1){let s=xd,o=Tr;t&&(o+=", "+t),i&&(o+=', [tabindex="-1"]');let n=Array.prototype.slice.apply(e.querySelectorAll(s)).filter(l=>ye(l)),r=Array.prototype.slice.apply(e.querySelectorAll(o));return r.length?((l,d)=>l.filter(c=>d.indexOf(c)===-1))(n,r):n}function dt(e,t=!1,i=!1,s=!1){let o=Dt(e,s?".ag-tab-guard":null,i),n=t?N(o):o[0];return n?(n.focus({preventScroll:!0}),!0):!1}function pt(e,t,i,s){let o=Dt(t,i?':not([tabindex="-1"])':null),n=$(e),r;i?r=o.findIndex(l=>l.contains(n)):r=o.indexOf(n);let a=r+(s?-1:1);return a<0||a>=o.length?null:o[a]}function Pa(e,t=5){let i=0;for(;e&&io(e)===null&&++i<=t;)e=e.parentElement;return io(e)===null?null:e}function Ou(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function ot(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.isExclusive()}function ds(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.isExclusive()}function It(e,t,i=!1){let s=e.ctrlsSvc.get("gridCtrl");return!i&&s.focusNextInnerContainer(t)?!0:((i||!t&&!s.isDetailGrid())&&s.forceFocusOutOfContainer(t),!1)}function Hu(e,t=!1){return e===b.DELETE?!0:!t&&e===b.BACKSPACE?Pr():!1}var Gu=class extends y{constructor(e,t,i,s){super(),this.cellCtrl=e,this.rowNode=i,this.rowCtrl=s,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){let t=e.key;switch(t){case b.ENTER:this.onEnterKeyDown(e);break;case b.F2:this.onF2KeyDown(e);break;case b.ESCAPE:this.onEscapeKeyDown(e);break;case b.TAB:this.onTabKeyDown(e);break;case b.BACKSPACE:case b.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case b.DOWN:case b.UP:case b.RIGHT:case b.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){if(!this.cellCtrl.editing){if(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{let i=this.cellCtrl.getFocusedCellPosition();this.beans.navigation?.navigateToNextCell(e,t,i,!0)}e.preventDefault()}}onShiftRangeSelect(e){let{rangeSvc:t,navigation:i}=this.beans;if(!t)return;let s=t.extendLatestRangeInDirection(e);s&&i?.ensureCellVisible(s)}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){let{cellCtrl:i,beans:s,rowNode:o}=this,{gos:n,rangeSvc:r,eventSvc:a}=s;if(!i.editing){if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),Hu(e,n.get("enableCellEditingOnBackspace"))){if(r&&Oe(n))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(i.isCellEditable()){let{column:l}=i,d=this.beans.valueSvc.getDeleteValue(l,o);o.setDataValue(l,d,"cellClear")}}else s.editSvc?.startRowOrCellEdit(i,e,t);a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}}onEnterKeyDown(e){let{cellCtrl:t,beans:i}=this;if(t.editing||this.rowCtrl.editing)this.beans.editSvc?.stopRowOrCellEdit(t,!1,!1,e.shiftKey);else if(i.gos.get("enterNavigatesVertically")){let s=e.shiftKey?b.UP:b.DOWN;i.navigation?.navigateToNextCell(null,s,t.cellPosition,!1)}else i.editSvc?.startRowOrCellEdit(t,b.ENTER,e),t.editing&&e.preventDefault()}onF2KeyDown(e){let{cellCtrl:t,beans:i}=this;t.editing||i.editSvc?.startRowOrCellEdit(t,b.F2,e)}onEscapeKeyDown(e){let{cellCtrl:t,beans:i}=this;t.editing&&i.editSvc?.stopRowOrCellEdit(t,!0)}processCharacter(e){if(e.target!==this.eGui||this.cellCtrl.editing)return;let s=e.key;s===b.SPACE?this.onSpaceKeyDown(e):this.beans.editSvc?.startRowOrCellEdit(this.cellCtrl,s,e)&&e.preventDefault()}onSpaceKeyDown(e){let{gos:t}=this.beans;!this.cellCtrl.editing&&tt(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,this.rowNode,"spaceKey"),e.preventDefault()}destroy(){super.destroy()}},Bu=class extends y{constructor(e,t,i){super(),this.cellCtrl=e,this.column=i,this.beans=t}onMouseEvent(e,t){if(!Ie(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){if(this.beans.touchSvc?.handleCellDoubleClick(this,e))return;let{eventSvc:t,rangeSvc:i,gos:s,editSvc:o}=this.beans,n=e.ctrlKey||e.metaKey;i&&n&&i.getCellRangeCount(this.cellCtrl.cellPosition)>1&&i.intersectLastRange(!0);let r=this.cellCtrl.createEvent(e,"cellClicked");t.dispatchEvent(r);let a=this.column.getColDef();a.onCellClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{a.onCellClicked(r)})},0),(s.get("singleClickEdit")||a.singleClickEdit)&&!s.get("suppressClickEdit")&&!(e.shiftKey&&i?.getCellRanges().length!=0)&&o?.startRowOrCellEdit(this.cellCtrl,void 0,e)}onCellDoubleClicked(e){let{column:t,beans:i,cellCtrl:s}=this,{eventSvc:o,frameworkOverrides:n,gos:r,editSvc:a}=i,l=t.getColDef(),d=s.createEvent(e,"cellDoubleClicked");o.dispatchEvent(d),typeof l.onCellDoubleClicked=="function"&&window.setTimeout(()=>{n.wrapOutgoing(()=>{l.onCellDoubleClicked(d)})},0),!r.get("singleClickEdit")&&!r.get("suppressClickEdit")&&a?.startRowOrCellEdit(s,null,e)}onMouseDown(e){let{ctrlKey:t,metaKey:i,shiftKey:s}=e,o=e.target,{cellCtrl:n,beans:r}=this,{eventSvc:a,rangeSvc:l,rowNumbersSvc:d,focusSvc:c,gos:u}=r;if(this.isRightClickInExistingRange(e))return;let h=l&&!l.isEmpty(),g=this.containsWidget(o),{cellPosition:p}=n,f=st(p.column);if(d&&f&&!d.handleMouseDownOnCell(p,e)){l&&e.preventDefault(),e.stopImmediatePropagation();return}if(!s||!h){let C=u.get("enableCellTextSelection")&&e.defaultPrevented,v=(ut()||C)&&!n.editing&&!Po(o)&&!g;n.focusCell(v)}if(s&&h&&!c.isCellFocused(p)){e.preventDefault();let m=c.getFocusedCell();if(m){let{column:C,rowIndex:v,rowPinned:w}=m,A=r.rowRenderer.getRowByPosition({rowIndex:v,rowPinned:w})?.getCellCtrl(C);A?.editing&&A.stopEditing(),c.setFocusedCell({column:C,rowIndex:v,rowPinned:w,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!g){if(l)if(f&&e.preventDefault(),s)l.extendLatestRangeToCell(p);else{let m=t||i;l.setRangeToCell(p,m)}a.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseDown"))}}isRightClickInExistingRange(e){let{rangeSvc:t}=this.beans;if(t){let i=t.isCellInAnyRange(this.cellCtrl.cellPosition),s=e.button===2||e.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(i&&s)return!0}return!1}containsWidget(e){return et(e,"ag-selection-checkbox",3)||et(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;let{eventSvc:t,colHover:i}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),i?.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;let{eventSvc:t,colHover:i}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),i?.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;let t=this.cellCtrl.eGui,i=t.contains(e.target),s=t.contains(e.relatedTarget);return i&&s}destroy(){super.destroy()}},Vu=class extends y{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.column,this.rowNode=e.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}init(){this.eSetLeft=this.cellCtrl.getRootElement(),this.eContent=this.cellCtrl.eGui;let e=this.cellCtrl.getCellSpan();if(e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e){let t=this.refreshSpanHeight.bind(this,e);t(),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:t,recalculateRowBounds:t,pinnedHeightChanged:t})}}refreshSpanHeight(e){let t=e.getCellHeight();t!=null&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){let e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){let e=this.getColSpanningList();gt(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eContent)return;let e=this.getCellWidth();this.eContent.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){let{column:e,rowNode:t}=this,i=e.getColSpan(t),s=[];if(i===1)s.push(e);else{let o=e,n=e.getPinned();for(let r=0;o&&r<i&&(s.push(o),o=this.beans.visibleCols.getColAfter(o),!(!o||_(o)||n!==o.getPinned()));r++);}return s}onLeftChanged(){if(!this.eSetLeft)return;let e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eSetLeft.style.left=e+"px"}getCellLeft(){let e;return this.beans.gos.get("enableRtl")&&this.colsSpanning?e=N(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||this.column.getPinned()==="left")return e;let{visibleCols:t}=this.beans,i=t.getColsLeftWidth();if(this.column.getPinned()==="right"){let s=t.bodyWidth;return i+s+(e||0)}return i+(e||0)}_legacyApplyRowSpan(e){if(this.rowSpan===1&&!e)return;let i=it(this.beans)*this.rowSpan;this.eContent.style.height=`${i}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},Nu="ag-cell",zu="ag-cell-auto-height",Wu="ag-cell-normal-height",_u="ag-cell-focus",Uu="ag-cell-first-right-pinned",$u="ag-cell-last-left-pinned",Ku="ag-cell-not-inline-editing",ju="ag-cell-wrap-text",Xi="cellCtrl";function Da(e,t){return sa(e,t,Xi)}var qu=0,Jt=class extends y{constructor(e,t,i,s){super(),this.column=e,this.rowNode=t,this.rowCtrl=s,this.rangeFeature=void 0,this.rowResizeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.tooltipFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.beans=i;let{colId:o}=e;this.instanceId=o+"-"+qu++,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){let{beans:e}=this;this.positionFeature=new Vu(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this,e),this.mouseListener=new Bu(this,e,this.column),this.keyboardListener=new Gu(this,e,this.rowNode,this.rowCtrl),this.column.isTooltipEnabled()&&this.enableTooltipFeature();let{rangeSvc:t}=e;t&&Oe(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(e,this)),st(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(e,this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){let e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.rowResizeFeature=e.destroyBean(this.rowResizeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}setComp(e,t,i,s,o,n,r){this.comp=e,this.eGui=t,this.printLayout=o,r??(r=this),this.addDomData(r),this.addFeatures(),r.addDestroyFunc(()=>this.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(s,r),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),this.rowResizeFeature?.refreshRowResizer(),n&&this.isCellEditable()?this.beans.editSvc?.startEditing(this):this.showValue(!1,!0),this.onCompAttachedFuncs.length&&(this.onCompAttachedFuncs.forEach(a=>a()),this.onCompAttachedFuncs=[])}setupAutoHeight(e,t){this.isAutoHeight=this.beans.rowAutoHeight?.setupCellAutoHeight(this,e,t)??!1}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){let e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}showValue(e,t){let{beans:i,column:s,rowNode:o,rangeFeature:n}=this,{userCompFactory:r}=i,a=this.getValueToDisplay(),l,d=o.stub&&o.groupData?.[s.getId()]==null,c=s.getColDef();if(d||this.isCellRenderer()){let u=this.createCellRendererParams();!d||st(s)?l=An(r,c,u):l=au(r,c,u)}if(!l&&!d&&i.findSvc?.isMatch(o,s)){let u=this.createCellRendererParams();l=An(r,O(R({},s.getColDef()),{cellRenderer:"agFindCellRenderer"}),u)}this.comp.setRenderDetails(l,a,e),!t&&n&&Ve(i,()=>n?.refreshHandle()),this.rowResizeFeature?.refreshRowResizer()}setupControlComps(){let e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e),!0),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}isIncludeControl(e,t=!1){return(this.rowNode.rowPinned==null||t&&vi(this.rowNode))&&!!e}isCheckboxSelection(e){let{rowSelection:t,groupDisplayType:i}=this.beans.gridOptions,s=_i(t),o=Gt(this.column);return i==="custom"&&s!=="selectionColumn"&&o?!1:e.checkboxSelection||o&&typeof t=="object"&&Ft(t)}refreshShouldDestroy(){let e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),i=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),s=this.includeDndSource!=this.isIncludeControl(e.dndSource),o=this.isAutoHeight!=this.column.isAutoHeight();return t||i||s||o}onPopupEditorClosed(){this.editing&&this.beans.editSvc?.stopRowOrCellEdit(this)}stopEditing(e=!1){return this.beans.editSvc?.stopEditing(this,e)??!1}createCellRendererParams(){let{value:e,valueFormatted:t,column:i,rowNode:s,comp:o,eGui:n,beans:{valueSvc:r,gos:a}}=this;return I(a,{value:e,valueFormatted:t,getValue:()=>r.getValueForDisplay(i,s).value,setValue:d=>r.setValue(s,i,d),formatValue:this.formatValue.bind(this),data:s.data,node:s,pinned:i.getPinned(),colDef:i.getColDef(),column:i,refreshCell:this.refreshCell.bind(this),eGridCell:n,eParentOfValue:o.getParentOfValue(),registerRowDragger:(d,c,u,h)=>this.registerRowDragger(d,c,h),setTooltip:(d,c)=>{a.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(d,c),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e)}refreshCell(e){if(this.suppressRefreshCell||this.editing)return;let t=this.column.getColDef(),i=e!=null&&!!e.newData,s=e!=null&&!!e.suppressFlash,o=t.field==null&&t.valueGetter==null&&t.showRowGroup==null,n=e&&e.forceRefresh||o||i,r=!!this.comp,a=this.updateAndFormatValue(r),l=n||a;if(r){if(l){this.showValue(i,!1);let d=this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering();!s&&!d&&t.enableCellChangeFlash&&this.beans.cellFlashSvc?.flashCell(this),this.customStyleFeature?.applyUserStyles(),this.customStyleFeature?.applyClassesFromColDef()}this.tooltipFeature?.refreshTooltip(),this.customStyleFeature?.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){let t=this.value,i=this.valueFormatted,{value:s,valueFormatted:o}=this.beans.valueSvc.getValueForDisplay(this.column,this.rowNode,!0);return this.value=s,this.valueFormatted=o,e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=i:!0}valuesAreEqual(e,t){let i=this.column.getColDef();return i.equals?i.equals(e,t):e===t}addDomData(e){let t=this.eGui;at(this.beans.gos,t,Xi,this),e.addDestroyFunc(()=>at(this.beans.gos,t,Xi,null))}createEvent(e,t){let{rowNode:i,column:s,value:o,beans:n}=this;return I(n.gos,{type:t,node:i,data:i.data,value:o,column:s,colDef:s.getColDef(),rowPinned:i.rowPinned,event:e,rowIndex:i.rowIndex})}processCharacter(e){this.keyboardListener?.processCharacter(e)}onKeyDown(e){this.keyboardListener?.onKeyDown(e)}onMouseEvent(e,t){this.mouseListener?.onMouseEvent(e,t)}getColSpanningList(){return this.positionFeature.getColSpanningList()}onLeftChanged(){this.comp&&this.positionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){let{comp:e,column:t,beans:i}=this;Ea(e,t,i.visibleCols)}refreshAriaColIndex(){let e=this.beans.visibleCols.getAriaColIndex(this.column);Fr(this.eGui,e)}onWidthChanged(){return this.positionFeature?.onWidthChanged()}getRowPosition(){let{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){this.comp&&this.rangeFeature?.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.comp&&this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1){this.beans.focusSvc.setFocusedCell(O(R({},this.getFocusedCellPosition()),{forceBrowserFocus:e}))}restoreFocus(e=!1){if(!this.comp||this.editing||!this.isCellFocused()||!this.beans.focusSvc.shouldTakeFocus())return;let t=()=>{if(!this.isAlive())return;let i=this.comp.getFocusableElement();this.isCellFocused()&&i.focus({preventScroll:!0})};if(e){setTimeout(t,0);return}t()}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged(),this.rowResizeFeature?.refreshRowResizer()}onSuppressCellFocusChanged(e){let t=this.eGui;t&&(st(this.column)&&(e=!0),pe(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;let e=this.column.isFirstRightPinned();this.comp.toggleCss(Uu,e)}onLastLeftPinnedChanged(){if(!this.comp)return;let e=this.column.isLastLeftPinned();this.comp.toggleCss($u,e)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){let e=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=e),e}setupFocus(){this.restoreFocus(!0),this.onCellFocused(this.focusEventWhileNotReady??void 0)}onCellFocused(e){let{beans:t}=this;if(ds(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}let i=this.isCellFocused();if(this.comp.toggleCss(_u,i),i&&e&&e.forceBrowserFocus){let o=this.comp.getFocusableElement();if(this.editing){let n=Dt(o,null,!0);n.length&&(o=n[0])}o.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}let s=t.gos.get("editType")==="fullRow";!i&&!s&&this.editing&&t.editSvc?.stopRowOrCellEdit(this),i&&this.rowCtrl.announceDescription()}createCellPosition(){let{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:ke(t),column:this.column}}setInlineEditingCss(){this.beans.editSvc?.setInlineEditingCss(this.rowCtrl)}applyStaticCssClasses(){let{comp:e}=this;e.toggleCss(Nu,!0),e.toggleCss(Ku,!0);let t=this.column.isAutoHeight()==!0;e.toggleCss(zu,t),e.toggleCss(Wu,!t)}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editing?this.beans.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0}))}setWrapText(){let e=this.column.getColDef().wrapText==!0;this.comp.toggleCss(ju,e)}dispatchCellContextMenuEvent(e){let t=this.column.getColDef(),i=this.createEvent(e,"cellContextMenu"),{beans:s}=this;s.eventSvc.dispatchEvent(i),t.onCellContextMenu&&window.setTimeout(()=>{s.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(i)})},0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){return this.eGui?.contains($(this.beans))??!1}createSelectionCheckbox(){let e=this.beans.selectionSvc?.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){let e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,i){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}let s=this.createRowDragComp(e,t,i);s&&(this.customRowDragComp=s,this.addDestroyFunc(()=>{this.beans.context.destroyBean(s),this.customRowDragComp=null}))}createRowDragComp(e,t,i){let s=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,i);if(s)return this.beans.context.createBean(s),s}cellEditorAttached(){this.onEditorAttachedFuncs.forEach(e=>e()),this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){}getRootElement(){return this.eGui}},Ma="__ag_grid_instance";function Ta(e,t){t[Ma]=e.gridInstanceId}function gi(e,t){return Aa(e,t.target)}function Aa(e,t){let i=t;for(;i;){let s=i[Ma];if(P(s))return s===e.gridInstanceId;i=i.parentElement}return!1}function Yu(e,t){return Da(e,t.target)?.getFocusedCellPosition()??null}function In(e,t){let i=Z(e.gos,"normal"),s=t,o,n;s.clientX!=null||s.clientY!=null?(o=s.clientX,n=s.clientY):(o=s.x,n=s.y);let{pageFirstPixel:r}=e.pageBounds.getCurrentPagePixelRange();if(n+=r,i){let a=e.ctrlsSvc.getScrollFeature(),l=a.getVScrollPosition(),d=a.getHScrollPosition();o+=d.left,n+=l.top}return{x:o,y:n}}var Qu=class extends y{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dropTargets=[]}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.dragSvc=e.dragSvc,this.environment=e.environment,this.userCompFactory=e.userCompFactory}addDragSource(e,t=!1){let i={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:i,dragSource:e}),this.dragSvc.addDragSource(i)}getDragAndDropImageComponent(){let{dragAndDropImageComp:e}=this;return!e||!e.comp?null:e.comp}removeDragSource(e){let{dragSourceAndParamsList:t,dragSvc:i}=this,s=t.find(o=>o.dragSource===e);s&&(i.removeDragSource(s.params),me(t,s))}destroy(){let{dragSourceAndParamsList:e,dragSvc:t,dropTargets:i}=this;e.forEach(s=>t.removeDragSource(s.params)),e.length=0,i.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=e.getDragItem(),e.onDragStarted?.(),this.createDragAndDropImageComponent()}onDragStop(e){this.dragSource?.onDragStopped?.();let{lastDropTarget:t}=this;if(t?.onDragStop){let i=this.createDropTargetEvent(t,e,null,null,!1);t.onDragStop(i)}this.clearDragAndDropProperties()}onDragCancel(){let{dragSource:e,lastDropTarget:t}=this;e?.onDragCancelled?.(),t?.onDragCancel&&t.onDragCancel(this.createDropTargetEvent(t,this.eventLastTime,null,null,!1)),this.clearDragAndDropProperties()}clearDragAndDropProperties(){this.eventLastTime=null,this.dragging=!1,this.lastDropTarget=void 0,this.dragItem=null,this.dragSource=null,this.removeDragAndDropImageComponent()}onDragging(e,t=!1){let i=this.getHorizontalDirection(e),s=this.getVerticalDirection(e);this.eventLastTime=e,this.positionDragAndDropImageComp(e);let o=this.dropTargets.filter(c=>this.isMouseOnDropTarget(e,c)),n=this.findCurrentDropTarget(e,o),{lastDropTarget:r,dragSource:a,dragAndDropImageComp:l,dragItem:d}=this;if(n!==r){if(this.leaveLastTargetIfExists(e,i,s,t),r!==null&&n===null&&a?.onGridExit?.(d),r===null&&n!==null&&a?.onGridEnter?.(d),this.enterDragTargetIfExists(n,e,i,s,t),n&&l){let{comp:c,promise:u}=l;c?c.setIcon(n.getIconName?n.getIconName():null,!1):u.then(h=>{h&&h.setIcon(n.getIconName?n.getIconName():null,!1)})}this.lastDropTarget=n}else if(n&&n.onDragging){let c=this.createDropTargetEvent(n,e,i,s,t);n.onDragging(c)}}getAllContainersFromDropTarget(e){let t=e.getSecondaryContainers?e.getSecondaryContainers():null,i=[[e.getContainer()]];return t?i.concat(t):i}isMouseOnDropTarget(e,t){let i=this.getAllContainersFromDropTarget(t),s=!1,o=(a,l)=>{for(let d of l){let{width:c,height:u,left:h,right:g,top:p,bottom:f}=d.getBoundingClientRect();if(c===0||u===0)return!1;let m=a.clientX>=h&&a.clientX<g,C=a.clientY>=p&&a.clientY<f;if(!m||!C)return!1}return!0};for(let a of i)if(o(e,a)){s=!0;break}let{eElement:n,type:r}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(n)?!1:s&&t.isInterestedIn(r,n)}findCurrentDropTarget(e,t){let i=t.length;if(i===0)return null;if(i===1)return t[0];let o=li(this.beans).elementsFromPoint(e.clientX,e.clientY);for(let n of o)for(let r of t)if(this.getAllContainersFromDropTarget(r).flatMap(l=>l).indexOf(n)!==-1)return r;return null}enterDragTargetIfExists(e,t,i,s,o){if(e&&e.onDragEnter){let n=this.createDropTargetEvent(e,t,i,s,o);e.onDragEnter(n)}}leaveLastTargetIfExists(e,t,i,s){let{lastDropTarget:o}=this;if(!o)return;if(o.onDragLeave){let r=this.createDropTargetEvent(o,e,t,i,s);o.onDragLeave(r)}let n=this.getDragAndDropImageComponent();n&&n.setIcon(null,!1)}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.filter(i=>i.external).find(i=>i.getContainer()===e.getContainer())||null}isDropZoneWithinThisGrid(e){let i=this.ctrlsSvc.getGridBodyCtrl().eGridBody,{dropZoneTarget:s}=e;return i.contains(s)}getHorizontalDirection(e){let t=this.eventLastTime?.clientX,i=e.clientX;return t===i?null:t>i?"left":"right"}getVerticalDirection(e){let t=this.eventLastTime?.clientY,i=e.clientY;return t===i?null:t>i?"up":"down"}createDropTargetEvent(e,t,i,s,o){let n=e.getContainer(),r=n.getBoundingClientRect(),{dragItem:a,dragSource:l,gos:d}=this,c=t.clientX-r.left,u=t.clientY-r.top;return I(d,{event:t,x:c,y:u,vDirection:s,hDirection:i,dragSource:l,fromNudge:o,dragItem:a,dropZoneTarget:n})}positionDragAndDropImageComp(e){let t=this.getDragAndDropImageComponent();t&&$d(t.getGui(),e,this.beans)}removeDragAndDropImageComponent(){let{dragAndDropImageComp:e}=this;if(e){let{comp:t}=e;if(t){let i=t.getGui();this.dragAndDropImageParent?.removeChild(i),this.destroyBean(t)}}this.dragAndDropImageComp=null}createDragAndDropImageComponent(){let{dragSource:e,gos:t,userCompFactory:i}=this;if(!e)return;let s=Xc(i,I(t,{dragSource:e}));if(!s)return;let o=s.newAgStackInstance();this.dragAndDropImageComp={promise:o},o.then(n=>{!n||!this.isAlive()||(this.processDragAndDropImageComponent(n),this.dragAndDropImageComp.comp=n)})}processDragAndDropImageComponent(e){let{dragSource:t,environment:i}=this;if(!t)return;let s=e.getGui();s.style.setProperty("position","absolute"),s.style.setProperty("z-index","9999"),Ta(this.gos,s),i.applyThemeClasses(s),e.setIcon(null,!1);let{dragItemName:o}=t;typeof o=="function"&&(o=o()),e.setLabel(o||""),s.style.top="20px",s.style.left="20px";let n=Lo(this.beans);this.dragAndDropImageParent=n,n?n.appendChild(s):F(54)}registerGridDropTarget(e,t){let i={getContainer:e,isInterestedIn:s=>s===1||s===0,getIconName:()=>"notAllowed"};this.addDropTarget(i),t.addDestroyFunc(()=>this.removeDropTarget(i))}},Zu=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.indexOf("x")!==-1,this.scrollVertically=e.scrollAxis.indexOf("y")!==-1,this.scrollByTick=e.scrollByTick!=null?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}check(e,t=!1){let i=t||this.shouldSkipVerticalScroll();if(i&&this.shouldSkipHorizontalScroll())return;let s=this.scrollContainer.getBoundingClientRect(),o=this.scrollByTick;this.tickLeft=e.clientX<s.left+o,this.tickRight=e.clientX>s.right-o,this.tickUp=e.clientY<s.top+o&&!i,this.tickDown=e.clientY>s.bottom-o&&!i,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;let e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){let t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){let t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}};function Xu(e){let{rowIndex:t,rowPinned:i,column:s}=e;return`${t}.${i??"null"}.${s.getId()}`}function ka(e,t){let i=e.column===t.column,s=e.rowPinned===t.rowPinned,o=e.rowIndex===t.rowIndex;return i&&s&&o}function Ju(e,t){switch(e.rowPinned){case"top":if(t.rowPinned!=="top")return!0;break;case"bottom":if(t.rowPinned!=="bottom")return!1;break;default:if(P(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function eh(e,t){return!e&&!t?!0:e&&!t||!e&&t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}function th(e){let t=0,i,{pinnedRowModel:s,rowModel:o,pageBounds:n}=e;return s?.getPinnedTopRowCount()?i="top":o.getRowCount()?(i=null,t=n.getFirstRow()):s?.getPinnedBottomRowCount()&&(i="bottom"),i===void 0?null:{rowIndex:t,rowPinned:i}}function ih(e){let t,i=null,{pinnedRowModel:s,pageBounds:o}=e,n=s?.getPinnedBottomRowCount(),r=s?.getPinnedTopRowCount();return n?(i="bottom",t=n-1):e.rowModel.getRowCount()?(i=null,t=o.getLastRow()):r&&(i="top",t=r-1),t===void 0?null:{rowIndex:t,rowPinned:i}}function Ji(e,t){switch(t.rowPinned){case"top":return e.pinnedRowModel?.getPinnedTopRow(t.rowIndex);case"bottom":return e.pinnedRowModel?.getPinnedBottomRow(t.rowIndex);default:return e.rowModel.getRow(t.rowIndex)}}function wt(e,t){let i=e.spannedRowRenderer?.getCellByPosition(t);if(i)return i;let s=e.rowRenderer.getRowByPosition(t);return s?s.getCellCtrl(t.column):null}function es(e,t){let{rowIndex:i,rowPinned:s}=t,{pageBounds:o,pinnedRowModel:n,rowModel:r}=e;if(i===0)return s==="top"?null:s==="bottom"&&r.isRowsToRender()?{rowIndex:o.getLastRow(),rowPinned:null}:n?.isRowsToRender("top")?{rowIndex:n.getPinnedTopRowCount()-1,rowPinned:"top"}:null;let a=s?void 0:r.getRow(i);return Ia(e,a,!0)??{rowIndex:i-1,rowPinned:s}}function Ln(e,t){let{rowIndex:i,rowPinned:s}=t,{pageBounds:o,pinnedRowModel:n,rowModel:r}=e;if(sh(e,t))return s==="bottom"?null:s==="top"&&r.isRowsToRender()?{rowIndex:o.getFirstRow(),rowPinned:null}:n?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;let a=s?void 0:r.getRow(i);return Ia(e,a)??{rowIndex:i+1,rowPinned:s}}function Ia(e,t,i){let{gos:s,rowRenderer:o}=e;if(!t?.sticky||!jr(s))return;let n=i?o.getStickyTopRowCtrls():o.getStickyBottomRowCtrls(),r;for(let a=0;a<n.length;a++)if(n[a].rowNode.rowIndex===t.rowIndex){r=n[a+(i?-1:1)];break}return r?{rowIndex:r.rowNode.rowIndex,rowPinned:null}:void 0}function sh(e,t){let{rowPinned:i,rowIndex:s}=t,{pinnedRowModel:o,pageBounds:n}=e;return i==="top"?(o?.getPinnedTopRowCount()??0)-1<=s:i==="bottom"?(o?.getPinnedBottomRowCount()??0)-1<=s:n.getLastRow()<=s}var pi=class{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}depthFirstSearchChangedPath(e,t){let{rowNode:i,children:s}=e;if(s)for(let o=0;o<s.length;++o)this.depthFirstSearchChangedPath(s[o],t);t(i)}depthFirstSearchEverything(e,t,i){let s=e.childrenAfterGroup;if(s)for(let o=0,n=s.length;o<n;++o){let r=s[o];r.childrenAfterGroup?this.depthFirstSearchEverything(r,t,i):i&&t(r)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,i=!1){this.active&&!i?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,i=0;for(;!this.mapToItems[t.id];){let s={rowNode:t,children:null};this.mapToItems[t.id]=s,i++,t=t.parent}return i}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let i=e;for(;i;)this.nodeIdsToColumns[i.id]||(this.nodeIdsToColumns[i.id]={}),t.forEach(s=>this.nodeIdsToColumns[i.id][s.getId()]=!0),i=i.parent}linkPathItems(e,t){let i=e;for(let s=0;s<t;s++){let o=this.mapToItems[i.id],n=this.mapToItems[i.parent.id];n.children||(n.children=[]),n.children.push(o),i=i.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;let i=this.createPathItems(e);this.linkPathItems(e,i),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;let i=this.nodeIdsToColumns[e.id];return t.filter(o=>i[o.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;let i=this.nodeIdsToColumns[e.id];return t.filter(o=>!i[o.getId()])}},oh=class extends y{constructor(e){super(),this.eContainer=e}postConstruct(){let{rowModel:e,gos:t,ctrlsSvc:i}=this.beans;Y(t,e)&&(this.clientSideRowModel=e),i.whenReady(this,s=>{let o=s.gridBodyCtrl;this.autoScrollService=new Zu({scrollContainer:o.eBodyViewport,scrollAxis:"y",getVerticalPosition:()=>o.scrollFeature.getVScrollPosition().top,setVerticalPosition:n=>o.scrollFeature.setVerticalScrollPosition(n),onScrollCallback:()=>{this.onDragging(this.lastDraggingEvent)}})})}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(){return this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?"notAllowed":"move"}shouldPreventRowMove(){let{rowGroupColsSvc:e,filterManager:t,sortSvc:i}=this.beans;return!!((e?.columns??[]).length||t?.isAnyFilterPresent()||i?.isSortActive())}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];let t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){let s=[...this.beans.selectionSvc?.getSelectedNodes()??[]].sort((o,n)=>o.rowIndex==null||n.rowIndex==null?0:this.getRowIndexNumber(o)-this.getRowIndexNumber(n));if(s.indexOf(t)!==-1)return s}return[t]}onDragEnter(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent("rowDragEnter",e),this.getRowNodes(e).forEach(t=>{this.setRowNodeDragging(t,!0)}),this.onEnterOrDragging(e)}onDragging(e){this.onEnterOrDragging(e)}isFromThisGrid(e){let{dragSourceDomDataKey:t}=e.dragSource;return t===this.gos.getDomDataKey()}onEnterOrDragging(e){this.dispatchGridEvent("rowDragMove",e),this.lastDraggingEvent=e,this.gos.get("rowDragManaged")&&this.doManagedDrag(e),this.autoScrollService.check(e.event)}doManagedDrag(e){let{dragAndDrop:t,gos:i}=this.beans,s=this.isFromThisGrid(e);if(!(i.get("rowDragManaged")&&this.shouldPreventRowMove()))if(i.get("suppressMoveWhenRowDragging")||!s){if(t.isDropZoneWithinThisGrid(e)){let n=this.clientSideRowModel,r=this.getRowsDrop(e),a=r?.target;a?n.highlightRow(a,r.delta<0?"Above":"Below"):n.clearHighlight()}}else{let n=this.getRowsDrop(e);n&&this.dropRows(n)}}getRowIndexNumber(e){let t=e.getRowIndexString();return parseInt(N(t.split("-")),10)}getRowsDrop(e){let{rowNode:t,rowNodes:i}=e.dragItem,s=i?.length,o=this.isFromThisGrid(e),n=s&&(t??i[0]),r=In(this.beans,e).y,a=this.clientSideRowModel,l=a.getRowIndexAtPixel(r),d=a.getRow(l),c=0;if(!n)return null;if(o){if(!d||d===n)return null;c=l-n.rowIndex,i.includes(d)&&(d=(c<0?this.getPrevOrNext(-1,i[0]):this.getPrevOrNext(1,N(i)))??d)}return d&&(!o||c<-1||c>1)&&(c=r-d.rowTop-d.rowHeight/2),{sameGrid:o,delta:c,target:d,rows:i}}getPrevOrNext(e,t){let i=this.clientSideRowModel,s=i.getRowCount(),o=t.rowIndex+e;for(;o>=0&&o<s;){let n=i.getRow(o);if(n.sourceRowIndex>=0)return n;o+=e}}addRowDropZone(e){if(!e.getContainer()){F(55);return}let t=this.beans.dragAndDrop;if(t.findExternalZone(e)){F(56);return}let i={getContainer:e.getContainer};e.fromGrid?i=e:(e.onDragEnter&&(i.onDragEnter=o=>{e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",o))}),e.onDragLeave&&(i.onDragLeave=o=>{e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",o))}),e.onDragging&&(i.onDragging=o=>{e.onDragging(this.draggingToRowDragEvent("rowDragMove",o))}),e.onDragStop&&(i.onDragStop=o=>{e.onDragStop(this.draggingToRowDragEvent("rowDragEnd",o))}),e.onDragCancel&&(i.onDragCancel=o=>{e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel",o))}));let s=R({isInterestedIn:o=>o===2,getIconName:()=>"move",external:!0},i);t.addDropTarget(s),this.addDestroyFunc(()=>t.removeDropTarget(s))}getRowDropZone(e){let t=this.getContainer.bind(this),i=this.onDragEnter.bind(this),s=this.onDragLeave.bind(this),o=this.onDragging.bind(this),n=this.onDragStop.bind(this),r=this.onDragCancel.bind(this),a;return e?a={getContainer:t,onDragEnter:e.onDragEnter?l=>{i(l),e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",l))}:i,onDragLeave:e.onDragLeave?l=>{s(l),e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",l))}:s,onDragging:e.onDragging?l=>{o(l),e.onDragging(this.draggingToRowDragEvent("rowDragMove",l))}:o,onDragStop:e.onDragStop?l=>{n(l),e.onDragStop(this.draggingToRowDragEvent("rowDragEnd",l))}:n,onDragCancel:e.onDragCancel?l=>{r(l),e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel",l))}:r,fromGrid:!0}:a={getContainer:t,onDragEnter:i,onDragLeave:s,onDragging:o,onDragStop:n,onDragCancel:r,fromGrid:!0},a}draggingToRowDragEvent(e,t){let i=this.beans,{pageBounds:s,rowModel:o,gos:n}=i,r=In(this.beans,t).y,a=r>s.getCurrentPagePixelRange().pageLastPixel,l=-1,d;return a||(l=o.getRowIndexAtPixel(r),d=o.getRow(l)),I(n,{type:e,event:t.event,node:t.dragItem.rowNode,nodes:t.dragItem.rowNodes,overIndex:l,overNode:d,y:r,vDirection:t.vDirection})}dispatchGridEvent(e,t){let i=this.draggingToRowDragEvent(e,t);this.eventSvc.dispatchEvent(i)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e),this.gos.get("rowDragManaged")&&this.clientSideRowModel.clearHighlight()}onDragStop(e){this.dispatchGridEvent("rowDragEnd",e),this.stopDragging(e);let{dragAndDrop:t,gos:i}=this.beans;if(i.get("rowDragManaged")&&(i.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&t.isDropZoneWithinThisGrid(e)){let s=this.getRowsDrop(e);s&&this.dropRows(s),this.clientSideRowModel.clearHighlight()}}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e);let{dragAndDrop:t,gos:i}=this.beans;i.get("rowDragManaged")&&(i.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&t.isDropZoneWithinThisGrid(e)&&this.clientSideRowModel.clearHighlight()}stopDragging(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach(t=>{this.setRowNodeDragging(t,!1)})}setRowNodeDragging(e,t){e.dragging!==t&&(e.dragging=t,e.dispatchRowEvent("draggingChanged"))}dropRows(e){return e.sameGrid?this.moveRows(e):this.addRows(e)}addRows({delta:e,target:t,rows:i}){let s=At(this.gos),o=this.clientSideRowModel,n=i.filter(({data:a,rowPinned:l})=>!o.getRowNode(s?.({data:a,level:0,rowPinned:l})??a.id)).map(({data:a})=>a);if(n.length===0)return!1;let r=t&&t.sourceRowIndex+(e<0?0:1);return o.updateRowData({add:n,addIndex:r}),!0}moveRows({delta:e,target:t,rows:i}){let s=this.getValidRowsToMove(i),o=this.beans.focusSvc,n=o.getFocusedCell(),r=n&&wt(this.beans,n);return this.reorderLeafChildren(s,...this.getMoveRowsBounds(s,t,e))?(this.clientSideRowModel.refreshModel({step:"group",keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedPath:new pi(!1,this.clientSideRowModel.rootNode),rowNodesOrderChanged:!0}),r?r.focusCell():o.clearFocusedCell(),!0):!1}getValidRowsToMove(e){let t=this.clientSideRowModel,i=new Set;for(let s of e)s.sourceRowIndex>=0&&(s.rowTop!==null||s===t.getRowNode(s.id))&&i.add(s);return i}getMoveRowsBounds(e,t,i){let s=this.clientSideRowModel.rootNode?.allLeafChildren.length??0,o=t?.sourceRowIndex??-1;o<0||o>=s?o=s:i>=0&&++o;let n=o,r=Math.min(o,s-1);for(let{sourceRowIndex:a}of e)a<n&&(n=a),a>r&&(r=a);return[n,o,r]}reorderLeafChildren(e,t,i,s){let o=!1,n=this.clientSideRowModel.rootNode?.allLeafChildren;if(!e.size||!n)return!1;let r=t;for(let l=t;l<i;++l){let d=n[l];e.has(d)||(d.sourceRowIndex!==r&&(d.sourceRowIndex=r,n[r]=d,o=!0),++r)}let a=s;for(let l=s;l>=i;--l){let d=n[l];e.has(d)||(d.sourceRowIndex!==a&&(d.sourceRowIndex=a,n[a]=d,o=!0),--a)}for(let l of e)l.sourceRowIndex!==r&&(l.sourceRowIndex=r,n[r]=l,o=!0),++r;return o}};function La(e,t,i){if(i===0)return!1;let s=Math.abs(e.clientX-t.clientX),o=Math.abs(e.clientY-t.clientY);return Math.max(s,o)<=i}var nh=class extends y{constructor(){super(...arguments),this.beanName="dragSvc",this.dragEndFunctions=[],this.dragSources=[]}destroy(){let{dragSources:e}=this;e.forEach(this.removeListener.bind(this)),e.length=0,super.destroy()}removeListener(e){let t=e.dragSource.eElement,i=e.mouseDownListener;if(t.removeEventListener("mousedown",i),e.touchEnabled){let s=e.touchStartListener;t.removeEventListener("touchstart",s,{passive:!0})}}removeDragSource(e){let{dragSources:t}=this,i=t.find(s=>s.dragSource===e);i&&(this.removeListener(i),me(t,i))}addDragSource(e){let t=this.onMouseDown.bind(this,e),{eElement:i,includeTouch:s,stopPropagationForTouch:o}=e;i.addEventListener("mousedown",t);let n=null,r=this.gos.get("suppressTouch");s&&!r&&(n=a=>{Po(a.target)||(o&&a.stopPropagation(),this.onTouchStart(e,a))},i.addEventListener("touchstart",n,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:n,touchEnabled:!!s})}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;let i=t.touches[0];this.touchLastTime=i,this.touchStart=i;let s=l=>this.onTouchMove(l,e.eElement),o=l=>this.onTouchUp(l,e.eElement),n=l=>{l.cancelable&&l.preventDefault()},r=t.target,a=[{target:li(this.beans),type:"touchmove",listener:n,options:{passive:!1}},{target:r,type:"touchmove",listener:s,options:{passive:!0}},{target:r,type:"touchend",listener:o,options:{passive:!0}},{target:r,type:"touchcancel",listener:o,options:{passive:!0}}];this.addTemporaryEvents(a),e.dragStartPixels===0&&this.onCommonMove(i,this.touchStart,e.eElement)}onMouseDown(e,t){let i=t;if(e.skipMouseEvent&&e.skipMouseEvent(t)||i._alreadyProcessedByDragService||(i._alreadyProcessedByDragService=!0,t.button!==0))return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;let s=d=>this.onMouseMove(d,e.eElement),o=d=>this.onMouseUp(d,e.eElement),n=d=>d.preventDefault(),r=d=>{d.key===b.ESCAPE&&this.cancelDrag(e.eElement)},a=li(this.beans),l=[{target:a,type:"mousemove",listener:s},{target:a,type:"mouseup",listener:o},{target:a,type:"contextmenu",listener:n},{target:a,type:"keydown",listener:r}];this.addTemporaryEvents(l),e.dragStartPixels===0&&this.onMouseMove(t,e.eElement)}addTemporaryEvents(e){e.forEach(t=>{let{target:i,type:s,listener:o,options:n}=t;i.addEventListener(s,o,n)}),this.dragEndFunctions.push(()=>{e.forEach(t=>{let{target:i,type:s,listener:o,options:n}=t;i.removeEventListener(s,o,n)})})}isEventNearStartEvent(e,t){let{dragStartPixels:i}=this.currentDragParams,s=P(i)?i:4;return La(e,t,s)}getFirstActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}onCommonMove(e,t,i){if(!this.dragging){if(this.isEventNearStartEvent(e,t))return;if(this.dragging=!0,this.eventSvc.dispatchEvent({type:"dragStarted",target:i}),this.currentDragParams.onDragStart(t),!this.currentDragParams){this.dragging=!1;return}this.currentDragParams.onDragging(t)}this.currentDragParams?.onDragging(e)}onTouchMove(e,t){let i=this.getFirstActiveTouch(e.touches);i&&this.onCommonMove(i,this.touchStart,t)}onMouseMove(e,t){ut()&&q(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)}shouldPreventMouseEvent(e){let{gos:t}=this,i=t.get("enableCellTextSelection"),s=e.type==="mousemove",o=n=>!!n.target?.tagName.toLocaleLowerCase()?.match("^a$|textarea|input|select|button");return i&&s&&e.cancelable&&gi(t,e)&&!o(e)}onTouchUp(e,t){let i=this.getFirstActiveTouch(e.changedTouches);i||(i=this.touchLastTime),this.onUpCommon(i,t)}onMouseUp(e,t){this.onUpCommon(e,t)}onUpCommon(e,t){this.dragging&&(this.dragging=!1,this.currentDragParams.onDragStop(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t})),this.resetDragProperties()}cancelDrag(e){this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),this.currentDragParams?.onDragCancel?.(),this.resetDragProperties()}resetDragProperties(){this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null;let{dragEndFunctions:e}=this;e.forEach(t=>t()),e.length=0}};function Oa(e,t){return e+"_"+t}function j(e){return e instanceof Ha}var Ha=class extends y{constructor(e,t,i,s){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=i,this.pinned=s,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return Oa(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){let e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{j(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){let t=N(this.displayedChildren).getLeft();this.setLeft(t)}else{let 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?.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(){let e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){let 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(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){let t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{He(t)?e.push(t):j(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{He(t)?e.push(t):j(t)&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){let 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(j(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"})}},go="row-group-",Bo="t-",Vo="b-",rh=0,ct=class{constructor(e){this.master=!1,this.detail=void 0,this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this.childrenMapped={},this.treeNode=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=rh++,this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.__selected=!1,this.beans=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){let{valueCache:i,selectionSvc:s,eventSvc:o}=this.beans,n=this.data;this.data=e,i?.onDataChanged(),this.updateDataOnDetailNode(),s?.updateRowSelectable(this),this.resetQuickFilterAggregateText();let r=this.createDataChangedEvent(e,n,t);if(this.__localEventService?.dispatchEvent(r),this.sibling){this.sibling.data=e;let l=this.sibling.createDataChangedEvent(e,n,t);this.sibling.__localEventService?.dispatchEvent(l)}o.dispatchEvent({type:"rowNodeDataChanged",node:this});let a=this.pinnedSibling;a&&(a.data=e,a.__localEventService?.dispatchEvent(a.createDataChangedEvent(e,n,t)),o.dispatchEvent({type:"rowNodeDataChanged",node:a}))}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(e,t,i){return{type:"dataChanged",node:this,oldData:t,newData:e,update:i}}getRowIndexString(){return this.rowIndex==null?(z(13),null):this.rowPinned==="top"?Bo+this.rowIndex:this.rowPinned==="bottom"?Vo+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){let{selectionSvc:i}=this.beans,s=i?.createDaemonNode?.(this),o=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),i&&(i.updateRowSelectable(this),i.syncInRowNode(this,s));let n=this.createDataChangedEvent(e,o,!1);this.__localEventService?.dispatchEvent(n)}setId(e){let t=At(this.beans.gos);if(t)if(this.data){let i=this.parent?.getRoute()??[];this.id=t({data:this.data,parentKeys:i.length>0?i:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(go)&&z(14,{groupPrefix:go})}else this.id=void 0;else this.id=e}setRowTop(e){this.oldRowTop=this.rowTop,this.rowTop!==e&&(this.rowTop=e,this.dispatchRowEvent("topChanged"),this.setDisplayed(e!==null))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,i){this.beans.expansionSvc?.setExpanded(this,e,t,i)}setDataValue(e,t,i){let{colModel:s,valueSvc:o,gos:n,selectionSvc:r}=this.beans,a=typeof e!="string"?e:s.getCol(e)??s.getColDefCol(e);if(!a)return!1;let l=o.getValueForDisplay(a,this).value;if(n.get("readOnlyEdit")){let{beans:{eventSvc:h},data:g,rowIndex:p,rowPinned:f}=this;return h.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:p,rowPinned:f,column:a,colDef:a.colDef,data:g,node:this,oldValue:l,newValue:t,value:t,source:i}),!1}let d=o.setValue(this,a,t,i);this.dispatchCellChangedEvent(a,t,l);let c=r?.updateRowSelectable(this),u=this.pinnedSibling;return u&&(d&&u.dispatchCellChangedEvent(a,t,l),u.selectable=c??!0),d}updateHasChildren(){let e=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0,{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,i){let s={type:"cellChanged",node:this,column:e,newValue:t,oldValue:i};this.__localEventService?.dispatchEvent(s)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){return this.footer?this.sibling.isSelected():this.rowPinned&&this.pinnedSibling?this.pinnedSibling.isSelected():this.__selected}depthFirstSearch(e){this.childrenAfterGroup?.forEach(t=>t.depthFirstSearch(e)),e(this)}dispatchRowEvent(e){this.__localEventService?.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,i="api"){this.beans.selectionSvc?.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:i})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){this.__localEventService||(this.__localEventService=new rt),this.__localEventService.addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){this.beans.validation?.checkRowEvents(e),this.__localEventService||(this.__localEventService=new rt),this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.__localEventService);let i=this.frameworkEventListenerService?.wrap(e,t)??t;this.__localEventService.addEventListener(e,i)}removeEventListener(e,t){let i=this.frameworkEventListenerService?.unwrap(e,t)??t;this.removeLocalListener(e,i)}removeLocalListener(e,t){this.__localEventService?.removeEventListener(e,t),this.__localEventService?.noRegisteredListenersExist()&&(this.__localEventService=null)}isFullWidthCell(){if(F(61),this.detail)return!0;let e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;let e=[],t=this;for(;t&&t.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setFirstChild(e){this.firstChild!==e&&(this.firstChild=e,this.dispatchRowEvent("firstChildChanged"))}setDisplayed(e){this.displayed!==e&&(this.displayed=e,this.dispatchRowEvent("displayedChanged"))}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}getFirstChild(){return this.childStore?this.childStore.getFirstNode():this.childrenAfterSort?.[0]??null}};function ah(e,t,i){return I(t,{type:i,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var lh=new Set(["__localEventService","__objectId","sticky","__autoHeights","__checkAutoHeightsDebounced","childStore"]);function dh(e,t){let i=new ct(t);return Object.keys(e).forEach(s=>{lh.has(s)||(i[s]=e[s])}),i.oldRowTop=null,i}var ch={tag:"div",cls:"ag-filter"},uh=class extends V{constructor(e,t){super(ch),this.column=e,this.source=t,this.filterWrapper=null}postConstruct(){this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return!!this.filterWrapper}getFilter(){return this.filterWrapper?.filterPromise??null}afterInit(){return this.filterWrapper?.filterPromise?.then(()=>{})??ie.resolve()}afterGuiAttached(e){this.filterWrapper?.filterPromise?.then(t=>{t?.afterGuiAttached?.(e)})}afterGuiDetached(){this.filterWrapper?.filterPromise?.then(e=>{e?.afterGuiDetached?.()})}createFilter(e){let{column:t,source:i}=this;this.filterWrapper=this.beans.filterManager?.getOrCreateFilterWrapper(t)??null,this.filterWrapper?.filterPromise&&this.filterWrapper.filterPromise.then(s=>{let o=s.getGui();P(o)||F(69,{guiFromFilter:o}),this.appendChild(o),e&&this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:i,eGui:this.getGui()})})}onFilterDestroyed(e){(e.source==="api"||e.source==="paramsUpdated")&&e.column.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(J(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}},Ga="ag-resizer-wrapper",Ne=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),hh={tag:"div",cls:Ga,children:[Ne("eTopLeft","topLeft"),Ne("eTop","top"),Ne("eTopRight","topRight"),Ne("eRight","right"),Ne("eBottomRight","bottomRight"),Ne("eBottom","bottom"),Ne("eBottomLeft","bottomLeft"),Ne("eLeft","left")]},gh=class extends y{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},t)}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(){let{clientHeight:e,clientWidth:t}=this.offsetParent,i=t/2-this.getWidth()/2,s=e/2-this.getHeight()/2;this.offsetElement(i,s)}initialisePosition(){if(this.positioned)return;let{centered:e,forcePopupParentAsOffsetParent:t,minWidth:i,width:s,minHeight:o,height:n,x:r,y:a}=this.config;this.offsetParent||this.setOffsetParent();let l=0,d=0,c=ye(this.element);if(c){let u=this.findBoundaryElement(),h=window.getComputedStyle(u);if(h.minWidth!=null){let g=u.offsetWidth-this.element.offsetWidth;d=parseInt(h.minWidth,10)-g}if(h.minHeight!=null){let g=u.offsetHeight-this.element.offsetHeight;l=parseInt(h.minHeight,10)-g}}if(this.minHeight=o||l,this.minWidth=i||d,s&&this.setWidth(s),n&&this.setHeight(n),(!s||!n)&&this.refreshSize(),e)this.center();else if(r||a)this.offsetElement(r,a);else if(c&&t){let u=this.boundaryEl,h=!0;if(u||(u=this.findBoundaryElement(),h=!1),u){let g=parseFloat(u.style.top),p=parseFloat(u.style.left);h?this.offsetElement(isNaN(p)?0:p,isNaN(g)?0:g):this.setPosition(p,g)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;let i=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragSvc?.addDragSource(i),this.moveElementDragListener=i):(this.dragSvc?.removeDragSource(i),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(t=>{let s=!!e[t],o=this.getResizerElement(t),n={dragStartPixels:0,eElement:o,onDragStart:r=>this.onResizeStart(r,t),onDragging:this.onResize.bind(this),onDragStop:r=>this.onResizeEnd(r,t)};(s||!this.isAlive()&&!s)&&(s?(this.dragSvc?.addDragSource(n),this.resizeListeners.push(n),o.style.pointerEvents="all"):o.style.pointerEvents="none",this.resizable[t]=s)})}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";let{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){let{popup:t}=this.config,i=this.element,s=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)Zt(i,e),e=Ar(i),s=!0;else if(e=Math.max(this.minHeight,e),this.positioned){let o=this.getAvailableHeight();o&&e>o&&(e=o)}this.getHeight()!==e&&(s?(i.style.maxHeight="unset",i.style.minHeight="unset"):t?Zt(i,e):(i.style.height=`${e}px`,i.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:parseFloat(e)))}getAvailableHeight(){let{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();let{clientHeight:i}=this.offsetParent;if(!i)return null;let s=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),n=e?this.position.y:s.top,r=e?0:o.top,a=0;if(t){let d=this.element.parentElement;if(d){let{bottom:c}=d.getBoundingClientRect();a=c-s.bottom}}return i+r-n-a}getWidth(){return this.element.offsetWidth}setWidth(e){let t=this.element,{popup:i}=this.config,s=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)De(t,e),e=Bi(t),s=!0;else if(this.positioned){e=Math.max(this.minWidth,e);let{clientWidth:o}=this.offsetParent,n=i?this.position.x:this.element.getBoundingClientRect().left;o&&e+n>o&&(e=o-n)}this.getWidth()!==e&&(s?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?De(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:parseFloat(e)))}offsetElement(e=0,t=0){let{forcePopupParentAsOffsetParent:i}=this.config,s=i?this.boundaryEl:this.element;s&&(this.popupSvc?.positionPopup({ePopup:s,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t})}),this.setPosition(parseFloat(s.style.left),parseFloat(s.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;let t=()=>{let i=this.getAvailableHeight();this.element.style.setProperty("max-height",`${i}px`)};e&&this.popupSvc?this.resizeObserverSubscriber=qe(this.beans,this.popupSvc?.getPopupParent(),t):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){let{e:t,isLeft:i,isTop:s,anywhereWithin:o,topBuffer:n}=e,r=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!i,!!o,r)?0:r,d=this.shouldSkipY(t,!!s,n,a)?0:a;return{movementX:l,movementY:d}}shouldSkipX(e,t,i,s){let o=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:o.left,l=a<=0&&n.left>=e.clientX||n.right<=e.clientX&&n.right<=r.right;return l?!0:(t?l=s<0&&e.clientX>a+n.left||s>0&&e.clientX<a+n.left:i?l=s<0&&e.clientX>r.right||s>0&&e.clientX<a+n.left:l=s<0&&e.clientX>r.right||s>0&&e.clientX<r.right,l)}shouldSkipY(e,t,i=0,s){let o=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:o.top,l=a<=0&&n.top>=e.clientY||n.bottom<=e.clientY&&n.bottom<=r.bottom;return l?!0:(t?l=s<0&&e.clientY>a+n.top+i||s>0&&e.clientY<a+n.top:l=s<0&&e.clientY>r.bottom||s>0&&e.clientY<r.bottom,l)}createResizeMap(){let e=t=>({element:this.element.querySelector(`[data-ref=${t}Resizer]`)});this.resizerMap={topLeft:e("eTopLeft"),top:e("eTop"),topRight:e("eTopRight"),right:e("eRight"),bottomRight:e("eBottomRight"),bottom:e("eBottom"),bottomLeft:e("eBottomLeft"),left:e("eLeft")}}addResizers(){if(this.resizersAdded)return;let e=this.element;e&&(e.appendChild(W(hh)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0;let e=this.element.querySelector(`.${Ga}`);e&&this.element.removeChild(e),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");let{popup:i,forcePopupParentAsOffsetParent:s}=this.config;!i&&!s&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){let t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(i=>!i.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){let e=this.getSiblings()||[],t=0,i=0;for(let s=0;s<e.length;s++){let o=e[s],n=!!o.style.flex&&o.style.flex!=="0 0 auto";if(o===this.element)continue;let r=this.minHeight||0,a=this.minWidth||0;if(n){let l=window.getComputedStyle(o);l.minHeight&&(r=parseInt(l.minHeight,10)),l.minWidth&&(a=parseInt(l.minWidth,10))}else r=o.offsetHeight,a=o.offsetWidth;t+=r,i+=a}return{height:t,width:i}}applySizeToSiblings(e){let t=null,i=this.getSiblings();if(i){for(let s=0;s<i.length;s++){let o=i[s];o!==t&&(e?o.style.height=`${o.offsetHeight}px`:o.style.width=`${o.offsetWidth}px`,o.style.flex="0 0 auto",o===this.element&&(t=i[s+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;let{popup:t,forcePopupParentAsOffsetParent:i}=this.config,{isTop:s,isRight:o,isBottom:n,isLeft:r}=this.currentResizer,a=o||r,l=n||s,{movementX:d,movementY:c}=this.calculateMouseMovement({e,isLeft:r,isTop:s}),u=this.position.x,h=this.position.y,g=0,p=0;if(a&&d){let f=r?-1:1,m=this.getWidth(),C=m+d*f,v=!1;r&&(g=m-C,(u+g<=0||C<=this.minWidth)&&(v=!0,g=0)),v||this.setWidth(C)}if(l&&c){let f=s?-1:1,m=this.getHeight(),C=m+c*f,v=!1;s?(p=m-C,(h+p<=0||C<=this.minHeight)&&(v=!0,p=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&m<C&&this.getMinSizeOfSiblings().height+C>this.element.parentElement.offsetHeight&&(v=!0),v||this.setHeight(C)}this.updateDragStartPosition(e.clientX,e.clientY),((t||i)&&g||p)&&this.offsetElement(u+g,h+p)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){let e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;let{x:t,y:i}=this.position,s;this.config.calculateTopBuffer&&(s=this.config.calculateTopBuffer());let{movementX:o,movementY:n}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:s});this.offsetElement(t+o,i+n),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.offsetParent=this.popupSvc.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){let e=this.resizeListeners.pop();this.dragSvc?.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragSvc?.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},ph="ag-focus-managed",Bt=class extends y{constructor(e,t={}){super(),this.eFocusable=e,this.callbacks=t,this.callbacks=R({shouldStopEventPropagation:()=>!1,onTabKeyDown:i=>{if(i.defaultPrevented)return;let s=pt(this.beans,this.eFocusable,!1,i.shiftKey);s&&(s.focus(),i.preventDefault())}},t)}postConstruct(){let{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:i}}=this;e.classList.add(ph),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),i&&this.addManagedElementListeners(e,{focusout:i})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:t=>{if(t.defaultPrevented||Ie(t))return;let{callbacks:i}=this;if(i.shouldStopEventPropagation(t)){lt(t);return}t.key===b.TAB?i.onTabKeyDown(t):i.handleKeyDown&&i.handleKeyDown(t)}})}},Ba={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"};function No(e,t){let{debounceMs:i}=e;return ts(e)?(i!=null&&F(71),0):i??t}function ts(e){return(e.buttons?.indexOf("apply")??-1)>=0}var fh=class extends V{constructor(e){super(),this.filterNameKey=e,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.eFilterBody=E,this.buttonListeners=[],this.defaultDebounceMs=0}postConstruct(){this.resetTemplate(),this.createManagedBean(new Bt(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new gh(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(e){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(e){let t=this.getGui();t?.removeEventListener("submit",this.onFormSubmit);let i={tag:"form",cls:"ag-filter-wrapper",children:[{tag:"div",ref:"eFilterBody",cls:`ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper`,children:[this.createBodyTemplate()]}]};this.setTemplate(i,this.getAgComponents(),e),t=this.getGui(),t?.addEventListener("submit",this.onFormSubmit)}isReadOnly(){return!!this.params.readOnly}init(e){this.setParams(e),this.resetUiToDefaults(!0).then(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}setParams(e){this.params=e,this.applyActive=ts(e),this.resetButtonsPanel(e)}updateParams(e){this.params=e,this.applyActive=ts(e),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(e,t){let{buttons:i,readOnly:s}=t??{},{buttons:o,readOnly:n}=e;if(s===n&&ai(i,o))return;let r=o&&o.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(J(this.eButtonsPanel),this.buttonListeners.forEach(d=>d()),this.buttonListeners=[]):r&&(this.eButtonsPanel=W({tag:"div",cls:"ag-filter-apply-panel"})),!r){this.eButtonsPanel&&se(this.eButtonsPanel);return}let a=document.createDocumentFragment(),l=d=>{let c,u=d?this.translate(`${d}Filter`):void 0;switch(d){case"apply":c=p=>this.onBtApply(!1,!1,p);break;case"clear":c=()=>this.onBtClear();break;case"reset":c=()=>this.onBtReset();break;case"cancel":c=p=>{this.onBtCancel(p)};break;default:F(75);return}let g=W({tag:"button",attrs:{type:d==="apply"?"submit":"button"},ref:`${d}FilterButton`,cls:"ag-button ag-standard-button ag-filter-apply-panel-button",children:u});this.buttonListeners.push(...this.addManagedElementListeners(g,{click:c})),a.append(g)};o.forEach(d=>l(d)),this.eButtonsPanel.append(a),this.getGui().appendChild(this.eButtonsPanel)}setupOnBtApplyDebounce(){let e=No(this.params,this.defaultDebounceMs),t=Q(this,this.checkApplyDebounce.bind(this),e);this.onBtApplyDebounce=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel??null}setModel(e){return(e!=null?this.setModelIntoUi(e):this.resetUiToDefaults()).then(()=>{this.updateUiVisibility(),this.applyModel("api")})}onBtCancel(e){this.resetUiToActiveModel(this.getModel(),()=>{this.handleCancelEnd(e)})}handleCancelEnd(e){this.params.closeOnApply&&this.close(e)}resetUiToActiveModel(e,t){let i=()=>{this.onUiChanged(!1,"prevent"),t?.()};e!=null?this.setModelIntoUi(e).then(i):this.resetUiToDefaults().then(i)}onBtClear(){this.resetUiToDefaults().then(()=>this.onUiChanged())}onBtReset(){this.onBtClear(),this.onBtApply()}applyModel(e="api"){let t=this.getModelFromUi();if(!this.isModelValid(t))return!1;let i=this.appliedModel;return this.appliedModel=t,!this.areModelsEqual(i,t)}isModelValid(e){return!0}onFormSubmit(e){e.preventDefault()}onBtApply(e=!1,t=!1,i){i&&i.preventDefault(),this.applyModel(t?"rowDataUpdated":"ui")&&this.params.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t,source:"columnFilter"});let{closeOnApply:s}=this.params;s&&this.applyActive&&!e&&!t&&this.close(i)}onNewRowsLoaded(){}close(e){if(!this.hidePopup)return;let t=e,i=t&&t.key,s;(i==="Enter"||i==="Space")&&(s={keyboardEvent:t}),this.hidePopup(s),this.hidePopup=null}onUiChanged(e=!1,t){if(this.updateUiVisibility(),this.params.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){let i=this.isModelValid(this.getModelFromUi()),s=this.queryForHtmlElement('[data-ref="applyFilterButton"]');s&&ni(s,!i)}e&&!t||t==="immediately"?this.onBtApply(e):(!this.applyActive&&!t||t==="debounce")&&this.onBtApplyDebounce()}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){let{positionableFeature:t,gos:i}=this;if(!t||e==="toolPanel")return;e==="floatingFilter"||e==="columnFilter"?(t.restoreLastSize(),t.setResizable(i.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(!0)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}refresh(e){let t=this.params;return this.params=e,this.resetButtonsPanel(e,t),!0}destroy(){let e=this.getGui();e&&e.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,super.destroy()}translate(e){return this.getLocaleTextFunc()(e,Ba[e])}getCellValue(e){return this.params.getValue(e)}getPositionableElement(){return this.eFilterBody}};function mh(e,t,i){if(t==null)return null;let s=null,{compName:o,jsComp:n,fwComp:r}=pu(e,t);return o?s={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[o]:n==null&&r==null&&t.filter===!0&&(s=i()),s}var we={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},zo=class extends y{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){let e=this.gos.get("domLayout"),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},i=t.autoHeight?we.AUTO_HEIGHT:t.print?we.PRINT:we.NORMAL;this.view.updateLayoutClasses(i,t)}},ze="Viewport",On="fakeVScrollComp",Hn=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],Gn=100,Ts=150,Ch=class extends y{constructor(e){super(),this.clearRetryListenerFncs=[],this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=Q(this,()=>this.lastScrollSource[1]=null,Ts),this.resetLastVScrollDebounced=Q(this,()=>this.lastScrollSource[0]=null,Ts)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),this.clearRetryListenerFncs=[],window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");let e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),gridSizeChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,i=>{this.centerRowsCtrl=i.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,ze)});for(let e of Hn){let t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){let e=this.ctrlsSvc.get("fakeVScrollComp"),t=this.gos.get("debounceVerticalScrollbar"),i=t?Q(this,this.onVScroll.bind(this,ze),Gn):this.onVScroll.bind(this,ze),s=t?Q(this,this.onVScroll.bind(this,On),Gn):this.onVScroll.bind(this,On);this.addManagedElementListeners(this.eBodyViewport,{scroll:i}),this.registerScrollPartner(e,s)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(let t of[...Hn,ze]){if(this.lastScrollSource[1]===t)continue;let i=this.getViewportForSource(t);Ni(i,e,this.enableRtl)}}getViewportForSource(e){return e===ze?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;let t=this.centerRowsCtrl.eViewport,{scrollLeft:i}=t;if(this.shouldBlockScrollUpdate(1,i,!0))return;let s=Vi(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(s),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(e===ze?t=this.eBodyViewport.scrollTop:t=this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0))return;let{animationFrameSvc:i}=this;i?.setScrollTop(t),this.nextScrollTop=t,e===ze?this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,i?.active?i.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){let t=this.ctrlsSvc.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}fireScrollEvent(e){let t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.eventSvc.dispatchEvent(O(R({},t),{type:"bodyScrollEnd"}))},Ts)}shouldBlockScrollUpdate(e,t,i=!1){return i&&!Je()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){let t=Do(this.eBodyViewport),{scrollHeight:i}=this.eBodyViewport;return e<0||e+t>i}shouldBlockHorizontalScroll(e){let t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:i}=this.centerRowsCtrl.eViewport;if(this.enableRtl){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>i}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){this.scrollLeft!==this.centerRowsCtrl.getCenterViewportScrollLeft()&&this.onHScroll(ze)}scrollGridIfNeeded(e=!1){let t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){let s=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:s:e=Math.min(Math.max(e,0),s)),Ni(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){let{lastOffsetHeight:i,lastScrollTop:s}=this;return{top:s,bottom:s+i}}this.isVerticalPositionInvalidated=!1;let{scrollTop:e,offsetHeight:t}=this.eBodyViewport;return this.lastScrollTop=e,this.lastOffsetHeight=t,{top:e,bottom:e+t}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.isHorizontalPositionInvalidated&&(this.lastIsHorizontalScrollShowing=this.centerRowsCtrl.isHorizontalScrollShowing(),this.isHorizontalPositionInvalidated=!1),this.lastIsHorizontalScrollShowing}scrollHorizontally(e){let t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){let{rowModel:i}=this.beans,s=i.getRowCount(),o=-1;for(let n=0;n<s;n++){let r=i.getRow(n);if(typeof e=="function"){if(r&&e(r)){o=n;break}}else if(e===r||e===r.data){o=n;break}}o>=0&&this.ensureIndexVisible(o,t)}ensureIndexVisible(e,t,i=0){if(Z(this.gos,"print"))return;let{rowModel:s}=this.beans,o=s.getRowCount();if(typeof e!="number"||e<0||e>=o){F(88,{index:e});return}this.clearRetryListeners();let{frameworkOverrides:n,pageBounds:r,rowContainerHeight:a,rowRenderer:l}=this.beans;n.wrapIncoming(()=>{let d=this.ctrlsSvc.getGridBodyCtrl(),c=s.getRow(e),u,h,g=0;this.invalidateVerticalScroll();do{let{stickyTopHeight:p,stickyBottomHeight:f}=d,m=c.rowTop,C=c.rowHeight,v=r.getPixelOffset(),w=c.rowTop-v,T=w+c.rowHeight,A=this.getVScrollPosition(),M=a.divStretchOffset,k=A.top+M,G=A.bottom+M,H=G-k,B=a.getScrollPositionForPixel(w),K=a.getScrollPositionForPixel(T-H),ae=Math.min((B+K)/2,w),ve=k+p>w,Re=G-f<T,le=null;t==="top"?le=B-p:t==="bottom"?le=K+f:t==="middle"?le=ae:ve?le=B-p:Re&&(le=K+f),le!==null&&(this.setVerticalScrollPosition(le),l.redraw({afterScroll:!0})),u=m!==c.rowTop||C!==c.rowHeight,h=p!==d.stickyTopHeight||f!==d.stickyBottomHeight,g++}while((u||h)&&g<10);if(this.animationFrameSvc?.flushAllFrames(),i<10&&(c?.stub||!this.beans.rowAutoHeight?.areRowsMeasured())){let p=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{let f=this.getVScrollPosition().top;p!==f&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=s.getRowCount())&&this.ensureIndexVisible(e,t,i+1)}})}})}clearRetryListeners(){this.clearRetryListenerFncs.forEach(e=>e()),this.clearRetryListenerFncs=[]}ensureColumnVisible(e,t="auto"){let{colModel:i,frameworkOverrides:s}=this.beans,o=i.getCol(e);if(!o||o.isPinned()||!this.visibleCols.isColDisplayed(o))return;let n=this.getPositionedHorizontalScroll(o,t);s.wrapIncoming(()=>{n!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){let{columnBeforeStart:i,columnAfterEnd:s}=this.isColumnOutsideViewport(e),o=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),n=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl,a=(r?i:s)||o,l=r?s:i;t!=="auto"&&(a=t==="start",l=t==="end");let d=t==="middle";if(a||l||d){let{colLeft:c,colMiddle:u,colRight:h}=this.getColumnBounds(e);return d?u-n/2:a?r?h:c:r?c-n:h-n}return null}isColumnOutsideViewport(e){let{start:t,end:i}=this.getViewportBounds(),{colLeft:s,colRight:o}=this.getColumnBounds(e),n=this.enableRtl,r=n?t>o:i<o,a=n?i<s:t>s;return{columnBeforeStart:r,columnAfterEnd:a}}getColumnBounds(e){let t=this.enableRtl,i=this.visibleCols.bodyWidth,s=e.getActualWidth(),o=e.getLeft(),n=t?-1:1,r=t?i-o:o,a=r+s*n,l=r+s/2*n;return{colLeft:r,colMiddle:l,colRight:a}}getViewportBounds(){let e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),i=t,s=e+t;return{start:i,end:s,width:e}}},Wo=class extends y{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){let e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){let e=Z(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:i}=this.beans,s=t.bodyWidth,o=t.getColsLeftWidth(),n=t.getDisplayedColumnsRightWidth(),r;e?r=s+o+n:(r=s,this.addSpacer&&(this.gos.get("enableRtl")?o:n)===0&&i.verticalScrollShowing&&(r+=i.getScrollbarWidth())),this.callback(r)}},vh=class extends y{constructor(e){super(),this.centerContainerCtrl=e}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){let{beans:e,centerContainerCtrl:t,gridBodyCtrl:i}=this,s=()=>{Ve(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(s),i.registerBodyViewportResizeListener(s)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){let{pinnedCols:e,colFlex:t}=this.beans;e?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();let i=this.centerContainerCtrl.getCenterWidth();i!==this.centerWidth&&(this.centerWidth=i,t?.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){let e=this.gridBodyCtrl.eBodyViewport,t=Do(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){let e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){let e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.beans.colViewport.setScrollPosition(e,t)}};function _o(e,t,i,s,o,n){if(i==null&&t==null)return;let r={},a={},l=(d,c)=>{d.split(" ").forEach(u=>{u.trim()!=""&&c(u)})};if(i){let d=Object.keys(i);for(let c=0;c<d.length;c++){let u=d[c],h=i[u],g;typeof h=="string"?g=e?e.evaluate(h,s):!0:typeof h=="function"&&(g=h(s)),l(u,p=>{g?r[p]=!0:a[p]=!0})}}t&&n&&Object.keys(t).forEach(d=>l(d,c=>{r[c]||(a[c]=!0)})),n&&Object.keys(a).forEach(n),Object.keys(r).forEach(o)}function Bn(e){if(e.group)return e.level;let t=e.parent;return t?t.level+1:0}var wh=class extends y{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){let i=this.gos,s=r=>{typeof r=="string"?e.push(r):Array.isArray(r)&&r.forEach(a=>e.push(a))},o=i.get("rowClass");o&&s(o);let n=i.getCallback("getRowClass");if(n){let r={data:t.data,node:t,rowIndex:t.rowIndex},a=n(r);s(a)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,i=>{e.push(i)},()=>{})}processRowClassRules(e,t,i){let{gos:s,expressionSvc:o}=this.beans,n=I(s,{data:e.data,node:e,rowIndex:e.rowIndex});_o(o,void 0,s.get("rowClassRules"),n,t,i)}processStylesFromGridOptions(e){let t=this.gos,i=t.get("rowStyle"),s=t.getCallback("getRowStyle"),o;if(s){let n={data:e.data,node:e,rowIndex:e.rowIndex};o=s(n)}if(o||i)return Object.assign({},i,o)}},Sh=0,is="renderedRow",ss=class extends y{constructor(e,t,i,s,o){super(),this.rowNode=e,this.useAnimationFrameForCreate=s,this.printLayout=o,this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=t.pagination?.getCurrentPage()??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+Sh++,this.rowId=ki(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=Bn(this.rowNode),this.setRowType(),this.setAnimateFlags(i),this.rowStyles=this.processStylesFromGridOptions(),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;let e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=ki(e)}updateGui(e,t){e==="left"?this.leftGui=t:e==="right"?this.rightGui=t:e==="fullWidth"?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,i,s){let{context:o,focusSvc:n}=this.beans;s=Ci(this,o,s);let r={rowComp:e,element:t,containerType:i,compBean:s};this.allRowGuis.push(r),this.updateGui(i,r),this.initialiseRowComp(r);let a=this.rowNode,l=this.rowType==="FullWidthLoading"||a.stub,d=!a.data&&this.beans.rowModel.getType()==="infinite";!l&&!d&&!a.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent();let c=this.fullWidthGui?.element;c&&!this.editing&&n.isRowFocused(a.rowIndex,a.rowPinned)&&n.shouldTakeFocus()&&setTimeout(()=>c.focus({preventScroll:!0}),0)}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){let t=e?"none":"";this.allRowGuis.forEach(i=>i.element.style.display=t)}initialiseRowComp(e){let t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),tt(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);let i=e.rowComp;this.getInitialRowClasses(e.containerType).forEach(o=>i.toggleCss(o,!0)),this.executeSlideAndFadeAnimations(e),this.rowNode.group&&Xs(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(i),this.setRowCompRowBusinessKey(i),at(t,e.element,is,this),e.compBean.addDestroyFunc(()=>at(t,e.element,is,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.toggleCss("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){let t=ki(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){let{containerType:t}=e;this.slideInAnimation[t]&&(so(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(so(()=>{e.rowComp.toggleCss("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){let t=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;let i=this.createBean(t,this.beans.context);this.rowDragComps.push(i),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(s=>s!==i),this.destroyBean(i,this.beans.context)})}setupFullWidth(e){let t=this.getPinnedForContainer(e.containerType),i=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(i)}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>e?.rowComp?.getFullWidthCellRenderer()):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){let e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;let t={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(t)}areAllContainersReady(){let{leftGui:e,centerGui:t,rightGui:i,beans:{visibleCols:s}}=this,o=!!e||!s.isPinningLeft(),n=!!t,r=!!i||!s.isPinningRight();return o&&n&&r}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;let e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){let e=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow")&&!this.gos.get("groupHideOpenParents"),t=this.isNodeFullWidthCell(),i=this.gos.get("masterDetail")&&this.rowNode.detail,s=this.beans.colModel.isPivotMode(),o=Yr(this.gos,this.rowNode,s);e?this.rowType="FullWidthLoading":i?this.rowType="FullWidthDetail":t?this.rowType="FullWidth":o?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;let{animationFrameSvc:i}=this.beans;if(!i?.active||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(i.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){if(!this.beans.rowSpanSvc?.isCellSpanning(e,this.rowNode))return new Jt(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}createCellCtrls(e,t,i=null){let s={list:[],map:{}},o=(d,c,u)=>{u!=null?s.list.splice(u,0,c):s.list.push(c),s.map[d]=c},n=[];for(let d of t){let c=d.getInstanceId(),u=e.map[c];u&&!this.isCorrectCtrlForSpan(u)&&(u.destroy(),u=void 0),u||(u=this.getNewCellCtrl(d)),u&&o(c,u)}for(let d of e.list){let c=d.column.getInstanceId();if(s.map[c]!=null)continue;!this.isCellEligibleToBeRemoved(d,i)?n.push([c,d]):d.destroy()}if(n.length)for(let[d,c]of n){let u=s.list.findIndex(g=>g.column.getLeft()>c.column.getLeft()),h=u===-1?void 0:Math.max(u-1,0);o(d,c,h)}let{focusSvc:r,visibleCols:a}=this.beans,l=r.getFocusedCell();if(l&&l.column.getPinned()==i){let d=l.column.getInstanceId();if(!s.map[d]&&a.allCols.includes(l.column)){let u=this.createFocusedCellCtrl();if(u){let h=s.list.findIndex(p=>p.column.getLeft()>u.column.getLeft()),g=h===-1?void 0:Math.max(h-1,0);o(d,u,g)}}}return s}createFocusedCellCtrl(){let{focusSvc:e,rowSpanSvc:t}=this.beans,i=e.getFocusedCell();if(!i)return;let s=t?.getCellSpan(i.column,this.rowNode);if(s){if(s.firstNode!==this.rowNode||!s.doesSpanContain(i))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(i.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){this.allRowGuis.forEach(t=>{let i=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(i,e)})}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){let e=this.beans.colViewport,t=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{let i=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,i);let s=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,s,"left");let o=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,o,"right")}}isCellEligibleToBeRemoved(e,t){let{column:o}=e;if(o.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;let{editing:n}=e,{visibleCols:r}=this.beans,a=e.isCellFocused();return n||a?!(r.allCols.indexOf(o)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||Z(this.gos,"print")}listenOnDomOrder(e){let t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;let t=P(this.rowNode.oldRowTop),{visibleCols:i}=this.beans,s=i.isPinningLeft(),o=i.isPinningRight();if(t){let{slideInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=s,n.right=o}else{let{fadeInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=s,n.right=o}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){let e=(r,a)=>r?r.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(r.element,a).params):!0,t=e(this.fullWidthGui,null),i=e(this.centerGui,null),s=e(this.leftGui,"left"),o=e(this.rightGui,"right");return t&&i&&s&&o}addListeners(){this.addManagedListeners(this.rowNode,R({heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this)},this.beans.expansionSvc?.getRowExpandedListeners(this)??{})),this.rowNode.detail&&this.addManagedListeners(this.rowNode.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(this.rowNode,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this),rowPinned:this.onRowPinned.bind(this)}),this.addManagedListeners(this.beans.eventSvc,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),this.beans.rowSpanSvc&&this.addManagedListeners(this.beans.rowSpanSvc,{spannedCellsUpdated:({pinned:e})=>{e&&!this.rowNode.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(this.gos.get("rowDragEntireRow")){this.allRowGuis.forEach(t=>{this.addRowDraggerToRow(t)});return}this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onRowIndexChanged())},cellChanged:e=>{this.getAllCellCtrls().forEach(t=>t.onCellChanged(e))}})}onRowPinned(){for(let e of this.allRowGuis)e.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}this.getAllCellCtrls().forEach(i=>i.refreshCell({suppressFlash:!e.update,newData:!e.update})),this.allRowGuis.forEach(i=>{this.setRowCompRowId(i.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(i.rowComp)}),this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){let e=this.rowNode.highlighted;this.allRowGuis.forEach(t=>{let i=e==="Above",s=e==="Below";t.rowComp.toggleCss("ag-row-highlight-above",i),t.rowComp.toggleCss("ag-row-highlight-below",s)})}postProcessRowDragging(){let e=this.rowNode.dragging;this.allRowGuis.forEach(t=>t.rowComp.toggleCss("ag-row-dragging",e))}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:ke(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){let t=this.findFullWidthInfoForEvent(e);if(!t)return;let{rowGui:i,column:s}=t;if(!(i.element===e.target))return;let r=this.rowNode,{focusSvc:a,navigation:l}=this.beans,d=a.getFocusedCell(),c={rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:d?.column??s};l?.navigateToNextCell(e,e.key,c,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||Ie(e))return;let t=this.allRowGuis.find(a=>a.element.contains(e.target)),i=t?t.element:null,s=i===e.target,o=$(this.beans),n=!1;i&&o&&(n=i.contains(o)&&o.classList.contains("ag-cell"));let r=null;!s&&!n&&(r=pt(this.beans,i,!1,e.shiftKey)),(this.isFullWidth()&&s||!r)&&this.beans.navigation?.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){let e=this.allRowGuis.find(t=>ye(t.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){let t=this.isFullWidth()&&e?void 0:-1;this.allRowGuis.forEach(i=>{pe(i.element,"tabindex",t)})}onFullWidthRowFocused(e){let t=this.rowNode,i=e?this.isFullWidth()&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned:!1,s;if(this.fullWidthGui)s=this.fullWidthGui.element;else{let n=this.beans.colModel.getCol(e?.column)?.pinned;n?s=n==="right"?this.rightGui?.element:this.leftGui?.element:s=this.centerGui?.element}s&&(s.classList.toggle("ag-full-width-focus",i),i&&e?.forceBrowserFocus&&s.focus({preventScroll:!0}))}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){let i={list:[],map:{}};return e.list.forEach(s=>{s!==t&&(i.list.push(s),i.map[s.column.getInstanceId()]=s)}),i}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){let{rowNode:i}=this;return I(this.gos,{type:e,node:i,data:i.data,rowIndex:i.rowIndex,rowPinned:i.rowPinned,event:t})}createRowEventWithSource(e,t){let i=this.createRowEvent(e,t);return i.source=this,i}onRowDblClick(e){Ie(e)||this.beans.eventSvc.dispatchEvent(this.createRowEventWithSource("rowDoubleClicked",e))}findFullWidthInfoForEvent(e){if(!e)return;let t=this.findFullWidthRowGui(e.target),i=this.getColumnForFullWidth(t);if(!(!t||!i))return{rowGui:t,column:i}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){let{visibleCols:t}=this.beans;switch(e?.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=et(e.target,"ag-row-drag",3),!this.isFullWidth())return;let t=this.rowNode,{rangeSvc:i,focusSvc:s}=this.beans;i?.removeAllCellRanges();let o=this.findFullWidthInfoForEvent(e);if(!o)return;let{rowGui:n,column:r}=o,a=n.element,l=e.target,d=e.defaultPrevented||ut();a&&a.contains(l)&&Po(l)&&(d=!1),s.setFocusedCell({rowIndex:t.rowIndex,column:r,rowPinned:t.rowPinned,forceBrowserFocus:d})}onRowClick(e){if(Ie(e)||this.lastMouseDownOnDragger)return;let{eventSvc:i,selectionSvc:s}=this.beans;i.dispatchEvent(this.createRowEventWithSource("rowClicked",e)),s?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){this.rowType==="FullWidthDetail"&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,e)}createFullWidthCompDetails(e,t){let{gos:i,rowNode:s}=this,o=I(i,{fullWidth:!0,data:s.data,node:s,value:s.key,valueFormatted:s.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(r,a,l,d)=>this.addFullWidthRowDragging(r,a,l,d),setTooltip:(r,a)=>{i.assertModuleRegistered("Tooltip",3),this.refreshRowTooltip(r,a)}}),n=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return ru(n,o);case"FullWidthGroup":{let{value:r,valueFormatted:a}=this.beans.valueSvc.getValueForDisplay(void 0,this.rowNode,!0);return o.value=r,o.valueFormatted=a,nu(n,o)}case"FullWidthLoading":return ou(n,o);default:return su(n,o)}}refreshRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.refreshRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,i="",s){let{rowDragSvc:o,context:n}=this.beans;if(!o||!this.isFullWidth())return;let r=o.createRowDragComp(()=>i,this.rowNode,void 0,e,t,s);this.createBean(r,n),this.addDestroyFunc(()=>{this.destroyBean(r,n)})}onUiLevelChanged(){let e=Bn(this.rowNode);if(this.rowLevel!=e){let t="ag-row-level-"+e,i="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(s=>{s.rowComp.toggleCss(t,!0),s.rowComp.toggleCss(i,!1)})}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){let e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach(i=>i.rowComp.toggleCss("ag-row-first",e))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach(i=>i.rowComp.toggleCss("ag-row-last",t)))}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){let e=[];this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),e.length&&e.forEach(t=>{this.allRowGuis.forEach(i=>i.rowComp.toggleCss(t,!0))})}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>{this.allRowGuis.forEach(t=>t.rowComp.toggleCss(e,!0))},e=>{this.allRowGuis.forEach(t=>t.rowComp.toggleCss(e,!1))})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,i=>i.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){let t=this.getPinnedForContainer(e),i=this.isFullWidth(),{rowNode:s,beans:o}=this,n=[];n.push("ag-row"),n.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&n.push("ag-opacity-zero"),n.push(s.rowIndex%2===0?"ag-row-even":"ag-row-odd"),s.isRowPinned()&&(n.push("ag-row-pinned"),o.pinnedRowModel?.isManual()&&n.push("ag-row-pinned-manual")),!s.isRowPinned()&&s.pinnedSibling&&n.push("ag-row-pinned-source"),s.isSelected()&&n.push("ag-row-selected"),s.footer&&n.push("ag-row-footer"),n.push("ag-row-level-"+this.rowLevel),s.stub&&n.push("ag-row-loading"),i&&n.push("ag-full-width-row"),o.expansionSvc?.addExpandedCss(n,s),s.dragging&&n.push("ag-row-dragging");let{rowStyleSvc:r}=o;return r&&(r.processClassesFromGridOptions(n,s),r.preProcessRowClassRules(n,s)),n.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&n.push("ag-row-first"),this.isLastRowOnPage()&&n.push("ag-row-last"),i&&(t==="left"&&n.push("ag-cell-last-left-pinned"),t==="right"&&n.push("ag-cell-first-right-pinned")),n}processStylesFromGridOptions(){return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(e){this.beans.selectionSvc?.onRowCtrlSelected(this,t=>{(t===this.centerGui||t===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;let{element:t,compBean:i}=e,{rowNode:s,beans:o,gos:n}=this;i.addManagedListeners(t,{mouseenter:()=>s.dispatchRowEvent("mouseEnter"),mouseleave:()=>s.dispatchRowEvent("mouseLeave")}),i.addManagedListeners(s,{mouseEnter:()=>{!o.dragSvc?.dragging&&!n.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),s.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){let t=e?[e]:this.allRowGuis.map(i=>i.element);for(let i of t)i.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){let t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),i=this.applyPaginationOffset(t.top,!0)-100,s=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(i,e),s)}forEachGui(e,t){e?t(e):this.allRowGuis.forEach(t)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;let t=this.rowNode.rowHeight,i=this.beans.environment.getDefaultRowHeight(),o=_r(this.gos)?je(this.beans,this.rowNode).height:void 0,n=o?`${Math.min(i,o)-2}px`:void 0;this.forEachGui(e,r=>{r.element.style.height=`${t}px`,n&&r.element.style.setProperty("--ag-line-height",n)})}destroyFirstPass(e=!1){this.active=!1;let{rowNode:t}=this;if(!e&&xt(this.gos)&&!t.sticky)if(t.rowTop!=null){let o=this.roundRowTopToBounds(t.rowTop);this.setRowTop(o)}else this.allRowGuis.forEach(o=>o.rowComp.toggleCss("ag-opacity-zero",!0));this.fullWidthGui?.element.contains($(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);let i=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(i),this.beans.eventSvc.dispatchEvent(i),super.destroy()}destroySecondPass(){this.allRowGuis.length=0,this.beans.editSvc?.stopRowEditing(this);let e=t=>(t.list.forEach(i=>i.destroy()),{list:[],map:{}});this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.toggleCss("ag-row-focus",this.rowFocused),t.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){let{focusSvc:e,editSvc:t}=this.beans,i=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);i!==this.rowFocused&&(this.rowFocused=i,this.setFocusedClasses()),!i&&this.editing&&t?.stopRowEditing(this,!1)}onPaginationChanged(){let e=this.beans.pagination?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;let i=this.beans.pageBounds.getPixelOffset();return e+i*(t?1:-1)}setRowTop(e){if(!this.printLayout&&P(e)){let t=this.applyPaginationOffset(e),o=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(o)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";let t=this.rowNode,i;if(t.sticky)i=t.stickyRowTop;else{let s=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,o=this.applyPaginationOffset(s);i=t.isRowPinned()?o:this.beans.rowContainerHeight.getRealPixelPosition(o)}return i+"px"}setRowTopStyle(e){this.allRowGuis.forEach(t=>this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`))}getCellCtrl(e,t=!1){let i=null;return this.getAllCellCtrls().forEach(s=>{s.column==e&&(i=s)}),i!=null||t||this.getAllCellCtrls().forEach(s=>{s.getColSpanningList().indexOf(e)>=0&&(i=s)}),i}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){let t=this.rowNode.getRowIndexString();if(t===null)return;let i=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),s=this.rowNode.rowIndex%2===0,o=i+this.rowNode.rowIndex+1;this.forEachGui(e,n=>{n.rowComp.setRowIndex(t),n.rowComp.toggleCss("ag-row-even",s),n.rowComp.toggleCss("ag-row-odd",!s),Fo(n.element,o)})}};function Va(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key?.length===1}function po(e,t,i,s,o){let n=s?s.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;let r=I(e,{event:t,editing:o,column:s,node:i,data:i.data,colDef:s.getColDef()});return!!(n&&n(r))}function bh(e){let{pinnedRowModel:t,rowModel:i}=e,[s,o]=[t?.isEmpty("top")??!0,t?.isEmpty("bottom")??!0],n=s?null:"top",r,a;o?(r=null,a=i.getRowCount()-1):(r="bottom",a=t?.getPinnedBottomRowCount()??-1);let{visibleCols:l,rangeSvc:d}=e,c=l.allCols;!d||!c?.length||d.setCellRange({rowStartIndex:0,rowStartPinned:n,rowEndIndex:a,rowEndPinned:r})}var yh=65,Rh=67,xh=86,Fh=68,Eh=90,Ph=89;function Dh(e){let{keyCode:t}=e,i;switch(t){case yh:i=b.A;break;case Rh:i=b.C;break;case xh:i=b.V;break;case Fh:i=b.D;break;case Eh:i=b.Z;break;case Ph:i=b.Y;break;default:i=e.code}return i}var Mh=class extends y{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this)}addKeyboardListeners(){let e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",ia("touchstart")?"touchstart":"mousedown"].forEach(i=>{let s=this.processMouseEvent.bind(this,i);this.addManagedElementListeners(this.element,{[i]:s})})}processMouseEvent(e,t){if(!gi(this.gos,t)||Ie(t))return;let{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(i?.column&&i.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,s,i)):(i&&i.onMouseEvent(e,t),s&&s.onMouseEvent(e,t))}getControlsForEventTarget(e){let{gos:t}=this;return{cellCtrl:Da(t,e),rowCtrl:sa(t,e,is)}}processKeyboardEvent(e,t){let{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(i?this.processCellKeyboardEvent(i,e,t):s&&s.isFullWidth()&&this.processFullWidthRowKeyboardEvent(s,e,t))}processCellKeyboardEvent(e,t,i){let{rowNode:s,column:o,editing:n}=e;!po(this.gos,i,s,o,n)&&t==="keydown"&&(!n&&this.beans.navigation?.handlePageScrollingKey(i)||e.onKeyDown(i),this.doGridOperations(i,e.editing),Va(i)&&e.processCharacter(i)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(i,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,i){let{rowNode:s}=e,{focusSvc:o,navigation:n}=this.beans,r=o.getFocusedCell(),a=r&&r.column;if(!po(this.gos,i,s,a,!1)){let d=i.key;if(t==="keydown")switch(d){case b.PAGE_HOME:case b.PAGE_END:case b.PAGE_UP:case b.PAGE_DOWN:n?.handlePageScrollingKey(i,!0);break;case b.LEFT:case b.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case b.UP:case b.DOWN:e.onKeyboardNavigate(i);break;case b.TAB:e.onTabKeyDown(i);break;default:}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",i))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!gi(this.gos,e))return;let i=Dh(e),{clipboardSvc:s,undoRedo:o}=this.beans;if(i===b.A)return this.onCtrlAndA(e);if(i===b.C)return this.onCtrlAndC(s,e);if(i===b.D)return this.onCtrlAndD(s,e);if(i===b.V)return this.onCtrlAndV(s,e);if(i===b.X)return this.onCtrlAndX(s,e);if(i===b.Y)return this.onCtrlAndY(o);if(i===b.Z)return this.onCtrlAndZ(o,e)}onCtrlAndA(e){let{beans:{rowModel:t,rangeSvc:i,selectionSvc:s},gos:o}=this;i&&Oe(o)&&t.isRowsToRender()?bh(this.beans):s&&s?.selectAllRowNodes({source:"keyboardSelectAll",selectAll:Zr(o)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;let{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(t.target);i?.editing||s?.editing||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;let{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(t.target);i?.editing||s?.editing||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){let{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(t.target);i?.editing||s?.editing||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){!this.gos.get("undoRedoCellEditing")||!e||(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e?.redo("ui")}},Na=class extends y{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){let t=e.uiContainerHeight,i=t!=null?`${t}px`:"";this.eContainer.style.height=i,this.eViewport&&(this.eViewport.style.height=i)}},Ri=e=>e.topRowCtrls,xi=e=>e.getStickyTopRowCtrls(),Fi=e=>e.getStickyBottomRowCtrls(),Ei=e=>e.bottomRowCtrls,Pi=e=>e.allRowCtrls,As=e=>e.getCtrls("top"),ks=e=>e.getCtrls("center"),Is=e=>e.getCtrls("bottom"),Th={center:{type:"center",name:"center-cols",getRowCtrls:Pi,getSpannedRowCtrls:ks},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:Pi,getSpannedRowCtrls:ks},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:Pi,getSpannedRowCtrls:ks},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:Pi},topCenter:{type:"center",name:"floating-top",getRowCtrls:Ri,getSpannedRowCtrls:As},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:Ri,getSpannedRowCtrls:As},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:Ri,getSpannedRowCtrls:As},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:Ri},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:xi},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:xi},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:xi},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:xi},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:Fi},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:Fi},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:Fi},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:Fi},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:Ei,getSpannedRowCtrls:Is},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:Ei,getSpannedRowCtrls:Is},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:Ei,getSpannedRowCtrls:Is},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:Ei}};function za(e){return`ag-${wi(e).name}-viewport`}function Oi(e){let t=wi(e);return t.container??`ag-${t.name}-container`}function Ah(e){return`ag-${wi(e).name}-spanned-cells-container`}function wi(e){return Th[e]}var kh=["topCenter","topLeft","topRight"],Ih=["bottomCenter","bottomLeft","bottomRight"],Lh=["center","left","right"],Oh=["center","left","right","fullWidth"],Hh=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],Gh=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],Bh=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],Wa=["stickyTopCenter","stickyTopLeft","stickyTopRight"],_a=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],Vh=[...Wa,"stickyTopFullWidth",..._a,"stickyBottomFullWidth"],Nh=[...kh,...Ih,...Lh,...Wa,..._a],zh=class extends y{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=wi(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new vh(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,i,s){this.comp=e,this.eContainer=t,this.eSpannedContainer=i,this.eViewport=s,this.createManagedBean(new Mh(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();let{pinnedCols:o,rangeSvc:n}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(Gh,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(o?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(Bh,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(o?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(Oh,()=>this.createManagedBean(new Na(this.eContainer,this.name==="center"?s:void 0))),n&&this.forContainers(Nh,()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer))),this.forContainers(Hh,()=>this.createManagedBean(new Wo(a=>this.comp.setContainerWidth(`${a}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){let{spannedRowRenderer:e,gos:t}=this.beans,i=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i,displayedColumnsWidthChanged:i,displayedRowsChanged:s=>this.onDisplayedRowsChanged(s.afterScroll)}),i(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{let s=this.options.getSpannedRowCtrls(e);s&&this.comp.setSpannedRowCtrls(s,!1)}})}listenOnDomOrder(){if(Vh.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}let t=()=>{let i=this.gos.get("ensureDomOrder"),s=Z(this.gos,"print");this.comp.setDomOrder(i||s)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){let{dragSvc:e}=this.beans;if(!e)return;let t=i=>{e.dragging&&i.cancelable&&i.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){let t=this.getCenterWidth(),i=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,i,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return ri(this.eViewport)}getCenterViewportScrollLeft(){return Vi(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){let t=qe(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return Ir(this.eViewport)}getViewportScrollLeft(){return Vi(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||Pd(this.eViewport)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){Ni(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){let e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){let t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}let i=Z(this.gos,"print"),o=this.gos.get("embedFullWidthRows")||i,n=t.filter(r=>{let a=r.isFullWidth();return this.options.fullWidth?!o&&a:o||!a});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},Ua="ag-force-vertical-scroll",Wh="ag-selectable",_h="ag-column-moving",Uh=class extends y{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,i,s,o,n,r){this.comp=e,this.eGridBody=t,this.eBodyViewport=i,this.eTop=s,this.eBottom=o,this.eStickyTop=n,this.eStickyBottom=r,this.eCenterColsViewport=i.querySelector(`.${za("center")}`),this.eFullWidthContainer=i.querySelector(`.${Oi("fullWidth")}`),this.eStickyTopFullWidthContainer=n.querySelector(`.${Oi("stickyTopFullWidth")}`),this.eStickyBottomFullWidthContainer=r.querySelector(`.${Oi("stickyBottomFullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",a=>this.setCellTextSelection(a.currentValue)),this.createManagedBean(new zo(this.comp)),this.scrollFeature=this.createManagedBean(new Ch(i)),this.beans.rowDragSvc?.setupRowDrag(i,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([s,i,o,n,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(s),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){let e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this),i=this.toggleRowResizeStyles.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,pinnedRowsChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t,rowResizeStarted:i,rowResizeEnded:i}),this.addManagedPropertyListener("treeData",t)}toggleRowResizeStyles(e){let t=e.type==="rowResizeStarted";this.eBodyViewport.classList.toggle("ag-prevent-animation",t)}onGridColumnsChanged(){let e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){let{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();let i=t&&e.getScrollbarWidth()||0,s=Mr()?16:0,o=`calc(100% + ${i+s}px)`;Ve(this.beans,()=>this.comp.setBodyViewportWidth(o)),this.updateScrollingClasses()}setGridRootRole(){let{rowGroupColsSvc:e,colModel:t}=this,i=this.gos.get("treeData");if(!i){let s=t.isPivotMode();i=(e?e.columns.length:0)>=(s?2:1)}this.comp.setGridRootRole(i?"treegrid":"grid")}addFocusListeners(e){e.forEach(t=>{this.addManagedElementListeners(t,{focusin:i=>{let{target:s}=i,o=et(s,"ag-root",t);t.classList.toggle("ag-has-focus",!o)},focusout:i=>{let{target:s,relatedTarget:o}=i,n=t.contains(o),r=et(o,"ag-root",t);et(s,"ag-root",t)||(!n||r)&&t.classList.remove("ag-has-focus")}})})}setColumnMovingCss(e){this.comp.setColumnMovingCss(_h,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(Wh,e)}updateScrollingClasses(){let{eGridBody:{classList:e},scrollVisibleSvc:t}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){this.beans.editSvc?.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){let e=(this.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.filterManager?.getHeaderRowCount()??0),{rowModel:t}=this.beans,i=t.isLastRowIndexKnown()?t.getRowCount():-1,s=i===-1?-1:e+i;this.comp.setRowCount(s)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){let t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){let e=this.gos.get("alwaysShowVerticalScroll"),t=e?Ua:null,i=Z(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||i&&Dd(this.eBodyViewport)}setupRowAnimationCssClass(){let{rowContainerHeight:e,environment:t}=this.beans,i=t.sizesMeasured,s=()=>{let o=i&&xt(this.gos)&&!e.stretching,n=o?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(n,o)};s(),this.addManagedEventListeners({heightScaleChanged:s}),this.addManagedPropertyListener("animateRows",s),this.addManagedEventListeners({gridStylesChanged:()=>{!i&&t.sizesMeasured&&(i=!0,s())}})}addBodyViewportListener(){let{eBodyViewport:e,eStickyTop:t,eStickyBottom:i,eTop:s,eBottom:o,beans:{popupSvc:n,touchSvc:r}}=this,a=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:a}),r?.mockBodyContextMenu(this,a),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,n)});let l=this.onStickyWheel.bind(this);for(let c of[t,i,s,o])this.addManagedElementListeners(c,{wheel:l});let d=this.onHorizontalWheel.bind(this);for(let c of["left","right","topLeft","topRight","bottomLeft","bottomRight"])this.addManagedElementListeners(this.ctrlsSvc.get(c).eContainer,{wheel:d});this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){let{deltaX:t,deltaY:i,shiftKey:s}=e;(s||Math.abs(t)>Math.abs(i))&&gi(this.gos,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){let{deltaY:t}=e;e.preventDefault(),this.scrollVertically(t)}onHorizontalWheel(e){let{deltaX:t,deltaY:i,shiftKey:s}=e;(s||Math.abs(t)>Math.abs(i))&&this.scrollGridBodyToMatchEvent(e)}scrollGridBodyToMatchEvent(e){let{deltaX:t,deltaY:i}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||i})}onBodyViewportContextMenu(e,t,i){if(!e&&!i)return;this.gos.get("preventDefaultOnContextMenu")&&(e||i).preventDefault();let{target:s}=e||t;(s===this.eBodyViewport||s===this.ctrlsSvc.get("center").eViewport)&&this.beans.contextMenuSvc?.showContextMenu({mouseEvent:e,touchEvent:i,value:null,anchorToElement:this.eGridBody,source:"ui"})}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e?.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){let t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){let{pinnedRowModel:e,beans:{environment:t}}=this,i=e?.getPinnedTopTotalHeight(),s=e?.getPinnedBottomTotalHeight(),o=t.getPinnedRowBorderWidth(),n=t.getRowBorderWidth(),r=o-n,a=i?r+i:0,l=s?r+s:0;this.comp.setTopHeight(a),this.comp.setBottomHeight(l),this.comp.setTopInvisible(a<=0),this.comp.setBottomInvisible(l<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{let t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){let t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),i=this.pinnedRowModel?.getPinnedTopTotalHeight()??0,s=0;t>0&&(s+=t),i>0&&(s+=i),s>0&&(s+=1),this.comp.setStickyTopTop(`${s}px`)}setStickyBottomOffsetBottom(){let{pinnedRowModel:e,scrollVisibleSvc:t,comp:i}=this,s=e?.getPinnedBottomTotalHeight()??0,n=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,r=s+n;i.setStickyBottomBottom(`${r}px`)}},$a=class extends V{constructor(e,t){super(),this.direction=t,this.eViewport=E,this.eContainer=E,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",Pr()||Je())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=Mr(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){let e=this.getGui(),t=()=>this.toggleCss("ag-scrollbar-active",!0),i=()=>this.toggleCss("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:i,touchend:i})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),Ve(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.toggleCss("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.toggleCss("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){let t=this.eViewport;Ad(()=>ye(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},$h={tag:"div",cls:"ag-body-horizontal-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eLeftSpacer",cls:"ag-horizontal-left-spacer"},{tag:"div",ref:"eViewport",cls:"ag-body-horizontal-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-horizontal-scroll-container"}]},{tag:"div",ref:"eRightSpacer",cls:"ag-horizontal-right-spacer"}]},Kh=class extends $a{constructor(){super($h,"horizontal"),this.eLeftSpacer=E,this.eRightSpacer=E,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();let e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.createManagedBean(new Wo(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){if(!this.invisibleScrollbar)return;let e=this.beans.pinnedRowModel?.getPinnedBottomTotalHeight()??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){let e=this.scrollVisibleSvc.verticalScrollShowing,t=this.visibleCols.getDisplayedColumnsRightWidth(),i=!this.enableRtl&&e,s=this.scrollVisibleSvc.getScrollbarWidth();i&&(t+=s),De(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=s);let o=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(o+=s),De(this.eLeftSpacer,o),this.eLeftSpacer.classList.toggle("ag-scroller-corner",o<=s)}setScrollVisible(){let e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,i=this.gos.get("suppressHorizontalScroll"),s=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,n=i?0:s===0&&t?16:s,r=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),Zt(this.getGui(),n),Zt(this.eViewport,n),Zt(this.eContainer,n),n||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(r,100):r()}getScrollPosition(){return Vi(this.eViewport,this.enableRtl)}setScrollPosition(e){ye(this.eViewport)||this.attemptSettingScrollPosition(e),Ni(this.eViewport,e,this.enableRtl)}},jh={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:Kh},qh={tag:"div",cls:"ag-body-vertical-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eViewport",cls:"ag-body-vertical-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-vertical-scroll-container"}]}]},Yh=class extends $a{constructor(){super(qh,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new Na(this.eContainer));let{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){let{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,i=this.invisibleScrollbar,s=t&&e.getScrollbarWidth()||0,o=s===0&&i?16:s;this.toggleCss("ag-scrollbar-invisible",i),De(this.getGui(),o),De(this.eViewport,o),De(this.eContainer,o),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){let i=e.getGridBodyCtrl().eBodyViewport,s=this.getScrollPosition(),o=i.scrollTop;s!=o&&this.setScrollPosition(o,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!ye(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},Qh={selector:"AG-FAKE-VERTICAL-SCROLL",component:Yh};function Zh(e){return e.cols?e.cols.treeDepth+1:-1}function Pe(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function Uo(e){let t=[],i=e.ctrlsSvc.getHeaderRowContainerCtrls();for(let s of i){if(!s)continue;let o=s.getGroupRowCount()||0;for(let n=0;n<o;n++){let r=s.getGroupRowCtrlAtIndex(n),a=t[n];if(r){let l=Xh(e,r);(a==null||l>a)&&(t[n]=l)}}}return t}function Xh(e,t){let s=e.colModel.isPivotMode()?eg(e):ja(e),o=t.getHeaderCellCtrls();for(let n of o){let{column:r}=n,a=r.getAutoHeaderHeight();a!=null&&a>s&&r.isAutoHeaderHeight()&&(s=a)}return s}function $o(e){let i=e.colModel.isPivotMode()?Jh(e):Si(e);return e.colModel.forAllCols(s=>{let o=s.getAutoHeaderHeight();o!=null&&o>i&&s.isAutoHeaderHeight()&&(i=o)}),i}function Si(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function Ka(e){return e.gos.get("floatingFiltersHeight")??Si(e)}function ja(e){return e.gos.get("groupHeaderHeight")??Si(e)}function Jh(e){return e.gos.get("pivotHeaderHeight")??Si(e)}function eg(e){return e.gos.get("pivotGroupHeaderHeight")??ja(e)}var tg=class extends y{setComp(e,t,i){this.comp=e,this.eGui=t;let{beans:s}=this,{headerNavigation:o,touchSvc:n,ctrlsSvc:r}=s;o&&this.createManagedBean(new Bt(i,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,s),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,s)}),this.onPivotModeChanged(s),this.setupHeaderHeight();let a=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:a}),n?.mockHeaderContextMenu(this,a),r.register("gridHeaderCtrl",this)}setupHeaderHeight(){let e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({displayedColumnsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>Ve(this.beans,()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){let{beans:e}=this,t=0,i=Uo(e).reduce((n,r)=>n+r,0),s=$o(e);if(e.filterManager?.hasFloatingFilters()&&(t+=Ka(e)),t+=i,t+=s,this.headerHeight===t)return;this.headerHeight=t;let o=`${t+1}px`;this.comp.setHeightAndMinHeight(o),this.eventSvc.dispatchEvent({type:"headerHeightChanged"})}onPivotModeChanged(e){let t=e.colModel.isPivotMode();this.comp.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){let i=e.visibleCols.allCols.some(s=>s.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",i)}onTabKeyDown(e){let t=this.gos.get("enableRtl"),i=e.shiftKey,s=i!==t?"LEFT":"RIGHT",{beans:o}=this,{headerNavigation:n,focusSvc:r}=o;(n.navigateHorizontally(s,!0,e)||!i&&r.focusOverlay(!1)||It(o,i,!0))&&e.preventDefault()}handleKeyDown(e){let t=null,{headerNavigation:i}=this.beans;switch(e.key){case b.LEFT:t="LEFT";case b.RIGHT:{P(t)||(t="RIGHT"),i.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case b.UP:t="UP";case b.DOWN:{P(t)||(t="DOWN"),i.navigateVertically(t,null,e)&&e.preventDefault();break}default:return}}onFocusOut(e){let{relatedTarget:t}=e,{eGui:i,beans:s}=this;!t&&i.contains($(s))||i.contains(t)||(s.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,i){let{menuSvc:s,ctrlsSvc:o}=this.beans;if(!e&&!i||!s?.isHeaderContextMenuEnabled())return;let{target:n}=e??t;(n===this.eGui||n===o.getHeaderRowContainerCtrl()?.eViewport)&&s.showHeaderContextMenu(void 0,e,i)}},Ko=class extends V{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},ig={tag:"div",cls:"ag-header-cell",role:"columnheader",children:[{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"},{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"}]},sg=class extends Ko{constructor(e){super(ig,e),this.eResize=E,this.eHeaderCompWrapper=E,this.headerCompVersion=0}postConstruct(){let e=this.getGui();((o,n)=>{n!=null&&n!=""?e.setAttribute(o,n):e.removeAttribute(o)})("col-id",this.ctrl.column.getColId());let i={setWidth:o=>e.style.width=o,toggleCss:(o,n)=>this.toggleCss(o,n),setUserStyles:o=>mi(e,o),setAriaSort:o=>o?wd(e,o):Sd(e),setUserCompDetails:o=>this.setUserCompDetails(o),getUserCompInstance:()=>this.headerComp};this.ctrl.setComp(i,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0);let s=this.ctrl.getSelectAllGui();s&&this.eResize.insertAdjacentElement("afterend",s)}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;let t=this.headerCompVersion;e.newAgStackInstance().then(i=>this.afterCompCreated(t,i))}afterCompCreated(e,t){if(e!=this.headerCompVersion||!this.isAlive()){this.destroyBean(t);return}this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}},og={tag:"div",cls:"ag-header-group-cell",role:"columnheader",children:[{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"},{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"}]},ng=class extends Ko{constructor(e){super(og,e),this.eResize=E,this.eHeaderCompWrapper=E}postConstruct(){let e=this.getGui(),t=(s,o)=>o!=null?e.setAttribute(s,o):e.removeAttribute(s);e.setAttribute("col-id",this.ctrl.column.getUniqueId());let i={toggleCss:(s,o)=>this.toggleCss(s,o),setUserStyles:s=>mi(e,s),setHeaderWrapperHidden:s=>{s?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:s=>{s!=null?this.eHeaderCompWrapper.style.setProperty("max-height",`${s}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",s!=null)},setResizableDisplayed:s=>U(this.eResize,s),setWidth:s=>e.style.width=s,setAriaExpanded:s=>t("aria-expanded",s),setUserCompDetails:s=>this.setUserCompDetails(s),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(i,e,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(e){e.newAgStackInstance().then(t=>this.afterHeaderCompCreated(t))}afterHeaderCompCreated(e){let t=()=>this.destroyBean(e);if(!this.isAlive()){t();return}let i=this.getGui(),s=e.getGui();this.eHeaderCompWrapper.appendChild(s),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(i)}addOrRemoveHeaderWrapperStyle(e,t){let{eHeaderCompWrapper:i}=this;t?i.style.setProperty(e,t):i.style.removeProperty(e)}},rg={tag:"div",cls:"ag-header-cell ag-floating-filter",role:"gridcell",children:[{tag:"div",ref:"eFloatingFilterBody",role:"presentation"},{tag:"div",ref:"eButtonWrapper",cls:"ag-floating-filter-button ag-hidden",role:"presentation",children:[{tag:"button",ref:"eButtonShowMainFilter",cls:"ag-button ag-floating-filter-button-button",attrs:{type:"button",tabindex:"-1"}}]}]},ag=class extends Ko{constructor(e){super(rg,e),this.eFloatingFilterBody=E,this.eButtonWrapper=E,this.eButtonShowMainFilter=E}postConstruct(){let e=this.getGui(),t={toggleCss:(i,s)=>this.toggleCss(i,s),setUserStyles:i=>mi(e,i),addOrRemoveBodyCssClass:(i,s)=>this.eFloatingFilterBody.classList.toggle(i,s),setButtonWrapperDisplayed:i=>U(this.eButtonWrapper,i),setCompDetails:i=>this.setCompDetails(i),getFloatingFilterComp:()=>this.compPromise,setWidth:i=>e.style.width=i,setMenuIcon:i=>this.eButtonShowMainFilter.appendChild(i)};this.ctrl.setComp(t,e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(t=>this.afterCompCreated(t))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(e){if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()}}},lg=class extends V{constructor(e){super({tag:"div",cls:e.headerRowClass,role:"row"}),this.ctrl=e,this.headerComps={}}postConstruct(){Fo(this.getGui(),this.ctrl.getAriaRowIndex());let e={setHeight:t=>this.getGui().style.height=t,setTop:t=>this.getGui().style.top=t,setHeaderCtrls:(t,i)=>this.setHeaderCtrls(t,i),setWidth:t=>this.getGui().style.width=t};this.ctrl.setComp(e,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;let i=this.headerComps;if(this.headerComps={},e.forEach(s=>{let o=s.instanceId,n=i[o];delete i[o],n==null&&(n=this.createHeaderComp(s),this.getGui().appendChild(n.getGui())),this.headerComps[o]=n}),Object.values(i).forEach(s=>{this.getGui().removeChild(s.getGui()),this.destroyBean(s)}),t){let s=Object.values(this.headerComps);s.sort((n,r)=>{let a=n.getCtrl().column.getLeft(),l=r.getCtrl().column.getLeft();return a-l});let o=s.map(n=>n.getGui());Or(this.getGui(),o)}}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new ng(e);break;case"filter":t=new ag(e);break;default:t=new sg(e);break}return this.createBean(t),t.setParentComponent(this),t}},jo=class extends y{constructor(e,t,i,s){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=s,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=i}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){let{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?N(t):this.columnOrGroup}postConstruct(){let e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){let{gos:e,colAnimation:t}=this.beans,i=e.get("suppressColumnMoveAnimation"),s=P(this.columnOrGroup.getOldLeft());t?.isActive()&&s&&!i?this.animateInLeft():this.onLeftChanged()}animateInLeft(){let e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),i=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=i,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===i&&this.setLeft(i)})}onLeftChanged(){let e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){let{gos:i,visibleCols:s}=this.beans;if(!Z(i,"print")||e.getPinned()==="left")return t;let n=s.getColsLeftWidth();if(e.getPinned()==="right"){let r=s.bodyWidth;return n+r+t}return n+t}setLeft(e){if(P(e)&&(this.eCell.style.left=`${e}px`),j(this.columnOrGroup)){let t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&vd(this.ariaEl,t.length)}}},dg=0,qa="headerCtrl",qo=class extends y{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.instanceId=e.getUniqueId()+"-"+dg++}postConstruct(){let e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}shouldStopEventPropagation(e){let{headerRowIndex:t,column:i}=this.beans.focusSvc.focusedHeader,s=i.getDefinition(),o=s&&s.suppressHeaderKeyboardEvent;if(!P(o))return!1;let n=I(this.gos,{colDef:s,column:i,headerRowIndex:t,event:e});return!!o(n)}getWrapperHasFocus(){return $(this.beans)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}refreshHeaderStyles(){let e=this.column.getDefinition();if(!e)return;let{headerStyle:t}=e,i;if(typeof t=="function"){let s=this.getHeaderClassParams();i=t(s)}else i=t;i&&this.comp.setUserStyles(i)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){let{wrapperElement:t,checkMeasuringCallback:i,compBean:s}=e,{beans:o}=this,n=u=>{if(!this.isAlive()||!s.isAlive())return;let{paddingTop:h,paddingBottom:g,borderBottomWidth:p,borderTopWidth:f}=ht(this.eGui),m=h+g+p+f,v=t.offsetHeight+m;if(u<5){let w=q(o),T=!w||!w.contains(t),A=v==0;if(T||A){so(()=>n(u+1),"raf",o);return}}this.setColHeaderHeight(this.column,v)},r=!1,a,l=()=>{let u=this.column.isAutoHeaderHeight();u&&!r&&d(),!u&&r&&c()},d=()=>{r=!0,n(0),this.comp.toggleCss("ag-header-cell-auto-height",!0),a=qe(this.beans,t,()=>n(0))},c=()=>{r=!1,a&&a(),this.comp.toggleCss("ag-header-cell-auto-height",!1),a=void 0};l(),s.addDestroyFunc(()=>c()),s.addManagedListeners(this.column,{widthChanged:()=>r&&n(0)}),s.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>n(0))}}),i&&i(l)}onDisplayedColumnsChanged(){let{comp:e,column:t,beans:i,eGui:s}=this;!e||!t||!s||(Ea(e,t,i.visibleCols),Fr(s,i.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){let e=ot(this.beans);this.eGui&&pe(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){let t=$(this.beans),i=e.key===b.LEFT||e.key===b.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey||((this.isResizing||i)&&(e.preventDefault(),e.stopImmediatePropagation()),!i))return;let o=e.key===b.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;let n=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(n,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(o)}moveHeader(e){this.beans.colMoves?.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){let t=this.getResizeDiff(e),{pinnedCols:i}=this.beans;return i?i.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){let{gos:t,column:i}=this,s=e.key===b.LEFT!==t.get("enableRtl"),o=i.getPinned(),n=t.get("enableRtl");return o&&n!==(o==="right")&&(s=!s),(s?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{this.resizeFeature?.toggleColumnResizing(!1)},150))}handleKeyDown(e){let t=this.getWrapperHasFocus();switch(e.key){case b.PAGE_DOWN:case b.PAGE_UP:case b.PAGE_HOME:case b.PAGE_END:t&&e.preventDefault()}}addDomData(e){let t=qa,{eGui:i,gos:s}=this;at(s,i,t,this),e.addDestroyFunc(()=>at(s,i,t,null))}focus(e){let{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus(),!0):!1}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop?.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,i){let s=e??t,{menuSvc:o,gos:n}=this.beans;n.get("preventDefaultOnContextMenu")&&s.preventDefault(),o?.isHeaderContextMenuEnabled(i)&&o.showHeaderContextMenu(i,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",i)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;let{eventSvc:i}=this;e.isColumn?i.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):i.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},cg=class extends qo{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}setComp(e,t,i,s,o){this.comp=e;let{rowCtrl:n,column:r,beans:a}=this,{colResize:l,context:d,colHover:c,rangeSvc:u}=a,h=Ci(this,d,o);this.setGui(t,h),this.updateState(),this.setupWidth(h),this.setupMovingCss(h),this.setupMenuClass(h),this.setupSortableClass(h),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:s,checkMeasuringCallback:p=>this.setRefreshFunction("measuring",p),compBean:h}),this.addColumnHoverListener(h),this.setupFilterClass(h),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(h),this.setupSelectAll(h),this.setupUserComp(),this.refreshAria(),l?this.resizeFeature=h.createManagedBean(l.createResizeFeature(n.pinned,r,i,e,this)):U(i,!1),c?.createHoverFeature(h,[r],t),u?.createRangeHighlightFeature(h,r,e),h.createManagedBean(new jo(r,t,a)),h.createManagedBean(new Bt(t,{shouldStopEventPropagation:p=>this.shouldStopEventPropagation(p),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(h),h.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),h.addManagedListeners(r,{colDefChanged:()=>this.refresh()}),h.addManagedListeners(r,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});let g=()=>this.checkDisplayName();h.addManagedEventListeners({columnValueChanged:g,columnRowGroupChanged:g,columnPivotChanged:g,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),h.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){this.beans.colResize?.resizeHeader(this.column,e,t)}getHeaderClassParams(){let{column:e,beans:t}=this,i=e.colDef;return I(t.gos,{colDef:i,column:e,floatingFilter:!1})}setupUserComp(){let e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){let e=this.createParams(),t=this.column.getColDef();return Jc(this.beans.userCompFactory,t,e)}createParams(){let{menuSvc:e,sortSvc:t,colFilter:i,gos:s}=this.beans;return I(s,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!i&&(!this.openFilterEnabled||de(this.gos)),showColumnMenu:(n,r)=>{e?.showColumnMenu({column:this.column,buttonElement:n,positionBy:"button",onClosedCallback:r})},showColumnMenuAfterMouseClick:(n,r)=>{e?.showColumnMenu({column:this.column,mouseEvent:n,positionBy:"mouse",onClosedCallback:r})},showFilter:n=>{e?.showFilterMenu({column:this.column,buttonElement:n,containerType:"columnFilter",positionBy:"button"})},progressSort:n=>{t?.progressSort(this.column,!!n,"uiColumnSorted")},setSort:(n,r)=>{t?.setSortForColumn(this.column,n,!!r,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(n,r)=>{s.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}})}setupSelectAll(e){let{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature.setComp(this))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===b.SPACE&&this.selectAllFeature?.onSpaceKeyDown(e),e.key===b.ENTER&&this.onEnterKeyDown(e),e.key===b.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){e.ctrlKey||e.metaKey?this.showMenuOnKeyPress(e,!0):this.sortable&&this.beans.sortSvc?.progressSort(this.column,e.shiftKey,"uiColumnSorted")}showMenuOnKeyPress(e,t){let i=this.comp.getUserCompInstance();Vn(i)&&i.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),Iu()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){let e=()=>{let t=this.column.getColDef(),i=Fa(t,this.gos,this.column,null),s=this.userHeaderClasses;this.userHeaderClasses=new Set(i),i.forEach(o=>{s.has(o)?s.delete(o):this.comp.toggleCss(o,!0)}),s.forEach(o=>this.comp.toggleCss(o,!1))};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null)}updateState(){let{menuSvc:e}=this.beans;this.menuEnabled=!!e?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!e?.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),Object.values(this.refreshFunctions).forEach(e=>e())}refreshHeaderComp(){let e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){let t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){let e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){let t=()=>{let i=this.column.getActualWidth();this.comp.setWidth(`${i}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){let t=()=>{this.comp.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){let t=()=>{this.comp?.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){let t=()=>{this.comp.toggleCss("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){let t=()=>{let i=this.column.isFilterActive();this.comp.toggleCss("ag-header-cell-filtered",i),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){let e=()=>{let t=!!this.column.getColDef().wrapHeaderText;this.comp.toggleCss("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){let e=this.column.getHighlighted(),t=e===0,i=e===1;this.comp.toggleCss("ag-header-highlight-before",t),this.comp.toggleCss("ag-header-highlight-after",i)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){let{eGui:e,column:t,comp:i,beans:s}=this,o=Uo(this.beans),n=o.reduce((c,u)=>c+=u,0)===0;if(i.toggleCss("ag-header-parent-hidden",n),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),i.toggleCss("ag-header-span-height",!1),i.toggleCss("ag-header-span-total",!1);return}let{numberOfParents:r,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();i.toggleCss("ag-header-span-height",r>0);let l=$o(s);if(r===0){i.toggleCss("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}i.toggleCss("ag-header-span-total",a);let d=0;for(let c=0;c<r;c++)d+=o[o.length-1-c];e.style.setProperty("top",`${-d}px`),e.style.setProperty("height",`${l+d}px`)}refreshAriaSort(){if(this.sortable){let e=this.getLocaleTextFunc(),t=this.beans.sortSvc?.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(ad(t)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){let e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!de(this.gos)){let e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){let e=this.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(e,t){t!=null?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){if(!this.eGui.contains($(this.beans)))return;let e=Array.from(this.ariaDescriptionProperties.keys()).sort((t,i)=>t==="filter"?-1:i.charCodeAt(0)-t.charCodeAt(0)).map(t=>this.ariaDescriptionProperties.get(t)).join(". ");this.beans.ariaAnnounce?.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){let t=o=>this.handleMouseOverChange(o.type==="mouseenter"),i=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},s=o=>this.handleContextMenuMouseEvent(o,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:i,contextmenu:s})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.toggleCss("ag-header-active",e)}getAnchorElementForMenu(e){let t=this.comp.getUserCompInstance();return Vn(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function Vn(e){return typeof e?.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var ug=0,Ls=class extends y{constructor(e,t,i){super(),this.rowIndex=e,this.pinned=t,this.type=i,this.instanceId=ug++,this.allCtrls=[];let s=i=="group"?"ag-header-row-column-group":i=="filter"?"ag-header-row-column-filter":"ag-header-row-column";this.headerRowClass=`ag-header-row ${s}`}postConstruct(){this.isPrintLayout=Z(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.allCtrls.every(e=>e.eGui!=null):!1}setComp(e,t,i=!0){this.comp=e,t=Ci(this,this.beans.context,t),i&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){let t=this.onRowHeightChanged.bind(this),i=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:i,virtualColumnsChanged:s=>this.onVirtualColumnsChanged(s.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",i),e.addManagedPropertyListener("ensureDomOrder",s=>this.isEnsureDomOrder=s.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=Z(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){let e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){let{visibleCols:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){let{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let{filterManager:e}=this.beans,t=[],i=Uo(this.beans),s=$o(this.beans);t.push(...i),t.push(s),e?.hasFloatingFilters()&&t.push(Ka(this.beans));let o=0;for(let r=0;r<this.rowIndex;r++)o+=t[r];let n=t[this.rowIndex];return{topOffset:o,rowHeight:n}}onVirtualColumnsChanged(e=!1){let t=this.getUpdatedHeaderCtrls(),i=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,i,e)}getUpdatedHeaderCtrls(){let e=this.ctrlsById;this.ctrlsById=new Map;let t=this.getColumnsInViewport();for(let s of t)this.recycleAndCreateHeaderCtrls(s,this.ctrlsById,e);let i=s=>{let{focusSvc:o,visibleCols:n}=this.beans;return o.isHeaderWrapperFocused(s)?n.isVisible(s.column):!1};if(e)for(let[s,o]of e)i(o)?this.ctrlsById.set(s,o):this.destroyBean(o);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,i){if(e.isEmptyGroup())return;let s=e.getUniqueId(),o;if(i&&(o=i.get(s),i.delete(s)),o&&o.column!=e&&(this.destroyBean(o),o=void 0),o==null)switch(this.type){case"filter":{o=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":o=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:o=this.createBean(new cg(e,this));break}t.set(s,o)}getColumnsInViewport(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}getColumnsInViewportPrintLayout(){if(this.pinned!=null)return[];let e=[],t=this.getActualDepth(),{colViewport:i}=this.beans;return["left",null,"right"].forEach(s=>{let o=i.getHeadersToRender(s,t);e=e.concat(o)}),e}getActualDepth(){return this.type=="filter"?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.beans.colViewport.getHeadersToRender(this.pinned,this.getActualDepth())}focusHeader(e,t){let i=this.allCtrls.find(o=>o.column==e);return i?i.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,super.destroy()}},hg=class extends y{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;let{pinnedCols:i,ctrlsSvc:s,colModel:o,colMoves:n,filterManager:r}=this.beans;this.setupCenterWidth(),i?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(n,this.eViewport);let a=this.onDisplayedColumnsChanged.bind(this,r);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),displayedColumnsChanged:a,advancedFilterEnabledChanged:a});let l=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;s.register(l,this),o.ready&&this.refresh()}getAllCtrls(){let e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){let{focusSvc:t,colModel:i,filterManager:s}=this.beans,o=0,n=t.getFocusHeaderToUseAfterRefresh(),r=()=>{let c=Zh(i)-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let u=0;u<c;u++){let h=this.createBean(new Ls(o++,this.pinned,"group"));this.groupsRowCtrls.push(h)}},a=()=>{let c=o++,u=!this.hidden&&(this.columnsRowCtrl==null||!e||this.columnsRowCtrl.rowIndex!==c);(u||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),u&&(this.columnsRowCtrl=this.createBean(new Ls(c,this.pinned,"column")))},l=()=>{this.includeFloatingFilter=!!s?.hasFloatingFilters()&&!this.hidden;let c=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){c();return}let u=o++;if(this.filtersRowCtrl){let h=this.filtersRowCtrl.rowIndex!==u;(!e||h)&&c()}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new Ls(u,this.pinned,"filter")))};r(),a(),l();let d=this.getAllCtrls();this.comp.setCtrls(d),this.restoreFocusOnHeader(t,n)}getHeaderCtrlForColumn(e){let t=i=>i?.getHeaderCellCtrls().find(s=>s.column===e);if(He(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let i=0;i<this.groupsRowCtrls.length;i++){let s=t(this.groupsRowCtrls[i]);if(s)return s}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,i){let o=this.getAllCtrls()[e];return o?o.focusHeader(t,i):!1}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}destroy(){this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl),this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls),super.destroy()}setupDragAndDrop(e,t){let i=e?.createBodyDropTarget(this.pinned,t);i&&this.createManagedBean(i)}restoreFocusOnHeader(e,t){if(!t)return;let{column:i}=t;i.getPinned()==this.pinned&&e.focusHeaderPosition({headerPosition:t})}onGridColumnsChanged(){this.refresh(!0)}onDisplayedColumnsChanged(e){let t=!!e?.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==t&&this.refresh(!0)}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new Wo(e=>this.comp.setCenterWidth(`${e}px`),!0))}},gg=class extends y{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){let{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){let{enterpriseMenuFactory:t,filterMenuFactory:i}=this.beans,s=t&&de(this.gos)?t:i;this.showColumnMenuCommon(s,e,e.containerType,!0)}showHeaderContextMenu(e,t,i){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,i)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){let{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(de(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&He(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){let e=!this.isSuppressMenuHide();return!(Je()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!de(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!de(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){let e=this.gos,t=e.get("suppressMenuHide");return de(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,i,s){let{positionBy:o,onClosedCallback:n}=t,r=t.column;if(o==="button"){let{buttonElement:a}=t;e?.showMenuAfterButtonClick(r,a,i,n,s)}else if(o==="mouse"){let{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(r,a,i,n,s)}else if(r){let a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(r,"auto"),Ve(a,()=>{let d=l.getHeaderRowContainerCtrl(r.getPinned())?.getHeaderCtrlForColumn(r);d&&e?.showMenuAfterButtonClick(r,d.getAnchorElementForMenu(s),i,n,s)})}}};function Nn(e,t,i){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",i))}var Ya=class extends V{constructor(){super()}},pg={tag:"span",cls:"ag-overlay-loading-center",attrs:{"aria-live":"polite","aria-atomic":"true"}},fg=class extends Ya{init(){let e=ke(this.gos.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(e??pg),!e){let t=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=t("loadingOoo","Loading...")})}}},mg={tag:"span",cls:"ag-overlay-no-rows-center"},Cg=class extends Ya{init(){let e=ke(this.gos.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(e??mg),!e){let t=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=t("noRowsToShow","No Rows To Show")})}}};function vg(e,t,i){let s=ge(e,t,i);if(s){let{className:n}=s;if(typeof n=="string"&&n.indexOf("ag-icon")>-1||typeof n=="object"&&n["ag-icon"])return s}let o=W({tag:"span"});return o.appendChild(s),o}function ge(e,t,i){let s=null;e==="smallDown"?F(262):e==="smallLeft"?F(263):e==="smallRight"&&F(264);let o=i&&i.getColDef().icons;if(o&&(s=o[e]),t.gos&&!s){let n=t.gos.get("icons");n&&(s=n[e])}if(s){let n;if(typeof s=="function")n=s();else if(typeof s=="string")n=s;else{F(38,{iconName:e});return}if(typeof n=="string")return Mo(n);if(Ao(n))return n;F(133,{iconName:e});return}else{let n=t.registry.getIcon(e);return n||t.validation?.validateIcon(e),W({tag:"span",cls:`ag-icon ag-icon-${n??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var wg=".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}",Sg={tag:"div",children:[{tag:"div",ref:"eGhost",cls:"ag-dnd-ghost ag-unselectable",children:[{tag:"span",ref:"eIcon",cls:"ag-dnd-ghost-icon ag-shake-left-to-right"},{tag:"div",ref:"eLabel",cls:"ag-dnd-ghost-label"}]}]},bg=class extends V{constructor(){super(),this.dragSource=null,this.eIcon=E,this.eLabel=E,this.eGhost=E,this.registerCSS(wg)}postConstruct(){let e=t=>vg(t,this.beans,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(Sg),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){let{eIcon:i,dragSource:s,dropIconMap:o,gos:n}=this;J(i);let r=null;e||(e=s?.getDefaultIconName?s.getDefaultIconName():"notAllowed"),r=o[e],i.classList.toggle("ag-shake-left-to-right",t),!(r===o.hide&&n.get("suppressDragLeaveHidesColumns"))&&r&&i.appendChild(r)}setLabel(e){this.eLabel.textContent=e}},yg=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",Rg=class extends V{constructor(e,t,i){super(t,i),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(yg)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");let{labelSeparator:e,label:t,labelWidth:i,labelAlignment:s,disabled:o}=this.config;o!=null&&this.setDisabled(o),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),i!=null&&this.setLabelWidth(i),this.setLabelAlignment(s||this.labelAlignment),this.refreshLabel()}refreshLabel(){let{label:e,eLabel:t}=this;J(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(U(t,!1),$e(t,"presentation")):(U(t,!0),$e(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){let e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){let i=this.getGui().classList;return i.toggle("ag-label-align-left",e==="left"),i.toggle("ag-label-align-right",e==="right"),i.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(zi(this.eLabel,e),this)}setDisabled(e){e=!!e;let t=this.getGui();return ni(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},Qa=class extends Rg{constructor(e,t,i,s){super(e,t,i),this.className=s}postConstruct(){super.postConstruct();let{width:e,value:t,onValueChange:i}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),i!=null&&this.onValueChange(i),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){let e=this.getAriaElement(),t=this.getLabelId(),i=this.getLabel();i==null||i==""||ld(e)!==null?Zs(e,""):Zs(e,t??"")}setAriaLabel(e){return rs(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return De(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function xg(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var Xe=class extends Qa{constructor(e,t,i="text",s="input"){super(e,e?.template??xg(s),[],t),this.inputType=i,this.displayFieldTag=s,this.eLabel=E,this.eWrapper=E,this.eInput=E}postConstruct(){super.postConstruct(),this.setInputType();let{eLabel:e,eWrapper:t,eInput:i,className:s}=this;e.classList.add(`${s}-label`),t.classList.add(`${s}-input-wrapper`),i.classList.add(`${s}-input`),this.addCss("ag-input-field"),i.id=i.id||`ag-${this.getCompId()}-input`;let{inputName:o,inputWidth:n}=this.config;o!=null&&this.setInputName(o),n!=null&&this.setInputWidth(n),this.addInputListeners(),this.activateTabIndex([i])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(){this.displayFieldTag==="input"&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(e){return zi(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){let t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return pe(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return rs(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return ni(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)pe(this.eInput,"autocomplete",null);else{let t=typeof e=="string"?e:"off";pe(this.eInput,"autocomplete",t)}return this}},Yo=class extends Xe{constructor(e,t="ag-checkbox",i="checkbox"){super(e,t,i),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();let{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;let e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){let t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;let i=this.eInput;i.checked=e,i.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,i){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:i});let s=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:s.id,name:s.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;let t=this.isSelected(),i=this.selected=e.target.checked;this.refreshSelectedClass(i),this.dispatchChange(i,t,e)}refreshSelectedClass(e){let t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},Qo={selector:"AG-CHECKBOX",component:Yo},Fg=".ag-checkbox-cell{height:100%}",Eg={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},Pg=class extends V{constructor(){super(Eg,[Qo]),this.eCheckbox=E,this.registerCSS(Fg)}init(e){this.refresh(e);let{eCheckbox:t,beans:i}=this,s=t.getInputElement();s.setAttribute("tabindex","-1"),Rr(s,"polite"),this.addManagedListeners(s,{click:o=>{if(lt(o),t.isDisabled())return;let n=t.getValue();this.onCheckboxChanged(n)},dblclick:o=>{lt(o)}}),this.addManagedElementListeners(e.eGridCell,{keydown:o=>{if(o.key===b.SPACE&&!t.isDisabled()){e.eGridCell===$(i)&&t.toggle();let n=t.getValue();this.onCheckboxChanged(n),o.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,i=!0,{value:s,column:o,node:n}=e;if(n.group&&o)if(typeof s=="boolean")t=s;else{let u=o.getColId();u.startsWith(ls)?t=s==null||s===""?void 0:s==="true":n.aggData&&n.aggData[u]!==void 0?t=s??void 0:i=!1}else t=s??void 0;let{eCheckbox:r}=this;if(!i){r.setDisplayed(!1);return}r.setValue(t);let a=e.disabled??!o?.isCellEditable(n);r.setDisabled(a);let l=this.getLocaleTextFunc(),d=Eo(l,t),c=a?d:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${d})`;r.setInputAriaLabel(c)}onCheckboxChanged(e){let{eventSvc:t,params:i}=this,{column:s,node:o,value:n}=i,r={column:s,colDef:s.getColDef(),data:o.data,node:o,rowIndex:o.rowIndex,rowPinned:o.rowPinned,value:n};t.dispatchEvent(R({type:"cellEditingStarted"},r));let a=o.setDataValue(s,e,"edit");t.dispatchEvent(O(R({type:"cellEditingStopped"},r),{oldValue:n,newValue:e,valueChanged:a})),a||this.updateCheckbox(i)}},zn=class{constructor(e,t){this.beans=e,this.floating=t,this.all=new Set,this.visible=new Set,this.order=[],this.queued=new Set}size(){return this.visible.size}add(e){let{all:t,visible:i,order:s}=this;t.has(e)||(t.add(e),i.add(e),s.push(e),this.sort())}delete(e){this.all.delete(e),this.visible.delete(e),this.queued.delete(e.id),me(this.order,e)}has(e){return this.visible.has(e)}forEach(e){this.order.forEach(e)}getByIndex(e){return this.order[e]}getById(e){for(let t of this.visible)if(t.id==e)return t}clear(){let{all:e,visible:t,order:i,queued:s}=this;e.clear(),s.clear(),t.clear(),i.length=0}sort(){let{sortSvc:e,rowNodeSorter:t}=this.beans,i=e?.getSortOptions()??[],s=Tg(this.order);if(this.order.sort((n,r)=>(n.pinnedSibling?.rowIndex??0)-(r.pinnedSibling?.rowIndex??0)),this.order=t?.doFullSort(this.order,i)??this.order,!s)return;let o=this.beans.gos.get("grandTotalRow");o==="bottom"||o==="pinnedBottom"?this.order.push(s):this.order.unshift(s)}hide(e){let{all:t,visible:i}=this;t.forEach(s=>e(s)?i.delete(s):i.add(s)),this.order=Array.from(i),this.sort()}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function Za(e){if(e.level===-1)return!0;let t=e.parent;return t?.childrenAfterSort?.some(i=>i==e)?Za(t):!1}function Os(e,t){let{gos:i,rowModel:s,filterManager:o}=e;return Ot(i,s)?!s.getRowNode(t.id):o?.isAnyFilterPresent()?!Za(t):i.get("pivotMode")?!t.group:!1}function Dg(e){return!!e.footer&&e.level===-1}function Mg(e){return!!e.pinnedSibling&&Dg(e.pinnedSibling)}function Tg(e){let t=e.findIndex(Mg);if(t>-1)return e.splice(t,1)?.[0]}var Ag=class extends y{postConstruct(){let{gos:e,beans:t}=this;this.top=new zn(t,"top"),this.bottom=new zn(t,"bottom");let i=o=>Os(t,o.pinnedSibling),s=()=>{let o=e.get("isRowPinned");o&&t.rowModel.forEachNode(n=>this.pinRow(n,o(n)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:()=>{this.tryToEmptyQueues(),this.pinGrandTotalRow(),this.forContainers(o=>o.hide(i)),this.refreshRowPositions(),this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(Ig),this.refreshRowPositions()},rowNodeDataChanged:({node:o})=>{(e.get("isRowPinnable")?.(o)??!0)||this.pinRow(o,null)},firstDataRendered:s}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(o=>o.hide(i)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:o})=>{this._grandTotalPinned=o==="pinnedBottom"?"bottom":o==="pinnedTop"?"top":null}),this.addManagedPropertyListener("isRowPinned",s)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{let i=[];t.forEach(s=>i.push(s)),i.forEach(s=>this.pinRow(s,null)),t.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,i){if(e.footer&&e.level>-1)return;if(e.footer&&e.level===-1){this._grandTotalPinned=t,Y(this.gos,this.beans.rowModel)&&this.beans.rowModel.refreshModel({step:"map"});return}let s=e.rowPinned??e.pinnedSibling?.rowPinned;if(s!=null&&t!=null&&t!=s){let r=e.rowPinned?e:e.pinnedSibling,a=e.rowPinned?e.pinnedSibling:e;this.pinRow(r,null,i),this.pinRow(a,t,i);return}let n=i&&Lg(this.beans,e,i);if(n){n.forEach(r=>this.pinRow(r,t));return}if(t==null){let r=e.rowPinned?e:e.pinnedSibling,a=this.findPinnedRowNode(r);if(!a)return;a.delete(r);let l=r.pinnedSibling;Hs(r),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(l)}else{let r=Wn(this.beans,e,t),a=this.getContainer(t);a.add(r),Os(this.beans,e)&&a.hide(l=>Os(this.beans,l.pinnedSibling)),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(e)}}isManual(){return!0}isEmpty(e){return this.getContainer(e).size()===0}isRowsToRender(e){return!this.isEmpty(e)}ensureRowHeightsValid(){let e=!1,t=0,i=s=>{if(s.rowHeightEstimated){let o=je(this.beans,s);s.setRowTop(t),s.setRowHeight(o.height),t+=o.height,e=!0}};return this.bottom.forEach(i),t=0,this.top.forEach(i),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){let e=this.top.size();if(e===0)return 0;let t=this.top.getByIndex(e-1);return t===void 0?0:t.rowTop+t.rowHeight}getPinnedBottomTotalHeight(){let e=this.bottom.size();if(e===0)return 0;let t=this.bottom.getByIndex(e-1);return t===void 0?0:t.rowTop+t.rowHeight}getPinnedTopRowCount(){return this.top.size()}getPinnedBottomRowCount(){return this.bottom.size()}getPinnedTopRow(e){return this.top.getByIndex(e)}getPinnedBottomRow(e){return this.bottom.getByIndex(e)}getPinnedRowById(e,t){return this.getContainer(t).getById(e)}forEachPinnedRow(e,t){this.getContainer(e).forEach(t)}getPinnedState(){let e=t=>{let i=[];return this.forEachPinnedRow(t,s=>i.push(s.pinnedSibling.id)),i};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,i)=>{for(let s of e[i]){let o=this.beans.rowModel.getRowNode(s);o?this.pinRow(o,i):t.queue(s)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{let i=new Set;e.forEachQueued(s=>{let o=this.beans.rowModel.getRowNode(s);o&&i.add(o)});for(let s of i)e.unqueue(s.id),this.pinRow(s,t)})}pinGrandTotalRow(){let e=this.beans.rowModel;if(!Y(this.gos,e))return;let t=e.rootNode?.sibling;if(!t)return;let i=this._grandTotalPinned,s=t.pinnedSibling,o=s&&this.findPinnedRowNode(s);if(i){if(o&&o.floating!==i&&(o.delete(s),Hs(s)),!o||o.floating!==i){let n=Wn(this.beans,t,i);this.getContainer(i).add(n)}}else{if(!o)return;o.delete(s),Hs(s)}}onGridStylesChanges(e){if(e.rowHeightChanged){let t=i=>{i.setRowHeight(i.rowHeight,!0)};this.forContainers(i=>i.forEach(t))}}getContainer(e){return e==="top"?this.top:this.bottom}findPinnedRowNode(e){if(this.top.has(e))return this.top;if(this.bottom.has(e))return this.bottom}refreshRowPositions(e){let t=i=>kg(this.beans,i);return e==null?this.forContainers(t):t(this.getContainer(e))}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e?.dispatchRowEvent("rowPinned")}};function kg(e,t){let i=0;t.forEach((s,o)=>{s.setRowTop(i),(s.rowHeightEstimated||s.rowHeight==null)&&s.setRowHeight(je(e,s).height),s.setRowIndex(o),i+=s.rowHeight})}function Wn(e,t,i){if(t.pinnedSibling)return t.pinnedSibling;let s=dh(t,e);s.setRowTop(null),s.setRowIndex(null),s.rowPinned=i;let o=i==="top"?Bo:Vo;return s.id=`${o}${i}-${t.id}`,s.pinnedSibling=t,t.pinnedSibling=s,s}function Hs(e){if(!e.pinnedSibling)return;e.rowPinned=null,e.setRowTop(null),e.setRowIndex(null);let t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function Ig(e){let t=new Set;e.forEach(i=>{i.group&&t.add(i)}),t.forEach(i=>{e.delete(i)})}function Lg(e,t,i){let{rowSpanSvc:s}=e,o=(i&&s?.isCellSpanning(i,t))??!1;if(i&&o){let n=s?.getCellSpan(i,t);if(n)return Array.from(n.spannedNodes)}}var Og=class extends y{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){let e=this.gos;this.setPinnedRowData(e.get("pinnedTopRowData"),"top"),this.setPinnedRowData(e.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",t=>this.setPinnedRowData(t.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",t=>this.setPinnedRowData(t.currentValue,"bottom")),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this)})}reset(){}isEmpty(e){return this.getCache(e).order.length===0}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}onGridStylesChanges(e){if(e.rowHeightChanged){let t=i=>{i.setRowHeight(i.rowHeight,!0)};_t(this.pinnedBottomRows,t),_t(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0,i=s=>{if(s.rowHeightEstimated){let o=je(this.beans,s);s.setRowTop(t),s.setRowHeight(o.height),t+=o.height,e=!0}};return _t(this.pinnedBottomRows,i),t=0,_t(this.pinnedTopRows,i),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){let i=this.getCache(t);if(e===void 0){i.order.length=0,i.cache={};return}let s=At(this.gos),o=t==="top"?Bo:Vo,n=new Set(i.order),r=[],a=new Set,l=0,d=-1;for(let c of e){let u=s?.({data:c,level:0,rowPinned:t})??o+this.nextId++;if(a.has(u)){F(96,{id:u,data:c});continue}d++,a.add(u),r.push(u);let h=ei(i,u);if(h!==void 0)h.data!==c&&h.updateData(c),l+=this.setRowTopAndRowIndex(h,l,d),n.delete(u);else{let g=new ct(this.beans);g.id=u,g.data=c,g.rowPinned=t,l+=this.setRowTopAndRowIndex(g,l,d),i.cache[u]=g,i.order.push(u)}}n.forEach(c=>{ei(i,c)?.clearRowTopAndRowIndex(),delete i.cache[c]}),i.order=r}setRowTopAndRowIndex(e,t,i){return e.setRowTop(t),e.setRowHeight(je(this.beans,e).height),e.setRowIndex(i),e.rowHeight}getPinnedTopTotalHeight(){return _n(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return _n(this.pinnedBottomRows)}getPinnedTopRowCount(){return mo(this.pinnedTopRows)}getPinnedBottomRowCount(){return mo(this.pinnedBottomRows)}getPinnedTopRow(e){return fo(this.pinnedTopRows,e)}getPinnedBottomRow(e){return fo(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return ei(this.getCache(t),e)}forEachPinnedRow(e,t){return _t(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function _n(e){let t=mo(e);if(t===0)return 0;let i=fo(e,t-1);return i===void 0?0:i.rowTop+i.rowHeight}function ei(e,t){return e.cache[t]}function fo(e,t){return ei(e,e.order[t])}function _t(e,t){e.order.forEach((i,s)=>{let o=ei(e,i);o&&t(o,s)})}function mo(e){return e.order.length}var Hg=class extends y{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){let e=()=>{let t=this.gos.get("enableRowPinning");this.inner&&this.destroyBean(this.inner),this.inner=this.createManagedBean(t?new Ag:new Og)};this.addManagedPropertyListener("enableRowPinning",e),e()}reset(){return this.inner.reset()}isEmpty(e){return this.inner.isEmpty(e)}isManual(){return this.inner.isManual()}isRowsToRender(e){return this.inner.isRowsToRender(e)}pinRow(e,t,i){return this.inner.pinRow(e,t,i)}ensureRowHeightsValid(){return this.inner.ensureRowHeightsValid()}getPinnedRowById(e,t){return this.inner.getPinnedRowById(e,t)}getPinnedTopTotalHeight(){return this.inner.getPinnedTopTotalHeight()}getPinnedBottomTotalHeight(){return this.inner.getPinnedBottomTotalHeight()}getPinnedTopRowCount(){return this.inner.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.inner.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.inner.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.inner.getPinnedBottomRow(e)}forEachPinnedRow(e,t){return this.inner.forEachPinnedRow(e,t)}getPinnedState(){return this.inner.getPinnedState()}setPinnedState(e){return this.inner.setPinnedState(e)}setGrandTotalPinned(e){return this.inner.setGrandTotalPinned(e)}getGrandTotalPinned(){return this.inner.getGrandTotalPinned()}},Gg="ROOT_NODE_ID",Bg=class extends y{constructor(){super(...arguments),this.nextId=0,this.allNodesMap={},this.rootNode=null}get treeData(){return!1}getRowNode(e){return this.allNodesMap[e]}extractRowData(){return this.rootNode?.allLeafChildren?.map(e=>e.data)}activate(e){this.rootNode=e,e.group=!0,e.level=-1,e.id=Gg,e.allLeafChildren=[],e.childrenAfterGroup=[],e.childrenAfterSort=[],e.childrenAfterAggFilter=[],e.childrenAfterFilter=[],this.updateRootSiblingArrays(e)}deactivate(){this.rootNode&&(this.allNodesMap={},this.rootNode=null)}destroy(){super.destroy(),this.allNodesMap={},this.rootNode=null}setNewRowData(e){let t=this.rootNode;t&&(this.dispatchRowDataUpdateStartedEvent(e),t.childrenAfterFilter=null,t.childrenAfterGroup=null,t.childrenAfterAggFilter=null,t.childrenAfterSort=null,t.childrenMapped=null,t.updateHasChildren(),this.allNodesMap={},this.nextId=0,this.loadNewRowData(e),this.updateRootSiblingArrays(t))}updateRootSiblingArrays(e){let t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter,t.childrenAfterGroup=e.childrenAfterGroup,t.childrenAfterAggFilter=e.childrenAfterAggFilter,t.childrenAfterSort=e.childrenAfterSort,t.childrenMapped=e.childrenMapped,t.allLeafChildren=e.allLeafChildren)}loadNewRowData(e){this.rootNode.allLeafChildren=e?.map((t,i)=>this.createRowNode(t,i))??[]}setImmutableRowData(e,t){let i=At(this.gos),s=!this.gos.get("suppressMaintainUnsortedOrder"),o=e.changedRowNodes,n=new Set,r=this.rootNode,a=r.allLeafChildren,l=a.length,d=!1,c=!1,u=!1,h=!1;for(let p=0,f=-1,m=t.length;p<m;p++){let C=t[p],v=this.getRowNode(i({data:C,level:0}));if(!v)d=!0,v=this.createRowNode(C,-1),o.add(v);else{if(s){let w=v.sourceRowIndex;h||(h=w<=f||d),f=w}v.data!==C&&(u=!0,v.updateData(C),o.update(v))}n.add(v)}let g=[];for(let p=0;p<l;p++){let f=a[p];n.has(f)||(c=!0,f.isSelected()&&g.push(f),f.pinnedSibling&&this.beans.pinnedRowModel?.pinRow(f.pinnedSibling,null),this.rowNodeDeleted(f),o.remove(f))}if(d||c||h){let p=new Array(n.size),f=0;if(!s)for(let C=0;C<l;++C){let v=a[C];n.delete(v)&&(v.sourceRowIndex=f,p[f++]=v)}for(let C of n)C.sourceRowIndex=f,p[f++]=C;r.allLeafChildren=p;let m=r.sibling;m&&(m.allLeafChildren=p),e.rowNodesOrderChanged||(e.rowNodesOrderChanged=h)}(d||c||h||u)&&(this.deselectNodes(g),e.rowDataUpdated=!0)}rowNodeDeleted(e){e.clearRowTopAndRowIndex();let t=e.id,i=this.allNodesMap;i[t]===e&&delete i[t]}updateRowData(e,t){this.dispatchRowDataUpdateStartedEvent(e.add);let i={changedRowNodes:t,rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},s=[],o=At(this.gos);return this.executeRemove(o,e,i,s),this.executeUpdate(o,e,i,s),this.executeAdd(e,i),this.deselectNodes(s),i}executeAdd(e,t){let i=e.add;if(!i?.length)return;let s=this.rootNode.allLeafChildren,o=s.length;if(typeof e.addIndex=="number"&&(o=this.sanitizeAddIndex(e.addIndex),o>0&&this.gos.get("treeData")&&this.gos.get("getDataPath"))){for(let u=0;u<s.length;u++)if(s[u]?.rowIndex==o-1){o=u+1;break}}let n=i.length,r=t.changedRowNodes,a=new Array(n);for(let c=0;c<n;c++){let u=this.createRowNode(i[c],o+c);r.add(u),a[c]=u}let l=this.rootNode;if(o<s.length){let c=s.slice(0,o),u=s.slice(o,s.length),h=c.length+a.length;for(let g=0,p=u.length;g<p;++g)u[g].sourceRowIndex=h+g;s=[...c,...a,...u],t.rowsInserted=!0}else s=s.concat(a);l.allLeafChildren=s;let d=l.sibling;d&&(d.allLeafChildren=s),t.rowNodeTransaction.add=a}executeRemove(e,t,{changedRowNodes:i,rowNodeTransaction:s},o){let{remove:n}=t;if(!n?.length)return;let r={};n.forEach(d=>{let c=this.lookupRowNode(e,d);c&&(c.isSelected()&&o.push(c),c.pinnedSibling&&this.beans.pinnedRowModel?.pinRow(c.pinnedSibling,null),c.clearRowTopAndRowIndex(),r[c.id]=!0,delete this.allNodesMap[c.id],s.remove.push(c),i.remove(c))});let a=this.rootNode;a.allLeafChildren=a.allLeafChildren?.filter(d=>!r[d.id])??null,a.allLeafChildren?.forEach((d,c)=>{d.sourceRowIndex=c});let l=a.sibling;l&&(l.allLeafChildren=a.allLeafChildren)}executeUpdate(e,t,{changedRowNodes:i,rowNodeTransaction:s},o){let{update:n}=t;n?.length&&n.forEach(r=>{let a=this.lookupRowNode(e,r);a&&(a.updateData(r),!a.selectable&&a.isSelected()&&o.push(a),s.update.push(a),i.update(a))})}dispatchRowDataUpdateStartedEvent(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselectNodes(e){let t="rowDataChanged",i=this.beans.selectionSvc,s=e.length>0;s&&i?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),i?.updateGroupsFromChildrenSelections?.(t),s&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:i?.getSelectedNodes()??null,serverSideState:null})}sanitizeAddIndex(e){let t=this.rootNode.allLeafChildren?.length??0;return e<0||e>=t||Number.isNaN(e)?t:Math.ceil(e)}createRowNode(e,t){let i=new ct(this.beans);return i.parent=this.rootNode,i.level=0,i.group=!1,i.expanded=!1,i.sourceRowIndex=t,i.setDataAndId(e,String(this.nextId)),this.allNodesMap[i.id]&&F(2,{nodeId:i.id}),this.allNodesMap[i.id]=i,this.nextId++,i}lookupRowNode(e,t){let i;if(e){let s=e({data:t,level:0});if(i=this.allNodesMap[s],!i)return z(4,{id:s}),null}else if(i=this.rootNode?.allLeafChildren?.find(s=>s.data===t),!i)return z(5,{data:t}),null;return i||null}};var Vg={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},Ng=class extends V{constructor(){super(Vg,[Qo]),this.eCheckbox=E}postConstruct(){this.eCheckbox.setPassive(!0)}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){let e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:i}=this,s=t.isSelected(),o=Eo(e,s),[n,r]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(n,r);i.setValue(s,!0),i.setInputAriaLabel(`${a} (${o})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:lt,click:s=>{lt(s),this.beans.selectionSvc?.handleSelectionEvent(s,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:s,previousValue:o})=>{let n=typeof s=="object"?Ps(s):void 0,r=typeof o=="object"?Ps(o):void 0;n!==r&&this.onSelectableChanged()}),lo(this.gos)||typeof this.getIsVisible()=="function"){let s=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:s}),this.addManagedListeners(this.rowNode,{dataChanged:s,cellChanged:s}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){let{column:e,rowNode:t,overrides:i,gos:s}=this,o=t.selectable,n=this.getIsVisible();if(o)if(typeof n=="function"){let l=i?.callbackParams;if(!e)o=n(O(R({},l),{node:t,data:t.data}));else{let d=e.createColumnFunctionCallbackParams(t);o=n(R(R({},l),d))}}else o=n??!1;let r=s.get("rowSelection");if(r&&typeof r!="string"?!Ps(r):e?.getColDef().showDisabledCheckboxes){this.eCheckbox.setDisabled(!o),this.setVisible(!0),this.setDisplayed(!0);return}if(i?.removeHidden){this.setDisplayed(o);return}this.setVisible(o)}getIsVisible(){let e=this.overrides;if(e)return e.isVisible;let t=this.gos.get("rowSelection");return t&&typeof t!="string"?Ft(t):this.column?.getColDef()?.checkboxSelection}},zg=class{constructor(e,t){this.rowModel=e,this.pinnedRowModel=t,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){let e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){if(this.rootId)return this.getRowNode(this.rootId);if(e)return this.setRoot(e),e}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(e){let t,{rowModel:i,pinnedRowModel:s}=this;return t??(t=i.getRowNode(e)),s?.isManual()&&(t??(t=s.getPinnedRowById(e,"top")),t??(t=s.getPinnedRowById(e,"bottom"))),t}truncate(e){let t=this.getRange();if(t.length===0)return{keep:[],discard:[]};let i=t[0].id===this.rootId,s=t.findIndex(o=>o.id===e.id);if(s>-1){let o=t.slice(0,s),n=t.slice(s+1);return this.setEndRange(e),i?{keep:o,discard:n}:{keep:n,discard:o}}else return{keep:t,discard:[]}}extend(e,t=!1){let i=this.getRoot();if(i==null){let o=this.getRange().slice();return t&&e.depthFirstSearch(n=>!n.group&&o.push(n)),o.push(e),this.setRoot(e),{keep:o,discard:[]}}let s=this.getNodesInRange(i,e);if(!s)return this.setRoot(e),{keep:[e],discard:[]};if(s.find(o=>o.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{let o=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:o}}}getNodesInRange(e,t){let{pinnedRowModel:i,rowModel:s}=this;if(!i?.isManual())return s.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&!t.rowPinned)return ue(i,"top",e,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),t)??[]);if(e.rowPinned==="bottom"&&!t.rowPinned){let o=ue(i,"bottom",void 0,e),n=s.getRowCount(),r=s.getRow(n-1);return(s.getNodesInRangeForSelection(t,r)??[]).concat(o)}if(!e.rowPinned&&!t.rowPinned)return s.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&t.rowPinned==="top")return ue(i,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){let o=ue(i,"top",t,void 0),n=ue(i,"bottom",void 0,e),r=s.getRow(0),a=s.getRow(s.getRowCount()-1);return o.concat(s.getNodesInRangeForSelection(r,a)??[]).concat(n)}if(!e.rowPinned&&t.rowPinned==="top")return ue(i,"top",t,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),e)??[]);if(e.rowPinned==="top"&&t.rowPinned==="bottom"){let o=ue(i,"top",e,void 0),n=ue(i,"bottom",void 0,t),r=s.getRow(0),a=s.getRow(s.getRowCount()-1);return o.concat(s.getNodesInRangeForSelection(r,a)??[]).concat(n)}if(e.rowPinned==="bottom"&&t.rowPinned==="bottom")return ue(i,"bottom",e,t);if(!e.rowPinned&&t.rowPinned==="bottom"){let o=ue(i,"bottom",void 0,t),n=s.getRow(s.getRowCount());return(s.getNodesInRangeForSelection(e,n)??[]).concat(o)}return null}},Wg=class extends y{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){let t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains($(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;let t=this.createManagedBean(new Yo);this.cbSelectAll=t,t.addCss("ag-header-select-all"),$e(t.getGui(),"presentation"),this.showOrHideSelectAll();let i=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:i,paginationChanged:i,modelUpdated:i}),this.addManagedPropertyListener("rowSelection",({currentValue:s,previousValue:o})=>{let n=r=>typeof r=="string"||!r||r.mode==="singleRow"?void 0:r.selectAll;n(s)!==n(o)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){let t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;let e=this.getSelectAllMode(),t=this.beans.selectionSvc,i=this.cbSelectAll,s=t.getSelectAllState(e);i.setValue(s);let o=t.hasNodesToSelect(e);i.setDisabled(!o),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){let t=this.getLocaleTextFunc(),{headerCellCtrl:i,cbSelectAll:s,cbSelectAllVisible:o}=this,r=s.getValue()?t("ariaChecked","checked"):t("ariaUnchecked","unchecked"),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");i.setAriaDescriptionProperty("selectAll",o?`${a} (${r})`:null),s.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||i.announceAriaDescription()}checkSelectionType(e){return di(this.gos)?!0:(F(128,{feature:e}),!1)}checkRightRowModelType(e){let{gos:t,rowModel:i}=this.beans;return Y(t)||Ot(t)?!0:(F(129,{feature:e,rowModel:i.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;let e=this.cbSelectAll.getValue(),t=this.getSelectAllMode(),i="uiSelectAll";t==="currentPage"?i="uiSelectAllCurrentPage":t==="filtered"&&(i="uiSelectAllFiltered");let s={source:i,selectAll:t},o=this.beans.selectionSvc;e?o.selectAllRowNodes(s):o.deselectAllRowNodes(s)}isCheckboxSelection(){let{column:e,gos:t,beans:i}=this,s=t.get("rowSelection"),o=e.getColDef(),{headerCheckboxSelection:n}=o,r=!1,a=typeof s=="object";if(a){let d=Gt(e),c=Oo(e);(_i(s)==="autoGroupColumn"&&c||d&&i.selectionColSvc?.isSelectionColumnEnabled())&&(r=Ai(s))}else typeof n=="function"?r=n(I(t,{column:e,colDef:o})):r=!!n;let l=a?"headerCheckbox":"headerCheckboxSelection";return r&&this.checkRightRowModelType(l)&&this.checkSelectionType(l)}getSelectAllMode(){let e=Zr(this.gos,!1);if(e)return e;let{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:i}=this.column.getColDef();return t?"currentPage":i?"filtered":"all"}},_g=class extends y{postConstruct(){let{gos:e,beans:t}=this;this.selectionCtx=new zg(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{let i=lo(e);i!==this.isRowSelectable&&(this.isRowSelectable=i,this.updateSelectable())}),this.isRowSelectable=lo(e)}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new Ng}createSelectAllFeature(e){return new Wg(e)}isMultiSelect(){return di(this.gos)}onRowCtrlSelected(e,t,i){let s=!!e.rowNode.isSelected();e.forEachGui(i,o=>{o.rowComp.toggleCss("ag-row-selected",s);let n=o.element;Js(n,s),n.contains($(this.beans))&&t(o)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;let t=e.isSelected();if(!e.selectable)return;let s=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(s,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!vi(e)||!tt(this.gos)}updateRowSelectable(e,t){let i=this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,i,t),i}setRowSelectable(e,t,i){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),i)return;if(ci(this.gos)){let o=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:o??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,i=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let s=0;s<e.childrenAfterGroup.length;s++){let o=e.childrenAfterGroup[s],n=o.isSelected();if(!o.selectable){let r=this.calculateSelectedFromChildren(o);if(r===null)continue;n=r}switch(n){case!0:t=!0;break;case!1:i=!0;break;default:return}}if(!(t&&i))return t?!0:i?!1:e.selectable?e.__selected:null}selectRowNode(e,t,i,s="api"){let o=!e.selectable&&t,n=e.__selected===t;if(o||n)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");let r=e.sibling;r&&r.footer&&r.__localEventService&&r.dispatchRowEvent("rowSelected");let a=e.pinnedSibling;return a&&a.rowPinned&&a.__localEventService&&a.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent(O(R({},ah(e,this.gos,"rowSelected")),{event:i||null,source:s})),!0}isCellCheckboxSelection(e,t){let i=this.gos.get("rowSelection");if(i&&typeof i!="string"){let s=Gt(e)&&Ft(i);return e.isColumnFunc(t,s)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,i,s){let{gos:o,selectionCtx:n}=this,r=e.isSelected(),a=ci(o),l=Yd(o),d=Qd(o),c=this.isMultiSelect(),u=s==="rowClicked";if(u&&!(l||d))return null;if(t&&i&&c){let h=n.getRoot();if(h)if(h.isSelected()){let g=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{deselect:g.discard,select:g.keep,reset:!1}}else{let g=n.extend(e,a);return{select:[],deselect:g.keep,reset:!1}}else return null}else if(t&&c){let h=n.selectAll?this.beans.rowModel.getRow(0):void 0,g=n.getRoot(h),p=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{select:p.keep,deselect:p.discard,reset:n.selectAll||!!(g&&!g.isSelected())}}else if(i){if(u){let h=!r;return h&&!l||!h&&!d?null:(n.setRoot(e),{node:e,newValue:h,clearSelection:!1})}return n.setRoot(e),{node:e,newValue:!r,clearSelection:!c}}else{n.setRoot(e);let h=Zd(o),g=$i(o)==="filteredDescendants",p=u&&(!h||!l);if(g&&r===void 0&&Y(o))return{node:e,newValue:!1,clearSelection:!c||p};if(u){let f=r?!h:l;return f===r&&!p||f&&!l||!f&&!d?null:{node:e,newValue:f,clearSelection:!c||p,keepDescendants:e.group&&a}}return{node:e,newValue:!r,clearSelection:!c||p}}}},Ug=class extends Yo{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){let t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}};var ft=class extends Xe{constructor(e,t="ag-text-field",i="text"){super(e,t,i)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){let i=this.eInput;return i.value!==e&&(i.value=P(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){let e=new RegExp(`[${this.config.allowedCharPattern}]`),t=i=>{Va(i)&&i.key&&!e.test(i.key)&&i.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:i=>{let s=i.clipboardData?.getData("text");s&&s.split("").some(o=>!e.test(o))&&i.preventDefault()}})}},cs={selector:"AG-INPUT-TEXT-FIELD",component:ft},$g=class extends Xe{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){let i=super.setValue(e,t);return this.eInput.value=e,i}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},Kg={selector:"AG-INPUT-TEXT-AREA",component:$g},Zo=class extends ft{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();let e=this.eInput;this.addManagedListeners(e,{blur:()=>{let n=parseFloat(e.value),r=isNaN(n)?"":this.normalizeValue(n.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";let{precision:t,min:i,max:s,step:o}=this.config;typeof t=="number"&&this.setPrecision(t),typeof i=="number"&&this.setMin(i),typeof s=="number"&&this.setMax(s),typeof o=="number"&&this.setStep(o)}onWheel(e){$(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){if(e==="")return"";this.precision!=null&&(e=this.adjustPrecision(e));let t=parseFloat(e),{min:i,max:s}=this;return i!=null&&t<i?e=i.toString():s!=null&&t>s&&(e=s.toString()),e}adjustPrecision(e,t){let i=this.precision;if(i==null)return e;if(t){let o=parseFloat(e).toFixed(i);return parseFloat(o).toString()}let s=String(e).split(".");if(s.length>1){if(s[1].length<=i)return e;if(i>0)return`${s[0]}.${s[1].slice(0,i)}`}return s[0]}setMin(e){return this.min===e?this:(this.min=e,pe(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,pe(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,pe(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(i=>super.setValue(i,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,i){if(P(i)){let s=this.isScientificNotation(i);if(s&&this.eInput.validity.valid)return e(i);if(!s){i=this.adjustPrecision(i);let o=this.normalizeValue(i);s=i!=o}if(s)return t(i)}return e(i)}getValue(){let e=this.eInput;if(!e.validity.valid)return;let t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},jg={selector:"AG-INPUT-NUMBER-FIELD",component:Zo};function ti(e,t){return e.toString().padStart(t,"0")}function fe(e,t=!0,i="-"){if(!e)return null;let s=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(o=>ti(o,2)).join(i);return t&&(s+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map(o=>ti(o,2)).join(":")),s}var Gs=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function ii(e,t="YYYY-MM-DD"){let i=ti(e.getFullYear(),4),s=["January","February","March","April","May","June","July","August","September","October","November","December"],o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],n={YYYY:()=>i.slice(i.length-4,i.length),YY:()=>i.slice(i.length-2,i.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>s[e.getMonth()],MMM:()=>s[e.getMonth()].slice(0,3),MM:()=>ti(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${Gs(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${Gs(e.getDate())}`,DD:()=>ti(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>o[e.getDay()],ddd:()=>o[e.getDay()].slice(0,3),dd:()=>o[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${Gs(e.getDay())}`,d:()=>`${e.getDay()}`},r=new RegExp(Object.keys(n).join("|"),"g");return t.replace(r,a=>a in n?n[a]():a)}function re(e){if(!e)return null;let[t,i]=e.split(" ");if(!t)return null;let s=t.split("-").map(u=>parseInt(u,10));if(s.filter(u=>!isNaN(u)).length!==3)return null;let[o,n,r]=s,a=new Date(o,n-1,r);if(a.getFullYear()!==o||a.getMonth()!==n-1||a.getDate()!==r)return null;if(!i||i==="00:00:00")return a;let[l,d,c]=i.split(":").map(u=>parseInt(u,10));return l>=0&&l<24&&a.setHours(l),d>=0&&d<60&&a.setMinutes(d),c>=0&&c<60&&a.setSeconds(c),a}var qg=class extends ft{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();let e=ut();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){$(this.beans)===this.eInput&&e.preventDefault()}setMin(e){let t=e instanceof Date?fe(e??null,!1)??void 0:e;return this.min===t?this:(this.min=t,pe(this.eInput,"min",t),this)}setMax(e){let t=e instanceof Date?fe(e??null,!1)??void 0:e;return this.max===t?this:(this.max=t,pe(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,pe(this.eInput,"step",e),this)}getDate(){if(this.eInput.validity.valid)return re(this.getValue())??void 0}setDate(e,t){this.setValue(fe(e??null,!1),t)}},Xa={selector:"AG-INPUT-DATE-FIELD",component:qg},Yg=1e3,Qg=1e3,Un=100,$n,Di=!1,Zg=class extends y{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc,this.userCompFactory=e.userCompFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");let e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){let t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){return e==="show"?this.tooltipCtrl.getTooltipShowDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipShowDelay"):this.tooltipCtrl.getTooltipHideDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){let e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!Je()&&(Di?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},Un):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){let t=e.relatedTarget,i=this.tooltipCtrl.getGui(),s=this.tooltipComp?.getGui();this.isInteractingWithTooltip||i.contains(t)||this.interactionEnabled&&s?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||Di)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-$n<Yg}setToDoNothing(e){!e&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){let e=this.getTooltipValue(),t=this.tooltipCtrl;if(!P(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}let i=t.getRowNode?.(),s=I(this.gos,R({location:t.getLocation?.()??"UNKNOWN",colDef:t.getColDef?.(),column:t.getColumn?.(),rowIndex:t.getRowIndex?.(),node:i,data:i?.data,value:e,valueFormatted:t.getValueFormatted?.(),hideTooltipCallback:()=>this.hideTooltip(!0)},t.getAdditionalParams?.()??{}));this.state=2,this.tooltipInstanceCount++;let o=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);hu(this.userCompFactory,s)?.newAgStackInstance().then(o)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),$n=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}let s=t.getGui();this.tooltipComp=t,s.classList.contains("ag-tooltip")||s.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&s.classList.add("ag-tooltip-animate"),this.interactionEnabled&&s.classList.add("ag-tooltip-interactive");let o=this.getLocaleTextFunc(),n=this.popupSvc?.addPopup({eChild:s,ariaLabel:o("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){let r=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:r,columnMoved:r})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(s,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(q(this.beans),{keydown:r=>{s.contains(r?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(s,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:s,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){let e=this.tooltipComp?.getGui(),t=$(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){let t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){let e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupSvc?.positionPopupUnderMouseEvent(O(R({},e),{mouseEvent:this.lastMouseEvent})):this.popupSvc?.positionPopupByComponent(O(R({},e),{eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5}))}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");let e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,i=this.tooltipTrigger===0?Qg:0;window.setTimeout(()=>{e(),this.destroyBean(t)},i),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(e=>{e&&e()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){Di=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},Un)}unlockService(){Di=!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()}};function Bs(e){return e.get("tooltipShowMode")==="whenTruncated"}function Hi(e){return()=>{let t=e();return t?t.scrollWidth>t.clientWidth:!0}}var Xg=class extends y{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e){let t="title",i=this.ctrl.getGui();i&&(e!=null&&e!=""?i.setAttribute(t,e):i.removeAttribute(t))}updateTooltipText(){let{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){this.tooltipManager==null&&(this.tooltipManager=this.createBean(new Zg(this.ctrl,()=>this.tooltip),this.beans.context))}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},Jg=class extends V{constructor(e="default",t=!1){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.unFocusable=t,this.activeClass="ag-active-item",this.options=[],this.itemEls=[]}postConstruct(){let e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()}),!this.unFocusable&&this.addManagedElementListeners(e,{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(e){let t=e.key;switch(t){case b.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{let i=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(i)}break;case b.DOWN:case b.UP:e.preventDefault(),this.navigate(t);break;case b.PAGE_DOWN:case b.PAGE_UP:case b.PAGE_HOME:case b.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}navigate(e){let t=e===b.DOWN,i,{itemEls:s,highlightedEl:o}=this;if(!o)i=s[t?0:s.length-1];else{let r=s.indexOf(o)+(t?1:-1);r=Math.min(Math.max(r,0),s.length-1),i=s[r]}this.highlightItem(i)}navigateToPage(e){let{itemEls:t,highlightedEl:i}=this;if(!i||t.length===0)return;let s=t.indexOf(i),o=this.options.length-1,n=t[0].clientHeight,r=Math.floor(this.getGui().clientHeight/n),a=-1;e===b.PAGE_HOME?a=0:e===b.PAGE_END?a=o:e===b.PAGE_DOWN?a=Math.min(s+r,o):e===b.PAGE_UP&&(a=Math.max(s-r,0)),a!==-1&&this.highlightItem(t[a])}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){let{value:t,text:i}=e,s=i??t;return this.options.push({value:t,text:s}),this.renderOption(t,s),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach(e=>{se(e)}),this.itemEls=[],this.refreshAriaRole()}refreshAriaRole(){let e=this.getGui();$e(e,this.options.length===0?"presentation":"listbox")}updateIndices(){let e=this.getGui().querySelectorAll(".ag-list-item");this.refreshAriaRole(),e.forEach((t,i)=>{gd(t,i+1),hd(t,e.length)})}renderOption(e,t){let i=W({tag:"div",cls:`ag-list-item ag-${this.cssIdentifier}-list-item`,attrs:{role:"option"}}),s=W({tag:"span",children:t});i.appendChild(s),this.unFocusable||(i.tabIndex=-1),this.itemEls.push(i),this.addManagedListeners(i,{mouseover:()=>this.highlightItem(i),mousedown:o=>{o.preventDefault(),o.stopPropagation(),this.setValue(e)}}),this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getTooltipValue:()=>t,getGui:()=>i,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>s.scrollWidth>s.clientWidth})),this.getGui().appendChild(i)}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;let i=this.options.findIndex(s=>s.value===e);if(i!==-1){let s=this.options[i];this.value=s.value,this.displayValue=s.text,this.highlightItem(this.itemEls[i]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();let e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.itemEls[e])}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}highlightItem(e){if(!ye(e))return;this.clearHighlighted(),this.highlightedEl=e,e.classList.add(this.activeClass),Js(e,!0);let t=this.getGui(),{scrollTop:i,clientHeight:s}=t,{offsetTop:o,offsetHeight:n}=e;(o+n>i+s||o<i)&&e.scrollIntoView({block:"nearest"}),this.unFocusable||e.focus()}clearHighlighted(){let e=this.highlightedEl;!e||!ye(e)||(e.classList.remove(this.activeClass),Js(e,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},ep=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:disabled{opacity:.5}&.ag-picker-has-focus,&:focus-within{background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow)}}",tp={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},ip=class extends Qa{constructor(e){if(super(e,e?.template||tp,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=E,this.eWrapper=E,this.eDisplayField=E,this.eIcon=E,this.registerCSS(ep),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;let{pickerGap:t,maxPickerHeight:i,variableWidth:s,minPickerWidth:o,maxPickerWidth:n}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!s,i!=null&&this.setPickerMaxHeight(i),o!=null&&this.setPickerMinWidth(o),n!=null&&this.setPickerMaxWidth(n)}postConstruct(){super.postConstruct(),this.setupAria();let e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);let t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});let{pickerIcon:i,inputWidth:s}=this.config;if(i){let o=ge(i,this.beans);o&&this.eIcon.appendChild(o)}s!=null&&this.setInputWidth(s)}setupAria(){let e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),Xs(e,!1),this.ariaRole&&$e(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){let t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case b.UP:case b.DOWN:case b.ENTER:case b.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case b.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());let e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){let e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));let t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:i,pickerAriaLabelValue:s,modalPicker:o=!0},maxPickerHeight:n,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:d,eWrapper:c}=this,u={modal:o,eChild:e,closeOnEsc:!0,closedCallback:()=>{let f=Kr(d);this.beforeHidePicker(),f&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(i,s),anchorToElement:c};e.style.position="absolute";let h=d.popupSvc,g=h.addPopup(u);l?(r&&(e.style.minWidth=r),e.style.width=To(Bi(c)),a&&(e.style.maxWidth=a)):zi(e,a??Bi(c));let p=n??`${Do(h.getPopupParent())}px`;return e.style.setProperty("max-height",p),this.alignPickerToComponent(),g.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;let{pickerGap:e,config:{pickerType:t},beans:{popupSvc:i,gos:s},eWrapper:o,pickerComponent:n}=this,r=s.get("enableRtl")?"right":"left";i.positionPopupByComponent({type:t,eventSource:o,ePopup:n.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);let e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;let t=this.getAriaElement();Xs(t,e);let i=this.eWrapper.classList;i.toggle("ag-picker-expanded",e),i.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker?.()}setInputWidth(e){return zi(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},sp=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}",Xo=class extends ip{constructor(e){super(R({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox"},e)),this.registerCSS(sp)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Hi(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");let{options:e,value:t,placeholder:i}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),i&&t==null&&(this.eDisplayField.textContent=i),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){let e=this.createBean(new Jg("select",!0));this.listComponent=e,e.setParentComponent(this);let t=e.getAriaElement(),i=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",i),bd(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:s=>{s?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}onKeyDown(e){let{key:t}=e;switch(t===b.TAB&&this.hidePicker(),t){case b.ENTER:case b.UP:case b.DOWN:case b.PAGE_UP:case b.PAGE_DOWN:case b.PAGE_HOME:case b.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case b.ESCAPE:super.onKeyDown(e);break;case b.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){let e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}setValue(e,t,i){let{listComponent:s,config:{placeholder:o},eDisplayField:n,tooltipFeature:r}=this;if(this.value===e||!s)return this;if(i||s.setValue(e,!0),s.getValue()===this.getValue())return this;let l=s.getDisplayValue();return l==null&&o&&(l=o),n.textContent=l,r?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},op={selector:"AG-SELECT",component:Xo},Vs={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},np=class extends y{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;let{comp:t,eTopGuard:i,eBottomGuard:s,focusTrapActive:o,forceFocusOutWhenTabGuardsAreEmpty:n,isFocusableContainer:r,focusInnerElement:a,onFocusIn:l,onFocusOut:d,shouldStopEventPropagation:c,onTabKeyDown:u,handleKeyDown:h,isEmpty:g,eFocusableElement:p}=e;this.comp=t,this.eTopGuard=i,this.eBottomGuard=s,this.providedFocusInnerElement=a,this.eFocusableElement=p,this.focusTrapActive=!!o,this.forceFocusOutWhenTabGuardsAreEmpty=!!n,this.isFocusableContainer=!!r,this.providedFocusIn=l,this.providedFocusOut=d,this.providedShouldStopEventPropagation=c,this.providedOnTabKeyDown=u,this.providedHandleKeyDown=h,this.providedIsEmpty=g}postConstruct(){this.createManagedBean(new Bt(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach(e=>this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)}))}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;let e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():Dt(this.eFocusableElement,".ag-tab-guard").length===0)){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;let t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){let t=q(this.beans),i=Dt(t.body,null,!0),s=i.indexOf(e?this.eTopGuard:this.eBottomGuard);if(s===-1)return;let o,n;e?(o=0,n=s):(o=s+1,n=i.length);let r=i.slice(o,n),a=this.gos.get("tabIndex");r.sort((l,d)=>{let c=parseInt(l.getAttribute("tabindex")||"0"),u=parseInt(d.getAttribute("tabindex")||"0");return u===a?1:c===a?-1:c===0?1:u===0?-1:c-u}),r[e?r.length-1:0]?.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;let t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();let i=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),i&&(i.focus(),e.preventDefault())}focusInnerElement(e=!1){let t=Dt(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length?(t[e?t.length-1:0].focus({preventScroll:!0}),!0):!1}getNextFocusableElement(e){return pt(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;let t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},rp=class extends y{constructor(e){super(),this.comp=e}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();let{eTopGuard:t,eBottomGuard:i,eFocusableElement:s}=this,o=[t,i],n={setTabIndex:m=>{o.forEach(C=>m!=null?C.setAttribute("tabindex",m):C.removeAttribute("tabindex"))}};this.addTabGuards(t,i);let{focusTrapActive:r=!1,onFocusIn:a,onFocusOut:l,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f}=e;this.tabGuardCtrl=this.createManagedBean(new np({comp:n,focusTrapActive:r,eTopGuard:t,eBottomGuard:i,eFocusableElement:s,onFocusIn:a,onFocusOut:l,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){let t=q(this.beans).createElement("div"),i=e==="top"?Vs.TAB_GUARD_TOP:Vs.TAB_GUARD_BOTTOM;return t.classList.add(Vs.TAB_GUARD,i),$e(t,"presentation"),t}addTabGuards(e,t){let i=this.eFocusableElement;i.insertAdjacentElement("afterbegin",e),i.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){let e=[this.eTopGuard,this.eBottomGuard];J(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,i){Ao(t)||(t=t.getGui());let{eBottomGuard:s}=this;s?s.insertAdjacentElement("beforebegin",t):e(t,i)}destroy(){let{eTopGuard:e,eBottomGuard:t}=this;se(e),se(t),super.destroy()}},Ja=class extends V{initialiseTabGuard(e){this.tabGuardFeature=this.createManagedBean(new rp(this)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},Vt=class extends V{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){let e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},Qe=class{constructor(e,t=!1){this.DOUBLE_TAP_MILLIS=500,this.destroyFuncs=[],this.touching=!1,this.localEventService=new rt,this.preventMouseClick=t;let i=this.onTouchStart.bind(this),s=this.onTouchMove.bind(this),o=this.onTouchEnd.bind(this);e.addEventListener("touchstart",i,{passive:!0}),e.addEventListener("touchmove",s,{passive:!0}),e.addEventListener("touchend",o,{passive:!1}),this.destroyFuncs.push(()=>{e.removeEventListener("touchstart",i,{passive:!0}),e.removeEventListener("touchmove",s,{passive:!0}),e.removeEventListener("touchend",o,{passive:!1})})}getActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}onTouchStart(e){if(this.touching)return;this.touchStart=e.touches[0],this.touching=!0,this.moved=!1;let t=this.touchStart;window.setTimeout(()=>{let i=this.touchStart===t;if(this.touching&&i&&!this.moved){this.moved=!0;let s={type:"longTap",touchStart:this.touchStart,touchEvent:e};this.localEventService.dispatchEvent(s)}},500)}onTouchMove(e){if(!this.touching)return;let t=this.getActiveTouch(e.touches);if(!t)return;!La(t,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(e){if(this.touching){if(!this.moved){let t={type:"tap",touchStart:this.touchStart};this.localEventService.dispatchEvent(t),this.checkForDoubleTap()}this.preventMouseClick&&e.cancelable&&e.preventDefault(),this.touching=!1}}checkForDoubleTap(){let e=Date.now();if(this.lastTapTime&&this.lastTapTime>0)if(e-this.lastTapTime>this.DOUBLE_TAP_MILLIS){let i={type:"doubleTap",touchStart:this.touchStart};this.localEventService.dispatchEvent(i),this.lastTapTime=null}else this.lastTapTime=e;else this.lastTapTime=e}destroy(){this.destroyFuncs.forEach(e=>e())}};var Jo=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${Gr}/${this.frameworkName}-data-grid`,Od(this.baseDocLink)}setInterval(e,t){return new ie(i=>{i(window.setInterval(e,t))})}addEventListener(e,t,i,s){let o={};if(typeof s=="object"?o=s:typeof s=="boolean"&&(o={capture:s}),o.passive==null){let n=oa(t);n!=null&&(o.passive=n)}e.addEventListener(t,i,o)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return`${this.baseDocLink}${e?`/${e}`:""}`}};function ap(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var lp=["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","rowSpanSvc","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","funcColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],Kn=Object.fromEntries(lp.map((e,t)=>[e,t]));function dp(e,t){let i=(e.beanName?Kn[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,s=(t.beanName?Kn[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return i-s}function cp(e,t){return e?.beanName==="gridDestroySvc"?-1:t?.beanName==="gridDestroySvc"?1:0}var up={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},hp={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},gp={tag:"div",cls:"ag-header-viewport",role:"presentation",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"rowgroup"}]},Ns=class extends V{constructor(e){super(),this.eCenterContainer=E,this.headerRowComps={},this.rowCompsList=[],this.pinned=e}postConstruct(){this.selectAndSetTemplate();let e={setDisplayed:i=>this.setDisplayed(i),setCtrls:i=>this.setCtrls(i),setCenterWidth:i=>this.eCenterContainer.style.width=i,setViewportScrollLeft:i=>this.getGui().scrollLeft=i,setPinnedContainerWidth:i=>{let s=this.getGui();s.style.width=i,s.style.maxWidth=i,s.style.minWidth=i}};this.createManagedBean(new hg(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){let e=this.pinned=="left",t=this.pinned=="right",i=e?up:t?hp:gp;this.setTemplate(i),this.eRowContainer=this.eCenterContainer!==E?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())}setCtrls(e){let t=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let i,s=o=>{let n=o.getGui();n.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(n),i&&Lr(this.eRowContainer,n,i),i=n};e.forEach(o=>{let n=o.instanceId,r=t[n];delete t[n];let a=r||this.createBean(new lg(o));this.headerRowComps[n]=a,this.rowCompsList.push(a),s(a)}),Object.values(t).forEach(o=>this.destroyRowComp(o))}},pp={tag:"div",cls:"ag-header",role:"presentation"},fp=class extends V{constructor(){super(pp)}postConstruct(){let e={toggleCss:(s,o)=>this.toggleCss(s,o),setHeightAndMinHeight:s=>{this.getGui().style.height=s,this.getGui().style.minHeight=s}};this.createManagedBean(new tg).setComp(e,this.getGui(),this.getFocusableElement());let i=s=>{this.createManagedBean(s),this.appendChild(s)};i(new Ns("left")),i(new Ns(null)),i(new Ns("right"))}},mp={selector:"AG-HEADER-ROOT",component:fp},Cp=class extends V{constructor(e,t,i,s,o){super(),this.cellCtrl=t,this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.column=t.column,this.rowNode=t.rowNode,this.eRow=s;let n=W({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.column.colIdSanitised}});this.eCell=n;let r;t.isCellSpanning()?(r=W({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),r.appendChild(n),this.setTemplateFromElement(r)):this.setTemplateFromElement(n),this.cellCssManager=new Sa(()=>n),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);let a={toggleCss:(l,d)=>this.cellCssManager.toggleCss(l,d),setUserStyles:l=>mi(n,l),getFocusableElement:()=>n,setIncludeSelection:l=>this.includeSelection=l,setIncludeRowDrag:l=>this.includeRowDrag=l,setIncludeDndSource:l=>this.includeDndSource=l,setRenderDetails:(l,d,c)=>this.setRenderDetails(l,d,c),setEditDetails:(l,d,c)=>this.setEditDetails(l,d,c),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue()};t.setComp(a,n,r,this.eCellWrapper,i,o,void 0)}getParentOfValue(){return this.eCellValue??this.eCellWrapper??this.eCell}setRenderDetails(e,t,i){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;let o=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(i||o)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t))}setEditDetails(e,t,i){e?this.createCellEditorInstance(e,t,i):this.destroyEditor()}removeControls(){let e=this.beans.context;this.checkboxSelectionComp=e.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=e.destroyBean(this.dndSourceComp),this.rowDraggingComp=e.destroyBean(this.rowDraggingComp)}refreshWrapper(e){let t=this.includeRowDrag||this.includeDndSource||this.includeSelection,i=t||this.forceWrapper,s=i&&this.eCellWrapper==null;s&&(this.eCellWrapper=W({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));let o=!i&&this.eCellWrapper!=null;o&&(se(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssManager.toggleCss("ag-cell-value",!i);let n=!e&&i,r=n&&this.eCellValue==null;r&&(this.eCellValue=W({tag:"span",cls:"ag-cell-value",role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue));let a=!n&&this.eCellValue!=null;a&&(se(this.eCellValue),this.eCellValue=void 0);let l=s||o||r||a;return l&&this.removeControls(),!e&&t&&this.addControls(),l}addControls(){let{cellCtrl:e,eCellWrapper:t,eCellValue:i,includeRowDrag:s,includeDndSource:o,includeSelection:n}=this,r=a=>{a&&t.insertBefore(a.getGui(),i)};s&&this.rowDraggingComp==null&&(this.rowDraggingComp=e.createRowDragComp(),r(this.rowDraggingComp)),o&&this.dndSourceComp==null&&(this.dndSourceComp=e.createDndSource(),r(this.dndSourceComp)),n&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=e.createSelectionCheckbox(),r(this.checkboxSelectionComp))}createCellEditorInstance(e,t,i){let s=this.editorVersion,o=e.newAgStackInstance(),{params:n}=e;o.then(a=>this.afterCellEditorCreated(s,a,n,t,i)),_(this.cellEditor)&&n.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){let t=this.getParentOfValue();J(t);let i=Ht(e);i!=null&&(t.textContent=i)}destroyRenderer(){let{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),se(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){let{context:e}=this.beans;(this.cellEditorPopupWrapper?.getGui().contains($(this.beans))||this.cellCtrl.hasBrowserFocus())&&this.eCell.focus({preventScroll:!0}),this.hideEditorPopup?.(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),se(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(this.cellRenderer?.refresh==null||this.cellRendererClass!==e.componentClass)return!1;let t=this.cellRenderer.refresh(e.params);return t===!0||t===void 0}createCellRendererInstance(e){let t=this.rendererVersion,{componentClass:i}=e,s=()=>{if(this.rendererVersion!==t||!this.isAlive())return;let r=e.newAgStackInstance(),a=this.afterCellRendererCreated.bind(this,t,i);r?.then(a)},{animationFrameSvc:o}=this.beans;o?.active&&this.firstRender?o.createTask(s,this.rowNode.rowIndex,"p2",e.componentFromFramework):s()}afterCellRendererCreated(e,t,i){if(!this.isAlive()||e!==this.rendererVersion){this.beans.context.destroyBean(i);return}this.cellRenderer=i,this.cellRendererClass=t;let o=i.getGui();if(this.cellRendererGui=o,o!=null){let n=this.getParentOfValue();J(n),n.appendChild(o)}}afterCellEditorCreated(e,t,i,s,o){let n=e!==this.editorVersion,{context:r}=this.beans;if(n){r.destroyBean(t);return}if(t.isCancelBeforeStart&&t.isCancelBeforeStart()){r.destroyBean(t),this.cellCtrl.stopEditing(!0);return}if(!t.getGui){F(97,{colId:this.column.getId()}),r.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();let l=s||t.isPopup!==void 0&&t.isPopup();l?this.addPopupCellEditor(i,o):this.addInCellEditor(),this.refreshEditStyles(!0,l),t.afterGuiAttached?.(),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){let{cellCssManager:i}=this;i.toggleCss("ag-cell-inline-editing",e&&!t),i.toggleCss("ag-cell-popup-editing",e&&!!t),i.toggleCss("ag-cell-not-inline-editing",!e||!!t),this.cellCtrl.setInlineEditingCss()}addInCellEditor(){let{eCell:e}=this;e.contains($(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),J(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){let{gos:i,context:s,editSvc:o,popupSvc:n,localeSvc:r}=this.beans;i.get("editType")==="fullRow"&&F(98);let a=this.cellEditor;this.cellEditorPopupWrapper=s.createBean(o.createPopupEditorWrapper(e));let l=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&l.appendChild(this.cellEditorGui);let d=i.get("stopEditingWhenCellsLoseFocus"),c=t??a.getPopupPosition?.()??"over",u=i.get("enableRtl"),h={ePopup:l,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.eCell,position:c,alignSide:u?"right":"left",keepWithinBounds:!0},g=n.positionPopupByComponent.bind(n,h),p=Sr(r),f=n.addPopup({modal:d,eChild:l,closeOnEsc:!0,closedCallback:()=>{this.cellCtrl.onPopupEditorClosed()},anchorToElement:this.eCell,positionCallback:g,ariaLabel:p("ariaLabelCellEditor","Cell Editor")});f&&(this.hideEditorPopup=f.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}destroy(){this.cellCtrl.stopEditing(),this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},vp=class extends V{constructor(e,t,i){super(),this.cellComps=new Map,this.beans=t,this.rowCtrl=e;let s=W({tag:"div",role:"row",attrs:{"comp-id":`${this.getCompId()}`}});this.setInitialStyle(s,i),this.setTemplateFromElement(s);let o=s.style;this.domOrder=this.rowCtrl.getDomOrder();let n={setDomOrder:r=>this.domOrder=r,setCellCtrls:r=>this.setCellCtrls(r),showFullWidth:r=>this.showFullWidth(r),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,toggleCss:(r,a)=>this.toggleCss(r,a),setUserStyles:r=>mi(s,r),setTop:r=>o.top=r,setTransform:r=>o.transform=r,setRowIndex:r=>s.setAttribute("row-index",r),setRowId:r=>s.setAttribute("row-id",r),setRowBusinessKey:r=>s.setAttribute("row-business-key",r),refreshFullWidth:r=>this.fullWidthCellRenderer?.refresh?.(r())??!1};e.setComp(n,this.getGui(),i,void 0),this.addDestroyFunc(()=>{e.unsetComp(i)})}setInitialStyle(e,t){let i=this.rowCtrl.getInitialTransform(t);if(i)e.style.setProperty("transform",i);else{let s=this.rowCtrl.getInitialRowTop(t);s&&e.style.setProperty("top",s)}}showFullWidth(e){let t=s=>{if(this.isAlive()){let o=s.getGui();this.getGui().appendChild(o),this.rowCtrl.setupDetailRowAutoHeight(o),this.setFullWidthRowComp(s)}else this.beans.context.destroyBean(s)};e.newAgStackInstance().then(t)}setCellCtrls(e){let t=new Map(this.cellComps);for(let i of e){let s=i.instanceId;this.cellComps.has(s)?t.delete(s):this.newCellComp(i)}this.destroyCells(t),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;let t=[];for(let i of e){let s=this.cellComps.get(i.instanceId);s&&t.push(s.getGui())}Or(this.getGui(),t)}newCellComp(e){let t=new Cp(this.beans,e,this.rowCtrl.printLayout,this.getGui(),this.rowCtrl.editing);this.cellComps.set(e.instanceId,t),this.getGui().appendChild(t.getGui())}destroy(){super.destroy(),this.destroyCells(this.cellComps)}setFullWidthRowComp(e){this.fullWidthCellRenderer=e,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer)})}destroyCells(e){for(let t of e.values()){if(!t)return;let i=t.cellCtrl.instanceId;if(this.cellComps.get(i)!==t)return;t.detach(),t.destroy(),this.cellComps.delete(i)}}};function wp(e,t,i){let s=!!i.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls,o={tag:"div",ref:"eContainer",cls:Oi(e),role:"rowgroup"};if(t.type==="center"||s){let n={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${Ah(e)}`,role:"rowgroup"};return{tag:"div",ref:"eViewport",cls:`ag-viewport ${za(e)}`,role:"presentation",children:[o,s?n:null]}}return o}var Sp=class extends V{constructor(e){super(),this.eViewport=E,this.eContainer=E,this.eSpannedContainer=E,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=e?.name,this.options=wi(this.name)}postConstruct(){this.setTemplate(wp(this.name,this.options,this.beans));let e={setHorizontalScroll:i=>this.eViewport.scrollLeft=i,setViewportHeight:i=>this.eViewport.style.height=i,setRowCtrls:({rowCtrls:i})=>this.setRowCtrls(i),setSpannedRowCtrls:i=>this.setRowCtrls(i,!0),setDomOrder:i=>{this.domOrder=i},setContainerWidth:i=>{this.eContainer.style.width=i,this.eSpannedContainer&&(this.eSpannedContainer.style.width=i)},setOffsetTop:i=>{let s=`translateY(${i})`;this.eContainer.style.transform=s,this.eSpannedContainer&&(this.eSpannedContainer.style.transform=s)}};this.createManagedBean(new zh(this.name)).setComp(e,this.eContainer,this.eSpannedContainer,this.eViewport)}destroy(){this.setRowCtrls([]),this.setRowCtrls([],!0),super.destroy(),this.lastPlacedElement=null}setRowCtrls(e,t){let{beans:i,options:s}=this,o=t?this.eSpannedContainer:this.eContainer,n=t?R({},this.rowCompsWithSpan):R({},this.rowCompsNoSpan),r={};t?this.rowCompsWithSpan=r:this.rowCompsNoSpan=r,this.lastPlacedElement=null;let a=[];for(let l of e){let d=l.instanceId,c=n[d],u;if(c)u=c,delete n[d];else{if(!l.rowNode.displayed)continue;u=new vp(l,i,s.type)}r[d]=u,a.push([u,!c])}this.removeOldRows(Object.values(n),o),this.addRowNodes(a,o)}addRowNodes(e,t){let{domOrder:i}=this;for(let[s,o]of e){let n=s.getGui();i?this.ensureDomOrder(n,t):o&&t.appendChild(n)}}removeOldRows(e,t){for(let i of e)t.removeChild(i.getGui()),i.destroy()}ensureDomOrder(e,t){Lr(t,e,this.lastPlacedElement),this.lastPlacedElement=e}},bp={selector:"AG-ROW-CONTAINER",component:Sp};function Ut(e,t){return t.map(i=>{let s=`e${i[0].toUpperCase()+i.substring(1)}RowContainer`;return e[s]={name:i},{tag:"ag-row-container",ref:s,attrs:{name:i}}})}function yp(e){let t={},i={tag:"div",ref:"eGridRoot",cls:"ag-root ag-unselectable",children:[{tag:"ag-header-root"},{tag:"div",ref:"eTop",cls:"ag-floating-top",role:"presentation",children:Ut(t,["topLeft","topCenter","topRight","topFullWidth"])},{tag:"div",ref:"eBody",cls:"ag-body",role:"presentation",children:[{tag:"div",ref:"eBodyViewport",cls:"ag-body-viewport",role:"presentation",children:Ut(t,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:Ut(t,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:Ut(t,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:Ut(t,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},e?{tag:"ag-overlay-wrapper"}:null]};return{paramsMap:t,elementParams:i}}var Rp=class extends V{constructor(){super(...arguments),this.eGridRoot=E,this.eBodyViewport=E,this.eStickyTop=E,this.eStickyBottom=E,this.eTop=E,this.eBottom=E,this.eBody=E}postConstruct(){let{overlays:e,rangeSvc:t}=this.beans,i=e?.getOverlayWrapperSelector(),{paramsMap:s,elementParams:o}=yp(!!i);this.setTemplate(o,[...i?[i]:[],jh,Qh,mp,bp],s);let n=(a,l)=>{let d=`${a}px`;l.style.minHeight=d,l.style.height=d},r={setRowAnimationCssOnBodyViewport:(a,l)=>this.setRowAnimationCssOnBodyViewport(a,l),setColumnCount:a=>Cd(this.getGui(),a),setRowCount:a=>fd(this.getGui(),a),setTopHeight:a=>n(a,this.eTop),setBottomHeight:a=>n(a,this.eBottom),setTopInvisible:a=>this.eTop.classList.toggle("ag-invisible",a),setBottomInvisible:a=>this.eBottom.classList.toggle("ag-invisible",a),setStickyTopHeight:a=>this.eStickyTop.style.height=a,setStickyTopTop:a=>this.eStickyTop.style.top=a,setStickyTopWidth:a=>this.eStickyTop.style.width=a,setStickyBottomHeight:a=>{this.eStickyBottom.style.height=a,this.eStickyBottom.classList.toggle("ag-invisible",a==="0px")},setStickyBottomBottom:a=>this.eStickyBottom.style.bottom=a,setStickyBottomWidth:a=>this.eStickyBottom.style.width=a,setColumnMovingCss:(a,l)=>this.toggleCss(a,l),updateLayoutClasses:(a,l)=>{let d=[this.eBodyViewport.classList,this.eBody.classList];for(let c of d)c.toggle(we.AUTO_HEIGHT,l.autoHeight),c.toggle(we.NORMAL,l.normal),c.toggle(we.PRINT,l.print);this.toggleCss(we.AUTO_HEIGHT,l.autoHeight),this.toggleCss(we.NORMAL,l.normal),this.toggleCss(we.PRINT,l.print)},setAlwaysVerticalScrollClass:(a,l)=>this.eBodyViewport.classList.toggle(Ua,l),registerBodyViewportResizeListener:a=>{let l=qe(this.beans,this.eBodyViewport,a);this.addDestroyFunc(()=>l())},setPinnedTopBottomOverflowY:a=>this.eTop.style.overflowY=this.eBottom.style.overflowY=a,setCellSelectableCss:(a,l)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(d=>d.classList.toggle(a,l))},setBodyViewportWidth:a=>this.eBodyViewport.style.width=a,setGridRootRole:a=>$e(this.eGridRoot,a)};this.ctrl=this.createManagedBean(new Uh),this.ctrl.setComp(r,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(t&&Oe(this.gos)||di(this.gos))&&pd(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){let i=this.eBodyViewport.classList;i.toggle("ag-row-animation",t),i.toggle("ag-row-no-animation",!t)}},xp={selector:"AG-GRID-BODY",component:Rp},Fp=class extends y{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,i){this.view=e,this.eGridHostDiv=t,this.eGui=i,this.eGui.setAttribute("grid-id",this.beans.context.getGridId());let{dragAndDrop:s,ctrlsSvc:o}=this.beans;s?.registerGridDropTarget(()=>this.eGui,this),Ta(this.gos,t),this.createManagedBean(new zo(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");let n=qe(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),o.register("gridCtrl",this)}isDetailGrid(){return Pa(this.getGui())?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){let e=this.beans;return{paginationSelector:e.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:e.registry.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:e.sideBar?.getSelector(),statusBarSelector:e.registry?.getSelector("AG-STATUS-BAR"),watermarkSelector:e.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){this.view.setCursor(e?"ew-resize":null)}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){let t=this.getFocusableContainers(),{indexWithFocus:i,nextIndex:s}=this.getNextFocusableIndex(t,e);if(s<0||s>=t.length)return!1;if(s===0){if(i>0){let{visibleCols:o,focusSvc:n}=this.beans,r=o.allCols,a=N(r);if(n.focusGridView({column:a,backwards:!0}))return!0}return!1}return this.focusContainer(t[s],e)}focusInnerElement(e){let t=this.gos.getCallback("focusGridInnerElement");if(t&&t({fromBottom:!!e}))return!0;let i=this.getFocusableContainers(),{focusSvc:s,visibleCols:o}=this.beans,n=o.allCols;if(e){if(i.length>1)return this.focusContainer(N(i),e);let r=N(n);if(s.focusGridView({column:r,backwards:e}))return!0}if(this.gos.get("headerHeight")===0||ot(this.beans)){if(s.focusGridView({column:n[0],backwards:e}))return!0;for(let r=1;r<i.length;r++)if(dt(i[r].getGui(),e))return!0;return!1}return s.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){let t=this.view.getFocusableContainers(),{nextIndex:i,indexWithFocus:s}=this.getNextFocusableIndex(t,e);if(s===-1||i<0||i>=t.length)return;let o=t[i];o.setAllowFocus?.(!0),setTimeout(()=>{o.setAllowFocus?.(!1)})}isFocusable(){let e=this.beans;return!ds(e)||!ot(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){let i=$(this.beans),s=e.findIndex(n=>n.getGui().contains(i)),o=s+(t?-1:1);return{indexWithFocus:s,nextIndex:o}}focusContainer(e,t){e.setAllowFocus?.(!0);let i=dt(e.getGui(),t,!1,!0);return e.setAllowFocus?.(!1),i}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},Ep=class extends Ja{constructor(e){super(),this.gridBody=E,this.sideBar=E,this.pagination=E,this.rootWrapperBody=E,this.eGridDiv=e}postConstruct(){let e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:n=>this.addCss(n),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:n=>{this.getGui().style.userSelect=n??"",this.getGui().style.webkitUserSelect=n??""},setCursor:n=>{this.getGui().style.cursor=n??""}},t=this.createManagedBean(new Fp),i=t.getOptionalSelectors(),s=this.createTemplate(i),o=[xp,...Object.values(i).filter(n=>!!n)];this.setTemplate(s,o),t.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>t.focusInnerElement(n),forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:()=>!t.isFocusable()})}insertGridIntoDom(){let e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{this.eGridDiv.removeChild(e),Ke(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){let i=this.rootWrapperBody.classList,{AUTO_HEIGHT:s,NORMAL:o,PRINT:n}=we,{autoHeight:r,normal:a,print:l}=t;i.toggle(s,r),i.toggle(o,a),i.toggle(n,l),this.toggleCss(s,r),this.toggleCss(o,a),this.toggleCss(n,l)}createTemplate(e){let t=e.gridHeaderDropZonesSelector?{tag:"ag-grid-header-drop-zones"}:null,i=e.sideBarSelector?{tag:"ag-side-bar",ref:"sideBar"}:null,s=e.statusBarSelector?{tag:"ag-status-bar"}:null,o=e.watermarkSelector?{tag:"ag-watermark"}:null,n=e.paginationSelector?{tag:"ag-pagination",ref:"pagination"}:null;return{tag:"div",cls:"ag-root-wrapper",role:"presentation",children:[t,{tag:"div",ref:"rootWrapperBody",cls:"ag-root-wrapper-body",role:"presentation",children:[{tag:"ag-grid-body",ref:"gridBody"},i]},s,n,o]}}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){if(!e&&this.pagination?.isDisplayed()){this.pagination.forceFocusOutOfContainer(e);return}super.forceFocusOutOfContainer(e)}getFocusableContainers(){let e=[this.gridBody];return[this.sideBar,this.pagination].forEach(t=>{t&&e.push(t)}),e.filter(t=>ye(t.getGui()))}},L=(e,t)=>{for(let i of Object.keys(t))t[i]=e;return t},jn=R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R(R({dispatchEvent:"CommunityCore"},L("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0})),L("GridState",{getState:0})),L("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0})),L("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0})),L("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0})),L("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0})),L("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0})),L("ValueCache",{expireValueCache:0})),L("CellApi",{getCellValue:0})),L("SharedMenu",{showColumnMenu:0,hidePopupMenu:0})),L("Sort",{onSortChanged:0})),L("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0})),L("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0})),L("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0})),L("HighlightChanges",{flashCells:0})),L("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0})),L("ColumnApi",{getColumnDefs:0,getColumnDef:0,getDisplayNameForColumn:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnsVisible:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0})),L("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0})),L("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0})),L("ColumnMove",{moveColumnByIndex:0,moveColumns:0})),L("ColumnResize",{setColumnWidths:0})),L("ColumnHover",{isColumnHovered:0})),L("EditCore",{getCellEditorInstances:0,getEditingCells:0,stopEditing:0,startEditingCell:0})),L("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0})),L("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0})),L("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0})),L("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0})),L("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0})),L("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0})),L("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,onRowHeightChanged:0})),L("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0})),L("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,resetRowHeights:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0})),L("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0})),L("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0})),L("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0})),L("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0})),L("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0})),L("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0})),L("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0})),L("ContextMenu",{showContextMenu:0})),L("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0})),L("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0})),L("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0})),L("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0})),L("SharedPivot",{isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumns:0,addValueColumns:0,setPivotColumns:0,removePivotColumns:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0})),L("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0})),L("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0})),L("StatusBar",{getStatusPanel:0})),zs={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},Pp=(e,t)=>e.eventSvc.dispatchEvent(t),el=class{};Reflect.defineProperty(el,"name",{value:"GridApi"});var Dp=class extends y{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new el,this.fns=O(R({},zs),{dispatchEvent:Pp}),this.preDestroyLink="";let{api:e}=this;for(let t of Object.keys(jn))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){let{fns:i,beans:s}=this;i!==zs&&(i[e]=s?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{let{beans:i,fns:{[e]:s}}=this;return s?s(i,...t):this.apiNotFound(e)}}}apiNotFound(e){let{beans:t,gos:i,preDestroyLink:s}=this;if(!t)F(26,{fnName:e,preDestroyLink:s});else{let o=jn[e];i.assertModuleRegistered(o,`api.${e}`)&&F(27,{fnName:e,module:o})}}destroy(){super.destroy(),this.fns=zs,this.beans=null}};function Mp(e){return e.context.getGridId()}function Tp(e){e.gridDestroySvc.destroy()}function Ap(e){return e.gridDestroySvc.destroyCalled}function kp(e,t){return e.gos.get(t)}function Ip(e,t,i){tl(e,{[t]:i})}function tl(e,t){e.gos.updateGridOptions({options:t})}function Lp(e,t){let i=t.replace(/Module$/,"");return e.gos.isModuleRegistered(i)}var Op={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},Hp=class extends V{constructor(e,t,i){super(Op),this.rowNode=e,this.column=t,this.eCell=i}postConstruct(){this.getGui().appendChild(ge("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){let{rowNode:t,column:i,eCell:s,gos:o}=this,n=i.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(s,0,0),n){let a=I(o,{rowNode:t,dragEvent:e});n(a)}else try{let a=JSON.stringify(t.data);r.setData("application/json",a),r.setData("text/plain",a)}catch{}}checkVisibility(){let e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}};function Gp(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)}function Bp(e,t){let i=e.dragAndDrop?.findExternalZone(t);i&&e.dragAndDrop?.removeDropTarget(i)}function Vp(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)}var Np=class extends y{constructor(){super(...arguments),this.beanName="horizontalResizeSvc"}addResizeBar(e){let t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0},{dragSvc:i}=this.beans;return i.addDragSource(t),()=>i.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();let i=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(i)}setResizeIcons(){let e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!0),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){let e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}},zp={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},Wp=class extends V{constructor(e,t,i,s,o,n){super(),this.cellValueFn=e,this.rowNode=t,this.column=i,this.customGui=s,this.dragStartPixels=o,this.suppressVisibilityChange=n,this.dragSource=null}isCustomGui(){return this.customGui!=null}postConstruct(){let{beans:e,rowNode:t,column:i,gos:s}=this;if(this.customGui?this.setDragElement(this.customGui,this.dragStartPixels):(this.setTemplate(zp),this.getGui().appendChild(ge("rowDrag",e,null)),this.addDragSource()),!this.suppressVisibilityChange){let o=s.get("rowDragManaged")?new Up(this,t,i):new _p(this,t,i);this.createManagedBean(o,this.beans.context)}}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}getSelectedNodes(){let e=this.rowNode;if(!this.gos.get("rowDragMultiRow"))return[e];let i=this.beans.selectionSvc?.getSelectedNodes()??[];return i.indexOf(e)!==-1?i:[e]}getDragItem(){let{column:e,rowNode:t}=this;return{rowNode:t,rowNodes:this.getSelectedNodes(),columns:e?[e]:void 0,defaultTextValue:this.cellValueFn()}}getRowDragText(e){if(e){let t=e.getColDef();if(t.rowDragText)return t.rowDragText}return this.gos.get("rowDragText")}addDragSource(e=4){this.dragSource&&this.removeDragSource();let t=this.getGui();this.gos.get("enableCellTextSelection")&&(this.removeMouseDownListener(),this.mouseDownListener=this.addManagedElementListeners(t,{mousedown:s=>{s?.preventDefault()}})[0]);let i=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:()=>{let s=this.getDragItem(),o=s.rowNodes?.length||1,n=this.getRowDragText(this.column);return n?n(s,o):o===1?this.cellValueFn():`${o} ${i("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},il=class extends y{constructor(e,t,i){super(),this.parent=e,this.rowNode=t,this.column=i}setDisplayedOrVisible(e){let t={skipAriaHidden:!0};if(e)this.parent.setDisplayed(!1,t);else{let i=!0,s=!1,{column:o,rowNode:n,parent:r}=this;o&&(i=o.isRowDrag(n)||r.isCustomGui(),s=typeof o.getColDef().rowDrag=="function"),s?(r.setDisplayed(!0,t),r.setVisible(i,t)):(r.setDisplayed(i,t),r.setVisible(!0,t))}}},_p=class extends il{postConstruct(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this));let e=this.workOutVisibility.bind(this);this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:e}),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){let e=this.gos.get("suppressRowDrag");this.setDisplayedOrVisible(e)}},Up=class extends il{postConstruct(){let e=this.workOutVisibility.bind(this);this.addManagedListeners(this.beans.eventSvc,{sortChanged:e,filterChanged:e,columnRowGroupChanged:e,newColumnsLoaded:e}),this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){let{rowDragSvc:e,dragAndDrop:t,gos:i}=this.beans,s=e.rowDragFeature,o=s&&s.shouldPreventRowMove(),n=i.get("suppressRowDrag"),r=t.hasExternalDropZones(),a=o&&!r||n;this.setDisplayedOrVisible(a)}},$p=class extends y{constructor(){super(...arguments),this.beanName="rowDragSvc"}setupRowDrag(e,t){let i=t.createManagedBean(new oh(e)),s=this.beans.dragAndDrop;s.addDropTarget(i),t.addDestroyFunc(()=>s.removeDropTarget(i)),this.rowDragFeature=i}createRowDragComp(e,t,i,s,o,n){return new Wp(e,t,i,s,o,n)}createRowDragCompForRow(e,t){if(Oe(this.gos))return;let i=this.getLocaleTextFunc();return this.createRowDragComp(()=>`1 ${i("rowDragRow","row")}`,e,void 0,t,void 0,!0)}createRowDragCompForCell(e,t,i,s,o,n){let r=this.gos;return r.get("rowDragManaged")&&(!Y(r)||r.get("pagination"))?void 0:this.createRowDragComp(i,e,t,s,o,n)}},sl={moduleName:"Drag",version:D,beans:[nh]},Kp={moduleName:"DragAndDrop",version:D,dynamicBeans:{dndSourceComp:Hp},icons:{rowDrag:"grip"}},ol={moduleName:"SharedDragAndDrop",version:D,beans:[Qu],dependsOn:[sl],userComponents:{agDragAndDropImage:bg},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},jp={moduleName:"RowDrag",version:D,beans:[$p],apiFunctions:{addRowDropZone:Gp,removeRowDropZone:Bp,getRowDropZoneParams:Vp},dependsOn:[ol]},qp={moduleName:"HorizontalResize",version:D,beans:[Np],dependsOn:[sl]},Yp=":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}",Qp=class extends y{constructor(){super(...arguments),this.beanName="colAnimation",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){if(this.active)return;let{gos:e}=this;e.get("suppressColumnMoveAnimation")||e.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush(()=>this.activeNext=!1,()=>this.active=!1)}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;let e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)})}flush(e,t){let{executeNextFuncs:i,executeLaterFuncs:s}=this;if(i.length===0&&s.length===0){e(),t();return}let o=n=>{for(;n.length;){let r=n.pop();r&&r()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),o(i)},0),window.setTimeout(()=>{t(),o(s)},200)})}};function Zp(e,t,i){e.colMoves?.moveColumnByIndex(t,i,"api")}function Xp(e,t,i){e.colMoves?.moveColumns(t,i,"api")}var Jp=class extends y{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;let t=e.dragItem.columns;t&&t.forEach(i=>{i.isPrimary()&&(i.isAnyFunctionActive()||(i.isAllowValue()?this.columnsToAggregate.push(i):i.isAllowRowGroup()?this.columnsToGroup.push(i):i.isAllowPivot()&&this.columnsToPivot.push(i)))})}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){let{valueColsSvc:t,rowGroupColsSvc:i,pivotColsSvc:s}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&i?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&s?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function ef(e,t){!t||t.length<=1||t.filter(s=>e.indexOf(s)<0).length>0||t.sort((s,o)=>{let n=e.indexOf(s),r=e.indexOf(o);return n-r})}function nl(e){let{isFromHeader:t,fromLeft:i,xPosition:s,fromEnter:o,fakeEvent:n,pinned:r,gos:a,colModel:l,colMoves:d,visibleCols:c}=e,{allMovingColumns:u}=e;if(t){let A=[];u.forEach(M=>{let k=null,G=M.getParent();for(;G!=null&&G.getDisplayedLeafColumns().length===1;)k=G,G=G.getParent();k!=null?(!!k.getColGroupDef()?.marryChildren?k.getProvidedColumnGroup().getLeafColumns():k.getLeafColumns()).forEach(K=>{A.includes(K)||A.push(K)}):A.includes(M)||A.push(M)}),u=A}let h=u.slice();ef(l.getCols(),h);let g=nf({movingCols:h,draggingRight:i,xPosition:s,pinned:r,gos:a,colModel:l,visibleCols:c}),p=tf(h,l);if(g.length===0)return;let f=g[0],m=p!==null&&!o;if(t&&(m=p!==null),m&&!n&&(!i&&f>=p||i&&f<=p))return;let C=c.allCols,v=[],w=null;for(let A=0;A<g.length;A++){let M=g[A],k=d.getProposedColumnOrder(h,M);if(!d.doesOrderPassRules(k))continue;let G=k.filter(B=>C.includes(B));if(w===null)w=G;else if(!gt(G,w))break;let H=sf(k);v.push({move:M,fragCount:H})}if(v.length===0)return;v.sort((A,M)=>A.fragCount-M.fragCount);let T=v[0].move;if(!(T>l.getCols().length-u.length))return{columns:u,toIndex:T}}function rl(e){let{columns:t,toIndex:i}=nl(e)||{},{finished:s,colMoves:o}=e;return!t||i==null?null:(o.moveColumns(t,i,"uiColumnMoved",s),s?null:{columns:t,toIndex:i})}function tf(e,t){let i=t.getCols(),s=e.map(l=>i.indexOf(l)).sort((l,d)=>l-d),o=s[0];return N(s)-o!==s.length-1?null:o}function sf(e){function t(s){let o=[],n=s.getOriginalParent();for(;n!=null;)o.push(n),n=n.getOriginalParent();return o}let i=0;for(let s=0;s<e.length-1;s++){let o=t(e[s]),n=t(e[s+1]);[o,n]=o.length>n.length?[o,n]:[n,o],o.forEach(r=>{n.indexOf(r)===-1&&i++})}return i}function of(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function nf(e){let{movingCols:t,draggingRight:i,xPosition:s,pinned:o,gos:n,colModel:r,visibleCols:a}=e;if(n.get("suppressMovableColumns")||t.some(w=>w.getColDef().suppressMovable))return[];let d=of(a,o),c=r.getCols(),u=d.filter(w=>t.includes(w)),h=d.filter(w=>!t.includes(w)),g=c.filter(w=>!t.includes(w)),p=0,f=s;if(i){let w=0;u.forEach(T=>w+=T.getActualWidth()),f-=w}if(f>0){for(let w=0;w<h.length;w++){let T=h[w];if(f-=T.getActualWidth(),f<0)break;p++}i&&p++}let m;if(p>0){let w=h[p-1];m=g.indexOf(w)+1}else m=g.indexOf(h[0]),m===-1&&(m=0);let C=[m],v=(w,T)=>w-T;if(i){let w=m+1,T=c.length-1;for(;w<=T;)C.push(w),w++;C.sort(v)}else{let w=m,T=c.length-1,A=c[w];for(;w<=T&&d.indexOf(A)<0;)w++,C.push(w),A=c[w];w=m-1;let M=0;for(;w>=M;)C.push(w),w--;C.sort(v).reverse()}return C}function Co(e){let{pinned:t,fromKeyboard:i,gos:s,ctrlsSvc:o,useHeaderRow:n,skipScrollPadding:r}=e,a=o.getHeaderRowContainerCtrl(t)?.eViewport,{x:l}=e;return a?(i&&(l-=a.getBoundingClientRect().left),s.get("enableRtl")&&(n&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),t==null&&!r&&(l+=o.get("center").getCenterViewportScrollLeft()),l):0}function Ws(e,t){for(let i of e)i.moving=t,i.dispatchColEvent("movingChanged","uiColumnMoved")}var qn=7,vo=100,Mi=vo/2,rf=5,af=100,lf=class extends y{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!P(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){let{pinned:e,lastDraggingEvent:t}=this,{dragItem:i}=t||{},s=i?.columns??[];for(let o of s){let n=o.getPinned();if(o.getColDef().lockPinned){if(n==e)return"move";continue}let r=i?.containerType;if(r===e||!e)return"move";if(e&&(!n||r!==e))return"pinned"}return"notAllowed"}onDragEnter(e){let t=e.dragItem,i=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(i,!0,"uiColumnDragged");else{let o=t.visibleState,n=(i||[]).filter(r=>o[r.getId()]);this.setColumnsVisible(n,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(i,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,i=!1,s=!1){let{gos:o,ctrlsSvc:n}=this.beans,r=o.get("suppressMoveWhenColumnDragging");if(s&&!r){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!s&&_(e.hDirection))return;let a=Co({x:e.x,pinned:this.pinned,gos:o,ctrlsSvc:n});t||this.checkCenterForScrolling(a),r?this.handleColumnDragWhileSuppressingMovement(e,t,i,a,s):this.handleColumnDragWhileAllowingMovement(e,t,i,a,s)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,i){if(!e)return;let s=e.filter(o=>!o.getColDef().lockVisible);this.beans.colModel.setColsVisible(s,t,i)}finishColumnMoving(){this.clearHighlighted();let e=this.lastMovedInfo;if(!e)return;let{columns:t,toIndex:i}=e;this.beans.colMoves.moveColumns(t,i,"uiColumnMoved",!0)}updateDragItemContainerType(){let{lastDraggingEvent:e}=this;if(this.gos.get("suppressMoveWhenColumnDragging")||!e)return;let t=e.dragItem;t&&(t.containerType=this.pinned)}handleColumnDragWhileSuppressingMovement(e,t,i,s,o){let n=this.getAllMovingColumns(e,!0);if(o){let r=this.isAttemptingToPin(n);r&&this.attemptToPinColumns(n,void 0,!0);let{fromLeft:a,xPosition:l}=this.getNormalisedXPositionInfo(n,r)||{};if(a==null||l==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:n,xPosition:l,fromEnter:t,fakeEvent:i,fromLeft:a})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(n,s)}}handleColumnDragWhileAllowingMovement(e,t,i,s,o){let n=this.getAllMovingColumns(e),r=this.normaliseDirection(e.hDirection)==="right",a=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:n,isFromHeader:a,xPosition:s,fromLeft:r,fromEnter:t,fakeEvent:i}),d=rl(O(R({},l),{finished:o}));d&&(this.lastMovedInfo=d)}getAllMovingColumns(e,t=!1){let i=e.dragSource.getDragItem(),s=null;t?(s=i.columnsInSplit,s||(s=i.columns)):s=i.columns;let o=n=>n.getColDef().lockPinned?n.getPinned()==this.pinned:!0;return s?s.filter(o):[]}getMoveColumnParams(e){let{allMovingColumns:t,isFromHeader:i,xPosition:s,fromLeft:o,fromEnter:n,fakeEvent:r}=e,{gos:a,colModel:l,colMoves:d,visibleCols:c}=this.beans;return{allMovingColumns:t,isFromHeader:i,fromLeft:o,xPosition:s,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:a,colModel:l,colMoves:d,visibleCols:c}}highlightHoveredColumn(e,t){let{gos:i,colModel:s}=this.beans,o=i.get("enableRtl"),n=s.getCols().filter(c=>c.isVisible()&&c.getPinned()===this.pinned),r=null,a=null,l=null;for(let c of n){if(a=c.getActualWidth(),r=this.getNormalisedColumnLeft(c,0,o),r!=null){let u=r+a;if(r<=t&&u>=t){l=c;break}}r=null,a=null}if(l)e.indexOf(l)!==-1&&(l=null);else{for(let c=n.length-1;c>=0;c--){let u=n[c],h=n[c].getParent();if(!h){l=u;break}let g=h?.getDisplayedLeafColumns();if(g.length){l=N(g);break}}if(!l)return;r=this.getNormalisedColumnLeft(l,0,o),a=l.getActualWidth()}if(this.lastHighlightedColumn?.column!==l&&this.clearHighlighted(),l==null||r==null||a==null)return;let d;t-r<a/2!==o?d=0:d=1,Yn(l,d),this.lastHighlightedColumn={column:l,position:d}}getNormalisedXPositionInfo(e,t){let{gos:i,visibleCols:s}=this.beans,o=i.get("enableRtl"),{firstMovingCol:n,column:r,position:a}=this.getColumnMoveAndTargetInfo(e,t,o);if(!n||!r||a==null)return;let l=s.allCols,d=l.indexOf(n),c=l.indexOf(r),u=a===0!==o,h=d<c||d===c&&!u,g=0;if(u?h&&(g-=1):h||(g+=1),c+g===d)return;let p=l[c+g];if(!p)return;let f=this.getNormalisedColumnLeft(p,20,o);return{fromLeft:h,xPosition:f}}getColumnMoveAndTargetInfo(e,t,i){let s=this.lastHighlightedColumn||{},{firstMovingCol:o,lastMovingCol:n}=df(e);if(!o||!n||s.column||!t)return R({firstMovingCol:o},s);let a=this.getPinDirection()==="left";return{firstMovingCol:o,position:a?1:0,column:a!==i?o:n}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case"left":return"right";case"right":return"left"}return e}getNormalisedColumnLeft(e,t,i){let{gos:s,ctrlsSvc:o}=this.beans,n=e.getLeft();if(n==null)return null;let r=e.getActualWidth();return Co({x:i?n+r-t:n+t,pinned:e.getPinned(),useHeaderRow:i,skipScrollPadding:!0,gos:s,ctrlsSvc:o})}isAttemptingToPin(e){let t=this.needToMoveLeft||this.needToMoveRight,i=this.failedMoveAttempts>qn;return t&&i||e.some(s=>s.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){let{allMovingColumns:t,xPosition:i,fromEnter:s,fakeEvent:o,fromLeft:n}=e,r=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:i,fromLeft:n,fromEnter:s,fakeEvent:o}),{columns:a,toIndex:l}=nl(r)||{};a&&l!=null&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){let{lastHighlightedColumn:e}=this;e&&(Yn(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;let t=this.beans.ctrlsSvc.get("center"),i=t.getCenterViewportScrollLeft(),s=i+t.getCenterWidth(),o,n;this.gos.get("enableRtl")?(o=e<i+Mi,n=e>s-Mi):(n=e<i+Mi,o=e>s-Mi),this.needToMoveRight=o,this.needToMoveLeft=n,n||o?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),af),this.beans.dragAndDrop.getDragAndDropImageComponent()?.setIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.getDragAndDropImageComponent()?.setIcon(this.getIconName(),!1))}moveInterval(){let e;this.intervalCount++,e=10+this.intervalCount*rf,e>vo&&(e=vo);let t=null,i=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=i.scrollHorizontally(-e):this.needToMoveRight&&(t=i.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;let{pinnedCols:s,dragAndDrop:o,gos:n}=this.beans;if(this.failedMoveAttempts<=qn+1||!s)return;if(o.getDragAndDropImageComponent()?.setIcon("pinned",!1),!n.get("suppressMoveWhenColumnDragging")){let r=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(r,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,i=!1){let s=(e||[]).filter(r=>!r.getColDef().lockPinned);if(!s.length)return 0;i&&(t=this.getPinDirection());let{pinnedCols:o,dragAndDrop:n}=this.beans;return o?.setColsPinned(s,t,"uiColumnDragged"),i&&n.nudge(),s.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function Yn(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function df(e){let t=e.length,i,s;for(let o=0;o<t;o++){if(!i){let n=e[o];n.getLeft()!=null&&(i=n)}if(!s){let n=e[t-1-o];n.getLeft()!=null&&(s=n)}if(i&&s)break}return{firstMovingCol:i,lastMovingCol:s}}var cf=class extends y{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){let{ctrlsSvc:e,dragAndDrop:t}=this.beans,i=this.pinned;e.whenReady(this,s=>{let o,n=s.gridBodyCtrl.eBodyViewport;switch(i){case"left":o=[[n,s.left.eContainer],[s.bottomLeft.eContainer],[s.topLeft.eContainer]];break;case"right":o=[[n,s.right.eContainer],[s.bottomRight.eContainer],[s.topRight.eContainer]];break;default:o=[[n,s.center.eViewport],[s.bottomCenter.eViewport],[s.topCenter.eViewport]];break}this.eSecondaryContainers=o}),this.moveColumnFeature=this.createManagedBean(new lf(i)),this.bodyDropPivotTarget=this.createManagedBean(new Jp(i)),t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&e.dragSource.type===0}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}onDragCancel(){this.currentDropListener.onDragCancel()}},uf=class extends y{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,i){let s=this.beans.colModel.getCols();if(!s)return;let o=s[e];this.moveColumns([o],t,i)}moveColumns(e,t,i,s=!0){let{colModel:o,colAnimation:n,visibleCols:r,eventSvc:a}=this.beans,l=o.getCols();if(!l)return;if(t>l.length-e.length){F(30,{toIndex:t});return}n?.start();let d=o.getColsForKeys(e);this.doesMovePassRules(d,t)&&(Mn(o.getCols(),d,t),r.refresh(i),a.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,toIndex:t,finished:s,source:i})),n?.finish()}doesMovePassRules(e,t){let i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){let{colModel:t,gos:i}=this.beans;return!(!pa(e,t.getColTree())||!(o=>{let n=d=>d?d==="left"||d===!0?-1:1:0,r=i.get("enableRtl"),a=r?1:-1,l=!0;return o.forEach(d=>{let c=n(d.getColDef().lockPosition);r?c>a&&(l=!1):c<a&&(l=!1),a=c}),l})(e))}getProposedColumnOrder(e,t){let s=this.beans.colModel.getCols().slice();return Mn(s,e,t),s}createBodyDropTarget(e,t){return new cf(e,t)}moveHeader(e,t,i,s,o){let{ctrlsSvc:n,gos:r,colModel:a,visibleCols:l,focusSvc:d}=this.beans,c=t.getBoundingClientRect(),u=c.left,h=j(i),g=h?c.width:i.getActualWidth(),p=e==="left"!==r.get("enableRtl"),f=Co({x:p?u-20:u+g+20,pinned:s,fromKeyboard:!0,gos:r,ctrlsSvc:n}),m=d.focusedHeader;rl({allMovingColumns:h?i.getLeafColumns():[i],isFromHeader:!0,fromLeft:e==="right",xPosition:f,pinned:s,fromEnter:!1,fakeEvent:!1,gos:r,colModel:a,colMoves:this,visibleCols:l,finished:!0});let C;if(h){let v=i.getDisplayedLeafColumns();C=p?v[0]:N(v)}else C=i;if(n.getScrollFeature().ensureColumnVisible(C,"auto"),(!o.isAlive()||r.get("ensureDomOrder"))&&m){let v;if(h){let w=i.getGroupId(),T=i.getLeafColumns();if(!T.length)return;let A=T[0].getParent();if(!A)return;v=hf(A,w)}else v=i;v&&d.focusHeaderPosition({headerPosition:O(R({},m),{column:v})})}}setDragSourceForHeader(e,t,i){let{gos:s,colModel:o,dragAndDrop:n,visibleCols:r}=this.beans,a=!s.get("suppressDragLeaveHidesColumns"),l=j(t),d=l?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>pf(t,r.allCols):()=>gf(t),dragItemName:i,onDragStarted:()=>{a=!s.get("suppressDragLeaveHidesColumns"),Ws(d,!0)},onDragStopped:()=>Ws(d,!1),onDragCancelled:()=>Ws(d,!1),onGridEnter:h=>{if(a){let{columns:g=[],visibleState:p}=h??{},f=l?C=>!p||p[C.getColId()]:()=>!0,m=g.filter(C=>!C.getColDef().lockVisible&&f(C));o.setColsVisible(m,!0,"uiColumnMoved")}},onGridExit:h=>{if(a){let g=h?.columns?.filter(p=>!p.getColDef().lockVisible)||[];o.setColsVisible(g,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}};function hf(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function gf(e){let t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function pf(e,t){let i=e.getProvidedColumnGroup().getLeafColumns(),s={};i.forEach(a=>s[a.getId()]=a.isVisible());let o=[];t.forEach(a=>{i.indexOf(a)>=0&&(o.push(a),me(i,a))}),i.forEach(a=>o.push(a));let n=[],r=e.getLeafColumns();for(let a of o)r.indexOf(a)!==-1&&n.push(a);return{columns:o,columnsInSplit:n,visibleState:s,containerType:n[0]?.pinned}}var ff={moduleName:"ColumnMove",version:D,beans:[uf,Qp],apiFunctions:{moveColumnByIndex:Zp,moveColumns:Xp},dependsOn:[ol],css:[Yp]},mf=class extends y{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){let i=this.getHeaderCellForColumn(e);if(!i)return-1;let s=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||s.push(i),this.getPreferredWidthForElements(s)}getPreferredWidthForColumnGroup(e){let t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){let i=document.createElement("form");i.style.position="fixed";let s=this.centerRowContainerCtrl.eContainer;e.forEach(n=>this.cloneItemIntoDummy(n,i)),s.appendChild(i);let o=i.offsetWidth;return s.removeChild(i),t=t??this.gos.get("autoSizePadding"),o+t}getHeaderCellForColumn(e){let t=null;return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().forEach(i=>{let s=i.getHtmlElementForColumnHeader(e);s!=null&&(t=s)}),t}cloneItemIntoDummy(e,t){let i=e.cloneNode(!0);i.style.width="",i.style.position="static",i.style.left="";let s=document.createElement("div"),o=s.classList;["ag-header-cell","ag-header-group-cell"].some(a=>i.classList.contains(a))?(o.add("ag-header","ag-header-row"),s.style.position="static"):o.add("ag-row");let r=e.parentElement;for(;r;){if(["ag-header-row","ag-row"].some(l=>r.classList.contains(l))){for(let l=0;l<r.classList.length;l++){let d=r.classList[l];d!="ag-row-position-absolute"&&o.add(d)}break}r=r.parentElement}s.appendChild(i),t.appendChild(s)}},al={moduleName:"AutoWidth",version:D,beans:[mf]};function Cf(e,t,i=!0,s="api"){e.colResize?.setColumnWidths(t,!1,i,s)}var vf=class extends y{constructor(e,t,i,s){super(),this.comp=e,this.eResize=t,this.pinned=i,this.columnGroup=s}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}let{horizontalResizeSvc:e,gos:t,colAutosize:i}=this.beans,s=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(s),!t.get("suppressAutoSize")&&i&&this.addDestroyFunc(i.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){let{columnsToResize:t,resizeStartWidth:i,resizeRatios:s,groupAfterColumns:o,groupAfterStartWidth:n,groupAfterRatios:r}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=i,this.resizeRatios=s,this.resizeTakeFromCols=o,this.resizeTakeFromStartWidth=n,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(e,t,i="uiColumnResized"){let s=this.normaliseDragChange(t),o=this.resizeStartWidth+s;this.resizeColumnsFromLocalValues(o,i,e)}getInitialValues(e){let t=l=>l.reduce((d,c)=>d+c.getActualWidth(),0),i=(l,d)=>l.map(c=>c.getActualWidth()/d),s=this.getColumnsToResize(),o=t(s),n=i(s,o),r={columnsToResize:s,resizeStartWidth:o,resizeRatios:n},a=null;if(e&&(a=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,"After")??null),a){let l=a.getDisplayedLeafColumns(),d=r.groupAfterColumns=l.filter(u=>u.isResizable()),c=r.groupAfterStartWidth=t(d);r.groupAfterRatios=i(d,c)}else r.groupAfterColumns=void 0,r.groupAfterStartWidth=void 0,r.groupAfterRatios=void 0;return r}resizeLeafColumnsToFit(e){let t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),i=this.getInitialValues();t>i.resizeStartWidth&&this.resizeColumns(i,t,e,!0)}resizeColumnsFromLocalValues(e,t,i=!0){if(!this.resizeCols||!this.resizeRatios)return;let s={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(s,e,t,i)}resizeColumns(e,t,i,s=!0){let{columnsToResize:o,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:d}=e,c=[];if(c.push({columns:o,ratios:r,width:t}),a){let u=t-n;c.push({columns:a,ratios:d,width:l-u})}this.beans.colResize?.resizeColumnSets({resizeSets:c,finished:s,source:i}),s&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},wf=class extends y{constructor(e,t,i,s,o){super(),this.pinned=e,this.column=t,this.eResize=i,this.comp=s,this.ctrl=o}postConstruct(){let e=[],t,i,s=()=>{if(U(this.eResize,t),!t)return;let{horizontalResizeSvc:r,colAutosize:a}=this.beans,l=r.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(l),i&&a&&e.push(a.addColumnAutosize(this.eResize,this.column))},o=()=>{e.forEach(r=>r()),e.length=0},n=()=>{let r=this.column.isResizable(),a=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(r!==t||a!==i)&&(t=r,i=a,o(),s())};n(),this.addDestroyFunc(o),this.ctrl.setRefreshFunction("resize",n)}onResizing(e,t){let{column:i,lastResizeAmount:s,resizeStartWidth:o,beans:n}=this,r=this.normaliseResizeAmount(t),a=o+r,l=[{key:i,newWidth:a}],{pinnedCols:d,ctrlsSvc:c,colResize:u}=n;if(this.column.getPinned()){let h=d?.leftWidth??0,g=d?.rightWidth??0,p=ri(c.getGridBodyCtrl().eBodyViewport)-50;if(h+g+(r-s)>p)return}this.lastResizeAmount=r,u?.setColumnWidths(l,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e,i=this.pinned!=="left",s=this.pinned==="right";return this.gos.get("enableRtl")?i&&(t*=-1):s&&(t*=-1),t}},Sf=class extends y{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,i,s){let o=[],{colModel:n,gos:r,visibleCols:a}=this.beans;e.forEach(l=>{let d=n.getColDefCol(l.key)||n.getCol(l.key);if(!d)return;if(o.push({width:l.newWidth,ratios:[1],columns:[d]}),r.get("colResizeDefault")==="shift"&&(t=!t),t){let u=a.getColAfter(d);if(!u)return;let h=d.getActualWidth()-l.newWidth,g=u.getActualWidth()+h;o.push({width:g,ratios:[1],columns:[u]})}}),o.length!==0&&this.resizeColumnSets({resizeSets:o,finished:i,source:s})}resizeColumnSets(e){let{resizeSets:t,finished:i,source:s}=e;if(!(!t||t.every(c=>bf(c)))){if(i){let c=t&&t.length>0?t[0].columns:null;kt(this.eventSvc,c,i,s)}return}let n=[],r=[];t.forEach(c=>{let{width:u,columns:h,ratios:g}=c,p={},f={};h.forEach(v=>r.push(v));let m=!0,C=0;for(;m;){if(C++,C>1e3){z(31);break}m=!1;let v=[],w=0,T=u;h.forEach((M,k)=>{if(f[M.getId()])T-=p[M.getId()];else{v.push(M);let H=g[k];w+=H}});let A=1/w;v.forEach((M,k)=>{let G=k===v.length-1,H;G?H=T:(H=Math.round(g[k]*u*A),T-=H);let B=M.getMinWidth(),K=M.getMaxWidth();H<B?(H=B,f[M.getId()]=!0,m=!0):K>0&&H>K&&(H=K,f[M.getId()]=!0,m=!0),p[M.getId()]=H})}h.forEach(v=>{let w=p[v.getId()];v.getActualWidth()!==w&&(v.setActualWidth(w,s),n.push(v))})});let a=n.length>0,l=[];if(a){let{colFlex:c,visibleCols:u,colViewport:h}=this.beans;l=c?.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0})??[],u.setLeftValues(s),u.updateBodyWidths(),h.checkViewportColumns()}let d=r.concat(l);(a||i)&&kt(this.eventSvc,d,i,s,l)}resizeHeader(e,t,i){if(!e.isResizable())return;let s=e.getActualWidth(),o=e.getMinWidth(),n=e.getMaxWidth(),r=Math.min(Math.max(s+t,o),n);this.setColumnWidths([{key:e,newWidth:r}],i,!0,"uiColumnResized")}createResizeFeature(e,t,i,s,o){return new wf(e,t,i,s,o)}createGroupResizeFeature(e,t,i,s){return new vf(e,t,i,s)}};function bf(e){let{columns:t,width:i}=e,s=0,o=0,n=!0;t.forEach(l=>{let d=l.getMinWidth();s+=d||0;let c=l.getMaxWidth();c>0?o+=c:n=!1});let r=i>=s,a=!n||i<=o;return r&&a}var yf={moduleName:"ColumnResize",version:D,beans:[Sf],apiFunctions:{setColumnWidths:Cf},dependsOn:[qp,al]},Rf=class extends y{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();let e=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})})}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach(e=>e()),this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){let e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.toggleCss("ag-hidden",e===0)}},xf=class extends qo{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}setComp(e,t,i,s,o){let{column:n,beans:r}=this,{context:a,colNames:l,colHover:d,rangeSvc:c,colResize:u}=r;this.comp=e,o=Ci(this,a,o),this.setGui(t,o),this.displayName=l.getDisplayNameForColumnGroup(n,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(o),this.setupExpandable(o),this.setupTooltip(),this.setupAutoHeight({wrapperElement:s,compBean:o}),this.setupUserComp(),this.addHeaderMouseListeners(o),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();let h=this.rowCtrl.pinned,g=n.getProvidedColumnGroup().getLeafColumns();d?.createHoverFeature(o,g,t),c?.createRangeHighlightFeature(o,n,e),o.createManagedBean(new jo(n,t,r)),o.createManagedBean(new Rf(e,n)),u?this.resizeFeature=o.createManagedBean(u.createGroupResizeFeature(e,i,h,n)):e.setResizableDisplayed(!1),o.createManagedBean(new Bt(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(o,g),o.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(o),o.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){let{column:e,beans:t}=this,i=e.getDefinition();return I(t.gos,{colDef:i,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){let{gos:e,comp:t}=this,i=e.get("groupHeaderHeight");i!=null?i===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(i):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(let i of t)e.addManagedListeners(i,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,i)})}onLeafColumnHighlightChanged(e){let t=this.column.getDisplayedLeafColumns(),i=t[0]===e,s=N(t)===e;if(!i&&!s)return;let o=e.getHighlighted(),n=!!this.rowCtrl.getHeaderCellCtrls().find(l=>l.column.isMoving()),r=!1,a=!1;if(n){let l=this.beans.gos.get("enableRtl"),d=o===1,c=o===0;i&&(l?a=d:r=c),s&&(l?r=c:a=d)}this.comp.toggleCss("ag-header-highlight-before",r),this.comp.toggleCss("ag-header-highlight-after",a)}resizeHeader(e,t){let{resizeFeature:i}=this;if(!i)return;let s=i.getInitialValues(t);i.resizeColumns(s,s.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){let{colGroupSvc:e,userCompFactory:t,gos:i,enterpriseMenuFactory:s}=this.beans,o=this.column,n=o.getProvidedColumnGroup(),r=I(i,{displayName:this.displayName,columnGroup:o,setExpanded:l=>{e.setColumnGroupOpened(n,l,"gridInitializing")},setTooltip:(l,d)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(l,d)},showColumnMenu:(l,d)=>s?.showMenuAfterButtonClick(n,l,"columnMenu",d),showColumnMenuAfterMouseClick:(l,d)=>s?.showMenuAfterMouseEvent(n,l,"columnMenu",d),eGridHeader:this.eGui}),a=tu(t,r);a&&this.comp.setUserCompDetails(a)}addHeaderMouseListeners(e){let t=o=>this.handleMouseOverChange(o.type==="mouseenter"),i=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column.getProvidedColumnGroup()),s=o=>this.handleContextMenuMouseEvent(o,void 0,this.column.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:i,contextmenu:s})}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){let t=this.column.getProvidedColumnGroup();this.refreshExpanded();let i=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:i,expandableChanged:i})}refreshExpanded(){let{column:e}=this;this.expandable=e.isExpandable();let t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){let{column:e}=this,t=e.getColGroupDef(),i=Fa(t,this.gos,null,e);e.isPadding()?(i.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(o=>o.isSpanHeaderHeight())&&i.push("ag-header-span-height")):(i.push("ag-header-group-cell-with-group"),t?.wrapHeaderText&&i.push("ag-header-cell-wrap-text")),i.forEach(s=>this.comp.toggleCss(s,!0))}setupMovingCss(e){let{column:t}=this,s=t.getProvidedColumnGroup().getLeafColumns(),o=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());s.forEach(n=>{e.addManagedListeners(n,{movingChanged:o})}),o()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||this.focusThis()}handleKeyDown(e){super.handleKeyDown(e);let t=this.getWrapperHasFocus();if(!(!this.expandable||!t)&&e.key===b.ENTER){let i=this.column,s=!i.isExpanded();this.beans.colGroupSvc.setColumnGroupOpened(i.getProvidedColumnGroup(),s,"uiColumnExpanded")}}setDragSource(e){!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some(e=>e.getColDef().suppressMovable||e.getColDef().lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function Ff(e,t,i){e.colGroupSvc?.setColumnGroupOpened(t,i,"api")}function Ef(e,t,i){return e.colGroupSvc?.getColumnGroup(t,i)??null}function Pf(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null}function Df(e,t,i){return e.colNames.getDisplayNameForColumnGroup(t,i)||""}function Mf(e){return e.colGroupSvc?.getColumnGroupState()??[]}function Tf(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}function Af(e){e.colGroupSvc?.resetColumnGroupState("api")}function kf(e){return e.visibleCols.treeLeft}function If(e){return e.visibleCols.treeCenter}function Lf(e){return e.visibleCols.treeRight}function Of(e){return e.visibleCols.getAllTrees()}function Hf(e,t){for(let i=0;i<t.length;i++){let s=e.indexOf(t[i]);s>=0&&(e[s]=e[e.length-1],e.pop())}}var Gf=class extends y{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){let{colFlex:i,colModel:s,colGroupSvc:o,colViewport:n,selectionColSvc:r}=this.beans;t||this.buildTrees(s,o),o?.updateOpenClosedVisibility(),this.leftCols=_s(this.treeLeft),this.centerCols=_s(this.treeCenter),this.rightCols=_s(this.treeRight),r?.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(s),this.joinCols(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(a=>a.isAutoHeight()),i?.refreshFlexedColumns(),this.updateBodyWidths(),n.checkViewportColumns(!1),this.setFirstRightAndLastLeftPinned(s,this.leftCols,this.rightCols,e),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}updateBodyWidths(){let e=Ae(this.centerCols),t=Ae(this.leftCols),i=Ae(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,i,s){let o,n;this.gos.get("enableRtl")?(o=t?t[0]:null,n=i?N(i):null):(o=t?N(t):null,n=i?i[0]:null),e.getCols().forEach(r=>{r.setLastLeftPinned(r===o,s),r.setFirstRightPinned(r===n,s)})}buildTrees(e,t){let i=e.getColsToShow(),s=i.filter(l=>l.getPinned()=="left"),o=i.filter(l=>l.getPinned()=="right"),n=i.filter(l=>l.getPinned()!="left"&&l.getPinned()!="right"),r=new wa,a=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=a({columns:s,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=a({columns:o,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=a({columns:n,idCreator:r,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){let t=e.getCols(),i=[],s=[],o=[];for(let n of t){let r=n.getPinned();r?r===!0||r==="left"?i.push(n):o.push(n):s.push(n)}this.ariaOrderColumns=i.concat(s).concat(o)}getAriaColIndex(e){let t;return j(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(t=>{j(t)&&t.checkLeft()})})}setLeftValuesOfCols(e){let{colModel:t}=this.beans;if(!t.getColDefCols())return;let s=t.getCols().slice(0),o=this.gos.get("enableRtl");[this.leftCols,this.rightCols,this.centerCols].forEach(n=>{if(o){let r=Ae(n);n.forEach(a=>{r-=a.getActualWidth(),a.setLeft(r,e)})}else{let r=0;n.forEach(a=>{a.setLeft(r,e),r+=a.getActualWidth()})}Hf(s,n)}),s.forEach(n=>{n.setLeft(null,e)})}joinCols(){this.gos.get("enableRtl")?this.allCols=this.rightCols.concat(this.centerCols).concat(this.leftCols):this.allCols=this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}isColDisplayed(e){return this.allCols.indexOf(e)>=0}getLeftColsForRow(e){let{leftCols:t,beans:{colModel:i}}=this;return i.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){let{rightCols:t,beans:{colModel:i}}=this;return i.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,i,s){let o=[],n=null;for(let r=0;r<t.length;r++){let a=t[r],l=t.length-r,d=Math.min(a.getColSpan(e),l),c=[a];if(d>1){let h=d-1;for(let g=1;g<=h;g++)c.push(t[r+g]);r+=h}let u;i?(u=!1,c.forEach(h=>{i(h)&&(u=!0)})):u=!0,u&&(o.length===0&&n&&(s&&s(a))&&o.push(n),o.push(a)),n=a}return o}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){let t=this.allCols,i=t.indexOf(e);return i>0?t[i-1]:null}isPinningLeft(){return this.leftCols.length>0}isPinningRight(){return this.rightCols.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};let e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};nt(this.treeCenter,!1,e),nt(this.treeLeft,!1,e),nt(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){let e=this.gos.get("enableRtl"),t=["leftCols","centerCols","rightCols"];e&&t.reverse();for(let i=0;i<t.length;i++){let s=this[t[i]];if(s.length)return e?N(s):s[0]}return null}getColAfter(e){let t=this.allCols,i=t.indexOf(e);return i<t.length-1?t[i+1]:null}getColsLeftWidth(){return Ae(this.leftCols)}getDisplayedColumnsRightWidth(){return Ae(this.rightCols)}isColAtEdge(e,t){let i=this.allCols;if(!i.length)return!1;let s=t==="first",o;if(j(e)){let n=e.getDisplayedLeafColumns();if(!n.length)return!1;o=s?n[0]:N(n)}else o=e;return(s?i[0]:N(i))===o}};function nt(e,t,i){if(e)for(let s=0;s<e.length;s++){let o=e[s];if(j(o)){let n=t?o.getDisplayedChildren():o.getChildren();nt(n,t,i)}i(o)}}function _s(e){let t=[];return nt(e,!0,i=>{He(i)&&t.push(i)}),t}var Bf=class extends y{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){let e=[],t=this.beans.colModel.getColTree();return Le(null,t,i=>{X(i)&&e.push({groupId:i.getGroupId(),open:i.isExpanded()})}),e}resetColumnGroupState(e){let t=this.beans.colModel.getColDefColTree();if(!t)return;let i=[];Le(null,t,s=>{if(X(s)){let o=s.getColGroupDef(),n={groupId:s.getGroupId(),open:o?o.openByDefault:void 0};i.push(n)}}),this.setColumnGroupState(i,e)}setColumnGroupState(e,t){let{colModel:i,colAnimation:s,visibleCols:o,eventSvc:n}=this.beans;if(!i.getColTree().length)return;s?.start();let a=[];e.forEach(l=>{let d=l.groupId,c=l.open,u=this.getProvidedColGroup(d);u&&u.isExpanded()!==c&&(u.setExpanded(c),a.push(u))}),o.refresh(t,!0),a.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:a.length===1?a[0]:void 0,columnGroups:a}),s?.finish()}setColumnGroupOpened(e,t,i){let s;X(e)?s=e.getId():s=e||"",this.setColumnGroupState([{groupId:s,open:t}],i)}getProvidedColGroup(e){let t=null;return Le(null,this.beans.colModel.getColTree(),i=>{X(i)&&i.getId()===e&&(t=i)}),t}getGroupAtDirection(e,t){let i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),s=e.getDisplayedLeafColumns(),o=t==="After"?N(s):s[0],n=`getCol${t}`;for(;;){let r=this.beans.visibleCols[n](o);if(!r)return null;let a=this.getColGroupAtLevel(r,i);if(a!==e)return a}}getColGroupAtLevel(e,t){let i=e.getParent(),s,o;for(;s=i.getProvidedColumnGroup().getLevel(),o=i.getPaddingLevel(),!(s+o<=t);)i=i.getParent();return i}updateOpenClosedVisibility(){let e=this.beans.visibleCols.getAllTrees();nt(e,!1,t=>{j(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(j(e))return e;let i=this.beans.visibleCols.getAllTrees(),s=typeof t=="number",o=null;return nt(i,!1,n=>{if(j(n)){let r=n,a;s?a=e===r.getGroupId()&&t===r.getPartId():a=e===r.getGroupId(),a&&(o=r)}}),o}createColumnGroups(e){let{columns:t,idCreator:i,pinned:s,oldDisplayedGroups:o,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(o),a=[],l=t;for(;l.length;){let d=l;l=[];let c=0,u=h=>{let g=c;c=h;let p=d[g],m=(j(p)?p.getProvidedColumnGroup():p).getOriginalParent();if(m==null){for(let v=g;v<h;v++)a.push(d[v]);return}let C=this.createColumnGroup(m,i,r,s,n);for(let v=g;v<h;v++)C.addChild(d[v]);l.push(C)};for(let h=1;h<d.length;h++){let g=d[h],f=(j(g)?g.getProvidedColumnGroup():g).getOriginalParent(),m=d[c],v=(j(m)?m.getProvidedColumnGroup():m).getOriginalParent();f!==v&&u(h)}c<d.length&&u(d.length)}return n||this.setupParentsIntoCols(a,null),a}createProvidedColumnGroup(e,t,i,s,o,n,r){let a=o.getUniqueKey(t.groupId||null,null),l=Pn(this.beans,t,a),d=new Ii(l,a,!1,i);this.createBean(d);let c=this.findExistingGroup(t,n);c&&n.splice(c.idx,1);let u=c?.group;u&&d.setExpanded(u.isExpanded());let h=ua(this.beans,l.children,i+1,e,s,o,n,r);return d.setChildren(h),d}balanceColumnTree(e,t,i,s){let o=[];for(let n=0;n<e.length;n++){let r=e[n];if(X(r)){let a=r,l=this.balanceColumnTree(a.getChildren(),t+1,i,s);a.setChildren(l),o.push(a)}else{let a,l;for(let d=i-1;d>=t;d--){let c=s.getUniqueKey(null,null),u=Pn(this.beans,null,c),h=new Ii(u,c,!0,t);this.createBean(h),l&&l.setChildren([h]),l=h,a||(a=l)}if(a&&l)if(o.push(a),e.some(c=>X(c))){l.setChildren([r]);continue}else{l.setChildren(e);break}o.push(r)}}return o}findDepth(e){let t=0,i=e;for(;i&&i[0]&&X(i[0]);)t++,i=i[0].getChildren();return t}findMaxDepth(e,t){let i=t;for(let s=0;s<e.length;s++){let o=e[s];if(X(o)){let n=o,r=this.findMaxDepth(n.getChildren(),t+1);i<r&&(i=r)}}return i}balanceTreeForAutoCols(e,t){let i=[];return e.forEach(s=>{let o=s;for(let n=t-1;n>=0;n--){let r=new Ii(null,`FAKE_PATH_${s.getId()}}_${n}`,!0,n);this.createBean(r),r.setChildren([o]),o.originalParent=r,o=r}t===0&&(s.originalParent=null),i.push(o)}),i}findExistingGroup(e,t){if(e.groupId!=null)for(let s=0;s<t.length;s++){let o=t[s];if(o.getColGroupDef()&&o.getId()===e.groupId)return{idx:s,group:o}}}createColumnGroup(e,t,i,s,o){let n=e.getGroupId(),r=t.getInstanceIdForKey(n),a=Oa(n,r),l=i[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),P(l)?l.reset():(l=new Ha(e,n,r,s),o||this.createBean(l)),l}mapOldGroupsById(e){let t={},i=s=>{s.forEach(o=>{if(j(o)){let n=o;t[o.getUniqueId()]=n,i(n.getChildren())}})};return e&&i(e),t}setupParentsIntoCols(e,t){e.forEach(i=>{if(i.parent=t,j(i)){let s=i;this.setupParentsIntoCols(s.getChildren(),s)}})}},Vf={moduleName:"ColumnGroup",version:D,dynamicBeans:{headerGroupCellCtrl:xf},beans:[Bf],apiFunctions:{getAllDisplayedColumnGroups:Of,getCenterDisplayedColumnGroups:If,getColumnGroup:Ef,getColumnGroupState:Mf,getDisplayNameForColumnGroup:Df,getLeftDisplayedColumnGroups:kf,getProvidedColumnGroup:Pf,getRightDisplayedColumnGroups:Lf,resetColumnGroupState:Af,setColumnGroupOpened:Ff,setColumnGroupState:Tf}},Nf={moduleName:"CheckboxCellRenderer",version:D,userComponents:{agCheckboxCellRenderer:Pg}};function zf(e,t){let i=e.colModel.getColDefCol(t);return i?i.getColDef():null}function Wf(e){return e.colModel.getColumnDefs()}function _f(e,t,i){return e.colNames.getDisplayNameForColumn(t,i)||""}function Uf(e,t){return e.colModel.getColDefCol(t)}function $f(e){return e.colModel.getColDefCols()}function Kf(e,t){return be(e,t,"api")}function jf(e){return qi(e)}function qf(e){Pc(e,"api")}function Yf(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function Qf(e){return e.visibleCols.isPinningLeft()}function Zf(e){return e.visibleCols.isPinningRight()}function Xf(e,t){return e.visibleCols.getColAfter(t)}function Jf(e,t){return e.visibleCols.getColBefore(t)}function em(e,t,i){e.colModel.setColsVisible(t,i,"api")}function tm(e,t,i){e.pinnedCols?.setColsPinned(t,i,"api")}function im(e){return e.colModel.getCols()}function sm(e){return e.visibleCols.leftCols}function om(e){return e.visibleCols.centerCols}function nm(e){return e.visibleCols.rightCols}function rm(e){return e.visibleCols.allCols}function am(e){return e.colViewport.getViewportColumns()}function wo(e,t){if(!e)return;let i=e,s={};return Object.keys(i).forEach(o=>{if(t&&t.indexOf(o)>=0||na.has(o))return;let n=i[o];typeof n=="object"&&n!==null&&n.constructor===Object?s[o]=wo(n):s[o]=n}),s}var lm=class extends y{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,i,s){let o=e.slice();t?o.sort((a,l)=>i.indexOf(a)-i.indexOf(l)):i&&o.sort((a,l)=>s.indexOf(a)-s.indexOf(l));let n=this.rowGroupColsSvc?.columns,r=this.pivotColsSvc?.columns;return this.buildColumnDefs(o,n,r)}buildColumnDefs(e,t=[],i=[]){let s=[],o={};return e.forEach(n=>{let r=this.createDefFromColumn(n,t,i),a=!0,l=r,d=n.getOriginalParent(),c=null;for(;d;){let u=null;if(d.isPadding()){d=d.getOriginalParent();continue}let h=o[d.getGroupId()];if(h){h.children.push(l),a=!1;break}if(u=this.createDefFromGroup(d),u&&(u.children=[l],o[u.groupId]=u,l=u,d=d.getOriginalParent()),d!=null&&c===d){a=!1;break}c=d}a&&s.push(l)}),s}createDefFromGroup(e){let t=wo(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,i){let s=wo(e.getColDef());return s.colId=e.getColId(),s.width=e.getActualWidth(),s.rowGroup=e.isRowGroupActive(),s.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,s.pivot=e.isPivotActive(),s.pivotIndex=e.isPivotActive()?i.indexOf(e):null,s.aggFunc=e.isValueActive()?e.getAggFunc():null,s.hide=e.isVisible()?void 0:!0,s.pinned=e.isPinned()?e.getPinned():null,s.sort=e.getSort()?e.getSort():null,s.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,s}},dm=class extends y{constructor(){super(...arguments),this.beanName="colFlex"}refreshFlexedColumns(e={}){let t=e.source??"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);let i=this.flexViewportWidth;if(!i)return[];let{visibleCols:s}=this.beans,o=s.centerCols,n=-1;if(e.resizingCols){let p=new Set(e.resizingCols);for(let f=o.length-1;f>=0;f--)if(p.has(o[f])){n=f;break}}let r=!1,a=o.map((p,f)=>{let m=p.getFlex(),C=m!=null&&m>0&&f>n;return r||(r=C),{col:p,isFlex:C,flex:Math.max(0,m??0),initialSize:p.getActualWidth(),min:p.getMinWidth(),max:p.getMaxWidth(),targetSize:0}});if(!r)return[];let l=a.length,d=a.reduce((p,f)=>p+f.flex,0),c=i,u=(p,f)=>{p.frozenSize=f,p.col.setActualWidth(f,t),c-=f,d-=p.flex,l-=1},h=p=>p.frozenSize!=null;for(let p of a)p.isFlex||u(p,p.initialSize);for(;l>0;){let p=Math.round(d<1?c*d:c),f,m=0,C=0;for(let T of a){if(h(T))continue;f=T,C+=p*(T.flex/d);let A=C-m,M=Math.round(A);T.targetSize=M,m+=M}f&&(f.targetSize+=p-m);let v=0;for(let T of a){if(h(T))continue;let A=T.targetSize,M=Math.min(Math.max(A,T.min),T.max);v+=M-A,T.violationType=M===A?void 0:M<A?"max":"min",T.targetSize=M}let w=v===0?"all":v>0?"min":"max";for(let T of a)h(T)||(w==="all"||T.violationType===w)&&u(T,T.targetSize)}e.skipSetLeft||s.setLeftValues(t),e.updateBodyWidths&&s.updateBodyWidths();let g=a.filter(p=>p.isFlex&&!p.violationType).map(p=>p.col);if(e.fireResizedEvent){let p=a.filter(m=>m.initialSize!==m.frozenSize).map(m=>m.col),f=a.filter(m=>m.flex).map(m=>m.col);kt(this.eventSvc,p,!0,t,f)}return g}initCol(e){let{flex:t,initialFlex:i}=e.colDef;t!==void 0?e.flex=t:i!==void 0&&(e.flex=i)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}},cm=class extends y{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[]}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)})}processDataTypeDefinitions(){let e=this.getDefaultDataTypes(),t={};this.dataTypeDefinitions=t;let i={};this.formatValueFuncs=i;let s=r=>a=>{let{column:l,node:d,value:c}=a,u=l.getColDef().valueFormatter;return u===r.groupSafeValueFormatter&&(u=r.valueFormatter),this.beans.valueSvc.formatValue(l,d,c,u)};for(let r of Object.keys(e)){let a=e[r],l=O(R({},a),{groupSafeValueFormatter:Xn(a,this.gos)});t[r]=l,i[r]=s(l)}let o=this.gos.get("dataTypeDefinitions")??{},n={};this.dataTypeMatchers=n;for(let r of Object.keys(o)){let a=o[r],l=this.processDataTypeDefinition(a,o,[r],e);l&&(t[r]=l,a.dataTypeMatcher&&(n[r]=a.dataTypeMatcher),i[r]=s(l))}this.checkObjectValueHandlers(e),["dateString","text","number","boolean","date"].forEach(r=>{let a=n[r];a&&delete n[r],n[r]=a??e[r].dataTypeMatcher})}processDataTypeDefinition(e,t,i,s){let o,n=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let r=s[n],a=t[n];if(r&&a&&(r=a),!Zn(e,r,n))return;o=Qn(r,e)}else{if(i.includes(n)){F(44);return}let r=t[n];if(!Zn(e,r,n))return;let a=this.processDataTypeDefinition(r,t,[...i,n],s);if(!a)return;o=Qn(a,e)}return O(R({},o),{groupSafeValueFormatter:Xn(o,this.gos)})}updateColDefAndGetColumnType(e,t,i){let{cellDataType:s}=t,{field:o}=t;if(s===void 0&&(s=e.cellDataType),(s==null||s===!0)&&(s=this.canInferCellDataType(e,t)?this.inferCellDataType(o,i):!1),!s){e.cellDataType=!1;return}let n=this.dataTypeDefinitions[s];if(!n){F(47,{cellDataType:s});return}return e.cellDataType=s,n.groupSafeValueFormatter&&(e.valueFormatter=n.groupSafeValueFormatter),n.valueParser&&(e.valueParser=n.valueParser),n.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,s,n,i),n.columnTypes}addColumnListeners(e){if(!this.isPendingInference)return;let t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;let i=s=>{t.add(s.key)};e.__addEventListener("columnStateUpdated",i),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",i))}canInferCellDataType(e,t){let{gos:i}=this;if(!Y(i))return!1;let s={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(Us(t,s))return!1;let o=t.type===null?e.type:t.type;if(o){let n=i.get("columnTypes")??{};if(ji(o).some(a=>{let l=n[a.trim()];return l&&Us(l,s)}))return!1}return!Us(e,s)}inferCellDataType(e,t){if(!e)return;let i,s=this.getInitialData();if(s){let o=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");i=Xt(s,e,o)}else this.initWaitForRowData(t);if(i!=null)return Object.keys(this.dataTypeMatchers).find(o=>this.dataTypeMatchers[o](i))??"object"}getInitialData(){let e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{let t=this.beans.rowModel.rootNode?.allLeafChildren;if(t?.length)return t[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;let t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:i,eventSvc:s}=this.beans;t&&i&&(i.shouldQueueResizeOperations=!0);let[o]=this.addManagedEventListeners({rowDataUpdateStarted:n=>{let{firstRowData:r}=n;r&&(o?.(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&i?.processResizeOperations(),s.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;let i=[];this.destroyColumnStateUpdateListeners();let s={},o={};for(let n of Object.keys(this.columnStateUpdatesPendingInference)){let r=this.columnStateUpdatesPendingInference[n],a=this.colModel.getCol(n);if(!a)return;let l=a.getColDef();if(!this.resetColDefIntoCol(a,"cellDataTypeInferred"))return;let d=a.getColDef();if(t&&d.type&&d.type!==l.type){let c=hm(a,r);c.rowGroup&&c.rowGroupIndex==null&&(s[n]=c),c.pivot&&c.pivotIndex==null&&(o[n]=c),i.push(c)}}t&&i.push(...this.generateColumnStateForRowGroupAndPivotIndexes(s,o)),i.length&&be(this.beans,{state:i},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){let i={},{rowGroupColsSvc:s,pivotColsSvc:o}=this.beans;return s?.restoreColumnOrder(i,e),o?.restoreColumnOrder(i,t),Object.values(i)}resetColDefIntoCol(e,t){let i=e.getUserProvidedColDef();if(!i)return!1;let s=co(this.beans,i,e.getColId());return e.setColDef(s,i,t),!0}checkObjectValueHandlers(e){let t=this.dataTypeDefinitions.object,i=e.object;this.hasObjectValueParser=t.valueParser!==i.valueParser,this.hasObjectValueFormatter=t.valueFormatter!==i.valueFormatter}getDateStringTypeDefinition(e){let{dateString:t}=this.dataTypeDefinitions;return e?this.getDataTypeDefinition(e)??t:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDataTypeDefinition(e){let t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(t==null)return!0;let i=this.getDataTypeDefinition(e)?.dataTypeMatcher;return i?i(t):!0}validateColDef(e){let t=i=>F(48,{property:i});if(e.cellDataType==="object"){let{object:i}=this.dataTypeDefinitions;e.valueFormatter===i.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&t("Formatter"),e.editable&&e.valueParser===i.valueParser&&!this.hasObjectValueParser&&t("Parser")}}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,i,s){let o=this.formatValueFuncs[t];switch(i.baseDataType){case"number":{e.cellEditor="agNumberCellEditor";break}case"boolean":{e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.getFindText=()=>null,e.suppressKeyboardEvent=n=>!!n.colDef.editable&&n.event.key===b.SPACE;break}case"date":{e.cellEditor="agDateCellEditor",e.keyCreator=o;break}case"dateString":{e.cellEditor="agDateStringCellEditor",e.keyCreator=o;break}case"object":{e.cellEditorParams={useFormatter:!0},e.comparator=(n,r)=>{let a=this.colModel.getColDefCol(s),l=a?.getColDef();if(!a||!l)return 0;let d=n==null?"":o({column:a,node:null,value:n}),c=r==null?"":o({column:a,node:null,value:r});return d===c?0:d>c?1:-1},e.keyCreator=o;break}}this.beans.filterManager?.setColDefPropertiesForDataType(e,i,o)}getDefaultDataTypes(){let e=i=>!!i.match("^\\d{4}-\\d{2}-\\d{2}$"),t=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:i=>i.newValue?.trim?.()===""?null:Number(i.newValue),valueFormatter:i=>i.value==null?"":typeof i.value!="number"||isNaN(i.value)?t("invalidNumber","Invalid Number"):String(i.value),dataTypeMatcher:i=>typeof i=="number"},text:{baseDataType:"text",valueParser:i=>i.newValue===""?null:oo(i.newValue),dataTypeMatcher:i=>typeof i=="string"},boolean:{baseDataType:"boolean",valueParser:i=>i.newValue==null?i.newValue:i.newValue?.trim?.()===""?null:String(i.newValue).toLowerCase()==="true",valueFormatter:i=>i.value==null?"":String(i.value),dataTypeMatcher:i=>typeof i=="boolean"},date:{baseDataType:"date",valueParser:i=>re(i.newValue==null?null:String(i.newValue)),valueFormatter:i=>i.value==null?"":!(i.value instanceof Date)||isNaN(i.value.getTime())?t("invalidDate","Invalid Date"):fe(i.value,!1)??"",dataTypeMatcher:i=>i instanceof Date},dateString:{baseDataType:"dateString",dateParser:i=>re(i)??void 0,dateFormatter:i=>fe(i??null,!1)??void 0,valueParser:i=>e(String(i.newValue))?i.newValue:null,valueFormatter:i=>e(String(i.value))?i.value:"",dataTypeMatcher:i=>typeof i=="string"&&e(i)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:i=>oo(i.value)??""}}}destroyColumnStateUpdateListeners(){this.columnStateUpdateListenerDestroyFuncs.forEach(e=>e()),this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function Qn(e,t){let i=R(R({},e),t);return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(i.columnTypes=[...ji(e.columnTypes),...ji(t.columnTypes)]),i}function Zn(e,t,i){return t?t.baseDataType!==e.baseDataType?(F(46),!1):!0:(F(45,{parentCellDataType:i}),!1)}function Xn(e,t){if(e.valueFormatter)return i=>{if(i.node?.group){let s=(i.colDef.pivotValueColumn??i.column).getAggFunc();if(s){if(s==="first"||s==="last")return e.valueFormatter(i);if(e.baseDataType==="number"&&s!=="count"){if(typeof i.value=="number")return e.valueFormatter(i);if(typeof i.value=="object"){if(!i.value)return;if("toNumber"in i.value)return e.valueFormatter(O(R({},i),{value:i.value.toNumber()}));if("value"in i.value)return e.valueFormatter(O(R({},i),{value:i.value.value}))}}return}if(t.get("groupDisplayType")==="groupRows"&&!t.get("treeData"))return}else if(t.get("groupHideOpenParents")&&i.column.isRowGroupActive()&&typeof i.value=="string"&&!e.dataTypeMatcher?.(i.value))return;return e.valueFormatter(i)}}function um(e,t,i,s){if(!t[i])return!1;let o=e[i];return o===null?(t[i]=!1,!1):s===void 0?!!o:o===s}function Us(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([i,s])=>um(e,t,i,s))}function hm(e,t){let i=va(e);return t.forEach(s=>{delete i[s],s==="rowGroup"?delete i.rowGroupIndex:s==="pivot"&&delete i.pivotIndex}),i}var gm={moduleName:"DataType",version:D,beans:[cm],dependsOn:[Nf]},pm={moduleName:"ColumnFlex",version:D,beans:[dm]},fm={moduleName:"ColumnApi",version:D,beans:[lm],apiFunctions:{getColumnDef:zf,getDisplayNameForColumn:_f,getColumn:Uf,getColumns:$f,applyColumnState:Kf,getColumnState:jf,resetColumnState:qf,isPinning:Yf,isPinningLeft:Qf,isPinningRight:Zf,getDisplayedColAfter:Xf,getDisplayedColBefore:Jf,setColumnsVisible:em,setColumnsPinned:tm,getAllGridColumns:im,getDisplayedLeftColumns:sm,getDisplayedCenterColumns:om,getDisplayedRightColumns:nm,getAllDisplayedColumns:rm,getAllDisplayedVirtualColumns:am,getColumnDefs:Wf}};function mm(e){if(!e||e==null)return null;let 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(o=>o.substring(0,1).toUpperCase()+(o.length>1?o.substring(1,o.length):"")).join(" ")}var Cm=class extends y{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;let s=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:o}=this.beans;return i&&o?o.getHeaderName(e,s):s}getDisplayNameForProvidedColumnGroup(e,t,i){let s=t?.getColGroupDef();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,o){let n=e.headerValueGetter;if(n){let r=I(this.gos,{colDef:e,column:t,columnGroup:i,providedColumnGroup:s,location:o});return typeof n=="function"?n(r):typeof n=="string"?this.beans.expressionSvc?.evaluate(n,r)??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return mm(e.field)}return""}},vm=class extends y{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={}}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}setScrollPosition(e,t,i=!1){let{visibleCols:s}=this,o=s.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!o)){if(this.scrollWidth=e,this.scrollPosition=t,s.isBodyWidthDirty=!0,this.gos.get("enableRtl")){let r=s.bodyWidth;this.viewportLeft=r-t-e,this.viewportRight=r-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(i)}}getHeadersToRender(e,t){let i;switch(e){case"left":i=this.rowsOfHeadersToRenderLeft[t];break;case"right":i=this.rowsOfHeadersToRenderRight[t];break;default:i=this.rowsOfHeadersToRenderCenter[t];break}return i||[]}extractViewportColumns(){let e=this.visibleCols.centerCols;this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}clear(e){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},e||(this.colsWithinViewportHash="")}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||wm(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;let t=e.getLeft()||0,i=t+e.getActualWidth(),s=this.viewportLeft-200,o=this.viewportRight+200,n=t<s&&i<s,r=t>o&&i>o;return!n&&!r}getViewportColumns(){let{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;let t=n=>{let r=n.getLeft();return P(r)&&r>this.viewportLeft},i=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:s}=this,o=s.centerCols;return s.getColsForRow(e,o,i,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){this.clear(!0);let e={},{leftCols:t,rightCols:i,treeLeft:s,treeRight:o,treeCenter:n}=this.visibleCols;this.headerColsWithinViewport.concat(t).concat(i).forEach(l=>e[l.getId()]=!0);let a=(l,d,c)=>{let u=!1;for(let h=0;h<l.length;h++){let g=l[h],p=!1;if(He(g))p=e[g.getId()]===!0;else{let m=g.getDisplayedChildren();m&&(p=a(m,d,c+1))}p&&(u=!0,d[c]||(d[c]=[]),d[c].push(g))}return u};a(s,this.rowsOfHeadersToRenderLeft,0),a(o,this.rowsOfHeadersToRenderRight,0),a(n,this.rowsOfHeadersToRenderCenter,0)}extractViewport(){let e=s=>`${s.getId()}-${s.getPinned()||"normal"}`;this.extractViewportColumns();let t=this.getViewportColumns().map(e).join("#"),i=this.colsWithinViewportHash!==t;return i&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),i}};function wm(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var Sm=class extends y{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class i{refresh(){return!1}getGui(){return this.eGui}init(o){let n=t(o),r=typeof n;if(r==="string"||r==="number"||r==="boolean"){this.eGui=Mo("<span>"+n+"</span>");return}if(n==null){this.eGui=W({tag:"span"});return}this.eGui=n}}return i}},bm={moduleName:"CellRendererFunction",version:D,beans:[Sm]},ym=class extends y{constructor(){super(...arguments),this.beanName="registry",this.agGridDefaults={},this.agGridDefaultParams={},this.jsComps={},this.dynamicBeans={},this.selectors={},this.icons={}}postConstruct(){let e=this.gos.get("components");if(e!=null)for(let t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){let{icons:t,userComponents:i,dynamicBeans:s,selectors:o}=e;if(i){let n=(r,a,l)=>{this.agGridDefaults[r]=a,l&&(this.agGridDefaultParams[r]=l)};for(let r of Object.keys(i)){let a=i[r];typeof a=="object"?n(r,a.classImp,a.params):n(r,a)}}if(s)for(let n of Object.keys(s))this.dynamicBeans[n]=s[n];if(o?.forEach(n=>{this.selectors[n.selector]=n}),t)for(let n of Object.keys(t))this.icons[n]=t[n]}getUserComponent(e,t){let i=(a,l,d)=>({componentFromFramework:l,component:a,params:d}),{frameworkOverrides:s}=this.beans,o=s.frameworkComponent(t,this.gos.get("components"));if(o!=null)return i(o,!0);let n=this.jsComps[t];if(n){let a=s.isFrameworkComponent(n);return i(n,a)}let r=this.agGridDefaults[t];return r?i(r,!1,this.agGridDefaultParams[t]):(this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null)}createDynamicBean(e,t,...i){let s=this.dynamicBeans[e];if(s==null){if(t)throw new Error(Ue(256));return}return new s(...i)}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}},Rm=23,xm=class extends y{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",()=>{this.updateReady(),this.ready&&(this.readyCallbacks.forEach(e=>e(this.params)),this.readyCallbacks.length=0)},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){let e=Object.values(this.params);this.ready=e.length===Rm&&e.every(t=>t?.isAlive()??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{let i=this.readyCallbacks.indexOf(t);i>=0&&this.readyCallbacks.splice(i,1)})}register(e,t){this.params[e]=t,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:"ready"}),t.addDestroyFunc(()=>{this.updateReady()})}get(e){return this.params[e]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){let{leftHeader:e,centerHeader:t,rightHeader:i}=this.params;return[e,i,t]}getHeaderRowContainerCtrl(e){let t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},Fm=':where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none}}:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-tab-guard{display:block;height:0;position:absolute;width:0}:where(.ag-virtual-list-viewport) .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-virtual-list-viewport{overflow:auto;width:100%}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-virtual-list-container{overflow:hidden}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-scrolling,.ag-scrollbar-active){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value,.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-top:not(.ag-invisible)){border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-bottom:not(.ag-invisible)){border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block;&:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-group-title-bar) .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-flow:row wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}:where(.ag-ltr) .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}:where(.ag-group-item-alignment-stretch) .ag-group-item{align-items:stretch}:where(.ag-group-item-alignment-start) .ag-group-item{align-items:flex-start}:where(.ag-group-item-alignment-end) .ag-group-item{align-items:flex-end}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-large-text-input{display:block}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-data-font-size);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden),.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)),.ag-header-group-cell{&:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}&:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}}:where(.ag-header-cell:not(.ag-floating-filter) *,.ag-header-group-cell *){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-accent-color);content:"";height:100%;position:absolute;width:1px}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2;&:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}}:where(.ag-ltr) .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-rtl) .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-chart,.ag-dnd-ghost,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab}.ag-list-item,.ag-virtual-list-item{height:var(--ag-list-item-height)}.ag-virtual-list-item{position:absolute;width:100%}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-list-item{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-column-select-column-group-readonly,.ag-column-select-column-readonly,.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-column-select-column-readonly{&.ag-icon-grip,.ag-icon-grip{opacity:.35}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color);&:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);position:relative;&:after{background-color:var(--ag-accent-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}:where(.ag-ltr) .ag-filter-active{&:after{right:-1px}}:where(.ag-rtl) .ag-filter-active{&:after{left:-1px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto}.ag-menu,.ag-resizer{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-resizer{pointer-events:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',en=typeof window!="object"||!window?.document?.fonts?.forEach,Lt=(e,t,i,s,o,n)=>{if(en||So)return;s&&(e=`@layer ${CSS.escape(s)} { ${e} }`);let r=Mt.map.get(t);if(r||(r=[],Mt.map.set(t,r)),r.find(c=>c.css===e))return;let a=document.createElement("style");n&&a.setAttribute("nonce",n),a.dataset.agGlobalCss=i,a.textContent=e;let l={css:e,el:a,priority:o},d;for(let c of r){if(c.priority>o)break;d=c}if(d){d.el.insertAdjacentElement("afterend",a);let c=r.indexOf(d);r.splice(c+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),r.push(l)},ll=(e,t,i)=>{Lt(Fm,e,"core",t,0,i),Array.from(bu()).sort((s,o)=>s.moduleName.localeCompare(o.moduleName)).forEach(s=>s.css?.forEach(o=>Lt(o,e,`module-${s.moduleName}`,t,0,i)))},Em=e=>{Mt.grids.add(e)},Pm=e=>{if(Mt.grids.delete(e),Mt.grids.size===0){Mt.map=new WeakMap;for(let t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},Jn,Mt=(Jn=typeof window=="object"?window:{}).agStyleInjectionState??(Jn.agStyleInjectionState={map:new WeakMap,grids:new Set}),Ge=e=>new dl(e),We="$default",Dm=0,dl=class{constructor({feature:e,params:t,modeParams:i={},css:s,cssImports:o}){this.feature=e,this.css=s,this.cssImports=o,this.modeParams=R({[We]:R(R({},i[We]??{}),t??{})},i)}use(e,t,i){let s=this._inject;if(s==null){let{css:o}=this;if(o){let n=`ag-theme-${this.feature??"part"}-${++Dm}`;typeof o=="function"&&(o=o()),o=`:where(.${n}) {
${o}
}
`;for(let r of this.cssImports??[])o=`@import url(${JSON.stringify(r)});
${o}`;s={css:o,class:n}}else s=!1;this._inject=s}return s&&e&&Lt(s.css,e,s.class,t,1,i),s?s.class:!1}},Mm=e=>e.replace(/[A-Z]/g,t=>`-${t}`).toLowerCase(),cl=e=>`--ag-${Mm(e)}`,Me=e=>`var(${cl(e)})`,Tm=(e,t,i)=>Math.max(t,Math.min(i,e)),Am=e=>{let t=new Map;return i=>{let s=i;return t.has(s)||t.set(s,e(i)),t.get(s)}},Fe=e=>({ref:"accentColor",mix:e}),he=e=>({ref:"foregroundColor",mix:e}),Se=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),km=e=>({ref:"foregroundColor",mix:e,onto:"headerBackgroundColor"}),ce={ref:"backgroundColor"},$t={ref:"foregroundColor"},_e={ref:"accentColor"},os={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:he(.15),chromeBackgroundColor:Se(.02),browserColorScheme:"light"},Im=O(R({},os),{textColor:$t,accentColor:"#2196f3",invalidColor:"#e02525",wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:ce,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},cellFontFamily:{ref:"fontFamily"},headerFontWeight:500,headerFontSize:{ref:"fontSize"},dataFontSize:{ref:"fontSize"},headerTextColor:{ref:"textColor"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},subtleTextColor:{ref:"textColor",mix:.5},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:_e,rangeSelectionBackgroundColor:Fe(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:Fe(.5),rangeHeaderHighlightColor:km(.08),rowNumbersSelectedColor:Fe(.5),rowHoverColor:Fe(.08),columnHoverColor:Fe(.05),selectedRowBackgroundColor:Fe(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},oddRowBackgroundColor:ce,borderRadius:4,wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",spacing:8,fontSize:14,rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},dragAndDropImageBackgroundColor:ce,dragAndDropImageBorder:!0,dragAndDropImageShadow:{ref:"popupShadow"},dragHandleColor:he(.7),focusShadow:{spread:3,color:Fe(.5)},headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},iconSize:16,iconColor:"inherit",iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:he(.1),iconButtonActiveColor:_e,iconButtonActiveBackgroundColor:Fe(.28),iconButtonActiveIndicatorColor:_e,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:_e,toggleButtonOffBackgroundColor:Se(.3),toggleButtonSwitchBackgroundColor:ce,toggleButtonSwitchInset:2,menuBorder:{color:he(.2)},menuBackgroundColor:Se(.03),menuTextColor:Se(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"},setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:he(.8),dialogShadow:{ref:"popupShadow"},cellEditingBorder:{color:_e},cellEditingShadow:{ref:"cardShadow"},dialogBorder:{color:he(.2)},panelBackgroundColor:ce,panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipTextColor:{ref:"textColor"},tooltipBorder:!0,columnDropCellBackgroundColor:he(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:he(.13)},selectCellBackgroundColor:he(.07),selectCellBorder:{color:he(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",findMatchColor:$t,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:$t,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:he(.15),statusBarLabelColor:$t,statusBarLabelFontWeight:500,statusBarValueColor:$t,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"backgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"backgroundColor"},pinnedRowTextColor:{ref:"textColor"}}),Lm=":where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}",Om={buttonTextColor:"inherit",buttonFontWeight:"normal",buttonBackgroundColor:"transparent",buttonBorder:!1,buttonBorderRadius:{ref:"borderRadius"},buttonHorizontalPadding:{calc:"spacing * 2"},buttonVerticalPadding:{ref:"spacing"},buttonHoverTextColor:{ref:"buttonTextColor"},buttonHoverBackgroundColor:{ref:"buttonBackgroundColor"},buttonHoverBorder:{ref:"buttonBorder"},buttonActiveTextColor:{ref:"buttonHoverTextColor"},buttonActiveBackgroundColor:{ref:"buttonHoverBackgroundColor"},buttonActiveBorder:{ref:"buttonHoverBorder"},buttonDisabledTextColor:{ref:"inputDisabledTextColor"},buttonDisabledBackgroundColor:{ref:"inputDisabledBackgroundColor"},buttonDisabledBorder:{ref:"inputDisabledBorder"}};var Hm=()=>Ge({feature:"buttonStyle",params:O(R({},Om),{buttonBackgroundColor:ce,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:_e}}),css:Lm}),Gm=Hm();var Bm=".ag-column-drop-vertical-empty-message{align-items:center;border:1px dashed;border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}";var Vm=()=>Ge({feature:"columnDropStyle",css:Bm}),ul=Vm();var Nm=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],zm=Am(e=>(e=e.toLowerCase(),Nm.find(t=>e.endsWith(t.toLowerCase()))??"length")),us=e=>typeof e=="object"&&e?.ref?Me(e.ref):typeof e=="string"?e:typeof e=="number"?String(e):!1,tn=e=>{if(typeof e=="string")return e;if(e&&"ref"in e){let t=Me(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?Me(e.onto):"transparent"}, ${t} ${Tm(e.mix*100,0,100)}%)`}return!1},Wm=us,St=e=>typeof e=="string"?e:typeof e=="number"?`${e}px`:e&&"calc"in e?`calc(${e.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,i=>i[0]==="-"?i:` ${Me(i)} `)})`:e&&"ref"in e?Me(e.ref):!1,_m=us,Um=(e,t)=>typeof e=="string"?e:e===!0?"solid 1px var(--ag-border-color)":e===!1?t==="columnBorder"?"solid 1px transparent":"none":e&&"ref"in e?Me(e.ref):hl(e.style??"solid")+" "+St(e.width??1)+" "+tn(e.color??{ref:"borderColor"}),$m=e=>typeof e=="string"?e:e===!1?"none":e&&"ref"in e?Me(e.ref):[St(e.offsetX??0),St(e.offsetY??0),St(e.radius??0),St(e.spread??0),tn(e.color??{ref:"foregroundColor"})].join(" "),hl=us,gl=e=>typeof e=="string"?e.includes(",")?e:er(e):e&&"googleFont"in e?gl(e.googleFont):e&&"ref"in e?Me(e.ref):Array.isArray(e)?e.map(t=>(typeof t=="object"&&"googleFont"in t&&(t=t.googleFont),er(t))).join(", "):!1,er=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),Km=us,pl=e=>typeof e=="string"?e:e&&"url"in e?`url(${JSON.stringify(e.url)})`:e&&"svg"in e?pl({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):e&&"ref"in e?Me(e.ref):!1,jm=(e,t)=>typeof e=="string"?e:typeof e=="number"?(e>=10&&z(104,{value:e,param:t}),`${e}s`):e&&"ref"in e?Me(e.ref):!1,qm={color:tn,colorScheme:Wm,length:St,scale:_m,border:Um,borderStyle:hl,shadow:$m,image:pl,fontFamily:gl,fontWeight:Km,duration:jm},Ym=(e,t)=>{let i=zm(e);return qm[i](t,e)},So=!1;var Qm=()=>new fl().withPart(Gm).withPart(ul),fl=class ml{constructor(t=[]){this.parts=t}withPart(t){return typeof t=="function"&&(t=t()),t instanceof dl?new ml([...this.parts,t]):(qt(259,{part:t},"Invalid part"),this)}withoutPart(t){return this.withPart(Ge({feature:t}))}withParams(t,i=We){return this.withPart(Ge({modeParams:{[i]:t}}))}_startUse({styleContainer:t,cssLayer:i,nonce:s,loadThemeGoogleFonts:o}){if(en||So)return;Xm(),ll(t,i,s);let n=Zm(this);if(n.length>0)for(let r of n)o&&eC(r,s);for(let r of this.parts)r.use(t,i,s)}_getCssClass(){return So?"ag-theme-quartz":this._cssClassCache??(this._cssClassCache=tr(this.parts).map(t=>t.use(void 0,void 0,void 0)).filter(Boolean).join(" "))}_getModeParams(){let t=this._paramsCache;if(!t){let i={[We]:R({},Im)};for(let s of tr(this.parts))for(let o of Object.keys(s.modeParams)){let n=s.modeParams[o];if(n){let r=i[o]??(i[o]={}),a=new Set;for(let l of Object.keys(n)){let d=n[l];d!==void 0&&(r[l]=d,a.add(l))}if(o===We)for(let l of Object.keys(i)){let d=i[l];if(l!==We)for(let c of a)delete d[c]}}}this._paramsCache=t=i}return t}_getPerGridCss(t){let i="##SELECTOR##",s=this._paramsCssCache;if(!s){let o="",n="",r=this._getModeParams();for(let l of Object.keys(r)){let d=r[l];if(l!==We){let u=`:where([data-ag-theme-mode="${typeof CSS=="object"?CSS.escape(l):l}"]) & {
`;o+=u,n+=u}for(let c of Object.keys(d).sort()){let u=d[c],h=Ym(c,u);if(h===!1)z(107,{key:c,value:u});else{let g=cl(c),p=g.replace("--ag-","--ag-inherited-");o+=`	${g}: var(${p}, ${h});
`,n+=`	${p}: var(${g});
`}}l!==We&&(o+=`}
`,n+=`}
`)}let a=`${i} {
${o}}
`;a+=`:has(> ${i}):not(${i}) {
${n}}
`,this._paramsCssCache=s=a}return s.replaceAll(i,`:where(.${t})`)}},tr=e=>{let t=new Map;for(let s of e)t.set(s.feature,s);let i=[];for(let s of e)(!s.feature||t.get(s.feature)===s)&&i.push(s);return i},Zm=e=>{let t=new Set,i=n=>{if(Array.isArray(n))n.forEach(i);else{let r=n?.googleFont;typeof r=="string"&&t.add(r)}};return Object.values(e._getModeParams()).flatMap(n=>Object.values(n)).forEach(i),Array.from(t).sort()},ir=!1,Xm=()=>{if(!ir){ir=!0;for(let e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},Jm=new Set,eC=(e,t)=>hn(void 0,null,function*(){Jm.add(e);let i=`@import url('https://${tC}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
`;Lt(i,document.head,`googleFont:${e}`,void 0,0,t)}),tC="fonts.googleapis.com",iC='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);:where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}&:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color);&:after{background-color:var(--ag-checkbox-checked-shape-color)}}&:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color);&:after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',sC=()=>Ge({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:ce,checkboxUncheckedBorderColor:Se(.3),checkboxCheckedBackgroundColor:_e,checkboxCheckedBorderColor:{ref:"checkboxCheckedBackgroundColor"},checkboxCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'},checkboxCheckedShapeColor:ce,checkboxIndeterminateBackgroundColor:Se(.3),checkboxIndeterminateBorderColor:{ref:"checkboxIndeterminateBackgroundColor"},checkboxIndeterminateShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'},checkboxIndeterminateShapeColor:ce,radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}},css:iC}),oC=sC();var Cl=()=>O(R({},os),{backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:Se(.05),rowHoverColor:Fe(.15),selectedRowBackgroundColor:Fe(.2),menuBackgroundColor:Se(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",findMatchColor:ce,findActiveMatchColor:ce,checkboxUncheckedBorderColor:Se(.4),toggleButtonOffBackgroundColor:Se(.4)});var nC=()=>O(R({},Cl()),{backgroundColor:"#1f2836"});var rC=()=>Ge({feature:"colorScheme",params:os,modeParams:{light:os,dark:Cl(),"dark-blue":nC()}}),aC=rC();var vl={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<path d="m18 6-12 12"/><path d="m6 6 12 12"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>'},wl={"column-arrow":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 32 32"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 26C0 28.2092 1.79086 30 4 30H14C16.2091 30 18 28.2092 18 26V15H25.8786L24.4394 16.4393C23.8536 17.0251 23.8536 17.9749 24.4394 18.5607C25.0252 19.1464 25.9748 19.1464 26.5606 18.5607L30.5606 14.5607C31.1464 13.9749 31.1464 13.0251 30.5606 12.4393L26.5606 8.43934C25.9748 7.85356 25.0252 7.85356 24.4394 8.43934C23.8536 9.02512 23.8536 9.97488 24.4394 10.5607L25.8786 12H18V6C18 3.79086 16.2091 2 14 2H4C1.79086 2 0 3.79086 0 6V26ZM14 5H10.5V12H15V6C15 5.44772 14.5523 5 14 5ZM4 5H7.5V12H3V6C3 5.44772 3.44772 5 4 5ZM10.5 15H15V26C15 26.5522 14.5523 27 14 27H10.5V15ZM4 27H7.5V15H3V26C3 26.5522 3.44772 27 4 27Z" fill="currentColor"/></svg>',"small-down":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>',"small-up":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>',"pinned-top":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22ZM3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536Z"/></svg>',"pinned-bottom":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22ZM12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536Z"/></svg>',"un-pin":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11Z"/><path fill="currentColor" d="M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904l.589-.825Zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28l2.887-4.044ZM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972L9.277 1Z"/></svg>'},lC=(e={})=>{let t="";for(let i of[...Object.keys(vl),...Object.keys(wl)]){let s=dC(i,e.strokeWidth);t+=`.ag-icon-${i}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(s)}'); }
`}return t},dC=(e,t=1.5)=>{let i=wl[e];if(i)return i;let s=vl[e];if(!s)throw new Error(`Missing icon data for ${e}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+s+"</svg>"},cC=(e={})=>Ge({feature:"iconSet",css:()=>lC(e)});var uC=cC();var hC=':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-right:var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}',gC=".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:focus{box-shadow:var(--ag-focus-shadow)}}";var pC={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"}};var fC=()=>Ge({feature:"inputStyle",params:O(R({},pC),{inputBackgroundColor:ce,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:_e},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:Se(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0}),css:()=>hC+gC}),mC=fC();var CC='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:1px solid var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:1px solid var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative;&:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}&.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}&:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}&.ag-tab-selected:after{opacity:1}}:where(.ag-ltr) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}}}:where(.ag-rtl) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}}}';var vC={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:1,tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1};var wC=()=>Ge({feature:"tabStyle",params:O(R({},vC),{tabBarBorder:!0,tabBarBackgroundColor:he(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:ce}),css:CC}),SC=wC();var bC=()=>Qm().withPart(oC).withPart(aC).withPart(uC).withPart(SC).withPart(mC).withPart(ul).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),yC=bC();var RC={cssName:"--ag-cell-horizontal-padding",changeKey:"cellHorizontalPaddingChanged",defaultValue:16},xC={cssName:"--ag-indentation-level",changeKey:"indentationLevelChanged",defaultValue:0,noWarn:!0,cacheDefault:!0},FC={cssName:"--ag-row-group-indent-size",changeKey:"rowGroupIndentSizeChanged",defaultValue:0},sr={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},or={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},nr={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},$s={cssName:"--ag-row-border",changeKey:"rowBorderWidthChanged",defaultValue:1,border:!0},rr={cssName:"--ag-pinned-row-border",changeKey:"pinnedRowBorderWidthChanged",defaultValue:1,border:!0},EC=0,PC=class extends y{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.paramsClass=`ag-theme-params-${++EC}`,this.globalCSS=[]}wireBeans(e){let{eGridDiv:t,gridOptions:i}=e;this.eGridDiv=t,this.eStyleContainer=i.themeStyleContainer??(t.getRootNode()===document?document.head:t),this.cssLayer=i.themeCssLayer,this.styleNonce=i.styleNonce}postConstruct(){this.addManagedPropertyListener("theme",()=>this.handleThemeGridOptionChange()),this.handleThemeGridOptionChange(),this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(sr),this.getSizeEl(or),this.getSizeEl(nr),this.getSizeEl($s),this.getSizeEl(rr),this.refreshRowBorderWidthVariable(),this.addDestroyFunc(()=>Pm(this)),this.mutationObserver=new MutationObserver(()=>{this.fireGridStylesChangedEvent("themeChanged")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(rr)}getRowBorderWidth(){return this.getCSSVariablePixelValue($s)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(sr)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(or)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(RC)}getCellPaddingLeft(){let e=this.getDefaultCellHorizontalPadding(),t=this.getCSSVariablePixelValue(xC),i=this.getCSSVariablePixelValue(FC);return e-1+i*t}getCellPadding(){let e=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+e}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(nr)}applyThemeClasses(e){let{gridTheme:t}=this,i="";if(t)i=`${this.paramsClass} ${t._getCssClass()}`;else{this.mutationObserver.disconnect();let s=this.eGridDiv;for(;s;){let o=!1;for(let n of Array.from(s.classList))n.startsWith("ag-theme-")&&(o=!0,i=i?`${i} ${n}`:n);o&&this.mutationObserver.observe(s,{attributes:!0,attributeFilter:["class"]}),s=s.parentElement}}for(let s of Array.from(e.classList))s.startsWith("ag-theme-")&&e.classList.remove(s);if(i){let s=e.className;e.className=s+(s?" ":"")+i}}refreshRowHeightVariable(){let{eGridDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),i=this.gos.get("rowHeight");if(i==null||isNaN(i)||!isFinite(i))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;let s=`${i}px`;return t!=s?(e.style.setProperty("--ag-line-height",s),i):t!=""?parseFloat(t):-1}addGlobalCSS(e,t){this.gridTheme?Lt(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}getCSSVariablePixelValue(e){let t=this.lastKnownValues.get(e);if(t!=null)return t;let i=this.measureSizeEl(e);return i==="detached"||i==="no-styles"?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,i),i)}measureSizeEl(e){let t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";let i=t.offsetWidth;return i===Ks?"no-styles":(this.sizesMeasured=!0,i)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=W({tag:"div",cls:"ag-measurement-container"}),this.eGridDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;let i=this.getMeasurementContainer();t=W({tag:"div"});let{border:s,noWarn:o}=e;s?(t.className="ag-measurement-element-border",t.style.setProperty("--ag-internal-measurement-border",`var(${e.cssName}, solid ${Ks}px)`)):t.style.width=`var(${e.cssName}, ${Ks}px)`,i.appendChild(t),this.sizeEls.set(e,t);let n=this.measureSizeEl(e);n==="no-styles"&&!o&&F(9,{variable:e});let r=qe(this.beans,t,()=>{let a=this.measureSizeEl(e);a==="detached"||a==="no-styles"||(this.lastKnownValues.set(e,a),a!==n&&(n=a,this.fireGridStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>r()),t}fireGridStylesChangedEvent(e){e==="rowBorderWidthChanged"&&this.refreshRowBorderWidthVariable(),this.eventSvc.dispatchEvent({type:"gridStylesChanged",[e]:!0})}refreshRowBorderWidthVariable(){let e=this.getCSSVariablePixelValue($s);this.eGridDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}handleThemeGridOptionChange(){let{gos:e,eGridDiv:t,globalCSS:i,gridTheme:s}=this,o=e.get("theme"),n;if(o==="legacy")n=void 0;else{let r=o??yC;r instanceof fl?n=r:z(240,{theme:r})}if(n!==s){if(n){Em(this),ll(this.eStyleContainer,this.cssLayer,this.styleNonce);for(let[a,l]of i)Lt(a,this.eStyleContainer,l,this.cssLayer,0,this.styleNonce);i.length=0}this.gridTheme=n,n?._startUse({loadThemeGoogleFonts:e.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce});let r=this.eParamsStyle;if(!r){r=this.eParamsStyle=W({tag:"style"});let a=this.gos.get("styleNonce");a&&r.setAttribute("nonce",a),t.appendChild(r)}en||(r.textContent=n?._getPerGridCss(this.paramsClass)||""),this.applyThemeClasses(t),this.fireGridStylesChangedEvent("themeChanged")}n&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&z(o?106:239)}},Ks=15538,DC=class extends y{constructor(){super(...arguments),this.beanName="eventSvc",this.globalSvc=new rt}postConstruct(){let{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}addEventListener(e,t,i){this.globalSvc.addEventListener(e,t,i)}removeEventListener(e,t,i){this.globalSvc.removeEventListener(e,t,i)}addGlobalListener(e,t=!1){this.globalSvc.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalSvc.removeGlobalListener(e,t)}dispatchLocalEvent(){}dispatchEvent(e){this.globalSvc.dispatchEvent(I(this.gos,e))}dispatchEventOnce(e){this.globalSvc.dispatchEventOnce(I(this.gos,e))}};function Sl(e){return e?e.getLeafColumns().some(t=>t.isSpanHeaderHeight()):!1}function bo(e,t){let i;if(j(e)&&Sl(e)&&e.isPadding()){let s=e;i=s.getLeafColumns()[0];let o=i;for(;o!==s;)t++,o=o.getParent()}return{column:i||e,headerRowIndex:t}}var MC=class extends y{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){let e=this.beans;e.ctrlsSvc.whenReady(this,i=>{this.gridBodyCon=i.gridBodyCtrl});let t=q(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let i,{colModel:s,colGroupSvc:o,ctrlsSvc:n}=this.beans;if(typeof e=="string"?(i=s.getCol(e),i||(i=o?.getColumnGroup(e)??null)):i=e,!i)return null;let a=n.getHeaderRowContainerCtrl()?.getAllCtrls(),l=N(a||[]).type==="filter",d=Pe(this.beans)-1,c=-1,u=i;for(;u;)c++,u=u.getParent();let h=c;return t&&l&&h===d-1&&h++,h===-1?null:{headerRowIndex:h,column:i}}navigateVertically(e,t,i){let s=this.beans.focusSvc;if(t||(t=s.focusedHeader),!t)return!1;let{headerRowIndex:o}=t,n=t.column,r=Pe(this.beans),a=e==="UP",l=this.getHeaderRowType(o),{headerRowIndex:d,column:c,headerRowIndexWithoutSpan:u}=a?TC(l,n,o):AC(l,n,o),h=!1;return d<0&&(d=0,c=n,h=!0),d>=r?(d=-1,this.currentHeaderRowWithoutSpan=-1):u!==void 0&&(this.currentHeaderRowWithoutSpan=u),!h&&!c?!1:s.focusHeaderPosition({headerPosition:{headerRowIndex:d,column:c},allowUserOverride:!0,event:i})}navigateHorizontally(e,t=!1,i){let{focusSvc:s,gos:o}=this.beans,n=s.focusedHeader,r,a;this.currentHeaderRowWithoutSpan!==-1?n.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=n.headerRowIndex,e==="LEFT"!==o.get("enableRtl")?(a="Before",r=this.findHeader(n,a)):(a="After",r=this.findHeader(n,a));let l=o.getCallback("tabToNextHeader");if(t&&l){let d=s.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:r,direction:a});if(d){let{headerRowIndex:c}=s.focusedHeader||{};c!=null&&c!=n.headerRowIndex&&(this.currentHeaderRowWithoutSpan=c)}return d}return r||!t?s.focusHeaderPosition({headerPosition:r,direction:a,fromTab:t,allowUserOverride:!0,event:i}):this.focusNextHeaderRow(n,a,i)}focusNextHeaderRow(e,t,i){let s=e.headerRowIndex,o=null,n,r=this.beans;if(t==="Before"?s>0&&(n=s-1,this.currentHeaderRowWithoutSpan-=1,o=this.findColAtEdgeForHeaderRow(n,"end")):(n=s+1,this.currentHeaderRowWithoutSpan<Pe(r)?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1,o=this.findColAtEdgeForHeaderRow(n,"start")),!o)return!1;let{column:a,headerRowIndex:l}=bo(o.column,o?.headerRowIndex);return r.focusSvc.focusHeaderPosition({headerPosition:{column:a,headerRowIndex:l},direction:t,fromTab:!0,allowUserOverride:!0,event:i})}scrollToColumn(e,t="After"){if(e.getPinned())return;let i;if(j(e)){let s=e.getDisplayedLeafColumns();i=t==="Before"?N(s):s[0]}else i=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(i)}findHeader(e,t){let i,s,{colGroupSvc:o,visibleCols:n}=this.beans;if(j(e.column)?i=o?.getGroupAtDirection(e.column,t)??void 0:(s=`getCol${t}`,i=n[s](e.column)),!i)return;let{headerRowIndex:r}=e;if(this.getHeaderRowType(r)!=="filter"){let d=[i];for(;i.getParent();)i=i.getParent(),d.push(i);i=d[Math.max(0,d.length-1-r)]}let{column:a,headerRowIndex:l}=bo(i,r);return{column:a,headerRowIndex:l}}getHeaderRowType(e){let t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}findColAtEdgeForHeaderRow(e,t){let{visibleCols:i,ctrlsSvc:s,colGroupSvc:o}=this.beans,n=i.allCols,r=n[t==="start"?0:n.length-1];if(!r)return;let l=s.getHeaderRowContainerCtrl(r.getPinned())?.getRowType(e);if(l=="group"){let d=o?.getColGroupAtLevel(r,e);return{headerRowIndex:e,column:d}}return{headerRowIndex:l==null?-1:e,column:r}}};function TC(e,t,i){let s=e==="filter",o=e==="column",n=s?t:t.getParent(),r=i-1,a=r;if(o&&Sl(t.getParent())){for(;n&&n.isPadding();)n=n.getParent(),r--;a=r,r<0&&(n=t,r=i,a=void 0)}return{column:n,headerRowIndex:r,headerRowIndexWithoutSpan:a}}function AC(e,t,i,s="After"){let o=t,n=i+1,r=n;if(e==="group"){let a=t.getDisplayedLeafColumns(),l=s==="After"?a[0]:N(a),d=[],c=l;for(;c.getParent()!==t;)c=c.getParent(),d.push(c);if(o=l,l.isSpanHeaderHeight())for(let u=d.length-1;u>=0;u--){let h=d[u];if(!h.isPadding()){o=h;break}n++}else o=N(d),o||(o=l)}return{column:o,headerRowIndex:n,headerRowIndexWithoutSpan:r}}var kC=class extends y{constructor(){super(...arguments),this.beanName="focusSvc",this.focusFallbackTimeout=null,this.needsFocusRestored=!1}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols,this.rowRenderer=e.rowRenderer,this.navigation=e.navigation,this.filterManager=e.filterManager,this.overlays=e.overlays}postConstruct(){let e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(ku(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,this.focusFallbackTimeout!=null&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,this.focusFallbackTimeout!=null&&(clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null)}shouldTakeFocus(){return this.gos.get("suppressFocusAfterRefresh")?(this.setFocusRecovered(),!1):this.needsFocusRestored?(this.setFocusRecovered(),!0):this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;let e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){let{gos:e,focusedCell:t}=this;return e.get("suppressFocusAfterRefresh")||e.get("suppressCellFocus")||!t||!this.doesRowOrCellHaveBrowserFocus()?null:t}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader||!this.isDomDataPresentInHierarchy($(this.beans),qa)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){let e=$(this.beans);return this.isDomDataPresentInHierarchy(e,Xi)?!0:this.isDomDataPresentInHierarchy(e,is)}isDomDataPresentInHierarchy(e,t){let i=e;for(;i;){if(Ur(this.gos,i,t))return!0;i=i.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){let{rowIndex:t,rowPinned:i,column:s}=e,o={rowIndex:t,rowPinned:i,column:s,isFullWidthCell:!1},n=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i});return n&&(o.isFullWidthCell=n.isFullWidth()),o}clearFocusedCell(){if(this.focusedCell==null)return;let e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent(R({type:"cellFocusCleared"},e))}setFocusedCell(e){this.setFocusRecovered();let{column:t,rowIndex:i,rowPinned:s,forceBrowserFocus:o=!1,preventScrollOnBrowserFocus:n=!1}=e,r=this.colModel.getCol(t);if(!r){this.focusedCell=null;return}this.focusedCell={rowIndex:i,rowPinned:ke(s),column:r},this.eventSvc.dispatchEvent(O(R({type:"cellFocused"},this.getFocusEventParams(this.focusedCell)),{forceBrowserFocus:o,preventScrollOnBrowserFocus:n}))}isCellFocused(e){return this.focusedCell==null?!1:ka(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;let{column:t,rowCtrl:{rowIndex:i,pinned:s}}=e,{column:o,headerRowIndex:n}=this.focusedHeader;return t===o&&i===n&&s==o.getPinned()}focusHeaderPosition(e){if(this.setFocusRecovered(),ot(this.beans))return!1;let{direction:t,fromTab:i,allowUserOverride:s,event:o,fromCell:n,rowWithoutSpanValue:r}=e,{headerPosition:a}=e;if(n&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(a);if(s){let l=this.focusedHeader,d=Pe(this.beans);if(i){let c=this.gos.getCallback("tabToNextHeader");c&&(a=this.getHeaderPositionFromUserFunc({userFunc:c,direction:t,currentPosition:l,headerPosition:a,headerRowCount:d}))}else{let c=this.gos.getCallback("navigateToNextHeader");if(c&&o){let u={key:o.key,previousHeaderPosition:l,nextHeaderPosition:a,headerRowCount:d,event:o};a=c(u)}}}return a?this.focusProvidedHeaderPosition({headerPosition:a,direction:t,event:o,fromCell:n,rowWithoutSpanValue:r}):!1}focusHeaderPositionFromUserFunc(e){if(ot(this.beans))return!1;let{userFunc:t,headerPosition:i,direction:s,event:o}=e,n=this.focusedHeader,r=Pe(this.beans),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:s,currentPosition:n,headerPosition:i,headerRowCount:r});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:s,event:o})}getHeaderPositionFromUserFunc(e){let{userFunc:t,direction:i,currentPosition:s,headerPosition:o,headerRowCount:n}=e,a=t({backwards:i==="Before",previousHeaderPosition:s,nextHeaderPosition:o,headerRowCount:n});return a===!0?s:a===!1?null:a}focusProvidedHeaderPosition(e){let{headerPosition:t,direction:i,fromCell:s,rowWithoutSpanValue:o,event:n}=e,{column:r,headerRowIndex:a}=t,{filterManager:l,ctrlsSvc:d,headerNavigation:c}=this.beans;if(a===-1)return l?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:r,event:n});c?.scrollToColumn(r,i);let h=d.getHeaderRowContainerCtrl(r.getPinned())?.focusHeader(t.headerRowIndex,r,n)||!1;return c&&h&&(o!=null||s)&&(c.currentHeaderRowWithoutSpan=o??-1),h}focusFirstHeader(){if(this.overlays?.isExclusive()&&this.focusOverlay())return!0;let e=this.visibleCols.allCols[0];if(!e)return!1;let{colGroupSvc:t}=this.beans;t&&e.getParent()&&(e=t.getColGroupAtLevel(e,0));let i=bo(e,0);return this.focusHeaderPosition({headerPosition:i,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.isExclusive()&&this.focusOverlay(!0))return!0;let t=Pe(this.beans)-1,i=N(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:i},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return this.focusedCell==null?!1:this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===ke(t)}focusOverlay(e){let t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&dt(t,e)}focusGridView(e){let{backwards:t=!1,canFocusOverlay:i=!0,event:s}=e;if(this.overlays?.isExclusive())return i&&this.focusOverlay(t);if(ds(this.beans))return t&&!ot(this.beans)?this.focusLastHeader():i&&this.focusOverlay(t)?!0:t?!1:It(this.beans,t);let o=t?ih(this.beans):th(this.beans);if(o){let n=e.column??this.focusedHeader?.column,{rowIndex:r,rowPinned:a}=o,l=Ji(this.beans,o);if(!n||!l||r==null)return!1;if(n.isSuppressNavigable(l)){let d=this.gos.get("enableRtl"),c;return!s||s.key===b.TAB?c=d?b.LEFT:b.RIGHT:c=s.key,this.beans.navigation?.navigateToNextCell(null,c,{rowIndex:r,column:n,rowPinned:a||null},!0),!0}return this.navigation?.ensureCellVisible({rowIndex:r,column:n,rowPinned:a}),t&&this.rowRenderer.getRowByPosition(o)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(o,t)||(this.setFocusedCell({rowIndex:r,column:n,rowPinned:ke(a),forceBrowserFocus:!0}),this.beans.rangeSvc?.setRangeToCell({rowIndex:r,rowPinned:a,column:n})),!0}return!!(i&&this.focusOverlay(t)||t&&this.focusLastHeader())}focusAdvancedFilter(e){return this.advFilterFocusColumn=e?.column,this.beans.advancedFilter?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(e,t){let i=(t?void 0:this.advFilterFocusColumn)??this.visibleCols.allCols?.[0];return e?this.focusHeaderPosition({headerPosition:{column:i,headerRowIndex:Pe(this.beans)-1}}):this.focusGridView({column:i})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},IC=class extends y{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){this.getScrollbarWidth(),this.addManagedEventListeners({displayedColumnsChanged:this.updateScrollVisible.bind(this),displayedColumnsWidthChanged:this.updateScrollVisible.bind(this)})}updateScrollVisible(){let{colAnimation:e}=this;e?.isActive()?e.executeLaterVMTurn(()=>{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){let e=this.ctrlsSvc.get("center");if(!e||this.colAnimation?.isActive())return;let t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){let e=this.ctrlsSvc.get("center"),t=e.hasHorizontalScrollGap(),i=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==i)&&(this.horizontalScrollGap=t,this.verticalScrollGap=i,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(this.scrollbarWidth==null){let e=this.gos.get("scrollbarWidth"),i=typeof e=="number"&&e>=0?e:Rd();i!=null&&(this.scrollbarWidth=i,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},LC=class extends y{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;let{stateSvc:e,ctrlsSvc:t,context:i}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:e?.getState()??{}}),this.destroyCalled=!0,t.get("gridCtrl")?.destroyGridUi(),i.destroy(),super.destroy()}},Gi=new Set(["gridPreDestroyed","fillStart","pasteStart"]),OC={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:"	",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1},Kt=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),HC={tag:"span",cls:"ag-sort-indicator-container",children:[Kt("Order","order"),Kt("Asc","ascending-icon"),Kt("Desc","descending-icon"),Kt("Mixed","mixed-icon"),Kt("None","none-icon")]},sn=class extends V{constructor(e){super(),this.eSortOrder=E,this.eSortAsc=E,this.eSortDesc=E,this.eSortMixed=E,this.eSortNone=E,e||this.setTemplate(HC)}attachCustomElements(e,t,i,s,o){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=i,this.eSortMixed=s,this.eSortNone=o}setupSort(e,t=!1){if(this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),!e.isSortable()&&!e.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e);let i=this.updateIcons.bind(this),s=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",i),this.addManagedEventListeners({newColumnsLoaded:i,sortChanged:s,columnRowGroupChanged:s}),this.onSortChanged()}addInIcon(e,t,i){if(t==null)return;let s=ge(e,this.beans,i);s&&t.appendChild(s)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){let{eSortAsc:e,eSortDesc:t,eSortNone:i,column:s,gos:o,beans:n}=this,r=n.sortSvc.getDisplaySortForColumn(s);if(e&&U(e,r==="asc",{skipAriaHidden:!0}),t&&U(t,r==="desc",{skipAriaHidden:!0}),i){let a=!s.getColDef().unSortIcon&&!o.get("unSortIcon"),l=r==null;U(i,!a&&l,{skipAriaHidden:!0})}}setupMultiSortIndicator(){let{eSortMixed:e,column:t,gos:i}=this;this.addInIcon("sortUnSort",e,t);let s=t.getColDef().showRowGroup;Ee(i)&&s&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){let{eSortMixed:e,beans:t,column:i}=this;if(e){let s=t.sortSvc.getDisplaySortForColumn(i)==="mixed";U(e,s,{skipAriaHidden:!0})}}updateSortOrder(){let{eSortOrder:e,column:t,beans:{sortSvc:i}}=this;if(!e)return;let s=i.getColumnsWithSortingOrdered(),o=i.getDisplaySortIndexForColumn(t)??-1,n=s.some(a=>i.getDisplaySortIndexForColumn(a)??!1),r=o>=0&&n;U(e,r,{skipAriaHidden:!0}),o>=0?e.textContent=(o+1).toString():J(e)}},GC={selector:"AG-SORT-INDICATOR",component:sn},fi=["asc","desc",null],BC=class extends y{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,i){let s=this.getNextSortDirection(e);this.setSortForColumn(e,s,t,i)}progressSortFromEvent(e,t){let s=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,s,"uiColumnSorted")}setSortForColumn(e,t,i,s){t!=="asc"&&t!=="desc"&&(t=null);let{gos:o,showRowGroupCols:n}=this.beans,r=Ee(o),a=[e];if(r&&e.getColDef().showRowGroup){let u=n?.getSourceColumnsForGroupColumn?.(e)?.filter(h=>h.isSortable());u&&(a=[e,...u])}a.forEach(c=>this.setColSort(c,t,s));let l=(i||o.get("alwaysMultiSort"))&&!o.get("suppressMultiSort"),d=[];if(!l){let c=this.clearSortBarTheseColumns(a,s);d.push(...c)}this.updateSortIndex(e),d.push(...a),this.dispatchSortChangedEvents(s,d)}updateSortIndex(e){let{gos:t,colModel:i,showRowGroupCols:s}=this.beans,o=Ee(t),n=s?.getShowRowGroupCol(e.getId()),r=o&&n||e,a=this.getColumnsWithSortingOrdered();i.forAllCols(c=>this.setColSortIndex(c,null));let l=a.filter(c=>o&&c.getColDef().showRowGroup?!1:c!==r);(r.getSort()?[...l,r]:l).forEach((c,u)=>this.setColSortIndex(c,u))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols(t=>{t.getSort()&&(e=!0)}),e}dispatchSortChangedEvents(e,t){let i={type:"sortChanged",source:e};t&&(i.columns=t),this.eventSvc.dispatchEvent(i)}clearSortBarTheseColumns(e,t){let i=[];return this.beans.colModel.forAllCols(s=>{e.includes(s)||(s.getSort()&&i.push(s),this.setColSort(s,void 0,t))}),i}getNextSortDirection(e){let t=e.getColDef().sortingOrder??this.gos.get("sortingOrder")??fi,i=t.indexOf(e.getSort()),s=i<0,o=i==t.length-1;return s||o?t[0]:t[i+1]}getIndexedSortMap(){let{gos:e,colModel:t,showRowGroupCols:i,rowGroupColsSvc:s}=this.beans,o=[];if(t.forAllCols(d=>{d.getSort()&&o.push(d)}),t.isPivotMode()){let d=Ee(e);o=o.filter(c=>{let u=!!c.getAggFunc(),h=!c.isPrimary(),g=d?i?.getShowRowGroupCol(c.getId()):c.getColDef().showRowGroup;return u||h||g})}let n=s?.columns.filter(d=>!!d.getSort())??[],r={};o.forEach((d,c)=>r[d.getId()]=c),o.sort((d,c)=>{let u=d.getSortIndex(),h=c.getSortIndex();if(u!=null&&h!=null)return u-h;if(u==null&&h==null){let g=r[d.getId()],p=r[c.getId()];return g>p?1:-1}else return h==null?-1:1});let a=Ee(e)&&!!n.length;a&&(o=[...new Set(o.map(d=>i?.getShowRowGroupCol(d.getId())??d))]);let l=new Map;return o.forEach((d,c)=>l.set(d,c)),a&&n.forEach(d=>{let c=i.getShowRowGroupCol(d.getId());l.set(d,l.get(c))}),l}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),colId:e.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),column:e}))}canColumnDisplayMixedSort(e){let t=Ee(this.gos),i=!!e.getColDef().showRowGroup;return t&&i}getDisplaySortForColumn(e){let t=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSort();let s=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,o=s[0].getSort();return s.every(r=>r.getSort()==o)?o:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t,i){let s=0;e.addManagedListeners(t,{movingChanged:()=>{s=Date.now()}}),i&&e.addManagedElementListeners(i,{click:n=>{let r=t.isMoving(),l=Date.now()-s<50;r||l||this.progressSortFromEvent(t,n)}});let o=()=>{let n=t.getSort();if(e.toggleCss("ag-header-cell-sorted-asc",n==="asc"),e.toggleCss("ag-header-cell-sorted-desc",n==="desc"),e.toggleCss("ag-header-cell-sorted-none",!n),t.getColDef().showRowGroup){let l=!this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t)?.every(d=>t.getSort()==d.getSort());e.toggleCss("ag-header-cell-sorted-mixed",l)}};e.addManagedEventListeners({sortChanged:o,columnRowGroupChanged:o})}initCol(e){let{sort:t,initialSort:i,sortIndex:s,initialSortIndex:o}=e.colDef;t!==void 0?(t==="asc"||t==="desc")&&(e.sort=t):(i==="asc"||i==="desc")&&(e.sort=i),s!==void 0?s!==null&&(e.sortIndex=s):o!==null&&(e.sortIndex=o)}updateColSort(e,t,i){t!==void 0&&(t==="desc"||t==="asc"?this.setColSort(e,t,i):this.setColSort(e,void 0,i))}setColSort(e,t,i){e.sort!==t&&(e.sort=t,e.dispatchColEvent("sortChanged",i)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new sn(e)}getSortIndicatorSelector(){return GC}},Tt={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agDateColumnFloatingFilter:"DateFilter",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"},VC=()=>({checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."}}),NC={aggFunc:"SharedAggregation",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:e,editable:t})=>t?typeof e=="string"?Tt[e]??"CustomEditor":"CustomEditor":null,cellRenderer:({cellRenderer:e})=>typeof e!="string"?null:Tt[e],cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:e,cellEditor:t})=>e&&!t?"TextEditor":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:e})=>e&&typeof e!="string"&&typeof e!="boolean"?"CustomFilter":typeof e=="string"?Tt[e]??"ColumnFilter":"ColumnFilter",floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",mainMenuItems:"ColumnMenu",menuTabs:e=>{let t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some(i=>t.includes(i))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",spanRows:"CellSpan"},zC=()=>({autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(t,{paginationAutoPageSize:i})=>i?"colDef.autoHeight is not supported with paginationAutoPageSize.":null},cellRendererParams:{validate:t=>(t.rowGroup!=null||t.rowGroupIndex!=null||t.cellRenderer==="agGroupCellRenderer")&&"checkbox"in t.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},flex:{validate:(t,i)=>i.autoSizeStrategy?"colDef.flex is not supported with gridOptions.autoSizeStrategy":null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(t,{rowSelection:i})=>i==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:i})=>i==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:i})=>i==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:t=>{let i=t.headerValueGetter;return typeof i=="function"||typeof i=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:t})=>{if(t){if(t.smallDown)return Ue(262);if(t.smallLeft)return Ue(263);if(t.smallRight)return Ue(264)}return null}},sortingOrder:{validate:t=>{let i=t.sortingOrder;if(Array.isArray(i)&&i.length>0){let s=i.filter(o=>!fi.includes(o));if(s.length>0)return`sortingOrder must be an array with elements from [${fi.map(Wi).join()}], currently it includes [${s.map(Wi).join()}]`}else if(!Array.isArray(i)||i.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${i}`;return null}},type:{validate:t=>{let i=t.type;return i instanceof Array?i.some(o=>typeof o!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof i=="string"?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(t,{suppressRowTransform:i})=>i?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{dependencies:{editable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(t,{rowSelection:i,cellSelection:s,suppressRowTransform:o,enableCellSpan:n,rowDragEntireRow:r,enableCellTextSelection:a})=>typeof i=="object"&&i?.mode==="singleRow"&&i?.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":s?"colDef.spanRows is not supported with cellSelection.":o?"colDef.spanRows is not supported with suppressRowTransform.":n?r?"colDef.spanRows is not supported with rowDragEntireRow.":a?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."}}),WC={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0},_C=()=>Object.keys(WC),UC=()=>({objectName:"colDef",allProperties:_C(),docsUrl:"column-properties/",deprecations:VC(),validations:zC()}),$C=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","pinnedRowsChanged","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","findChanged","rowResizeStarted","rowResizeEnded"],KC=["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","beforeRefreshModel","rowNodeDataChanged"],jC=()=>[...$C,...KC],qC=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce"],YC=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy","selectionColumnDef","findOptions"],QC=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],bl=["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","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"],ZC=["theme","rowSelection"],on=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],yl=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","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","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault"],XC=["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","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter","isRowPinnable","isRowPinned"],JC=()=>[...QC,...YC,...qC,...bl,...XC,...yl,...on,...ZC],ev=()=>({suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."}});function xe(e,t,i){return typeof t=="number"||t==null?t==null||t>=i?null:`${e}: value should be greater than or equal to ${i}`:`${e}: value should be a number`}var tv={alignedGrids:"AlignedGrids",allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:"SharedRowGrouping",grandTotalRow:"SharedRowGrouping",initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isRowPinnable:"PinnedRow",localeText:"Locale",masterDetail:"SharedMasterDetail",pagination:"Pagination",pinnedBottomRowData:"PinnedRow",pinnedTopRowData:"PinnedRow",pivotMode:"SharedPivot",pivotPanelShow:"RowGroupingPanel",quickFilterText:"QuickFilter",rowClass:"RowStyle",rowClassRules:"RowStyle",rowData:"ClientSideRowModel",rowDragManaged:"RowDrag",rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:"SharedRowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:"SharedTreeData",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},iv=()=>{let e={autoSizePadding:{validate({autoSizePadding:i}){return xe("autoSizePadding",i,0)}},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:i}){return xe("cacheBlockSize",i,1)}},cacheOverflowSize:{validate({cacheOverflowSize:i}){return xe("cacheOverflowSize",i,1)}},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:i=>{let s=i.domLayout,o=["autoHeight","normal","print"];return s&&!o.includes(s)?`domLayout must be one of [${o.join()}], currently it's ${s}`:null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate({enableRowPinning:i,pinnedTopRowData:s,pinnedBottomRowData:o}){return i&&(s||o)?"Manual row pinning cannot be used together with pinned row data. Either set `enableRowPinning` to `false`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":null}},isRowPinnable:{supportedRowModels:["clientSide"],validate({isRowPinnable:i,pinnedTopRowData:s,pinnedBottomRowData:o}){return i&&(s||o)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":null}},isRowPinned:{supportedRowModels:["clientSide"],validate({isRowPinned:i,pinnedTopRowData:s,pinnedBottomRowData:o}){return i&&(s||o)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":null}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},icons:{validate:({icons:i})=>{if(i){if(i.smallDown)return Ue(262);if(i.smallLeft)return Ue(263);if(i.smallRight)return Ue(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:i}){return xe("infiniteInitialRowCount",i,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},keepDetailRowsCount:{validate({keepDetailRowsCount:i}){return xe("keepDetailRowsCount",i,1)}},paginationPageSize:{validate({paginationPageSize:i}){return xe("paginationPageSize",i,1)}},paginationPageSizeSelector:{validate:i=>{let s=i.paginationPageSizeSelector;return typeof s=="boolean"||s==null||s.length?null:`'paginationPageSizeSelector' cannot be an empty array.
                    If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate({rowBuffer:i}){return xe("rowBuffer",i,0)}},rowClass:{validate:i=>typeof i.rowClass=="function"?"rowClass should not be a function, please use getRowClass instead":null},rowData:{supportedRowModels:["clientSide"]},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{treeData:{required:[!1,void 0]},pagination:{required:[!1,void 0]}}},rowSelection:{validate({rowSelection:i}){return i&&typeof i=="string"?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':i&&typeof i!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":i&&i.mode!=="multiRow"&&i.mode!=="singleRow"?`Selection mode "${i.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null}},rowStyle:{validate:i=>{let s=i.rowStyle;return s&&typeof s=="function"?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null}},serverSideDatasource:{supportedRowModels:["serverSide"]},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:i}){return xe("serverSideInitialRowCount",i,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:i=>{let s=i.sortingOrder;if(Array.isArray(s)&&s.length>0){let o=s.filter(n=>!fi.includes(n));if(o.length>0)return`sortingOrder must be an array with elements from [${fi.map(Wi).join()}], currently it includes [${o.map(Wi).join()}]`}else if(!Array.isArray(s)||s.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${s}`;return null}},tooltipHideDelay:{validate:i=>i.tooltipHideDelay&&i.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:i=>i.tooltipShowDelay&&i.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:i=>{let s=i.rowModelType??"clientSide";switch(s){case"clientSide":{let{treeDataChildrenField:o,treeDataParentIdField:n,getDataPath:r,getRowId:a}=i;if(!o&&!n&&!r)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(o){if(r)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(n)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(n){if(!a)return"getRowId callback not provided, tree data with parent id cannot be built.";if(r)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":{let o=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${s} row model.`;return i.isServerSideGroup&&i.getServerSideGroupKey?null:o}}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:i}){return xe("viewportRowModelBufferSize",i,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:i}){return xe("viewportRowModelPageSize",i,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate({autoGroupColumnDef:i,showOpenedGroup:s}){return i?.field&&s?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":i?.valueGetter&&s?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null}}},t={};return yl.forEach(i=>{t[i]={expectedType:"boolean"}}),bl.forEach(i=>{t[i]={expectedType:"number"}}),oe(t,e),t},sv=()=>({objectName:"gridOptions",allProperties:[...JC(),...jC().map(e=>Xr(e))],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:ev(),validations:iv()}),ov=0,nv=0,rv=class extends y{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.gridInstanceId=nv++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new rt,this.globalEventHandlerFactory=e=>(t,i)=>{if(!this.isAlive())return;let s=Gi.has(t);if(s&&!e||!s&&e)return;let o=(n,r)=>{let a=this.gridOptions[Xr(n)];typeof a=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>a(r))};if(this.gridReadyFired)o(t,i);else if(t==="gridReady"){o(t,i),this.gridReadyFired=!0;for(let n of this.queueEvents)o(n.eventName,n.event);this.queueEvents=[]}else this.queueEvents.push({eventName:t,event:i})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getGridId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.validateGridOptions(this.gridOptions),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"gridOptionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){return this.gridOptions[e]??OC[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return P(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(i=>e(this.addGridCommonParams(i)))}updateGridOptions({options:e,force:t,source:i="api"}){let s={id:ov++,properties:[]},o=[],{gridOptions:n,validation:r}=this;for(let a of Object.keys(e)){let l=e[a];r?.warnOnInitialPropertyUpdate(i,a);let d=t||typeof l=="object"&&i==="api",c=n[a];if(d||c!==l){n[a]=l;let u={type:a,currentValue:l,previousValue:c,changeSet:s,source:i};o.push(u)}}this.validateGridOptions(this.gridOptions),s.properties=o.map(a=>a.type),o.forEach(a=>{Ke(this,`Updated property ${a.type} from`,a.previousValue," to ",a.currentValue),this.propEventSvc.dispatchEvent(a)})}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addGridCommonParams(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t){for(let i of Object.keys(e)){let s=e[i];if(s==null||s===!1)continue;let o=t[i];typeof o=="function"&&(o=o(e,this.gridOptions,this.beans)),o&&this.assertModuleRegistered(o,i)}}validateGridOptions(e){this.validateOptions(e,tv),this.validation?.processGridOptions(e)}validateColDef(e,t,i){(i||!this.beans.dataTypeSvc?.isColPendingInference(t))&&(this.validateOptions(e,NC),this.validation?.validateColDef(e))}assertModuleRegistered(e,t){let i=Array.isArray(e)?e.some(s=>this.isModuleRegistered(s)):this.isModuleRegistered(e);return i||z(200,O(R({},this.getModuleErrorParams()),{moduleName:e,reasonOrId:t})),i}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:Go(),rowModelType:this.get("rowModelType"),isUmd:Ru()}}isModuleRegistered(e){return uo(e,this.gridId,this.get("rowModelType"))}};function Rl(e){let t={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:t},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:t},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:t},e?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var av=Rl(!0),lv=Rl(!1),dv=class extends V{constructor(){super(...arguments),this.eFilter=E,this.eFilterButton=E,this.eSortIndicator=E,this.eMenu=E,this.eLabel=E,this.eText=E,this.eSortOrder=E,this.eSortAsc=E,this.eSortDesc=E,this.eSortMixed=E,this.eSortNone=E,this.isLoadingInnerComponent=!1}refresh(e){let t=this.params;if(this.params=e,this.workOutTemplate(e,!!this.beans?.sortSvc)!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){let i=R({},e);oe(i,e.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(i)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){let i=e.template;return i?i?.trim?i.trim():i:t?av:lv}init(e){this.params=e;let{sortSvc:t,touchSvc:i,rowNumbersSvc:s,userCompFactory:o}=this.beans,n=t?.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!n),this.setTemplate(this.currentTemplate,n?[n]:void 0),i?.setupForHeader(this),this.setMenu(),this.setupSort(),s?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(o,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){let i=eu(e,t,t);i&&(this.isLoadingInnerComponent=!0,i.newAgStackInstance().then(s=>{this.isLoadingInnerComponent=!1,s&&(this.isAlive()?(this.innerHeaderComponent=s,this.eText&&this.eText.appendChild(s.getGui())):this.destroyBean(s))}))}setDisplayName(e){let{displayName:t}=e,i=this.currentDisplayName;this.currentDisplayName=t,!(!this.eText||i===t||this.innerHeaderComponent||this.isLoadingInnerComponent)&&(this.eText.textContent=Ht(t))}addInIcon(e,t,i){let s=ge(e,this.beans,i);s&&t.appendChild(s)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){se(this.eMenu),this.eMenu=void 0;return}let{gos:e,eMenu:t,params:i}=this,s=de(e);this.addInIcon(s?"menu":"menuAlt",t,i.column),t.classList.toggle("ag-header-menu-icon",!s);let o=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=o,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(o)}toggleMenuAlwaysShow(e){this.eMenu?.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){let{currentSuppressMenuHide:t,params:i}=this;t||this.toggleMenuAlwaysShow(!0),i.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){let{params:t,gos:i,beans:s,eMenu:o,eFilterButton:n}=this,r=t.column,a=de(i);if(e&&!a){if(s.menuSvc?.isFilterMenuInHeaderEnabled(r))return t.showFilter(n??o??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(o??n??this.getGui()),!0;return!1}setupSort(){let{sortSvc:e}=this.beans;if(!e)return;let{enableSorting:t,column:i}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));let{eSortIndicator:s,eSortOrder:o,eSortAsc:n,eSortDesc:r,eSortMixed:a,eSortNone:l}=this;s.attachCustomElements(o,n,r,a,l)}this.eSortIndicator.setupSort(i),this.currentSort&&e.setupHeader(this,i,this.eLabel)}setupFilterIcon(){let{eFilter:e,params:t}=this;if(!e)return;let i=()=>{let s=t.column.isFilterActive();U(e,s,{skipAriaHidden:!0})};this.configureFilter(t.enableFilterIcon,e,i,"filterActive")}setupFilterButton(){let{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0}configureFilter(e,t,i,s){if(!e)return se(t),!1;let o=this.params.column;return this.addInIcon(s,t,o),this.addManagedListeners(o,{filterChanged:i}),i(),!0}onFilterChangedButton(){let e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){let{eFilterButton:t,eMenu:i}=this;return e?t??i??this.getGui():i??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent&&(this.destroyBean(this.innerHeaderComponent),this.innerHeaderComponent=void 0)}},cv={tag:"div",cls:"ag-header-group-cell-label",role:"presentation",children:[{tag:"span",ref:"agLabel",cls:"ag-header-group-text",role:"presentation"},{tag:"span",ref:"agOpened",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"},{tag:"span",ref:"agClosed",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"}]},uv=class extends V{constructor(){super(cv),this.agOpened=E,this.agClosed=E,this.agLabel=E,this.isLoadingInnerComponent=!1}init(e){let{userCompFactory:t,touchSvc:i}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),i?.setupForHeaderGroup(this)}checkWarnings(){this.params.template&&F(89)}workOutInnerHeaderGroupComponent(e,t){let i=iu(e,t,t);i&&(this.isLoadingInnerComponent=!0,i.newAgStackInstance().then(s=>{this.isLoadingInnerComponent=!1,s&&(this.isAlive()?(this.innerHeaderGroupComponent=s,this.agLabel.appendChild(s.getGui())):this.destroyBean(s))}))}setupExpandIcons(){let{agOpened:e,agClosed:t,params:{columnGroup:i},beans:s}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);let o=l=>{if(Ie(l))return;let d=!i.isExpanded();s.colGroupSvc.setColumnGroupOpened(i.getProvidedColumnGroup(),d,"uiColumnExpanded")};this.addTouchAndClickListeners(s,t,o),this.addTouchAndClickListeners(s,e,o);let n=l=>{lt(l)};this.addManagedElementListeners(t,{dblclick:n}),this.addManagedElementListeners(e,{dblclick:n}),this.addManagedElementListeners(this.getGui(),{dblclick:o}),this.updateIconVisibility();let r=i.getProvidedColumnGroup(),a=this.updateIconVisibility.bind(this);this.addManagedListeners(r,{expandedChanged:a,expandableChanged:a})}addTouchAndClickListeners(e,t,i){e.touchSvc?.setupForHeaderGroupElement(this,t,i),this.addManagedElementListeners(t,{click:i})}updateIconVisibility(){let{agOpened:e,agClosed:t,params:{columnGroup:i}}=this;if(i.isExpandable()){let s=i.isExpanded();U(e,s),U(t,!s)}else U(e,!1),U(t,!1)}addInIcon(e,t){let i=ge(e,this.beans,null);i&&t.appendChild(i)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){let{agOpened:t,agClosed:i}=this;U(t,!1),U(i,!1);return}}setupLabel(e){let{displayName:t,columnGroup:i}=e,s=this.innerHeaderGroupComponent||this.isLoadingInnerComponent;P(t)&&!s&&(this.agLabel.textContent=Ht(t)),this.toggleCss("ag-sticky-label",!i.getColGroupDef()?.suppressStickyLabel)}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},hv={moduleName:"ColumnHeaderComp",version:D,userComponents:{agColumnHeader:dv},icons:{menu:"menu",menuAlt:"menu-alt"}},gv={moduleName:"ColumnGroupHeaderComp",version:D,userComponents:{agColumnGroupHeader:uv},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},pv=class extends y{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,e===0&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){this.active===!1&&F(92)}createTask(e,t,i,s){this.verify();let o=i;s&&this.batchFrameworkComps&&(o="f1");let n={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[o],n),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;let t=this.scrollGoingDown?1:-1;e.list.sort((i,s)=>i.index!==s.index?t*(s.index-i.index):s.createOrder-i.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){let{p1:t,p2:i,f1:s,destroyTasks:o,beans:n}=this,{ctrlsSvc:r,frameworkOverrides:a}=n,l=t.list,d=i.list,c=s.list,u=Date.now(),h=0,g=e<=0,p=r.getScrollFeature();for(;g||h<e;){if(!p.scrollGridIfNeeded()){let m;if(l.length)this.sortTaskList(t),m=l.pop().task;else if(d.length)this.sortTaskList(i),m=d.pop().task;else if(c.length)a.wrapOutgoing(()=>{for(;(g||h<e)&&!p.scrollGridIfNeeded();){if(c.length)this.sortTaskList(s),m=c.pop().task,m();else break;h=Date.now()-u}}),m=()=>{};else if(o.length)m=o.pop();else break;m()}h=Date.now()-u}l.length||d.length||c.length||o.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){let e=this.executeFrame.bind(this,60);Ve(this.beans,e)}isQueueEmpty(){return!this.ticking}},fv={moduleName:"AnimationFrame",version:D,beans:[pv]},mv=class extends y{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eBodyViewport,t)}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t)}mockRowContextMenu(e){if(!Je())return;let t=(i,s,o)=>{let{rowCtrl:n,cellCtrl:r}=e.getControlsForEventTarget(o?.target??null);r?.column&&r.dispatchCellContextMenuEvent(o??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,o,n,r)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!Je()||ia("dblclick"))return!1;let s=Date.now(),o=s-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=s,o})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){let{gos:t,sortSvc:i,menuSvc:s}=this.beans;if(t.get("suppressTouch"))return;let{params:o,eMenu:n,eFilterButton:r}=e,a=new Qe(e.getGui(),!0),l=e.shouldSuppressMenuHide(),d=l&&P(n)&&o.enableMenu,c=d?new Qe(n,!0):a;if(o.enableMenu||s?.isHeaderContextMenuEnabled(o.column)){let u=d?"tap":"longTap",h=g=>o.showColumnMenuAfterMouseClick(g.touchStart);e.addManagedListeners(c,{[u]:h})}if(o.enableSorting){let u=h=>{let g=h.touchStart.target;l&&(n?.contains(g)||r?.contains(g))||i?.progressSort(o.column,!1,"uiColumnSorted")};e.addManagedListeners(a,{tap:u})}if(o.enableFilterButton&&r){let u=new Qe(r,!0);e.addManagedListeners(u,{tap:()=>o.showFilter(r)}),e.addDestroyFunc(()=>u.destroy())}e.addDestroyFunc(()=>a.destroy()),d&&e.addDestroyFunc(()=>c.destroy())}setupForHeaderGroup(e){let t=e.params;if(this.beans.menuSvc?.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){let i=new Qe(t.eGridHeader,!0),s=o=>t.showColumnMenuAfterMouseClick(o.touchStart);e.addManagedListeners(i,{longTap:s}),e.addDestroyFunc(()=>i.destroy())}}setupForHeaderGroupElement(e,t,i){let s=new Qe(t,!0);e.addManagedListeners(s,{tap:i}),e.addDestroyFunc(()=>s.destroy())}mockContextMenu(e,t,i){if(!Je())return;let s=new Qe(t),o=n=>{gi(this.gos,n.touchEvent)&&i(void 0,n.touchStart,n.touchEvent)};e.addManagedListeners(s,{longTap:o}),e.addDestroyFunc(()=>s.destroy())}},Cv={moduleName:"Touch",version:D,beans:[mv]},vv=class extends y{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,i=!1){return i?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){let i=e===b.UP,s=e===b.DOWN,o=e===b.LEFT,n,r,{pageBounds:a,gos:l,visibleCols:d}=this.beans;if(i||s)r=i?a.getFirstRow():a.getLastRow(),n=t.column;else{let c=l.get("enableRtl");r=t.rowIndex,n=(o!==c?d.allCols:[...d.allCols].reverse()).find(h=>this.isCellGoodToFocusOn({rowIndex:r,rowPinned:null,column:h}))}return n?{rowIndex:r,rowPinned:null,column:n}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let i=t,s=!1;for(;!s;){switch(e){case b.UP:i=this.getCellAbove(i);break;case b.DOWN:i=this.getCellBelow(i);break;case b.RIGHT:i=this.gos.get("enableRtl")?this.getCellToLeft(i):this.getCellToRight(i);break;case b.LEFT:i=this.gos.get("enableRtl")?this.getCellToRight(i):this.getCellToLeft(i);break;default:i=null,F(8,{key:e});break}i?s=this.isCellGoodToFocusOn(i):s=!0}return i}isCellGoodToFocusOn(e){let t=e.column,i,{pinnedRowModel:s,rowModel:o}=this.beans;switch(e.rowPinned){case"top":i=s?.getPinnedTopRow(e.rowIndex);break;case"bottom":i=s?.getPinnedBottomRow(e.rowIndex);break;default:i=o.getRow(e.rowIndex);break}return i?!this.isSuppressNavigable(t,i):!1}getCellToLeft(e){if(!e)return null;let t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;let t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){if(!e)return null;let t=this.rowSpanSvc?.getCellEnd(e)??e,i=Ln(this.beans,t);return i?{rowIndex:i.rowIndex,column:e.column,rowPinned:i.rowPinned}:null}getCellAbove(e){if(!e)return null;let t=this.rowSpanSvc?.getCellStart(e)??e,i=es(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned});return i?{rowIndex:i.rowIndex,column:e.column,rowPinned:i.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){let{visibleCols:t,pagination:i}=this.beans,s=t.allCols,o=e.rowIndex,n=e.rowPinned,r=t.getColAfter(e.column);if(!r){r=s[0];let a=Ln(this.beans,e);if(_(a)||!a.rowPinned&&!(i?.isRowInPage(a.rowIndex)??!0))return null;o=a?a.rowIndex:null,n=a?a.rowPinned:null}return{rowIndex:o,column:r,rowPinned:n}}getNextTabbedCellBackwards(e){let{beans:t}=this,{visibleCols:i,pagination:s}=t,o=i.allCols,n=e.rowIndex,r=e.rowPinned,a=i.getColBefore(e.column);if(!a){a=N(o);let l=es(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(_(l)||!l.rowPinned&&!(s?.isRowInPage(l.rowIndex)??!0))return null;n=l?l.rowIndex:null,r=l?l.rowPinned:null}return{rowIndex:n,column:a,rowPinned:r}}isSuppressNavigable(e,t){let{suppressNavigable:i}=e.colDef;if(typeof i=="boolean")return i;if(typeof i=="function"){let s=e.createColumnFunctionCallbackParams(t);return i(s)}return!1}};function wv(e){return e.focusSvc.getFocusedCell()}function Sv(e){return e.focusSvc.clearFocusedCell()}function bv(e,t,i,s){e.focusSvc.setFocusedCell({rowIndex:t,column:i,rowPinned:s,forceBrowserFocus:!0})}function yv(e,t){return e.navigation?.tabToNextCell(!1,t)??!1}function Rv(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}function xv(e,t,i=!1){let s=e.headerNavigation?.getHeaderPositionForColumn(t,i);s&&e.focusSvc.focusHeaderPosition({headerPosition:s})}var Fv=class extends y{constructor(){super(),this.beanName="navigation",this.onPageDown=yn(this.onPageDown,100),this.onPageUp=yn(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){let i=e.key,s=e.altKey,o=e.ctrlKey||e.metaKey,n=!!this.beans.rangeSvc&&e.shiftKey,r=Yu(this.gos,e),a=!1;switch(i){case b.PAGE_HOME:case b.PAGE_END:!o&&!s&&(this.onHomeOrEndKey(i),a=!0);break;case b.LEFT:case b.RIGHT:case b.UP:case b.DOWN:if(!r)return!1;o&&!s&&!n&&(this.onCtrlUpDownLeftRight(i,r),a=!0);break;case b.PAGE_DOWN:case b.PAGE_UP:!o&&!s&&(a=this.handlePageUpDown(i,r,t));break}return a&&e.preventDefault(),a}handlePageUpDown(e,t,i){return i&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===b.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo(e){let{scrollIndex:t,scrollType:i,scrollColumn:s,focusIndex:o,focusColumn:n}=e,{scrollFeature:r}=this.gridBodyCon;P(s)&&!s.isPinned()&&r.ensureColumnVisible(s),P(t)&&r.ensureIndexVisible(t,i),e.isAsync||r.ensureIndexVisible(o);let{focusSvc:a,rangeSvc:l}=this.beans;a.setFocusedCell({rowIndex:o,column:n,rowPinned:null,forceBrowserFocus:!0}),l?.setRangeToCell({rowIndex:o,rowPinned:null,column:n})}onPageDown(e){let t=this.beans,i=js(t),s=this.getViewportHeight(),{pageBounds:o,rowModel:n,rowAutoHeight:r}=t,a=o.getPixelOffset(),l=i.top+s,d=n.getRowIndexAtPixel(l+a);r?.active?this.navigateToNextPageWithAutoHeight(e,d):this.navigateToNextPage(e,d)}onPageUp(e){let t=this.beans,i=js(t),{pageBounds:s,rowModel:o,rowAutoHeight:n}=t,r=s.getPixelOffset(),a=i.top,l=o.getRowIndexAtPixel(a+r);n?.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,i=!1){let{pageBounds:s,rowModel:o}=this.beans,n=this.getViewportHeight(),r=s.getFirstRow(),a=s.getLastRow(),l=s.getPixelOffset(),d=o.getRow(e.rowIndex),c=i?d?.rowHeight-n-l:n-l,u=d?.rowTop+c,h=o.getRowIndexAtPixel(u+l);if(h===e.rowIndex){let p=i?-1:1;t=h=e.rowIndex+p}let g;i?(g="bottom",h<r&&(h=r),t<r&&(t=r)):(g="top",h>a&&(h=a),t>a&&(t=a)),this.isRowTallerThanView(o.getRow(h))&&(t=h,g="top"),this.navigateTo({scrollIndex:t,scrollType:g,scrollColumn:null,focusIndex:h,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,i=!1){this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{let s=this.getNextFocusIndexForAutoHeight(e,i);this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:s,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){let i=t?-1:1,s=this.getViewportHeight(),{pageBounds:o,rowModel:n}=this.beans,r=o.getLastRow(),a=0,l=e.rowIndex;for(;l>=0&&l<=r;){let d=n.getRow(l);if(d){let c=d.rowHeight??0;if(a+c>s)break;a+=c}l+=i}return Math.max(0,Math.min(l,r))}getViewportHeight(){let e=this.beans,t=js(e),i=this.beans.scrollVisibleSvc.getScrollbarWidth(),s=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(s-=i),s}isRowTallerThanView(e){if(!e)return!1;let t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){let i=this.beans.cellNavigation.getNextCellToFocus(e,t,!0),{rowIndex:s}=i,o=i.column;this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:o,focusIndex:s,focusColumn:o})}onHomeOrEndKey(e){let t=e===b.PAGE_HOME,{visibleCols:i,pageBounds:s,rowModel:o}=this.beans,n=i.allCols,r=t?s.getFirstRow():s.getLastRow(),a=o.getRow(r);if(!a)return;let l=(t?n:[...n].reverse()).find(d=>!d.isSuppressNavigable(a));l&&this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:l,focusIndex:r,focusColumn:l})}onTabKeyDown(e,t){let i=t.shiftKey,s=this.tabToNextCellCommon(e,i,t),o=this.beans,{ctrlsSvc:n,pageBounds:r,focusSvc:a,gos:l}=o;if(s!==!1){s?t.preventDefault():s===null&&n.get("gridCtrl").allowFocusForNextCoreContainer(i);return}if(i){let{rowIndex:d,rowPinned:c}=e.getRowPosition();(c?d===0:d===r.getFirstRow())&&(l.get("headerHeight")===0||ot(o)?It(o,!0,!0):(t.preventDefault(),a.focusPreviousFromFirstCell(t)))}else e instanceof Jt&&e.focusCell(!0),(!i&&a.focusOverlay(!1)||It(o,i))&&t.preventDefault()}tabToNextCell(e,t){let i=this.beans,{focusSvc:s,rowRenderer:o}=i,n=s.getFocusedCell();if(!n)return!1;let r=wt(i,n);return!r&&(r=o.getRowByPosition(n),!r||!r.isFullWidth())?!1:!!this.tabToNextCellCommon(r,e,t)}tabToNextCellCommon(e,t,i){let s=e.editing;if(!s&&e instanceof Jt){let r=e.rowCtrl;r&&(s=r.editing)}let o;return s?this.gos.get("editType")==="fullRow"?o=this.moveToNextEditingRow(e,t,i):o=this.moveToNextEditingCell(e,t,i):o=this.moveToNextCellNotEditing(e,t,i),o===null?o:o||!!this.beans.focusSvc.focusedHeader}moveToNextEditingCell(e,t,i=null){let s=e.cellPosition;e.eGui.focus(),e.stopEditing();let o=this.findNextCellToFocusOn(s,t,!0);return o===!1?null:o==null?!1:(this.beans.editSvc?.startEditing(o,null,!0,i),o.focusCell(!1),!0)}moveToNextEditingRow(e,t,i=null){let s=e.cellPosition,o=this.findNextCellToFocusOn(s,t,!0);if(o===!1)return null;if(o==null)return!1;let n=o.cellPosition,r=this.isCellEditable(s),a=this.isCellEditable(n),l=n&&s.rowIndex===n.rowIndex&&s.rowPinned===n.rowPinned,{editSvc:d,rowEditSvc:c}=this.beans;if(r&&d?.setFocusOutOnEditor(e),!l){let u=e.rowCtrl;d?.stopRowEditing(u);let h=o.rowCtrl;c?.startEditing(h,void 0,void 0,i)}return a?(d?.setFocusInOnEditor(o),o.focusCell()):o.focusCell(!0),!0}moveToNextCellNotEditing(e,t,i){let s=this.beans.visibleCols.allCols,o;if(e instanceof ss){if(o=O(R({},e.getRowPosition()),{column:t?s[0]:N(s)}),this.gos.get("embedFullWidthRows")&&i){let r=e.findFullWidthInfoForEvent(i);r&&(o.column=r.column)}}else o=e.getFocusedCellPosition();let n=this.findNextCellToFocusOn(o,t,!1);if(n===!1)return null;if(n instanceof Jt)n.focusCell(!0);else if(n)return this.tryToFocusFullWidthRow(n,t);return P(n)}findNextCellToFocusOn(e,t,i){let s=e,o=this.beans,{cellNavigation:n,gos:r,focusSvc:a,rowRenderer:l,rangeSvc:d}=o;for(;;){e!==s&&(e=s),t||(s=this.getLastCellOfColSpan(s)),s=n.getNextTabbedCell(s,t);let c=r.getCallback("tabToNextCell");if(P(c)){let p=c({backwards:t,editing:i,previousCellPosition:e,nextCellPosition:s||null});if(p===!0)s=e;else{if(p===!1)return!1;s={rowIndex:p.rowIndex,column:p.column,rowPinned:p.rowPinned}}}if(!s)return null;if(s.rowIndex<0){let g=Pe(o);return a.focusHeaderPosition({headerPosition:{headerRowIndex:g+s.rowIndex,column:s.column},fromCell:!0}),null}let u=r.get("editType")==="fullRow";if(i&&!u&&!this.isCellEditable(s))continue;this.ensureCellVisible(s);let h=wt(o,s);if(!h){let g=l.getRowByPosition(s);if(!g||!g.isFullWidth()||i)continue;return O(R({},g.getRowPosition()),{column:s?.column})}if(!n.isSuppressNavigable(h.column,h.rowNode))return h.setFocusedCellPosition(s),d?.setRangeToCell(s),h}}isCellEditable(e){let t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){let{pinnedRowModel:i,rowModel:s}=this.beans;return t==="top"?i?.getPinnedTopRow(e):t==="bottom"?i?.getPinnedBottomRow(e):s.getRow(e)}navigateToNextCell(e,t,i,s){let o=i,n=!1,r=this.beans,{cellNavigation:a,focusSvc:l,gos:d}=r;for(;o&&(o===i||!this.isValidNavigateCell(o));)d.get("enableRtl")?t===b.LEFT&&(o=this.getLastCellOfColSpan(o)):t===b.RIGHT&&(o=this.getLastCellOfColSpan(o)),o=a.getNextCellToFocus(t,o),n=_(o);if(n&&e&&e.key===b.UP&&(o={rowIndex:-1,rowPinned:null,column:i.column}),s){let u=d.getCallback("navigateToNextCell");if(P(u)){let g=u({key:t,previousCellPosition:i,nextCellPosition:o||null,event:e});P(g)?o={rowPinned:g.rowPinned,rowIndex:g.rowIndex,column:g.column}:o=null}}if(!o)return;if(o.rowIndex<0){let u=Pe(r);l.focusHeaderPosition({headerPosition:{headerRowIndex:u+o.rowIndex,column:i.column},event:e||void 0,fromCell:!0});return}let c=this.getNormalisedPosition(o);c?this.focusPosition(c):this.tryToFocusFullWidthRow(o)}getNormalisedPosition(e){if(!!this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);let i=wt(this.beans,e);return i?(e=i.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){let{visibleCols:i,rowRenderer:s,focusSvc:o,eventSvc:n}=this.beans,r=i.allCols,a=s.getRowByPosition(e);if(!a||!a.isFullWidth())return!1;let l=o.getFocusedCell(),d={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?N(r):r[0])};this.focusPosition(d);let c=t??(l!=null&&Ju(d,l));return n.dispatchEvent({type:"fullWidthRowFocused",rowIndex:d.rowIndex,rowPinned:d.rowPinned,column:d.column,isFullWidthCell:!0,fromBelow:c}),!0}focusPosition(e){let{focusSvc:t,rangeSvc:i}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),i?.setRangeToCell(e)}isValidNavigateCell(e){return!!Ji(this.beans,e)}getLastCellOfColSpan(e){let t=wt(this.beans,e);if(!t)return e;let i=t.getColSpanningList();return i.length===1?e:{rowIndex:e.rowIndex,column:N(i),rowPinned:e.rowPinned}}ensureCellVisible(e){let t=jr(this.gos),i=this.beans.rowModel.getRow(e.rowIndex),s=t&&i?.sticky,{scrollFeature:o}=this.gridBodyCon;!s&&_(e.rowPinned)&&o.ensureIndexVisible(e.rowIndex),e.column.isPinned()||o.ensureColumnVisible(e.column)}};function js(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var Ev={moduleName:"KeyboardNavigation",version:D,beans:[Fv,vv,MC],apiFunctions:{getFocusedCell:wv,clearFocusedCell:Sv,setFocusedCell:bv,setFocusedHeader:xv,tabToNextCell:yv,tabToPreviousCell:Rv}},Pv=class extends y{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:e?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){let{pageBounds:e,pagination:t,rowModel:i}=this.beans;t?t.calculatePages():e.calculateBounds(0,i.getRowCount()-1)}},Dv=class extends y{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){let{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){let{topRowBounds:e,bottomRowBounds:t}=this,i=e?.rowTop??0,s=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:i,pageLastPixel:s}}calculateBounds(e,t){let{rowModel:i}=this.beans,s=i.getRowBounds(e);s&&(s.rowIndex=e),this.topRowBounds=s;let o=i.getRowBounds(t);o&&(o.rowIndex=t),this.bottomRowBounds=o,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){let e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},Mv=".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}",Tv=class extends y{constructor(e,t){super(),this.isLeft=e,this.elements=t,this.getWidth=e?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[`${this.isLeft?"left":"right"}PinnedWidthChanged`]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){let e=this.getWidth(),t=e>0;for(let i of this.elements)i&&(U(i,t),De(i,e))}},Av=class extends y{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});let e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){let{gos:e,visibleCols:t,eventSvc:i}=this.beans,s=Z(e,"print"),o=s?0:t.getColsLeftWidth(),n=s?0:t.getDisplayedColumnsRightWidth();o!=this.leftWidth&&(this.leftWidth=o,i.dispatchEvent({type:"leftPinnedWidthChanged"})),n!=this.rightWidth&&(this.rightWidth=n,i.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){let e=this.gridBodyCtrl.eBodyViewport,t=ri(e);if(t<=50)return;let i=this.getPinnedColumnsOverflowingViewport(t-50),s=this.gos.getCallback("processUnpinnedColumns"),{columns:o,hasLockedPinned:n}=i,r=o;!r.length&&!n||(s&&(r=s({columns:r,viewportWidth:t})),!(!r||!r.length)&&(r=r.filter(a=>!st(a)),this.setColsPinned(r,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new Tv(e,t)}setColsPinned(e,t,i){let{colModel:s,colAnimation:o,visibleCols:n,gos:r}=this.beans;if(!s.cols||!e?.length)return;if(Z(r,"print")){F(37);return}o?.start();let a;t===!0||t==="left"?a="left":t==="right"?a="right":a=null;let l=[];e.forEach(d=>{if(!d)return;let c=s.getCol(d);c&&c.getPinned()!==a&&(this.setColPinned(c,a),l.push(c))}),l.length&&(n.refresh(i),ma(this.eventSvc,l,i)),o?.finish()}initCol(e){let{pinned:t,initialPinned:i}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,i)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){let{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;let i=e.pinned==="left",s=e.pinned==="right";e.hidden=!0;let o=()=>{let n=i?this.leftWidth:this.rightWidth;if(n==null)return;let r=n==0,a=e.hidden!==r,l=this.gos.get("enableRtl"),d=t.getScrollbarWidth(),u=t.verticalScrollShowing&&(l&&i||!l&&s)?n+d:n;e.comp.setPinnedContainerWidth(`${u}px`),e.comp.setDisplayed(!r),a&&(e.hidden=r,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:o,rightPinnedWidthChanged:o,scrollVisibilityChanged:o,scrollbarWidthChanged:o})}getHeaderResizeDiff(e,t){if(t.getPinned()){let{leftWidth:s,rightWidth:o}=this,n=ri(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(s+o+e>n)if(n>s+o)e=n-s-o;else return 0}return e}getPinnedColumnsOverflowingViewport(e){let t=this.rightWidth??0,i=this.leftWidth??0,s=t+i,o=!1;if(s<e)return{columns:[],hasLockedPinned:o};let{visibleCols:n}=this.beans,r=[...n.leftCols],a=[...n.rightCols],l=0,d=0,c=0,u=[],h=s-c-e;for(;(d<r.length||l<a.length)&&h>0;){if(l<a.length){let g=a[l++];if(g.colDef.lockPinned){o=!0;continue}h-=g.getActualWidth(),u.push(g)}if(d<r.length&&h>0){let g=r[d++];if(g.colDef.lockPinned){o=!0;continue}h-=g.getActualWidth(),u.push(g)}}return{columns:u,hasLockedPinned:o}}},kv={moduleName:"PinnedColumn",version:D,beans:[Av],css:[Mv]},Iv=class extends y{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=Q(this,this.updateAnnouncement.bind(this),200)}postConstruct(){let e=this.beans,t=q(e),i=this.descriptionContainer=t.createElement("div");i.classList.add("ag-aria-description-container"),Rr(i,"polite"),cd(i,"additions text"),dd(i,!0),e.eGridDiv.appendChild(i)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;let e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{if(this.isAlive()&&this.descriptionContainer){let t=e;this.lastAnnouncement===t&&(t=`${t}.`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}},50)}destroy(){super.destroy();let{descriptionContainer:e}=this;e&&(J(e),e.parentElement?.removeChild(e)),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},Lv={moduleName:"Aria",version:D,beans:[Iv]};function Ov(e){e.overlays?.showLoadingOverlay()}function Hv(e){e.overlays?.showNoRowsOverlay()}function Gv(e){e.overlays?.hideOverlay()}var Bv=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}",Vv={tag:"div",cls:"ag-overlay",role:"presentation",children:[{tag:"div",cls:"ag-overlay-panel",role:"presentation",children:[{tag:"div",ref:"eOverlayWrapper",cls:"ag-overlay-wrapper",role:"presentation"}]}]},xl=class extends V{constructor(){super(Vv),this.eOverlayWrapper=E,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeCssClass=null,this.elToFocusAfter=null,this.registerCSS(Bv)}handleKeyDown(e){if(e.key!==b.TAB||e.defaultPrevented||Ie(e))return;let t=this.beans;if(pt(t,this.eOverlayWrapper,!1,e.shiftKey))return;let s=!1;e.shiftKey?s=t.focusSvc.focusGridView({column:N(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):s=It(t,!1),s&&e.preventDefault()}updateLayoutClasses(e,t){let i=this.eOverlayWrapper.classList,{AUTO_HEIGHT:s,NORMAL:o,PRINT:n}=we;i.toggle(s,t.autoHeight),i.toggle(o,t.normal),i.toggle(n,t.print)}postConstruct(){this.createManagedBean(new zo(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setOverlayWrapperComp(this),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}setWrapperTypeClass(e){let t=this.eOverlayWrapper.classList;this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,i,s){if(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,!!e){if(this.setDisplayed(!0,{skipAriaHidden:!0}),i&&this.isGridFocused()){let o=$(this.beans);o&&!Kr(this.beans)&&(this.elToFocusAfter=o)}e.then(o=>{if(this.activePromise!==e){this.activeOverlay!==o&&(this.destroyBean(o),o=null);return}if(this.activePromise=null,!!o){if(this.activeOverlay!==o&&(this.eOverlayWrapper.appendChild(o.getGui()),this.activeOverlay=o,s)){let n=o;this.updateListenerDestroyFunc=this.addManagedPropertyListener(s,({currentValue:r})=>{n.refresh?.(I(this.gos,R({},r??{})))})}i&&this.isGridFocused()&&dt(this.eOverlayWrapper)}})}}updateOverlayWrapperPaddingTop(e){this.eOverlayWrapper.style.setProperty("padding-top",`${e}px`)}destroyActiveOverlay(){this.activePromise=null;let e=this.activeOverlay;if(!e)return;let t=this.elToFocusAfter;this.activeOverlay=null,this.elToFocusAfter=null,t&&!this.isGridFocused()&&(t=null);let i=this.updateListenerDestroyFunc;i&&(i(),this.updateListenerDestroyFunc=null),this.destroyBean(e),J(this.eOverlayWrapper),t?.focus?.({preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){let e=$(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setOverlayWrapperComp(void 0),super.destroy()}},Nv={selector:"AG-OVERLAY-WRAPPER",component:xl},zv=class extends y{constructor(){super(...arguments),this.beanName="overlays",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}postConstruct(){this.isClientSide=Y(this.gos),this.isServerSide=!this.isClientSide&&Ot(this.gos);let e=()=>this.updateOverlayVisibility();this.addManagedEventListeners({newColumnsLoaded:e,rowDataUpdated:e,gridSizeChanged:this.refreshWrapperPadding.bind(this),rowCountReady:()=>{this.showInitialOverlay=!1,this.updateOverlayVisibility()}}),this.addManagedPropertyListener("loading",e)}setOverlayWrapperComp(e){this.eWrapper=e,this.updateOverlayVisibility()}isVisible(){return this.state!==0&&!!this.eWrapper}isExclusive(){return this.state===1&&!!this.eWrapper}showLoadingOverlay(){this.showInitialOverlay=!1;let e=this.gos,t=e.get("loading");!t&&(t!==void 0||e.get("suppressLoadingOverlay"))||this.doShowLoadingOverlay()}showNoRowsOverlay(){this.showInitialOverlay=!1;let e=this.gos;e.get("loading")||e.get("suppressNoRowsOverlay")||this.doShowNoRowsOverlay()}hideOverlay(){if(this.showInitialOverlay=!1,this.gos.get("loading")){F(99);return}this.doHideOverlay()}getOverlayWrapperSelector(){return Nv}getOverlayWrapperCompClass(){return xl}updateOverlayVisibility(){if(!this.eWrapper){this.state=0;return}let{state:e,isClientSide:t,isServerSide:i,beans:{gos:s,colModel:o,rowModel:n}}=this,r=this.gos.get("loading");r!==void 0&&(this.showInitialOverlay=!1),this.showInitialOverlay&&r===void 0&&!s.get("suppressLoadingOverlay")&&(r=!s.get("columnDefs")||!o.ready||!s.get("rowData")&&t),r?e!==1&&this.doShowLoadingOverlay():(this.showInitialOverlay=!1,t&&n.isEmpty()&&!s.get("suppressNoRowsOverlay")?e!==2&&this.doShowNoRowsOverlay():(e===1||!i&&e!==0)&&this.doHideOverlay())}doShowLoadingOverlay(){this.eWrapper&&(this.state=1,this.showOverlay(cu(this.beans.userCompFactory,I(this.gos,{})),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){this.eWrapper&&(this.state=2,this.showOverlay(uu(this.beans.userCompFactory,I(this.gos,{})),"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams"),this.updateExclusive())}doHideOverlay(){this.eWrapper&&(this.state=0,this.eWrapper.hideOverlay(),this.updateExclusive())}showOverlay(e,t,i){let s=e?.newAgStackInstance()??null;this.eWrapper?.showOverlay(s,t,this.isExclusive(),i),this.refreshWrapperPadding()}updateExclusive(){let e=this.exclusive;this.exclusive=this.isExclusive(),this.exclusive!==e&&this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"})}refreshWrapperPadding(){let e=this.eWrapper;if(!e)return;let t=0;this.state===2?t=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0:this.wrapperPadding!==0&&(t=0),this.wrapperPadding!==t&&(this.wrapperPadding=t,e.updateOverlayWrapperPaddingTop(t))}},Wv={moduleName:"Overlay",version:D,userComponents:{agLoadingOverlay:fg,agNoRowsOverlay:Cg},apiFunctions:{showLoadingOverlay:Ov,showNoRowsOverlay:Hv,hideOverlay:Gv},beans:[zv]},_v=class extends y{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=yd(),Ke(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;let e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;let e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;Ke(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){let t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){let e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;let t=this.modelHeight-this.getUiBodyHeight(),i=e/t;return this.maxScrollY*i}},Uv=400,$v=class extends y{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{let e=()=>{this.getAllCellCtrls().forEach(n=>n.onCellSelectionChanged())},t=()=>{this.getAllCellCtrls().forEach(n=>n.updateRangeBordersIfRangeCount())},i=()=>{this.eventSvc.addEventListener("cellSelectionChanged",e),this.eventSvc.addEventListener("columnMoved",t),this.eventSvc.addEventListener("columnPinned",t),this.eventSvc.addEventListener("columnVisible",t)},s=()=>{this.eventSvc.removeEventListener("cellSelectionChanged",e),this.eventSvc.removeEventListener("columnMoved",t),this.eventSvc.removeEventListener("columnPinned",t),this.eventSvc.removeEventListener("columnVisible",t)};this.addDestroyFunc(()=>s()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{Oe(this.gos)?i():s()}),Oe(this.gos)&&i()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",s=>this.onSuppressCellFocusChanged(s.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:s,previousValue:o})=>{(!o&&s||o&&!s)&&this.redrawRows()});let{stickyRowSvc:e,gos:t,showRowGroupCols:i}=this.beans;if(i&&this.addManagedPropertyListener("showOpenedGroup",()=>{let s=i.getShowRowGroupCols();s.length&&this.refreshCells({columns:s,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{let s=this.gridBodyCtrl;s.setStickyTopHeight(0),s.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=Z(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){let e=this.getKeepDetailRowsCount(),t=e??3;this.cachedRowCtrls=new Kv(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){let e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),i=this.cachedRowCtrls?.getEntries()??[];t.length>0||i.length>0?this.allRowCtrls=[...e,...t,...i]:this.allRowCtrls=e}isCellBeingRendered(e,t){let i=this.rowCtrlsByRowIndex[e];return!t||!i?!!i:i.isFullWidth()?!0:!!this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:e,column:t,rowPinned:null})||!!i.getCellCtrl(t)||!i.isRowRendered()}updateCellFocus(e){this.getAllCellCtrls().forEach(t=>t.onCellFocused(e)),this.getFullWidthRowCtrls().forEach(t=>t.onFullWidthRowFocused(e))}onCellFocusChanged(e){if(e&&e.rowIndex!=null&&!e.rowPinned){let t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onSuppressCellFocusChanged(e)),this.getFullWidthRowCtrls().forEach(t=>t.onSuppressCellFocusChanged(e))}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{let{cellFlashSvc:t}=this.beans;t&&this.getAllCellCtrls().forEach(i=>t.onFlashCells(i,e))},columnHoverChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onColumnHover())},displayedColumnsChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onDisplayedColumnsChanged())},displayedColumnsWidthChanged:()=>{this.printLayout&&this.getAllCellCtrls().forEach(e=>e.onLeftChanged())}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach(e=>e()),this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners(),this.colModel.getCols().forEach(t=>{let i=l=>{this.getAllCellCtrls().forEach(d=>{d.column===t&&l(d)})},s=()=>{i(l=>l.onLeftChanged())},o=()=>{i(l=>l.onWidthChanged())},n=()=>{i(l=>l.onFirstRightPinnedChanged())},r=()=>{i(l=>l.onLastLeftPinnedChanged())},a=()=>{i(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",s),t.__addEventListener("widthChanged",o),t.__addEventListener("firstRightPinnedChanged",n),t.__addEventListener("lastLeftPinnedChanged",r),t.__addEventListener("colDefChanged",a),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",s),t.__removeEventListener("widthChanged",o),t.__removeEventListener("firstRightPinnedChanged",n),t.__removeEventListener("lastLeftPinnedChanged",r),t.__removeEventListener("colDefChanged",a)})})}onDomLayoutChanged(){let e=Z(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),i=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,i&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;let e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){let t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){let t=[];return this.getAllRowCtrls().forEach(i=>{let s=i.getCellCtrl(e,!0)?.eGui;s&&t.push(s)}),t}refreshFloatingRowComps(e=!0){this.refreshFloatingRows(this.topRowCtrls,"top",e),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",e)}refreshFloatingRows(e,t,i){let{pinnedRowModel:s,beans:o,printLayout:n}=this,r=Object.fromEntries(e.map(l=>[l.rowNode.id,l]));s?.forEachPinnedRow(t,(l,d)=>{let c=e[d];c&&s.getPinnedRowById(c.rowNode.id,t)===void 0&&(c.destroyFirstPass(),c.destroySecondPass()),l.id in r&&i?(e[d]=r[l.id],delete r[l.id]):e[d]=new ss(l,o,!1,!1,n)});let a=(t==="top"?s?.getPinnedTopRowCount():s?.getPinnedBottomRowCount())??0;e.length=a}onPinnedRowDataChanged(){let e={recycleRows:!0};this.redrawAfterModelUpdate(e)}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else if(this.cachedRowCtrls?.has(e)){this.cachedRowCtrls.removeRow(e);return}else{let i=s=>{let o=s[e.rowIndex];o&&o.rowNode===e&&(o.destroyFirstPass(),o.destroySecondPass(),s[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":i(this.topRowCtrls);break;case"bottom":i(this.bottomRowCtrls);break;default:i(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){if(e!=null){e?.forEach(i=>this.redrawRow(i,!0)),this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();let t=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);let i=!e.domLayoutChanged&&!!e.recycleRows,s=e.animate&&xt(this.gos),o=i?this.getRowsToRecycle():null;i||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();let{stickyRowFeature:n,gos:r}=this;if(n){n.checkStickyRows();let a=n.extraTopHeight+n.extraBottomHeight;a&&this.updateContainerHeights(a)}this.recycleRows(o,s),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(r.get("enableRowPinning")?i:void 0),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){let t=e.newData||e.newPage,i=this.gos.get("suppressScrollOnNewData");t&&!i&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){let{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let i=this.pageBounds.getCurrentPageHeight();i===0&&(i=1),t.setModelHeight(i+e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error(Ue(252));this.refreshInProgress=!0,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.beans.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;let t=this.beans.focusSvc,i=this.findPositionToFocus(e);if(!i){t.focusHeaderPosition({headerPosition:{headerRowIndex:Pe(this.beans)-1,column:e.column}});return}if(e.rowIndex!==i.rowIndex||e.rowPinned!=i.rowPinned){t.setFocusedCell(O(R({},i),{preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0}));return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(I(this.gos,O(R({},i),{forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"})))}findPositionToFocus(e){let{pagination:t,pageBounds:i}=this.beans,s=e;for(s.rowPinned==null&&t&&i&&!t.isRowInPage(s.rowIndex)&&(s={rowPinned:null,rowIndex:i.getFirstRow()});s;){if(s.rowPinned==null&&i)if(s.rowIndex<i.getFirstRow()){if(s=es(this.beans,{rowPinned:null,rowIndex:0}),!s)return null}else s.rowIndex>i.getLastRow()&&(s={rowPinned:null,rowIndex:i.getLastRow()});let o=this.getRowByPosition(s);if(o?.isAlive())return O(R({},o.getRowPosition()),{column:e.column});s=es(this.beans,s)}return null}getAllCellCtrls(){let e=[],t=this.getAllRowCtrls(),i=t.length;for(let s=0;s<i;s++){let o=t[s].getAllCellCtrls(),n=o.length;for(let r=0;r<n;r++)e.push(o[r])}return e}getAllRowCtrls(){let{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),i=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...i,...e?.getCtrls("top")??[],...e?.getCtrls("bottom")??[],...e?.getCtrls("center")??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,i){let s=this.rowCtrlsByRowIndex[t];s&&s.addEventListener(e,i)}refreshCells(e={}){let t={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};for(let i of this.getCellCtrls(e.rowNodes,e.columns))i.refreshOrDestroyCell(t);this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=!1;for(let i of this.getRowCtrls(e)){if(!i.isFullWidth())continue;i.refreshFullWidth()||(t=!0,this.redrawRow(i.rowNode,!0))}t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){let t=yo(e),i=this.getAllRowCtrls();return!e||!t?i:i.filter(s=>{let o=s.rowNode;return Ro(o,t)})}getCellCtrls(e,t){let i;P(t)&&(i={},t.forEach(o=>{let n=this.colModel.getCol(o);P(n)&&(i[n.getId()]=!0)}));let s=[];return this.getRowCtrls(e).forEach(o=>{o.getAllCellCtrls().forEach(n=>{let r=n.column.getId();i&&!i[r]||s.push(n)})}),s}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){let t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){let e=[];for(let i of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[i].rowNode.id==null&&e.push(i);this.removeRowCtrls(e);let t={};for(let i of Object.values(this.rowCtrlsByRowIndex)){let s=i.rowNode;t[s.id]=i}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){e.forEach(i=>{let s=this.rowCtrlsByRowIndex[i];s&&(s.destroyFirstPass(t),s.destroySecondPass()),delete this.rowCtrlsByRowIndex[i]})}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){let{focusSvc:t,animationFrameSvc:i}=this.beans,{afterScroll:s}=e,o,n=this.stickyRowFeature;n&&(o=t?.getFocusCellToUseAfterRefresh()||void 0);let r=this.firstRenderedRow,a=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let l=!1;if(n){l=n.checkStickyRows();let c=n.extraTopHeight+n.extraBottomHeight;c&&this.updateContainerHeights(c)}let d=this.firstRenderedRow!==r||this.lastRenderedRow!==a;if(!(s&&!l&&!d)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,s),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(s&&!l),o!=null)){let c=t?.getFocusCellToUseAfterRefresh();o!=null&&c==null&&(i?.flushAllFrames(),this.restoreFocusedCell(o))}}removeRowCompsNotToDraw(e,t){let i={};e.forEach(n=>i[n]=!0);let o=Object.keys(this.rowCtrlsByRowIndex).filter(n=>!i[n]);this.removeRowCtrls(o,t)}calculateIndexesToDraw(e){let t=[];for(let r=this.firstRenderedRow;r<=this.lastRenderedRow;r++)t.push(r);let i=this.beans.pagination,s=this.beans.focusSvc?.getFocusedCell()?.rowIndex;s!=null&&(s<this.firstRenderedRow||s>this.lastRenderedRow)&&(!i||i.isRowInPage(s))&&s<this.rowModel.getRowCount()&&t.push(s);let o=r=>{let a=r.rowNode.rowIndex;a==null||a===s||(a<this.firstRenderedRow||a>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(r)&&t.push(a)};for(let r of Object.values(this.rowCtrlsByRowIndex))o(r);if(e)for(let r of Object.values(e))o(r);t.sort((r,a)=>r-a);let n=[];for(let r=0;r<t.length;r++){let a=t[r],l=this.rowModel.getRow(a);l&&!l.sticky&&n.push(a)}return n}recycleRows(e,t=!1,i=!1){let s=this.calculateIndexesToDraw(e);(this.printLayout||i)&&(t=!1),this.removeRowCompsNotToDraw(s,!t);let o=[];if(s.forEach(n=>{let r=this.createOrUpdateRowCtrl(n,e,t,i);P(r)&&o.push(r)}),e){let{animationFrameSvc:n}=this.beans;n?.active&&i&&!this.printLayout?n.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){let{visibleCols:e}=this.beans,t=e.isPinningLeft(),i=e.isPinningRight();(this.pinningLeft!==t||i!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=i,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){let e=[];this.getFullWidthRowCtrls().forEach(t=>{let i=t.rowNode.rowIndex;e.push(i.toString())}),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){let t=yo(e);return this.getAllRowCtrls().filter(i=>{if(!i.isFullWidth())return!1;let s=i.rowNode;return!(t!=null&&!Ro(s,t))})}createOrUpdateRowCtrl(e,t,i,s){let o,n=this.rowCtrlsByRowIndex[e];if(n||(o=this.rowModel.getRow(e),P(o)&&P(t)&&t[o.id]&&o.alreadyRendered&&(n=t[o.id],t[o.id]=null)),!n)if(o||(o=this.rowModel.getRow(e)),P(o))n=this.createRowCon(o,i,s);else return;return o&&(o.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=n,n}destroyRowCtrls(e,t){let i=[];if(e){for(let s of Object.values(e))if(s){if(this.cachedRowCtrls&&s.isCacheable()){this.cachedRowCtrls.addRow(s);continue}if(s.destroyFirstPass(!t),t){let o=s.instanceId;this.zombieRowCtrls[o]=s,i.push(()=>{s.destroySecondPass(),delete this.zombieRowCtrls[o]})}else s.destroySecondPass()}}t&&(i.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),window.setTimeout(()=>i.forEach(s=>s()),Uv))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){let e=this.getRowBuffer(),t=it(this.beans);return e*t}workOutFirstAndLastRowsToRender(){let{rowContainerHeight:e,pageBounds:t,rowModel:i}=this;e.updateOffset();let s,o;if(!i.isRowsToRender())s=0,o=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),s=t.getFirstRow(),o=t.getLastRow();else{let c=this.getRowBufferInPixels(),u=this.ctrlsSvc.getScrollFeature(),h=this.gos.get("suppressRowVirtualisation"),g=!1,p,f;do{let T=t.getPixelOffset(),{pageFirstPixel:A,pageLastPixel:M}=t.getCurrentPagePixelRange(),k=e.divStretchOffset,G=u.getVScrollPosition(),H=G.top,B=G.bottom;h?(p=A+k,f=M+k):(p=Math.max(H+T-c,A)+k,f=Math.min(B+T+c,M)+k),this.firstVisibleVPixel=Math.max(H+T,A)+k,this.lastVisibleVPixel=Math.min(B+T,M)+k,g=this.ensureAllRowsInRangeHaveHeightsCalculated(p,f)}while(g);let m=i.getRowIndexAtPixel(p),C=i.getRowIndexAtPixel(f),v=t.getFirstRow(),w=t.getLastRow();m<v&&(m=v),C>w&&(C=w),s=m,o=C}let n=Z(this.gos,"normal"),r=this.gos.get("suppressMaxRenderedRowRestriction"),a=Math.max(this.getRowBuffer(),500);n&&!r&&o-s>a&&(o=s+a);let l=s!==this.firstRenderedRow,d=o!==this.lastRenderedRow;(l||d)&&(this.firstRenderedRow=s,this.lastRenderedRow=o,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:s,lastRow:o}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,Ve(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){let i=this.pinnedRowModel?.ensureRowHeightsValid(),s=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:o,rowModel:n}=this,r=n.ensureRowHeightsValid(e,t,o.getFirstRow(),o.getLastRow());return(r||s)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),s||r||i?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){let s=e.rowNode,o=this.focusSvc.isRowFocused(s.rowIndex,s.rowPinned),n=e.editing,r=s.detail;return o||n||r?!!this.isRowPresent(s):!1}isRowPresent(e){return this.rowModel.isRowPresent(e)?this.beans.pagination?.isRowInPage(e.rowIndex)??!0:!1}createRowCon(e,t,i){let s=this.cachedRowCtrls?.getRow(e)??null;if(s)return s;let o=i&&!this.printLayout&&!!this.beans.animationFrameSvc?.active;return new ss(e,this.beans,t,o,this.printLayout)}getRenderedNodes(){let e=Object.values(this.rowCtrlsByRowIndex).map(s=>s.rowNode),t=this.getStickyTopRowCtrls().map(s=>s.rowNode),i=this.getStickyBottomRowCtrls().map(s=>s.rowNode);return[...t,...e,...i]}getRowByPosition(e){let t,{rowIndex:i}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[i];break;case"bottom":t=this.bottomRowCtrls[i];break;default:t=this.rowCtrlsByRowIndex[i],t||(t=this.getStickyTopRowCtrls().find(s=>s.rowNode.rowIndex===i)||null,t||(t=this.getStickyBottomRowCtrls().find(s=>s.rowNode.rowIndex===i)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;let s=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!s}},Kv=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.rowNode.id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){let t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if(e==null||e.id==null)return null;let t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){let t=e.id,i=this.entriesMap[t];delete this.entriesMap[t],me(this.entriesList,i)}removeFromCache(e){let t=e.rowNode.id;delete this.entriesMap[t],me(this.entriesList,e)}getEntries(){return this.entriesList}};function yo(e){if(!e)return;let t={top:{},bottom:{},normal:{}};return e.forEach(i=>{let s=i.id;switch(i.rowPinned){case"top":t.top[s]=i;break;case"bottom":t.bottom[s]=i;break;default:t.normal[s]=i;break}}),t}function Ro(e,t){let i=e.id;switch(e.rowPinned){case"top":return t.top[i]!=null;case"bottom":return t.bottom[i]!=null;default:return t.normal[i]!=null}}var jv=class extends y{constructor(){super(...arguments),this.beanName="rowNodeSorter"}postConstruct(){let{gos:e}=this;this.isAccentedSort=e.get("accentedSort"),this.primaryColumnsSortGroups=Ee(e),this.addManagedPropertyListener("accentedSort",t=>this.isAccentedSort=t.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=Ee(e))}doFullSort(e,t){let i=e.map((s,o)=>({currentPos:o,rowNode:s}));return i.sort(this.compareRowNodes.bind(this,t)),i.map(s=>s.rowNode)}compareRowNodes(e,t,i){let s=t.rowNode,o=i.rowNode;for(let n=0,r=e.length;n<r;n++){let a=e[n],l=a.sort==="desc",d=this.getValue(s,a.column),c=this.getValue(o,a.column),u,h=this.getComparator(a,s);if(h?u=h(d,c,s,o,l):u=kd(d,c,this.isAccentedSort),!isNaN(u)&&u!==0)return a.sort==="asc"?u:u*-1}return t.currentPos-i.currentPos}getComparator(e,t){let i=e.column,s=i.getColDef().comparator;if(s!=null)return s;if(!i.getColDef().showRowGroup)return;let o=!t.group&&i.getColDef().field;if(!o)return;let n=this.beans.colModel.getColDefCol(o);if(n)return n.getColDef().comparator}getValue(e,t){let{valueSvc:i,colModel:s,showRowGroupCols:o,gos:n}=this.beans;if(!this.primaryColumnsSortGroups)return i.getValue(t,e,!1);if(e.rowGroupColumn===t){if(qr(n,s.isPivotActive())){let d=e.allLeafChildren?.[0];return d?i.getValue(t,d,!1):void 0}let l=o?.getShowRowGroupCol(t.getId());return l?e.groupData?.[l.getId()]:void 0}if(!(e.group&&t.getColDef().showRowGroup))return i.getValue(t,e,!1)}};function qv(e){e.sortSvc?.onSortChanged("api")}var Fl={moduleName:"Sort",version:D,beans:[BC,jv],apiFunctions:{onSortChanged:qv},userComponents:{agSortIndicator:sn},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"}},Yv=class extends y{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{let e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){let{colModel:t,rowModel:i}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),i.start()}gridReady(){let{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),Ke(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){let t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,Et(e.source))}}};function Qv(e){e.valueCache?.expire()}function Zv(e,t){let{colKey:i,rowNode:s,useFormatter:o}=t,n=e.colModel.getColDefCol(i)??e.colModel.getCol(i);if(_(n))return null;let r=e.valueSvc.getValueForDisplay(n,s).value;return o?e.valueSvc.formatValue(n,s,r)??Ht(r):r}var Xv="paste",Jv=class extends y{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.clientSideRowModel=null}postConstruct(){let{gos:e,rowModel:t}=this.beans;Y(e,t)&&(this.clientSideRowModel=t),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){let{gos:t,rowRenderer:i}=this.beans;if(e.source===Xv||t.get("suppressChangeDetection"))return;let s=e.node,o=[s],n=this.clientSideRowModel,r=n?.rootNode;if(r&&!s.isRowPinned()){let a=t.get("aggregateOnlyChangedColumns"),l=new pi(a,r);l.addParentNode(s.parent,[e.column]),n.doAggregate(l),l.forEachChangedNodeDepthFirst(d=>{o.push(d),d.sibling&&o.push(d.sibling)})}i.refreshCells({rowNodes:o})}},ew=class extends y{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);z(15,{expression:e})}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(i){return z(16,{expression:e,params:t,e:i}),null}}createExpressionFunction(e){let t=this.cache;if(t[e])return t[e];let i=this.createFunctionBody(e),s=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",i);return t[e]=s,s}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";"}},tw=class extends y{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){let e=this.gos;this.active=e.get("valueCache"),this.neverExpires=e.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,i){if(this.active){let s=this.cacheVersion;e.__cacheVersion!==s&&(e.__cacheVersion=s,e.__cacheData={}),e.__cacheData[t]=i}}getValue(e,t){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[t]}},iw={moduleName:"ValueCache",version:D,beans:[tw],apiFunctions:{expireValueCache:Qv}},sw={moduleName:"Expression",version:D,beans:[ew]},ow={moduleName:"ChangeDetection",version:D,beans:[Jv]},nw={moduleName:"CellApi",version:D,apiFunctions:{getCellValue:Zv}},rw=class extends y{constructor(){super(...arguments),this.beanName="valueSvc",this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc}postConstruct(){this.initialised||this.init()}init(){this.executeValueGetter=this.valueCache?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=Ot(this.gos),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;let e=t=>this.callColumnCellValueChangedHandler(t);this.eventSvc.addEventListener("cellValueChanged",e,!0),this.addDestroyFunc(()=>this.eventSvc.removeEventListener("cellValueChanged",e,!0)),this.addManagedPropertyListener("treeData",t=>this.isTreeData=t.currentValue)}getValueForDisplay(e,t,i=!1,s=!1){let{showRowGroupColValueSvc:o}=this.beans,n=!e&&t.group,r=e?.colDef.showRowGroup,a=!this.isTreeData||t.footer;if(o&&a&&(n||r)){let p=o.getGroupValue(t,e);if(p==null)return{value:null,valueFormatted:null};if(!i)return{value:p.value,valueFormatted:null};let f=o.formatAndPrefixGroupColValue(p,e,s);return{value:p.value,valueFormatted:f}}if(!e)return{value:t.key,valueFormatted:null};let l=t.leafGroup&&this.colModel.isPivotMode(),d=t.group&&t.expanded&&!t.footer&&!l,c=this.gos.get("groupSuppressBlankHeader")||!t.sibling,u=d&&!c,h=this.getValue(e,t,u),g=i&&!(s&&e.colDef.useValueFormatterForExport===!1);return{value:h,valueFormatted:g?this.formatValue(e,t,h):null}}getValue(e,t,i=!1){if(this.initialised||this.init(),!t)return;let s=e.getColDef(),o=s.field,n=e.getColId(),r=t.data,a,l=s.showRowGroup;if(typeof l=="string"&&(this.beans.rowGroupColsSvc?.getColumnIndex(l)??-1)>t.level)return null;let d=typeof l!="string"||!t.group,c=t.groupData&&n in t.groupData,u=!i&&t.aggData&&t.aggData[n]!==void 0,h=this.isSsrm&&i&&!!e.getColDef().aggFunc,g=this.isSsrm&&t.footer&&t.field&&(e.getColDef().showRowGroup===!0||e.getColDef().showRowGroup===t.field);if(this.isTreeData&&u)a=t.aggData[n];else if(this.isTreeData&&s.valueGetter)a=this.executeValueGetter(s.valueGetter,r,e,t);else if(this.isTreeData&&o&&r)a=Xt(r,o,e.isFieldContainsDots());else if(c)a=t.groupData[n];else if(u)a=t.aggData[n];else if(s.valueGetter){if(!d)return a;a=this.executeValueGetter(s.valueGetter,r,e,t)}else if(g)a=Xt(r,t.field,e.isFieldContainsDots());else if(o&&r&&!h){if(!d)return a;a=Xt(r,o,e.isFieldContainsDots())}if(this.cellExpressions&&typeof a=="string"&&a.indexOf("=")===0){let p=a.substring(1);a=this.executeValueGetter(p,r,e,t)}return a}parseValue(e,t,i,s){let o=e.getColDef(),n=o.valueParser;if(P(n)){let r=I(this.gos,{node:t,data:t?.data,oldValue:s,newValue:i,colDef:o,column:e});return typeof n=="function"?n(r):this.expressionSvc?.evaluate(n,r)}return i}getDeleteValue(e,t){return P(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay(e,t).value)??null:null}formatValue(e,t,i,s,o=!0){let n=null,r,a=e.getColDef();if(s?r=s:o&&(r=a.valueFormatter),r){let l=I(this.gos,{value:i,node:t,data:t?t.data:null,colDef:a,column:e});typeof r=="function"?n=r(l):n=this.expressionSvc?this.expressionSvc.evaluate(r,l):null}else if(a.refData)return a.refData[i]||"";return n==null&&Array.isArray(i)&&(n=i.join(", ")),n}setValue(e,t,i,s){let o=this.colModel.getColDefCol(t);if(!e||!o)return!1;_(e.data)&&(e.data={});let{field:n,valueSetter:r}=o.getColDef();if(_(n)&&_(r))return F(17),!1;if(this.dataTypeSvc&&!this.dataTypeSvc.checkType(o,i))return F(135),!1;let a=I(this.gos,{node:e,data:e.data,oldValue:this.getValue(o,e),newValue:i,colDef:o.getColDef(),column:o});a.newValue=i;let l;if(P(r)?typeof r=="function"?l=r(a):l=this.expressionSvc?.evaluate(r,a):l=this.setValueUsingField(e.data,n,i,o.isFieldContainsDots()),l===void 0&&(l=!0),!l)return!1;e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();let d=this.getValue(o,e);return this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:a.column,colDef:a.colDef,data:e.data,node:e,oldValue:a.oldValue,newValue:d,value:d,source:s}),!0}callColumnCellValueChangedHandler(e){let t=e.colDef.onCellValueChanged;typeof t=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,context:e.context})})}setValueUsingField(e,t,i,s){if(!t)return!1;let o=!1;if(!s)o=e[t]===i,o||(e[t]=i);else{let n=t.split("."),r=e;for(;n.length>0&&r;){let a=n.shift();n.length===0?(o=r[a]===i,o||(r[a]=i)):r=r[a]}}return!o}executeValueGetterWithValueCache(e,t,i,s){let o=i.getColId(),n=this.valueCache.getValue(s,o);if(n!==void 0)return n;let r=this.executeValueGetterWithoutValueCache(e,t,i,s);return this.valueCache.setValue(s,o,r),r}executeValueGetterWithoutValueCache(e,t,i,s){let o=I(this.gos,{data:t,node:s,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,s)}),n;return typeof e=="function"?n=e(o):n=this.expressionSvc?.evaluate(e,o),n}getValueCallback(e,t){let i=this.colModel.getColDefCol(t);return i?this.getValue(i,e):null}getKeyForNode(e,t){let i=this.getValue(e,t),s=e.getColDef().keyCreator,o=i;if(s){let n=I(this.gos,{value:i,colDef:e.getColDef(),column:e,node:t,data:t.data});o=s(n)}return typeof o=="string"||o==null||(o=String(o),o==="[object Object]"&&F(121)),o}},aw={moduleName:"CommunityCore",version:D,beans:[LC,Dp,ym,Lc,_v,Gf,DC,rv,Ac,Dv,Pv,$v,rw,kC,PC,IC,xm,Yv,Cm,vm],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId:Mp,destroy:Tp,isDestroyed:Ap,getGridOption:kp,setGridOption:Ip,updateGridOptions:tl,isModuleRegistered:Lp},dependsOn:[gm,ff,yf,Fl,hv,Vf,gv,Wv,ow,fv,Ev,kv,Lv,Cv,bm,pm,sw]};function El(e){let{inputValue:t,allSuggestions:i,hideIrrelevant:s,filterByPercentageOfBestMatch:o}=e,n=i.map((l,d)=>({value:l,relevance:lw(t,l),idx:d}));if(n.sort((l,d)=>d.relevance-l.relevance),s&&(n=n.filter(l=>l.relevance!==0)),n.length>0&&o&&o>0){let d=n[0].relevance*o;n=n.filter(c=>d-c.relevance<0)}let r=[],a=[];for(let l of n)r.push(l.value),a.push(l.idx);return{values:r,indices:a}}function lw(e,t){if(e===t)return 1e3;let i=e.length,s=t.length;if(i===0||s===0)return 0;let o=e.toLocaleLowerCase(),n=t.toLocaleLowerCase(),r=n.indexOf(o);if(r!==-1)return 980-r*2;if([...o].filter(u=>n.includes(u)).length===0)return 0;let l=Array.from({length:s+1},(u,h)=>h);for(let u=0;u<i;u++){let h=[u+1];for(let g=0;g<s;g++){let p=l[g+1]+1,f=h[g]+1,m=l[g]+(e[u]!==t[g]?1:0);s>10&&g>s/2&&(m+=1),u>0&&g>0&&e[u-1]===t[g-1]&&(m-=4),h.push(Math.min(p,f,m))}l=h}let d=Math.round(l[s]),c=Math.max(1,1e3-d*30);return Math.max(1,c)}var Pl={AdvancedFilter:1,AllEnterprise:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,TreeData:1,ViewportRowModel:1},qs=["TextFilter","NumberFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],dw={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:qs,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...qs,"QuickFilter","ExternalFilter","AdvancedFilter"],GroupCellRenderer:["RowGrouping","Pivot","TreeData","MasterDetail","ServerSideRowModel"],KeyboardNavigation:["AllCommunity"],LoadingCellRenderer:["ServerSideRowModel"],MenuCore:["ColumnMenu","ContextMenu"],MenuItem:["ColumnMenu","ContextMenu","MultiFilter","IntegratedCharts","ColumnsToolPanel"],Overlay:["AllCommunity"],PinnedColumn:["AllCommunity"],SharedAggregation:["RowGrouping","Pivot","TreeData","ServerSideRowModel"],SharedDragAndDrop:["AllCommunity"],SharedMasterDetail:["MasterDetail","ServerSideRowModel"],SharedMenu:[...qs,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},cw={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function uw(e,t){let i=[];return(Array.isArray(e)?e:[e]).forEach(s=>{let o=dw[s];o?o.forEach(n=>{let r=cw[n];(!r||r===t)&&i.push(n)}):i.push(s)}),i}var Dl=()=>`No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:
                    
    import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';
    
    ModuleRegistry.registerModules([ AllCommunityModule ]);
    `,hw=e=>{let t=e.map(s=>`import { ${si(s)} } from '${Pl[s]?"ag-grid-enterprise":"ag-grid-community"}';`);return e.some(s=>s==="IntegratedCharts"||s==="Sparklines")&&t.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community'; 
${t.join(` 
`)} 

ModuleRegistry.registerModules([ ${e.map(s=>si(s,!0)).join(", ")} ]); 

For more info see: ${Rt}/modules/`};function si(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function gw(e,t){let i=t.filter(n=>n==="IntegratedCharts"||n==="Sparklines"),s="";return!globalThis?.agCharts&&i.length>0?s=`Unable to use ${e} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise.
`:t.some(n=>Pl[n])&&(s=s+`Unable to use ${e} as that requires the ag-grid-enterprise script to be included.
`),s}function Ml({moduleName:e,rowModelType:t}){return`To use the ${e}Module you must set the gridOption "rowModelType='${t}'"`}var ar=({reasonOrId:e,moduleName:t,gridScoped:i,gridId:s,rowModelType:o,additionalText:n,isUmd:r})=>{let a=uw(t,o),l=typeof e=="string"?e:Cw[e];if(r)return gw(l,a);let d=a.filter(h=>h==="IntegratedCharts"||h==="Sparklines"),c=d.length>0?`${d.map(h=>si(h)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`${`Unable to use ${l} as ${a.length>1?"one of "+a.map(h=>si(h)).join(", "):si(a[0])} is not registered${i?" for gridId: "+s:""}. ${c} Check if you have registered the module:
`}
${hw(a)}`+(n?` 

${n}`:"")},lr=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.

import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
import { ModuleRegistry } from 'ag-grid-community';
import { ${e} } from 'ag-grid-enterprise';
    
ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);
    `,pw=e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,fw={1:()=>"`rowData` must be an array",2:({nodeId:e})=>`Duplicate node id '${e}' detected from getRowId callback, this could cause issues in your grid.`,3:()=>"Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.",4:({id:e})=>`Could not find row id=${e}, data item was not found for this id`,5:({data:e})=>["Could not find data item as object was not found.",e," Consider using getRowId to help the Grid find matching row data"],6:()=>"'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'",7:()=>"Pivoting is not supported with aligned grids as it may produce different columns in each grid.",8:({key:e})=>`Unknown key for navigation ${e}`,9:({variable:e})=>`No value for ${e?.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e?.defaultValue} will be used and updated when styles load.`,10:({eventType:e})=>`As of v33, the '${e}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,11:()=>"No gridOptions provided to createGrid",12:({colKey:e})=>["column ",e," not found"],13:()=>"Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.",14:({groupPrefix:e})=>`Row IDs cannot start with ${e}, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:e})=>["value should be either a string or a function",e],16:({expression:e,params:t,e:i})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",i],17:()=>"you need either field or valueSetter set on colDef for editing to work",18:()=>"alignedGrids contains an undefined option.",19:()=>"alignedGrids - No api found on the linked grid.",20:()=>`You may want to configure via a callback to avoid setup race conditions:
                     "alignedGrids: () => [linkedGrid]"`,21:()=>"pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.",22:({key:e})=>`${e} is an initial property and cannot be updated.`,23:()=>"The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",24:()=>"row height must be a number if not using standard row model",25:({id:e})=>["The getRowId callback must return a string. The ID ",e," is being cast to a string."],26:({fnName:e,preDestroyLink:t})=>`Grid API function ${e}() cannot be called as the grid has been destroyed.
 Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
 To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${t}`,27:({fnName:e,module:t})=>`API function '${e}' not registered to module '${t}'`,28:()=>"setRowCount cannot be used while using row grouping.",29:()=>"tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",30:({toIndex:e})=>["tried to insert columns in invalid location, toIndex = ",e,"remember that you should not count the moving columns when calculating the new index"],31:()=>"infinite loop in resizeColumnSets",32:()=>"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.",33:()=>"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.",34:({key:e})=>`the column type '${e}' is a default column type and cannot be overridden.`,35:()=>"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.",36:({t:e})=>"colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes",37:()=>"Changing the column pinning status is not allowed with domLayout='print'",38:({iconName:e})=>`provided icon '${e}' needs to be a string or a function`,39:()=>"Applying column order broke a group where columns should be married together. Applying new order has been discarded.",40:({e,method:t})=>`${e}
${pw(t)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support document.execCommand('copy') for clipboard operations",43:({iconName:e})=>`As of v33, icon '${e}' is deprecated. Use the icon CSS name instead.`,44:()=>'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',45:({parentCellDataType:e})=>`The data type definition ${e} does not exist.`,46:()=>'The "baseDataType" property of a data type definition must match that of its parent.',47:({cellDataType:e})=>`Missing data type definition - "${e}"`,48:({property:e})=>`Cell data type is "object" but no Value ${e} has been provided. Please either provide an object data type definition with a Value ${e}, or set "colDef.value${e}"`,49:({methodName:e})=>`Framework component is missing the method ${e}()`,50:({compName:e})=>`Could not find component ${e}, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"addRowDropZone - A container target needs to be provided",56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`setFilterModel() - no column found for colId: ${e}`,63:({colId:e})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>"filter missing setModel method, which is needed for setFilterModel",66:()=>"filter API missing getModel method, which is needed for getFilterModel",67:()=>"Filter is missing isFilterActive() method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:e})=>`getGui method from filter returned ${e}; it should be a DOM element.`,70:({newFilter:e})=>`Grid option quickFilterText only supports string inputs, received: ${typeof e}`,71:()=>"debounceMs is ignored when apply button is present",72:({keys:e})=>["ignoring FilterOptionDef as it doesn't contain one of ",e],73:()=>"invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:e})=>['Unexpected type of filter "',e,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing 'conditions'",78:()=>'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',79:()=>'"filterParams.maxNumConditions" must be greater than or equal to zero.',80:()=>'"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',81:()=>'"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',82:({param:e})=>`DateFilter ${e} is not a number`,83:()=>"DateFilter minValidYear should be <= maxValidYear",84:()=>"DateFilter minValidDate should be <= maxValidDate",85:()=>"DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",86:()=>"DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",87:()=>"DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",88:({index:e})=>`Invalid row index for ensureIndexVisible: ${e}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing getRows method",91:()=>"Filter is missing method doesFilterPass",92:()=>"AnimationFrameService called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:i,pageSizeOptions:s})=>`'paginationPageSize=${e}'${t?"":" (default value)"}, but ${e} is not included in${i?"":" the default"} paginationPageSizeSelector=[${s?.join(", ")}].`,95:({paginationPageSizeOption:e,paginationPageSizeSelector:t})=>`Either set '${t}' to an array that includes ${e} or to 'false' to disable the page size selector.`,96:({id:e,data:t})=>["Duplicate ID",e,"found for pinned row with data",t,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:e})=>`cellEditor for column ${e} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",100:({rowModelType:e})=>`selectAll only available when rowModelType='clientSide', ie not ${e}`,101:({propertyName:e,componentName:t,agGridDefaults:i,jsComps:s})=>{let o=[],n=[...Object.keys(i??[]).filter(a=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(a)),...Object.keys(s??[])],r=El({inputValue:t,allSuggestions:n,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return o.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.
`),r.length>0&&o.push(`         Did you mean: [${r.slice(0,3)}]?
`),o.push("If using a custom component check it has been registered correctly."),o},102:()=>"selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:e,param:t})=>`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`,105:({e})=>["chart rendering failed",e],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${Rt}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>["chart update failed",e],109:({aggFuncOrString:e})=>`unrecognised aggregation function ${e}`,110:()=>"groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup",111:()=>"Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.",113:()=>"Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values",114:({component:e})=>`Could not find component with name of ${e}. Is it in Vue.components?`,116:()=>"Invalid selection state. The state must conform to `IServerSideSelectionState`.",117:()=>"selectAll must be of boolean type.",118:()=>"Infinite scrolling must be enabled in order to set the row count.",119:()=>"Unable to instantiate filter",120:()=>"MultiFloatingFilterComp expects MultiFilter as its parent",121:()=>"a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (see AG Grid docs) or b) to toString() on the object to return a key",122:()=>"could not find the document, document is empty",123:()=>"Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.",124:()=>"No active charts to update.",125:({chartId:e})=>`Unable to update chart. No active chart found with ID: ${e}.`,126:()=>"unable to restore chart as no chart model is provided",127:({allRange:e})=>`unable to create chart as ${e?"there are no columns in the grid":"no range is selected"}.`,128:({feature:e})=>`${e} is only available if using 'multiRow' selection mode.`,129:({feature:e,rowModel:t})=>`${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`,130:()=>'cannot multi select unless selection mode is "multiRow"',132:()=>"Row selection features are not available unless `rowSelection` is enabled.",133:({iconName:e})=>`icon '${e}' function should return back a string or a dom object`,134:({iconName:e})=>`Did not find icon '${e}'`,135:()=>"Data type of the new value does not match the cell data type of the column",136:()=>"Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.",137:({type:e,currentChartType:t})=>`Unable to update chart as a '${e}' update type is not permitted on a ${t}.`,138:({chartType:e})=>`invalid chart type supplied: ${e}`,139:({customThemeName:e})=>`a custom chart theme with the name ${e} has been supplied but not added to the 'chartThemes' list`,140:({name:e})=>`no stock theme exists with the name '${e}' and no custom chart theme with that name was supplied to 'customChartThemes'`,141:()=>"cross filtering with row grouping is not supported.",142:()=>"cross filtering is only supported in the client side row model.",143:({panel:e})=>`'${e}' is not a valid Chart Tool Panel name`,144:({type:e})=>`Invalid charts data panel group name supplied: '${e}'`,145:({group:e})=>`As of v32, only one charts customize panel group can be expanded at a time. '${e}' will not be expanded.`,146:({comp:e})=>`Unable to instantiate component '${e}' as its module hasn't been loaded. Add 'ValidationModule' to see which module is required.`,147:({group:e})=>`Invalid charts customize panel group name supplied: '${e}'`,148:({group:e})=>`invalid chartGroupsDef config '${e}'`,149:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,150:()=>"'seriesChartTypes' are required when the 'customCombo' chart type is specified.",151:({chartType:e})=>`invalid chartType '${e}' supplied in 'seriesChartTypes', converting to 'line' instead.`,152:({colId:e})=>`no 'seriesChartType' found for colId = '${e}', defaulting to 'line'.`,153:({chartDataType:e})=>`unexpected chartDataType value '${e}' supplied, instead use 'category', 'series' or 'excluded'`,154:({colId:e})=>`cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: ${e}`,155:({option:e})=>`'${e}' is not a valid Chart Toolbar Option`,156:({panel:e})=>`Invalid panel in chartToolPanelsDef.panels: '${e}'`,157:({unrecognisedGroupIds:e})=>["unable to find group(s) for supplied groupIds:",e],158:()=>"can not expand a column item that does not represent a column group header",159:()=>"Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",160:()=>"Export cancelled. Export is not allowed as per your configuration.",161:()=>"The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'",162:({id:e,dataType:t})=>`Unrecognized data type for excel export [${e}.dataType=${t}]`,163:({featureName:e})=>`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.
 Please turn off ${e} to enable Excel table exports.`,164:()=>"Unable to add data table to Excel sheet: A table already exists.",165:()=>"Unable to add data table to Excel sheet: Missing required parameters.",166:({unrecognisedGroupIds:e})=>["unable to find groups for these supplied groupIds:",e],167:({unrecognisedColIds:e})=>["unable to find columns for these supplied colIds:",e],168:()=>"detailCellRendererParams.template should be function or string",169:()=>'Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.',170:({providedStrategy:e})=>`invalid cellRendererParams.refreshStrategy = ${e} supplied, defaulting to refreshStrategy = 'rows'.`,171:()=>"could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions",172:()=>"could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData",173:({group:e})=>`invalid chartGroupsDef config '${e}'`,174:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,175:({menuTabName:e,itemsToConsider:t})=>[`Trying to render an invalid menu item '${e}'. Check that your 'menuTabs' contains one of `,t],176:({key:e})=>`unknown menu item type ${e}`,177:()=>"valid values for cellSelection.handle.direction are 'x', 'y' and 'xy'. Default to 'xy'.",178:({colId:e})=>`column ${e} is not visible`,179:()=>"totalValueGetter should be either a function or a string (expression)",180:()=>"agRichSelectCellEditor requires cellEditorParams.values to be set",181:()=>"agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",182:()=>'you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data',183:()=>"Group Column Filter only works on group columns. Please use a different filter.",184:({parentGroupData:e,childNodeData:t})=>["duplicate group keys for row data, keys should be unique",[e,t]],185:({data:e})=>["getDataPath() should not return an empty path",[e]],186:({rowId:e,rowData:t,duplicateRowsData:i})=>["duplicate group keys for row data, keys should be unique",e,t,...i??[]],187:({rowId:e,firstData:t,secondData:i})=>[`Duplicate node id ${e}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`,"first instance",t,"second instance",i],188:()=>"getRowId callback must be provided for Server Side Row Model selection to work correctly.",189:({startRow:e})=>`invalid value ${e} for startRow, the value should be >= 0`,190:({rowGroupId:e,data:t})=>["null and undefined values are not allowed for server side row model keys",e?`column = ${e}`:"","data is ",t],194:({method:e})=>`calling gridApi.${e}() is only possible when using rowModelType=\`clientSide\`.`,195:({justCurrentPage:e})=>`selecting just ${e?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`,196:({key:e})=>`Provided ids must be of string type. Invalid id provided: ${e}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:ar,201:({rowModelType:e})=>`Could not find row model for rowModelType = ${e}`,202:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model. Use `api.getServerSideSelectionState()` instead.",203:()=>"Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.",204:()=>"Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.",205:({duplicateIdText:e})=>`Unable to display rows as duplicate row ids (${e}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,206:()=>"getRowId callback must be implemented for transactions to work. Transaction was ignored.",207:()=>'The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.',208:()=>"Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.",209:()=>`Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${Rt}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:e})=>`unable to lookup Tool Panel as invalid key supplied: ${e}`,215:({key:e,defaultByKey:t})=>`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(t??{}).join(",")}`,216:({name:e})=>`Missing component for '${e}'`,217:({invalidColIds:e})=>["unable to find grid columns for the supplied colDef(s):",e],218:({property:e,defaultOffset:t})=>`${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,219:({property:e})=>`Property ${e} does not exist on the target object.`,220:({lineDash:e})=>`'${e}' is not a valid 'lineDash' option.`,221:()=>"agAggregationComponent should only be used with the client and server side row model.",222:()=>"agFilteredRowCountComponent should only be used with the client side row model.",223:()=>"agSelectedRowCountComponent should only be used with the client and server side row model.",224:()=>"agTotalAndFilteredRowCountComponent should only be used with the client side row model.",225:()=>"agTotalRowCountComponent should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:e})=>`unrecognised menu item ${e}`,229:({index:e})=>["invalid row index for ensureIndexVisible: ",e],230:()=>"detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",232:()=>"Using both rowData and v-model. rowData will be ignored.",233:({methodName:e})=>`Framework component is missing the method ${e}()`,234:()=>'Group Column Filter does not work with the colDef property "field". This property will be ignored.',235:()=>'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',236:()=>'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"setRowCount can only accept a positive row count.",239:()=>'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',240:({theme:e})=>`theme grid option must be a Theming API theme object or the string "legacy", received: ${e}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>`Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule. 
Please rebuild the selection state and reapply it.`,248:()=>"SetFloatingFilter expects SetFilter as its parent",249:()=>"Must supply a Value Formatter in Set Filter params when using a Key Creator",250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:e})=>`AG Grid: Unable to create chart as an invalid chartType = '${e}' was supplied.`,252:()=>`cannot get grid to draw rows when it is in the middle of drawing rows. 
Your code probably called a grid API method while the grid was in the render stage. 
To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0). 
To see what part of your code that caused the refresh check this stacktrace.`,253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e?.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>lr("IntegratedChartsModule"),258:()=>lr("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:i,gridId:s,rowModelType:o})=>ar({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:Tt[t],gridId:s,gridScoped:i,rowModelType:o}),261:()=>"As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",262:()=>'As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor.',263:()=>'As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.',264:()=>'As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus.',265:({colId:e})=>`Unable to infer chart data type for column '${e}' if first data entry is null. Please specify "chartDataType", or a "cellDataType" in the column definition. For more information, see ${Rt}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using treeDataChildrenField",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:e,parentId:t})=>`Cycle detected for row with id='${e}' and parent id='${t}'. Resetting the parent for row with id='${e}' and showing it as a root-level node.`,271:({id:e,parentId:t})=>`Parent row not found for row with id='${e}' and parent id='${t}'. Showing row with id='${e}' as a root-level node.`,272:()=>Dl(),273:({providedId:e,usedId:t})=>`Provided column id '${e}' was already in use, ensure all column and group ids are unique. Using '${t}' instead.`,274:({prop:e})=>{let t=`Since v33, ${e} has been deprecated.`;switch(e){case"maxComponentCreationTimeMs":t+=" This property is no longer required and so will be removed in a future version.";break;case"setGridApi":t+=" This method is not called by AG Grid. To access the GridApi see: https://ag-grid.com/react-data-grid/grid-interface/#grid-api ";break;case"children":t+=" For multiple versions AgGridReact does not support children.";break}return t},275:Ml,276:()=>"Row Numbers Row Resizer cannot be used when Grid Columns have `autoHeight` enabled."};function mw(e,t){let i=fw[e];if(!i)return[`Missing error text for error id ${e}!`];let s=i(t),n=`
See ${zr(e,t)}`;return Array.isArray(s)?s.concat(n):[s,n]}var Cw={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},vw=(()=>{let e=class Ze{static applyGlobalGridOptions(i){if(!Ze.gridOptions)return R({},i);let s={};return oe(s,Ze.gridOptions,!0,!0),Ze.mergeStrategy==="deep"?oe(s,i,!0,!0):s=R(R({},s),i),Ze.gridOptions.context&&(s.context=Ze.gridOptions.context),i.context&&(Ze.mergeStrategy==="deep"&&s.context&&oe(i.context,s.context,!0,!0),s.context=i.context),s}};return e.gridOptions=void 0,e.mergeStrategy="shallow",e})(),ww=vw;function Tl(e,t,i){if(!t)return z(11),{};let s=i,o;if(!s?.setThemeOnGridDiv){let r=W({tag:"div"});r.style.height="100%",e.appendChild(r),e=r,o=()=>e.remove()}return new bw().create(e,t,r=>{let a=new Ep(e);r.createBean(a)},void 0,i,o)}var Sw=1,bw=class{create(e,t,i,s,o,n){let r=ww.applyGlobalGridOptions(t),a=r.gridId??String(Sw++),l=this.getRegisteredModules(o,a,r.rowModelType),d=this.createBeansList(r.rowModelType,l,a),c=this.createProvidedBeans(e,r,o);if(!d)return;let u={providedBeanInstances:c,beanClasses:d,gridId:a,beanInitComparator:dp,beanDestroyComparator:cp,derivedBeans:[ap],destroyCallback:n},h=new Fu(u);return this.registerModuleFeatures(h,l),i(h),h.getBean("syncSvc").start(),s&&s(h),h.getBean("gridApi")}getRegisteredModules(e,t,i){return hi(aw,void 0,!0),e?.modules?.forEach(s=>hi(s,t)),Su(t,dr(i))}registerModuleFeatures(e,t){let i=e.getBean("registry"),s=e.getBean("apiFunctionSvc");t.forEach(o=>{i.registerModule(o);let n=o.apiFunctions;n&&Object.keys(n).forEach(a=>{s?.addFunction(a,n[a])})})}createProvidedBeans(e,t,i){let s=i?i.frameworkOverrides:null;_(s)&&(s=new Jo);let o={gridOptions:t,eGridDiv:e,globalListener:i?i.globalListener:null,globalSyncListener:i?i.globalSyncListener:null,frameworkOverrides:s};return i&&i.providedBeanInstances&&Object.assign(o,i.providedBeanInstances),o}createBeansList(e,t,i){let s={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},o=dr(e),n=s[o];if(!n){qt(201,{rowModelType:o},`Unknown rowModelType ${o}.`);return}if(!yu()){qt(272,void 0,Dl());return}if(!e){let a=Object.entries(s).filter(([l,d])=>uo(d,i,l));if(a.length==1){let[l,d]=a[0];if(l!==o){let c={moduleName:d,rowModelType:l};qt(275,c,Ml(c));return}}}if(!uo(n,i,o)){qt(200,{reasonOrId:`rowModelType = '${o}'`,moduleName:n,gridScoped:Go(),gridId:i,rowModelType:o},`Missing module ${n}Module for rowModelType ${o}.`);return}let r=new Set;return t.forEach(a=>a.beans?.forEach(l=>r.add(l))),Array.from(r)}};function dr(e){return e??"clientSide"}function Te(e){let t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function hs(e){let t=e.rowModel;return t.getType()==="infinite"?t:void 0}function Al(e){let t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var yw=class extends y{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){let e=this.gos,t=e.getCallback("getLocaleText");if(t)return(s,o,n)=>t({key:s,defaultValue:o,variableValues:n});let i=e.get("localeText");return(s,o,n)=>{let r=i&&i[s];if(r&&n&&n.length){let a=0;for(;!(a>=n.length||r.indexOf("${variable}")===-1);)r=r.replace("${variable}",n[a++])}return r??o}}};function Rw(e,t=!1){let i=[],s=[],o=[],n=[],r=[],a=[],l=[],d=[],c=[],u=0;for(let h=0;h<e.length;h++){let{colId:g,sort:p,sortIndex:f,rowGroup:m,rowGroupIndex:C,aggFunc:v,pivot:w,pivotIndex:T,pinned:A,hide:M,width:k,flex:G}=e[h];c.push(g),p&&(i[f??u++]={colId:g,sort:p}),m&&(s[C??0]=g),typeof v=="string"&&o.push({colId:g,aggFunc:v}),w&&(n[T??0]=g),A&&(A==="right"?a:r).push(g),M&&l.push(g),(G!=null||k)&&d.push({colId:g,flex:G??void 0,width:k})}return{sort:i.length?{sortModel:i}:void 0,rowGroup:s.length?{groupColIds:s}:void 0,aggregation:o.length?{aggregationModel:o}:void 0,pivot:n.length||t?{pivotMode:t,pivotColIds:n}:void 0,columnPinning:r.length||a.length?{leftColIds:r,rightColIds:a}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:d.length?{columnSizingModel:d}:void 0,columnOrder:c.length?{orderedColIds:c}:void 0}}function xw(e){let t=[];return e.forEach(({groupId:i,open:s})=>{s&&t.push(i)}),t.length?{openColumnGroupIds:t}:void 0}var kl=class{wrap(e,t,i,s){let o=this.createWrapper(e,s);return t?.forEach(n=>{this.createMethod(o,n,!0)}),i?.forEach(n=>{this.createMethod(o,n,!1)}),o}createMethod(e,t,i){e.addMethod(t,this.createMethodProxy(e,t,i))}createMethodProxy(e,t,i){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(i&&F(49,{methodName:t}),null)}}},Fw={tag:"div",cls:"ag-tooltip"},Ew=class extends Vt{constructor(){super(Fw)}init(e){let{value:t}=e;this.getGui().textContent=Ht(t)}};function Pw(e,t){if(typeof e!="number")return"";let i=t(),s=i("thousandSeparator",","),o=i("decimalSeparator",".");return e.toString().replace(".",o).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${s}`)}var Dw=class extends y{getFileName(e){let t=this.getDefaultFileExtension();return(e==null||!e.length)&&(e=this.getDefaultFileName()),e.indexOf(".")===-1?`${e}.${t}`:e}getData(e){let t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},Mw=class{constructor(e){let{colModel:t,rowGroupColsSvc:i,colNames:s,valueSvc:o,gos:n,processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:d}=e;this.colModel=t,this.rowGroupColsSvc=i,this.colNames=s,this.valueSvc=o,this.gos=n,this.processCellCallback=r,this.processHeaderCallback=a,this.processGroupHeaderCallback=l,this.processRowGroupCallback=d}prepare(e){}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e,t,i,s,o){if(this.processRowGroupCallback&&(this.gos.get("treeData")||o.group)&&(!o.rowGroupColumn||e.isRowGroupDisplayed(o.rowGroupColumn.getColId())))return{value:this.processRowGroupCallback(I(this.gos,{column:e,node:o}))??""};if(this.processCellCallback)return{value:this.processCellCallback(I(this.gos,{accumulatedRowIndex:i,column:e,node:o,value:this.valueSvc.getValueForDisplay(e,o).value,type:s,parseValue:h=>this.valueSvc.parseValue(e,o,h,this.valueSvc.getValue(e,o)),formatValue:h=>this.valueSvc.formatValue(e,o,h)??h}))??""};let n=this.gos.get("treeData"),r=this.valueSvc,a=o.level===-1&&o.footer,l=t===0&&Yr(this.gos,o,this.colModel.isPivotMode()),d=e.colDef.showRowGroup===!0&&(o.group||n);if(!a&&(l||d)){let h="",g=o;for(;g&&g.level!==-1;){let{value:p,valueFormatted:f}=r.getValueForDisplay(l?void 0:e,g,!0,!0);h=` -> ${f??p??""}${h}`,g=g.parent}return{value:h,valueFormatted:h}}let{value:c,valueFormatted:u}=r.getValueForDisplay(e,o,!0,!0);return{value:c??"",valueFormatted:u}}getHeaderName(e,t){return e?e(I(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}};function Tw(e,t){let i=document.defaultView||window;if(!i){F(52);return}let s=document.createElement("a"),o=i.URL.createObjectURL(t);s.setAttribute("href",o),s.setAttribute("download",e),s.style.display="none",document.body.appendChild(s),s.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:i})),document.body.removeChild(s),i.setTimeout(()=>{i.URL.revokeObjectURL(o)},0)}var Aw={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,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,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,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!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,getDataPath:!0,enableCellSpan:!0},ne="clientSide",te="serverSide",Ct="infinite",kw={onGroupExpandedOrCollapsed:[ne],refreshClientSideRowModel:[ne],isRowDataEmpty:[ne],forEachLeafNode:[ne],forEachNodeAfterFilter:[ne],forEachNodeAfterFilterAndSort:[ne],resetRowHeights:[ne],applyTransaction:[ne],applyTransactionAsync:[ne],flushAsyncTransactions:[ne],getBestCostNodeSelection:[ne],getServerSideSelectionState:[te],setServerSideSelectionState:[te],applyServerSideTransaction:[te],applyServerSideTransactionAsync:[te],applyServerSideRowData:[te],retryServerSideLoads:[te],flushServerSideAsyncTransactions:[te],refreshServerSide:[te],getServerSideGroupLevelState:[te],refreshInfiniteCache:[Ct],purgeInfiniteCache:[Ct],getInfiniteRowCount:[Ct],isLastRowIndexKnown:[Ct,te],expandAll:[ne,te],collapseAll:[ne,te],onRowHeightChanged:[ne,te],setRowCount:[Ct,te],getCacheBlockState:[Ct,te]},Iw={showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"},selectAllFiltered:{version:"v33",old:"selectAllFiltered()",new:'selectAll("filtered")'},deselectAllFiltered:{version:"v33",old:"deselectAllFiltered()",new:'deselectAll("filtered")'},selectAllOnCurrentPage:{version:"v33",old:"selectAllOnCurrentPage()",new:'selectAll("currentPage")'},deselectAllOnCurrentPage:{version:"v33",old:"deselectAllOnCurrentPage()",new:'deselectAll("currentPage")'}};function Lw(e,t,i){let s=Iw[e];if(s){let{version:n,new:r,old:a,message:l}=s,d=a??e;return(...c)=>{let u=r?`Please use ${r} instead. `:"";return bt(`Since ${n} api.${d} is deprecated. ${u}${l??""}`),t.apply(t,c)}}let o=kw[e];return o?(...n)=>{let r=i.rowModel.getType();if(!o.includes(r)){yt(`api.${e} can only be called when gridOptions.rowModelType is ${o.join(" or ")}`);return}return t.apply(t,n)}:t}var Ow={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1,"column-arrow":1,"un-pin":1,"pinned-top":1,"pinned-bottom":1},Hw={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",ensureColumnVisible:["ColumnsToolPanel","ColumnMenu"],groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuValue:"MenuCore",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore",rowPin:"PinnedRow",rowUnpin:"PinnedRow",rowPinBottom:"PinnedRow",rowPinTop:"PinnedRow"},Gw=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),Bw=class extends y{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,Ld(this)}warnOnInitialPropertyUpdate(e,t){e==="api"&&Aw[t]&&F(22,{key:t})}processGridOptions(e){this.processOptions(e,sv())}validateApiFunction(e,t){return Lw(e,t,this.beans)}missingUserComponent(e,t,i,s){let o=Tt[t];o?this.gos.assertModuleRegistered(o,`AG Grid '${e}' component: ${t}`):F(101,{propertyName:e,componentName:t,agGridDefaults:i,jsComps:s})}checkRowEvents(e){Nw.has(e)&&F(10,{eventType:e})}validateIcon(e){if(Gw.has(e)&&F(43,{iconName:e}),Ow[e])return;let t=Hw[e];if(t){z(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:Go(),gridId:this.beans.context.getGridId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}F(134,{iconName:e})}isProvidedUserComp(e){return!!Tt[e]}validateColDef(e){this.processOptions(e,UC())}processOptions(e,t){let{validations:i,deprecations:s,allProperties:o,propertyExceptions:n,objectName:r,docsUrl:a}=t;o&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...n??[],...Object.keys(s)],o,r,a);let l=new Set;Object.keys(e).forEach(c=>{let u=s[c];if(u){let{message:v,version:w}=u;l.add(`As of v${w}, ${String(c)} is deprecated. ${v??""}`)}let h=e[c];if(h==null||h===!1)return;let g=i[c];if(!g)return;let{dependencies:p,validate:f,supportedRowModels:m,expectedType:C}=g;if(C){let v=typeof h;if(v!==C){l.add(`${String(c)} should be of type '${C}' but received '${v}' (${h}).`);return}}if(m){let v=this.gridOptions.rowModelType??"clientSide";if(!m.includes(v)){l.add(`${String(c)} is not supported with the '${v}' row model. It is only valid with: ${m.join(", ")}.`);return}}if(p){let v=this.checkForRequiredDependencies(c,p,e);if(v){l.add(v);return}}if(f){let v=f(e,this.gridOptions,this.beans);if(v){l.add(v);return}}}),l.size>0&&l.forEach(c=>{bt(c)})}checkForRequiredDependencies(e,t,i){let o=Object.entries(t).filter(([n,r])=>{let a=i[n];return!r.required.includes(a)});return o.length===0?null:o.map(([n,r])=>`'${String(e)}' requires '${n}' to be one of [${r.required.map(a=>a===null?"null":a===void 0?"undefined":a).join(", ")}]. ${r.reason??""}`).join(`
           `)}checkProperties(e,t,i,s,o){let n=["__ob__","__v_skip","__metadata__"],r=Vw(Object.getOwnPropertyNames(e),[...n,...t,...i],i),a=Object.keys(r);for(let l of a){let d=r[l],c=`invalid ${s} property '${l}' did you mean any of these: ${d.slice(0,8).join(", ")}.`;i.includes("context")&&(c+=`
If you are trying to annotate ${s} with application data, use the '${s}.context' property instead.`),bt(c)}if(a.length>0&&o){let l=this.beans.frameworkOverrides.getDocLink(o);bt(`to see all the valid ${s} properties please check: ${l}`)}}getConsoleMessage(e,t){return mw(e,t)}};function Vw(e,t,i){let s={},o=e.filter(n=>!t.some(r=>r===n));return o.length>0&&o.forEach(n=>s[n]=El({inputValue:n,allSuggestions:i}).values),s}var Nw=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),zw={moduleName:"Validation",version:D,beans:[Bw]};function Il(e){e.sibling&&(e.sibling.childrenAfterFilter=e.childrenAfterFilter)}var Ww=class extends y{constructor(){super(...arguments),this.beanName="filterStage",this.refreshProps=new Set(["excludeChildrenWhenTreeDataFiltering"]),this.step="filter"}wireBeans(e){this.filterManager=e.filterManager}execute(e){let{changedPath:t}=e;this.filter(t)}filter(e){let t=!!this.filterManager?.isChildFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){let i=(s,o)=>{s.hasChildren()&&e&&!o?s.childrenAfterFilter=s.childrenAfterGroup.filter(n=>{let r=n.childrenAfterFilter&&n.childrenAfterFilter.length>0,a=n.data&&this.filterManager.doesRowPassFilter({rowNode:n});return r||a}):s.childrenAfterFilter=s.childrenAfterGroup,Il(s)};if(this.doingTreeDataFiltering()){let s=(n,r)=>{if(n.childrenAfterGroup)for(let a=0;a<n.childrenAfterGroup.length;a++){let l=n.childrenAfterGroup[a],d=r||this.filterManager.doesRowPassFilter({rowNode:l});l.childrenAfterGroup?s(n.childrenAfterGroup[a],d):i(l,d)}i(n,r)},o=n=>s(n,!1);t.executeFromRootNode(o)}else{let s=o=>i(o,!1);t.forEachChangedNodeDepthFirst(s,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}},_w=class extends qo{constructor(){super(...arguments),this.iconCreated=!1}setComp(e,t,i,s,o){this.comp=e;let n=Ci(this,this.beans.context,o);this.eButtonShowMainFilter=i,this.eFloatingFilterBody=s,this.setGui(t,n),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(n),this.setupLeft(n),this.setupHover(n),this.setupFocus(n),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(n),this.setupUi(),n.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(n),n.addManagedListeners(this.column,{colDefChanged:()=>this.onColDefChanged(n)}),n.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){let{column:e,beans:t}=this,i=e.colDef;return I(t.gos,{colDef:i,column:e,floatingFilter:!0})}setupActive(){let e=this.column.getColDef(),t=!!e.filter,i=!!e.floatingFilter;this.active=t&&i}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;let e=ge("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new Bt(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){let e=this.getLocaleTextFunc();rs(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){let{beans:t}=this;if($(t)===this.eGui)return;let o=pt(t,this.eGui,null,e.shiftKey);if(o){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),o.focus();return}let n=this.findNextColumnWithFloatingFilter(e.shiftKey);n&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:n},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){let t=this.beans.visibleCols,i=this.column;do if(i=e?t.getColBefore(i):t.getColAfter(i),!i)break;while(!i.getColDef().filter||!i.getColDef().floatingFilter);return i}handleKeyDown(e){super.handleKeyDown(e);let t=this.getWrapperHasFocus();switch(e.key){case b.UP:case b.DOWN:case b.LEFT:case b.RIGHT:if(t)return;lt(e);case b.ENTER:t&&dt(this.eGui)&&e.preventDefault();break;case b.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;let i=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),s=!!e.relatedTarget&&et(e.relatedTarget,"ag-floating-filter");if(i&&s&&e.target===this.eGui){let o=this.lastFocusEvent,n=!!(o&&o.key===b.TAB);if(o&&n){let r=o.shiftKey;dt(this.eGui,r)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){let t=new jo(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!de(this.gos)}setupUserComp(){if(!this.active)return;let e=this.beans.filterManager?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){let e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.beans.menuSvc?.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;let{filterManager:t}=this.beans,i=s=>{if(s?.source==="filterDestroyed"&&!this.isAlive())return;let o=this.comp.getFloatingFilterComp();o&&o.then(n=>{if(n){let r=t?.getCurrentFloatingFilterParentModel(this.column),a=s?O(R({},s),{columns:s.columns??[],source:s.source==="api"?"api":"columnFilter"}):null;n.onParentModelChanged(r,a)}})};[this.destroySyncListener]=e.addManagedListeners(this.column,{filterChanged:i}),t?.isFilterActive(this.column)&&i(null)}setupWidth(e){let t=()=>{let i=`${this.column.getActualWidth()}px`;this.comp.setWidth(i)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){let e=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){let t=this.active;this.setupActive();let i=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());let s=this.active?this.beans.filterManager?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,o=this.comp.getFloatingFilterComp();!o||!s?this.updateCompDetails(e,s,i):o.then(n=>{!n||this.beans.filterManager?.areFilterCompsDifferent(this.userCompDetails??null,s)?this.updateCompDetails(e,s,i):this.updateFloatingFilterParams(s)})}updateCompDetails(e,t,i){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),i&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e){if(!e)return;let t=e.params;this.comp.getFloatingFilterComp()?.then(i=>{i?.refresh&&typeof i.refresh=="function"&&i.refresh(t)})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function Uw(e,t){let i=e.colModel.getCol(t);if(!i){z(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:i,positionBy:"auto"})}function $w(e){e.menuSvc?.hidePopupMenu()}var Kw={moduleName:"SharedMenu",version:D,beans:[gg],apiFunctions:{showColumnMenu:Uw,hidePopupMenu:$w}},jw=0,qw=200,Yw=class extends y{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){let e=this.gos.get("popupParent");return e||this.gridCtrl.getGui()}positionPopupForMenu(e){let{eventSource:t,ePopup:i,column:s,node:o,event:n}=e,r=t.getBoundingClientRect(),a=this.getParentRect();this.setAlignedTo(t,i);let l=!1,d=()=>{let c=this.keepXYWithinBounds(i,r.top-a.top,0),u=i.clientWidth>0?i.clientWidth:200;l||(i.style.minWidth=`${u}px`,l=!0);let g=a.right-a.left-u,p;return this.gos.get("enableRtl")?(p=m(),p<0&&(p=f(),this.setAlignedStyles(i,"left")),p>g&&(p=0,this.setAlignedStyles(i,"right"))):(p=f(),p>g&&(p=m(),this.setAlignedStyles(i,"right")),p<0&&(p=0,this.setAlignedStyles(i,"left"))),{x:p,y:c};function f(){return r.right-a.left-2}function m(){return r.left-a.left-u}};this.positionPopup({ePopup:i,keepWithinBounds:!0,updatePosition:d,postProcessCallback:()=>this.callPostProcessPopup("subMenu",i,t,n instanceof MouseEvent?n:void 0,s,o)})}positionPopupUnderMouseEvent(e){let{ePopup:t,nudgeX:i,nudgeY:s,skipObserver:o}=e;this.positionPopup({ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:!0,skipObserver:o,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)})}calculatePointerAlign(e){let t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){let{ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:o,eventSource:n,alignSide:r="left",position:a="over",column:l,rowNode:d,type:c}=e,u=n.getBoundingClientRect(),h=this.getParentRect();this.setAlignedTo(n,t);let g=()=>{let p=u.left-h.left;r==="right"&&(p-=t.offsetWidth-u.width);let f;return a==="over"?(f=u.top-h.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,u,h,e.nudgeY||0)==="under"?f=u.top-h.top+u.height:f=u.top-t.offsetHeight-(s||0)*2-h.top),{x:p,y:f}};this.positionPopup({ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:o,updatePosition:g,postProcessCallback:()=>this.callPostProcessPopup(c,t,n,null,l,d)})}shouldRenderUnderOrAbove(e,t,i,s){let o=i.bottom-t.bottom,n=t.top-i.top,r=e.offsetHeight+s;return o>r?"under":n>r||n>o?"above":"under"}setAlignedStyles(e,t){let i=this.getPopupIndex(e);if(i===-1)return;let s=this.popupList[i],{alignedToElement:o}=s;!o||(["right","left","over","above","under"].forEach(r=>{o.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`)}),!t)||(o.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){let i=this.getPopupIndex(t);if(i!==-1){let s=this.popupList[i];s.alignedToElement=e}}callPostProcessPopup(e,t,i,s,o,n){let r=this.gos.getCallback("postProcessPopup");r&&r({column:o,rowNode:n,ePopup:t,type:e,eventSource:i,mouseEvent:s})}positionPopup(e){let{ePopup:t,keepWithinBounds:i,nudgeX:s,nudgeY:o,skipObserver:n,updatePosition:r}=e,a={width:0,height:0},l=(d=!1)=>{let{x:c,y:u}=r();d&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,s&&(c+=s),o&&(u+=o),i&&(c=this.keepXYWithinBounds(t,c,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${c}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!n){let d=qe(this.beans,t,()=>l(!0));setTimeout(()=>d(),qw)}}getActivePopups(){return this.popupList.map(e=>e.element)}getParentRect(){let e=q(this.beans),t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),kr(t)}keepXYWithinBounds(e,t,i){let s=i===0,o=s?"clientHeight":"clientWidth",n=s?"top":"left",r=s?"height":"width",a=s?"scrollTop":"scrollLeft",l=q(this.beans),d=l.documentElement,c=this.getPopupParent(),u=e.getBoundingClientRect(),h=c.getBoundingClientRect(),g=l.documentElement.getBoundingClientRect(),p=c===l.body,f=Math.ceil(u[r]),C=p?(s?Ar:Bi)(d)+d[a]:c[o];p&&(C-=Math.abs(g[n]-h[n]));let v=C-f;return Math.min(Math.max(t,0),Math.abs(v))}addPopup(e){let t=q(this.beans),{eChild:i,ariaLabel:s,alwaysOnTop:o,positionCallback:n,anchorToElement:r}=e;if(!t)return F(122),{hideFunc:()=>{}};let a=this.getPopupIndex(i);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(i);let l=this.createPopupWrapper(i,s,!!o),d=this.addEventListenersToPopup(O(R({},e),{wrapperEl:l}));return n&&n(),this.addPopupToPopupList(i,l,d,r),{hideFunc:d}}initialisePopupPosition(e){let i=this.getPopupParent().getBoundingClientRect();P(e.style.top)||(e.style.top=`${i.top*-1}px`),P(e.style.left)||(e.style.left=`${i.left*-1}px`)}createPopupWrapper(e,t,i){let s=this.getPopupParent(),{environment:o,gos:n}=this.beans,r=W({tag:"div"});return o.applyThemeClasses(r),r.classList.add("ag-popup"),e.classList.add(n.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||$e(e,"dialog"),rs(e,t),r.appendChild(e),s.appendChild(r),i?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),r}handleThemeChange(e){if(e.themeChanged){let t=this.beans.environment;for(let i of this.popupList)t.applyThemeClasses(i.wrapper)}}addEventListenersToPopup(e){let t=this.beans,i=q(t),s=this.getPopupParent(),{wrapperEl:o,eChild:n,closedCallback:r,afterGuiAttached:a,closeOnEsc:l,modal:d}=e,c=!1,u=f=>{if(!o.contains($(t)))return;f.key===b.ESCAPE&&!Ie(f)&&p({keyboardEvent:f})},h=f=>p({mouseEvent:f}),g=f=>p({touchEvent:f}),p=(f={})=>{let{mouseEvent:m,touchEvent:C,keyboardEvent:v,forceHide:w}=f;!w&&(this.isEventFromCurrentPopup({mouseEvent:m,touchEvent:C},n)||c)||(c=!0,s.removeChild(o),i.removeEventListener("keydown",u),i.removeEventListener("mousedown",h),i.removeEventListener("touchstart",g),i.removeEventListener("contextmenu",h),this.eventSvc.removeEventListener("dragStarted",h),r&&r(m||C||v),this.removePopupFromPopupList(n))};return a&&a({hidePopup:p}),window.setTimeout(()=>{l&&i.addEventListener("keydown",u),d&&(i.addEventListener("mousedown",h),this.eventSvc.addEventListener("dragStarted",h),i.addEventListener("touchstart",g),i.addEventListener("contextmenu",h))},0),p}addPopupToPopupList(e,t,i,s){this.popupList.push({element:e,wrapper:t,hideFunc:i,instanceId:jw++,isAnchored:!!s}),s&&this.setPopupPositionRelatedToElement(e,s)}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){let i=this.getPopupIndex(e);if(i===-1)return;let s=this.popupList[i];if(s.stopAnchoringPromise&&s.stopAnchoringPromise.then(n=>n&&n()),s.stopAnchoringPromise=void 0,s.isAnchored=!1,!t)return;let o=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:s.hideFunc});return s.stopAnchoringPromise=o,s.isAnchored=!0,o}removePopupFromPopupList(e){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),this.popupList=this.popupList.filter(t=>t.element!==e)}keepPopupPositionedRelativeTo(e){let t=this.getPopupParent(),i=t.getBoundingClientRect(),{element:s,ePopup:o}=e,n=s.getBoundingClientRect(),r=u=>parseInt(u.substring(0,u.length-1),10),a=(u,h)=>{let g=i[u]-n[u],p=r(o.style[u]);return{initialDiff:g,lastDiff:g,initial:p,last:p,direction:h}},l=a("top",0),d=a("left",1),c=this.beans.frameworkOverrides;return new ie(u=>{c.wrapIncoming(()=>{c.setInterval(()=>{let h=t.getBoundingClientRect(),g=s.getBoundingClientRect();if(g.top==0&&g.left==0&&g.height==0&&g.width==0){e.hidePopup();return}let f=(m,C)=>{let v=r(o.style[C]);m.last!==v&&(m.initial=v,m.last=v);let w=h[C]-g[C];if(w!=m.lastDiff){let T=this.keepXYWithinBounds(o,m.initial+m.initialDiff-w,m.direction);o.style[C]=`${T}px`,m.last=T}m.lastDiff=w};f(l,"top"),f(d,"left")},200).then(h=>{u(()=>{h!=null&&window.clearInterval(h)})})},"popupPositioning")})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){let{mouseEvent:i,touchEvent:s}=e,o=i||s;if(!o)return!1;let n=this.getPopupIndex(t);if(n===-1)return!1;for(let r=n;r<this.popupList.length;r++){let a=this.popupList[r];if(ic(a.element,o))return!0}return this.isElementWithinCustomPopup(o.target)}isElementWithinCustomPopup(e){let t=q(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){let i=this.getWrapper(e);i&&(i.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(i))}bringPopupToFront(e){let t=this.getPopupParent(),i=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),s=i.length,o=this.getWrapper(e);if(!o||s<=1||!t.contains(e))return;let n=[],r=[];for(let h of i)h!==o&&(h.classList.contains("ag-always-on-top")?r.push(h):n.push(h));let a=[],l=r.length,u=o.classList.contains("ag-always-on-top")||!l?[...n,...r,o]:[...n,o,...r];for(let h=0;h<=s;h++){let g=u[h];if(i[h]===u[h]||g===o)continue;g.querySelectorAll("div").forEach(f=>{f.scrollTop!==0&&a.push([f,f.scrollTop])}),h===0?t.insertAdjacentElement("afterbegin",g):u[h-1].insertAdjacentElement("afterend",g)}for(;a.length;){let h=a.pop();h[0].scrollTop=h[1]}}},gs={moduleName:"Popup",version:D,beans:[Yw]},Qw=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper,:where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}:where(.ag-floating-filter-full-body)>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}:where(.ag-input-field-input[type=date]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:1px solid var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function Zw(e){let t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function Xw(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function Jw(e,t){let i=e.colModel.getColDefCol(t);if(i)return e.filterManager?.destroyFilter(i,"api")}function e0(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function t0(e){return e.filterManager?.getFilterModel()??{}}function i0(e,t){return e.filterManager?.getColumnFilterModel(t)??null}function s0(e,t,i){return e.filterManager?.setColumnFilterModel(t,i)??Promise.resolve()}function o0(e,t){let i=e.colModel.getCol(t);if(!i){z(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:i,containerType:"columnFilter",positionBy:"auto"})}var cr={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},ur=["january","february","march","april","may","june","july","august","september","october","november","december"];function n0(e,t){return e==null?-1:t==null?1:parseFloat(e)-parseFloat(t)}var r0=class extends y{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue=[]}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),beforeRefreshModel:({params:e})=>{(e.rowDataUpdated||e.changedProps?.has("treeData"))&&this.onNewRowsLoaded("rowDataUpdated")},dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.initialFilterModel=R({},this.gos.get("initialState")?.filter?.filterModel??{})}setFilterModel(e,t="api"){let{colModel:i,dataTypeSvc:s,filterManager:o}=this.beans;if(s?.isPendingInference){this.filterModelUpdateQueue.push({model:e,source:t});return}let n=[],r=this.getFilterModel(!0);if(e){let a=new Set(Object.keys(e));this.allColumnFilters.forEach((l,d)=>{let c=e[d];n.push(Ti(l.filterPromise,c)),a.delete(d)}),a.forEach(l=>{let d=i.getColDefCol(l)||i.getCol(l);if(!d){F(62,{colId:l});return}if(!d.isFilterAllowed()){F(63,{colId:l});return}let c=this.getOrCreateFilterWrapper(d);if(!c){F(64,{colId:l});return}n.push(Ti(c.filterPromise,e[l]))})}else this.allColumnFilters.forEach(a=>{n.push(Ti(a.filterPromise,null))});ie.all(n).then(()=>{let a=this.getFilterModel(!0),l=[];this.allColumnFilters.forEach((d,c)=>{let u=r?r[c]:null,h=a?a[c]:null;ai(u,h)||l.push(d.column)}),l.length>0&&o?.onFilterChanged({columns:l,source:t})})}getFilterModel(e){let t={},{allColumnFilters:i,initialFilterModel:s,beans:{colModel:o}}=this;if(i.forEach((n,r)=>{let a=this.getModelFromFilterWrapper(n);P(a)&&(t[r]=a)}),!e)for(let n of Object.keys(s)){let r=s[n];P(r)&&!i.has(n)&&o.getCol(n)?.isFilterAllowed()&&(t[n]=r)}return t}getModelFromFilterWrapper(e){let{filter:t}=e;return t?typeof t.getModel!="function"?(F(66),null):t.getModel():this.getModelFromInitialState(e.column)}getModelFromInitialState(e){return this.initialFilterModel[e.getColId()]??null}isColumnFilterPresent(){return this.activeColumnFilters.length>0}isAggregateFilterPresent(){return!!this.activeAggregateFilters.length}disableColumnFilters(){this.initialFilterModel={};let{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}doAggregateFiltersPass(e,t){return this.doColumnFiltersPass(e,t,!0)}updateActiveFilters(){let e=a=>a?a.isFilterActive?a.isFilterActive():(F(67),!1):!1,{colModel:t,gos:i}=this.beans,s=!!ao(i),o=a=>{if(!a.isPrimary())return!0;let d=!t.isPivotActive();return!a.isValueActive()||!d?!1:t.isPivotMode()?!0:s},n=[],r=[];return this.forEachColumnFilter((a,l)=>{e(a)&&(o(l.column)?n.push(a):r.push(a))}).then(()=>{this.activeAggregateFilters=n,this.activeColumnFilters=r})}updateFilterFlagInColumns(e,t){return this.forEachColumnFilter((i,s)=>this.setColFilterActive(s.column,i.isFilterActive(),e,t))}forEachColumnFilter(e){let t=[];return this.allColumnFilters.forEach(i=>{let s=i.filterPromise;s&&t.push(s.then(o=>e(o,i)))}),ie.all(t)}doColumnFiltersPass(e,t,i){let{data:s,aggData:o}=e,n=i?this.activeAggregateFilters:this.activeColumnFilters,r=i?o:s;for(let a=0;a<n.length;a++){let l=n[a];if(!(l==null||l===t)){if(typeof l.doesFilterPass!="function"){z(91);continue}if(!l.doesFilterPass({node:e,data:r}))return!1}}return!0}callOnFilterChangedOutsideRenderCycle(e){let{rowRenderer:t,filterManager:i}=this.beans,s=()=>{this.isAlive()&&i?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(s,0):s()}updateBeforeFilterChanged(e={}){let{filterInstance:t,additionalEventAttributes:i}=e;return this.updateDependentFilters(),this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",i).then(()=>{this.allColumnFilters.forEach(s=>{s.filterPromise&&s.filterPromise.then(o=>{o&&o!==t&&o.onAnyFilterChanged&&o.onAnyFilterChanged()})}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){this.forEachColumnFilter(t=>{t.onNewRowsLoaded?.()}).then(()=>this.updateFilterFlagInColumns(e,{afterDataChange:!0})).then(()=>this.updateActiveFilters())}createGetValue(e){let{filterValueSvc:t,colModel:i}=this.beans;return(s,o)=>{let n=o?i.getCol(o):e;return n?t.getValue(n,s):void 0}}isFilterActive(e){let{filter:t}=this.cachedFilter(e)??{};return t?t.isFilterActive():this.getModelFromInitialState(e)!=null}getOrCreateFilterWrapper(e){if(!e.isFilterAllowed())return null;let t=this.cachedFilter(e);return t||(t=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,t)),t}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e){let t,{gos:i,dataTypeSvc:s}=this.beans;if(Ds(i))t="agSetColumnFilter";else{let o=s?.getBaseDataType(e);o==="number"?t="agNumberColumnFilter":o==="date"||o==="dateString"?t="agDateColumnFilter":t="agTextColumnFilter"}return t}getDefaultFloatingFilter(e){let t,{gos:i,dataTypeSvc:s}=this.beans;if(Ds(i))t="agSetColumnFloatingFilter";else{let o=s?.getBaseDataType(e);o==="number"?t="agNumberColumnFloatingFilter":o==="date"||o==="dateString"?t="agDateColumnFloatingFilter":t="agTextColumnFloatingFilter"}return t}createFilterInstance(e,t){let i=this.getDefaultFilter(e),s=e.getColDef(),o,n=O(R({},this.createFilterParams(e,s)),{filterModifiedCallback:()=>this.filterModifiedCallbackFactory(o,e)(),filterChangedCallback:a=>this.filterChangedCallbackFactory(o,e)(a),doesRowPassOtherFilter:a=>this.beans.filterManager?.doesRowPassOtherFilters(o,a)??!0}),r=lu(this.beans.userCompFactory,s,n,i);return r?{filterPromise:()=>{let a=r.newAgStackInstance();return a.then(l=>{o=l,t&&(t.filter=l??void 0)}),a},compDetails:r}:{filterPromise:null,compDetails:null}}createFilterParams(e,t){return I(this.gos,{column:e,colDef:t,rowModel:this.beans.rowModel,filterChangedCallback:()=>{},filterModifiedCallback:()=>{},getValue:this.createGetValue(e),doesRowPassOtherFilter:()=>!0})}createFilterWrapper(e){let t={column:e,filterPromise:null,compDetails:null},{filterPromise:i,compDetails:s}=this.createFilterInstance(e,t);return t.filterPromise=i?.()??null,t.compDetails=s,t}onColumnsChanged(){let e=[],{colModel:t,filterManager:i}=this.beans;this.allColumnFilters.forEach((o,n)=>{let r;o.column.isPrimary()?r=t.getColDefCol(n):r=t.getCol(n),!(r&&r===o.column)&&(e.push(o.column),this.disposeFilterWrapper(o,"columnChanged"),this.disposeColumnListener(n))});let s=e.every(hr);e.length>0&&!s?i?.onFilterChanged({columns:e,source:"api"}):this.updateDependentFilters()}updateDependentFilters(){this.beans.autoColSvc?.getColumns()?.forEach(e=>{hr(e)&&this.getOrCreateFilterWrapper(e)})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;let{filter:i}=this.allColumnFilters.get(e.getColId())??{};return i&&typeof i?.isFilterAllowed=="function"?i.isFilterAllowed():!0}getFloatingFilterCompDetails(e,t){let i=c=>{let u=this.getOrCreateFilterWrapper(e)?.filterPromise;u?.then(h=>{c(ui(h))})},s=e.getColDef(),o=O(R({},this.createFilterParams(e,s)),{filterChangedCallback:()=>i(c=>this.filterChangedCallbackFactory(c,e)())}),{userCompFactory:n,frameworkOverrides:r}=this.beans,a=fu(n,s,o),l=mh(r,s,()=>this.getDefaultFloatingFilter(e));l==null&&(l="agReadOnlyFloatingFilter");let d=I(this.gos,{column:e,filterParams:a,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:i,showParentFilter:t});return gu(n,s,d,l)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilter(e,t="api"){let i=e.getColId(),s=this.allColumnFilters.get(i);this.disposeColumnListener(i),delete this.initialFilterModel[i],s&&this.disposeFilterWrapper(s,t).then(o=>{o&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:"api"})})}disposeColumnListener(e){let t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){return e.filterPromise?.then(i=>{let s=!!i?.isFilterActive();return this.destroyBean(i),this.setColFilterActive(e.column,!1,"filterDestroyed"),this.allColumnFilters.delete(e.column.getColId()),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:e.column}),s})??ie.resolve(!1)}filterModifiedCallbackFactory(e,t){return()=>{this.eventSvc.dispatchEvent({type:"filterModified",column:t,filterInstance:e})}}filterChangedCallbackFactory(e,t){return i=>{let s=i?.source??"columnFilter",o={filter:e,additionalEventAttributes:i,columns:[t],source:s};this.callOnFilterChangedOutsideRenderCycle(o)}}checkDestroyFilter(e){let t=this.allColumnFilters.get(e);if(!t)return;let i=t.column,{compDetails:s}=i.isFilterAllowed()?this.createFilterInstance(i):{compDetails:null};if(this.areFilterCompsDifferent(t.compDetails,s)){this.destroyFilter(i,"paramsUpdated");return}let o=i.getColDef().filterParams;if(!t.filterPromise){this.destroyFilter(i,"paramsUpdated");return}t.filterPromise.then(n=>{(n?.refresh?n.refresh(R(O(R({},this.createFilterParams(i,i.getColDef())),{filterModifiedCallback:this.filterModifiedCallbackFactory(n,i),filterChangedCallback:this.filterChangedCallbackFactory(n,i),doesRowPassOtherFilter:a=>this.beans.filterManager?.doesRowPassOtherFilters(n,a)??!0}),o)):!0)===!1&&this.destroyFilter(i,"paramsUpdated")})}setColumnFilterWrapper(e,t){let i=e.getColId();this.allColumnFilters.set(i,t),this.allColumnListeners.set(i,this.addManagedListeners(e,{colDefChanged:()=>this.checkDestroyFilter(i)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;let{componentClass:i}=e,{componentClass:s}=t;return!(i===s||i?.render&&s?.render&&i.render===s.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getColumnFilterInstance(e){return new Promise(t=>{this.getFilterInstanceImpl(e).then(i=>{t(ui(i))})})}getFilterInstanceImpl(e){let t=this.beans.colModel.getColDefCol(e);return t?this.getOrCreateFilterWrapper(t)?.filterPromise??ie.resolve(null):ie.resolve(void 0)}processFilterModelUpdateQueue(){this.filterModelUpdateQueue.forEach(({model:e,source:t})=>this.setFilterModel(e,t)),this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue.forEach(({key:e,model:t,resolve:i})=>{this.setColumnFilterModel(e,t).then(()=>i())}),this.columnFilterModelUpdateQueue=[]}getColumnFilterModel(e){let t=this.getFilterWrapper(e);return t?this.getModelFromFilterWrapper(t):null}setColumnFilterModel(e,t){let{colModel:i,dataTypeSvc:s}=this.beans;if(s?.isPendingInference){let a=()=>{},l=new Promise(d=>{a=d});return this.columnFilterModelUpdateQueue.push({key:e,model:t,resolve:a}),l}let o=i.getColDefCol(e),n=o?this.getOrCreateFilterWrapper(o):null;return n?(a=>new Promise(l=>{a.then(d=>l(d))}))(Ti(n.filterPromise,t)):Promise.resolve()}getFilterWrapper(e){let t=this.beans.colModel.getColDefCol(e);return t?this.cachedFilter(t)??null:null}setColDefPropertiesForDataType(e,t,i){let s=Ds(this.gos),o=this.getLocaleTextFunc(),n=r=>{let{filterParams:a}=e;e.filterParams=typeof a=="object"?R(R({},a),r):r};switch(t.baseDataType){case"number":{s&&n({comparator:n0});break}case"boolean":{n(s?{valueFormatter:r=>P(r.value)?o(String(r.value),r.value?"True":"False"):o("blanks","(Blanks)")}:{maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(r,a)=>a,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(r,a)=>a===!1,numberOfInputs:0}]});break}case"date":{n(s?{valueFormatter:r=>{let a=i(r);return P(a)?a:o("blanks","(Blanks)")},treeList:!0,treeListFormatter:(r,a)=>{if(r==="NaN")return o("invalidDate","Invalid Date");if(a===1&&r!=null){let l=ur[Number(r)-1];return o(l,cr[l])}return r??o("blanks","(Blanks)")}}:{isValidDate:gr});break}case"dateString":{let r=t.dateParser;n(s?{valueFormatter:a=>{let l=i(a);return P(l)?l:o("blanks","(Blanks)")},treeList:!0,treeListPathGetter:a=>{let l=r(a??void 0);return l?[String(l.getFullYear()),String(l.getMonth()+1),String(l.getDate())]:null},treeListFormatter:(a,l)=>{if(l===1&&a!=null){let d=ur[Number(a)-1];return o(d,cr[d])}return a??o("blanks","(Blanks)")}}:{comparator:(a,l)=>{let d=r(l);return l==null||d<a?-1:d>a?1:0},isValidDate:a=>typeof a=="string"&&gr(r(a))});break}case"object":{s?n({valueFormatter:r=>{let a=i(r);return P(a)?a:o("blanks","(Blanks)")}}):e.filterValueGetter=r=>i({column:r.column,node:r.node,value:this.beans.valueSvc.getValue(r.column,r.node)});break}}}setColFilterActive(e,t,i,s){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",i)),e.dispatchColEvent("filterChanged",i,s)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear()}};function Ti(e,t){return e?new ie(i=>{e.then(s=>{typeof s.setModel!="function"&&(F(65),i()),(s.setModel(t)||ie.resolve()).then(()=>i())})}):ie.resolve()}function hr(e){return e.getColDef().filter==="agGroupColumnFilter"}function gr(e){return e instanceof Date&&!isNaN(e.getTime())}function a0(e){return!!e.filterManager?.isAnyFilterPresent()}function l0(e,t="api"){e.filterManager?.onFilterChanged({source:t})}var d0=class extends y{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){let e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:s})=>this.onAdvFilterEnabledChanged(s),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});let{gos:i}=this;this.alwaysPassFilter=i.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=i.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){let e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){let t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){this.warnAdvFilters();return}this.colFilter?.setFilterModel(e,t)}getFilterModel(){return this.colFilter?.getFilterModel()??{}}isColumnFilterPresent(){return!!this.colFilter?.isColumnFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggregateFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableColumnFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){ao(this.gos)&&this.onFilterChanged()}onFilterChanged(e={}){let{source:t,additionalEventAttributes:i,columns:s=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):ie.resolve()).then(()=>{let o={source:t,type:"filterChanged",columns:s};i&&oe(o,i),this.eventSvc.dispatchEvent(o),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!ao(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,filterInstanceToSkip:e})}doesRowPassAggregateFilters(e){let{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doAggregateFiltersPass(t,e.filterInstanceToSkip))}doesRowPassFilter(e){let{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doColumnFiltersPass(t,e.filterInstanceToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterActive(e){return!!this.colFilter?.isFilterActive(e)}getOrCreateFilterWrapper(e){return this.colFilter?.getOrCreateFilterWrapper(e)??null}getDefaultFloatingFilter(e){return this.colFilter.getDefaultFloatingFilter(e)}createFilterParams(e,t){return this.colFilter.createFilterParams(e,t)}isFilterAllowed(e){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.isFilterAllowed(e)}getFloatingFilterCompDetails(e,t){return this.colFilter?.getFloatingFilterCompDetails(e,t)}getCurrentFloatingFilterParentModel(e){return this.colFilter?.getCurrentFloatingFilterParentModel(e)}destroyFilter(e,t="api"){this.colFilter?.destroyFilter(e,t)}areFilterCompsDifferent(e,t){return!!this.colFilter?.areFilterCompsDifferent(e,t)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){if(this.beans.dataTypeSvc?.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getColumnFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){F(68)}setupAdvFilterHeaderComp(e){this.advancedFilter?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){this.advFilterModelUpdateQueue.forEach(e=>this.setAdvFilterModel(e)),this.advFilterModelUpdateQueue=[]}getColumnFilterModel(e){return this.colFilter?.getColumnFilterModel(e)}setColumnFilterModel(e,t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setColumnFilterModel(e,t)??Promise.resolve()}setColDefPropertiesForDataType(e,t,i){this.colFilter?.setColDefPropertiesForDataType(e,t,i)}},c0=class extends y{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,i,s){e&&!e.isColumn||this.showPopup(e,o=>{this.popupSvc?.positionPopupUnderMouseEvent({column:e,type:i,mouseEvent:t,ePopup:o})},i,t.target,de(this.gos),s)}showMenuAfterButtonClick(e,t,i,s){if(e&&!e.isColumn)return;let o=-1,n="left",r=de(this.gos);!r&&this.gos.get("enableRtl")&&(o=1,n="right");let a=r?void 0:4*o,l=r?void 0:4;this.showPopup(e,d=>{this.popupSvc?.positionPopupByComponent({type:i,eventSource:t,ePopup:d,nudgeX:a,nudgeY:l,alignSide:n,keepWithinBounds:!0,position:"under",column:e})},i,t,r,s)}showPopup(e,t,i,s,o,n){let r=e?this.createBean(new uh(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!r?.hasFilter()||!e){z(57);return}let a=W({tag:"div",cls:`ag-menu${o?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:f=>this.trapFocusWithin(f,a)}),a.appendChild(r?.getGui());let l,d=()=>r?.afterGuiDetached(),c=Xd(this.gos)?s??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,u=f=>{Nn(e,!1,"contextMenu");let m=f instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),m&&s&&ye(s)&&Pa(s)?.focus({preventScroll:!0}),d(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,i,e),n?.()},h=this.getLocaleTextFunc(),g=o&&i!=="columnFilter"?h("ariaLabelColumnMenu","Column Menu"):h("ariaLabelColumnFilter","Column Filter"),p=this.popupSvc?.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:u,positionCallback:()=>t(a),anchorToElement:c,ariaLabel:g});p&&(this.hidePopup=l=p.hideFunc),r.afterInit().then(()=>{t(a),r.afterGuiAttached({container:i,hidePopup:l})}),Nn(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,i,e)}trapFocusWithin(e,t){e.key!==b.TAB||e.defaultPrevented||pt(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),dt(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,i){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:i??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},u0=class extends y{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t){if(!t)return;let i=e.getColDef(),{filterValueGetter:s}=i;return s?this.executeFilterValueGetter(s,t.data,e,t,i):this.beans.valueSvc.getValue(e,t)}executeFilterValueGetter(e,t,i,s,o){let{expressionSvc:n,valueSvc:r}=this.beans,a=I(this.gos,{data:t,node:s,column:i,colDef:o,getValue:r.getValueCallback.bind(r,s)});return typeof e=="function"?e(a):n?.evaluate(e,a)}},h0={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},g0=class extends V{constructor(){super(h0,[cs]),this.eFloatingFilterText=E}init(e){this.params=e;let t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`)}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){let i=t.getModelAsString(e);this.eFloatingFilterText.setValue(i)}})}refresh(e){this.init(e)}},Ll=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions||t,this.mapCustomOptions(),this.selectDefaultItem(e)}mapCustomOptions(){let{filterOptions:e}=this;e&&e.forEach(t=>{if(typeof t=="string")return;let i=[["displayKey"],["displayName"],["predicate","test"]],s=o=>o.some(n=>t[n]!=null)?!0:(F(72,{keys:o}),!1);if(!i.every(s)){this.filterOptions=e.filter(o=>o===t)||[];return}this.customFilterOptions[t.displayKey]=t})}selectDefaultItem(e){let{filterOptions:t}=this;if(e.defaultOption)this.defaultOption=e.defaultOption;else if(t.length>=1){let i=t[0];typeof i=="string"?this.defaultOption=i:i.displayKey?this.defaultOption=i.displayKey:F(73)}else F(74)}getCustomOption(e){return this.customFilterOptions[e]}};function oi(e,t,i){return i==null?e.splice(t):e.splice(t,i)}function ns(e){return e==null||typeof e=="string"&&e.trim().length===0}function p0(e){return e==="AND"||e==="OR"?e:"AND"}function f0(e,t,i){if(e==null)return;let{predicate:s}=e;if(s!=null&&!t.some(o=>o==null))return s(t,i)}function m0(e,t){let i=e.length;return i>t&&(e.splice(t),F(78),i=t),i}var Ol=class extends fh{constructor(){super(...arguments),this.eTypes=[],this.eJoinOperatorPanels=[],this.eJoinOperatorsAnd=[],this.eJoinOperatorsOr=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}getNumberOfInputs(e){let t=this.optionsFactory.getCustomOption(e);if(t){let{numberOfInputs:s}=t;return s??1}return e&&["empty","notBlank","blank"].indexOf(e)>=0?0:e==="inRange"?2:1}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged(!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,i)=>{let s=i===0?e:this.optionsFactory.defaultOption;t.setValue(s,!0)})}getModelFromUi(){let e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){let{eJoinOperatorsOr:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areModelsEqual(e,t){if(!e&&!t)return!0;if(!e&&t||e&&!t)return!1;let i=!e.operator,s=!t.operator;if(!i&&s||i&&!s)return!1;let n;if(i){let r=e,a=t;n=this.areSimpleModelsEqual(r,a)}else{let r=e,a=t;n=r.operator===a.operator&&gt(r.conditions,a.conditions,(l,d)=>this.areSimpleModelsEqual(l,d))}return n}shouldRefresh(e){let t=this.getModel(),i=t?t.conditions??[t]:null,s=e.filterOptions?.map(n=>typeof n=="string"?n:n.displayKey)??this.getDefaultFilterOptions();return!(!(!i||i.every(n=>s.find(r=>r===n.type)!==void 0))||typeof e.maxNumConditions=="number"&&i&&i.length>e.maxNumConditions)}refresh(e){return!this.shouldRefresh(e)||!super.refresh(e)?!1:(this.setParams(e),this.removeConditionsAndOperators(0),this.createOption(),this.setModel(this.getModel()),!0)}setModelIntoUi(e){if(e.operator){let i=e,s=i.conditions;s==null&&(s=[],F(77));let o=m0(s,this.maxNumConditions),n=this.getNumConditions();if(o<n)this.removeConditionsAndOperators(o);else if(o>n)for(let a=n;a<o;a++)this.createJoinOperatorPanel(),this.createOption();let r=i.operator==="OR";this.eJoinOperatorsAnd.forEach(a=>a.setValue(!r,!0)),this.eJoinOperatorsOr.forEach(a=>a.setValue(r,!0)),s.forEach((a,l)=>{this.eTypes[l].setValue(a.type,!0),this.setConditionIntoUi(a,l)})}else{let i=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(i.type,!0),this.setConditionIntoUi(i,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.onUiChanged(),ie.resolve()}doesFilterPass(e){let t=this.getModel();if(t==null)return!0;let{operator:i}=t,s=[];if(i){let n=t;s.push(...n.conditions??[])}else s.push(t);return s[i&&i==="OR"?"some":"every"](n=>this.individualConditionPasses(e,n))}setParams(e){super.setParams(e),this.setNumConditions(e),this.defaultJoinOperator=p0(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.optionsFactory=new Ll,this.optionsFactory.init(e,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators(),this.isReadOnly()&&this.eFilterBody.setAttribute("tabindex","-1")}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(F(79),t=1),this.maxNumConditions=t;let i=e.numAlwaysVisibleConditions??1;i<1&&(F(80),i=1),i>t&&(F(81),i=t),this.numAlwaysVisibleConditions=i}createOption(){let e=this.createManagedBean(new Xo);this.eTypes.push(e),e.addCss("ag-filter-select"),this.eFilterBody.appendChild(e.getGui());let t=this.createValueElement();this.eConditionBodies.push(t),this.eFilterBody.appendChild(t),this.putOptionsIntoDropdown(e),this.resetType(e);let i=this.getNumConditions()-1;this.forEachPositionInput(i,s=>this.resetInput(s)),this.addChangedListeners(e,i)}createJoinOperatorPanel(){let e=W({tag:"div",cls:"ag-filter-condition"});this.eJoinOperatorPanels.push(e);let t=this.createJoinOperator(this.eJoinOperatorsAnd,e,"and"),i=this.createJoinOperator(this.eJoinOperatorsOr,e,"or");this.eFilterBody.appendChild(e);let s=this.eJoinOperatorPanels.length-1,o=this.joinOperatorId++;this.resetJoinOperatorAnd(t,s,o),this.resetJoinOperatorOr(i,s,o),this.isReadOnly()||(t.onValueChange(this.listener),i.onValueChange(this.listener))}createJoinOperator(e,t,i){let s=this.createManagedBean(new Ug);e.push(s);let o="ag-filter-condition-operator";return s.addCss(o),s.addCss(`${o}-${i}`),t.appendChild(s.getGui()),s}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){let{filterListOptions:t}=this;t.forEach(i=>{e.addOption(i)}),e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){let{displayKey:t}=e,i=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:i?this.getLocaleTextFunc()(i.displayKey,i.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}getCssIdentifier(){return"simple-filter"}updateUiVisibility(){let e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let i=0;i<this.getNumConditions();i++)this.isConditionUiComplete(i)?e=i:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{let i=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<i){this.removeConditionsAndOperators(i+1);let s=e+1,o=i-s;o>0&&this.removeConditionsAndOperators(s,o),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((s,o)=>{let n=this.isConditionDisabled(o,e);s.setDisabled(n||this.filterListOptions.length<=1),o===1&&(ni(this.eJoinOperatorPanels[0],n),this.eJoinOperatorsAnd[0].setDisabled(n),this.eJoinOperatorsOr[0].setDisabled(n))}),this.eConditionBodies.forEach((s,o)=>{U(s,this.isConditionBodyVisible(o))});let i=(t??this.getJoinOperator())==="OR";this.eJoinOperatorsAnd.forEach(s=>{s.setValue(!i,!0)}),this.eJoinOperatorsOr.forEach(s=>{s.setValue(i,!0)}),this.forEachInput((s,o,n,r)=>{this.setElementDisplayed(s,o<r),this.setElementDisabled(s,this.isConditionDisabled(n,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;let{eTypes:i,eConditionBodies:s,eJoinOperatorPanels:o,eJoinOperatorsAnd:n,eJoinOperatorsOr:r}=this;this.removeComponents(i,e,t),this.removeElements(s,e,t),this.removeValueElements(e,t);let a=Math.max(e-1,0);this.removeElements(o,a,t),this.removeComponents(n,a,t),this.removeComponents(r,a,t)}removeElements(e,t,i){oi(e,t,i).forEach(o=>se(o))}removeComponents(e,t,i){oi(e,t,i).forEach(o=>{se(o.getGui()),this.destroyBean(o)})}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let{eFilterBody:t,eTypes:i}=this,s;if(!this.isReadOnly()){let o=this.getInputs(0)[0];o instanceof Xe&&this.isConditionBodyVisible(0)?s=o.getInputElement():s=i[0]?.getFocusableElement()}(s??t).focus({preventScroll:!0})}}afterGuiDetached(){super.afterGuiDetached();let e=this.getModel();this.resetUiToActiveModel(e);let t=-1,i=-1,s=!1,o=this.getJoinOperator();for(let r=this.getNumConditions()-1;r>=0;r--)if(this.isConditionUiComplete(r))t===-1&&(t=r,i=r);else{let a=r>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(r-1),l=r<t;(a||l)&&(this.removeConditionsAndOperators(r,1),s=!0,l&&i--)}let n=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),n=!0),this.shouldAddNewConditionAtEnd(i===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),n=!0),n&&this.updateConditionStatusesAndValues(i,o),s&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=i}getPlaceholderText(e,t){let i=this.translate(e);if(typeof this.filterPlaceholder=="function"){let s=this.eTypes[t].getValue(),o=this.translate(s);i=this.filterPlaceholder({filterOptionKey:s,filterOption:o,placeholder:i})}else typeof this.filterPlaceholder=="string"&&(i=this.filterPlaceholder);return i}resetPlaceholder(){let e=this.getLocaleTextFunc();this.forEachInput((t,i,s,o)=>{if(!(t instanceof Xe))return;let n=i===0&&o>1?"inRangeStart":i===0?"filterOoo":"inRangeEnd",r=i===0&&o>1?e("ariaFilterFromValue","Filter from value"):i===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(n,s)),t.setInputAriaLabel(r)})}setElementValue(e,t,i){e instanceof Xe&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){e instanceof V&&U(e.getGui(),t)}setElementDisabled(e,t){e instanceof V&&ni(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Xe&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,i)=>{this.forEachPositionTypeInput(i,t,e)})}forEachPositionInput(e,t){let i=this.getConditionType(e);this.forEachPositionTypeInput(e,i,t)}forEachPositionTypeInput(e,t,i){let s=this.getNumberOfInputs(t),o=this.getInputs(e);for(let n=0;n<o.length;n++){let r=o[n];r!=null&&i(r,n,e,s)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){let t=this.getConditionType(e);return this.getNumberOfInputs(t)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(i=>i==null))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){let e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){return this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinOperatorsAnd.forEach((t,i)=>this.resetJoinOperatorAnd(t,i,this.joinOperatorId+i)),this.eJoinOperatorsOr.forEach((t,i)=>this.resetJoinOperatorOr(t,i,this.joinOperatorId+i)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,e||this.onUiChanged(),ie.resolve()}resetType(e){let i=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(i).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,i){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),i)}resetJoinOperatorOr(e,t,i){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),i)}resetJoinOperator(e,t,i,s,o){this.updateJoinOperatorDisabled(e.setValue(i,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${o}`).setLabel(s),t)}updateJoinOperatorsDisabled(){let e=(t,i)=>this.updateJoinOperatorDisabled(t,i);this.eJoinOperatorsAnd.forEach(e),this.eJoinOperatorsOr.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){let i=this.mapValuesFromModel(e);this.forEachInput((s,o,n)=>{n===t&&this.setElementValue(s,i[o]!=null?i[o]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,i,s)=>{this.setElementValue(t,i===0&&s===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,i=>{this.attachElementOnChange(i,this.listener)}))}individualConditionPasses(e,t){let i=this.getCellValue(e.node),s=this.mapValuesFromModel(t),o=this.optionsFactory.getCustomOption(t.type),n=f0(o,s,i);return n??(i==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(s,i,t,e))}hasInvalidInputs(){return!1}},Hl=class extends Ol{setParams(e){super.setParams(e),this.scalarFilterParams=e}evaluateNullValue(e){let{includeBlanksInEquals:t,includeBlanksInNotEqual:i,includeBlanksInGreaterThan:s,includeBlanksInLessThan:o,includeBlanksInRange:n}=this.scalarFilterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(i)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(s)return!0;break;case"lessThan":case"lessThanOrEqual":if(o)return!0;break;case"inRange":if(n)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,i){let s=i.type;if(!this.isValid(t))return s==="notEqual"||s==="notBlank";let o=this.comparator(),n=e[0]!=null?o(e[0],t):0;switch(s){case"equals":return n===0;case"notEqual":return n!==0;case"greaterThan":return n>0;case"greaterThanOrEqual":return n>=0;case"lessThan":return n<0;case"lessThanOrEqual":return n<=0;case"inRange":{let r=o(e[1],t);return this.scalarFilterParams.inRangeInclusive?n>=0&&r<=0:n>0&&r<0}case"blank":return ns(t);case"notBlank":return!ns(t);default:return F(76,{filterModelType:s}),!0}}},Gl=class{constructor(e,t,i,s,o,n){this.alive=!0,this.context=e,this.eParent=o;let r=du(t,i,s);r&&r.newAgStackInstance().then(a=>{if(!this.alive){e.destroyBean(a);return}if(this.dateComp=a,!a)return;o.appendChild(a.getGui()),a?.afterGuiAttached?.();let{tempValue:l,disabled:d}=this;l&&a.setDate(l),d!=null&&a.setDisabled?.(d),n?.(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){let t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){let t=this.dateComp;t?t.setDisabled?.(e):this.disabled=e}setDisplayed(e){U(this.eParent,e)}setInputPlaceholder(e){this.dateComp?.setInputPlaceholder?.(e)}setInputAriaLabel(e){this.dateComp?.setInputAriaLabel?.(e)}afterGuiAttached(e){this.dateComp?.afterGuiAttached?.(e)}updateParams(e){this.dateComp?.refresh?.(e)}},Bl=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"],nn=class{constructor(e,t,i){this.getLocaleTextFunc=e,this.optionsFactory=t,this.valueFormatter=i}getModelAsString(e){if(!e)return null;let t=e.operator!=null,i=this.getLocaleTextFunc();if(t){let s=e,n=(s.conditions??[]).map(a=>this.getModelAsString(a)),r=s.operator==="AND"?"andCondition":"orCondition";return n.join(` ${i(r,Ba[r])} `)}else{if(e.type==="blank"||e.type==="notBlank")return i(e.type,e.type);{let s=e,o=this.optionsFactory.getCustomOption(s.type),{displayKey:n,displayName:r,numberOfInputs:a}=o||{};return n&&r&&a===0?(i(n,r),r):this.conditionToString(s,o)}}}updateParams(e){this.optionsFactory=e.optionsFactory}formatValue(e){let t=this.valueFormatter;return t?t(e??null)??"":String(e)}},Vl=class extends nn{constructor(e,t,i){super(t,i),this.dateFilterParams=e}conditionToString(e,t){let{type:i}=e,{numberOfInputs:s}=t||{},o=i=="inRange"||s===2,n=re(e.dateFrom),r=re(e.dateTo),a=this.dateFilterParams.inRangeFloatingFilterDateFormat;if(o){let l=n!==null?ii(n,a):"null",d=r!==null?ii(r,a):"null";return`${l}-${d}`}return n!=null?ii(n,a):`${i}`}updateParams(e){super.updateParams(e),this.dateFilterParams=e.dateFilterParams}},pr=1e3,fr=1/0,C0=class extends Hl{constructor(){super("dateFilter"),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=pr,this.maxValidYear=fr,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e)}mapValuesFromModel(e){let{dateFrom:t,dateTo:i,type:s}=e||{};return[t&&re(t)||null,i&&re(i)||null].slice(0,this.getNumberOfInputs(s))}comparator(){return this.dateFilterParams.comparator??v0}isValid(e){let t=this.dateFilterParams.isValidDate;return!t||t(e)}setParams(e){this.dateFilterParams=e,super.setParams(e);let t=(i,s)=>{if(e[i]!=null)if(isNaN(e[i]))F(82,{param:i});else return e[i]==null?s:Number(e[i]);return s};this.minValidYear=t("minValidYear",pr),this.maxValidYear=t("maxValidYear",fr),this.minValidYear>this.maxValidYear&&F(83),this.minValidDate=e.minValidDate?e.minValidDate instanceof Date?e.minValidDate:re(e.minValidDate):null,this.maxValidDate=e.maxValidDate?e.maxValidDate instanceof Date?e.maxValidDate:re(e.maxValidDate):null,this.minValidDate&&this.maxValidDate&&this.minValidDate>this.maxValidDate&&F(84),this.filterModelFormatter=new Vl(this.dateFilterParams,this.getLocaleTextFunc.bind(this),this.optionsFactory)}createDateCompWrapper(e){let{beans:{userCompFactory:t,context:i,gos:s},dateFilterParams:o}=this,n=new Gl(i,t,o.colDef,I(s,{onDateChanged:()=>this.onUiChanged(),filterParams:o,location:"filter"}),e);return this.addDestroyFunc(()=>n.destroy()),n}setElementValue(e,t){e.setDate(t)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}getDefaultFilterOptions(){return Bl}createValueElement(){let e=W({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,i,s){let o=W({tag:"div",cls:`ag-filter-${s} ag-filter-date-${s}`});t.push(o),e.appendChild(o),i.push(this.createDateCompWrapper(o))}removeValueElements(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),oi(this.eConditionPanelsFrom,e,t),oi(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,i){oi(e,t,i).forEach(o=>o.destroy())}isValidDateValue(e){if(e===null)return!1;let{minValidDate:t,maxValidDate:i,minValidYear:s,maxValidYear:o}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<s)return!1;if(i){if(e>i)return!1}else if(e.getUTCFullYear()>o)return!1;return!0}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachInput((i,s,o,n)=>{o!==e||!t||s>=n||(t=t&&this.isValidDateValue(i.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){let t=this.getConditionType(e),i={},s=this.getValues(e);return s.length>0&&(i.dateFrom=fe(s[0])),s.length>1&&(i.dateTo=fe(s[1])),R({dateFrom:null,dateTo:null,filterType:this.filterType,type:t},i)}resetPlaceholder(){let e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),i=e("ariaFilterValue","Filter Value");this.forEachInput(s=>{s.setInputPlaceholder(t),s.setInputAriaLabel(i)})}getInputs(e){let{dateConditionFromComps:t,dateConditionToComps:i}=this;return e>=t.length?[null,null]:[t[e],i[e]]}getValues(e){let t=[];return this.forEachPositionInput(e,(i,s,o,n)=>{s<n&&t.push(i.getDate())}),t}translate(e){return e==="lessThan"?super.translate("before"):e==="greaterThan"?super.translate("after"):super.translate(e)}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e)??""}};function v0(e,t){let i=t;return i<e?-1:i>e?1:0}var Nl=class extends V{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}let t=e.operator,i;t?i=e.conditions[0]:i=e,this.lastType=i.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;let i=e;return this.isTypeEditable(i.type)}init(e){this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){let i=new Ll;this.optionsFactory=i,i.init(e.filterParams,this.getDefaultOptions());let s=i.defaultOption;t||(this.lastType=s),this.readOnly=!!e.filterParams.readOnly;let o=this.isTypeEditable(s);this.setEditable(o)}refresh(e){this.setSimpleParams(e)}hasSingleInput(e){let t=this.optionsFactory.getCustomOption(e)?.numberOfInputs;return t==null||t==1}isTypeEditable(e){let t=["inRange","empty","blank","notBlank"];return!!e&&!this.readOnly&&this.hasSingleInput(e)&&t.indexOf(e)<0}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},w0={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eReadOnlyText"},{tag:"div",ref:"eDateWrapper",cls:"ag-date-floating-filter-wrapper"}]},S0=class extends Nl{constructor(){super(w0,[cs]),this.eReadOnlyText=E,this.eDateWrapper=E}getDefaultOptions(){return Bl}init(e){super.init(e),this.params=e,this.filterParams=e.filterParams,this.createDateComponent(),this.filterModelFormatter=new Vl(this.filterParams,this.getLocaleTextFunc.bind(this),this.optionsFactory);let t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}refresh(e){super.refresh(e),this.params=e,this.filterParams=e.filterParams,this.dateComp.updateParams(this.getDateComponentParams()),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory,dateFilterParams:this.filterParams}),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){let t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){let i=e?re(e.dateFrom):null;this.dateComp.setDate(i),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){U(this.eDateWrapper,e),U(this.eReadOnlyText.getGui(),!e)}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||(super.setLastTypeFromModel(e),this.updateCompOnModelChange(e))}onDateChanged(){let e=this.dateComp.getDate(),t=fe(e);this.params.parentFilterInstance(i=>{if(i){let s=re(t);i.onFloatingFilterChanged(this.lastType||null,s)}})}getDateComponentParams(){let{filterParams:e,column:t}=this.params,i=No(e,this.defaultDebounceMs);return I(this.gos,{onDateChanged:Q(this,this.onDateChanged.bind(this),i),filterParams:t.getColDef().filterParams,location:"floatingFilter"})}createDateComponent(){let{beans:{context:e,userCompFactory:t},eDateWrapper:i,params:s}=this;this.dateComp=new Gl(e,t,s.column.getColDef(),this.getDateComponentParams(),i,o=>{o.setInputAriaLabel(this.getAriaLabel(s))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},b0={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},y0=class extends V{constructor(){super(b0,[cs]),this.eDateInput=E,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);let t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}setParams(e){let t=this.eDateInput.getInputElement(),i=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=i&&ut(),t.type=i?"date":"text";let{minValidYear:s,maxValidYear:o,minValidDate:n,maxValidDate:r,buttons:a}=e.filterParams||{};if(n&&s&&F(85),r&&o&&F(86),n&&r){let[l,d]=[n,r].map(c=>c instanceof Date?c:re(c));l&&d&&l.getTime()>d.getTime()&&F(87)}n?n instanceof Date?t.min=ii(n):t.min=n:s&&(t.min=`${s}-01-01`),r?r instanceof Date?t.max=ii(r):t.max=r:o&&(t.max=`${o}-12-31`),this.isApply=e.location==="floatingFilter"&&!!a?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return re(this.eDateInput.getValue())}setDate(e){this.eDateInput.setValue(fe(e,!1))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){(!e||!e.suppressFocus)&&this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){return e?.filterParams?.browserDatePicker??!0}},zl=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"],Wl=class extends nn{conditionToString(e,t){let{numberOfInputs:i}=t||{},{filter:s,filterTo:o,type:n}=e,r=n=="inRange"||i===2,a=this.formatValue.bind(this);return r?`${a(s)}-${a(o)}`:s!=null?a(s):`${n}`}};function xo(e){let{allowedCharPattern:t}=e??{};return t??null}var R0=class extends Hl{constructor(){super("numberFilter"),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}refresh(e){return this.numberFilterParams.allowedCharPattern!==e.allowedCharPattern?!1:super.refresh(e)}mapValuesFromModel(e){let{filter:t,filterTo:i,type:s}=e||{};return[this.processValue(t),this.processValue(i)].slice(0,this.getNumberOfInputs(s))}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}setParams(e){this.numberFilterParams=e,super.setParams(e),this.filterModelFormatter=new Wl(this.getLocaleTextFunc.bind(this),this.optionsFactory,this.numberFilterParams.numberFormatter)}getDefaultFilterOptions(){return zl}setElementValue(e,t,i){let{numberFormatter:s}=this.numberFilterParams,o=!i&&s?s(t??null):t;super.setElementValue(e,o)}createValueElement(){let e=xo(this.numberFilterParams),t=W({tag:"div",cls:"ag-filter-body",role:"presentation"});return this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}createFromToElement(e,t,i,s){let o=this.createManagedBean(s?new ft({allowedCharPattern:s}):new Zo);o.addCss(`ag-filter-${i}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui())}removeValueElements(e,t){let i=s=>this.removeComponents(s,e,t);i(this.eValuesFrom),i(this.eValuesTo)}getValues(e){let t=[];return this.forEachPositionInput(e,(i,s,o,n)=>{s<n&&t.push(this.processValue(this.stringToFloat(i.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}processValue(e){return e==null||isNaN(e)?null:e}stringToFloat(e){if(typeof e=="number")return e;let t=ke(e);t!=null&&t.trim()===""&&(t=null);let i=this.numberFilterParams.numberParser;return i?i(t):t==null||t.trim()==="-"?null:parseFloat(t)}createCondition(e){let t=this.getConditionType(e),i={filterType:this.filterType,type:t},s=this.getValues(e);return s.length>0&&(i.filter=s[0]),s.length>1&&(i.filterTo=s[1]),i}getInputs(e){let{eValuesFrom:t,eValuesTo:i}=this;return e>=t.length?[null,null]:[t[e],i[e]]}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e)??""}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{if(!t.getInputElement().validity.valid){e=!0;return}}),e}},_l=class extends y{constructor(e){super(),this.params=e,this.eInput=E,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new ft(this.params?.config));let t=this.eInput.getGui();e.appendChild(t);let i=s=>this.onValueChanged(s);this.addManagedListeners(t,{input:i,keydown:i})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t}){let{eInput:i}=this;i.setInputAriaLabel(e),t!==void 0&&i.setAutoComplete(t)}};function Ul(e){let t=e?.trim();return t===""?e:t}var x0={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},$l=class extends Nl{constructor(){super(...arguments),this.eFloatingFilterInputContainer=E,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(x0)}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||(this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e)))}init(e){this.setupFloatingFilterInputService(e),super.init(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){this.params=e;let t=e.browserAutoComplete??!1,{inputSvc:i,defaultDebounceMs:s,readOnly:o}=this;if(i.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:t}),this.applyActive=ts(e.filterParams),!o){let n=No(e.filterParams,s),r=Q(this,this.syncUpWithParentFilter.bind(this),n);i.setValueChangedListener(r)}}refresh(e){super.refresh(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){let{inputSvc:t}=this,i=t.getValue();J(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(i,!0)}syncUpWithParentFilter(e){let t=e.key===b.ENTER;if(this.applyActive&&!t)return;let{inputSvc:i,params:s}=this,o=i.getValue();s.filterParams.trimInput&&(o=Ul(o),i.setValue(o,!0)),s.parentFilterInstance(n=>{n?.onFloatingFilterChanged(this.lastType||null,o||null)})}setEditable(e){this.inputSvc.setEditable(e)}},F0=class extends y{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new Zo),this.eTextInput=this.createManagedBean(new ft),this.eTextInput.setDisabled(!0);let t=this.eNumberInput.getGui(),i=this.eTextInput.getGui();e.appendChild(t),e.appendChild(i),this.setupListeners(t,s=>this.onValueChanged(s)),this.setupListeners(i,s=>this.onValueChanged(s))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams(e){this.setAriaLabel(e.ariaLabel),e.autoComplete!==void 0&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},E0=class extends $l{init(e){super.init(e),this.filterModelFormatter=new Wl(this.getLocaleTextFunc.bind(this),this.optionsFactory,e.filterParams?.numberFormatter)}refresh(e){xo(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultOptions(){return zl}createFloatingFilterInputService(e){return this.allowedCharPattern=xo(e.filterParams),this.allowedCharPattern?this.createManagedBean(new _l({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new F0)}},Kl=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],jl=class extends nn{conditionToString(e,t){let{numberOfInputs:i}=t||{},{filter:s,filterTo:o,type:n}=e;return n=="inRange"||i===2?`${s}-${o}`:s!=null?`${s}`:`${n}`}},P0=class extends Ol{constructor(){super("textFilter"),this.filterType="text",this.defaultFormatter=e=>e,this.defaultLowercaseFormatter=e=>e==null?null:e.toString().toLowerCase(),this.defaultMatcher=({filterOption:e,value:t,filterText:i})=>{if(i==null)return!1;switch(e){case"contains":return t.indexOf(i)>=0;case"notContains":return t.indexOf(i)<0;case"equals":return t===i;case"notEqual":return t!=i;case"startsWith":return t.indexOf(i)===0;case"endsWith":{let s=t.lastIndexOf(i);return s>=0&&s===t.length-i.length}default:return!1}},this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}setParams(e){this.textFilterParams=e,super.setParams(e),this.matcher=e.textMatcher||this.defaultMatcher,this.formatter=e.textFormatter||(e.caseSensitive?this.defaultFormatter:this.defaultLowercaseFormatter),this.filterModelFormatter=new jl(this.getLocaleTextFunc.bind(this),this.optionsFactory)}createCondition(e){let t=this.getConditionType(e),i={filterType:this.filterType,type:t},s=this.getValuesWithSideEffects(e,!0);return s.length>0&&(i.filter=s[0]),s.length>1&&(i.filterTo=s[1]),i}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){let{eValuesFrom:t,eValuesTo:i}=this;return e>=t.length?[null,null]:[t[e],i[e]]}getValues(e){return this.getValuesWithSideEffects(e,!1)}getValuesWithSideEffects(e,t){let i=[];return this.forEachPositionInput(e,(s,o,n,r)=>{if(o<r){let a=ke(s.getValue());t&&this.textFilterParams.trimInput&&(a=Ul(a)??null,s.setValue(a,!0)),i.push(a)}}),i}getDefaultFilterOptions(){return Kl}createValueElement(){let e=W({tag:"div",cls:"ag-filter-body",role:"presentation"});return this.createFromToElement(e,this.eValuesFrom,"from"),this.createFromToElement(e,this.eValuesTo,"to"),e}createFromToElement(e,t,i){let s=this.createManagedBean(new ft);s.addCss(`ag-filter-${i}`),s.addCss("ag-filter-filter"),t.push(s),e.appendChild(s.getGui())}removeValueElements(e,t){let i=s=>this.removeComponents(s,e,t);i(this.eValuesFrom),i(this.eValuesTo)}mapValuesFromModel(e){let{filter:t,filterTo:i,type:s}=e||{};return[t||null,i||null].slice(0,this.getNumberOfInputs(s))}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,i,s){let o=e.map(h=>this.formatter(h))||[],n=this.formatter(t),{api:r,colDef:a,column:l,context:d,textFormatter:c}=this.textFilterParams;if(i.type==="blank")return ns(t);if(i.type==="notBlank")return!ns(t);let u={api:r,colDef:a,column:l,context:d,node:s.node,data:s.data,filterOption:i.type,value:n,textFormatter:c};return o.some(h=>this.matcher(O(R({},u),{filterText:h})))}getModelAsString(e){return this.filterModelFormatter.getModelAsString(e)??""}},D0=class extends $l{init(e){super.init(e),this.filterModelFormatter=new jl(this.getLocaleTextFunc.bind(this),this.optionsFactory)}refresh(e){super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultOptions(){return Kl}createFloatingFilterInputService(){return this.createManagedBean(new _l)}};function M0(e){return!!e.quickFilter?.isFilterPresent()}function T0(e){return e.quickFilter?.getText()}function A0(e){e.quickFilter?.resetCache()}var k0=class extends y{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){let e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",i=>this.setFilter(i.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){let{autoColSvc:e,colModel:t,gos:i,pivotResultCols:s}=this.beans,o=t.isPivotMode(),n=e?.getColumns(),r=t.getColDefCols(),a=(o&&!i.get("applyQuickFilterBeforePivotOrAgg")?s?.getPivotResultCols()?.list:r)??[];n&&(a=a.concat(n)),this.colsToUse=i.get("includeHiddenColumnsInQuickFilter")?a:a.filter(l=>l.isVisible()||l.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){let t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(i=>t?this.doesRowPassCache(e,i):this.doesRowPassNoCache(e,i))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){let{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return P(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){F(70,{newFilter:e});return}let t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){let e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),i=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,i&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(i=>{let s=this.getTextForColumn(i,e);return P(s)&&s.indexOf(t)>=0})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.indexOf(t)>=0}doesRowPassMatcher(e,t){let i;e?(this.checkGenerateAggText(t),i=t.quickFilterAggregateText):i=this.getAggText(t);let{quickFilterParts:s,matcher:o}=this;return o(s,i)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let i=this.beans.filterValueSvc.getValue(e,t),s=e.getColDef();if(s.getQuickFilterText){let o=I(this.gos,{value:i,node:t,data:t.data,column:e,colDef:s});i=s.getQuickFilterText(o)}return P(i)?i.toString().toUpperCase():null}getAggText(e){let t=[];return this.colsToUse.forEach(i=>{let s=this.getTextForColumn(i,e);P(s)&&t.push(s)}),t.join(`
`)}},I0={moduleName:"ClientSideRowModelFilter",version:D,rowModels:["clientSide"],beans:[Ww]},rn={moduleName:"FilterCore",version:D,beans:[d0],apiFunctions:{isAnyFilterPresent:a0,onFilterChanged:l0},css:[Qw],dependsOn:[I0]},ql={moduleName:"FilterValue",version:D,beans:[u0]},ps={moduleName:"ColumnFilter",version:D,beans:[r0,c0],dynamicBeans:{headerFilterCellCtrl:_w},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:Zw,getColumnFilterInstance:Xw,destroyFilter:Jw,setFilterModel:e0,getFilterModel:t0,getColumnFilterModel:i0,setColumnFilterModel:s0,showColumnFilter:o0},dependsOn:[rn,gs,ql,Kw]},L0={moduleName:"CustomFilter",version:D,userComponents:{agReadOnlyFloatingFilter:g0},dependsOn:[ps]},O0={moduleName:"TextFilter",version:D,dependsOn:[ps],userComponents:{agTextColumnFilter:P0,agTextColumnFloatingFilter:D0}},H0={moduleName:"NumberFilter",version:D,dependsOn:[ps],userComponents:{agNumberColumnFilter:R0,agNumberColumnFloatingFilter:E0}},G0={moduleName:"DateFilter",version:D,dependsOn:[ps],userComponents:{agDateColumnFilter:C0,agDateInput:y0,agDateColumnFloatingFilter:S0}},B0={moduleName:"QuickFilterCore",version:D,rowModels:["clientSide"],beans:[k0],dependsOn:[rn,ql]},V0={moduleName:"QuickFilter",version:D,apiFunctions:{isQuickFilterPresent:M0,getQuickFilter:T0,resetQuickFilter:A0},dependsOn:[B0]},N0={moduleName:"ExternalFilter",version:D,dependsOn:[rn]},Qt=class{constructor(e){this.cellValueChanges=e}},Ys=class extends Qt{constructor(e,t,i,s){super(e),this.initialRange=t,this.finalRange=i,this.ranges=s}},z0=10,mr=class{constructor(e){this.actionStack=[],this.maxStackSize=e||z0,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},W0=class extends y{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.onCellValueChanged=e=>{let t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},i=this.activeCellEdit!==null&&ka(this.activeCellEdit,t),s=this.activeRowEdit!==null&&eh(this.activeRowEdit,t);if(!(i||s||this.isPasting||this.isRangeInAction))return;let{rowPinned:n,rowIndex:r,column:a,oldValue:l,value:d}=e,c={rowPinned:n,rowIndex:r,columnId:a.getColId(),newValue:d,oldValue:l};this.cellValueChanges.push(c)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){let{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;let i=e.get("undoRedoCellEditingLimit");if(i<=0)return;this.undoStack=new mr(i),this.redoStack=new mr(i),this.addListeners();let s=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:o=>{o.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:s,newColumnsLoaded:s,columnGroupOpened:s,columnRowGroupChanged:s,columnMoved:s,columnPinned:s,columnVisible:s,rowDragEnd:s}),t.whenReady(this,o=>{this.gridBodyCtrl=o.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){let{eventSvc:t,undoStack:i,redoStack:s}=this;t.dispatchEvent({type:"undoStarted",source:e});let o=this.undoRedo(i,s,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:o})}redo(e){let{eventSvc:t,undoStack:i,redoStack:s}=this;t.dispatchEvent({type:"redoStarted",source:e});let o=this.undoRedo(s,i,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:o})}undoRedo(e,t,i,s,o){if(!e)return!1;let n=e.pop();return!n||!n.cellValueChanges?!1:(this.processAction(n,r=>r[s],o),n instanceof Ys?this.processRange(n.ranges||[n[i]]):this.processCell(n.cellValueChanges),t.push(n),!0)}processAction(e,t,i){e.cellValueChanges.forEach(s=>{let{rowIndex:o,rowPinned:n,columnId:r}=s,a={rowIndex:o,rowPinned:n},l=Ji(this.beans,a);l.displayed&&l.setDataValue(r,t(s),i)})}processRange(e){let t,i=this.beans.rangeSvc;i.removeAllCellRanges(!0),e.forEach((s,o)=>{if(!s)return;let n=s.startRow,r=s.endRow;o===e.length-1&&(t={rowPinned:n.rowPinned,rowIndex:n.rowIndex,columnId:s.startColumn.getColId()},this.setLastFocusedCell(t));let a={rowStartIndex:n.rowIndex,rowStartPinned:n.rowPinned,rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnStart:s.startColumn,columns:s.columns};i.addCellRange(a)})}processCell(e){let t=e[0],{rowIndex:i,rowPinned:s}=t,o={rowIndex:i,rowPinned:s},n=Ji(this.beans,o),r={rowPinned:t.rowPinned,rowIndex:n.rowIndex,columnId:t.columnId};this.setLastFocusedCell(r)}setLastFocusedCell(e){let{rowIndex:t,columnId:i,rowPinned:s}=e,{colModel:o,focusSvc:n,rangeSvc:r}=this.beans,a=o.getCol(i);if(!a)return;let{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);let d={rowIndex:t,column:a,rowPinned:s};n.setFocusedCell(O(R({},d),{forceBrowserFocus:!0})),r?.setRangeToCell(d)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{let e=new Qt(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){let i=new Qt(this.cellValueChanges);this.pushActionsToUndoStack(i)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{let e=new Qt(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{let t=new Ys(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e,{rangeSvc:t,gos:i}=this.beans;t&&Oe(i)?e=new Ys(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new Qt(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1}})}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},_0=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}",U0={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},$0=class extends Vt{constructor(){super(U0,[Qo]),this.eCheckbox=E}init(e){this.params=e;let t=e.value??void 0,i=this.eCheckbox;i.setValue(t),i.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(i,{fieldValueChanged:o=>this.setAriaLabel(o.selected)})}getValue(){return this.eCheckbox.getValue()}focusIn(){this.eCheckbox.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){let t=this.getLocaleTextFunc(),i=Eo(t,e),s=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel(`${s} (${i})`)}},fs=class extends Vt{constructor(e){super({tag:"div",cls:"ag-cell-edit-wrapper",children:[e.getTemplate()]},e.getAgComponents()),this.cellEditorInput=e,this.eInput=E}init(e){this.params=e;let{cellStartedEdit:t,eventKey:i,suppressPreventDefault:s}=e,o=this.eInput;this.cellEditorInput.init(o,e);let n,r=!0;t?(this.focusAfterAttached=!0,i===b.BACKSPACE||i===b.DELETE?n="":i&&i.length===1?s?r=!1:n=i:(n=this.cellEditorInput.getStartValue(),i!==b.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,n=this.cellEditorInput.getStartValue()),r&&n!=null&&o.setStartValue(n),this.addManagedElementListeners(o.getGui(),{keydown:a=>{let{key:l}=a;(l===b.PAGE_UP||l===b.PAGE_DOWN)&&a.preventDefault()}})}afterGuiAttached(){let e=this.getLocaleTextFunc(),t=this.eInput;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;ut()||t.getFocusableElement().focus();let i=t.getInputElement();this.highlightAllOnFocus?i.select():this.cellEditorInput.setCaret?.()}focusIn(){let e=this.eInput,t=e.getFocusableElement(),i=e.getInputElement();t.focus(),i.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}},K0={tag:"ag-input-date-field",ref:"eInput",cls:"ag-cell-editor"},j0=class{getTemplate(){return K0}getAgComponents(){return[Xa]}init(e,t){this.eInput=e,this.params=t;let{min:i,max:s,step:o}=t;i!=null&&e.setMin(i),s!=null&&e.setMax(s),o!=null&&e.setStep(o)}getValue(){let{eInput:e,params:t}=this,i=e.getDate();return!P(i)&&!P(t.value)?t.value:i??null}getStartValue(){let{value:e}=this.params;if(e instanceof Date)return fe(e,!1)}},q0=class extends fs{constructor(){super(new j0)}},Y0={tag:"ag-input-date-field",ref:"eInput",cls:"ag-cell-editor"},Q0=class{constructor(e){this.getDataTypeService=e}getTemplate(){return Y0}getAgComponents(){return[Xa]}init(e,t){this.eInput=e,this.params=t;let{min:i,max:s,step:o}=t;i!=null&&e.setMin(i),s!=null&&e.setMax(s),o!=null&&e.setStep(o)}getValue(){let{params:e,eInput:t}=this,i=this.formatDate(t.getDate());return!P(i)&&!P(e.value)?e.value:e.parseValue(i??"")}getStartValue(){return fe(this.parseDate(this.params.value??void 0)??null,!1)}parseDate(e){let t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):re(e)??void 0}formatDate(e){let t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):fe(e??null,!1)??void 0}},Z0=class extends fs{constructor(){super(new Q0(()=>this.beans.dataTypeSvc))}},X0={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eTextArea",cls:"ag-large-text-input"}]},J0=class extends Vt{constructor(){super(X0,[Kg]),this.eTextArea=E}init(e){this.params=e,this.focusAfterAttached=e.cellStartedEdit,this.eTextArea.setMaxLength(e.maxLength||200).setCols(e.cols||60).setRows(e.rows||10),e.value!=null&&this.eTextArea.setValue(e.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}onKeyDown(e){let t=e.key;(t===b.LEFT||t===b.UP||t===b.RIGHT||t===b.DOWN||e.shiftKey&&t===b.ENTER)&&e.stopPropagation()}afterGuiAttached(){let e=this.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(e("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus()}getValue(){let e=this.eTextArea.getValue(),t=this.params;return!P(e)&&!P(t.value)?t.value:t.parseValue(e)}},eS={tag:"ag-input-number-field",ref:"eInput",cls:"ag-cell-editor"},tS=class{getTemplate(){return eS}getAgComponents(){return[jg]}init(e,t){this.eInput=e,this.params=t;let{max:i,min:s,precision:o,step:n}=t;i!=null&&e.setMax(i),s!=null&&e.setMin(s),o!=null&&e.setPrecision(o),n!=null&&e.setStep(n);let r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}preventStepping(e){(e.key===b.UP||e.key===b.DOWN)&&e.preventDefault()}getValue(){let{eInput:e,params:t}=this,i=e.getValue();if(!P(i)&&!P(t.value))return t.value;let s=t.parseValue(i);if(s==null)return s;if(typeof s=="string"){if(s==="")return null;s=Number(s)}return isNaN(s)?null:s}getStartValue(){return this.params.value}setCaret(){ut()&&this.eInput.getInputElement().focus({preventScroll:!0})}},iS=class extends fs{constructor(){super(new tS)}},sS={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eSelect",cls:"ag-cell-editor"}]},oS=class extends Vt{constructor(){super(sS,[op]),this.eSelect=E,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}init(e){this.focusAfterAttached=e.cellStartedEdit;let{eSelect:t,valueSvc:i,gos:s}=this,{values:o,value:n,eventKey:r}=e;if(_(o)){F(58);return}this.startedByEnter=r!=null?r===b.ENTER:!1;let a=!1;o.forEach(u=>{let h={value:u},g=i.formatValue(e.column,null,u),p=g!=null;h.text=p?g:u,t.addOption(h),a=a||n===u}),a?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);let{valueListGap:l,valueListMaxWidth:d,valueListMaxHeight:c}=e;l!=null&&t.setPickerGap(l),c!=null&&t.setPickerMaxHeight(c),d!=null&&t.setPickerMaxWidth(d),s.get("editType")!=="fullRow"&&this.addManagedListeners(this.eSelect,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eSelect.showPicker()})}focusIn(){this.eSelect.getFocusableElement().focus()}getValue(){return this.eSelect.getValue()}isPopup(){return!1}},nS={tag:"ag-input-text-field",ref:"eInput",cls:"ag-cell-editor"},rS=class{getTemplate(){return nS}getAgComponents(){return[cs]}init(e,t){this.eInput=e,this.params=t;let i=t.maxLength;i!=null&&e.setMaxLength(i)}getValue(){let{eInput:e,params:t}=this,i=e.getValue();return!P(i)&&!P(t.value)?t.value:t.parseValue(i)}getStartValue(){let e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){let e=this.eInput,t=e.getValue(),i=P(t)&&t.length||0;i&&e.getInputElement().setSelectionRange(i,i)}},Cr=class extends fs{constructor(){super(new rS)}};function aS(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function lS(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function Yl(e,t,i="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,i),"ensureVisible")}function Ql(e,t,i){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,i),"ensureVisible")}function dS(e,t,i=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,i),"ensureVisible")}function cS(e){e.undoRedo?.undo("api")}function uS(e){e.undoRedo?.redo("api")}function hS(e,t={}){let i=[];return e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(s=>{let o=s.comp?.getCellEditor();o&&i.push(ui(o))}),i}function gS(e){let t=[];return e.rowRenderer.getAllCellCtrls().forEach(i=>{if(i.editing){let{cellPosition:s}=i;t.push(s)}}),t}function pS(e,t=!1){e.editSvc?.stopAllEditing(t)}function fS(e,t){let i=e.colModel.getCol(t.colKey);if(!i){F(12,{colKey:t.colKey});return}let s={rowIndex:t.rowIndex,rowPinned:t.rowPinned||null,column:i};t.rowPinned==null&&Ql(e,t.rowIndex),Yl(e,t.colKey);let n=wt(e,s);if(!n)return;let{focusSvc:r,gos:a,editSvc:l}=e,d=()=>{let u=$(e),h=n.eGui;return u!==h&&!!h?.contains(u)},c=a.get("stopEditingWhenCellsLoseFocus")&&d();(c||!r.isCellFocused(s))&&r.setFocusedCell(O(R({},s),{forceBrowserFocus:c,preventScrollOnBrowserFocus:!0})),l?.startRowOrCellEdit(n,t.key)}function mS(e){return e.undoRedo?.getCurrentUndoStackSize()??0}function CS(e){return e.undoRedo?.getCurrentRedoStackSize()??0}var vS={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},wS=class extends Vt{constructor(e){super(vS),this.params=e}postConstruct(){at(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){let e=this.getGui(),t=this.params,i=s=>{po(this.gos,s,t.node,t.column,!0)||t.onKeyDown(s)};this.addManagedElementListeners(e,{keydown:i})}},SS=class extends y{constructor(){super(...arguments),this.beanName="editSvc"}startEditing(e,t=null,i=!1,s=null){if(!e.isCellEditable()||e.editing)return!1;if(!e.comp)return e.onCompAttachedFuncs.push(()=>{this.startEditing(e,t,i,s)}),!0;let o=this.createCellEditorParams(e,t,i),n=e.column.getColDef(),r=kn(this.beans.userCompFactory,n,o),a=r?.popupFromSelector!=null?r.popupFromSelector:!!n.cellEditorPopup,l=r?.popupPositionFromSelector!=null?r.popupPositionFromSelector:n.cellEditorPopupPosition;return vr(e,!0,r),e.comp.setEditDetails(r,a,l,this.gos.get("reactiveCustomComponents")),this.eventSvc.dispatchEvent(e.createEvent(s,"cellEditingStarted")),!r?.params?.suppressPreventDefault}stopEditing(e,t=!1){if(e.onEditorAttachedFuncs=[],!e.editing)return!1;let{comp:i,column:s,rowNode:o}=e,{newValue:n,newValueExists:r}=bS(t,i),a=this.beans.valueSvc.getValueForDisplay(s,o).value,l=!1;return r&&(l=yS(e,a,n,o,s)),vr(e,!1,void 0),i.setEditDetails(),e.updateAndFormatValue(!1),e.refreshCell({forceRefresh:!0,suppressFlash:!0}),this.eventSvc.dispatchEvent(O(R({},e.createEvent(null,"cellEditingStopped")),{oldValue:a,newValue:n,valueChanged:l})),l}handleColDefChanged(e){let t=e.comp?.getCellEditor();if(t?.refresh){let{eventKey:i,cellStartedEdit:s}=e.editCompDetails.params,o=this.createCellEditorParams(e,i,s),n=e.column.getColDef(),r=kn(this.beans.userCompFactory,n,o);t.refresh(r.params)}}setFocusOutOnEditor(e){if(!e.editing)return;let t=e.comp.getCellEditor();t&&t.focusOut&&t.focusOut()}setFocusInOnEditor(e){if(!e.editing)return;let t=e.comp,i=t.getCellEditor();i?.focusIn?i.focusIn():(e.focusCell(!0),e.onEditorAttachedFuncs.push(()=>t.getCellEditor()?.focusIn?.()))}createPopupEditorWrapper(e){return new wS(e)}stopAllEditing(e=!1){this.beans.rowRenderer.getAllRowCtrls().forEach(t=>this.stopRowEditing(t,e))}stopRowEditing(e,t=!1){if(e.stoppingRowEdit)return;let i=e.getAllCellCtrls(),s=e.editing;e.stoppingRowEdit=!0;let o=!1;for(let n of i){let r=n.stopEditing(t);s&&!t&&!o&&r&&(o=!0)}o&&this.eventSvc.dispatchEvent(e.createRowEvent("rowValueChanged")),s&&this.beans.rowEditSvc?.setEditing(e,!1),e.stoppingRowEdit=!1}addStopEditingWhenGridLosesFocus(e){if(!this.gos.get("stopEditingWhenCellsLoseFocus"))return;let t=i=>{let s=i.relatedTarget;if(io(s)===null){this.stopAllEditing();return}let o=e.some(n=>n.contains(s))&&Aa(this.gos,s);if(!o){let n=this.beans.popupSvc;o=!!n&&(n.getActivePopups().some(r=>r.contains(s))||n.isElementWithinCustomPopup(s))}o||this.stopAllEditing()};e.forEach(i=>this.addManagedElementListeners(i,{focusout:t}))}setInlineEditingCss(e){let t=e.editing||e.getAllCellCtrls().some(i=>i.editing);e.forEachGui(void 0,i=>{i.rowComp.toggleCss("ag-row-inline-editing",t),i.rowComp.toggleCss("ag-row-not-inline-editing",!t)})}isCellEditable(e,t){if(t.group){if(this.gos.get("treeData")){if(!t.data&&!this.gos.get("enableGroupEdit"))return!1}else if(!this.gos.get("enableGroupEdit"))return!1}return e.isColumnFunc(t,e.colDef.editable)}startRowOrCellEdit(e,t,i=null){return e.comp?this.gos.get("editType")==="fullRow"?this.beans.rowEditSvc?.startEditing(e.rowCtrl,t,e)??!1:this.startEditing(e,t,!0,i):(e.onCompAttachedFuncs.push(()=>{this.startRowOrCellEdit(e,t,i)}),!0)}stopRowOrCellEdit(e,t=!1,i=!1,s=!1){this.gos.get("editType")==="fullRow"?this.stopRowEditing(e.rowCtrl,t):this.stopEditing(e,t),i||this.navigateAfterEdit(s,e.cellPosition)}createCellEditorParams(e,t,i){let{column:s,rowNode:o,cellPosition:{rowIndex:n}}=e,{valueSvc:r,gos:a}=this.beans;return I(a,{value:r.getValueForDisplay(s,o).value,eventKey:t,column:s,colDef:s.getColDef(),rowIndex:n,node:o,data:o.data,cellStartedEdit:i,onKeyDown:e.onKeyDown.bind(e),stopEditing:this.stopRowOrCellEdit.bind(this,e,!1),eGridCell:e.eGui,parseValue:l=>r.parseValue(s,o,l,e.value),formatValue:e.formatValue.bind(e)})}navigateAfterEdit(e,t){if(this.gos.get("enterNavigatesVerticallyAfterEdit")){let s=e?b.UP:b.DOWN;this.beans.navigation?.navigateToNextCell(null,s,t,!1)}}};function vr(e,t,i){e.editCompDetails=i,e.editing!==t&&(e.editing=t)}function bS(e,t){let i={newValueExists:!1};if(e)return i;let s=t.getCellEditor();return!s||s.isCancelAfterEnd&&s.isCancelAfterEnd()?i:{newValue:s.getValue(),newValueExists:!0}}function yS(e,t,i,s,o){if(i===t)return!1;e.suppressRefreshCell=!0;let n=s.setDataValue(o,i,"edit");return e.suppressRefreshCell=!1,n}var RS=class extends y{constructor(){super(...arguments),this.beanName="rowEditSvc"}startEditing(e,t=null,i=null,s=null){if(e.editing)return!1;let o=!0,n=!1,{editSvc:r}=this.beans;return e.getAllCellCtrls().forEach(a=>{let l=a===i;l?o=r?.startEditing(a,t,l,s)??!1:r?.startEditing(a,null,l,s),n||(n=a.editing)}),n&&this.setEditing(e,!0),o}setEditing(e,t){e.editing=t,e.forEachGui(void 0,s=>s.rowComp.toggleCss("ag-row-editing",t));let i=t?e.createRowEvent("rowEditingStarted"):e.createRowEvent("rowEditingStopped");this.eventSvc.dispatchEvent(i)}},Ye={moduleName:"EditCore",version:D,beans:[SS,RS],apiFunctions:{getCellEditorInstances:hS,getEditingCells:gS,stopEditing:pS,startEditingCell:fS},dependsOn:[gs],css:[_0]},xS={moduleName:"UndoRedoEdit",version:D,beans:[W0],apiFunctions:{undoCellEditing:cS,redoCellEditing:uS,getCurrentUndoSize:mS,getCurrentRedoSize:CS},dependsOn:[Ye]},FS={moduleName:"TextEditor",version:D,userComponents:{agCellEditor:Cr,agTextCellEditor:Cr},dependsOn:[Ye]},ES={moduleName:"NumberEditor",version:D,userComponents:{agNumberCellEditor:{classImp:iS,params:{suppressPreventDefault:!0}}},dependsOn:[Ye]},PS={moduleName:"DateEditor",version:D,userComponents:{agDateCellEditor:q0,agDateStringCellEditor:Z0},dependsOn:[Ye]},DS={moduleName:"CheckboxEditor",version:D,userComponents:{agCheckboxCellEditor:$0},dependsOn:[Ye]},MS={moduleName:"SelectEditor",version:D,userComponents:{agSelectCellEditor:oS},dependsOn:[Ye]},TS={moduleName:"LargeTextEditor",version:D,userComponents:{agLargeTextCellEditor:J0},dependsOn:[Ye]},AS={moduleName:"CustomEditor",version:D,dependsOn:[Ye]},kS=class extends y{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,Et(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){let t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),fc(e))}createColumns(e,t){let i=()=>{Ki(this.beans,this.columns?.tree),this.columns=null},s=e.treeDepth,n=(this.columns?.treeDepth??-1)==s,r=this.generateSelectionCols();if(pc(r,this.columns?.list??[])&&n)return;i();let{colGroupSvc:l}=this.beans,d=l?.findDepth(e.tree)??0,c=l?.balanceTreeForAutoCols(r,d)??[];this.columns={list:r,tree:c,treeDepth:d,map:{}},t(h=>{if(!h)return null;let g=h.filter(p=>!Gt(p));return[...r,...g]})}updateColumns(e){let t=Et(e.source);this.columns?.list.forEach(i=>{let s=this.createSelectionColDef(e.currentValue);i.setColDef(s,null,t),be(this.beans,{state:[O(R({},s),{colId:i.getColId()})]},t)})}getColumn(e){return this.columns?.list.find(t=>ca(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){let{gos:e,beans:t}=this,i=e.get("rowSelection");if(typeof i!="object"||!tt(e))return!1;let s=(t.autoColSvc?.getColumns()?.length??0)>0;if(i.checkboxLocation==="autoGroupColumn"&&s)return!1;let o=!!Ft(i),n=Ai(i);return o||n}createSelectionColDef(e){let{gos:t}=this.beans,i=e??t.get("selectionColumnDef"),s=t.get("enableRtl"),a=i??{},{rowSpan:o,spanRows:n}=a,r=vs(a,["rowSpan","spanRows"]);return O(R({width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:s?"right":"left",comparator(l,d,c,u){let h=c.isSelected(),g=u.isSelected();return h===g?0:h?1:-1},editable:!1,suppressFillHandle:!0,pinned:null},r),{colId:aa,chartDataType:"excluded"})}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];let e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);let i=new as(e,null,t,!1);return this.createBean(i),[i]}onSelectionOptionsChanged(e,t,i){let s=t&&typeof t!="string"?Ft(t):void 0,o=e&&typeof e!="string"?Ft(e):void 0,n=s!==o,r=t&&typeof t!="string"?Ai(t):void 0,a=e&&typeof e!="string"?Ai(e):void 0,l=r!==a,d=_i(e),c=_i(t);(n||l||d!==c)&&this.beans.colModel.refreshAll(i)}destroy(){Ki(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e,t,i){if(!this.columns?.list.length)return;let s=e.length+t.length+i.length;if(s===0)return;let o=this.columns.list[0];if(!o.isVisible())return;let n=()=>{let l;switch(o.pinned){case"left":case!0:l=e;break;case"right":l=i;break;default:l=t}l&&me(l,o)};(this.beans.rowNumbersSvc?.getColumn(la)?2:1)===s&&n()}};function IS(e,t){if(!t.nodes.every(r=>r.rowPinned&&!vi(r)?(F(59),!1):r.id===void 0?(F(60),!1):!0))return;let{nodes:s,source:o,newValue:n}=t;e.selectionSvc?.setNodesSelected({nodes:s,source:o??"api",newValue:n})}function LS(e,t,i="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:i,selectAll:t})}function OS(e,t,i="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:i,selectAll:t})}function HS(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function GS(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function BS(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function VS(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function NS(e){return e.selectionSvc?.getSelectedNodes()??[]}function zS(e){return e.selectionSvc?.getSelectedRows()??[]}var WS=class extends _g{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();let{gos:e}=this;this.mode=Ui(e),this.groupSelectsDescendants=ci(e),this.groupSelectsFiltered=$i(e)==="filteredDescendants",this.masterSelectsDetail=Fn(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{let t=ci(e),i=Ui(e),s=$i(e)==="filteredDescendants";this.masterSelectsDetail=Fn(e)==="detail",(t!==this.groupSelectsDescendants||s!==this.groupSelectsFiltered||i!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=s,this.mode=i)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,i){if(this.isRowSelectionBlocked(t))return 0;let s=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,i);return s==null?0:(this.selectionCtx.selectAll=!1,"select"in s?(s.reset?this.resetNodes():this.selectRange(s.deselect,!1,i),this.selectRange(s.select,!0,i)):this.setNodesSelected({nodes:[s.node],newValue:s.newValue,clearSelection:s.clearSelection,keepDescendants:s.keepDescendants,event:e,source:i}))}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:i,nodes:s,event:o,source:n,keepDescendants:r=!1}){if(!tt(this.gos)&&e)return F(132),0;if(s.length===0)return 0;if(s.length>1&&!this.isMultiSelect())return F(130),0;let a=0;for(let l=0;l<s.length;l++){let d=s[l],c=vt(d),u=this.groupSelectsFiltered&&c.group;if(c.rowPinned&&!vi(c)){F(59);continue}if(c.id===void 0){F(60);continue}u||this.selectRowNode(c,e,o,n)&&(this.detailSelection.delete(c.id),a++),this.groupSelectsDescendants&&c.childrenAfterGroup?.length&&(a+=this.selectChildren(c,e,n))}return i||(s.length===1&&n==="api"&&this.selectionCtx.setRoot(vt(s[0])),e&&(t||!this.isMultiSelect())&&(a+=this.clearOtherNodes(vt(s[0]),r,n)),a>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n))),a}selectRange(e,t,i){let s=0;return e.forEach(o=>{let n=vt(o);if(n.group&&this.groupSelectsDescendants)return;this.selectRowNode(n,t,void 0,i)&&s++}),s>0&&(this.updateGroupsFromChildrenSelections(i),this.dispatchSelectionChanged(i)),s}selectChildren(e,t,i){let s=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return s?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:i,nodes:s}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){let e=[];return this.selectedNodes.forEach(t=>e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){let t=new Map;this.selectedNodes.forEach((i,s)=>{e(i)&&t.set(s,i)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;let{gos:i,rowModel:s}=this.beans;if(!Y(i,s))return!1;let o=s.rootNode;if(!o)return!1;t||(t=new pi(!0,o),t.active=!1);let n=!1;return t.forEachChangedNodeDepthFirst(r=>{if(r!==o){let a=this.calculateSelectedFromChildren(r);n=this.selectRowNode(r,a===null?!1:a,void 0,e)||n}}),n}clearOtherNodes(e,t,i){let s=new Map,o=0;return this.selectedNodes.forEach(n=>{let r=n.id==e.id;if((t?!US(e,n):!0)&&!r){let l=this.selectedNodes.get(n.id);o+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:i}),this.groupSelectsDescendants&&n.parent&&s.set(n.parent.id,n.parent)}}),s.forEach(n=>{let r=this.calculateSelectedFromChildren(n);this.selectRowNode(n,r===null?!1:r,void 0,i)}),o}onRowSelected(e){let t=e.node;this.groupSelectsDescendants&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}createDaemonNode(e){if(!e.id)return;let t=new ct(this.beans);return t.id=e.id,t.data=e.data,t.__daemon=!0,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){t&&e.id!==t.id&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){let t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){let{gos:e,rowModel:t}=this.beans;if(!Y(e,t))return;let i=t.getTopLevelNodes();if(i===null)return;let s=[];function o(n){for(let r=0,a=n.length;r<a;r++){let l=n[r];l.isSelected()?s.push(l):l.group&&l.childrenAfterGroup&&o(l.childrenAfterGroup)}}return o(i),s}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){let i=Y(this.gos),s=!1,o=n=>{let r=this.selectRowNode(vt(n),!1,void 0,e);s||(s=r)};if(t==="currentPage"||t==="filtered"){if(!i){z(102);return}this.getNodesToSelect(t).forEach(o)}else this.selectedNodes.forEach(o),this.reset(e);if(this.selectionCtx.selectAll=!1,i&&this.groupSelectsDescendants){let n=this.updateGroupsFromChildrenSelections(e);s||(s=n)}s&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,i=0;return this.getNodesToSelect(e).forEach(s=>{this.groupSelectsDescendants&&s.group||(s.isSelected()?t++:s.selectable&&i++)}),{selectedCount:t,notSelectedCount:i}}getSelectAllState(e){let{selectedCount:t,notSelectedCount:i}=this.getSelectedCounts(e);return Zl(t,i)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];let t=[],i=o=>t.push(o);if(e==="currentPage")return this.forEachNodeOnPage(o=>{if(!o.group){i(o);return}if(!o.expanded&&!o.footer){let n=r=>{i(r),r.childrenAfterFilter?.forEach(n)};n(o);return}this.groupSelectsDescendants||i(o)}),t;let s=this.beans.rowModel;return e==="filtered"?(s.forEachNodeAfterFilter(i),t):(s.forEachNode(i),t)}forEachNodeOnPage(e){let{pageBounds:t,rowModel:i}=this.beans,s=t.getFirstRow(),o=t.getLastRow();for(let n=s;n<=o;n++){let r=i.getRow(n);r&&e(r)}}selectAllRowNodes(e){let{gos:t,selectionCtx:i}=this;if(!tt(t)){F(132);return}if(qd(t)&&!di(t)){F(130);return}if(!this.canSelectAll())return;let{source:s,selectAll:o}=e,n=!1;if(this.getNodesToSelect(o).forEach(r=>{let a=this.selectRowNode(vt(r),!0,void 0,s);n||(n=a)}),i.selectAll=!0,Y(t)&&this.groupSelectsDescendants){let r=this.updateGroupsFromChildrenSelections(s);n||(n=r)}n&&this.dispatchSelectionChanged(s)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t){if(!Array.isArray(e)){z(103);return}let i=new Set(e),s=[];this.beans.rowModel.forEachNode(o=>{i.has(o.id)&&s.push(o)}),this.setNodesSelected({newValue:!0,nodes:s,source:t})}canSelectAll(){let{gos:e}=this.beans;return!!Y(e)}updateSelectable(e){let{gos:t,rowModel:i}=this.beans;if(!tt(t))return;let s="selectableChanged",o=e!==void 0,n=Y(t)&&this.groupSelectsDescendants,r=[],a=l=>{if(o&&!l.group)return;if(n&&l.group){let c=l.childrenAfterGroup?.some(u=>u.selectable)??!1;this.setRowSelectable(l,c,!0);return}!this.updateRowSelectable(l,!0)&&l.isSelected()&&r.push(l)};if(n){if(e===void 0){let l=i.rootNode;e=l?new pi(!1,l):void 0}e?.forEachChangedNodeDepthFirst(a,!o,!o)}else i.forEachNode(a);r.length&&this.setNodesSelected({nodes:r,newValue:!1,source:s}),!o&&n&&this.updateGroupsFromChildrenSelections?.(s)}updateSelectableAfterGrouping(e){this.updateSelectable(e),this.groupSelectsDescendants&&this.updateGroupsFromChildrenSelections?.("rowGroupChanged",e)&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail)return;let i=e.detailNode?.detailGridInfo?.api;if(!i)return;let s=_S(i);if(e.isSelected()!==s&&this.selectRowNode(e,s,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!s){let n=this.detailSelection.get(e.id)??new Set;for(let r of i.getSelectedNodes())n.add(r.id);this.detailSelection.set(e.id,n)}}setDetailSelectionState(e,t,i){if(this.masterSelectsDetail){if(!di(t)){F(269);return}switch(e.isSelected()){case!0:{i.selectAll();break}case!1:{i.deselectAll();break}case void 0:{let s=this.detailSelection.get(e.id);if(s){let o=[];for(let n of s){let r=i.getRowNode(n);r&&o.push(r)}i.setNodesSelected({nodes:o,newValue:!0,source:"masterDetail"})}break}default:break}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function vt(e){return vi(e)?e.pinnedSibling:e.footer?e.sibling:e}function _S(e){let t=0,i=0;return e.forEachNode(s=>{s.isSelected()?t++:s.selectable&&i++}),Zl(t,i)}function Zl(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function US(e,t){let i=t.parent;for(;i;){if(i===e)return!0;i=i.parent}return!1}var $S={moduleName:"SharedRowSelection",version:D,beans:[kS],apiFunctions:{setNodesSelected:IS,selectAll:LS,deselectAll:OS,selectAllFiltered:HS,deselectAllFiltered:GS,selectAllOnCurrentPage:BS,deselectAllOnCurrentPage:VS,getSelectedNodes:NS,getSelectedRows:zS}},KS={moduleName:"RowSelection",version:D,rowModels:["clientSide","infinite","viewport"],beans:[WS],dependsOn:[$S]};function jS(e){e.expansionSvc?.expandAll(!0)}function qS(e){e.expansionSvc?.expandAll(!1)}function YS(e){let t=Te(e),i=Al(e);t?t.onRowHeightChanged():i&&i.onRowHeightChanged()}function QS(e,t,i){let s=Al(e);if(s){if(e.rowGroupColsSvc?.columns.length===0){if(t<0){z(238);return}s.setRowCount(t,i);return}z(28);return}let o=hs(e);if(o){o.setRowCount(t,i);return}}function ZS(e){return Ot(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}}function XS(e){return e.rowModel.isLastRowIndexKnown()}var JS={moduleName:"CsrmSsrmSharedApi",version:D,apiFunctions:{expandAll:jS,collapseAll:qS,onRowHeightChanged:YS}},eb={moduleName:"SsrmInfiniteSharedApi",version:D,apiFunctions:{setRowCount:QS,getCacheBlockState:ZS,isLastRowIndexKnown:XS}},tb=class extends y{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[],t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(s=>{if(!s){z(18),t||z(20);return}if(this.isGridApi(s))return s;let o=s;return"current"in o?o.current?.api:(o.api||z(19),o.api)}).filter(s=>!!s&&!s.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){let e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){this.consuming||this.getAlignedGridApis().forEach(t=>{t.isDestroyed()||t.dispatchEvent(e)})}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){let i=[];return e.columns?e.columns.forEach(s=>{i.push(t(s))}):e.column&&i.push(t(e.column)),i}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":F(21);break}})}processGroupOpenedEvent(e){let{colGroupSvc:t}=this.beans;t&&e.columnGroups.forEach(i=>{let s=null;i&&(s=t.getProvidedColGroup(i.getGroupId())),!(i&&!s)&&t.setColumnGroupOpened(s,i.isExpanded(),"alignedGridChanged")})}processColumnEvent(e){let t=e.column,i=null,s=this.beans,{colResize:o,ctrlsSvc:n,colModel:r}=s;if(t&&(i=r.getColDefCol(t.getColId())),t&&!i)return;let a=this.getMasterColumns(e);switch(e.type){case"columnMoved":{let u=e.api.getColumnState().map(h=>({colId:h.colId}));be(s,{state:u,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{let u=e.api.getColumnState().map(h=>({colId:h.colId,hide:h.hide}));be(s,{state:u},"alignedGridChanged")}break;case"columnPinned":{let u=e.api.getColumnState().map(h=>({colId:h.colId,pinned:h.pinned}));be(s,{state:u},"alignedGridChanged")}break;case"columnResized":{let c=e,u={};a.forEach(h=>{u[h.getId()]={key:h.getColId(),newWidth:h.getActualWidth()}}),c.flexColumns?.forEach(h=>{u[h.getId()]&&delete u[h.getId()]}),o?.setColumnWidths(Object.values(u),!1,c.finished,"alignedGridChanged");break}}let d=n.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(c=>{c.setGridOption("alwaysShowVerticalScroll",d)})}},ib={moduleName:"AlignedGrids",version:D,beans:[tb]},sb=class extends Bg{constructor(){super(...arguments),this.beanName="csrmNodeSvc"}},Qs=class{constructor(){this.removals=new Set,this.updates=new Set,this.adds=new Set}remove(e){this.adds.delete(e)||(this.updates.delete(e),this.removals.add(e))}update(e){this.adds.has(e)||this.updates.add(e)}add(e){this.adds.add(e)}};function ob(e){if(_(e.childrenAfterSort))return;let t=e.childrenAfterSort;for(let i=0;i<t.length;i++){let s=t[i],o=i===0,n=i===e.childrenAfterSort.length-1;s.setFirstChild(o),s.lastChild!==n&&(s.lastChild=n,s.dispatchRowEvent("lastChildChanged")),s.childIndex!==i&&(s.childIndex=i,s.dispatchRowEvent("childIndexChanged"))}}function Xl(e){e.sibling&&(e.sibling.childrenAfterSort=e.childrenAfterSort),ob(e)}var nb=class extends y{constructor(){super(...arguments),this.beanName="sortStage",this.refreshProps=new Set(["postSortRows","groupDisplayType","accentedSort"]),this.step="sort"}execute(e){let t=this.beans,i=t.sortSvc.getSortOptions(),s=P(i)&&i.length>0,o=s&&!!e.changedRowNodes&&this.gos.get("deltaSort"),n=i.some(({column:r})=>Ee(t.gos)?r.isPrimary()&&r.isRowGroupActive():!!r.getColDef().showRowGroup);this.sort(t,i,s,o,e.changedRowNodes,e.changedPath,n)}sort(e,t,i,s,o,n,r){let{gos:a,colModel:l,rowGroupColsSvc:d,rowNodeSorter:c,rowRenderer:u,showRowGroupCols:h}=e,g=a.get("groupMaintainOrder"),p=l.getCols().some(w=>w.isRowGroupActive()),f=l.isPivotMode(),m=a.getCallback("postSortRows"),C=!1,v=w=>{let T=f&&w.leafGroup,A=g&&p&&!w.leafGroup&&!r,M;if(A){let G=d?.columns?.[w.level+1]?.getSort()===null,H=w.childrenAfterAggFilter.slice(0);if(w.childrenAfterSort&&!G){let B={};w.childrenAfterSort.forEach((K,ae)=>{B[K.id]=ae}),H.sort((K,ae)=>(B[K.id]??0)-(B[ae.id]??0))}M=H}else!i||T?M=w.childrenAfterAggFilter.slice(0):s&&o?M=rb(c,w,o,n,t):M=c.doFullSort(w.childrenAfterAggFilter,t);if(C||(C=w.childrenAfterSort?.[0]!==M[0]),w.childrenAfterSort=M,Xl(w),m){let k={nodes:w.childrenAfterSort};m(k)}};if(n?.forEachChangedNodeDepthFirst(v),C&&this.gos.get("groupHideOpenParents")){let w=h?.getShowRowGroupCols();w?.length&&u.refreshCells({columns:w,force:!0})}}};function rb(e,t,i,s,o){let n=t.childrenAfterAggFilter,r=t.childrenAfterSort;if(!r)return e.doFullSort(n,o);let a=new Set,l=[],{updates:d,adds:c}=i;for(let h=0,g=n.length;h<g;++h){let p=n[h];d.has(p)||c.has(p)||s&&!s.canSkip(p)?l.push({currentPos:l.length,rowNode:p}):a.add(p.id)}let u=r.filter(h=>a.has(h.id)).map((h,g)=>({currentPos:g,rowNode:h}));return l.sort((h,g)=>e.compareRowNodes(o,h,g)),ab(e,o,l,u)}function ab(e,t,i,s){let o=[],n=0,r=0,a=i.length,l=s.length;for(;n<a&&r<l;){let d=i[n],c=s[r],u=e.compareRowNodes(t,d,c),h;u<0?(h=d,++n):(h=c,++r),o.push(h.rowNode)}for(;n<a;)o.push(i[n++].rowNode);for(;r<l;)o.push(s[r++].rowNode);return o}var lb=class extends y{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowsToDisplay=[],this.lastHighlightedRow=null,this.started=!1,this.isRefreshingModel=!1,this.rowNodesCountReady=!1,this.rowCountReady=!1,this.onRowHeightChanged_debounced=Q(this,this.onRowHeightChanged.bind(this),100)}wireBeans(e){this.colModel=e.colModel,this.valueCache=e.valueCache,this.filterStage=e.filterStage,this.sortStage=e.sortStage,this.flattenStage=e.flattenStage,this.groupStage=e.groupStage,this.aggStage=e.aggStage,this.pivotStage=e.pivotStage,this.filterAggStage=e.filterAggStage}postConstruct(){this.orderedStages=[this.groupStage,this.filterStage,this.pivotStage,this.aggStage,this.sortStage,this.filterAggStage,this.flattenStage].filter(s=>!!s);let e=this.refreshModel.bind(this,{step:"group"}),t=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:t,columnRowGroupChanged:e,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:e,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this)}),this.addPropertyListeners(),this.rootNode=new ct(this.beans);let i=this.getNewNodeManager();this.nodeManager=i,i.activate(this.rootNode)}getNewNodeManager(){let{gos:e,beans:t}=this;switch(Jd(e)){case"treeNested":return t.csrmChildrenTreeNodeSvc??t.csrmNodeSvc;case"treePath":return t.csrmPathTreeNodeSvc??t.csrmNodeSvc;default:return t.csrmNodeSvc}}addPropertyListeners(){let e=["treeData","treeDataChildrenField",...this.orderedStages.flatMap(({refreshProps:t})=>[...t])];this.addManagedPropertyListeners(e,t=>{let i=t.changeSet?.properties;i&&this.onPropChange(i)}),this.addManagedPropertyListener("rowData",()=>this.onPropChange(["rowData"])),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,i,s){let o,n=!1;do{o=!1;let r=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(r,i),d=Math.min(a,s);for(let c=l;c<=d;c++){let u=this.getRow(c);if(u.rowHeightEstimated){let h=je(this.beans,u);u.setRowHeight(h.height),o=!0,n=!0}}o&&this.setRowTopAndRowIndex()}while(o);return n}onPropChange(e){if(!this.rootNode)return;let t=this.gos,i=new Set(e),s={step:"nothing",changedProps:i},o=i.has("rowData"),n=this.nodeManager,r=this.getNewNodeManager(),a=n!==r||o&&i.has("treeData")&&t.get("treeData")||i.has("treeDataChildrenField")&&t.get("treeData"),l;if((a||o)&&(l=t.get("rowData"),l!=null&&!Array.isArray(l)&&(l=null,F(1))),a&&(o||(l=n?.extractRowData()??l),n!==r&&(n?.deactivate(),this.nodeManager=r),r.activate(this.rootNode)),l)if(!a&&!this.isEmpty()&&l.length>0&&t.exists("getRowId")&&!t.get("resetRowDataOnUpdate"))s.keepRenderedRows=!0,s.animate=!this.gos.get("suppressAnimationFrame"),s.changedRowNodes=new Qs,r.setImmutableRowData(s,l);else{s.rowDataUpdated=!0,s.newData=!0;let{selectionSvc:c,pinnedRowModel:u}=this.beans;c?.reset("rowDataChanged"),u?.isManual()&&u.reset(),this.rowNodesCountReady=!0,r.setNewRowData(l)}if(s.rowDataUpdated)s.step="group";else if(s.step==="nothing"){for(let{refreshProps:d,step:c}of this.orderedStages)if(e.some(u=>d.has(u))){s.step=c;break}}s.step!=="nothing"&&this.refreshModel(s)}setRowTopAndRowIndex(){let{beans:e,rowsToDisplay:t}=this,i=e.environment.getDefaultRowHeight(),s=0,o=new Set,n=Z(this.gos,"normal");for(let r=0,a=t.length;r<a;++r){let l=t[r];if(l.id!=null&&o.add(l.id),l.rowHeight==null){let d=je(e,l,n,i);l.setRowHeight(d.height,d.estimated)}l.setRowTop(s),l.setRowIndex(r),s+=l.rowHeight}return o}clearRowTopAndRowIndex(e,t){let i=e.active,s=n=>{n&&n.id!=null&&!t.has(n.id)&&n.clearRowTopAndRowIndex()},o=n=>{if(n!==null&&(s(n),s(n.detailNode),s(n.sibling),n.hasChildren()&&n.childrenAfterGroup)){let r=n.level==-1;i&&!r&&!n.expanded||n.childrenAfterGroup.forEach(o)}};o(this.rootNode)}clearHighlight(){let e=this.lastHighlightedRow;e&&(e.highlighted=null,e.dispatchRowEvent("rowHighlightChanged"),this.lastHighlightedRow=null)}highlightRow(e,t){let i=e!==this.lastHighlightedRow,s=t!==e.highlighted;(i||s)&&(i&&this.clearHighlight(),e.highlighted=t,e.dispatchRowEvent("rowHighlightChanged"),this.lastHighlightedRow=e)}getLastHighlightedRowNode(){return this.lastHighlightedRow}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){let e=this.rootNode;if(!e||this.rowsToDisplay.length===0)return 0;if(this.rowsToDisplay&&this.rowsToDisplay[0]===e)return 1;let i=e.childrenAfterAggFilter,s=e.sibling?1:0;return(i?i.length:0)+s}getTopLevelRowDisplayedIndex(e){let{rootNode:t,rowsToDisplay:i}=this;if(!t||!i.length||i[0]===t)return e;let{childrenAfterSort:o}=t,n=a=>{let l=o[a];if(this.gos.get("groupHideOpenParents"))for(;l.expanded&&l.childrenAfterSort&&l.childrenAfterSort.length>0;)l=l.childrenAfterSort[0];return l.rowIndex},{footerSvc:r}=this.beans;return r?r.getTopDisplayIndex(i,e,o,n):n(e)}getTopLevelIndexFromDisplayedIndex(e){let{rootNode:t,rowsToDisplay:i}=this;if(!t||!i.length||i[0]===t)return e;let o=this.getRow(e);for(o.footer&&(o=o.sibling);o.parent&&o.parent!==t;)o=o.parent;let n=t.childrenAfterSort?.findIndex(r=>r===o);return n===-1?e:n??e}getRowBounds(e){let t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){let e=xt(this.gos);this.refreshModel({step:"map",keepRenderedRows:!0,animate:e})}onFilterChanged(e){if(e.afterDataChange)return;let t=xt(this.gos),s=e.columns.length===0||e.columns.some(o=>o.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:s,keepRenderedRows:!0,animate:t})}onSortChanged(){let e=xt(this.gos);this.refreshModel({step:"sort",keepRenderedRows:!0,animate:e})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(e){let t=new pi(!1,this.rootNode);return e||(t.active=!1),t}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;let{changedRowNodes:t,newData:i,rowDataUpdated:s}=e;return!(!t||i||!s||t.removals.size||t.adds.size)}refreshModel(e){if(!this.rootNode)return;let t=e.changedPath??(e.changedPath=this.createChangePath(!e.newData&&!!e.rowDataUpdated));if(this.nodeManager.refreshModel?.(e,this.started),this.eventSvc.dispatchEvent({type:"beforeRefreshModel",params:e}),!this.started||(e.rowDataUpdated&&this.eventSvc.dispatchEvent({type:"rowDataUpdated"}),this.isRefreshingModel||this.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(e)))return;switch(this.isRefreshingModel=!0,e.step){case"group":this.doRowGrouping(e.changedRowNodes,t,!!e.rowNodesOrderChanged,!!e.afterColumnsChanged);case"filter":this.doFilter(t);case"pivot":this.doPivot(t);case"aggregate":this.doAggregate(t);case"filter_aggregates":this.doFilterAggregates(t);case"sort":this.doSort(e.changedRowNodes,t);case"map":this.doRowsToDisplay()}let i=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(t,i),this.isRefreshingModel=!1,this.eventSvc.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}isEmpty(){return!this.rootNode?.allLeafChildren?.length||!this.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let i=!1,s=!1,o=[],n=ci(this.gos);return this.forEachNodeAfterFilterAndSort(r=>{if(s)return;if(i&&(r===t||r===e)&&(s=!0,r.group&&n)){o.push(...r.allLeafChildren);return}if(!i){if(r!==t&&r!==e)return;i=!0}if(!r.group||!n){o.push(r);return}}),o}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){let t=this.rowsToDisplay;if(this.isEmpty()||t.length===0)return-1;let i=0,s=t.length-1;if(e<=0)return 0;if(N(t).rowTop<=e)return t.length-1;let n=-1,r=-1;for(;;){let a=Math.floor((i+s)/2),l=t[a];if(this.isRowInPixel(l,e)||(l.rowTop<e?i=a+1:l.rowTop>e&&(s=a-1),n===i&&r===s))return a;n=i,r=s}}isRowInPixel(e,t){let i=e.rowTop,s=e.rowTop+e.rowHeight;return i<=t&&s>t}forEachLeafNode(e){this.rootNode?.allLeafChildren?.forEach((t,i)=>e(t,i))}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){this.rowsToDisplay.forEach(e)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,i=>i.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,i=>i.childrenAfterSort)}forEachPivotNode(e,t=!1,i=!1){let{colModel:s,rowGroupColsSvc:o}=this.beans;if(!s.isPivotMode())return;if(!o?.columns.length){e(this.rootNode,0);return}let n=i?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,r=>r.leafGroup?null:r[n])}depthFirstSearchRowNodes(e,t=!1,i=n=>n.childrenAfterGroup,s=this.rootNode,o=0){let n=o;if(!s)return n;let r=s===this.rootNode;r||e(s,n++);let{footerSvc:a}=this.beans;if(s.hasChildren()&&!s.footer){let l=i(s);if(l){n=a?.addTotalRows(n,s,e,t,r,"top")??n;for(let d of l)n=this.depthFirstSearchRowNodes(e,t,i,d,n);return a?.addTotalRows(n,s,e,t,r,"bottom")??n}}return n}doAggregate(e){let t=this.rootNode;t&&this.aggStage?.execute({rowNode:t,changedPath:e})}doFilterAggregates(e){let t=this.rootNode;this.filterAggStage?this.filterAggStage.execute({rowNode:t,changedPath:e}):t.childrenAfterAggFilter=t.childrenAfterFilter}doSort(e,t){this.sortStage?this.sortStage.execute({rowNode:this.rootNode,changedRowNodes:e,changedPath:t}):t.forEachChangedNodeDepthFirst(i=>{i.childrenAfterSort=i.childrenAfterAggFilter.slice(0),Xl(i)})}doRowGrouping(e,t,i,s){let o=this.rootNode;if(!this.groupStage?.execute({rowNode:o,changedPath:t,changedRowNodes:e,rowNodesOrderChanged:i,afterColumnsChanged:s})&&!this.nodeManager.treeData){let r=o.sibling;o.childrenAfterGroup=o.allLeafChildren,r&&(r.childrenAfterGroup=o.childrenAfterGroup),o.updateHasChildren()}this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){this.filterStage?this.filterStage.execute({rowNode:this.rootNode,changedPath:e}):e.forEachChangedNodeDepthFirst(t=>{t.childrenAfterFilter=t.childrenAfterGroup,Il(t)},!0)}doPivot(e){this.pivotStage?.execute({rowNode:this.rootNode,changedPath:e})}getRowNode(e){if(typeof e=="string"&&e.indexOf(go)==0){let i;return this.forEachNode(s=>{s.id===e&&(i=s)}),i}return this.nodeManager.getRowNode(e)}batchUpdateRowData(e,t){if(this.applyAsyncTransactionsTimeout==null){this.rowDataTransactionBatch=[];let i=this.gos.get("asyncTransactionWaitMillis");this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.isAlive()&&this.executeBatchUpdateRowData()},i)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){this.applyAsyncTransactionsTimeout!=null&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){this.valueCache?.onDataChanged();let e=[],t=[],i=new Qs,s=!1;this.rowDataTransactionBatch?.forEach(o=>{this.rowNodesCountReady=!0;let{rowNodeTransaction:n,rowsInserted:r}=this.nodeManager.updateRowData(o.rowDataTransaction,i);r&&(s=!0),t.push(n),o.callback&&e.push(o.callback.bind(null,n))}),this.commitTransactions(s,i),e.length>0&&window.setTimeout(()=>{e.forEach(o=>o())},0),t.length>0&&this.eventSvc.dispatchEvent({type:"asyncTransactionsFlushed",results:t}),this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(e){this.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;let t=new Qs,{rowNodeTransaction:i,rowsInserted:s}=this.nodeManager.updateRowData(e,t);return this.commitTransactions(s,t),i}commitTransactions(e,t){this.refreshModel({step:"group",rowDataUpdated:!0,rowNodesOrderChanged:e,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:t,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){let{flattenStage:e,rootNode:t}=this,i;if(e)i=e.execute({rowNode:t});else{i=t?.childrenAfterSort??[];for(let s of i)s.setUiLevel(0)}this.rowsToDisplay=i}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){let e=this.rootNode;if(!e)return;let t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0),e.sibling&&e.sibling.setRowHeight(e.sibling.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);let i=t.detailNode;i&&i.setRowHeight(i.rowHeight,!0),t.sibling&&t.sibling.setRowHeight(t.sibling.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){if(e.rowHeightChanged){if(this.beans.rowAutoHeight?.active)return;this.resetRowHeights()}}onGridReady(){this.started||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}destroy(){super.destroy(),this.clearHighlight(),this.started=!1,this.rootNode=null,this.nodeManager=null,this.rowDataTransactionBatch=null,this.orderedStages=Dn,this.rowsToDisplay=Dn}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}};function db(e){e.expansionSvc?.onGroupExpandedOrCollapsed()}function cb(e,t){let i=Te(e);i&&((!t||t==="everything")&&(t="group"),i.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function ub(e){return Te(e)?.isEmpty()??!0}function hb(e,t){Te(e)?.forEachLeafNode(t)}function gb(e,t){Te(e)?.forEachNodeAfterFilter(t)}function pb(e,t){Te(e)?.forEachNodeAfterFilterAndSort(t)}function fb(e){if(e.rowAutoHeight?.active){F(3);return}Te(e)?.resetRowHeights()}function mb(e,t){return e.frameworkOverrides.wrapIncoming(()=>Te(e)?.updateRowData(t))}function Cb(e,t,i){e.frameworkOverrides.wrapIncoming(()=>Te(e)?.batchUpdateRowData(t,i))}function vb(e){e.frameworkOverrides.wrapIncoming(()=>Te(e)?.flushAsyncTransactions())}function wb(e){return e.selectionSvc?.getBestCostNodeSelection()}var Sb={moduleName:"ClientSideRowModel",version:D,rowModels:["clientSide"],beans:[sb,lb,nb],dependsOn:[Fl]},bb={moduleName:"ClientSideRowModelApi",version:D,apiFunctions:{onGroupExpandedOrCollapsed:db,refreshClientSideRowModel:cb,isRowDataEmpty:ub,forEachLeafNode:hb,forEachNodeAfterFilter:gb,forEachNodeAfterFilterAndSort:pb,resetRowHeights:fb,applyTransaction:mb,applyTransactionAsync:Cb,flushAsyncTransactions:vb,getBestCostNodeSelection:wb},dependsOn:[JS]},yb=class extends y{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){let{allColumns:i,columnKeys:s,skipRowGroups:o,exportRowNumbers:n}=t,r=this.getColumnsToExport({allColumns:i,skipRowGroups:o,columnKeys:s,exportRowNumbers:n});return[this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t)].reduce((a,l)=>l(a),e).parse()}processRow(e,t,i,s){let o=t.shouldRowBeSkipped||(()=>!1),r=t.rowPositions!=null||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!r,l=this.colModel.isPivotMode()?s.leafGroup:!s.group,d=!!s.footer,c=s.allChildrenCount===1&&s.childrenAfterGroup?.length===1&&Kd(this.gos,s);if(!l&&!d&&(t.skipRowGroups||c||a)||t.onlySelected&&!s.isSelected()||t.skipPinnedTop&&s.rowPinned==="top"||t.skipPinnedBottom&&s.rowPinned==="bottom"||s.stub||s.level===-1&&!l&&!d||o(I(this.gos,{node:s})))return;let g=e.onNewBodyRow(s);if(i.forEach((p,f)=>{g.onColumn(p,f,s)}),t.getCustomContentBelowRow){let p=t.getCustomContentBelowRow(I(this.gos,{node:s}));p&&e.addCustomContent(p)}}appendContent(e){return t=>{let i=e.appendContent;return i&&t.addCustomContent(i),t}}prependContent(e){return t=>{let i=e.prependContent;return i&&t.addCustomContent(i),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return i=>{if(!e.skipColumnGroupHeaders){let s=new wa,{colGroupSvc:o}=this.beans,n=o?o.createColumnGroups({columns:t,idCreator:s,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(n,i,e.processGroupHeaderCallback)}return i}}exportHeaders(e,t){return i=>{if(!e.skipColumnHeaders){let s=i.onNewHeaderRow();t.forEach((o,n)=>{s.onColumn(o,n,void 0)})}return i}}processPinnedTopRows(e,t){return i=>{let s=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(o=>o.rowPinned==="top").sort((o,n)=>o.rowIndex-n.rowIndex).map(o=>this.pinnedRowModel?.getPinnedTopRow(o.rowIndex)).forEach(s):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("top",s),i}}processRows(e,t){return i=>{let s=this.rowModel,o=Y(this.gos,s),n=Ot(this.gos,s),r=!o&&e.onlySelected,a=this.processRow.bind(this,i,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)return e.rowPositions.filter(d=>d.rowPinned==null).sort((d,c)=>d.rowIndex-c.rowIndex).map(d=>s.getRow(d.rowIndex)).forEach(a),i;if(this.colModel.isPivotMode())return o?s.forEachPivotNode(a,!0,l==="filteredAndSorted"):n?s.forEachNodeAfterFilterAndSort(a,!0):s.forEachNode(a),i;if(e.onlySelectedAllPages||r){let d=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(d),d.forEach(a)}else l==="all"?s.forEachNode(a):o||n?s.forEachNodeAfterFilterAndSort(a,!0):s.forEachNode(a);return i}}replicateSortedOrder(e){let{sortSvc:t,rowNodeSorter:i}=this.beans;if(!t||!i)return;let s=t.getSortOptions(),o=(n,r)=>n.rowIndex!=null&&r.rowIndex!=null?n.rowIndex-r.rowIndex:n.level===r.level?n.parent?.id===r.parent?.id?i.compareRowNodes(s,{rowNode:n,currentPos:n.rowIndex??-1},{rowNode:r,currentPos:r.rowIndex??-1}):o(n.parent,r.parent):n.level>r.level?o(n.parent,r):o(n,r.parent);e.sort(o)}processPinnedBottomRows(e,t){return i=>{let s=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(o=>o.rowPinned==="bottom").sort((o,n)=>o.rowIndex-n.rowIndex).map(o=>this.pinnedRowModel?.getPinnedBottomRow(o.rowIndex)).forEach(s):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("bottom",s),i}}getColumnsToExport(e){let{allColumns:t=!1,skipRowGroups:i=!1,exportRowNumbers:s=!1,columnKeys:o}=e,{colModel:n,gos:r,visibleCols:a}=this,l=n.isPivotMode(),d=h=>Gt(h)?!1:!st(h)||s;if(o&&o.length)return n.getColsForKeys(o).filter(d);let c=r.get("treeData"),u=[];return t&&!l?u=n.getCols():u=a.allCols,u=u.filter(h=>d(h)&&(i&&!c?!Oo(h):!0)),u}recursivelyAddHeaderGroups(e,t,i){let s=[];e.forEach(o=>{let n=o;n.getChildren&&n.getChildren().forEach(r=>s.push(r))}),e.length>0&&j(e[0])&&this.doAddHeaderHeader(t,e,i),s&&s.length>0&&this.recursivelyAddHeaderGroups(s,t,i)}doAddHeaderHeader(e,t,i){let s=e.onNewHeaderGroupingRow(),o=0;t.forEach(n=>{let r=n,a;i?a=i(I(this.gos,{columnGroup:r})):a=this.beans.colNames.getDisplayNameForColumnGroup(r,"header");let l=r.getLeafColumns().reduce((d,c,u,h)=>{let g=N(d);return c.getColumnGroupShow()==="open"?(!g||g[1]!=null)&&(g=[u],d.push(g)):g&&g[1]==null&&(g[1]=u-1),u===h.length-1&&g&&g[1]==null&&(g[1]=u),d},[]);s.onColumn(r,a||"",o++,r.getLeafColumns().length-1,l)})}},Rb={moduleName:"SharedExport",version:D,beans:[yb]},wr=`\r
`,xb=class extends Mw{constructor(e){super(e),this.isFirstLine=!0,this.result="";let{suppressQuotes:t,columnSeparator:i}=e;this.suppressQuotes=t,this.columnSeparator=i}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,wr),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((i,s)=>{s!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(i.data.value||""),i.mergeAcross&&this.appendEmptyCells(i.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,i,s){i!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(s)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,i){t!=0&&(this.result+=this.columnSeparator);let s=this.extractRowCellValue(e,t,t,"csv",i);this.result+=this.putInQuotes(s.valueFormatted??s.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(F(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=wr),this.isFirstLine=!1}},Fb=class extends Dw{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc}getMergedParams(e){let t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){F(51);return}let t=this.getMergedParams(e),i=this.getData(t),s=new Blob(["\uFEFF",i],{type:"text/plain"}),o=typeof t.fileName=="function"?t.fileName(I(this.gos,{})):t.fileName;Tw(this.getFileName(o),s)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){let i=t?Object.assign({},e):this.getMergedParams(e);return this.getData(i)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){let{colModel:t,colNames:i,rowGroupColsSvc:s,valueSvc:o,gos:n}=this,{processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:d,suppressQuotes:c,columnSeparator:u}=e;return new xb({colModel:t,colNames:i,valueSvc:o,gos:n,processCellCallback:r||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:d||void 0,suppressQuotes:c||!1,columnSeparator:u||",",rowGroupColsSvc:s})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function Eb(e,t){return e.csvCreator?.getDataAsCsv(t)}function Pb(e,t){e.csvCreator?.exportDataAsCsv(t)}var Db={moduleName:"CsvExport",version:D,beans:[Fb],apiFunctions:{getDataAsCsv:Eb,exportDataAsCsv:Pb},dependsOn:[Rb]},Mb=class extends y{constructor(e,t,i){super(),this.id=e,this.parentCache=t,this.params=i,this.state="needsLoading",this.version=0,this.startRow=e*i.blockSize,this.endRow=this.startRow+i.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,i){this.successCommon(e,{rowData:t,rowCount:i})}isRequestMostRecentAndLive(e){let t=e===this.version,i=this.isAlive();return t&&i}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];let{params:{blockSize:e,rowHeight:t},startRow:i,beans:s,rowNodes:o}=this;for(let n=0;n<e;n++){let r=i+n,a=new ct(s);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(r),a.setRowTop(t*r),o.push(a)}}getBlockStateJson(){let{id:e,startRow:t,endRow:i,state:s}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:i,pageStatus:s}}}setDataAndId(e,t,i){P(t)?e.setDataAndId(t,i.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){let e=this.createLoadParams();if(_(this.params.datasource.getRows)){F(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){let{startRow:e,endRow:t,version:i,params:{sortModel:s,filterModel:o},gos:n}=this;return{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,i),failCallback:this.pageLoadFailed.bind(this,i),sortModel:s,filterModel:o,context:I(n,{}).context}}forEachNode(e,t,i){this.rowNodes.forEach((s,o)=>{this.startRow+o<i&&e(s,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);let i=e-this.startRow;return this.rowNodes[i]}processServerResult(e){let{rowNodes:t,beans:i}=this;t.forEach((o,n)=>{let r=e.rowData?e.rowData[n]:void 0;!o.id&&o.alreadyRendered&&r&&(t[n]=new ct(i),t[n].setRowIndex(o.rowIndex),t[n].setRowTop(o.rowTop),t[n].setRowHeight(o.rowHeight),o.clearRowTopAndRowIndex()),this.setDataAndId(t[n],r,this.startRow+n)});let s=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,s)}destroy(){this.rowNodes.forEach(e=>{e.clearRowTopAndRowIndex()}),super.destroy()}},Tb=2,Ab=class extends y{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){let i=Math.floor(e/this.params.blockSize),s=this.blocks[i];if(!s){if(t)return;s=this.createBlock(i)}return s.getRow(e)}createBlock(e){let t=this.params,i=this.createBean(new Mb(e,this,t));return this.blocks[i.id]=i,this.blockCount++,this.purgeBlocksIfNeeded(i),t.rowNodeBlockLoader.addBlock(i),i}refreshCache(){if(this.blockCount==0){this.purgeCache();return}this.getBlocksInOrder().forEach(t=>t.setStateWaitingToLoad()),this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){this.getBlocksInOrder().forEach(e=>this.destroyBlock(e)),super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(Ke(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){let t=this.getBlocksInOrder().filter(r=>r!=e),i=(r,a)=>a.lastAccessed-r.lastAccessed;t.sort(i);let s=this.params.maxBlocksInCache>0,o=s?this.params.maxBlocksInCache-1:null,n=Tb-1;t.forEach((r,a)=>{let l=r.state==="needsLoading"&&a>=n,d=s?a>=o:!1;if(l||d){if(this.isBlockCurrentlyDisplayed(r)||this.isBlockFocused(r))return;this.removeBlockFromCache(r)}})}isBlockFocused(e){let t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;let{startRow:i,endRow:s}=e;return t.rowIndex>=i&&t.rowIndex<s}isBlockCurrentlyDisplayed(e){let{startRow:t,endRow:i}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,i-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){let{blockSize:i,overflowSize:s}=this.params,n=(e.id+1)*i+s;this.rowCount<n&&(this.rowCount=n)}}setRowCount(e,t){this.rowCount=e,P(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){let t={value:0};this.getBlocksInOrder().forEach(i=>i.forEachNode(e,t,this.rowCount))}getBlocksInOrder(){let e=(i,s)=>i.id-s.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){let e=[];this.getBlocksInOrder().forEach(t=>{t.id*this.params.blockSize>=this.rowCount&&e.push(t)}),e.length>0&&e.forEach(t=>this.destroyBlock(t))}purgeCache(){this.getBlocksInOrder().forEach(e=>this.removeBlockFromCache(e)),this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){let i=[],s=-1,o=!1,n={value:0},r=!1;return this.getBlocksInOrder().forEach(l=>{if(!r){if(o&&s+1!==l.id){r=!0;return}s=l.id,l.forEachNode(d=>{let c=d===e||d===t;(o||c)&&i.push(d),c&&(o=!o)},n,this.rowCount)}}),r||o?[]:i}},kb=class extends y{constructor(){super(...arguments),this.beanName="rowModel"}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){this.gos.get("rowModelType")==="infinite"&&(this.rowHeight=it(this.beans),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache()))}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy()}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=it(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;this.cacheParams?e=!ai(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){if(!this.datasource)return;At(this.gos)!=null||this.beans.selectionSvc?.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();let e=this.beans,{filterManager:t,sortSvc:i,rowNodeBlockLoader:s,eventSvc:o,gos:n}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:i?.getSortModel()??[],rowNodeBlockLoader:s,initialRowCount:n.get("infiniteInitialRowCount"),maxBlocksInCache:n.get("maxBlocksInCache"),rowHeight:it(e),overflowSize:n.get("cacheOverflowSize"),blockSize:n.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new Ab(this.cacheParams)),o.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){let t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}forEachNode(e){this.infiniteCache?.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){let t=Math.floor(e/this.rowHeight),i=this.getRowCount()-1;return t>i?i:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache?.refreshCache()}purgeCache(){this.infiniteCache?.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?.isLastRowIndexKnown()??!1}setRowCount(e,t){this.infiniteCache?.setRowCount(e,t)}};function Ib(e){hs(e)?.refreshCache()}function Lb(e){hs(e)?.purgeCache()}function Ob(e){return hs(e)?.getRowCount()}var Hb=class extends y{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=jd(this.gos);let e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=Q(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){me(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){Ke(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}let e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(i=>i.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length,t.forEach(i=>i.load()),this.printCacheStatus()}getBlockState(){let e={};return this.blocks.forEach(t=>{let{id:i,state:s}=t.getBlockStateJson();e[i]=s}),e}printCacheStatus(){Ke(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},Gb={moduleName:"InfiniteRowModelCore",version:D,rowModels:["infinite"],beans:[kb,Hb]},Bb={moduleName:"InfiniteRowModel",version:D,apiFunctions:{refreshInfiniteCache:Ib,purgeInfiniteCache:Lb,getInfiniteRowCount:Ob},dependsOn:[Gb,eb]},Vb="\u2191",Nb="\u2193",zb={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},Wb=class extends V{constructor(){super(zb),this.eValue=E,this.eDelta=E,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){let i=Math.abs(t),s=e.formatValue(i),o=P(s)?s:i,n=t>=0,r=this.eDelta;n?r.textContent=Vb+o:r.textContent=Nb+o,r.classList.toggle("ag-value-change-delta-up",n),r.classList.toggle("ag-value-change-delta-down",!n)}setTimerToRemoveDelta(){this.refreshCount++;let e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),J(this.eDelta)}refresh(e,t=!1){let{value:i,valueFormatted:s}=e,{eValue:o,lastValue:n,beans:r}=this;if(i===n||(P(s)?o.textContent=s:P(i)?o.textContent=i:J(o),r.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;if(typeof i=="number"&&typeof n=="number"){let a=i-n;this.showDelta(e,a)}return n&&o.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=i,!0}},_b=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",Ub={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},$b=class extends V{constructor(){super(Ub),this.eCurrent=E,this.refreshCount=0,this.registerCSS(_b)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;let e=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious);let{beans:t,eCurrent:i}=this,s=W({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=s,s.textContent=i.textContent,this.getGui().insertBefore(s,i),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.getGui().removeChild(this.ePrevious),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let i=e.value;if(_(i)&&(i=""),i===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=i;let s=this.eCurrent;return P(e.valueFormatted)?s.textContent=e.valueFormatted:P(e.value)?s.textContent=i:J(s),!0}},Kb=class extends y{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,i=this.beans.gos.get("cellFlashDuration"),s=this.beans.gos.get("cellFadeDuration")){let o=this.animations[t];o.delete(e);let n=Date.now(),r=n+i,a=n+i+s,l={phase:"flash",flashEndTime:r,fadeEndTime:a};o.set(e,l);let d=`ag-cell-${t}`,c=`${d}-animation`,{comp:u,eGui:{style:h}}=e;u.toggleCss(d,!0),u.toggleCss(c,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),i)}),this.nextAnimationTime=r)}advanceAnimations(){let e=Date.now(),t=null;for(let i of Object.keys(this.animations)){let s=this.animations[i],o=`ag-cell-${i}`,n=`${o}-animation`;for(let[r,a]of s){if(!r.isAlive()||!r.comp){s.delete(r);continue}let{phase:l,flashEndTime:d,fadeEndTime:c}=a,u=l==="flash"?d:c;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}let{comp:g,eGui:{style:p}}=r;switch(l){case"flash":g.toggleCss(o,!1),g.toggleCss(n,!0),p.transition=`background-color ${c-d}ms`,p.transitionDelay=`${d-e}ms`,t=Math.min(c,t??1/0),a.phase="fade";break;case"fade":g.toggleCss(o,!1),g.toggleCss(n,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),s.delete(r);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;let i=Xu(e.cellPosition);t.cells[i]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t?.flashDuration,t?.fadeDuration)}destroy(){for(let e of Object.keys(this.animations))this.animations[e].clear()}};function jb(e,t={}){let{cellFlashSvc:i}=e;i&&e.frameworkOverrides.wrapIncoming(()=>{e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(s=>i.flashCell(s,t))})}var qb={moduleName:"HighlightChanges",version:D,beans:[Kb],userComponents:{agAnimateShowChangeCellRenderer:Wb,agAnimateSlideCellRenderer:$b},apiFunctions:{flashCells:jb}};function Yb(e){return e.stateSvc?.getState()??{}}function Qb(e){switch(e=R({},e),e.version||(e.version="32.1.0"),e.version){case"32.1.0":e=Zb(e)}return e}function Zb(e){return e.cellSelection=Xb(e,"rangeSelection"),e}function Xb(e,t){if(e&&typeof e=="object")return e[t]}var Jb=class extends y{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=Q(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=Q(this,()=>{this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())},0),this.onRowSelectedDebounced=Q(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){this.isClientSideRowModel=Y(this.gos),this.cachedState=this.getInitialState(),this.setCachedStateValue("version",D);let e=this.suppressEventsAndDispatchInitEvent.bind(this);this.beans.ctrlsSvc.whenReady(this,()=>e(()=>this.setupStateOnGridReady()));let[t,i,s]=this.addManagedEventListeners({newColumnsLoaded:({source:o})=>{o==="gridInitializing"&&(t(),e(()=>this.setupStateOnColumnsInitialised()))},rowCountReady:()=>{i?.(),e(()=>this.setupStateOnRowCountReady())},firstDataRendered:()=>{s?.(),e(()=>this.setupStateOnFirstDataRendered())}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getInitialState(){return Qb(this.gos.get("initialState")??{})}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setupStateOnGridReady(){let e=()=>this.updateCachedState("sideBar",this.getSideBarState());e(),this.addManagedEventListeners({toolPanelVisibleChanged:e,sideBarUpdated:e})}setupStateOnColumnsInitialised(){let e=this.getInitialState();this.setColumnState(e),this.setColumnGroupState(e),this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState());let t=i=>()=>this.updateColumnState([i]);this.addManagedEventListeners({columnValueChanged:t("aggregation"),columnMoved:t("columnOrder"),columnPinned:t("columnPinning"),columnResized:t("columnSizing"),columnVisible:t("columnVisibility"),columnPivotChanged:t("pivot"),columnPivotModeChanged:t("pivot"),columnRowGroupChanged:t("rowGroup"),sortChanged:t("sort"),newColumnsLoaded:()=>this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setupStateOnRowCountReady(){let{filter:e,rowGroupExpansion:t,rowSelection:i,pagination:s}=this.getInitialState();e&&this.setFilterState(e),t&&this.setRowGroupExpansionState(t),i&&this.setRowSelectionState(i),s&&this.setPaginationState(s);let o=this.updateCachedState.bind(this);o("filter",this.getFilterState()),o("rowGroupExpansion",this.getRowGroupExpansionState()),o("rowSelection",this.getRowSelectionState()),o("pagination",this.getPaginationState());let n=()=>{this.updateRowGroupExpansionStateTimer=0,o("rowGroupExpansion",this.getRowGroupExpansionState())};this.addManagedEventListeners({filterChanged:()=>o("filter",this.getFilterState()),rowGroupOpened:()=>this.onRowGroupOpenedDebounced(),expandOrCollapseAll:n,columnRowGroupChanged:n,rowDataUpdated:()=>{this.gos.get("groupDefaultExpanded")!==0&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(n)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:r=>{(r.newPage||r.newPageSize)&&o("pagination",this.getPaginationState())}})}setupStateOnFirstDataRendered(){let{scroll:e,cellSelection:t,focusedCell:i,columnOrder:s,rowPinning:o}=this.getInitialState();i&&this.setFocusedCellState(i),t&&this.setCellSelectionState(t),e&&this.setScrollState(e),o&&this.setRowPinningState(o),this.setColumnPivotState(!!s?.orderedColIds);let n=this.updateCachedState.bind(this);n("sideBar",this.getSideBarState()),n("focusedCell",this.getFocusedCellState());let r=this.getRangeSelectionState();n("rangeSelection",r),n("cellSelection",r),n("scroll",this.getScrollState()),this.addManagedEventListeners({cellFocused:()=>n("focusedCell",this.getFocusedCellState()),cellSelectionChanged:a=>{if(a.finished){let l=this.getRangeSelectionState();n("rangeSelection",l),n("cellSelection",l)}},bodyScrollEnd:()=>n("scroll",this.getScrollState()),pinnedRowsChanged:()=>n("rowPinning",this.getRowPinningState())})}getColumnState(){let e=this.beans;return Rw(qi(e),e.colModel.isPivotMode())}setColumnState(e){let{sort:t,rowGroup:i,aggregation:s,pivot:o,columnPinning:n,columnVisibility:r,columnSizing:a,columnOrder:l,partialColumnState:d}=e,c={},u=m=>{let C=c[m];return C||(C={colId:m},c[m]=C,C)},h=d?{}:{sort:null,sortIndex:null,rowGroup:null,rowGroupIndex:null,aggFunc:null,pivot:null,pivotIndex:null,pinned:null,hide:null,flex:null};t&&(t.sortModel.forEach(({colId:m,sort:C},v)=>{let w=u(m);w.sort=C,w.sortIndex=v}),h.sort=null,h.sortIndex=null),i&&(i.groupColIds.forEach((m,C)=>{let v=u(m);v.rowGroup=!0,v.rowGroupIndex=C}),h.rowGroup=null,h.rowGroupIndex=null),s&&(s.aggregationModel.forEach(({colId:m,aggFunc:C})=>{u(m).aggFunc=C}),h.aggFunc=null),o&&(o.pivotColIds.forEach((m,C)=>{let v=u(m);v.pivot=!0,v.pivotIndex=C}),this.gos.updateGridOptions({options:{pivotMode:o.pivotMode},source:"gridInitializing"}),h.pivot=null,h.pivotIndex=null),n&&(n.leftColIds.forEach(m=>{u(m).pinned="left"}),n.rightColIds.forEach(m=>{u(m).pinned="right"}),h.pinned=null),r&&(r.hiddenColIds.forEach(m=>{u(m).hide=!0}),h.hide=null),a&&(a.columnSizingModel.forEach(({colId:m,flex:C,width:v})=>{let w=u(m);w.flex=C??null,w.width=v}),h.flex=null);let g=l?.orderedColIds,p=!!g?.length,f=p?g.map(m=>u(m)):Object.values(c);f.length&&(this.columnStates=f,be(this.beans,{state:f,applyOrder:p,defaultState:h},"gridInitializing"))}setColumnPivotState(e){let t=this.columnStates;this.columnStates=void 0;let i=this.columnGroupStates;this.columnGroupStates=void 0;let s=this.beans,{pivotResultCols:o,colGroupSvc:n}=s;if(o?.isPivotResultColsPresent()){if(t){let r=[];for(let a of t)o.getPivotResultCol(a.colId)&&r.push(a);be(s,{state:r,applyOrder:e},"gridInitializing")}i&&n?.setColumnGroupState(i,"gridInitializing")}}getColumnGroupState(){let e=this.beans.colGroupSvc;if(!e)return;let t=e.getColumnGroupState();return xw(t)}setColumnGroupState(e){let t=this.beans.colGroupSvc;if(!Object.prototype.hasOwnProperty.call(e,"columnGroup")||!t)return;let i=new Set(e.columnGroup?.openColumnGroupIds),o=t.getColumnGroupState().map(({groupId:n})=>{let r=i.has(n);return r&&i.delete(n),{groupId:n,open:r}});i.forEach(n=>{o.push({groupId:n,open:!0})}),o.length&&(this.columnGroupStates=o),t.setColumnGroupState(o,"gridInitializing")}getFilterState(){let e=this.beans.filterManager,t=e?.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);let i=e?.getAdvFilterModel()??void 0;return t||i?{filterModel:t,advancedFilterModel:i}:void 0}setFilterState(e){let t=this.beans.filterManager,{filterModel:i,advancedFilterModel:s}=e??{};i&&t?.setFilterModel(i,"columnFilter"),s&&t?.setAdvFilterModel(s,"advancedFilter")}getRangeSelectionState(){let e=this.beans.rangeSvc?.getCellRanges().map(t=>{let{id:i,type:s,startRow:o,endRow:n,columns:r,startColumn:a}=t;return{id:i,type:s,startRow:o,endRow:n,colIds:r.map(l=>l.getColId()),startColId:a.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){let{gos:t,rangeSvc:i,colModel:s,visibleCols:o}=this.beans;if(!Oe(t)||!i)return;let n=[];e.cellRanges.forEach(r=>{let a=[];if(r.colIds.forEach(d=>{let c=s.getCol(d);c&&a.push(c)}),!a.length)return;let l=s.getCol(r.startColId);if(!l){let d=o.allCols,c=new Set(a);l=d.find(u=>c.has(u))}n.push(O(R({},r),{columns:a,startColumn:l}))}),i.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;let e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:i}=e?.getVScrollPosition()??{top:0};return i||t?{top:i,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;let{top:t,left:i}=e,{frameworkOverrides:s,rowRenderer:o,animationFrameSvc:n,ctrlsSvc:r}=this.beans;s.wrapIncoming(()=>{r.get("center").setCenterViewportScrollLeft(i),r.getScrollFeature()?.setVerticalScrollPosition(t),o.redraw({afterScroll:!0}),n?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;let e=this.beans.focusSvc.getFocusedCell();if(e){let{column:t,rowIndex:i,rowPinned:s}=e;return{colId:t.getColId(),rowIndex:i,rowPinned:s}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;let{colId:t,rowIndex:i,rowPinned:s}=e,{focusSvc:o,colModel:n}=this.beans;o.setFocusedCell({column:n.getCol(t),rowIndex:i,rowPinned:s,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){let{pagination:e,gos:t}=this.beans;if(!e)return;let i=e.getCurrentPage(),s=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!i&&!s))return{page:i,pageSize:s}}setPaginationState(e){let{pagination:t,gos:i}=this.beans;t&&(e.pageSize&&!i.get("paginationAutoPageSize")&&t.setPageSize(e.pageSize,"initialState"),typeof e.page=="number"&&t.setPage(e.page))}getRowSelectionState(){let e=this.beans.selectionSvc;if(!e)return;let t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e){this.beans.selectionSvc?.setSelectionState(e,"gridInitializing")}getRowGroupExpansionState(){let{expansionSvc:e,rowModel:t}=this.beans;if(!e)return;let i=[];return t.forEachNode(({expanded:s,id:o})=>{s&&o&&i.push(o)}),i.length?{expandedRowGroupIds:i}:void 0}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){this.beans.pinnedRowModel?.setPinnedState(e)}setRowGroupExpansionState(e){this.beans.expansionSvc?.expandRows(e.expandedRowGroupIds)}updateColumnState(e){let t=this.getColumnState(),i=!1,s=this.cachedState;for(let o of Object.keys(t)){let n=t[o];ai(n,s[o])||(i=!0)}this.cachedState=R(R({},s),t),i&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){let i=this.cachedState[e];this.setCachedStateValue(e,t),ai(t,i)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState=O(R({},this.cachedState),{[e]:t})}refreshStaleState(){let e=this.staleStateKeys;e.forEach(t=>{switch(t){case"rowSelection":this.setCachedStateValue(t,this.getRowSelectionState());break}}),e.clear()}dispatchStateUpdateEvent(e){this.suppressEvents||(e.forEach(t=>this.queuedUpdateSources.add(t)),this.dispatchStateUpdateEventDebounced())}dispatchQueuedStateUpdateEvents(){let e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}suppressEventsAndDispatchInitEvent(e){this.suppressEvents=!0;let t=this.beans.colAnimation;t?.setSuppressAnimation(!0),e(),setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(t?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent(["gridInitializing"]))})}},ey={moduleName:"GridState",version:D,beans:[Jb],apiFunctions:{getState:Yb}};function ty(e){return e.rowModel.isLastRowIndexKnown()}function iy(e){return e.pagination?.getPageSize()??100}function sy(e){return e.pagination?.getCurrentPage()??0}function oy(e){return e.pagination?.getTotalPages()??1}function ny(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function ry(e){e.pagination?.goToNextPage()}function ay(e){e.pagination?.goToPreviousPage()}function ly(e){e.pagination?.goToFirstPage()}function dy(e){e.pagination?.goToLastPage()}function cy(e,t){e.pagination?.goToPage(t)}var uy=class extends y{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;let t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;let e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){let t=this.beans,i=()=>{let s=Math.max(it(t),1),o=Math.floor(e/s);t.pagination.setPageSize(o,"autoCalculated")};this.isBodyRendered?Q(this,i,50)():(i(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},jt="paginationPageSizeSelector",hy={tag:"span",cls:"ag-paging-page-size"},gy=class extends V{constructor(){super(hy),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;let e=this.selectPageSizeComp.getValue();if(!e)return;let t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(jt,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;let t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){J(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(jt)!==!1}reloadPageSizesSelector(){let e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),i=!t||!e.includes(t);if(i){let o=this.gos.exists("paginationPageSize"),n=this.gos.get(jt)!==!0;F(94,{pageSizeSet:o,pageSizesSet:n,pageSizeOptions:e,paginationPageSizeOption:t}),n||F(95,{paginationPageSizeOption:t,paginationPageSizeSelector:jt}),e.unshift("")}let s=String(i?"":t);this.selectPageSizeComp?(gt(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(s,!0)):this.createPageSizeSelectorComp(e,s),this.hasEmptyOption=i}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){let i=this.getLocaleTextFunc(),s=i("pageSizeSelectorLabel","Page Size:"),o=i("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Xo).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(o).setLabel(s).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){let e=[20,50,100],t=this.gos.get(jt);return!Array.isArray(t)||!t?.length?e:[...t].sort((i,s)=>i-s)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},py={selector:"AG-PAGE-SIZE-SELECTOR",component:gy},fy=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:max(var(--ag-row-height),22px);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}",my=class extends Ja{constructor(){super(),this.btFirst=E,this.btPrevious=E,this.btNext=E,this.btLast=E,this.lbRecordCount=E,this.lbFirstRowOnPage=E,this.lbLastRowOnPage=E,this.lbCurrent=E,this.lbTotal=E,this.pageSizeComp=E,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(fy)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){let e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[py]);let{btFirst:t,btPrevious:i,btNext:s,btLast:o}=this;this.activateTabIndex([t,i,s,o]),t.insertAdjacentElement("afterbegin",ge(e?"last":"first",this.beans)),i.insertAdjacentElement("afterbegin",ge(e?"next":"previous",this.beans)),s.insertAdjacentElement("afterbegin",ge(e?"previous":"next",this.beans)),o.insertAdjacentElement("afterbegin",ge(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(n):Ou(this.beans,n),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){let t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){this.areListenersSetup||(this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)}),[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}].forEach(e=>{let{el:t,fn:i}=e;this.addManagedListeners(t,{click:i,keydown:s=>{(s.key===b.ENTER||s.key===b.SPACE)&&(s.preventDefault(),i())}})}),Lu(this.beans,this,this.getGui()),this.areListenersSetup=!0)}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){let t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):Pw(e,this.getLocaleTextFunc.bind(this))}getTemplate(){let e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){let e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),i=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);let s=this.isZeroPagesToDisplay(),o=e===i-1;this.nextButtonDisabled=o||s,this.lastButtonDisabled=!t||s||e===i-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){ud(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){let e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){let e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),i=this.pagination.getMasterRowCount(),s=e?i:null,o=this.pagination.getCurrentPage(),n=this.pagination.getPageSize(),r,a;this.isZeroPagesToDisplay()?r=a=0:(r=n*o+1,a=r+n-1,e&&a>s&&(a=s));let l=r+n-1,d=!e&&i<l,c=this.formatNumber(r);this.lbFirstRowOnPage.textContent=c;let u,h=this.getLocaleTextFunc();d?u=h("pageLastRowUnknown","?"):u=this.formatNumber(a),this.lbLastRowOnPage.textContent=u;let p=t>0?o+1:0,f=this.formatNumber(p);this.lbCurrent.textContent=f;let m,C;if(e)m=this.formatNumber(t),C=this.formatNumber(s);else{let v=h("more","more");m=v,C=v}this.lbTotal.textContent=m,this.lbRecordCount.textContent=C,this.announceAriaStatus(c,u,C,f,m)}announceAriaStatus(e,t,i,s,o){let n=this.getLocaleTextFunc(),r=n("page","Page"),a=n("to","to"),l=n("of","of"),d=`${e} ${a} ${t} ${l} ${i}`,c=`${r} ${s} ${l} ${o}`;d!==this.ariaRowStatus&&(this.ariaRowStatus=d,this.ariaAnnounce?.announceValue(d,"paginationRow")),c!==this.ariaPageStatus&&(this.ariaPageStatus=c,this.ariaAnnounce?.announceValue(c,"paginationPage"))}setTotalLabelsToZero(){let e=this.formatNumber(0);this.lbFirstRowOnPage.textContent=e,this.lbCurrent.textContent=e,this.lbLastRowOnPage.textContent=e,this.lbTotal.textContent=e,this.lbRecordCount.textContent=e,this.announceAriaStatus(e,e,e,e,e)}},Cy={selector:"AG-PAGINATION",component:my},vy=class extends y{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){let e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return Cy}isPaginateChildRows(){let e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){let t=this.currentPage;!this.active||t===e||typeof t!="number"||(this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0}))}goToPageWithIndex(e){if(!this.active)return;let t=e;this.paginateChildRows||(t=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(e)??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){let e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return P(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:P(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:P(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:P(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;let e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){let i=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}i!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){let e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);let t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){let e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}let i=this.pageSize,s=t-1;this.totalPages=Math.floor(s/i)+1,this.adjustCurrentPageIfInvalid();let o=this.currentPage,n=i*o,r=i*(o+1)-1;if(r>s&&(r=s),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(n),r===s)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{let a=e.getTopLevelRowDisplayedIndex(r+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){let e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}let{pageSize:t,currentPage:i}=this,s=e-1;this.totalPages=Math.floor(s/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*i,this.bottomDisplayedRowIndex=t*(i+1)-1,this.bottomDisplayedRowIndex>s&&(this.bottomDisplayedRowIndex=s)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){let{keepRenderedRows:t=!1,newPage:i=!1,newPageSize:s=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:i,newPageSize:s,keepRenderedRows:t})}},wy={moduleName:"Pagination",version:D,beans:[vy,uy],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:ty,paginationGetPageSize:iy,paginationGetCurrentPage:sy,paginationGetTotalPages:oy,paginationGetRowCount:ny,paginationGoToNextPage:ry,paginationGoToPreviousPage:ay,paginationGoToFirstPage:ly,paginationGoToLastPage:dy,paginationGoToPage:cy},dependsOn:[gs]};function Sy(e,t={}){let i=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(i))}function Jl(e,t,i,s,o){t&&(s&&t.parent&&t.parent.level!==-1&&Jl(e,t.parent,i,s,o),t.setExpanded(i,void 0,o))}function by(e,t){return e.rowModel.getRowNode(t)}function yy(e,t,i,s){e.rowRenderer.addRenderedRowListener(t,i,s)}function Ry(e){return e.rowRenderer.getRenderedNodes()}function xy(e,t,i){e.rowModel.forEachNode(t,i)}function Fy(e){return e.rowRenderer.firstRenderedRow}function Ey(e){return e.rowRenderer.lastRenderedRow}function Py(e,t){return e.rowModel.getRow(t)}function Dy(e){return e.rowModel.getRowCount()}var My={moduleName:"RowApi",version:D,apiFunctions:{redrawRows:Sy,setRowNodeExpanded:Jl,getRowNode:by,addRenderedRowListener:yy,getRenderedNodes:Ry,forEachNode:xy,getFirstDisplayedRowIndex:Fy,getLastDisplayedRowIndex:Ey,getDisplayedRowAtIndex:Py,getDisplayedRowCount:Dy}},Ty={moduleName:"ScrollApi",version:D,apiFunctions:{getVerticalPixelRange:aS,getHorizontalPixelRange:lS,ensureColumnVisible:Yl,ensureIndexVisible:Ql,ensureNodeVisible:dS}};function Ay(e,t,i){if(!t)return;let s=e.ctrlsSvc.getGridBodyCtrl().eGridBody,o=`aria-${t}`;i===null?s.removeAttribute(o):s.setAttribute(o,i)}function ky(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function Iy(e){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getHeaderRowContainerCtrls().forEach(t=>t.refresh()))}function Ly(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function Oy(e){e.animationFrameSvc?.flushAllFrames()}function Hy(e){return{rowHeight:it(e),headerHeight:Si(e)}}function Gy(e,t={}){let i=[];if(e.rowRenderer.getCellCtrls(t.rowNodes,t.columns).forEach(n=>{let r=n.getCellRenderer();r!=null&&i.push(ui(r))}),t.columns?.length)return i;let s=[],o=yo(t.rowNodes);return e.rowRenderer.getAllRowCtrls().forEach(n=>{if(o&&!Ro(n.rowNode,o)||!n.isFullWidth())return;let r=n.getFullWidthCellRenderers();for(let a=0;a<r.length;a++){let l=r[a];l!=null&&s.push(ui(l))}}),[...s,...i]}var By={moduleName:"RenderApi",version:D,apiFunctions:{setGridAriaProperty:Ay,refreshCells:ky,refreshHeader:Iy,isAnimationFrameQueueEmpty:Ly,flushAllAnimationFrames:Oy,getSizesForCurrentTheme:Hy,getCellRendererInstances:Gy}};function Vy(e,t){typeof t=="number"?e.colAutosize?.sizeColumnsToFit(t,"api"):e.colAutosize?.sizeColumnsToFitGridBody(t)}function Ny(e,t,i){e.colAutosize?.autoSizeCols({colKeys:t,skipHeader:i,source:"api"})}function zy(e,t){e.colAutosize?.autoSizeAllColumns("api",t)}var Wy=class extends y{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}autoSizeCols(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeCols(e));return}let{colKeys:t,skipHeader:i,skipHeaderGroups:s,stopAtGroup:o,source:n="api"}=e,{animationFrameSvc:r,renderStatus:a,colModel:l,autoWidthCalc:d,visibleCols:c}=this.beans;if(r?.flushAllFrames(),this.timesDelayed<5&&a&&!a.areHeaderCellsRendered()){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.autoSizeCols(e)});return}this.timesDelayed=0;let u=[],h=-1,g=i??this.gos.get("skipHeaderOnAutoSize"),p=s??g;for(;h!==0;){h=0;let f=[];t.forEach(m=>{if(!m)return;let C=l.getCol(m);if(!C||st(C)||u.indexOf(C)>=0)return;let v=d.getPreferredWidthForColumn(C,g);if(v>0){let w=_y(C,v);C.setActualWidth(w,n),u.push(C),h++}f.push(C)}),f.length&&c.refresh(n)}p||this.autoSizeColumnGroupsByColumns(t,n,o),kt(this.eventSvc,u,!0,"autosizeColumns")}autoSizeColumn(e,t,i){e&&this.autoSizeCols({colKeys:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){let{colModel:s,ctrlsSvc:o}=this.beans,n=new Set;s.getColsForKeys(e).forEach(d=>{let c=d.getParent();for(;c&&c!=i;)c.isPadding()||n.add(c),c=c.getParent()});let a,l=[];for(let d of n){for(let c of o.getHeaderRowContainerCtrls())if(a=c.getHeaderCtrlForColumn(d),a)break;a&&a.resizeLeafColumnsToFit(t)}return l}autoSizeAllColumns(e,t){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e,t));return}let i=this.beans.visibleCols.allCols;this.autoSizeCols({colKeys:i,skipHeader:t,source:e})}addColumnAutosize(e,t){let i=this.gos.get("skipHeaderOnAutoSize"),s=()=>{this.autoSizeColumn(t,"uiColumnResized",i)};e.addEventListener("dblclick",s);let o=new Qe(e);return o.addEventListener("doubleTap",s),()=>{e.removeEventListener("dblclick",s),o.removeEventListener("doubleTap",s),o.destroy()}}addColumnGroupResize(e,t,i){let s=this.gos.get("skipHeaderOnAutoSize"),o=()=>{let n=[];t.getDisplayedLeafColumns().forEach(a=>{a.getColDef().suppressAutoSize||n.push(a.getColId())}),n.length>0&&this.autoSizeCols({colKeys:n,skipHeader:s,stopAtGroup:t,source:"uiColumnResized"}),i()};return e.addEventListener("dblclick",o),()=>e.removeEventListener("dblclick",o)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;let{ctrlsSvc:i,scrollVisibleSvc:s}=this.beans,o=i.getGridBodyCtrl(),r=o.isVerticalScrollShowing()?s.getScrollbarWidth():0,l=ri(o.eGridBody)-r;if(l>0){this.sizeColumnsToFit(l,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):F(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",i,s){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,i,s));return}let o={};s&&s?.columnLimits?.forEach(f=>{var m=f,{key:g}=m,p=vs(m,["key"]);o[typeof g=="string"?g:g.getColId()]=p});let n=this.beans.visibleCols.allCols;if(e<=0||!n.length||e===Ae(n)&&n.every(p=>{if(p.colDef.suppressSizeToFit)return!0;let f=o?.[p.getId()],m=f?.minWidth??s?.defaultMinWidth,C=f?.maxWidth??s?.defaultMaxWidth,v=p.getActualWidth();return(m==null||v>=m)&&(C==null||v<=C)}))return;let a=[],l=[];n.forEach(g=>{g.getColDef().suppressSizeToFit===!0?l.push(g):a.push(g)});let d=a.slice(0),c=!1,u=g=>{me(a,g),l.push(g)};for(a.forEach(g=>{g.resetActualWidth(t);let p=o?.[g.getId()],f=p?.minWidth??s?.defaultMinWidth,m=p?.maxWidth??s?.defaultMaxWidth,C=g.getActualWidth();typeof f=="number"&&C<f?g.setActualWidth(f,t,!0):typeof m=="number"&&C>m&&g.setActualWidth(m,t,!0)});!c;){c=!0;let g=e-Ae(l);if(g<=0)a.forEach(p=>{let f=o?.[p.getId()]?.minWidth??s?.defaultMinWidth;if(typeof f=="number"){p.setActualWidth(f,t,!0);return}p.setActualWidth(p.minWidth,t)});else{let p=g/Ae(a),f=g;for(let m=a.length-1;m>=0;m--){let C=a[m],v=o?.[C.getId()],w=v?.minWidth??s?.defaultMinWidth,T=v?.maxWidth??s?.defaultMaxWidth,A=C.getMinWidth(),M=C.getMaxWidth(),k=typeof w=="number"&&w>A?w:A,G=typeof T=="number"&&T<M?T:M,H=Math.round(C.getActualWidth()*p);H<k?(H=k,u(C),c=!1):H>G?(H=G,u(C),c=!1):m===0&&(H=f),C.setActualWidth(H,t,!0),f-=H}}}d.forEach(g=>{g.fireColumnWidthChangedEvent(t)});let h=this.beans.visibleCols;h.setLeftValues(t),h.updateBodyWidths(),!i&&kt(this.eventSvc,d,!0,t)}applyAutosizeStrategy(){let e=this.gos.get("autoSizeStrategy");if(!e)return;let{type:t}=e;setTimeout(()=>{if(t==="fitGridWidth"){let{columnLimits:i,defaultMinWidth:s,defaultMaxWidth:o}=e,n=i?.map(({colId:r,minWidth:a,maxWidth:l})=>({key:r,minWidth:a,maxWidth:l}));this.sizeColumnsToFitGridBody({defaultMinWidth:s,defaultMaxWidth:o,columnLimits:n})}else t==="fitProvidedWidth"&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}onFirstDataRendered(){let e=this.gos.get("autoSizeStrategy");if(e?.type!=="fitCellContents")return;let{colIds:t,skipHeader:i}=e;setTimeout(()=>{t?this.autoSizeCols({colKeys:t,skipHeader:i,source:"autosizeColumns"}):this.autoSizeAllColumns("autosizeColumns",i)})}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function _y(e,t){let i=e.getMinWidth();t<i&&(t=i);let s=e.getMaxWidth();return e.isGreaterThanMax(t)&&(t=s),t}var Uy={moduleName:"ColumnAutoSize",version:D,beans:[Wy],apiFunctions:{sizeColumnsToFit:Vy,autoSizeColumns:Ny,autoSizeAllColumns:zy},dependsOn:[al]},$y=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function Ky(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function jy(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function qy(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function Yy(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function Qy(e,t,i){return e.pinnedRowModel?.forEachPinnedRow(t,i)}var Zy={moduleName:"PinnedRow",version:D,beans:[Hg],css:[$y],apiFunctions:{getPinnedTopRowCount:Ky,getPinnedBottomRowCount:jy,getPinnedTopRow:qy,getPinnedBottomRow:Yy,forEachPinnedRow:Qy},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},Xy=class extends Jt{constructor(e,t,i){super(e.col,e.firstNode,i,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,i,s,o,n,r){this.eWrapper=i,super.setComp(e,t,i,s,o,n,r),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){this.rowNode.rowIndex!=null&&Fo(this.eGui,this.rowNode.rowIndex)}setAriaRowSpan(){md(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){let e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){let{beans:t}=this;if(ds(t)){this.focusedCellPosition=void 0;return}let i=this.isCellFocused();i||(this.focusedCellPosition=void 0),e&&i&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},Jy=class extends ss{onRowIndexChanged(){super.onRowIndexChanged(),this.getAllCellCtrls().forEach(e=>e.refreshAriaRowIndex())}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){let t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new Xy(t,this,this.beans)}isCorrectCtrlForSpan(e){let t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},e1=class extends y{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){let{rowSpanSvc:t}=this.beans,i=`${e}Ctrls`,s=this[i],o=s.size,n=this.getAllRelevantRowControls(e),r=new Map,a=!1;for(let d of n)d.isAlive()&&t?.forEachSpannedColumn(d.rowNode,(c,u)=>{if(r.has(u.firstNode))return;let h=s.get(u.firstNode);if(h){r.set(u.firstNode,h),s.delete(u.firstNode);return}a=!0;let g=new Jy(u.firstNode,this.beans,!1,!1,!1);r.set(u.firstNode,g)});this[i]=r;let l=r.size===o;if(!(!a&&l)){for(let d of s.values())d.destroyFirstPass(!0),d.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){let{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){let{rowSpanSvc:t}=this.beans,i=t?.getCellSpanByPosition(e);if(!i)return;let s=`${ed(e.rowPinned)}Ctrls`,o=this[s].get(i.firstNode);if(o)return o.getAllCellCtrls().find(n=>n.column===e.column)}getCtrls(e){let t=`${e}Ctrls`;return[...this[t].values()]}destroyRowCtrls(e){let t=`${e}Ctrls`;for(let i of this[t].values())i.destroyFirstPass(!0),i.destroySecondPass();this[t]=new Map}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},ed=e=>e??"center",t1=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){let e=this.firstNode.__autoHeights?.[this.col.getColId()];if(e==null)return;let t=0;return this.spannedNodes.forEach(i=>{i!==this.lastNode&&(t+=i.rowHeight)}),e-t}},i1=class extends y{constructor(e){super(),this.column=e}buildCache(e){let{column:t,beans:{gos:i,pinnedRowModel:s,rowModel:o,valueSvc:n,pagination:r}}=this,{colDef:a}=t,l=this[`${e}ValueNodeMap`],d=new Map,c=i.getCallback("isFullWidthRow"),u=a.equals,h=a.spanRows,g=typeof h=="function",p=null,f=null,m,C=(w,T)=>{p=w,f=null,m=T},v=w=>{let T=!w.isExpandable()&&!w.group&&!w.detail&&(c?!c({rowNode:w}):!0);if(w.rowIndex==null||!T){C(null,null);return}if(p==null||w.level!==p.level||w.footer||f&&w.rowIndex-1!==f?.getLastNode().rowIndex){C(w,n.getValue(t,w));return}let A=n.getValue(t,w);if(g){let M=I(i,{valueA:m,nodeA:p,valueB:A,nodeB:w,column:t,colDef:a});if(!h(M)){C(w,A);return}}else if(u?!u(m,A):m!==A){C(w,A);return}if(!f){let M=l?.get(p);M?.firstNode===p?(M.reset(),f=M):f=new t1(t,p),d.set(p,f)}f.addSpannedNode(w),d.set(w,f)};switch(e){case"center":o.forEachDisplayedNode?.(w=>{(!r||r.isRowInPage(w.rowIndex))&&v(w)});break;case"top":s?.forEachPinnedRow("top",v);break;case"bottom":s?.forEachPinnedRow("bottom",v);break}this[`${e}ValueNodeMap`]=d}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this[`${ed(e.rowPinned)}ValueNodeMap`].get(e)}},s1=class extends y{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=Q(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=Q(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){let e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){let{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;let i=this.createManagedBean(new i1(e));this.spanningColumns.set(e,i),i.buildCache("top"),i.buildCache("bottom"),i.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){let{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t?.createCtrls("top"),t?.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t?.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){let i=this.spanningColumns.get(e);return i?i.isCellSpanning(t):!1}getCellSpanByPosition(e){let{pinnedRowModel:t,rowModel:i}=this.beans,s=e.column,o=e.rowIndex,n=this.spanningColumns.get(s);if(!n)return;let r;switch(e.rowPinned){case"top":r=t?.getPinnedTopRow(o);break;case"bottom":r=t?.getPinnedBottomRow(o);break;default:r=i.getRow(o)}if(r)return n.getCellSpan(r)}getCellStart(e){let t=this.getCellSpanByPosition(e);return t?O(R({},e),{rowIndex:t.firstNode.rowIndex}):e}getCellEnd(e){let t=this.getCellSpanByPosition(e);return t?O(R({},e),{rowIndex:t.getLastNode().rowIndex}):e}getCellSpan(e,t){let i=this.spanningColumns.get(e);if(i)return i.getCellSpan(t)}forEachSpannedColumn(e,t){for(let[i,s]of this.spanningColumns)if(s.isCellSpanning(e)){let o=s.getCellSpan(e);t(i,o)}}destroy(){super.destroy(),this.spanningColumns.clear()}},o1={moduleName:"CellSpan",version:D,beans:[s1,e1]},n1=class extends y{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){let{column:e,cellComp:t}=this,i=e.colDef,s=i.cellClassRules,o=this.getCellClassParams(e,i);_o(this.beans.expressionSvc,s===this.cellClassRules?void 0:this.cellClassRules,s,o,n=>t.toggleCss(n,!0),n=>t.toggleCss(n,!1)),this.cellClassRules=s}applyUserStyles(){let e=this.column,t=e.colDef,i=t.cellStyle;if(!i)return;let s;if(typeof i=="function"){let o=this.getCellClassParams(e,t);s=i(o)}else s=i;s&&this.cellComp.setUserStyles(s)}applyClassesFromColDef(){let{column:e,cellComp:t}=this,i=e.colDef,s=this.getCellClassParams(e,i);this.staticClasses.forEach(n=>t.toggleCss(n,!1));let o=this.beans.cellStyles.getStaticCellClasses(i,s);this.staticClasses=o,o.forEach(n=>t.toggleCss(n,!0))}getCellClassParams(e,t){let{value:i,rowNode:s}=this.cellCtrl;return I(this.beans.gos,{value:i,data:s.data,node:s,colDef:t,column:e,rowIndex:s.rowIndex})}},r1=class extends y{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,i,s){_o(this.beans.expressionSvc,void 0,e.cellClassRules,t,i,s),this.processStaticCellClasses(e,t,i)}getStaticCellClasses(e,t){let{cellClass:i}=e;if(!i)return[];let s;return typeof i=="function"?s=i(t):s=i,typeof s=="string"&&(s=[s]),s||[]}createCellCustomStyleFeature(e,t){return new n1(e,t)}processStaticCellClasses(e,t,i){this.getStaticCellClasses(e,t).forEach(o=>{i(o)})}},a1={moduleName:"CellStyle",version:D,beans:[r1]},l1={moduleName:"RowStyle",version:D,beans:[wh]};function d1(e,t){return!!e.colHover?.isHovered(t)}var c1=class extends y{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=i=>{let{beans:s,gos:o,element:n,columns:r}=this,a=s.colHover;i??!!o.get("columnHoverHighlight")?this.destroyManagedListeners=this.addManagedElementListeners(n,{mouseover:a.setMouseOver.bind(a,r),mouseout:a.clearMouseOver.bind(a)}):(this.destroyManagedListeners.forEach(d=>d()),this.destroyManagedListeners=[])}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},u1="ag-column-hover",h1=class extends y{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;let t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,i){let s=()=>{let o=this.isHovered(i);t.toggleCss("ag-column-hover",o)};e.addManagedEventListeners({columnHoverChanged:s}),s()}onCellColumnHover(e,t){if(!t)return;let i=this.isHovered(e);t.toggleCss(u1,i)}addHeaderFilterColumnHoverListener(e,t,i,s){this.createHoverFeature(e,[i],s);let o=()=>{let n=this.isHovered(i);t.toggleCss("ag-column-hover",n)};e.addManagedEventListeners({columnHoverChanged:o}),o()}createHoverFeature(e,t,i){e.createManagedBean(new c1(t,i))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},g1={moduleName:"ColumnHover",version:D,beans:[h1],apiFunctions:{isColumnHovered:d1}},p1=class extends y{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addEventListener(e,t){let i=this.wrapSvc?.wrap(e,t)??t,s=!Gi.has(e),o=s?this.asyncListeners:this.syncListeners;o.has(e)||o.set(e,new Set),o.get(e).add(i),this.eventSvc.addEventListener(e,i,s)}removeEventListener(e,t){let i=this.wrapSvc?.unwrap(e,t)??t,o=!!this.asyncListeners.get(e)?.delete(i);o||this.syncListeners.get(e)?.delete(i),this.eventSvc.removeEventListener(e,i,o)}addGlobalListener(e){let t=this.wrapSvc?.wrapGlobal(e)??e,i=(n,r)=>{Gi.has(n)&&t(n,r)},s=(n,r)=>{Gi.has(n)||t(n,r)};this.globalListenerPairs.set(e,{syncListener:i,asyncListener:s});let o=this.eventSvc;o.addGlobalListener(i,!1),o.addGlobalListener(s,!0)}removeGlobalListener(e){let{eventSvc:t,wrapSvc:i,globalListenerPairs:s}=this,o=i?.unwrapGlobal(e)??e;if(s.has(o)){let{syncListener:r,asyncListener:a}=s.get(o);t.removeGlobalListener(r,!1),t.removeGlobalListener(a,!0),s.delete(e)}else this.syncGlobalListeners.delete(o),t.removeGlobalListener(o,!1)}destroyEventListeners(e,t){e.forEach((i,s)=>{i.forEach(o=>this.eventSvc.removeEventListener(s,o,t)),i.clear()}),e.clear()}destroyGlobalListeners(e,t){e.forEach(i=>this.eventSvc.removeGlobalListener(i,t)),e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);let{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:i,asyncListener:s})=>{t.removeGlobalListener(i,!1),t.removeGlobalListener(s,!0)}),e.clear()}};function f1(e,t,i){e.apiEventSvc?.addEventListener(t,i)}function m1(e,t,i){e.apiEventSvc?.removeEventListener(t,i)}function C1(e,t){e.apiEventSvc?.addGlobalListener(t)}function v1(e,t){e.apiEventSvc?.removeGlobalListener(t)}var w1={moduleName:"EventApi",version:D,apiFunctions:{addEventListener:f1,addGlobalListener:C1,removeEventListener:m1,removeGlobalListener:v1},beans:[p1]},S1=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);white-space:normal}.ag-tooltip,.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",b1=class extends y{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,i,s){e&&t.destroyBean(e);let o=Bs(this.gos),{column:n,eGui:r}=t,a=n.getColDef();!s&&o&&!a.headerComponent&&(s=Hi(()=>r.querySelector(".ag-header-cell-text")));let l={getColumn:()=>n,getColDef:()=>n.getColDef(),getGui:()=>r,getLocation:()=>"header",getTooltipValue:()=>i??n.getColDef().headerTooltip,shouldDisplayTooltip:s},d=this.createTooltipFeature(l);return d&&(d=t.createBean(d),t.setRefreshFunction("tooltip",()=>d.refreshTooltip())),d}setupHeaderGroupTooltip(e,t,i,s){e&&t.destroyBean(e);let o=Bs(this.gos),{column:n,eGui:r}=t,a=n.getColGroupDef();!s&&o&&!a?.headerGroupComponent&&(s=Hi(()=>r.querySelector(".ag-header-group-text")));let l={getColumn:()=>n,getGui:()=>r,getLocation:()=>"headerGroup",getTooltipValue:()=>i??(a&&a.headerTooltip),shouldDisplayTooltip:s};a&&(l.getColDef=()=>a);let d=this.createTooltipFeature(l);return d&&t.createBean(d)}enableCellTooltipFeature(e,t,i){let{column:s,rowNode:o}=e,n=()=>{let l=s.getColDef(),d=o.data;if(l.tooltipField&&P(d))return Xt(d,l.tooltipField,s.isTooltipFieldContainsDots());let c=l.tooltipValueGetter;return c?c(I(this.gos,{location:"cell",colDef:s.getColDef(),column:s,rowIndex:e.cellPosition.rowIndex,node:o,data:o.data,value:e.value,valueFormatted:e.valueFormatted})):null},r=Bs(this.gos);!i&&r&&!e.isCellRenderer()&&(i=Hi(()=>{let l=e.eGui;return l.children.length===0?l:l.querySelector(".ag-cell-value")}));let a={getColumn:()=>s,getColDef:()=>s.getColDef(),getRowIndex:()=>e.cellPosition.rowIndex,getRowNode:()=>o,getGui:()=>e.eGui,getLocation:()=>"cell",getTooltipValue:t!=null?()=>t:n,getValueFormatted:()=>e.valueFormatted,shouldDisplayTooltip:i};return this.createTooltipFeature(a,this.beans)}refreshRowTooltip(e,t,i,s){let o={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>i,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:s},n=this.beans,r=n.context;e&&t.destroyBean(e,r);let a=this.createTooltipFeature(o,n);return t.createBean(a,r)}initCol(e){let{colDef:t}=e;e.tooltipEnabled=P(t.tooltipField)||P(t.tooltipValueGetter)||P(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},y1={moduleName:"Tooltip",version:D,beans:[b1],dynamicBeans:{tooltipFeature:Xg},userComponents:{agTooltipComponent:Ew},dependsOn:[gs],css:[S1]},R1={moduleName:"Locale",version:D,beans:[yw]},x1=class extends y{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=Q(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){let{visibleCols:e,rowModel:t,rowSpanSvc:i,pinnedRowModel:s}=this.beans,o=e.autoHeightCols,n=!1,r=a=>{let l=a.__autoHeights,d=je(this.beans,a).height;for(let c of o){let u=l?.[c.getColId()],h=i?.getCellSpan(c,a);if(h){if(h.getLastNode()!==a)continue;if(u=i?.getCellSpan(c,a)?.getLastNodeAutoHeight(),!u)return}if(u==null){if(this.colSpanSkipCell(c,a))continue;return}d=Math.max(u,d)}d!==a.rowHeight&&(a.setRowHeight(d),n=!0)};s?.forEachPinnedRow?.("top",r),s?.forEachPinnedRow?.("bottom",r),t.forEachDisplayedNode?.(r),n&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,i){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[i.getId()];return}let s=e.__autoHeights[i.getId()];e.__autoHeights[i.getId()]=t,s!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){let{colModel:i,colViewport:s,visibleCols:o}=this.beans;if(!i.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=o.getLeftColsForRow(t);break;case"right":n=o.getRightColsForRow(t);break;case null:n=s.getColsWithinViewport(t);break}return!n.includes(e)}setupCellAutoHeight(e,t,i){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;let s=t.parentElement,{rowNode:o,column:n}=e,r=this.beans,a=c=>{if(e.editing||!e.isAlive()||!i.isAlive())return;let{paddingTop:u,paddingBottom:h,borderBottomWidth:g,borderTopWidth:p}=ht(s),f=u+h+g+p,C=t.offsetHeight+f;if(c<5){let v=q(r),w=!v||!v.contains(t),T=C==0;if(w||T){window.setTimeout(()=>a(c+1),0);return}}this.setRowAutoHeight(o,C,n)},l=()=>a(0);l();let d=qe(r,t,l);return i.addDestroyFunc(()=>{d(),this.setRowAutoHeight(o,void 0,n)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;let e=this.beans.rowRenderer.getAllRowCtrls(),t=null;for(let{rowNode:i}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(i).filter(o=>o.isAutoHeight())),t.length!==0){if(!i.__autoHeights)return!1;for(let s of t){let o=i.__autoHeights[s.getColId()];if(!o||i.rowHeight<o)return!1}}return!0}},F1={moduleName:"RowAutoHeight",version:D,beans:[x1]},k1={moduleName:"AllCommunity",version:D,dependsOn:[Sb,Db,Bb,zw,FS,ES,PS,DS,MS,TS,AS,xS,O0,H0,G0,L0,V0,N0,ey,ib,wy,fm,My,Ty,By,Uy,jp,Zy,KS,iw,a1,g1,l1,w1,nw,qb,y1,R1,F1,Kp,bb,o1]};var E1=(()=>{class e{constructor(){this.vcr=pn(bi)}static{this.\u0275fac=function(s){return new(s||e)}}static{this.\u0275cmp=Ss({type:e,selectors:[["ag-component-container"]],standalone:!1,decls:0,vars:0,template:function(s,o){},encapsulation:2})}}return e})(),sd=16,an=0;function P1(e){let t=new Map;for(let i=0;i<sd;i++){let s=e.createComponent(E1);t.set(i,s),se(s.location.nativeElement)}return t}var D1=new Set(["doesFilterPass","isFilterActive"]),td=(()=>{class e extends kl{setViewContainerRef(i,s){this.viewContainerRef=i,this.angularFrameworkOverrides=s}createWrapper(i){let s=this.angularFrameworkOverrides,o=this;o.compShards??=P1(this.viewContainerRef);class n extends ln{init(l){s.runInsideAngular(()=>{super.init(l),this._componentRef.changeDetectorRef.detectChanges()})}createComponent(){return o.createComponent(i)}hasMethod(l){return r.getFrameworkComponentInstance()[l]!=null}callMethod(l,d){let c=this.getFrameworkComponentInstance(),u=c[l];return D1.has(l)?u.apply(c,d):s.runInsideAngular(()=>u.apply(c,d))}addMethod(l,d){r[l]=d}}let r=new n;return r}createComponent(i){return an=(an+1)%sd,this.compShards.get(an).instance.vcr.createComponent(i)}static{this.\u0275fac=(()=>{let i;return function(o){return(i||(i=mn(e)))(o||e)}})()}static{this.\u0275prov=ws({token:e,factory:e.\u0275fac})}}return e})(),ln=class{init(t){this._params=t,this._componentRef=this.createComponent(),this._agAwareComponent=this._componentRef.instance,this._frameworkComponentInstance=this._componentRef.instance,this._eGui=this._componentRef.location.nativeElement,se(this._eGui),this._agAwareComponent.agInit(this._params)}getGui(){return this._eGui}getRootElement(){return this._eGui.firstChild}destroy(){this._frameworkComponentInstance&&typeof this._frameworkComponentInstance.destroy=="function"&&this._frameworkComponentInstance.destroy(),this._componentRef?.destroy()}getFrameworkComponentInstance(){return this._frameworkComponentInstance}},ms=class{constructor(t){this.frameworkOverrides=t,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(t,i){let{frameworkOverrides:s,wrappedListeners:o}=this,n=i;if(s.shouldWrapOutgoing){n=a=>{s.wrapOutgoing(()=>i(a))};let r=o.get(t);r||(r=new Map,o.set(t,r)),r.set(i,n)}return n}wrapGlobal(t){let{frameworkOverrides:i,wrappedGlobalListeners:s}=this,o=t;return i.shouldWrapOutgoing&&(o=(n,r)=>{i.wrapOutgoing(()=>t(n,r))},s.set(t,o)),o}unwrap(t,i){let{wrappedListeners:s}=this,o=s.get(t);if(o){let n=o.get(i);if(n)return o.delete(i),o.size===0&&s.delete(t),n}return i}unwrapGlobal(t){let{wrappedGlobalListeners:i}=this,s=i.get(t);return s?(i.delete(t),s):t}},id=(()=>{class e extends Jo{constructor(i){super("angular"),this._ngZone=i,this.batchFrameworkComps=!0,this.isRunningWithinTestZone=!1,this.wrapIncoming=(s,o)=>this.runOutside(s,o),this.wrapOutgoing=s=>this.runInsideAngular(s),this.isRunningWithinTestZone=window?.AG_GRID_UNDER_TEST??!!window?.Zone?.AsyncTestZoneSpec,this._ngZone?this.isRunningWithinTestZone?this.runOutside=(s,o)=>o==="resize-observer"||o==="popupPositioning"?this._ngZone.runOutsideAngular(s):s():this.runOutside=s=>this._ngZone.runOutsideAngular(s):this.runOutside=s=>s()}get shouldWrapOutgoing(){return this._ngZone&&zt.isInAngularZone()}createLocalEventListenerWrapper(i,s){if(this.shouldWrapOutgoing)return i??(s.setFrameworkOverrides(this),new ms(this))}createGlobalEventListenerWrapper(){return new ms(this)}isFrameworkComponent(i){if(!i)return!1;let s=i.prototype;return s&&"agInit"in s}runInsideAngular(i){return!this._ngZone||zt.isInAngularZone()?i():this._ngZone.run(i)}runOutsideAngular(i,s){return this.runOutside(i,s)}static{this.\u0275fac=function(s){return new(s||e)(gn(zt))}}static{this.\u0275prov=ws({token:e,factory:e.\u0275fac})}}return e})(),RF=(()=>{class e{constructor(i,s,o,n){this._viewContainerRef=s,this._angularFrameworkOverrides=o,this._frameworkCompWrapper=n,this._initialised=!1,this._destroyed=!1,this._holdEvents=!0,this._fullyReady=new Promise(r=>{this._resolveFullyReady=r}),this.statusBar=void 0,this.sideBar=void 0,this.suppressContextMenu=void 0,this.preventDefaultOnContextMenu=void 0,this.allowContextMenuWithControlKey=void 0,this.columnMenu=void 0,this.suppressMenuHide=void 0,this.enableBrowserTooltips=void 0,this.tooltipTrigger=void 0,this.tooltipShowDelay=void 0,this.tooltipHideDelay=void 0,this.tooltipMouseTrack=void 0,this.tooltipShowMode=void 0,this.tooltipInteraction=void 0,this.popupParent=void 0,this.copyHeadersToClipboard=void 0,this.copyGroupHeadersToClipboard=void 0,this.clipboardDelimiter=void 0,this.suppressCopyRowsToClipboard=void 0,this.suppressCopySingleCellRanges=void 0,this.suppressLastEmptyLineOnPaste=void 0,this.suppressClipboardPaste=void 0,this.suppressClipboardApi=void 0,this.suppressCutToClipboard=void 0,this.columnDefs=void 0,this.defaultColDef=void 0,this.defaultColGroupDef=void 0,this.columnTypes=void 0,this.dataTypeDefinitions=void 0,this.maintainColumnOrder=void 0,this.enableStrictPivotColumnOrder=void 0,this.suppressFieldDotNotation=void 0,this.headerHeight=void 0,this.groupHeaderHeight=void 0,this.floatingFiltersHeight=void 0,this.pivotHeaderHeight=void 0,this.pivotGroupHeaderHeight=void 0,this.allowDragFromColumnsToolPanel=void 0,this.suppressMovableColumns=void 0,this.suppressColumnMoveAnimation=void 0,this.suppressMoveWhenColumnDragging=void 0,this.suppressDragLeaveHidesColumns=void 0,this.suppressGroupChangesColumnVisibility=void 0,this.suppressMakeColumnVisibleAfterUnGroup=void 0,this.suppressRowGroupHidesColumns=void 0,this.colResizeDefault=void 0,this.suppressAutoSize=void 0,this.autoSizePadding=void 0,this.skipHeaderOnAutoSize=void 0,this.autoSizeStrategy=void 0,this.components=void 0,this.editType=void 0,this.singleClickEdit=void 0,this.suppressClickEdit=void 0,this.readOnlyEdit=void 0,this.stopEditingWhenCellsLoseFocus=void 0,this.enterNavigatesVertically=void 0,this.enterNavigatesVerticallyAfterEdit=void 0,this.enableCellEditingOnBackspace=void 0,this.undoRedoCellEditing=void 0,this.undoRedoCellEditingLimit=void 0,this.defaultCsvExportParams=void 0,this.suppressCsvExport=void 0,this.defaultExcelExportParams=void 0,this.suppressExcelExport=void 0,this.excelStyles=void 0,this.findSearchValue=void 0,this.findOptions=void 0,this.quickFilterText=void 0,this.cacheQuickFilter=void 0,this.includeHiddenColumnsInQuickFilter=void 0,this.quickFilterParser=void 0,this.quickFilterMatcher=void 0,this.applyQuickFilterBeforePivotOrAgg=void 0,this.excludeChildrenWhenTreeDataFiltering=void 0,this.enableAdvancedFilter=void 0,this.alwaysPassFilter=void 0,this.includeHiddenColumnsInAdvancedFilter=void 0,this.advancedFilterParent=void 0,this.advancedFilterBuilderParams=void 0,this.suppressAdvancedFilterEval=void 0,this.suppressSetFilterByDefault=void 0,this.enableCharts=void 0,this.chartThemes=void 0,this.customChartThemes=void 0,this.chartThemeOverrides=void 0,this.chartToolPanelsDef=void 0,this.chartMenuItems=void 0,this.loadingCellRenderer=void 0,this.loadingCellRendererParams=void 0,this.loadingCellRendererSelector=void 0,this.localeText=void 0,this.masterDetail=void 0,this.keepDetailRows=void 0,this.keepDetailRowsCount=void 0,this.detailCellRenderer=void 0,this.detailCellRendererParams=void 0,this.detailRowHeight=void 0,this.detailRowAutoHeight=void 0,this.context=void 0,this.alignedGrids=void 0,this.tabIndex=void 0,this.rowBuffer=void 0,this.valueCache=void 0,this.valueCacheNeverExpires=void 0,this.enableCellExpressions=void 0,this.suppressTouch=void 0,this.suppressFocusAfterRefresh=void 0,this.suppressBrowserResizeObserver=void 0,this.suppressPropertyNamesCheck=void 0,this.suppressChangeDetection=void 0,this.debug=void 0,this.loading=void 0,this.overlayLoadingTemplate=void 0,this.loadingOverlayComponent=void 0,this.loadingOverlayComponentParams=void 0,this.suppressLoadingOverlay=void 0,this.overlayNoRowsTemplate=void 0,this.noRowsOverlayComponent=void 0,this.noRowsOverlayComponentParams=void 0,this.suppressNoRowsOverlay=void 0,this.pagination=void 0,this.paginationPageSize=void 0,this.paginationPageSizeSelector=void 0,this.paginationAutoPageSize=void 0,this.paginateChildRows=void 0,this.suppressPaginationPanel=void 0,this.pivotMode=void 0,this.pivotPanelShow=void 0,this.pivotMaxGeneratedColumns=void 0,this.pivotDefaultExpanded=void 0,this.pivotColumnGroupTotals=void 0,this.pivotRowTotals=void 0,this.pivotSuppressAutoColumn=void 0,this.suppressExpandablePivotGroups=void 0,this.functionsReadOnly=void 0,this.aggFuncs=void 0,this.suppressAggFuncInHeader=void 0,this.alwaysAggregateAtRootLevel=void 0,this.aggregateOnlyChangedColumns=void 0,this.suppressAggFilteredOnly=void 0,this.removePivotHeaderRowWhenSingleValueColumn=void 0,this.animateRows=void 0,this.cellFlashDuration=void 0,this.cellFadeDuration=void 0,this.allowShowChangeAfterFilter=void 0,this.domLayout=void 0,this.ensureDomOrder=void 0,this.enableCellSpan=void 0,this.enableRtl=void 0,this.suppressColumnVirtualisation=void 0,this.suppressMaxRenderedRowRestriction=void 0,this.suppressRowVirtualisation=void 0,this.rowDragManaged=void 0,this.suppressRowDrag=void 0,this.suppressMoveWhenRowDragging=void 0,this.rowDragEntireRow=void 0,this.rowDragMultiRow=void 0,this.rowDragText=void 0,this.dragAndDropImageComponent=void 0,this.dragAndDropImageComponentParams=void 0,this.fullWidthCellRenderer=void 0,this.fullWidthCellRendererParams=void 0,this.embedFullWidthRows=void 0,this.groupDisplayType=void 0,this.groupDefaultExpanded=void 0,this.autoGroupColumnDef=void 0,this.groupMaintainOrder=void 0,this.groupSelectsChildren=void 0,this.groupLockGroupColumns=void 0,this.groupAggFiltering=void 0,this.groupTotalRow=void 0,this.grandTotalRow=void 0,this.suppressStickyTotalRow=void 0,this.groupSuppressBlankHeader=void 0,this.groupSelectsFiltered=void 0,this.showOpenedGroup=void 0,this.groupHideParentOfSingleChild=void 0,this.groupRemoveSingleChildren=void 0,this.groupRemoveLowestSingleChildren=void 0,this.groupHideOpenParents=void 0,this.groupAllowUnbalanced=void 0,this.rowGroupPanelShow=void 0,this.groupRowRenderer=void 0,this.groupRowRendererParams=void 0,this.treeData=void 0,this.treeDataChildrenField=void 0,this.treeDataParentIdField=void 0,this.rowGroupPanelSuppressSort=void 0,this.suppressGroupRowsSticky=void 0,this.pinnedTopRowData=void 0,this.pinnedBottomRowData=void 0,this.enableRowPinning=void 0,this.isRowPinnable=void 0,this.isRowPinned=void 0,this.rowModelType=void 0,this.rowData=void 0,this.asyncTransactionWaitMillis=void 0,this.suppressModelUpdateAfterUpdateTransaction=void 0,this.datasource=void 0,this.cacheOverflowSize=void 0,this.infiniteInitialRowCount=void 0,this.serverSideInitialRowCount=void 0,this.suppressServerSideFullWidthLoadingRow=void 0,this.cacheBlockSize=void 0,this.maxBlocksInCache=void 0,this.maxConcurrentDatasourceRequests=void 0,this.blockLoadDebounceMillis=void 0,this.purgeClosedRowNodes=void 0,this.serverSideDatasource=void 0,this.serverSideSortAllLevels=void 0,this.serverSideEnableClientSideSort=void 0,this.serverSideOnlyRefreshFilteredGroups=void 0,this.serverSidePivotResultFieldSeparator=void 0,this.viewportDatasource=void 0,this.viewportRowModelPageSize=void 0,this.viewportRowModelBufferSize=void 0,this.alwaysShowHorizontalScroll=void 0,this.alwaysShowVerticalScroll=void 0,this.debounceVerticalScrollbar=void 0,this.suppressHorizontalScroll=void 0,this.suppressScrollOnNewData=void 0,this.suppressScrollWhenPopupsAreOpen=void 0,this.suppressAnimationFrame=void 0,this.suppressMiddleClickScrolls=void 0,this.suppressPreventDefaultOnMouseWheel=void 0,this.scrollbarWidth=void 0,this.rowSelection=void 0,this.cellSelection=void 0,this.rowMultiSelectWithClick=void 0,this.suppressRowDeselection=void 0,this.suppressRowClickSelection=void 0,this.suppressCellFocus=void 0,this.suppressHeaderFocus=void 0,this.selectionColumnDef=void 0,this.rowNumbers=void 0,this.suppressMultiRangeSelection=void 0,this.enableCellTextSelection=void 0,this.enableRangeSelection=void 0,this.enableRangeHandle=void 0,this.enableFillHandle=void 0,this.fillHandleDirection=void 0,this.suppressClearOnFillReduction=void 0,this.sortingOrder=void 0,this.accentedSort=void 0,this.unSortIcon=void 0,this.suppressMultiSort=void 0,this.alwaysMultiSort=void 0,this.multiSortKey=void 0,this.suppressMaintainUnsortedOrder=void 0,this.icons=void 0,this.rowHeight=void 0,this.rowStyle=void 0,this.rowClass=void 0,this.rowClassRules=void 0,this.suppressRowHoverHighlight=void 0,this.suppressRowTransform=void 0,this.columnHoverHighlight=void 0,this.gridId=void 0,this.deltaSort=void 0,this.treeDataDisplayType=void 0,this.enableGroupEdit=void 0,this.initialState=void 0,this.theme=void 0,this.loadThemeGoogleFonts=void 0,this.themeCssLayer=void 0,this.styleNonce=void 0,this.themeStyleContainer=void 0,this.getContextMenuItems=void 0,this.getMainMenuItems=void 0,this.postProcessPopup=void 0,this.processUnpinnedColumns=void 0,this.processCellForClipboard=void 0,this.processHeaderForClipboard=void 0,this.processGroupHeaderForClipboard=void 0,this.processCellFromClipboard=void 0,this.sendToClipboard=void 0,this.processDataFromClipboard=void 0,this.isExternalFilterPresent=void 0,this.doesExternalFilterPass=void 0,this.getChartToolbarItems=void 0,this.createChartContainer=void 0,this.focusGridInnerElement=void 0,this.navigateToNextHeader=void 0,this.tabToNextHeader=void 0,this.navigateToNextCell=void 0,this.tabToNextCell=void 0,this.getLocaleText=void 0,this.getDocument=void 0,this.paginationNumberFormatter=void 0,this.getGroupRowAgg=void 0,this.isGroupOpenByDefault=void 0,this.initialGroupOrderComparator=void 0,this.processPivotResultColDef=void 0,this.processPivotResultColGroupDef=void 0,this.getDataPath=void 0,this.getChildCount=void 0,this.getServerSideGroupLevelParams=void 0,this.isServerSideGroupOpenByDefault=void 0,this.isApplyServerSideTransaction=void 0,this.isServerSideGroup=void 0,this.getServerSideGroupKey=void 0,this.getBusinessKeyForNode=void 0,this.getRowId=void 0,this.resetRowDataOnUpdate=void 0,this.processRowPostCreate=void 0,this.isRowSelectable=void 0,this.isRowMaster=void 0,this.fillOperation=void 0,this.postSortRows=void 0,this.getRowStyle=void 0,this.getRowClass=void 0,this.getRowHeight=void 0,this.isFullWidthRow=void 0,this.toolPanelVisibleChanged=new x,this.toolPanelSizeChanged=new x,this.columnMenuVisibleChanged=new x,this.contextMenuVisibleChanged=new x,this.cutStart=new x,this.cutEnd=new x,this.pasteStart=new x,this.pasteEnd=new x,this.columnVisible=new x,this.columnPinned=new x,this.columnResized=new x,this.columnMoved=new x,this.columnValueChanged=new x,this.columnPivotModeChanged=new x,this.columnPivotChanged=new x,this.columnGroupOpened=new x,this.newColumnsLoaded=new x,this.gridColumnsChanged=new x,this.displayedColumnsChanged=new x,this.virtualColumnsChanged=new x,this.columnEverythingChanged=new x,this.columnHeaderMouseOver=new x,this.columnHeaderMouseLeave=new x,this.columnHeaderClicked=new x,this.columnHeaderContextMenu=new x,this.componentStateChanged=new x,this.cellValueChanged=new x,this.cellEditRequest=new x,this.rowValueChanged=new x,this.cellEditingStarted=new x,this.cellEditingStopped=new x,this.rowEditingStarted=new x,this.rowEditingStopped=new x,this.undoStarted=new x,this.undoEnded=new x,this.redoStarted=new x,this.redoEnded=new x,this.cellSelectionDeleteStart=new x,this.cellSelectionDeleteEnd=new x,this.rangeDeleteStart=new x,this.rangeDeleteEnd=new x,this.fillStart=new x,this.fillEnd=new x,this.filterOpened=new x,this.filterChanged=new x,this.filterModified=new x,this.advancedFilterBuilderVisibleChanged=new x,this.findChanged=new x,this.chartCreated=new x,this.chartRangeSelectionChanged=new x,this.chartOptionsChanged=new x,this.chartDestroyed=new x,this.cellKeyDown=new x,this.gridReady=new x,this.firstDataRendered=new x,this.gridSizeChanged=new x,this.modelUpdated=new x,this.virtualRowRemoved=new x,this.viewportChanged=new x,this.bodyScroll=new x,this.bodyScrollEnd=new x,this.dragStarted=new x,this.dragStopped=new x,this.dragCancelled=new x,this.stateUpdated=new x,this.paginationChanged=new x,this.rowDragEnter=new x,this.rowDragMove=new x,this.rowDragLeave=new x,this.rowDragEnd=new x,this.rowDragCancel=new x,this.rowResizeStarted=new x,this.rowResizeEnded=new x,this.columnRowGroupChanged=new x,this.rowGroupOpened=new x,this.expandOrCollapseAll=new x,this.pivotMaxColumnsExceeded=new x,this.pinnedRowDataChanged=new x,this.pinnedRowsChanged=new x,this.rowDataUpdated=new x,this.asyncTransactionsFlushed=new x,this.storeRefreshed=new x,this.headerFocused=new x,this.cellClicked=new x,this.cellDoubleClicked=new x,this.cellFocused=new x,this.cellMouseOver=new x,this.cellMouseOut=new x,this.cellMouseDown=new x,this.rowClicked=new x,this.rowDoubleClicked=new x,this.rowSelected=new x,this.selectionChanged=new x,this.cellContextMenu=new x,this.rangeSelectionChanged=new x,this.cellSelectionChanged=new x,this.tooltipShow=new x,this.tooltipHide=new x,this.sortChanged=new x,this._nativeElement=i.nativeElement,this._fullyReady.then(()=>{this._holdEvents=!1})}ngAfterViewInit(){this._angularFrameworkOverrides.runOutsideAngular(()=>{this._frameworkCompWrapper.setViewContainerRef(this._viewContainerRef,this._angularFrameworkOverrides);let i=Object.keys(this).filter(a=>!(a.startsWith("_")||a=="gridOptions"||a=="modules"||this[a]instanceof x)),s={};i.forEach(a=>{let l=T1(a,this[a]);s[a]=l});let o=Jr(this.gridOptions,s,i),n={globalListener:this.globalListener.bind(this),frameworkOverrides:this._angularFrameworkOverrides,providedBeanInstances:{frameworkCompWrapper:this._frameworkCompWrapper},modules:this.modules||[],setThemeOnGridDiv:!0},r=Tl(this._nativeElement,o,n);r&&(this.api=r),this._initialised=!0,this._resolveFullyReady()})}ngOnChanges(i){this._initialised&&this._angularFrameworkOverrides.runOutsideAngular(()=>{let s={};for(let o of Object.keys(i)){let n=i[o];s[o]=n.currentValue}ea(s,this.api)})}ngOnDestroy(){this._initialised&&(this._destroyed=!0,this.api?.destroy())}isEmitterUsed(i){let o=this[i],n=o?.observed??o?.observers?.length>0,r=`on${i.charAt(0).toUpperCase()}${i.substring(1)}`,a=!!this.gridOptions&&!!this.gridOptions[r];return n||a}globalListener(i,s){if(this._destroyed)return;let o=this[i];if(o&&this.isEmitterUsed(i)){let n=()=>this._angularFrameworkOverrides.runInsideAngular(()=>o.emit(s));this._holdEvents?this._fullyReady.then(()=>n()):n()}}static{this.\u0275fac=function(s){return new(s||e)(Wt(Cn),Wt(bi),Wt(id),Wt(td))}}static{this.\u0275cmp=Ss({type:e,selectors:[["ag-grid-angular"]],inputs:{gridOptions:"gridOptions",modules:"modules",statusBar:"statusBar",sideBar:"sideBar",suppressContextMenu:[2,"suppressContextMenu","suppressContextMenu",S],preventDefaultOnContextMenu:[2,"preventDefaultOnContextMenu","preventDefaultOnContextMenu",S],allowContextMenuWithControlKey:[2,"allowContextMenuWithControlKey","allowContextMenuWithControlKey",S],columnMenu:"columnMenu",suppressMenuHide:[2,"suppressMenuHide","suppressMenuHide",S],enableBrowserTooltips:[2,"enableBrowserTooltips","enableBrowserTooltips",S],tooltipTrigger:"tooltipTrigger",tooltipShowDelay:"tooltipShowDelay",tooltipHideDelay:"tooltipHideDelay",tooltipMouseTrack:[2,"tooltipMouseTrack","tooltipMouseTrack",S],tooltipShowMode:"tooltipShowMode",tooltipInteraction:[2,"tooltipInteraction","tooltipInteraction",S],popupParent:"popupParent",copyHeadersToClipboard:[2,"copyHeadersToClipboard","copyHeadersToClipboard",S],copyGroupHeadersToClipboard:[2,"copyGroupHeadersToClipboard","copyGroupHeadersToClipboard",S],clipboardDelimiter:"clipboardDelimiter",suppressCopyRowsToClipboard:[2,"suppressCopyRowsToClipboard","suppressCopyRowsToClipboard",S],suppressCopySingleCellRanges:[2,"suppressCopySingleCellRanges","suppressCopySingleCellRanges",S],suppressLastEmptyLineOnPaste:[2,"suppressLastEmptyLineOnPaste","suppressLastEmptyLineOnPaste",S],suppressClipboardPaste:[2,"suppressClipboardPaste","suppressClipboardPaste",S],suppressClipboardApi:[2,"suppressClipboardApi","suppressClipboardApi",S],suppressCutToClipboard:[2,"suppressCutToClipboard","suppressCutToClipboard",S],columnDefs:"columnDefs",defaultColDef:"defaultColDef",defaultColGroupDef:"defaultColGroupDef",columnTypes:"columnTypes",dataTypeDefinitions:"dataTypeDefinitions",maintainColumnOrder:[2,"maintainColumnOrder","maintainColumnOrder",S],enableStrictPivotColumnOrder:[2,"enableStrictPivotColumnOrder","enableStrictPivotColumnOrder",S],suppressFieldDotNotation:[2,"suppressFieldDotNotation","suppressFieldDotNotation",S],headerHeight:"headerHeight",groupHeaderHeight:"groupHeaderHeight",floatingFiltersHeight:"floatingFiltersHeight",pivotHeaderHeight:"pivotHeaderHeight",pivotGroupHeaderHeight:"pivotGroupHeaderHeight",allowDragFromColumnsToolPanel:[2,"allowDragFromColumnsToolPanel","allowDragFromColumnsToolPanel",S],suppressMovableColumns:[2,"suppressMovableColumns","suppressMovableColumns",S],suppressColumnMoveAnimation:[2,"suppressColumnMoveAnimation","suppressColumnMoveAnimation",S],suppressMoveWhenColumnDragging:[2,"suppressMoveWhenColumnDragging","suppressMoveWhenColumnDragging",S],suppressDragLeaveHidesColumns:[2,"suppressDragLeaveHidesColumns","suppressDragLeaveHidesColumns",S],suppressGroupChangesColumnVisibility:"suppressGroupChangesColumnVisibility",suppressMakeColumnVisibleAfterUnGroup:[2,"suppressMakeColumnVisibleAfterUnGroup","suppressMakeColumnVisibleAfterUnGroup",S],suppressRowGroupHidesColumns:[2,"suppressRowGroupHidesColumns","suppressRowGroupHidesColumns",S],colResizeDefault:"colResizeDefault",suppressAutoSize:[2,"suppressAutoSize","suppressAutoSize",S],autoSizePadding:"autoSizePadding",skipHeaderOnAutoSize:[2,"skipHeaderOnAutoSize","skipHeaderOnAutoSize",S],autoSizeStrategy:"autoSizeStrategy",components:"components",editType:"editType",singleClickEdit:[2,"singleClickEdit","singleClickEdit",S],suppressClickEdit:[2,"suppressClickEdit","suppressClickEdit",S],readOnlyEdit:[2,"readOnlyEdit","readOnlyEdit",S],stopEditingWhenCellsLoseFocus:[2,"stopEditingWhenCellsLoseFocus","stopEditingWhenCellsLoseFocus",S],enterNavigatesVertically:[2,"enterNavigatesVertically","enterNavigatesVertically",S],enterNavigatesVerticallyAfterEdit:[2,"enterNavigatesVerticallyAfterEdit","enterNavigatesVerticallyAfterEdit",S],enableCellEditingOnBackspace:[2,"enableCellEditingOnBackspace","enableCellEditingOnBackspace",S],undoRedoCellEditing:[2,"undoRedoCellEditing","undoRedoCellEditing",S],undoRedoCellEditingLimit:"undoRedoCellEditingLimit",defaultCsvExportParams:"defaultCsvExportParams",suppressCsvExport:[2,"suppressCsvExport","suppressCsvExport",S],defaultExcelExportParams:"defaultExcelExportParams",suppressExcelExport:[2,"suppressExcelExport","suppressExcelExport",S],excelStyles:"excelStyles",findSearchValue:"findSearchValue",findOptions:"findOptions",quickFilterText:"quickFilterText",cacheQuickFilter:[2,"cacheQuickFilter","cacheQuickFilter",S],includeHiddenColumnsInQuickFilter:[2,"includeHiddenColumnsInQuickFilter","includeHiddenColumnsInQuickFilter",S],quickFilterParser:"quickFilterParser",quickFilterMatcher:"quickFilterMatcher",applyQuickFilterBeforePivotOrAgg:[2,"applyQuickFilterBeforePivotOrAgg","applyQuickFilterBeforePivotOrAgg",S],excludeChildrenWhenTreeDataFiltering:[2,"excludeChildrenWhenTreeDataFiltering","excludeChildrenWhenTreeDataFiltering",S],enableAdvancedFilter:[2,"enableAdvancedFilter","enableAdvancedFilter",S],alwaysPassFilter:"alwaysPassFilter",includeHiddenColumnsInAdvancedFilter:[2,"includeHiddenColumnsInAdvancedFilter","includeHiddenColumnsInAdvancedFilter",S],advancedFilterParent:"advancedFilterParent",advancedFilterBuilderParams:"advancedFilterBuilderParams",suppressAdvancedFilterEval:[2,"suppressAdvancedFilterEval","suppressAdvancedFilterEval",S],suppressSetFilterByDefault:[2,"suppressSetFilterByDefault","suppressSetFilterByDefault",S],enableCharts:[2,"enableCharts","enableCharts",S],chartThemes:"chartThemes",customChartThemes:"customChartThemes",chartThemeOverrides:"chartThemeOverrides",chartToolPanelsDef:"chartToolPanelsDef",chartMenuItems:"chartMenuItems",loadingCellRenderer:"loadingCellRenderer",loadingCellRendererParams:"loadingCellRendererParams",loadingCellRendererSelector:"loadingCellRendererSelector",localeText:"localeText",masterDetail:[2,"masterDetail","masterDetail",S],keepDetailRows:[2,"keepDetailRows","keepDetailRows",S],keepDetailRowsCount:"keepDetailRowsCount",detailCellRenderer:"detailCellRenderer",detailCellRendererParams:"detailCellRendererParams",detailRowHeight:"detailRowHeight",detailRowAutoHeight:[2,"detailRowAutoHeight","detailRowAutoHeight",S],context:"context",alignedGrids:"alignedGrids",tabIndex:"tabIndex",rowBuffer:"rowBuffer",valueCache:[2,"valueCache","valueCache",S],valueCacheNeverExpires:[2,"valueCacheNeverExpires","valueCacheNeverExpires",S],enableCellExpressions:[2,"enableCellExpressions","enableCellExpressions",S],suppressTouch:[2,"suppressTouch","suppressTouch",S],suppressFocusAfterRefresh:[2,"suppressFocusAfterRefresh","suppressFocusAfterRefresh",S],suppressBrowserResizeObserver:[2,"suppressBrowserResizeObserver","suppressBrowserResizeObserver",S],suppressPropertyNamesCheck:[2,"suppressPropertyNamesCheck","suppressPropertyNamesCheck",S],suppressChangeDetection:[2,"suppressChangeDetection","suppressChangeDetection",S],debug:[2,"debug","debug",S],loading:[2,"loading","loading",S],overlayLoadingTemplate:"overlayLoadingTemplate",loadingOverlayComponent:"loadingOverlayComponent",loadingOverlayComponentParams:"loadingOverlayComponentParams",suppressLoadingOverlay:[2,"suppressLoadingOverlay","suppressLoadingOverlay",S],overlayNoRowsTemplate:"overlayNoRowsTemplate",noRowsOverlayComponent:"noRowsOverlayComponent",noRowsOverlayComponentParams:"noRowsOverlayComponentParams",suppressNoRowsOverlay:[2,"suppressNoRowsOverlay","suppressNoRowsOverlay",S],pagination:[2,"pagination","pagination",S],paginationPageSize:"paginationPageSize",paginationPageSizeSelector:"paginationPageSizeSelector",paginationAutoPageSize:[2,"paginationAutoPageSize","paginationAutoPageSize",S],paginateChildRows:[2,"paginateChildRows","paginateChildRows",S],suppressPaginationPanel:[2,"suppressPaginationPanel","suppressPaginationPanel",S],pivotMode:[2,"pivotMode","pivotMode",S],pivotPanelShow:"pivotPanelShow",pivotMaxGeneratedColumns:"pivotMaxGeneratedColumns",pivotDefaultExpanded:"pivotDefaultExpanded",pivotColumnGroupTotals:"pivotColumnGroupTotals",pivotRowTotals:"pivotRowTotals",pivotSuppressAutoColumn:[2,"pivotSuppressAutoColumn","pivotSuppressAutoColumn",S],suppressExpandablePivotGroups:[2,"suppressExpandablePivotGroups","suppressExpandablePivotGroups",S],functionsReadOnly:[2,"functionsReadOnly","functionsReadOnly",S],aggFuncs:"aggFuncs",suppressAggFuncInHeader:[2,"suppressAggFuncInHeader","suppressAggFuncInHeader",S],alwaysAggregateAtRootLevel:[2,"alwaysAggregateAtRootLevel","alwaysAggregateAtRootLevel",S],aggregateOnlyChangedColumns:[2,"aggregateOnlyChangedColumns","aggregateOnlyChangedColumns",S],suppressAggFilteredOnly:[2,"suppressAggFilteredOnly","suppressAggFilteredOnly",S],removePivotHeaderRowWhenSingleValueColumn:[2,"removePivotHeaderRowWhenSingleValueColumn","removePivotHeaderRowWhenSingleValueColumn",S],animateRows:[2,"animateRows","animateRows",S],cellFlashDuration:"cellFlashDuration",cellFadeDuration:"cellFadeDuration",allowShowChangeAfterFilter:[2,"allowShowChangeAfterFilter","allowShowChangeAfterFilter",S],domLayout:"domLayout",ensureDomOrder:[2,"ensureDomOrder","ensureDomOrder",S],enableCellSpan:[2,"enableCellSpan","enableCellSpan",S],enableRtl:[2,"enableRtl","enableRtl",S],suppressColumnVirtualisation:[2,"suppressColumnVirtualisation","suppressColumnVirtualisation",S],suppressMaxRenderedRowRestriction:[2,"suppressMaxRenderedRowRestriction","suppressMaxRenderedRowRestriction",S],suppressRowVirtualisation:[2,"suppressRowVirtualisation","suppressRowVirtualisation",S],rowDragManaged:[2,"rowDragManaged","rowDragManaged",S],suppressRowDrag:[2,"suppressRowDrag","suppressRowDrag",S],suppressMoveWhenRowDragging:[2,"suppressMoveWhenRowDragging","suppressMoveWhenRowDragging",S],rowDragEntireRow:[2,"rowDragEntireRow","rowDragEntireRow",S],rowDragMultiRow:[2,"rowDragMultiRow","rowDragMultiRow",S],rowDragText:"rowDragText",dragAndDropImageComponent:"dragAndDropImageComponent",dragAndDropImageComponentParams:"dragAndDropImageComponentParams",fullWidthCellRenderer:"fullWidthCellRenderer",fullWidthCellRendererParams:"fullWidthCellRendererParams",embedFullWidthRows:[2,"embedFullWidthRows","embedFullWidthRows",S],groupDisplayType:"groupDisplayType",groupDefaultExpanded:"groupDefaultExpanded",autoGroupColumnDef:"autoGroupColumnDef",groupMaintainOrder:[2,"groupMaintainOrder","groupMaintainOrder",S],groupSelectsChildren:[2,"groupSelectsChildren","groupSelectsChildren",S],groupLockGroupColumns:"groupLockGroupColumns",groupAggFiltering:"groupAggFiltering",groupTotalRow:"groupTotalRow",grandTotalRow:"grandTotalRow",suppressStickyTotalRow:"suppressStickyTotalRow",groupSuppressBlankHeader:[2,"groupSuppressBlankHeader","groupSuppressBlankHeader",S],groupSelectsFiltered:[2,"groupSelectsFiltered","groupSelectsFiltered",S],showOpenedGroup:[2,"showOpenedGroup","showOpenedGroup",S],groupHideParentOfSingleChild:"groupHideParentOfSingleChild",groupRemoveSingleChildren:[2,"groupRemoveSingleChildren","groupRemoveSingleChildren",S],groupRemoveLowestSingleChildren:[2,"groupRemoveLowestSingleChildren","groupRemoveLowestSingleChildren",S],groupHideOpenParents:[2,"groupHideOpenParents","groupHideOpenParents",S],groupAllowUnbalanced:[2,"groupAllowUnbalanced","groupAllowUnbalanced",S],rowGroupPanelShow:"rowGroupPanelShow",groupRowRenderer:"groupRowRenderer",groupRowRendererParams:"groupRowRendererParams",treeData:[2,"treeData","treeData",S],treeDataChildrenField:"treeDataChildrenField",treeDataParentIdField:"treeDataParentIdField",rowGroupPanelSuppressSort:[2,"rowGroupPanelSuppressSort","rowGroupPanelSuppressSort",S],suppressGroupRowsSticky:[2,"suppressGroupRowsSticky","suppressGroupRowsSticky",S],pinnedTopRowData:"pinnedTopRowData",pinnedBottomRowData:"pinnedBottomRowData",enableRowPinning:"enableRowPinning",isRowPinnable:"isRowPinnable",isRowPinned:"isRowPinned",rowModelType:"rowModelType",rowData:"rowData",asyncTransactionWaitMillis:"asyncTransactionWaitMillis",suppressModelUpdateAfterUpdateTransaction:[2,"suppressModelUpdateAfterUpdateTransaction","suppressModelUpdateAfterUpdateTransaction",S],datasource:"datasource",cacheOverflowSize:"cacheOverflowSize",infiniteInitialRowCount:"infiniteInitialRowCount",serverSideInitialRowCount:"serverSideInitialRowCount",suppressServerSideFullWidthLoadingRow:[2,"suppressServerSideFullWidthLoadingRow","suppressServerSideFullWidthLoadingRow",S],cacheBlockSize:"cacheBlockSize",maxBlocksInCache:"maxBlocksInCache",maxConcurrentDatasourceRequests:"maxConcurrentDatasourceRequests",blockLoadDebounceMillis:"blockLoadDebounceMillis",purgeClosedRowNodes:[2,"purgeClosedRowNodes","purgeClosedRowNodes",S],serverSideDatasource:"serverSideDatasource",serverSideSortAllLevels:[2,"serverSideSortAllLevels","serverSideSortAllLevels",S],serverSideEnableClientSideSort:[2,"serverSideEnableClientSideSort","serverSideEnableClientSideSort",S],serverSideOnlyRefreshFilteredGroups:[2,"serverSideOnlyRefreshFilteredGroups","serverSideOnlyRefreshFilteredGroups",S],serverSidePivotResultFieldSeparator:"serverSidePivotResultFieldSeparator",viewportDatasource:"viewportDatasource",viewportRowModelPageSize:"viewportRowModelPageSize",viewportRowModelBufferSize:"viewportRowModelBufferSize",alwaysShowHorizontalScroll:[2,"alwaysShowHorizontalScroll","alwaysShowHorizontalScroll",S],alwaysShowVerticalScroll:[2,"alwaysShowVerticalScroll","alwaysShowVerticalScroll",S],debounceVerticalScrollbar:[2,"debounceVerticalScrollbar","debounceVerticalScrollbar",S],suppressHorizontalScroll:[2,"suppressHorizontalScroll","suppressHorizontalScroll",S],suppressScrollOnNewData:[2,"suppressScrollOnNewData","suppressScrollOnNewData",S],suppressScrollWhenPopupsAreOpen:[2,"suppressScrollWhenPopupsAreOpen","suppressScrollWhenPopupsAreOpen",S],suppressAnimationFrame:[2,"suppressAnimationFrame","suppressAnimationFrame",S],suppressMiddleClickScrolls:[2,"suppressMiddleClickScrolls","suppressMiddleClickScrolls",S],suppressPreventDefaultOnMouseWheel:[2,"suppressPreventDefaultOnMouseWheel","suppressPreventDefaultOnMouseWheel",S],scrollbarWidth:"scrollbarWidth",rowSelection:"rowSelection",cellSelection:"cellSelection",rowMultiSelectWithClick:[2,"rowMultiSelectWithClick","rowMultiSelectWithClick",S],suppressRowDeselection:[2,"suppressRowDeselection","suppressRowDeselection",S],suppressRowClickSelection:[2,"suppressRowClickSelection","suppressRowClickSelection",S],suppressCellFocus:[2,"suppressCellFocus","suppressCellFocus",S],suppressHeaderFocus:[2,"suppressHeaderFocus","suppressHeaderFocus",S],selectionColumnDef:"selectionColumnDef",rowNumbers:"rowNumbers",suppressMultiRangeSelection:[2,"suppressMultiRangeSelection","suppressMultiRangeSelection",S],enableCellTextSelection:[2,"enableCellTextSelection","enableCellTextSelection",S],enableRangeSelection:[2,"enableRangeSelection","enableRangeSelection",S],enableRangeHandle:[2,"enableRangeHandle","enableRangeHandle",S],enableFillHandle:[2,"enableFillHandle","enableFillHandle",S],fillHandleDirection:"fillHandleDirection",suppressClearOnFillReduction:[2,"suppressClearOnFillReduction","suppressClearOnFillReduction",S],sortingOrder:"sortingOrder",accentedSort:[2,"accentedSort","accentedSort",S],unSortIcon:[2,"unSortIcon","unSortIcon",S],suppressMultiSort:[2,"suppressMultiSort","suppressMultiSort",S],alwaysMultiSort:[2,"alwaysMultiSort","alwaysMultiSort",S],multiSortKey:"multiSortKey",suppressMaintainUnsortedOrder:[2,"suppressMaintainUnsortedOrder","suppressMaintainUnsortedOrder",S],icons:"icons",rowHeight:"rowHeight",rowStyle:"rowStyle",rowClass:"rowClass",rowClassRules:"rowClassRules",suppressRowHoverHighlight:[2,"suppressRowHoverHighlight","suppressRowHoverHighlight",S],suppressRowTransform:[2,"suppressRowTransform","suppressRowTransform",S],columnHoverHighlight:[2,"columnHoverHighlight","columnHoverHighlight",S],gridId:"gridId",deltaSort:[2,"deltaSort","deltaSort",S],treeDataDisplayType:"treeDataDisplayType",enableGroupEdit:[2,"enableGroupEdit","enableGroupEdit",S],initialState:"initialState",theme:"theme",loadThemeGoogleFonts:[2,"loadThemeGoogleFonts","loadThemeGoogleFonts",S],themeCssLayer:"themeCssLayer",styleNonce:"styleNonce",themeStyleContainer:"themeStyleContainer",getContextMenuItems:"getContextMenuItems",getMainMenuItems:"getMainMenuItems",postProcessPopup:"postProcessPopup",processUnpinnedColumns:"processUnpinnedColumns",processCellForClipboard:"processCellForClipboard",processHeaderForClipboard:"processHeaderForClipboard",processGroupHeaderForClipboard:"processGroupHeaderForClipboard",processCellFromClipboard:"processCellFromClipboard",sendToClipboard:"sendToClipboard",processDataFromClipboard:"processDataFromClipboard",isExternalFilterPresent:"isExternalFilterPresent",doesExternalFilterPass:"doesExternalFilterPass",getChartToolbarItems:"getChartToolbarItems",createChartContainer:"createChartContainer",focusGridInnerElement:"focusGridInnerElement",navigateToNextHeader:"navigateToNextHeader",tabToNextHeader:"tabToNextHeader",navigateToNextCell:"navigateToNextCell",tabToNextCell:"tabToNextCell",getLocaleText:"getLocaleText",getDocument:"getDocument",paginationNumberFormatter:"paginationNumberFormatter",getGroupRowAgg:"getGroupRowAgg",isGroupOpenByDefault:"isGroupOpenByDefault",initialGroupOrderComparator:"initialGroupOrderComparator",processPivotResultColDef:"processPivotResultColDef",processPivotResultColGroupDef:"processPivotResultColGroupDef",getDataPath:"getDataPath",getChildCount:"getChildCount",getServerSideGroupLevelParams:"getServerSideGroupLevelParams",isServerSideGroupOpenByDefault:"isServerSideGroupOpenByDefault",isApplyServerSideTransaction:"isApplyServerSideTransaction",isServerSideGroup:"isServerSideGroup",getServerSideGroupKey:"getServerSideGroupKey",getBusinessKeyForNode:"getBusinessKeyForNode",getRowId:"getRowId",resetRowDataOnUpdate:[2,"resetRowDataOnUpdate","resetRowDataOnUpdate",S],processRowPostCreate:"processRowPostCreate",isRowSelectable:"isRowSelectable",isRowMaster:"isRowMaster",fillOperation:"fillOperation",postSortRows:"postSortRows",getRowStyle:"getRowStyle",getRowClass:"getRowClass",getRowHeight:"getRowHeight",isFullWidthRow:"isFullWidthRow"},outputs:{toolPanelVisibleChanged:"toolPanelVisibleChanged",toolPanelSizeChanged:"toolPanelSizeChanged",columnMenuVisibleChanged:"columnMenuVisibleChanged",contextMenuVisibleChanged:"contextMenuVisibleChanged",cutStart:"cutStart",cutEnd:"cutEnd",pasteStart:"pasteStart",pasteEnd:"pasteEnd",columnVisible:"columnVisible",columnPinned:"columnPinned",columnResized:"columnResized",columnMoved:"columnMoved",columnValueChanged:"columnValueChanged",columnPivotModeChanged:"columnPivotModeChanged",columnPivotChanged:"columnPivotChanged",columnGroupOpened:"columnGroupOpened",newColumnsLoaded:"newColumnsLoaded",gridColumnsChanged:"gridColumnsChanged",displayedColumnsChanged:"displayedColumnsChanged",virtualColumnsChanged:"virtualColumnsChanged",columnEverythingChanged:"columnEverythingChanged",columnHeaderMouseOver:"columnHeaderMouseOver",columnHeaderMouseLeave:"columnHeaderMouseLeave",columnHeaderClicked:"columnHeaderClicked",columnHeaderContextMenu:"columnHeaderContextMenu",componentStateChanged:"componentStateChanged",cellValueChanged:"cellValueChanged",cellEditRequest:"cellEditRequest",rowValueChanged:"rowValueChanged",cellEditingStarted:"cellEditingStarted",cellEditingStopped:"cellEditingStopped",rowEditingStarted:"rowEditingStarted",rowEditingStopped:"rowEditingStopped",undoStarted:"undoStarted",undoEnded:"undoEnded",redoStarted:"redoStarted",redoEnded:"redoEnded",cellSelectionDeleteStart:"cellSelectionDeleteStart",cellSelectionDeleteEnd:"cellSelectionDeleteEnd",rangeDeleteStart:"rangeDeleteStart",rangeDeleteEnd:"rangeDeleteEnd",fillStart:"fillStart",fillEnd:"fillEnd",filterOpened:"filterOpened",filterChanged:"filterChanged",filterModified:"filterModified",advancedFilterBuilderVisibleChanged:"advancedFilterBuilderVisibleChanged",findChanged:"findChanged",chartCreated:"chartCreated",chartRangeSelectionChanged:"chartRangeSelectionChanged",chartOptionsChanged:"chartOptionsChanged",chartDestroyed:"chartDestroyed",cellKeyDown:"cellKeyDown",gridReady:"gridReady",firstDataRendered:"firstDataRendered",gridSizeChanged:"gridSizeChanged",modelUpdated:"modelUpdated",virtualRowRemoved:"virtualRowRemoved",viewportChanged:"viewportChanged",bodyScroll:"bodyScroll",bodyScrollEnd:"bodyScrollEnd",dragStarted:"dragStarted",dragStopped:"dragStopped",dragCancelled:"dragCancelled",stateUpdated:"stateUpdated",paginationChanged:"paginationChanged",rowDragEnter:"rowDragEnter",rowDragMove:"rowDragMove",rowDragLeave:"rowDragLeave",rowDragEnd:"rowDragEnd",rowDragCancel:"rowDragCancel",rowResizeStarted:"rowResizeStarted",rowResizeEnded:"rowResizeEnded",columnRowGroupChanged:"columnRowGroupChanged",rowGroupOpened:"rowGroupOpened",expandOrCollapseAll:"expandOrCollapseAll",pivotMaxColumnsExceeded:"pivotMaxColumnsExceeded",pinnedRowDataChanged:"pinnedRowDataChanged",pinnedRowsChanged:"pinnedRowsChanged",rowDataUpdated:"rowDataUpdated",asyncTransactionsFlushed:"asyncTransactionsFlushed",storeRefreshed:"storeRefreshed",headerFocused:"headerFocused",cellClicked:"cellClicked",cellDoubleClicked:"cellDoubleClicked",cellFocused:"cellFocused",cellMouseOver:"cellMouseOver",cellMouseOut:"cellMouseOut",cellMouseDown:"cellMouseDown",rowClicked:"rowClicked",rowDoubleClicked:"rowDoubleClicked",rowSelected:"rowSelected",selectionChanged:"selectionChanged",cellContextMenu:"cellContextMenu",rangeSelectionChanged:"rangeSelectionChanged",cellSelectionChanged:"cellSelectionChanged",tooltipShow:"tooltipShow",tooltipHide:"tooltipHide",sortChanged:"sortChanged"},features:[wn([id,td]),vn,fn],decls:0,vars:0,template:function(s,o){},encapsulation:2})}}return e})(),M1=new Set(on);function T1(e,t){return M1.has(e)?t===""?!0:t==="false"?!1:t:t}export{A1 as a,k1 as b,RF as c};

Youez - 2016 - github.com/yon3zu
LinuXploit